From e577a275856b22e1768831c2935973bc281ffc2d Mon Sep 17 00:00:00 2001 From: Aron Budea Date: Thu, 24 Sep 2026 01:16:44 +0930 Subject: [PATCH 001/289] sd: adjust theme ids when exporting notes to PPTX Previous numbering was from before the deduplication in commit 9205b4eb09dcb4c91539e092db521154fc4e9523. Deduplication collapses themes for the same master to a single XML, and the theme for notes master didn't follow in numbering, causing a big gap, eg. theme1.xml being followed by theme13.xml. Use mnThemeIdMax introduced there. Change-Id: I5e9ddb11716543bc816d47f5aac03bb2f182dc62 Signed-off-by: Aron Budea Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/13448 Reviewed-by: Mike Kaganski Tested-by: Jenkins CPCI (cherry picked from commit a1f3059174fa5ff51d258b5a2125884cb1b4e23b) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211513 Tested-by: Jenkins Reviewed-by: Xisco Fauli --- sd/qa/unit/export-tests-ooxml4.cxx | 32 ++++++++++++++++++++++++ sd/source/filter/eppt/pptx-epptooxml.cxx | 4 +-- 2 files changed, 34 insertions(+), 2 deletions(-) diff --git a/sd/qa/unit/export-tests-ooxml4.cxx b/sd/qa/unit/export-tests-ooxml4.cxx index 97116c2dd5f8..99ec6d476e11 100644 --- a/sd/qa/unit/export-tests-ooxml4.cxx +++ b/sd/qa/unit/export-tests-ooxml4.cxx @@ -1456,6 +1456,38 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest4, testTdf157740_slideMasters) assertXPath(pXmlDocContent, "/p:sldMaster/p:sldLayoutIdLst/p:sldLayoutId", 7); } +CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest4, testNotesMasterThemeNoAfterDeduplicatedMasters) +{ + createSdImpressDoc("n759180.pptx"); + save(TestFilter::PPTX); + + xmlDocUniquePtr pXmlDocContent = parseExport(u"ppt/presentation.xml"_ustr); + assertXPath(pXmlDocContent, "/p:presentation/p:sldMasterIdLst/p:sldMasterId", 1); + + xmlDocUniquePtr pXmlDocRels = parseExport(u"ppt/slideMasters/_rels/slideMaster1.xml.rels"_ustr); + assertXPath(pXmlDocRels, + "/rels:Relationships/rels:Relationship[@Type='http://schemas.openxmlformats.org/" + "officeDocument/2006/relationships/theme']", + "Target", u"../theme/theme1.xml"); + + // The one slide master of this document has 12 layouts, which are imported as 12 master pages + // and written back as one slide master. The notes master theme takes the number after the slide + // master theme, as in the original file, without a gap for the master pages that were merged. + // Without the change in place, this test would have failed with: + // - Expected: ../theme/theme2.xml + // - Actual : ../theme/theme13.xml + pXmlDocRels = parseExport(u"ppt/notesMasters/_rels/notesMaster1.xml.rels"_ustr); + assertXPath(pXmlDocRels, + "/rels:Relationships/rels:Relationship[@Type='http://schemas.openxmlformats.org/" + "officeDocument/2006/relationships/theme']", + "Target", u"../theme/theme2.xml"); + + uno::Reference xNameAccess + = packages::zip::ZipFileAccess::createWithURL(comphelper::getComponentContext(m_xSFactory), + maTempFile.GetURL()); + CPPUNIT_ASSERT_EQUAL(true, bool(xNameAccess->hasByName(u"ppt/theme/theme2.xml"_ustr))); +} + CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest4, testTdf159931_slideLayouts) { createSdImpressDoc("odp/repeatBitmapMode.odp"); diff --git a/sd/source/filter/eppt/pptx-epptooxml.cxx b/sd/source/filter/eppt/pptx-epptooxml.cxx index 9843f5ed8785..4a7152993130 100644 --- a/sd/source/filter/eppt/pptx-epptooxml.cxx +++ b/sd/source/filter/eppt/pptx-epptooxml.cxx @@ -3330,12 +3330,12 @@ void PowerPointExport::WriteNotesMaster() auto pTheme = std::make_shared("Office Theme"); pTheme->setColorSet(std::make_shared(*pDefaultColorSet)); - WriteTheme(mnMasterPages - static_cast(mbHasCanvasPage), pTheme.get()); + WriteTheme(mnThemeIdMax, pTheme.get()); // add implicit relation to the presentation theme addRelation(pFS->getOutputStream(), oox::getRelationship(Relationship::THEME), - Concat2View("../theme/theme" + OUString::number(mnMasterPages + 1 - static_cast(mbHasCanvasPage)) + ".xml")); + Concat2View("../theme/theme" + OUString::number(++mnThemeIdMax) + ".xml")); } pFS->startElementNS(XML_p, XML_notesMaster, presentationNamespaces(*this)); From 9e957fea2b59e74e387d39eb9544f4ded61f2480 Mon Sep 17 00:00:00 2001 From: Justin Luth Date: Mon, 28 Sep 2026 10:46:34 -0400 Subject: [PATCH 002/289] tdf#173759 tdf#169219 swrelpagesize ui: update only on relation changes This fixes a 26.2 regression from my commit fe2381cb811d970453bd3fc1e67e1e36fa8f9abf tdf#169219 swrelpagesize ui: update on relation changes where I said that the size changed if the listbox containing 'relative from page' or 'relative from paragraph' changed_from_save. Well, that list box value was never saved, so it always reported true. That has exposed other existing bugs... Change-Id: If0990dfae5effb8c29eeb5abc18c6d4af7dc3f12 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211517 Tested-by: Jenkins Reviewed-by: Justin Luth --- sw/source/ui/frmdlg/frmpage.cxx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sw/source/ui/frmdlg/frmpage.cxx b/sw/source/ui/frmdlg/frmpage.cxx index 32262ac648bf..8530002f0f38 100644 --- a/sw/source/ui/frmdlg/frmpage.cxx +++ b/sw/source/ui/frmdlg/frmpage.cxx @@ -1116,6 +1116,8 @@ void SwFramePage::Reset( const SfxItemSet *rSet ) m_xWidthED->save_value(); m_xHeightED->save_value(); + m_xRelWidthRelationLB->save_value(); + m_xRelHeightRelationLB->save_value(); m_bNoModifyHdl = false; //lock PercentFields From 255d2f8d50fdd03651f1cd3994757268a1a9ffc6 Mon Sep 17 00:00:00 2001 From: Michael Meeks Date: Wed, 16 Sep 2026 21:53:33 +0000 Subject: [PATCH 003/289] sw: drop the doc.hxx include from wrtsh.hxx. wrtsh.hxx needed SwDoc only for the inline constructor of MakeAllOutlineContentTemporarilyVisible - drop that into wrtsh1.cxx near the guard's lock counter, and we get a free fwd definition through editsh.hxx. clang -ftime-trace data suggests ~2% of the sw compile time Signed-off-by: Michael Meeks Change-Id: Ie2f4baa82f83fea1ecdc4e189b93879a1ce8b3f3 Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/12942 Reviewed-by: Noel Grandin Tested-by: Jenkins CPCI (cherry picked from commit 90fd1010608bc49befeb5efe21540d006fe1f67a) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211355 Tested-by: Jenkins Reviewed-by: Xisco Fauli --- sw/source/ui/config/optcomp.cxx | 2 +- sw/source/ui/dbui/dbinsdlg.cxx | 1 + sw/source/ui/envelp/envfmt.cxx | 1 + sw/source/ui/fldui/fldref.cxx | 2 ++ sw/source/ui/frmdlg/frmdlg.cxx | 1 + sw/source/ui/misc/contentcontroldlg.cxx | 1 + sw/source/uibase/config/viewopt.cxx | 1 + sw/source/uibase/dialog/regionsw.cxx | 1 + .../uibase/docvw/FrameControlsManager.cxx | 1 + .../docvw/contentcontrolaliasbutton.cxx | 1 + sw/source/uibase/inc/QuickFindPanel.hxx | 8 ++--- sw/source/uibase/inc/wrtsh.hxx | 36 ++----------------- sw/source/uibase/shells/textidx.cxx | 1 + sw/source/uibase/sidebar/CommentsPanel.cxx | 1 + sw/source/uibase/sidebar/QuickFindPanel.cxx | 1 + sw/source/uibase/table/chartins.cxx | 1 + sw/source/uibase/uiview/viewprt.cxx | 1 + sw/source/uibase/wrtsh/wrtsh1.cxx | 32 +++++++++++++++++ 18 files changed, 55 insertions(+), 38 deletions(-) diff --git a/sw/source/ui/config/optcomp.cxx b/sw/source/ui/config/optcomp.cxx index fe398c77fb41..d6fac33a0cc6 100644 --- a/sw/source/ui/config/optcomp.cxx +++ b/sw/source/ui/config/optcomp.cxx @@ -20,6 +20,7 @@ #include #include +#include #include #include #include @@ -33,7 +34,6 @@ #include #include #include -#include #include #include #include diff --git a/sw/source/ui/dbui/dbinsdlg.cxx b/sw/source/ui/dbui/dbinsdlg.cxx index 1b77a000fabc..6a669f5d8d90 100644 --- a/sw/source/ui/dbui/dbinsdlg.cxx +++ b/sw/source/ui/dbui/dbinsdlg.cxx @@ -59,6 +59,7 @@ #include #include #include +#include #include #include #include diff --git a/sw/source/ui/envelp/envfmt.cxx b/sw/source/ui/envelp/envfmt.cxx index d13775385fcd..f79229619705 100644 --- a/sw/source/ui/envelp/envfmt.cxx +++ b/sw/source/ui/envelp/envfmt.cxx @@ -32,6 +32,7 @@ #include #include #include +#include #include #include "envfmt.hxx" #include diff --git a/sw/source/ui/fldui/fldref.cxx b/sw/source/ui/fldui/fldref.cxx index 269a9f173b3e..910a84a5848d 100644 --- a/sw/source/ui/fldui/fldref.cxx +++ b/sw/source/ui/fldui/fldref.cxx @@ -25,6 +25,8 @@ #include #include #include +#include +#include #include #include diff --git a/sw/source/ui/frmdlg/frmdlg.cxx b/sw/source/ui/frmdlg/frmdlg.cxx index e8b9dec459ee..3b7e5697db0b 100644 --- a/sw/source/ui/frmdlg/frmdlg.cxx +++ b/sw/source/ui/frmdlg/frmdlg.cxx @@ -24,6 +24,7 @@ #include #include #include +#include #include #include #include diff --git a/sw/source/ui/misc/contentcontroldlg.cxx b/sw/source/ui/misc/contentcontroldlg.cxx index 746e40e562a4..4b6781a64ef2 100644 --- a/sw/source/ui/misc/contentcontroldlg.cxx +++ b/sw/source/ui/misc/contentcontroldlg.cxx @@ -26,6 +26,7 @@ #include #include +#include #include #include #include diff --git a/sw/source/uibase/config/viewopt.cxx b/sw/source/uibase/config/viewopt.cxx index 7645b2596e39..206f9bb68b16 100644 --- a/sw/source/uibase/config/viewopt.cxx +++ b/sw/source/uibase/config/viewopt.cxx @@ -20,6 +20,7 @@ #include #include +#include #include #include #include diff --git a/sw/source/uibase/dialog/regionsw.cxx b/sw/source/uibase/dialog/regionsw.cxx index f1b06b32b9e0..efc00cbe5e76 100644 --- a/sw/source/uibase/dialog/regionsw.cxx +++ b/sw/source/uibase/dialog/regionsw.cxx @@ -28,6 +28,7 @@ #include #include #include +#include #include #include #include diff --git a/sw/source/uibase/docvw/FrameControlsManager.cxx b/sw/source/uibase/docvw/FrameControlsManager.cxx index a2a6cd273602..78064212fcfd 100644 --- a/sw/source/uibase/docvw/FrameControlsManager.cxx +++ b/sw/source/uibase/docvw/FrameControlsManager.cxx @@ -13,6 +13,7 @@ #include #include #include +#include #include #include #include diff --git a/sw/source/uibase/docvw/contentcontrolaliasbutton.cxx b/sw/source/uibase/docvw/contentcontrolaliasbutton.cxx index cd0be65eddaa..37442bbea63b 100644 --- a/sw/source/uibase/docvw/contentcontrolaliasbutton.cxx +++ b/sw/source/uibase/docvw/contentcontrolaliasbutton.cxx @@ -16,6 +16,7 @@ #include #include #include +#include #include #include diff --git a/sw/source/uibase/inc/QuickFindPanel.hxx b/sw/source/uibase/inc/QuickFindPanel.hxx index 2e46cb395a82..ac81afb8e5f0 100644 --- a/sw/source/uibase/inc/QuickFindPanel.hxx +++ b/sw/source/uibase/inc/QuickFindPanel.hxx @@ -32,11 +32,11 @@ namespace sw::sidebar class QuickFindPanel : public PanelLayout { public: - static std::unique_ptr Create(weld::Widget* pParent, - const uno::Reference& rxFrame, - SfxBindings* pBindings); + static std::unique_ptr + Create(weld::Widget* pParent, const css::uno::Reference& rxFrame, + SfxBindings* pBindings); - QuickFindPanel(weld::Widget* pParent, const uno::Reference& rxFrame, + QuickFindPanel(weld::Widget* pParent, const css::uno::Reference& rxFrame, SfxBindings* pBindings); virtual ~QuickFindPanel() override; diff --git a/sw/source/uibase/inc/wrtsh.hxx b/sw/source/uibase/inc/wrtsh.hxx index b777e74d191c..a4b1b4ce4279 100644 --- a/sw/source/uibase/inc/wrtsh.hxx +++ b/sw/source/uibase/inc/wrtsh.hxx @@ -30,7 +30,6 @@ #include #include -#include #include #include #include @@ -210,7 +209,7 @@ public: // select word / sentence bool SelNearestWrd(); - SW_DLLPUBLIC bool SelWrd(const Point * = nullptr, sal_Int16 nWordType = i18n::WordType::ANYWORD_IGNOREWHITESPACES ); + SW_DLLPUBLIC bool SelWrd(const Point * = nullptr, sal_Int16 nWordType = ::com::sun::star::i18n::WordType::ANYWORD_IGNOREWHITESPACES ); // #i32329# Enhanced selection void SelSentence (const Point *); SW_DLLPUBLIC void SelPara (const Point *); @@ -720,37 +719,8 @@ private: bool m_bScrollToCursor = false; public: static sal_uInt32 nLock; - MakeAllOutlineContentTemporarilyVisible(SwDoc* pDoc, bool bScrollToCursor = false) - { - ++nLock; - if (nLock > 1) - return; - if (SwDocShell* pDocSh = pDoc->GetDocShell()) - if ((m_pWrtSh = pDocSh->GetWrtShell()) && m_pWrtSh->GetViewOptions() && - m_pWrtSh->GetViewOptions()->IsShowOutlineContentVisibilityButton()) - { - m_pWrtSh->LockView(true); - m_pWrtSh->LockPaint(LockPaintReason::OutlineFolding); - m_pWrtSh->MakeAllFoldedOutlineContentVisible(); - m_bScrollToCursor = bScrollToCursor; - m_bDone = true; - } - } - - ~MakeAllOutlineContentTemporarilyVisible() COVERITY_NOEXCEPT_FALSE - { - --nLock; - if (nLock > 0) - return; - if (m_bDone && m_pWrtSh) - { - m_pWrtSh->MakeAllFoldedOutlineContentVisible(false); - m_pWrtSh->UnlockPaint(); - m_pWrtSh->LockView(false); - if (m_bScrollToCursor) - m_pWrtSh->UpdateCursor(SwCursorShell::SCROLLWIN); - } - } + MakeAllOutlineContentTemporarilyVisible(SwDoc* pDoc, bool bScrollToCursor = false); + ~MakeAllOutlineContentTemporarilyVisible() COVERITY_NOEXCEPT_FALSE; }; /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/uibase/shells/textidx.cxx b/sw/source/uibase/shells/textidx.cxx index db3d7f76711b..37730582a9cb 100644 --- a/sw/source/uibase/shells/textidx.cxx +++ b/sw/source/uibase/shells/textidx.cxx @@ -31,6 +31,7 @@ #include #include #include +#include #include #include #include diff --git a/sw/source/uibase/sidebar/CommentsPanel.cxx b/sw/source/uibase/sidebar/CommentsPanel.cxx index 037af88df97f..11c1d38e1884 100644 --- a/sw/source/uibase/sidebar/CommentsPanel.cxx +++ b/sw/source/uibase/sidebar/CommentsPanel.cxx @@ -37,6 +37,7 @@ #include #include #include +#include #include #include #include diff --git a/sw/source/uibase/sidebar/QuickFindPanel.cxx b/sw/source/uibase/sidebar/QuickFindPanel.cxx index dd383f0e3807..d6eadae056bd 100644 --- a/sw/source/uibase/sidebar/QuickFindPanel.cxx +++ b/sw/source/uibase/sidebar/QuickFindPanel.cxx @@ -14,6 +14,7 @@ #include #include #include +#include #include #include #include diff --git a/sw/source/uibase/table/chartins.cxx b/sw/source/uibase/table/chartins.cxx index 99b8680a06af..616553c30b2a 100644 --- a/sw/source/uibase/table/chartins.cxx +++ b/sw/source/uibase/table/chartins.cxx @@ -21,6 +21,7 @@ #include #include #include +#include #include #include diff --git a/sw/source/uibase/uiview/viewprt.cxx b/sw/source/uibase/uiview/viewprt.cxx index e47240961083..0960afb67a8f 100644 --- a/sw/source/uibase/uiview/viewprt.cxx +++ b/sw/source/uibase/uiview/viewprt.cxx @@ -45,6 +45,7 @@ #include #include #include +#include #include #include #include diff --git a/sw/source/uibase/wrtsh/wrtsh1.cxx b/sw/source/uibase/wrtsh/wrtsh1.cxx index 1945f356f471..28d7aa6b1776 100644 --- a/sw/source/uibase/wrtsh/wrtsh1.cxx +++ b/sw/source/uibase/wrtsh/wrtsh1.cxx @@ -155,6 +155,38 @@ void collectUIInformation(const OUString& rAction, const OUString& aParameters) sal_uInt32 MakeAllOutlineContentTemporarilyVisible::nLock = 0; +MakeAllOutlineContentTemporarilyVisible::MakeAllOutlineContentTemporarilyVisible(SwDoc* pDoc, bool bScrollToCursor) +{ + ++nLock; + if (nLock > 1) + return; + if (SwDocShell* pDocSh = pDoc->GetDocShell()) + if ((m_pWrtSh = pDocSh->GetWrtShell()) && m_pWrtSh->GetViewOptions() && + m_pWrtSh->GetViewOptions()->IsShowOutlineContentVisibilityButton()) + { + m_pWrtSh->LockView(true); + m_pWrtSh->LockPaint(LockPaintReason::OutlineFolding); + m_pWrtSh->MakeAllFoldedOutlineContentVisible(); + m_bScrollToCursor = bScrollToCursor; + m_bDone = true; + } +} + +MakeAllOutlineContentTemporarilyVisible::~MakeAllOutlineContentTemporarilyVisible() COVERITY_NOEXCEPT_FALSE +{ + --nLock; + if (nLock > 0) + return; + if (m_bDone && m_pWrtSh) + { + m_pWrtSh->MakeAllFoldedOutlineContentVisible(false); + m_pWrtSh->UnlockPaint(); + m_pWrtSh->LockView(false); + if (m_bScrollToCursor) + m_pWrtSh->UpdateCursor(SwCursorShell::SCROLLWIN); + } +} + static bool lcl_IsAllowed(const SwWrtShell* rSh) { if (rSh->GetViewOptions()->IsShowOutlineContentVisibilityButton() && rSh->IsEndPara()) From 645434b71394604060a8a8377c46583644be4ab2 Mon Sep 17 00:00:00 2001 From: Michael Meeks Date: Tue, 15 Sep 2026 10:03:19 +0000 Subject: [PATCH 004/289] sc: include sheetlimits.hxx instead of document.hxx in tokenarray.hxx. ScTokenArray only uses ScDocument through references, so the header needs a forward declaration. The rtl::Reference member with the defaulted copy constructor still needs the small sheetlimits.hxx. This removes document.hxx from the 15 translation units that reached it only through tokenarray.hxx, about one second of compile time each. Signed-off-by: Michael Meeks Change-Id: Ie467d7297f7b02ed474114e7840e0ec52f1624aa Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/12679 Reviewed-by: Noel Grandin Tested-by: Jenkins CPCI (cherry picked from commit 3c5d299ff6f767841bd8a781ca3ca200a8f12d2e) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211315 Reviewed-by: Xisco Fauli Tested-by: Jenkins --- sc/inc/tokenarray.hxx | 4 +++- sc/source/filter/excel/frmbase.cxx | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/sc/inc/tokenarray.hxx b/sc/inc/tokenarray.hxx index a43a577ac64e..9d05c91e7a04 100644 --- a/sc/inc/tokenarray.hxx +++ b/sc/inc/tokenarray.hxx @@ -21,7 +21,7 @@ #include #include -#include "document.hxx" +#include "sheetlimits.hxx" #include "scdllapi.h" #include "types.hxx" #include "calcmacros.hxx" @@ -29,6 +29,8 @@ #include "global.hxx" #include +class ScDocument; + namespace sc { struct RefUpdateContext; diff --git a/sc/source/filter/excel/frmbase.cxx b/sc/source/filter/excel/frmbase.cxx index 73ef59dadc72..43383ce61cc2 100644 --- a/sc/source/filter/excel/frmbase.cxx +++ b/sc/source/filter/excel/frmbase.cxx @@ -18,6 +18,7 @@ */ #include +#include #include From ce06df9700ac32c8942d0d1090213698b57b54cc Mon Sep 17 00:00:00 2001 From: Miklos Vajna Date: Fri, 18 Sep 2026 08:36:02 +0200 Subject: [PATCH 005/289] Related: cool#16219 engine sw HTML import: handle hidden text Have a document with hidden text (an OOXML w:vanish, say), open it in Writer, save it as HTML and open the HTML again. Writer's HTML export writes the hidden flag as a span with the CSS declaration "display: none", but the round-trip loses that hidden state and the run comes back visible. sw's CSS parser has no rule for the CSS "display" property, so "display: none" is ignored on import. Fix the problem by adding ParseCSS1_display() that puts a SvxCharHiddenItem into the CSS item set when it sees "display: none". With this, hidden text round-trips through Writer's HTML: an OOXML w:vanish run comes back as hidden after HTML export/import too. Signed-off-by: Miklos Vajna Change-Id: I6add0f9859b6edffbe783a0d0a5b8f39361d3ffe Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/12991 Reviewed-by: Noel Grandin Tested-by: Jenkins CPCI (cherry picked from commit eb9ca728e179aab3f51be4d96b02a03e502a1f87) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211507 Reviewed-by: Xisco Fauli Tested-by: Jenkins --- sw/qa/filter/html/data/hidden-text.html | 1 + sw/qa/filter/html/html.cxx | 38 +++++++++++++++++++++++++ sw/source/filter/html/htmlcss1.cxx | 3 ++ sw/source/filter/html/svxcss1.cxx | 17 +++++++++++ sw/source/filter/html/swhtml.hxx | 1 + 5 files changed, 60 insertions(+) create mode 100644 sw/qa/filter/html/data/hidden-text.html diff --git a/sw/qa/filter/html/data/hidden-text.html b/sw/qa/filter/html/data/hidden-text.html new file mode 100644 index 000000000000..f06fafbddafa --- /dev/null +++ b/sw/qa/filter/html/data/hidden-text.html @@ -0,0 +1 @@ +

keep hidden

diff --git a/sw/qa/filter/html/html.cxx b/sw/qa/filter/html/html.cxx index fc94a12e822f..6193e38b5f8f 100644 --- a/sw/qa/filter/html/html.cxx +++ b/sw/qa/filter/html/html.cxx @@ -14,6 +14,10 @@ #include #include +#include +#include +#include +#include #include #include @@ -328,6 +332,40 @@ CPPUNIT_TEST_FIXTURE(Test, testMailmergeCopy) } } +CPPUNIT_TEST_FIXTURE(Test, testDisplayNoneImport) +{ + // Given an HTML document with a "display: none" span: + setImportFilterName(TestFilter::HTML_WRITER); + // When importing that document: + createSwDoc("hidden-text.html"); + + // Then make sure the pasted run is imported as hidden text + // (SvxCharHiddenItem, i.e. RES_CHRATR_HIDDEN): + SwDoc* pDoc = getSwDocShell()->GetDoc(); + SwNodeIndex aIdx(pDoc->GetNodes().GetEndOfContent(), -1); + SwTextNode* pTextNode = aIdx.GetNode().GetTextNode(); + CPPUNIT_ASSERT(pTextNode); + // Without the accompanying fix in place, this test would have failed, the paragraph had no + // spans with direct char formats. + CPPUNIT_ASSERT(pTextNode->HasHints()); + const SwpHints& rHints = pTextNode->GetSwpHints(); + const SwFormatAutoFormat* pAutoFmt = nullptr; + for (size_t i = 0; i < rHints.Count(); ++i) + { + const SwTextAttr* pHint = rHints.Get(i); + if (pHint->Which() == RES_TXTATR_AUTOFMT) + { + pAutoFmt = &pHint->GetAutoFormat(); + break; + } + } + CPPUNIT_ASSERT(pAutoFmt); + const SfxItemSet& rSet = *pAutoFmt->GetStyleHandle(); + const SvxCharHiddenItem* pHidden = rSet.GetItemIfSet(RES_CHRATR_HIDDEN); + CPPUNIT_ASSERT(pHidden); + CPPUNIT_ASSERT(pHidden->GetValue()); +} + CPPUNIT_PLUGIN_IMPLEMENT(); /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/filter/html/htmlcss1.cxx b/sw/source/filter/html/htmlcss1.cxx index c00d047de0e4..64f2763fe536 100644 --- a/sw/source/filter/html/htmlcss1.cxx +++ b/sw/source/filter/html/htmlcss1.cxx @@ -1612,6 +1612,9 @@ HTMLAttr **SwHTMLParser::GetAttrTabEntry( sal_uInt16 nWhich ) case RES_CHRATR_CTL_FONT_VARIATIONS: ppAttr = &m_xAttrTab->pFontVariationsCTL; break; + case RES_CHRATR_HIDDEN: + ppAttr = &m_xAttrTab->pCharHidden; + break; case RES_CHRATR_BOX: ppAttr = &m_xAttrTab->pCharBox; break; diff --git a/sw/source/filter/html/svxcss1.cxx b/sw/source/filter/html/svxcss1.cxx index a9d2713d171a..da228252b2ff 100644 --- a/sw/source/filter/html/svxcss1.cxx +++ b/sw/source/filter/html/svxcss1.cxx @@ -34,6 +34,8 @@ #include #include #include +#include +#include #include #include #include @@ -290,6 +292,7 @@ struct SvxCSS1ItemIds sal_uInt16 nFontVariations; sal_uInt16 nFontVariationsCJK; sal_uInt16 nFontVariationsCTL; + sal_uInt16 nCharHidden; sal_uInt16 nLineSpacing; sal_uInt16 nAdjust; @@ -749,6 +752,7 @@ SvxCSS1Parser::SvxCSS1Parser( SfxItemPool& rPool, OUString aBaseURL, aItemIds.nFontVariations = initTrueWhich( SID_ATTR_CHAR_FONT_VARIATIONS ); aItemIds.nFontVariationsCJK = initTrueWhich( SID_ATTR_CHAR_CJK_FONT_VARIATIONS ); aItemIds.nFontVariationsCTL = initTrueWhich( SID_ATTR_CHAR_CTL_FONT_VARIATIONS ); + aItemIds.nCharHidden = initTrueWhich( SID_ATTR_CHAR_HIDDEN ); aItemIds.nLineSpacing = initTrueWhich( SID_ATTR_PARA_LINESPACE ); aItemIds.nAdjust = initTrueWhich( SID_ATTR_PARA_ADJUST ); @@ -3116,6 +3120,18 @@ static void ParseCSS1_visibility(const CSS1Expression* pExpr, SfxItemSet& /*rIte rPropInfo.m_bVisible = pExpr->GetString() != "hidden"; } +static void ParseCSS1_display(const CSS1Expression* pExpr, SfxItemSet& rItemSet, + SvxCSS1PropertyInfo& /*rPropInfo*/, const SvxCSS1Parser& /*rParser*/) +{ + if (pExpr->GetType() != CSS1_IDENT) + { + return; + } + + if (o3tl::equalsIgnoreAsciiCase(pExpr->GetString(), sCSS1_PV_none)) + rItemSet.Put(SvxCharHiddenItem(true, aItemIds.nCharHidden)); +} + static void ParseCSS1_white_space(const CSS1Expression* pExpr, SfxItemSet& /*rItemSet*/, SvxCSS1PropertyInfo& rPropInfo, const SvxCSS1Parser& /*rParser*/) { @@ -3160,6 +3176,7 @@ CSS1PropEntry constexpr aCSS1PropFnTab[] = { sCSS1_P_color, ParseCSS1_color }, { sCSS1_P_column_count, ParseCSS1_column_count }, { sCSS1_P_direction, ParseCSS1_direction }, + { sCSS1_P_display, ParseCSS1_display }, { sCSS1_P_float, ParseCSS1_float }, { sCSS1_P_font, ParseCSS1_font }, { sCSS1_P_font_family, ParseCSS1_font_family }, diff --git a/sw/source/filter/html/swhtml.hxx b/sw/source/filter/html/swhtml.hxx index 1374cab5e597..00d65bc6e162 100644 --- a/sw/source/filter/html/swhtml.hxx +++ b/sw/source/filter/html/swhtml.hxx @@ -133,6 +133,7 @@ struct HTMLAttrTable HTMLAttr* pFontVariations; HTMLAttr* pFontVariationsCJK; HTMLAttr* pFontVariationsCTL; + HTMLAttr* pCharHidden; }; class HTMLAttr From b46c38a45d69082f37bd112a0bfd83a34cdb2aba Mon Sep 17 00:00:00 2001 From: Aron Budea Date: Wed, 23 Sep 2026 19:11:11 +0930 Subject: [PATCH 006/289] sc: use conventional file name when exporting ctrl props to XLSX Directory name is ctrlProps, but Excel normally names the file ctrlPropN.xml. Doesn't cause an issue either way. Change-Id: I81315e6b6e88aa66424c2a5c1e4a9dfb620b1296 Signed-off-by: Aron Budea Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/13357 Tested-by: Jenkins CPCI Reviewed-by: Michael Meeks (cherry picked from commit 63039d5965de2939b40b6db5dff80c96f8d8fbb2) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211522 Tested-by: Jenkins Reviewed-by: Xisco Fauli --- sc/source/filter/excel/xeescher.cxx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sc/source/filter/excel/xeescher.cxx b/sc/source/filter/excel/xeescher.cxx index 80dab2adb885..3bd1c659a8e6 100644 --- a/sc/source/filter/excel/xeescher.cxx +++ b/sc/source/filter/excel/xeescher.cxx @@ -1670,8 +1670,8 @@ OUString XclExpTbxControlObj::SaveControlPropertiesXml(XclExpXmlStream& rStrm) c { const sal_Int32 nDrawing = rStrm.getNewDrawingUniqueId(); sax_fastparser::FSHelperPtr pFormControl = rStrm.CreateOutputStream( - XclXmlUtils::GetStreamName( "xl/", "ctrlProps/ctrlProps", nDrawing ), - XclXmlUtils::GetStreamName( "../", "ctrlProps/ctrlProps", nDrawing ), + XclXmlUtils::GetStreamName( "xl/", "ctrlProps/ctrlProp", nDrawing ), + XclXmlUtils::GetStreamName( "../", "ctrlProps/ctrlProp", nDrawing ), rStrm.GetCurrentStream()->getOutputStream(), "application/vnd.ms-excel.controlproperties+xml", oox::getRelationship(Relationship::CTRLPROP), @@ -1715,8 +1715,8 @@ OUString XclExpTbxControlObj::SaveControlPropertiesXml(XclExpXmlStream& rStrm) c { sal_Int32 nDrawing = rStrm.getNewDrawingUniqueId(); sax_fastparser::FSHelperPtr pFormControl = rStrm.CreateOutputStream( - XclXmlUtils::GetStreamName("xl/", "ctrlProps/ctrlProps", nDrawing), - XclXmlUtils::GetStreamName("../", "ctrlProps/ctrlProps", nDrawing), + XclXmlUtils::GetStreamName("xl/", "ctrlProps/ctrlProp", nDrawing), + XclXmlUtils::GetStreamName("../", "ctrlProps/ctrlProp", nDrawing), rStrm.GetCurrentStream()->getOutputStream(), "application/vnd.ms-excel.controlproperties+xml", oox::getRelationship(Relationship::CTRLPROP), &sIdFormControlPr); From 5208370de8cee52e585cc375c9307d1e4d0e65e6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= Date: Wed, 23 Sep 2026 20:01:06 +0000 Subject: [PATCH 007/289] ofz#563849779 Integer-overflow MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit writerfilter::rtftok::RTFDocumentImpl::dispatchValue writerfilter::rtftok::RTFDocumentImpl::dispatchValue writerfilter::rtftok::RTFTokenizer::dispatchKeyword \brdrw2147483647 overflowed int converting twips to 1/8 pt Signed-off-by: Caolán McNamara Change-Id: I150e3d0227e8fd4d6f1125d0c27078f43f1f0f9d Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/13414 Tested-by: Jenkins CPCI Reviewed-by: Noel Grandin (cherry picked from commit 68c853c46592d3ac4c79d8dede0dd88b5a080b3e) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211526 Reviewed-by: Xisco Fauli Tested-by: Jenkins --- sw/source/writerfilter/rtftok/rtfdispatchvalue.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sw/source/writerfilter/rtftok/rtfdispatchvalue.cxx b/sw/source/writerfilter/rtftok/rtfdispatchvalue.cxx index b677d68efb5d..408a586fbc59 100644 --- a/sw/source/writerfilter/rtftok/rtfdispatchvalue.cxx +++ b/sw/source/writerfilter/rtftok/rtfdispatchvalue.cxx @@ -1022,7 +1022,7 @@ RTFError RTFDocumentImpl::dispatchValue(RTFKeyword nKeyword, int nParam) if (nParam == 2) nParam = 1; else if (nParam > 1) - nParam = nParam * 2 / 5; + nParam = sal_Int64(nParam) * 2 / 5; auto pValue = new RTFValue(nParam); putBorderProperty(m_aStates, NS_ooxml::LN_CT_Border_sz, pValue); } From 9919c425762c21dac30b7bfef9c11a5f9847aa95 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= Date: Sun, 27 Sep 2026 23:17:31 +0000 Subject: [PATCH 008/289] MasterScriptProvider::getScript: match the location to the context exactly MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Caolán McNamara Change-Id: Ib569ce5b5a8ccaf56c7922497b920b79a5b7b846 Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/13658 Reviewed-by: Noel Grandin Tested-by: Jenkins CPCI (cherry picked from commit ae5d7f7ce564b4cd4656366ee88afa762e457c8f) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211527 Reviewed-by: Xisco Fauli Tested-by: Jenkins --- scripting/source/provider/MasterScriptProvider.cxx | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/scripting/source/provider/MasterScriptProvider.cxx b/scripting/source/provider/MasterScriptProvider.cxx index f87373153f0c..c9a15d36aea0 100644 --- a/scripting/source/provider/MasterScriptProvider.cxx +++ b/scripting/source/provider/MasterScriptProvider.cxx @@ -51,15 +51,6 @@ using namespace ::sf_misc; namespace func_provider { -static bool endsWith( std::u16string_view target, std::u16string_view item ) -{ - size_t index = target.find( item ); - return index != std::u16string_view::npos && - index == ( target.size() - item.size() ); -} - -/* should be available in some central location. */ - // XScriptProvider implementation @@ -286,7 +277,7 @@ MasterScriptProvider::getScript( const OUString& scriptURI ) if ( ( location == "document" && m_xModel.is() ) - || ( endsWith( m_sCtxString, location ) ) + || ( m_sCtxString == location ) || ( language == "Basic" ) ) { From 0f09c4ea1cea94cec899a4a6a33e8f18d64c8a5b Mon Sep 17 00:00:00 2001 From: Heiko Tietze Date: Fri, 25 Sep 2026 10:35:53 +0200 Subject: [PATCH 009/289] Resolves tdf#173717 - Reliably hide transparency controls Change-Id: Ic77957af1390b9b50321c04e89451d6dd0cae456 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211448 Tested-by: Jenkins Reviewed-by: Heiko Tietze --- include/svx/sidebar/AreaPropertyPanelBase.hxx | 1 + svx/source/sidebar/area/AreaPropertyPanelBase.cxx | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/include/svx/sidebar/AreaPropertyPanelBase.hxx b/include/svx/sidebar/AreaPropertyPanelBase.hxx index ea99f0850cec..6f2aed7a75b0 100644 --- a/include/svx/sidebar/AreaPropertyPanelBase.hxx +++ b/include/svx/sidebar/AreaPropertyPanelBase.hxx @@ -144,6 +144,7 @@ protected: std::unique_ptr mxMTRAngle; std::unique_ptr mxGradientStyle; std::unique_ptr mxBmpImport; + std::unique_ptr mxTransparencyBox; std::unique_ptr mxTrGrPopup; std::unique_ptr< XFillStyleItem > mpStyleItem; diff --git a/svx/source/sidebar/area/AreaPropertyPanelBase.cxx b/svx/source/sidebar/area/AreaPropertyPanelBase.cxx index 042cd69be665..4b510baf7ca9 100644 --- a/svx/source/sidebar/area/AreaPropertyPanelBase.cxx +++ b/svx/source/sidebar/area/AreaPropertyPanelBase.cxx @@ -90,6 +90,7 @@ AreaPropertyPanelBase::AreaPropertyPanelBase( mxMTRAngle(m_xBuilder->weld_metric_spin_button(u"gradangle"_ustr, FieldUnit::DEGREE)), mxGradientStyle(m_xBuilder->weld_combo_box(u"gradientstyle"_ustr)), mxBmpImport(m_xBuilder->weld_button(u"bmpimport"_ustr)), + mxTransparencyBox(m_xBuilder->weld_container(u"box1"_ustr)), maImgAxial(BMP_AXIAL), maImgElli(BMP_ELLI), maImgQuad(BMP_QUAD), @@ -410,8 +411,7 @@ void AreaPropertyPanelBase::ShowTransparency(const bool bDoShow) { mxLBTransType->set_visible(bDoShow); mxTrspTextFT->set_visible(bDoShow); - mxMTRTransparent->set_visible(bDoShow); - mxSldTransparent->set_visible(bDoShow); + mxTransparencyBox->set_visible(bDoShow); } void AreaPropertyPanelBase::FillStyleChanged(bool bUpdateModel) From 0b3a0fae8c1b1350fa8bfc6fbbe3b743e5d0d2c5 Mon Sep 17 00:00:00 2001 From: Mike Kaganski Date: Tue, 1 Sep 2026 18:41:49 +0500 Subject: [PATCH 010/289] Related: tdf#166401 fix writing properties for empty placeholder Regression after commit b41a780d139ec6ca5a5514db972ccf0e50058dfc (tdf#166401: support custom placeholder prompt text, 2026-08-17), where a placeholder that authored no prompt stopped writing text and got a bare instead. On a slide an empty presentation object reports no text through UNO anyway, so the paragraph the export wrote for such a placeholder never had a run. It carried the properties, and those are the formatting. In PowerPoint 2016 the original title showed white at 22pt, indented 56.5pt; the round-tripped one showed bold black at 17pt, indented 18pt. Write the paragraph the way a shape with no text already does: the paragraph properties, the run properties in endParaRPr, and no run. The prompt still stays out of the file. That branch of DrawingML::WriteText is now a method of its own, called from both places. Signed-off-by: Mike Kaganski Change-Id: I034a4e14f388c90872069d32b303c6c143c1814c Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/10768 Tested-by: Jenkins CPCI Reviewed-by: Miklos Vajna (cherry picked from commit e2859f5b23f53281d80cbad4c56db1764aaf1406) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211538 Tested-by: Jenkins Reviewed-by: Xisco Fauli --- include/oox/export/drawingml.hxx | 3 ++ oox/source/export/drawingml.cxx | 49 +++++++++++------- oox/source/export/shapes.cxx | 2 +- .../data/pptx/empty-title-placeholder.pptx | Bin 0 -> 12539 bytes sd/qa/unit/export-tests-ooxml4.cxx | 24 +++++++++ 5 files changed, 57 insertions(+), 21 deletions(-) create mode 100644 sd/qa/unit/data/pptx/empty-title-placeholder.pptx diff --git a/include/oox/export/drawingml.hxx b/include/oox/export/drawingml.hxx index c0903b2f8a6d..1ced28728fef 100644 --- a/include/oox/export/drawingml.hxx +++ b/include/oox/export/drawingml.hxx @@ -488,6 +488,9 @@ public: void WriteText( const css::uno::Reference< css::uno::XInterface >& rXIface, bool bBodyPr, bool bText = true, sal_Int32 nXmlNamespace = 0, bool bWritePropertiesAsLstStyles = false); + /** Writes a paragraph with no text, carrying the properties text put in it would get. */ + void WriteTextlessParagraph(const css::uno::Reference& rXIface); + void WriteBodyProps( const css::uno::Reference< css::uno::XInterface >& rXIface, sal_Int32 nXmlNamespace, bool bIsFontworkShape, diff --git a/oox/source/export/drawingml.cxx b/oox/source/export/drawingml.cxx index 91b2ae13404f..30a4eb877eb7 100644 --- a/oox/source/export/drawingml.cxx +++ b/oox/source/export/drawingml.cxx @@ -4547,6 +4547,33 @@ void DrawingML::WriteBodyProps(const css::uno::Reference< css::uno::XInterface > mpFS->endElementNS((nXmlNamespace ? nXmlNamespace : XML_a), XML_bodyPr); } +void DrawingML::WriteTextlessParagraph(const Reference& rXIface) +{ + Reference xParagraph; + if (auto xAccess = rXIface.query()) + { + if (auto xParagraphs = xAccess->createEnumeration(); + xParagraphs && xParagraphs->hasMoreElements()) + xParagraph = xParagraphs->nextElement().query(); + } + + if (!xParagraph) + { + mpFS->singleElementNS(XML_a, XML_p); + return; + } + + // tdf#144092: with no run to ask, the run properties come from the shape's propset + auto xShapeProps = rXIface.query(); + assert(xShapeProps); + + mpFS->startElementNS(XML_a, XML_p); + WriteParagraphProperties(xParagraph, -1, XML_pPr); + WriteRunInput aInput{ .xShapePropSet = xShapeProps }; + WriteRunProperties(xShapeProps, XML_endParaRPr, aInput); + mpFS->endElementNS(XML_a, XML_p); +} + void DrawingML::WriteText(const Reference& rXIface, bool bBodyPr, bool bText, sal_Int32 nXmlNamespace, bool bWritePropertiesAsLstStyles) { @@ -4683,27 +4710,9 @@ void DrawingML::WriteText(const Reference& rXIface, bool bBodyPr, bo sal_Int32 nCharHeight = -1; bool bFirstParagraph = true; - // tdf#144092 For shapes without text: Export run properties (into - // endParaRPr) from the shape's propset instead of the paragraph's. - if(xXText->getString().isEmpty() && enumeration->hasMoreElements()) + if (xXText->getString().isEmpty()) { - Any aAny (enumeration->nextElement()); - Reference xParagraph; - if( aAny >>= xParagraph ) - { - mpFS->startElementNS(XML_a, XML_p); - WriteParagraphProperties(xParagraph, nCharHeight, XML_pPr); - - WriteRunInput aInput; - aInput.xShapePropSet = rXPropSet; - aInput.bOverridingCharHeight = bOverridingCharHeight; - aInput.nCharHeight = nCharHeight; - WriteRunProperties(rXPropSet, XML_endParaRPr, aInput); - bOverridingCharHeight = aInput.bOverridingCharHeight; - nCharHeight = aInput.nCharHeight; - - mpFS->endElementNS(XML_a, XML_p); - } + WriteTextlessParagraph(rXIface); return; } diff --git a/oox/source/export/shapes.cxx b/oox/source/export/shapes.cxx index f443344265dc..2f01e3d76930 100644 --- a/oox/source/export/shapes.cxx +++ b/oox/source/export/shapes.cxx @@ -2358,7 +2358,7 @@ ShapeExport& ShapeExport::WriteTextBox( const Reference< XInterface >& xIface, s /*nXmlNamespace=*/0, /*bWritePropertiesAsLstStyles=*/bWritePropertiesAsLstStyles); if (!bText) // A text body holds at least one paragraph, and an empty one says the shape has no text - pFS->singleElementNS(XML_a, XML_p); + WriteTextlessParagraph(xIface); pFS->endElementNS( nXmlNamespace, (GetDocumentType() != DOCUMENT_DOCX || mbUserShapes ? XML_txBody : XML_txbx) ); if (GetDocumentType() == DOCUMENT_DOCX && !mbUserShapes) WriteText( xIface, /*bBodyPr=*/true, /*bText=*/false, /*nXmlNamespace=*/nXmlNamespace ); diff --git a/sd/qa/unit/data/pptx/empty-title-placeholder.pptx b/sd/qa/unit/data/pptx/empty-title-placeholder.pptx new file mode 100644 index 0000000000000000000000000000000000000000..26e27115e25fff325bf84b1f2d06ee262e906c92 GIT binary patch literal 12539 zcma)i1yEee+AZ!LoZwC%cyM=jcXxMpcMtCFPS6bQ!QDN$2j`J<{`;R3>ehR2YHIe( zuKHF@cdzcXd-al)00lz@0s?{pA`c?e3Z0vnmmkMR-~NN`Ox-*r1qVUf?N zf)12iJ<-_~H^&JP)4aLEe0!@uXAA_6=Pkn&>BiG-W+=-O+ye&4v^FQ|0{r4*)!Bx{ zNS*OODt9k52bhoRLDF8wN+&#T=7IzqRDoFNd0`k7*T>gL#J}QFYd^*GF%Z^g;FB+N z+_m%gk!GLi5(s1GKic@0Kb%ejZ2NqNBb+H&=8jw^^jPHU@gl|QIX^JmXjoZLTi&`y zaHkGDVOG|C9}i-X8e&2x9EB8j~=9Xu$@=N+>!6616=PM%2r8ighqZGS=Sn~pgc zxg$&SI6!ox&tDBkBnx7#ls4tQuzK!!ine3{6Q3fJx`rtG$5=xxw&3r-jjY=DGLdvod^Z43C=-c#xJf;NHLJ)H`v%vgnmvW zIJ-oR)|&j zIcdm2E(s;VPb?6>@w0QDZ=slEt#oiAs5s443Dyao$P|l}NA;Bqgd=Rx5*w)7zBS*C zNKsd<69Hd{|5B0Ur*S8ai0bANyem=t@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ie8v; zr@8$eKRzOl6C|w!?HPDFuG>|S;uoVf1$4X0R>^=|tKnJ5U=uJ#tTvA_*pCOWsbGjB z^&+~30WmMHOjl>uN#`5n^d(&G#v3aBc|2m0+|Fl+v)Q)>t1`pxj=pS8ntPjt{Afn} zQWFSKQy7mj$`*bKn_j65Td9d_O1Nyy-viqDUzW-Zf=mr>vZ~G#tD8 z6+h0=h^W(&*P)kv;8U2*wZYVxNTuJcqW0)!{UC-?qz>AIxSQQwce3pd`%hi ze&$-vW6RwG37b$|?u_a>%;zUlS6#9az#yo9W#;~S`1p-Ff4zL)X8eDRBEJWCpJ@HN z90rh{(l8Q-=n=xRQ`i@^_H>xjrM=ZSH1^(A20j| zjPdP}^EcT0u;F`z_vx{J5R%_c6#vz@f3jrnA>K!D{((q@`4`0hMhd1${WM%Se=&~VBfqy> z|3QAh`WyMZ`T8E={l4}eglU4m5&qcazAt~jarvj5p7`(bKejRN%ilk>{!{Ki`al2w z&u7^80Pm&zAAoF%|03+~%in9vKjlJH|0@3<#gUZ&f3voKs}T~A`I{ Date: Sun, 27 Sep 2026 18:03:32 +0930 Subject: [PATCH 011/289] oox: don't cast transformation values to sal_Int16 They might not fit and overflow. This was a regression from a07bad0cc8d4ec8490a9afd05299dac635d2ec90 and came to light with 40aaaeff1d2ff4f6ba5cd2c8fc80356d38996e03 Change-Id: I8f71449d854fd6190511ce72f2603186f6469002 Signed-off-by: Aron Budea Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/13619 Tested-by: Jenkins CPCI Reviewed-by: Mike Kaganski (cherry picked from commit ca77cd2a4f9fbe7655d3ca5cc2e1e965389e0d3f) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211529 Tested-by: Jenkins Reviewed-by: Xisco Fauli --- oox/source/drawingml/colorchoicecontext.cxx | 2 +- sd/qa/unit/export-tests-ooxml4.cxx | 17 +++++++++++++++++ 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/oox/source/drawingml/colorchoicecontext.cxx b/oox/source/drawingml/colorchoicecontext.cxx index 3122d7917f4f..91697eb5f204 100644 --- a/oox/source/drawingml/colorchoicecontext.cxx +++ b/oox/source/drawingml/colorchoicecontext.cxx @@ -249,7 +249,7 @@ void ColorValueContext::onStartElement( const AttributeList& rAttribs ) else nValue = rAttribs.getInteger(XML_val, 0); - mpComplexColor->addTransformation({eType, sal_Int16(nValue / 10)}); + mpComplexColor->addTransformation({eType, nValue / 10}); } return nullptr; diff --git a/sd/qa/unit/export-tests-ooxml4.cxx b/sd/qa/unit/export-tests-ooxml4.cxx index aa9839c0db74..ba12c3fd301d 100644 --- a/sd/qa/unit/export-tests-ooxml4.cxx +++ b/sd/qa/unit/export-tests-ooxml4.cxx @@ -2651,6 +2651,23 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest4, testCool16079_dateTimeField) u"datetime"); } +CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest4, testThemeKeepColorTransforms) +{ + createSdImpressDoc("pptx/empty-title-placeholder.pptx"); + save(TestFilter::PPTX); + + xmlDocUniquePtr pXmlDoc = parseExport(u"ppt/theme/theme1.xml"_ustr); + const OString sBasePath = "/a:theme/a:themeElements/a:fmtScheme/a:bgFillStyleLst/a:gradFill[1]" + "/a:gsLst/a:gs[@pos='40000']/a:schemeClr"_ostr; + + // Without the fix satMod would end up negative + assertXPath(pXmlDoc, sBasePath, "val", u"phClr"); + assertXPathChildren(pXmlDoc, sBasePath, 3); + assertXPath(pXmlDoc, sBasePath + "/a:tint", "val", u"45000"); + assertXPath(pXmlDoc, sBasePath + "/a:shade", "val", u"99000"); + assertXPath(pXmlDoc, sBasePath + "/a:satMod", "val", u"350000"); +} + CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest4, testTdf166401_textGivenToAPicturePlaceholder) { // Given a slide whose picture placeholder is given text without any editing, which is what a From 954442e8258f09751bd89f3399489a8b073e4be8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= Date: Sun, 27 Sep 2026 11:35:07 +0000 Subject: [PATCH 012/289] ofz#566458134 Integer-overflow MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit vcl/source/outdev/ImplMapRes.cxx:190:23: runtime error: signed integer overflow: 0 - -9223372036854775808 cannot be represented in type 'tools::Long' (aka 'long') #0 0x5afc86b89af9 in AbsoluteToLocalX vcl/source/outdev/ImplMapRes.cxx:190:23 #1 0x5afc86b89af9 in ImplMapRes::TransformPointX(long, ImplMapRes const&) const vcl/source/outdev/ImplMapRes.cxx:214:21 #2 0x5afc862abe28 in OutputDevice::LogicToLogic(Point const&, MapMode const*, MapMode const*) const vcl/source/outdev/map.cxx:991:32 #3 0x5afc862ab0eb in OutputDevice::SetRelativeMapMode(MapMode const&) vcl/source/outdev/map.cxx:417:16 #4 0x5afc85733670 in (anonymous namespace)::GraphicExporter::GetGraphic((anonymous namespace)::ExportSettings const&, Graphic&, bool) svx/source/unodraw/UnoGraphicExporter.cxx:909:19 when none of the shapes rendered for a SmartArt fallback has any content the bound stays empty, and the metafile origin taken from the minimum of that empty range rounds to LONG_MIN so start an empty bound at 0,0 Signed-off-by: Caolán McNamara Change-Id: I7f35f6280a882cd5c49de3e411bc0d006cdf9725 Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/13623 Tested-by: Jenkins CPCI Reviewed-by: Noel Grandin (cherry picked from commit 47dca3b9edf464297b1cef08a6223885d12efebf) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211528 Reviewed-by: Xisco Fauli Tested-by: Jenkins --- svx/source/unodraw/UnoGraphicExporter.cxx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/svx/source/unodraw/UnoGraphicExporter.cxx b/svx/source/unodraw/UnoGraphicExporter.cxx index 9dd8da5d0170..c1a3ca350876 100644 --- a/svx/source/unodraw/UnoGraphicExporter.cxx +++ b/svx/source/unodraw/UnoGraphicExporter.cxx @@ -882,6 +882,10 @@ bool GraphicExporter::GetGraphic( ExportSettings const & rSettings, Graphic& aGr } } + // Shapes with no visible content anchor at 0,0 + if (aBound.isEmpty()) + aBound.expand(basegfx::B2DTuple(0, 0)); + aOut->EnableOutput( false ); aOut->SetMapMode( aMap ); if( rSettings.mbUseHighContrast ) From c0999bca37a2042e405ae08b55d65b7dd78aa5e8 Mon Sep 17 00:00:00 2001 From: Jaume Pujantell Date: Thu, 24 Sep 2026 14:55:14 +0000 Subject: [PATCH 013/289] vcl: remember graphic size after a threaded load An Impress master slide with a bitmap background could turn plain blue after saving and reopening the document. The saved styles.xml still named the fill (for example draw:fill-image-name="Bitmap_20_2") but held no draw:fill-image for it, so the reload fell back to the default fill colour. The document had to stay idle long enough for its images to be swapped out, which made the problem look intermittent. Switching slides prefetches the page graphics with GraphicFilter::MakeGraphicsAvailableThreaded, added in commit 8062e88e73ac ("try to make available all slide images using threads") with Change-Id Ifc39a2757834a9fb0dbafa61f13f5454e69af330. A text object without a fill reports the page background there, so the master background image is part of that prefetch. The loader hands the decoded result to ImpGraphic::updateFromLoadedGraphic directly, which resets mnSizeBytes to 0 and leaves the recalculation to swapIn, but swapIn never runs on this path. The next memory trim then swapped the graphic out with a size of 0. A swapped out graphic that is not prepared answers GetSizeBytes from that value, so SvxUnoBitmapTable treated the fill as empty and left it out of the export. updateFromLoadedGraphic now measures the loaded content while it is in memory, so the graphic keeps its size through the next swap out whichever path loaded it, and the memory manager counts the real size. Signed-off-by: Jaume Pujantell Change-Id: Id472f542a531a1b9578322f3fdd12a8dd39843df Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/13475 Tested-by: Jenkins CPCI Reviewed-by: Miklos Vajna (cherry picked from commit 6a19f87f2430feacd16715947d385cee7e7c5a65) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211533 Reviewed-by: Xisco Fauli Tested-by: Jenkins --- vcl/qa/cppunit/GraphicTest.cxx | 19 +++++++++++++++++++ vcl/source/gdi/impgraph.cxx | 4 ++++ 2 files changed, 23 insertions(+) diff --git a/vcl/qa/cppunit/GraphicTest.cxx b/vcl/qa/cppunit/GraphicTest.cxx index b4c3ca6f1c2d..ab43554e4009 100644 --- a/vcl/qa/cppunit/GraphicTest.cxx +++ b/vcl/qa/cppunit/GraphicTest.cxx @@ -1359,6 +1359,25 @@ CPPUNIT_TEST_FIXTURE(GraphicTest, testColorChangeToTransparent) rBitmapAfter.GetPixelColor(410, 140)); } +CPPUNIT_TEST_FIXTURE(GraphicTest, testSwappedOutGraphicKeepsSizeAfterThreadedLoad) +{ + // Given a PNG graphic that was loaded once and then swapped out: + Graphic aGraphic = makeUnloadedGraphic(u"png"); + CPPUNIT_ASSERT(aGraphic.makeAvailable()); + CPPUNIT_ASSERT(aGraphic.ImplGetImpGraphic()->swapOut()); + + // When it is loaded again by the threaded loader and swapped out once more: + std::vector aGraphics{ &aGraphic }; + GraphicFilter::GetGraphicFilter().MakeGraphicsAvailableThreaded(aGraphics); + CPPUNIT_ASSERT(aGraphic.isAvailable()); + CPPUNIT_ASSERT(aGraphic.ImplGetImpGraphic()->swapOut()); + + // Then it still reports its size, so it does not look like an empty graphic. + // Without the fix in place, this test would have failed, the graphic reported a size of 0 + // bytes. + CPPUNIT_ASSERT(aGraphic.GetSizeBytes() > 0); +} + CPPUNIT_PLUGIN_IMPLEMENT(); /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/vcl/source/gdi/impgraph.cxx b/vcl/source/gdi/impgraph.cxx index 03801668c2d4..32078ac09d6c 100644 --- a/vcl/source/gdi/impgraph.cxx +++ b/vcl/source/gdi/impgraph.cxx @@ -1412,6 +1412,10 @@ void ImpGraphic::updateFromLoadedGraphic(const ImpGraphic* pGraphic) mbSwapOut = false; } + + // The loaded content is measured while it is in memory, so the graphic still knows its size + // after it is swapped out again. + ensureCurrentSizeInBytes(); } void ImpGraphic::dumpState(rtl::OStringBuffer &rState) From 2399c6b9e535b57e870812c4fadd43ad3af7c54d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= Date: Sat, 26 Sep 2026 14:01:28 +0000 Subject: [PATCH 014/289] clear the old value before loading an old format SbxVariable MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit as the newer format already does The old format path set the new type without clearing an existing value first, so the new type bogusly redefined whatever the union still held. Signed-off-by: Caolán McNamara Change-Id: I70d02026d24443ab353be37c0a57685b4e7ac969 Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/13600 Reviewed-by: Noel Grandin Tested-by: Jenkins CPCI (cherry picked from commit 27d9427be60d57d3054c01c8806c81b89bd3872d) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211530 Reviewed-by: Xisco Fauli Tested-by: Jenkins --- basic/source/sbx/sbxvar.cxx | 1 + 1 file changed, 1 insertion(+) diff --git a/basic/source/sbx/sbxvar.cxx b/basic/source/sbx/sbxvar.cxx index 43cb0b73a03d..2366d23813b3 100644 --- a/basic/source/sbx/sbxvar.cxx +++ b/basic/source/sbx/sbxvar.cxx @@ -441,6 +441,7 @@ bool SbxVariable::LoadData( SvStream& rStrm, sal_uInt16 nVer ) SbxValues aTmp; OUString aTmpString; OUString aVal; + SbxValue::Clear(); aTmp.eType = aData.eType = static_cast(nType); aTmp.pOUString = &aVal; switch( nType ) From 362360f3fe7b7d56bfd851106236e2c74eef5444 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= Date: Sat, 26 Sep 2026 21:22:49 +0000 Subject: [PATCH 015/289] check the class of a loaded SbxArray and its elements MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit like the other SBX loaders already do Signed-off-by: Caolán McNamara Change-Id: Id7989d2b4023c17a29a0fc92b03b574968484b78 Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/13617 Tested-by: Jenkins CPCI Reviewed-by: Noel Grandin (cherry picked from commit 1ccef9f52d3132b6917a76f64a697ad0795e5f9f) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211531 Tested-by: Jenkins Reviewed-by: Xisco Fauli --- basic/source/sbx/sbxarray.cxx | 2 +- basic/source/sbx/sbxobj.cxx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/basic/source/sbx/sbxarray.cxx b/basic/source/sbx/sbxarray.cxx index 5be00ebf010d..b1a7d0402b72 100644 --- a/basic/source/sbx/sbxarray.cxx +++ b/basic/source/sbx/sbxarray.cxx @@ -342,7 +342,7 @@ bool SbxArray::LoadData( SvStream& rStrm, sal_uInt16 /*nVer*/ ) { sal_uInt16 nIdx; rStrm.ReadUInt16( nIdx ); - SbxVariableRef pVar = static_cast(Load( rStrm ).get()); + SbxVariableRef pVar = dynamic_cast(Load( rStrm ).get()); if( pVar ) { SbxVariableRef& rRef = GetRef( nIdx ); diff --git a/basic/source/sbx/sbxobj.cxx b/basic/source/sbx/sbxobj.cxx index 2dcdcee263f4..9f37ca2a69f8 100644 --- a/basic/source/sbx/sbxobj.cxx +++ b/basic/source/sbx/sbxobj.cxx @@ -534,7 +534,7 @@ void SbxObject::Remove( SbxVariable* pVar ) static bool LoadArray( SvStream& rStrm, SbxObject* pThis, SbxArray* pArray ) { - SbxArrayRef p = static_cast( SbxBase::Load( rStrm ).get() ); + SbxArrayRef p = dynamic_cast( SbxBase::Load( rStrm ).get() ); if( !p.is() ) { return false; From 9534d125d234239c75d5d09f22cf6d5b802a817b Mon Sep 17 00:00:00 2001 From: Xisco Fauli Date: Mon, 28 Sep 2026 18:44:23 +0200 Subject: [PATCH 016/289] ofz#528260798 Out-of-memory MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Many thanks to Caolán for his comment in https://issues.oss-fuzz.com/issues/528260798#comment2 Change-Id: I98e2f6b8a6c95967e927bfe6d46f743ccbe49aa2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211535 Tested-by: Jenkins Reviewed-by: Xisco Fauli --- sw/source/core/text/porfld.cxx | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/sw/source/core/text/porfld.cxx b/sw/source/core/text/porfld.cxx index e0958971f770..833c38d669d7 100644 --- a/sw/source/core/text/porfld.cxx +++ b/sw/source/core/text/porfld.cxx @@ -417,6 +417,13 @@ bool SwFieldPortion::Format( SwTextFormatInfo &rInf ) case CHAR_WJ: case CH_TXTATR_BREAKWORD: case CH_TXTATR_INWORD: + case CHAR_LRM: + case CHAR_RLM: + case CHAR_LRE: + case CHAR_RLE: + case CHAR_PDF: + case CHAR_LRO: + case CHAR_RLO: { return true; } From 2e48a78172b97fc3d2415c825204459262c42611 Mon Sep 17 00:00:00 2001 From: Michael Weghorn Date: Mon, 28 Sep 2026 20:11:10 +0200 Subject: [PATCH 017/289] svtools: Return entries in FontNameBox::LoadMRUEntries Let FontNameBox::LoadMRUEntries simply return the entries loaded from the file instead of applying them to the combobox right away. Let the only caller FontNameBox::Fill do the insertion, which also unifies the two different code paths of either reinserting the existing entries or setting the ones loaded from the file a bit more. While at it, also rename the local `rEntries` variable to `aEntries`, to make clear this is not actually a reference (as the `r` prefix previously suggested). Change-Id: I89c14f2bcd34c4b6b4decf33e98bef54e7b31cf0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211536 Tested-by: Jenkins Reviewed-by: Michael Weghorn --- include/svtools/ctrlbox.hxx | 2 +- svtools/source/control/ctrlbox.cxx | 20 ++++++++++---------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/include/svtools/ctrlbox.hxx b/include/svtools/ctrlbox.hxx index 52495e1f4d68..651817568b10 100644 --- a/include/svtools/ctrlbox.hxx +++ b/include/svtools/ctrlbox.hxx @@ -346,7 +346,7 @@ private: DECL_DLLPRIVATE_LINK(SettingsChangedHdl, VclSimpleEvent&, void); DECL_DLLPRIVATE_LINK(UpdateHdl, Timer*, void); - void LoadMRUEntries( const OUString& aFontMRUEntriesFile ); + static std::vector LoadMRUEntries(const OUString& aFontMRUEntriesFile); void SaveMRUEntries( const OUString& aFontMRUEntriesFile ) const; OutputDevice& CachePreview(size_t nIndex, Point* pTopLeft, diff --git a/svtools/source/control/ctrlbox.cxx b/svtools/source/control/ctrlbox.cxx index 19a468d1ae25..2c52e094f940 100644 --- a/svtools/source/control/ctrlbox.cxx +++ b/svtools/source/control/ctrlbox.cxx @@ -466,19 +466,19 @@ void FontNameBox::SaveMRUEntries(const OUString& aFontMRUEntriesFile) const aStream.WriteLine( "" ); } -void FontNameBox::LoadMRUEntries( const OUString& aFontMRUEntriesFile ) +std::vector FontNameBox::LoadMRUEntries(const OUString& aFontMRUEntriesFile) { if (aFontMRUEntriesFile.isEmpty()) - return; + return {}; if (!officecfg::Office::Common::Font::View::ShowFontBoxWYSIWYG::get()) - return; + return {}; SvFileStream aStream( aFontMRUEntriesFile, StreamMode::READ ); if( ! aStream.IsOpen() ) { SAL_INFO("svtools.control", "FontNameBox::LoadMRUEntries: opening mru entries file " << aFontMRUEntriesFile << " failed"); - return; + return {}; } OStringBuffer aLine; @@ -494,7 +494,7 @@ void FontNameBox::LoadMRUEntries( const OUString& aFontMRUEntriesFile ) aFontEntries.push_back(sEntry); } - m_xComboBox->set_mru_entries(aFontEntries); + return aFontEntries; } void FontNameBox::InitFontMRUEntriesFile() @@ -520,8 +520,8 @@ void FontNameBox::Fill( const FontList* pList ) { // store old text and clear box OUString aOldText = m_xComboBox->get_active_text(); - std::vector rEntries = m_xComboBox->get_mru_entries(); - bool bLoadFromFile = rEntries.empty(); + std::vector aEntries = m_xComboBox->get_mru_entries(); + bool bLoadFromFile = aEntries.empty(); m_xComboBox->freeze(); m_xComboBox->clear(); @@ -538,9 +538,9 @@ void FontNameBox::Fill( const FontList* pList ) } if (bLoadFromFile) - LoadMRUEntries(maFontMRUEntriesFile); - else - m_xComboBox->set_mru_entries(rEntries); + aEntries = LoadMRUEntries(maFontMRUEntriesFile); + + m_xComboBox->set_mru_entries(aEntries); m_xComboBox->thaw(); From df52af4eea4766db709a81e03f4320a7e9f93cde Mon Sep 17 00:00:00 2001 From: ApurvR20 Date: Sun, 6 Sep 2026 12:00:32 +0530 Subject: [PATCH 018/289] tdf#90341 Use std::span to clean up excessive const_cast Changed implementation in EnhancedCustomShapeGeometry from pointer to std::span, leading to removal of const_cast. Change-Id: Ic2d768202991eba674275aa4ffe78478f8f6dd27 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/210515 Tested-by: Jenkins Reviewed-by: Hossein --- include/svx/EnhancedCustomShapeGeometry.hxx | 5 +- .../EnhancedCustomShapeGeometry.cxx | 756 +++++++++--------- svx/source/svdraw/svdoashp.cxx | 17 +- 3 files changed, 389 insertions(+), 389 deletions(-) diff --git a/include/svx/EnhancedCustomShapeGeometry.hxx b/include/svx/EnhancedCustomShapeGeometry.hxx index 06679eb18002..fe734f6d1863 100644 --- a/include/svx/EnhancedCustomShapeGeometry.hxx +++ b/include/svx/EnhancedCustomShapeGeometry.hxx @@ -73,10 +73,9 @@ struct SvxMSDffHandle struct mso_CustomShape { std::span pVertices; - sal_uInt16* pElements; - sal_uInt32 nElements; + std::span pElements; std::span pCalculation; - sal_Int32* pDefData; + std::span pDefData; std::span pTextRect; sal_Int32 nCoordWidth; sal_Int32 nCoordHeight; diff --git a/svx/source/customshapes/EnhancedCustomShapeGeometry.cxx b/svx/source/customshapes/EnhancedCustomShapeGeometry.cxx index 76e375efb6f0..00ee7f83016b 100644 --- a/svx/source/customshapes/EnhancedCustomShapeGeometry.cxx +++ b/svx/source/customshapes/EnhancedCustomShapeGeometry.cxx @@ -127,9 +127,9 @@ const SvxMSDffHandle mso_sptArcHandle[] = const mso_CustomShape msoArc = { std::span(mso_sptArcVert), - const_cast(mso_sptArcSegm), sizeof( mso_sptArcSegm ) >> 1, + std::span(mso_sptArcSegm), std::span(mso_sptArcCalc), - const_cast(mso_sptArcDefault), + std::span(mso_sptArcDefault), std::span(), 21600, 21600, MIN_INT32, MIN_INT32, @@ -144,9 +144,9 @@ const SvxMSDffVertPair mso_sptTextSimpleVert[] = const mso_CustomShape msoTextSimple = { std::span(mso_sptTextSimpleVert), - nullptr, 0, + std::span(), std::span(), - nullptr, + std::span(), std::span(), 21600, 21600, MIN_INT32, MIN_INT32, @@ -161,9 +161,9 @@ const SvxMSDffVertPair mso_sptRectangleVert[] = const mso_CustomShape msoRectangle = { std::span(mso_sptRectangleVert), - nullptr, 0, + std::span(), std::span(), - nullptr, + std::span(), std::span(), 21600, 21600, MIN_INT32, MIN_INT32, @@ -206,9 +206,9 @@ const SvxMSDffHandle mso_sptRoundRectangleHandle[] = const mso_CustomShape msoRoundRectangle = { std::span(mso_sptRoundRectangleVert), - const_cast(mso_sptRoundRectangleSegm), sizeof( mso_sptRoundRectangleSegm ) >> 1, + std::span(mso_sptRoundRectangleSegm), std::span(mso_sptRoundRectangleCalc), - const_cast(mso_sptDefault3600), + std::span(mso_sptDefault3600), std::span(mso_sptRoundRectangleTextRect), 21600, 21600, 10800, 10800, @@ -231,9 +231,9 @@ const SvxMSDffVertPair mso_sptRightTriangleGluePoints[] = const mso_CustomShape msoRightTriangle = { std::span(mso_sptRightTriangleVert), - nullptr, 0, + std::span(), std::span(), - nullptr, + std::span(), std::span(mso_sptRightTriangleTextRect), 21600, 21600, MIN_INT32, MIN_INT32, @@ -260,9 +260,9 @@ const SvxMSDffVertPair mso_sptEllipseGluePoints[] = const mso_CustomShape msoEllipse = { std::span(mso_sptEllipseVert), - const_cast(mso_sptEllipseSegm), sizeof( mso_sptEllipseSegm ) >> 1, + std::span(mso_sptEllipseSegm), std::span(), - nullptr, + std::span(), std::span(mso_sptEllipseTextRect), 21600, 21600, MIN_INT32, MIN_INT32, @@ -311,9 +311,9 @@ const SvxMSDffHandle mso_sptParallelogramHandle[] = const mso_CustomShape msoParallelogram = { std::span(mso_sptParallelogramVert), - const_cast(mso_sptParallelogramSegm), sizeof( mso_sptParallelogramSegm ) >> 1, + std::span(mso_sptParallelogramSegm), std::span(mso_sptParallelogramCalc), - const_cast(mso_sptDefault5400), + std::span(mso_sptDefault5400), std::span(mso_sptParallelogramTextRect), 21600, 21600, MIN_INT32, MIN_INT32, @@ -332,9 +332,9 @@ const SvxMSDffTextRectangles mso_sptDiamondTextRect[] = const mso_CustomShape msoDiamond = { std::span(mso_sptDiamondVert), - nullptr, 0, + std::span(), std::span(), - nullptr, + std::span(), std::span(mso_sptDiamondTextRect), 21600, 21600, MIN_INT32, MIN_INT32, @@ -376,9 +376,9 @@ const SvxMSDffHandle mso_sptTrapezoidHandle[] = const mso_CustomShape msoTrapezoid = { std::span(mso_sptTrapezoidVert), - const_cast(mso_sptTrapezoidSegm), sizeof( mso_sptTrapezoidSegm ) >> 1, + std::span(mso_sptTrapezoidSegm), std::span(mso_sptTrapezoidCalc), - const_cast(mso_sptDefault5400), + std::span(mso_sptDefault5400), std::span(mso_sptTrapezoidTextRect), 21600, 21600, MIN_INT32, MIN_INT32, @@ -467,9 +467,9 @@ const SvxMSDffHandle mso_sptOctagonHandle[] = const mso_CustomShape msoOctagon = { std::span(mso_sptOctagonVert), - const_cast(mso_sptOctagonSegm), sizeof( mso_sptOctagonSegm ) >> 1, + std::span(mso_sptOctagonSegm), std::span(mso_sptOctagonCalc), - const_cast(mso_sptOctagonDefault), + std::span(mso_sptOctagonDefault), std::span(mso_sptOctagonTextRect), 21600, 21600, 10800, 10800, @@ -513,9 +513,9 @@ const SvxMSDffHandle mso_sptIsocelesTriangleHandle[] = const mso_CustomShape msoIsocelesTriangle = { std::span(mso_sptIsocelesTriangleVert), - const_cast(mso_sptIsocelesTriangleSegm), sizeof( mso_sptIsocelesTriangleSegm ) >> 1, + std::span(mso_sptIsocelesTriangleSegm), std::span(mso_sptIsocelesTriangleCalc), - const_cast(mso_sptDefault10800), + std::span(mso_sptDefault10800), std::span(mso_sptIsocelesTriangleTextRect), 21600, 21600, MIN_INT32, MIN_INT32, @@ -552,9 +552,9 @@ const SvxMSDffHandle mso_sptHexagonHandle[] = const mso_CustomShape msoHexagon = { std::span(mso_sptHexagonVert), - const_cast(mso_sptHexagonSegm), sizeof( mso_sptHexagonSegm ) >> 1, + std::span(mso_sptHexagonSegm), std::span(mso_sptHexagonCalc), - const_cast(mso_sptDefault5400), + std::span(mso_sptDefault5400), std::span(mso_sptHexagonTextRect), 21600, 21600, MIN_INT32, MIN_INT32, @@ -579,9 +579,9 @@ const SvxMSDffVertPair mso_sptPentagonGluePoints[] = const mso_CustomShape msoPentagon = { std::span(mso_sptPentagonVert), - nullptr, 0, + std::span(), std::span(), - nullptr, + std::span(), std::span(mso_sptPentagonTextRect), 21600, 21600, MIN_INT32, MIN_INT32, @@ -614,9 +614,9 @@ const SvxMSDffHandle mso_sptPlusHandle[] = const mso_CustomShape msoPlus = { std::span(mso_sptPlusVert), - nullptr, 0, + std::span(), std::span(mso_sptPlusCalc), - const_cast(mso_sptDefault5400), + std::span(mso_sptDefault5400), std::span(mso_sptPlusTextRect), 21600, 21600, 10800, 10800, @@ -671,9 +671,9 @@ const SvxMSDffHandle mso_sptCanHandle[] = const mso_CustomShape msoCan = { std::span(mso_sptCanVert), - const_cast(mso_sptCanSegm), sizeof( mso_sptCanSegm ) >> 1, + std::span(mso_sptCanSegm), std::span(mso_sptCanCalc), - const_cast(mso_sptDefault5400), + std::span(mso_sptDefault5400), std::span(mso_sptCanTextRect), 88, 21600, MIN_INT32, MIN_INT32, @@ -713,9 +713,9 @@ const SvxMSDffHandle mso_sptArrowHandle[] = const mso_CustomShape msoArrow = { std::span(mso_sptArrowVert), - const_cast(mso_sptArrowSegm), sizeof( mso_sptArrowSegm ) >> 1, + std::span(mso_sptArrowSegm), std::span(mso_sptArrowCalc), - const_cast(mso_sptDefault16200and5400), + std::span(mso_sptDefault16200and5400), std::span(mso_sptArrowTextRect), 21600, 21600, MIN_INT32, MIN_INT32, @@ -748,9 +748,9 @@ const SvxMSDffHandle mso_sptLeftArrowHandle[] = const mso_CustomShape msoLeftArrow = { std::span(mso_sptLeftArrowVert), - const_cast(mso_sptLeftArrowSegm), sizeof( mso_sptLeftArrowSegm ) >> 1, + std::span(mso_sptLeftArrowSegm), std::span(mso_sptArrowCalc), - const_cast(mso_sptLeftArrowDefault), + std::span(mso_sptLeftArrowDefault), std::span(mso_sptLeftArrowTextRect), 21600, 21600, MIN_INT32, MIN_INT32, @@ -779,9 +779,9 @@ const SvxMSDffHandle mso_sptDownArrowHandle[] = const mso_CustomShape msoDownArrow = { std::span(mso_sptDownArrowVert), - const_cast(mso_sptDownArrowSegm), sizeof( mso_sptDownArrowSegm ) >> 1, + std::span(mso_sptDownArrowSegm), std::span(mso_sptArrowCalc), - const_cast(mso_sptDefault16200and5400), + std::span(mso_sptDefault16200and5400), std::span(mso_sptDownArrowTextRect), 21600, 21600, MIN_INT32, MIN_INT32, @@ -814,9 +814,9 @@ const SvxMSDffHandle mso_sptUpArrowHandle[] = const mso_CustomShape msoUpArrow = { std::span(mso_sptUpArrowVert), - const_cast(mso_sptUpArrowSegm), sizeof( mso_sptUpArrowSegm ) >> 1, + std::span(mso_sptUpArrowSegm), std::span(mso_sptArrowCalc), - const_cast(mso_sptUpArrowDefault), + std::span(mso_sptUpArrowDefault), std::span(mso_sptUpArrowTextRect), 21600, 21600, MIN_INT32, MIN_INT32, @@ -863,9 +863,9 @@ const SvxMSDffHandle mso_sptLeftRightArrowHandle[] = const mso_CustomShape msoLeftRightArrow = { std::span(mso_sptLeftRightArrowVert), - const_cast(mso_sptLeftRightArrowSegm), sizeof( mso_sptLeftRightArrowSegm ) >> 1, + std::span(mso_sptLeftRightArrowSegm), std::span(mso_sptDoubleArrowCalc), - const_cast(mso_sptLeftRightArrowDefault), + std::span(mso_sptLeftRightArrowDefault), std::span(mso_sptLeftRightArrowTextRect), 21600, 21600, MIN_INT32, MIN_INT32, @@ -899,9 +899,9 @@ const SvxMSDffHandle mso_sptUpDownArrowHandle[] = const mso_CustomShape msoUpDownArrow = { std::span(mso_sptUpDownArrowVert), - const_cast(mso_sptUpDownArrowSegm), sizeof( mso_sptUpDownArrowSegm ) >> 1, + std::span(mso_sptUpDownArrowSegm), std::span(mso_sptDoubleArrowCalc), - const_cast(mso_sptUpDownArrowDefault), + std::span(mso_sptUpDownArrowDefault), std::span(mso_sptUpDownArrowTextRect), 21600, 21600, MIN_INT32, MIN_INT32, @@ -949,9 +949,9 @@ const SvxMSDffHandle mso_sptQuadArrowHandle[] = const mso_CustomShape msoQuadArrow = { std::span(mso_sptQuadArrowVert), - const_cast(mso_sptQuadArrowSegm), sizeof( mso_sptQuadArrowSegm ) >> 1, + std::span(mso_sptQuadArrowSegm), std::span(mso_sptQuadArrowCalc), - const_cast(mso_sptQuadArrowDefault), + std::span(mso_sptQuadArrowDefault), std::span(mso_sptQuadArrowTextRect), 21600, 21600, MIN_INT32, MIN_INT32, @@ -998,9 +998,9 @@ const SvxMSDffHandle mso_sptLeftRightUpArrowHandle[] = const mso_CustomShape msoLeftRightUpArrow = { std::span(mso_sptLeftRightUpArrowVert), - const_cast(mso_sptLeftRightUpArrowSegm), sizeof( mso_sptLeftRightUpArrowSegm ) >> 1, + std::span(mso_sptLeftRightUpArrowSegm), std::span(mso_sptLeftRightUpArrowCalc), - const_cast(mso_sptLeftRightUpArrowDefault), + std::span(mso_sptLeftRightUpArrowDefault), std::span(mso_sptLeftRightUpArrowTextRect), 21600, 21600, MIN_INT32, MIN_INT32, @@ -1042,9 +1042,9 @@ const SvxMSDffHandle mso_sptBentArrowHandle[] = const mso_CustomShape msoBentArrow = { std::span(mso_sptBentArrowVert), - const_cast(mso_sptBentArrowSegm), sizeof( mso_sptBentArrowSegm ) >> 1, + std::span(mso_sptBentArrowSegm), std::span(mso_sptBentArrowCalc), - const_cast(mso_sptBentArrowDefault), + std::span(mso_sptBentArrowDefault), std::span(mso_sptBentArrowTextRect), 21600, 21600, MIN_INT32, MIN_INT32, @@ -1073,9 +1073,9 @@ const SvxMSDffTextRectangles mso_sptUturnArrowTextRect[] = const mso_CustomShape msoUturnArrow = { std::span(mso_sptUturnArrowVert), - const_cast(mso_sptUturnArrowSegm), sizeof( mso_sptUturnArrowSegm ) >> 1, + std::span(mso_sptUturnArrowSegm), std::span(), - nullptr, + std::span(), std::span(mso_sptUturnArrowTextRect), 21600, 21600, MIN_INT32, MIN_INT32, @@ -1125,9 +1125,9 @@ const SvxMSDffHandle mso_sptLeftUpArrowHandle[] = const mso_CustomShape msoLeftUpArrow = { std::span(mso_sptLeftUpArrowVert), - const_cast(mso_sptLeftUpArrowSegm), sizeof( mso_sptLeftUpArrowSegm ) >> 1, + std::span(mso_sptLeftUpArrowSegm), std::span(mso_sptLeftUpArrowCalc), - const_cast(mso_sptLeftUpArrowDefault), + std::span(mso_sptLeftUpArrowDefault), std::span(mso_sptLeftUpArrowTextRect), 21600, 21600, MIN_INT32, MIN_INT32, @@ -1178,9 +1178,9 @@ const SvxMSDffHandle mso_sptBentUpArrowHandle[] = const mso_CustomShape msoBentUpArrow = { std::span(mso_sptBentUpArrowVert), - const_cast(mso_sptBentUpArrowSegm), sizeof( mso_sptBentUpArrowSegm ) >> 1, + std::span(mso_sptBentUpArrowSegm), std::span(mso_sptBentUpArrowCalc), - const_cast(mso_sptBentUpArrowDefault), + std::span(mso_sptBentUpArrowDefault), std::span(mso_sptBentUpArrowTextRect), 21600, 21600, MIN_INT32, MIN_INT32, @@ -1287,9 +1287,9 @@ const SvxMSDffHandle mso_sptCurvedRightHandles[] = const mso_CustomShape msoCurvedRightArrow = { std::span(mso_sptCurvedRightVert), - const_cast(mso_sptCurvedRightSegm), sizeof( mso_sptCurvedRightSegm ) >> 1, + std::span(mso_sptCurvedRightSegm), std::span(mso_sptCurvedRightCalc), - const_cast(mso_sptCurvedRightDefault), + std::span(mso_sptCurvedRightDefault), std::span(mso_sptCurvedRightTextRect), 21600, 21600, MIN_INT32, MIN_INT32, @@ -1343,9 +1343,9 @@ const SvxMSDffHandle mso_sptCurvedDownHandles[] = const mso_CustomShape msoCurvedDownArrow = { std::span(mso_sptCurvedDownVert), - const_cast(mso_sptCurvedDownSegm), sizeof( mso_sptCurvedDownSegm ) >> 1, + std::span(mso_sptCurvedDownSegm), std::span(mso_sptCurvedRightCalc), - const_cast(mso_sptCurvedRightDefault), + std::span(mso_sptCurvedRightDefault), std::span(mso_sptCurvedDownTextRect), 21600, 21600, MIN_INT32, MIN_INT32, @@ -1450,9 +1450,9 @@ const SvxMSDffHandle mso_sptCurvedUpHandles[] = const mso_CustomShape msoCurvedUpArrow = { std::span(mso_sptCurvedUpVert), - const_cast(mso_sptCurvedUpSegm), sizeof( mso_sptCurvedUpSegm ) >> 1, + std::span(mso_sptCurvedUpSegm), std::span(mso_sptCurvedUpCalc), - const_cast(mso_sptCurvedUpDefault), + std::span(mso_sptCurvedUpDefault), std::span(mso_sptCurvedUpTextRect), 21600, 21600, MIN_INT32, MIN_INT32, @@ -1504,9 +1504,9 @@ const SvxMSDffHandle mso_sptCurvedLeftHandles[] = const mso_CustomShape msoCurvedLeftArrow = { std::span(mso_sptCurvedLeftVert), - const_cast(mso_sptCurvedLeftSegm), sizeof( mso_sptCurvedLeftSegm ) >> 1, + std::span(mso_sptCurvedLeftSegm), std::span(mso_sptCurvedUpCalc), - const_cast(mso_sptCurvedUpDefault), + std::span(mso_sptCurvedUpDefault), std::span(mso_sptCurvedLeftTextRect), 21600, 21600, MIN_INT32, MIN_INT32, @@ -1548,9 +1548,9 @@ const SvxMSDffHandle mso_sptStripedRightArrowHandle[] = const mso_CustomShape msoStripedRightArrow = { std::span(mso_sptStripedRightArrowVert), - const_cast(mso_sptStripedRightArrowSegm), sizeof( mso_sptStripedRightArrowSegm ) >> 1, + std::span(mso_sptStripedRightArrowSegm), std::span(mso_sptStripedRightArrowCalc), - const_cast(mso_sptDefault16200and5400), + std::span(mso_sptDefault16200and5400), std::span(mso_sptStripedRightArrowTextRect), 21600, 21600, MIN_INT32, MIN_INT32, @@ -1585,9 +1585,9 @@ const SvxMSDffHandle mso_sptNotchedRightArrowHandle[] = const mso_CustomShape msoNotchedRightArrow = { std::span(mso_sptNotchedRightArrowVert), - nullptr, 0, + std::span(), std::span(mso_sptNotchedRightArrowCalc), - const_cast(mso_sptDefault16200and5400), + std::span(mso_sptDefault16200and5400), std::span(mso_sptNotchedRightArrowTextRect), 21600, 21600, MIN_INT32, MIN_INT32, @@ -1624,9 +1624,9 @@ const SvxMSDffHandle mso_sptHomePlateHandle[] = const mso_CustomShape msoHomePlate = { std::span(mso_sptHomePlateVert), - const_cast(mso_sptHomePlateSegm), sizeof( mso_sptHomePlateSegm ) >> 1, + std::span(mso_sptHomePlateSegm), std::span(mso_sptHomePlateCalc), - const_cast(mso_sptHomePlateDefault), + std::span(mso_sptHomePlateDefault), std::span(mso_sptHomePlateTextRect), 21600, 21600, MIN_INT32, MIN_INT32, @@ -1664,9 +1664,9 @@ const SvxMSDffHandle mso_sptChevronHandle[] = const mso_CustomShape msoChevron = { std::span(mso_sptChevronVert), - const_cast(mso_sptChevronSegm), sizeof( mso_sptChevronSegm ) >> 1, + std::span(mso_sptChevronSegm), std::span(mso_sptChevronCalc), - const_cast(mso_sptChevronDefault), + std::span(mso_sptChevronDefault), std::span(mso_sptChevronTextRect), 21600, 21600, MIN_INT32, MIN_INT32, @@ -1713,9 +1713,9 @@ const SvxMSDffHandle mso_sptRightArrowCalloutHandle[] = const mso_CustomShape msoRightArrowCallout = { std::span(mso_sptRightArrowCalloutVert), - const_cast(mso_sptRightArrowCalloutSegm), sizeof( mso_sptRightArrowCalloutSegm ) >> 1, + std::span(mso_sptRightArrowCalloutSegm), std::span(mso_sptRightArrowCalloutCalc), - const_cast(mso_sptRightArrowCalloutDefault), + std::span(mso_sptRightArrowCalloutDefault), std::span(mso_sptRightArrowCalloutTextRect), 21600, 21600, MIN_INT32, MIN_INT32, @@ -1762,9 +1762,9 @@ const SvxMSDffHandle mso_sptLeftArrowCalloutHandle[] = const mso_CustomShape msoLeftArrowCallout = { std::span(mso_sptLeftArrowCalloutVert), - const_cast(mso_sptLeftArrowCalloutSegm), sizeof( mso_sptLeftArrowCalloutSegm ) >> 1, + std::span(mso_sptLeftArrowCalloutSegm), std::span(mso_sptLeftArrowCalloutCalc), - const_cast(mso_sptLeftArrowCalloutDefault), + std::span(mso_sptLeftArrowCalloutDefault), std::span(mso_sptLeftArrowCalloutTextRect), 21600, 21600, MIN_INT32, MIN_INT32, @@ -1811,9 +1811,9 @@ const SvxMSDffHandle mso_sptUpArrowCalloutHandle[] = const mso_CustomShape msoUpArrowCallout = { std::span(mso_sptUpArrowCalloutVert), - const_cast(mso_sptUpArrowCalloutSegm), sizeof( mso_sptUpArrowCalloutSegm ) >> 1, + std::span(mso_sptUpArrowCalloutSegm), std::span(mso_sptUpArrowCalloutCalc), - const_cast(mso_sptUpArrowCalloutDefault), + std::span(mso_sptUpArrowCalloutDefault), std::span(mso_sptUpArrowCalloutTextRect), 21600, 21600, MIN_INT32, MIN_INT32, @@ -1860,9 +1860,9 @@ const SvxMSDffHandle mso_sptDownArrowCalloutHandle[] = const mso_CustomShape msoDownArrowCallout = { std::span(mso_sptDownArrowCalloutVert), - const_cast(mso_sptDownArrowCalloutSegm), sizeof( mso_sptDownArrowCalloutSegm ) >> 1, + std::span(mso_sptDownArrowCalloutSegm), std::span(mso_sptDownArrowCalloutCalc), - const_cast(mso_sptDownArrowCalloutDefault), + std::span(mso_sptDownArrowCalloutDefault), std::span(mso_sptDownArrowCalloutTextRect), 21600, 21600, MIN_INT32, MIN_INT32, @@ -1913,9 +1913,9 @@ const SvxMSDffHandle mso_sptLeftRightArrowCalloutHandle[] = const mso_CustomShape msoLeftRightArrowCallout = { std::span(mso_sptLeftRightArrowCalloutVert), - const_cast(mso_sptLeftRightArrowCalloutSegm), sizeof( mso_sptLeftRightArrowCalloutSegm ) >> 1, + std::span(mso_sptLeftRightArrowCalloutSegm), std::span(mso_sptLeftRightArrowCalloutCalc), - const_cast(mso_sptLeftRightArrowCalloutDefault), + std::span(mso_sptLeftRightArrowCalloutDefault), std::span(mso_sptLeftRightArrowCalloutTextRect), 21600, 21600, MIN_INT32, MIN_INT32, @@ -1966,9 +1966,9 @@ const SvxMSDffHandle mso_sptUpDownArrowCalloutHandle[] = const mso_CustomShape msoUpDownArrowCallout = { std::span(mso_sptUpDownArrowCalloutVert), - const_cast(mso_sptUpDownArrowCalloutSegm), sizeof( mso_sptUpDownArrowCalloutSegm ) >> 1, + std::span(mso_sptUpDownArrowCalloutSegm), std::span(mso_sptUpDownArrowCalloutCalc), - const_cast(mso_sptUpDownArrowCalloutDefault), + std::span(mso_sptUpDownArrowCalloutDefault), std::span(mso_sptUpDownArrowCalloutTextRect), 21600, 21600, MIN_INT32, MIN_INT32, @@ -2022,9 +2022,9 @@ const SvxMSDffHandle mso_sptQuadArrowCalloutHandle[] = const mso_CustomShape msoQuadArrowCallout = { std::span(mso_sptQuadArrowCalloutVert), - const_cast(mso_sptQuadArrowCalloutSegm), sizeof( mso_sptQuadArrowCalloutSegm ) >> 1, + std::span(mso_sptQuadArrowCalloutSegm), std::span(mso_sptQuadArrowCalloutCalc), - const_cast(mso_sptQuadArrowCalloutDefault), + std::span(mso_sptQuadArrowCalloutDefault), std::span(mso_sptQuadArrowCalloutTextRect), 21600, 21600, MIN_INT32, MIN_INT32, @@ -2118,9 +2118,9 @@ const SvxMSDffHandle mso_sptCircularArrowHandle[] = const mso_CustomShape msoCircularArrow = { std::span(mso_sptCircularArrowVert), - const_cast(mso_sptCircularArrowSegm), sizeof( mso_sptCircularArrowSegm ) >> 1, + std::span(mso_sptCircularArrowSegm), std::span(mso_sptCircularArrowCalc), - const_cast(mso_sptCircularArrowDefault), + std::span(mso_sptCircularArrowDefault), std::span(mso_sptCircularArrowTextRect), 21600, 21600, MIN_INT32, MIN_INT32, @@ -2172,9 +2172,9 @@ const SvxMSDffVertPair mso_sptCubeGluePoints[] = const mso_CustomShape msoCube = { std::span(mso_sptCubeVert), - const_cast(mso_sptCubeSegm), sizeof( mso_sptCubeSegm ) >> 1, + std::span(mso_sptCubeSegm), std::span(mso_sptCubeCalc), - const_cast(mso_sptDefault5400), + std::span(mso_sptDefault5400), std::span(mso_sptCubeTextRect), 21600, 21600, 10800, 10800, @@ -2217,9 +2217,9 @@ const SvxMSDffHandle mso_sptBevelHandle[] = const mso_CustomShape msoBevel = { std::span(mso_sptBevelVert), - const_cast(mso_sptBevelSegm), sizeof( mso_sptBevelSegm ) >> 1, + std::span(mso_sptBevelSegm), std::span(mso_sptBevelCalc), - const_cast(mso_sptDefault2700), + std::span(mso_sptDefault2700), std::span(mso_sptBevelTextRect), 21600, 21600, 10800, 10800, @@ -2269,9 +2269,9 @@ const SvxMSDffHandle mso_sptFoldedCornerHandle[] = const mso_CustomShape msoFoldedCorner = { std::span(mso_sptFoldedCornerVert), - const_cast(mso_sptFoldedCornerSegm), sizeof( mso_sptFoldedCornerSegm ) >> 1, + std::span(mso_sptFoldedCornerSegm), std::span(mso_sptFoldedCornerCalc), - const_cast(mso_sptFoldedCornerDefault), + std::span(mso_sptFoldedCornerDefault), std::span(mso_sptFoldedCornerTextRect), 21600, 21600, MIN_INT32, MIN_INT32, @@ -2313,9 +2313,9 @@ const SvxMSDffHandle mso_sptButtonHandle[] = const mso_CustomShape msoActionButtonBlank = { std::span(mso_sptActionButtonBlankVert), - const_cast(mso_sptActionButtonBlankSegm), sizeof( mso_sptActionButtonBlankSegm ) >> 1, + std::span(mso_sptActionButtonBlankSegm), std::span(mso_sptActionButtonBlankCalc), - const_cast(mso_sptDefault1400), + std::span(mso_sptDefault1400), std::span(mso_sptActionButtonBlankTextRect), 21600, 21600, 10800, 10800, @@ -2401,9 +2401,9 @@ const SvxMSDffCalculationData mso_sptActionButtonHomeCalc[] = // adj value 0 const mso_CustomShape msoActionButtonHome = { std::span(mso_sptActionButtonHomeVert), - const_cast(mso_sptActionButtonHomeSegm), sizeof( mso_sptActionButtonHomeSegm ) >> 1, + std::span(mso_sptActionButtonHomeSegm), std::span(mso_sptActionButtonHomeCalc), - const_cast(mso_sptDefault1400), + std::span(mso_sptDefault1400), std::span(mso_sptActionButtonTextRect), 21600, 21600, 10800, 10800, @@ -2511,9 +2511,9 @@ const SvxMSDffCalculationData mso_sptActionButtonHelpCalc[] = // adj value 0 const mso_CustomShape msoActionButtonHelp = { std::span(mso_sptActionButtonHelpVert), - const_cast(mso_sptActionButtonHelpSegm), sizeof( mso_sptActionButtonHelpSegm ) >> 1, + std::span(mso_sptActionButtonHelpSegm), std::span(mso_sptActionButtonHelpCalc), - const_cast(mso_sptDefault1400), + std::span(mso_sptDefault1400), std::span(mso_sptActionButtonTextRect), 21600, 21600, 10800, 10800, @@ -2599,9 +2599,9 @@ const SvxMSDffCalculationData mso_sptActionButtonInformationCalc[] = // adj valu const mso_CustomShape msoActionButtonInformation = { std::span(mso_sptActionButtonInformationVert), - const_cast(mso_sptActionButtonInformationSegm), sizeof( mso_sptActionButtonInformationSegm ) >> 1, + std::span(mso_sptActionButtonInformationSegm), std::span(mso_sptActionButtonInformationCalc), - const_cast(mso_sptDefault1400), + std::span(mso_sptDefault1400), std::span(mso_sptActionButtonTextRect), 21600, 21600, 10800, 10800, @@ -2652,9 +2652,9 @@ const SvxMSDffCalculationData mso_sptActionButtonForwardBackCalc[] = // adj valu const mso_CustomShape msoActionButtonBackPrevious = { std::span(mso_sptActionButtonBackPreviousVert), - const_cast(mso_sptActionButtonForwardBackSegm), sizeof( mso_sptActionButtonForwardBackSegm ) >> 1, + std::span(mso_sptActionButtonForwardBackSegm), std::span(mso_sptActionButtonForwardBackCalc), - const_cast(mso_sptDefault1400), + std::span(mso_sptDefault1400), std::span(mso_sptActionButtonTextRect), 21600, 21600, 10800, 10800, @@ -2675,9 +2675,9 @@ const SvxMSDffVertPair mso_sptActionButtonForwardNextVert[] = const mso_CustomShape msoActionButtonForwardNext = { std::span(mso_sptActionButtonForwardNextVert), - const_cast(mso_sptActionButtonForwardBackSegm), sizeof( mso_sptActionButtonForwardBackSegm ) >> 1, + std::span(mso_sptActionButtonForwardBackSegm), std::span(mso_sptActionButtonForwardBackCalc), - const_cast(mso_sptDefault1400), + std::span(mso_sptDefault1400), std::span(mso_sptActionButtonTextRect), 21600, 21600, 10800, 10800, @@ -2742,9 +2742,9 @@ const SvxMSDffCalculationData mso_sptActionButtonBeginningEndCalc[] = // adj const mso_CustomShape msoActionButtonBeginning = { std::span(mso_sptActionButtonBeginningVert), - const_cast(mso_sptActionButtonBeginningEndSegm), sizeof( mso_sptActionButtonBeginningEndSegm ) >> 1, + std::span(mso_sptActionButtonBeginningEndSegm), std::span(mso_sptActionButtonBeginningEndCalc), - const_cast(mso_sptDefault1400), + std::span(mso_sptDefault1400), std::span(mso_sptActionButtonTextRect), 21600, 21600, 10800, 10800, @@ -2767,9 +2767,9 @@ const SvxMSDffVertPair mso_sptActionButtonEndVert[] = const mso_CustomShape msoActionButtonEnd = { std::span(mso_sptActionButtonEndVert), - const_cast(mso_sptActionButtonBeginningEndSegm), sizeof( mso_sptActionButtonBeginningEndSegm ) >> 1, + std::span(mso_sptActionButtonBeginningEndSegm), std::span(mso_sptActionButtonBeginningEndCalc), - const_cast(mso_sptDefault1400), + std::span(mso_sptDefault1400), std::span(mso_sptActionButtonTextRect), 21600, 21600, 10800, 10800, @@ -2856,9 +2856,9 @@ const SvxMSDffCalculationData mso_sptActionButtonReturnCalc[] = // adj value 0 const mso_CustomShape msoActionButtonReturn = { std::span(mso_sptActionButtonReturnVert), - const_cast(mso_sptActionButtonReturnSegm), sizeof( mso_sptActionButtonReturnSegm ) >> 1, + std::span(mso_sptActionButtonReturnSegm), std::span(mso_sptActionButtonReturnCalc), - const_cast(mso_sptDefault1400), + std::span(mso_sptDefault1400), std::span(mso_sptActionButtonTextRect), 21600, 21600, 10800, 10800, @@ -2916,9 +2916,9 @@ const SvxMSDffCalculationData mso_sptActionButtonDocumentCalc[] = // adj valu const mso_CustomShape msoActionButtonDocument = { std::span(mso_sptActionButtonDocumentVert), - const_cast(mso_sptActionButtonDocumentSegm), sizeof( mso_sptActionButtonDocumentSegm ) >> 1, + std::span(mso_sptActionButtonDocumentSegm), std::span(mso_sptActionButtonDocumentCalc), - const_cast(mso_sptDefault1400), + std::span(mso_sptDefault1400), std::span(mso_sptActionButtonTextRect), 21600, 21600, 10800, 10800, @@ -2992,9 +2992,9 @@ const SvxMSDffCalculationData mso_sptActionButtonSoundCalc[] = // adj value 0 const mso_CustomShape msoActionButtonSound = { std::span(mso_sptActionButtonSoundVert), - const_cast(mso_sptActionButtonSoundSegm), sizeof( mso_sptActionButtonSoundSegm ) >> 1, + std::span(mso_sptActionButtonSoundSegm), std::span(mso_sptActionButtonSoundCalc), - const_cast(mso_sptDefault1400), + std::span(mso_sptDefault1400), std::span(mso_sptActionButtonTextRect), 21600, 21600, 10800, 10800, @@ -3077,9 +3077,9 @@ const SvxMSDffCalculationData mso_sptActionButtonMovieCalc[] = // adj value 0 const mso_CustomShape msoActionButtonMovie = { std::span(mso_sptActionButtonMovieVert), - const_cast(mso_sptActionButtonMovieSegm), sizeof( mso_sptActionButtonMovieSegm ) >> 1, + std::span(mso_sptActionButtonMovieSegm), std::span(mso_sptActionButtonMovieCalc), - const_cast(mso_sptDefault1400), + std::span(mso_sptDefault1400), std::span(mso_sptActionButtonTextRect), 21600, 21600, 10800, 10800, @@ -3120,9 +3120,9 @@ const SvxMSDffHandle mso_sptSmileyHandle[] = const mso_CustomShape msoSmileyFace = { std::span(mso_sptSmileyFaceVert), - const_cast(mso_sptSmileyFaceSegm), sizeof( mso_sptSmileyFaceSegm ) >> 1, + std::span(mso_sptSmileyFaceSegm), std::span(mso_sptSmileyFaceCalc), - const_cast(mso_sptSmileyFaceDefault), + std::span(mso_sptSmileyFaceDefault), std::span(mso_sptEllipseTextRect), 21600, 21600, MIN_INT32, MIN_INT32, @@ -3152,9 +3152,9 @@ const SvxMSDffHandle mso_sptDonutHandle[] = const mso_CustomShape msoDonut = { std::span(mso_sptDonutVert), - const_cast(mso_sptDonutSegm), sizeof( mso_sptDonutSegm ) >> 1, + std::span(mso_sptDonutSegm), std::span(mso_sptDonutCalc), - const_cast(mso_sptDefault5400), + std::span(mso_sptDefault5400), std::span(mso_sptEllipseTextRect), 21600, 21600, MIN_INT32, MIN_INT32, @@ -3201,9 +3201,9 @@ const SvxMSDffHandle mso_sptNoSmokingHandle[] = const mso_CustomShape msoNoSmoking = { std::span(mso_sptNoSmokingVert), - const_cast(mso_sptNoSmokingSegm), sizeof( mso_sptNoSmokingSegm ) >> 1, + std::span(mso_sptNoSmokingSegm), std::span(mso_sptNoSmokingCalc), - const_cast(mso_sptDefault2700), + std::span(mso_sptDefault2700), std::span(mso_sptEllipseTextRect), 21600, 21600, MIN_INT32, MIN_INT32, @@ -3244,9 +3244,9 @@ const SvxMSDffHandle mso_sptBlockArcHandle[] = const mso_CustomShape msoBlockArc = { std::span(mso_sptBlockArcVert), - const_cast(mso_sptBlockArcSegm), sizeof( mso_sptBlockArcSegm ) >> 1, + std::span(mso_sptBlockArcSegm), std::span(mso_sptBlockArcCalc), - const_cast(mso_sptBlockArcDefault), + std::span(mso_sptBlockArcDefault), std::span(), 21600, 21600, MIN_INT32, MIN_INT32, @@ -3308,9 +3308,9 @@ const SvxMSDffVertPair mso_sptHeartGluePoints[] = const mso_CustomShape msoHeart = { std::span(mso_sptHeartVert), - const_cast(mso_sptHeartSegm), sizeof( mso_sptHeartSegm ) >> 1, + std::span(mso_sptHeartSegm), std::span(), - nullptr, + std::span(), std::span(mso_sptHeartTextRect), 21615, 21602, MIN_INT32, MIN_INT32, @@ -3336,9 +3336,9 @@ const SvxMSDffVertPair mso_sptLightningBoldGluePoints[] = const mso_CustomShape msoLightningBold = { std::span(mso_sptLightningBoldVert), - nullptr, 0, + std::span(), std::span(), - nullptr, + std::span(), std::span(mso_sptLightningBoldTextRect), 21600, 21600, MIN_INT32, MIN_INT32, @@ -3440,9 +3440,9 @@ const SvxMSDffHandle mso_sptSunHandle[] = const mso_CustomShape msoSun = { std::span(mso_sptSunVert), - const_cast(mso_sptSunSegm), sizeof( mso_sptSunSegm ) >> 1, + std::span(mso_sptSunSegm), std::span(mso_sptSunCalc), - const_cast(mso_sptDefault5400), + std::span(mso_sptDefault5400), std::span(mso_sptSunTextRect), 21600, 21600, MIN_INT32, MIN_INT32, @@ -3492,9 +3492,9 @@ const SvxMSDffHandle mso_sptMoonHandle[] = const mso_CustomShape msoMoon = { std::span(mso_sptMoonVert), - const_cast(mso_sptMoonSegm), sizeof( mso_sptMoonSegm ) >> 1, + std::span(mso_sptMoonSegm), std::span(mso_sptMoonCalc), - const_cast(mso_sptDefault10800), + std::span(mso_sptDefault10800), std::span(mso_sptMoonTextRect), 21600, 21600, MIN_INT32, MIN_INT32, @@ -3551,9 +3551,9 @@ const SvxMSDffHandle mso_sptBracketPairHandle[] = const mso_CustomShape msoBracketPair = { std::span(mso_sptBracketPairVert), - const_cast(mso_sptBracketPairSegm), sizeof( mso_sptBracketPairSegm ) >> 1, + std::span(mso_sptBracketPairSegm), std::span(mso_sptBracketPairCalc), - const_cast(mso_sptDefault3700), + std::span(mso_sptDefault3700), std::span(mso_sptBracketPairTextRect), 21600, 21600, 10800, MIN_INT32, @@ -3577,9 +3577,9 @@ const SvxMSDffHandle mso_sptPlaqueHandle[] = const mso_CustomShape msoPlaque = { std::span(mso_sptBracketPairVert), - const_cast(mso_sptPlaqueSegm), sizeof( mso_sptPlaqueSegm ) >> 1, + std::span(mso_sptPlaqueSegm), std::span(mso_sptBracketPairCalc), - const_cast(mso_sptDefault3600), + std::span(mso_sptDefault3600), std::span(mso_sptPlaqueTextRect), 21600, 21600, 10800, 10800, @@ -3635,9 +3635,9 @@ const SvxMSDffHandle mso_sptBracePairHandle[] = const mso_CustomShape msoBracePair = { std::span(mso_sptBracePairVert), - const_cast(mso_sptBracePairSegm), sizeof( mso_sptBracePairSegm ) >> 1, + std::span(mso_sptBracePairSegm), std::span(mso_sptBracePairCalc), - const_cast(mso_sptDefault1800), + std::span(mso_sptDefault1800), std::span(mso_sptBracePairTextRect), 21600, 21600, 10800, MIN_INT32, @@ -3678,9 +3678,9 @@ const SvxMSDffHandle mso_sptLeftBracketHandle[] = const mso_CustomShape msoLeftBracket = { std::span(mso_sptLeftBracketVert), - const_cast(mso_sptBracketSegm), sizeof( mso_sptBracketSegm ) >> 1, + std::span(mso_sptBracketSegm), std::span(mso_sptBracketCalc), - const_cast(mso_sptDefault1800), + std::span(mso_sptDefault1800), std::span(mso_sptLeftBracketTextRect), 21600, 21600, MIN_INT32, MIN_INT32, @@ -3708,9 +3708,9 @@ const SvxMSDffHandle mso_sptRightBracketHandle[] = const mso_CustomShape msoRightBracket = { std::span(mso_sptRightBracketVert), - const_cast(mso_sptBracketSegm), sizeof( mso_sptBracketSegm ) >> 1, + std::span(mso_sptBracketSegm), std::span(mso_sptBracketCalc), - const_cast(mso_sptDefault1800), + std::span(mso_sptDefault1800), std::span(mso_sptRightBracketTextRect), 21600, 21600, MIN_INT32, MIN_INT32, @@ -3764,9 +3764,9 @@ const SvxMSDffHandle mso_sptLeftBraceHandle[] = const mso_CustomShape msoLeftBrace = // adj value0 0 -> 5400 { // adj value1 0 -> 21600 std::span(mso_sptLeftBraceVert), - const_cast(mso_sptBraceSegm), sizeof( mso_sptBraceSegm ) >> 1, + std::span(mso_sptBraceSegm), std::span(mso_sptBraceCalc), - const_cast(mso_sptBraceDefault), + std::span(mso_sptBraceDefault), std::span(mso_sptLeftBraceTextRect), 21600, 21600, MIN_INT32, MIN_INT32, @@ -3797,9 +3797,9 @@ const SvxMSDffHandle mso_sptRightBraceHandle[] = const mso_CustomShape msoRightBrace = // adj value0 0 -> 5400 { // adj value1 0 -> 21600 std::span(mso_sptRightBraceVert), - const_cast(mso_sptBraceSegm), sizeof( mso_sptBraceSegm ) >> 1, + std::span(mso_sptBraceSegm), std::span(mso_sptBraceCalc), - const_cast(mso_sptBraceDefault), + std::span(mso_sptBraceDefault), std::span(mso_sptRightBraceTextRect), 21600, 21600, MIN_INT32, MIN_INT32, @@ -3827,9 +3827,9 @@ const SvxMSDffVertPair mso_sptIrregularSeal1GluePoints[] = const mso_CustomShape msoIrregularSeal1 = { std::span(mso_sptIrregularSeal1Vert), - nullptr, 0, + std::span(), std::span(), - nullptr, + std::span(), std::span(mso_sptIrregularSeal1TextRect), 21600, 21600, MIN_INT32, MIN_INT32, @@ -3859,9 +3859,9 @@ const SvxMSDffVertPair mso_sptIrregularSeal2GluePoints[] = const mso_CustomShape msoIrregularSeal2 = { std::span(mso_sptIrregularSeal2Vert), - nullptr, 0, + std::span(), std::span(), - nullptr, + std::span(), std::span(mso_sptIrregularSeal2TextRect), 21600, 21600, MIN_INT32, MIN_INT32, @@ -3895,9 +3895,9 @@ const SvxMSDffHandle mso_sptSealHandle[] = const mso_CustomShape msoSeal4 = { std::span(mso_sptSeal4Vert), - nullptr, 0, + std::span(), std::span(mso_sptSeal4Calc), - const_cast(mso_sptDefault8100), + std::span(mso_sptDefault8100), std::span(mso_sptSeal4TextRect), 21600, 21600, MIN_INT32, MIN_INT32, @@ -3923,9 +3923,9 @@ const SvxMSDffVertPair mso_sptStarGluePoints[] = const mso_CustomShape msoStar = { std::span(mso_sptStarVert), - nullptr, 0, + std::span(), std::span(), - nullptr, + std::span(), std::span(mso_sptStarTextRect), 21600, 21600, MIN_INT32, MIN_INT32, @@ -4052,9 +4052,9 @@ const SvxMSDffTextRectangles mso_sptSealTextRect[] = const mso_CustomShape msoSeal8 = { std::span(mso_sptSeal8Vert), - nullptr, 0, + std::span(), std::span(mso_sptSeal24Calc), - const_cast(mso_sptDefault2500), + std::span(mso_sptDefault2500), std::span(mso_sptSealTextRect), 21600, 21600, MIN_INT32, MIN_INT32, @@ -4148,9 +4148,9 @@ const SvxMSDffCalculationData mso_sptSeal16Calc[] = const mso_CustomShape msoSeal16 = { std::span(mso_sptSeal16Vert), - nullptr, 0, + std::span(), std::span(mso_sptSeal16Calc), - const_cast(mso_sptDefault2500), + std::span(mso_sptDefault2500), std::span(mso_sptSealTextRect), 21600, 21600, MIN_INT32, MIN_INT32, @@ -4176,9 +4176,9 @@ const SvxMSDffVertPair mso_sptSeal24Vert[] = const mso_CustomShape msoSeal24 = { std::span(mso_sptSeal24Vert), - nullptr, 0, + std::span(), std::span(mso_sptSeal24Calc), - const_cast(mso_sptDefault2500), + std::span(mso_sptDefault2500), std::span(mso_sptSealTextRect), 21600, 21600, MIN_INT32, MIN_INT32, @@ -4344,9 +4344,9 @@ const SvxMSDffVertPair mso_sptSeal32Vert[] = const mso_CustomShape msoSeal32 = { std::span(mso_sptSeal32Vert), - nullptr, 0, + std::span(), std::span(mso_sptSeal32Calc), - const_cast(mso_sptDefault2500), + std::span(mso_sptDefault2500), std::span(mso_sptSealTextRect), 21600, 21600, MIN_INT32, MIN_INT32, @@ -4441,9 +4441,9 @@ const SvxMSDffHandle mso_sptRibbon2Handle[] = const mso_CustomShape msoRibbon2 = { std::span(mso_sptRibbon2Vert), - const_cast(mso_sptRibbon2Segm), sizeof( mso_sptRibbon2Segm ) >> 1, + std::span(mso_sptRibbon2Segm), std::span(mso_sptRibbon2Calc), - const_cast(mso_sptRibbon2Default), + std::span(mso_sptRibbon2Default), std::span(mso_sptRibbon2TextRect), 21600, 21600, MIN_INT32, MIN_INT32, @@ -4522,9 +4522,9 @@ const SvxMSDffHandle mso_sptRibbonHandle[] = const mso_CustomShape msoRibbon = { std::span(mso_sptRibbonVert), - const_cast(mso_sptRibbonSegm), sizeof( mso_sptRibbonSegm ) >> 1, + std::span(mso_sptRibbonSegm), std::span(mso_sptRibbonCalc), - const_cast(mso_sptRibbonDefault), + std::span(mso_sptRibbonDefault), std::span(mso_sptRibbonTextRect), 21600, 21600, MIN_INT32, MIN_INT32, @@ -4645,9 +4645,9 @@ const SvxMSDffHandle mso_sptEllipseRibbonHandle[] = const mso_CustomShape msosptEllipseRibbon = { std::span(mso_sptEllipseRibbonVert), - const_cast(mso_sptEllipseRibbonSegm), sizeof( mso_sptEllipseRibbonSegm ) >> 1, + std::span(mso_sptEllipseRibbonSegm), std::span(mso_sptEllipseRibbonCalc), - const_cast(mso_sptEllipseRibbonDefault), + std::span(mso_sptEllipseRibbonDefault), std::span(mso_sptEllipseRibbonTextRect), 21600, 21600, MIN_INT32, MIN_INT32, @@ -4761,9 +4761,9 @@ const SvxMSDffHandle mso_sptEllipseRibbon2Handle[] = const mso_CustomShape msosptEllipseRibbon2 = { std::span(mso_sptEllipseRibbon2Vert), - const_cast(mso_sptEllipseRibbon2Segm), sizeof( mso_sptEllipseRibbon2Segm ) >> 1, + std::span(mso_sptEllipseRibbon2Segm), std::span(mso_sptEllipseRibbon2Calc), - const_cast(mso_sptEllipseRibbon2Default), + std::span(mso_sptEllipseRibbon2Default), std::span(mso_sptEllipseRibbon2TextRect), 21600, 21600, MIN_INT32, MIN_INT32, @@ -4827,9 +4827,9 @@ const SvxMSDffHandle mso_sptVerticalScrollHandle[] = const mso_CustomShape msoVerticalScroll = { std::span(mso_sptVerticalScrollVert), - const_cast(mso_sptVerticalScrollSegm), sizeof( mso_sptVerticalScrollSegm ) >> 1, + std::span(mso_sptVerticalScrollSegm), std::span(mso_sptScrollCalc), - const_cast(mso_sptDefault2700), + std::span(mso_sptDefault2700), std::span(mso_sptScrollTextRect), 21600, 21600, 11000, 10800, @@ -4873,9 +4873,9 @@ const SvxMSDffHandle mso_sptHorizontalScrollHandle[] = const mso_CustomShape msoHorizontalScroll = { std::span(mso_sptHorizontalScrollVert), - const_cast(mso_sptHorizontalScrollSegm), sizeof( mso_sptHorizontalScrollSegm ) >> 1, + std::span(mso_sptHorizontalScrollSegm), std::span(mso_sptScrollCalc), - const_cast(mso_sptDefault2700), + std::span(mso_sptDefault2700), std::span(mso_sptScrollTextRect), 21600, 21600, 10800, 11000, @@ -4890,9 +4890,9 @@ const SvxMSDffVertPair mso_sptFlowChartProcessVert[] = const mso_CustomShape msoFlowChartProcess = { std::span(mso_sptFlowChartProcessVert), - nullptr, 0, + std::span(), std::span(), - nullptr, + std::span(), std::span(), 21600, 21600, MIN_INT32, MIN_INT32, @@ -4927,9 +4927,9 @@ const SvxMSDffTextRectangles mso_sptFlowChartAlternateProcessTextRect[] = const mso_CustomShape msoFlowChartAlternateProcess = { std::span(mso_sptFlowChartAlternateProcessVert), - const_cast(mso_sptFlowChartAlternateProcessSegm), sizeof( mso_sptFlowChartAlternateProcessSegm ) >> 1, + std::span(mso_sptFlowChartAlternateProcessSegm), std::span(mso_sptFlowChartAlternateProcessCalc), - nullptr, + std::span(), std::span(mso_sptFlowChartAlternateProcessTextRect), 21600, 21600, 10800, 10800, @@ -4948,9 +4948,9 @@ const SvxMSDffTextRectangles mso_sptFlowChartDecisionTextRect[] = const mso_CustomShape msoFlowChartDecision = { std::span(mso_sptFlowChartDecisionVert), - nullptr, 0, + std::span(), std::span(), - nullptr, + std::span(), std::span(mso_sptFlowChartDecisionTextRect), 21600, 21600, MIN_INT32, MIN_INT32, @@ -4973,9 +4973,9 @@ const SvxMSDffVertPair mso_sptFlowChartInputOutputGluePoints[] = const mso_CustomShape msoFlowChartInputOutput = { std::span(mso_sptFlowChartInputOutputVert), - nullptr, 0, + std::span(), std::span(), - nullptr, + std::span(), std::span(mso_sptFlowChartInputOutputTextRect), 21600, 21600, MIN_INT32, MIN_INT32, @@ -5004,9 +5004,9 @@ const SvxMSDffTextRectangles mso_sptFlowChartPredefinedProcessTextRect[] = const mso_CustomShape msoFlowChartPredefinedProcess = { std::span(mso_sptFlowChartPredefinedProcessVert), - const_cast(mso_sptFlowChartPredefinedProcessSegm), sizeof( mso_sptFlowChartPredefinedProcessSegm ) >> 1, + std::span(mso_sptFlowChartPredefinedProcessSegm), std::span(), - nullptr, + std::span(), std::span(mso_sptFlowChartPredefinedProcessTextRect), 21600, 21600, MIN_INT32, MIN_INT32, @@ -5035,9 +5035,9 @@ const SvxMSDffTextRectangles mso_sptFlowChartInternalStorageTextRect[] = const mso_CustomShape msoFlowChartInternalStorage = { std::span(mso_sptFlowChartInternalStorageVert), - const_cast(mso_sptFlowChartInternalStorageSegm), sizeof( mso_sptFlowChartInternalStorageSegm ) >> 1, + std::span(mso_sptFlowChartInternalStorageSegm), std::span(), - nullptr, + std::span(), std::span(mso_sptFlowChartInternalStorageTextRect), 21600, 21600, MIN_INT32, MIN_INT32, @@ -5066,9 +5066,9 @@ const SvxMSDffVertPair mso_sptFlowChartDocumentGluePoints[] = const mso_CustomShape msoFlowChartDocument = { std::span(mso_sptFlowChartDocumentVert), - const_cast(mso_sptFlowChartDocumentSegm), sizeof( mso_sptFlowChartDocumentSegm ) >> 1, + std::span(mso_sptFlowChartDocumentSegm), std::span(), - nullptr, + std::span(), std::span(mso_sptFlowChartDocumentTextRect), 21600, 21600, MIN_INT32, MIN_INT32, @@ -5105,9 +5105,9 @@ const SvxMSDffVertPair mso_sptFlowChartMultidocumentGluePoints[] = const mso_CustomShape msoFlowChartMultidocument = { std::span(mso_sptFlowChartMultidocumentVert), - const_cast(mso_sptFlowChartMultidocumentSegm), sizeof( mso_sptFlowChartMultidocumentSegm ) >> 1, + std::span(mso_sptFlowChartMultidocumentSegm), std::span(), - nullptr, + std::span(), std::span(mso_sptFlowChartMultidocumentTextRect), 21600, 21600, MIN_INT32, MIN_INT32, @@ -5131,9 +5131,9 @@ const SvxMSDffTextRectangles mso_sptFlowChartTerminatorTextRect[] = const mso_CustomShape msoFlowChartTerminator = { std::span(mso_sptFlowChartTerminatorVert), - const_cast(mso_sptFlowChartTerminatorSegm), sizeof( mso_sptFlowChartTerminatorSegm ) >> 1, + std::span(mso_sptFlowChartTerminatorSegm), std::span(), - nullptr, + std::span(), std::span(mso_sptFlowChartTerminatorTextRect), 21600, 21600, MIN_INT32, MIN_INT32, @@ -5153,9 +5153,9 @@ const SvxMSDffTextRectangles mso_sptFlowChartPreparationTextRect[] = const mso_CustomShape msoFlowChartPreparation = { std::span(mso_sptFlowChartPreparationVert), - nullptr, 0, + std::span(), std::span(), - nullptr, + std::span(), std::span(mso_sptFlowChartPreparationTextRect), 21600, 21600, MIN_INT32, MIN_INT32, @@ -5178,9 +5178,9 @@ const SvxMSDffVertPair mso_sptFlowChartManualInputGluePoints[] = const mso_CustomShape msoFlowChartManualInput = { std::span(mso_sptFlowChartManualInputVert), - nullptr, 0, + std::span(), std::span(), - nullptr, + std::span(), std::span(mso_sptFlowChartManualInputTextRect), 21600, 21600, MIN_INT32, MIN_INT32, @@ -5203,9 +5203,9 @@ const SvxMSDffVertPair mso_sptFlowChartManualOperationGluePoints[] = const mso_CustomShape msoFlowChartManualOperation = { std::span(mso_sptFlowChartManualOperationVert), - nullptr, 0, + std::span(), std::span(), - nullptr, + std::span(), std::span(mso_sptFlowChartManualOperationTextRect), 21600, 21600, MIN_INT32, MIN_INT32, @@ -5228,9 +5228,9 @@ const SvxMSDffTextRectangles mso_sptFlowChartConnectorTextRect[] = const mso_CustomShape msoFlowChartConnector = { std::span(mso_sptFlowChartConnectorVert), - const_cast(mso_sptFlowChartConnectorSegm), sizeof( mso_sptFlowChartConnectorSegm ) >> 1, + std::span(mso_sptFlowChartConnectorSegm), std::span(), - nullptr, + std::span(), std::span(mso_sptFlowChartConnectorTextRect), 21600, 21600, MIN_INT32, MIN_INT32, @@ -5250,9 +5250,9 @@ const SvxMSDffTextRectangles mso_sptFlowChartOffpageConnectorTextRect[] = const mso_CustomShape msoFlowChartOffpageConnector = { std::span(mso_sptFlowChartOffpageConnectorVert), - nullptr, 0, + std::span(), std::span(), - nullptr, + std::span(), std::span(mso_sptFlowChartOffpageConnectorTextRect), 21600, 21600, MIN_INT32, MIN_INT32, @@ -5272,9 +5272,9 @@ const SvxMSDffTextRectangles mso_sptFlowChartPunchedCardTextRect[] = const mso_CustomShape msoFlowChartPunchedCard = { std::span(mso_sptFlowChartPunchedCardVert), - nullptr, 0, + std::span(), std::span(), - nullptr, + std::span(), std::span(mso_sptFlowChartPunchedCardTextRect), 21600, 21600, MIN_INT32, MIN_INT32, @@ -5310,9 +5310,9 @@ const SvxMSDffVertPair mso_sptFlowChartPunchedTapeGluePoints[] = const mso_CustomShape msoFlowChartPunchedTape = { std::span(mso_sptFlowChartPunchedTapeVert), - const_cast(mso_sptFlowChartPunchedTapeSegm), sizeof( mso_sptFlowChartPunchedTapeSegm ) >> 1, + std::span(mso_sptFlowChartPunchedTapeSegm), std::span(), - nullptr, + std::span(), std::span(mso_sptFlowChartPunchedTapeTextRect), 21600, 21600, MIN_INT32, MIN_INT32, @@ -5343,9 +5343,9 @@ const SvxMSDffTextRectangles mso_sptFlowChartSummingJunctionTextRect[] = const mso_CustomShape msoFlowChartSummingJunction = { std::span(mso_sptFlowChartSummingJunctionVert), - const_cast(mso_sptFlowChartSummingJunctionSegm), sizeof( mso_sptFlowChartSummingJunctionSegm ) >> 1, + std::span(mso_sptFlowChartSummingJunctionSegm), std::span(), - nullptr, + std::span(), std::span(mso_sptFlowChartSummingJunctionTextRect), 21600, 21600, MIN_INT32, MIN_INT32, @@ -5374,9 +5374,9 @@ const SvxMSDffTextRectangles mso_sptFlowChartOrTextRect[] = const mso_CustomShape msoFlowChartOr = { std::span(mso_sptFlowChartOrVert), - const_cast(mso_sptFlowChartOrSegm), sizeof( mso_sptFlowChartOrSegm ) >> 1, + std::span(mso_sptFlowChartOrSegm), std::span(), - nullptr, + std::span(), std::span(mso_sptFlowChartOrTextRect), 21600, 21600, MIN_INT32, MIN_INT32, @@ -5399,9 +5399,9 @@ const SvxMSDffVertPair mso_sptFlowChartCollateGluePoints[] = const mso_CustomShape msoFlowChartCollate = { std::span(mso_sptFlowChartCollateVert), - nullptr, 0, + std::span(), std::span(), - nullptr, + std::span(), std::span(mso_sptFlowChartCollateTextRect), 21600, 21600, MIN_INT32, MIN_INT32, @@ -5427,9 +5427,9 @@ const SvxMSDffTextRectangles mso_sptFlowChartSortTextRect[] = const mso_CustomShape msoFlowChartSort = { std::span(mso_sptFlowChartSortVert), - const_cast(mso_sptFlowChartSortSegm), sizeof( mso_sptFlowChartSortSegm ) >> 1, + std::span(mso_sptFlowChartSortSegm), std::span(), - nullptr, + std::span(), std::span(mso_sptFlowChartSortTextRect), 21600, 21600, MIN_INT32, MIN_INT32, @@ -5452,9 +5452,9 @@ const SvxMSDffVertPair mso_sptFlowChartExtractGluePoints[] = const mso_CustomShape msoFlowChartExtract = { std::span(mso_sptFlowChartExtractVert), - nullptr, 0, + std::span(), std::span(), - nullptr, + std::span(), std::span(mso_sptFlowChartExtractTextRect), 21600, 21600, MIN_INT32, MIN_INT32, @@ -5473,9 +5473,9 @@ const SvxMSDffTextRectangles mso_sptFlowChartMergeTextRect[] = const mso_CustomShape msoFlowChartMerge = { std::span(mso_sptFlowChartMergeVert), - nullptr, 0, + std::span(), std::span(), - nullptr, + std::span(), std::span(mso_sptFlowChartMergeTextRect), 21600, 21600, MIN_INT32, MIN_INT32, @@ -5503,9 +5503,9 @@ const SvxMSDffVertPair mso_sptFlowChartOnlineStorageGluePoints[] = const mso_CustomShape msoFlowChartOnlineStorage = { std::span(mso_sptFlowChartOnlineStorageVert), - const_cast(mso_sptFlowChartOnlineStorageSegm), sizeof( mso_sptFlowChartOnlineStorageSegm ) >> 1, + std::span(mso_sptFlowChartOnlineStorageSegm), std::span(), - nullptr, + std::span(), std::span(mso_sptFlowChartOnlineStorageTextRect), 21600, 21600, MIN_INT32, MIN_INT32, @@ -5529,9 +5529,9 @@ const SvxMSDffTextRectangles mso_sptFlowChartDelayTextRect[] = const mso_CustomShape msoFlowChartDelay = { std::span(mso_sptFlowChartDelayVert), - const_cast(mso_sptFlowChartDelaySegm), sizeof( mso_sptFlowChartDelaySegm ) >> 1, + std::span(mso_sptFlowChartDelaySegm), std::span(), - nullptr, + std::span(), std::span(mso_sptFlowChartDelayTextRect), 21600, 21600, MIN_INT32, MIN_INT32, @@ -5558,9 +5558,9 @@ const SvxMSDffTextRectangles mso_sptFlowChartMagneticTapeTextRect[] = const mso_CustomShape msoFlowChartMagneticTape = { std::span(mso_sptFlowChartMagneticTapeVert), - const_cast(mso_sptFlowChartMagneticTapeSegm), sizeof( mso_sptFlowChartMagneticTapeSegm ) >> 1, + std::span(mso_sptFlowChartMagneticTapeSegm), std::span(), - nullptr, + std::span(), std::span(mso_sptFlowChartMagneticTapeTextRect), 21600, 21600, MIN_INT32, MIN_INT32, @@ -5591,9 +5591,9 @@ const SvxMSDffVertPair mso_sptFlowChartMagneticDiskGluePoints[] = const mso_CustomShape msoFlowChartMagneticDisk = { std::span(mso_sptFlowChartMagneticDiskVert), - const_cast(mso_sptFlowChartMagneticDiskSegm), sizeof( mso_sptFlowChartMagneticDiskSegm ) >> 1, + std::span(mso_sptFlowChartMagneticDiskSegm), std::span(), - nullptr, + std::span(), std::span(mso_sptFlowChartMagneticDiskTextRect), 21600, 21600, MIN_INT32, MIN_INT32, @@ -5624,9 +5624,9 @@ const SvxMSDffVertPair mso_sptFlowChartMagneticDrumGluePoints[] = const mso_CustomShape msoFlowChartMagneticDrum = { std::span(mso_sptFlowChartMagneticDrumVert), - const_cast(mso_sptFlowChartMagneticDrumSegm), sizeof( mso_sptFlowChartMagneticDrumSegm ) >> 1, + std::span(mso_sptFlowChartMagneticDrumSegm), std::span(), - nullptr, + std::span(), std::span(mso_sptFlowChartMagneticDrumTextRect), 21600, 21600, MIN_INT32, MIN_INT32, @@ -5650,9 +5650,9 @@ const SvxMSDffTextRectangles mso_sptFlowChartDisplayTextRect[] = const mso_CustomShape msoFlowChartDisplay = { std::span(mso_sptFlowChartDisplayVert), - const_cast(mso_sptFlowChartDisplaySegm), sizeof( mso_sptFlowChartDisplaySegm ) >> 1, + std::span(mso_sptFlowChartDisplaySegm), std::span(), - nullptr, + std::span(), std::span(mso_sptFlowChartDisplayTextRect), 21600, 21600, MIN_INT32, MIN_INT32, @@ -5743,9 +5743,9 @@ const SvxMSDffHandle mso_sptCalloutHandle[] = const mso_CustomShape msoWedgeRectCallout = { std::span(mso_sptWedgeRectCalloutVert), - nullptr, 0, + std::span(), std::span(mso_sptWedgeRectCalloutCalc), - const_cast(mso_sptWedgeRectCalloutDefault), + std::span(mso_sptWedgeRectCalloutDefault), std::span(mso_sptWedgeRectCalloutTextRect), 21600, 21600, MIN_INT32, MIN_INT32, @@ -5779,9 +5779,9 @@ const SvxMSDffTextRectangles mso_sptWedgeRRectCalloutTextRect[] = const mso_CustomShape msoWedgeRRectCallout = { std::span(mso_sptWedgeRRectCalloutVert), - const_cast(mso_sptWedgeRRectCalloutSegm), sizeof( mso_sptWedgeRRectCalloutSegm ) >> 1, + std::span(mso_sptWedgeRRectCalloutSegm), std::span(mso_sptWedgeRectCalloutCalc), - const_cast(mso_sptWedgeRectCalloutDefault), + std::span(mso_sptWedgeRectCalloutDefault), std::span(mso_sptWedgeRRectCalloutTextRect), 21600, 21600, MIN_INT32, MIN_INT32, @@ -5818,9 +5818,9 @@ const SvxMSDffTextRectangles mso_sptBalloonTextRect[] = const mso_CustomShape msoBalloon = { std::span(mso_sptBalloonVert), - const_cast(mso_sptBalloonSegm), sizeof( mso_sptBalloonSegm ) >> 1, + std::span(mso_sptBalloonSegm), std::span(mso_sptWedgeRectCalloutCalc), - const_cast(mso_sptWedgeRectCalloutDefault), + std::span(mso_sptWedgeRectCalloutDefault), std::span(mso_sptBalloonTextRect), 21600, 21600, MIN_INT32, MIN_INT32, @@ -5877,9 +5877,9 @@ const SvxMSDffTextRectangles mso_sptWedgeEllipseCalloutTextRect[] = const mso_CustomShape msoWedgeEllipseCallout = { std::span(mso_sptWedgeEllipseCalloutVert), - const_cast(mso_sptWedgeEllipseCalloutSegm), sizeof( mso_sptWedgeEllipseCalloutSegm ) >> 1, + std::span(mso_sptWedgeEllipseCalloutSegm), std::span(mso_sptWedgeEllipseCalloutCalc), - const_cast(mso_sptWedgeEllipseCalloutDefault), + std::span(mso_sptWedgeEllipseCalloutDefault), std::span(mso_sptWedgeEllipseCalloutTextRect), 21600, 21600, MIN_INT32, MIN_INT32, @@ -5982,9 +5982,9 @@ const SvxMSDffTextRectangles mso_sptCloudCalloutTextRect[] = const mso_CustomShape msoCloudCallout = { std::span(mso_sptCloudCalloutVert), - const_cast(mso_sptCloudCalloutSegm), sizeof( mso_sptCloudCalloutSegm ) >> 1, + std::span(mso_sptCloudCalloutSegm), std::span(mso_sptCloudCalloutCalc), - const_cast(mso_sptCloudCalloutDefault), + std::span(mso_sptCloudCalloutDefault), std::span(mso_sptCloudCalloutTextRect), 21600, 21600, MIN_INT32, MIN_INT32, @@ -6060,9 +6060,9 @@ const SvxMSDffTextRectangles mso_sptWaveTextRect[] = const mso_CustomShape msoWave = { std::span(mso_sptWaveVert), - const_cast(mso_sptWaveSegm), sizeof( mso_sptWaveSegm ) >> 1, + std::span(mso_sptWaveSegm), std::span(mso_sptWaveCalc), - const_cast(mso_sptWaveDefault), + std::span(mso_sptWaveDefault), std::span(mso_sptWaveTextRect), 21600, 21600, MIN_INT32, MIN_INT32, @@ -6142,9 +6142,9 @@ const SvxMSDffTextRectangles mso_sptDoubleWaveTextRect[] = const mso_CustomShape msoDoubleWave = { std::span(mso_sptDoubleWaveVert), - const_cast(mso_sptDoubleWaveSegm), sizeof( mso_sptDoubleWaveSegm ) >> 1, + std::span(mso_sptDoubleWaveSegm), std::span(mso_sptDoubleWaveCalc), - const_cast(mso_sptDoubleWaveDefault), + std::span(mso_sptDoubleWaveDefault), std::span(mso_sptDoubleWaveTextRect), 21600, 21600, MIN_INT32, MIN_INT32, @@ -6258,9 +6258,9 @@ const SvxMSDffHandle mso_sptTextPlainTextHandle[] = const mso_CustomShape msoTextPlainText = { std::span(mso_sptTextPlainTextVert), - const_cast(mso_sptTextPlainTextSegm), sizeof( mso_sptTextPlainTextSegm ) >> 1, + std::span(mso_sptTextPlainTextSegm), std::span(mso_sptTextPlainTextCalc), - const_cast(mso_sptDefault10800), + std::span(mso_sptDefault10800), std::span(mso_sptFontWorkTextRect), 21600, 21600, MIN_INT32, MIN_INT32, @@ -6295,9 +6295,9 @@ const SvxMSDffHandle mso_sptTextStopHandle[] = const mso_CustomShape msoTextStop = { std::span(mso_sptTextStopVert), - const_cast(mso_sptTextStopSegm), sizeof( mso_sptTextStopSegm ) >> 1, + std::span(mso_sptTextStopSegm), std::span(mso_sptTextStopCalc), - const_cast(mso_sptTextStopDefault), + std::span(mso_sptTextStopDefault), std::span(mso_sptFontWorkTextRect), 21600, 21600, MIN_INT32, MIN_INT32, @@ -6326,9 +6326,9 @@ const SvxMSDffHandle mso_sptTextTriangleHandle[] = const mso_CustomShape msoTextTriangle = { std::span(mso_sptTextTriangleVert), - const_cast(mso_sptTextTriangleSegm), sizeof( mso_sptTextTriangleSegm ) >> 1, + std::span(mso_sptTextTriangleSegm), std::span(mso_sptTextTriangleCalc), - const_cast(mso_sptDefault10800), + std::span(mso_sptDefault10800), std::span(mso_sptFontWorkTextRect), 21600, 21600, MIN_INT32, MIN_INT32, @@ -6347,9 +6347,9 @@ const sal_uInt16 mso_sptTextTriangleInvertedSegm[] = const mso_CustomShape msoTextTriangleInverted = { std::span(mso_sptTextTriangleInvertedVert), - const_cast(mso_sptTextTriangleInvertedSegm), sizeof( mso_sptTextTriangleInvertedSegm ) >> 1, + std::span(mso_sptTextTriangleInvertedSegm), std::span(mso_sptTextTriangleCalc), - const_cast(mso_sptDefault10800), + std::span(mso_sptDefault10800), std::span(mso_sptFontWorkTextRect), 21600, 21600, MIN_INT32, MIN_INT32, @@ -6379,9 +6379,9 @@ const SvxMSDffHandle mso_sptTextChevronHandle[] = const mso_CustomShape msoTextChevron = { std::span(mso_sptTextChevronVert), - const_cast(mso_sptTextChevronSegm), sizeof( mso_sptTextChevronSegm ) >> 1, + std::span(mso_sptTextChevronSegm), std::span(mso_sptTextChevronCalc), - const_cast(mso_sptDefault5400), + std::span(mso_sptDefault5400), std::span(mso_sptFontWorkTextRect), 21600, 21600, MIN_INT32, MIN_INT32, @@ -6411,9 +6411,9 @@ const SvxMSDffHandle mso_sptTextChevronInvertedHandle[] = const mso_CustomShape msoTextChevronInverted = { std::span(mso_sptTextChevronInvertedVert), - const_cast(mso_sptTextChevronInvertedSegm), sizeof( mso_sptTextChevronInvertedSegm ) >> 1, + std::span(mso_sptTextChevronInvertedSegm), std::span(mso_sptTextChevronInvertedCalc), - const_cast(mso_sptDefault16200), + std::span(mso_sptDefault16200), std::span(mso_sptFontWorkTextRect), 21600, 21600, MIN_INT32, MIN_INT32, @@ -6452,9 +6452,9 @@ const SvxMSDffHandle mso_sptTextRingInsideHandle[] = const mso_CustomShape msoTextRingInside = { std::span(mso_sptTextRingInsideVert), - const_cast(mso_sptTextRingInsideSegm), sizeof( mso_sptTextRingInsideSegm ) >> 1, + std::span(mso_sptTextRingInsideSegm), std::span(mso_sptTextRingInsideCalc), - const_cast(mso_sptDefault13500), + std::span(mso_sptDefault13500), std::span(mso_sptFontWorkTextRect), 21600, 21600, MIN_INT32, MIN_INT32, @@ -6487,9 +6487,9 @@ const SvxMSDffHandle mso_sptTextRingOutsideHandle[] = const mso_CustomShape msoTextRingOutside = { std::span(mso_sptTextRingOutsideVert), - const_cast(mso_sptTextRingOutsideSegm), sizeof( mso_sptTextRingOutsideSegm ) >> 1, + std::span(mso_sptTextRingOutsideSegm), std::span(mso_sptTextRingOutsideCalc), - const_cast(mso_sptDefault13500), + std::span(mso_sptDefault13500), std::span(mso_sptFontWorkTextRect), 21600, 21600, MIN_INT32, MIN_INT32, @@ -6519,9 +6519,9 @@ const SvxMSDffHandle mso_sptTextFadeRightHandle[] = const mso_CustomShape msoTextFadeRight = { std::span(mso_sptTextFadeRightVert), - const_cast(mso_sptTextFadeSegm), sizeof( mso_sptTextFadeSegm ) >> 1, + std::span(mso_sptTextFadeSegm), std::span(mso_sptTextFadeCalc), - const_cast(mso_sptDefault7200), + std::span(mso_sptDefault7200), std::span(mso_sptFontWorkTextRect), 21600, 21600, MIN_INT32, MIN_INT32, @@ -6541,9 +6541,9 @@ const SvxMSDffHandle mso_sptTextFadeLeftHandle[] = const mso_CustomShape msoTextFadeLeft = { std::span(mso_sptTextFadeLeftVert), - const_cast(mso_sptTextFadeSegm), sizeof( mso_sptTextFadeSegm ) >> 1, + std::span(mso_sptTextFadeSegm), std::span(mso_sptTextFadeCalc), - const_cast(mso_sptDefault7200), + std::span(mso_sptDefault7200), std::span(mso_sptFontWorkTextRect), 21600, 21600, MIN_INT32, MIN_INT32, @@ -6563,9 +6563,9 @@ const SvxMSDffHandle mso_sptTextFadeUpHandle[] = const mso_CustomShape msoTextFadeUp = { std::span(mso_sptTextFadeUpVert), - const_cast(mso_sptTextFadeSegm), sizeof( mso_sptTextFadeSegm ) >> 1, + std::span(mso_sptTextFadeSegm), std::span(mso_sptTextFadeCalc), - const_cast(mso_sptDefault7200), + std::span(mso_sptDefault7200), std::span(mso_sptFontWorkTextRect), 21600, 21600, MIN_INT32, MIN_INT32, @@ -6585,9 +6585,9 @@ const SvxMSDffHandle mso_sptTextFadeDownHandle[] = const mso_CustomShape msoTextFadeDown = { std::span(mso_sptTextFadeDownVert), - const_cast(mso_sptTextFadeSegm), sizeof( mso_sptTextFadeSegm ) >> 1, + std::span(mso_sptTextFadeSegm), std::span(mso_sptTextFadeCalc), - const_cast(mso_sptDefault7200), + std::span(mso_sptDefault7200), std::span(mso_sptFontWorkTextRect), 21600, 21600, MIN_INT32, MIN_INT32, @@ -6607,9 +6607,9 @@ const SvxMSDffHandle mso_sptTextSlantUpHandle[] = const mso_CustomShape msoTextSlantUp = { std::span(mso_sptTextSlantUpVert), - const_cast(mso_sptTextFadeSegm), sizeof( mso_sptTextFadeSegm ) >> 1, + std::span(mso_sptTextFadeSegm), std::span(mso_sptTextFadeCalc), - const_cast(mso_sptDefault12000), + std::span(mso_sptDefault12000), std::span(mso_sptFontWorkTextRect), 21600, 21600, MIN_INT32, MIN_INT32, @@ -6629,9 +6629,9 @@ const SvxMSDffHandle mso_sptTextSlantDownHandle[] = const mso_CustomShape msoTextSlantDown = { std::span(mso_sptTextSlantDownVert), - const_cast(mso_sptTextFadeSegm), sizeof( mso_sptTextFadeSegm ) >> 1, + std::span(mso_sptTextFadeSegm), std::span(mso_sptTextFadeCalc), - const_cast(mso_sptDefault12000), + std::span(mso_sptDefault12000), std::span(mso_sptFontWorkTextRect), 21600, 21600, MIN_INT32, MIN_INT32, @@ -6657,9 +6657,9 @@ const SvxMSDffHandle mso_sptTextCascadeUpHandle[] = const mso_CustomShape msoTextCascadeUp = { std::span(mso_sptTextCascadeUpVert), - const_cast(mso_sptTextFadeSegm), sizeof( mso_sptTextFadeSegm ) >> 1, + std::span(mso_sptTextFadeSegm), std::span(mso_sptTextCascadeCalc), - const_cast(mso_sptDefault9600), + std::span(mso_sptDefault9600), std::span(mso_sptFontWorkTextRect), 21600, 21600, MIN_INT32, MIN_INT32, @@ -6679,9 +6679,9 @@ const SvxMSDffHandle mso_sptTextCascadeDownHandle[] = const mso_CustomShape msoTextCascadeDown = { std::span(mso_sptTextCascadeDownVert), - const_cast(mso_sptTextFadeSegm), sizeof( mso_sptTextFadeSegm ) >> 1, + std::span(mso_sptTextFadeSegm), std::span(mso_sptTextCascadeCalc), - const_cast(mso_sptDefault9600), + std::span(mso_sptDefault9600), std::span(mso_sptFontWorkTextRect), 21600, 21600, MIN_INT32, MIN_INT32, @@ -6717,9 +6717,9 @@ const sal_Int32 mso_sptTextArchUpCurveDefault[] = const mso_CustomShape msoTextArchUpCurve = { std::span(mso_sptTextArchUpCurveVert), - const_cast(mso_sptTextArchUpCurveSegm), sizeof( mso_sptTextArchUpCurveSegm ) >> 1, + std::span(mso_sptTextArchUpCurveSegm), std::span(mso_sptTextArchCurveCalc), - const_cast(mso_sptTextArchUpCurveDefault), + std::span(mso_sptTextArchUpCurveDefault), std::span(mso_sptFontWorkTextRect), 21600, 21600, MIN_INT32, MIN_INT32, @@ -6747,9 +6747,9 @@ const sal_Int32 mso_sptTextArchDownCurveDefault[] = const mso_CustomShape msoTextArchDownCurve = { std::span(mso_sptTextArchDownCurveVert), - const_cast(mso_sptTextArchDownCurveSegm), sizeof( mso_sptTextArchDownCurveSegm ) >> 1, + std::span(mso_sptTextArchDownCurveSegm), std::span(mso_sptTextArchCurveCalc), - const_cast(mso_sptTextArchDownCurveDefault), + std::span(mso_sptTextArchDownCurveDefault), std::span(mso_sptFontWorkTextRect), 21600, 21600, MIN_INT32, MIN_INT32, @@ -6785,9 +6785,9 @@ const sal_Int32 mso_sptTextCircleCurveDefault[] = const mso_CustomShape msoTextCircleCurve = { std::span(mso_sptTextCircleCurveVert), - const_cast(mso_sptTextCircleCurveSegm), sizeof( mso_sptTextCircleCurveSegm ) >> 1, + std::span(mso_sptTextCircleCurveSegm), std::span(mso_sptTextCircleCurveCalc), - const_cast(mso_sptTextCircleCurveDefault), + std::span(mso_sptTextCircleCurveDefault), std::span(mso_sptFontWorkTextRect), 21600, 21600, MIN_INT32, MIN_INT32, @@ -6828,9 +6828,9 @@ const sal_Int32 mso_sptTextButtonCurveDefault[] = const mso_CustomShape msoTextButtonCurve = { std::span(mso_sptTextButtonCurveVert), - const_cast(mso_sptTextButtonCurveSegm), sizeof( mso_sptTextButtonCurveSegm ) >> 1, + std::span(mso_sptTextButtonCurveSegm), std::span(mso_sptTextButtonCurveCalc), - const_cast(mso_sptTextButtonCurveDefault), + std::span(mso_sptTextButtonCurveDefault), std::span(mso_sptFontWorkTextRect), 21600, 21600, MIN_INT32, MIN_INT32, @@ -6874,9 +6874,9 @@ const sal_Int32 mso_sptTextArchUpPourDefault[] = const mso_CustomShape msoTextArchUpPour = { std::span(mso_sptTextArchUpPourVert), - const_cast(mso_sptTextArchUpPourSegm), sizeof( mso_sptTextArchUpPourSegm ) >> 1, + std::span(mso_sptTextArchUpPourSegm), std::span(mso_sptTextArchPourCalc), - const_cast(mso_sptTextArchUpPourDefault), + std::span(mso_sptTextArchUpPourDefault), std::span(mso_sptFontWorkTextRect), 21600, 21600, MIN_INT32, MIN_INT32, @@ -6900,9 +6900,9 @@ const sal_Int32 mso_sptTextArchDownPourDefault[] = const mso_CustomShape msoTextArchDownPour = { std::span(mso_sptTextArchDownPourVert), - const_cast(mso_sptTextArchDownPourSegm), sizeof( mso_sptTextArchDownPourSegm ) >> 1, + std::span(mso_sptTextArchDownPourSegm), std::span(mso_sptTextArchPourCalc), - const_cast(mso_sptTextArchDownPourDefault), + std::span(mso_sptTextArchDownPourDefault), std::span(mso_sptFontWorkTextRect), 21600, 21600, MIN_INT32, MIN_INT32, @@ -6947,9 +6947,9 @@ const sal_Int32 mso_sptTextCirclePourDefault[] = const mso_CustomShape msoTextCirclePour = { std::span(mso_sptTextCirclePourVert), - const_cast(mso_sptTextCirclePourSegm), sizeof( mso_sptTextCirclePourSegm ) >> 1, + std::span(mso_sptTextCirclePourSegm), std::span(mso_sptTextCirclePourCalc), - const_cast(mso_sptTextCirclePourDefault), + std::span(mso_sptTextCirclePourDefault), std::span(mso_sptFontWorkTextRect), 21600, 21600, MIN_INT32, MIN_INT32, @@ -7015,9 +7015,9 @@ const sal_Int32 mso_sptTextButtonPourDefault[] = const mso_CustomShape msoTextButtonPour = { std::span(mso_sptTextButtonPourVert), - const_cast(mso_sptTextButtonPourSegm), sizeof( mso_sptTextButtonPourSegm ) >> 1, + std::span(mso_sptTextButtonPourSegm), std::span(mso_sptTextButtonPourCalc), - const_cast(mso_sptTextButtonPourDefault), + std::span(mso_sptTextButtonPourDefault), std::span(mso_sptFontWorkTextRect), 21600, 21600, MIN_INT32, MIN_INT32, @@ -7055,9 +7055,9 @@ const sal_Int32 mso_sptTextCurveUpDefault[] = const mso_CustomShape msoTextCurveUp = { std::span(mso_sptTextCurveUpVert), - const_cast(mso_sptTextCurveUpSegm), sizeof( mso_sptTextCurveUpSegm ) >> 1, + std::span(mso_sptTextCurveUpSegm), std::span(mso_sptTextCurveUpCalc), - const_cast(mso_sptTextCurveUpDefault), + std::span(mso_sptTextCurveUpDefault), std::span(mso_sptFontWorkTextRect), 21600, 21600, MIN_INT32, MIN_INT32, @@ -7081,9 +7081,9 @@ const SvxMSDffHandle mso_sptTextCurveDownHandle[] = const mso_CustomShape msoTextCurveDown = { std::span(mso_sptTextCurveDownVert), - const_cast(mso_sptTextCurveUpSegm), sizeof( mso_sptTextCurveUpSegm ) >> 1, + std::span(mso_sptTextCurveUpSegm), std::span(mso_sptTextCurveUpCalc), - const_cast(mso_sptTextCurveUpDefault), + std::span(mso_sptTextCurveUpDefault), std::span(mso_sptFontWorkTextRect), 21600, 21600, MIN_INT32, MIN_INT32, @@ -7121,9 +7121,9 @@ const sal_Int32 mso_sptTextCanUpDefault[] = const mso_CustomShape msoTextCanUp = { std::span(mso_sptTextCanUpVert), - const_cast(mso_sptTextCanUpSegm), sizeof( mso_sptTextCanUpSegm ) >> 1, + std::span(mso_sptTextCanUpSegm), std::span(mso_sptTextCanUpCalc), - const_cast(mso_sptTextCanUpDefault), + std::span(mso_sptTextCanUpDefault), std::span(mso_sptFontWorkTextRect), 21600, 21600, MIN_INT32, MIN_INT32, @@ -7154,9 +7154,9 @@ const sal_Int32 mso_sptTextCanDownDefault[] = const mso_CustomShape msoTextCanDown = { std::span(mso_sptTextCanDownVert), - const_cast(mso_sptTextCanUpSegm), sizeof( mso_sptTextCanUpSegm ) >> 1, + std::span(mso_sptTextCanUpSegm), std::span(mso_sptTextCanDownCalc), - const_cast(mso_sptTextCanDownDefault), + std::span(mso_sptTextCanDownDefault), std::span(mso_sptFontWorkTextRect), 21600, 21600, MIN_INT32, MIN_INT32, @@ -7188,9 +7188,9 @@ const sal_Int32 mso_sptTextInflateDefault[] = const mso_CustomShape msoTextInflate = { std::span(mso_sptTextInflateVert), - const_cast(mso_sptTextCanUpSegm), sizeof( mso_sptTextCanUpSegm ) >> 1, + std::span(mso_sptTextCanUpSegm), std::span(mso_sptTextInflateCalc), - const_cast(mso_sptTextInflateDefault), + std::span(mso_sptTextInflateDefault), std::span(mso_sptFontWorkTextRect), 21600, 21600, MIN_INT32, MIN_INT32, @@ -7218,9 +7218,9 @@ const SvxMSDffHandle mso_sptTextDeflateHandle[] = const mso_CustomShape msoTextDeflate = { std::span(mso_sptTextDeflateVert), - const_cast(mso_sptTextCanUpSegm), sizeof( mso_sptTextCanUpSegm ) >> 1, + std::span(mso_sptTextCanUpSegm), std::span(mso_sptTextDeflateCalc), - const_cast(mso_sptDefault8100), + std::span(mso_sptDefault8100), std::span(mso_sptFontWorkTextRect), 21600, 21600, MIN_INT32, MIN_INT32, @@ -7257,9 +7257,9 @@ const sal_Int32 mso_sptTextInflateBottomDefault[] = const mso_CustomShape msoTextInflateBottom = { std::span(mso_sptTextInflateBottomVert), - const_cast(mso_sptTextInflateBottomSegm), sizeof( mso_sptTextInflateBottomSegm ) >> 1, + std::span(mso_sptTextInflateBottomSegm), std::span(mso_sptTextInflateBottomCalc), - const_cast(mso_sptTextInflateBottomDefault), + std::span(mso_sptTextInflateBottomDefault), std::span(mso_sptFontWorkTextRect), 21600, 21600, MIN_INT32, MIN_INT32, @@ -7296,9 +7296,9 @@ const sal_Int32 mso_sptTextDeflateBottomDefault[] = const mso_CustomShape msoTextDeflateBottom = { std::span(mso_sptTextDeflateBottomVert), - const_cast(mso_sptTextDeflateBottomSegm), sizeof( mso_sptTextDeflateBottomSegm ) >> 1, + std::span(mso_sptTextDeflateBottomSegm), std::span(mso_sptTextDeflateBottomCalc), - const_cast(mso_sptTextDeflateBottomDefault), + std::span(mso_sptTextDeflateBottomDefault), std::span(mso_sptFontWorkTextRect), 21600, 21600, MIN_INT32, MIN_INT32, @@ -7333,9 +7333,9 @@ const sal_Int32 mso_sptTextInflateTopDefault[] = const mso_CustomShape msoTextInflateTop = { std::span(mso_sptTextInflateTopVert), - const_cast(mso_sptTextInflateTopSegm), sizeof( mso_sptTextInflateTopSegm ) >> 1, + std::span(mso_sptTextInflateTopSegm), std::span(mso_sptTextInflateTopCalc), - const_cast(mso_sptTextInflateTopDefault), + std::span(mso_sptTextInflateTopDefault), std::span(mso_sptFontWorkTextRect), 21600, 21600, MIN_INT32, MIN_INT32, @@ -7370,9 +7370,9 @@ const sal_Int32 mso_sptTextDeflateTopDefault[] = const mso_CustomShape msoTextDeflateTop = { std::span(mso_sptTextDeflateTopVert), - const_cast(mso_sptTextDeflateTopSegm), sizeof( mso_sptTextDeflateTopSegm ) >> 1, + std::span(mso_sptTextDeflateTopSegm), std::span(mso_sptTextDeflateTopCalc), - const_cast(mso_sptTextDeflateTopDefault), + std::span(mso_sptTextDeflateTopDefault), std::span(mso_sptFontWorkTextRect), 21600, 21600, MIN_INT32, MIN_INT32, @@ -7416,9 +7416,9 @@ const sal_Int32 mso_sptTextDeflateInflateDefault[] = const mso_CustomShape msoTextDeflateInflate = { std::span(mso_sptTextDeflateInflateVert), - const_cast(mso_sptTextDeflateInflateSegm), sizeof( mso_sptTextDeflateInflateSegm ) >> 1, + std::span(mso_sptTextDeflateInflateSegm), std::span(mso_sptTextDeflateInflateCalc), - const_cast(mso_sptTextDeflateInflateDefault), + std::span(mso_sptTextDeflateInflateDefault), std::span(mso_sptFontWorkTextRect), 21600, 21600, MIN_INT32, MIN_INT32, @@ -7470,9 +7470,9 @@ const sal_Int32 mso_sptTextDeflateInflateDeflateDefault[] = const mso_CustomShape msoTextDeflateInflateDeflate = { std::span(mso_sptTextDeflateInflateDeflateVert), - const_cast(mso_sptTextDeflateInflateDeflateSegm), sizeof( mso_sptTextDeflateInflateDeflateSegm ) >> 1, + std::span(mso_sptTextDeflateInflateDeflateSegm), std::span(mso_sptTextDeflateInflateDeflateCalc), - const_cast(mso_sptTextDeflateInflateDeflateDefault), + std::span(mso_sptTextDeflateInflateDeflateDefault), std::span(mso_sptFontWorkTextRect), 21600, 21600, MIN_INT32, MIN_INT32, @@ -7493,9 +7493,9 @@ const sal_uInt16 mso_sptTextWave1Segm[] = const mso_CustomShape msoTextWave1 = { std::span(mso_sptTextWave1Vert), - const_cast(mso_sptTextWave1Segm), sizeof( mso_sptTextWave1Segm ) >> 1, + std::span(mso_sptTextWave1Segm), std::span(mso_sptWaveCalc), - const_cast(mso_sptWaveDefault), + std::span(mso_sptWaveDefault), std::span(mso_sptFontWorkTextRect), 21600, 21600, MIN_INT32, MIN_INT32, @@ -7511,9 +7511,9 @@ const SvxMSDffVertPair mso_sptTextWave2Vert[] = // adjustment1 : 0 - 4459 const mso_CustomShape msoTextWave2 = { std::span(mso_sptTextWave2Vert), - const_cast(mso_sptTextWave1Segm), sizeof( mso_sptTextWave1Segm ) >> 1, + std::span(mso_sptTextWave1Segm), std::span(mso_sptWaveCalc), - const_cast(mso_sptWaveDefault), + std::span(mso_sptWaveDefault), std::span(mso_sptFontWorkTextRect), 21600, 21600, MIN_INT32, MIN_INT32, @@ -7534,9 +7534,9 @@ const sal_uInt16 mso_sptTextWave3Segm[] = const mso_CustomShape msoTextWave3 = { std::span(mso_sptTextWave3Vert), - const_cast(mso_sptTextWave3Segm), sizeof( mso_sptTextWave3Segm ) >> 1, + std::span(mso_sptTextWave3Segm), std::span(mso_sptDoubleWaveCalc), - const_cast(mso_sptDoubleWaveDefault), + std::span(mso_sptDoubleWaveDefault), std::span(mso_sptDoubleWaveTextRect), 21600, 21600, MIN_INT32, MIN_INT32, @@ -7552,9 +7552,9 @@ const SvxMSDffVertPair mso_sptTextWave4Vert[] = // adjustment1 : 0 - 2230 const mso_CustomShape msoTextWave4 = { std::span(mso_sptTextWave4Vert), - const_cast(mso_sptTextWave3Segm), sizeof( mso_sptTextWave3Segm ) >> 1, + std::span(mso_sptTextWave3Segm), std::span(mso_sptDoubleWaveCalc), - const_cast(mso_sptDoubleWaveDefault), + std::span(mso_sptDoubleWaveDefault), std::span(mso_sptDoubleWaveTextRect), 21600, 21600, MIN_INT32, MIN_INT32, @@ -7719,9 +7719,9 @@ const SvxMSDffCalculationData mso_sptCalloutCalc[] = const mso_CustomShape msoCallout90 = { std::span(mso_sptCalloutVert1), - const_cast(mso_sptCalloutSegm1b), sizeof( mso_sptCalloutSegm1b ) >> 1, + std::span(mso_sptCalloutSegm1b), std::span(mso_sptCalloutCalc), - const_cast(mso_sptCalloutDefault1), + std::span(mso_sptCalloutDefault1), std::span(), 21600, 21600, MIN_INT32, MIN_INT32, @@ -7731,9 +7731,9 @@ const mso_CustomShape msoCallout90 = const mso_CustomShape msoCallout1 = { std::span(mso_sptCalloutVert1), - const_cast(mso_sptCalloutSegm1b), sizeof( mso_sptCalloutSegm1b ) >> 1, + std::span(mso_sptCalloutSegm1b), std::span(mso_sptCalloutCalc), - const_cast(mso_sptCalloutDefault2), + std::span(mso_sptCalloutDefault2), std::span(), 21600, 21600, MIN_INT32, MIN_INT32, @@ -7743,9 +7743,9 @@ const mso_CustomShape msoCallout1 = const mso_CustomShape msoCallout2 = { std::span(mso_sptCallout2Verta), - const_cast(mso_sptCallout2Segm1b), sizeof( mso_sptCallout2Segm1b ) >> 1, + std::span(mso_sptCallout2Segm1b), std::span(mso_sptCalloutCalc), - const_cast(mso_sptCalloutDefault3), + std::span(mso_sptCalloutDefault3), std::span(), 21600, 21600, MIN_INT32, MIN_INT32, @@ -7755,9 +7755,9 @@ const mso_CustomShape msoCallout2 = const mso_CustomShape msoCallout3 = { std::span(mso_sptCallout3Verta), - const_cast(mso_sptCallout3Segm1b), sizeof( mso_sptCallout3Segm1b ) >> 1, + std::span(mso_sptCallout3Segm1b), std::span(mso_sptCalloutCalc), - const_cast(mso_sptCalloutDefault4), + std::span(mso_sptCalloutDefault4), std::span(), 21600, 21600, MIN_INT32, MIN_INT32, @@ -7767,9 +7767,9 @@ const mso_CustomShape msoCallout3 = const mso_CustomShape msoAccentCallout90 = { std::span(mso_sptCalloutVert1), - const_cast(mso_sptCalloutSegm1b), sizeof( mso_sptCalloutSegm1b ) >> 1, + std::span(mso_sptCalloutSegm1b), std::span(mso_sptCalloutCalc), - const_cast(mso_sptCalloutDefault1), + std::span(mso_sptCalloutDefault1), std::span(), 21600, 21600, MIN_INT32, MIN_INT32, @@ -7779,9 +7779,9 @@ const mso_CustomShape msoAccentCallout90 = const mso_CustomShape msoAccentCallout1 = { std::span(mso_sptCallout1Vert), - const_cast(mso_sptCallout1Segm1b), sizeof( mso_sptCallout1Segm1b ) >> 1, + std::span(mso_sptCallout1Segm1b), std::span(mso_sptCalloutCalc), - const_cast(mso_sptCalloutDefault2), + std::span(mso_sptCalloutDefault2), std::span(), 21600, 21600, MIN_INT32, MIN_INT32, @@ -7791,9 +7791,9 @@ const mso_CustomShape msoAccentCallout1 = const mso_CustomShape msoAccentCallout2 = { std::span(mso_sptCallout2Vertb), - const_cast(mso_sptCallout2Segm1d), sizeof( mso_sptCallout2Segm1d ) >> 1, + std::span(mso_sptCallout2Segm1d), std::span(mso_sptCalloutCalc), - const_cast(mso_sptCalloutDefault3), + std::span(mso_sptCalloutDefault3), std::span(), 21600, 21600, MIN_INT32, MIN_INT32, @@ -7803,9 +7803,9 @@ const mso_CustomShape msoAccentCallout2 = const mso_CustomShape msoAccentCallout3 = { std::span(mso_sptCallout3Vertb), - const_cast(mso_sptCallout3Segm1d), sizeof( mso_sptCallout3Segm1d ) >> 1, + std::span(mso_sptCallout3Segm1d), std::span(mso_sptCalloutCalc), - const_cast(mso_sptCalloutDefault4), + std::span(mso_sptCalloutDefault4), std::span(), 21600, 21600, MIN_INT32, MIN_INT32, @@ -7815,9 +7815,9 @@ const mso_CustomShape msoAccentCallout3 = const mso_CustomShape msoBorderCallout90 = { std::span(mso_sptCalloutVert1), - const_cast(mso_sptCalloutSegm1a), sizeof( mso_sptCalloutSegm1a ) >> 1, + std::span(mso_sptCalloutSegm1a), std::span(mso_sptCalloutCalc), - const_cast(mso_sptCalloutDefault1), + std::span(mso_sptCalloutDefault1), std::span(), 21600, 21600, MIN_INT32, MIN_INT32, @@ -7827,9 +7827,9 @@ const mso_CustomShape msoBorderCallout90 = const mso_CustomShape msoBorderCallout1 = { std::span(mso_sptCalloutVert1), - const_cast(mso_sptCalloutSegm1a), sizeof( mso_sptCalloutSegm1a ) >> 1, + std::span(mso_sptCalloutSegm1a), std::span(mso_sptCalloutCalc), - const_cast(mso_sptCalloutDefault2), + std::span(mso_sptCalloutDefault2), std::span(), 21600, 21600, MIN_INT32, MIN_INT32, @@ -7839,9 +7839,9 @@ const mso_CustomShape msoBorderCallout1 = const mso_CustomShape msoBorderCallout2 = { std::span(mso_sptCallout2Verta), - const_cast(mso_sptCallout2Segm1a), sizeof( mso_sptCallout2Segm1a ) >> 1, + std::span(mso_sptCallout2Segm1a), std::span(mso_sptCalloutCalc), - const_cast(mso_sptCalloutDefault3), + std::span(mso_sptCalloutDefault3), std::span(), 21600, 21600, MIN_INT32, MIN_INT32, @@ -7851,9 +7851,9 @@ const mso_CustomShape msoBorderCallout2 = const mso_CustomShape msoBorderCallout3 = { std::span(mso_sptCallout3Verta), - const_cast(mso_sptCallout3Segm1a), sizeof( mso_sptCallout3Segm1a ) >> 1, + std::span(mso_sptCallout3Segm1a), std::span(mso_sptCalloutCalc), - const_cast(mso_sptCalloutDefault4), + std::span(mso_sptCalloutDefault4), std::span(), 21600, 21600, MIN_INT32, MIN_INT32, @@ -7863,9 +7863,9 @@ const mso_CustomShape msoBorderCallout3 = const mso_CustomShape msoAccentBorderCallout90 = { std::span(mso_sptCalloutVert1), - const_cast(mso_sptCalloutSegm1a), sizeof( mso_sptCalloutSegm1a ) >> 1, + std::span(mso_sptCalloutSegm1a), std::span(mso_sptCalloutCalc), - const_cast(mso_sptCalloutDefault1), + std::span(mso_sptCalloutDefault1), std::span(), 21600, 21600, MIN_INT32, MIN_INT32, @@ -7875,9 +7875,9 @@ const mso_CustomShape msoAccentBorderCallout90 = const mso_CustomShape msoAccentBorderCallout1 = { std::span(mso_sptCallout1Vert), - const_cast(mso_sptCallout1Segm1a), sizeof( mso_sptCallout1Segm1a ) >> 1, + std::span(mso_sptCallout1Segm1a), std::span(mso_sptCalloutCalc), - const_cast(mso_sptCalloutDefault2), + std::span(mso_sptCalloutDefault2), std::span(), 21600, 21600, MIN_INT32, MIN_INT32, @@ -7887,9 +7887,9 @@ const mso_CustomShape msoAccentBorderCallout1 = const mso_CustomShape msoAccentBorderCallout2 = { std::span(mso_sptCallout2Vertb), - const_cast(mso_sptCallout2Segm1c), sizeof( mso_sptCallout2Segm1c ) >> 1, + std::span(mso_sptCallout2Segm1c), std::span(mso_sptCalloutCalc), - const_cast(mso_sptCalloutDefault3), + std::span(mso_sptCalloutDefault3), std::span(), 21600, 21600, MIN_INT32, MIN_INT32, @@ -7899,9 +7899,9 @@ const mso_CustomShape msoAccentBorderCallout2 = const mso_CustomShape msoAccentBorderCallout3 = { std::span(mso_sptCallout3Vertb), - const_cast(mso_sptCallout3Segm1c), sizeof( mso_sptCallout3Segm1c ) >> 1, + std::span(mso_sptCallout3Segm1c), std::span(mso_sptCalloutCalc), - const_cast(mso_sptCalloutDefault4), + std::span(mso_sptCalloutDefault4), std::span(), 21600, 21600, MIN_INT32, MIN_INT32, @@ -7920,9 +7920,9 @@ const sal_uInt16 mso_sptStraightConnector1Segm[] = const mso_CustomShape msoStraightConnector1 = { std::span(mso_sptStraightConnector1Vert), - const_cast(mso_sptStraightConnector1Segm), sizeof( mso_sptStraightConnector1Segm ) >> 1, + std::span(mso_sptStraightConnector1Segm), std::span(), - nullptr, + std::span(), std::span(), 21600, 21600, MIN_INT32, MIN_INT32, @@ -7941,9 +7941,9 @@ const sal_uInt16 mso_sptBentConnector2Segm[] = const mso_CustomShape msoBentConnector2 = { std::span(mso_sptBentConnector2Vert), - const_cast(mso_sptBentConnector2Segm), sizeof( mso_sptBentConnector2Segm ) >> 1, + std::span(mso_sptBentConnector2Segm), std::span(), - nullptr, + std::span(), std::span(), 21600, 21600, MIN_INT32, MIN_INT32, @@ -7975,9 +7975,9 @@ const SvxMSDffHandle mso_sptBentConnector3Handle[] = const mso_CustomShape msoBentConnector3 = { std::span(mso_sptBentConnector3Vert), - const_cast(mso_sptBentConnector3Segm), sizeof( mso_sptBentConnector3Segm ) >> 1, + std::span(mso_sptBentConnector3Segm), std::span(mso_sptBentConnector3Calc), - const_cast(mso_sptBentConnector3Default), + std::span(mso_sptBentConnector3Default), std::span(), 21600, 21600, MIN_INT32, MIN_INT32, @@ -8015,9 +8015,9 @@ const SvxMSDffHandle mso_sptBentConnector4Handle[] = const mso_CustomShape msoBentConnector4 = { std::span(mso_sptBentConnector4Vert), - const_cast(mso_sptBentConnector4Segm), sizeof( mso_sptBentConnector4Segm ) >> 1, + std::span(mso_sptBentConnector4Segm), std::span(mso_sptBentConnector4Calc), - const_cast(mso_sptBentConnector4Default), + std::span(mso_sptBentConnector4Default), std::span(), 21600, 21600, MIN_INT32, MIN_INT32, @@ -8060,9 +8060,9 @@ const SvxMSDffHandle mso_sptBentConnector5Handle[] = const mso_CustomShape msoBentConnector5 = { std::span(mso_sptBentConnector5Vert), - const_cast(mso_sptBentConnector5Segm), sizeof( mso_sptBentConnector5Segm ) >> 1, + std::span(mso_sptBentConnector5Segm), std::span(mso_sptBentConnector5Calc), - const_cast(mso_sptBentConnector5Default), + std::span(mso_sptBentConnector5Default), std::span(), 21600, 21600, MIN_INT32, MIN_INT32, @@ -8081,9 +8081,9 @@ const sal_uInt16 mso_sptCurvedConnector2Segm[] = const mso_CustomShape msoCurvedConnector2 = { std::span(mso_sptCurvedConnector2Vert), - const_cast(mso_sptCurvedConnector2Segm), sizeof( mso_sptCurvedConnector2Segm ) >> 1, + std::span(mso_sptCurvedConnector2Segm), std::span(), - nullptr, + std::span(), std::span(), 21600, 21600, MIN_INT32, MIN_INT32, @@ -8118,9 +8118,9 @@ const SvxMSDffHandle mso_sptCurvedConnector3Handle[] = const mso_CustomShape msoCurvedConnector3 = { std::span(mso_sptCurvedConnector3Vert), - const_cast(mso_sptCurvedConnector3Segm), sizeof( mso_sptCurvedConnector3Segm ) >> 1, + std::span(mso_sptCurvedConnector3Segm), std::span(mso_sptCurvedConnector3Calc), - const_cast(mso_sptCurvedConnector3Default), + std::span(mso_sptCurvedConnector3Default), std::span(), 21600, 21600, MIN_INT32, MIN_INT32, @@ -8171,9 +8171,9 @@ const SvxMSDffHandle mso_sptCurvedConnector4Handle[] = const mso_CustomShape msoCurvedConnector4 = { std::span(mso_sptCurvedConnector4Vert), - const_cast(mso_sptCurvedConnector4Segm), sizeof( mso_sptCurvedConnector4Segm ) >> 1, + std::span(mso_sptCurvedConnector4Segm), std::span(mso_sptCurvedConnector4Calc), - const_cast(mso_sptCurvedConnector4Default), + std::span(mso_sptCurvedConnector4Default), std::span(), 21600, 21600, MIN_INT32, MIN_INT32, @@ -8234,9 +8234,9 @@ const SvxMSDffHandle mso_sptCurvedConnector5Handle[] = const mso_CustomShape msoCurvedConnector5 = { std::span(mso_sptCurvedConnector5Vert), - const_cast(mso_sptCurvedConnector5Segm), sizeof( mso_sptCurvedConnector5Segm ) >> 1, + std::span(mso_sptCurvedConnector5Segm), std::span(mso_sptCurvedConnector5Calc), - const_cast(mso_sptCurvedConnector5Default), + std::span(mso_sptCurvedConnector5Default), std::span(), 21600, 21600, MIN_INT32, MIN_INT32, @@ -8295,9 +8295,9 @@ const sal_Int32 mso_sptTearDropDefault[] = const mso_CustomShape msoTearDrop = { std::span(mso_sptTearDropVert), - const_cast(mso_sptTearDropSegm), sizeof( mso_sptTearDropSegm ) >> 1, + std::span(mso_sptTearDropSegm), std::span(mso_sptTearDropCalc), - const_cast(mso_sptTearDropDefault), + std::span(mso_sptTearDropDefault), std::span(mso_sptTearDropTextRect), 21600, 21600, MIN_INT32, MIN_INT32, @@ -8351,9 +8351,9 @@ const SvxMSDffVertPair mso_sptSinusoidGluePoints[] = const mso_CustomShape msoSinusoid = { std::span(mso_sptSinusoidVert), // vertices - const_cast(mso_sptSinusoidSegm), sizeof(mso_sptSinusoidSegm) >> 1, // segments, count + std::span(mso_sptSinusoidSegm), // segments std::span(), // calculations (none) - nullptr, // default values (none) + std::span(), // default values (none) std::span(), // text area (default) 21600, 21600, // viewbox w, h (default) MIN_INT32, MIN_INT32, // stretch x, y (unset) diff --git a/svx/source/svdraw/svdoashp.cxx b/svx/source/svdraw/svdoashp.cxx index 56038c5f9711..0af41c392f2e 100644 --- a/svx/source/svdraw/svdoashp.cxx +++ b/svx/source/svdraw/svdoashp.cxx @@ -837,7 +837,7 @@ void SdrObjCustomShape::MergeDefaultAttributes( const OUString* pType ) } MSO_SPT eSpType = EnhancedCustomShapeTypeNames::Get( sShapeType ); - const sal_Int32* pDefData = nullptr; + std::span pDefData; const mso_CustomShape* pDefCustomShape = GetCustomShapeContent( eSpType ); if ( pDefCustomShape ) pDefData = pDefCustomShape->pDefData; @@ -851,11 +851,12 @@ void SdrObjCustomShape::MergeDefaultAttributes( const OUString* pType ) const uno::Any* pAny = aGeometryItem.GetPropertyValueByName( sAdjustmentValues ); if ( pAny ) *pAny >>= seqAdjustmentValues; - if ( pDefCustomShape && pDefData ) // now check if we have to default some adjustment values + if ( pDefCustomShape && !pDefData.empty() ) // now check if we have to default some adjustment values { // first check if there are adjustment values are to be appended sal_Int32 i, nAdjustmentValues = seqAdjustmentValues.getLength(); - sal_Int32 nAdjustmentDefaults = *pDefData++; + sal_Int32 nAdjustmentDefaults = pDefData[0]; + pDefData = pDefData.subspan(1); if ( nAdjustmentDefaults > nAdjustmentValues ) seqAdjustmentValues.realloc( nAdjustmentDefaults ); auto pseqAdjustmentValues = seqAdjustmentValues.getArray(); @@ -942,9 +943,9 @@ void SdrObjCustomShape::MergeDefaultAttributes( const OUString* pType ) // Path/Segments static constexpr OUString sSegments( u"Segments"_ustr ); pAny = aGeometryItem.GetPropertyValueByName( sPath, sSegments ); - if ( !pAny && pDefCustomShape && pDefCustomShape->nElements && pDefCustomShape->pElements ) + if ( !pAny && pDefCustomShape && !pDefCustomShape->pElements.empty() ) { - sal_Int32 i, nCount = pDefCustomShape->nElements; + sal_Int32 i, nCount = pDefCustomShape->pElements.size(); uno::Sequence seqSegments( nCount ); auto pseqSegments = seqSegments.getArray(); for ( i = 0; i < nCount; i++ ) @@ -1177,9 +1178,9 @@ bool SdrObjCustomShape::IsDefaultGeometry( const DefaultType eDefaultType ) cons uno::Sequence seqSegments1; if ( *pAny >>= seqSegments1 ) { - if ( pDefCustomShape && pDefCustomShape->nElements && pDefCustomShape->pElements ) + if ( pDefCustomShape && !pDefCustomShape->pElements.empty()) { - sal_Int32 i, nCount = pDefCustomShape->nElements; + sal_Int32 i, nCount = pDefCustomShape->pElements.size(); if ( nCount ) { uno::Sequence seqSegments2( nCount ); @@ -1208,7 +1209,7 @@ bool SdrObjCustomShape::IsDefaultGeometry( const DefaultType eDefaultType ) cons } } } - else if ( pDefCustomShape && ( ( pDefCustomShape->nElements == 0 ) || ( pDefCustomShape->pElements == nullptr ) ) ) + else if ( pDefCustomShape && pDefCustomShape->pElements.empty() ) bIsDefaultGeometry = true; } break; From a610acab77fef3076c5461b201ababe9ae605925 Mon Sep 17 00:00:00 2001 From: Bogdan Buzea Date: Wed, 23 Sep 2026 11:35:21 +0300 Subject: [PATCH 019/289] tdf#171083: sc: Add unittest Change-Id: I0ee5162305767c698ae7585f26f097d1906afbac Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211353 Tested-by: Jenkins Reviewed-by: Xisco Fauli --- sc/qa/unit/data/xls/tdf171083.xls | Bin 0 -> 141824 bytes sc/qa/unit/subsequent_export_test6.cxx | 10 ++++++++++ 2 files changed, 10 insertions(+) create mode 100644 sc/qa/unit/data/xls/tdf171083.xls diff --git a/sc/qa/unit/data/xls/tdf171083.xls b/sc/qa/unit/data/xls/tdf171083.xls new file mode 100644 index 0000000000000000000000000000000000000000..1b46ea22b2a7f3da73d3756554c9a6450143c565 GIT binary patch literal 141824 zcmeEv34k0`wRUyS)-#h#X0pvb(~|@U2?>*#tg@sh3y@`!kOT-A$U+hV1Og#ofFOe` zf}m^yvZxW42a3pM1Ri4G`4lw>DhetpC?E(bhzlYz|M%Tn)m8V_>E*`A(_d=lc2#|K z&t1Mc=iFOW-E|&+tnQgl-P!c4XDtVMCEnZpm0o!SFTr*q*st}xUtycr+x`9h0lbDA z$OP!!<==pTzoU)6#3|!>EJZ3q;yJHCN+DGuRUuU)4L}-*RD(1K2`b>#Aq_?vf;1Fq z7}9X0dZY%VMx-XBW~3IRR-`thcBC{?2hs?nkw~ME_CVSbX)mPFNP8oVK^lv+57IcK z@ksk3bs|kb>O$&9nus(BX)@9jq^U^Lklur|AJYCv2Ou4YG#x2})PpnwX(rMvq}fOZ zAsvi#2+|y+xk&Sn<|FkYEkIg`vAgtHk&Z?> z25AM-N~BdttC5aHT8qTtY|Vfctiah^jI%lyJj}$IT!GKS)S1m+;s`I1U`f<<>b$hv@#vqgV84U@NAu{~ zqlnvf3eGm@J8e~3?l|zTs{S1}EmQnQ^Hio_#pPw*t?iFie5)_vm6v+n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rV0gAgtd`4Nu4;R^$LXvox7SpWZrI&Y`ox zWjFo+Z}ip`RaRHJ{p%go{%W%R^#JFauW5=vQQ+SfSHjS>*_y)xk#FUjr+DS4`;N2P zDf_Bi_Hu7SjlJCA@HUiJ`(4g*yWMT~);Jt?d!_q^4Va%dOy#n3%>2X0W3LJjrnW?# zz05ZC&x^yyT;n?>FE2QCfqgRnF~Bw+JlZ-u3^L?km)N$()j<#1^fXx|%FqHv9HS2P$7>S4^)EGejP zIfR#)`2Ma94Lki`NIh=LnAnAbFTV}ufFi=eHB*A-9JG6%f9$qs{b>v zL^su+>b(fI0~YIEOorNNsqJv7zQhNT>xW^95Bp$=FGpbwK49*E$>aISM|j9&x|f3) zl$Lm}^()Prjge{us~+0Tr!xu7n7{`xkw?$EzfahcW);>SG?Fg?h}>k%*?kUFeq4{v z#;#5Trz404g$oa}qo*32pmGg!_EM8El_>vHJxEtD=q$sqeo`Zu>cV^rE~5Mzluv#3 zt1?F2$(=1u8e-&RuW&MK((ukj9~5<>DJg{udb)ljS&9G+To$HzDmzmkT8U)I?@tqT uF`{Bi&4w}CX`4dL7XzN)z(6&>KE;z%@LpO`%|5MpY Date: Mon, 21 Sep 2026 15:28:01 +0500 Subject: [PATCH 020/289] vcl: let PDFDocument list the objects an object stream holds GetElements() hands out the tokens the file itself carries, so a caller hunting structure elements finds none of those a /Type/ObjStm holds - every one of them, in a file from a producer that compresses its objects. They are there already: Tokenize unpacks each object stream it passes and registers what it finds, so only an accessor was missing. The 64 places that scanned the token stream for an object ask GetObjects() instead. testTdf57423 and testStyleNamedStructureTypes compared the order as well. The map is keyed by object number, which for a structure tree is document order, where the token stream carried the emission order that writes a child before its parent - the type sequence reads "Document Table TR TD" now instead of ending "TR Table". Both hold the same 22 elements; testTdf57423 stopped indexing its figures and compares one string per kind. Signed-off-by: Mike Kaganski Change-Id: I3e46e600e0aed3802f5ee2f8c6dc25a50002763d Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/13207 Reviewed-by: Miklos Vajna Tested-by: Jenkins CPCI (cherry picked from commit 50bf4f7acb344520ce2055bddfaf844c23239a8e) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211450 Tested-by: Jenkins Reviewed-by: Xisco Fauli --- include/vcl/filter/pdfdocument.hxx | 2 + sc/qa/extras/scpdfexport.cxx | 15 +- sw/qa/core/text/EnhancedPDFExportHelper.cxx | 40 +--- sw/qa/extras/globalfilter/globalfilter.cxx | 5 +- vcl/qa/cppunit/pdfexport/pdfexport.cxx | 145 +++---------- vcl/qa/cppunit/pdfexport/pdfexport2.cxx | 226 +++++--------------- vcl/qa/cppunit/pdfexport/pdfexport3.cxx | 60 ++---- vcl/source/filter/ipdf/pdfdocument.cxx | 9 + 8 files changed, 122 insertions(+), 380 deletions(-) diff --git a/include/vcl/filter/pdfdocument.hxx b/include/vcl/filter/pdfdocument.hxx index 226e0318711d..ed999120b024 100644 --- a/include/vcl/filter/pdfdocument.hxx +++ b/include/vcl/filter/pdfdocument.hxx @@ -546,6 +546,8 @@ public: SAL_DLLPRIVATE size_t GetObjectOffset(size_t nIndex) const; const std::vector>& GetElements() const; std::vector GetPages(); + /// Every object of the document, those an object stream holds included. + std::vector GetObjects(); PDFObjectElement* GetCatalog(); /// Remember the end location of an EOF token. SAL_DLLPRIVATE void PushBackEOF(size_t nOffset); diff --git a/sc/qa/extras/scpdfexport.cxx b/sc/qa/extras/scpdfexport.cxx index 1b306ef6a887..3d34a58abf7b 100644 --- a/sc/qa/extras/scpdfexport.cxx +++ b/sc/qa/extras/scpdfexport.cxx @@ -958,11 +958,10 @@ CPPUNIT_TEST_FIXTURE(ScPDFExportTest, testSheetDestinations) // ISO 14289-2 8.8: a sheet's outline item names the sheet, not only the page it starts on OStringBuffer aTypes; std::set aTargets; - for (const auto& rDocElement : aDocument.GetElements()) + for (auto* pObject : aDocument.GetObjects()) { - auto pObject = dynamic_cast(rDocElement.get()); // an outline item, not the document information dictionary, which also has a title - if (!pObject || !pObject->Lookup("Title"_ostr) || !pObject->Lookup("Parent"_ostr)) + if (!pObject->Lookup("Title"_ostr) || !pObject->Lookup("Parent"_ostr)) continue; auto pAction = dynamic_cast(pObject->Lookup("A"_ostr)); CPPUNIT_ASSERT(pAction); @@ -1076,11 +1075,8 @@ CPPUNIT_TEST_FIXTURE(ScPDFExportTest, testPageRangeSkipsSheetStart) int nOutlineItems = 0; std::set aWorksheetPages; - for (const auto& rDocElement : aDocument.GetElements()) + for (auto* pObject : aDocument.GetObjects()) { - auto pObject = dynamic_cast(rDocElement.get()); - if (!pObject) - continue; if (pObject->Lookup("Title"_ostr) && pObject->Lookup("Parent"_ostr)) ++nOutlineItems; auto pType = dynamic_cast(pObject->Lookup("S"_ostr)); @@ -1106,11 +1102,8 @@ CPPUNIT_TEST_FIXTURE(ScPDFExportTest, testDatabaseRangeHeader) CPPUNIT_ASSERT(aDocument.Read(*maTempFile.GetStream(StreamMode::READ))); std::vector aTables; - for (const auto& rDocElement : aDocument.GetElements()) + for (auto* pObject : aDocument.GetObjects()) { - auto pObject = dynamic_cast(rDocElement.get()); - if (!pObject) - continue; auto pType = dynamic_cast(pObject->Lookup("S"_ostr)); if (pType && pType->GetValue() == "Table") aTables.push_back(pObject); diff --git a/sw/qa/core/text/EnhancedPDFExportHelper.cxx b/sw/qa/core/text/EnhancedPDFExportHelper.cxx index f95aa27e6a1f..d51c63266cea 100644 --- a/sw/qa/core/text/EnhancedPDFExportHelper.cxx +++ b/sw/qa/core/text/EnhancedPDFExportHelper.cxx @@ -47,11 +47,8 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf171022) // the outline item, the footnote's two links, the shape's link and the citation's std::vector aOutlineTypes; std::vector aLinkTypes; - for (const auto& rDocElement : aDocument.GetElements()) + for (auto* pObject : aDocument.GetObjects()) { - auto pObject = dynamic_cast(rDocElement.get()); - if (!pObject) - continue; auto pAction = dynamic_cast(pObject->Lookup("A"_ostr)); if (!pAction) continue; @@ -119,11 +116,8 @@ CPPUNIT_TEST_FIXTURE(Test, testFootnoteNoteType) // the type of the one element a footnote frame opens const auto aFootnoteType = [](vcl::filter::PDFDocument& rDocument) -> OString { - for (const auto& rDocElement : rDocument.GetElements()) + for (auto* pObject : rDocument.GetObjects()) { - auto pObject = dynamic_cast(rDocElement.get()); - if (!pObject) - continue; auto pType = dynamic_cast(pObject->Lookup("S"_ostr)); if (pType && (pType->GetValue() == "Note" || pType->GetValue() == "FENote")) return pType->GetValue(); @@ -175,12 +169,8 @@ CPPUNIT_TEST_FIXTURE(Test, testTOCItemRef) // name the element its entry reaches OStringBuffer aTargets; std::unordered_set aSeen; - for (const auto& rDocElement : aDocument.GetElements()) + for (auto* pObject : aDocument.GetObjects()) { - auto pObject = dynamic_cast(rDocElement.get()); - if (!pObject) - continue; - auto pType = dynamic_cast(pObject->Lookup("S"_ostr)); if (!pType || pType->GetValue() != "TOCI") continue; @@ -220,12 +210,8 @@ CPPUNIT_TEST_FIXTURE(Test, testFormulaAltFromSource) CPPUNIT_ASSERT(aDocument.Read(*maTempFile.GetStream(StreamMode::READ))); OUStringBuffer aAlts; - for (const auto& rDocElement : aDocument.GetElements()) + for (auto* pObject : aDocument.GetObjects()) { - auto pObject = dynamic_cast(rDocElement.get()); - if (!pObject) - continue; - auto pType = dynamic_cast(pObject->Lookup("S"_ostr)); if (!pType || pType->GetValue() != "Formula") continue; @@ -255,12 +241,8 @@ CPPUNIT_TEST_FIXTURE(Test, testFormulaPlacement) OString aInALine; OString aInAParagraph; OString aOnThePage; - for (const auto& rDocElement : aDocument.GetElements()) + for (auto* pObject : aDocument.GetObjects()) { - auto pObject = dynamic_cast(rDocElement.get()); - if (!pObject) - continue; - auto pType = dynamic_cast(pObject->Lookup("S"_ostr)); if (!pType || pType->GetValue() != "Formula") continue; @@ -309,12 +291,8 @@ CPPUNIT_TEST_FIXTURE(Test, testLayoutAttributeUnits) vcl::filter::PDFDictionaryElement* pIndented = nullptr; vcl::filter::PDFDictionaryElement* pHanging = nullptr; vcl::filter::PDFDictionaryElement* pCell = nullptr; - for (const auto& rDocElement : aDocument.GetElements()) + for (auto* pObject : aDocument.GetObjects()) { - auto pObject = dynamic_cast(rDocElement.get()); - if (!pObject) - continue; - auto pType = dynamic_cast(pObject->Lookup("S"_ostr)); auto pAttributes = dynamic_cast(pObject->Lookup("A"_ostr)); @@ -371,12 +349,8 @@ CPPUNIT_TEST_FIXTURE(Test, testParagraphLanguage) // every structure element that names a language, sorted: they are emitted by object and // not by document order std::vector aLanguages; - for (const auto& rDocElement : aDocument.GetElements()) + for (auto* pObject : aDocument.GetObjects()) { - auto pObject = dynamic_cast(rDocElement.get()); - if (!pObject) - continue; - auto pType = dynamic_cast(pObject->Lookup("S"_ostr)); auto pLang = dynamic_cast(pObject->Lookup("Lang"_ostr)); diff --git a/sw/qa/extras/globalfilter/globalfilter.cxx b/sw/qa/extras/globalfilter/globalfilter.cxx index 47261bff8ed6..12a7232e1b13 100644 --- a/sw/qa/extras/globalfilter/globalfilter.cxx +++ b/sw/qa/extras/globalfilter/globalfilter.cxx @@ -1530,11 +1530,8 @@ CPPUNIT_TEST_FIXTURE(Test, testListLabelPDFExport) CPPUNIT_ASSERT_EQUAL(static_cast(6), nLblTJ + nLblTj); auto nL(0); - for (const auto& rDocElement : aDocument.GetElements()) + for (auto* pObject0 : aDocument.GetObjects()) { - auto pObject0 = dynamic_cast(rDocElement.get()); - if (!pObject0) - continue; auto pType0 = dynamic_cast(pObject0->Lookup("Type"_ostr)); if (!pType0 || pType0->GetValue() != "StructElem") { diff --git a/vcl/qa/cppunit/pdfexport/pdfexport.cxx b/vcl/qa/cppunit/pdfexport/pdfexport.cxx index 2306cffbad57..e1cf04fc04de 100644 --- a/vcl/qa/cppunit/pdfexport/pdfexport.cxx +++ b/vcl/qa/cppunit/pdfexport/pdfexport.cxx @@ -179,11 +179,8 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest, testCommentAnnotation) CPPUNIT_ASSERT_EQUAL(static_cast(1), aPages.size()); vcl::filter::PDFObjectElement* pAnnot(nullptr); - for (const auto& aElement : aDocument.GetElements()) + for (auto* pObject : aDocument.GetObjects()) { - auto pObject = dynamic_cast(aElement.get()); - if (!pObject) - continue; auto pType = dynamic_cast(pObject->Lookup("Type"_ostr)); if (pType && pType->GetValue() == "StructElem") { @@ -241,11 +238,8 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest, testFigurePlacement) std::vector aPages = aDocument.GetPages(); CPPUNIT_ASSERT_EQUAL(static_cast(1), aPages.size()); - for (const auto& aElement : aDocument.GetElements()) + for (auto* pObject : aDocument.GetObjects()) { - auto pObject = dynamic_cast(aElement.get()); - if (!pObject) - continue; auto pType = dynamic_cast(pObject->Lookup("Type"_ostr)); if (pType && pType->GetValue() == "StructElem") { @@ -1112,11 +1106,8 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest, testAlternativeText) std::vector aPages = aDocument.GetPages(); CPPUNIT_ASSERT_EQUAL(static_cast(1), aPages.size()); - for (const auto& aElement : aDocument.GetElements()) + for (auto* pObject : aDocument.GetObjects()) { - auto pObject = dynamic_cast(aElement.get()); - if (!pObject) - continue; auto pType = dynamic_cast(pObject->Lookup("Type"_ostr)); if (pType && pType->GetValue() == "StructElem") { @@ -1166,11 +1157,8 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest, testTdf105972) CPPUNIT_ASSERT_EQUAL(static_cast(3), pAnnots->GetElements().size()); sal_uInt32 nTextFieldCount = 0; - for (const auto& aElement : aDocument.GetElements()) + for (auto* pObject : aDocument.GetObjects()) { - auto pObject = dynamic_cast(aElement.get()); - if (!pObject) - continue; auto pType = dynamic_cast(pObject->Lookup("FT"_ostr)); if (pType && pType->GetValue() == "Tx") { @@ -1241,11 +1229,8 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest, testTdf148442) CPPUNIT_ASSERT_EQUAL(static_cast(3), pAnnots->GetElements().size()); sal_uInt32 nBtnCount = 0; - for (const auto& aElement : aDocument.GetElements()) + for (auto* pObject : aDocument.GetObjects()) { - auto pObject = dynamic_cast(aElement.get()); - if (!pObject) - continue; auto pType = dynamic_cast(pObject->Lookup("FT"_ostr)); if (pType && pType->GetValue() == "Btn") { @@ -1323,11 +1308,8 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest, testTdf118244_radioButtonGroup) pAnnots->GetElements().size()); sal_uInt32 nRadioGroups = 0; - for (const auto& aElement : aDocument.GetElements()) + for (auto* pObject : aDocument.GetObjects()) { - auto pObject = dynamic_cast(aElement.get()); - if (!pObject) - continue; auto pType = dynamic_cast(pObject->Lookup("FT"_ostr)); if (pType && pType->GetValue() == "Btn") { @@ -1362,11 +1344,8 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest, testTdf115117_1) vcl::filter::PDFObjectElement* pToUnicode = nullptr; // Get access to ToUnicode of the first font - for (const auto& aElement : aDocument.GetElements()) + for (auto* pObject : aDocument.GetObjects()) { - auto pObject = dynamic_cast(aElement.get()); - if (!pObject) - continue; auto pType = dynamic_cast(pObject->Lookup("Type"_ostr)); if (pType && pType->GetValue() == "Font") { @@ -1439,11 +1418,8 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest, testTdf115117_2) vcl::filter::PDFObjectElement* pToUnicode = nullptr; - for (const auto& aElement : aDocument.GetElements()) + for (auto* pObject : aDocument.GetObjects()) { - auto pObject = dynamic_cast(aElement.get()); - if (!pObject) - continue; auto pType = dynamic_cast(pObject->Lookup("Type"_ostr)); if (pType && pType->GetValue() == "Font") { @@ -1785,11 +1761,8 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest, testTdf66597_1) { // Get access to ToUnicode of the first font vcl::filter::PDFObjectElement* pToUnicode = nullptr; - for (const auto& aElement : aDocument.GetElements()) + for (auto* pObject : aDocument.GetObjects()) { - auto pObject = dynamic_cast(aElement.get()); - if (!pObject) - continue; auto pType = dynamic_cast(pObject->Lookup("Type"_ostr)); if (pType && pType->GetValue() == "Font") { @@ -1892,11 +1865,8 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest, testTdf66597_2) { // Get access to ToUnicode of the first font vcl::filter::PDFObjectElement* pToUnicode = nullptr; - for (const auto& aElement : aDocument.GetElements()) + for (auto* pObject : aDocument.GetObjects()) { - auto pObject = dynamic_cast(aElement.get()); - if (!pObject) - continue; auto pType = dynamic_cast(pObject->Lookup("Type"_ostr)); if (pType && pType->GetValue() == "Font") { @@ -1999,11 +1969,8 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest, testTdf66597_3) { // Get access to ToUnicode of the first font vcl::filter::PDFObjectElement* pToUnicode = nullptr; - for (const auto& aElement : aDocument.GetElements()) + for (auto* pObject : aDocument.GetObjects()) { - auto pObject = dynamic_cast(aElement.get()); - if (!pObject) - continue; auto pType = dynamic_cast(pObject->Lookup("Type"_ostr)); if (pType && pType->GetValue() == "Font") { @@ -2123,11 +2090,8 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest, testVariableFontPSName1) CPPUNIT_ASSERT(aDocument.Read(aStream)); std::set aFontNames; - for (const auto& aElement : aDocument.GetElements()) + for (auto* pObject : aDocument.GetObjects()) { - auto pObject = dynamic_cast(aElement.get()); - if (!pObject) - continue; auto pType = dynamic_cast(pObject->Lookup("Type"_ostr)); if (pType && pType->GetValue() == "Font") { @@ -2157,11 +2121,8 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest, testVariableFontPSName2) CPPUNIT_ASSERT(aDocument.Read(aStream)); std::set aFontNames; - for (const auto& aElement : aDocument.GetElements()) + for (auto* pObject : aDocument.GetObjects()) { - auto pObject = dynamic_cast(aElement.get()); - if (!pObject) - continue; auto pType = dynamic_cast(pObject->Lookup("Type"_ostr)); if (pType && pType->GetValue() == "Font") { @@ -2193,11 +2154,8 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest, testOpticalSizing) CPPUNIT_ASSERT(aDocument.Read(aStream)); std::set aFontNames; - for (const auto& aElement : aDocument.GetElements()) + for (auto* pObject : aDocument.GetObjects()) { - auto pObject = dynamic_cast(aElement.get()); - if (!pObject) - continue; auto pType = dynamic_cast(pObject->Lookup("Type"_ostr)); if (pType && pType->GetValue() == "Font") { @@ -2549,11 +2507,8 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest, testTdf157816) CPPUNIT_ASSERT_EQUAL(static_cast(1), aPages.size()); vcl::filter::PDFObjectElement* pDocument(nullptr); - for (const auto& rDocElement : aDocument.GetElements()) + for (auto* pObject1 : aDocument.GetObjects()) { - auto pObject1 = dynamic_cast(rDocElement.get()); - if (!pObject1) - continue; auto pType1 = dynamic_cast(pObject1->Lookup("Type"_ostr)); if (pType1 && pType1->GetValue() == "StructElem") { @@ -2943,11 +2898,8 @@ void AssertLinkAnnotsAreTagged(vcl::filter::PDFDocument& rDocument, const size_t // what the Link structure elements claim as their annotations size_t nLinkSE(0); std::set aKidAnnots; - for (const auto& rDocElement : rDocument.GetElements()) + for (auto* pObject : rDocument.GetObjects()) { - auto pObject = dynamic_cast(rDocElement.get()); - if (!pObject) - continue; auto pType = dynamic_cast(pObject->Lookup("Type"_ostr)); auto pS = dynamic_cast(pObject->Lookup("S"_ostr)); if (!pType || pType->GetValue() != "StructElem" || !pS || pS->GetValue() != "Link") @@ -3054,11 +3006,8 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest, testIndexMarkWithSpan) // the tag a marked run needs is not always a Link: this one carries the language vcl::filter::PDFObjectElement* pSpanSE(nullptr); - for (const auto& rDocElement : aDocument.GetElements()) + for (auto* pObject : aDocument.GetObjects()) { - auto pObject = dynamic_cast(rDocElement.get()); - if (!pObject) - continue; auto pType = dynamic_cast(pObject->Lookup("Type"_ostr)); auto pS = dynamic_cast(pObject->Lookup("S"_ostr)); if (pType && pType->GetValue() == "StructElem" && pS && pS->GetValue() == "Span") @@ -3101,11 +3050,8 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest, testLinkWithRuby) CPPUNIT_ASSERT(pAnnot); vcl::filter::PDFObjectElement* pLinkSE(nullptr); - for (const auto& rDocElement : aDocument.GetElements()) + for (auto* pObject : aDocument.GetObjects()) { - auto pObject = dynamic_cast(rDocElement.get()); - if (!pObject) - continue; auto pType = dynamic_cast(pObject->Lookup("Type"_ostr)); auto pS = dynamic_cast(pObject->Lookup("S"_ostr)); if (pType && pType->GetValue() == "StructElem" && pS && pS->GetValue() == "Link") @@ -3196,11 +3142,8 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest, testLinkWithSpan) CPPUNIT_ASSERT(aDocument.Read(aStream)); vcl::filter::PDFObjectElement* pLinkSE(nullptr); - for (const auto& rDocElement : aDocument.GetElements()) + for (auto* pObject : aDocument.GetObjects()) { - auto pObject = dynamic_cast(rDocElement.get()); - if (!pObject) - continue; auto pType = dynamic_cast(pObject->Lookup("Type"_ostr)); auto pS = dynamic_cast(pObject->Lookup("S"_ostr)); if (pType && pType->GetValue() == "StructElem" && pS && pS->GetValue() == "Link") @@ -3271,11 +3214,8 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest, testLinkSpanWithFly) // the link closes there - one link, one span, and the frame nested in the span vcl::filter::PDFObjectElement* pLinkSE(nullptr); vcl::filter::PDFObjectElement* pSpanSE(nullptr); - for (const auto& rDocElement : aDocument.GetElements()) + for (auto* pObject : aDocument.GetObjects()) { - auto pObject = dynamic_cast(rDocElement.get()); - if (!pObject) - continue; auto pType = dynamic_cast(pObject->Lookup("Type"_ostr)); auto pS = dynamic_cast(pObject->Lookup("S"_ostr)); if (!pType || pType->GetValue() != "StructElem" || !pS) @@ -3331,11 +3271,8 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest, testSpanWithFly) // the frame opens its tags inside the span, so the span is not what closes at the // frame's own paragraph - one span, and the frame nested in it vcl::filter::PDFObjectElement* pSpanSE(nullptr); - for (const auto& rDocElement : aDocument.GetElements()) + for (auto* pObject : aDocument.GetObjects()) { - auto pObject = dynamic_cast(rDocElement.get()); - if (!pObject) - continue; auto pType = dynamic_cast(pObject->Lookup("Type"_ostr)); auto pS = dynamic_cast(pObject->Lookup("S"_ostr)); if (pType && pType->GetValue() == "StructElem" && pS && pS->GetValue() == "Span") @@ -3391,11 +3328,8 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest, testLinkSpanWraps) CPPUNIT_ASSERT_GREATER(size_t(1), pAnnots->GetElements().size()); vcl::filter::PDFObjectElement* pLinkSE(nullptr); - for (const auto& rDocElement : aDocument.GetElements()) + for (auto* pObject : aDocument.GetObjects()) { - auto pObject = dynamic_cast(rDocElement.get()); - if (!pObject) - continue; auto pType = dynamic_cast(pObject->Lookup("Type"_ostr)); auto pS = dynamic_cast(pObject->Lookup("S"_ostr)); if (pType && pType->GetValue() == "StructElem" && pS && pS->GetValue() == "Link") @@ -3474,11 +3408,8 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest, testRubyWithSpan) CPPUNIT_ASSERT(aDocument.Read(aStream)); vcl::filter::PDFObjectElement* pRubySE(nullptr); - for (const auto& rDocElement : aDocument.GetElements()) + for (auto* pObject : aDocument.GetObjects()) { - auto pObject = dynamic_cast(rDocElement.get()); - if (!pObject) - continue; auto pType = dynamic_cast(pObject->Lookup("Type"_ostr)); auto pS = dynamic_cast(pObject->Lookup("S"_ostr)); if (pType && pType->GetValue() == "StructElem" && pS && pS->GetValue() == "Ruby") @@ -3593,11 +3524,8 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest, testTdf163240) // ... but only one Link structure element for the whole link vcl::filter::PDFObjectElement* pLinkSE(nullptr); - for (const auto& rDocElement : aDocument.GetElements()) + for (auto* pObject : aDocument.GetObjects()) { - auto pObject = dynamic_cast(rDocElement.get()); - if (!pObject) - continue; auto pType = dynamic_cast(pObject->Lookup("Type"_ostr)); auto pS = dynamic_cast(pObject->Lookup("S"_ostr)); if (pType && pType->GetValue() == "StructElem" && pS && pS->GetValue() == "Link") @@ -3660,11 +3588,8 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest, testTdf163240) // ... and each of them resolves to it through the parent tree vcl::filter::PDFArrayElement* pNums(nullptr); - for (const auto& rDocElement : aDocument.GetElements()) + for (auto* pObject : aDocument.GetObjects()) { - auto pObject = dynamic_cast(rDocElement.get()); - if (!pObject) - continue; auto pType = dynamic_cast(pObject->Lookup("Type"_ostr)); if (pType && pType->GetValue() == "StructTreeRoot") { @@ -3723,11 +3648,8 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest, testTdf157816Link) CPPUNIT_ASSERT_EQUAL(static_cast(1), aPages.size()); vcl::filter::PDFObjectElement* pDocument(nullptr); - for (const auto& rDocElement : aDocument.GetElements()) + for (auto* pObject1 : aDocument.GetObjects()) { - auto pObject1 = dynamic_cast(rDocElement.get()); - if (!pObject1) - continue; auto pType1 = dynamic_cast(pObject1->Lookup("Type"_ostr)); if (pType1 && pType1->GetValue() == "StructElem") { @@ -4003,11 +3925,8 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest, testTdf142806) CPPUNIT_ASSERT_EQUAL(static_cast(4), aPages.size()); vcl::filter::PDFObjectElement* pDocument(nullptr); - for (const auto& rDocElement : aDocument.GetElements()) + for (auto* pObject1 : aDocument.GetObjects()) { - auto pObject1 = dynamic_cast(rDocElement.get()); - if (!pObject1) - continue; auto pType1 = dynamic_cast(pObject1->Lookup("Type"_ostr)); if (pType1 && pType1->GetValue() == "StructElem") { @@ -4496,11 +4415,8 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest, testFontVariationSettingsODT) CPPUNIT_ASSERT(aDocument.Read(aStream)); std::set aFontNames; - for (const auto& aElement : aDocument.GetElements()) + for (auto* pObject : aDocument.GetObjects()) { - auto pObject = dynamic_cast(aElement.get()); - if (!pObject) - continue; auto pType = dynamic_cast(pObject->Lookup("Type"_ostr)); if (pType && pType->GetValue() == "Font") { @@ -4531,11 +4447,8 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest, testFontVariationSettingsODP) CPPUNIT_ASSERT(aDocument.Read(aStream)); std::set aFontNames; - for (const auto& aElement : aDocument.GetElements()) + for (auto* pObject : aDocument.GetObjects()) { - auto pObject = dynamic_cast(aElement.get()); - if (!pObject) - continue; auto pType = dynamic_cast(pObject->Lookup("Type"_ostr)); if (pType && pType->GetValue() == "Font") { diff --git a/vcl/qa/cppunit/pdfexport/pdfexport2.cxx b/vcl/qa/cppunit/pdfexport/pdfexport2.cxx index 3386486941a4..a4658fa3f690 100644 --- a/vcl/qa/cppunit/pdfexport/pdfexport2.cxx +++ b/vcl/qa/cppunit/pdfexport/pdfexport2.cxx @@ -137,12 +137,8 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest2, testTdf160705) CPPUNIT_ASSERT_EQUAL(size_t(1), aPages.size()); int nTable(0); - for (const auto& rDocElement : aDocument.GetElements()) + for (auto* pObject : aDocument.GetObjects()) { - auto pObject = dynamic_cast(rDocElement.get()); - if (!pObject) - continue; - auto pType = dynamic_cast(pObject->Lookup("Type"_ostr)); if (pType && pType->GetValue() == "StructElem") { @@ -206,12 +202,8 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest2, testTdf159895) std::vector aPages = aDocument.GetPages(); CPPUNIT_ASSERT_EQUAL(size_t(1), aPages.size()); - for (const auto& rDocElement : aDocument.GetElements()) + for (auto* pObj : aDocument.GetObjects()) { - auto pObj = dynamic_cast(rDocElement.get()); - if (!pObj) - continue; - auto pType = dynamic_cast(pObj->Lookup("Type"_ostr)); if (pType && pType->GetValue() == "XObject") { @@ -353,11 +345,8 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest2, testTdf141171) CPPUNIT_ASSERT(aDocument.Read(aStream)); int nImages(0); - for (const auto& rDocElement : aDocument.GetElements()) + for (auto* pObject : aDocument.GetObjects()) { - auto pObject = dynamic_cast(rDocElement.get()); - if (!pObject) - continue; auto pType = dynamic_cast(pObject->Lookup("Subtype"_ostr)); if (pType && pType->GetValue() == "Image") { @@ -1043,11 +1032,8 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest2, testTaggedNestedTableInRepeatedHeaderRow) int nTables(0); int nRows(0); int nParagraphs(0); - for (const auto& rDocElement : aDocument.GetElements()) + for (auto* pObject : aDocument.GetObjects()) { - auto pObject = dynamic_cast(rDocElement.get()); - if (!pObject) - continue; auto pType = dynamic_cast(pObject->Lookup("Type"_ostr)); if (!pType || pType->GetValue() != "StructElem") continue; @@ -1492,11 +1478,8 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest2, testTdf160117) bool bFound1 = false; bool bFound2 = false; bool bFound3 = false; - for (const auto& rDocElement : aDocument.GetElements()) + for (auto* pObject : aDocument.GetObjects()) { - auto pObject = dynamic_cast(rDocElement.get()); - if (!pObject) - continue; auto pType = dynamic_cast(pObject->Lookup("Type"_ostr)); if (pType && pType->GetValue() == "FontDescriptor") { @@ -1897,11 +1880,8 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest2, testTdf152231) CPPUNIT_ASSERT_GREATEREQUAL(1, nArtifacts); int nPara(0); - for (const auto& rDocElement : aDocument.GetElements()) + for (auto* pObject : aDocument.GetObjects()) { - auto pObject = dynamic_cast(rDocElement.get()); - if (!pObject) - continue; auto pType = dynamic_cast(pObject->Lookup("Type"_ostr)); if (pType && pType->GetValue() == "StructElem") { @@ -2144,11 +2124,8 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest2, testTdf149140) CPPUNIT_ASSERT_EQUAL(size_t(1), aPages.size()); int nTH(0); - for (const auto& rDocElement : aDocument.GetElements()) + for (auto* pObject : aDocument.GetObjects()) { - auto pObject = dynamic_cast(rDocElement.get()); - if (!pObject) - continue; auto pType = dynamic_cast(pObject->Lookup("Type"_ostr)); if (pType && pType->GetValue() == "StructElem") { @@ -2213,11 +2190,8 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest2, testTdf173162) // the namespace each element points at, by object std::unordered_map aNamespaceOf; - for (const auto& rDocElement : aDocument.GetElements()) + for (auto* pObject : aDocument.GetObjects()) { - auto pObject = dynamic_cast(rDocElement.get()); - if (!pObject) - continue; auto pType = dynamic_cast(pObject->Lookup("Type"_ostr)); if (!pType || pType->GetValue() != "Namespace") continue; @@ -2274,11 +2248,8 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest2, testTdf173162) // the namespace each structure type landed in std::unordered_map aNamespaceOfType; - for (const auto& rDocElement : aDocument.GetElements()) + for (auto* pObject : aDocument.GetObjects()) { - auto pObject = dynamic_cast(rDocElement.get()); - if (!pObject) - continue; auto pType = dynamic_cast(pObject->Lookup("Type"_ostr)); if (!pType || pType->GetValue() != "StructElem") continue; @@ -2362,11 +2333,8 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest2, testTdf166963) // which element actually lists each structure element as its kid std::unordered_map aLister; std::vector aElements; - for (const auto& rDocElement : aDocument.GetElements()) + for (auto* pObject : aDocument.GetObjects()) { - auto pObject = dynamic_cast(rDocElement.get()); - if (!pObject) - continue; auto pType = dynamic_cast(pObject->Lookup("Type"_ostr)); if (!pType) continue; @@ -2423,11 +2391,8 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest2, testTdf173194) CPPUNIT_ASSERT(aDocument.Read(aStream)); vcl::filter::PDFObjectElement* pTableSE(nullptr); - for (const auto& rDocElement : aDocument.GetElements()) + for (auto* pObject : aDocument.GetObjects()) { - auto pObject = dynamic_cast(rDocElement.get()); - if (!pObject) - continue; auto pType = dynamic_cast(pObject->Lookup("Type"_ostr)); auto pS = dynamic_cast(pObject->Lookup("S"_ostr)); if (pType && pType->GetValue() == "StructElem" && pS && pS->GetValue() == "Table") @@ -2484,11 +2449,8 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest2, testTdf153935) // when PDF/UA is requested, since PDF/UA mandates structural tab order on // any page that holds annotations. int nPagesWithTabs(0); - for (const auto& rDocElement : aDocument.GetElements()) + for (auto* pObject : aDocument.GetObjects()) { - auto pObject = dynamic_cast(rDocElement.get()); - if (!pObject) - continue; auto pType = dynamic_cast(pObject->Lookup("Type"_ostr)); if (!pType || pType->GetValue() != "Page") continue; @@ -2504,11 +2466,8 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest2, testTdf153935) // the /Table owner (clause 7.5), regardless of PDF version when PDF/UA is // requested. The fixture has 6 TH cells. int nTH(0); - for (const auto& rDocElement : aDocument.GetElements()) + for (auto* pObject : aDocument.GetObjects()) { - auto pObject = dynamic_cast(rDocElement.get()); - if (!pObject) - continue; auto pType = dynamic_cast(pObject->Lookup("Type"_ostr)); if (!pType || pType->GetValue() != "StructElem") continue; @@ -2562,11 +2521,8 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest2, testNestedSection) CPPUNIT_ASSERT_EQUAL(size_t(3), aPages.size()); int nDoc(0); - for (const auto& rDocElement : aDocument.GetElements()) + for (auto* pObject1 : aDocument.GetObjects()) { - auto pObject1 = dynamic_cast(rDocElement.get()); - if (!pObject1) - continue; auto pType1 = dynamic_cast(pObject1->Lookup("Type"_ostr)); if (pType1 && pType1->GetValue() == "StructElem") { @@ -2710,11 +2666,8 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest2, testTdf157817) CPPUNIT_ASSERT_EQUAL(size_t(2), aPages.size()); vcl::filter::PDFObjectElement* pTOC(nullptr); - for (const auto& rDocElement : aDocument.GetElements()) + for (auto* pObject1 : aDocument.GetObjects()) { - auto pObject1 = dynamic_cast(rDocElement.get()); - if (!pObject1) - continue; auto pType1 = dynamic_cast(pObject1->Lookup("Type"_ostr)); if (pType1 && pType1->GetValue() == "StructElem") { @@ -2907,11 +2860,8 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest2, testTdf135638) CPPUNIT_ASSERT_EQUAL(size_t(1), aPages.size()); int nFigure(0); - for (const auto& rDocElement : aDocument.GetElements()) + for (auto* pObject : aDocument.GetObjects()) { - auto pObject = dynamic_cast(rDocElement.get()); - if (!pObject) - continue; auto pType = dynamic_cast(pObject->Lookup("Type"_ostr)); if (pType && pType->GetValue() == "StructElem") { @@ -3004,11 +2954,8 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest2, testTdf157703) CPPUNIT_ASSERT_EQUAL(size_t(1), aPages.size()); vcl::filter::PDFObjectElement* pDocument(nullptr); - for (const auto& rDocElement : aDocument.GetElements()) + for (auto* pObject1 : aDocument.GetObjects()) { - auto pObject1 = dynamic_cast(rDocElement.get()); - if (!pObject1) - continue; auto pType1 = dynamic_cast(pObject1->Lookup("Type"_ostr)); if (pType1 && pType1->GetValue() == "StructElem") { @@ -3085,11 +3032,8 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest2, testSpans) CPPUNIT_ASSERT_EQUAL(size_t(2), aPages.size()); int nDoc(0); - for (const auto& rDocElement : aDocument.GetElements()) + for (auto* pObject1 : aDocument.GetObjects()) { - auto pObject1 = dynamic_cast(rDocElement.get()); - if (!pObject1) - continue; auto pType1 = dynamic_cast(pObject1->Lookup("Type"_ostr)); if (pType1 && pType1->GetValue() == "StructElem") { @@ -3579,89 +3523,43 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest2, testTdf57423) std::vector aPages = aDocument.GetPages(); CPPUNIT_ASSERT_EQUAL(size_t(1), aPages.size()); - int nFigure(0); - int nFormula(0); - int nDiv(0); - for (const auto& rDocElement : aDocument.GetElements()) + // each kind's descriptions in one string, so the assertion does not depend on the order the + // objects come back in + OUString aFigures; + OUString aFormulas; + OUString aDivs; + auto aAlt = [](vcl::filter::PDFObjectElement* pObject) -> OUString { + auto pAlt = dynamic_cast(pObject->Lookup("Alt"_ostr)); + return pAlt ? vcl::filter::PDFDocument::DecodeHexStringUTF16BE(*pAlt) : OUString(); + }; + for (auto* pObject : aDocument.GetObjects()) { - auto pObject = dynamic_cast(rDocElement.get()); - if (!pObject) - continue; auto pType = dynamic_cast(pObject->Lookup("Type"_ostr)); - if (pType && pType->GetValue() == "StructElem") - { - auto pS = dynamic_cast(pObject->Lookup("S"_ostr)); - if (pS && pS->GetValue() == "Figure") - { - switch (nFigure) - { - case 2: - CPPUNIT_ASSERT_EQUAL(u"QR Code - Tells how to get to Mosegaard"_ustr, - ::vcl::filter::PDFDocument::DecodeHexStringUTF16BE( - *dynamic_cast( - pObject->Lookup("Alt"_ostr)))); - break; - case 0: - CPPUNIT_ASSERT_EQUAL(u"Title: Arrows - Description: Explains the " - u"different arrow appearances"_ustr, - ::vcl::filter::PDFDocument::DecodeHexStringUTF16BE( - *dynamic_cast( - pObject->Lookup("Alt"_ostr)))); - break; - case 1: - CPPUNIT_ASSERT_EQUAL( - u"My blue triangle - Does not need further description"_ustr, - ::vcl::filter::PDFDocument::DecodeHexStringUTF16BE( - *dynamic_cast( - pObject->Lookup("Alt"_ostr)))); - break; - } - ++nFigure; - } - if (pS && pS->GetValue() == "Formula") - { - CPPUNIT_ASSERT_EQUAL( - u"Equation 1 - Now we give the full description of eq 1 here"_ustr, - ::vcl::filter::PDFDocument::DecodeHexStringUTF16BE( - *dynamic_cast( - pObject->Lookup("Alt"_ostr)))); - ++nFormula; - } - if (pS && pS->GetValue() == "Div") - { - switch (nDiv) - { - case 0: - CPPUNIT_ASSERT_EQUAL(u"This frame has a description"_ustr, - ::vcl::filter::PDFDocument::DecodeHexStringUTF16BE( - *dynamic_cast( - pObject->Lookup("Alt"_ostr)))); - break; - case 1: - // no properties set on this - CPPUNIT_ASSERT(!pObject->Lookup("Alt"_ostr)); - break; - case 2: - CPPUNIT_ASSERT_EQUAL(u"My textbox - Has a light background"_ustr, - ::vcl::filter::PDFDocument::DecodeHexStringUTF16BE( - *dynamic_cast( - pObject->Lookup("Alt"_ostr)))); - break; - case 3: - CPPUNIT_ASSERT_EQUAL(u"Hey! There is no alternate text for Frame " - u"// but maybe not needed?"_ustr, - ::vcl::filter::PDFDocument::DecodeHexStringUTF16BE( - *dynamic_cast( - pObject->Lookup("Alt"_ostr)))); - break; - } - ++nDiv; - } - } + if (!pType || pType->GetValue() != "StructElem") + continue; + auto pS = dynamic_cast(pObject->Lookup("S"_ostr)); + if (!pS) + continue; + if (pS->GetValue() == "Figure") + aFigures += aAlt(pObject) + "|"; + else if (pS->GetValue() == "Formula") + aFormulas += aAlt(pObject) + "|"; + else if (pS->GetValue() == "Div") + aDivs += aAlt(pObject) + "|"; } - CPPUNIT_ASSERT_EQUAL(3, nFigure); - CPPUNIT_ASSERT_EQUAL(1, nFormula); - CPPUNIT_ASSERT_EQUAL(4, nDiv); + + CPPUNIT_ASSERT_EQUAL( + u"QR Code - Tells how to get to Mosegaard|" + "My blue triangle - Does not need further description|" + "Title: Arrows - Description: Explains the different arrow appearances|"_ustr, + aFigures); + CPPUNIT_ASSERT_EQUAL(u"Equation 1 - Now we give the full description of eq 1 here|"_ustr, + aFormulas); + // the first frame here has no properties set on it + CPPUNIT_ASSERT_EQUAL(u"|This frame has a description|" + "Hey! There is no alternate text for Frame // but maybe not needed?|" + "My textbox - Has a light background|"_ustr, + aDivs); } CPPUNIT_TEST_FIXTURE(PdfExportTest2, testTdf154982) @@ -3685,11 +3583,8 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest2, testTdf154982) CPPUNIT_ASSERT_EQUAL(size_t(1), aPages.size()); int nFigure(0); - for (const auto& rDocElement : aDocument.GetElements()) + for (auto* pObject : aDocument.GetObjects()) { - auto pObject = dynamic_cast(rDocElement.get()); - if (!pObject) - continue; auto pType = dynamic_cast(pObject->Lookup("Type"_ostr)); if (pType && pType->GetValue() == "StructElem") { @@ -3860,11 +3755,8 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest2, testStyleNamedStructureTypes) maTempFile.CloseStream(); CPPUNIT_ASSERT(aDocument.Read(*maTempFile.GetStream(StreamMode::READ))); OStringBuffer aTypes; - for (const auto& rDocElement : aDocument.GetElements()) + for (auto* pObject : aDocument.GetObjects()) { - auto pObject = dynamic_cast(rDocElement.get()); - if (!pObject) - continue; auto pType = dynamic_cast(pObject->Lookup("Type"_ostr)); if (!pType || pType->GetValue() != "StructElem") continue; @@ -3900,10 +3792,9 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest2, testStyleNamedStructureTypes) // its own; the run in Source Text is the one element really of the Code type, and the // style really called Code1 keeps a name of its own, being a different style const auto[aTypes17, aRoles17] = aExport(17); - CPPUNIT_ASSERT_EQUAL(u8"Étude TD Étude TD TR Table" + CPPUNIT_ASSERT_EQUAL(u8"Document Table TR TD Étude TD Étude" " Code-1 Title Index-1 Code1 H-1 THead-1 H7 Sub Artifact-1 Code-1-1 H7-1 " - "Code-2 Code Étude-1" - " Standard Document "_ostr, + "Standard Code-2 Code Étude-1 "_ostr, aTypes17); CPPUNIT_ASSERT_EQUAL( u8"Artifact-1=P Code-1=P Code-1-1=P Code-2=Span Code1=P H-1=P" @@ -3913,10 +3804,9 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest2, testStyleNamedStructureTypes) // PDF 2.0 has a Title type, and heading levels without limit, so Title names its own // elements while H7 and Sub have to give way const auto[aTypes20, aRoles20] = aExport(20); - CPPUNIT_ASSERT_EQUAL(u8"Étude TD Étude TD TR Table" + CPPUNIT_ASSERT_EQUAL(u8"Document Table TR TD Étude TD Étude" " Code-1 Title Index-1 Code1 H-1 THead-1 H7-1 Sub-1 Artifact-1 Code-1-1 " - "H7 Code-2 Code Étude-1" - " Standard Document "_ostr, + "H7 Standard Code-2 Code Étude-1 "_ostr, aTypes20); CPPUNIT_ASSERT_EQUAL( u8"Artifact-1=P Code-1=P Code-1-1=P Code-2=Span Code1=P H-1=P" diff --git a/vcl/qa/cppunit/pdfexport/pdfexport3.cxx b/vcl/qa/cppunit/pdfexport/pdfexport3.cxx index 3958570f1bbb..0f3fed3fc732 100644 --- a/vcl/qa/cppunit/pdfexport/pdfexport3.cxx +++ b/vcl/qa/cppunit/pdfexport/pdfexport3.cxx @@ -95,11 +95,8 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest3, testTdf157397) CPPUNIT_ASSERT_EQUAL(size_t(1), aPages.size()); vcl::filter::PDFObjectElement* pDocument(nullptr); - for (const auto& rDocElement : aDocument.GetElements()) + for (auto* pObject1 : aDocument.GetObjects()) { - auto pObject1 = dynamic_cast(rDocElement.get()); - if (!pObject1) - continue; auto pType1 = dynamic_cast(pObject1->Lookup("Type"_ostr)); if (pType1 && pType1->GetValue() == "StructElem") { @@ -425,11 +422,8 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest3, testTdf135192) CPPUNIT_ASSERT_EQUAL(size_t(1), aPages.size()); int nTable(0); - for (const auto& rDocElement : aDocument.GetElements()) + for (auto* pObject1 : aDocument.GetObjects()) { - auto pObject1 = dynamic_cast(rDocElement.get()); - if (!pObject1) - continue; auto pType1 = dynamic_cast(pObject1->Lookup("Type"_ostr)); if (pType1 && pType1->GetValue() == "StructElem") { @@ -624,11 +618,8 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest3, testTdf154955) CPPUNIT_ASSERT_GREATEREQUAL(1, nArtifacts); int nFigure(0); - for (const auto& rDocElement : aDocument.GetElements()) + for (auto* pObject : aDocument.GetObjects()) { - auto pObject = dynamic_cast(rDocElement.get()); - if (!pObject) - continue; auto pType = dynamic_cast(pObject->Lookup("Type"_ostr)); if (pType && pType->GetValue() == "StructElem") { @@ -693,11 +684,8 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest3, testTdf155190) int nDiv(0); int nFigure(0); - for (const auto& rDocElement : aDocument.GetElements()) + for (auto* pObject1 : aDocument.GetObjects()) { - auto pObject1 = dynamic_cast(rDocElement.get()); - if (!pObject1) - continue; auto pType1 = dynamic_cast(pObject1->Lookup("Type"_ostr)); auto pS1 = dynamic_cast(pObject1->Lookup("S"_ostr)); @@ -829,11 +817,8 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest3, testMediaShapeAnnot) // check ParentTree to find StructElem int nRoots(0); - for (const auto& rDocElement : aDocument.GetElements()) + for (auto* pObject1 : aDocument.GetObjects()) { - auto pObject1 = dynamic_cast(rDocElement.get()); - if (!pObject1) - continue; auto pType1 = dynamic_cast(pObject1->Lookup("Type"_ostr)); if (pType1 && pType1->GetValue() == "StructTreeRoot") { @@ -952,11 +937,8 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest3, testFlyFrameHyperlinkAnnot) // check ParentTree to find StructElem int nRoots(0); - for (const auto& rDocElement : aDocument.GetElements()) + for (auto* pObject1 : aDocument.GetObjects()) { - auto pObject1 = dynamic_cast(rDocElement.get()); - if (!pObject1) - continue; auto pType1 = dynamic_cast(pObject1->Lookup("Type"_ostr)); if (pType1 && pType1->GetValue() == "StructTreeRoot") { @@ -1090,11 +1072,8 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest3, testFormControlAnnot) // check ParentTree to find StructElem int nRoots(0); - for (const auto& rDocElement : aDocument.GetElements()) + for (auto* pObject1 : aDocument.GetObjects()) { - auto pObject1 = dynamic_cast(rDocElement.get()); - if (!pObject1) - continue; auto pType1 = dynamic_cast(pObject1->Lookup("Type"_ostr)); if (pType1 && pType1->GetValue() == "StructTreeRoot") { @@ -1993,11 +1972,8 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest3, testTdf155161) // Check that all fonts in the document are not Type 3 fonts. std::set aFontNames; - for (const auto& aElement : aDocument.GetElements()) + for (auto* pObject : aDocument.GetObjects()) { - auto pObject = dynamic_cast(aElement.get()); - if (!pObject) - continue; auto pType = dynamic_cast(pObject->Lookup("Type"_ostr)); if (pType && pType->GetValue() == "Font") { @@ -2029,11 +2005,8 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest3, testTrueTypeCompositeFont) vcl::filter::PDFObjectElement* pType0 = nullptr; vcl::filter::PDFObjectElement* pCIDFont = nullptr; - for (const auto& aElement : aDocument.GetElements()) + for (auto* pObject : aDocument.GetObjects()) { - auto pObject = dynamic_cast(aElement.get()); - if (!pObject) - continue; auto pType = dynamic_cast(pObject->Lookup("Type"_ostr)); if (!pType || pType->GetValue() != "Font") continue; @@ -2096,11 +2069,8 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest3, testPDFA1CIDSet) CPPUNIT_ASSERT(aDocument.Read(aStream)); vcl::filter::PDFObjectElement* pCIDFont = nullptr; - for (const auto& aElement : aDocument.GetElements()) + for (auto* pObject : aDocument.GetObjects()) { - auto pObject = dynamic_cast(aElement.get()); - if (!pObject) - continue; auto pSubtype = dynamic_cast(pObject->Lookup("Subtype"_ostr)); if (pSubtype && pSubtype->GetValue() == "CIDFontType0") pCIDFont = pObject; @@ -2144,11 +2114,8 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest3, testNoCIDSetWithoutPDFA1) CPPUNIT_ASSERT(aDocument.Read(aStream)); bool bSawDescriptor = false; - for (const auto& aElement : aDocument.GetElements()) + for (auto* pObject : aDocument.GetObjects()) { - auto pObject = dynamic_cast(aElement.get()); - if (!pObject) - continue; auto pType = dynamic_cast(pObject->Lookup("Type"_ostr)); if (!pType || pType->GetValue() != "FontDescriptor") continue; @@ -2173,11 +2140,8 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest3, testTdf171869) vcl::filter::PDFObjectElement* pType0 = nullptr; vcl::filter::PDFObjectElement* pCIDFont = nullptr; int nFonts = 0; - for (const auto& aElement : aDocument.GetElements()) + for (auto* pObject : aDocument.GetObjects()) { - auto pObject = dynamic_cast(aElement.get()); - if (!pObject) - continue; auto pType = dynamic_cast(pObject->Lookup("Type"_ostr)); if (!pType || pType->GetValue() != "Font") continue; diff --git a/vcl/source/filter/ipdf/pdfdocument.cxx b/vcl/source/filter/ipdf/pdfdocument.cxx index d0d3b236bf7b..829b1bd38446 100644 --- a/vcl/source/filter/ipdf/pdfdocument.cxx +++ b/vcl/source/filter/ipdf/pdfdocument.cxx @@ -12,6 +12,7 @@ #include #include +#include #include #include @@ -2059,6 +2060,14 @@ PDFObjectElement* PDFDocument::GetCatalog() return pRoot->LookupObject(); } +std::vector PDFDocument::GetObjects() +{ + // the map holds what the file lists and what ParseStoredObjects unpacked from an object + // stream, so an object is here whether or not it stands in the file + auto aObjects = m_aIDObjects | std::views::values; + return { aObjects.begin(), aObjects.end() }; +} + std::vector PDFDocument::GetPages() { std::vector aRet; From f1b64c69c1fc166a847500b33591affa8c45e01a Mon Sep 17 00:00:00 2001 From: Michael Weghorn Date: Tue, 29 Sep 2026 11:25:50 +0200 Subject: [PATCH 021/289] vcl: Make ImageTree ctor private There's only a single instance of the class that can be retrieved using ImageTree::get. Make the ctor private to clarify that. Change-Id: I75bd6e60e8079f5ddcef49200280fa61bbf1c4ca Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211552 Reviewed-by: Michael Weghorn Tested-by: Jenkins --- include/vcl/ImageTree.hxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/vcl/ImageTree.hxx b/include/vcl/ImageTree.hxx index e183f1090b94..65cfa14b66fd 100644 --- a/include/vcl/ImageTree.hxx +++ b/include/vcl/ImageTree.hxx @@ -56,9 +56,9 @@ class ImageTree private: std::unique_ptr mpImplImageTree; -public: ImageTree(); +public: VCL_DLLPUBLIC static ImageTree & get(); VCL_DLLPUBLIC OUString getImageUrl( From 8937f0d4900738b3cca29cd89a878774153d1760 Mon Sep 17 00:00:00 2001 From: Michael Weghorn Date: Tue, 29 Sep 2026 11:28:30 +0200 Subject: [PATCH 022/289] vcl: Use ImplImageTree member instead of static variable Introduce new ImplImageTree::mbPreferDark member to replace the static variable introduced in commit 3a9ee3a2a78e014967891e945ee790e639c630a3 Date: Sat Sep 26 12:14:17 2026 +0200 Resolve tdf#173739 - Consider dark UI for icon fallback , see also discussion in [1]. There's only a single ImageTree (and therefore) ImplImageTree instance that can be retrieved using ImageTree::get. While at it, also switch the formatting/indentation of the `else if` in ImplImageTree::fallbackStyle to a more conventional one. [1] https://gerrit.libreoffice.org/c/core/+/211478/comments/d66b922c_086d381c Change-Id: Ib5cbcd5ae0e227b4eecad256d69cbd07579d8c73 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211553 Tested-by: Jenkins Reviewed-by: Michael Weghorn --- vcl/inc/implimagetree.hxx | 4 +++- vcl/source/image/ImplImageTree.cxx | 11 ++++------- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/vcl/inc/implimagetree.hxx b/vcl/inc/implimagetree.hxx index 261a62938121..72346180060e 100644 --- a/vcl/inc/implimagetree.hxx +++ b/vcl/inc/implimagetree.hxx @@ -129,6 +129,8 @@ private: /// Style used for the current operations; switches switch several times during fallback search. OUString maCurrentStyle; + bool mbPreferDark; + IconSet& getCurrentIconSet() { return maIconSets[maCurrentStyle]; @@ -162,7 +164,7 @@ private: Must not be cyclic :-) The last theme in the chain returns an empty string. */ - static OUString fallbackStyle(std::u16string_view rStyle); + OUString fallbackStyle(std::u16string_view rStyle); }; /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/vcl/source/image/ImplImageTree.cxx b/vcl/source/image/ImplImageTree.cxx index ac69706fbfb3..6da998815ee7 100644 --- a/vcl/source/image/ImplImageTree.cxx +++ b/vcl/source/image/ImplImageTree.cxx @@ -63,8 +63,6 @@ using namespace css; -static bool bPreferDark; //initialized in ImplImageTree c'tor - bool ImageRequestParameters::convertToDarkTheme() { static bool bIconsForDarkTheme = !!getenv("VCL_ICONS_FOR_DARK_THEME"); @@ -225,7 +223,7 @@ void loadImageFromStream(std::shared_ptr const & xStream, OUString con ImplImageTree::ImplImageTree() { - bPreferDark = ThemeColors::GetThemeColors().GetWindowColor().IsDark(); + mbPreferDark = ThemeColors::GetThemeColors().GetWindowColor().IsDark(); } ImplImageTree::~ImplImageTree() @@ -353,11 +351,10 @@ OUString ImplImageTree::fallbackStyle(std::u16string_view rsStyle) sResult = "breeze_dark"; else if (rsStyle == u"colibre_dark" ) sResult = "colibre"; + else if (mbPreferDark) + sResult = "colibre_dark"; else - if (bPreferDark) - sResult = "colibre_dark"; - else - sResult = "colibre"; + sResult = "colibre"; return sResult; } From 5026a97e2ed96f7e1fe90e59f67d23cf77b25812 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= Date: Tue, 22 Sep 2026 14:41:49 +0000 Subject: [PATCH 023/289] a Java class path entry has to be a plain local file URL MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit with no host and an absolute path follow on from "translate only file URLs" (Change-Id I41076b8af670d673bf29b14c02db0c66744feb0b) Signed-off-by: Caolán McNamara Change-Id: I6025f3e627c51d83479e7f79a53841384b326442 Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/13322 Tested-by: Jenkins CPCI Reviewed-by: Stephan Bergmann Reviewed-by: Michael Stahl (cherry picked from commit cb4680770e2d558fa474fb7d3e3483885941d70a) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211548 Tested-by: Jenkins Reviewed-by: Xisco Fauli --- jvmaccess/source/classpath.cxx | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/jvmaccess/source/classpath.cxx b/jvmaccess/source/classpath.cxx index bb0b16bc0220..b4c6331e6113 100644 --- a/jvmaccess/source/classpath.cxx +++ b/jvmaccess/source/classpath.cxx @@ -33,6 +33,7 @@ #include #include #include +#include #include #include #include @@ -79,7 +80,21 @@ jobjectArray jvmaccess::ClassPath::translateToUrls( } css::uno::Reference< css::uri::XUriReference > uriRef( css::uri::UriReferenceFactory::create(context)->parse(url)); - if (!uriRef.is() || !uriRef->getScheme().equalsIgnoreAsciiCase("file")) + bool bLocal = uriRef.is() && uriRef->getScheme().equalsIgnoreAsciiCase("file"); + if (bLocal && uriRef->hasAuthority()) + { + OUString aAuthority(uriRef->getAuthority()); + bLocal = aAuthority.isEmpty() || aAuthority.equalsIgnoreAsciiCase("localhost"); + } + if (bLocal) + { + // Java reads a path that starts with two separators as a network share name. + OUString aPath(rtl::Uri::decode(uriRef->getPath(), rtl_UriDecodeWithCharset, + RTL_TEXTENCODING_UTF8)); + bLocal = aPath.getLength() >= 2 && aPath[0] == '/' && aPath[1] != '/' + && aPath[1] != '\\'; + } + if (!bLocal) { throw css::lang::IllegalArgumentException( "non-local Java class path entry: " + url, From 20e2c5e315a6c1412085e0d2eb85a2388a6f572f Mon Sep 17 00:00:00 2001 From: Michael Weghorn Date: Tue, 29 Sep 2026 12:07:19 +0200 Subject: [PATCH 024/289] chart2: Don't use ValueSet directly in ChartTypeDialogController So far, ChartTypeDialogController::fillSubTypeList (and its overrides) was clearing all existing entries of the passed ValueSet widget and inserting items for the chart types it handles. Change the logic to return a vector of entries for the corresponding chart types instead and let the callers handle clearing the ValueSet and inserting the entries instead. This way, the ChartTypeDialogControllers don't have to know/rely on the implementation detail what exact widget is used to display the chart types. This can simplify porting away from the use of the custom ValueSet widget in the future, e.g. to weld::IconView. Change-Id: I98b32dee7d67b2a9e8c8474c464cacebb21b717e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211557 Tested-by: Jenkins Reviewed-by: Michael Weghorn --- .../dialogs/ChartTypeDialogController.cxx | 376 +++++++++--------- .../controller/dialogs/tp_ChartType.cxx | 10 +- .../controller/sidebar/ChartTypePanel.cxx | 10 +- .../controller/sidebar/ChartTypePanel.hxx | 2 + .../source/inc/ChartTypeDialogController.hxx | 56 ++- 5 files changed, 242 insertions(+), 212 deletions(-) diff --git a/chart2/source/controller/dialogs/ChartTypeDialogController.cxx b/chart2/source/controller/dialogs/ChartTypeDialogController.cxx index 22f063a3dc97..d628edfb0add 100644 --- a/chart2/source/controller/dialogs/ChartTypeDialogController.cxx +++ b/chart2/source/controller/dialogs/ChartTypeDialogController.cxx @@ -34,8 +34,6 @@ #include -#include -#include #include #include @@ -344,10 +342,12 @@ void ChartTypeDialogController::commitToModel( const ChartTypeParameter& rParame } } -void ChartTypeDialogController::fillSubTypeList( ValueSet& rSubTypeList, const ChartTypeParameter& /*rParameter*/ ) +std::vector +ChartTypeDialogController::getSubTypes(const ChartTypeParameter& /*rParameter*/) { - rSubTypeList.Clear(); + return {}; } + bool ChartTypeDialogController::shouldShow_3DLookControl() const { return false; @@ -432,51 +432,55 @@ const tTemplateServiceChartTypeParameterMap& ColumnChartDialogController::getTem {"com.sun.star.chart2.template.ThreeDColumnDeep" , ChartTypeParameter(4,false,true,GlobalStackMode_STACK_Z)}}; return s_aTemplateMap; } -void ColumnChartDialogController::fillSubTypeList( ValueSet& rSubTypeList, const ChartTypeParameter& rParameter ) +std::vector +ColumnChartDialogController::getSubTypes(const ChartTypeParameter& rParameter) { - rSubTypeList.Clear(); + std::vector aEntries; if( rParameter.b3DLook ) { switch(rParameter.nGeometry3D) { case DataPointGeometry3D::CYLINDER: - rSubTypeList.InsertItem(1, Image(StockImage::Yes, BMP_SAEULE_3D_1)); - rSubTypeList.InsertItem(2, Image(StockImage::Yes, BMP_SAEULE_3D_2)); - rSubTypeList.InsertItem(3, Image(StockImage::Yes, BMP_SAEULE_3D_3)); - rSubTypeList.InsertItem(4, Image(StockImage::Yes, BMP_SAEULE_3D_4)); + aEntries.emplace_back(Image(StockImage::Yes, BMP_SAEULE_3D_1)); + aEntries.emplace_back(Image(StockImage::Yes, BMP_SAEULE_3D_2)); + aEntries.emplace_back(Image(StockImage::Yes, BMP_SAEULE_3D_3)); + aEntries.emplace_back(Image(StockImage::Yes, BMP_SAEULE_3D_4)); break; case DataPointGeometry3D::CONE: - rSubTypeList.InsertItem(1, Image(StockImage::Yes, BMP_KEGEL_3D_1)); - rSubTypeList.InsertItem(2, Image(StockImage::Yes, BMP_KEGEL_3D_2)); - rSubTypeList.InsertItem(3, Image(StockImage::Yes, BMP_KEGEL_3D_3)); - rSubTypeList.InsertItem(4, Image(StockImage::Yes, BMP_KEGEL_3D_4)); + aEntries.emplace_back(Image(StockImage::Yes, BMP_KEGEL_3D_1)); + aEntries.emplace_back(Image(StockImage::Yes, BMP_KEGEL_3D_2)); + aEntries.emplace_back(Image(StockImage::Yes, BMP_KEGEL_3D_3)); + aEntries.emplace_back(Image(StockImage::Yes, BMP_KEGEL_3D_4)); break; case DataPointGeometry3D::PYRAMID: - rSubTypeList.InsertItem(1, Image(StockImage::Yes, BMP_PYRAMID_3D_1)); - rSubTypeList.InsertItem(2, Image(StockImage::Yes, BMP_PYRAMID_3D_2)); - rSubTypeList.InsertItem(3, Image(StockImage::Yes, BMP_PYRAMID_3D_3)); - rSubTypeList.InsertItem(4, Image(StockImage::Yes, BMP_PYRAMID_3D_4)); + aEntries.emplace_back(Image(StockImage::Yes, BMP_PYRAMID_3D_1)); + aEntries.emplace_back(Image(StockImage::Yes, BMP_PYRAMID_3D_2)); + aEntries.emplace_back(Image(StockImage::Yes, BMP_PYRAMID_3D_3)); + aEntries.emplace_back(Image(StockImage::Yes, BMP_PYRAMID_3D_4)); break; default: //DataPointGeometry3D::CUBOID: - rSubTypeList.InsertItem(1, Image(StockImage::Yes, BMP_COLUMNS_3D_1)); - rSubTypeList.InsertItem(2, Image(StockImage::Yes, BMP_COLUMNS_3D_2)); - rSubTypeList.InsertItem(3, Image(StockImage::Yes, BMP_COLUMNS_3D_3)); - rSubTypeList.InsertItem(4, Image(StockImage::Yes, BMP_COLUMNS_3D)); + aEntries.emplace_back(Image(StockImage::Yes, BMP_COLUMNS_3D_1)); + aEntries.emplace_back(Image(StockImage::Yes, BMP_COLUMNS_3D_2)); + aEntries.emplace_back(Image(StockImage::Yes, BMP_COLUMNS_3D_3)); + aEntries.emplace_back(Image(StockImage::Yes, BMP_COLUMNS_3D)); break; } } else { - rSubTypeList.InsertItem(1, Image(StockImage::Yes, BMP_COLUMNS_2D_1)); - rSubTypeList.InsertItem(2, Image(StockImage::Yes, BMP_COLUMNS_2D_2)); - rSubTypeList.InsertItem(3, Image(StockImage::Yes, BMP_COLUMNS_2D_3)); + aEntries.emplace_back(Image(StockImage::Yes, BMP_COLUMNS_2D_1)); + aEntries.emplace_back(Image(StockImage::Yes, BMP_COLUMNS_2D_2)); + aEntries.emplace_back(Image(StockImage::Yes, BMP_COLUMNS_2D_3)); } - rSubTypeList.SetItemText( 1, SchResId( STR_NORMAL ) ); - rSubTypeList.SetItemText( 2, SchResId( STR_STACKED ) ); - rSubTypeList.SetItemText( 3, SchResId( STR_PERCENT ) ); - rSubTypeList.SetItemText( 4, SchResId( STR_DEEP ) ); + aEntries.at(0).sName = SchResId(STR_NORMAL); + aEntries.at(1).sName = SchResId(STR_STACKED); + aEntries.at(2).sName = SchResId(STR_PERCENT); + if (aEntries.size() > 3) + aEntries.at(3).sName = SchResId(STR_DEEP); + + return aEntries; } BarChartDialogController::BarChartDialogController() @@ -509,50 +513,54 @@ const tTemplateServiceChartTypeParameterMap& BarChartDialogController::getTempla {"com.sun.star.chart2.template.ThreeDBarDeep" , ChartTypeParameter(4,false,true,GlobalStackMode_STACK_Z)}}; return s_aTemplateMap; } -void BarChartDialogController::fillSubTypeList( ValueSet& rSubTypeList, const ChartTypeParameter& rParameter ) +std::vector +BarChartDialogController::getSubTypes(const ChartTypeParameter& rParameter) { - rSubTypeList.Clear(); + std::vector aEntries; if( rParameter.b3DLook ) { switch(rParameter.nGeometry3D) { case DataPointGeometry3D::CYLINDER: - rSubTypeList.InsertItem(1, Image(StockImage::Yes, BMP_ROEHRE_3D_1)); - rSubTypeList.InsertItem(2, Image(StockImage::Yes, BMP_ROEHRE_3D_2)); - rSubTypeList.InsertItem(3, Image(StockImage::Yes, BMP_ROEHRE_3D_3)); - rSubTypeList.InsertItem(4, Image(StockImage::Yes, BMP_ROEHRE_3D_4)); + aEntries.emplace_back(Image(StockImage::Yes, BMP_ROEHRE_3D_1)); + aEntries.emplace_back(Image(StockImage::Yes, BMP_ROEHRE_3D_2)); + aEntries.emplace_back(Image(StockImage::Yes, BMP_ROEHRE_3D_3)); + aEntries.emplace_back(Image(StockImage::Yes, BMP_ROEHRE_3D_4)); break; case DataPointGeometry3D::CONE: - rSubTypeList.InsertItem(1, Image(StockImage::Yes, BMP_KEGELQ_3D_1)); - rSubTypeList.InsertItem(2, Image(StockImage::Yes, BMP_KEGELQ_3D_2)); - rSubTypeList.InsertItem(3, Image(StockImage::Yes, BMP_KEGELQ_3D_3)); - rSubTypeList.InsertItem(4, Image(StockImage::Yes, BMP_KEGELQ_3D_4)); + aEntries.emplace_back(Image(StockImage::Yes, BMP_KEGELQ_3D_1)); + aEntries.emplace_back(Image(StockImage::Yes, BMP_KEGELQ_3D_2)); + aEntries.emplace_back(Image(StockImage::Yes, BMP_KEGELQ_3D_3)); + aEntries.emplace_back(Image(StockImage::Yes, BMP_KEGELQ_3D_4)); break; case DataPointGeometry3D::PYRAMID: - rSubTypeList.InsertItem(1, Image(StockImage::Yes, BMP_PYRAMIDQ_3D_1)); - rSubTypeList.InsertItem(2, Image(StockImage::Yes, BMP_PYRAMIDQ_3D_2)); - rSubTypeList.InsertItem(3, Image(StockImage::Yes, BMP_PYRAMIDQ_3D_3)); - rSubTypeList.InsertItem(4, Image(StockImage::Yes, BMP_PYRAMIDQ_3D_4)); + aEntries.emplace_back(Image(StockImage::Yes, BMP_PYRAMIDQ_3D_1)); + aEntries.emplace_back(Image(StockImage::Yes, BMP_PYRAMIDQ_3D_2)); + aEntries.emplace_back(Image(StockImage::Yes, BMP_PYRAMIDQ_3D_3)); + aEntries.emplace_back(Image(StockImage::Yes, BMP_PYRAMIDQ_3D_4)); break; default: //DataPointGeometry3D::CUBOID: - rSubTypeList.InsertItem(1, Image(StockImage::Yes, BMP_BARS_3D_1)); - rSubTypeList.InsertItem(2, Image(StockImage::Yes, BMP_BARS_3D_2)); - rSubTypeList.InsertItem(3, Image(StockImage::Yes, BMP_BARS_3D_3)); - rSubTypeList.InsertItem(4, Image(StockImage::Yes, BMP_BARS_3D)); + aEntries.emplace_back(Image(StockImage::Yes, BMP_BARS_3D_1)); + aEntries.emplace_back(Image(StockImage::Yes, BMP_BARS_3D_2)); + aEntries.emplace_back(Image(StockImage::Yes, BMP_BARS_3D_3)); + aEntries.emplace_back(Image(StockImage::Yes, BMP_BARS_3D)); break; } } else { - rSubTypeList.InsertItem(1, Image(StockImage::Yes, BMP_BARS_2D_1)); - rSubTypeList.InsertItem(2, Image(StockImage::Yes, BMP_BARS_2D_2)); - rSubTypeList.InsertItem(3, Image(StockImage::Yes, BMP_BARS_2D_3)); + aEntries.emplace_back(Image(StockImage::Yes, BMP_BARS_2D_1)); + aEntries.emplace_back(Image(StockImage::Yes, BMP_BARS_2D_2)); + aEntries.emplace_back(Image(StockImage::Yes, BMP_BARS_2D_3)); } - rSubTypeList.SetItemText( 1, SchResId( STR_NORMAL ) ); - rSubTypeList.SetItemText( 2, SchResId( STR_STACKED ) ); - rSubTypeList.SetItemText( 3, SchResId( STR_PERCENT ) ); - rSubTypeList.SetItemText( 4, SchResId( STR_DEEP ) ); + aEntries.at(0).sName = SchResId(STR_NORMAL); + aEntries.at(1).sName = SchResId(STR_STACKED); + aEntries.at(2).sName = SchResId(STR_PERCENT); + if (aEntries.size() > 3) + aEntries.at(3).sName = SchResId(STR_DEEP); + + return aEntries; } //========= @@ -586,12 +594,10 @@ const tTemplateServiceChartTypeParameterMap& HistogramChartDialogController::get return s_aTemplateMap; } -void HistogramChartDialogController::fillSubTypeList(ValueSet& rSubTypeList, - const ChartTypeParameter& /*rParameter*/) +std::vector +HistogramChartDialogController::getSubTypes(const ChartTypeParameter& /*rParameter*/) { - rSubTypeList.Clear(); - rSubTypeList.InsertItem(1, Image(StockImage::Yes, BMP_HISTOGRAM)); - rSubTypeList.SetItemText(1, SchResId(STR_HISTOGRAM)); + return { { Image(StockImage::Yes, BMP_HISTOGRAM), SchResId(STR_HISTOGRAM) } }; } @@ -637,28 +643,31 @@ const tTemplateServiceChartTypeParameterMap& PieChartDialogController::getTempla {"com.sun.star.chart2.template.ThreeDDonutAllExploded" , ChartTypeParameter(4,false,true)}}; return s_aTemplateMap; } -void PieChartDialogController::fillSubTypeList( ValueSet& rSubTypeList, const ChartTypeParameter& rParameter ) +std::vector +PieChartDialogController::getSubTypes(const ChartTypeParameter& rParameter) { - rSubTypeList.Clear(); + std::vector aEntries; if( rParameter.b3DLook ) { - rSubTypeList.InsertItem(1, Image(StockImage::Yes, BMP_CIRCLES_3D)); - rSubTypeList.InsertItem(2, Image(StockImage::Yes, BMP_CIRCLES_3D_EXPLODED)); - rSubTypeList.InsertItem(3, Image(StockImage::Yes, BMP_DONUT_3D)); - rSubTypeList.InsertItem(4, Image(StockImage::Yes, BMP_DONUT_3D_EXPLODED)); + aEntries.emplace_back(Image(StockImage::Yes, BMP_CIRCLES_3D)); + aEntries.emplace_back(Image(StockImage::Yes, BMP_CIRCLES_3D_EXPLODED)); + aEntries.emplace_back(Image(StockImage::Yes, BMP_DONUT_3D)); + aEntries.emplace_back(Image(StockImage::Yes, BMP_DONUT_3D_EXPLODED)); } else { - rSubTypeList.InsertItem(1, Image(StockImage::Yes, BMP_CIRCLES_2D)); - rSubTypeList.InsertItem(2, Image(StockImage::Yes, BMP_CIRCLES_2D_EXPLODED)); - rSubTypeList.InsertItem(3, Image(StockImage::Yes, BMP_DONUT_2D)); - rSubTypeList.InsertItem(4, Image(StockImage::Yes, BMP_DONUT_2D_EXPLODED)); + aEntries.emplace_back(Image(StockImage::Yes, BMP_CIRCLES_2D)); + aEntries.emplace_back(Image(StockImage::Yes, BMP_CIRCLES_2D_EXPLODED)); + aEntries.emplace_back(Image(StockImage::Yes, BMP_DONUT_2D)); + aEntries.emplace_back(Image(StockImage::Yes, BMP_DONUT_2D_EXPLODED)); } - rSubTypeList.SetItemText( 1, SchResId( STR_NORMAL ) ); - rSubTypeList.SetItemText( 2, SchResId( STR_PIE_EXPLODED ) ); - rSubTypeList.SetItemText( 3, SchResId( STR_DONUT ) ); - rSubTypeList.SetItemText( 4, SchResId( STR_DONUT_EXPLODED ) ); + aEntries.at(0).sName = SchResId(STR_NORMAL); + aEntries.at(1).sName = SchResId(STR_PIE_EXPLODED); + aEntries.at(2).sName = SchResId(STR_DONUT); + aEntries.at(3).sName = SchResId(STR_DONUT_EXPLODED); + + return aEntries; } bool PieChartDialogController::shouldShow_3DLookControl() const @@ -701,14 +710,12 @@ const tTemplateServiceChartTypeParameterMap& OfPieChartDialogController::getTemp {"com.sun.star.chart2.template.PieOfPie" , ChartTypeParameter(2,false,false)}}; return s_aTemplateMap; } -void OfPieChartDialogController::fillSubTypeList( ValueSet& rSubTypeList, const ChartTypeParameter& /*rParameter*/ ) -{ - rSubTypeList.Clear(); - rSubTypeList.InsertItem(1, Image(StockImage::Yes, BMP_BAR_OF_PIE)); - rSubTypeList.InsertItem(2, Image(StockImage::Yes, BMP_PIE_OF_PIE)); - rSubTypeList.SetItemText( 1, SchResId( STR_BAR_OF_PIE ) ); - rSubTypeList.SetItemText( 2, SchResId( STR_PIE_OF_PIE ) ); +std::vector +OfPieChartDialogController::getSubTypes(const ChartTypeParameter& /*rParameter*/) +{ + return { { Image(StockImage::Yes, BMP_BAR_OF_PIE), SchResId(STR_BAR_OF_PIE) }, + { Image(StockImage::Yes, BMP_PIE_OF_PIE), SchResId(STR_PIE_OF_PIE) } }; } bool OfPieChartDialogController::shouldShow_3DLookControl() const @@ -861,9 +868,11 @@ const tTemplateServiceChartTypeParameterMap& LineChartDialogController::getTempl {"com.sun.star.chart2.template.ThreeDLineDeep" , ChartTypeParameter(4,false,true,GlobalStackMode_STACK_Z,false,true)}}; return s_aTemplateMap; } -void LineChartDialogController::fillSubTypeList( ValueSet& rSubTypeList, const ChartTypeParameter& rParameter ) + +std::vector +LineChartDialogController::getSubTypes(const ChartTypeParameter& rParameter) { - rSubTypeList.Clear(); + std::vector aEntries; switch( rParameter.eCurveStyle ) { @@ -871,17 +880,17 @@ void LineChartDialogController::fillSubTypeList( ValueSet& rSubTypeList, const C case CurveStyle_B_SPLINES: if( rParameter.eStackMode == GlobalStackMode_NONE || rParameter.eStackMode == GlobalStackMode_STACK_Z ) { - rSubTypeList.InsertItem(1, Image(StockImage::Yes, BMP_POINTS_XCATEGORY)); - rSubTypeList.InsertItem(2, Image(StockImage::Yes, BMP_LINE_P_XCATEGORY_SMOOTH)); - rSubTypeList.InsertItem(3, Image(StockImage::Yes, BMP_LINE_O_XCATEGORY_SMOOTH)); - rSubTypeList.InsertItem(4, Image(StockImage::Yes, BMP_LINE3D_XCATEGORY_SMOOTH)); + aEntries.emplace_back(Image(StockImage::Yes, BMP_POINTS_XCATEGORY)); + aEntries.emplace_back(Image(StockImage::Yes, BMP_LINE_P_XCATEGORY_SMOOTH)); + aEntries.emplace_back(Image(StockImage::Yes, BMP_LINE_O_XCATEGORY_SMOOTH)); + aEntries.emplace_back(Image(StockImage::Yes, BMP_LINE3D_XCATEGORY_SMOOTH)); } else { - rSubTypeList.InsertItem(1, Image(StockImage::Yes, BMP_POINTS_STACKED)); - rSubTypeList.InsertItem(2, Image(StockImage::Yes, BMP_LINE_P_STACKED_SMOOTH)); - rSubTypeList.InsertItem(3, Image(StockImage::Yes, BMP_LINE_O_STACKED_SMOOTH)); - rSubTypeList.InsertItem(4, Image(StockImage::Yes, BMP_LINE3D_STACKED_SMOOTH)); + aEntries.emplace_back(Image(StockImage::Yes, BMP_POINTS_STACKED)); + aEntries.emplace_back(Image(StockImage::Yes, BMP_LINE_P_STACKED_SMOOTH)); + aEntries.emplace_back(Image(StockImage::Yes, BMP_LINE_O_STACKED_SMOOTH)); + aEntries.emplace_back(Image(StockImage::Yes, BMP_LINE3D_STACKED_SMOOTH)); } break; case CurveStyle_STEP_START: @@ -890,42 +899,45 @@ void LineChartDialogController::fillSubTypeList( ValueSet& rSubTypeList, const C case CurveStyle_STEP_CENTER_Y: if( rParameter.eStackMode == GlobalStackMode_NONE || rParameter.eStackMode == GlobalStackMode_STACK_Z ) { - rSubTypeList.InsertItem(1, Image(StockImage::Yes, BMP_POINTS_XCATEGORY)); - rSubTypeList.InsertItem(2, Image(StockImage::Yes, BMP_LINE_P_XCATEGORY_STEPPED)); - rSubTypeList.InsertItem(3, Image(StockImage::Yes, BMP_LINE_O_XCATEGORY_STEPPED)); - rSubTypeList.InsertItem(4, Image(StockImage::Yes, BMP_LINE3D_XCATEGORY_STEPPED)); + aEntries.emplace_back(Image(StockImage::Yes, BMP_POINTS_XCATEGORY)); + aEntries.emplace_back(Image(StockImage::Yes, BMP_LINE_P_XCATEGORY_STEPPED)); + aEntries.emplace_back(Image(StockImage::Yes, BMP_LINE_O_XCATEGORY_STEPPED)); + aEntries.emplace_back(Image(StockImage::Yes, BMP_LINE3D_XCATEGORY_STEPPED)); } else { - rSubTypeList.InsertItem(1, Image(StockImage::Yes, BMP_POINTS_STACKED)); - rSubTypeList.InsertItem(2, Image(StockImage::Yes, BMP_LINE_P_STACKED_STEPPED)); - rSubTypeList.InsertItem(3, Image(StockImage::Yes, BMP_LINE_O_STACKED_STEPPED)); - rSubTypeList.InsertItem(4, Image(StockImage::Yes, BMP_LINE3D_STACKED_STEPPED)); + aEntries.emplace_back(Image(StockImage::Yes, BMP_POINTS_STACKED)); + aEntries.emplace_back(Image(StockImage::Yes, BMP_LINE_P_STACKED_STEPPED)); + aEntries.emplace_back(Image(StockImage::Yes, BMP_LINE_O_STACKED_STEPPED)); + aEntries.emplace_back(Image(StockImage::Yes, BMP_LINE3D_STACKED_STEPPED)); } break; default: // includes CurveStyle_LINES //direct lines if( rParameter.eStackMode == GlobalStackMode_NONE || rParameter.eStackMode == GlobalStackMode_STACK_Z ) { - rSubTypeList.InsertItem(1, Image(StockImage::Yes, BMP_POINTS_XCATEGORY)); - rSubTypeList.InsertItem(2, Image(StockImage::Yes, BMP_LINE_P_XCATEGORY)); - rSubTypeList.InsertItem(3, Image(StockImage::Yes, BMP_LINE_O_XCATEGORY)); - rSubTypeList.InsertItem(4, Image(StockImage::Yes, BMP_LINE3D_XCATEGORY)); + aEntries.emplace_back(Image(StockImage::Yes, BMP_POINTS_XCATEGORY)); + aEntries.emplace_back(Image(StockImage::Yes, BMP_LINE_P_XCATEGORY)); + aEntries.emplace_back(Image(StockImage::Yes, BMP_LINE_O_XCATEGORY)); + aEntries.emplace_back(Image(StockImage::Yes, BMP_LINE3D_XCATEGORY)); } else { - rSubTypeList.InsertItem(1, Image(StockImage::Yes, BMP_POINTS_STACKED)); - rSubTypeList.InsertItem(2, Image(StockImage::Yes, BMP_LINE_P_STACKED)); - rSubTypeList.InsertItem(3, Image(StockImage::Yes, BMP_LINE_O_STACKED)); - rSubTypeList.InsertItem(4, Image(StockImage::Yes, BMP_LINE3D_STACKED)); + aEntries.emplace_back(Image(StockImage::Yes, BMP_POINTS_STACKED)); + aEntries.emplace_back(Image(StockImage::Yes, BMP_LINE_P_STACKED)); + aEntries.emplace_back(Image(StockImage::Yes, BMP_LINE_O_STACKED)); + aEntries.emplace_back(Image(StockImage::Yes, BMP_LINE3D_STACKED)); } } - rSubTypeList.SetItemText( 1, SchResId( STR_POINTS_ONLY ) ); - rSubTypeList.SetItemText( 2, SchResId( STR_POINTS_AND_LINES ) ); - rSubTypeList.SetItemText( 3, SchResId( STR_LINES_ONLY ) ); - rSubTypeList.SetItemText( 4, SchResId( STR_LINES_3D ) ); + aEntries.at(0).sName = SchResId(STR_POINTS_ONLY); + aEntries.at(1).sName = SchResId(STR_POINTS_AND_LINES); + aEntries.at(2).sName = SchResId(STR_LINES_ONLY); + aEntries.at(3).sName = SchResId(STR_LINES_3D); + + return aEntries; } + bool LineChartDialogController::shouldShow_StackingControl() const { return true; @@ -1001,19 +1013,20 @@ const tTemplateServiceChartTypeParameterMap& XYChartDialogController::getTemplat return s_aTemplateMap; } -void XYChartDialogController::fillSubTypeList( ValueSet& rSubTypeList, const ChartTypeParameter& rParameter ) +std::vector +XYChartDialogController::getSubTypes(const ChartTypeParameter& rParameter) { - rSubTypeList.Clear(); + std::vector aEntries; switch (rParameter.eCurveStyle) { case CurveStyle_CUBIC_SPLINES: case CurveStyle_B_SPLINES: { - rSubTypeList.InsertItem(1, Image(StockImage::Yes, BMP_POINTS_XVALUES)); - rSubTypeList.InsertItem(2, Image(StockImage::Yes, BMP_LINE_P_XVALUES_SMOOTH)); - rSubTypeList.InsertItem(3, Image(StockImage::Yes, BMP_LINE_O_XVALUES_SMOOTH)); - rSubTypeList.InsertItem(4, Image(StockImage::Yes, BMP_LINE3D_XVALUES_SMOOTH)); + aEntries.emplace_back(Image(StockImage::Yes, BMP_POINTS_XVALUES)); + aEntries.emplace_back(Image(StockImage::Yes, BMP_LINE_P_XVALUES_SMOOTH)); + aEntries.emplace_back(Image(StockImage::Yes, BMP_LINE_O_XVALUES_SMOOTH)); + aEntries.emplace_back(Image(StockImage::Yes, BMP_LINE3D_XVALUES_SMOOTH)); break; } case CurveStyle_STEP_START: @@ -1021,24 +1034,27 @@ void XYChartDialogController::fillSubTypeList( ValueSet& rSubTypeList, const Cha case CurveStyle_STEP_CENTER_X: case CurveStyle_STEP_CENTER_Y: { - rSubTypeList.InsertItem(1, Image(StockImage::Yes, BMP_POINTS_XVALUES)); - rSubTypeList.InsertItem(2, Image(StockImage::Yes, BMP_LINE_P_XVALUES_STEPPED)); - rSubTypeList.InsertItem(3, Image(StockImage::Yes, BMP_LINE_O_XVALUES_STEPPED)); - rSubTypeList.InsertItem(4, Image(StockImage::Yes, BMP_LINE3D_XVALUES_STEPPED)); + aEntries.emplace_back(Image(StockImage::Yes, BMP_POINTS_XVALUES)); + aEntries.emplace_back(Image(StockImage::Yes, BMP_LINE_P_XVALUES_STEPPED)); + aEntries.emplace_back(Image(StockImage::Yes, BMP_LINE_O_XVALUES_STEPPED)); + aEntries.emplace_back(Image(StockImage::Yes, BMP_LINE3D_XVALUES_STEPPED)); break; } default: // includes CurveStyle_LINES - rSubTypeList.InsertItem(1, Image(StockImage::Yes, BMP_POINTS_XVALUES)); - rSubTypeList.InsertItem(2, Image(StockImage::Yes, BMP_LINE_P_XVALUES)); - rSubTypeList.InsertItem(3, Image(StockImage::Yes, BMP_LINE_O_XVALUES)); - rSubTypeList.InsertItem(4, Image(StockImage::Yes, BMP_LINE3D_XVALUES)); + aEntries.emplace_back(Image(StockImage::Yes, BMP_POINTS_XVALUES)); + aEntries.emplace_back(Image(StockImage::Yes, BMP_LINE_P_XVALUES)); + aEntries.emplace_back(Image(StockImage::Yes, BMP_LINE_O_XVALUES)); + aEntries.emplace_back(Image(StockImage::Yes, BMP_LINE3D_XVALUES)); } - rSubTypeList.SetItemText( 1, SchResId( STR_POINTS_ONLY ) ); - rSubTypeList.SetItemText( 2, SchResId( STR_POINTS_AND_LINES ) ); - rSubTypeList.SetItemText( 3, SchResId( STR_LINES_ONLY ) ); - rSubTypeList.SetItemText( 4, SchResId( STR_LINES_3D ) ); + aEntries.at(0).sName = SchResId(STR_POINTS_ONLY); + aEntries.at(1).sName = SchResId(STR_POINTS_AND_LINES); + aEntries.at(2).sName = SchResId(STR_LINES_ONLY); + aEntries.at(3).sName = SchResId(STR_LINES_3D); + + return aEntries; } + bool XYChartDialogController::shouldShow_SplineControl() const { return true; @@ -1111,27 +1127,31 @@ const tTemplateServiceChartTypeParameterMap& AreaChartDialogController::getTempl return s_aTemplateMap; } -void AreaChartDialogController::fillSubTypeList( ValueSet& rSubTypeList, const ChartTypeParameter& rParameter ) +std::vector +AreaChartDialogController::getSubTypes(const ChartTypeParameter& rParameter) { - rSubTypeList.Clear(); + std::vector aEntries; if( rParameter.b3DLook ) { - rSubTypeList.InsertItem(1, Image(StockImage::Yes, BMP_AREAS_3D)); - rSubTypeList.InsertItem(2, Image(StockImage::Yes, BMP_AREAS_3D_1)); - rSubTypeList.InsertItem(3, Image(StockImage::Yes, BMP_AREAS_3D_2)); + aEntries.emplace_back(Image(StockImage::Yes, BMP_AREAS_3D)); + aEntries.emplace_back(Image(StockImage::Yes, BMP_AREAS_3D_1)); + aEntries.emplace_back(Image(StockImage::Yes, BMP_AREAS_3D_2)); } else { - rSubTypeList.InsertItem(1, Image(StockImage::Yes, BMP_AREAS_2D_1)); - rSubTypeList.InsertItem(2, Image(StockImage::Yes, BMP_AREAS_2D)); - rSubTypeList.InsertItem(3, Image(StockImage::Yes, BMP_AREAS_2D_3)); + aEntries.emplace_back(Image(StockImage::Yes, BMP_AREAS_2D_1)); + aEntries.emplace_back(Image(StockImage::Yes, BMP_AREAS_2D)); + aEntries.emplace_back(Image(StockImage::Yes, BMP_AREAS_2D_3)); } - rSubTypeList.SetItemText( 1, SchResId( rParameter.b3DLook ? STR_DEEP : STR_NORMAL ) ); - rSubTypeList.SetItemText( 2, SchResId( STR_STACKED ) ); - rSubTypeList.SetItemText( 3, SchResId( STR_PERCENT ) ); + aEntries.at(0).sName = SchResId(rParameter.b3DLook ? STR_DEEP : STR_NORMAL); + aEntries.at(1).sName = SchResId(STR_STACKED); + aEntries.at(2).sName = SchResId(STR_PERCENT); + + return aEntries; } + void AreaChartDialogController::adjustParameterToSubType( ChartTypeParameter& rParameter ) { rParameter.eCurveStyle = CurveStyle_LINES; @@ -1207,30 +1227,35 @@ const tTemplateServiceChartTypeParameterMap& NetChartDialogController::getTempla {"com.sun.star.chart2.template.PercentStackedFilledNet" ,ChartTypeParameter(4,false,false,GlobalStackMode_STACK_Y_PERCENT,false,false)}}; return s_aTemplateMap; } -void NetChartDialogController::fillSubTypeList( ValueSet& rSubTypeList, const ChartTypeParameter& rParameter ) + +std::vector +NetChartDialogController::getSubTypes(const ChartTypeParameter& rParameter) { - rSubTypeList.Clear(); + std::vector aEntries; if( rParameter.eStackMode == GlobalStackMode_NONE ) { - rSubTypeList.InsertItem(1, Image(StockImage::Yes, BMP_NET_SYMB)); - rSubTypeList.InsertItem(2, Image(StockImage::Yes, BMP_NET_LINESYMB)); - rSubTypeList.InsertItem(3, Image(StockImage::Yes, BMP_NET)); - rSubTypeList.InsertItem(4, Image(StockImage::Yes, BMP_NET_FILL)); + aEntries.emplace_back(Image(StockImage::Yes, BMP_NET_SYMB)); + aEntries.emplace_back(Image(StockImage::Yes, BMP_NET_LINESYMB)); + aEntries.emplace_back(Image(StockImage::Yes, BMP_NET)); + aEntries.emplace_back(Image(StockImage::Yes, BMP_NET_FILL)); } else { - rSubTypeList.InsertItem(1, Image(StockImage::Yes, BMP_NET_SYMB_STACK)); - rSubTypeList.InsertItem(2, Image(StockImage::Yes, BMP_NET_LINESYMB_STACK)); - rSubTypeList.InsertItem(3, Image(StockImage::Yes, BMP_NET_STACK)); - rSubTypeList.InsertItem(4, Image(StockImage::Yes, BMP_NET_FILL_STACK)); + aEntries.emplace_back(Image(StockImage::Yes, BMP_NET_SYMB_STACK)); + aEntries.emplace_back(Image(StockImage::Yes, BMP_NET_LINESYMB_STACK)); + aEntries.emplace_back(Image(StockImage::Yes, BMP_NET_STACK)); + aEntries.emplace_back(Image(StockImage::Yes, BMP_NET_FILL_STACK)); } - rSubTypeList.SetItemText( 1, SchResId( STR_POINTS_ONLY ) ); - rSubTypeList.SetItemText( 2, SchResId( STR_POINTS_AND_LINES ) ); - rSubTypeList.SetItemText( 3, SchResId( STR_LINES_ONLY ) ); - rSubTypeList.SetItemText( 4, SchResId( STR_FILLED ) ); + aEntries.at(0).sName = SchResId(STR_POINTS_ONLY); + aEntries.at(1).sName = SchResId(STR_POINTS_AND_LINES); + aEntries.at(2).sName = SchResId(STR_LINES_ONLY); + aEntries.at(3).sName = SchResId(STR_FILLED); + + return aEntries; } + void NetChartDialogController::adjustParameterToSubType( ChartTypeParameter& rParameter ) { rParameter.b3DLook = false; @@ -1286,18 +1311,13 @@ const tTemplateServiceChartTypeParameterMap& StockChartDialogController::getTemp return s_aTemplateMap; } -void StockChartDialogController::fillSubTypeList( ValueSet& rSubTypeList, const ChartTypeParameter& /*rParameter*/ ) +std::vector +StockChartDialogController::getSubTypes(const ChartTypeParameter& /*rParameter*/) { - rSubTypeList.Clear(); - rSubTypeList.InsertItem(1, Image(StockImage::Yes, BMP_STOCK_1)); - rSubTypeList.InsertItem(2, Image(StockImage::Yes, BMP_STOCK_2)); - rSubTypeList.InsertItem(3, Image(StockImage::Yes, BMP_STOCK_3)); - rSubTypeList.InsertItem(4, Image(StockImage::Yes, BMP_STOCK_4)); - - rSubTypeList.SetItemText( 1, SchResId(STR_STOCK_1) ); - rSubTypeList.SetItemText( 2, SchResId(STR_STOCK_2) ); - rSubTypeList.SetItemText( 3, SchResId(STR_STOCK_3) ); - rSubTypeList.SetItemText( 4, SchResId(STR_STOCK_4) ); + return { { Image(StockImage::Yes, BMP_STOCK_1), SchResId(STR_STOCK_1) }, + { Image(StockImage::Yes, BMP_STOCK_2), SchResId(STR_STOCK_2) }, + { Image(StockImage::Yes, BMP_STOCK_3), SchResId(STR_STOCK_3) }, + { Image(StockImage::Yes, BMP_STOCK_4), SchResId(STR_STOCK_4) } }; } void StockChartDialogController::adjustParameterToSubType( ChartTypeParameter& rParameter ) @@ -1329,14 +1349,12 @@ const tTemplateServiceChartTypeParameterMap& CombiColumnLineChartDialogControlle return s_aTemplateMap; } -void CombiColumnLineChartDialogController::fillSubTypeList( ValueSet& rSubTypeList, const ChartTypeParameter& /*rParameter*/ ) +std::vector +CombiColumnLineChartDialogController::getSubTypes(const ChartTypeParameter& /*rParameter*/) { - rSubTypeList.Clear(); - rSubTypeList.InsertItem(1, Image(StockImage::Yes, BMP_COLUMN_LINE)); - rSubTypeList.InsertItem(2, Image(StockImage::Yes, BMP_COLUMN_LINE_STACKED)); - - rSubTypeList.SetItemText(1, SchResId(STR_LINE_COLUMN)); - rSubTypeList.SetItemText(2, SchResId(STR_LINE_STACKEDCOLUMN)); + return { { Image(StockImage::Yes, BMP_COLUMN_LINE), SchResId(STR_LINE_COLUMN) }, + { Image(StockImage::Yes, BMP_COLUMN_LINE_STACKED), + SchResId(STR_LINE_STACKEDCOLUMN) } }; } void CombiColumnLineChartDialogController::showExtraControls(weld::Builder* pBuilder) @@ -1462,12 +1480,10 @@ const tTemplateServiceChartTypeParameterMap& return s_aTemplateMap; } -void CorrelationCircleChartDialogController::fillSubTypeList( ValueSet& rSubTypeList, const ChartTypeParameter& /*rParameter*/ ) +std::vector +CorrelationCircleChartDialogController::getSubTypes(const ChartTypeParameter& /*rParameter*/) { - rSubTypeList.Clear(); - - rSubTypeList.InsertItem(1, Image(StockImage::Yes, BMP_CORRELATION_CIRCLE)); - rSubTypeList.SetItemText(1, SchResId(STR_CORRELATION_CIRCLE)); + return { { Image(StockImage::Yes, BMP_CORRELATION_CIRCLE), SchResId(STR_CORRELATION_CIRCLE) } }; } void CorrelationCircleChartDialogController::adjustParameterToSubType( ChartTypeParameter& rParameter ) @@ -1505,12 +1521,10 @@ const tTemplateServiceChartTypeParameterMap& BubbleChartDialogController::getTem {"com.sun.star.chart2.template.Bubble" , ChartTypeParameter(1,true)}}; return s_aTemplateMap; } -void BubbleChartDialogController::fillSubTypeList( ValueSet& rSubTypeList, const ChartTypeParameter& /*rParameter*/ ) +std::vector +BubbleChartDialogController::getSubTypes(const ChartTypeParameter& /*rParameter*/) { - rSubTypeList.Clear(); - rSubTypeList.InsertItem(1, Image(StockImage::Yes, BMP_BUBBLE_1)); - - rSubTypeList.SetItemText( 1, SchResId(STR_BUBBLE_1) ); + return { { Image(StockImage::Yes, BMP_BUBBLE_1), SchResId(STR_BUBBLE_1) } }; } void BubbleChartDialogController::adjustParameterToSubType( ChartTypeParameter& rParameter ) { diff --git a/chart2/source/controller/dialogs/tp_ChartType.cxx b/chart2/source/controller/dialogs/tp_ChartType.cxx index 17229e5b0f36..e4d10a9d1d02 100644 --- a/chart2/source/controller/dialogs/tp_ChartType.cxx +++ b/chart2/source/controller/dialogs/tp_ChartType.cxx @@ -302,7 +302,15 @@ void ChartTypeTabPage::fillAllControls( const ChartTypeParameter& rParameter, bo m_nChangingCalls++; if( m_pCurrentMainType && bAlsoResetSubTypeList ) { - m_pCurrentMainType->fillSubTypeList(*m_xSubTypeList, rParameter); + m_xSubTypeList->Clear(); + const std::vector aEntries = m_pCurrentMainType->getSubTypes(rParameter); + int nIndex = 1; + for (const ChartTypeEntry& rEntry : aEntries) + { + m_xSubTypeList->InsertItem(nIndex, rEntry.aImage); + m_xSubTypeList->SetItemText(nIndex, rEntry.sName); + nIndex++; + } } m_xSubTypeList->SelectItem( static_cast( rParameter.nSubTypeIndex) ); m_pDim3DLookResourceGroup->fillControls( rParameter ); diff --git a/chart2/source/controller/sidebar/ChartTypePanel.cxx b/chart2/source/controller/sidebar/ChartTypePanel.cxx index 0eb7d16421ff..b2985a9e3350 100644 --- a/chart2/source/controller/sidebar/ChartTypePanel.cxx +++ b/chart2/source/controller/sidebar/ChartTypePanel.cxx @@ -331,7 +331,15 @@ void ChartTypePanel::fillAllControls(const ChartTypeParameter& rParameter, m_nChangingCalls++; if (m_pCurrentMainType && bAlsoResetSubTypeList) { - m_pCurrentMainType->fillSubTypeList(*m_xSubTypeList, rParameter); + m_xSubTypeList->Clear(); + const std::vector aEntries = m_pCurrentMainType->getSubTypes(rParameter); + int nIndex = 1; + for (const ChartTypeEntry& rEntry : aEntries) + { + m_xSubTypeList->InsertItem(nIndex, rEntry.aImage); + m_xSubTypeList->SetItemText(nIndex, rEntry.sName); + nIndex++; + } } m_xSubTypeList->SelectItem(static_cast(rParameter.nSubTypeIndex)); m_pDim3DLookResourceGroup->fillControls(rParameter); diff --git a/chart2/source/controller/sidebar/ChartTypePanel.hxx b/chart2/source/controller/sidebar/ChartTypePanel.hxx index 8df0020431db..1460d0e76096 100644 --- a/chart2/source/controller/sidebar/ChartTypePanel.hxx +++ b/chart2/source/controller/sidebar/ChartTypePanel.hxx @@ -32,6 +32,8 @@ namespace com::sun::star::util class XModifyListener; } +class ValueSet; + namespace weld { class CustomWeld; diff --git a/chart2/source/inc/ChartTypeDialogController.hxx b/chart2/source/inc/ChartTypeDialogController.hxx index 8343ac9b81b6..5ec85d59ebbd 100644 --- a/chart2/source/inc/ChartTypeDialogController.hxx +++ b/chart2/source/inc/ChartTypeDialogController.hxx @@ -27,6 +27,7 @@ #include "ThreeDHelper.hxx" #include +#include #include #include #include @@ -36,8 +37,6 @@ namespace com::sun::star::beans class XPropertySet; } -class ValueSet; - namespace chart { class ChartModel; @@ -88,6 +87,18 @@ public: typedef std::map tTemplateServiceChartTypeParameterMap; +struct ChartTypeEntry +{ + Image aImage; + OUString sName; + + ChartTypeEntry(const Image& rImage, const OUString& rName = u""_ustr) + : aImage(rImage) + , sName(rName) + { + } +}; + class ChartTypeDialogController : public ChangingResource { public: @@ -97,7 +108,7 @@ public: virtual OUString getName() = 0; virtual OUString getImage() = 0; virtual const tTemplateServiceChartTypeParameterMap& getTemplateMap() const = 0; - virtual void fillSubTypeList(ValueSet& rSubTypeList, const ChartTypeParameter& rParameter); + virtual std::vector getSubTypes(const ChartTypeParameter& rParameter); virtual bool shouldShow_3DLookControl() const; virtual bool shouldShow_StackingControl() const; @@ -158,8 +169,7 @@ public: virtual OUString getName() override; virtual OUString getImage() override; virtual const tTemplateServiceChartTypeParameterMap& getTemplateMap() const override; - virtual void fillSubTypeList(ValueSet& rSubTypeList, - const ChartTypeParameter& rParameter) override; + virtual std::vector getSubTypes(const ChartTypeParameter& rParameter) override; }; class BarChartDialogController final : public ColumnOrBarChartDialogController_Base @@ -171,8 +181,7 @@ public: virtual OUString getName() override; virtual OUString getImage() override; virtual const tTemplateServiceChartTypeParameterMap& getTemplateMap() const override; - virtual void fillSubTypeList(ValueSet& rSubTypeList, - const ChartTypeParameter& rParameter) override; + virtual std::vector getSubTypes(const ChartTypeParameter& rParameter) override; }; class HistogramChartDialogController final : public ChartTypeDialogController @@ -184,8 +193,7 @@ public: virtual OUString getName() override; virtual OUString getImage() override; virtual const tTemplateServiceChartTypeParameterMap& getTemplateMap() const override; - virtual void fillSubTypeList(ValueSet& rSubTypeList, - const ChartTypeParameter& rParameter) override; + virtual std::vector getSubTypes(const ChartTypeParameter& rParameter) override; virtual void adjustParameterToSubType(ChartTypeParameter& rParameter) override; }; @@ -198,8 +206,7 @@ public: virtual OUString getName() override; virtual OUString getImage() override; virtual const tTemplateServiceChartTypeParameterMap& getTemplateMap() const override; - virtual void fillSubTypeList(ValueSet& rSubTypeList, - const ChartTypeParameter& rParameter) override; + virtual std::vector getSubTypes(const ChartTypeParameter& rParameter) override; virtual void adjustParameterToSubType(ChartTypeParameter& rParameter) override; virtual bool shouldShow_3DLookControl() const override; @@ -214,8 +221,7 @@ public: virtual OUString getName() override; virtual OUString getImage() override; virtual const tTemplateServiceChartTypeParameterMap& getTemplateMap() const override; - virtual void fillSubTypeList(ValueSet& rSubTypeList, - const ChartTypeParameter& rParameter) override; + virtual std::vector getSubTypes(const ChartTypeParameter& rParameter) override; virtual void adjustParameterToSubType(ChartTypeParameter& rParameter) override; virtual bool shouldShow_3DLookControl() const override; @@ -246,8 +252,7 @@ public: virtual OUString getName() override; virtual OUString getImage() override; virtual const tTemplateServiceChartTypeParameterMap& getTemplateMap() const override; - virtual void fillSubTypeList(ValueSet& rSubTypeList, - const ChartTypeParameter& rParameter) override; + virtual std::vector getSubTypes(const ChartTypeParameter& rParameter) override; virtual void adjustParameterToSubType(ChartTypeParameter& rParameter) override; virtual void adjustParameterToMainType(ChartTypeParameter& rParameter) override; @@ -264,8 +269,7 @@ public: virtual OUString getName() override; virtual OUString getImage() override; virtual const tTemplateServiceChartTypeParameterMap& getTemplateMap() const override; - virtual void fillSubTypeList(ValueSet& rSubTypeList, - const ChartTypeParameter& rParameter) override; + virtual std::vector getSubTypes(const ChartTypeParameter& rParameter) override; virtual void adjustParameterToSubType(ChartTypeParameter& rParameter) override; virtual bool shouldShow_SplineControl() const override; @@ -281,8 +285,7 @@ public: virtual OUString getName() override; virtual OUString getImage() override; virtual const tTemplateServiceChartTypeParameterMap& getTemplateMap() const override; - virtual void fillSubTypeList(ValueSet& rSubTypeList, - const ChartTypeParameter& rParameter) override; + virtual std::vector getSubTypes(const ChartTypeParameter& rParameter) override; virtual void adjustParameterToSubType(ChartTypeParameter& rParameter) override; virtual void adjustParameterToMainType(ChartTypeParameter& rParameter) override; @@ -298,8 +301,7 @@ public: virtual OUString getName() override; virtual OUString getImage() override; virtual const tTemplateServiceChartTypeParameterMap& getTemplateMap() const override; - virtual void fillSubTypeList(ValueSet& rSubTypeList, - const ChartTypeParameter& rParameter) override; + virtual std::vector getSubTypes(const ChartTypeParameter& rParameter) override; virtual void adjustParameterToSubType(ChartTypeParameter& rParameter) override; virtual bool shouldShow_StackingControl() const override; @@ -314,8 +316,7 @@ public: virtual OUString getName() override; virtual OUString getImage() override; virtual const tTemplateServiceChartTypeParameterMap& getTemplateMap() const override; - virtual void fillSubTypeList(ValueSet& rSubTypeList, - const ChartTypeParameter& rParameter) override; + virtual std::vector getSubTypes(const ChartTypeParameter& rParameter) override; virtual void adjustParameterToSubType(ChartTypeParameter& rParameter) override; }; @@ -327,8 +328,7 @@ public: virtual OUString getName() override; virtual OUString getImage() override; virtual const tTemplateServiceChartTypeParameterMap& getTemplateMap() const override; - virtual void fillSubTypeList(ValueSet& rSubTypeList, - const ChartTypeParameter& rParameter) override; + virtual std::vector getSubTypes(const ChartTypeParameter& rParameter) override; virtual void adjustParameterToSubType(ChartTypeParameter& rParameter) override; virtual void showExtraControls(weld::Builder* pBuilder) override; @@ -357,8 +357,7 @@ public: virtual OUString getName() override; virtual OUString getImage() override; virtual const tTemplateServiceChartTypeParameterMap& getTemplateMap() const override; - virtual void fillSubTypeList(ValueSet& rSubTypeList, - const ChartTypeParameter& rParameter) override; + virtual std::vector getSubTypes(const ChartTypeParameter& rParameter) override; virtual void adjustParameterToSubType(ChartTypeParameter& rParameter) override; }; @@ -371,8 +370,7 @@ public: virtual OUString getName() override; virtual OUString getImage() override; virtual const tTemplateServiceChartTypeParameterMap& getTemplateMap() const override; - virtual void fillSubTypeList(ValueSet& rSubTypeList, - const ChartTypeParameter& rParameter) override; + virtual std::vector getSubTypes(const ChartTypeParameter& rParameter) override; virtual void adjustParameterToSubType(ChartTypeParameter& rParameter) override; }; From aa5c21e8b18194b300d757d59a145e4e6ad2f341 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= Date: Mon, 28 Sep 2026 19:27:52 +0000 Subject: [PATCH 025/289] start with RawBitmap pixels blanked MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit so pixels that a reader never writes, for example when it stops a row early, are black rather than arbitrary noise Signed-off-by: Caolán McNamara Change-Id: I8e7133427b43447875869d23958dfb4316c4e178 Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/13725 Tested-by: Jenkins CPCI Reviewed-by: Noel Grandin (cherry picked from commit b509e99e049d330950edeac35702735fd22245ab) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211562 Reviewed-by: Xisco Fauli Tested-by: Jenkins --- include/vcl/RawBitmap.hxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/vcl/RawBitmap.hxx b/include/vcl/RawBitmap.hxx index 8da900a0231e..7209470e9f6f 100644 --- a/include/vcl/RawBitmap.hxx +++ b/include/vcl/RawBitmap.hxx @@ -45,7 +45,7 @@ public: { throw std::bad_alloc(); } - mpData.reset(new sal_uInt8[nDataSize]); + mpData.reset(new sal_uInt8[nDataSize]()); } void SetPixel(tools::Long nY, tools::Long nX, Color nColor) { From 67346d08e96adc1cbfd823a15e9ac0152cafcc0a Mon Sep 17 00:00:00 2001 From: Mike Kaganski Date: Mon, 21 Sep 2026 17:30:04 +0500 Subject: [PATCH 026/289] tools: keep the input deflate could not take in one pass ZCodec::Compress read a fresh chunk over whatever deflate had left unconsumed. deflate stops as soon as its output buffer is full, and the write-back that frees that buffer only ran at the top of the next iteration, by which time the tail of the previous chunk was gone. Nothing said so. EndCompression answers with the number of bytes taken and no caller compared it, so the result was a shorter document than the one handed in, compressed perfectly well. Passing 100000 bytes through a 64 byte output buffer took 49152 of them. Signed-off-by: Mike Kaganski Change-Id: I1044a46aa1d1f424e7d699a927e01a8427768919 Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/13208 Reviewed-by: Miklos Vajna Tested-by: Jenkins CPCI (cherry picked from commit 23e2e9c2136d8b5c9fd6d9604bccd35e9b657571) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211555 Tested-by: Jenkins Reviewed-by: Xisco Fauli --- tools/qa/cppunit/test_zcodec.cxx | 33 ++++++++++++++++++++++++++++++++ tools/source/zcodec/zcodec.cxx | 15 ++++++++++----- 2 files changed, 43 insertions(+), 5 deletions(-) diff --git a/tools/qa/cppunit/test_zcodec.cxx b/tools/qa/cppunit/test_zcodec.cxx index 935a234d4ff5..d0ad06ae6dc3 100644 --- a/tools/qa/cppunit/test_zcodec.cxx +++ b/tools/qa/cppunit/test_zcodec.cxx @@ -31,11 +31,13 @@ private: void testGzCompressDecompress(); void testMakeDummyFile(); void testZlibCompressDecompress(); + void testSmallOutputBuffer(); CPPUNIT_TEST_SUITE(ZCodecTest); CPPUNIT_TEST(testMakeDummyFile); CPPUNIT_TEST(testGzCompressDecompress); CPPUNIT_TEST(testZlibCompressDecompress); + CPPUNIT_TEST(testSmallOutputBuffer); CPPUNIT_TEST_SUITE_END(); }; @@ -116,6 +118,37 @@ void ZCodecTest::testZlibCompressDecompress() CPPUNIT_ASSERT_EQUAL(nInitialStreamCRC32, nCompressedDecompressedStreamCRC32); } +// Test that nothing is dropped when deflate runs out of output part way through a chunk of +// input. A small output buffer makes that happen on almost every call. +void ZCodecTest::testSmallOutputBuffer() +{ + SvMemoryStream aInitialStream; + sal_uInt32 nSeed = 1; + for (sal_uInt32 i = 0; i < 100000; ++i) + { + nSeed = nSeed * 1103515245 + 12345; + const sal_uInt8 nByte(nSeed >> 24); + aInitialStream.WriteBytes(&nByte, 1); + } + const sal_uInt64 nInitialSize = aInitialStream.GetSize(); + const auto nInitialCRC32 = rtl_crc32(0, aInitialStream.GetData(), nInitialSize); + + SvMemoryStream aCompressedStream; + SvMemoryStream aDecompressedStream; + ZCodec aCodec(0x4000, 64); + aCodec.BeginCompression(); + aCodec.Compress(aInitialStream, aCompressedStream); + // EndCompression answers with the bytes deflate took, which has to be all of them + CPPUNIT_ASSERT_EQUAL(static_cast(nInitialSize), aCodec.EndCompression()); + + aCompressedStream.Seek(0); + aCodec.BeginCompression(); + aCodec.Decompress(aCompressedStream, aDecompressedStream); + CPPUNIT_ASSERT_EQUAL(static_cast(nInitialSize), aCodec.EndCompression()); + CPPUNIT_ASSERT_EQUAL( + nInitialCRC32, rtl_crc32(0, aDecompressedStream.GetData(), aDecompressedStream.GetSize())); +} + } // namespace CPPUNIT_TEST_SUITE_REGISTRATION(ZCodecTest); diff --git a/tools/source/zcodec/zcodec.cxx b/tools/source/zcodec/zcodec.cxx index 2d6e1ed32e07..bbb16c13d1df 100644 --- a/tools/source/zcodec/zcodec.cxx +++ b/tools/source/zcodec/zcodec.cxx @@ -168,12 +168,17 @@ void ZCodec::Compress( SvStream& rIStm, SvStream& rOStm ) pStream->avail_in = rIStm.ReadBytes( mpInBuf.get(), mnInBufSize ); if (pStream->avail_in == 0) break; - if ( pStream->avail_out == 0 ) - ImplWriteBack(); - if ( deflate( pStream, Z_NO_FLUSH ) < 0 ) + // deflate stops as soon as the output buffer is full, so offer the rest of the chunk + // again once it has been written back, rather than reading over it + while (pStream->avail_in != 0) { - mbStatus = false; - break; + if (pStream->avail_out == 0) + ImplWriteBack(); + if (deflate(pStream, Z_NO_FLUSH) < 0) + { + mbStatus = false; + return; + } } }; } From a05828e021119f5d2469262497565d49d816862c Mon Sep 17 00:00:00 2001 From: Xisco Fauli Date: Tue, 29 Sep 2026 12:59:29 +0200 Subject: [PATCH 027/289] Revert "tdf#173608: sc: fix relative sheet refs of a sheet copied before its source" This reverts commit a1e5a20bd9fc0509a85b5eb0968789a5191b74e5. The issue is still reproducible as I tested it incorrectly Change-Id: I04c0e18ace65649b816ebbcb4ae16edbefc1a193 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211558 Tested-by: Jenkins Reviewed-by: Xisco Fauli --- sc/inc/TableContentCopier.hxx | 3 +- sc/qa/unit/ucalc.cxx | 83 ---------------------- sc/source/core/data/TableContentCopier.cxx | 7 +- sc/source/core/data/documen2.cxx | 2 +- 4 files changed, 4 insertions(+), 91 deletions(-) diff --git a/sc/inc/TableContentCopier.hxx b/sc/inc/TableContentCopier.hxx index 19d3cf811ede..7f6f324d7d6d 100644 --- a/sc/inc/TableContentCopier.hxx +++ b/sc/inc/TableContentCopier.hxx @@ -36,8 +36,7 @@ public: void performCopy(const ScMarkData* pOnlyMarked, ScCloneFlags nCloneFlags, SCTAB nPreviousSourceTabNo = -1); - void updateReferencesAfterTabInsertion(RefUpdateInsertTabContext& rContext, - SCTAB nPreviousSourceTabNo); + void updateReferencesAfterTabInsertion(RefUpdateInsertTabContext& rContext); }; } // namespace sc diff --git a/sc/qa/unit/ucalc.cxx b/sc/qa/unit/ucalc.cxx index 43a79f3e293c..6d49fedd9142 100644 --- a/sc/qa/unit/ucalc.cxx +++ b/sc/qa/unit/ucalc.cxx @@ -8089,89 +8089,6 @@ CPPUNIT_TEST_FIXTURE(Test, testCopyTabContent) m_pDoc->DeleteTab(0); } -// The relative sheet references of a copied sheet point at the same sheets as the ones of its -// source, wherever the copy is inserted. -CPPUNIT_TEST_FIXTURE(Test, testCopyTabRelativeTabRefs) -{ - // The source has two sheets on each side, so every insert position leaves referenced sheets - // both before and after the copy. - const SCTAB nTabCount = 5; - const SCTAB nSourceTab = 2; - - // Each sheet holds its own value in A1, so a reference that lands on the wrong sheet gives a - // different result. - struct RefCheck - { - OUString sFormula; - double fExpected; - }; - const std::vector aChecks = { - { u"=Tab0.A1"_ustr, 10.0 }, - { u"=Tab1.A1"_ustr, 11.0 }, - { u"=Tab3.A1"_ustr, 13.0 }, - { u"=Tab4.A1"_ustr, 14.0 }, - { u"=SUM(Tab0.A1:Tab0.A2)"_ustr, 110.0 }, - { u"=SUM(Tab4.A1:Tab4.A2)"_ustr, 114.0 }, - }; - - // Positions 0 and 1 put the copy in front of sheets it references on the left, 2 puts it - // directly before the source and 3 directly after it, 4 puts it between the two sheets it - // references on the right, and the last one appends it. - const SCTAB aInsertPositions[] = { 0, 1, 2, 3, 4, SC_TAB_APPEND }; - for (SCTAB nInsertPos : aInsertPositions) - { - // A document always keeps its last sheet, so each position gets a new document. - ScDocShellRef xDocShell; - getNewDocShell(xDocShell); - ScDocument& rDoc = xDocShell->GetDocument(); - - for (SCTAB nTab = 0; nTab < nTabCount; ++nTab) - { - rDoc.InsertTab(nTab, u"Tab"_ustr + OUString::number(nTab)); - rDoc.SetValue(ScAddress(0, 0, nTab), 10.0 + nTab); - rDoc.SetValue(ScAddress(0, 1, nTab), 100.0); - } - SCROW nRow = 0; - for (const RefCheck& rCheck : aChecks) - rDoc.SetString(ScAddress(1, nRow++, nSourceTab), rCheck.sFormula); - rDoc.SetString(ScAddress(2, 0, nSourceTab), u"=A1"_ustr); - - rDoc.CopyTab(nSourceTab, nInsertPos); - CPPUNIT_ASSERT_EQUAL(static_cast(nTabCount + 1), rDoc.GetTableCount()); - - const SCTAB nCopyTab = (nInsertPos == SC_TAB_APPEND) ? nTabCount : nInsertPos; - // The source moves one place to the right when the copy goes in at or before it. - const SCTAB nSourceTabAfterCopy - = (nInsertPos <= nSourceTab) ? nSourceTab + 1 : nSourceTab; - - // A new value in A1 of the copy tells a reference to the copy itself apart from one to - // the source. - rDoc.SetValue(ScAddress(0, 0, nCopyTab), 20.0); - rDoc.CalcAll(); - - auto checkSheet = [&](SCTAB nTab, double fOwnValue, std::string_view sSheet) - { - const OString sPrefix = OString::Concat(sSheet) + " sheet, copy at position " - + OString::number(nCopyTab) + ", "; - SCROW nCheckRow = 0; - for (const RefCheck& rCheck : aChecks) - { - const OString sMessage - = sPrefix + OUStringToOString(rCheck.sFormula, RTL_TEXTENCODING_UTF8); - CPPUNIT_ASSERT_EQUAL_MESSAGE(sMessage.getStr(), rCheck.fExpected, - rDoc.GetValue(ScAddress(1, nCheckRow++, nTab))); - } - const OString sMessage = sPrefix + "=A1"; - CPPUNIT_ASSERT_EQUAL_MESSAGE(sMessage.getStr(), fOwnValue, - rDoc.GetValue(ScAddress(2, 0, nTab))); - }; - checkSheet(nSourceTabAfterCopy, 12.0, "source"); - checkSheet(nCopyTab, 20.0, "copied"); - - xDocShell->DoClose(); - } -} - CPPUNIT_PLUGIN_IMPLEMENT(); /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sc/source/core/data/TableContentCopier.cxx b/sc/source/core/data/TableContentCopier.cxx index 0f8c1d6e3532..6a4a35d74351 100644 --- a/sc/source/core/data/TableContentCopier.cxx +++ b/sc/source/core/data/TableContentCopier.cxx @@ -88,13 +88,10 @@ void sc::TableContentCopier::performCopy(const ScMarkData* pOnlyMarked, ScCloneF } void sc::TableContentCopier::updateReferencesAfterTabInsertion( - sc::RefUpdateInsertTabContext& rContext, SCTAB nPreviousSourceTabNo) + sc::RefUpdateInsertTabContext& rContext) { mpTargetTab->UpdateInsertTabAbs(mnTargetTabNo); - // The cloned relative sheet offsets still count from where the source was before the insert. - // When the copy goes in at or before the source, that is one less than mnSourceTabNo. - mpTargetTab->AdjustRelativeTabRefs(nPreviousSourceTabNo, mnTargetTabNo, - sc::TargetTabState::Inserted); + mpTargetTab->AdjustRelativeTabRefs(mnSourceTabNo, mnTargetTabNo, sc::TargetTabState::Inserted); mpSourceTab->UpdateInsertTab(rContext); mpSourceTab->UpdateCompile(); } diff --git a/sc/source/core/data/documen2.cxx b/sc/source/core/data/documen2.cxx index 071ab15bfc85..fbd1a36e7c58 100644 --- a/sc/source/core/data/documen2.cxx +++ b/sc/source/core/data/documen2.cxx @@ -974,7 +974,7 @@ bool ScDocument::CopyTab( SCTAB nOldPos, SCTAB nNewPos, const ScMarkData* pOnlyM { sc::TableContentCopier aHandler(*this, nOldPos, nNewPos); aHandler.performCopy(pOnlyMarked, ScCloneFlags::NamesToLocal, nPreviousSourceTabNo); - aHandler.updateReferencesAfterTabInsertion(aCxt, nPreviousSourceTabNo); + aHandler.updateReferencesAfterTabInsertion(aCxt); } SetNoListening(false); From 9c14148d06a2ff08e9983891dce8f44d845bd48e Mon Sep 17 00:00:00 2001 From: Xisco Fauli Date: Tue, 29 Sep 2026 13:10:22 +0200 Subject: [PATCH 028/289] Revert "tdf#173608: reapply "sc: Fix backward reference when copying a sheet"" This reverts commit c2e373869e80da2388405a80caecc3a4bee2913a. The issue is still reproducible as I tested it incorrectly Change-Id: Ie54d49a8ef730e4c91fdc855c6f477465ae99ad6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211559 Tested-by: Xisco Fauli Reviewed-by: Xisco Fauli --- sc/inc/column.hxx | 1 - sc/inc/formulacell.hxx | 1 - sc/inc/table.hxx | 1 - sc/inc/tokenarray.hxx | 22 +-- sc/qa/unit/ucalc.cxx | 170 +++++++++------------ sc/source/core/data/TableContentCopier.cxx | 1 - sc/source/core/data/column.cxx | 22 --- sc/source/core/data/formulacell.cxx | 15 +- sc/source/core/data/table4.cxx | 6 - sc/source/core/tool/token.cxx | 28 +--- 10 files changed, 89 insertions(+), 178 deletions(-) diff --git a/sc/inc/column.hxx b/sc/inc/column.hxx index 5ffa042b0a71..ff85dd634e88 100644 --- a/sc/inc/column.hxx +++ b/sc/inc/column.hxx @@ -600,7 +600,6 @@ public: bool GetDataEntries( SCROW nRow, std::set& rStrings) const; void UpdateInsertTabAbs(SCTAB nNewPos); - void AdjustRelativeTabRefs(SCTAB nOldTab, SCTAB nNewTab, sc::TargetTabState eMode); bool TestTabRefAbs(SCTAB nTable) const; bool GetNextSpellingCell(SCROW& nRow, bool bInSel, const ScMarkData& rData) const; diff --git a/sc/inc/formulacell.hxx b/sc/inc/formulacell.hxx index df9115de5abb..94bfe00c742b 100644 --- a/sc/inc/formulacell.hxx +++ b/sc/inc/formulacell.hxx @@ -326,7 +326,6 @@ public: void UpdateInsertTab( const sc::RefUpdateInsertTabContext& rCxt ); void UpdateInsertTabAbs(SCTAB nTable); - void AdjustRelativeTabRefs(SCTAB nOldTab, SCTAB nNewTab, sc::TargetTabState eMode); void UpdateDeleteTab( const sc::RefUpdateDeleteTabContext& rCxt ); void UpdateMoveTab( const sc::RefUpdateMoveTabContext& rCxt, SCTAB nTabNo ); bool TestTabRefAbs(SCTAB nTable); diff --git a/sc/inc/table.hxx b/sc/inc/table.hxx index 135bcb149083..5aa29ae03e68 100644 --- a/sc/inc/table.hxx +++ b/sc/inc/table.hxx @@ -1326,7 +1326,6 @@ private: void FillFormula( const ScFormulaCell* pSrcCell, SCCOL nDestCol, SCROW nDestRow, bool bLast ); void UpdateInsertTabAbs(SCTAB nNewPos); - void AdjustRelativeTabRefs(SCTAB nOldTab, SCTAB nNewTab, sc::TargetTabState eMode); bool GetNextSpellingCell(SCCOL& rCol, SCROW& rRow, bool bInSel, const ScMarkData& rMark) const; bool GetNextMarkedCell( SCCOL& rCol, SCROW& rRow, const ScMarkData& rMark ) const; diff --git a/sc/inc/tokenarray.hxx b/sc/inc/tokenarray.hxx index 9d05c91e7a04..1818bfa4244c 100644 --- a/sc/inc/tokenarray.hxx +++ b/sc/inc/tokenarray.hxx @@ -41,13 +41,6 @@ struct RefUpdateResult; struct TokenStringContext; class ColRowReorderMapType; -/** If the target tab was inserted, or an existing tab was used. */ -enum class TargetTabState -{ - Existing, - Inserted, -}; - } struct ScRawToken; @@ -160,15 +153,12 @@ public: */ void AdjustAbsoluteRefs( const ScDocument& rOldDoc, const ScAddress& rOldPos, const ScAddress& rNewPos, bool bCheckCopyArea ); - /** Adjust relative tab references when copying a formula to a new table. - Non-zero relative tab offsets are recalculated so they still resolve - to the original target sheet from the new position. Same-sheet - relative refs (offset 0) are not modified. - If the target tab was newly inserted, the references pointing to - tabs at or after the insertion point are additionally shifted by - one. */ - void AdjustRelativeTabRefs(SCTAB nOldTab, SCTAB nNewTab, - sc::TargetTabState eMode = sc::TargetTabState::Existing); + /** Adjust relative tab references when copying a formula between tabs when + overwriting a tab. Non-zero relative tab offsets are decremented by + input delta value so they still resolve to the original target sheet + from the new position. Same-sheet relative refs with offset 0 are left + unchanged. */ + void AdjustRelativeTabRefs(SCTAB nDelta); /** When copying a sheet-local named expression, move sheet references that point to the originating sheet to point to the new sheet instead. diff --git a/sc/qa/unit/ucalc.cxx b/sc/qa/unit/ucalc.cxx index 6d49fedd9142..c57ff746722f 100644 --- a/sc/qa/unit/ucalc.cxx +++ b/sc/qa/unit/ucalc.cxx @@ -7923,22 +7923,19 @@ CPPUNIT_TEST_FIXTURE(Test, testAutoFilterFlagsAfterColumnDeleteUndoRedo) CPPUNIT_TEST_FIXTURE(Test, testCopyTabContent) { - m_pDoc->InsertTab(0, u"Tab0"_ustr); - m_pDoc->InsertTab(1, u"Tab1"_ustr); - m_pDoc->InsertTab(2, u"Tab2"_ustr); - m_pDoc->InsertTab(3, u"Tab3"_ustr); + m_pDoc->InsertTab(0, u"Tab1"_ustr); + m_pDoc->InsertTab(1, u"Tab2"_ustr); + m_pDoc->InsertTab(2, u"Tab3"_ustr); - // For cross-sheet formula checking (forward and backward) - m_pDoc->SetValue(ScAddress(0, 0, 0), 99.0); // Tab0.A1 - m_pDoc->SetValue(ScAddress(0, 0, 3), 66.0); // Tab3.A1 + // For cross-sheet formula checking + m_pDoc->SetValue(ScAddress(0, 0, 2), 66.0); std::vector> aData = { { u"Column 1"_ustr, u"Column 2"_ustr, u"Column 3"_ustr }, { u"7"_ustr, u"A"_ustr, u"=A2+5"_ustr }, - { u"=2+2"_ustr, u"C"_ustr, u"=Tab3.A1"_ustr }, // forward cross-tab reference - { u"=A3-2"_ustr, u"D"_ustr, u"=SUM(A2:A6)"_ustr }, - { u"3"_ustr, u"B"_ustr, u"=C3-60"_ustr }, - { u"5"_ustr, u"E"_ustr, u"=Tab0.A1"_ustr }, // backward cross-tab reference + { u"=2+2"_ustr, u"C"_ustr, u"=Tab3.A1"_ustr }, + { u"=A3-2"_ustr, u"D"_ustr, u"=SUM(A2:A5)"_ustr }, + { u"3"_ustr, u"B"_ustr, u"=C3-60"_ustr } }; for (size_t i = 0; i < aData.size(); ++i) @@ -7947,7 +7944,7 @@ CPPUNIT_TEST_FIXTURE(Test, testCopyTabContent) { if (!aData[i][j].isEmpty()) { - m_pDoc->SetString(j, i, 1, aData[i][j]); + m_pDoc->SetString(j, i, 0, aData[i][j]); } } } @@ -7955,134 +7952,115 @@ CPPUNIT_TEST_FIXTURE(Test, testCopyTabContent) // Verify Tab1 values and formulas before copy { - CPPUNIT_ASSERT_EQUAL(7.0, m_pDoc->GetValue(ScAddress(0, 1, 1))); - CPPUNIT_ASSERT_EQUAL(4.0, m_pDoc->GetValue(ScAddress(0, 2, 1))); - CPPUNIT_ASSERT_EQUAL(2.0, m_pDoc->GetValue(ScAddress(0, 3, 1))); - CPPUNIT_ASSERT_EQUAL(3.0, m_pDoc->GetValue(ScAddress(0, 4, 1))); - CPPUNIT_ASSERT_EQUAL(5.0, m_pDoc->GetValue(ScAddress(0, 5, 1))); + CPPUNIT_ASSERT_EQUAL(7.0, m_pDoc->GetValue(ScAddress(0, 1, 0))); + CPPUNIT_ASSERT_EQUAL(4.0, m_pDoc->GetValue(ScAddress(0, 2, 0))); + CPPUNIT_ASSERT_EQUAL(2.0, m_pDoc->GetValue(ScAddress(0, 3, 0))); + CPPUNIT_ASSERT_EQUAL(3.0, m_pDoc->GetValue(ScAddress(0, 4, 0))); - CPPUNIT_ASSERT_EQUAL(u"A"_ustr, m_pDoc->GetString(ScAddress(1, 1, 1))); - CPPUNIT_ASSERT_EQUAL(u"C"_ustr, m_pDoc->GetString(ScAddress(1, 2, 1))); - CPPUNIT_ASSERT_EQUAL(u"D"_ustr, m_pDoc->GetString(ScAddress(1, 3, 1))); - CPPUNIT_ASSERT_EQUAL(u"B"_ustr, m_pDoc->GetString(ScAddress(1, 4, 1))); - CPPUNIT_ASSERT_EQUAL(u"E"_ustr, m_pDoc->GetString(ScAddress(1, 5, 1))); + CPPUNIT_ASSERT_EQUAL(u"A"_ustr, m_pDoc->GetString(ScAddress(1, 1, 0))); + CPPUNIT_ASSERT_EQUAL(u"C"_ustr, m_pDoc->GetString(ScAddress(1, 2, 0))); + CPPUNIT_ASSERT_EQUAL(u"D"_ustr, m_pDoc->GetString(ScAddress(1, 3, 0))); + CPPUNIT_ASSERT_EQUAL(u"B"_ustr, m_pDoc->GetString(ScAddress(1, 4, 0))); - CPPUNIT_ASSERT_EQUAL(12.0, m_pDoc->GetValue(ScAddress(2, 1, 1))); // =A2+5=12 - CPPUNIT_ASSERT_EQUAL(66.0, m_pDoc->GetValue(ScAddress(2, 2, 1))); // =Tab3.A1 - CPPUNIT_ASSERT_EQUAL(21.0, m_pDoc->GetValue(ScAddress(2, 3, 1))); // =SUM(A2:A6) - CPPUNIT_ASSERT_EQUAL(6.0, m_pDoc->GetValue(ScAddress(2, 4, 1))); // =C3-60 - CPPUNIT_ASSERT_EQUAL(99.0, m_pDoc->GetValue(ScAddress(2, 5, 1))); // =Tab0.A1 + CPPUNIT_ASSERT_EQUAL(12.0, m_pDoc->GetValue(ScAddress(2, 1, 0))); + CPPUNIT_ASSERT_EQUAL(66.0, m_pDoc->GetValue(ScAddress(2, 2, 0))); + CPPUNIT_ASSERT_EQUAL(16.0, m_pDoc->GetValue(ScAddress(2, 3, 0))); + CPPUNIT_ASSERT_EQUAL(6.0, m_pDoc->GetValue(ScAddress(2, 4, 0))); } - // Copy Tab1 to index 2 - Tab1_2 - m_pDoc->CopyTab(1, 2); - CPPUNIT_ASSERT_EQUAL(static_cast(5), m_pDoc->GetTableCount()); + // Copy Tab1 to index 1 - Tab1_2 + m_pDoc->CopyTab(0, 1); + CPPUNIT_ASSERT_EQUAL(static_cast(4), m_pDoc->GetTableCount()); - // Tab3 value shifted from index 3 to index 4 - CPPUNIT_ASSERT_EQUAL(66.0, m_pDoc->GetValue(ScAddress(0, 0, 4))); - // Tab0 value stays at index 0 - CPPUNIT_ASSERT_EQUAL(99.0, m_pDoc->GetValue(ScAddress(0, 0, 0))); + // Tab3 value shifted from index 2 to index 3 + CPPUNIT_ASSERT_EQUAL(66.0, m_pDoc->GetValue(ScAddress(0, 0, 3))); - // Tab1 (tab index 1) should be unchanged + // Tab1 (tab index 0) should be unchanged + { + CPPUNIT_ASSERT_EQUAL(7.0, m_pDoc->GetValue(ScAddress(0, 1, 0))); + CPPUNIT_ASSERT_EQUAL(4.0, m_pDoc->GetValue(ScAddress(0, 2, 0))); + CPPUNIT_ASSERT_EQUAL(2.0, m_pDoc->GetValue(ScAddress(0, 3, 0))); + CPPUNIT_ASSERT_EQUAL(3.0, m_pDoc->GetValue(ScAddress(0, 4, 0))); + + CPPUNIT_ASSERT_EQUAL(u"A"_ustr, m_pDoc->GetString(ScAddress(1, 1, 0))); + CPPUNIT_ASSERT_EQUAL(u"C"_ustr, m_pDoc->GetString(ScAddress(1, 2, 0))); + CPPUNIT_ASSERT_EQUAL(u"D"_ustr, m_pDoc->GetString(ScAddress(1, 3, 0))); + CPPUNIT_ASSERT_EQUAL(u"B"_ustr, m_pDoc->GetString(ScAddress(1, 4, 0))); + + CPPUNIT_ASSERT_EQUAL(12.0, m_pDoc->GetValue(ScAddress(2, 1, 0))); + CPPUNIT_ASSERT_EQUAL(66.0, m_pDoc->GetValue(ScAddress(2, 2, 0))); + CPPUNIT_ASSERT_EQUAL(16.0, m_pDoc->GetValue(ScAddress(2, 3, 0))); + CPPUNIT_ASSERT_EQUAL(6.0, m_pDoc->GetValue(ScAddress(2, 4, 0))); + } + + // The copy Tab1_2 (tab index 1) should have the same data as Tab1 { CPPUNIT_ASSERT_EQUAL(7.0, m_pDoc->GetValue(ScAddress(0, 1, 1))); CPPUNIT_ASSERT_EQUAL(4.0, m_pDoc->GetValue(ScAddress(0, 2, 1))); CPPUNIT_ASSERT_EQUAL(2.0, m_pDoc->GetValue(ScAddress(0, 3, 1))); CPPUNIT_ASSERT_EQUAL(3.0, m_pDoc->GetValue(ScAddress(0, 4, 1))); - CPPUNIT_ASSERT_EQUAL(5.0, m_pDoc->GetValue(ScAddress(0, 5, 1))); CPPUNIT_ASSERT_EQUAL(u"A"_ustr, m_pDoc->GetString(ScAddress(1, 1, 1))); CPPUNIT_ASSERT_EQUAL(u"C"_ustr, m_pDoc->GetString(ScAddress(1, 2, 1))); CPPUNIT_ASSERT_EQUAL(u"D"_ustr, m_pDoc->GetString(ScAddress(1, 3, 1))); CPPUNIT_ASSERT_EQUAL(u"B"_ustr, m_pDoc->GetString(ScAddress(1, 4, 1))); - CPPUNIT_ASSERT_EQUAL(u"E"_ustr, m_pDoc->GetString(ScAddress(1, 5, 1))); CPPUNIT_ASSERT_EQUAL(12.0, m_pDoc->GetValue(ScAddress(2, 1, 1))); CPPUNIT_ASSERT_EQUAL(66.0, m_pDoc->GetValue(ScAddress(2, 2, 1))); - CPPUNIT_ASSERT_EQUAL(21.0, m_pDoc->GetValue(ScAddress(2, 3, 1))); + CPPUNIT_ASSERT_EQUAL(16.0, m_pDoc->GetValue(ScAddress(2, 3, 1))); CPPUNIT_ASSERT_EQUAL(6.0, m_pDoc->GetValue(ScAddress(2, 4, 1))); - CPPUNIT_ASSERT_EQUAL(99.0, m_pDoc->GetValue(ScAddress(2, 5, 1))); - } - - // The copy Tab1_2 (tab index 2) should have the same data as Tab1 - { - CPPUNIT_ASSERT_EQUAL(7.0, m_pDoc->GetValue(ScAddress(0, 1, 2))); - CPPUNIT_ASSERT_EQUAL(4.0, m_pDoc->GetValue(ScAddress(0, 2, 2))); - CPPUNIT_ASSERT_EQUAL(2.0, m_pDoc->GetValue(ScAddress(0, 3, 2))); - CPPUNIT_ASSERT_EQUAL(3.0, m_pDoc->GetValue(ScAddress(0, 4, 2))); - CPPUNIT_ASSERT_EQUAL(5.0, m_pDoc->GetValue(ScAddress(0, 5, 2))); - - CPPUNIT_ASSERT_EQUAL(u"A"_ustr, m_pDoc->GetString(ScAddress(1, 1, 2))); - CPPUNIT_ASSERT_EQUAL(u"C"_ustr, m_pDoc->GetString(ScAddress(1, 2, 2))); - CPPUNIT_ASSERT_EQUAL(u"D"_ustr, m_pDoc->GetString(ScAddress(1, 3, 2))); - CPPUNIT_ASSERT_EQUAL(u"B"_ustr, m_pDoc->GetString(ScAddress(1, 4, 2))); - CPPUNIT_ASSERT_EQUAL(u"E"_ustr, m_pDoc->GetString(ScAddress(1, 5, 2))); - - CPPUNIT_ASSERT_EQUAL(12.0, m_pDoc->GetValue(ScAddress(2, 1, 2))); - CPPUNIT_ASSERT_EQUAL(66.0, m_pDoc->GetValue(ScAddress(2, 2, 2))); - CPPUNIT_ASSERT_EQUAL(21.0, m_pDoc->GetValue(ScAddress(2, 3, 2))); - CPPUNIT_ASSERT_EQUAL(6.0, m_pDoc->GetValue(ScAddress(2, 4, 2))); - CPPUNIT_ASSERT_EQUAL(99.0, m_pDoc->GetValue(ScAddress(2, 5, 2))); } // Check the formulas in Tab1_2 { - CPPUNIT_ASSERT_EQUAL(u"=2+2"_ustr, m_pDoc->GetFormula(0, 2, 2)); - CPPUNIT_ASSERT_EQUAL(u"=A3-2"_ustr, m_pDoc->GetFormula(0, 3, 2)); - CPPUNIT_ASSERT_EQUAL(u"=A2+5"_ustr, m_pDoc->GetFormula(2, 1, 2)); - CPPUNIT_ASSERT_EQUAL(u"='Tab3'.A1"_ustr, m_pDoc->GetFormula(2, 2, 2)); - CPPUNIT_ASSERT_EQUAL(u"=SUM(A2:A6)"_ustr, m_pDoc->GetFormula(2, 3, 2)); - CPPUNIT_ASSERT_EQUAL(u"=C3-60"_ustr, m_pDoc->GetFormula(2, 4, 2)); - CPPUNIT_ASSERT_EQUAL(u"=Tab0.A1"_ustr, m_pDoc->GetFormula(2, 5, 2)); + CPPUNIT_ASSERT_EQUAL(u"=2+2"_ustr, m_pDoc->GetFormula(0, 2, 1)); + CPPUNIT_ASSERT_EQUAL(u"=A3-2"_ustr, m_pDoc->GetFormula(0, 3, 1)); + CPPUNIT_ASSERT_EQUAL(u"=A2+5"_ustr, m_pDoc->GetFormula(2, 1, 1)); + CPPUNIT_ASSERT_EQUAL(u"='Tab3'.A1"_ustr, m_pDoc->GetFormula(2, 2, 1)); + CPPUNIT_ASSERT_EQUAL(u"=SUM(A2:A5)"_ustr, m_pDoc->GetFormula(2, 3, 1)); + CPPUNIT_ASSERT_EQUAL(u"=C3-60"_ustr, m_pDoc->GetFormula(2, 4, 1)); } // Change Tab1 and verify the copy is independent - m_pDoc->SetValue(ScAddress(0, 1, 1), 10.0); // 7 -> 10 + m_pDoc->SetValue(ScAddress(0, 1, 0), 10.0); // 7 -> 10 m_pDoc->CalcAll(); // Tab1 should be changed { - CPPUNIT_ASSERT_EQUAL(10.0, m_pDoc->GetValue(ScAddress(0, 1, 1))); + CPPUNIT_ASSERT_EQUAL(10.0, m_pDoc->GetValue(ScAddress(0, 1, 0))); + CPPUNIT_ASSERT_EQUAL(4.0, m_pDoc->GetValue(ScAddress(0, 2, 0))); + CPPUNIT_ASSERT_EQUAL(2.0, m_pDoc->GetValue(ScAddress(0, 3, 0))); + CPPUNIT_ASSERT_EQUAL(3.0, m_pDoc->GetValue(ScAddress(0, 4, 0))); + + CPPUNIT_ASSERT_EQUAL(u"A"_ustr, m_pDoc->GetString(ScAddress(1, 1, 0))); + CPPUNIT_ASSERT_EQUAL(u"C"_ustr, m_pDoc->GetString(ScAddress(1, 2, 0))); + CPPUNIT_ASSERT_EQUAL(u"D"_ustr, m_pDoc->GetString(ScAddress(1, 3, 0))); + CPPUNIT_ASSERT_EQUAL(u"B"_ustr, m_pDoc->GetString(ScAddress(1, 4, 0))); + + CPPUNIT_ASSERT_EQUAL(15.0, m_pDoc->GetValue(ScAddress(2, 1, 0))); + CPPUNIT_ASSERT_EQUAL(66.0, m_pDoc->GetValue(ScAddress(2, 2, 0))); + CPPUNIT_ASSERT_EQUAL(19.0, m_pDoc->GetValue(ScAddress(2, 3, 0))); + CPPUNIT_ASSERT_EQUAL(6.0, m_pDoc->GetValue(ScAddress(2, 4, 0))); + } + + // No change in Tab1_2 + { + CPPUNIT_ASSERT_EQUAL(7.0, m_pDoc->GetValue(ScAddress(0, 1, 1))); CPPUNIT_ASSERT_EQUAL(4.0, m_pDoc->GetValue(ScAddress(0, 2, 1))); CPPUNIT_ASSERT_EQUAL(2.0, m_pDoc->GetValue(ScAddress(0, 3, 1))); CPPUNIT_ASSERT_EQUAL(3.0, m_pDoc->GetValue(ScAddress(0, 4, 1))); - CPPUNIT_ASSERT_EQUAL(5.0, m_pDoc->GetValue(ScAddress(0, 5, 1))); CPPUNIT_ASSERT_EQUAL(u"A"_ustr, m_pDoc->GetString(ScAddress(1, 1, 1))); CPPUNIT_ASSERT_EQUAL(u"C"_ustr, m_pDoc->GetString(ScAddress(1, 2, 1))); CPPUNIT_ASSERT_EQUAL(u"D"_ustr, m_pDoc->GetString(ScAddress(1, 3, 1))); CPPUNIT_ASSERT_EQUAL(u"B"_ustr, m_pDoc->GetString(ScAddress(1, 4, 1))); - CPPUNIT_ASSERT_EQUAL(u"E"_ustr, m_pDoc->GetString(ScAddress(1, 5, 1))); - CPPUNIT_ASSERT_EQUAL(15.0, m_pDoc->GetValue(ScAddress(2, 1, 1))); + CPPUNIT_ASSERT_EQUAL(12.0, m_pDoc->GetValue(ScAddress(2, 1, 1))); CPPUNIT_ASSERT_EQUAL(66.0, m_pDoc->GetValue(ScAddress(2, 2, 1))); - CPPUNIT_ASSERT_EQUAL(24.0, m_pDoc->GetValue(ScAddress(2, 3, 1))); // =SUM(A2:A6)=10+4+2+3+5 + CPPUNIT_ASSERT_EQUAL(16.0, m_pDoc->GetValue(ScAddress(2, 3, 1))); CPPUNIT_ASSERT_EQUAL(6.0, m_pDoc->GetValue(ScAddress(2, 4, 1))); - CPPUNIT_ASSERT_EQUAL(99.0, m_pDoc->GetValue(ScAddress(2, 5, 1))); } - // No change in Tab1_2 - { - CPPUNIT_ASSERT_EQUAL(7.0, m_pDoc->GetValue(ScAddress(0, 1, 2))); - CPPUNIT_ASSERT_EQUAL(4.0, m_pDoc->GetValue(ScAddress(0, 2, 2))); - CPPUNIT_ASSERT_EQUAL(2.0, m_pDoc->GetValue(ScAddress(0, 3, 2))); - CPPUNIT_ASSERT_EQUAL(3.0, m_pDoc->GetValue(ScAddress(0, 4, 2))); - CPPUNIT_ASSERT_EQUAL(5.0, m_pDoc->GetValue(ScAddress(0, 5, 2))); - - CPPUNIT_ASSERT_EQUAL(u"A"_ustr, m_pDoc->GetString(ScAddress(1, 1, 2))); - CPPUNIT_ASSERT_EQUAL(u"C"_ustr, m_pDoc->GetString(ScAddress(1, 2, 2))); - CPPUNIT_ASSERT_EQUAL(u"D"_ustr, m_pDoc->GetString(ScAddress(1, 3, 2))); - CPPUNIT_ASSERT_EQUAL(u"B"_ustr, m_pDoc->GetString(ScAddress(1, 4, 2))); - CPPUNIT_ASSERT_EQUAL(u"E"_ustr, m_pDoc->GetString(ScAddress(1, 5, 2))); - - CPPUNIT_ASSERT_EQUAL(12.0, m_pDoc->GetValue(ScAddress(2, 1, 2))); - CPPUNIT_ASSERT_EQUAL(66.0, m_pDoc->GetValue(ScAddress(2, 2, 2))); - CPPUNIT_ASSERT_EQUAL(21.0, m_pDoc->GetValue(ScAddress(2, 3, 2))); - CPPUNIT_ASSERT_EQUAL(6.0, m_pDoc->GetValue(ScAddress(2, 4, 2))); - CPPUNIT_ASSERT_EQUAL(99.0, m_pDoc->GetValue(ScAddress(2, 5, 2))); - } - - m_pDoc->DeleteTab(4); m_pDoc->DeleteTab(3); m_pDoc->DeleteTab(2); m_pDoc->DeleteTab(1); diff --git a/sc/source/core/data/TableContentCopier.cxx b/sc/source/core/data/TableContentCopier.cxx index 6a4a35d74351..4a9fdb5701b8 100644 --- a/sc/source/core/data/TableContentCopier.cxx +++ b/sc/source/core/data/TableContentCopier.cxx @@ -91,7 +91,6 @@ void sc::TableContentCopier::updateReferencesAfterTabInsertion( sc::RefUpdateInsertTabContext& rContext) { mpTargetTab->UpdateInsertTabAbs(mnTargetTabNo); - mpTargetTab->AdjustRelativeTabRefs(mnSourceTabNo, mnTargetTabNo, sc::TargetTabState::Inserted); mpSourceTab->UpdateInsertTab(rContext); mpSourceTab->UpdateCompile(); } diff --git a/sc/source/core/data/column.cxx b/sc/source/core/data/column.cxx index 8bcb8f94bc23..ca183f17312f 100644 --- a/sc/source/core/data/column.cxx +++ b/sc/source/core/data/column.cxx @@ -2634,22 +2634,6 @@ public: } }; -/** For adjusting relative tab references. */ -class RelativeTabRefUpdater -{ - SCTAB mnOldTab; - SCTAB mnNewTab; - sc::TargetTabState meMode; -public: - RelativeTabRefUpdater(SCTAB nOldTab, SCTAB nNewTab, sc::TargetTabState eMode) : - mnOldTab(nOldTab), mnNewTab(nNewTab), meMode(eMode) {} - - void operator() (size_t /*nRow*/, ScFormulaCell* pCell) - { - pCell->AdjustRelativeTabRefs(mnOldTab, mnNewTab, meMode); - } -}; - class UsedRangeNameFinder { sc::UpdatedRangeNames& mrIndexes; @@ -3080,12 +3064,6 @@ void ScColumn::UpdateInsertTabAbs(SCTAB nNewPos) CellStorageModified(); } -void ScColumn::AdjustRelativeTabRefs(SCTAB nOldTab, SCTAB nNewTab, sc::TargetTabState eMode) -{ - RelativeTabRefUpdater aFunc(nOldTab, nNewTab, eMode); - sc::ProcessFormula(maCells, aFunc); -} - void ScColumn::UpdateMoveTab( sc::RefUpdateMoveTabContext& rCxt, SCTAB nTabNo ) { nTab = nTabNo; diff --git a/sc/source/core/data/formulacell.cxx b/sc/source/core/data/formulacell.cxx index 9096748d4566..b46ae3fe7cea 100644 --- a/sc/source/core/data/formulacell.cxx +++ b/sc/source/core/data/formulacell.cxx @@ -895,7 +895,8 @@ ScFormulaCell::ScFormulaCell(const ScFormulaCell& rCell, ScDocument& rDoc, const if ((nCloneFlags & ScCloneFlags::AdjustCrossSheetRefs) != ScCloneFlags::Default) { - pCode->AdjustRelativeTabRefs(rCell.aPos.Tab(), aPos.Tab()); + SCTAB nDelta = aPos.Tab() - rCell.aPos.Tab(); + pCode->AdjustRelativeTabRefs(nDelta); } } @@ -4184,18 +4185,6 @@ void ScFormulaCell::UpdateInsertTabAbs(SCTAB nTable) } } -void ScFormulaCell::AdjustRelativeTabRefs(SCTAB nOldTab, SCTAB nNewTab, sc::TargetTabState eMode) -{ - if (rDocument.IsClipOrUndo()) - return; - - bool bAdjustCode = !mxGroup || mxGroup->mpTopCell == this; - if (!bAdjustCode) - return; - - pCode->AdjustRelativeTabRefs(nOldTab, nNewTab, eMode); -} - bool ScFormulaCell::TestTabRefAbs(SCTAB nTable) { if (rDocument.IsClipOrUndo()) diff --git a/sc/source/core/data/table4.cxx b/sc/source/core/data/table4.cxx index ad4be97da919..1ee138c98d28 100644 --- a/sc/source/core/data/table4.cxx +++ b/sc/source/core/data/table4.cxx @@ -2756,12 +2756,6 @@ void ScTable::UpdateInsertTabAbs(SCTAB nTable) aCol[i].UpdateInsertTabAbs(nTable); } -void ScTable::AdjustRelativeTabRefs(SCTAB nOldTab, SCTAB nNewTab, sc::TargetTabState eMode) -{ - for (SCCOL i=0; i < aCol.size(); i++) - aCol[i].AdjustRelativeTabRefs(nOldTab, nNewTab, eMode); -} - bool ScTable::GetNextSpellingCell(SCCOL& rCol, SCROW& rRow, bool bInSel, const ScMarkData& rMark) const { diff --git a/sc/source/core/tool/token.cxx b/sc/source/core/tool/token.cxx index c14c757bfa15..1d8e594b3805 100644 --- a/sc/source/core/tool/token.cxx +++ b/sc/source/core/tool/token.cxx @@ -2627,25 +2627,8 @@ void ScTokenArray::AdjustAbsoluteRefs( const ScDocument& rOldDoc, const ScAddres } } -namespace +void ScTokenArray::AdjustRelativeTabRefs( SCTAB nDelta ) { - -void adjustRelativeTabRef(ScSingleRefData& rRef, SCTAB nOldTab, SCTAB nNewTab, bool bInsertedTab) -{ - if (!rRef.IsTabRel() || rRef.Tab() == 0) - return; - SCTAB nAbsTarget = nOldTab + rRef.Tab(); - if (bInsertedTab && nAbsTarget >= nNewTab) - nAbsTarget++; - SCTAB nNewOffset = nAbsTarget - nNewTab; - rRef.IncTab(nNewOffset - rRef.Tab()); -} - -} // anonymous namespace - -void ScTokenArray::AdjustRelativeTabRefs(SCTAB nOldTab, SCTAB nNewTab, sc::TargetTabState eMode) -{ - const bool bInsertedTab = (eMode == sc::TargetTabState::Inserted); TokenPointers aPtrs( pCode.get(), nLen, pRPN.get(), nRPN, true); for (size_t j=0; j<2; ++j) { @@ -2662,14 +2645,17 @@ void ScTokenArray::AdjustRelativeTabRefs(SCTAB nOldTab, SCTAB nNewTab, sc::Targe case svDoubleRef: { ScComplexRefData& rRef = static_cast(p)->GetDoubleRef(); - adjustRelativeTabRef(rRef.Ref1, nOldTab, nNewTab, bInsertedTab); - adjustRelativeTabRef(rRef.Ref2, nOldTab, nNewTab, bInsertedTab); + if (rRef.Ref1.IsTabRel() && rRef.Ref1.Tab() != 0) + rRef.Ref1.IncTab(-nDelta); + if (rRef.Ref2.IsTabRel() && rRef.Ref2.Tab() != 0) + rRef.Ref2.IncTab(-nDelta); break; } case svSingleRef: { ScSingleRefData& rRef = static_cast(p)->GetSingleRef(); - adjustRelativeTabRef(rRef, nOldTab, nNewTab, bInsertedTab); + if (rRef.IsTabRel() && rRef.Tab() != 0) + rRef.IncTab(-nDelta); break; } default: From b698be10027edbc34ebcd9e7f1bd9ccb246ed8e0 Mon Sep 17 00:00:00 2001 From: Xisco Fauli Date: Tue, 29 Sep 2026 12:17:39 +0200 Subject: [PATCH 029/289] tdf#173608: sc: Add test Change-Id: Ifb5cf04f172f54ea0826d31b7d323b5af7d7107f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211554 Reviewed-by: Xisco Fauli Tested-by: Jenkins --- sc/qa/unit/uicalc/uicalc.cxx | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/sc/qa/unit/uicalc/uicalc.cxx b/sc/qa/unit/uicalc/uicalc.cxx index cfd04f9458d7..e31ab4e065de 100644 --- a/sc/qa/unit/uicalc/uicalc.cxx +++ b/sc/qa/unit/uicalc/uicalc.cxx @@ -2301,6 +2301,32 @@ CPPUNIT_TEST_FIXTURE(ScUiCalcTest, testTdf138710) CPPUNIT_ASSERT_EQUAL(u"Total"_ustr, pDoc->GetString(ScAddress(0, 0, 1))); } +CPPUNIT_TEST_FIXTURE(ScUiCalcTest, testTdf173608_relative_references_when_copying_sheets) +{ + createScDoc(); + ScDocument* pDoc = getScDoc(); + + insertStringToCell(u"A1"_ustr, u"1"); + insertStringToCell(u"A2"_ustr, u"2"); + + insertNewSheet(*pDoc); + + insertStringToCell(u"A1"_ustr, u"=$Sheet1.A1+1"); + insertStringToCell(u"A2"_ustr, u"=Sheet1.A2+1"); + + CPPUNIT_ASSERT_EQUAL(u"2"_ustr, pDoc->GetString(ScAddress(0, 0, 1))); + CPPUNIT_ASSERT_EQUAL(u"3"_ustr, pDoc->GetString(ScAddress(0, 1, 1))); + + dispatchCommand(mxComponent, u".uno:DuplicateSheet"_ustr, {}); + CPPUNIT_ASSERT_EQUAL(static_cast(3), pDoc->GetTableCount()); + + CPPUNIT_ASSERT_EQUAL(u"2"_ustr, pDoc->GetString(ScAddress(0, 0, 2))); + // Without the fix in place, this test would have failed with + // - Expected: 4 + // - Actual : 3 + CPPUNIT_ASSERT_EQUAL(u"4"_ustr, pDoc->GetString(ScAddress(0, 1, 2))); +} + CPPUNIT_TEST_FIXTURE(ScUiCalcTest, testTdf128914) { createScDoc("tdf128914.ods"); From f13d47614f4c09f10292a8604e5fb05425021a57 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Wed, 10 Jun 2026 10:54:59 +0200 Subject: [PATCH 030/289] reduce CPU cost of updating styles list we have a background task with a call-stack that looks like SwStyleSheetIterator::AppendStyleList SwStyleSheetIterator::First StyleItemController::DrawEntry StylesPreviewWindow_Base::GetCachedPreview StylesPreviewWindow_Base::UpdateStylesList StylesListUpdateTask::Invoke And we can avoid iterating repeatedly over the entire pool by searching by name. We could be even faster by caching pointers to stylesheets but that is a more invasive change. Change-Id: Iec25bb4757440825aec62110d974a5001b0690f7 Signed-off-by: Noel Grandin Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/4188 Reviewed-by: Miklos Vajna Tested-by: Jenkins CPCI (cherry picked from commit 0572dc68861e7fd85da43a0b6635af7c5ea3889b) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211560 Tested-by: Jenkins Reviewed-by: Xisco Fauli --- svx/source/tbxctrls/StylesPreviewWindow.cxx | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/svx/source/tbxctrls/StylesPreviewWindow.cxx b/svx/source/tbxctrls/StylesPreviewWindow.cxx index 3afdc6d9b8bb..50f5d24a71b6 100644 --- a/svx/source/tbxctrls/StylesPreviewWindow.cxx +++ b/svx/source/tbxctrls/StylesPreviewWindow.cxx @@ -301,16 +301,12 @@ void StyleItemController::DrawEntry(vcl::RenderContext& rRenderContext) return; SfxStyleSheetBasePool* pPool = pShell->GetStyleSheetPool(); - SfxStyleSheetBase* pStyle = nullptr; - if (!pPool) return; - pStyle = pPool->First(m_eStyleFamily); - while (pStyle && pStyle->GetName() != m_aStyleName.commonName - && pStyle->GetName() != m_aStyleName.translatedName) - pStyle = pPool->Next(); - + SfxStyleSheetBase* pStyle = pPool->Find(m_aStyleName.translatedName, m_eStyleFamily); + if (!pStyle) + pStyle = pPool->Find(m_aStyleName.commonName, m_eStyleFamily); if (!pStyle) return; From 3f2e68ce5fc9013a586bcb3964966f31be45ef26 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= Date: Mon, 28 Sep 2026 19:48:10 +0000 Subject: [PATCH 031/289] ofz#566780367 Out-of-memory MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit the stream that collects the parts of a multipart object is writable, so a seek past its end while reading the object grows it to fit so read the finished object from a read-only view of the parts written Signed-off-by: Caolán McNamara Change-Id: I0e615e28a7ddd540d84f84e9cf542b29aa68ba57 Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/13724 Tested-by: Jenkins CPCI Reviewed-by: Noel Grandin (cherry picked from commit 793c9cfb7fac082ffead5d1726b1e3f92a00090f) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211561 Tested-by: Jenkins Reviewed-by: Xisco Fauli --- drawinglayer/source/tools/emfphelperdata.cxx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drawinglayer/source/tools/emfphelperdata.cxx b/drawinglayer/source/tools/emfphelperdata.cxx index 2c8be1c50447..7ee3c913f651 100644 --- a/drawinglayer/source/tools/emfphelperdata.cxx +++ b/drawinglayer/source/tools/emfphelperdata.cxx @@ -1632,8 +1632,10 @@ namespace emfplushelper if (mbMultipart) { SAL_INFO("drawinglayer.emf", "EMF+ multipart record flags: " << mMFlags); - mMStream.Seek(0); - processObjectRecord(mMStream, mMFlags, 0, true); + // a read-only view of the parts written so far, which cannot grow on a seek + SvMemoryStream aObjectStream(const_cast(mMStream.GetData()), + mMStream.Tell(), StreamMode::READ); + processObjectRecord(aObjectStream, mMFlags, 0, true); } mbMultipart = false; From 6296615b8d5c96530c59b06a9873be3614a1e76c Mon Sep 17 00:00:00 2001 From: Michael Weghorn Date: Tue, 29 Sep 2026 14:20:18 +0200 Subject: [PATCH 032/289] tdf#173695 svx: Ensure minimum height for ColorWindow The number of colors displayed in the ColorIconView in ColorWindow depends on the selected palette. When the popup is shown for the first time, its size is calculated based on the size of the widgets it contains, and the size of the weld::IconView used for ColorIconView is in turn based on the number of colors in the initial palette. If the initial palette has few (or no) colors, switching to a palette with many colors results in the need for the weld::IconView to use more space than previously to show the additional items, but since the popup doesn't resize, it remains at its initial size and the selection of colors is inconvenient or even impossible. Avoid the problem by ensuring the ColorIconView has a minimum height of at least 200 pixels. Before the switch to ColorIconView in commit a4d5983b4e9331950fce1a6895d55becabcdaf5f Author: Michael Weghorn Date: Fri Jun 5 11:48:54 2026 +0200 tdf#130857 Port ColorWindow from SvxColorValueSet to ColorIconView , the SvxColorValueSet widget in use previously was always set to a fixed size altogether. Change-Id: I7b24dd823083891126cf7b4d0ebe1914c1e0cc87 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211565 Tested-by: Jenkins Reviewed-by: Michael Weghorn --- include/svx/ColorIconView.hxx | 4 ++++ svx/source/tbxctrls/ColorIconView.cxx | 7 +++++++ svx/source/tbxctrls/tbcontrl.cxx | 5 +++++ 3 files changed, 16 insertions(+) diff --git a/include/svx/ColorIconView.hxx b/include/svx/ColorIconView.hxx index 7e054e0f253f..a789a813527f 100644 --- a/include/svx/ColorIconView.hxx +++ b/include/svx/ColorIconView.hxx @@ -11,6 +11,7 @@ #include #include +#include #include #include @@ -54,6 +55,9 @@ public: void set_sensitive(bool bSensitive); + void set_size_request(int nWidth, int nHeight); + Size get_size_request() const; + void set_help_id(const OUString& rName); void setColorActivatedHdl(const Link& rLink) { m_aColorActivatedHdl = rLink; } diff --git a/svx/source/tbxctrls/ColorIconView.cxx b/svx/source/tbxctrls/ColorIconView.cxx index 031f647ca5bc..e0899788e3c7 100644 --- a/svx/source/tbxctrls/ColorIconView.cxx +++ b/svx/source/tbxctrls/ColorIconView.cxx @@ -64,6 +64,13 @@ void ColorIconView::grab_focus() { m_pIconView->grab_focus(); } void ColorIconView::set_sensitive(bool bSensitive) { m_pIconView->set_sensitive(bSensitive); } +void ColorIconView::set_size_request(int nWidth, int nHeight) +{ + m_pIconView->set_size_request(nWidth, nHeight); +} + +Size ColorIconView::get_size_request() const { return m_pIconView->get_size_request(); } + void ColorIconView::set_help_id(const OUString& rName) { m_pIconView->set_help_id(rName); } IMPL_LINK(ColorIconView, ItemActivatedHdl, const weld::TreeIter&, rIter, bool) diff --git a/svx/source/tbxctrls/tbcontrl.cxx b/svx/source/tbxctrls/tbcontrl.cxx index d6b2851ea856..5d667c01efd7 100644 --- a/svx/source/tbxctrls/tbcontrl.cxx +++ b/svx/source/tbxctrls/tbcontrl.cxx @@ -2123,6 +2123,11 @@ ColorWindow::ColorWindow(OUString rCommand, mxPaletteManager->ReloadColorSet(maColorIconView); mxPaletteManager->ReloadRecentColorSet(maRecentColorIconView); + // ensure minimum height to also provide space for palettes with + // more colors when one with few colors is initially selected + if (maColorIconView.get_size_request().Height() < 200) + maColorIconView.set_size_request(-1, 200); + AddStatusListener( u".uno:ColorTableState"_ustr ); AddStatusListener( maCommand ); if ( maCommand == ".uno:FrameLineColor" ) From ec99b899d49a8bf5c553268da4e1c96c979d9464 Mon Sep 17 00:00:00 2001 From: Michael Weghorn Date: Tue, 29 Sep 2026 15:57:14 +0200 Subject: [PATCH 033/289] vcl: Pass SvLBoxItem::Paint's SvVieweDataEntry param by ref ... instead of by pointer. This makes clear it's always non-null. Change-Id: Iea22c33171572eec0533550293a793372d889ee9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211569 Tested-by: Jenkins Reviewed-by: Michael Weghorn --- include/vcl/toolkit/svlbitm.hxx | 9 +++------ include/vcl/toolkit/treelistbox.hxx | 5 ++++- toolkit/source/controls/tree/treecontrolpeer.cxx | 10 ++++++---- vcl/inc/SvLBoxButton.hxx | 2 +- vcl/source/treelist/SvLBoxButton.cxx | 2 +- vcl/source/treelist/iconview.cxx | 4 ++-- vcl/source/treelist/svlbitm.cxx | 13 ++++++------- vcl/source/treelist/treelistbox.cxx | 2 +- 8 files changed, 24 insertions(+), 23 deletions(-) diff --git a/include/vcl/toolkit/svlbitm.hxx b/include/vcl/toolkit/svlbitm.hxx index 14ddf1961a93..bc8fa5488d2e 100644 --- a/include/vcl/toolkit/svlbitm.hxx +++ b/include/vcl/toolkit/svlbitm.hxx @@ -93,8 +93,7 @@ public: } virtual void Paint(const Point& rPos, SvTreeListBox& rOutDev, - vcl::RenderContext& rRenderContext, - const SvViewDataEntry* pView, + vcl::RenderContext& rRenderContext, const SvViewDataEntry& rView, const SvTreeListEntry& rEntry) override; virtual std::unique_ptr Clone(SvLBoxItem const * pSource) const override; @@ -112,10 +111,8 @@ public: virtual SvLBoxItemType GetType() const override; virtual void InitViewData(SvTreeListBox& rView, SvTreeListEntry& rEntry, SvViewDataItem* pViewData = nullptr) override; - virtual void Paint(const Point& rPos, - SvTreeListBox& rOutDev, - vcl::RenderContext& rRenderContext, - const SvViewDataEntry* pView, + virtual void Paint(const Point& rPos, SvTreeListBox& rOutDev, + vcl::RenderContext& rRenderContext, const SvViewDataEntry& rView, const SvTreeListEntry& rEntry) override; virtual std::unique_ptr Clone(SvLBoxItem const * pSource) const override; diff --git a/include/vcl/toolkit/treelistbox.hxx b/include/vcl/toolkit/treelistbox.hxx index f85979c31c9b..196412de923e 100644 --- a/include/vcl/toolkit/treelistbox.hxx +++ b/include/vcl/toolkit/treelistbox.hxx @@ -134,7 +134,10 @@ public: void Enable(bool bEnabled) { mbDisabled = !bEnabled; } bool isEnable() const { return !mbDisabled; } - virtual void Paint(const Point& rPos, SvTreeListBox& rOutDev, vcl::RenderContext& rRenderContext, const SvViewDataEntry* pView, const SvTreeListEntry& rEntry) = 0; + virtual void Paint(const Point& rPos, SvTreeListBox& rOutDev, + vcl::RenderContext& rRenderContext, const SvViewDataEntry& rView, + const SvTreeListEntry& rEntry) + = 0; virtual void InitViewData(SvTreeListBox& rView, SvTreeListEntry& rEntry, // If != 0: this Pointer must be used! diff --git a/toolkit/source/controls/tree/treecontrolpeer.cxx b/toolkit/source/controls/tree/treecontrolpeer.cxx index bd6e97129156..56505b1f53ab 100644 --- a/toolkit/source/controls/tree/treecontrolpeer.cxx +++ b/toolkit/source/controls/tree/treecontrolpeer.cxx @@ -122,8 +122,9 @@ public: void SetImage( const Image& rImage ); const OUString& GetGraphicURL() const { return maGraphicURL;} void SetGraphicURL( const OUString& rGraphicURL ); - virtual void Paint(const Point& rPos, SvTreeListBox& rOutDev, vcl::RenderContext& rRenderContext, - const SvViewDataEntry* pView, const SvTreeListEntry& rEntry) override; + virtual void Paint(const Point& rPos, SvTreeListBox& rOutDev, + vcl::RenderContext& rRenderContext, const SvViewDataEntry& rView, + const SvTreeListEntry& rEntry) override; std::unique_ptr Clone( SvLBoxItem const * pSource ) const override; private: @@ -1467,8 +1468,9 @@ UnoTreeListItem::UnoTreeListItem() { } -void UnoTreeListItem::Paint( - const Point& rPos, SvTreeListBox& rDev, vcl::RenderContext& rRenderContext, const SvViewDataEntry* /*pView*/, const SvTreeListEntry& rEntry) +void UnoTreeListItem::Paint(const Point& rPos, SvTreeListBox& rDev, + vcl::RenderContext& rRenderContext, const SvViewDataEntry& /*rView*/, + const SvTreeListEntry& rEntry) { Point aPos(rPos); Size aSize(GetWidth(rDev, rEntry), GetHeight(rDev, rEntry)); diff --git a/vcl/inc/SvLBoxButton.hxx b/vcl/inc/SvLBoxButton.hxx index a6bc44a38758..1cff4a12bbea 100644 --- a/vcl/inc/SvLBoxButton.hxx +++ b/vcl/inc/SvLBoxButton.hxx @@ -81,7 +81,7 @@ public: void ClickHdl(SvTreeListEntry*); virtual void Paint(const Point& rPos, SvTreeListBox& rOutDev, - vcl::RenderContext& rRenderContext, const SvViewDataEntry* pView, + vcl::RenderContext& rRenderContext, const SvViewDataEntry& rView, const SvTreeListEntry& rEntry) override; virtual std::unique_ptr Clone(SvLBoxItem const* pSource) const override; diff --git a/vcl/source/treelist/SvLBoxButton.cxx b/vcl/source/treelist/SvLBoxButton.cxx index 519a34d80125..c6419a501feb 100644 --- a/vcl/source/treelist/SvLBoxButton.cxx +++ b/vcl/source/treelist/SvLBoxButton.cxx @@ -142,7 +142,7 @@ void SvLBoxButton::ClickHdl(SvTreeListEntry* pEntry) } void SvLBoxButton::Paint(const Point& rPos, SvTreeListBox& rDev, vcl::RenderContext& rRenderContext, - const SvViewDataEntry* /*pView*/, const SvTreeListEntry& /*rEntry*/) + const SvViewDataEntry& /*rView*/, const SvTreeListEntry& /*rEntry*/) { SvBmp nIndex = SvLBoxButtonData::GetIndex(m_nItemFlags); DrawImageFlags nStyle diff --git a/vcl/source/treelist/iconview.cxx b/vcl/source/treelist/iconview.cxx index 17827a954104..c581a4d125cd 100644 --- a/vcl/source/treelist/iconview.cxx +++ b/vcl/source/treelist/iconview.cxx @@ -252,7 +252,7 @@ void IconView::PaintEntry(SvTreeListEntry& rEntry, tools::Long nX, tools::Long n auto nItemHeight = SvLBoxItem::GetHeight(rViewDataEntry, nCurItem); nLabelYPos += nItemHeight; - rEntry.GetItem(nCurItem).Paint(aEntryPos, *this, rRenderContext, &rViewDataEntry, rEntry); + rEntry.GetItem(nCurItem).Paint(aEntryPos, *this, rRenderContext, rViewDataEntry, rEntry); } if (bFillColorSet) @@ -277,7 +277,7 @@ void IconView::PaintEntry(SvTreeListEntry& rEntry, tools::Long nX, tools::Long n } aEntryPos.AdjustY((nImageAreaHeight - nItemHeight) / 2 + m_nSpacing); - rItem.Paint(aEntryPos, *this, rRenderContext, &rViewDataEntry, rEntry); + rItem.Paint(aEntryPos, *this, rRenderContext, rViewDataEntry, rEntry); } } diff --git a/vcl/source/treelist/svlbitm.cxx b/vcl/source/treelist/svlbitm.cxx index 77f4053927bc..3b6225d66f24 100644 --- a/vcl/source/treelist/svlbitm.cxx +++ b/vcl/source/treelist/svlbitm.cxx @@ -71,9 +71,8 @@ namespace } } -void SvLBoxString::Paint( - const Point& rPos, SvTreeListBox& rDev, vcl::RenderContext& rRenderContext, - const SvViewDataEntry* /*pView*/, const SvTreeListEntry& rEntry) +void SvLBoxString::Paint(const Point& rPos, SvTreeListBox& rDev, vcl::RenderContext& rRenderContext, + const SvViewDataEntry& /*rView*/, const SvTreeListEntry& rEntry) { DrawTextFlags nStyle = (rDev.IsEnabled() && !mbDisabled) ? DrawTextFlags::NONE : DrawTextFlags::Disable; if (rEntry.IsSeparator()) @@ -219,13 +218,13 @@ void SvLBoxContextBmp::InitViewData(SvTreeListBox& rView, SvTreeListEntry& rEntr pViewData->mnHeight = aSize.Height(); } -void SvLBoxContextBmp::Paint( - const Point& _rPos, SvTreeListBox& _rDev, vcl::RenderContext& rRenderContext, - const SvViewDataEntry* pView, const SvTreeListEntry& rEntry) +void SvLBoxContextBmp::Paint(const Point& _rPos, SvTreeListBox& _rDev, + vcl::RenderContext& rRenderContext, const SvViewDataEntry& rView, + const SvTreeListEntry& rEntry) { // get the image. - const Image& rImage = !pView->IsExpanded() ? m_aImage1 : m_aImage2; + const Image& rImage = !rView.IsExpanded() ? m_aImage1 : m_aImage2; bool _bSemiTransparent = bool( SvTLEntryFlags::SEMITRANSPARENT & rEntry.GetFlags( ) ); // draw diff --git a/vcl/source/treelist/treelistbox.cxx b/vcl/source/treelist/treelistbox.cxx index a5857ea5ae9e..e0dcfd7ca2bb 100644 --- a/vcl/source/treelist/treelistbox.cxx +++ b/vcl/source/treelist/treelistbox.cxx @@ -2928,7 +2928,7 @@ void SvTreeListBox::PaintEntry1(SvTreeListEntry& rEntry, tools::Long nLine, vcl: // center vertically aEntryPos.AdjustY((nTempEntryHeight - aSize.Height()) / 2 ); - rItem.Paint(aEntryPos, *this, rRenderContext, &rViewDataEntry, rEntry); + rItem.Paint(aEntryPos, *this, rRenderContext, rViewDataEntry, rEntry); // division line between tabs (but not if this is a separator line) if (!bSeparator && pNextTab && rItem.GetType() == SvLBoxItemType::String && From 0b0eed92e98f427818ef66719d6f4fa443c11e25 Mon Sep 17 00:00:00 2001 From: Michael Weghorn Date: Tue, 29 Sep 2026 16:16:55 +0200 Subject: [PATCH 034/289] tdf#170653 vcl: Reset text color after drawing highlighted IconView item For drawing the currently highlighted item in a vcl IconView, the text color is set to the highlight text color in IconView::PaintEntry. This is for example white when using gen or qt6 with a light theme. However, the color wasn't reset to the original color any more since commit 7cd00ca413da8d29f54749c04493e85937a2fa38 Date: Thu Jan 30 09:55:02 2025 +0200 use more OutputDevice::Push/Pop (tdf#164799 related) , so white was still used to draw the text for any items after the selected item as well, and the white text on white background was not visible. Make sure the text color gets reset again by adding the vcl::PushFlags::TEXTCOLOR flag for the ScopeGuard as well. Change-Id: I3ffd1ea0295bbf0faa4226d9573e1f5230b8ed7a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211573 Tested-by: Jenkins Reviewed-by: Michael Weghorn --- vcl/source/treelist/iconview.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vcl/source/treelist/iconview.cxx b/vcl/source/treelist/iconview.cxx index c581a4d125cd..d27039b6b604 100644 --- a/vcl/source/treelist/iconview.cxx +++ b/vcl/source/treelist/iconview.cxx @@ -167,7 +167,7 @@ void IconView::PaintEntry(SvTreeListEntry& rEntry, tools::Long nX, tools::Long n Point aEntryPos(nX, nY); auto popIt = rRenderContext.ScopedPush(vcl::PushFlags::FILLCOLOR | vcl::PushFlags::LINECOLOR - | vcl::PushFlags::FONT); + | vcl::PushFlags::FONT | vcl::PushFlags::TEXTCOLOR); const Color aBackupColor = rRenderContext.GetFillColor(); const StyleSettings& rSettings = rRenderContext.GetSettings().GetStyleSettings(); From 5dc72823c12d04010fc31398f3e6d467e1979547 Mon Sep 17 00:00:00 2001 From: Jaume Pujantell Date: Thu, 17 Sep 2026 17:31:38 +0000 Subject: [PATCH 035/289] sw: apply the contextual spacing that a table style sets A table style in a DOCX file can ask for no spacing between paragraphs that share a style, and Word applies that to the paragraphs inside the table. Writer dropped it, so a cell holding more than one paragraph of the same style showed a gap between them that Word does not show. endTable collects the paragraph properties a table style defines and passes them to ApplyParagraphPropertiesFromTableStyle, after erasing everything that isParagraphProperty does not accept. That function tests a range over the order in which the PropertyIds enumerators are declared, and PROP_PARA_CONTEXT_MARGIN was declared outside the range. The function and the position both come from "tdf#129575 DOCX import: fix table style preference" (f15d67442972, Change-Id I3bab9d85d77d0e5f1c357121b1caf02cbe4899c4), so the contextual spacing of a table style has never reached a paragraph. The enumerator now sits with the other paragraph properties, and a note above the enum says that the position is what the range test reads, as one already does for the character properties. Signed-off-by: Jaume Pujantell Change-Id: I887ea35f8d0422c31cfaecf849b355f0d5453260 Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/13052 Reviewed-by: Miklos Vajna (cherry picked from commit 1a4ae2182b0a4e08fbb042fc955aefc7742fb42c) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211575 Tested-by: Jenkins Reviewed-by: Xisco Fauli --- .../dmapper/DomainMapperTableHandler.cxx | 23 ++++++++++++++++++ .../data/table-style-contextual-spacing.docx | Bin 0 -> 7635 bytes .../writerfilter/dmapper/PropertyIds.hxx | 3 ++- 3 files changed, 25 insertions(+), 1 deletion(-) create mode 100644 sw/qa/writerfilter/dmapper/data/table-style-contextual-spacing.docx diff --git a/sw/qa/writerfilter/dmapper/DomainMapperTableHandler.cxx b/sw/qa/writerfilter/dmapper/DomainMapperTableHandler.cxx index d023c30e08f1..2fdbc63af344 100644 --- a/sw/qa/writerfilter/dmapper/DomainMapperTableHandler.cxx +++ b/sw/qa/writerfilter/dmapper/DomainMapperTableHandler.cxx @@ -333,6 +333,29 @@ CPPUNIT_TEST_FIXTURE(Test, testDOCXFloatingTableHidemark) CPPUNIT_ASSERT_EQUAL(static_cast(1), rPage2Objs.size()); CPPUNIT_ASSERT(!pPage2->GetNext()); } + +CPPUNIT_TEST_FIXTURE(Test, testTableStyleContextualSpacing) +{ + // Given a document with a table style that turns on contextual spacing, while the default + // paragraph style sets a spacing below the paragraph: + // When loading that document: + loadFromFile(u"table-style-contextual-spacing.docx"); + + // Then make sure the in-table paragraph gets the contextual spacing of the table style: + uno::Reference xTextDocument(mxComponent, uno::UNO_QUERY); + uno::Reference xText(xTextDocument->getText(), uno::UNO_QUERY); + uno::Reference xParaEnum = xText->createEnumeration(); + uno::Reference xTable(xParaEnum->nextElement(), uno::UNO_QUERY); + uno::Reference xCell(xTable->getCellByName(u"A1"_ustr), + uno::UNO_QUERY); + xParaEnum = xCell->createEnumeration(); + uno::Reference xParaProps(xParaEnum->nextElement(), uno::UNO_QUERY); + bool bContextMargin{}; + xParaProps->getPropertyValue(u"ParaContextMargin"_ustr) >>= bContextMargin; + // Without the accompanying fix in place, this test would have failed, because the contextual + // spacing of the table style never reached the paragraphs of the cells. + CPPUNIT_ASSERT(bContextMargin); +} } CPPUNIT_PLUGIN_IMPLEMENT(); diff --git a/sw/qa/writerfilter/dmapper/data/table-style-contextual-spacing.docx b/sw/qa/writerfilter/dmapper/data/table-style-contextual-spacing.docx new file mode 100644 index 0000000000000000000000000000000000000000..818f540980b3baf6b84dd259c8bd0595b5620a68 GIT binary patch literal 7635 zcmZ`;by$?|wjJq|knR-e4rv4i7#e99YUs`ZDQP66yBicqVE};v1XNPGJEcL8khGjt0^KP5dZ)HG{BxE7kIH~#9s3O06>Eb06e<;)j->PlM7e&Ec7OLSYQhD;Yo29oV## zPe3loO$9c_F3m(stC@i?Z^#@OfyUg*2#IKeHbI0M6|am(m4L+(<5+9TZ7*3p4v}(P zZAH7R&(V_gg?e))u9_GXmekB~93Y8W7=(rI_336>FF5i|)?uid0%oz~A);wR znl}%pwu~;U6ZqqlH4BKf+)@og&5O{z)!)|&Il2Y#Y9^0YPYOD6BV)hv-Kb|hP1e_2 z+*y&F5o$kvUI(8)lI#jn1ng#s;AtNoLAfKTH?nC6H&w>NgO4G*6(Y2+1aW6Jm&{`- z25RK@vx;!z1%7ItJS`ox7%r@>{57a%#brI_1m!g&QN zbK}(Vx|d#oxi>gUk1+Bp8A|;5tF(dkN9!yyr|YGdHgwEi#~=*v3v*nwCePCRdGpe_ z$0uy%4SZ1Fipj#mC_fC6`eRs1)THvV$HjhJs0DXvZYMVKytZZj!A54!#mSfzZ}tv@ z?675c+qv^ye{4Lu({g7ebX(hy(&W;1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kvf-r~Vo0BrL>{|tyi({OmxQX+h(Kl7TGo#9%SL-~FaR`W6 z@d6ThJx;SaF(=7bh|gk2K42eMNT~>1A^@r7wH7KQ4V6y>Ywd4H_FZYPY>^`h78BR% zP-pLkdVuAAG$yaypkM2Xx50FM7 zvPxp^s!;{2ln!>1d<=%QM!{)xq{gJqH%4ayOqfDD_$vlkP3aIWADisybF%f+}Z#47ZU?=WeX3?kd04fx4q_o``xl$ z*o(7&%R2tKV!gB6e0VoMA0SX6{{P#rJ6-^H90BSAe|`EdyRiEK?r&~>!TuE>^zQYK zJrK3oN^Hf`5bmnzQ%u_Z9X(_$A{1qPO?q_jTbva2wKp!2hihYKq8r TF7>Z1Ats>Xu28PXetr8N!&r=p literal 0 HcmV?d00001 diff --git a/sw/source/writerfilter/dmapper/PropertyIds.hxx b/sw/source/writerfilter/dmapper/PropertyIds.hxx index 05c79e3cb391..448b81d3520c 100644 --- a/sw/source/writerfilter/dmapper/PropertyIds.hxx +++ b/sw/source/writerfilter/dmapper/PropertyIds.hxx @@ -22,6 +22,7 @@ namespace writerfilter::dmapper{ // Ensure that Character Properties are placed between PROP_CHARACTER_STYLES and PROP_CHARACTER_END +// Ensure that Paragraph Properties are placed between PROP_PARA_ADJUST and PROP_PARA_WIDOWS enum PropertyIds { INVALID = 0 @@ -250,6 +251,7 @@ enum PropertyIds ,PROP_PARAGRAPH_STYLES ,PROP_PARA_ADJUST ,PROP_PARA_BOTTOM_MARGIN + ,PROP_PARA_CONTEXT_MARGIN ,PROP_PARA_FIRST_LINE_INDENT ,PROP_PARA_FIRST_LINE_INDENT_UNIT ,PROP_PARA_IS_HANGING_PUNCTUATION @@ -356,7 +358,6 @@ enum PropertyIds ,PROP_WRITING_MODE ,PROP_FRM_DIRECTION ,PROP_EMBEDDED_OBJECT - ,PROP_PARA_CONTEXT_MARGIN ,PROP_PAGE_STYLE_LAYOUT ,PROP_Z_ORDER ,PROP_EMBED_FONTS From f35003f9432ae2e0aab9dfbee39975edee4675fc Mon Sep 17 00:00:00 2001 From: Jaume Pujantell Date: Fri, 18 Sep 2026 14:51:28 +0000 Subject: [PATCH 036/289] sw: let contextual spacing reach across a cell boundary A table in a DOCX file whose style turns on contextual spacing, with one paragraph per cell and the same paragraph style in every cell, came out taller than in Word, because every row kept the space above and below its paragraph. A document with enough rows then needed a page more than Word used for it. Between two paragraphs in one flow the question is already asked, in GetSpacingValuesOfFrame, which drops the lower spacing when contextual spacing is on and both paragraphs use the same style. At a cell boundary neither end asked. CalcAddLowerSpaceAsLastInTableCell added the lower spacing of the paragraph that ends a cell whatever that paragraph asked for, and CalcUpperSpace gave the paragraph that starts a cell its whole space above, because a cell holds no earlier frame to compare it with. A paragraph that ends or starts a cell now drops the spacing on that side when the neighbouring paragraph in the document uses the same style, which is what Word 2019 and Word 2021 both do. The space above changes only for a paragraph in a table, so the other frames that reach the same branch, at the top of a page or in a header, keep what they had. Signed-off-by: Jaume Pujantell Change-Id: Ibaaad160fd6a90acafc43925dd73ef1b92661f02 Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/13053 Reviewed-by: Miklos Vajna Tested-by: Jenkins CPCI (cherry picked from commit 174259fde47b3d833cde7dd288e632c5f452cb79) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211576 Reviewed-by: Xisco Fauli Tested-by: Jenkins --- ...-style-contextual-spacing-rows-before.docx | Bin 0 -> 7604 bytes .../table-style-contextual-spacing-rows.docx | Bin 0 -> 7603 bytes sw/qa/extras/layout/layout6.cxx | 32 ++++++++++++++++++ sw/qa/uitest/trackedChanges/tdf150443.py | 2 +- sw/source/core/layout/flowfrm.cxx | 17 +++++++++- 5 files changed, 49 insertions(+), 2 deletions(-) create mode 100644 sw/qa/extras/layout/data/table-style-contextual-spacing-rows-before.docx create mode 100644 sw/qa/extras/layout/data/table-style-contextual-spacing-rows.docx diff --git a/sw/qa/extras/layout/data/table-style-contextual-spacing-rows-before.docx b/sw/qa/extras/layout/data/table-style-contextual-spacing-rows-before.docx new file mode 100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G9a+J5foHr(#L^L)#I~ot4Mr?t*|TmmiA{)8Ag^GWERhzg z=)4LSE?aFdEw2)`V_lMeeu5i(gO!H@Tw)I<-Q_31V9Wc0W_S^XR?ni8{OL}yXjT^+ z0b>fua~FinjJ7X47x$!pjgR)#qSqAkAp|>je0B>5Q0mgtFl|<{kN_|Yrz|d zWHs^E9AxQ6=G@~_5n-(sW%hoEo58bhjmc{; z)LU(_c8C^6k(f+x0ABj)+f-;U4R{8JrQz;7(qW4`X7v_9T9xgyGXQ8=@`aYBpcxX1 zIXqdzxTjBxz5S?!TYr|(8mN*!JgnH|a-lmVBuK>9pT-(rbZErM{n{UeGqeuvpsO{O zGFKB#EqZN?F51#lv!5rWy~936j@?>!GcthZL$ub8Tb6)zqkYUpW|;;(gp)ug;3`%0#tXHyPnzF*jqpupK* z*759-5657XUrd`h5EZz)r++Gz$;nSvw$|e~O+B%9PPF7gEf01gNWDS@LDy0Vt1(7E zvLqlN4nOrP7j|l)T)UnD;kk28OtrqHmXc1d<67o#ci zWpckY?(*dvHm0ztYW#I)heU^{D3CK-Xn3AvY9_n=4Lj8Lj^)Z$jO|O->Gw6Oz0WPj z_uUf?9uMLFpKjgr^7E<-`0@D1tn2Rpe@|xq7Y+c_1%%vl{l}c7{7pp0jc*3 zXd3i})1LHG~7{S*G<^MC8YZ@3)sAMpREgo*;GetULSpace().GetContext() + && lcl_IdenticalStyles(m_rThis.FindPrevCnt(), &m_rThis)) + { + // Contextual spacing reaches across a cell boundary, so the paragraph that starts + // a cell drops its space above when the previous paragraph uses the same style. + nUpper = 0; + } else lcl_PartiallyCollapseUpper(*pOwn, nUpper); // possibly modifies nUpper } @@ -1978,7 +1985,15 @@ SwTwips SwFlowFrame::CalcAddLowerSpaceAsLastInTableCell( if (_pAttrs) { - nAdditionalLowerSpace += _pAttrs->GetULSpace().GetLower(); + // Contextual spacing reaches across a cell boundary, so the paragraph that ends a + // cell drops its space below when the next paragraph uses the same style. + const bool bContextualSpacing + = _pAttrs->GetULSpace().GetContext() + && lcl_IdenticalStyles(pFrame, pFrame ? pFrame->FindNextCnt() : nullptr); + if (!bContextualSpacing) + { + nAdditionalLowerSpace += _pAttrs->GetULSpace().GetLower(); + } if (rIDSA.get(DocumentSettingId::ADD_PARA_LINE_SPACING_TO_TABLE_CELLS)) { From bc6c2272bad177d1928786f85740eecd994d6d34 Mon Sep 17 00:00:00 2001 From: Andreas Heinisch Date: Tue, 29 Sep 2026 08:55:19 +0200 Subject: [PATCH 037/289] tdf#111085 - Exchange master page only once per master Exchanging the master page already updates all slides using the same master, so it is enough to update one selected slide per master. Change-Id: I1a76d20c33151c30679f5b11d179ffb2052e9438 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211580 Tested-by: Jenkins Reviewed-by: Andreas Heinisch --- sd/source/ui/func/fuprlout.cxx | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/sd/source/ui/func/fuprlout.cxx b/sd/source/ui/func/fuprlout.cxx index 82e1124e3803..459c2c1ad7d8 100644 --- a/sd/source/ui/func/fuprlout.cxx +++ b/sd/source/ui/func/fuprlout.cxx @@ -38,6 +38,7 @@ #include #include #include +#include namespace sd { @@ -187,6 +188,16 @@ void FuPresentationLayout::DoExecute( SfxRequest& rReq ) if (bError) return; + // tdf#111085 - exchanging the master page already updates all slides using the same master, + // so it is enough to update one selected slide per master + std::vector aPageNumsToChange; + std::unordered_set aHandledLayouts; + for (size_t i = 0; i < aSelectedPages.size(); ++i) + { + if (!bMasterPage || aHandledLayouts.insert(aSelectedPages[i]->GetLayoutName()).second) + aPageNumsToChange.push_back(aSelectedPageNums[i]); + } + mpDocSh->SetWaitCursor( true ); /* Here, we only exchange masterpages, therefore the current page @@ -210,14 +221,14 @@ void FuPresentationLayout::DoExecute( SfxRequest& rReq ) OUString aLayoutName; if( pTempDoc ) aLayoutName = aFile.getToken(0, DOCUMENT_TOKEN, nIdx); - for (auto nSelectedPage : aSelectedPageNums) + for (auto nSelectedPage : aPageNumsToChange) mrDoc.SetMasterPage(nSelectedPage, aLayoutName, pTempDoc, bMasterPage, bCheckMasters); mrDoc.CloseBookmarkDoc(); } else { // use master page with the layout name aFile from current Doc - for (auto nSelectedPage : aSelectedPageNums) + for (auto nSelectedPage : aPageNumsToChange) mrDoc.SetMasterPage(nSelectedPage, aFile, &mrDoc, bMasterPage, bCheckMasters); } From 7b04a0a0cf5bd882e218adfee6d2383d13e3f2cf Mon Sep 17 00:00:00 2001 From: Michael Meeks Date: Wed, 16 Sep 2026 21:46:23 +0000 Subject: [PATCH 038/289] sw: forward declare sw::FrameFormats in doc.hxx. Forward declare the template and repeat the TableFrameFormats typedef to drop the frameformats.hxx include, which gifted us boost multi_index headers and libxml/xmlwriter.h into every user of doc.hxx. clang -ftime-trace suggests this is 0.75% of the sw compile. Signed-off-by: Michael Meeks Change-Id: I7863a8b59491f34d541944f252ec22ece0046b24 Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/12941 Tested-by: Jenkins CPCI Reviewed-by: Noel Grandin (cherry picked from commit c38556dd61c5896d667767d125c59a1e2094f704) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211354 Reviewed-by: Xisco Fauli Tested-by: Jenkins --- sw/inc/doc.hxx | 3 ++- sw/qa/core/layout/ftnfrm.cxx | 1 + sw/qa/core/layout/tabfrm.cxx | 1 + sw/qa/core/objectpositioning/objectpositioning.cxx | 1 + sw/qa/core/unocore/unocore.cxx | 1 + sw/qa/extras/odfimport/odfimport.cxx | 1 + sw/qa/extras/ooxmlexport/ooxmlexport5.cxx | 1 + sw/qa/extras/rtfexport/rtfexport3.cxx | 1 + sw/qa/extras/ww8export/ww8export4.cxx | 1 + sw/qa/filter/md/md.cxx | 1 + sw/qa/uibase/shells/textsh.cxx | 1 + sw/qa/unit/swmodeltestbase.cxx | 1 + sw/qa/writerfilter/dmapper/DomainMapperTableHandler.cxx | 1 + sw/qa/writerfilter/dmapper/DomainMapper_Impl.cxx | 1 + sw/qa/writerfilter/ooxml/ooxml.cxx | 1 + sw/qa/writerfilter/rtftok/rtfdocumentimpl.cxx | 1 + sw/source/core/attr/cellatr.cxx | 1 + sw/source/core/attr/format.cxx | 1 + sw/source/core/doc/DocumentLinksAdministrationManager.cxx | 1 + sw/source/core/doc/doc.cxx | 1 + sw/source/core/doc/docchart.cxx | 1 + sw/source/core/doc/doctxm.cxx | 1 + sw/source/core/fields/dbfld.cxx | 1 + sw/source/core/fields/tblcalc.cxx | 1 + sw/source/core/table/swtable.cxx | 1 + sw/source/core/txtnode/swfont.cxx | 1 + sw/source/core/undo/unredln.cxx | 1 + sw/source/filter/ww8/docxexport.cxx | 1 + sw/source/filter/xml/xmltble.cxx | 1 + sw/source/uibase/config/viewopt.cxx | 1 + 30 files changed, 31 insertions(+), 1 deletion(-) diff --git a/sw/inc/doc.hxx b/sw/inc/doc.hxx index 16ad6058b7fe..73e5f7e48efb 100644 --- a/sw/inc/doc.hxx +++ b/sw/inc/doc.hxx @@ -35,7 +35,6 @@ #include #include "tox.hxx" #include "frmfmt.hxx" -#include "frameformats.hxx" #include "charfmt.hxx" #include "docary.hxx" #include "charformats.hxx" @@ -147,6 +146,8 @@ namespace sw { enum class RedlineMode; enum class FieldmarkMode; enum class ParagraphBreakMode; + template class FrameFormats; + typedef FrameFormats<::SwTableFormat*> TableFrameFormats; class MetaFieldManager; class UndoManager; class IShellCursorSupplier; diff --git a/sw/qa/core/layout/ftnfrm.cxx b/sw/qa/core/layout/ftnfrm.cxx index 12434415569e..e099b589adbf 100644 --- a/sw/qa/core/layout/ftnfrm.cxx +++ b/sw/qa/core/layout/ftnfrm.cxx @@ -11,6 +11,7 @@ #include #include +#include #include #include #include diff --git a/sw/qa/core/layout/tabfrm.cxx b/sw/qa/core/layout/tabfrm.cxx index d0e6e07a9e92..cdf7f490dfed 100644 --- a/sw/qa/core/layout/tabfrm.cxx +++ b/sw/qa/core/layout/tabfrm.cxx @@ -18,6 +18,7 @@ #include #include #include +#include #include namespace diff --git a/sw/qa/core/objectpositioning/objectpositioning.cxx b/sw/qa/core/objectpositioning/objectpositioning.cxx index 4c2aef1f56d5..fbb973c80347 100644 --- a/sw/qa/core/objectpositioning/objectpositioning.cxx +++ b/sw/qa/core/objectpositioning/objectpositioning.cxx @@ -18,6 +18,7 @@ #include #include #include +#include #include #include #include diff --git a/sw/qa/core/unocore/unocore.cxx b/sw/qa/core/unocore/unocore.cxx index 9161f0ea1c65..5bc5929f6324 100644 --- a/sw/qa/core/unocore/unocore.cxx +++ b/sw/qa/core/unocore/unocore.cxx @@ -27,6 +27,7 @@ #include #include #include +#include #include #include #include diff --git a/sw/qa/extras/odfimport/odfimport.cxx b/sw/qa/extras/odfimport/odfimport.cxx index 5d46782fcfe7..0dc66a687b5f 100644 --- a/sw/qa/extras/odfimport/odfimport.cxx +++ b/sw/qa/extras/odfimport/odfimport.cxx @@ -63,6 +63,7 @@ #include #include #include +#include #include #include #include diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport5.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport5.cxx index 80477f5cc43d..1d475cfa2490 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport5.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport5.cxx @@ -19,6 +19,7 @@ #include #include +#include #include class Test : public SwModelTestBase diff --git a/sw/qa/extras/rtfexport/rtfexport3.cxx b/sw/qa/extras/rtfexport/rtfexport3.cxx index d01458c1a59f..db168e30560a 100644 --- a/sw/qa/extras/rtfexport/rtfexport3.cxx +++ b/sw/qa/extras/rtfexport/rtfexport3.cxx @@ -25,6 +25,7 @@ #include #include +#include #include #include #include diff --git a/sw/qa/extras/ww8export/ww8export4.cxx b/sw/qa/extras/ww8export/ww8export4.cxx index deef3f2c1fa1..8a7064b50edd 100644 --- a/sw/qa/extras/ww8export/ww8export4.cxx +++ b/sw/qa/extras/ww8export/ww8export4.cxx @@ -26,6 +26,7 @@ #include #include +#include #include #include #include diff --git a/sw/qa/filter/md/md.cxx b/sw/qa/filter/md/md.cxx index 9fc7a012e5d8..66625ab2451d 100644 --- a/sw/qa/filter/md/md.cxx +++ b/sw/qa/filter/md/md.cxx @@ -19,6 +19,7 @@ #include #include +#include #include #include #include diff --git a/sw/qa/uibase/shells/textsh.cxx b/sw/qa/uibase/shells/textsh.cxx index 3721569977f0..9796933b753f 100644 --- a/sw/qa/uibase/shells/textsh.cxx +++ b/sw/qa/uibase/shells/textsh.cxx @@ -17,6 +17,7 @@ #include #include +#include #include #include #include diff --git a/sw/qa/unit/swmodeltestbase.cxx b/sw/qa/unit/swmodeltestbase.cxx index 5868fa4ae449..83ebd1b05f1a 100644 --- a/sw/qa/unit/swmodeltestbase.cxx +++ b/sw/qa/unit/swmodeltestbase.cxx @@ -28,6 +28,7 @@ #include #include #include +#include #include #include #include diff --git a/sw/qa/writerfilter/dmapper/DomainMapperTableHandler.cxx b/sw/qa/writerfilter/dmapper/DomainMapperTableHandler.cxx index 2fdbc63af344..3e55a8394533 100644 --- a/sw/qa/writerfilter/dmapper/DomainMapperTableHandler.cxx +++ b/sw/qa/writerfilter/dmapper/DomainMapperTableHandler.cxx @@ -21,6 +21,7 @@ #include #include +#include #include #include #include diff --git a/sw/qa/writerfilter/dmapper/DomainMapper_Impl.cxx b/sw/qa/writerfilter/dmapper/DomainMapper_Impl.cxx index 375340c002b1..859ec0084f38 100644 --- a/sw/qa/writerfilter/dmapper/DomainMapper_Impl.cxx +++ b/sw/qa/writerfilter/dmapper/DomainMapper_Impl.cxx @@ -27,6 +27,7 @@ #include #include +#include #include #include #include diff --git a/sw/qa/writerfilter/ooxml/ooxml.cxx b/sw/qa/writerfilter/ooxml/ooxml.cxx index 90a3fb85b774..e975d8e56106 100644 --- a/sw/qa/writerfilter/ooxml/ooxml.cxx +++ b/sw/qa/writerfilter/ooxml/ooxml.cxx @@ -18,6 +18,7 @@ #include #include #include +#include #include #include #include diff --git a/sw/qa/writerfilter/rtftok/rtfdocumentimpl.cxx b/sw/qa/writerfilter/rtftok/rtfdocumentimpl.cxx index 23c1c8fda9c2..f918d1680b3c 100644 --- a/sw/qa/writerfilter/rtftok/rtfdocumentimpl.cxx +++ b/sw/qa/writerfilter/rtftok/rtfdocumentimpl.cxx @@ -19,6 +19,7 @@ #include #include +#include using namespace ::com::sun::star; diff --git a/sw/source/core/attr/cellatr.cxx b/sw/source/core/attr/cellatr.cxx index e6db5de76dfe..d651b8203dcd 100644 --- a/sw/source/core/attr/cellatr.cxx +++ b/sw/source/core/attr/cellatr.cxx @@ -23,6 +23,7 @@ #include #include #include +#include #include #include #include diff --git a/sw/source/core/attr/format.cxx b/sw/source/core/attr/format.cxx index cdcf4cc2d612..e36afa1b60fd 100644 --- a/sw/source/core/attr/format.cxx +++ b/sw/source/core/attr/format.cxx @@ -28,6 +28,7 @@ #include #include #include +#include #include #include #include diff --git a/sw/source/core/doc/DocumentLinksAdministrationManager.cxx b/sw/source/core/doc/DocumentLinksAdministrationManager.cxx index cb14706a4908..60c9eaa996a9 100644 --- a/sw/source/core/doc/DocumentLinksAdministrationManager.cxx +++ b/sw/source/core/doc/DocumentLinksAdministrationManager.cxx @@ -36,6 +36,7 @@ #include #include #include +#include #include #include #include diff --git a/sw/source/core/doc/doc.cxx b/sw/source/core/doc/doc.cxx index db01cdbffbfc..a64d4854a3ba 100644 --- a/sw/source/core/doc/doc.cxx +++ b/sw/source/core/doc/doc.cxx @@ -82,6 +82,7 @@ #include #include #include +#include #include #include #include diff --git a/sw/source/core/doc/docchart.cxx b/sw/source/core/doc/docchart.cxx index 2677b9f4a667..3f92f366907f 100644 --- a/sw/source/core/doc/docchart.cxx +++ b/sw/source/core/doc/docchart.cxx @@ -19,6 +19,7 @@ #include #include +#include #include #include #include diff --git a/sw/source/core/doc/doctxm.cxx b/sw/source/core/doc/doctxm.cxx index fe37d2fc64e0..a4df2c4580bf 100644 --- a/sw/source/core/doc/doctxm.cxx +++ b/sw/source/core/doc/doctxm.cxx @@ -26,6 +26,7 @@ #include #include #include +#include #include #include #include diff --git a/sw/source/core/fields/dbfld.cxx b/sw/source/core/fields/dbfld.cxx index 344ab81673f7..d79600775abc 100644 --- a/sw/source/core/fields/dbfld.cxx +++ b/sw/source/core/fields/dbfld.cxx @@ -18,6 +18,7 @@ */ #include +#include #include #include #include diff --git a/sw/source/core/fields/tblcalc.cxx b/sw/source/core/fields/tblcalc.cxx index 3bfc0d436771..89fc2bd8a541 100644 --- a/sw/source/core/fields/tblcalc.cxx +++ b/sw/source/core/fields/tblcalc.cxx @@ -19,6 +19,7 @@ #include +#include #include #include diff --git a/sw/source/core/table/swtable.cxx b/sw/source/core/table/swtable.cxx index 8b7260795fe0..5eb4018e007e 100644 --- a/sw/source/core/table/swtable.cxx +++ b/sw/source/core/table/swtable.cxx @@ -38,6 +38,7 @@ #include #include #include +#include #include #include #include diff --git a/sw/source/core/txtnode/swfont.cxx b/sw/source/core/txtnode/swfont.cxx index 77f09a754a60..50549efcc1e9 100644 --- a/sw/source/core/txtnode/swfont.cxx +++ b/sw/source/core/txtnode/swfont.cxx @@ -21,6 +21,7 @@ #include #include +#include #include #include #include diff --git a/sw/source/core/undo/unredln.cxx b/sw/source/core/undo/unredln.cxx index 5b95ca89fc22..c1d88d5e7a8f 100644 --- a/sw/source/core/undo/unredln.cxx +++ b/sw/source/core/undo/unredln.cxx @@ -21,6 +21,7 @@ #include #include #include +#include #include #include #include diff --git a/sw/source/filter/ww8/docxexport.cxx b/sw/source/filter/ww8/docxexport.cxx index 46aad4a9cca1..cc72468358a9 100644 --- a/sw/source/filter/ww8/docxexport.cxx +++ b/sw/source/filter/ww8/docxexport.cxx @@ -79,6 +79,7 @@ #include #include #include +#include #include #include #include diff --git a/sw/source/filter/xml/xmltble.cxx b/sw/source/filter/xml/xmltble.cxx index ea56cf55135f..8a41939a130c 100644 --- a/sw/source/filter/xml/xmltble.cxx +++ b/sw/source/filter/xml/xmltble.cxx @@ -39,6 +39,7 @@ #include #include #include +#include #include #include #include diff --git a/sw/source/uibase/config/viewopt.cxx b/sw/source/uibase/config/viewopt.cxx index 206f9bb68b16..e010d4348f3a 100644 --- a/sw/source/uibase/config/viewopt.cxx +++ b/sw/source/uibase/config/viewopt.cxx @@ -26,6 +26,7 @@ #include #include #include +#include #include #include #include From df6120bc6ee935b4366a9eca7732c9897bf05313 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Attila=20Sz=C5=B1cs?= Date: Mon, 14 Sep 2026 02:56:01 +0200 Subject: [PATCH 039/289] tdf#116148.odp fix default hatch export to pptx MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Hatch without a hatch name was exported to nothing. Powerpoint load that as solid color. So in that case we export the default hatch data. Did not expose `PROP_FILL_HATCH` as it was not needed for the fix But added code to handle that case too if it will be exposed. Signed-off-by: Attila Szűcs Change-Id: Iec1a850b7b08db8d42de3770d5d81b7f77a905c4 Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/12642 Reviewed-by: Stephan Bergmann Tested-by: Jenkins CPCI (cherry picked from commit 6a2288a5994faed380c45221cdff25181570e23a) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211578 Reviewed-by: Xisco Fauli Tested-by: Jenkins --- chart2/qa/extras/chart2export3.cxx | 18 +++++++++++ chart2/qa/extras/data/odp/tdf116148.odp | Bin 0 -> 18033 bytes oox/source/export/chartexport.cxx | 39 +++++++++++++++++++++--- 3 files changed, 52 insertions(+), 5 deletions(-) create mode 100644 chart2/qa/extras/data/odp/tdf116148.odp diff --git a/chart2/qa/extras/chart2export3.cxx b/chart2/qa/extras/chart2export3.cxx index a379d2928405..49cb605d59e9 100644 --- a/chart2/qa/extras/chart2export3.cxx +++ b/chart2/qa/extras/chart2export3.cxx @@ -1017,6 +1017,24 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, test1904NullDate) } } +CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testTdf116148HatchWithoutName) +{ + // The bar series is filled with a hatch but names no hatch, so the drawing + // layer paints it with the item pool's default one. + loadFromFile(u"odp/tdf116148.odp"); + + save(TestFilter::PPTX); + xmlDocUniquePtr pXmlDoc = parseExport(u"ppt/charts/chart1.xml"_ustr); + CPPUNIT_ASSERT(pXmlDoc); + + // Without the fix the series carried no fill at all, and PowerPoint filled + // the bars with its own default instead, which is solid. + static constexpr OString sFill( + "/c:chartSpace/c:chart/c:plotArea/c:barChart/c:ser/c:spPr/a:pattFill"_ostr); + assertXPath(pXmlDoc, sFill, "prst", u"ltHorz"); + assertXPath(pXmlDoc, sFill + "/a:fgClr/a:srgbClr", "val", u"3465A4"); +} + CPPUNIT_PLUGIN_IMPLEMENT(); /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/chart2/qa/extras/data/odp/tdf116148.odp b/chart2/qa/extras/data/odp/tdf116148.odp new file mode 100644 index 0000000000000000000000000000000000000000..7c0c837e03389d52b6dfa37fa962d832ea6fdb49 GIT binary patch literal 18033 zcmb8X1z23mvM4-*1ef6MBsc^J?iSqL-Ccsay9al7_u#<^?(XgmLH^0PZ{NMod3&Gl z{WafA_v%?y-Cb3^dUbbI$x47jpaB5T06+~mofgxF@?v@b0Py<@Dgs!USs6LH+8XKE z+FF_!=sB9%Skr&CHl(xBb1-wDv#~X@HncHtvNE!Eq_ed*asZ|Ox<~fkh=S<+FW`W3 zf;QI1W+qPd|GL$Ik>1h9#?n^L+Q^drpYgE%1`kxNlfIt)f59UB8!R&`Jrg4bdI2*> zD?M9>|ALJ7H^{d3HYT8cI{f!)|E`m^HnvW-zgzrYYW%xS{$|d9ukG*Jsb^qdWN8HA zu+4vC&)?N&Y-ywCX!PH({;qcpAh|pJg)7j|(ErjW5DWho-h*;7`sPLkjzpj6L29K( z=VE0U88>3>&wwU${{p-76*s~al7=W;TubSwP^nF@zXMslI@V5rr;|${L0N9Lz;oQx z*dyaa+R6Z*|GpuPlBCg}CPp(?!Ae>InWKW4y4Z z+H2cM^^j?HZDO;vfh{oi*j=f-lV`a)fJQE{$A>ODF-noaU0SFYI7Q=~LU|I@xV;=D zMX+{UG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bY#rVQh8(-xIJoz z&w^2+hmx=L7@U|t3XbSAzhBLT>(}SY;S8q}NN@8=O|{;D-J|O{@8d}Ys)wS;5KxhP zpBKLaul27mJEv@Kh-CmU&IAJ{QdCU94WfpRMSqHw5(PIhr)`?|L4<@aUF;sENlahfh{w1h4&TV<^ zy_`sWSL*{=VoQ|%H#i*Nr_R!7w|4!`wUt}e--1c5eH>8+dD~Wkgd-~f1Vj6M;0c<= z|1RDFNIHLkKcX-EC)QtX0sQvH{}Yrz+5Z+^;oocj6Yqa4DE_>T{2MxdhFkb&D!&6R z{0Y6F?0>fA{|dkG&%}NQHuwvGSoojB{yiMSKU4a5CUN{7rN4w{_-8u5%}o9T`@f;{ zXSjxcrtGI}0do%l}zC|0mX8CyC!{g+HO5{ohv(|B3n6r`YdF #include +#include +#include #include #include @@ -3222,18 +3224,45 @@ void ChartExport::exportHatch( const Reference< XPropertySet >& xPropSet ) if (!xPropSet.is()) return; + OUString aHatchName; if (GetProperty(xPropSet, u"FillHatchName"_ustr)) - { - OUString aHatchName; mAny >>= aHatchName; + + if (!aHatchName.isEmpty()) + { uno::Reference< lang::XMultiServiceFactory > xFact( getModel(), uno::UNO_QUERY ); uno::Reference< container::XNameAccess > xHatchTable( xFact->createInstance(u"com.sun.star.drawing.HatchTable"_ustr), uno::UNO_QUERY ); - uno::Any rValue = xHatchTable->getByName(aHatchName); css::drawing::Hatch aHatch; - rValue >>= aHatch; - WritePattFill(xPropSet, aHatch); + if (xHatchTable.is() && xHatchTable->hasByName(aHatchName) + && (xHatchTable->getByName(aHatchName) >>= aHatch)) + { + WritePattFill(xPropSet, aHatch); + return; + } } + // tdf#116148: the fill style is a hatch, but there is no hatch to name: the + // drawing layer paints such a series with the item pool's default hatch. + // OOXML has no matching default - leaving the fill out makes PowerPoint + // apply its own, which is solid - so the effective hatch has to be written + // out explicitly. + if (GetProperty(xPropSet, u"FillHatch"_ustr)) + { + // A property set that resolves the hatch itself knows better than the + // default below. chart2 does not expose the struct today, see the + // commented out PROP_FILL_HATCH in chart2/source/inc/FillProperties.hxx. + WritePattFill(xPropSet); + return; + } + + // Same default the item pool hands out, see SdrItemPool in svx/source/svdraw/svdattr.cxx. + const XHatch aDefaultHatch{ COL_DEFAULT_SHAPE_STROKE }; + css::drawing::Hatch aHatch; + aHatch.Style = aDefaultHatch.GetHatchStyle(); + aHatch.Color = sal_Int32(aDefaultHatch.GetColor()); + aHatch.Distance = aDefaultHatch.GetDistance(); + aHatch.Angle = aDefaultHatch.GetAngle().get(); + WritePattFill(xPropSet, aHatch); } void ChartExport::exportBitmapFill( const Reference< XPropertySet >& xPropSet ) From 54b4229fce6a7b8354e6ba59278ec0efba4de8ee Mon Sep 17 00:00:00 2001 From: Christian Lohmaier Date: Tue, 29 Sep 2026 21:43:18 +0200 Subject: [PATCH 040/289] Update git submodules * Update translations from branch 'master' to 697f5e715f0801edfe8a333b0d01c2ea064711a2 - update translations for master and force-fix errors using pocheck Change-Id: I778551076b569ee7dab5845335e43fde209c67bb --- translations | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/translations b/translations index 6f2222cc49bd..697f5e715f08 160000 --- a/translations +++ b/translations @@ -1 +1 @@ -Subproject commit 6f2222cc49bd201e38cbb2db14e04ec575b98ae4 +Subproject commit 697f5e715f0801edfe8a333b0d01c2ea064711a2 From a7540204a4fd4e76f2f548001cff92a67e97c572 Mon Sep 17 00:00:00 2001 From: Thorsten Behrens Date: Tue, 25 Aug 2026 17:45:16 +0200 Subject: [PATCH 041/289] fix: pdfium build --with-system-abseil Change-Id: I078b9cd9043c53c838acd071c3db903c24528238 Signed-off-by: Thorsten Behrens Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/10031 Tested-by: Jenkins CPCI Reviewed-by: Miklos Vajna (cherry picked from commit 7c8e13e13ab43680a4394216cd5a1c514593a115) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211550 Tested-by: Jenkins Reviewed-by: Xisco Fauli --- external/pdfium/system-abseil.diff | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/external/pdfium/system-abseil.diff b/external/pdfium/system-abseil.diff index 7306b3dace03..9698d0559550 100644 --- a/external/pdfium/system-abseil.diff +++ b/external/pdfium/system-abseil.diff @@ -28,3 +28,17 @@ diff -urN pdfium-old/core/fpdfdoc/cpdf_nametree.cpp pdfium/core/fpdfdoc/cpdf_nam namespace { +--- core/fpdfdoc/cpvt_variabletext.cpp~ 2026-08-01 01:50:23.000000000 +0200 ++++ core/fpdfdoc/cpvt_variabletext.cpp 2026-08-26 10:04:23.478434445 +0200 +@@ -21,7 +21,11 @@ + #include "core/fxcrt/fx_safe_types.h" + #include "core/fxcrt/span.h" + #include "core/fxcrt/stl_util.h" ++#ifdef USE_SYSTEM_ABSEIL ++#include ++#else + #include "third_party/abseil-cpp/absl/cleanup/cleanup.h" ++#endif + + namespace { + From 70e6dd0eb1874f0c5e260948b2c8b9e192841372 Mon Sep 17 00:00:00 2001 From: Justin Luth Date: Tue, 29 Sep 2026 12:39:22 -0400 Subject: [PATCH 042/289] tdf#161182 tdf#135857 find&replace format: finding only white color Similar to my earlier commit 45311ffe342adde3e187f0ecaec965affad646a5 tdf#164402 find&replace format: find white font color a COL_AUTO should not be allowed to match a white color (or vise versa). Since this should be a pattern that is always followed, make a function to handle it. Change-Id: I1f2c96891264c960f42d7d6ec50ef1dfa012b921 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211584 Reviewed-by: Justin Luth Tested-by: Jenkins --- sw/source/core/crsr/findattr.cxx | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/sw/source/core/crsr/findattr.cxx b/sw/source/core/crsr/findattr.cxx index 63bddbebe95b..a7382cc754b4 100644 --- a/sw/source/core/crsr/findattr.cxx +++ b/sw/source/core/crsr/findattr.cxx @@ -53,6 +53,14 @@ using namespace ::com::sun::star; using namespace ::com::sun::star::lang; using namespace ::com::sun::star::util; +static bool lcl_ColorsAreBasicallyEqual(const ::Color& rColor1, const ::Color& rColor2) +{ + if (rColor1 == COL_AUTO || rColor2 == COL_AUTO) + return rColor1 == rColor2; + + return rColor1.IsRGBEqual(rColor2); +} + // Special case for SvxFontItem: only compare the name static bool CmpAttr( const SfxPoolItem& rItem1, const SfxPoolItem& rItem2 ) { @@ -68,7 +76,7 @@ static bool CmpAttr( const SfxPoolItem& rItem1, const SfxPoolItem& rItem2 ) if (rBrush1.getComplexColor().isUsed() && rBrush2.getComplexColor().isUsed()) return rItem1 == rItem2; - return rBrush1.GetColor().IsRGBEqual(rBrush2.GetColor()); + return lcl_ColorsAreBasicallyEqual(rBrush1.GetColor(), rBrush2.GetColor()); } case RES_CHRATR_OVERLINE: case RES_CHRATR_UNDERLINE: @@ -78,16 +86,14 @@ static bool CmpAttr( const SfxPoolItem& rItem1, const SfxPoolItem& rItem2 ) if (rUnderline1.getComplexColor().isUsed() && rUnderline2.getComplexColor().isUsed()) return rItem1 == rItem2; - return rUnderline1.GetColor().IsRGBEqual(rUnderline2.GetColor()) + return lcl_ColorsAreBasicallyEqual(rUnderline1.GetColor(), rUnderline2.GetColor()) && rUnderline1.GetLineStyle() == rUnderline2.GetLineStyle(); } case RES_CHRATR_COLOR: { ::Color Color1 = rItem1.StaticWhichCast(RES_CHRATR_COLOR).GetValue(); ::Color Color2 = rItem2.StaticWhichCast(RES_CHRATR_COLOR).GetValue(); - if (Color1 == COL_AUTO || Color2 == COL_AUTO) - return Color1 == Color2; - return Color1.IsRGBEqual(Color2); + return lcl_ColorsAreBasicallyEqual(Color1, Color2); } case RES_PAGEDESC: ::std::optional const oNumOffset1 = rItem1.StaticWhichCast(RES_PAGEDESC).GetNumOffset(); From fe590de0fea4c03ce7ce677bed50e4f90cad9386 Mon Sep 17 00:00:00 2001 From: Miklos Vajna Date: Fri, 25 Sep 2026 08:38:23 +0200 Subject: [PATCH 043/289] pdfium: update to 8073 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Patches: - external/pdfium/extractpatterns-fill.patch.1 is now upstream - external/pdfium/extractpatterns-stroke.patch.1 as well - external/pdfium/fix-windows-build.patch.1 as well - external/pdfium/system-icu.patch.1 as well - external/pdfium/system-dragonbox.diff is a new dependency, patch the code to use our bundled dragonbox - update external/pdfium/system-abseil.diff to apply again Adapted tests: - CppunitTest_vcl_pdfexport goes back to its previous expected values after pdfium.git commit 17cf94b52e01507108da6460ebca6b48995a698e (Revert "Fix mixed-direction line extraction", 2026-09-17) - CppunitTest_vcl_pdfexport2 as well Signed-off-by: Miklos Vajna Change-Id: I09bf5fc9f54b697eed2e144c3f57c3b72f3bbc37 Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/13508 Tested-by: Jenkins CPCI Reviewed-by: Caolán McNamara (cherry picked from commit 0272de3a9b98d0c3ef4479e0dc12abe8cc040447) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211551 Reviewed-by: Xisco Fauli Tested-by: Jenkins --- download.lst | 4 +- external/pdfium/Library_pdfium.mk | 15 +- external/pdfium/UnpackedTarball_pdfium.mk | 12 +- external/pdfium/charbboxinflation.patch.1 | 8 +- external/pdfium/extractpatterns-fill.patch.1 | 179 ------------ .../pdfium/extractpatterns-stroke.patch.1 | 262 ------------------ external/pdfium/fix-windows-build.patch.1 | 44 --- .../pdfium/inc/pch/precompiled_pdfium.hxx | 13 +- external/pdfium/system-abseil.diff | 40 ++- external/pdfium/system-dragonbox.diff | 15 + external/pdfium/system-icu.patch.1 | 33 --- vcl/qa/cppunit/pdfexport/pdfexport.cxx | 6 +- vcl/qa/cppunit/pdfexport/pdfexport3.cxx | 30 +- 13 files changed, 91 insertions(+), 570 deletions(-) delete mode 100644 external/pdfium/extractpatterns-fill.patch.1 delete mode 100644 external/pdfium/extractpatterns-stroke.patch.1 delete mode 100644 external/pdfium/fix-windows-build.patch.1 create mode 100644 external/pdfium/system-dragonbox.diff delete mode 100644 external/pdfium/system-icu.patch.1 diff --git a/download.lst b/download.lst index 5b2afc00d5ae..fcb66a0fe391 100644 --- a/download.lst +++ b/download.lst @@ -539,8 +539,8 @@ PAGEMAKER_TARBALL := libpagemaker-0.0.4.tar.xz # three static lines # so that git cherry-pick # will not run into conflicts -PDFIUM_SHA256SUM := 0340b2fca57cecdf6e2e0366129a3340f6764c132cb090f57db96d9f0f349855 -PDFIUM_TARBALL := pdfium-7988.tar.bz2 +PDFIUM_SHA256SUM := a3624f6f0ac46a7e190969d405aa7a07dbc342baf69f81192487575bf64055a5 +PDFIUM_TARBALL := pdfium-8073.tar.bz2 # three static lines # so that git cherry-pick # will not run into conflicts diff --git a/external/pdfium/Library_pdfium.mk b/external/pdfium/Library_pdfium.mk index 0906bbe7c944..c15ae0bb6f75 100644 --- a/external/pdfium/Library_pdfium.mk +++ b/external/pdfium/Library_pdfium.mk @@ -66,6 +66,10 @@ $(eval $(call gb_Library_add_defs,pdfium,\ -DUSE_SYSTEM_FAST_FLOAT \ )) endif +# Always define: our pdfium tarball doesn't ship third_party/dragonbox/src/ itself. +$(eval $(call gb_Library_add_defs,pdfium,\ + -DUSE_SYSTEM_DRAGONBOX \ +)) $(eval $(call gb_Library_set_generated_cxx_suffix,pdfium,cpp)) @@ -299,7 +303,6 @@ $(eval $(call gb_Library_add_generated_exception_objects,pdfium,\ UnpackedTarball/pdfium/core/fpdfapi/parser/cpdf_cross_ref_table \ UnpackedTarball/pdfium/core/fpdfapi/edit/cpdf_stringarchivestream \ UnpackedTarball/pdfium/core/fpdfapi/page/cpdf_occontext \ - UnpackedTarball/pdfium/core/fpdfapi/edit/cpdf_contentstream_write_utils \ UnpackedTarball/pdfium/core/fpdfapi/edit/cpdf_font_util \ UnpackedTarball/pdfium/core/fpdfapi/edit/cpdf_fontsubsetter \ UnpackedTarball/pdfium/core/fpdfapi/page/cpdf_annotcontext \ @@ -389,6 +392,8 @@ $(eval $(call gb_Library_add_generated_exception_objects,pdfium,\ UnpackedTarball/pdfium/core/fxcodec/jbig2/jbig2_segment \ UnpackedTarball/pdfium/core/fxcodec/jbig2/jbig2_symbol_dict \ UnpackedTarball/pdfium/core/fxcodec/jbig2/jbig2_trd_proc \ + UnpackedTarball/pdfium/core/fxcodec/image_predictors \ + UnpackedTarball/pdfium/core/fxcodec/jpeg/libjpeg_scanline_decoder \ )) $(eval $(call gb_Library_add_generated_cobjects,pdfium,\ @@ -453,6 +458,7 @@ $(eval $(call gb_Library_add_generated_exception_objects,pdfium,\ UnpackedTarball/pdfium/core/fxcrt/cfx_read_only_container_stream \ UnpackedTarball/pdfium/core/fxcrt/bytestring_pool \ UnpackedTarball/pdfium/core/fxcrt/cfx_bidi_resolver \ + UnpackedTarball/pdfium/core/fxcrt/stream_write_utils \ )) ifneq ($(OS),WNT) @@ -586,6 +592,12 @@ $(eval $(call gb_Library_add_generated_exception_objects,pdfium,\ )) endif +ifneq ($(SYSTEM_ABSEIL),TRUE) +$(eval $(call gb_Library_add_generated_exception_objects,pdfium,\ + UnpackedTarball/pdfium/third_party/abseil-cpp/absl/base/throw_delegate \ +)) +endif + $(eval $(call gb_Library_use_externals,pdfium,\ libjpeg \ lcms2 \ @@ -593,6 +605,7 @@ $(eval $(call gb_Library_use_externals,pdfium,\ icu_headers \ icuuc \ harfbuzz \ + dragonbox \ )) ifneq (,$(filter LINUX ANDROID,$(OS))) diff --git a/external/pdfium/UnpackedTarball_pdfium.mk b/external/pdfium/UnpackedTarball_pdfium.mk index c06f9b6b244b..b4da705c60e8 100644 --- a/external/pdfium/UnpackedTarball_pdfium.mk +++ b/external/pdfium/UnpackedTarball_pdfium.mk @@ -21,10 +21,7 @@ pdfium_patches += charcodetoglyphindex.patch.1 pdfium_patches += getfontdictobjnum.patch.1 pdfium_patches += system-fast_float.diff -# https://pdfium-review.googlesource.com/c/pdfium/+/154490 -pdfium_patches += system-icu.patch.1 -# https://pdfium-review.googlesource.com/c/pdfium/+/154690 -pdfium_patches += fix-windows-build.patch.1 +pdfium_patches += system-dragonbox.diff ifeq ($(OS),WNT) pdfium_patches += pdfium-vs2019-arm64_no-__umulh.patch.1 @@ -32,10 +29,6 @@ endif # TODO, attempt upstream pdfium_patches += ofz451333752.patch -# https://pdfium-review.googlesource.com/c/pdfium/+/154910 -pdfium_patches += extractpatterns-stroke.patch.1 -# https://pdfium-review.googlesource.com/c/pdfium/+/157490 -pdfium_patches += extractpatterns-fill.patch.1 pdfium_patches += charbboxinflation.patch.1 # Hide bundled FreeType symbols pdfium_patches += freetype-hidden-visibility.patch @@ -57,7 +50,8 @@ $(eval $(call gb_UnpackedTarball_set_post_action,pdfium,\ mv third_party/bigint/BigUnsignedInABase.cc third_party/bigint/BigUnsignedInABase.cpp && \ mv core/fxcrt/debug/alias.cc core/fxcrt/debug/alias.cpp && \ mv core/fxcrt/win/win_util.cc core/fxcrt/win/win_util.cpp && \ - mv third_party/libopenjpeg/opj_malloc.cc third_party/libopenjpeg/opj_malloc.cpp \ + mv third_party/libopenjpeg/opj_malloc.cc third_party/libopenjpeg/opj_malloc.cpp && \ + mv third_party/abseil-cpp/absl/base/throw_delegate.cc third_party/abseil-cpp/absl/base/throw_delegate.cpp \ )) # vim: set noet sw=4 ts=4: diff --git a/external/pdfium/charbboxinflation.patch.1 b/external/pdfium/charbboxinflation.patch.1 index e70b44b58bbf..3d59cfd5c0db 100644 --- a/external/pdfium/charbboxinflation.patch.1 +++ b/external/pdfium/charbboxinflation.patch.1 @@ -18,7 +18,7 @@ diff -ru pdfium.orig/core/fxge/cfx_face.cpp pdfium/core/fxge/cfx_face.cpp int FTPosToCBoxInt(FT_Pos pos) { // Boundary values to avoid integer overflow when multiplied by 1000. static constexpr FT_Pos kMinCBox = -2147483; -@@ -1289,11 +1289,6 @@ +@@ -1209,11 +1209,6 @@ int err = LoadGlyph(glyph_index, /*scale=*/false); if (err == 0) { rect = GetGlyphBBox(glyph_index); @@ -27,6 +27,6 @@ diff -ru pdfium.orig/core/fxge/cfx_face.cpp pdfium/core/fxge/cfx_face.cpp - } else { - rect.top = std::numeric_limits::max(); - } - #if defined(PDF_ENABLE_SKIA_TYPEFACE_CHECKS) - #if defined(PDF_ENABLE_FONTATIONS) - if (skrifa_font_ && skrifa_font_->font->is_ok()) { + } + } + return rect; diff --git a/external/pdfium/extractpatterns-fill.patch.1 b/external/pdfium/extractpatterns-fill.patch.1 deleted file mode 100644 index 421c078c287e..000000000000 --- a/external/pdfium/extractpatterns-fill.patch.1 +++ /dev/null @@ -1,179 +0,0 @@ -From 3e9b2c24c3c35c17ad887f6b415e04163d97ae3c Mon Sep 17 00:00:00 2001 -Date: Thu, 17 Sep 2026 15:52:06 -0700 -Subject: [PATCH] Add FPDFPageObj_GetRenderedFillPattern() API - -This is similar to http://pdfium-review.googlesource.com/c/154910, but -that one was for stroke patterns and this is for fill patterns. - -Change-Id: I9929e232472fdd974009c64bcb1109d69a813d0a -Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/157490 -Commit-Queue: Lei Zhang -Reviewed-by: Tom Sepez -Reviewed-by: Lei Zhang ---- - fpdfsdk/fpdf_edit_embeddertest.cpp | 64 ++++++++++++++ - fpdfsdk/fpdf_editpage.cpp | 79 +++++++++++------- - fpdfsdk/fpdf_view_c_api_test.c | 1 + - public/fpdf_edit.h | 16 ++++ - .../resources/embedder_tests/pattern_fill.png | Bin 0 -> 107 bytes - .../embedder_tests/pattern_fill_uncolored.png | Bin 0 -> 107 bytes - testing/resources/pattern_fill.in | 56 +++++++++++++ - testing/resources/pattern_fill.pdf | 68 +++++++++++++++ - testing/resources/pattern_fill_uncolored.in | 58 +++++++++++++ - testing/resources/pattern_fill_uncolored.pdf | 70 ++++++++++++++++ - 10 files changed, 384 insertions(+), 28 deletions(-) - create mode 100644 testing/resources/embedder_tests/pattern_fill.png - create mode 100644 testing/resources/embedder_tests/pattern_fill_uncolored.png - create mode 100644 testing/resources/pattern_fill.in - create mode 100644 testing/resources/pattern_fill.pdf - create mode 100644 testing/resources/pattern_fill_uncolored.in - create mode 100644 testing/resources/pattern_fill_uncolored.pdf - -diff --git a/fpdfsdk/fpdf_editpage.cpp b/fpdfsdk/fpdf_editpage.cpp -index 9b9474ed7..033572048 100644 ---- a/fpdfsdk/fpdf_editpage.cpp -+++ b/fpdfsdk/fpdf_editpage.cpp -@@ -199,7 +199,8 @@ ByteString FormatPDFDate(time_t current_time, const tm& local_time) { - - FPDF_BITMAP RenderTilingPatternToBitmap(CPDF_Pattern* pattern, - CPDF_Document* doc, -- CPDF_PageObject* page_obj) { -+ CPDF_PageObject* page_obj, -+ bool use_stroke_color) { - CPDF_TilingPattern* tiling_pattern = pattern->AsTilingPattern(); - if (!tiling_pattern) { - return nullptr; -@@ -228,10 +229,13 @@ FPDF_BITMAP RenderTilingPatternToBitmap(CPDF_Pattern* pattern, - return FPDFBitmapFromCFXDIBitmap(cell_bitmap.Leak()); - } - -- // An uncolored pattern gets its color from the stroke color operands. -- const FX_COLORREF stroke_colorref = -- page_obj->color_state().GetStrokeColorRef(); -- if (stroke_colorref == 0xFFFFFFFF) { -+ // An uncolored pattern gets its color from the stroke/fill color operands. -+ const CPDF_ColorState& color_state = page_obj->color_state(); -+ const FX_COLORREF colorref = -+ use_stroke_color ? color_state.GetStrokeColorRef() -+ : color_state.GetFillColorRef(); -+ // 0xFFFFFFFF is the unusable color, see FX_COLORREF. -+ if (colorref == 0xFFFFFFFF) { - return nullptr; - } - -@@ -240,11 +244,14 @@ FPDF_BITMAP RenderTilingPatternToBitmap(CPDF_Pattern* pattern, - FXDIB_Format::kBgra)) { - return nullptr; - } -- const int stroke_alpha = -- static_cast(page_obj->general_state().GetStrokeAlpha() * 255); -+ const CPDF_GeneralState& general_state = page_obj->general_state(); -+ const float float_alpha = use_stroke_color -+ ? general_state.GetStrokeAlpha() -+ : general_state.GetFillAlpha(); -+ const int alpha = static_cast(float_alpha * 255); - if (!result_bitmap->CompositeMask( - /*dest_left=*/0, /*dest_top=*/0, rect.Width(), rect.Height(), -- cell_bitmap, AlphaAndColorRefToArgb(stroke_alpha, stroke_colorref), -+ cell_bitmap, AlphaAndColorRefToArgb(alpha, colorref), - /*src_left=*/0, /*src_top=*/0, BlendMode::kNormal)) { - return nullptr; - } -@@ -255,6 +262,36 @@ FPDF_BITMAP RenderTilingPatternToBitmap(CPDF_Pattern* pattern, - return FPDFBitmapFromCFXDIBitmap(result_bitmap.Leak()); - } - -+FPDF_BITMAP GetRenderedPattern(FPDF_DOCUMENT document, -+ FPDF_PAGEOBJECT page_object, -+ bool use_stroke_color) { -+ CPDF_Document* doc = CPDFDocumentFromFPDFDocument(document); -+ if (!doc) { -+ return nullptr; -+ } -+ -+ CPDF_PageObject* object = CPDFPageObjectFromFPDFPageObject(page_object); -+ if (!object) { -+ return nullptr; -+ } -+ -+ const CPDF_ColorState& color_state = object->color_state(); -+ const CPDF_Color* color = use_stroke_color -+ ? color_state.GetStrokeColor() -+ : color_state.GetFillColor(); -+ if (!color || !color->IsPattern()) { -+ return nullptr; -+ } -+ -+ RetainPtr pattern = color->GetPattern(); -+ if (!pattern) { -+ return nullptr; -+ } -+ -+ return RenderTilingPatternToBitmap(pattern.Get(), doc, object, -+ use_stroke_color); -+} -+ - } // namespace - - FPDF_EXPORT FPDF_DOCUMENT FPDF_CALLCONV FPDF_CreateNewDocument() { -@@ -1261,27 +1298,13 @@ FPDFPageObj_SetDashArray(FPDF_PAGEOBJECT page_object, - FPDF_EXPORT FPDF_BITMAP FPDF_CALLCONV - FPDFPageObj_GetRenderedStrokePattern(FPDF_DOCUMENT document, - FPDF_PAGEOBJECT page_object) { -- CPDF_Document* doc = CPDFDocumentFromFPDFDocument(document); -- if (!doc) { -- return nullptr; -- } -- -- CPDF_PageObject* object = CPDFPageObjectFromFPDFPageObject(page_object); -- if (!object) { -- return nullptr; -- } -- -- const CPDF_Color* stroke = object->color_state().GetStrokeColor(); -- if (!stroke || !stroke->IsPattern()) { -- return nullptr; -- } -- -- RetainPtr pattern = stroke->GetPattern(); -- if (!pattern) { -- return nullptr; -- } -+ return GetRenderedPattern(document, page_object, /*use_stroke_color=*/true); -+} - -- return RenderTilingPatternToBitmap(pattern.Get(), doc, object); -+FPDF_EXPORT FPDF_BITMAP FPDF_CALLCONV -+FPDFPageObj_GetRenderedFillPattern(FPDF_DOCUMENT document, -+ FPDF_PAGEOBJECT page_object) { -+ return GetRenderedPattern(document, page_object, /*use_stroke_color=*/false); - } - - FPDF_EXPORT int FPDF_CALLCONV -diff --git a/public/fpdf_edit.h b/public/fpdf_edit.h -index c7fca05a1..77fa19c81 100644 ---- a/public/fpdf_edit.h -+++ b/public/fpdf_edit.h -@@ -1206,6 +1206,22 @@ FPDF_EXPORT FPDF_BITMAP FPDF_CALLCONV - FPDFPageObj_GetRenderedStrokePattern(FPDF_DOCUMENT document, - FPDF_PAGEOBJECT page_object); - -+// Experimental API. -+// Get a bitmap rasterization of the fill pattern of |page_object|. -+// To render correctly, the caller must provide the |document| associated with -+// |page_object|. The returned bitmap will be owned by the caller, and -+// FPDFBitmap_Destroy() must be called on the returned bitmap when it is no -+// longer needed. -+// -+// document - handle to the document containing |page_object|. -+// page_object - handle to a page object. -+// -+// Returns the bitmap, or NULL if the fill is not a tiling pattern or on -+// failure. -+FPDF_EXPORT FPDF_BITMAP FPDF_CALLCONV -+FPDFPageObj_GetRenderedFillPattern(FPDF_DOCUMENT document, -+ FPDF_PAGEOBJECT page_object); -+ - // Get number of segments inside |path|. - // - // path - handle to a path. diff --git a/external/pdfium/extractpatterns-stroke.patch.1 b/external/pdfium/extractpatterns-stroke.patch.1 deleted file mode 100644 index c8a8146e1f83..000000000000 --- a/external/pdfium/extractpatterns-stroke.patch.1 +++ /dev/null @@ -1,262 +0,0 @@ -From 7bf42f401237d9096d44f7508beca8690031a98d Mon Sep 17 00:00:00 2001 -Date: Tue, 8 Sep 2026 16:54:21 -0700 -Subject: [PATCH] Add FPDFPageObj_GetRenderedStrokePattern() API - -This allows getting the rendered bitmap of a stroke pattern of a page -object. - -Change-Id: I4603be175bfe8721d4e11500afcc2be8c2c9f760 -Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/154910 -Reviewed-by: Lei Zhang -Reviewed-by: Tom Sepez -Commit-Queue: Lei Zhang ---- - core/fpdfapi/render/cpdf_rendertiling.cpp | 21 +++-- - core/fpdfapi/render/cpdf_rendertiling.h | 14 +++ - fpdfsdk/fpdf_edit_embeddertest.cpp | 64 +++++++++++++ - fpdfsdk/fpdf_editpage.cpp | 88 ++++++++++++++++++ - fpdfsdk/fpdf_view_c_api_test.c | 1 + - public/fpdf_edit.h | 16 ++++ - .../embedder_tests/pattern_stroke.png | Bin 0 -> 86 bytes - .../pattern_stroke_uncolored.png | Bin 0 -> 86 bytes - testing/resources/pattern_stroke.in | 59 ++++++++++++ - testing/resources/pattern_stroke.pdf | 71 ++++++++++++++ - testing/resources/pattern_stroke_uncolored.in | 61 ++++++++++++ - .../resources/pattern_stroke_uncolored.pdf | 73 +++++++++++++++ - 12 files changed, 458 insertions(+), 10 deletions(-) - create mode 100644 testing/resources/embedder_tests/pattern_stroke.png - create mode 100644 testing/resources/embedder_tests/pattern_stroke_uncolored.png - create mode 100644 testing/resources/pattern_stroke.in - create mode 100644 testing/resources/pattern_stroke.pdf - create mode 100644 testing/resources/pattern_stroke_uncolored.in - create mode 100644 testing/resources/pattern_stroke_uncolored.pdf - -diff --git a/core/fpdfapi/render/cpdf_rendertiling.cpp b/core/fpdfapi/render/cpdf_rendertiling.cpp -index f407f2403..77027354b 100644 ---- a/core/fpdfapi/render/cpdf_rendertiling.cpp -+++ b/core/fpdfapi/render/cpdf_rendertiling.cpp -@@ -26,7 +26,17 @@ - - namespace { - --RetainPtr DrawPatternBitmap( -+std::optional CheckedFloatToInt(float value) { -+ if (!pdfium::IsValueInRangeForNumericType(value)) { -+ return std::nullopt; -+ } -+ return static_cast(value); -+} -+ -+} // namespace -+ -+// static -+RetainPtr CPDF_RenderTiling::DrawPatternBitmap( - CPDF_Document* doc, - CPDF_PageImageCache* pCache, - CPDF_TilingPattern* pPattern, -@@ -72,15 +82,6 @@ RetainPtr DrawPatternBitmap( - return pBitmap; - } - --std::optional CheckedFloatToInt(float value) { -- if (!pdfium::IsValueInRangeForNumericType(value)) { -- return std::nullopt; -- } -- return static_cast(value); --} -- --} // namespace -- - // static - RetainPtr CPDF_RenderTiling::Draw( - CPDF_RenderStatus* pRenderStatus, -diff --git a/core/fpdfapi/render/cpdf_rendertiling.h b/core/fpdfapi/render/cpdf_rendertiling.h -index 34fb56bf4..2a124461c 100644 ---- a/core/fpdfapi/render/cpdf_rendertiling.h -+++ b/core/fpdfapi/render/cpdf_rendertiling.h -@@ -7,11 +7,14 @@ - #ifndef CORE_FPDFAPI_RENDER_CPDF_RENDERTILING_H_ - #define CORE_FPDFAPI_RENDER_CPDF_RENDERTILING_H_ - -+#include "core/fpdfapi/render/cpdf_renderoptions.h" - #include "core/fxcrt/retain_ptr.h" - - class CFX_DIBitmap; - class CFX_Matrix; -+class CPDF_Document; - class CPDF_Form; -+class CPDF_PageImageCache; - class CPDF_PageObject; - class CPDF_RenderStatus; - class CPDF_TilingPattern; -@@ -27,6 +30,17 @@ class CPDF_RenderTiling { - const FX_RECT& clip_box, - bool bStroke); - -+ // Renders a single cell of pPattern into a width x height bitmap. -+ static RetainPtr DrawPatternBitmap( -+ CPDF_Document* doc, -+ CPDF_PageImageCache* pCache, -+ CPDF_TilingPattern* pPattern, -+ CPDF_Form* pPatternForm, -+ const CFX_Matrix& mtObject2Device, -+ int width, -+ int height, -+ const CPDF_RenderOptions::Options& draw_options); -+ - CPDF_RenderTiling() = delete; - CPDF_RenderTiling(const CPDF_RenderTiling&) = delete; - CPDF_RenderTiling& operator=(const CPDF_RenderTiling&) = delete; -diff --git a/fpdfsdk/fpdf_editpage.cpp b/fpdfsdk/fpdf_editpage.cpp -index 758aae859..9b9474ed7 100644 ---- a/fpdfsdk/fpdf_editpage.cpp -+++ b/fpdfsdk/fpdf_editpage.cpp -@@ -25,12 +25,15 @@ - #include "core/fpdfapi/page/cpdf_pathobject.h" - #include "core/fpdfapi/page/cpdf_shadingobject.h" - #include "core/fpdfapi/page/cpdf_textobject.h" -+#include "core/fpdfapi/page/cpdf_tilingpattern.h" - #include "core/fpdfapi/parser/cpdf_array.h" - #include "core/fpdfapi/parser/cpdf_dictionary.h" - #include "core/fpdfapi/parser/cpdf_document.h" - #include "core/fpdfapi/parser/cpdf_number.h" - #include "core/fpdfapi/parser/cpdf_string.h" - #include "core/fpdfapi/render/cpdf_docrenderdata.h" -+#include "core/fpdfapi/render/cpdf_renderoptions.h" -+#include "core/fpdfapi/render/cpdf_rendertiling.h" - #include "core/fpdfdoc/cpdf_annot.h" - #include "core/fpdfdoc/cpdf_annotlist.h" - #include "core/fxcrt/compiler_specific.h" -@@ -42,6 +45,7 @@ - #include "core/fxcrt/span_util.h" - #include "core/fxcrt/stl_util.h" - #include "core/fxcrt/unowned_ptr.h" -+#include "core/fxge/dib/cfx_dibitmap.h" - #include "fpdfsdk/cpdfsdk_helpers.h" - #include "public/fpdf_formfill.h" - -@@ -193,6 +197,64 @@ ByteString FormatPDFDate(time_t current_time, const tm& local_time) { - return date; - } - -+FPDF_BITMAP RenderTilingPatternToBitmap(CPDF_Pattern* pattern, -+ CPDF_Document* doc, -+ CPDF_PageObject* page_obj) { -+ CPDF_TilingPattern* tiling_pattern = pattern->AsTilingPattern(); -+ if (!tiling_pattern) { -+ return nullptr; -+ } -+ const std::unique_ptr pattern_form = -+ tiling_pattern->Load(page_obj); -+ if (!pattern_form) { -+ return nullptr; -+ } -+ const FX_RECT rect = tiling_pattern->bbox().GetOuterRect(); -+ if (rect.IsEmpty() || !rect.Valid()) { -+ return nullptr; -+ } -+ -+ RetainPtr cell_bitmap = CPDF_RenderTiling::DrawPatternBitmap( -+ doc, /*pCache=*/nullptr, tiling_pattern, pattern_form.get(), CFX_Matrix(), -+ rect.Width(), rect.Height(), CPDF_RenderOptions::Options()); -+ if (!cell_bitmap) { -+ return nullptr; -+ } -+ -+ if (tiling_pattern->colored()) { -+ ValidateBitmapPremultiplyState(cell_bitmap); -+ -+ // Caller takes ownership. -+ return FPDFBitmapFromCFXDIBitmap(cell_bitmap.Leak()); -+ } -+ -+ // An uncolored pattern gets its color from the stroke color operands. -+ const FX_COLORREF stroke_colorref = -+ page_obj->color_state().GetStrokeColorRef(); -+ if (stroke_colorref == 0xFFFFFFFF) { -+ return nullptr; -+ } -+ -+ auto result_bitmap = pdfium::MakeRetain(); -+ if (!result_bitmap->Create(rect.Width(), rect.Height(), -+ FXDIB_Format::kBgra)) { -+ return nullptr; -+ } -+ const int stroke_alpha = -+ static_cast(page_obj->general_state().GetStrokeAlpha() * 255); -+ if (!result_bitmap->CompositeMask( -+ /*dest_left=*/0, /*dest_top=*/0, rect.Width(), rect.Height(), -+ cell_bitmap, AlphaAndColorRefToArgb(stroke_alpha, stroke_colorref), -+ /*src_left=*/0, /*src_top=*/0, BlendMode::kNormal)) { -+ return nullptr; -+ } -+ -+ ValidateBitmapPremultiplyState(result_bitmap); -+ -+ // Caller takes ownership. -+ return FPDFBitmapFromCFXDIBitmap(result_bitmap.Leak()); -+} -+ - } // namespace - - FPDF_EXPORT FPDF_DOCUMENT FPDF_CALLCONV FPDF_CreateNewDocument() { -@@ -1196,6 +1258,32 @@ FPDFPageObj_SetDashArray(FPDF_PAGEOBJECT page_object, - return true; - } - -+FPDF_EXPORT FPDF_BITMAP FPDF_CALLCONV -+FPDFPageObj_GetRenderedStrokePattern(FPDF_DOCUMENT document, -+ FPDF_PAGEOBJECT page_object) { -+ CPDF_Document* doc = CPDFDocumentFromFPDFDocument(document); -+ if (!doc) { -+ return nullptr; -+ } -+ -+ CPDF_PageObject* object = CPDFPageObjectFromFPDFPageObject(page_object); -+ if (!object) { -+ return nullptr; -+ } -+ -+ const CPDF_Color* stroke = object->color_state().GetStrokeColor(); -+ if (!stroke || !stroke->IsPattern()) { -+ return nullptr; -+ } -+ -+ RetainPtr pattern = stroke->GetPattern(); -+ if (!pattern) { -+ return nullptr; -+ } -+ -+ return RenderTilingPatternToBitmap(pattern.Get(), doc, object); -+} -+ - FPDF_EXPORT int FPDF_CALLCONV - FPDFFormObj_CountObjects(FPDF_PAGEOBJECT form_object) { - const auto* pObjectList = CPDFPageObjHolderFromFPDFFormObject(form_object); -diff --git a/public/fpdf_edit.h b/public/fpdf_edit.h -index 8fac863f6..34be3867d 100644 ---- a/public/fpdf_edit.h -+++ b/public/fpdf_edit.h -@@ -1190,6 +1190,22 @@ FPDFPageObj_SetDashArray(FPDF_PAGEOBJECT page_object, - size_t dash_count, - float phase); - -+// Experimental API. -+// Get a bitmap rasterization of the stroke pattern of |page_object|. -+// To render correctly, the caller must provide the |document| associated with -+// |page_object|. The returned bitmap will be owned by the caller, and -+// FPDFBitmap_Destroy() must be called on the returned bitmap when it is no -+// longer needed. -+// -+// document - handle to the document containing |page_object|. -+// page_object - handle to a page object. -+// -+// Returns the bitmap, or NULL if the stroke is not a tiling pattern or on -+// failure. -+FPDF_EXPORT FPDF_BITMAP FPDF_CALLCONV -+FPDFPageObj_GetRenderedStrokePattern(FPDF_DOCUMENT document, -+ FPDF_PAGEOBJECT page_object); -+ - // Get number of segments inside |path|. - // - // path - handle to a path. diff --git a/external/pdfium/fix-windows-build.patch.1 b/external/pdfium/fix-windows-build.patch.1 deleted file mode 100644 index abc5a72ee453..000000000000 --- a/external/pdfium/fix-windows-build.patch.1 +++ /dev/null @@ -1,44 +0,0 @@ -From 3abda657c073f89dc6b39bbad8f7dfe2fbf17fd4 Mon Sep 17 00:00:00 2001 -Date: Mon, 10 Aug 2026 11:59:46 -0700 -Subject: [PATCH] fxge: fix missing windows include in cfx_renderdevice.h - -This resulted in a build failure here: -In file included from .../pdfium/core/fxge/cfx_drawutils.cpp:13: -.../core/fxge/cfx_renderdevice.h(74,7): error: unknown type name 'HDC' - 74 | HDC hdc, - | ^ - -It seems this started after commit -fc790866bf26d977b2ea3a0c3938bb52895309ea (Consolidate CFX_RenderDevice -and remove CPDF_WindowsRenderDevice, 2026-06-29): the Windows-DC code -was moved from cpdf_windowsrenderdevice.h to cfx_renderdevice.h but the -windows.h include wasn't moved. - -Given that it looks like every other pdfium header that uses HDC -includes directly (core/fxge/win32/cpsoutput.h etc.), just -add the missing include here as well, conditionally. - -Change-Id: Ie9920b2031148f7781862502905d999ce045b014 -Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/154690 -Reviewed-by: Tom Sepez -Reviewed-by: Lei Zhang -Commit-Queue: Lei Zhang ---- - core/fxge/cfx_renderdevice.h | 4 ++++ - 1 file changed, 4 insertions(+) - -diff --git a/core/fxge/cfx_renderdevice.h b/core/fxge/cfx_renderdevice.h -index 8f427ce01..4114b9884 100644 ---- a/core/fxge/cfx_renderdevice.h -+++ b/core/fxge/cfx_renderdevice.h -@@ -19,6 +19,10 @@ - #include "core/fxge/dib/fx_dib.h" - #include "core/fxge/renderdevicedriver_iface.h" - -+#if BUILDFLAG(IS_WIN) -+#include -+#endif -+ - class CFX_DIBBase; - class CFX_DIBitmap; - class CFX_Font; diff --git a/external/pdfium/inc/pch/precompiled_pdfium.hxx b/external/pdfium/inc/pch/precompiled_pdfium.hxx index 9b4a2399f282..6816e62fd060 100644 --- a/external/pdfium/inc/pch/precompiled_pdfium.hxx +++ b/external/pdfium/inc/pch/precompiled_pdfium.hxx @@ -13,7 +13,7 @@ manual changes will be rewritten by the next run of update_pch.sh (which presumably also fixes all possible problems, so it's usually better to use it). - Generated on 2026-08-03 16:22:37 using: + Generated on 2026-09-24 17:32:45 using: ./bin/update_pch external/pdfium pdfium --cutoff=1 --exclude:system --include:module --include:local If after updating build fails, use the following command to locate conflicting headers: @@ -32,9 +32,6 @@ #include #include #include -#include -#include -#include #include #include #include @@ -94,7 +91,6 @@ #include #include #include -#include #include #include #include @@ -245,6 +241,7 @@ #include #include #include +#include #include #include #include @@ -263,6 +260,7 @@ #include #include #include +#include #include #include #include @@ -284,6 +282,7 @@ #include #include #include +#include #include #include #include @@ -335,6 +334,8 @@ #include #include #include +#include +#include #include #include #include @@ -366,6 +367,7 @@ #include #include #include +#include #include #include #include @@ -490,7 +492,6 @@ #include #include #include -#include #include #include #include diff --git a/external/pdfium/system-abseil.diff b/external/pdfium/system-abseil.diff index 9698d0559550..d87a55f810ce 100644 --- a/external/pdfium/system-abseil.diff +++ b/external/pdfium/system-abseil.diff @@ -1,22 +1,22 @@ ---- core/fpdfapi/page/cpdf_sampledfunc.cpp 2023-12-15 23:27:10.955659091 +0100 -+++ core/fpdfapi/page/cpdf_sampledfunc.cpp 2023-12-15 23:27:43.420136476 +0100 -@@ -17,8 +17,11 @@ - #include "core/fxcrt/compiler_specific.h" +diff -urN before/core/fpdfapi/page/cpdf_sampledfunc.cpp after/core/fpdfapi/page/cpdf_sampledfunc.cpp +--- core/fpdfapi/page/cpdf_sampledfunc.cpp 2026-09-24 15:11:27.153556875 +0000 ++++ core/fpdfapi/page/cpdf_sampledfunc.cpp 2026-09-24 15:11:41.206965278 +0000 +@@ -18,7 +18,11 @@ + #include "core/fxcrt/fx_ceil_div.h" #include "core/fxcrt/fx_memory_wrappers.h" #include "core/fxcrt/fx_safe_types.h" +#ifdef USE_SYSTEM_ABSEIL +#include +#else #include "third_party/abseil-cpp/absl/container/inlined_vector.h" -- +#endif + namespace { - // See PDF Reference 1.7, page 170, table 3.36. -diff -urN pdfium-old/core/fpdfdoc/cpdf_nametree.cpp pdfium/core/fpdfdoc/cpdf_nametree.cpp ---- core/fpdfdoc/cpdf_nametree.cpp 2025-10-13 21:48:18.759905514 +0200 -+++ core/fpdfdoc/cpdf_nametree.cpp 2025-10-13 22:00:01.912909396 +0200 -@@ -18,7 +18,11 @@ +diff -urN before/core/fpdfdoc/cpdf_nametree.cpp after/core/fpdfdoc/cpdf_nametree.cpp +--- core/fpdfdoc/cpdf_nametree.cpp 2026-09-24 15:11:27.137556410 +0000 ++++ core/fpdfdoc/cpdf_nametree.cpp 2026-09-24 15:11:41.169964202 +0000 +@@ -19,7 +19,11 @@ #include "core/fxcrt/check.h" #include "core/fxcrt/ptr_util.h" #include "core/fxcrt/stl_util.h" @@ -28,8 +28,9 @@ diff -urN pdfium-old/core/fpdfdoc/cpdf_nametree.cpp pdfium/core/fpdfdoc/cpdf_nam namespace { ---- core/fpdfdoc/cpvt_variabletext.cpp~ 2026-08-01 01:50:23.000000000 +0200 -+++ core/fpdfdoc/cpvt_variabletext.cpp 2026-08-26 10:04:23.478434445 +0200 +diff -urN before/core/fpdfdoc/cpvt_variabletext.cpp after/core/fpdfdoc/cpvt_variabletext.cpp +--- core/fpdfdoc/cpvt_variabletext.cpp 2026-09-24 15:11:27.145556642 +0000 ++++ core/fpdfdoc/cpvt_variabletext.cpp 2026-09-24 15:11:41.189964784 +0000 @@ -21,7 +21,11 @@ #include "core/fxcrt/fx_safe_types.h" #include "core/fxcrt/span.h" @@ -42,3 +43,18 @@ diff -urN pdfium-old/core/fpdfdoc/cpdf_nametree.cpp pdfium/core/fpdfdoc/cpdf_nam namespace { +diff -urN before/core/fxge/cfx_face.cpp after/core/fxge/cfx_face.cpp +--- core/fxge/cfx_face.cpp 2026-09-24 15:11:27.161557107 +0000 ++++ core/fxge/cfx_face.cpp 2026-09-24 15:11:41.224965801 +0000 +@@ -46,7 +46,11 @@ + + #if defined(PDF_ENABLE_FONTATIONS) + #include "core/fxge/skrifa/src/main.rs.h" ++#ifdef USE_SYSTEM_ABSEIL ++#include ++#else + #include "third_party/abseil-cpp/absl/cleanup/cleanup.h" ++#endif + #include "third_party/rust/cxx/v1/cxx.h" + #endif + diff --git a/external/pdfium/system-dragonbox.diff b/external/pdfium/system-dragonbox.diff new file mode 100644 index 000000000000..2e8562976d80 --- /dev/null +++ b/external/pdfium/system-dragonbox.diff @@ -0,0 +1,15 @@ +diff -urN db_before/core/fxcrt/stream_write_utils.cpp db_after/core/fxcrt/stream_write_utils.cpp +--- core/fxcrt/stream_write_utils.cpp 2026-09-24 15:17:47.881621130 +0000 ++++ core/fxcrt/stream_write_utils.cpp 2026-09-24 15:17:47.911622002 +0000 +@@ -10,7 +10,11 @@ + #include + + #include "core/fxcrt/span.h" ++#ifdef USE_SYSTEM_DRAGONBOX ++#include ++#else + #include "third_party/dragonbox/src/include/dragonbox/dragonbox.h" ++#endif + + namespace { + diff --git a/external/pdfium/system-icu.patch.1 b/external/pdfium/system-icu.patch.1 deleted file mode 100644 index 13d3ea858632..000000000000 --- a/external/pdfium/system-icu.patch.1 +++ /dev/null @@ -1,33 +0,0 @@ -From 9b6f23989c5da39bff4ce36df96d62f9cabeebbf Mon Sep 17 00:00:00 2001 -Date: Fri, 7 Aug 2026 14:36:14 -0700 -Subject: [PATCH] fxcrt: fix building against system ICU in cfx_bidi_resolver - -This was the only location which forgot to check for this define, -core/fxcrt/fx_extension.h:18 already did the same. - -Change-Id: I6efdd8c5a3322b146f9ccabcabd2ac2506912d85 -Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/154490 -Commit-Queue: Andy Phan -Reviewed-by: Lei Zhang -Reviewed-by: Andy Phan ---- - core/fxcrt/cfx_bidi_resolver.cpp | 5 +++++ - 1 file changed, 5 insertions(+) - -diff --git a/core/fxcrt/cfx_bidi_resolver.cpp b/core/fxcrt/cfx_bidi_resolver.cpp -index 50e302e35..efa585f38 100644 ---- a/core/fxcrt/cfx_bidi_resolver.cpp -+++ b/core/fxcrt/cfx_bidi_resolver.cpp -@@ -10,7 +10,12 @@ - #include "core/fxcrt/check_op.h" - #include "core/fxcrt/fx_safe_types.h" - #include "core/fxcrt/ptr_util.h" -+ -+#if defined(USE_SYSTEM_ICUUC) -+#include -+#else - #include "third_party/icu/source/common/unicode/ubidi.h" -+#endif - - void CFX_BidiResolver::UBiDiDeleter::operator()(UBiDi* bidi) const { - ubidi_close(bidi); diff --git a/vcl/qa/cppunit/pdfexport/pdfexport.cxx b/vcl/qa/cppunit/pdfexport/pdfexport.cxx index e1cf04fc04de..8767dc7ca1c8 100644 --- a/vcl/qa/cppunit/pdfexport/pdfexport.cxx +++ b/vcl/qa/cppunit/pdfexport/pdfexport.cxx @@ -1526,7 +1526,7 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest, testTdf115117_2a) for (int i = 0; i < nChars; i++) aChars[i] = pPdfTextPage->getUnicode(i); OUString aActualText(aChars.data(), aChars.size()); - CPPUNIT_ASSERT_EQUAL(u"\u0627\u0644 \u0648\u0642\u0641 \u0628\u0627\u0644 \u0627\u0644"_ustr, + CPPUNIT_ASSERT_EQUAL(u"\u0627\u0644 \u0628\u0627\u0644 \u0648\u0642\u0641 \u0627\u0644"_ustr, aActualText); #endif } @@ -1559,7 +1559,7 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest, testTdf154549) // Without the fix in place, this test would have failed with // - Expected: ִبي // - Actual : بִي - CPPUNIT_ASSERT_EQUAL(u"\u0628\u064A\u05B4"_ustr, aActualText); + CPPUNIT_ASSERT_EQUAL(u"\u05B4\u0628\u064A"_ustr, aActualText); } CPPUNIT_TEST_FIXTURE(PdfExportTest, testTdf150846) @@ -1621,7 +1621,7 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest, testTdf160401) // אאא בבב // - Actual : אאא בבב // בבב אאא - CPPUNIT_ASSERT_EQUAL(u"בבב אאא\r\nבבב אאא"_ustr, aActualText); + CPPUNIT_ASSERT_EQUAL(u"אאא בבב\r\nאאא בבב"_ustr, aActualText); } CPPUNIT_TEST_FIXTURE(PdfExportTest, testTdf103492) diff --git a/vcl/qa/cppunit/pdfexport/pdfexport3.cxx b/vcl/qa/cppunit/pdfexport/pdfexport3.cxx index 0f3fed3fc732..7e043cf7c805 100644 --- a/vcl/qa/cppunit/pdfexport/pdfexport3.cxx +++ b/vcl/qa/cppunit/pdfexport/pdfexport3.cxx @@ -1691,7 +1691,7 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest3, testTdf139627) int rehmim = 0, kasreh = 1, jehtatweel = 2; CPPUNIT_ASSERT_EQUAL(u"رم"_ustr, sText[rehmim].trim()); - CPPUNIT_ASSERT_EQUAL(OUString::fromUtf8("\xD8\xAC\xD9\x90"), sText[kasreh].trim()); + CPPUNIT_ASSERT_EQUAL(OUString::fromUtf8("\xD9\x90\xD8\xAC"), sText[kasreh].trim()); CPPUNIT_ASSERT_EQUAL(u""_ustr, sText[jehtatweel].trim()); // "Kasreh" should be within "jeh" character @@ -2536,9 +2536,9 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest3, testTdf134226) CPPUNIT_ASSERT_EQUAL(u"ة"_ustr, aText[0].trim()); CPPUNIT_ASSERT_EQUAL(u""_ustr, aText[1].trim()); - CPPUNIT_ASSERT_EQUAL(u"ق\r\n\u0651"_ustr, aText[2].trim()); + CPPUNIT_ASSERT_EQUAL(u"\u0651ق"_ustr, aText[2].trim()); CPPUNIT_ASSERT_EQUAL(u"ش"_ustr, aText[3].trim()); - CPPUNIT_ASSERT_EQUAL(u"ق\u0651"_ustr, aText[4].trim()); + CPPUNIT_ASSERT_EQUAL(u"\u0651ق"_ustr, aText[4].trim()); CPPUNIT_ASSERT_EQUAL(u"ش"_ustr, aText[5].trim()); CPPUNIT_ASSERT_EQUAL(u""_ustr, aText[6].trim()); CPPUNIT_ASSERT_EQUAL(u"ة"_ustr, aText[7].trim()); @@ -2570,13 +2570,13 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest3, testTdf71956) CPPUNIT_ASSERT_EQUAL(size_t(12), aText.size()); CPPUNIT_ASSERT_EQUAL(u"ه"_ustr, aText[0].trim()); - CPPUNIT_ASSERT_EQUAL(u"ل\r\n\u064e\u0651\u0670"_ustr, aText[1].trim()); + CPPUNIT_ASSERT_EQUAL(u"\u064e\u0651\u0670ل"_ustr, aText[1].trim()); CPPUNIT_ASSERT_EQUAL(u""_ustr, aText[2].trim()); CPPUNIT_ASSERT_EQUAL(u""_ustr, aText[3].trim()); CPPUNIT_ASSERT_EQUAL(u""_ustr, aText[4].trim()); CPPUNIT_ASSERT_EQUAL(u"ل"_ustr, aText[5].trim()); CPPUNIT_ASSERT_EQUAL(u"ل"_ustr, aText[6].trim()); - CPPUNIT_ASSERT_EQUAL(u"ل\u064e\u0651\u0670"_ustr, aText[7].trim()); + CPPUNIT_ASSERT_EQUAL(u"\u064e\u0651\u0670ل"_ustr, aText[7].trim()); CPPUNIT_ASSERT_EQUAL(u""_ustr, aText[8].trim()); CPPUNIT_ASSERT_EQUAL(u""_ustr, aText[9].trim()); CPPUNIT_ASSERT_EQUAL(u""_ustr, aText[10].trim()); @@ -2884,19 +2884,19 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest3, testTdf151748KashidaSpace) CPPUNIT_ASSERT_EQUAL(size_t(17), aText.size()); // Box 1: Not enough room for kashida - CPPUNIT_ASSERT_EQUAL(u"تخوردگی خط"_ustr, aText.at(0).trim()); + CPPUNIT_ASSERT_EQUAL(u"خط تخوردگی"_ustr, aText.at(0).trim()); CPPUNIT_ASSERT_EQUAL(u"وتوسط"_ustr, aText.at(1).trim()); // Box 2: One kashida toward end CPPUNIT_ASSERT_EQUAL(u"وردگی"_ustr, aText.at(2).trim()); CPPUNIT_ASSERT_EQUAL(u""_ustr, aText.at(3).trim()); // Kashida - CPPUNIT_ASSERT_EQUAL(u"تخ خط"_ustr, aText.at(4).trim()); + CPPUNIT_ASSERT_EQUAL(u"خط تخ"_ustr, aText.at(4).trim()); CPPUNIT_ASSERT_EQUAL(u"وتوسط"_ustr, aText.at(5).trim()); // Box 3: Two kashida CPPUNIT_ASSERT_EQUAL(u"وردگی"_ustr, aText.at(6).trim()); CPPUNIT_ASSERT_EQUAL(u""_ustr, aText.at(7).trim()); // Kashida - CPPUNIT_ASSERT_EQUAL(u"تخ ط"_ustr, aText.at(8).trim()); + CPPUNIT_ASSERT_EQUAL(u"ط تخ"_ustr, aText.at(8).trim()); CPPUNIT_ASSERT_EQUAL(u""_ustr, aText.at(9).trim()); // Kashida CPPUNIT_ASSERT_EQUAL(u"خ"_ustr, aText.at(10).trim()); CPPUNIT_ASSERT_EQUAL(u"وتوسط"_ustr, aText.at(11).trim()); @@ -2924,7 +2924,7 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest3, testTdf163105SwKashidaSpaceExpansion) CPPUNIT_ASSERT_EQUAL(u"یده"_ustr, aText.at(0).trim()); CPPUNIT_ASSERT_EQUAL(u""_ustr, aText.at(1).trim()); - CPPUNIT_ASSERT_EQUAL(u"کش ه"_ustr, aText.at(2).trim()); // This span is whitespace justified + CPPUNIT_ASSERT_EQUAL(u"ه کش"_ustr, aText.at(2).trim()); // This span is whitespace justified CPPUNIT_ASSERT_EQUAL(u""_ustr, aText.at(3).trim()); CPPUNIT_ASSERT_EQUAL(u"نویس"_ustr, aText.at(4).trim()); @@ -2949,7 +2949,7 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest3, testTdf163105Writer) CPPUNIT_ASSERT_EQUAL(u"ارسی"_ustr, aText.at(0).trim()); CPPUNIT_ASSERT_EQUAL(u""_ustr, aText.at(1).trim()); - CPPUNIT_ASSERT_EQUAL(u"ف تن"_ustr, aText.at(2).trim()); // This span is whitespace justified + CPPUNIT_ASSERT_EQUAL(u"تن ف"_ustr, aText.at(2).trim()); // This span is whitespace justified CPPUNIT_ASSERT_EQUAL(u""_ustr, aText.at(3).trim()); CPPUNIT_ASSERT_EQUAL(u"م"_ustr, aText.at(4).trim()); @@ -2974,7 +2974,7 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest3, testTdf163105Editeng) CPPUNIT_ASSERT_EQUAL(u"ارسی"_ustr, aText.at(0).trim()); CPPUNIT_ASSERT_EQUAL(u""_ustr, aText.at(1).trim()); - CPPUNIT_ASSERT_EQUAL(u"ف تن"_ustr, aText.at(2).trim()); // This span is whitespace justified + CPPUNIT_ASSERT_EQUAL(u"تن ف"_ustr, aText.at(2).trim()); // This span is whitespace justified CPPUNIT_ASSERT_EQUAL(u""_ustr, aText.at(3).trim()); CPPUNIT_ASSERT_EQUAL(u"م"_ustr, aText.at(4).trim()); @@ -2994,16 +2994,16 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest3, testTdf140767SyriacJustification) CPPUNIT_ASSERT_EQUAL(size_t(11), aText.size()); CPPUNIT_ASSERT_EQUAL(u"ܝ"_ustr, aText.at(0).trim()); - CPPUNIT_ASSERT_EQUAL(u"ܛܺ"_ustr, aText.at(1).trim()); + CPPUNIT_ASSERT_EQUAL(u"ܺܛ"_ustr, aText.at(1).trim()); CPPUNIT_ASSERT_EQUAL(u""_ustr, aText.at(2).trim()); CPPUNIT_ASSERT_EQUAL(u""_ustr, aText.at(3).trim()); - CPPUNIT_ASSERT_EQUAL(u"ܚܰ"_ustr, aText.at(4).trim()); + CPPUNIT_ASSERT_EQUAL(u"ܰܚ"_ustr, aText.at(4).trim()); CPPUNIT_ASSERT_EQUAL(u"ܕ"_ustr, aText.at(5).trim()); // This span is whitespace justified CPPUNIT_ASSERT_EQUAL(u""_ustr, aText.at(6).trim()); - CPPUNIT_ASSERT_EQUAL(u"ܓܰ"_ustr, aText.at(7).trim()); + CPPUNIT_ASSERT_EQUAL(u"ܰܓ"_ustr, aText.at(7).trim()); CPPUNIT_ASSERT_EQUAL(u"ܒ"_ustr, aText.at(8).trim()); CPPUNIT_ASSERT_EQUAL(u""_ustr, aText.at(9).trim()); - CPPUNIT_ASSERT_EQUAL(u"ܐܰ"_ustr, aText.at(10).trim()); + CPPUNIT_ASSERT_EQUAL(u"ܰܐ"_ustr, aText.at(10).trim()); // Without kashida justification, this space will be 224.328 CPPUNIT_ASSERT_LESS(90.0, aRect.at(5).getWidth()); From afea7eceecdd77ec1d8994b7985ac014f04e4e03 Mon Sep 17 00:00:00 2001 From: Michael Meeks Date: Wed, 16 Sep 2026 22:13:27 +0000 Subject: [PATCH 044/289] sw: forward declare SwCharFormats in doc.hxx. Out-line the one inline: FindCharFormatByName that needed charformats.hxx - saving ~1% of sw compile time over ~600 modules, most of the cost being boost multi_index instantiation for SwCharFormats. Signed-off-by: Michael Meeks Change-Id: Ie97b073efd225db873c7c17c7a064ef2d171b89b Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/12943 Tested-by: Jenkins CPCI Reviewed-by: Noel Grandin (cherry picked from commit 6858f88c20ed188157c5af932469a342e82bf985) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211356 Tested-by: Jenkins Reviewed-by: Xisco Fauli --- sw/inc/doc.hxx | 5 ++--- sw/source/core/crsr/crstrvl.cxx | 1 + sw/source/core/doc/DocumentStylePoolManager.cxx | 1 + sw/source/core/doc/doc.cxx | 1 + sw/source/core/doc/docfmt.cxx | 6 ++++++ sw/source/core/doc/docftn.cxx | 1 + sw/source/core/doc/docnew.cxx | 1 + sw/source/core/doc/fmtcol.cxx | 1 + sw/source/core/doc/number.cxx | 1 + sw/source/core/edit/edfmt.cxx | 1 + sw/source/core/edit/editsh.cxx | 1 + sw/source/core/text/inftxt.cxx | 1 + sw/source/core/txtnode/ndtxt.cxx | 1 + sw/source/core/undo/rolbck.cxx | 1 + sw/source/core/unocore/unocrsrhelper.cxx | 1 + sw/source/core/unocore/unosett.cxx | 1 + sw/source/core/unocore/unostyle.cxx | 1 + sw/source/filter/html/css1atr.cxx | 1 + sw/source/filter/html/htmlcss1.cxx | 1 + sw/source/filter/html/wrthtml.cxx | 1 + sw/source/filter/ww8/wrtw8sty.cxx | 1 + sw/source/filter/ww8/wrtww8.cxx | 1 + sw/source/filter/xml/xmlexp.cxx | 1 + sw/source/uibase/app/docstyle.cxx | 1 + sw/source/uibase/uno/unotxdoc.cxx | 1 + sw/source/uibase/utlui/content.cxx | 1 + sw/source/uibase/utlui/uitool.cxx | 1 + 27 files changed, 33 insertions(+), 3 deletions(-) diff --git a/sw/inc/doc.hxx b/sw/inc/doc.hxx index 73e5f7e48efb..2a212d84788d 100644 --- a/sw/inc/doc.hxx +++ b/sw/inc/doc.hxx @@ -37,7 +37,6 @@ #include "frmfmt.hxx" #include "charfmt.hxx" #include "docary.hxx" -#include "charformats.hxx" #include "pagedesc.hxx" #include "tblenum.hxx" #include "ndarr.hxx" @@ -65,6 +64,7 @@ class SvxMacro; class SwAutoCompleteWord; class SwAutoCorrExceptWord; class SwCellFrame; +class SwCharFormats; class SwCellStyleTable; class SwCursorShell; class SwCursor; @@ -808,8 +808,7 @@ public: SW_DLLPUBLIC SwCharFormat *MakeCharFormat(const UIName &rFormatName, SwCharFormat *pDerivedFrom); void DelCharFormat(size_t nFormat, bool bBroadcast = false); void DelCharFormat(SwCharFormat const * pFormat, bool bBroadcast = false); - SwCharFormat* FindCharFormatByName( const UIName& rName ) const - { return mpCharFormatTable->FindFormatByName(rName); } + SW_DLLPUBLIC SwCharFormat* FindCharFormatByName( const UIName& rName ) const; // Formatcollections (styles) // TXT diff --git a/sw/source/core/crsr/crstrvl.cxx b/sw/source/core/crsr/crstrvl.cxx index a38b0e3a9c24..5480eb03474a 100644 --- a/sw/source/core/crsr/crstrvl.cxx +++ b/sw/source/core/crsr/crstrvl.cxx @@ -64,6 +64,7 @@ #include #include #include +#include #include #include #include diff --git a/sw/source/core/doc/DocumentStylePoolManager.cxx b/sw/source/core/doc/DocumentStylePoolManager.cxx index 4f783667b679..2a0bd658b779 100644 --- a/sw/source/core/doc/DocumentStylePoolManager.cxx +++ b/sw/source/core/doc/DocumentStylePoolManager.cxx @@ -28,6 +28,7 @@ #include #include #include +#include #include #include #include diff --git a/sw/source/core/doc/doc.cxx b/sw/source/core/doc/doc.cxx index a64d4854a3ba..a36a6c0107bc 100644 --- a/sw/source/core/doc/doc.cxx +++ b/sw/source/core/doc/doc.cxx @@ -20,6 +20,7 @@ #include #include +#include #include #include #include diff --git a/sw/source/core/doc/docfmt.cxx b/sw/source/core/doc/docfmt.cxx index 47e2126eb565..672d50666be3 100644 --- a/sw/source/core/doc/docfmt.cxx +++ b/sw/source/core/doc/docfmt.cxx @@ -64,6 +64,7 @@ #include #include #include +#include #include #include #include @@ -853,6 +854,11 @@ SwFormat *SwDoc::MakeFrameFormat_(const UIName &rFormatName, return pFrameFormat; } +SwCharFormat* SwDoc::FindCharFormatByName( const UIName& rName ) const +{ + return mpCharFormatTable->FindFormatByName(rName); +} + SwCharFormat *SwDoc::MakeCharFormat( const UIName &rFormatName, SwCharFormat *pDerivedFrom ) { diff --git a/sw/source/core/doc/docftn.cxx b/sw/source/core/doc/docftn.cxx index 78fb9027c656..1c7d5a8f1778 100644 --- a/sw/source/core/doc/docftn.cxx +++ b/sw/source/core/doc/docftn.cxx @@ -24,6 +24,7 @@ #include #include #include +#include #include #include #include diff --git a/sw/source/core/doc/docnew.cxx b/sw/source/core/doc/docnew.cxx index e3ceaa8e4cc8..90313a7abba7 100644 --- a/sw/source/core/doc/docnew.cxx +++ b/sw/source/core/doc/docnew.cxx @@ -62,6 +62,7 @@ #include #include #include +#include #include #include #include diff --git a/sw/source/core/doc/fmtcol.cxx b/sw/source/core/doc/fmtcol.cxx index d51726c01c11..86b2d4a46f42 100644 --- a/sw/source/core/doc/fmtcol.cxx +++ b/sw/source/core/doc/fmtcol.cxx @@ -26,6 +26,7 @@ #include #include #include +#include #include #include #include diff --git a/sw/source/core/doc/number.cxx b/sw/source/core/doc/number.cxx index 75fe2aedb402..feb71fa4c6e6 100644 --- a/sw/source/core/doc/number.cxx +++ b/sw/source/core/doc/number.cxx @@ -28,6 +28,7 @@ #include #include #include +#include #include #include #include diff --git a/sw/source/core/edit/edfmt.cxx b/sw/source/core/edit/edfmt.cxx index 8139ce07a591..b7e40f7cded2 100644 --- a/sw/source/core/edit/edfmt.cxx +++ b/sw/source/core/edit/edfmt.cxx @@ -24,6 +24,7 @@ #include #include #include +#include #include sal_uInt16 SwEditShell::GetCharFormatCount() const diff --git a/sw/source/core/edit/editsh.cxx b/sw/source/core/edit/editsh.cxx index 91d6150901ae..a3f5310408f3 100644 --- a/sw/source/core/edit/editsh.cxx +++ b/sw/source/core/edit/editsh.cxx @@ -38,6 +38,7 @@ #include #include #include +#include #include #include #include diff --git a/sw/source/core/text/inftxt.cxx b/sw/source/core/text/inftxt.cxx index ae97e2ca7af2..807d3e9b8b12 100644 --- a/sw/source/core/text/inftxt.cxx +++ b/sw/source/core/text/inftxt.cxx @@ -65,6 +65,7 @@ #include "portab.hxx" #include #include +#include #include #include #include diff --git a/sw/source/core/txtnode/ndtxt.cxx b/sw/source/core/txtnode/ndtxt.cxx index 4c617528ee4e..8752081d32c7 100644 --- a/sw/source/core/txtnode/ndtxt.cxx +++ b/sw/source/core/txtnode/ndtxt.cxx @@ -46,6 +46,7 @@ #include #include #include +#include #include #include #include diff --git a/sw/source/core/undo/rolbck.cxx b/sw/source/core/undo/rolbck.cxx index 11fe18e9a3cb..be14bd1d5eb7 100644 --- a/sw/source/core/undo/rolbck.cxx +++ b/sw/source/core/undo/rolbck.cxx @@ -56,6 +56,7 @@ #include #include #include +#include #include #include #include diff --git a/sw/source/core/unocore/unocrsrhelper.cxx b/sw/source/core/unocore/unocrsrhelper.cxx index 82d5eabf48fd..28faedfc0a6b 100644 --- a/sw/source/core/unocore/unocrsrhelper.cxx +++ b/sw/source/core/unocore/unocrsrhelper.cxx @@ -55,6 +55,7 @@ #include #include #include +#include #include #include #include diff --git a/sw/source/core/unocore/unosett.cxx b/sw/source/core/unocore/unosett.cxx index 67e510866e90..520ee4cb821f 100644 --- a/sw/source/core/unocore/unosett.cxx +++ b/sw/source/core/unocore/unosett.cxx @@ -32,6 +32,7 @@ #include #include #include +#include #include #include #include diff --git a/sw/source/core/unocore/unostyle.cxx b/sw/source/core/unocore/unostyle.cxx index 7fba6f1cfdf8..1b0408d2ab61 100644 --- a/sw/source/core/unocore/unostyle.cxx +++ b/sw/source/core/unocore/unostyle.cxx @@ -64,6 +64,7 @@ #include #include #include +#include #include #include #include diff --git a/sw/source/filter/html/css1atr.cxx b/sw/source/filter/html/css1atr.cxx index 7613252ed05b..5c2cf1565340 100644 --- a/sw/source/filter/html/css1atr.cxx +++ b/sw/source/filter/html/css1atr.cxx @@ -60,6 +60,7 @@ #include #include #include +#include #include #include #include diff --git a/sw/source/filter/html/htmlcss1.cxx b/sw/source/filter/html/htmlcss1.cxx index 64f2763fe536..7303799a1197 100644 --- a/sw/source/filter/html/htmlcss1.cxx +++ b/sw/source/filter/html/htmlcss1.cxx @@ -45,6 +45,7 @@ #include #include #include +#include #include #include diff --git a/sw/source/filter/html/wrthtml.cxx b/sw/source/filter/html/wrthtml.cxx index 72b58673d9cf..bd4e51c870cf 100644 --- a/sw/source/filter/html/wrthtml.cxx +++ b/sw/source/filter/html/wrthtml.cxx @@ -52,6 +52,7 @@ #include #include #include +#include #include #include #include diff --git a/sw/source/filter/ww8/wrtw8sty.cxx b/sw/source/filter/ww8/wrtw8sty.cxx index cc99495fa23d..db7fe47f94f6 100644 --- a/sw/source/filter/ww8/wrtw8sty.cxx +++ b/sw/source/filter/ww8/wrtw8sty.cxx @@ -50,6 +50,7 @@ #include #include #include +#include #include #include #include diff --git a/sw/source/filter/ww8/wrtww8.cxx b/sw/source/filter/ww8/wrtww8.cxx index 57f7871a0779..7f7fdd6d71b9 100644 --- a/sw/source/filter/ww8/wrtww8.cxx +++ b/sw/source/filter/ww8/wrtww8.cxx @@ -58,6 +58,7 @@ #include #include #include +#include #include #include #include diff --git a/sw/source/filter/xml/xmlexp.cxx b/sw/source/filter/xml/xmlexp.cxx index 34b24e4b4fe0..800d438efcc0 100644 --- a/sw/source/filter/xml/xmlexp.cxx +++ b/sw/source/filter/xml/xmlexp.cxx @@ -42,6 +42,7 @@ #include #include #include +#include #include #include #include diff --git a/sw/source/uibase/app/docstyle.cxx b/sw/source/uibase/app/docstyle.cxx index 53fe33094293..aa406fda7786 100644 --- a/sw/source/uibase/app/docstyle.cxx +++ b/sw/source/uibase/app/docstyle.cxx @@ -39,6 +39,7 @@ #include #include #include +#include #include #include #include diff --git a/sw/source/uibase/uno/unotxdoc.cxx b/sw/source/uibase/uno/unotxdoc.cxx index ece2d5b7a6e6..2e8c225a8006 100644 --- a/sw/source/uibase/uno/unotxdoc.cxx +++ b/sw/source/uibase/uno/unotxdoc.cxx @@ -140,6 +140,7 @@ #include #include +#include #include #include diff --git a/sw/source/uibase/utlui/content.cxx b/sw/source/uibase/utlui/content.cxx index fd4b35c9c4ef..28154db06edc 100644 --- a/sw/source/uibase/utlui/content.cxx +++ b/sw/source/uibase/utlui/content.cxx @@ -61,6 +61,7 @@ #include #include #include +#include #include #include #include diff --git a/sw/source/uibase/utlui/uitool.cxx b/sw/source/uibase/utlui/uitool.cxx index 4d33e4f5b76e..0d826cd59411 100644 --- a/sw/source/uibase/utlui/uitool.cxx +++ b/sw/source/uibase/utlui/uitool.cxx @@ -65,6 +65,7 @@ #include #include #include +#include #include #include #include From b693937e99aff32341a4f3215e494182fddf47c7 Mon Sep 17 00:00:00 2001 From: Balazs Varga Date: Thu, 24 Sep 2026 12:56:07 +0200 Subject: [PATCH 045/289] starmath OOXML: keep the bold and italic of text in a formula A bold or italic part of a Word equation came back plain in Writer, for example a bold x in a fraction or a bold sin, while its color already survived the import. Word keeps the style of a math run in the m:sty of its m:rPr (p, b, i or bi), which the import never read and the export never wrote. A normal text run cannot have an m:sty, so Word puts its bold and italic in w:b and w:i instead. When the whole function name is set to italic, Word keeps that in the m:ctrlPr of the m:func. Read these on import and write a bold, ital or nitalic command only where the run differs from the default. Letters are italic and digits and function names are upright by default in both Word and StarMath, so a plain formula gets no new command. The export writes the same elements back. The bold in the m:ctrlPr of a fraction is not read, because Word draws it on the bar only, and a command around the fraction would make the terms bold as well. follow-up for: I4207aab6a363e5f841de58e3f743d9e010609c10 (starmath OOXML: keep the font color of text in a formula) and Ic13c9e59756806932f61a6fb51e4919a49cdfcd6 (starmath OOXML: keep the color of the lines and signs in a formula) Change-Id: Ia2172c0d75e59c37a17c8ce51e36a89f25d8565c Signed-off-by: Balazs Varga Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/13466 Reviewed-by: Noel Grandin Tested-by: Jenkins CPCI (cherry picked from commit d6e51e0d41856f4a6c83df3794742742e3ee5dfd) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211443 Reviewed-by: Xisco Fauli Tested-by: Jenkins --- starmath/inc/node.hxx | 1 + starmath/source/ooxmlexport.cxx | 100 +++- starmath/source/ooxmlexport.hxx | 7 +- starmath/source/ooxmlimport.cxx | 141 ++++- starmath/source/ooxmlimport.hxx | 4 + .../data/math-bold-italic-export.fodt | 515 ++++++++++++++++++ .../ooxmlexport/data/math-bold-italic.docx | Bin 0 -> 13545 bytes sw/qa/extras/ooxmlexport/ooxmlexport2.cxx | 78 +++ sw/qa/extras/ooxmlimport/ooxmlimport2.cxx | 6 +- 9 files changed, 815 insertions(+), 37 deletions(-) create mode 100644 sw/qa/extras/ooxmlexport/data/math-bold-italic-export.fodt create mode 100644 sw/qa/extras/ooxmlexport/data/math-bold-italic.docx diff --git a/starmath/inc/node.hxx b/starmath/inc/node.hxx index 9c60ce96b288..b7e91bbed42f 100644 --- a/starmath/inc/node.hxx +++ b/starmath/inc/node.hxx @@ -183,6 +183,7 @@ public: * @return font attributes */ FontAttribute &Attributes() { return mnAttributes; } + const FontAttribute &Attributes() const { return mnAttributes; } /** * Checks if it is a visible node rendered invisible. diff --git a/starmath/source/ooxmlexport.cxx b/starmath/source/ooxmlexport.cxx index 878bd3dca654..d7750af6b0ff 100644 --- a/starmath/source/ooxmlexport.cxx +++ b/starmath/source/ooxmlexport.cxx @@ -15,6 +15,8 @@ #include #include #include +#include +#include using namespace oox; using namespace oox::core; @@ -90,20 +92,56 @@ bool SmOoxmlExport::HasOwnColor( const SmNode* pNode ) const && pNode->GetFont().GetColor() != COL_AUTO; } -// A construct such as a fraction or a pair of brackets draws part of itself, and the -// color of that part travels in the m:ctrlPr of the construct's property element. -void SmOoxmlExport::WriteCtrlPrColor( const SmNode* pNode ) +// Only a bold or italic command around a construct sets these attributes on it. +bool SmOoxmlExport::HasCtrlPr( const SmNode* pNode ) const { - if( !HasOwnColor( pNode )) + return HasOwnColor( pNode ) + || ( drawingml::DOCUMENT_DOCX == m_DocumentType + && ( pNode->Attributes() & ( FontAttribute::Bold | FontAttribute::Italic ))); +} + +// A construct such as a fraction or a pair of brackets draws part of itself, and the +// format of that part travels in the m:ctrlPr of the construct's property element. +void SmOoxmlExport::WriteCtrlPr( const SmNode* pNode ) +{ + if( !HasCtrlPr( pNode )) return; m_pSerializer->startElementNS( XML_m, XML_ctrlPr ); m_pSerializer->startElementNS( XML_w, XML_rPr ); - m_pSerializer->singleElementNS( XML_w, XML_color, FSNS( XML_w, XML_val ), - msfilter::util::ConvertColorOU( pNode->GetFont().GetColor())); + if( pNode->Attributes() & FontAttribute::Bold ) + m_pSerializer->singleElementNS( XML_w, XML_b ); + if( pNode->Attributes() & FontAttribute::Italic ) + m_pSerializer->singleElementNS( XML_w, XML_i ); + if( HasOwnColor( pNode )) + m_pSerializer->singleElementNS( XML_w, XML_color, FSNS( XML_w, XML_val ), + msfilter::util::ConvertColorOU( pNode->GetFont().GetColor())); m_pSerializer->endElementNS( XML_w, XML_rPr ); m_pSerializer->endElementNS( XML_m, XML_ctrlPr ); } +static bool lcl_HasLetter( const OUString& rText ) +{ + for( sal_Int32 nIndex = 0; nIndex < rText.getLength(); ) + if( u_isalpha( rText.iterateCodePoints( &nIndex ))) + return true; + return false; +} + +// The m:sty that makes Word draw the run the way StarMath does. Without one Word draws +// letters italic and digits upright, as StarMath does. A function name is read back as +// upright unless it says otherwise. +static const char* lcl_GetOoxmlStyle( bool bBold, bool bItalic, const OUString& rText, + bool bFunctionName ) +{ + if( bBold ) + return bItalic ? "bi" : "b"; + if( bItalic ) + return bFunctionName ? "i" : nullptr; + if( lcl_HasLetter( rText )) + return "p"; + return nullptr; +} + void SmOoxmlExport::HandleVerticalStack( const SmNode* pNode, int nLevel ) { m_pSerializer->startElementNS(XML_m, XML_eqArr); @@ -123,20 +161,37 @@ void SmOoxmlExport::HandleText( const SmNode* pNode, int /*nLevel*/) { m_pSerializer->startElementNS(XML_m, XML_r); - if( pNode->GetToken().eType == TTEXT ) // literal text (in quotes) + const SmTextNode* pTemp = static_cast(pNode); + const bool bBold = IsBold( pNode->GetFont()); + const bool bItalic = IsItalic( pNode->GetFont()); + const bool bLiteral = pNode->GetToken().eType == TTEXT; + if( bLiteral ) // literal text (in quotes) { m_pSerializer->startElementNS(XML_m, XML_rPr); m_pSerializer->singleElementNS(XML_m, XML_lit); m_pSerializer->singleElementNS(XML_m, XML_nor); m_pSerializer->endElementNS( XML_m, XML_rPr ); } + // m:nor and m:sty exclude each other, so normal text keeps its bold and italic in + // the w:rPr + else if( const char* pStyle = lcl_GetOoxmlStyle( bBold, bItalic, pTemp->GetText(), + pTemp->GetFontDesc() == FNT_FUNCTION )) + { + m_pSerializer->startElementNS(XML_m, XML_rPr); + m_pSerializer->singleElementNS(XML_m, XML_sty, FSNS(XML_m, XML_val), pStyle); + m_pSerializer->endElementNS( XML_m, XML_rPr ); + } const bool bWriteFont = drawingml::DOCUMENT_DOCX == m_DocumentType && ECMA_376_1ST_EDITION == version; - // A surrounding color command has already reached this node. + const bool bWriteBold + = drawingml::DOCUMENT_DOCX == m_DocumentType && bLiteral && bBold; + const bool bWriteItalic + = drawingml::DOCUMENT_DOCX == m_DocumentType && bLiteral && bItalic; + // A surrounding color, bold or italic command has already reached this node. const Color aColor = pNode->GetFont().GetColor(); const bool bWriteColor = drawingml::DOCUMENT_DOCX == m_DocumentType && aColor != COL_AUTO; - if( bWriteFont || bWriteColor ) + if( bWriteFont || bWriteBold || bWriteItalic || bWriteColor ) { m_pSerializer->startElementNS(XML_w, XML_rPr); if( bWriteFont ) @@ -145,13 +200,16 @@ void SmOoxmlExport::HandleText( const SmNode* pNode, int /*nLevel*/) m_pSerializer->singleElementNS( XML_w, XML_rFonts, FSNS( XML_w, XML_ascii ), "Cambria Math", FSNS( XML_w, XML_hAnsi ), "Cambria Math" ); + if( bWriteBold ) + m_pSerializer->singleElementNS( XML_w, XML_b ); + if( bWriteItalic ) + m_pSerializer->singleElementNS( XML_w, XML_i ); if( bWriteColor ) m_pSerializer->singleElementNS( XML_w, XML_color, FSNS( XML_w, XML_val ), msfilter::util::ConvertColorOU( aColor )); m_pSerializer->endElementNS( XML_w, XML_rPr ); } m_pSerializer->startElementNS(XML_m, XML_t, FSNS(XML_xml, XML_space), "preserve"); - const SmTextNode* pTemp = static_cast(pNode); SAL_INFO( "starmath.ooxml", "Text:" << pTemp->GetText()); OUStringBuffer buf(pTemp->GetText()); for(sal_Int32 i=0;iGetText().getLength();i++) @@ -212,12 +270,12 @@ void SmOoxmlExport::HandleText( const SmNode* pNode, int /*nLevel*/) void SmOoxmlExport::HandleFractions( const SmNode* pNode, int nLevel, const char* type ) { m_pSerializer->startElementNS(XML_m, XML_f); - if( type != nullptr || HasOwnColor( pNode )) + if( type != nullptr || HasCtrlPr( pNode )) { m_pSerializer->startElementNS(XML_m, XML_fPr); if( type != nullptr ) m_pSerializer->singleElementNS(XML_m, XML_type, FSNS(XML_m, XML_val), type); - WriteCtrlPrColor( pNode ); + WriteCtrlPr( pNode ); m_pSerializer->endElementNS( XML_m, XML_fPr ); } assert( pNode->GetNumSubNodes() == 3 ); @@ -257,7 +315,7 @@ void SmOoxmlExport::HandleAttribute( const SmAttributeNode* pNode, int nLevel ) m_pSerializer->startElementNS(XML_m, XML_accPr); OString value = OUStringToOString(pNode->Attribute()->GetToken().cMathChar, RTL_TEXTENCODING_UTF8 ); m_pSerializer->singleElementNS(XML_m, XML_chr, FSNS(XML_m, XML_val), value); - WriteCtrlPrColor( pNode ); + WriteCtrlPr( pNode ); m_pSerializer->endElementNS( XML_m, XML_accPr ); m_pSerializer->startElementNS(XML_m, XML_e); HandleNode( pNode->Body(), nLevel + 1 ); @@ -271,7 +329,7 @@ void SmOoxmlExport::HandleAttribute( const SmAttributeNode* pNode, int nLevel ) m_pSerializer->startElementNS(XML_m, XML_barPr); m_pSerializer->singleElementNS( XML_m, XML_pos, FSNS( XML_m, XML_val ), ( pNode->Attribute()->GetToken().eType == TUNDERLINE ) ? "bot" : "top" ); - WriteCtrlPrColor( pNode ); + WriteCtrlPr( pNode ); m_pSerializer->endElementNS( XML_m, XML_barPr ); m_pSerializer->startElementNS(XML_m, XML_e); HandleNode( pNode->Body(), nLevel + 1 ); @@ -286,7 +344,7 @@ void SmOoxmlExport::HandleAttribute( const SmAttributeNode* pNode, int nLevel ) m_pSerializer->singleElementNS(XML_m, XML_hideLeft, FSNS(XML_m, XML_val), "1"); m_pSerializer->singleElementNS(XML_m, XML_hideRight, FSNS(XML_m, XML_val), "1"); m_pSerializer->singleElementNS(XML_m, XML_strikeH, FSNS(XML_m, XML_val), "1"); - WriteCtrlPrColor( pNode ); + WriteCtrlPr( pNode ); m_pSerializer->endElementNS( XML_m, XML_borderBoxPr ); m_pSerializer->startElementNS(XML_m, XML_e); HandleNode( pNode->Body(), nLevel + 1 ); @@ -304,10 +362,10 @@ void SmOoxmlExport::HandleRoot( const SmRootNode* pNode, int nLevel ) m_pSerializer->startElementNS(XML_m, XML_rad); if( const SmNode* argument = pNode->Argument()) { - if( HasOwnColor( pNode )) + if( HasCtrlPr( pNode )) { m_pSerializer->startElementNS(XML_m, XML_radPr); - WriteCtrlPrColor( pNode ); + WriteCtrlPr( pNode ); m_pSerializer->endElementNS( XML_m, XML_radPr ); } m_pSerializer->startElementNS(XML_m, XML_deg); @@ -318,7 +376,7 @@ void SmOoxmlExport::HandleRoot( const SmRootNode* pNode, int nLevel ) { m_pSerializer->startElementNS(XML_m, XML_radPr); m_pSerializer->singleElementNS(XML_m, XML_degHide, FSNS(XML_m, XML_val), "1"); - WriteCtrlPrColor( pNode ); + WriteCtrlPr( pNode ); m_pSerializer->endElementNS( XML_m, XML_radPr ); m_pSerializer->singleElementNS(XML_m, XML_deg); // empty but present } @@ -364,7 +422,7 @@ void SmOoxmlExport::HandleOperator( const SmOperNode* pNode, int nLevel ) m_pSerializer->singleElementNS(XML_m, XML_subHide, FSNS(XML_m, XML_val), "1"); if( subsup == nullptr || subsup->GetSubSup( CSUP ) == nullptr ) m_pSerializer->singleElementNS(XML_m, XML_supHide, FSNS(XML_m, XML_val), "1"); - WriteCtrlPrColor( pNode ); + WriteCtrlPr( pNode ); m_pSerializer->endElementNS( XML_m, XML_naryPr ); if( subsup == nullptr || subsup->GetSubSup( CSUB ) == nullptr ) m_pSerializer->singleElementNS(XML_m, XML_sub); @@ -588,7 +646,7 @@ void SmOoxmlExport::HandleBrace( const SmBraceNode* pNode, int nLevel ) m_pSerializer->singleElementNS( XML_m, XML_endChr, FSNS( XML_m, XML_val ), mathSymbolToString(pNode->ClosingBrace()) ); - WriteCtrlPrColor( pNode ); + WriteCtrlPr( pNode ); m_pSerializer->endElementNS( XML_m, XML_dPr ); if (subnodes.empty()) { @@ -627,7 +685,7 @@ void SmOoxmlExport::HandleVerticalBrace( const SmVerticalBraceNode* pNode, int n FSNS( XML_m, XML_val ), top ? "top" : "bot" ); m_pSerializer->singleElementNS(XML_m, XML_vertJc, FSNS(XML_m, XML_val), top ? "bot" : "top"); - WriteCtrlPrColor( pNode ); + WriteCtrlPr( pNode ); m_pSerializer->endElementNS( XML_m, XML_groupChrPr ); m_pSerializer->startElementNS(XML_m, XML_e); HandleNode( pNode->Body(), nLevel + 1 ); diff --git a/starmath/source/ooxmlexport.hxx b/starmath/source/ooxmlexport.hxx index 2d0b182e1b99..b810400ccf2e 100644 --- a/starmath/source/ooxmlexport.hxx +++ b/starmath/source/ooxmlexport.hxx @@ -37,8 +37,11 @@ private: void HandleBrace(const SmBraceNode* pNode, int nLevel) override; void HandleVerticalBrace(const SmVerticalBraceNode* pNode, int nLevel) override; void HandleBlank() override; - /// Writes the m:ctrlPr carrying the color of the parts a construct draws itself. - void WriteCtrlPrColor(const SmNode* pNode); + /// Writes the m:ctrlPr carrying the color, bold and italic of the parts a construct + /// draws itself. + void WriteCtrlPr(const SmNode* pNode); + /// True when the node has a color, bold or italic of its own to write in an m:ctrlPr. + bool HasCtrlPr(const SmNode* pNode) const; /// True when the color of the node is written out, which needs a color other than /// the default and a DOCX. bool HasOwnColor(const SmNode* pNode) const; diff --git a/starmath/source/ooxmlimport.cxx b/starmath/source/ooxmlimport.cxx index 4a294c7450e2..c496b910651c 100644 --- a/starmath/source/ooxmlimport.cxx +++ b/starmath/source/ooxmlimport.cxx @@ -23,6 +23,7 @@ #include #include #include +#include #include #include @@ -71,18 +72,58 @@ static OUString lcl_ApplyColorCommand( const OUString& rText, std::u16string_vie // A run holds whatever text the document put in it, which need not be an expression. A // run of operators is written as a literal, because that is an expression and it keeps -// the color. Anything else that does not parse keeps the color off, so that the formula -// reads as it did before the color was carried over at all. -static OUString lcl_ApplyRunColorCommand( SmParser5& rParser, const OUString& rText, - std::u16string_view sColorCommand, std::u16string_view sInEffect ) +// the command. Anything else that does not parse keeps the command off, so that the +// formula reads as it did before the command was carried over at all. +static OUString lcl_ApplyRunCommand( SmParser5& rParser, const OUString& rText, + std::u16string_view sCommand, std::u16string_view sInEffect ) { - if( sColorCommand.empty() || sColorCommand == sInEffect || rText.isEmpty()) + if( sCommand.empty() || sCommand == sInEffect || rText.isEmpty()) return rText; if( lcl_IsAllMathOperators( rText )) - return OUString::Concat( sColorCommand ) + " {\"" + rText + "\"}"; + return OUString::Concat( sCommand ) + " {\"" + rText + "\"}"; if( !lcl_ParsesAsExpression( rParser, rText )) return rText; - return OUString::Concat( sColorCommand ) + " {" + rText + "}"; + return OUString::Concat( sCommand ) + " {" + rText + "}"; +} + +static bool lcl_HasLetter( const OUString& rText ) +{ + for( sal_Int32 nIndex = 0; nIndex < rText.getLength(); ) + if( u_isalpha( rText.iterateCodePoints( &nIndex ))) + return true; + return false; +} + +static bool lcl_IsFunctionName( std::u16string_view sText ) +{ + const SmTokenTableEntry* pEntry = GetTokenTableEntry( OUString( o3tl::trim( sText ))); + return pEntry != nullptr && ( pEntry->nGroup & TG::Function ); +} + +// An m:sty value is p, b, i or bi, and italic when there is none. Word and StarMath both +// draw letters italic and a function name upright by default, so only a difference from +// that needs a command. A digit stays upright whatever the style says, because the +// Unicode math alphanumerics have no italic digits. +static OUString lcl_FontCommandFromOoxmlStyle( std::u16string_view sStyle, bool bHasLetter, + bool bFunctionName ) +{ + if( bFunctionName ) + { + if( sStyle == u"bi" ) + return u"bold ital"_ustr; + if( sStyle == u"b" ) + return u"bold"_ustr; + if( sStyle == u"i" ) + return u"ital"_ustr; + return OUString(); + } + if( sStyle == u"bi" ) + return u"bold"_ustr; + if( sStyle == u"b" ) + return bHasLetter ? u"bold nitalic"_ustr : u"bold"_ustr; + if( sStyle == u"p" && bHasLetter ) + return u"nitalic"_ustr; + return OUString(); } namespace @@ -562,7 +603,19 @@ OUString SmOoxmlImport::handleFunc() { //lim from{x rightarrow 1} x m_rStream.ensureOpeningTag( M_TOKEN( func )); + OUString sNameStyle; + if( m_rStream.checkOpeningTag( M_TOKEN( funcPr ))) + { + sNameStyle = readCtrlPrStyle(); + m_rStream.ensureClosingTag( M_TOKEN( funcPr )); + } + const bool bWasInFunctionName = m_bInFunctionName; + const OUString sPreviousNameStyle = m_sFunctionNameStyle; + m_bInFunctionName = true; + m_sFunctionNameStyle = sNameStyle; OUString fname = readOMathArgInElement( M_TOKEN( fName )); + m_bInFunctionName = bWasInFunctionName; + m_sFunctionNameStyle = sPreviousNameStyle; // fix the various functions if( fname.startsWith( "lim csub {" )) fname = OUString::Concat("lim from {") + fname.subView( 10 ); @@ -743,6 +796,33 @@ OUString SmOoxmlImport::readCtrlPrColorCommand() return sRet; } +OUString SmOoxmlImport::readCtrlPrStyle() +{ + bool bBold = false; + bool bItalic = false; + if( m_rStream.checkOpeningTag( M_TOKEN( ctrlPr ))) + { + if( m_rStream.checkOpeningTag( W_TOKEN( rPr ))) + { + if( XmlStream::Tag aBoldTag = m_rStream.checkOpeningTag( W_TOKEN( b ))) + { + bBold = aBoldTag.attribute( W_TOKEN( val ), true ); + m_rStream.ensureClosingTag( W_TOKEN( b )); + } + if( XmlStream::Tag aItalicTag = m_rStream.checkOpeningTag( W_TOKEN( i ))) + { + bItalic = aItalicTag.attribute( W_TOKEN( val ), true ); + m_rStream.ensureClosingTag( W_TOKEN( i )); + } + m_rStream.ensureClosingTag( W_TOKEN( rPr )); + } + m_rStream.ensureClosingTag( M_TOKEN( ctrlPr )); + } + if( bBold ) + return bItalic ? u"bi"_ustr : u"b"_ustr; + return bItalic ? u"i"_ustr : OUString(); +} + // NOT complete OUString SmOoxmlImport::handleR() { @@ -750,7 +830,10 @@ OUString SmOoxmlImport::handleR() bool normal = false; bool literal = false; OUString scrString; + OUString styString; OUString sColorCommand; + bool bTextBold = false; + bool bTextItalic = false; if( XmlStream::Tag rPr = m_rStream.checkOpeningTag( M_TOKEN( rPr ))) { if( XmlStream::Tag litTag = m_rStream.checkOpeningTag( M_TOKEN( lit ))) @@ -768,8 +851,17 @@ OUString SmOoxmlImport::handleR() scrString = srcTag.attribute( M_TOKEN( val ), scrString ); m_rStream.ensureClosingTag( M_TOKEN( scr )); } + if( XmlStream::Tag styTag = m_rStream.checkOpeningTag( M_TOKEN( sty ))) + { + styString = styTag.attribute( M_TOKEN( val ), styString ); + m_rStream.ensureClosingTag( M_TOKEN( sty )); + } m_rStream.ensureClosingTag( M_TOKEN( rPr )); } + // Word keeps the style of a whole function name in the m:ctrlPr of the function, + // and a run of the name with a style of its own overrides it + if( m_bInFunctionName && styString.isEmpty()) + styString = m_sFunctionNameStyle; OUStringBuffer text; bool isTagT = false; while( !m_rStream.atEnd() && m_rStream.currentToken() != CLOSING( m_rStream.currentToken())) @@ -777,10 +869,21 @@ OUString SmOoxmlImport::handleR() switch( m_rStream.currentToken()) { // A run has two property elements. The math one m:rPr is read above. - // This is the text one w:rPr and it holds the font color. + // This is the text one w:rPr and it holds the font color, and the bold + // and italic of a normal text run. case OPENING( W_TOKEN( rPr )): { m_rStream.ensureOpeningTag( W_TOKEN( rPr )); + if( XmlStream::Tag aBoldTag = m_rStream.checkOpeningTag( W_TOKEN( b ))) + { + bTextBold = aBoldTag.attribute( W_TOKEN( val ), true ); + m_rStream.ensureClosingTag( W_TOKEN( b )); + } + if( XmlStream::Tag aItalicTag = m_rStream.checkOpeningTag( W_TOKEN( i ))) + { + bTextItalic = aItalicTag.attribute( W_TOKEN( val ), true ); + m_rStream.ensureClosingTag( W_TOKEN( i )); + } if( XmlStream::Tag aColorTag = m_rStream.checkOpeningTag( W_TOKEN( color ))) { sColorCommand @@ -811,12 +914,28 @@ OUString SmOoxmlImport::handleR() } } m_rStream.ensureClosingTag( M_TOKEN( r )); + const OUString sText = text.makeStringAndClear(); + OUString sFontCommand; + if( normal ) + { + if( bTextBold ) + sFontCommand = u"bold"_ustr; + if( bTextItalic ) + sFontCommand += sFontCommand.isEmpty() ? u"ital"_ustr : u" ital"_ustr; + } + else + sFontCommand = lcl_FontCommandFromOoxmlStyle( styString, lcl_HasLetter( sText ), + m_bInFunctionName || lcl_IsFunctionName( sText )); + // Bold or italic shows nothing on a run of spaces + if( o3tl::trim( sText ).empty()) + sFontCommand.clear(); OUString sRet; if (scrString.isEmpty() && (normal || literal || isTagT)) - sRet = encloseOrEscapeLiteral(text.makeStringAndClear(), normal || literal); + sRet = encloseOrEscapeLiteral(sText, normal || literal); else - sRet = text.makeStringAndClear(); - return lcl_ApplyRunColorCommand( getParser(), sRet, sColorCommand, m_sColorCommandInEffect ); + sRet = sText; + sRet = lcl_ApplyRunCommand( getParser(), sRet, sFontCommand, std::u16string_view()); + return lcl_ApplyRunCommand( getParser(), sRet, sColorCommand, m_sColorCommandInEffect ); } OUString SmOoxmlImport::handleSetString(const OUString& setOUstring) diff --git a/starmath/source/ooxmlimport.hxx b/starmath/source/ooxmlimport.hxx index 9c1e64ab5391..f435e3945309 100644 --- a/starmath/source/ooxmlimport.hxx +++ b/starmath/source/ooxmlimport.hxx @@ -49,6 +49,7 @@ private: OUString handleSsubsup(); OUString handleSsup(); OUString readCtrlPrColorCommand(); + OUString readCtrlPrStyle(); OUString readOMathArg( int stoptoken ); OUString readOMathArgInElement( int token ); static OUString handleSetString(const OUString& setOUstring); @@ -57,6 +58,9 @@ private: // The color command that applies to the part of the formula being read now, or // an empty string for the default color. OUString m_sColorCommandInEffect; + // Set while the name of a function is read + bool m_bInFunctionName = false; + OUString m_sFunctionNameStyle; // Built on first use, because constructing one creates a character classification // service, and most formulas never need it. std::unique_ptr m_pParser; diff --git a/sw/qa/extras/ooxmlexport/data/math-bold-italic-export.fodt b/sw/qa/extras/ooxmlexport/data/math-bold-italic-export.fodt new file mode 100644 index 000000000000..407e8eb2e3e7 --- /dev/null +++ b/sw/qa/extras/ooxmlexport/data/math-bold-italic-export.fodt @@ -0,0 +1,515 @@ + + + + 2026-09-24T13:47:32.5759128002026-09-24T13:51:10.070572400PT3M38S1Collabora_Office/26.04.0.20260912$Windows_X86_64 LibreOffice_project/1fa6e37bdca82adca9e05363c9a53ecbd6deb354 + + + 2 + 0 + 17591 + 12628 + true + false + + + view2 + 4198 + 2501 + 0 + 2 + 17590 + 12628 + 0 + 1 + false + 250 + false + false + 1272,31,1728,1360;1;,,,; + false + false + false + false + false + + + + + false + + + + 1 + true + false + true + false + true + true + + + true + false + false + 0 + true + false + true + false + false + 0 + false + true + false + false + false + high-resolution + false + false + true + false + false + false + false + false + true + false + true + true + false + + false + false + false + true + false + true + false + 1535549 + 1535549 + false + false + false + false + false + true + false + true + true + false + false + false + false + false + true + true + true + true + false + false + false + false + false + false + true + false + false + false + false + false + false + false + false + false + true + 0 + true + false + false + true + false + false + false + false + false + false + false + false + false + true + false + false + 0 + true + true + true + true + false + true + false + false + true + false + false + true + + false + true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Test cases + + + + + + + a + b + + + bold {a over b} + + + + VkNMTVRGAQAxAAAAAAAAAAEAGwAAAAkAAAAAAAAAAAABAAAAAQAAAAEAAAABAAAAAboAAAA5 + AgAAHwAAAJYAAQACAAAACQCLAAEAAgAAAP//gQABABAAAAAAAAAAAAAAALkAAAA4AgAAiwAB + AAIAAAAAGJUAAQAEAAAAAAAAAJYAAQACAAAACQCLAAEAAgAAAB8AigABAEgAAAAFAEIAAAAQ + AExpYmVyYXRpb24gU2VyaWYAAAAAAADwAAAAAAAAAAAACAAAAAAAAgD/AwAAAAAAAAABAP8D + AAAAAAAAAAAAAACIAAEAAgAAAAEAhwABAAUAAAD/////AIYAAQAEAAAAAAAAAHIAAgAXAAAA + IgAAANcAAAABAGF4AAAAAAABAAEAYQCMAAEAAAAAAIsAAQACAAAAHwCFAAEABQAAAAAAAAAB + hAABAAUAAAAAAAAAAIoAAQBCAAAABQA8AAAACgBPcGVuU3ltYm9sAAAAAAAA8AAAAP//AAAA + AAUAAAAAAAAA/wMAAAAAAAAAAQD/AwAAAAAAAAAAAAAAiAABAAIAAAABAIcAAQAFAAAA//// + /wCGAAEABAAAAAAAAABnAAEAEAAAAAwAAAAXAQAArQAAACIBAACMAAEAAAAAAIsAAQACAAAA + HwCKAAEASAAAAAUAQgAAABAATGliZXJhdGlvbiBTZXJpZgAAAAAAAPAAAAAAAAAAAAAIAAAA + AAACAP8DAAAAAAAAAAEA/wMAAAAAAAAAAAAAAIgAAQACAAAAAQCHAAEABQAAAP////8AhgAB + AAQAAAAAAAAAcgACABcAAAAiAAAABQIAAAEAYngAAAAAAAEAAQBiAIwAAQAAAAAAjAABAAAA + AACMAAEAAAAAAA== + + + + + + + + + + 2 + + + ital sqrt {2} + + + + VkNMTVRGAQAxAAAAAAAAAAEAGwAAAAkAAAAAAAAAAAABAAAAAQAAAAEAAAABAAAAASABAAAg + AQAAHwAAAJYAAQACAAAACQCLAAEAAgAAAP//gQABABAAAAAAAAAAAAAAAB8BAAAfAQAAiwAB + AAIAAAAAGJUAAQAEAAAAAAAAAJYAAQACAAAACQCLAAEAAgAAAB8AigABAEIAAAAFADwAAAAK + AE9wZW5TeW1ib2wAAKkAAAAlAQAA//8AAAAABQAAAAAAAAD/AwAAAAAAAAABAP8DAAAAAADv + AAAAAACIAAEAAgAAAAEAhwABAAUAAAD/////AIYAAQAEAAAAAAAAAHIAAgAaAAAABAAAAPkA + AAABAAAAGiKAAAAAAAABAAEAGiKMAAEAAAAAAIsAAQACAAAAHwCFAAEABQAAAAAAAAABhAAB + AAUAAAAAAAAAAIoAAQBCAAAABQA8AAAACgBPcGVuU3ltYm9sAACpAAAAJQEAAP//AAAAAAUA + AAAAAAAA/wMAAAAAAAAAAQD/AwAAAAAA7wAAAAAAiAABAAIAAAABAIcAAQAFAAAA/////wCG + AAEABAAAAAAAAABnAAEAEAAAAIQAAAANAAAAGwEAABQAAACMAAEAAAAAAIsAAQACAAAAHwCK + AAEASAAAAAUAQgAAABAATGliZXJhdGlvbiBTZXJpZgAAAAAAAPAAAAAAAAAAAAAFAAAAAAAC + AP8DAAAAAAAAAAEA/wMAAAAAAAAAAAAAAIgAAQACAAAAAQCHAAEABQAAAP////8AhgABAAQA + AAAAAAAAcgACABcAAACfAAAA7AAAAAEAMngAAAAAAAEAAQAyAIwAAQAAAAAAjAABAAAAAACM + AAEAAAAAAA== + + + + + + + + + + + ∑ + + i + = + 1 + + n + + i + + + bold sum from {i=1} to n i + + + + VkNMTVRGAQAxAAAAAAAAAAEAGwAAAAkAAAAAAAAAAAABAAAAAQAAAAEAAAABAAAAAZkBAACL + AgAAMgAAAJYAAQACAAAACQCLAAEAAgAAAP//gQABABAAAAAAAAAAAAAAAJgBAACKAgAAiwAB + AAIAAAAAGJUAAQAEAAAAAAAAAJYAAQACAAAACQCLAAEAAgAAAB8AigABAEIAAAAFADwAAAAK + AE9wZW5TeW1ib2wAAAAAAABeAQAA//8AAAAACAAAAAAAAAD/AwAAAAAAAAABAP8DAAAAAAAA + AAAAAACIAAEAAgAAAAEAhwABAAUAAAD/////AIYAAQAEAAAAAAAAAHIAAgAaAAAAAAAAALYB + AAABAAAAESIVAQAAAAABAAEAESKMAAEAAAAAAIsAAQACAAAAHwCKAAEASAAAAAUAQgAAABAA + TGliZXJhdGlvbiBTZXJpZgAAAAAAAJAAAAAAAAAAAAAIAAAAAAACAP8DAAAAAAAAAAEA/wMA + AAAAAAAAAAAAAIgAAQACAAAAAQCHAAEABQAAAP////8AhgABAAQAAAAAAAAAcgACABcAAAAV + AAAAawIAAAEAaSgAAAAAAAEAAQBpAIwAAQAAAAAAiwABAAIAAAAfAIoAAQBCAAAABQA8AAAA + CgBPcGVuU3ltYm9sAAAAAAAAkAAAAP//AAAAAAgAAAAAAAAA/wMAAAAAAAAAAQD/AwAAAAAA + AAAAAAAAiAABAAIAAAABAIcAAQAFAAAA/////wCGAAEABAAAAAAAAAByAAIAGgAAAEgAAABr + AgAAAQAAAD0AcgAAAAAAAQABAD0AjAABAAAAAACLAAEAAgAAAB8AigABAEgAAAAFAEIAAAAQ + AExpYmVyYXRpb24gU2VyaWYAAAAAAACQAAAAAAAAAAAACAAAAAAAAAD/AwAAAAAAAAABAP8D + AAAAAAAAAAAAAACIAAEAAgAAAAEAhwABAAUAAAD/////AIYAAQAEAAAAAAAAAHIAAgAXAAAA + vgAAAGsCAAABADFIAAAAAAABAAEAMQCMAAEAAAAAAIsAAQACAAAAHwCKAAEASAAAAAUAQgAA + ABAATGliZXJhdGlvbiBTZXJpZgAAAAAAAJAAAAAAAAAAAAAIAAAAAAACAP8DAAAAAAAAAAEA + /wMAAAAAAAAAAAAAAIgAAQACAAAAAQCHAAEABQAAAP////8AhgABAAQAAAAAAAAAcgACABcA + AABlAAAAgQAAAAEAblAAAAAAAAEAAQBuAIwAAQAAAAAAiwABAAIAAAAfAIoAAQBIAAAABQBC + AAAAEABMaWJlcmF0aW9uIFNlcmlmAAAAAAAA8AAAAAAAAAAAAAgAAAAAAAIA/wMAAAAAAAAA + AQD/AwAAAAAAAAAAAAAAiAABAAIAAAABAIcAAQAFAAAA/////wCGAAEABAAAAAAAAAByAAIA + FwAAAEkBAACWAQAAAQBpQwAAAAAAAQABAGkAjAABAAAAAACMAAEAAAAAAIwAAQAAAAAA + + + + + + + + + + + a + b + + + + color red bold {a over b} + + + + VkNMTVRGAQAxAAAAAAAAAAEAGwAAAAkAAAAAAAAAAAABAAAAAQAAAAEAAAABAAAAAboAAAA5 + AgAAIgAAAJYAAQACAAAACQCLAAEAAgAAAP//gQABABAAAAAAAAAAAAAAALkAAAA4AgAAiwAB + AAIAAAAAGJUAAQAEAAAAAAAAAJYAAQACAAAACQCLAAEAAgAAAB8AigABAEgAAAAFAEIAAAAQ + AExpYmVyYXRpb24gU2VyaWYAAAAAAADwAAAAAAAAAAAACAAAAAAAAgD/AwAAAAAAAAABAP8D + AAAAAAAAAAAAAACIAAEAAgAAAAEAhwABAAUAAAD/////AIYAAQAEAAAAAAD/AIYAAQAEAAAA + AAD/AHIAAgAXAAAAIgAAANcAAAABAGF4AAAAAAABAAEAYQCMAAEAAAAAAIsAAQACAAAAHwCF + AAEABQAAAAAA/wABhAABAAUAAAAAAAAAAIoAAQBCAAAABQA8AAAACgBPcGVuU3ltYm9sAAAA + AAAA8AAAAP//AAAAAAUAAAAAAAAA/wMAAAAAAAAAAQD/AwAAAAAAAAAAAAAAiAABAAIAAAAB + AIcAAQAFAAAA/////wCGAAEABAAAAAAA/wCGAAEABAAAAAAA/wBnAAEAEAAAAAwAAAAXAQAA + rQAAACIBAACMAAEAAAAAAIsAAQACAAAAHwCKAAEASAAAAAUAQgAAABAATGliZXJhdGlvbiBT + ZXJpZgAAAAAAAPAAAAAAAAAAAAAIAAAAAAACAP8DAAAAAAAAAAEA/wMAAAAAAAAAAAAAAIgA + AQACAAAAAQCHAAEABQAAAP////8AhgABAAQAAAAAAP8AhgABAAQAAAAAAP8AcgACABcAAAAi + AAAABQIAAAEAYngAAAAAAAEAAQBiAIwAAQAAAAAAjAABAAAAAACMAAEAAAAAAA== + + + + + + + + + abc + + bold "abc" + + + + VkNMTVRGAQAxAAAAAAAAAAEAGwAAAAkAAAAAAAAAAAABAAAAAQAAAAEAAAABAAAAAXUBAAAL + AQAADwAAAJYAAQACAAAACQCLAAEAAgAAAP//gQABABAAAAAAAAAAAAAAAHQBAAAKAQAAiwAB + AAIAAAAAGJUAAQAEAAAAAAAAAJYAAQACAAAACQCLAAEAAgAAAB8AigABAEgAAAAFAEIAAAAQ + AExpYmVyYXRpb24gU2VyaWYAAAAAAADwAAAAAAAAAAAACAAAAAAAAAD/AwAAAAAAAAABAP8D + AAAAAAAAAAAAAACIAAEAAgAAAAEAhwABAAUAAAD/////AIYAAQAEAAAAAAAAAHIAAgAdAAAA + BQAAANcAAAADAGFiY2gBAAAAAAMAAwBhAGIAYwCMAAEAAAAAAIwAAQAAAAAAjAABAAAAAAA= + + + + + + + + + abc + + ital "abc" + + + + VkNMTVRGAQAxAAAAAAAAAAEAGwAAAAkAAAAAAAAAAAABAAAAAQAAAAEAAAABAAAAAWoBAAAL + AQAADwAAAJYAAQACAAAACQCLAAEAAgAAAP//gQABABAAAAAAAAAAAAAAAGkBAAAKAQAAiwAB + AAIAAAAAGJUAAQAEAAAAAAAAAJYAAQACAAAACQCLAAEAAgAAAB8AigABAEgAAAAFAEIAAAAQ + AExpYmVyYXRpb24gU2VyaWYAAAAAAADwAAAAAAAAAAAABQAAAAAAAgD/AwAAAAAAAAABAP8D + AAAAAAAAAAAAAACIAAEAAgAAAAEAhwABAAUAAAD/////AIYAAQAEAAAAAAAAAHIAAgAdAAAA + BQAAANcAAAADAGFiY1sBAAAAAAMAAwBhAGIAYwCMAAEAAAAAAIwAAQAAAAAAjAABAAAAAAA= + + + + + + + + + x + + nitalic x + + + + VkNMTVRGAQAxAAAAAAAAAAEAGwAAAAkAAAAAAAAAAAABAAAAAQAAAAEAAAABAAAAAY0AAAAL + AQAADwAAAJYAAQACAAAACQCLAAEAAgAAAP//gQABABAAAAAAAAAAAAAAAIwAAAAKAQAAiwAB + AAIAAAAAGJUAAQAEAAAAAAAAAJYAAQACAAAACQCLAAEAAgAAAB8AigABAEgAAAAFAEIAAAAQ + AExpYmVyYXRpb24gU2VyaWYAAAAAAADwAAAAAAAAAAAABQAAAAAAAAD/AwAAAAAAAAABAP8D + AAAAAAAAAAAAAACIAAEAAgAAAAEAhwABAAUAAAD/////AIYAAQAEAAAAAAAAAHIAAgAXAAAA + CgAAANcAAAABAHh4AAAAAAABAAEAeACMAAEAAAAAAIwAAQAAAAAAjAABAAAAAAA= + + + + + + diff --git a/sw/qa/extras/ooxmlexport/data/math-bold-italic.docx b/sw/qa/extras/ooxmlexport/data/math-bold-italic.docx new file mode 100644 index 0000000000000000000000000000000000000000..adde77b7ded5abc3122b5d601eba7b2cdbbf9509 GIT binary patch literal 13545 zcmeHu1y>zOxAwu^-GjRacXtiJ-R0m8K@!~E3GNQToe(UzySuyF$ILr(XD0Km?+@JD zYn{DLSNF5Ks(M%Lr*`dDlmP=r2S5U#0RR9oU^Q<7s0ji9yn_G$&;Zb&S|YYKP9`=^ zdMfUACXPA`Zq~qeIpCmFSpd+t`~UCwU)%$=@q;$snUKY96CRLa8a^8C<&@BXhVduT zEAK;LdxEMy$M&_pw4;G4eFTYt1(J}n-mb8!_WF%4qyk}3>RibWvG@`{$LU&d(9X|p z(fb(VP^`x@tq2XU`vTv$w&BRKgD{cSb;k~WfK^D(P4~l4zXL?lBt)r_c|@=h`afZ^ zuHCk+fF-Sv+fggjLE$0lW}(8x)y%Sa*+`OL8_zpVs+%Rq`s>%Cha7y`pURB?l%yE# zu;}MVa2AP+Es(6J772CaMC9~diMGF&q`=jnIIQxMine=GRUV!EBL3Rd$9(eIhXs03 zMv$11rPQ2q_3Y)0S1PE22#{7@vCTySBU_ z)iO+sIas#)&FIeDLV9T4i2W6aMee3R?@A@Ge8gf6z`Q@{qmw2%V>SwPZJi}Z(7&_z zXnh9;0KC3}0Tll+Bne}18&2QsO#W@e!MzPhJqHt@BO}9a^8be7|KjoYx2BiHc3E~a z!3&=HJ^PKfDJ^ti=gKo0jV)r&LqTgv$)YXJSg*dx3{FhOjd?hxi#xBy z>zv^xenbdugPFP4?bdp1bps>>wB|Fr&Dd?gr|sOBKK~?@qW!XF)$Z65IzpFkj_KdyBe|OoOXSUamC6DDC~uwOYU^OkXl!fbZ2ji9 zesfqy+H$eE?C2|nG_LRHY6hH)!hNKcs2djL<)&pzXyfn&A?H;gkYhv_zkW>oHVk2! z^1StKfMAC#1{@oHE`r%^6l`9U0n6*uqW6CK@F|qP`*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!ktw-wIpTb_Z?jtGIfc{KlqvvFnGYfEIyIQMs@koHio?FvF{+jRjx zre(lP$D1kr+t?IeQb0eyO$+;P28Z&t4g0qDs_0;A=g4Se>+rj+y`@L~-`?w6*ZIfF z{FbR3c$?r6)c^QHswf9F;9Xs?O{hxoRrX0ZpRbIeRz0y@dPY80X`G-rP2S1Q+pszp z80meiIdjQENHX-#c_&H;O@o6~isF%?@T|3kBLhzQ7NZn~Vlq$H(=$=YSFv=PQ2tzx zAHFO3Jx?WKY(X=@5V(gcZ3tS3T+tNYOg5A65rC16R|AS4Wbj3%${$6>4&myfgs22r zE`hSO^Ed#zM^O;wJ1#y13cnTo-h?*3Id?}qc>@##R(_#r;R@agOlb*hi4dvtqr{!p z&D|33^lr{gDCkdC@ehO6Ant*q*(uNHzF_k>QtCM9y9Rx_cqZpWU!fhRomhK;KEOfX(R~f!wLsTN zB|xxA0^8v-nwaVRuxo86kfNYO7-YW@6hb6+$tmA$fE!43?cH|ITE)w7#%RCS$Ke=THXcGRBkpzFKb;iZg*g1`5ET*=!?3KyH# zr`?GEnMjiWS1uVJnA%h_fyyD@UT==ZLmkQ*cnVW4%ytfDu)@l)I^iRg5cjqHPMeVT z+@7lXTAXYPX*n;2CP`Bt3^rfpdwjDPKM(1retlZY@K2CsNcyK=LZ9MOAE0L5)1Um#n z#S|s*w{4$7z&XleYNU8zv=bD1)#LsaP5p%jedG?pJ zf`HP$5v~9JO~`-V&0q4rd?BJJ^G^l;%wYcu3IN2tWzhUBpZ!JRWQboy5fzY@E@GzifAq2V7i?^pakef3{x0HBNx r0Qi^Z{uTbuDf91eW5&P1|Cm4(Wgy xParagraph(getParagraph(2), uno::UNO_QUERY); + uno::Reference xRuns = xParagraph->createEnumeration(); + uno::Reference xFormulaRun; + while (!xFormulaRun && xRuns->hasMoreElements()) + { + uno::Reference xRun(xRuns->nextElement(), uno::UNO_QUERY); + if (getProperty(xRun, u"TextPortionType"_ustr) == "Frame") + xFormulaRun = xRun; + } + CPPUNIT_ASSERT(xFormulaRun.is()); + CHECK_FORMULA(u"color red {\" \"} {xBI} over {2B}"_ustr, getFormula(xFormulaRun)); + + CHECK_FORMULA(u"f left (bold {x} right ) = {a} rsub {bold {0}} + sum from {n=1} to " + u"{\u221E} {left ({bold {a}} rsub {bold {n}} cos {{bold {n\u03C0x}} over " + u"{L}} + {b} rsub {n} bold {sin} {{n\u03C0x} over {L}} right )}"_ustr, + getFormula(getRun(getParagraph(3), 1))); + CHECK_FORMULA(u"{bold nitalic {e}} ^ {x} =1+ {nitalic {x}} over {1!} + {{color hex EE0000 " + u"{bold {x}}} ^ {2}} over {2!} + {{x} ^ {3}} over {3!} +\u2026, \" \"\" \" " + u"-\u221E0"_ustr, + getFormula(getRun(getParagraph(8), 1))); + + saveAndReload(TestFilter::DOCX); + xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr); + + assertXPath(pXmlDoc, "//w:p[1]//m:f/m:num/m:r/m:rPr/m:sty", "val", u"bi"); + assertXPath(pXmlDoc, "//w:p[1]//m:f/m:den/m:r/m:rPr", 0); + assertXPath(pXmlDoc, "//w:p[1]//m:f/m:fPr", 0); + assertXPath(pXmlDoc, "//w:p[2]//m:oMath/m:r[1]/w:rPr/w:b", 0); + assertXPath(pXmlDoc, "(//w:p[3]//m:sSub)[1]/m:sub/m:r/m:rPr/m:sty", "val", u"b"); + assertXPath(pXmlDoc, "(//w:p[3]//m:f)[1]/m:num/m:r/m:rPr/m:sty", "val", u"bi"); + assertXPath(pXmlDoc, "(//w:p[3]//m:f)[2]/m:num/m:r/m:rPr", 0); + assertXPath(pXmlDoc, "//w:p[3]//m:r[m:t='cos']/m:rPr/m:sty", "val", u"p"); + assertXPath(pXmlDoc, "//w:p[3]//m:r[m:t='sin']/m:rPr/m:sty", "val", u"b"); + assertXPath(pXmlDoc, "//w:p[5]//m:r[m:t='e']/m:rPr/m:sty", "val", u"b"); + assertXPath(pXmlDoc, "//w:p[5]//m:r[m:rPr/m:sty/@m:val='p']", 1); + assertXPathContent(pXmlDoc, "//w:p[5]//m:r[m:rPr/m:sty/@m:val='p']/m:t", u"x"); + assertXPath(pXmlDoc, "//w:p[5]//m:r[w:rPr/w:color]/m:rPr/m:sty", "val", u"bi"); + assertXPath(pXmlDoc, "//w:p[5]//m:r[w:rPr/w:color]/w:rPr/w:color", "val", u"EE0000"); + assertXPath(pXmlDoc, "(//w:p[6]//m:r[m:t='cos'])[2]/m:rPr/m:sty", "val", u"b"); + assertXPath(pXmlDoc, "(//w:p[6]//m:r[m:t='cos'])[3]/m:rPr/m:sty", "val", u"bi"); + assertXPath(pXmlDoc, "//w:p[8]//m:r[m:t='sin']/m:rPr/m:sty", "val", u"i"); + assertXPath(pXmlDoc, "//w:p[8]//m:r[m:t='if']/m:rPr/m:nor", 1); + assertXPath(pXmlDoc, "//w:p[8]//m:r[m:t='if']/m:rPr/m:sty", 0); + assertXPath(pXmlDoc, "//w:p[8]//m:r[m:t='if']/w:rPr/w:b", 1); +} + +CPPUNIT_TEST_FIXTURE(Test, testMathBoldItalicCtrlPr) +{ + createSwDoc("math-bold-italic-export.fodt"); + save(TestFilter::DOCX); + xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr); + + // A bold or ital command around a construct reaches the part that it draws itself + assertXPath(pXmlDoc, "(//m:oMath)[1]/m:f/m:fPr/m:ctrlPr/w:rPr/w:b", 1); + assertXPath(pXmlDoc, "(//m:oMath)[1]/m:f/m:fPr/m:ctrlPr/w:rPr/w:i", 0); + assertXPath(pXmlDoc, "(//m:oMath)[2]/m:rad/m:radPr/m:ctrlPr/w:rPr/w:i", 1); + assertXPath(pXmlDoc, "(//m:oMath)[3]/m:nary/m:naryPr/m:ctrlPr/w:rPr/w:b", 1); + assertXPath(pXmlDoc, "(//m:oMath)[4]/m:f/m:fPr/m:ctrlPr/w:rPr/w:b", 1); + assertXPath(pXmlDoc, "(//m:oMath)[4]/m:f/m:fPr/m:ctrlPr/w:rPr/w:color", "val", u"FF0000"); + assertXPath(pXmlDoc, "(//m:oMath)[5]/m:r/w:rPr/w:b", 1); + assertXPath(pXmlDoc, "(//m:oMath)[6]/m:r/w:rPr/w:i", 1); + assertXPath(pXmlDoc, "(//m:oMath)[7]/m:r/m:rPr/m:sty", "val", u"p"); +} + DECLARE_OOXMLEXPORT_TEST(testMathD, "math-d.docx") { CHECK_FORMULA( u"left (x mline y mline z right )"_ustr, getFormula( getRun( getParagraph( 1 ), 1 ))); diff --git a/sw/qa/extras/ooxmlimport/ooxmlimport2.cxx b/sw/qa/extras/ooxmlimport/ooxmlimport2.cxx index 5714e3a33307..cc94561f6931 100644 --- a/sw/qa/extras/ooxmlimport/ooxmlimport2.cxx +++ b/sw/qa/extras/ooxmlimport/ooxmlimport2.cxx @@ -772,9 +772,9 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf169843_set_letter_formula) createSwDoc("tdf169843.docx"); // Without the fix in place, this test would have failed with - // - Expected: " " setR " " - // - Actual : " "R " " - CPPUNIT_ASSERT_EQUAL(u"\" \" setR \" \""_ustr, getFormula(getRun(getParagraph(1), 1))); + // - Expected: bold {" " setR } " " + // - Actual : bold { R} " " + CPPUNIT_ASSERT_EQUAL(u"bold {\" \" setR } \" \""_ustr, getFormula(getRun(getParagraph(1), 1))); } CPPUNIT_TEST_FIXTURE(Test, testTdf119200) From 51744f626560573f6c305c6a0b7585aa523be26d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= Date: Sun, 27 Sep 2026 15:10:23 +0000 Subject: [PATCH 046/289] don't load the document Basic to parse formula names during ODF import MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit While macros are not yet allowed, a called name is kept as a macro call if the document has Basic libraries at all. A cell macro call now decides the macro mode before it loads the document Basic. Signed-off-by: Caolán McNamara Change-Id: I2f33b51490db8515cd74d5e753bb9a18c5e6a587 Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/13626 Reviewed-by: Noel Grandin (cherry picked from commit d17fd31994d71c28f503bb3cc93471c307756627) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211523 Tested-by: Jenkins Reviewed-by: Xisco Fauli --- include/sfx2/objsh.hxx | 3 ++ sc/inc/compiler.hxx | 2 +- sc/source/core/tool/callable.cxx | 9 +++- sc/source/core/tool/compiler.cxx | 77 ++++++++++++++++++++++---------- sfx2/source/doc/objmisc.cxx | 5 +++ 5 files changed, 69 insertions(+), 27 deletions(-) diff --git a/include/sfx2/objsh.hxx b/include/sfx2/objsh.hxx index c4c2af98e45a..1418162ec6b6 100644 --- a/include/sfx2/objsh.hxx +++ b/include/sfx2/objsh.hxx @@ -438,6 +438,9 @@ public: */ bool AdjustMacroMode(); + /// whether macros from this document are already allowed to run, without asking + bool IsMacroExecutionAllowed() const; + static bool UnTrustedScript(const OUString& rScriptURL); /// Check if script URL whitelist exists, and if so, if current script url is part of it diff --git a/sc/inc/compiler.hxx b/sc/inc/compiler.hxx index 28addd72f2f4..1cb95085c8e1 100644 --- a/sc/inc/compiler.hxx +++ b/sc/inc/compiler.hxx @@ -362,7 +362,7 @@ private: bool ParseDoubleReference( const OUString& rSymbol, const OUString* pErrRef = nullptr ); bool ParsePredetectedReference( const OUString& rSymbol ); bool ParsePredetectedErrRefReference( const OUString& rName, const OUString* pErrRef ); - bool ParseMacro( const OUString& ); + bool ParseMacro( const OUString&, bool bParenFollows ); bool ParseNamedRange( const OUString&, bool onlyCheck = false ); bool ParseLocalName( const OUString& ); bool ParseExternalNamedRange( const OUString& rSymbol, bool& rbInvalidExternalNameRange ); diff --git a/sc/source/core/tool/callable.cxx b/sc/source/core/tool/callable.cxx index fabb939c705e..2206f5315563 100644 --- a/sc/source/core/tool/callable.cxx +++ b/sc/source/core/tool/callable.cxx @@ -62,8 +62,13 @@ ScMacroFunction::ScMacroFunction(const ScInterpreter& rInterpreter, const OUStri return; } - // The macro security prompt is not raised here. CallBasic checks it when - // the macro actually runs. + // The macro mode is decided before the document's Basic is loaded. + if (!mpDocShell->AdjustMacroMode()) + { + mbInvalid = true; + mnError = FormulaError::NoMacro; + return; + } // Find the Basic method by name, then keep the library and macro name // strings that CallBasic needs to invoke it. diff --git a/sc/source/core/tool/compiler.cxx b/sc/source/core/tool/compiler.cxx index 70f6f64c07a8..122df86ff9aa 100644 --- a/sc/source/core/tool/compiler.cxx +++ b/sc/source/core/tool/compiler.cxx @@ -25,6 +25,7 @@ #include #include #include +#include #include #include #include @@ -3753,10 +3754,30 @@ bool ScCompiler::ParseReference( const OUString& rName, const OUString* pErrRef return false; } -bool ScCompiler::ParseMacro( const OUString& rName ) +#if HAVE_FEATURE_SCRIPTING +static bool lcl_IsBasicFunction( StarBASIC& rBasic, const OUString& rName ) +{ + SbxMethod* pMeth = static_cast(rBasic.Find( rName, SbxClassType::Method )); + if( !pMeth ) + { + return false; + } + // It really should be a BASIC function! + if( pMeth->GetType() == SbxVOID + || ( pMeth->IsFixed() && pMeth->GetType() == SbxEMPTY ) + || dynamic_cast( pMeth) == nullptr ) + { + return false; + } + return true; +} +#endif + +bool ScCompiler::ParseMacro( const OUString& rName, bool bParenFollows ) { #if !HAVE_FEATURE_SCRIPTING (void) rName; + (void) bParenFollows; return false; #else @@ -3780,9 +3801,36 @@ bool ScCompiler::ParseMacro( const OUString& rName ) } OUString aName( rName); + // ODFF recommends to store user-defined functions prefixed with "USER.", + // use only unprefixed name if encountered. BASIC doesn't allow '.' in a + // function name so a function "USER.FOO" could not exist, and macro check + // is assigned the lowest priority in function name check. + if (FormulaGrammar::isODFF( GetGrammar()) && aName.startsWithIgnoreAsciiCase("USER.")) + aName = aName.copy(5); + StarBASIC* pObj = nullptr; ScDocShell* pDocSh = rDoc.GetDocumentShell(); + // During ODF import the Basic of a document whose macros are not allowed yet stays unloaded. + // A called name that is not an application Basic function may be one of the document's own + // macros only if the document has Basic libraries. Such a call is kept as a macro call, and the + // document is flagged as calling macros. + if (pDocSh && rDoc.IsImportingXML() && !pDocSh->IsMacroExecutionAllowed()) + { + if (!bParenFollows) + return false; + StarBASIC* pAppBasic = SfxApplication::GetBasic(); + if (!pAppBasic || !lcl_IsBasicFunction(*pAppBasic, aName)) + { + if (!sfx2::DocumentMacroMode::containerHasBasicMacros(pDocSh->GetBasicContainer())) + return false; + pDocSh->SetMacroCallsSeenWhileLoading(); + } + maRawToken.SetExternal( aName ); + maRawToken.eOp = ocMacro; + return true; + } + try { if( pDocSh )//XXX @@ -3795,28 +3843,9 @@ bool ScCompiler::ParseMacro( const OUString& rName ) return false; } - if (!pObj) + if (!pObj || !lcl_IsBasicFunction(*pObj, aName)) return false; - // ODFF recommends to store user-defined functions prefixed with "USER.", - // use only unprefixed name if encountered. BASIC doesn't allow '.' in a - // function name so a function "USER.FOO" could not exist, and macro check - // is assigned the lowest priority in function name check. - if (FormulaGrammar::isODFF( GetGrammar()) && aName.startsWithIgnoreAsciiCase("USER.")) - aName = aName.copy(5); - - SbxMethod* pMeth = static_cast(pObj->Find( aName, SbxClassType::Method )); - if( !pMeth ) - { - return false; - } - // It really should be a BASIC function! - if( pMeth->GetType() == SbxVOID - || ( pMeth->IsFixed() && pMeth->GetType() == SbxEMPTY ) - || dynamic_cast( pMeth) == nullptr ) - { - return false; - } maRawToken.SetExternal( aName ); maRawToken.eOp = ocMacro; return true; @@ -4960,7 +4989,7 @@ Label_Rewind: if (!bParenFollows && ParseColRowName( aUpper )) return true; - if (ParseMacro( aUpper )) + if (ParseMacro( aUpper, bParenFollows )) return true; if (ParseOpCode( aUpper, bInArray )) @@ -5047,7 +5076,7 @@ Label_Rewind: // the same user-defined function, so in the call position the macro // takes priority over a same-named defined name. A plain name // reference still resolves as the named range. - if (bMayBeName && bParenFollows && ParseMacro(aUpper)) + if (bMayBeName && bParenFollows && ParseMacro(aUpper, bParenFollows)) return true; if (ParseNamedRange( aUpper )) @@ -5084,7 +5113,7 @@ Label_Rewind: if (bMayBeName) { - if (ParseMacro( aUpper )) + if (ParseMacro( aUpper, bParenFollows )) return true; if (ParseLocalName( aOrg )) diff --git a/sfx2/source/doc/objmisc.cxx b/sfx2/source/doc/objmisc.cxx index 706918d42384..8659ecbd0b10 100644 --- a/sfx2/source/doc/objmisc.cxx +++ b/sfx2/source/doc/objmisc.cxx @@ -1742,6 +1742,11 @@ bool SfxObjectShell::AdjustMacroMode() return pImpl->aMacroMode.adjustMacroMode( xInteraction ); } +bool SfxObjectShell::IsMacroExecutionAllowed() const +{ + return pImpl->getCurrentMacroExecMode() == MacroExecMode::ALWAYS_EXECUTE_NO_WARN; +} + css::uno::Reference SfxObjectShell::GetDialogParent( SfxMedium const * pLoadingMedium ) { css::uno::Reference xWindow; From 7642fc49b32eaac1e1ab8639df991902fd9a48ff Mon Sep 17 00:00:00 2001 From: Xisco Fauli Date: Tue, 29 Sep 2026 22:27:45 +0200 Subject: [PATCH 047/289] openssl: upgrade to 3.5.9 Downloaded from https://github.com/openssl/openssl/releases/download/openssl-3.5.9/openssl-3.5.9.tar.gz Change-Id: I3b65df738dc74b61d7efe7bda04be808f144d74e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211590 Tested-by: Jenkins Reviewed-by: Xisco Fauli --- download.lst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/download.lst b/download.lst index fcb66a0fe391..13f914a7d75d 100644 --- a/download.lst +++ b/download.lst @@ -524,8 +524,8 @@ OPENLDAP_TARBALL := openldap-2.7.1.tgz # three static lines # so that git cherry-pick # will not run into conflicts -OPENSSL_SHA256SUM := a8f84a39918ec6415ce765d9b429d313ba97b8143169c172e734b9514464f5b2 -OPENSSL_TARBALL := openssl-3.5.8.tar.gz +OPENSSL_SHA256SUM := 603f5602e2eef00d77fbd429d34dcd5822bb301757a1bc9cdb24c670f1eb859a +OPENSSL_TARBALL := openssl-3.5.9.tar.gz # three static lines # so that git cherry-pick # will not run into conflicts From 3cb281d3d0205a71c1392e6cfd7b6ce471e577a9 Mon Sep 17 00:00:00 2001 From: Hossein Date: Tue, 29 Sep 2026 16:59:11 +0200 Subject: [PATCH 048/289] tdf#173779 Add command label for tooltips with HELP_DEBUG=1 Previously, when setting HELP_DEBUG=1, the tooltips lacked the label (description) for the commands in extended tip mode. The problem was that, if the extended help content was empty, then the ToolBox::RequestHelp() function added appropriate description. But, with the help debug mode on, the tooltip was no longer empty. It containted seperator "-------------" and the UNO command. This patch adds the description when the extra help content is empty and solves the issue. The result contains mnemonic characters like ~ which can be suitable for debugging. These characters are removed with the call to MnemonicGenerator::EraseAllMnemonicChars in ToolBox::RequestHelp in a normal LibreOffice session without setting HELP_DEBUG. Keyboard shortcuts are displayed in normal mode, but not in the extended tips mode. This issue can be later fixed by adding the keyboard shortcut to the tooltips when HELP_DEBUG=1 is set. Change-Id: Iead828ece855fa3e712919ef62353dbca9db1d52 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211577 Tested-by: Jenkins Reviewed-by: Ilmari Lauhakangas --- sfx2/source/appl/sfxhelp.cxx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sfx2/source/appl/sfxhelp.cxx b/sfx2/source/appl/sfxhelp.cxx index 8baf9c72bba7..6b7863160e98 100644 --- a/sfx2/source/appl/sfxhelp.cxx +++ b/sfx2/source/appl/sfxhelp.cxx @@ -590,6 +590,9 @@ OUString SfxHelp::GetHelpText(const OUString& aCommandURL) // add some debug information? if ( bIsDebug ) { + if (sHelpText.isEmpty()) + sHelpText = vcl::CommandInfoProvider::GetTooltipLabelForCommand(aProperties); + sHelpText += "\n-------------\n" + sModuleName + ": " + aCommandURL; } From 6a22c3e9a23157d6510dbb3287637444a9cd1847 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= Date: Sun, 27 Sep 2026 15:31:09 +0000 Subject: [PATCH 049/289] count the boxes of every table in testTableBoxKeepsItsCellSection MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit so the check can be shared with a document whose damaged table is not the first one Signed-off-by: Caolán McNamara Change-Id: I167e1e0dd2373c2ce9c6c233885d851c9c3f7280 Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/13646 Reviewed-by: Noel Grandin Tested-by: Jenkins CPCI (cherry picked from commit 1f22e425aabd46f484cdccb85e9784b1d8e32cb0) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211599 Reviewed-by: Xisco Fauli Tested-by: Jenkins --- sw/qa/core/docnode/docnode.cxx | 47 +++++++++++++++++----------------- 1 file changed, 24 insertions(+), 23 deletions(-) diff --git a/sw/qa/core/docnode/docnode.cxx b/sw/qa/core/docnode/docnode.cxx index 4f1af31c66c1..c261540562db 100644 --- a/sw/qa/core/docnode/docnode.cxx +++ b/sw/qa/core/docnode/docnode.cxx @@ -68,35 +68,36 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf156267) CPPUNIT_ASSERT_EQUAL(1, getPages()); } +namespace +{ +/// Counts the boxes of all tables in the document, and the cell sections in the document. +std::pair CountTableBoxesAndCellSections(SwDoc& rDoc) +{ + SwNodes& rNodes = rDoc.GetNodes(); + size_t nBoxes = 0; + int nCellSections = 0; + for (SwNodeOffset nNode(0); nNode < rNodes.Count(); ++nNode) + { + if (const SwTableNode* pTableNode = rNodes[nNode]->GetTableNode()) + nBoxes += pTableNode->GetTable().GetTabSortBoxes().size(); + const SwStartNode* pStartNode = rNodes[nNode]->GetStartNode(); + if (pStartNode && pStartNode->GetStartNodeType() == SwTableBoxStartNode) + ++nCellSections; + } + return { nBoxes, nCellSections }; +} +} + CPPUNIT_TEST_FIXTURE(Test, testTableBoxKeepsItsCellSection) { // Given a document whose tracked deletion carries on across a cell mark, so applying it at // import empties one cell of the table: createSwDoc("ofz515655013.doc"); - // Then every box of the table still has a cell section of its own: - SwDoc* pDoc = getSwDoc(); - SwNodes& rNodes = pDoc->GetNodes(); - const SwTableNode* pTableNode = nullptr; - for (SwNodeOffset nNode(0); nNode < rNodes.Count(); ++nNode) - { - if (rNodes[nNode]->IsTableNode()) - { - pTableNode = rNodes[nNode]->GetTableNode(); - break; - } - } - CPPUNIT_ASSERT(pTableNode); - int nCellSections = 0; - for (SwNodeOffset nNode = pTableNode->GetIndex(); nNode < pTableNode->EndOfSectionIndex(); - ++nNode) - { - const SwStartNode* pStartNode = rNodes[nNode]->GetStartNode(); - if (pStartNode && pStartNode->GetStartNodeType() == SwTableBoxStartNode) - ++nCellSections; - } - CPPUNIT_ASSERT_EQUAL(static_cast(6), pTableNode->GetTable().GetTabSortBoxes().size()); - CPPUNIT_ASSERT_EQUAL(6, nCellSections); + // Then every box of every table still has a cell section of its own: + auto[nBoxes, nCellSections] = CountTableBoxesAndCellSections(*getSwDoc()); + CPPUNIT_ASSERT_EQUAL(static_cast(26), nBoxes); + CPPUNIT_ASSERT_EQUAL(26, nCellSections); } CPPUNIT_PLUGIN_IMPLEMENT(); From f3f25e07f91c1d753319959b3aee7508855ede53 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= Date: Sun, 6 Sep 2026 20:15:23 +0000 Subject: [PATCH 050/289] ofz#556994536 Null-dereference MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit \cell can arrive before \intbl, so the buffered cell end has no cell properties to be replayed with Signed-off-by: Caolán McNamara Change-Id: Ia94d2d7cd3179784db3dcf1bdbf8cf3b7fd2d2de Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/11286 Tested-by: Jenkins CPCI Reviewed-by: Mike Kaganski (cherry picked from commit cf9a5ad073aa6cac8bb2ad3a24640ee3663b9b41) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211596 Tested-by: Jenkins Reviewed-by: Xisco Fauli --- .../rtftok/data/cell-then-intbl.rtf | 1 + sw/qa/writerfilter/rtftok/rtfdispatchsymbol.cxx | 17 +++++++++++++++++ .../writerfilter/rtftok/rtfdispatchsymbol.cxx | 1 + 3 files changed, 19 insertions(+) create mode 100644 sw/qa/writerfilter/rtftok/data/cell-then-intbl.rtf diff --git a/sw/qa/writerfilter/rtftok/data/cell-then-intbl.rtf b/sw/qa/writerfilter/rtftok/data/cell-then-intbl.rtf new file mode 100644 index 000000000000..f80c1b8720cd --- /dev/null +++ b/sw/qa/writerfilter/rtftok/data/cell-then-intbl.rtf @@ -0,0 +1 @@ +{\rtf1\cell x\intbl} \ No newline at end of file diff --git a/sw/qa/writerfilter/rtftok/rtfdispatchsymbol.cxx b/sw/qa/writerfilter/rtftok/rtfdispatchsymbol.cxx index 72780e7a4b2b..7c2a3ed6c114 100644 --- a/sw/qa/writerfilter/rtftok/rtfdispatchsymbol.cxx +++ b/sw/qa/writerfilter/rtftok/rtfdispatchsymbol.cxx @@ -84,6 +84,23 @@ CPPUNIT_TEST_FIXTURE(Test, testFloattableThenSectBreak) // i.e. the floating table was on the 2nd page, not on the 1st page. assertXPath(pXmlDoc, "/root/page[1]/sorted_objs/fly", 1); } + +CPPUNIT_TEST_FIXTURE(Test, testCellThenIntbl) +{ + // Given a document where the \intbl comes after the \cell: + // When loading that file: + loadFromFile(u"cell-then-intbl.rtf"); + + // Then make sure that the text after the cell end is in the document: + uno::Reference xTextDocument(mxComponent, uno::UNO_QUERY); + uno::Reference xText(xTextDocument->getText(), uno::UNO_QUERY); + uno::Reference xParagraphs = xText->createEnumeration(); + uno::Reference xParagraph(xParagraphs->nextElement(), uno::UNO_QUERY); + // Without the accompanying fix in place, this test would have failed, the import replayed + // the buffered cell end with no properties to put it in. + CPPUNIT_ASSERT_EQUAL(u"x"_ustr, xParagraph->getString()); + CPPUNIT_ASSERT(!xParagraphs->hasMoreElements()); +} } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/writerfilter/rtftok/rtfdispatchsymbol.cxx b/sw/source/writerfilter/rtftok/rtfdispatchsymbol.cxx index 8a34962da790..e82ec722ee93 100644 --- a/sw/source/writerfilter/rtftok/rtfdispatchsymbol.cxx +++ b/sw/source/writerfilter/rtftok/rtfdispatchsymbol.cxx @@ -142,6 +142,7 @@ RTFError RTFDocumentImpl::dispatchSymbol(RTFKeyword nKeyword) pCurrentBuffer->begin(), pCurrentBuffer->end(), [](auto const& it) { return ::std::get<0>(it) == RTFBufferTypes::PAR + || ::std::get<0>(it) == RTFBufferTypes::CellEnd || (::std::get<0>(it) == RTFBufferTypes::Props && ::std::get<1>(it)->getSprms().find( NS_ooxml::LN_inTbl) From 5a201620b2c9ec8214b8c42b75bee0b2d953014c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= Date: Thu, 24 Sep 2026 20:09:09 +0000 Subject: [PATCH 051/289] svg export: check text hyperlink URLs the same way as shape ones MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit and have the slideshow open only http, https and mailto links same check as: commit 34ec46571701d639d9bc542b2d19f87a21a83648 Date: Mon Mar 4 09:38:02 2019 +0100 Check svg URLs before exporting text hyperlinks exported since: commit b76628acb1ae4fc06f8c1b70ec2e0cf39356deef Date: Sat Aug 11 22:23:22 2012 +0200 text export support for bullets and hyperlinks Signed-off-by: Caolán McNamara Change-Id: I826ffb43f0e809f91d1728a9a3b39ebec5b83d6e Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/13498 Reviewed-by: Noel Grandin Tested-by: Jenkins CPCI (cherry picked from commit 5f9e522ae9b43a9f4777d86accd20cce02d8fad3) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211595 Tested-by: Jenkins Reviewed-by: Xisco Fauli --- filter/source/svg/presentation_engine.js | 12 +++++++++++- filter/source/svg/svgwriter.cxx | 11 ++++++++++- 2 files changed, 21 insertions(+), 2 deletions(-) diff --git a/filter/source/svg/presentation_engine.js b/filter/source/svg/presentation_engine.js index fa42b89b2f8e..c94b07ecce48 100644 --- a/filter/source/svg/presentation_engine.js +++ b/filter/source/svg/presentation_engine.js @@ -16217,7 +16217,17 @@ HyperlinkElement.prototype.handleClick = function( ) var aWindowObject = document.defaultView; if( aWindowObject ) { - aWindowObject.open( this.sURL, this.sId ); + var sProtocol = ''; + try + { + sProtocol = new URL( this.sURL, document.baseURI ).protocol; + } + catch( e ) + { + log( 'error: HyperlinkElement.handleClick: invalid url.' ); + } + if( sProtocol === 'http:' || sProtocol === 'https:' || sProtocol === 'mailto:' ) + aWindowObject.open( this.sURL, this.sId ); } else { diff --git a/filter/source/svg/svgwriter.cxx b/filter/source/svg/svgwriter.cxx index 0c7a631127ad..9d9a6dccbd58 100644 --- a/filter/source/svg/svgwriter.cxx +++ b/filter/source/svg/svgwriter.cxx @@ -37,6 +37,7 @@ #include #include #include +#include #include #include #include @@ -1309,7 +1310,15 @@ bool SVGTextWriter::nextTextPortion() #if OSL_DEBUG_LEVEL > 0 sInfo += "url: " + mrExport.GetRelativeReference( sURL ); #endif - msUrl = mrExport.GetRelativeReference( sURL ); + // A link to a place in the presentation starts with '#'. + INetURLObject aINetURLObject(sURL); + if (sURL.startsWith("#") + || (!aINetURLObject.HasError() + && !aINetURLObject.IsExoticProtocol() + && aINetURLObject.GetProtocol() != INetProtocol::Javascript)) + msUrl = mrExport.GetRelativeReference( sURL ); + else + msUrl.clear(); if( !msUrl.isEmpty() ) { implRegisterInterface( xPortionTextRange ); From 111a2ffc8be0faf4820fb8d1c2b7acb7ab5e1ba3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=BCl=C5=9Fah=20K=C3=B6se?= Date: Tue, 22 Sep 2026 16:07:35 +0300 Subject: [PATCH 052/289] cool#16233 sw: keep a formula's font size across DOCX import and export MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit An equation's size lives in the w:sz of its math runs. The import ignored it, so every equation came in at the 12pt default of the formula editor, and a file holding equations at three sizes showed all three the same. An equation whose runs name no size takes the size of the text around it, which the styles and the document defaults hold. The export wrote no size at all. It now puts the size on every math run, and in the control properties of each object, which is where the fraction bar, the radical sign and the brackets take theirs from. The size travels in the w namespace, so it goes out for a DOCX only, the way the color of a formula already does. Every formula now carries a size of its own on the way out, including one written in ODF. Such a formula used to leave the size open and took whatever the text around it had in the reading application. It now keeps the size it is drawn at here, so both applications show it the same. Setting the base size means giving each of the fonts that same size. The font size dialog, the BaseFontHeight property of the model and this import each did that on their own, so they now share SmFormat::SetBaseSizeAndFonts. The property used to put the sizes in a copy that a later merge step reads only for a font the same call has named, so a lone BaseFontHeight left the fonts alone. Signed-off-by: Gülşah Köse Change-Id: I18b6c5814a57d8ccb8be5b7bdd357ce76cea024d Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/13297 Reviewed-by: Balázs Varga Tested-by: Jenkins CPCI (cherry picked from commit 582e3fdb6496d9f511dfefc1f716b4ead6cc3797) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211600 Tested-by: Jenkins Reviewed-by: Xisco Fauli --- include/oox/mathml/imexport.hxx | 6 + include/oox/mathml/importutils.hxx | 8 ++ oox/source/mathml/importutils.cxx | 17 +++ starmath/inc/document.hxx | 8 ++ starmath/inc/format.hxx | 2 + starmath/inc/unomodel.hxx | 2 + starmath/source/dialog.cxx | 6 +- starmath/source/document.cxx | 17 ++- starmath/source/format.cxx | 7 ++ starmath/source/ooxmlexport.cxx | 115 +++++++++++------- starmath/source/ooxmlexport.hxx | 21 ++-- starmath/source/ooxmlimport.cxx | 17 +++ starmath/source/ooxmlimport.hxx | 4 + starmath/source/unomodel.cxx | 20 ++- .../ooxmlexport/data/math-font-size.docx | Bin 0 -> 1970 bytes sw/qa/extras/ooxmlexport/ooxmlexport2.cxx | 9 +- sw/qa/extras/ooxmlexport/ooxmlexport27.cxx | 32 +++++ .../tdf157569_formula_font_size.py | 10 +- .../dmapper/DomainMapper_Impl.cxx | 16 ++- 19 files changed, 245 insertions(+), 72 deletions(-) create mode 100644 sw/qa/extras/ooxmlexport/data/math-font-size.docx diff --git a/include/oox/mathml/imexport.hxx b/include/oox/mathml/imexport.hxx index c77689166d75..0e6cde052a83 100644 --- a/include/oox/mathml/imexport.hxx +++ b/include/oox/mathml/imexport.hxx @@ -36,6 +36,12 @@ class OOX_DLLPUBLIC SAL_LOPLUGIN_ANNOTATE("crosscast") FormulaImExportBase public: virtual void readFormulaOoxml( oox::formulaimport::XmlStream& stream ) = 0; virtual Size getFormulaSize() const = 0; // Unit is mm100 + /** The font size in half points that the OOXML markup gave for the formula. It is 0 when + the markup carried no size, and the formula then has whatever size the text around it + has. */ + virtual sal_Int32 getFormulaFontSizeInHalfPoints() const = 0; + /** Draw the formula at the given size, in half points. */ + virtual void setFormulaFontSizeInHalfPoints( sal_Int32 nFontSize ) = 0; virtual void writeFormulaOoxml(::sax_fastparser::FSHelperPtr pSerializer, oox::core::OoxmlVersion version, diff --git a/include/oox/mathml/importutils.hxx b/include/oox/mathml/importutils.hxx index 39133528e98a..9993e4f01c2d 100644 --- a/include/oox/mathml/importutils.hxx +++ b/include/oox/mathml/importutils.hxx @@ -205,6 +205,14 @@ public: Handle the current (unexpected) tag. */ void handleUnexpectedTag(); + /** + Collects an attribute from every opening tag of the given type that sits inside an + element of the given enclosing type, anywhere in the stream and however deeply nested. + The position in the stream stays where it is. + @return the attribute values, in the order the tags carrying them appear + */ + std::vector tagAttributesWithin(int nEnclosingToken, int nTagToken, + int nAttributeToken) const; protected: Tag checkTag(int token, bool optional); diff --git a/oox/source/mathml/importutils.cxx b/oox/source/mathml/importutils.cxx index 4f6c243b9970..ca6402875940 100644 --- a/oox/source/mathml/importutils.cxx +++ b/oox/source/mathml/importutils.cxx @@ -312,6 +312,23 @@ void XmlStream::handleUnexpectedTag() skipElementInternal( currentToken(), false ); // otherwise skip the entire element } +std::vector XmlStream::tagAttributesWithin( int nEnclosingToken, int nTagToken, + int nAttributeToken ) const +{ + std::vector aValues; + int nDepth = 0; + for( const Tag& rTag : tags ) + { + if( rTag.token == OPENING( nEnclosingToken )) + ++nDepth; + else if( rTag.token == CLOSING( nEnclosingToken )) + --nDepth; + else if( nDepth > 0 && rTag.token == OPENING( nTagToken )) + aValues.push_back( rTag.attribute( nAttributeToken )); + } + return aValues; +} + void XmlStreamBuilder::appendOpeningTag( int token, const uno::Reference< xml::sax::XFastAttributeList >& attrs ) { tags.emplace_back( OPENING( token ), attrs ); diff --git a/starmath/inc/document.hxx b/starmath/inc/document.hxx index c73723a434d0..7e7f00442364 100644 --- a/starmath/inc/document.hxx +++ b/starmath/inc/document.hxx @@ -93,6 +93,8 @@ class SM_DLLPUBLIC SmDocShell final : public SfxObjectShell, public SfxListener sal_uInt16 mnModifyCount; bool mbFormulaArranged; sal_Int16 mnSmSyntaxVersion; + /// Font size in half points that the OOXML markup gave for the formula, 0 when it gave none. + sal_Int32 mnOoxmlFontSizeInHalfPoints = 0; std::unique_ptr maParser; std::unique_ptr mpCursor; std::set< OUString > maUsedSymbols; // to export used symbols only when saving @@ -215,6 +217,12 @@ public: const sal_Int8 nAlign); void writeFormulaRtf(OStringBuffer& rBuffer, rtl_TextEncoding nEncoding); void readFormulaOoxml( oox::formulaimport::XmlStream& stream ); + /** The font size in half points that the OOXML markup gave for the formula, or 0 when the + markup carried no size of its own. */ + sal_Int32 GetOoxmlFontSizeInHalfPoints() const { return mnOoxmlFontSizeInHalfPoints; } + /** Draw the formula at the given size, in half points. The size becomes the base size and + the size of each of the fonts. A size of zero or less leaves the formula as it is. */ + void SetFontSizeInHalfPoints(sal_Int32 nFontSize); void UpdateEditEngineDefaultFonts(); diff --git a/starmath/inc/format.hxx b/starmath/inc/format.hxx index bcb052e6d4a9..d5f0cf189fdf 100644 --- a/starmath/inc/format.hxx +++ b/starmath/inc/format.hxx @@ -107,6 +107,8 @@ public: const Size & GetBaseSize() const { return aBaseSize; } void SetBaseSize(const Size &rSize) { aBaseSize = rSize; } + /// Sets the base size and gives each of the fonts that same size. + void SetBaseSizeAndFonts(const Size &rSize); const SmFace & GetFont(sal_uInt16 nIdent) const { return vFont[nIdent]; } void SetFont(sal_uInt16 nIdent, const SmFace &rFont, bool bDefault = false); diff --git a/starmath/inc/unomodel.hxx b/starmath/inc/unomodel.hxx index e2edbfa651a3..af5068d006b8 100644 --- a/starmath/inc/unomodel.hxx +++ b/starmath/inc/unomodel.hxx @@ -91,6 +91,8 @@ public: virtual void writeFormulaRtf(OStringBuffer& rBuffer, rtl_TextEncoding nEncoding) override; virtual void readFormulaOoxml( oox::formulaimport::XmlStream& stream ) override; virtual Size getFormulaSize() const override; + virtual sal_Int32 getFormulaFontSizeInHalfPoints() const override; + virtual void setFormulaFontSizeInHalfPoints(sal_Int32 nFontSize) override; private: OUString msOldWindowState; // imported window state diff --git a/starmath/source/dialog.cxx b/starmath/source/dialog.cxx index a53081c75f0b..af018b914e19 100644 --- a/starmath/source/dialog.cxx +++ b/starmath/source/dialog.cxx @@ -521,7 +521,7 @@ void SmFontSizeDialog::ReadFrom(const SmFormat &rFormat) void SmFontSizeDialog::WriteTo(SmFormat &rFormat) const { - rFormat.SetBaseSize( Size(0, o3tl::convert(m_xBaseSize->get_value(FieldUnit::NONE), o3tl::Length::pt, SmO3tlLengthUnit())) ); + rFormat.SetBaseSizeAndFonts( Size(0, o3tl::convert(m_xBaseSize->get_value(FieldUnit::NONE), o3tl::Length::pt, SmO3tlLengthUnit())) ); rFormat.SetRelSize(SIZ_TEXT, sal::static_int_cast(m_xTextSize->get_value(FieldUnit::NONE))); rFormat.SetRelSize(SIZ_INDEX, sal::static_int_cast(m_xIndexSize->get_value(FieldUnit::NONE))); @@ -529,10 +529,6 @@ void SmFontSizeDialog::WriteTo(SmFormat &rFormat) const rFormat.SetRelSize(SIZ_OPERATOR, sal::static_int_cast(m_xOperatorSize->get_value(FieldUnit::NONE))); rFormat.SetRelSize(SIZ_LIMITS, sal::static_int_cast(m_xBorderSize->get_value(FieldUnit::NONE))); - const Size aTmp (rFormat.GetBaseSize()); - for (sal_uInt16 i = FNT_BEGIN; i <= FNT_END; i++) - rFormat.SetFontSize(i, aTmp); - rFormat.RequestApplyChanges(); } diff --git a/starmath/source/document.cxx b/starmath/source/document.cxx index fc7e0af42e19..f1b5b2fa4f21 100644 --- a/starmath/source/document.cxx +++ b/starmath/source/document.cxx @@ -835,7 +835,9 @@ void SmDocShell::writeFormulaOoxml( Parse(); if( mpTree ) ArrangeFormula(); - SmOoxmlExport aEquation(mpTree.get(), version, documentType); + SmOoxmlExport aEquation(mpTree.get(), version, documentType, + o3tl::convert(maFormat.GetBaseSize().Height() * 2, SmO3tlLengthUnit(), + o3tl::Length::pt)); if(documentType == oox::drawingml::DOCUMENT_DOCX) aEquation.ConvertFromStarMath( pSerializer, nAlign); else @@ -856,6 +858,19 @@ void SmDocShell::readFormulaOoxml( oox::formulaimport::XmlStream& stream ) { SmOoxmlImport aEquation( stream ); SetText( aEquation.ConvertToStarMath()); + mnOoxmlFontSizeInHalfPoints = aEquation.GetFontSizeInHalfPoints(); + SetFontSizeInHalfPoints(mnOoxmlFontSizeInHalfPoints); +} + +void SmDocShell::SetFontSizeInHalfPoints(sal_Int32 nFontSize) +{ + if (nFontSize <= 0) + return; + SmFormat aFormat(GetFormat()); + Size aSize(aFormat.GetBaseSize()); + aSize.setHeight(o3tl::convert(nFontSize, o3tl::Length::pt, SmO3tlLengthUnit()) / 2); + aFormat.SetBaseSizeAndFonts(aSize); + SetFormat(aFormat); } void SmDocShell::Execute(SfxRequest& rReq) diff --git a/starmath/source/format.cxx b/starmath/source/format.cxx index a5e7b76437b6..6a8d57a01e34 100644 --- a/starmath/source/format.cxx +++ b/starmath/source/format.cxx @@ -89,6 +89,13 @@ SmFormat::SmFormat() } +void SmFormat::SetBaseSizeAndFonts(const Size &rSize) +{ + SetBaseSize(rSize); + for (sal_uInt16 nFont = FNT_BEGIN; nFont <= FNT_END; ++nFont) + SetFontSize(nFont, rSize); +} + void SmFormat::SetFont(sal_uInt16 nIdent, const SmFace &rFont, bool bDefault ) { vFont[nIdent] = rFont; diff --git a/starmath/source/ooxmlexport.cxx b/starmath/source/ooxmlexport.cxx index d7750af6b0ff..06a79fd190f1 100644 --- a/starmath/source/ooxmlexport.cxx +++ b/starmath/source/ooxmlexport.cxx @@ -22,10 +22,11 @@ using namespace oox; using namespace oox::core; SmOoxmlExport::SmOoxmlExport(const SmNode *const pIn, OoxmlVersion const v, - drawingml::DocumentType const documentType) + drawingml::DocumentType const documentType, sal_Int32 const nFontSizeInHalfPoints) : SmWordExportBase( pIn ) , version( v ) , m_DocumentType(documentType) +, m_nFontSizeInHalfPoints(nFontSizeInHalfPoints) { } @@ -84,27 +85,33 @@ void SmOoxmlExport::ConvertFromStarMath( const ::sax_fastparser::FSHelperPtr& se // part of the ooxml math stuff. // The w prefix is bound in a DOCX and nowhere else. A formula in a presentation or a -// spreadsheet goes out inside a slide or a sheet, which never declare it, so a color -// there would leave the prefix unbound. -bool SmOoxmlExport::HasOwnColor( const SmNode* pNode ) const +// spreadsheet goes out inside a slide or a sheet, which never declare it, so run +// properties there would leave the prefix unbound. +bool SmOoxmlExport::WritesRunProperties() const { - return drawingml::DOCUMENT_DOCX == m_DocumentType - && pNode->GetFont().GetColor() != COL_AUTO; + return drawingml::DOCUMENT_DOCX == m_DocumentType; } -// Only a bold or italic command around a construct sets these attributes on it. -bool SmOoxmlExport::HasCtrlPr( const SmNode* pNode ) const +// Only a color command around a node sets a color on it. +bool SmOoxmlExport::HasOwnColor( const SmNode* pNode ) { - return HasOwnColor( pNode ) - || ( drawingml::DOCUMENT_DOCX == m_DocumentType - && ( pNode->Attributes() & ( FontAttribute::Bold | FontAttribute::Italic ))); + return pNode->GetFont().GetColor() != COL_AUTO; +} + +// The size belongs on every run and on every control property of the formula, which is +// where the markup carries it. +void SmOoxmlExport::WriteFontSize() +{ + const OString sFontSize( OString::number( m_nFontSizeInHalfPoints )); + m_pSerializer->singleElementNS( XML_w, XML_sz, FSNS( XML_w, XML_val ), sFontSize ); + m_pSerializer->singleElementNS( XML_w, XML_szCs, FSNS( XML_w, XML_val ), sFontSize ); } // A construct such as a fraction or a pair of brackets draws part of itself, and the // format of that part travels in the m:ctrlPr of the construct's property element. void SmOoxmlExport::WriteCtrlPr( const SmNode* pNode ) { - if( !HasCtrlPr( pNode )) + if( !WritesRunProperties()) return; m_pSerializer->startElementNS( XML_m, XML_ctrlPr ); m_pSerializer->startElementNS( XML_w, XML_rPr ); @@ -115,10 +122,21 @@ void SmOoxmlExport::WriteCtrlPr( const SmNode* pNode ) if( HasOwnColor( pNode )) m_pSerializer->singleElementNS( XML_w, XML_color, FSNS( XML_w, XML_val ), msfilter::util::ConvertColorOU( pNode->GetFont().GetColor())); + WriteFontSize(); m_pSerializer->endElementNS( XML_w, XML_rPr ); m_pSerializer->endElementNS( XML_m, XML_ctrlPr ); } +// A property element that a construct carries only to hold its control properties. +void SmOoxmlExport::WritePropertiesElement( sal_Int32 nElement, const SmNode* pNode ) +{ + if( !WritesRunProperties()) + return; + m_pSerializer->startElementNS( XML_m, nElement ); + WriteCtrlPr( pNode ); + m_pSerializer->endElementNS( XML_m, nElement ); +} + static bool lcl_HasLetter( const OUString& rText ) { for( sal_Int32 nIndex = 0; nIndex < rText.getLength(); ) @@ -145,6 +163,7 @@ static const char* lcl_GetOoxmlStyle( bool bBold, bool bItalic, const OUString& void SmOoxmlExport::HandleVerticalStack( const SmNode* pNode, int nLevel ) { m_pSerializer->startElementNS(XML_m, XML_eqArr); + WritePropertiesElement( XML_eqArrPr, pNode ); int size = pNode->GetNumSubNodes(); for( int i = 0; i < size; @@ -181,32 +200,24 @@ void SmOoxmlExport::HandleText( const SmNode* pNode, int /*nLevel*/) m_pSerializer->singleElementNS(XML_m, XML_sty, FSNS(XML_m, XML_val), pStyle); m_pSerializer->endElementNS( XML_m, XML_rPr ); } - const bool bWriteFont - = drawingml::DOCUMENT_DOCX == m_DocumentType && ECMA_376_1ST_EDITION == version; - const bool bWriteBold - = drawingml::DOCUMENT_DOCX == m_DocumentType && bLiteral && bBold; - const bool bWriteItalic - = drawingml::DOCUMENT_DOCX == m_DocumentType && bLiteral && bItalic; - // A surrounding color, bold or italic command has already reached this node. - const Color aColor = pNode->GetFont().GetColor(); - const bool bWriteColor - = drawingml::DOCUMENT_DOCX == m_DocumentType && aColor != COL_AUTO; - if( bWriteFont || bWriteBold || bWriteItalic || bWriteColor ) + if( WritesRunProperties()) { m_pSerializer->startElementNS(XML_w, XML_rPr); - if( bWriteFont ) - // HACK: MSOffice2007 does not import characters properly unless this font is - // explicitly given + if( ECMA_376_1ST_EDITION == version ) + // Readers of the first OOXML edition get the characters wrong unless the font + // is named here. m_pSerializer->singleElementNS( XML_w, XML_rFonts, FSNS( XML_w, XML_ascii ), "Cambria Math", FSNS( XML_w, XML_hAnsi ), "Cambria Math" ); - if( bWriteBold ) + // A surrounding color, bold or italic command has already reached this node. + if( bLiteral && bBold ) m_pSerializer->singleElementNS( XML_w, XML_b ); - if( bWriteItalic ) + if( bLiteral && bItalic ) m_pSerializer->singleElementNS( XML_w, XML_i ); - if( bWriteColor ) + if( HasOwnColor( pNode )) m_pSerializer->singleElementNS( XML_w, XML_color, FSNS( XML_w, XML_val ), - msfilter::util::ConvertColorOU( aColor )); + msfilter::util::ConvertColorOU( pNode->GetFont().GetColor())); + WriteFontSize(); m_pSerializer->endElementNS( XML_w, XML_rPr ); } m_pSerializer->startElementNS(XML_m, XML_t, FSNS(XML_xml, XML_space), "preserve"); @@ -270,7 +281,7 @@ void SmOoxmlExport::HandleText( const SmNode* pNode, int /*nLevel*/) void SmOoxmlExport::HandleFractions( const SmNode* pNode, int nLevel, const char* type ) { m_pSerializer->startElementNS(XML_m, XML_f); - if( type != nullptr || HasCtrlPr( pNode )) + if( type != nullptr || WritesRunProperties()) { m_pSerializer->startElementNS(XML_m, XML_fPr); if( type != nullptr ) @@ -359,27 +370,24 @@ void SmOoxmlExport::HandleAttribute( const SmAttributeNode* pNode, int nLevel ) void SmOoxmlExport::HandleRoot( const SmRootNode* pNode, int nLevel ) { + const SmNode* pArgument = pNode->Argument(); m_pSerializer->startElementNS(XML_m, XML_rad); - if( const SmNode* argument = pNode->Argument()) + if( pArgument == nullptr || WritesRunProperties()) + { + m_pSerializer->startElementNS(XML_m, XML_radPr); + if( pArgument == nullptr ) + m_pSerializer->singleElementNS(XML_m, XML_degHide, FSNS(XML_m, XML_val), "1"); + WriteCtrlPr( pNode ); + m_pSerializer->endElementNS( XML_m, XML_radPr ); + } + if( pArgument != nullptr ) { - if( HasCtrlPr( pNode )) - { - m_pSerializer->startElementNS(XML_m, XML_radPr); - WriteCtrlPr( pNode ); - m_pSerializer->endElementNS( XML_m, XML_radPr ); - } m_pSerializer->startElementNS(XML_m, XML_deg); - HandleNode( argument, nLevel + 1 ); + HandleNode( pArgument, nLevel + 1 ); m_pSerializer->endElementNS( XML_m, XML_deg ); } else - { - m_pSerializer->startElementNS(XML_m, XML_radPr); - m_pSerializer->singleElementNS(XML_m, XML_degHide, FSNS(XML_m, XML_val), "1"); - WriteCtrlPr( pNode ); - m_pSerializer->endElementNS( XML_m, XML_radPr ); m_pSerializer->singleElementNS(XML_m, XML_deg); // empty but present - } m_pSerializer->startElementNS(XML_m, XML_e); HandleNode( pNode->Body(), nLevel + 1 ); m_pSerializer->endElementNS( XML_m, XML_e ); @@ -448,8 +456,10 @@ void SmOoxmlExport::HandleOperator( const SmOperNode* pNode, int nLevel ) } case TLIM: m_pSerializer->startElementNS(XML_m, XML_func); + WritePropertiesElement( XML_funcPr, pNode ); m_pSerializer->startElementNS(XML_m, XML_fName); m_pSerializer->startElementNS(XML_m, XML_limLow); + WritePropertiesElement( XML_limLowPr, pNode ); m_pSerializer->startElementNS(XML_m, XML_e); HandleNode( pNode->GetSymbol(), nLevel + 1 ); m_pSerializer->endElementNS( XML_m, XML_e ); @@ -484,6 +494,7 @@ void SmOoxmlExport::HandleSubSupScriptInternal( const SmSubSupNode* pNode, int n if(( flags & ( 1 << RSUP | 1 << RSUB )) == ( 1 << RSUP | 1 << RSUB )) { // m:sSubSup m_pSerializer->startElementNS(XML_m, XML_sSubSup); + WritePropertiesElement( XML_sSubSupPr, pNode ); m_pSerializer->startElementNS(XML_m, XML_e); flags &= ~( 1 << RSUP | 1 << RSUB ); if( flags == 0 ) @@ -502,6 +513,7 @@ void SmOoxmlExport::HandleSubSupScriptInternal( const SmSubSupNode* pNode, int n else if(( flags & ( 1 << RSUB )) == 1 << RSUB ) { // m:sSub m_pSerializer->startElementNS(XML_m, XML_sSub); + WritePropertiesElement( XML_sSubPr, pNode ); m_pSerializer->startElementNS(XML_m, XML_e); flags &= ~( 1 << RSUB ); if( flags == 0 ) @@ -517,6 +529,7 @@ void SmOoxmlExport::HandleSubSupScriptInternal( const SmSubSupNode* pNode, int n else if(( flags & ( 1 << RSUP )) == 1 << RSUP ) { // m:sSup m_pSerializer->startElementNS(XML_m, XML_sSup); + WritePropertiesElement( XML_sSupPr, pNode ); m_pSerializer->startElementNS(XML_m, XML_e); flags &= ~( 1 << RSUP ); if( flags == 0 ) @@ -532,6 +545,7 @@ void SmOoxmlExport::HandleSubSupScriptInternal( const SmSubSupNode* pNode, int n else if(( flags & ( 1 << LSUP | 1 << LSUB )) == ( 1 << LSUP | 1 << LSUB )) { // m:sPre m_pSerializer->startElementNS(XML_m, XML_sPre); + WritePropertiesElement( XML_sPrePr, pNode ); m_pSerializer->startElementNS(XML_m, XML_sub); HandleNode( pNode->GetSubSup( LSUB ), nLevel + 1 ); m_pSerializer->endElementNS( XML_m, XML_sub ); @@ -550,6 +564,7 @@ void SmOoxmlExport::HandleSubSupScriptInternal( const SmSubSupNode* pNode, int n else if(( flags & ( 1 << CSUB )) == ( 1 << CSUB )) { // m:limLow looks like a good element for central superscript m_pSerializer->startElementNS(XML_m, XML_limLow); + WritePropertiesElement( XML_limLowPr, pNode ); m_pSerializer->startElementNS(XML_m, XML_e); flags &= ~( 1 << CSUB ); if( flags == 0 ) @@ -565,6 +580,7 @@ void SmOoxmlExport::HandleSubSupScriptInternal( const SmSubSupNode* pNode, int n else if(( flags & ( 1 << CSUP )) == ( 1 << CSUP )) { // m:limUpp looks like a good element for central superscript m_pSerializer->startElementNS(XML_m, XML_limUpp); + WritePropertiesElement( XML_limUppPr, pNode ); m_pSerializer->startElementNS(XML_m, XML_e); flags &= ~( 1 << CSUP ); if( flags == 0 ) @@ -588,6 +604,7 @@ void SmOoxmlExport::HandleSubSupScriptInternal( const SmSubSupNode* pNode, int n void SmOoxmlExport::HandleMatrix( const SmMatrixNode* pNode, int nLevel ) { m_pSerializer->startElementNS(XML_m, XML_m); + WritePropertiesElement( XML_mPr, pNode ); for (size_t row = 0; row < pNode->GetNumRows(); ++row) { m_pSerializer->startElementNS(XML_m, XML_mr); @@ -675,6 +692,7 @@ void SmOoxmlExport::HandleVerticalBrace( const SmVerticalBraceNode* pNode, int n { bool top = ( pNode->GetToken().eType == TOVERBRACE ); m_pSerializer->startElementNS(XML_m, top ? XML_limUpp : XML_limLow); + WritePropertiesElement( top ? XML_limUppPr : XML_limLowPr, pNode ); m_pSerializer->startElementNS(XML_m, XML_e); m_pSerializer->startElementNS(XML_m, XML_groupChr); m_pSerializer->startElementNS(XML_m, XML_groupChrPr); @@ -708,6 +726,13 @@ void SmOoxmlExport::HandleVerticalBrace( const SmVerticalBraceNode* pNode, int n void SmOoxmlExport::HandleBlank() { m_pSerializer->startElementNS(XML_m, XML_r); + // A blank draws no glyph, so the size is all it carries. + if( WritesRunProperties()) + { + m_pSerializer->startElementNS( XML_w, XML_rPr ); + WriteFontSize(); + m_pSerializer->endElementNS( XML_w, XML_rPr ); + } m_pSerializer->startElementNS(XML_m, XML_t, FSNS(XML_xml, XML_space), "preserve"); m_pSerializer->write( " " ); m_pSerializer->endElementNS( XML_m, XML_t ); diff --git a/starmath/source/ooxmlexport.hxx b/starmath/source/ooxmlexport.hxx index b810400ccf2e..a8209f58fc65 100644 --- a/starmath/source/ooxmlexport.hxx +++ b/starmath/source/ooxmlexport.hxx @@ -22,7 +22,7 @@ class SmOoxmlExport : public SmWordExportBase { public: SmOoxmlExport(const SmNode* pIn, oox::core::OoxmlVersion version, - oox::drawingml::DocumentType documentType); + oox::drawingml::DocumentType documentType, sal_Int32 nFontSizeInHalfPoints); void ConvertFromStarMath(const ::sax_fastparser::FSHelperPtr& m_pSerializer, const sal_Int8); private: @@ -37,18 +37,23 @@ private: void HandleBrace(const SmBraceNode* pNode, int nLevel) override; void HandleVerticalBrace(const SmVerticalBraceNode* pNode, int nLevel) override; void HandleBlank() override; - /// Writes the m:ctrlPr carrying the color, bold and italic of the parts a construct - /// draws itself. + /// True when the run properties are written out, which needs a DOCX. + bool WritesRunProperties() const; + /// True when the node has a color of its own rather than the default one. + static bool HasOwnColor(const SmNode* pNode); + /// Writes the w:sz and w:szCs carrying the size the formula is drawn at. + void WriteFontSize(); + /// Writes the m:ctrlPr carrying the size, color, bold and italic of the parts a + /// construct draws itself. void WriteCtrlPr(const SmNode* pNode); - /// True when the node has a color, bold or italic of its own to write in an m:ctrlPr. - bool HasCtrlPr(const SmNode* pNode) const; - /// True when the color of the node is written out, which needs a color other than - /// the default and a DOCX. - bool HasOwnColor(const SmNode* pNode) const; + /// Writes a property element that a construct carries only to hold its control properties. + void WritePropertiesElement(sal_Int32 nElement, const SmNode* pNode); ::sax_fastparser::FSHelperPtr m_pSerializer; oox::core::OoxmlVersion version; /// needed to determine markup for nested run properties oox::drawingml::DocumentType const m_DocumentType; + /// The size the formula is drawn at, in half points. + sal_Int32 const m_nFontSizeInHalfPoints; }; /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/starmath/source/ooxmlimport.cxx b/starmath/source/ooxmlimport.cxx index c496b910651c..b33e9bedf720 100644 --- a/starmath/source/ooxmlimport.cxx +++ b/starmath/source/ooxmlimport.cxx @@ -9,6 +9,7 @@ #include +#include #include #include "ooxmlimport.hxx" @@ -201,6 +202,22 @@ OUString SmOoxmlImport::ConvertToStarMath() return handleStream(); } +sal_Int32 SmOoxmlImport::GetFontSizeInHalfPoints() const +{ + // A formula is drawn at a single size, and the runs of a formula that names a size all + // carry it. Where they differ, the largest one is the size of the body: a smaller one + // belongs to a part the author shrank, such as a limit or a script. A value that is not + // a positive number of half points counts as no size at all, and so does a formula whose + // runs name none, which then takes the size of the text around it. + sal_Int32 nFontSize = 0; + for( const OUString& rValue : m_rStream.tagAttributesWithin( + M_TOKEN( r ), W_TOKEN( sz ), W_TOKEN( val ))) + { + nFontSize = std::max( nFontSize, rValue.toInt32()); + } + return nFontSize; +} + // "toplevel" of reading, there will be oMath (if there was oMathPara, that was // up to the parent component to handle) diff --git a/starmath/source/ooxmlimport.hxx b/starmath/source/ooxmlimport.hxx index f435e3945309..a3fe8c6f1828 100644 --- a/starmath/source/ooxmlimport.hxx +++ b/starmath/source/ooxmlimport.hxx @@ -10,6 +10,7 @@ #pragma once #include +#include #include @@ -25,6 +26,9 @@ public: explicit SmOoxmlImport( oox::formulaimport::XmlStream& stream ); ~SmOoxmlImport(); OUString ConvertToStarMath(); + /** The font size the markup gives for the formula, in half points, or 0 when the markup + carries no size of its own and the formula takes the size of the text around it. */ + sal_Int32 GetFontSizeInHalfPoints() const; private: /// The parser that tells whether a run's text stands as an expression of its own. SmParser5& getParser(); diff --git a/starmath/source/unomodel.cxx b/starmath/source/unomodel.cxx index 5693a73ec172..2097566a4fe8 100644 --- a/starmath/source/unomodel.cxx +++ b/starmath/source/unomodel.cxx @@ -480,12 +480,12 @@ void SmModel::_setPropertyValues(const PropertyMapEntry** ppEntries, const Any* throw IllegalArgumentException(); Size aSize = aFormat.GetBaseSize(); aSize.setHeight(o3tl::convert(nVal, o3tl::Length::pt, SmO3tlLengthUnit())); - aFormat.SetBaseSize(aSize); + aFormat.SetBaseSizeAndFonts(aSize); - // apply base size to fonts - const Size aTmp( aFormat.GetBaseSize() ); - for (sal_uInt16 i = FNT_BEGIN; i <= FNT_END; i++) - maFonts[i].SetSize(aTmp); + // A font that this same call names is merged in below, from a copy that + // needs the new size too. + for (sal_uInt16 nFont = FNT_BEGIN; nFont <= FNT_END; nFont++) + maFonts[nFont].SetSize(aSize); } break; case HANDLE_RELATIVE_FONT_HEIGHT_TEXT : @@ -1112,6 +1112,16 @@ void SmModel::readFormulaOoxml( oox::formulaimport::XmlStream& stream ) GetSmDocShell()->readFormulaOoxml(stream); } +sal_Int32 SmModel::getFormulaFontSizeInHalfPoints() const +{ + return GetSmDocShell()->GetOoxmlFontSizeInHalfPoints(); +} + +void SmModel::setFormulaFontSizeInHalfPoints( sal_Int32 nFontSize ) +{ + GetSmDocShell()->SetFontSizeInHalfPoints(nFontSize); +} + Size SmModel::getFormulaSize() const { return o3tl::convert(GetSmDocShell()->GetSize(), SmO3tlLengthUnit(), o3tl::Length::mm100); diff --git a/sw/qa/extras/ooxmlexport/data/math-font-size.docx b/sw/qa/extras/ooxmlexport/data/math-font-size.docx new file mode 100644 index 0000000000000000000000000000000000000000..55fdda889f35ba28ec22d00e31cbbea58b6c8946 GIT binary patch literal 1970 zcmWIWW@Zs#U|`^2*q&?_>#y=}{cj*okBNan7)VDu=jWBA=9R>UR2HNb$Ldw&=B%A~ z*6*-^K+F4DuG8Tn)&&k6sxKSoD;H?+Z`fqs8T$X^>uJy47S6iFyy{fzVq0tD`DL@e z9*o>}+(qrjwEJDNjK64QJZ_&>pBJ~9{hUVg^@Qf*)BHVZ?yjA6R%Bv?VRhEe8O1eI zCSB>^^JwYVr%~&{S5&#o(JdfaBH-TDuX{rdrhnOas+jHltn@dD>BiNTQ{J;KxnWry z_3YWIY0f>@G)}lq+pMMkODJkr(w*wR-RrC-c0RH>cOgUR?i{Imr_&}~JYlEs)Vx5| zuda2;QogL`UadR$sut>h*&A5#?R=&oYpYA@({o*$A07B%Z>ixg_VT~xv^(>wD)*Fa z|HT#n3@a{Rs4#%T3e12KY(P4`C^e^8AEX8mo>rdH4I6=S+Kdbg+;BB|AeFu6t@#ca z@UT7DyS!u1~tU9_3f;-2r%#?~bvk^BFjj``ioXP)#aW~EDB zNo8eOTM!g|^nuYFvuXvyLhYY#bc`YloUV(Vl}w-a$#2eOwMGWC7g%*X|~&f)soj&kGnJuA>><@rS^NS?P%F^iQ9o5~Xm^!Nl81_nWx zl9c@9(p+GQ0wtxRQ_kiAgP`Gkb(hxnhk3Iuglu&c7B*MmyUpBkW$DyU!ABR$R{vU> z$;fNAkvT(LePi)@n#@%~)w>mCQeRhUy1AsD^O9t=$u$m@PgA_!9lkQ_>AdXRuGsx%dpGRm=-@Ps`N1UB-LlPf+T=$; zZkj*1EA{`zPMxvz_)GJHm)EtWCT>~0!rP*A*SQ;WR&QNfxrOINY|!2et5E0n9`osi%e&Tv``e{uCT&+&HJ(^yNN(bKO^~c1*g>`_C(y%}_=7+^MTm z(?5yKKc8~pZFfs@lEs1-Yj+)F-pTVh`MCQGrmy=A*ZR+7;%WIgcR#1o!>}?A!4pZE_fi9tS`88=j5w%e$R_}68)9cOtFZRHF z?$U3JxYHjfXMxinwk$X^I&RN;paL0S7|5V1L{5v)Jb9YykbwZ}h1&f}XYMU4RaElb zEx0gxrM$qTm&~7)gpdB)%V;hZvttiW@jIW(d)FlT_iU+9U!bR*@M6mK?%6DN+D^aY z=$TX!CG|ewKo?7Fv`M&$(No!3(;ak_`&iCswhBLAlD1`%m;8mNCtoa{s(IYvqr%l# zzZ2g>OCNl^-B6aiDUQ2i@480b>;v^V_I=%lHiz?f>-}BvU`p8J_vy_&!fK53W760w zZhtuIpZgJ59x*b>F(XPF^wJyXTLz%78MZWnSXjz(hyl2ZG>|q11_6e@jygbdV4;g@ zDS8nH(gCqF0ImldxcDpsl^_rRvP=tD`#{SRgk9K56p$8(UA{0a$Z?7uKIqv2q5V8F z)J8<+z~@|0f`b5%b5{Y&H #include #include +#include #include #include #include @@ -419,6 +420,37 @@ CPPUNIT_TEST_FIXTURE(Test, testTableAlignmentFromTableStyle) verify(); } +CPPUNIT_TEST_FIXTURE(Test, testEquationFontSize) +{ + // Each equation is drawn at the size its run properties give it, and an equation whose runs + // give none takes the 11pt of the text around it. Without the fix all three came out at the + // 12pt default of the formula editor. + createSwDoc("math-font-size.docx"); + + const sal_Int16 aExpectedSizes[] = { 8, 11, 20 }; + for (size_t i = 0; i < std::size(aExpectedSizes); ++i) + { + uno::Reference xFormula(getShape(i + 1), + uno::UNO_QUERY); + CPPUNIT_ASSERT(xFormula.is()); + CPPUNIT_ASSERT_EQUAL( + aExpectedSizes[i], + getProperty(xFormula->getEmbeddedObject(), u"BaseFontHeight"_ustr)); + } + + save(TestFilter::DOCX); + + xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr); + // The size goes back out on the equation's runs, in half points, so the sizes survive a + // round trip. Without the fix the export wrote no size at all. + assertXPath(pXmlDoc, "//w:p[1]/m:oMath/m:r/w:rPr/w:sz", "val", u"16"); + assertXPath(pXmlDoc, "//w:p[2]/m:oMath/m:r/w:rPr/w:sz", "val", u"22"); + assertXPath(pXmlDoc, "//w:p[3]/m:oMath/m:f/m:num/m:r/w:rPr/w:sz", "val", u"40"); + // The fraction bar is drawn by the fraction itself, and takes its size from the control + // properties rather than from the runs above and below it. + assertXPath(pXmlDoc, "//w:p[3]/m:oMath/m:f/m:fPr/m:ctrlPr/w:rPr/w:sz", "val", u"40"); +} + } // end of anonymous namespace CPPUNIT_PLUGIN_IMPLEMENT(); diff --git a/sw/qa/uitest/writer_tests6/tdf157569_formula_font_size.py b/sw/qa/uitest/writer_tests6/tdf157569_formula_font_size.py index 59b3b56f3c74..988070f54081 100644 --- a/sw/qa/uitest/writer_tests6/tdf157569_formula_font_size.py +++ b/sw/qa/uitest/writer_tests6/tdf157569_formula_font_size.py @@ -20,13 +20,13 @@ class tdf157569(UITestCase): nHeight = xShape.getSize().Height nWidth = xShape.getSize().Width - # Without the fix in place, this test would have failed with - # AssertionError: 1663 != 944 - self.assertEqual(1663, nHeight) + # The formula takes the 11pt of the text around it, which the document defaults + # hold, rather than the 12pt default of the formula editor. + self.assertEqual(1529, nHeight) if platform.system() == "Windows": - self.assertEqual(2157, nWidth) # no idea why it's different on Windows + self.assertEqual(1976, nWidth) # no idea why it's different on Windows else: - self.assertEqual(2118, nWidth) + self.assertEqual(1940, nWidth) xDoc = self.xUITest.getTopFocusWindow() xEditWin = xDoc.getChild("writer_edit") diff --git a/sw/source/writerfilter/dmapper/DomainMapper_Impl.cxx b/sw/source/writerfilter/dmapper/DomainMapper_Impl.cxx index 11a4646e1f7c..b015ec1112bb 100644 --- a/sw/source/writerfilter/dmapper/DomainMapper_Impl.cxx +++ b/sw/source/writerfilter/dmapper/DomainMapper_Impl.cxx @@ -3844,9 +3844,21 @@ void DomainMapper_Impl::appendStarMath( const Value& val ) uno::Any(sal_Int32(0))); xComponentProperties->setPropertyValue(getPropertyName( PROP_BOTTOM_MARGIN ), uno::Any(sal_Int32(0))); + + auto* pFormula = dynamic_cast(xInterface.get()); + // A formula whose own markup carries no font size is drawn at the size of the text + // around it, which the styles and the document defaults hold. + double fCharHeight = 0; + if (pFormula && pFormula->getFormulaFontSizeInHalfPoints() == 0 + && (GetAnyProperty(PROP_CHAR_HEIGHT, GetTopContextOfType(CONTEXT_CHARACTER)) + >>= fCharHeight)) + { + pFormula->setFormulaFontSizeInHalfPoints(std::lround(fCharHeight * 2)); + } + Size size( 1000, 1000 ); - if( oox::FormulaImExportBase* formulaimport = dynamic_cast< oox::FormulaImExportBase* >( xInterface.get())) - size = formulaimport->getFormulaSize(); + if( pFormula ) + size = pFormula->getFormulaSize(); xStarMath->setPropertyValue(getPropertyName( PROP_WIDTH ), uno::Any( sal_Int32(size.Width()))); xStarMath->setPropertyValue(getPropertyName( PROP_HEIGHT ), From 984efa1ff7b169a5ee93710f378d0ace6a022283 Mon Sep 17 00:00:00 2001 From: Mike Kaganski Date: Mon, 28 Sep 2026 09:27:28 +0000 Subject: [PATCH 053/289] Simplify ChartExport::exportHatch Make it fill the Hatch struct in all three cases, and only write it in one place, for consistency. Change-Id: Ibf4eb97e1c7046a5fe7397509fff9560140b5eef Signed-off-by: Mike Kaganski Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/13683 Reviewed-by: Noel Grandin Tested-by: Jenkins CPCI (cherry picked from commit f14a9a4d3d45b08da075aa5a34b8d7daa5cae6a4) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211597 Tested-by: Jenkins Reviewed-by: Xisco Fauli --- oox/source/export/chartexport.cxx | 38 ++++++++++++++----------------- 1 file changed, 17 insertions(+), 21 deletions(-) diff --git a/oox/source/export/chartexport.cxx b/oox/source/export/chartexport.cxx index 81e83411217b..998c38fbb79a 100644 --- a/oox/source/export/chartexport.cxx +++ b/oox/source/export/chartexport.cxx @@ -3224,21 +3224,16 @@ void ChartExport::exportHatch( const Reference< XPropertySet >& xPropSet ) if (!xPropSet.is()) return; - OUString aHatchName; - if (GetProperty(xPropSet, u"FillHatchName"_ustr)) - mAny >>= aHatchName; + css::drawing::Hatch aHatch; + bool bHatchFound = false; - if (!aHatchName.isEmpty()) + if (OUString aHatchName; GetProperty(xPropSet, u"FillHatchName"_ustr) && (mAny >>= aHatchName) + && !aHatchName.isEmpty()) { uno::Reference< lang::XMultiServiceFactory > xFact( getModel(), uno::UNO_QUERY ); uno::Reference< container::XNameAccess > xHatchTable( xFact->createInstance(u"com.sun.star.drawing.HatchTable"_ustr), uno::UNO_QUERY ); - css::drawing::Hatch aHatch; - if (xHatchTable.is() && xHatchTable->hasByName(aHatchName) - && (xHatchTable->getByName(aHatchName) >>= aHatch)) - { - WritePattFill(xPropSet, aHatch); - return; - } + if (xHatchTable.is() && xHatchTable->hasByName(aHatchName)) + bHatchFound = (xHatchTable->getByName(aHatchName) >>= aHatch); } // tdf#116148: the fill style is a hatch, but there is no hatch to name: the @@ -3246,22 +3241,23 @@ void ChartExport::exportHatch( const Reference< XPropertySet >& xPropSet ) // OOXML has no matching default - leaving the fill out makes PowerPoint // apply its own, which is solid - so the effective hatch has to be written // out explicitly. - if (GetProperty(xPropSet, u"FillHatch"_ustr)) + if (!bHatchFound && GetProperty(xPropSet, u"FillHatch"_ustr)) { // A property set that resolves the hatch itself knows better than the // default below. chart2 does not expose the struct today, see the // commented out PROP_FILL_HATCH in chart2/source/inc/FillProperties.hxx. - WritePattFill(xPropSet); - return; + bHatchFound = (mAny >>= aHatch); } - // Same default the item pool hands out, see SdrItemPool in svx/source/svdraw/svdattr.cxx. - const XHatch aDefaultHatch{ COL_DEFAULT_SHAPE_STROKE }; - css::drawing::Hatch aHatch; - aHatch.Style = aDefaultHatch.GetHatchStyle(); - aHatch.Color = sal_Int32(aDefaultHatch.GetColor()); - aHatch.Distance = aDefaultHatch.GetDistance(); - aHatch.Angle = aDefaultHatch.GetAngle().get(); + if (!bHatchFound) + { + // Same default the item pool hands out, see SdrItemPool in svx/source/svdraw/svdattr.cxx. + const XHatch aDefaultHatch{ COL_DEFAULT_SHAPE_STROKE }; + aHatch.Style = aDefaultHatch.GetHatchStyle(); + aHatch.Color = sal_Int32(aDefaultHatch.GetColor()); + aHatch.Distance = aDefaultHatch.GetDistance(); + aHatch.Angle = aDefaultHatch.GetAngle().get(); + } WritePattFill(xPropSet, aHatch); } From e4efd9faf24d07d72ff8338cc502446d950e48bc Mon Sep 17 00:00:00 2001 From: Mike Kaganski Date: Tue, 29 Sep 2026 18:03:21 +0500 Subject: [PATCH 054/289] sw: compare positions, not pointers, when looking for a format redline When a paragraph had a tracked format change before the selection, formatting another author's tracked format change and rejecting the new change kept the other author's formatting. Since commit ee3171adb24a3d720466fa43bec869910333f892 (tdf#143918 sw: fix reject of multiple changes, 2021-08-19), lcl_SetRedline looked for an existing redline over the range, and continued while "pRStt <= rRg.Start()", which compared the addresses of the two positions, not the positions themselves. Compare the positions, and go on while the redline does not start after the end of the range, because since commit b5d0868ef42135beb0329ecb9302ce48b08fa2a8 (cool#15941 sw interdependent redlines: fix creating a fmt on top of ins-then-fmt, 2026-06-17) a redline inside the range counts as well. For some reason, the added unit test fails without the fix only on Windows; on Linux on my system, it passes without the fix. Signed-off-by: Mike Kaganski Change-Id: I396567d8507e800fefcdc643a63ee6ad91b8b8ee Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/13802 Tested-by: Jenkins CPCI Reviewed-by: Miklos Vajna (cherry picked from commit 2da0c4fa2e5284b25f0dca85243a1f8ef5e9506b) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211602 Tested-by: Jenkins Reviewed-by: Xisco Fauli --- sw/qa/core/doc/DocumentRedlineManager.cxx | 53 ++++++++++++++++++ sw/qa/core/doc/data/fmt-twice.docx | Bin 0 -> 12221 bytes .../doc/DocumentContentOperationsManager.cxx | 3 +- 3 files changed, 55 insertions(+), 1 deletion(-) create mode 100644 sw/qa/core/doc/data/fmt-twice.docx diff --git a/sw/qa/core/doc/DocumentRedlineManager.cxx b/sw/qa/core/doc/DocumentRedlineManager.cxx index 3ed6784a1190..a89f8a3c4032 100644 --- a/sw/qa/core/doc/DocumentRedlineManager.cxx +++ b/sw/qa/core/doc/DocumentRedlineManager.cxx @@ -620,6 +620,59 @@ CPPUNIT_TEST_FIXTURE(Test, testFormatThenFormatOther) CPPUNIT_ASSERT_EQUAL(WEIGHT_NORMAL, aSet.Get(RES_CHRATR_WEIGHT).GetValue()); CPPUNIT_ASSERT_EQUAL(ITALIC_NONE, aSet.Get(RES_CHRATR_POSTURE).GetValue()); } + +CPPUNIT_TEST_FIXTURE(Test, testFormatThenFormatAfterOtherFormat) +{ + // Given a "AAA BBB CCC DDD EEE" document with bold format + // redlines authored by Alice: + createSwDoc("fmt-twice.docx"); + SwDocShell* pDocShell = getSwDocShell(); + SwWrtShell* pWrtShell = pDocShell->GetWrtShell(); + SwDoc* pDoc = pDocShell->GetDoc(); + IDocumentRedlineAccess& rIDRA = pDoc->getIDocumentRedlineAccess(); + SwRedlineTable& rRedlines = rIDRA.GetRedlineTable(); + CPPUNIT_ASSERT_EQUAL(static_cast(2), rRedlines.size()); + CPPUNIT_ASSERT_EQUAL(u"Alice"_ustr, rRedlines[1]->GetAuthorString()); + + // When a different author selects the second range and applies italic: + SwModule* pModule = SwModule::get(); + pModule->SetRedlineAuthor(u"Bob"_ustr); + comphelper::ScopeGuard g( + [pModule] { pModule->SetRedlineAuthor(SwResId(STR_REDLINE_UNKNOWN_AUTHOR)); }); + pWrtShell->SttEndDoc(/*bStt=*/true); + // Skip "AAA ". + pWrtShell->Right(SwCursorSkipMode::Chars, /*bSelect=*/false, 4, /*bBasicCall=*/false); + // Select "BBB CCC DDD". + pWrtShell->Right(SwCursorSkipMode::Chars, /*bSelect=*/true, 11, /*bBasicCall=*/false); + SwView& rView = pWrtShell->GetView(); + { + SvxPostureItem aPostureItem(ITALIC_NORMAL, RES_CHRATR_POSTURE); + SfxItemSet aSet( + SfxItemSet::makeFixedSfxItemSet(rView.GetPool())); + aSet.Put(aPostureItem); + pWrtShell->SetAttrSet(aSet); + } + + // Then make sure Bob's redline replaced Alice's on "BBB CCC DDD": + CPPUNIT_ASSERT_EQUAL(static_cast(2), rRedlines.size()); + CPPUNIT_ASSERT_EQUAL(u"Bob"_ustr, rRedlines[1]->GetAuthorString()); + + // And when rejecting Bob's redline: + pWrtShell->RejectRedline(1, /*bDirect=*/false); + + // Then make sure both Alice's bold and Bob's italic are gone from "BBB CCC DDD": + pWrtShell->SttEndDoc(/*bStt=*/true); + pWrtShell->Right(SwCursorSkipMode::Chars, /*bSelect=*/false, 5, /*bBasicCall=*/false); + SfxItemSet aSet(SfxItemSet::makeFixedSfxItemSet( + pDoc->GetAttrPool())); + pWrtShell->GetCurAttr(aSet); + // Without the accompanying fix in place, this test would have failed with: + // - Expected: 5 (WEIGHT_NORMAL) + // - Actual : 8 (WEIGHT_BOLD) + // i.e. Alice's bold survived the reject. + CPPUNIT_ASSERT_EQUAL(WEIGHT_NORMAL, aSet.Get(RES_CHRATR_WEIGHT).GetValue()); + CPPUNIT_ASSERT_EQUAL(ITALIC_NONE, aSet.Get(RES_CHRATR_POSTURE).GetValue()); +} } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/qa/core/doc/data/fmt-twice.docx b/sw/qa/core/doc/data/fmt-twice.docx new file mode 100644 index 0000000000000000000000000000000000000000..53e68d550d6453329c82d51d77bccdfff4352054 GIT binary patch literal 12221 zcma*N1ymf%7B)H%T!K3Rf%2rWWkK&?ZnQDp*9Wi?W*H%4@vr2S9jELv zf>dS*($x$DOt-5{0>ieg725Ry0jzfl2x095oxk+TvVfbO59w>62;#1JT4!=$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qTe4}&Y|e;EENhx`-&XX5Y=zMlL)_el literal 0 HcmV?d00001 diff --git a/sw/source/core/doc/DocumentContentOperationsManager.cxx b/sw/source/core/doc/DocumentContentOperationsManager.cxx index e3ec6f13bd30..bf81bb73ca9a 100644 --- a/sw/source/core/doc/DocumentContentOperationsManager.cxx +++ b/sw/source/core/doc/DocumentContentOperationsManager.cxx @@ -1293,7 +1293,8 @@ namespace //local functions originally from docfmt.cxx } } } - } while( pRStt <= rRg.Start() && ++nRedlPos < rDoc.getIDocumentRedlineAccess().GetRedlineTable().size()); + } while (*pRStt <= *rRg.End() + && ++nRedlPos < rDoc.getIDocumentRedlineAccess().GetRedlineTable().size()); } if (!xExtra && bExistingFormatRedlineAtRange) { From d00d192770347752ed700962ef08b5d2494be017 Mon Sep 17 00:00:00 2001 From: Mike Kaganski Date: Mon, 21 Sep 2026 21:09:22 +0500 Subject: [PATCH 055/289] tdf#157028 vcl: write the structure tree into object streams Turning Tagged PDF on added 2.4 MB to the reporter's document, 2.0 MB of that its structure tree: 12562 elements, each its own top-level object, uncompressed, and each costing a further 20 bytes in the cross-reference table. The elements go into /Type/ObjStm streams of 200 now, with the parent and ID trees. The cross-reference has to become a /Type/XRef stream with them, because a table cannot address an object inside another object. PDF 1.5 introduced both, so a PDF/A-1b file keeps the plain form. So does an encrypted file, since a string in an object stream shall not be separately encrypted, and this writer encrypts strings as it builds the object. So does a hybrid file, because sdext reads the embedded original document out of a trailer. The reporter's document exported 3157118 bytes tagged before the change and 1086230 after, against 769448 untagged either way. An 8300-row Writer table exported 4017140 bytes tagged before and 500967 after, against 73183 untagged. testTdf159066 and testTdf173162 grep the exported bytes for something the structure tree carries, /Alt< and the /Namespaces array. They inflate the object streams first now. testListLabelPDFExport counted its List element in the token stream, and asks GetObjects() for it. Signed-off-by: Mike Kaganski Change-Id: I1e27dc3a8f43aa8b6c75ae930615c8d4b4645627 Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/13209 Reviewed-by: Miklos Vajna Tested-by: Jenkins CPCI (cherry picked from commit ad4bb8ae080aba98080dfaabd688dfdb48cf7ade) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211556 Reviewed-by: Xisco Fauli Tested-by: Jenkins --- include/vcl/filter/pdfobjectcontainer.hxx | 8 + sc/qa/extras/scpdfexport.cxx | 29 ++- vcl/inc/pdf/pdfwriter_impl.hxx | 39 +++- vcl/qa/cppunit/pdfexport/pdfexport2.cxx | 74 +++++- vcl/source/pdf/pdfwriter_impl.cxx | 271 +++++++++++++++++----- 5 files changed, 359 insertions(+), 62 deletions(-) diff --git a/include/vcl/filter/pdfobjectcontainer.hxx b/include/vcl/filter/pdfobjectcontainer.hxx index f0e29142e771..b8daf00e402b 100644 --- a/include/vcl/filter/pdfobjectcontainer.hxx +++ b/include/vcl/filter/pdfobjectcontainer.hxx @@ -9,6 +9,9 @@ #pragma once +#include + +#include #include #include @@ -35,6 +38,11 @@ public: return writeBufferBytes(aBuffer.data(), aBuffer.size()); } + template bool writeBuffer(const rtl::OStringConcat& rConcat) + { + return writeBuffer(rtl::Concat2View(rConcat)); + } + virtual void checkAndEnableStreamEncryption(sal_Int32 nObject) = 0; virtual void disableStreamEncryption() = 0; diff --git a/sc/qa/extras/scpdfexport.cxx b/sc/qa/extras/scpdfexport.cxx index 3d34a58abf7b..fd1b8fd9fd97 100644 --- a/sc/qa/extras/scpdfexport.cxx +++ b/sc/qa/extras/scpdfexport.cxx @@ -94,10 +94,31 @@ bool ScPDFExportTest::hasTextInPdf(const char* sText, bool& bFound) const std::size_t nRead = pStream->ReadBytes(pBuffer, nFileSize); if (nRead == nFileSize) { - const std::string haystack(pBuffer, pBuffer + nFileSize); - const std::string needle(sText); - const std::size_t n = haystack.find(needle); - bFound = (n != std::string::npos); + std::string haystack(pBuffer, pBuffer + nFileSize); + // what the writer put in an object stream stands in the file as deflated bytes only + vcl::filter::PDFDocument aDocument; + SvMemoryStream aFile(pBuffer, nFileSize, StreamMode::READ); + if (aDocument.Read(aFile)) + { + for (auto* pObject : aDocument.GetObjects()) + { + auto pType + = dynamic_cast(pObject->Lookup("Type"_ostr)); + if (!pType || pType->GetValue() != "ObjStm") + continue; + vcl::filter::PDFStreamElement* pObjStm = pObject->GetStream(); + CPPUNIT_ASSERT(pObjStm); + SvMemoryStream aDecompressed; + ZCodec aCodec; + aCodec.BeginCompression(); + pObjStm->GetMemory().Seek(0); + aCodec.Decompress(pObjStm->GetMemory(), aDecompressed); + CPPUNIT_ASSERT(aCodec.EndCompression() >= 0); + haystack.append(static_cast(aDecompressed.GetData()), + aDecompressed.GetSize()); + } + } + bFound = haystack.find(std::string(sText)) != std::string::npos; } delete[] pBuffer; diff --git a/vcl/inc/pdf/pdfwriter_impl.hxx b/vcl/inc/pdf/pdfwriter_impl.hxx index a4ce2a820c68..65366b43360e 100644 --- a/vcl/inc/pdf/pdfwriter_impl.hxx +++ b/vcl/inc/pdf/pdfwriter_impl.hxx @@ -667,6 +667,29 @@ struct StreamRedirect ResourceDict m_aResourceDict; }; +/** Where the cross-reference has to point to reach an object. + + ISO 32000-2 7.5.8.3 Table 18 calls these the type 1 and type 2 entries: an object written + into the file has a byte offset, one written into an object stream names that stream and its + index in it. + */ +struct ObjectLocation +{ + sal_uInt64 m_nOffset = SAL_MAX_UINT64; + /// the object stream holding it, 0 when the object stands in the file + sal_Int32 m_nObjectStream = 0; + sal_Int32 m_nIndex = 0; + + bool isCompressed() const { return m_nObjectStream != 0; } +}; + +/// An object built but not yet written, held until its object stream is full. +struct PendingObject +{ + sal_Int32 m_nObject; + OString m_aBody; +}; + // graphics state struct GraphicsState { @@ -738,8 +761,10 @@ private: MapMode m_aMapMode; // PDFWriterImpl scaled units StyleSettings m_aWidgetStyleSettings; std::vector< PDFPage > m_aPages; - /* maps object numbers to file offsets (needed for xref) */ - std::vector< sal_uInt64 > m_aObjects; + /* maps object numbers to where they were written (needed for xref) */ + std::vector m_aObjects; + /* objects waiting to be flushed into an object stream, with their numbers */ + std::vector m_aCompressedObjects; /* contains Bitmaps until they are written to the * file stream as XObjects*/ std::list< BitmapEmit > m_aBitmaps; @@ -1067,6 +1092,16 @@ private: sal_Int32 emitEncrypt(); // writes xref and trailer bool emitTrailer(); + /// whether this file may carry object streams and a cross-reference stream + bool useObjectStreams() const; + /// writes a whole object, into an object stream where the file may have one + bool writeObject(sal_Int32 nObject, std::string_view aBody); + /// writes an object's body into the pending object stream rather than into the file + bool writeCompressedObject(sal_Int32 nObject, std::string_view aBody); + /// flushes the objects waiting in m_aCompressedObjects as one /Type/ObjStm + bool emitObjectStream(); + /// writes the cross-reference as a stream, the only form that can reach an object stream + bool emitXRefStream(std::string_view aTrailerEntries); // emits info dict (if applicable) sal_Int32 emitInfoDict( ); diff --git a/vcl/qa/cppunit/pdfexport/pdfexport2.cxx b/vcl/qa/cppunit/pdfexport/pdfexport2.cxx index a4658fa3f690..3647fc96b55f 100644 --- a/vcl/qa/cppunit/pdfexport/pdfexport2.cxx +++ b/vcl/qa/cppunit/pdfexport/pdfexport2.cxx @@ -2227,12 +2227,30 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest2, testTdf173162) aNamespaceOf.contains(pRef->LookupObject())); } - // The references have to be separated in the file itself: "1 0 R2 0 R" is not two - // references, and this parser reads it as though it were, so check the bytes. veraPDF is + // The references have to be separated in the bytes themselves: "1 0 R2 0 R" is not two + // references, and this parser reads it as though it were, so check them. veraPDF is // stricter - it fails to parse such a file and reports nothing, which reads as a pass. + // The structure tree rides in an object stream, so the bytes to read are what it holds. + OStringBuffer aBytes; + for (auto* pObject : aDocument.GetObjects()) + { + auto pType = dynamic_cast(pObject->Lookup("Type"_ostr)); + if (!pType || pType->GetValue() != "ObjStm") + continue; + vcl::filter::PDFStreamElement* pObjStm = pObject->GetStream(); + CPPUNIT_ASSERT(pObjStm); + SvMemoryStream aDecompressed; + ZCodec aCodec; + aCodec.BeginCompression(); + pObjStm->GetMemory().Seek(0); + aCodec.Decompress(pObjStm->GetMemory(), aDecompressed); + CPPUNIT_ASSERT(aCodec.EndCompression() >= 0); + aBytes.append(static_cast(aDecompressed.GetData()), aDecompressed.GetSize()); + } SvStream* pStream = maTempFile.GetStream(StreamMode::READ); pStream->Seek(0); - const OString aFile(read_uInt8s_ToOString(*pStream, pStream->remainingSize())); + aBytes.append(read_uInt8s_ToOString(*pStream, pStream->remainingSize())); + const OString aFile(aBytes.makeStringAndClear()); const sal_Int32 nStart(aFile.indexOf("/Namespaces [")); CPPUNIT_ASSERT_GREATER(sal_Int32(-1), nStart); const sal_Int32 nEnd(aFile.indexOf("]", nStart)); @@ -2280,6 +2298,56 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest2, testTdf173162) CPPUNIT_ASSERT_EQUAL(aPDF20, aNamespaceOfType["FENote"_ostr]); } +CPPUNIT_TEST_FIXTURE(PdfExportTest2, testObjectStreams) +{ + loadFromFile(u"SimpleTestDocument.fodt"); + + // the bytes of the export, since what is asserted is the shape of the file itself + auto aExport = [this](const uno::Sequence& rFilterData) { + comphelper::SequenceAsHashMap aMediaDescriptor; + aMediaDescriptor[u"FilterData"_ustr] <<= rFilterData; + // the temp file hands out one stream and keeps it, so the second export needs a new one + maTempFile.CloseStream(); + save(TestFilter::PDF_WRITER, aMediaDescriptor.getAsConstPropertyValueList()); + maTempFile.CloseStream(); + SvStream* pStream = maTempFile.GetStream(StreamMode::READ); + pStream->Seek(0); + return read_uInt8s_ToOString(*pStream, pStream->remainingSize()); + }; + + const OString aTagged(aExport({ comphelper::makePropertyValue(u"UseTaggedPDF"_ustr, true) })); + CPPUNIT_ASSERT(aTagged.indexOf("/Type/ObjStm") != -1); + CPPUNIT_ASSERT(aTagged.indexOf("/Type/XRef") != -1); + // a cross-reference stream replaces the table, so neither the keyword nor a table is left + CPPUNIT_ASSERT_EQUAL(sal_Int32(-1), aTagged.indexOf("\ntrailer\n")); + + // the structure tree has to stay reachable through all of that + vcl::filter::PDFDocument aDocument; + SvFileStream aStream(maTempFile.GetURL(), StreamMode::READ); + CPPUNIT_ASSERT(aDocument.Read(aStream)); + int nStructElements(0); + for (auto* pObject : aDocument.GetObjects()) + { + auto pType = dynamic_cast(pObject->Lookup("Type"_ostr)); + if (pType && pType->GetValue() == "StructElem") + ++nStructElements; + } + CPPUNIT_ASSERT_GREATER(0, nStructElements); + + // ISO 32000-2 7.5.7 put object streams at PDF 1.5, and PDF/A-1b is built on 1.4 + const OString aArchive( + aExport({ comphelper::makePropertyValue(u"SelectPdfVersion"_ustr, sal_Int32(1)) })); + CPPUNIT_ASSERT_EQUAL(sal_Int32(-1), aArchive.indexOf("/Type/ObjStm")); + CPPUNIT_ASSERT(aArchive.indexOf("\ntrailer\n") != -1); + + // sdext finds the embedded original document through the trailer, so a hybrid file keeps one + const OString aHybrid(aExport({ comphelper::makePropertyValue(u"UseTaggedPDF"_ustr, true), + comphelper::makePropertyValue(u"IsAddStream"_ustr, true) })); + CPPUNIT_ASSERT_EQUAL(sal_Int32(-1), aHybrid.indexOf("/Type/ObjStm")); + CPPUNIT_ASSERT(aHybrid.indexOf("/AdditionalStreams ") != -1); + CPPUNIT_ASSERT(aHybrid.indexOf("\ntrailer\n") != -1); +} + CPPUNIT_TEST_FIXTURE(PdfExportTest2, testTdf166963) { // Takes about two minutes locally, most of it in the PDFDocument below, which rescans its diff --git a/vcl/source/pdf/pdfwriter_impl.cxx b/vcl/source/pdf/pdfwriter_impl.cxx index e1717e082ef1..a235af9b7cd8 100644 --- a/vcl/source/pdf/pdfwriter_impl.cxx +++ b/vcl/source/pdf/pdfwriter_impl.cxx @@ -24,6 +24,7 @@ #include #include +#include #include #include @@ -127,6 +128,29 @@ namespace void removePlaceholderSE(std::vector & rStructure, PDFStructureElement& rEle); +// a reader inflates a whole object stream to reach any one object in it +constexpr size_t nMaxObjectsPerStream = 200; + +// deflates a buffer for a /FlateDecode stream whose /Length has to be known before it is written +std::vector deflateBuffer(std::string_view aData) +{ + if (g_bDebugDisableCompression) + return { aData.begin(), aData.end() }; + + SvMemoryStream aInput(const_cast(aData.data()), aData.size(), StreamMode::READ); + SvMemoryStream aOutput(aData.size(), 0x4000); + ZCodec aCodec(0x4000, 0x4000); + aCodec.BeginCompression(); + aCodec.Compress(aInput, aOutput); + // it answers with the bytes it took, and a short count would leave a stream that does not + // hold what its /Length claims + if (aCodec.EndCompression() != static_cast(aData.size())) + return {}; + + const sal_uInt8* pBegin = static_cast(aOutput.GetData()); + return { pBegin, pBegin + aOutput.Tell() }; +} + // the types ISO 32000-2 14.8.6 left out of the PDF 2.0 standard structure namespace bool isPDF17OnlyType(StructElement eType) { @@ -795,7 +819,7 @@ void PDFWriterImpl::endPage() sal_Int32 PDFWriterImpl::createObject() { - m_aObjects.push_back( ~0U ); + m_aObjects.emplace_back(); return m_aObjects.size(); } @@ -804,7 +828,7 @@ bool PDFWriterImpl::updateObject( sal_Int32 n ) if( ! m_bOpen ) return false; - sal_uInt64 nOffset = ~0U; + sal_uInt64 nOffset = SAL_MAX_UINT64; osl::File::RC aError = m_aFile.getPos(nOffset); SAL_WARN_IF( aError != osl::File::E_None, "vcl.pdfwriter", "could not register object" ); if (aError != osl::File::E_None) @@ -812,19 +836,94 @@ bool PDFWriterImpl::updateObject( sal_Int32 n ) m_aFile.close(); m_bOpen = false; } - m_aObjects[ n-1 ] = nOffset; + m_aObjects[n - 1].m_nOffset = nOffset; return aError == osl::File::E_None; } +bool PDFWriterImpl::useObjectStreams() const +{ + if (m_aContext.Version < PDFWriter::PDFVersion::PDF_1_5) + return false; + // a string in an object stream shall not be separately encrypted, while this writer + // encrypts every string as it builds the object + if (m_aContext.Encryption.canEncrypt()) + return false; + // sdext reads the embedded original document out of a trailer, and a cross-reference + // stream leaves none + return m_aDocumentAttachedFiles.empty(); +} + +bool PDFWriterImpl::writeObject(sal_Int32 nObject, std::string_view aBody) +{ + if (useObjectStreams()) + return writeCompressedObject(nObject, aBody); + + return updateObject(nObject) && writeBuffer(OString::number(nObject) + " 0 obj\n") + && writeBuffer(aBody) && writeBuffer("\nendobj\n\n"); +} + +bool PDFWriterImpl::writeCompressedObject(sal_Int32 nObject, std::string_view aBody) +{ + m_aCompressedObjects.emplace_back(nObject, OString(aBody)); + + return m_aCompressedObjects.size() < nMaxObjectsPerStream || emitObjectStream(); +} + +bool PDFWriterImpl::emitObjectStream() +{ + if (m_aCompressedObjects.empty()) + return true; + + // ISO 32000-2 7.5.7: /N pairs of object number and offset, then the bodies at /First + OStringBuffer aPairs(12 * m_aCompressedObjects.size()); + OStringBuffer aBodies(4096); + const sal_Int32 nStreamObject = createObject(); + for (const auto& rPending : m_aCompressedObjects) + { + aPairs.append(OString::number(rPending.m_nObject) + " " + + OString::number(aBodies.getLength()) + " "); + aBodies.append(rPending.m_aBody + "\n"); + } + + const sal_Int32 nFirst = aPairs.getLength(); + aPairs.append(aBodies.makeStringAndClear()); + const std::vector aStream(deflateBuffer(aPairs)); + if (aStream.empty()) + return false; + + OStringBuffer aLine(256); + aLine.append(OString::number(nStreamObject) + " 0 obj\n<(m_aCompressedObjects.size())) + "/First " + + OString::number(nFirst) + "/Length " + + OString::number(static_cast(aStream.size()))); + if (!g_bDebugDisableCompression) + aLine.append("/Filter/FlateDecode"); + aLine.append(">>\nstream\n"); + + if (!updateObject(nStreamObject) || !writeBuffer(aLine) + || !writeBufferBytes(aStream.data(), aStream.size()) + || !writeBuffer("\nendstream\nendobj\n\n")) + return false; + + // only now can an entry name the stream, which is in the file + sal_Int32 nIndex = 0; + for (const auto& rPending : m_aCompressedObjects) + { + m_aObjects[rPending.m_nObject - 1] + = { .m_nObjectStream = nStreamObject, .m_nIndex = nIndex }; + ++nIndex; + } + m_aCompressedObjects.clear(); + return true; +} + sal_Int32 PDFWriterImpl::emitStructParentTree( sal_Int32 nObject ) { if( nObject > 0 ) { OStringBuffer aLine( PDFWRITER_IMPL_BUFFERSIZE ); - aLine.append( OString::number(nObject) - + " 0 obj\n" - "<>\nendobj\n\n" ); - if (!updateObject(nObject)) - return 0; - if (!writeBuffer(aLine)) + aLine.append("]>>"); + if (!writeObject(nObject, aLine)) return 0; } return nObject; @@ -862,7 +959,6 @@ sal_Int32 PDFWriterImpl::emitStructIDTree(sal_Int32 const nObject) } OStringBuffer buf; COSWriter aWriter(buf, m_aContext.Encryption.getParams(), m_pPDFEncryptor); - appendObjectID(nObject, buf); buf.append("<>\nendobj\n\n"); + buf.append("] >>"); - if (!updateObject(nObject)) return 0; - if (!writeBuffer(buf)) return 0; + if (!writeObject(nObject, buf)) + return 0; return nObject; } @@ -1179,10 +1275,7 @@ sal_Int32 PDFWriterImpl::emitStructure( PDFStructureElement& rEle ) OStringBuffer aLine( 512 ); COSWriter aWriter(aLine, m_aContext.Encryption.getParams(), m_pPDFEncryptor); - aLine.append( - OString::number(rEle.m_nObject) - + " 0 obj\n" - "<>\nendobj\n\n" ); + aLine.append(">>"); - if (!updateObject(rEle.m_nObject)) return 0; - if (!writeBuffer(aLine)) return 0; + if (!writeObject(rEle.m_nObject, aLine)) + return 0; if (!emitStructParentTree(nParentTree)) return 0; if (!emitStructIDTree(nIDTree)) return 0; @@ -4551,6 +4644,8 @@ bool PDFWriterImpl::emitCatalog() addInternalStructureContainer(0); nStructureDict = m_aStructure[0].m_nObject = createObject(); emitStructure( m_aStructure[ 0 ] ); + if (!emitObjectStream()) + return false; } // adjust tree node file offset @@ -5425,34 +5520,41 @@ bool PDFWriterImpl::emitTrailer() { nSecObject = emitEncrypt(); } - // emit xref table - // remember start + // a cross-reference table cannot address an object inside an object stream + const bool bXRefStream = std::ranges::any_of(m_aObjects, &ObjectLocation::isCompressed); + sal_uInt64 nXRefOffset = 0; - if (osl::File::E_None != m_aFile.getPos(nXRefOffset)) - return false; - if (!writeBuffer("xref\n")) - return false; - - sal_Int32 nObjects = m_aObjects.size(); OStringBuffer aLine; - aLine.append( "0 " ); - aLine.append( static_cast(nObjects+1) ); - aLine.append( "\n" ); - aLine.append( "0000000000 65535 f \n" ); - if (!writeBuffer(aLine)) - return false; - - for( sal_Int32 i = 0; i < nObjects; i++ ) + if (!bXRefStream) { - aLine.setLength( 0 ); - OString aOffset = OString::number( m_aObjects[i] ); - for( sal_Int32 j = 0; j < (10-aOffset.getLength()); j++ ) - aLine.append( '0' ); - aLine.append( aOffset ); - aLine.append( " 00000 n \n" ); - SAL_WARN_IF( aLine.getLength() != 20, "vcl.pdfwriter", "invalid xref entry" ); + // emit the xref table, remembering where it starts + if (osl::File::E_None != m_aFile.getPos(nXRefOffset)) + return false; + if (!writeBuffer("xref\n")) + return false; + + aLine.append("0 "); + aLine.append(static_cast(m_aObjects.size() + 1)); + aLine.append("\n"); + aLine.append("0000000000 65535 f \n"); if (!writeBuffer(aLine)) return false; + + for (const auto& rLocation : m_aObjects) + { + if (rLocation.m_nOffset == SAL_MAX_UINT64) + { + SAL_WARN("vcl.pdfwriter", "object was created but never written"); + if (!writeBuffer("0000000000 65535 f \n")) + return false; + continue; + } + auto aOffset(OString::number(rLocation.m_nOffset)); + aLine = RepeatedChar('0', 10 - aOffset.length) + aOffset + " 00000 n \n"; + SAL_WARN_IF(aLine.getLength() != 20, "vcl.pdfwriter", "invalid xref entry"); + if (!writeBuffer(aLine)) + return false; + } } // prepare document checksum @@ -5463,9 +5565,6 @@ bool PDFWriterImpl::emitTrailer() // document id set in setDocInfo method // emit trailer aLine.setLength( 0 ); - aLine.append( "trailer\n" - "<(nObjects+1) ); aLine.append( "/Root " ); aLine.append( m_nCatalogObject ); aLine.append( " 0 R\n" ); @@ -5530,12 +5629,78 @@ bool PDFWriterImpl::emitTrailer() // Assertion failure: rv == SECSuccess, at sechash.c:140 m_DocDigest.initialize(); - aLine.append( ">>\n" - "startxref\n" ); - aLine.append( static_cast(nXRefOffset) ); - aLine.append( "\n" - "%%EOF\n" ); - return writeBuffer( aLine ); + if (bXRefStream) + return emitXRefStream(aLine); + + return writeBuffer("trailer\n<>\nstartxref\n" + OString::number(static_cast(nXRefOffset)) + + "\n%%EOF\n"); +} + +bool PDFWriterImpl::emitXRefStream(std::string_view aTrailerEntries) +{ + // ISO 32000-2 7.5.8.3 requires an entry for the stream itself + const sal_Int32 nXRefObject = createObject(); + sal_uInt64 nXRefOffset = 0; + if (osl::File::E_None != m_aFile.getPos(nXRefOffset)) + return false; + m_aObjects[nXRefObject - 1].m_nOffset = nXRefOffset; + + // the second field is a byte offset or an object stream number, so measure both + const auto aSecondField = [](const ObjectLocation& rLocation) -> sal_uInt64 { + if (rLocation.isCompressed()) + return rLocation.m_nObjectStream; + // an unwritten object gets a free entry, which has no offset + return rLocation.m_nOffset == SAL_MAX_UINT64 ? 0 : rLocation.m_nOffset; + }; + sal_Int32 nOffsetBytes = 1; + for (sal_uInt64 nWidest = std::ranges::max(m_aObjects | std::views::transform(aSecondField)); + nWidest > 0xff; nWidest >>= 8) + ++nOffsetBytes; + + OStringBuffer aEntries(static_cast((3 + nOffsetBytes) * (m_aObjects.size() + 1))); + auto appendEntry + = [&aEntries, nOffsetBytes](sal_uInt8 nType, sal_uInt64 nSecond, sal_uInt16 nThird) { + aEntries.append(char(nType)); + for (sal_Int32 nByte = nOffsetBytes; nByte-- > 0;) + aEntries.append(char(nSecond >> (8 * nByte))); + aEntries.append(char(nThird >> 8)); + aEntries.append(char(nThird)); + }; + + // object 0 heads the list of free objects, as it does in a table + appendEntry(0, 0, 0xffff); + for (const auto& rLocation : m_aObjects) + { + if (rLocation.isCompressed()) + appendEntry(2, rLocation.m_nObjectStream, rLocation.m_nIndex); + else if (rLocation.m_nOffset == SAL_MAX_UINT64) + appendEntry(0, 0, 0xffff); + else + appendEntry(1, rLocation.m_nOffset, 0); + } + + const std::vector aStream(deflateBuffer(aEntries)); + if (aStream.empty()) + return false; + + OStringBuffer aLine(512); + // 7.5.8.2: every entry of Table 17 shall be direct, and a reader cannot resolve an + // indirect /Length before it has read this stream + aLine.append(OString::number(nXRefObject) + " 0 obj\n<(m_aObjects.size() + 1)) + "/W[1 " + + OString::number(nOffsetBytes) + " 2]/Length " + + OString::number(static_cast(aStream.size()))); + if (!g_bDebugDisableCompression) + aLine.append("/Filter/FlateDecode"); + aLine.append(aTrailerEntries); + aLine.append(">>\nstream\n"); + + // 7.5.8.2 forbids encrypting this stream, so it goes out as built + return writeBuffer(aLine) && writeBufferBytes(aStream.data(), aStream.size()) + && writeBuffer("\nendstream\nendobj\n\nstartxref\n" + + OString::number(static_cast(nXRefOffset)) + "\n%%EOF\n"); } namespace { From 371bfd404fdc30cae7b0c05c64a0993bbee31f89 Mon Sep 17 00:00:00 2001 From: Michael Weghorn Date: Wed, 30 Sep 2026 10:44:36 +0200 Subject: [PATCH 056/289] tdf#173273 basctl: Pass parent iter again in SbTreeListBox::ImpFindEntry Before commit 4887919802c24bd4bca8ff7a98bf3591b8a917c0 Author: Michael Weghorn Date: Thu Jan 1 13:02:42 2026 +0100 basctl: Return std::unique_ptr in SbTreeListBox::ImpFindEntry , SbTreeListBox::ImpFindEntry was using an in/out weld::TreeIter& param that passed the parent. The above commit changed the method to return the result instead of using the out param, but missed that the param was also used as an input parameter. Restore the input parameter, but keep returning the result. The above commit also caused weld::TreeView::iter_children to be caused with an invalid iter, which in combination with commit 9d055f5261b4436527eb7ad2b37fbdb201a11d4d Author: Michael Weghorn Date: Sat Jan 10 21:46:57 2026 +0100 tdf#130857 weld: Filter dummy entries in base weld::TreeView::iter_children would trigger a nullptr dereference for the vcl (SalInstanceTreeView) implementation. Making sure to pass a valid iter fixes that. Also add an assert in SalInstanceTreeView::get_children_on_demand to check that the iter that gets passed is actually valid which would have triggered. Backtrace of the crash seen for the tdf#173273 scenario without this commit in place: 1 __gnu_cxx::__normal_iterator>const *, std::__cxx1998::vector>>>::__normal_iterator stl_iterator.h 1059 0x7fb3db75e001 2 std::__cxx1998::vector>>::begin stl_vector.h 999 0x7fb3db75e001 3 std::__cxx1998::vector>>::empty stl_vector.h 1214 0x7fb3db75cd76 4 SvTreeListEntry::HasChildren treelistentry.cxx 72 0x7fb3db7879ad 5 SalInstanceTreeView::GetPlaceHolderChild salvtables.cxx 3550 0x7fb3dba702d1 6 SalInstanceTreeView::get_children_on_demand salvtables.cxx 4436 0x7fb3dba76ec1 7 weld::TreeView::iter_children TreeView.cxx 165 0x7fb3dbed1735 8 basctl::SbTreeListBox::ImpFindEntry bastype2.cxx 551 0x7fb38b4c0fe2 9 basctl::SbTreeListBox::SetCurrentEntry bastype2.cxx 830 0x7fb38b4c009a 10 basctl::SbTreeListBox::UpdateEntries bastype2.cxx 638 0x7fb38b4c0eba 11 basctl::SbTreeListBox::onDocumentCreated bastype2.cxx 563 0x7fb38b4c11e9 12 basctl::DocumentEventNotifier::Impl::documentEventOccured doceventnotifier.cxx 164 0x7fb38b4f0a39 13 comphelper::OInterfaceContainerHelper4::NotifySingleListener::operator() interfacecontainer4.hxx 322 0x7fb3e1ef39d7 14 comphelper::OInterfaceContainerHelper4::forEach::NotifySingleListener, (anonymous namespace)::SfxGlobalEvents_Impl::implts_notifyListener(com::sun::star::document::DocumentEvent const&)::$_1>(std::unique_lock&, comphelper::OInterfaceContainerHelper4::NotifySingleListenerconst&, (anonymous namespace)::SfxGlobalEvents_Impl::implts_notifyListener(com::sun::star::document::DocumentEvent const&)::$_1 const&) const interfacecontainer4.hxx 387 0x7fb3e1eefdd2 15 comphelper::OInterfaceContainerHelper4::notifyEach(std::unique_lock&, void (com::sun::star::document::XDocumentEventListener:: *)(com::sun::star::document::DocumentEvent const&), com::sun::star::document::DocumentEvent const&, (anonymous namespace)::SfxGlobalEvents_Impl::implts_notifyListener(com::sun::star::document::DocumentEvent const&)::$_1 const&) const interfacecontainer4.hxx 423 0x7fb3e1eef6e4 16 (anonymous namespace)::SfxGlobalEvents_Impl::implts_notifyListener globalevents.cxx 487 0x7fb3e1eef505 17 (anonymous namespace)::SfxGlobalEvents_Impl::documentEventOccured globalevents.cxx 226 0x7fb3e1eece4f 18 (anonymous namespace)::NotifySingleListenerIgnoreRE::operator() sfxbasemodel.cxx 3338 0x7fb3e1e79127 19 comphelper::OInterfaceContainerHelper3::forEach<(anonymous namespace)::NotifySingleListenerIgnoreRE> interfacecontainer3.hxx 278 0x7fb3e1e6ab15 20 SfxBaseModel::postEvent_Impl sfxbasemodel.cxx 3372 0x7fb3e1e6a263 21 SfxBaseModel::Notify sfxbasemodel.cxx 3005 0x7fb3e1e6976c 22 SfxBroadcaster::Broadcast SfxBroadcaster.cxx 43 0x7fb3e0f3d0bc 23 (anonymous namespace)::SfxEventAsyncer_Impl::IdleHdl appcfg.cxx 109 0x7fb3e1848ce9 24 (anonymous namespace)::SfxEventAsyncer_Impl::LinkStubIdleHdl appcfg.cxx 102 0x7fb3e184885d 25 Link::Call link.hxx 105 0x7fb3dbb3bda1 26 Timer::Invoke timer.cxx 75 0x7fb3dbb3bc0c 27 Scheduler::CallbackTaskScheduling scheduler.cxx 615 0x7fb3dbae368d 28 SalTimer::CallCallback saltimer.hxx 53 0x7fb3d2709822 29 X11SalData::Timeout saldata.cxx 532 0x7fb3d270801f 30 SalXLib::CheckTimeout saldata.cxx 616 0x7fb3d270853e 31 SalXLib::Yield saldata.cxx 697 0x7fb3d2708c1e 32 X11SalInstance::DoYield salinst.cxx 173 0x7fb3d27259cd 33 InnerYield svapp.cxx 388 0x7fb3dbb0e996 34 Application::Yield svapp.cxx 501 0x7fb3dbb0e21f 35 Application::Execute svapp.cxx 363 0x7fb3dbb0e005 36 desktop::Desktop::Main app.cxx 1679 0x7fb3e5b1de65 37 ImplSVMainRun svmain.cxx 234 0x7fb3dbb38bfc 38 SalInstance::SVMainRun salinst.hxx 108 0x7fb3d2726761 39 ImplSVMain svmain.cxx 221 0x7fb3dbb38122 40 SVMain svmain.cxx 252 0x7fb3dbb39cb9 41 soffice_main sofficemain.cxx 122 0x7fb3e5b979aa 42 sal_main main.c 51 0x55fc90ad69fd 43 main main.c 49 0x55fc90ad69d7 Change-Id: I3b282533ec43fdd37bfdf8739ff51d25197bf8be Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211603 Tested-by: Jenkins Reviewed-by: Michael Weghorn --- basctl/source/basicide/bastype2.cxx | 8 +++++--- basctl/source/inc/bastype2.hxx | 3 ++- vcl/source/app/salvtables.cxx | 1 + 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/basctl/source/basicide/bastype2.cxx b/basctl/source/basicide/bastype2.cxx index e462d651cb5e..27c89017f9f4 100644 --- a/basctl/source/basicide/bastype2.cxx +++ b/basctl/source/basicide/bastype2.cxx @@ -545,9 +545,10 @@ void SbTreeListBox::ReloadAllEntries() } } -std::unique_ptr SbTreeListBox::ImpFindEntry(std::u16string_view rText) +std::unique_ptr SbTreeListBox::ImpFindEntry(const weld::TreeIter& rParentIter, + std::u16string_view rText) { - std::unique_ptr pIter = m_xControl->make_iterator(); + std::unique_ptr pIter = m_xControl->make_iterator(&rParentIter); bool bValidIter = m_xControl->iter_children(*pIter); while (bValidIter) { @@ -827,7 +828,8 @@ void SbTreeListBox::SetCurrentEntry (EntryDescriptor const & rDesc) if( !aLibSubName.isEmpty() ) { m_xControl->expand_row(*xLibIter); - if (std::unique_ptr xSubLibIter = ImpFindEntry(aLibSubName)) + if (std::unique_ptr xSubLibIter + = ImpFindEntry(*xLibIter, aLibSubName)) m_xControl->copy_iterator(*xSubLibIter, *xCurIter); } const OUString& aName( aDesc.GetName() ); diff --git a/basctl/source/inc/bastype2.hxx b/basctl/source/inc/bastype2.hxx index 221629bc2fce..522733e03b7c 100644 --- a/basctl/source/inc/bastype2.hxx +++ b/basctl/source/inc/bastype2.hxx @@ -192,7 +192,8 @@ protected: void ImpCreateLibSubEntries(const weld::TreeIter& rLibRootEntry, const ScriptDocument& rDocument, const OUString& rLibName); void ImpCreateLibSubEntriesInVBAMode(const weld::TreeIter& rLibRootEntry, const ScriptDocument& rDocument, const OUString& rLibName ); void ImpCreateLibSubSubEntriesInVBAMode(const weld::TreeIter& rLibRootEntry, const ScriptDocument& rDocument, const OUString& rLibName); - std::unique_ptr ImpFindEntry(std::u16string_view rText); + std::unique_ptr ImpFindEntry(const weld::TreeIter& rParentIter, + std::u16string_view rText); // DocumentEventListener virtual void onDocumentCreated( const ScriptDocument& _rDocument ) override; diff --git a/vcl/source/app/salvtables.cxx b/vcl/source/app/salvtables.cxx index eeccc451098f..a37d42130860 100644 --- a/vcl/source/app/salvtables.cxx +++ b/vcl/source/app/salvtables.cxx @@ -4431,6 +4431,7 @@ bool SalInstanceTreeView::get_row_expanded(const weld::TreeIter& rIter) const bool SalInstanceTreeView::get_children_on_demand(const weld::TreeIter& rIter) const { const SalInstanceTreeIter& rVclIter = static_cast(rIter); + assert(rVclIter.iter && "Invalid iter"); if (m_aExpandingPlaceHolderParents.contains(rVclIter.iter)) return true; return GetPlaceHolderChild(rVclIter.iter) != nullptr; From a1fa358d4769e9ddae1dad54c16885fcc210dac9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= Date: Sun, 27 Sep 2026 15:32:53 +0000 Subject: [PATCH 057/289] don't create the document BasicManager on save to check module sizes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Creating it loads every Basic library of the document. Only an existing BasicManager can have loaded the password protected modules that the size check looks at. Signed-off-by: Caolán McNamara Change-Id: I1a66c4738d9a91cda785f0603c6f4fd6e6549802 Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/13628 Reviewed-by: Noel Grandin (cherry picked from commit 35fb01a50f47698e9b059b75c2a3b88699579fac) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211524 Tested-by: Jenkins Reviewed-by: Xisco Fauli --- basic/source/basmgr/basicmanagerrepository.cxx | 15 +++++++++++++++ include/basic/basicmanagerrepository.hxx | 7 +++++++ sfx2/source/doc/objstor.cxx | 15 +++++++++++---- 3 files changed, 33 insertions(+), 4 deletions(-) diff --git a/basic/source/basmgr/basicmanagerrepository.cxx b/basic/source/basmgr/basicmanagerrepository.cxx index 16f5b63626ce..f5668732b23d 100644 --- a/basic/source/basmgr/basicmanagerrepository.cxx +++ b/basic/source/basmgr/basicmanagerrepository.cxx @@ -79,6 +79,7 @@ namespace basic static ImplRepository& Instance(); BasicManager* getDocumentBasicManager( const Reference< XModel >& _rxDocumentModel ); + BasicManager* getExistingDocumentBasicManager( const Reference< XModel >& _rxDocumentModel ) const; BasicManager* getOrCreateApplicationBasicManager(); static BasicManager* getApplicationBasicManager(); static void setApplicationBasicManager( std::unique_ptr _pBasicManager ); @@ -236,6 +237,15 @@ namespace basic return nullptr; } + BasicManager* ImplRepository::getExistingDocumentBasicManager( const Reference< XModel >& _rxDocumentModel ) const + { + SolarMutexGuard g; + + Reference< XInterface > xNormalized( _rxDocumentModel, UNO_QUERY ); + auto const loc = m_aStore.find( xNormalized ); + return loc != m_aStore.end() ? loc->second.get() : nullptr; + } + BasicManager* ImplRepository::getOrCreateApplicationBasicManager() { SolarMutexGuard g; @@ -600,6 +610,11 @@ namespace basic return ImplRepository::Instance().getDocumentBasicManager( _rxDocumentModel ); } + BasicManager* BasicManagerRepository::getExistingDocumentBasicManager( const Reference< XModel >& _rxDocumentModel ) + { + return ImplRepository::Instance().getExistingDocumentBasicManager( _rxDocumentModel ); + } + BasicManager* BasicManagerRepository::getApplicationBasicManager() { return ImplRepository::Instance().getOrCreateApplicationBasicManager(); diff --git a/include/basic/basicmanagerrepository.hxx b/include/basic/basicmanagerrepository.hxx index 13620e509ba3..2d78a291cba3 100644 --- a/include/basic/basicmanagerrepository.hxx +++ b/include/basic/basicmanagerrepository.hxx @@ -94,6 +94,13 @@ namespace basic const css::uno::Reference< css::frame::XModel >& _rxDocumentModel ); + /** returns the BasicManager of the given document model, or if it has + not been created yet + */ + static BasicManager* getExistingDocumentBasicManager( + const css::uno::Reference< css::frame::XModel >& _rxDocumentModel + ); + /** returns the application-wide BasicManager @attention diff --git a/sfx2/source/doc/objstor.cxx b/sfx2/source/doc/objstor.cxx index 1a95305b05c7..136b1678e5cf 100644 --- a/sfx2/source/doc/objstor.cxx +++ b/sfx2/source/doc/objstor.cxx @@ -93,6 +93,8 @@ #include #include #include +#include +#include #include #include #include @@ -4063,15 +4065,20 @@ bool SfxObjectShell::QuerySaveSizeExceededModules_Impl( const uno::Reference< ta #if !HAVE_FEATURE_SCRIPTING (void) xHandler; #else - if ( !HasBasic() ) + if ( pImpl->m_bNoBasicCapabilities ) + return true; + + // Only a loaded password-protected library has modules to check, and one is loaded only + // through an existing BasicManager. + BasicManager* pBasicManager + = basic::BasicManagerRepository::getExistingDocumentBasicManager( GetModel() ); + if ( !pBasicManager ) return true; - if ( !pImpl->aBasicManager.isValid() ) - GetBasicManager(); std::vector< OUString > sModules; if ( xHandler.is() ) { - if( pImpl->aBasicManager.ImgVersion12PsswdBinaryLimitExceeded( sModules ) ) + if( pBasicManager->ImgVersion12PsswdBinaryLimitExceeded( sModules ) ) { rtl::Reference pReq = new ModuleSizeExceeded( sModules ); xHandler->handle( pReq ); From 2caed59ec86d5be37fda1e424d4b9c75c12a3621 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A1szl=C3=B3=20N=C3=A9meth?= Date: Wed, 30 Sep 2026 14:49:42 +0200 Subject: [PATCH 058/289] Update git submodules MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Update helpcontent2 from branch 'master' to a932a7d6e577a40e47d7da6412ce962c96261e4c - tdf#173389 sw: add help for "split compound words" checkbox I.e. to compound-based "smart" hyphenation. Follow-up to commit e668dc84eb97bf46fc108ec209fc8383a34123f7 "tdf#173389 cui offapi sw xmloff: add custom compound-based hyphenation". Change-Id: I416fd601eb7116d66e06f09bf1d9b0a3363a05ce Reviewed-on: https://gerrit.libreoffice.org/c/help/+/211608 Tested-by: Jenkins Reviewed-by: László Németh --- helpcontent2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/helpcontent2 b/helpcontent2 index d221eef92a08..a932a7d6e577 160000 --- a/helpcontent2 +++ b/helpcontent2 @@ -1 +1 @@ -Subproject commit d221eef92a08fab4fd1bfc58a5963caad94107a9 +Subproject commit a932a7d6e577a40e47d7da6412ce962c96261e4c From 5c53840b5737132931559d27f73103d90164c80b Mon Sep 17 00:00:00 2001 From: Michael Weghorn Date: Wed, 30 Sep 2026 10:15:59 +0200 Subject: [PATCH 059/289] tdf#173695 svx: Increase min height for ColorWindow icon view to 250 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Earlier commit commit 6296615b8d5c96530c59b06a9873be3614a1e76c Author: Michael Weghorn Date: Tue Sep 29 14:20:18 2026 +0200 tdf#173695 svx: Ensure minimum height for ColorWindow had ensured a minimum height of 200 pixels for the ColorIconView in ColorWindow. As discussed in tdf#173695, increase the minimum height to 250 pixels which should be sufficient to show all rows of the "Standard" color palette even if different styles/themes (when using an actual toolkit like GTK or QT) may result in slightly different spacing. Quoting explanation from tdf#173695 comment 5 of why at least 10 rows should be shown: > The "Standard" palette does not merely contain 12 hues arranged in 12 > columns; it also uses 9 rows to provide 9 different shades for each hue. > (The topmost row contains 12 achromatic colours with different > brightness values, making 10 rows in total.) > > If this were a user-created palette, this might not matter. However, > since the palettes provided as official presets have a > two-dimensional structure, I think that preserving that structure > requires at least the 12 columns × 10 rows that were available > previously. Change-Id: Iafee178ceab6ccbbf6d880fa45cd90e3fd81be9d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211601 Reviewed-by: Michael Weghorn Tested-by: Jenkins --- svx/source/tbxctrls/tbcontrl.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/svx/source/tbxctrls/tbcontrl.cxx b/svx/source/tbxctrls/tbcontrl.cxx index 5d667c01efd7..2f998c5e03ac 100644 --- a/svx/source/tbxctrls/tbcontrl.cxx +++ b/svx/source/tbxctrls/tbcontrl.cxx @@ -2125,8 +2125,8 @@ ColorWindow::ColorWindow(OUString rCommand, // ensure minimum height to also provide space for palettes with // more colors when one with few colors is initially selected - if (maColorIconView.get_size_request().Height() < 200) - maColorIconView.set_size_request(-1, 200); + if (maColorIconView.get_size_request().Height() < 250) + maColorIconView.set_size_request(-1, 250); AddStatusListener( u".uno:ColorTableState"_ustr ); AddStatusListener( maCommand ); From a192fa2378a9983b0b9007b522f4b093e57e2c22 Mon Sep 17 00:00:00 2001 From: Sergey Anisimov Date: Mon, 21 Sep 2026 13:23:06 +0500 Subject: [PATCH 060/289] tdf#173568 - qt context menu fix MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit focus out reason fix for qt/kf The bug causing the comment’s context menu to disappear is caused by a focusOutEvent() being received by the widget when the context menu is opened. This triggers closePopup(), which immediately closes the menu. The fix adds the condition if (e->reason() != Qt::FocusReason::PopupFocusReason) so that the popup is not closed when the focus loss is caused by opening popup. if (m_rFrame.isPopup() ... ) condition in QtWidget::mousePressEvent removed, because it can never be reached. Change-Id: I70a0e9a3051f305f242c3ec7ca08f356d4520ab6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211273 Reviewed-by: Michael Weghorn Tested-by: Jenkins --- vcl/qt5/QtWidget.cxx | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/vcl/qt5/QtWidget.cxx b/vcl/qt5/QtWidget.cxx index c6b179e09ddf..2098c77deb5f 100644 --- a/vcl/qt5/QtWidget.cxx +++ b/vcl/qt5/QtWidget.cxx @@ -114,13 +114,7 @@ void QtWidget::handleMouseButtonEvent(const QMouseEvent* pEvent) const m_rFrame.CallCallback(nEventType, &aEvent); } -void QtWidget::mousePressEvent(QMouseEvent* pEvent) -{ - handleMouseButtonEvent(pEvent); - if (m_rFrame.isPopup() - && !geometry().translated(geometry().topLeft() * -1).contains(pEvent->pos())) - closePopup(); -} +void QtWidget::mousePressEvent(QMouseEvent* pEvent) { handleMouseButtonEvent(pEvent); } void QtWidget::mouseReleaseEvent(QMouseEvent* pEvent) { handleMouseButtonEvent(pEvent); } @@ -520,14 +514,15 @@ void QtWidget::closePopup() } } -void QtWidget::focusOutEvent(QFocusEvent*) +void QtWidget::focusOutEvent(QFocusEvent* pEvent) { #if CHECK_ANY_QT_USING_X11 m_rFrame.m_nKeyModifiers = ModKeyFlags::NONE; #endif endExtTextInput(); m_rFrame.CallCallback(SalEvent::LoseFocus, nullptr); - closePopup(); + if (pEvent->reason() != Qt::FocusReason::PopupFocusReason) + closePopup(); } QtWidget::QtWidget(QtFrame& rFrame, Qt::WindowFlags f) From 0a327fc06f23b212b4a2a96f26c285be44db01b0 Mon Sep 17 00:00:00 2001 From: Sergey Anisimov Date: Mon, 21 Sep 2026 13:30:06 +0500 Subject: [PATCH 061/289] AnnotationPopup close fix There is a bug where, an impress comment does not close when clicking outside of it. More precisely, the comment does close, but is immediately opened again. (Qt/gen)specific bug, not reproducible with GTK The issue is caused by the handling of NotifyEventType::MOUSEBUTTONDOWN: it triggers FloatingWindow::EndPopupMode(). However, when NotifyEventType::MOUSEBUTTONUP is received, the call chain eventually reaches FuSelection::MouseButtonUp(), which accesses an SdrObject from the SdrMarkList (GetMarkedObjectList()). At that point, the list still contains the popup that is supposed to be opened, so the comment gets opened again. Change-Id: Ieb5691812009059d2100976932c34876cca5bc4b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211275 Reviewed-by: Michael Weghorn Tested-by: Jenkins --- sd/source/ui/annotations/AnnotationPopup.cxx | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/sd/source/ui/annotations/AnnotationPopup.cxx b/sd/source/ui/annotations/AnnotationPopup.cxx index f1589001befd..79cd5eb61f35 100644 --- a/sd/source/ui/annotations/AnnotationPopup.cxx +++ b/sd/source/ui/annotations/AnnotationPopup.cxx @@ -60,6 +60,21 @@ void AnnotationPopup::closePopup() { mpAnnotationWindow->SaveToDocument(); mpAnnotationWindow.reset(); + + sd::DrawDocShell* pDocShell = dynamic_cast(SfxObjectShell::Current()); + if (pDocShell) + { + sd::ViewShell* pViewShell = pDocShell->GetViewShell(); + if (pViewShell) + { + const auto pAnnotation = mxAnnotation->findAnnotationObject(); + if (pAnnotation) + { + pViewShell->GetView()->MarkObj(pAnnotation, + pViewShell->GetView()->GetSdrPageView(), true); + } + } + } } } From 9f5e7927775ad5000aa7cef0a90344be3a42cd58 Mon Sep 17 00:00:00 2001 From: Olivier Hallot Date: Wed, 30 Sep 2026 11:26:36 -0300 Subject: [PATCH 062/289] Update git submodules * Update helpcontent2 from branch 'master' to fe84c3c561b6b441ee1cfa6ab99af0b4d66a6f4e - Refactor cell alignment in Calc Change-Id: I76159bba4022c8ab75ec047a6de457017768db8e Reviewed-on: https://gerrit.libreoffice.org/c/help/+/211624 Reviewed-by: Olivier Hallot Tested-by: Jenkins --- helpcontent2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/helpcontent2 b/helpcontent2 index a932a7d6e577..fe84c3c561b6 160000 --- a/helpcontent2 +++ b/helpcontent2 @@ -1 +1 @@ -Subproject commit a932a7d6e577a40e47d7da6412ce962c96261e4c +Subproject commit fe84c3c561b6b441ee1cfa6ab99af0b4d66a6f4e From 47932ec399d4a71d4bf50c09c3452d0f6bd52327 Mon Sep 17 00:00:00 2001 From: Michael Weghorn Date: Wed, 30 Sep 2026 14:01:58 +0200 Subject: [PATCH 063/289] svx a11y: Stop mentioning no more existing AccessibleContext service That UNO service was dropped in commit bcd90334e81589eb20ec11ea11e70ef63f0169e3 Author: Michael Weghorn Date: Wed Sep 2 10:31:59 2026 +0200 [API CHANGE] a11y: Drop com.sun.star.accessibility.AccessibleContext , so don't claim to implement it. Change-Id: I8c569f1db4c05228ba18a2d8e20b96b8712764f3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211617 Reviewed-by: Michael Weghorn Tested-by: Jenkins --- svx/source/inc/GraphCtlAccessibleContext.hxx | 5 ----- 1 file changed, 5 deletions(-) diff --git a/svx/source/inc/GraphCtlAccessibleContext.hxx b/svx/source/inc/GraphCtlAccessibleContext.hxx index b4ab889c6f08..e9734222d201 100644 --- a/svx/source/inc/GraphCtlAccessibleContext.hxx +++ b/svx/source/inc/GraphCtlAccessibleContext.hxx @@ -43,11 +43,6 @@ class SdrModel; class SdrPage; class SdrView; -/** @descr - This base class provides an implementation of the - AccessibleContext service. -*/ - class SvxGraphCtrlAccessibleContext final : public cppu::ImplInheritanceHelper, From 353f3781967d6f4aa95bf9788e7d7ed7095542f0 Mon Sep 17 00:00:00 2001 From: Michael Weghorn Date: Wed, 30 Sep 2026 14:04:28 +0200 Subject: [PATCH 064/289] svx a11y: Work around linker issue LNK2005 in MSVC build Add an intermediate OAccessible subclass to avoid this linker error otherwise seen in my local --with-visual-studio=2022 build on Windows: icomphelper.lib(comphelper.dll) : error LNK2005: "public: virtual class com::sun::star::uno::Any __cdecl cppu::ImplInheritanceHelper::queryInterface(class com::sun::star::uno::Type const &)" (?queryInterface@?$ImplInheritanceHelper@VOAccessible@comphelper@@VXAccessibleSelection@accessibility@star@sun@com@@@cppu@@UEAA?AVAny@uno@star@sun@com@@AEBVType@4567@@Z) already defined in GraphCtlAccessibleContext.o icomphelper.lib(comphelper.dll) : error LNK2005: "public: virtual void __cdecl cppu::ImplInheritanceHelper::acquire(void)" (?acquire@?$ImplInheritanceHelper@VOAccessible@comphelper@@VXAccessibleSelection@accessibility@star@sun@com@@@cppu@@UEAAXXZ) already defined in GraphCtlAccessibleContext.o icomphelper.lib(comphelper.dll) : error LNK2005: "public: virtual void __cdecl cppu::ImplInheritanceHelper::release(void)" (?release@?$ImplInheritanceHelper@VOAccessible@comphelper@@VXAccessibleSelection@accessibility@star@sun@com@@@cppu@@UEAAXXZ) already defined in GraphCtlAccessibleContext.o icomphelper.lib(comphelper.dll) : error LNK2005: "public: virtual class com::sun::star::uno::Sequence __cdecl cppu::ImplInheritanceHelper::getTypes(void)" (?getTypes@?$ImplInheritanceHelper@VOAccessible@comphelper@@VXAccessibleSelection@accessibility@star@sun@com@@@cppu@@UEAA?AV?$Sequence@VType@uno@star@sun@com@@@uno@star@sun@com@@XZ) already defined in GraphCtlAccessibleContext.o Creating library C:/Users/mwegh/development/git/libreoffice/workdir/LinkTarget/Library/isvx.lib and object C:/Users/mwegh/development/git/libreoffice/workdir/LinkTarget/Library/isvx.exp C:\Users\mwegh\development\git\libreoffice\instdir\program\svxlo.dll : fatal error LNK1169: one or more multiply defined symbols found This is somewhat similar to commit f5667d1e3b62da5bbae597725fdbf08a50cabba0 Date: Thu Jun 26 18:25:31 2025 +0500 Fix error LNK2005 in MSVC after recent sd changes Change-Id: I8f01ea095d0a196c61521f92ea9ec76217941aeb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211618 Tested-by: Jenkins Reviewed-by: Michael Weghorn --- svx/source/inc/GraphCtlAccessibleContext.hxx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/svx/source/inc/GraphCtlAccessibleContext.hxx b/svx/source/inc/GraphCtlAccessibleContext.hxx index e9734222d201..88f65273527e 100644 --- a/svx/source/inc/GraphCtlAccessibleContext.hxx +++ b/svx/source/inc/GraphCtlAccessibleContext.hxx @@ -43,8 +43,13 @@ class SdrModel; class SdrPage; class SdrView; +// avoid LNK2005 duplicate ImplInheritanceHelper definitions with MSVC +class SvxGraphCtrlAccessibleContextBase : public comphelper::OAccessible +{ +}; + class SvxGraphCtrlAccessibleContext final - : public cppu::ImplInheritanceHelper, public SfxListener, public ::accessibility::IAccessibleViewForwarder From a725ef58adea6380e170e4daf9739d60e638ff98 Mon Sep 17 00:00:00 2001 From: Olivier Hallot Date: Wed, 30 Sep 2026 14:47:28 -0300 Subject: [PATCH 065/289] Update git submodules * Update helpcontent2 from branch 'master' to 5ca01b66114919efccfccb77f006e8744b6d79fe - More fixes in Alignment and number formats Change-Id: I5549b8167e169eecd6de1112f1d2fa6db4e7091f Reviewed-on: https://gerrit.libreoffice.org/c/help/+/211629 Reviewed-by: Olivier Hallot Tested-by: Jenkins --- helpcontent2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/helpcontent2 b/helpcontent2 index fe84c3c561b6..5ca01b661149 160000 --- a/helpcontent2 +++ b/helpcontent2 @@ -1 +1 @@ -Subproject commit fe84c3c561b6b441ee1cfa6ab99af0b4d66a6f4e +Subproject commit 5ca01b66114919efccfccb77f006e8744b6d79fe From 8dcca1011d5c5a77b62c2f084fb6345a88fbae5f Mon Sep 17 00:00:00 2001 From: Xisco Fauli Date: Wed, 30 Sep 2026 16:10:11 +0200 Subject: [PATCH 066/289] mariadb-connector-c: upgrade to 3.4.11 Downloaded from https://dlm.mariadb.com/4863518/Connectors/c/connector-c-3.4.11/source/mariadb-connector-c-3.4.11-src.tar.gz Change-Id: I6f642e4f861946885d7251b7adb8570f2ee17612 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211622 Tested-by: Jenkins Reviewed-by: Xisco Fauli --- download.lst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/download.lst b/download.lst index 13f914a7d75d..09a8cb6bfe98 100644 --- a/download.lst +++ b/download.lst @@ -452,8 +452,8 @@ LZMA_TARBALL := xz-5.8.4.tar.gz # three static lines # so that git cherry-pick # will not run into conflicts -MARIADB_CONNECTOR_C_SHA256SUM := a84bba97e59b6a322637a189964d4fd72bd8d92f2d22a9f8d6a5f0657c821e97 -MARIADB_CONNECTOR_C_TARBALL := mariadb-connector-c-3.4.9-src.tar.gz +MARIADB_CONNECTOR_C_SHA256SUM := 521c0712e9291fa96558df9e2ff431376a3a79329f13751896b694cae12765b4 +MARIADB_CONNECTOR_C_TARBALL := mariadb-connector-c-3.4.11-src.tar.gz # three static lines # so that git cherry-pick # will not run into conflicts From dabd91337a44b9c3792bb0985624c4980023225a Mon Sep 17 00:00:00 2001 From: Dan Williams Date: Wed, 30 Sep 2026 11:18:19 -0500 Subject: [PATCH 067/289] fontconfig: include xlocale.h for locale_t on old macOS Sonoma (macOS 14) builds with Xcode 15.2 can't find locale_t when building fontconfig. Later OS versions and Xcode builds don't seem to have that problem. In file included from fcarch.c:24: ./fcint.h:682:9: error: unknown type name 'locale_t' typedef locale_t FcLocale; ^ Fontconfig added "#include " recently in c24472116 to fix the issue, but also switched to the Meson build system which is the only mechanism by which HAVE_XLOCALE_H gets defined. Given that LibreOffice uses fontconfig's old configure-based system and it's a bunch of work to switch to meson here, we're not going to bump fontconfig just for this. For now just assume all Apple platforms have xlocale.h, which they do. Change-Id: Ida9ef328dbd79e0c54b3d37355c344d7ca8d1b4c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211630 Tested-by: Jenkins Reviewed-by: Dan Williams --- .../fontconfig/UnpackedTarball_fontconfig.mk | 1 + external/fontconfig/apple-xlocale.patch.1 | 23 +++++++++++++++++++ 2 files changed, 24 insertions(+) create mode 100644 external/fontconfig/apple-xlocale.patch.1 diff --git a/external/fontconfig/UnpackedTarball_fontconfig.mk b/external/fontconfig/UnpackedTarball_fontconfig.mk index a43a3db7f840..fdc476da3937 100644 --- a/external/fontconfig/UnpackedTarball_fontconfig.mk +++ b/external/fontconfig/UnpackedTarball_fontconfig.mk @@ -16,6 +16,7 @@ $(eval $(call gb_UnpackedTarball_set_patchlevel,fontconfig,0)) $(eval $(call gb_UnpackedTarball_add_patches,fontconfig,\ external/fontconfig/fontconfig-2.12.1.patch.1 \ external/fontconfig/nowarnnoconfig.patch.1 \ + external/fontconfig/apple-xlocale.patch.1 \ )) ifneq ($(OS),MACOSX) diff --git a/external/fontconfig/apple-xlocale.patch.1 b/external/fontconfig/apple-xlocale.patch.1 new file mode 100644 index 000000000000..af5744cb9326 --- /dev/null +++ b/external/fontconfig/apple-xlocale.patch.1 @@ -0,0 +1,23 @@ +--- fontconfig/src/fcint.h.foo 2026-09-30 11:01:43 ++++ fontconfig/src/fcint.h 2026-09-30 11:10:23 +@@ -44,6 +44,9 @@ + #ifdef HAVE_UNISTD_H + # include + #endif ++#if defined(HAVE_XLOCALE_H) || defined(__APPLE__) ++#include ++#endif + #include + #include + +--- fontconfig/src/fcstr.c.foo 2026-09-30 11:05:33 ++++ fontconfig/src/fcstr.c 2026-09-30 11:10:17 +@@ -28,7 +28,7 @@ + #include + #include + #include +-#ifdef HAVE_XLOCALE_H ++#if defined(HAVE_XLOCALE_H) || defined(__APPLE__) + #include + #endif + From e5856e9912ec7ec6ab1bd80bfbe774fded59ca82 Mon Sep 17 00:00:00 2001 From: Vladislav Tarakanov Date: Thu, 1 Oct 2026 06:47:52 +0400 Subject: [PATCH 068/289] tdf#173803 Set WM_CLASS with Qt6 on X11 The setApplicationID method is now called for all Qt versions on X11. For Qt6, xcb_connection_t* is obtained in a new way, by calling QNativeInterface::QX11Application, instead of the deprecated X11Helper. This change is based on these Qt6 docs: https://doc.qt.io/qt-6/extras-changes-qt6.html#changes-to-qt-x11-extras Change-Id: I51da53dd7d4cd7e080812cfd0c59d6197cac4a6f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211643 Tested-by: Jenkins Reviewed-by: Michael Weghorn --- vcl/qt5/QtFrame.cxx | 2 +- vcl/qt5/QtX11Support.cxx | 15 ++++++++++----- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/vcl/qt5/QtFrame.cxx b/vcl/qt5/QtFrame.cxx index b15e60f85c61..0692b38286bf 100644 --- a/vcl/qt5/QtFrame.cxx +++ b/vcl/qt5/QtFrame.cxx @@ -1177,7 +1177,7 @@ void QtFrame::SetScreenNumber(unsigned int nScreen) void QtFrame::SetApplicationID(const OUString& rWMClass) { -#if CHECK_QT5_USING_X11 +#if CHECK_ANY_QT_USING_X11 if (GetQtInstance().GetPlatform() != Platform::Xcb || !m_pTopLevel) return; diff --git a/vcl/qt5/QtX11Support.cxx b/vcl/qt5/QtX11Support.cxx index 37a40037b444..93751993b754 100644 --- a/vcl/qt5/QtX11Support.cxx +++ b/vcl/qt5/QtX11Support.cxx @@ -20,7 +20,16 @@ void QtX11Support::setApplicationID(const xcb_window_t nWinId, std::u16string_view rWMClass) { + xcb_connection_t* pConnection = nullptr; #if CHECK_QT5_USING_X11 + pConnection = QX11Info::connection(); +#else + auto* x11Application = qGuiApp->nativeInterface(); + if (x11Application) + pConnection = x11Application->connection(); +#endif + if (!pConnection) + return; OString aResClass = OUStringToOString(rWMClass, RTL_TEXTENCODING_ASCII_US); const char* pResClass = !aResClass.isEmpty() ? aResClass.getStr() : X11Helper::getFrameClassName(); @@ -32,13 +41,9 @@ void QtX11Support::setApplicationID(const xcb_window_t nWinId, std::u16string_vi memcpy(data, aResName.getStr(), aResName.getLength() + 1); memcpy(data + aResName.getLength() + 1, pResClass, strlen(pResClass) + 1); - xcb_change_property(QX11Info::connection(), XCB_PROP_MODE_REPLACE, nWinId, XCB_ATOM_WM_CLASS, + xcb_change_property(pConnection, XCB_PROP_MODE_REPLACE, nWinId, XCB_ATOM_WM_CLASS, XCB_ATOM_STRING, 8, data_len, data); delete[] data; -#else - Q_UNUSED(nWinId); - Q_UNUSED(rWMClass); -#endif } /* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */ From ce16bc37fdaa969963089e7f247c1d9eb145aca7 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Mon, 6 Apr 2026 19:12:47 +0200 Subject: [PATCH 069/289] use more concrete UNO class in the form of ScModelObj Change-Id: I9ad26f05635583e203ff338a88add65838c9188e Reviewed-on: https://gerrit.collaboraoffice.com/c/core/+/555 Reviewed-by: Noel Grandin Tested-by: Jenkins CPCI (cherry picked from commit 0a6ee7a99d6a5d624c4303256cc385ca6e23d456) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211619 Reviewed-by: Xisco Fauli Tested-by: Jenkins --- include/vbahelper/vbaapplicationbase.hxx | 2 +- include/vbahelper/vbadocumentbase.hxx | 2 +- sc/source/core/tool/address.cxx | 4 +- sc/source/filter/excel/xeroot.cxx | 7 ++- sc/source/filter/xcl97/xcl97esc.cxx | 2 +- sc/source/filter/xml/xmlimprt.cxx | 15 +++--- sc/source/filter/xml/xmlwrap.cxx | 33 +++++------- sc/source/ui/vba/vbaapplication.cxx | 19 ++++--- sc/source/ui/vba/vbaapplication.hxx | 3 +- sc/source/ui/vba/vbaformat.cxx | 6 +-- sc/source/ui/vba/vbaformat.hxx | 6 ++- sc/source/ui/vba/vbarange.cxx | 19 ++++--- sc/source/ui/vba/vbastyle.cxx | 16 +++--- sc/source/ui/vba/vbastyle.hxx | 8 +-- sc/source/ui/vba/vbastyles.cxx | 15 +++--- sc/source/ui/vba/vbastyles.hxx | 6 ++- sc/source/ui/vba/vbawindow.cxx | 6 +-- sc/source/ui/vba/vbawindow.hxx | 6 ++- sc/source/ui/vba/vbawindows.cxx | 12 +++-- sc/source/ui/vba/vbaworkbook.cxx | 17 +++--- sc/source/ui/vba/vbaworkbook.hxx | 7 +-- sc/source/ui/vba/vbaworkbooks.cxx | 11 ++-- sc/source/ui/view/tabvwsh4.cxx | 53 ++++++++----------- sw/source/ui/vba/vbaapplication.cxx | 4 +- sw/source/ui/vba/vbaapplication.hxx | 4 +- sw/source/ui/vba/vbadocument.cxx | 22 +++----- sw/source/ui/vba/vbadocument.hxx | 4 +- .../source/vbahelper/vbaapplicationbase.cxx | 2 +- .../source/vbahelper/vbadocumentbase.cxx | 2 +- 29 files changed, 158 insertions(+), 155 deletions(-) diff --git a/include/vbahelper/vbaapplicationbase.hxx b/include/vbahelper/vbaapplicationbase.hxx index f580fb3402f1..15296aaef050 100644 --- a/include/vbahelper/vbaapplicationbase.hxx +++ b/include/vbahelper/vbaapplicationbase.hxx @@ -47,7 +47,7 @@ protected: virtual ~VbaApplicationBase() override; /// @throws css::uno::RuntimeException - virtual css::uno::Reference< css::frame::XModel > getCurrentDocument() = 0; + virtual css::frame::XModel* getCurrentDocument() = 0; public: // XHelperInterface ( parent is itself ) virtual css::uno::Reference< ov::XHelperInterface > SAL_CALL getParent( ) override { return this; } diff --git a/include/vbahelper/vbadocumentbase.hxx b/include/vbahelper/vbadocumentbase.hxx index f69d6de46b40..09d987bd1a8b 100644 --- a/include/vbahelper/vbadocumentbase.hxx +++ b/include/vbahelper/vbadocumentbase.hxx @@ -47,7 +47,7 @@ class VBAHELPER_DLLPUBLIC VbaDocumentBase : public VbaDocumentBase_BASE protected: css::uno::Reference< css::uno::XInterface > mxVBProject; protected: - virtual css::uno::Reference< css::frame::XModel > getModel() const = 0; + virtual css::frame::XModel* getModel() const = 0; public: VbaDocumentBase( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext ); VbaDocumentBase( css::uno::Sequence< css::uno::Any > const& aArgs, css::uno::Reference< css::uno::XComponentContext >const& xContext ); diff --git a/sc/source/core/tool/address.cxx b/sc/source/core/tool/address.cxx index 8e30a93823f7..3e4487facecc 100644 --- a/sc/source/core/tool/address.cxx +++ b/sc/source/core/tool/address.cxx @@ -2036,12 +2036,12 @@ static OUString getFileNameFromDoc( const ScDocument* pDoc ) // TODO : er points at ScGlobal::GetAbsDocName() // as a better template. Look into it OUString sFileName; - SfxObjectShell* pShell; + ScDocShell* pShell; if( nullptr != pDoc && nullptr != (pShell = pDoc->GetDocumentShell() ) ) { - uno::Reference< frame::XModel > xModel = pShell->GetModel(); + rtl::Reference< ScModelObj > xModel = pShell->GetModel(); if( xModel.is() ) { if( !xModel->getURL().isEmpty() ) diff --git a/sc/source/filter/excel/xeroot.cxx b/sc/source/filter/excel/xeroot.cxx index d162b9e419f1..5dbe4c9b38ff 100644 --- a/sc/source/filter/excel/xeroot.cxx +++ b/sc/source/filter/excel/xeroot.cxx @@ -244,14 +244,13 @@ void XclExpRoot::InitializeGlobals() SAL_WARN( "sc", "XclExpRoot::InitializeGlobals - no object shell"); break; } - uno::Reference< lang::XComponent > xComponent = pShell->GetModel(); - if (!xComponent.is()) + rtl::Reference< ScModelObj > xModel = pShell->GetModel(); + if (!xModel.is()) { SAL_WARN( "sc", "XclExpRoot::InitializeGlobals - no component"); break; } - uno::Reference< lang::XMultiServiceFactory > xModelFactory( xComponent, uno::UNO_QUERY); - oox::xls::OpCodeProvider aOpCodeProvider(xModelFactory, false); + oox::xls::OpCodeProvider aOpCodeProvider(xModel, false); // Compiler mocks about non-matching ctor or conversion from // Sequence<...> to Sequence if directly created or passed, // conversion through Any works around. diff --git a/sc/source/filter/xcl97/xcl97esc.cxx b/sc/source/filter/xcl97/xcl97esc.cxx index d6bc672a174a..696595cae826 100644 --- a/sc/source/filter/xcl97/xcl97esc.cxx +++ b/sc/source/filter/xcl97/xcl97esc.cxx @@ -414,7 +414,7 @@ std::unique_ptr XclEscherEx::CreateOCXCtrlObj( Reference< X // writes from xCtrlModel into mxCtlsStrm, raw class name returned in aClassName Reference< XOutputStream > xOut( new utl::OSeekableOutputStreamWrapper( *mxCtlsStrm ) ); - Reference< css::frame::XModel > xModel( GetDocShell() ? GetDocShell()->GetModel() : nullptr ); + rtl::Reference< ScModelObj > xModel( GetDocShell() ? GetDocShell()->GetModel() : nullptr ); if( xModel.is() && xOut.is() && oox::ole::MSConvertOCXControls::WriteOCXExcelKludgeStream( xModel, xOut, xCtrlModel, xShape->getSize(), aClassName ) ) { sal_uInt32 nStrmSize = static_cast< sal_uInt32 >( mxCtlsStrm->Tell() - nStrmStart ); diff --git a/sc/source/filter/xml/xmlimprt.cxx b/sc/source/filter/xml/xmlimprt.cxx index 56a33bf86840..15d47f96180d 100644 --- a/sc/source/filter/xml/xmlimprt.cxx +++ b/sc/source/filter/xml/xmlimprt.cxx @@ -1687,9 +1687,10 @@ extern "C" SAL_DLLPUBLIC_EXPORT bool TestImportFODS(SvStream &rStream) { ScDLL::Init(); - SfxObjectShellLock xDocSh(new ScDocShell); + rtl::Reference xDocSh(new ScDocShell); + SfxObjectShellLock xLock(xDocSh.get()); xDocSh->DoInitNew(); - uno::Reference xModel(xDocSh->GetModel()); + rtl::Reference xModel(xDocSh->GetModel()); uno::Reference xMultiServiceFactory(comphelper::getProcessServiceFactory()); uno::Reference xStream(new ::utl::OSeekableInputStreamWrapper(rStream)); @@ -1740,9 +1741,10 @@ extern "C" SAL_DLLPUBLIC_EXPORT bool TestFODSExportXLS(SvStream &rStream) { ScDLL::Init(); - SfxObjectShellLock xDocSh(new ScDocShell); + rtl::Reference xDocSh(new ScDocShell); + SfxObjectShellLock xLock(xDocSh.get()); xDocSh->DoInitNew(); - uno::Reference xModel(xDocSh->GetModel()); + rtl::Reference xModel(xDocSh->GetModel()); uno::Reference xMultiServiceFactory(comphelper::getProcessServiceFactory()); uno::Reference xStream(new ::utl::OSeekableInputStreamWrapper(rStream)); @@ -1814,9 +1816,10 @@ extern "C" SAL_DLLPUBLIC_EXPORT bool TestImportXLSX(SvStream &rStream) { ScDLL::Init(); - SfxObjectShellLock xDocSh(new ScDocShell); + rtl::Reference xDocSh(new ScDocShell); + SfxObjectShellLock xLock(xDocSh.get()); xDocSh->DoInitNew(); - uno::Reference xModel(xDocSh->GetModel()); + rtl::Reference xModel(xDocSh->GetModel()); uno::Reference xMultiServiceFactory(comphelper::getProcessServiceFactory()); uno::Reference xStream(new utl::OSeekableInputStreamWrapper(rStream)); diff --git a/sc/source/filter/xml/xmlwrap.cxx b/sc/source/filter/xml/xmlwrap.cxx index e7c2f7fbd4d7..d0f36de5eca0 100644 --- a/sc/source/filter/xml/xmlwrap.cxx +++ b/sc/source/filter/xml/xmlwrap.cxx @@ -290,7 +290,7 @@ bool ScXMLImportWrapper::Import( ImportFlags nMode, ErrCodeMsg& rError ) xStorage = pMedium->GetStorage(); // get filter - uno::Reference xModel = mrDocShell.GetModel(); + rtl::Reference xModel = mrDocShell.GetModel(); /** property map for export info set */ static comphelper::PropertyMapEntry const aImportInfoMap[] = @@ -318,10 +318,9 @@ bool ScXMLImportWrapper::Import( ImportFlags nMode, ErrCodeMsg& rError ) // ---- get BuildId from parent container if available - uno::Reference< container::XChild > xChild( xModel, uno::UNO_QUERY ); - if( xChild.is() ) + if( xModel.is() ) { - uno::Reference< beans::XPropertySet > xParentSet( xChild->getParent(), uno::UNO_QUERY ); + uno::Reference< beans::XPropertySet > xParentSet( xModel->getParent(), uno::UNO_QUERY ); if( xParentSet.is() ) { uno::Reference< beans::XPropertySetInfo > xPropSetInfo( xParentSet->getPropertySetInfo() ); @@ -382,13 +381,11 @@ bool ScXMLImportWrapper::Import( ImportFlags nMode, ErrCodeMsg& rError ) // RDF metadata: ODF >= 1.2 try { - const uno::Reference< rdf::XDocumentMetadataAccess > xDMA( - xModel, uno::UNO_QUERY_THROW ); const uno::Reference< rdf::XURI > xBaseURI( ::sfx2::createBaseURI( xContext, xModel, aBaseURL, aName ) ); uno::Reference xHandler = mrDocShell.GetMedium()->GetInteractionHandler(); - xDMA->loadMetadataFromStorage( xStorage, xBaseURI, xHandler ); + xModel->loadMetadataFromStorage( xStorage, xBaseURI, xHandler ); } catch ( const lang::WrappedTargetException & e) { @@ -534,19 +531,18 @@ bool ScXMLImportWrapper::Import( ImportFlags nMode, ErrCodeMsg& rError ) bool bRet = !rError.IsError(); - ::svx::DropUnusedNamedItems(xModel); + ::svx::DropUnusedNamedItems(cppu::getXWeak(xModel.get())); // set BuildId on XModel for later OLE object loading if( xInfoSet.is() ) { - uno::Reference< beans::XPropertySet > xModelSet( xModel, uno::UNO_QUERY ); - if( xModelSet.is() ) + if( xModel.is() ) { - uno::Reference< beans::XPropertySetInfo > xModelSetInfo( xModelSet->getPropertySetInfo() ); + uno::Reference< beans::XPropertySetInfo > xModelSetInfo( xModel->getPropertySetInfo() ); OUString sBuildPropName(u"BuildId"_ustr ); if( xModelSetInfo.is() && xModelSetInfo->hasPropertyByName(sBuildPropName) ) { - xModelSet->setPropertyValue( sBuildPropName, xInfoSet->getPropertyValue(sBuildPropName) ); + xModel->setPropertyValue( sBuildPropName, xInfoSet->getPropertyValue(sBuildPropName) ); } } @@ -563,9 +559,9 @@ bool ScXMLImportWrapper::Import( ImportFlags nMode, ErrCodeMsg& rError ) /* Set library container to VBA compatibility mode, this forces loading the Basic project, which in turn creates the VBA Globals object and does all related initialization. */ - if ( xModelSet.is() ) try + if ( xModel.is() ) try { - uno::Reference< script::vba::XVBACompatibility > xVBACompat( xModelSet->getPropertyValue( + uno::Reference< script::vba::XVBACompatibility > xVBACompat( xModel->getPropertyValue( u"BasicLibraries"_ustr ), uno::UNO_QUERY_THROW ); xVBACompat->setVBACompatibilityMode( true ); } @@ -763,11 +759,10 @@ bool ScXMLImportWrapper::Export(bool bStylesOnly) if ( pObjSh && xStorage.is() ) { - uno::Reference xModel(pObjSh->GetModel()); + rtl::Reference xModel(pObjSh->GetModel()); // sorting wants to create undo actions assert(SfxObjectCreateMode::STANDARD != pObjSh->GetCreateMode() || rDoc.GetDrawLayer()->IsUndoEnabled()); - uno::Reference const xDPS(xModel, uno::UNO_QUERY); - uno::Reference const xDPs(xDPS->getDrawPages()); + uno::Reference const xDPs(xModel->getDrawPages()); assert(xDPs.is()); for (auto i = xDPs->getCount(); 0 < i; ) { @@ -852,9 +847,7 @@ bool ScXMLImportWrapper::Export(bool bStylesOnly) && aVersion != ODFVER_010_TEXT && aVersion != ODFVER_011_TEXT ) { - const uno::Reference< rdf::XDocumentMetadataAccess > xDMA( - xModel, uno::UNO_QUERY_THROW ); - xDMA->storeMetadataToStorage( xStorage ); + xModel->storeMetadataToStorage( xStorage ); } } catch ( const beans::UnknownPropertyException &) diff --git a/sc/source/ui/vba/vbaapplication.cxx b/sc/source/ui/vba/vbaapplication.cxx index 914f6aaab16e..e108dda59182 100644 --- a/sc/source/ui/vba/vbaapplication.cxx +++ b/sc/source/ui/vba/vbaapplication.cxx @@ -256,7 +256,7 @@ ScVbaApplication::hasProperty( const OUString& Name ) uno::Reference< excel::XWorkbook > ScVbaApplication::getActiveWorkbook() { - uno::Reference< frame::XModel > xModel( getCurrentExcelDoc( mxContext ), uno::UNO_SET_THROW ); + rtl::Reference< ScModelObj > xModel( dynamic_cast(getCurrentExcelDoc( mxContext ).get()) ); uno::Reference< excel::XWorkbook > xWorkbook( getVBADocument( xModel ), uno::UNO_QUERY ); if( xWorkbook.is() ) return xWorkbook; // #i116936# getVBADocument() may return null in documents without global VBA mode enabled @@ -266,7 +266,7 @@ ScVbaApplication::getActiveWorkbook() uno::Reference< excel::XWorkbook > SAL_CALL ScVbaApplication::getThisWorkbook() { - uno::Reference< frame::XModel > xModel( getThisExcelDoc( mxContext ), uno::UNO_SET_THROW ); + rtl::Reference< ScModelObj > xModel( dynamic_cast(getThisExcelDoc( mxContext ).get()) ); uno::Reference< excel::XWorkbook > xWorkbook( getVBADocument( xModel ), uno::UNO_QUERY ); if( xWorkbook.is() ) return xWorkbook; // #i116936# getVBADocument() may return null in documents without global VBA mode enabled @@ -481,7 +481,7 @@ ScVbaApplication::Dialogs( const uno::Any &aIndex ) uno::Reference< excel::XWindow > SAL_CALL ScVbaApplication::getActiveWindow() { - uno::Reference< frame::XModel > xModel = getCurrentDocument(); + rtl::Reference< ScModelObj > xModel = getCurrentDocument(); uno::Reference< frame::XController > xController( xModel->getCurrentController(), uno::UNO_SET_THROW ); uno::Reference< XHelperInterface > xParent( getActiveWorkbook(), uno::UNO_QUERY_THROW ); uno::Reference< excel::XWindow > xWin( new ScVbaWindow( xParent, mxContext, xModel, xController ) ); @@ -551,7 +551,7 @@ ScVbaApplication::setStatusBar( const uno::Any& _statusbar ) ScVbaApplication::getCalculation() { // TODO: in Excel, this is an application-wide setting - uno::Reference xCalc(getCurrentDocument(), uno::UNO_QUERY_THROW); + rtl::Reference xCalc(getCurrentDocument()); if(xCalc->isAutomaticCalculationEnabled()) return excel::XlCalculation::xlCalculationAutomatic; else @@ -562,7 +562,7 @@ void SAL_CALL ScVbaApplication::setCalculation( ::sal_Int32 _calculation ) { // TODO: in Excel, this is an application-wide setting - uno::Reference< sheet::XCalculatable > xCalc(getCurrentDocument(), uno::UNO_QUERY_THROW); + rtl::Reference< ScModelObj > xCalc(getCurrentDocument()); switch(_calculation) { case excel::XlCalculation::xlCalculationManual: @@ -978,9 +978,8 @@ ScVbaApplication::setIteration( sal_Bool bSet ) void SAL_CALL ScVbaApplication::Calculate() { - uno::Reference< frame::XModel > xModel( getCurrentDocument(), uno::UNO_SET_THROW ); - uno::Reference< sheet::XCalculatable > xCalculatable( getCurrentDocument(), uno::UNO_QUERY_THROW ); - xCalculatable->calculateAll(); + rtl::Reference< ScModelObj > xModel( getCurrentDocument() ); + xModel->calculateAll(); } /// @throws uno::RuntimeException @@ -1429,10 +1428,10 @@ ScVbaApplication::Caller( const uno::Any& /*aIndex*/ ) return aRet; } -uno::Reference< frame::XModel > +ScModelObj* ScVbaApplication::getCurrentDocument() { - return getCurrentExcelDoc(mxContext); + return dynamic_cast(getCurrentExcelDoc(mxContext).get()); } uno::Any SAL_CALL diff --git a/sc/source/ui/vba/vbaapplication.hxx b/sc/source/ui/vba/vbaapplication.hxx index e2bbc49cf60c..05e2501f6c08 100644 --- a/sc/source/ui/vba/vbaapplication.hxx +++ b/sc/source/ui/vba/vbaapplication.hxx @@ -26,6 +26,7 @@ #include #include #include +#include namespace com::sun::star::uno { class XComponentContext; } namespace ooo::vba { class XSink; } @@ -53,7 +54,7 @@ private: comphelper::InvocationHelper m_aInvocationHelper; protected: - virtual css::uno::Reference< css::frame::XModel > getCurrentDocument() override; + virtual ScModelObj* getCurrentDocument() override; public: explicit ScVbaApplication( const css::uno::Reference< css::uno::XComponentContext >& m_xContext ); diff --git a/sc/source/ui/vba/vbaformat.cxx b/sc/source/ui/vba/vbaformat.cxx index a866b7c6105e..20b442857490 100644 --- a/sc/source/ui/vba/vbaformat.cxx +++ b/sc/source/ui/vba/vbaformat.cxx @@ -61,12 +61,12 @@ template< typename... Ifc > ScVbaFormat< Ifc... >::ScVbaFormat( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext > & xContext, uno::Reference< beans::XPropertySet > _xPropertySet, - uno::Reference< frame::XModel > xModel, + const rtl::Reference< ScModelObj >& xModel, bool bCheckAmbiguoity ) : ScVbaFormat_BASE( xParent, xContext ), m_aDefaultLocale( u"en"_ustr, u"US"_ustr, OUString() ), mxPropertySet(std::move( _xPropertySet )), - mxModel(std::move( xModel )), + mxModel( xModel ), mbCheckAmbiguoity( bCheckAmbiguoity ), mbAddIndent( false ) { @@ -773,7 +773,7 @@ ScVbaFormat< Ifc... >::initializeNumberFormats() { if ( !xNumberFormats.is() ) { - mxNumberFormatsSupplier.set( mxModel, uno::UNO_QUERY_THROW ); + mxNumberFormatsSupplier.set( cppu::getXWeak(mxModel.get()), uno::UNO_QUERY_THROW ); xNumberFormats = mxNumberFormatsSupplier->getNumberFormats(); xNumberFormatTypes.set( xNumberFormats, uno::UNO_QUERY ); // _THROW? } diff --git a/sc/source/ui/vba/vbaformat.hxx b/sc/source/ui/vba/vbaformat.hxx index a85818ddd214..696e01286580 100644 --- a/sc/source/ui/vba/vbaformat.hxx +++ b/sc/source/ui/vba/vbaformat.hxx @@ -20,6 +20,7 @@ #include #include +#include namespace com::sun::star::beans { class XPropertySet; } namespace com::sun::star::beans { class XPropertyState; } @@ -31,6 +32,7 @@ namespace ooo::vba::excel { class XFont; } namespace ooo::vba::excel { class XInterior; } class ScCellRangesBase; +class ScModelObj; class SfxItemSet; template< typename... Ifc > @@ -43,7 +45,7 @@ protected: css::uno::Reference< css::util::XNumberFormatsSupplier > mxNumberFormatsSupplier; css::uno::Reference< css::util::XNumberFormats > xNumberFormats; css::uno::Reference< css::util::XNumberFormatTypes > xNumberFormatTypes; - css::uno::Reference< css::frame::XModel > mxModel; + rtl::Reference< ScModelObj > mxModel; css::uno::Reference< css::beans::XPropertyState > xPropertyState; bool mbCheckAmbiguoity; bool mbAddIndent; @@ -61,7 +63,7 @@ protected: virtual ScCellRangesBase* getCellRangesBase(); public: /// @throws css::script::BasicErrorException - ScVbaFormat( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext > & xContext, css::uno::Reference< css::beans::XPropertySet > _xPropertySet, css::uno::Reference< css::frame::XModel > xModel, bool bCheckAmbiguoity ); + ScVbaFormat( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext > & xContext, css::uno::Reference< css::beans::XPropertySet > _xPropertySet, const rtl::Reference& xModel, bool bCheckAmbiguoity ); virtual css::uno::Reference< ov::XHelperInterface > thisHelperIface() = 0; /// @throws css::uno::RuntimeException void SAL_CALL setAddIndent( const css::uno::Any& BAddIndent) { BAddIndent >>= mbAddIndent; } diff --git a/sc/source/ui/vba/vbarange.cxx b/sc/source/ui/vba/vbarange.cxx index 77ccc0129e87..1aedfe261fad 100644 --- a/sc/source/ui/vba/vbarange.cxx +++ b/sc/source/ui/vba/vbarange.cxx @@ -388,14 +388,14 @@ getDocShellFromRanges( const uno::Reference< sheet::XSheetCellRangeContainer >& } /// @throws uno::RuntimeException -static uno::Reference< frame::XModel > getModelFromXIf( const uno::Reference< uno::XInterface >& xIf ) +static rtl::Reference< ScModelObj > getModelFromXIf( const uno::Reference< uno::XInterface >& xIf ) { ScDocShell* pDocShell = getDocShellFromIf(xIf ); return pDocShell->GetModel(); } /// @throws uno::RuntimeException -static uno::Reference< frame::XModel > getModelFromRange( const uno::Reference< table::XCellRange >& xRange ) +static rtl::Reference< ScModelObj > getModelFromRange( const uno::Reference< table::XCellRange >& xRange ) { // the XInterface for getImplementation can be any derived interface, no need for queryInterface uno::Reference< uno::XInterface > xIf( xRange ); @@ -480,7 +480,7 @@ class NumFormatHelper public: explicit NumFormatHelper( const uno::Reference< table::XCellRange >& xRange ) { - mxSupplier.set( getModelFromRange( xRange ), uno::UNO_QUERY_THROW ); + mxSupplier.set( cppu::getXWeak(getModelFromRange( xRange ).get()), uno::UNO_QUERY_THROW ); mxRangeProps.set( xRange, uno::UNO_QUERY_THROW); mxFormats = mxSupplier->getNumberFormats(); } @@ -1418,7 +1418,14 @@ lcl_setupBorders( const uno::Reference< excel::XRange >& xParentRange, const uno } ScVbaRange::ScVbaRange( uno::Sequence< uno::Any> const & args, - uno::Reference< uno::XComponentContext> const & xContext ) : ScVbaRange_BASE( getXSomethingFromArgs< XHelperInterface >( args, 0 ), xContext, getXSomethingFromArgs< beans::XPropertySet >( args, 1, false ), getModelFromXIf( getXSomethingFromArgs< uno::XInterface >( args, 1 ) ), true ), mbIsRows( false ), mbIsColumns( false ) + uno::Reference< uno::XComponentContext> const & xContext ) + : ScVbaRange_BASE( getXSomethingFromArgs< XHelperInterface >( args, 0 ), + xContext, + getXSomethingFromArgs< beans::XPropertySet >( args, 1, false ), + getModelFromXIf( getXSomethingFromArgs< uno::XInterface >( args, 1 ) ), + true ), + mbIsRows( false ), + mbIsColumns( false ) { mxRange.set( mxPropertySet, uno::UNO_QUERY ); mxRanges.set( mxPropertySet, uno::UNO_QUERY ); @@ -5374,8 +5381,8 @@ ScVbaRange::getStyle() OUString sStyleName; xProps->getPropertyValue( CELLSTYLE ) >>= sStyleName; ScDocShell* pShell = getScDocShell(); - uno::Reference< frame::XModel > xModel( pShell->GetModel() ); - uno::Reference< excel::XStyle > xStyle = new ScVbaStyle( this, mxContext, sStyleName, xModel ); + ScModelObj* pModel( pShell->GetModel() ); + uno::Reference< excel::XStyle > xStyle = new ScVbaStyle( this, mxContext, sStyleName, pModel ); return uno::Any( xStyle ); } void SAL_CALL diff --git a/sc/source/ui/vba/vbastyle.cxx b/sc/source/ui/vba/vbastyle.cxx index 86eedeac344d..92e435e63a73 100644 --- a/sc/source/ui/vba/vbastyle.cxx +++ b/sc/source/ui/vba/vbastyle.cxx @@ -21,6 +21,7 @@ #include #include #include +#include using namespace ::ooo::vba; using namespace ::com::sun::star; @@ -28,17 +29,18 @@ using namespace ::com::sun::star; constexpr OUString DISPLAYNAME = u"DisplayName"_ustr; uno::Reference< container::XNameAccess > -ScVbaStyle::getStylesNameContainer( const uno::Reference< frame::XModel >& xModel ) +ScVbaStyle::getStylesNameContainer( const rtl::Reference& xModel ) { - uno::Reference< style::XStyleFamiliesSupplier > xStyleSupplier( xModel, uno::UNO_QUERY_THROW); - uno::Reference< container::XNameAccess > xStylesAccess( xStyleSupplier->getStyleFamilies()->getByName(u"CellStyles"_ustr), uno::UNO_QUERY_THROW ); + if (!xModel) + throw uno::RuntimeException(); + uno::Reference< container::XNameAccess > xStylesAccess( xModel->getStyleFamilies()->getByName(u"CellStyles"_ustr), uno::UNO_QUERY_THROW ); return xStylesAccess; } /// @throws script::BasicErrorException /// @throws uno::RuntimeException static uno::Reference< beans::XPropertySet > -lcl_getStyleProps( const OUString& sStyleName, const uno::Reference< frame::XModel >& xModel ) +lcl_getStyleProps( const OUString& sStyleName, const rtl::Reference& xModel ) { uno::Reference< beans::XPropertySet > xStyleProps( ScVbaStyle::getStylesNameContainer( xModel )->getByName( sStyleName ), uno::UNO_QUERY_THROW ); @@ -56,14 +58,12 @@ void ScVbaStyle::initialise() } mxStyle.set( mxPropertySet, uno::UNO_QUERY_THROW ); - uno::Reference< style::XStyleFamiliesSupplier > xStyleSupplier( mxModel, uno::UNO_QUERY_THROW ); mxStyleFamilyNameContainer.set( ScVbaStyle::getStylesNameContainer( mxModel ), uno::UNO_QUERY_THROW ); - } ScVbaStyle::ScVbaStyle( const uno::Reference< ov::XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext > & xContext, - const OUString& sStyleName, const uno::Reference< frame::XModel >& _xModel ) + const OUString& sStyleName, const rtl::Reference& _xModel ) : ScVbaStyle_BASE( xParent, xContext, lcl_getStyleProps( sStyleName, _xModel ), _xModel, false ) { try @@ -79,7 +79,7 @@ ScVbaStyle::ScVbaStyle( const uno::Reference< ov::XHelperInterface >& xParent, ScVbaStyle::ScVbaStyle( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext > & xContext, const uno::Reference< beans::XPropertySet >& _xPropertySet, - const uno::Reference< frame::XModel >& _xModel ) + const rtl::Reference& _xModel ) : ScVbaStyle_BASE( xParent, xContext, _xPropertySet, _xModel, false ) { try diff --git a/sc/source/ui/vba/vbastyle.hxx b/sc/source/ui/vba/vbastyle.hxx index cc002ce6ff64..df565e75fc18 100644 --- a/sc/source/ui/vba/vbastyle.hxx +++ b/sc/source/ui/vba/vbastyle.hxx @@ -25,6 +25,8 @@ #include #include "vbaformat.hxx" +class ScModelObj; + typedef ScVbaFormat< ov::excel::XStyle > ScVbaStyle_BASE; class ScVbaStyle final : public ScVbaStyle_BASE @@ -37,12 +39,12 @@ class ScVbaStyle final : public ScVbaStyle_BASE public: /// @throws css::script::BasicErrorException /// @throws css::uno::RuntimeException - ScVbaStyle( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext > & xContext, const OUString& sStyleName, const css::uno::Reference< css::frame::XModel >& _xModel ); + ScVbaStyle( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext > & xContext, const OUString& sStyleName, const rtl::Reference& _xModel ); /// @throws css::script::BasicErrorException /// @throws css::uno::RuntimeException - ScVbaStyle( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext > & xContext, const css::uno::Reference< css::beans::XPropertySet >& _xPropertySet, const css::uno::Reference< css::frame::XModel >& _xModel ); + ScVbaStyle( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext > & xContext, const css::uno::Reference< css::beans::XPropertySet >& _xPropertySet, const rtl::Reference& _cModel ); /// @throws css::uno::RuntimeException - static css::uno::Reference< css::container::XNameAccess > getStylesNameContainer( const css::uno::Reference< css::frame::XModel >& xModel ); + static css::uno::Reference< css::container::XNameAccess > getStylesNameContainer( const rtl::Reference& xModel ); virtual css::uno::Reference< ov::XHelperInterface > thisHelperIface() override { return this; }; // XStyle Methods virtual sal_Bool SAL_CALL BuiltIn() override; diff --git a/sc/source/ui/vba/vbastyles.cxx b/sc/source/ui/vba/vbastyles.cxx index 8e1aa8cb2ca4..829f420e767d 100644 --- a/sc/source/ui/vba/vbastyles.cxx +++ b/sc/source/ui/vba/vbastyles.cxx @@ -24,12 +24,13 @@ #include #include #include +#include using namespace ::ooo::vba; using namespace ::com::sun::star; static css::uno::Any -lcl_createAPIStyleToVBAObject( const css::uno::Any& aObject, const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< frame::XModel >& xModel ) +lcl_createAPIStyleToVBAObject( const css::uno::Any& aObject, const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const rtl::Reference& xModel ) { uno::Reference< beans::XPropertySet > xStyleProps( aObject, uno::UNO_QUERY_THROW ); uno::Reference< excel::XStyle > xStyle( new ScVbaStyle( xParent, xContext, xStyleProps, xModel ) ); @@ -38,15 +39,15 @@ lcl_createAPIStyleToVBAObject( const css::uno::Any& aObject, const uno::Referenc ScVbaStyles::ScVbaStyles( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< css::uno::XComponentContext > & xContext, - const uno::Reference< frame::XModel >& xModel ) + ScModelObj* pModel ) : ScVbaStyles_BASE( xParent, xContext, - uno::Reference< container::XIndexAccess >( ScVbaStyle::getStylesNameContainer( xModel ), uno::UNO_QUERY_THROW ) ), - mxModel( xModel ) + uno::Reference< container::XIndexAccess >( ScVbaStyle::getStylesNameContainer( pModel ), uno::UNO_QUERY_THROW ) ), + mxModel( pModel ) { try { - mxMSF.set( mxModel, uno::UNO_QUERY_THROW ); + mxMSF = mxModel; mxNameContainerCellStyles.set( m_xNameAccess, uno::UNO_QUERY_THROW ); } catch (uno::Exception& ) @@ -80,11 +81,11 @@ class EnumWrapper : public EnumerationHelper_BASE uno::Reference m_xIndexAccess; uno::Reference m_xParent; uno::Reference m_xContext; - uno::Reference m_xModel; + rtl::Reference m_xModel; sal_Int32 nIndex; public: - EnumWrapper( uno::Reference< container::XIndexAccess > xIndexAccess, uno::Reference xParent, uno::Reference xContext, uno::Reference xModel ) : m_xIndexAccess(std::move( xIndexAccess )), m_xParent(std::move( xParent )), m_xContext(std::move( xContext )), m_xModel(std::move( xModel )), nIndex( 0 ) {} + EnumWrapper( uno::Reference< container::XIndexAccess > xIndexAccess, uno::Reference xParent, uno::Reference xContext, rtl::Reference xModel ) : m_xIndexAccess(std::move( xIndexAccess )), m_xParent(std::move( xParent )), m_xContext(std::move( xContext )), m_xModel(std::move( xModel )), nIndex( 0 ) {} virtual sal_Bool SAL_CALL hasMoreElements( ) override { return ( nIndex < m_xIndexAccess->getCount() ); diff --git a/sc/source/ui/vba/vbastyles.hxx b/sc/source/ui/vba/vbastyles.hxx index 78990bca969c..fad786e948c4 100644 --- a/sc/source/ui/vba/vbastyles.hxx +++ b/sc/source/ui/vba/vbastyles.hxx @@ -19,19 +19,21 @@ #pragma once #include #include +#include namespace com::sun::star::lang { class XMultiServiceFactory; } namespace com::sun::star::container { class XNameContainer; } +class ScModelObj; typedef CollTestImplHelper< ov::excel::XStyles > ScVbaStyles_BASE; class ScVbaStyles: public ScVbaStyles_BASE { - css::uno::Reference< css::frame::XModel > mxModel; + rtl::Reference< ScModelObj > mxModel; css::uno::Reference< css::lang::XMultiServiceFactory > mxMSF; css::uno::Reference< css::container::XNameContainer > mxNameContainerCellStyles; public: /// @throws css::script::BasicErrorException - ScVbaStyles( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext > & xContext, const css::uno::Reference< css::frame::XModel >& xModel ); + ScVbaStyles( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext > & xContext, ScModelObj* pModel ); /// @throws css::uno::RuntimeException css::uno::Sequence< OUString > getStyleNames(); /// @throws css::script::BasicErrorException diff --git a/sc/source/ui/vba/vbawindow.cxx b/sc/source/ui/vba/vbawindow.cxx index c9847e6d523d..4ee3a1cc5949 100644 --- a/sc/source/ui/vba/vbawindow.cxx +++ b/sc/source/ui/vba/vbawindow.cxx @@ -190,7 +190,7 @@ public: ScVbaWindow::ScVbaWindow( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, - const uno::Reference< frame::XModel >& xModel, + const rtl::Reference< ScModelObj >& xModel, const uno::Reference< frame::XController >& xController ) : WindowImpl_BASE( xParent, xContext, xController ), m_xModel(xModel) @@ -202,7 +202,7 @@ ScVbaWindow::ScVbaWindow( const uno::Sequence< uno::Any >& args, const uno::Reference< uno::XComponentContext >& xContext ) : WindowImpl_BASE( args, xContext ), - m_xModel(getXSomethingFromArgs< frame::XModel >( args, 1, false )) + m_xModel(dynamic_cast(getXSomethingFromArgs< frame::XModel >( args, 1, false ).get())) { init(); } @@ -729,7 +729,7 @@ void SAL_CALL ScVbaWindow::setZoom(const uno::Any& _zoom) { sal_Int16 nZoom = 100; _zoom >>= nZoom; - uno::Reference xSpreadDoc( m_xModel, uno::UNO_QUERY_THROW ); + uno::Reference xSpreadDoc( m_xModel ); uno::Reference< excel::XWorksheet > xActiveSheet = ActiveSheet(); SCTAB nTab = 0; if ( !ScVbaWorksheets::nameExists (xSpreadDoc, xActiveSheet->getName(), nTab) ) diff --git a/sc/source/ui/vba/vbawindow.hxx b/sc/source/ui/vba/vbawindow.hxx index bb84719a6be3..0a6e0cf1b205 100644 --- a/sc/source/ui/vba/vbawindow.hxx +++ b/sc/source/ui/vba/vbawindow.hxx @@ -27,12 +27,14 @@ #include +class ScModelObj; + typedef cppu::ImplInheritanceHelper< VbaWindowBase, ov::excel::XWindow > WindowImpl_BASE; class ScVbaWindow : public WindowImpl_BASE { private: - css::uno::Reference m_xModel; + rtl::Reference m_xModel; css::uno::Reference< ov::excel::XPane > m_xPane; void init(); @@ -55,7 +57,7 @@ public: ScVbaWindow( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, - const css::uno::Reference< css::frame::XModel >& xModel, + const rtl::Reference< ScModelObj >& xModel, const css::uno::Reference< css::frame::XController >& xController ); /// @throws css::uno::RuntimeException ScVbaWindow( diff --git a/sc/source/ui/vba/vbawindows.cxx b/sc/source/ui/vba/vbawindows.cxx index 4b36116c6c4e..9807be7ce626 100644 --- a/sc/source/ui/vba/vbawindows.cxx +++ b/sc/source/ui/vba/vbawindows.cxx @@ -41,7 +41,7 @@ using namespace ::ooo::vba; typedef std::unordered_map< OUString, sal_Int32 > NameIndexHash; -static uno::Reference< XHelperInterface > lcl_createWorkbookHIParent( const uno::Reference< frame::XModel >& xModel, const uno::Reference< uno::XComponentContext >& xContext, const uno::Any& aApplication ) +static uno::Reference< XHelperInterface > lcl_createWorkbookHIParent( const rtl::Reference< ScModelObj >& xModel, const uno::Reference< uno::XComponentContext >& xContext, const uno::Any& aApplication ) { return new ScVbaWorkbook( uno::Reference< XHelperInterface >( aApplication, uno::UNO_QUERY_THROW ), xContext, xModel ); } @@ -49,9 +49,10 @@ static uno::Reference< XHelperInterface > lcl_createWorkbookHIParent( const uno: static uno::Any ComponentToWindow( const uno::Any& aSource, const uno::Reference< uno::XComponentContext > & xContext, const uno::Any& aApplication ) { uno::Reference< frame::XModel > xModel( aSource, uno::UNO_QUERY_THROW ); + ScModelObj* pModel = dynamic_cast(xModel.get()); // !! TODO !! iterate over all controllers - uno::Reference< frame::XController > xController( xModel->getCurrentController(), uno::UNO_SET_THROW ); - uno::Reference< excel::XWindow > xWin( new ScVbaWindow( lcl_createWorkbookHIParent( xModel, xContext, aApplication ), xContext, xModel, xController ) ); + uno::Reference< frame::XController > xController( pModel->getCurrentController(), uno::UNO_SET_THROW ); + uno::Reference< excel::XWindow > xWin( new ScVbaWindow( lcl_createWorkbookHIParent( pModel, xContext, aApplication ), xContext, pModel, xController ) ); return uno::Any( xWin ); } @@ -144,7 +145,10 @@ public: if ( xNext.is() ) { m_windows.push_back( xNext ); - uno::Reference< frame::XModel > xModel( xNext, uno::UNO_QUERY_THROW ); // that the spreadsheetdocument is a xmodel is a given + // that the spreadsheetdocument is a xmodel is a given + rtl::Reference xModel = dynamic_cast(xNext.get()); + if (!xModel) + throw uno::RuntimeException(); // tdf#126457 - add workbook name to window titles rtl::Reference workbook(new ScVbaWorkbook( diff --git a/sc/source/ui/vba/vbaworkbook.cxx b/sc/source/ui/vba/vbaworkbook.cxx index 7abf25406248..8c58603e00d7 100644 --- a/sc/source/ui/vba/vbaworkbook.cxx +++ b/sc/source/ui/vba/vbaworkbook.cxx @@ -190,7 +190,7 @@ ScVbaWorkbook::init() ScVbaWorkbook::ScVbaWorkbook( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, - css::uno::Reference< css::frame::XModel > const & xModel ) + rtl::Reference< ScModelObj > const & xModel ) : ScVbaWorkbook_BASE( xParent, xContext ), mxModel(xModel) { @@ -200,7 +200,7 @@ ScVbaWorkbook::ScVbaWorkbook( const css::uno::Reference< ov::XHelperInterface >& ScVbaWorkbook::ScVbaWorkbook( uno::Sequence< uno::Any> const & args, uno::Reference< uno::XComponentContext> const & xContext ) : ScVbaWorkbook_BASE( args, xContext ), - mxModel(getXSomethingFromArgs< frame::XModel >( args, 1 )) + mxModel(dynamic_cast(getXSomethingFromArgs< frame::XModel >( args, 1 ).get())) { init(); } @@ -263,8 +263,7 @@ ScVbaWorkbook::Protect( const uno::Any &aPassword ) sal_Bool ScVbaWorkbook::getProtectStructure() { - uno::Reference< util::XProtectable > xProt( getModel(), uno::UNO_QUERY_THROW ); - return xProt->isProtected(); + return getModel()->isProtected(); } sal_Bool SAL_CALL ScVbaWorkbook::getPrecisionAsDisplayed() @@ -290,7 +289,7 @@ void SAL_CALL ScVbaWorkbook::setPrecisionAsDisplayed( sal_Bool _precisionAsDispl OUString SAL_CALL ScVbaWorkbook::getAuthor() { - uno::Reference xDPS( getModel(), uno::UNO_QUERY ); + rtl::Reference xDPS( getModel() ); if (!xDPS.is()) return u"?"_ustr; uno::Reference xDocProps = xDPS->getDocumentProperties(); @@ -299,7 +298,7 @@ OUString SAL_CALL ScVbaWorkbook::getAuthor() void SAL_CALL ScVbaWorkbook::setAuthor( const OUString& _author ) { - uno::Reference xDPS( getModel(), uno::UNO_QUERY ); + rtl::Reference xDPS( getModel() ); if (!xDPS.is()) return; uno::Reference xDocProps = xDPS->getDocumentProperties(); @@ -311,7 +310,7 @@ ScVbaWorkbook::SaveCopyAs( const OUString& sFileName ) { OUString aURL; osl::FileBase::getFileURLFromSystemPath( sFileName, aURL ); - uno::Reference< frame::XStorable > xStor( getModel(), uno::UNO_QUERY_THROW ); + rtl::Reference< ScModelObj > xStor( getModel() ); uno::Sequence< beans::PropertyValue > storeProps{ comphelper::makePropertyValue( u"FilterName"_ustr, SC_XL97_FILTER_NAME) }; xStor->storeToURL( aURL, storeProps ); @@ -358,7 +357,7 @@ ScVbaWorkbook::SaveAs( const uno::Any& FileName, const uno::Any& FileFormat, con uno::Sequence storeProps{ comphelper::makePropertyValue(u"FilterName"_ustr, uno::Any()) }; setFilterPropsFromFormat( nFileFormat, storeProps ); - uno::Reference< frame::XStorable > xStor( getModel(), uno::UNO_QUERY_THROW ); + rtl::Reference< ScModelObj > xStor( getModel() ); xStor->storeAsURL( sURL, storeProps ); } @@ -417,7 +416,7 @@ ScVbaWorkbook::getServiceNames() OUString SAL_CALL ScVbaWorkbook::getCodeName() { - uno::Reference< beans::XPropertySet > xModelProp( getModel(), uno::UNO_QUERY_THROW ); + rtl::Reference< ScModelObj > xModelProp( getModel() ); return xModelProp->getPropertyValue(u"CodeName"_ustr).get< OUString >(); } diff --git a/sc/source/ui/vba/vbaworkbook.hxx b/sc/source/ui/vba/vbaworkbook.hxx index d6ee4b016779..af0dddc523b8 100644 --- a/sc/source/ui/vba/vbaworkbook.hxx +++ b/sc/source/ui/vba/vbaworkbook.hxx @@ -22,6 +22,7 @@ #include #include #include +#include typedef cppu::ImplInheritanceHelper< VbaDocumentBase, ov::excel::XWorkbook > ScVbaWorkbook_BASE; @@ -31,14 +32,14 @@ class ScVbaWorkbook : public ScVbaWorkbook_BASE static bool setFilterPropsFromFormat( sal_Int32 nFormat, css::uno::Sequence< css::beans::PropertyValue >& rProps ); void init(); - css::uno::Reference< css::frame::XModel > mxModel; + rtl::Reference< ScModelObj > mxModel; protected: - virtual css::uno::Reference< css::frame::XModel > getModel() const override { return mxModel; } + virtual ScModelObj* getModel() const override { return mxModel.get(); } public: ScVbaWorkbook( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, - css::uno::Reference< css::frame::XModel > const & xModel ); + rtl::Reference< ScModelObj > const & xModel ); ScVbaWorkbook( css::uno::Sequence< css::uno::Any > const& aArgs, css::uno::Reference< css::uno::XComponentContext >const& xContext ); // Attributes diff --git a/sc/source/ui/vba/vbaworkbooks.cxx b/sc/source/ui/vba/vbaworkbooks.cxx index 468124764bdf..d1982e70d885 100644 --- a/sc/source/ui/vba/vbaworkbooks.cxx +++ b/sc/source/ui/vba/vbaworkbooks.cxx @@ -42,11 +42,10 @@ const sal_Int16 CUSTOM_CHAR = 5; static uno::Any getWorkbook( const uno::Reference< uno::XComponentContext >& xContext, - const uno::Reference< sheet::XSpreadsheetDocument > &xDoc, + const rtl::Reference< ScModelObj > &xModel, const uno::Reference< XHelperInterface >& xParent ) { // FIXME: fine as long as ScVbaWorkbook is stateless ... - uno::Reference< frame::XModel > xModel( xDoc, uno::UNO_QUERY ); if( !xModel.is() ) return uno::Any(); @@ -71,7 +70,7 @@ public: virtual uno::Any SAL_CALL nextElement( ) override { uno::Reference< sheet::XSpreadsheetDocument > xDoc( m_xEnumeration->nextElement(), uno::UNO_QUERY_THROW ); - return getWorkbook( m_xContext, xDoc, m_xParent ); + return getWorkbook( m_xContext, static_cast(xDoc.get()), m_xParent ); } }; @@ -102,7 +101,7 @@ uno::Any ScVbaWorkbooks::createCollectionObject( const css::uno::Any& aSource ) { uno::Reference< sheet::XSpreadsheetDocument > xDoc( aSource, uno::UNO_QUERY_THROW ); - return getWorkbook( mxContext, xDoc, mxParent ); + return getWorkbook( mxContext, dynamic_cast(xDoc.get()), mxParent ); } uno::Any SAL_CALL @@ -147,7 +146,7 @@ ScVbaWorkbooks::Add( const uno::Any& Template ) if (!xSpreadDoc.is()) return uno::Any(); - uno::Any aRet = getWorkbook( mxContext, xSpreadDoc, mxParent ); + uno::Any aRet = getWorkbook( mxContext, dynamic_cast(xSpreadDoc.get()), mxParent ); uno::Reference< excel::XWorkbook > xWBook( aRet, uno::UNO_QUERY ); if (xWBook.is()) xWBook->Activate(); @@ -266,7 +265,7 @@ ScVbaWorkbooks::Open( const OUString& rFileName, const uno::Any& /*UpdateLinks*/ throw uno::RuntimeException(u"Bad Format"_ustr ); uno::Reference xSpreadDoc( openDocument( rFileName, ReadOnly, sProps ), uno::UNO_QUERY_THROW ); - uno::Any aRet = getWorkbook( mxContext, xSpreadDoc, mxParent ); + uno::Any aRet = getWorkbook( mxContext, dynamic_cast(xSpreadDoc.get()), mxParent ); uno::Reference< excel::XWorkbook > xWBook( aRet, uno::UNO_QUERY ); if ( xWBook.is() ) xWBook->Activate(); diff --git a/sc/source/ui/view/tabvwsh4.cxx b/sc/source/ui/view/tabvwsh4.cxx index 04f8cc346f60..0a9aa6970899 100644 --- a/sc/source/ui/view/tabvwsh4.cxx +++ b/sc/source/ui/view/tabvwsh4.cxx @@ -1881,8 +1881,8 @@ static bool lcl_CheckInArrayCols(std::vector>& nUniqueRe rtl::Reference ScTabViewShell::GetRangeWithSheet(css::table::CellRangeAddress& rRangeData, bool& bHasData, bool bHasUnoArguments) { // get spreadsheet document model & controller - uno::Reference xModel(GetViewData().GetDocShell()->GetModel()); - uno::Reference xController(xModel->getCurrentController()); + ScModelObj* pModel(GetViewData().GetDocShell()->GetModel()); + uno::Reference xController(pModel->getCurrentController()); // spreadsheet's extension of com.sun.star.frame.Controller service ScTabViewObj* pSpreadsheetDocument = dynamic_cast(xController.get()); @@ -1952,30 +1952,27 @@ void ScTabViewShell::HandleDuplicateRecordsHighlight(const rtl::Reference xModel(GetViewData().GetDocShell()->GetModel()); + ScModelObj* pModel(GetViewData().GetDocShell()->GetModel()); rtl::Reference xSheetRange( ActiveSheet->getScCellRangeByPosition(aRange.StartColumn, aRange.StartRow, aRange.EndColumn, aRange.EndRow)); uno::Sequence> aDataArray = xSheetRange->getDataArray(); - uno::Reference< document::XUndoManagerSupplier > xUndoManager( xModel, uno::UNO_QUERY ); - uno::Reference xLockable(xModel, uno::UNO_QUERY); - ScDocument& rDoc = GetViewData().GetDocShell()->GetDocument(); comphelper::ScopeGuard aUndoContextGuard( - [&xUndoManager, &xLockable, &xModel, &rDoc] { - xUndoManager->getUndoManager()->leaveUndoContext(); - xLockable->removeActionLock(); - if (xModel->hasControllersLocked()) - xModel->unlockControllers(); + [pModel, &rDoc] { + pModel->getUndoManager()->leaveUndoContext(); + pModel->removeActionLock(); + if (pModel->hasControllersLocked()) + pModel->unlockControllers(); rDoc.UnlockAdjustHeight(); }); rDoc.LockAdjustHeight(); - xModel->lockControllers(); - xLockable->addActionLock(); - xUndoManager->getUndoManager()->enterUndoContext("HandleDuplicateRecords"); + pModel->lockControllers(); + pModel->addActionLock(); + pModel->getUndoManager()->enterUndoContext("HandleDuplicateRecords"); bool nModifier = false; // modifier key pressed? bool bNoDuplicatesForSelection = true; @@ -2052,34 +2049,30 @@ void ScTabViewShell::HandleDuplicateRecordsRemove(const rtl::Reference xModel(GetViewData().GetDocShell()->GetModel()); + ScModelObj* pModel(GetViewData().GetDocShell()->GetModel()); rtl::Reference xSheetRange( ActiveSheet->getScCellRangeByPosition(aRange.StartColumn, aRange.StartRow, aRange.EndColumn, aRange.EndRow)); uno::Sequence> aDataArray = xSheetRange->getDataArray(); - uno::Reference< document::XUndoManagerSupplier > xUndoManager( xModel, uno::UNO_QUERY ); - uno::Reference xLockable(xModel, uno::UNO_QUERY); - - uno::Reference xCalculatable(xModel, uno::UNO_QUERY); - bool bAutoCalc = xCalculatable->isAutomaticCalculationEnabled(); + bool bAutoCalc = pModel->isAutomaticCalculationEnabled(); ScDocument& rDoc = GetViewData().GetDocShell()->GetDocument(); comphelper::ScopeGuard aUndoContextGuard( - [&xUndoManager, &xLockable, &xModel, &xCalculatable, &bAutoCalc, &rDoc] { - xUndoManager->getUndoManager()->leaveUndoContext(); - xCalculatable->enableAutomaticCalculation(bAutoCalc); - xLockable->removeActionLock(); - if (xModel->hasControllersLocked()) - xModel->unlockControllers(); + [pModel, &bAutoCalc, &rDoc] { + pModel->getUndoManager()->leaveUndoContext(); + pModel->enableAutomaticCalculation(bAutoCalc); + pModel->removeActionLock(); + if (pModel->hasControllersLocked()) + pModel->unlockControllers(); rDoc.UnlockAdjustHeight(); }); rDoc.LockAdjustHeight(); - xModel->lockControllers(); - xLockable->addActionLock(); - xCalculatable->enableAutomaticCalculation(true); - xUndoManager->getUndoManager()->enterUndoContext("HandleDuplicateRecords"); + pModel->lockControllers(); + pModel->addActionLock(); + pModel->enableAutomaticCalculation(true); + pModel->getUndoManager()->enterUndoContext("HandleDuplicateRecords"); if (bDuplicateRows) { diff --git a/sw/source/ui/vba/vbaapplication.cxx b/sw/source/ui/vba/vbaapplication.cxx index 3310f8688a05..67c44e717df6 100644 --- a/sw/source/ui/vba/vbaapplication.cxx +++ b/sw/source/ui/vba/vbaapplication.cxx @@ -490,10 +490,10 @@ SwVbaApplication::getServiceNames() return aServiceNames; } -uno::Reference< frame::XModel > +SfxBaseModel* SwVbaApplication::getCurrentDocument() { - return static_cast(getCurrentWordDoc( mxContext ).get()); + return getCurrentWordDoc( mxContext ).get(); } rtl::Reference< SwXTextDocument > diff --git a/sw/source/ui/vba/vbaapplication.hxx b/sw/source/ui/vba/vbaapplication.hxx index cf2e79ab414d..ac573e3a4f80 100644 --- a/sw/source/ui/vba/vbaapplication.hxx +++ b/sw/source/ui/vba/vbaapplication.hxx @@ -32,6 +32,7 @@ #include #include #include +#include #include "vbawindow.hxx" @@ -124,7 +125,8 @@ public: // XSinkCaller virtual void SAL_CALL CallSinks( const OUString& Method, css::uno::Sequence< css::uno::Any >& Arguments ) override; - virtual css::uno::Reference< css::frame::XModel > getCurrentDocument() override; + // this should be SwXTextDocument, but the inheritance hierarchy makes that impossoble + virtual SfxBaseModel* getCurrentDocument() override; rtl::Reference getCurrentSwDocument(); }; diff --git a/sw/source/ui/vba/vbadocument.cxx b/sw/source/ui/vba/vbadocument.cxx index b742f6f843e1..049cd2a81aa1 100644 --- a/sw/source/ui/vba/vbadocument.cxx +++ b/sw/source/ui/vba/vbadocument.cxx @@ -221,8 +221,7 @@ SwVbaDocument::CustomDocumentProperties( const uno::Any& index ) uno::Any SAL_CALL SwVbaDocument::Bookmarks( const uno::Any& rIndex ) { - uno::Reference< text::XBookmarksSupplier > xBookmarksSupplier( getModel(),uno::UNO_QUERY_THROW ); - uno::Reference xBookmarks( xBookmarksSupplier->getBookmarks(), uno::UNO_QUERY_THROW ); + uno::Reference xBookmarks( mxTextDocument->getBookmarks(), uno::UNO_QUERY_THROW ); uno::Reference< XCollection > xBookmarksVba( new SwVbaBookmarks( this, mxContext, xBookmarks, mxTextDocument ) ); if ( rIndex.getValueTypeClass() == uno::TypeClass_VOID ) return uno::Any( xBookmarksVba ); @@ -230,7 +229,7 @@ SwVbaDocument::Bookmarks( const uno::Any& rIndex ) return xBookmarksVba->Item( rIndex, uno::Any() ); } -uno::Reference< frame::XModel > SwVbaDocument::getModel() const +SfxBaseModel* SwVbaDocument::getModel() const { return static_cast(mxTextDocument.get()); } uno::Any SwVbaDocument::ContentControls(const uno::Any& index) @@ -286,8 +285,7 @@ uno::Reference SwVbaDocument::getActiveWindow() uno::Any SAL_CALL SwVbaDocument::Variables( const uno::Any& rIndex ) { - uno::Reference< css::document::XDocumentPropertiesSupplier > xDocumentPropertiesSupplier( getModel(),uno::UNO_QUERY_THROW ); - uno::Reference< css::document::XDocumentProperties > xDocumentProperties = xDocumentPropertiesSupplier->getDocumentProperties(); + uno::Reference< css::document::XDocumentProperties > xDocumentProperties = mxTextDocument->getDocumentProperties(); uno::Reference< beans::XPropertyAccess > xUserDefined( xDocumentProperties->getUserDefinedProperties(), uno::UNO_QUERY_THROW ); uno::Reference< XCollection > xVariables( new SwVbaVariables( this, mxContext, xUserDefined ) ); @@ -386,9 +384,7 @@ uno::Any SAL_CALL SwVbaDocument::getAttachedTemplate() { uno::Reference< word::XTemplate > xTemplate; - uno::Reference const xDocPropSupp( - getModel(), uno::UNO_QUERY_THROW); - uno::Reference< css::document::XDocumentProperties > xDocProps( xDocPropSupp->getDocumentProperties(), uno::UNO_SET_THROW ); + uno::Reference< css::document::XDocumentProperties > xDocProps( mxTextDocument->getDocumentProperties(), uno::UNO_SET_THROW ); xTemplate = new SwVbaTemplate( this, mxContext, xDocProps->getTemplateURL() ); return uno::Any( xTemplate ); @@ -411,9 +407,7 @@ SwVbaDocument::setAttachedTemplate( const css::uno::Any& _attachedtemplate ) else osl::FileBase::getFileURLFromSystemPath( sTemplate, aURL ); - uno::Reference const xDocPropSupp( - getModel(), uno::UNO_QUERY_THROW ); - uno::Reference< css::document::XDocumentProperties > xDocProps( xDocPropSupp->getDocumentProperties(), uno::UNO_SET_THROW ); + uno::Reference< css::document::XDocumentProperties > xDocProps( mxTextDocument->getDocumentProperties(), uno::UNO_SET_THROW ); xDocProps->setTemplateURL( aURL ); } @@ -595,8 +589,7 @@ SwVbaDocument::SaveAs2000( const uno::Any& FileName, const uno::Any& FileFormat, setFilterPropsFromFormat( nFileFormat, storeProps ); - uno::Reference< frame::XStorable > xStor( getModel(), uno::UNO_QUERY_THROW ); - xStor->storeAsURL( sURL, storeProps ); + mxTextDocument->storeAsURL( sURL, storeProps ); } void SAL_CALL @@ -622,8 +615,7 @@ SwVbaDocument::SavePreviewPngAs( const uno::Any& FileName ) uno::Sequence storeProps{ comphelper::makePropertyValue(u"FilterName"_ustr, u"writer_png_Export"_ustr) }; - uno::Reference< frame::XStorable > xStor( getModel(), uno::UNO_QUERY_THROW ); - xStor->storeToURL( sURL, storeProps ); + mxTextDocument->storeToURL( sURL, storeProps ); } uno::Any diff --git a/sw/source/ui/vba/vbadocument.hxx b/sw/source/ui/vba/vbadocument.hxx index aeaedecedd1d..7abc36547770 100644 --- a/sw/source/ui/vba/vbadocument.hxx +++ b/sw/source/ui/vba/vbadocument.hxx @@ -26,6 +26,7 @@ #include #include #include +#include #include @@ -45,7 +46,8 @@ private: css::uno::Reference< css::container::XNameAccess > getFormControls() const; protected: - virtual css::uno::Reference< css::frame::XModel > getModel() const override; + // this should be SwXTextDocument, but the inheritance hierarchy makes that impossoble + virtual SfxBaseModel* getModel() const override; public: SwVbaDocument( const css::uno::Reference< ooo::vba::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& m_xContext, rtl::Reference< SwXTextDocument > const & xModel ); diff --git a/vbahelper/source/vbahelper/vbaapplicationbase.cxx b/vbahelper/source/vbahelper/vbaapplicationbase.cxx index c4f91f01044a..0ed0b2d7bc4e 100644 --- a/vbahelper/source/vbahelper/vbaapplicationbase.cxx +++ b/vbahelper/source/vbahelper/vbaapplicationbase.cxx @@ -419,7 +419,7 @@ uno::Any SAL_CALL VbaApplicationBase::getVBE() try // return empty object on error { // "VBE" object does not have a parent, but pass document model to be able to determine application type - uno::Sequence< uno::Any > aArgs{ uno::Any(getCurrentDocument()) }; + uno::Sequence< uno::Any > aArgs{ uno::Any(uno::Reference(getCurrentDocument())) }; uno::Reference< lang::XMultiComponentFactory > xServiceManager( mxContext->getServiceManager(), uno::UNO_SET_THROW ); uno::Reference< uno::XInterface > xVBE = xServiceManager->createInstanceWithArgumentsAndContext( u"ooo.vba.vbide.VBE"_ustr , aArgs, mxContext ); diff --git a/vbahelper/source/vbahelper/vbadocumentbase.cxx b/vbahelper/source/vbahelper/vbadocumentbase.cxx index 7db25a6bbba5..6665378e5b40 100644 --- a/vbahelper/source/vbahelper/vbadocumentbase.cxx +++ b/vbahelper/source/vbahelper/vbadocumentbase.cxx @@ -290,7 +290,7 @@ VbaDocumentBase::getVBProject() if (xVBE) { uno::Sequence< uno::Any > aArgs{ uno::Any(xVBE), // the VBE - uno::Any(getModel()) }; // document model for script container access + uno::Any(uno::Reference(getModel())) }; // document model for script container access uno::Reference< lang::XMultiComponentFactory > xServiceManager( mxContext->getServiceManager() ); if (xServiceManager) mxVBProject = xServiceManager->createInstanceWithArgumentsAndContext( From 212d17f7ea74524edc3f93e45b111a2780482933 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Wed, 23 Sep 2026 10:50:50 +0200 Subject: [PATCH 070/289] add a non-const GetEditEngine() method to Outliner to avoid const-casting all over the place Change-Id: I75f3442341894dbe4e12cc7995669dc7f3bf63f7 Signed-off-by: Noel Grandin Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/13354 Tested-by: Jenkins CPCI Reviewed-by: Mike Kaganski (cherry picked from commit 318e2cf839c6311d4a69572b4534f554bdda3f96) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211604 Reviewed-by: Xisco Fauli Tested-by: Jenkins --- editeng/qa/unit/core-test.cxx | 4 ++-- editeng/source/outliner/outlin2.cxx | 5 +++++ editeng/source/outliner/overflowingtxt.cxx | 10 +++++----- editeng/source/uno/unoforou.cxx | 16 ++++++++-------- include/editeng/outliner.hxx | 1 + include/editeng/overflowingtxt.hxx | 4 ++-- sc/source/ui/drawfunc/drtxtob.cxx | 2 +- sd/source/filter/html/htmlex.cxx | 4 ++-- sd/source/filter/ppt/pptin.cxx | 2 +- sd/source/ui/dlg/headerfooterdlg.cxx | 10 +++++----- sd/source/ui/docshell/docshel4.cxx | 2 +- sd/source/ui/view/outlview.cxx | 2 +- svx/source/sdr/properties/textproperties.cxx | 10 +++++----- svx/source/table/cell.cxx | 2 +- svx/source/table/tablehtmlimporter.cxx | 2 +- svx/source/table/tablertfimporter.cxx | 2 +- svx/source/unodraw/unoshtxt.cxx | 12 ++++++------ sw/source/uibase/uno/unotxdoc.cxx | 2 +- 18 files changed, 49 insertions(+), 43 deletions(-) diff --git a/editeng/qa/unit/core-test.cxx b/editeng/qa/unit/core-test.cxx index cf979e68f190..7dacf23e5501 100644 --- a/editeng/qa/unit/core-test.cxx +++ b/editeng/qa/unit/core-test.cxx @@ -448,7 +448,7 @@ void Test::testHyperlinkCopyPaste() aOutliner.SetCalcFieldValueHdl(LINK(nullptr, Test, CalcFieldValueHdl)); // Create EditEngine's instance - EditEngine& aEditEngine = const_cast(aOutliner.GetEditEngine()); + EditEngine& aEditEngine = aOutliner.GetEditEngine(); // Get EditDoc for current EditEngine's instance EditDoc& rDoc = aEditEngine.GetEditDoc(); @@ -2214,7 +2214,7 @@ void Test::testTdf154248MultilineFieldWrapping() aOutliner.SetCalcFieldValueHdl(LINK(nullptr, Test, CalcFieldValueHdl)); // Create EditEngine's instance - EditEngine& aEditEngine = const_cast(aOutliner.GetEditEngine()); + EditEngine& aEditEngine = aOutliner.GetEditEngine(); aEditEngine.SetPaperSize(Size(2000, 2000)); aEditEngine.SetText(u"ABC DEF ABC DEFGH"_ustr); // Positions Ref ....*4............ diff --git a/editeng/source/outliner/outlin2.cxx b/editeng/source/outliner/outlin2.cxx index c2cbca480b16..39506b2e1028 100644 --- a/editeng/source/outliner/outlin2.cxx +++ b/editeng/source/outliner/outlin2.cxx @@ -502,6 +502,11 @@ const EditEngine& Outliner::GetEditEngine() const return *pEditEngine; } +EditEngine& Outliner::GetEditEngine() +{ + return *pEditEngine; +} + void Outliner::SetVertical(bool bVertical) { pEditEngine->SetVertical(bVertical); diff --git a/editeng/source/outliner/overflowingtxt.cxx b/editeng/source/outliner/overflowingtxt.cxx index e175939ea7c9..687764b36cd4 100644 --- a/editeng/source/outliner/overflowingtxt.cxx +++ b/editeng/source/outliner/overflowingtxt.cxx @@ -46,7 +46,7 @@ std::optional TextChainingUtils::JuxtaposeParaObject( (pOutl->GetParagraphCount() == 1 && !pNextPObj->GetTextObject().HasText(0)); - EditEngine &rEditEngine = const_cast(pOutl->GetEditEngine()); + EditEngine &rEditEngine = pOutl->GetEditEngine(); // XXX: this code should be moved in Outliner directly // creating Outliner::InsertText(...transferable...) @@ -76,7 +76,7 @@ std::optional TextChainingUtils::DeeplyMergeParaObject( pOutl->SetText(*pNextPObj); } - EditEngine &rEditEngine = const_cast(pOutl->GetEditEngine()); + EditEngine &rEditEngine = pOutl->GetEditEngine(); // XXX: this code should be moved in Outliner directly // creating Outliner::InsertText(...transferable...) @@ -91,9 +91,9 @@ std::optional TextChainingUtils::DeeplyMergeParaObject( return pOutl->CreateParaObject(); } -css::uno::Reference< css::datatransfer::XTransferable > TextChainingUtils::CreateTransferableFromText(Outliner const *pOutl) +css::uno::Reference< css::datatransfer::XTransferable > TextChainingUtils::CreateTransferableFromText(Outliner *pOutl) { - EditEngine& rEditEngine = const_cast(pOutl->GetEditEngine()); + EditEngine& rEditEngine = pOutl->GetEditEngine(); sal_Int32 nLastPara = pOutl->GetParagraphCount()-1; ESelection aWholeTextSel(0, 0, nLastPara, rEditEngine.GetTextLen(nLastPara)); @@ -201,7 +201,7 @@ bool OFlowChainedText::IsLastParaInterrupted() const -UFlowChainedText::UFlowChainedText(Outliner const *pOutl, bool bIsDeepMerge) +UFlowChainedText::UFlowChainedText(Outliner *pOutl, bool bIsDeepMerge) { mxUnderflowingTxt = TextChainingUtils::CreateTransferableFromText(pOutl); mbIsDeepMerge = bIsDeepMerge; diff --git a/editeng/source/uno/unoforou.cxx b/editeng/source/uno/unoforou.cxx index e95fb7132500..a7f3a371b9fb 100644 --- a/editeng/source/uno/unoforou.cxx +++ b/editeng/source/uno/unoforou.cxx @@ -61,8 +61,8 @@ OUString SvxOutlinerForwarder::GetText( const ESelection& rSel ) const { //! GetText (ESelection) should probably also be in the Outliner // in the time being use as the hack for the EditEngine: - EditEngine* pEditEngine = const_cast(&rOutliner.GetEditEngine()); - return pEditEngine->GetText( rSel ); + EditEngine& rEditEngine = rOutliner.GetEditEngine(); + return rEditEngine.GetText( rSel ); } static SfxItemSet ImplOutlinerForwarderGetAttribs( const ESelection& rSel, EditEngineAttribs nOnlyHardAttrib, EditEngine& rEditEngine ) @@ -109,7 +109,7 @@ SfxItemSet SvxOutlinerForwarder::GetAttribs( const ESelection& rSel, EditEngineA //! Does it not exist on the Outliner? //! and why is the GetAttribs on the EditEngine not a const? - EditEngine& rEditEngine = const_cast(rOutliner.GetEditEngine()); + EditEngine& rEditEngine = rOutliner.GetEditEngine(); SfxItemSet aSet( ImplOutlinerForwarderGetAttribs( rSel, nOnlyHardAttrib, rEditEngine ) ); @@ -146,7 +146,7 @@ SfxItemSet SvxOutlinerForwarder::GetParaAttribs( sal_Int32 nPara ) const moParaAttribsCache.emplace( rOutliner.GetParaAttribs( nPara ) ); mnParaAttribsCache = nPara; - EditEngine& rEditEngine = const_cast(rOutliner.GetEditEngine()); + EditEngine& rEditEngine = rOutliner.GetEditEngine(); SfxStyleSheet* pStyle = rEditEngine.GetStyleSheet( nPara ); if( pStyle ) @@ -181,7 +181,7 @@ SfxItemPool* SvxOutlinerForwarder::GetPool() const void SvxOutlinerForwarder::GetPortions( sal_Int32 nPara, std::vector& rList ) const { - const_cast(rOutliner.GetEditEngine()).GetPortions( nPara, rList ); + rOutliner.GetEditEngine().GetPortions( nPara, rList ); } OUString SvxOutlinerForwarder::GetStyleSheet(sal_Int32 nPara) const @@ -522,13 +522,13 @@ void SvxOutlinerForwarder::SetParaIsNumberingRestart( sal_Int32 nPara, bool bPa const SfxItemSet * SvxOutlinerForwarder::GetEmptyItemSetPtr() { - EditEngine& rEditEngine = const_cast< EditEngine& >( rOutliner.GetEditEngine() ); + EditEngine& rEditEngine = rOutliner.GetEditEngine(); return &rEditEngine.GetEmptyItemSet(); } void SvxOutlinerForwarder::AppendParagraph() { - EditEngine& rEditEngine = const_cast< EditEngine& >( rOutliner.GetEditEngine() ); + EditEngine& rEditEngine = rOutliner.GetEditEngine(); rEditEngine.InsertParagraph( rEditEngine.GetParagraphCount(), OUString() ); } @@ -536,7 +536,7 @@ sal_Int32 SvxOutlinerForwarder::AppendTextPortion( sal_Int32 nPara, const OUStri { sal_Int32 nLen = 0; - EditEngine& rEditEngine = const_cast< EditEngine& >( rOutliner.GetEditEngine() ); + EditEngine& rEditEngine = rOutliner.GetEditEngine(); sal_Int32 nParaCount = rEditEngine.GetParagraphCount(); DBG_ASSERT( 0 <= nPara && nPara < nParaCount, "paragraph index out of bounds" ); if (0 <= nPara && nPara < nParaCount) diff --git a/include/editeng/outliner.hxx b/include/editeng/outliner.hxx index b9708d1ee83c..134583d36396 100644 --- a/include/editeng/outliner.hxx +++ b/include/editeng/outliner.hxx @@ -896,6 +896,7 @@ public: bool ShouldCreateBigTextObject() const; const EditEngine& GetEditEngine() const; + EditEngine& GetEditEngine(); // this is needed for StarOffice Api SAL_DLLPRIVATE void SetLevelDependentStyleSheet( sal_Int32 nPara ); diff --git a/include/editeng/overflowingtxt.hxx b/include/editeng/overflowingtxt.hxx index 0d4fc38303de..6547aa1ccec5 100644 --- a/include/editeng/overflowingtxt.hxx +++ b/include/editeng/overflowingtxt.hxx @@ -41,7 +41,7 @@ class Outliner; class TextChainingUtils { public: - static css::uno::Reference< css::datatransfer::XTransferable> CreateTransferableFromText(Outliner const *); + static css::uno::Reference< css::datatransfer::XTransferable> CreateTransferableFromText(Outliner *); static std::optional JuxtaposeParaObject( css::uno::Reference< css::datatransfer::XTransferable > const & xOverflowingContent, @@ -116,7 +116,7 @@ private: class EDITENG_DLLPUBLIC UFlowChainedText { public: - UFlowChainedText(Outliner const *, bool); + UFlowChainedText(Outliner *, bool); std::optional CreateMergedUnderflowParaObject(Outliner *, OutlinerParaObject const *); private: diff --git a/sc/source/ui/drawfunc/drtxtob.cxx b/sc/source/ui/drawfunc/drtxtob.cxx index 41e73d62575d..312fa3e592f4 100644 --- a/sc/source/ui/drawfunc/drtxtob.cxx +++ b/sc/source/ui/drawfunc/drtxtob.cxx @@ -610,7 +610,7 @@ static void lcl_RemoveFields( OutlinerView& rOutView ) bool bChanged = false; //! GetPortions and GetAttribs should be const! - EditEngine& rEditEng = const_cast(rOutliner.GetEditEngine()); + EditEngine& rEditEng = rOutliner.GetEditEngine(); sal_Int32 nParCount = rOutliner.GetParagraphCount(); for (sal_Int32 nPar=0; nPar(&pOutliner->GetEditEngine()); + EditEngine& rEditEngine = pOutliner->GetEditEngine(); bool bOldUpdateMode = rEditEngine.SetUpdateLayout(true); Paragraph* pPara = pOutliner->GetParagraph(nPara); diff --git a/sd/source/filter/ppt/pptin.cxx b/sd/source/filter/ppt/pptin.cxx index 06e8f4176f70..0b1ebc87128d 100644 --- a/sd/source/filter/ppt/pptin.cxx +++ b/sd/source/filter/ppt/pptin.cxx @@ -233,7 +233,7 @@ bool ImplSdPPTImport::Import() SdrOutliner& rOutl = mrDoc.GetDrawOutliner(); EEControlBits nControlWord = rOutl.GetEditEngine().GetControlWord(); nControlWord |= EEControlBits::ULSPACESUMMATION; - const_cast(rOutl.GetEditEngine()).SetControlWord( nControlWord ); + rOutl.GetEditEngine().SetControlWord( nControlWord ); SdrLayerAdmin& rAdmin = mrDoc.GetLayerAdmin(); mnBackgroundObjectsLayerID = rAdmin.GetLayerID( sUNO_LayerName_background_objects ); diff --git a/sd/source/ui/dlg/headerfooterdlg.cxx b/sd/source/ui/dlg/headerfooterdlg.cxx index eefb8a45f38b..caa428724efb 100644 --- a/sd/source/ui/dlg/headerfooterdlg.cxx +++ b/sd/source/ui/dlg/headerfooterdlg.cxx @@ -570,7 +570,7 @@ bool HeaderFooterTabPage::GetOrSetDateTimeLanguage(LanguageType& rLanguage, bool pOutl->Init( OutlinerMode::TextObject ); OutlinerMode nOutlMode = pOutl->GetOutlinerMode(); - EditEngine* pEdit = const_cast< EditEngine* >(&pOutl->GetEditEngine()); + EditEngine& rEdit = pOutl->GetEditEngine(); OutlinerParaObject* pOPO = pObj->GetOutlinerParaObject(); if( pOPO ) @@ -579,10 +579,10 @@ bool HeaderFooterTabPage::GetOrSetDateTimeLanguage(LanguageType& rLanguage, bool EPaM aDateFieldPosition; bool bHasDateFieldItem = false; - sal_Int32 nParaCount = pEdit->GetParagraphCount(); + sal_Int32 nParaCount = rEdit.GetParagraphCount(); for (sal_Int32 nPara = 0; (nPara < nParaCount) && !bHasDateFieldItem; ++nPara) { - for (const EFieldInfo& rFieldInfo : pEdit->GetFieldInfo(nPara)) + for (const EFieldInfo& rFieldInfo : rEdit.GetFieldInfo(nPara)) { if (rFieldInfo.pFieldItem) { @@ -602,7 +602,7 @@ bool HeaderFooterTabPage::GetOrSetDateTimeLanguage(LanguageType& rLanguage, bool { if( bSet ) { - SfxItemSet aSet(pEdit->GetAttribs(aDateFieldPosition.nPara, + SfxItemSet aSet(rEdit.GetAttribs(aDateFieldPosition.nPara, aDateFieldPosition.nIndex, aDateFieldPosition.nIndex+1, GetAttribsFlags::CHARATTRIBS)); @@ -618,7 +618,7 @@ bool HeaderFooterTabPage::GetOrSetDateTimeLanguage(LanguageType& rLanguage, bool ESelection aSel(aDateFieldPosition.nPara, aDateFieldPosition.nIndex, aDateFieldPosition.nPara, aDateFieldPosition.nIndex+1 ); - pEdit->QuickSetAttribs( aSet, aSel ); + rEdit.QuickSetAttribs( aSet, aSel ); pObj->SetOutlinerParaObject( pOutl->CreateParaObject() ); pOutl->UpdateFields(); diff --git a/sd/source/ui/docshell/docshel4.cxx b/sd/source/ui/docshell/docshel4.cxx index 766631be8f90..bf87e290ad62 100644 --- a/sd/source/ui/docshell/docshel4.cxx +++ b/sd/source/ui/docshell/docshel4.cxx @@ -424,7 +424,7 @@ bool DrawDocShell::ImportFrom(SfxMedium &rMedium, SdrOutliner& rOutl = mpDoc->GetDrawOutliner(); EEControlBits nControlWord = rOutl.GetEditEngine().GetControlWord(); nControlWord |= EEControlBits::ULSPACESUMMATION; - const_cast(rOutl.GetEditEngine()).SetControlWord( nControlWord ); + rOutl.GetEditEngine().SetControlWord( nControlWord ); mpDoc->SetSummationOfParagraphs(); diff --git a/sd/source/ui/view/outlview.cxx b/sd/source/ui/view/outlview.cxx index a1408a486f0d..6b982c84735f 100644 --- a/sd/source/ui/view/outlview.cxx +++ b/sd/source/ui/view/outlview.cxx @@ -1751,7 +1751,7 @@ IMPL_LINK(OutlineView, PaintingFirstLineHdl, PaintFirstLineInfo*, pInfo, void) return; Paragraph* pPara = mrOutliner.GetParagraph( pInfo->mnPara ); - EditEngine& rEditEngine = const_cast< EditEngine& >( mrOutliner.GetEditEngine() ); + EditEngine& rEditEngine = mrOutliner.GetEditEngine(); Size aImageSize( pInfo->mpOutDev->PixelToLogic( maSlideImage.GetSizePixel() ) ); Size aOffset( 100, 100 ); diff --git a/svx/source/sdr/properties/textproperties.cxx b/svx/source/sdr/properties/textproperties.cxx index 25c16eaca4f6..b1a3d7a98ca0 100644 --- a/svx/source/sdr/properties/textproperties.cxx +++ b/svx/source/sdr/properties/textproperties.cxx @@ -466,9 +466,9 @@ namespace sdr::properties if(aSet.GetItemState(EE_CHAR_COLOR) == SfxItemState::SET) { - EditEngine* pEditEngine = const_cast(&(pOutliner->GetEditEngine())); + EditEngine& rEditEngine = pOutliner->GetEditEngine(); std::vector aAttribs; - pEditEngine->GetCharAttribs(nPara, aAttribs); + rEditEngine.GetCharAttribs(nPara, aAttribs); for(const auto& rAttrib : aAttribs) { @@ -503,17 +503,17 @@ namespace sdr::properties aSel.end.nIndex = rAttrib.nStart; if (aSel.start.nIndex != aSel.end.nIndex) - pEditEngine->QuickSetAttribs(aColorSet, aSel); + rEditEngine.QuickSetAttribs(aColorSet, aSel); aSel.start.nIndex = rAttrib.nEnd; } } - aSel.end.nIndex = pEditEngine->GetTextLen(nPara); + aSel.end.nIndex = rEditEngine.GetTextLen(nPara); if (aSel.start.nIndex != aSel.end.nIndex) { - pEditEngine->QuickSetAttribs( aColorSet, aSel ); + rEditEngine.QuickSetAttribs( aColorSet, aSel ); } } diff --git a/svx/source/table/cell.cxx b/svx/source/table/cell.cxx index 49ce1a5a5d7b..49189685be31 100644 --- a/svx/source/table/cell.cxx +++ b/svx/source/table/cell.cxx @@ -671,7 +671,7 @@ sal_Int32 Cell::calcPreferredWidth( const Size aSize ) if( GetOutlinerParaObject() ) rOutliner.SetText(*GetOutlinerParaObject()); - sal_Int32 nPreferredWidth = const_cast(rOutliner.GetEditEngine()).CalcTextWidth(); + sal_Int32 nPreferredWidth = rOutliner.GetEditEngine().CalcTextWidth(); rOutliner.Clear(); return GetTextLeftDistance() + GetTextRightDistance() + nPreferredWidth; diff --git a/svx/source/table/tablehtmlimporter.cxx b/svx/source/table/tablehtmlimporter.cxx index 17c0613a3025..d1ce06d6bffc 100644 --- a/svx/source/table/tablehtmlimporter.cxx +++ b/svx/source/table/tablehtmlimporter.cxx @@ -178,7 +178,7 @@ SdrTableHTMLParser::SdrTableHTMLParser(SdrTableObj& rTableObj) void SdrTableHTMLParser::Read(SvStream& rStream) { - EditEngine& rEdit = const_cast(mpOutliner->GetEditEngine()); + EditEngine& rEdit = mpOutliner->GetEditEngine(); Link aOldLink(rEdit.GetHtmlImportHdl()); rEdit.SetHtmlImportHdl(LINK(this, SdrTableHTMLParser, HTMLImportHdl)); diff --git a/svx/source/table/tablertfimporter.cxx b/svx/source/table/tablertfimporter.cxx index 16d6ad91a87b..7b4a4c4d192a 100644 --- a/svx/source/table/tablertfimporter.cxx +++ b/svx/source/table/tablertfimporter.cxx @@ -161,7 +161,7 @@ SdrTableRTFParser::SdrTableRTFParser( SdrTableObj& rTableObj ) void SdrTableRTFParser::Read( SvStream& rStream ) { - EditEngine& rEdit = const_cast< EditEngine& >( mpOutliner->GetEditEngine() ); + EditEngine& rEdit = mpOutliner->GetEditEngine(); Link aOldLink( rEdit.GetRtfImportHdl() ); rEdit.SetRtfImportHdl( LINK( this, SdrTableRTFParser, RTFImportHdl ) ); diff --git a/svx/source/unodraw/unoshtxt.cxx b/svx/source/unodraw/unoshtxt.cxx index 7564a63b24ed..a89228d98101 100644 --- a/svx/source/unodraw/unoshtxt.cxx +++ b/svx/source/unodraw/unoshtxt.cxx @@ -498,9 +498,9 @@ SvxTextForwarder* SvxTextEditSourceImpl::GetBackgroundTextForwarder() mpOutliner->SetTextObjNoInit( pTextObj ); if( mbIsLocked ) { - const_cast(&(mpOutliner->GetEditEngine()))->SetUpdateLayout( false ); + mpOutliner->GetEditEngine().SetUpdateLayout( false ); mbOldUndoMode = mpOutliner->GetEditEngine().IsUndoEnabled(); - const_cast(&(mpOutliner->GetEditEngine()))->EnableUndo( false ); + mpOutliner->GetEditEngine().EnableUndo( false ); } if (!comphelper::IsFuzzing()) @@ -813,9 +813,9 @@ void SvxTextEditSourceImpl::lock() mbIsLocked = true; if( mpOutliner ) { - const_cast(&(mpOutliner->GetEditEngine()))->SetUpdateLayout( false ); + mpOutliner->GetEditEngine().SetUpdateLayout( false ); mbOldUndoMode = mpOutliner->GetEditEngine().IsUndoEnabled(); - const_cast(&(mpOutliner->GetEditEngine()))->EnableUndo( false ); + mpOutliner->GetEditEngine().EnableUndo( false ); } } @@ -831,8 +831,8 @@ void SvxTextEditSourceImpl::unlock() if( mpOutliner ) { - const_cast(&(mpOutliner->GetEditEngine()))->SetUpdateLayout( true ); - const_cast(&(mpOutliner->GetEditEngine()))->EnableUndo( mbOldUndoMode ); + mpOutliner->GetEditEngine().SetUpdateLayout( true ); + mpOutliner->GetEditEngine().EnableUndo( mbOldUndoMode ); } } diff --git a/sw/source/uibase/uno/unotxdoc.cxx b/sw/source/uibase/uno/unotxdoc.cxx index 2e8c225a8006..90ad11c83464 100644 --- a/sw/source/uibase/uno/unotxdoc.cxx +++ b/sw/source/uibase/uno/unotxdoc.cxx @@ -4278,7 +4278,7 @@ uno::Sequence< lang::Locale > SAL_CALL SwXTextDocument::getDocumentLanguages( SdrOutliner* pOutliner = pSdrView->GetTextEditOutliner(); if(pOutliner) { - EditEngine& rEditEng = const_cast(pOutliner->GetEditEngine()); + EditEngine& rEditEng = pOutliner->GetEditEngine(); sal_Int32 nParCount = pOutliner->GetParagraphCount(); for (sal_Int32 nPar=0; nPar Date: Mon, 21 Sep 2026 16:30:02 +0200 Subject: [PATCH 071/289] merge OutlinerEditEng into EditEngine as part of the process of simplifying the whole Outliner vs EditEngine infrastructure. Change-Id: Ia4f173ba41b374864cc4e47d895b037d6493a08f Signed-off-by: Noel Grandin Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/13238 Tested-by: Jenkins CPCI Reviewed-by: Mike Kaganski (cherry picked from commit 196eccebee433d3cfe170786a81ea39f5c491ec1) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211615 Tested-by: Jenkins Reviewed-by: Xisco Fauli --- editeng/Library_editeng.mk | 1 - editeng/inc/outleeng.hxx | 64 ------ editeng/{source/outliner => inc}/outlundo.hxx | 0 editeng/{source/outliner => inc}/paralist.hxx | 1 + editeng/source/editeng/editeng.cxx | 135 ++++++++++++- editeng/source/editeng/impedit.hxx | 7 +- editeng/source/editeng/impedit2.cxx | 9 +- editeng/source/editeng/impedit3.cxx | 5 +- editeng/source/outliner/outleeng.cxx | 183 ------------------ editeng/source/outliner/outlin2.cxx | 13 +- editeng/source/outliner/outliner.cxx | 7 +- editeng/source/outliner/outlundo.cxx | 2 +- editeng/source/outliner/outlvw.cxx | 7 +- editeng/source/outliner/paralist.cxx | 2 +- include/editeng/editeng.hxx | 13 ++ include/editeng/outliner.hxx | 16 +- solenv/clang-format/excludelist | 5 +- 17 files changed, 169 insertions(+), 301 deletions(-) delete mode 100644 editeng/inc/outleeng.hxx rename editeng/{source/outliner => inc}/outlundo.hxx (100%) rename editeng/{source/outliner => inc}/paralist.hxx (99%) delete mode 100644 editeng/source/outliner/outleeng.cxx diff --git a/editeng/Library_editeng.mk b/editeng/Library_editeng.mk index 1def031b017b..dac038ab2950 100644 --- a/editeng/Library_editeng.mk +++ b/editeng/Library_editeng.mk @@ -108,7 +108,6 @@ $(eval $(call gb_Library_add_exception_objects,editeng,\ editeng/source/misc/txtrange \ editeng/source/misc/unolingu \ editeng/source/misc/urlfieldhelper \ - editeng/source/outliner/outleeng \ editeng/source/outliner/outlin2 \ editeng/source/outliner/outliner \ editeng/source/outliner/outlobj \ diff --git a/editeng/inc/outleeng.hxx b/editeng/inc/outleeng.hxx deleted file mode 100644 index ea0aac27056a..000000000000 --- a/editeng/inc/outleeng.hxx +++ /dev/null @@ -1,64 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ -#pragma once - -#include -#include - -class OutlinerEditEng : public EditEngine -{ - Outliner* pOwner; - -protected: - - // derived from EditEngine. Allows Outliner objects to provide - // bullet access to the EditEngine. - virtual const SvxNumberFormat* GetNumberFormat( sal_Int32 nPara ) const override; - -public: - OutlinerEditEng( Outliner* pOwner, SfxItemPool* pPool ); - virtual ~OutlinerEditEng() override; - - virtual void ProcessFirstLineOfParagraph(sal_Int32 nPara, const Point& rStartPos, OutputDevice& rOutDev, StripPortionsHelper& rStripPortionsHelper) override; - - virtual void ParagraphInserted( sal_Int32 nNewParagraph ) override; - virtual void ParagraphDeleted( sal_Int32 nDeletedParagraph ) override; - virtual void ParagraphConnected( sal_Int32 nLeftParagraph, sal_Int32 nRightParagraph ) override; - - virtual void StyleSheetChanged( SfxStyleSheet* pStyle ) override; - virtual void ParaAttribsChanged( sal_Int32 nPara ) override; - virtual bool SpellNextDocument() override; - virtual OUString GetUndoComment( sal_uInt16 nUndoId ) const override; - - // for text conversion - virtual bool ConvertNextDocument() override; - - virtual OUString CalcFieldValue( const SvxFieldItem& rField, sal_Int32 nPara, sal_Int32 nPos, std::optional& rTxtColor, std::optional& rFldColor, std::optional& rFldLineStyle ) override; - - virtual tools::Rectangle GetBulletArea( sal_Int32 nPara ) override; - - sal_Int16 GetDepth( sal_Int32 nPara ) const; - - /// @returns state of the SdrCompatibilityFlag - std::optional GetCompatFlag(SdrCompatibilityFlag eFlag) const; - - virtual void SetParaAttribs( sal_Int32 nPara, const SfxItemSet& rSet ) override; -}; - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/editeng/source/outliner/outlundo.hxx b/editeng/inc/outlundo.hxx similarity index 100% rename from editeng/source/outliner/outlundo.hxx rename to editeng/inc/outlundo.hxx diff --git a/editeng/source/outliner/paralist.hxx b/editeng/inc/paralist.hxx similarity index 99% rename from editeng/source/outliner/paralist.hxx rename to editeng/inc/paralist.hxx index 7d0d2426f82a..c7d7764c9a09 100644 --- a/editeng/source/outliner/paralist.hxx +++ b/editeng/inc/paralist.hxx @@ -79,3 +79,4 @@ private: }; /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ + diff --git a/editeng/source/editeng/editeng.cxx b/editeng/source/editeng/editeng.cxx index 0abffe21478a..0ea714323b3d 100644 --- a/editeng/source/editeng/editeng.cxx +++ b/editeng/source/editeng/editeng.cxx @@ -66,6 +66,9 @@ #include #endif +#include +#include + using namespace ::com::sun::star; using namespace ::com::sun::star::uno; using namespace ::com::sun::star::linguistic2; @@ -81,6 +84,11 @@ EditEngine::EditEngine(SfxItemPool* pItemPool) { } +EditEngine::EditEngine( Outliner* pEngOwner, SfxItemPool* pItemPool ) + : mpImpEditEngine(new ImpEditEngine(this, pItemPool, pEngOwner)) +{ +} + EditEngine::~EditEngine() = default; void EditEngine::EnableUndo( bool bEnable ) @@ -989,9 +997,33 @@ void EditEngine::SetText(sal_Int32 nPara, const OUString& rTxt) void EditEngine::SetParaAttribs( sal_Int32 nPara, const SfxItemSet& rSet ) { + Outliner* pOwner = getImpl().GetOwner(); + + if (pOwner) + { + Paragraph* pPara = pOwner->pParaList->GetParagraph( nPara ); + if( !pPara ) + return; + + if ( !IsInUndo() && IsUndoEnabled() ) + pOwner->UndoActionStart( OLUNDO_ATTR ); + } + getImpl().SetParaAttribs(nPara, rSet); if (getImpl().IsUpdateLayout()) getImpl().FormatAndLayout(); + + if (pOwner) + { + pOwner->ImplCheckNumBulletItem( nPara ); + // #i100014# + // It is not a good idea to subtract 1 from a count and cast the result + // to sal_uInt16 without check, if the count is 0. + pOwner->ImplCheckParagraphs( nPara, pOwner->pParaList->GetParagraphCount() ); + + if ( !IsInUndo() && IsUndoEnabled() ) + pOwner->UndoActionEnd(); + } } const SfxItemSet& EditEngine::GetParaAttribs( sal_Int32 nPara ) const @@ -1159,10 +1191,10 @@ Point EditEngine::GetDocPosTopLeft( sal_Int32 nParagraph ) return getImpl().GetDocPosTopLeft(nParagraph); } -const SvxNumberFormat* EditEngine::GetNumberFormat( sal_Int32 ) const +const SvxNumberFormat* EditEngine::GetNumberFormat( sal_Int32 nPara ) const { - // derived objects may override this function to give access to - // bullet information (see Outliner) + if (Outliner* pOwner = getImpl().GetOwner()) + return pOwner->GetNumberFormat( nPara ); return nullptr; } @@ -1337,6 +1369,8 @@ LanguageType EditEngine::GetDefaultLanguage() const bool EditEngine::SpellNextDocument() { + if (Outliner* pOwner = getImpl().GetOwner()) + return pOwner->SpellNextDocument(); return false; } @@ -1375,6 +1409,8 @@ bool EditEngine::HasConvertibleTextPortion( LanguageType nLang ) bool EditEngine::ConvertNextDocument() { + if (Outliner* pOwner = getImpl().GetOwner()) + return pOwner->ConvertNextDocument(); return false; } @@ -1558,12 +1594,26 @@ EditEngine::CreateTransferable(const ESelection& rSelection) // ====================== Virtual Methods ======================== -void EditEngine::ProcessFirstLineOfParagraph(sal_Int32, const Point&, OutputDevice&, StripPortionsHelper&) +void EditEngine::ProcessFirstLineOfParagraph(sal_Int32 nPara, const Point& rStartPos, OutputDevice& rOutDev, + StripPortionsHelper& rStripPortionsHelper) { + if (Outliner* pOwner = getImpl().GetOwner()) + { + if( GetControlWord() & EEControlBits::OUTLINER ) + { + PaintFirstLineInfo aInfo(nPara, rStartPos, &rOutDev, rStripPortionsHelper); + pOwner->maPaintFirstLineHdl.Call( &aInfo ); + } + + pOwner->StripBullet(nPara, rStartPos, rOutDev, rStripPortionsHelper); + } } void EditEngine::ParagraphInserted( sal_Int32 nPara ) { + if (Outliner* pOwner = getImpl().GetOwner()) + pOwner->ParagraphInserted( nPara ); + if ( GetNotifyHdl().IsSet() ) { EENotify aNotify( EE_NOTIFY_PARAGRAPHINSERTED ); @@ -1574,6 +1624,9 @@ void EditEngine::ParagraphInserted( sal_Int32 nPara ) void EditEngine::ParagraphDeleted( sal_Int32 nPara ) { + if (Outliner* pOwner = getImpl().GetOwner()) + pOwner->ParagraphDeleted( nPara ); + if ( GetNotifyHdl().IsSet() ) { EENotify aNotify( EE_NOTIFY_PARAGRAPHREMOVED ); @@ -1582,16 +1635,29 @@ void EditEngine::ParagraphDeleted( sal_Int32 nPara ) } } -void EditEngine::ParagraphConnected( sal_Int32 /*nLeftParagraph*/, sal_Int32 /*nRightParagraph*/ ) +void EditEngine::ParagraphConnected( sal_Int32 /*nLeftParagraph*/, sal_Int32 nRightParagraph ) { + if (Outliner* pOwner = getImpl().GetOwner()) + if(pOwner->IsUndoEnabled() && !pOwner->GetEditEngine().IsInUndo() ) + { + Paragraph* pPara = pOwner->GetParagraph( nRightParagraph ); + if( pPara && Outliner::HasParaFlag( pPara, ParaFlag::ISPAGE ) ) + { + pOwner->InsertUndo( std::make_unique( pOwner, nRightParagraph, ParaFlag::ISPAGE, ParaFlag::NONE ) ); + } + } } -void EditEngine::ParaAttribsChanged( sal_Int32 /* nParagraph */ ) +void EditEngine::ParaAttribsChanged( sal_Int32 nPara ) { + if (Outliner* pOwner = getImpl().GetOwner()) + pOwner->ParaAttribsChanged( nPara ); } -void EditEngine::StyleSheetChanged( SfxStyleSheet* /* pStyle */ ) +void EditEngine::StyleSheetChanged( SfxStyleSheet* pStyle ) { + if (Outliner* pOwner = getImpl().GetOwner()) + pOwner->StyleSheetChanged( pStyle ); } void EditEngine::ParagraphHeightChanged( sal_Int32 nPara ) @@ -1609,6 +1675,25 @@ void EditEngine::ParagraphHeightChanged( sal_Int32 nPara ) OUString EditEngine::GetUndoComment( sal_uInt16 nId ) const { + if (getImpl().GetOwner() != nullptr) + switch( nId ) + { + case OLUNDO_DEPTH: + return EditResId(RID_OUTLUNDO_DEPTH); + + case OLUNDO_EXPAND: + return EditResId(RID_OUTLUNDO_EXPAND); + + case OLUNDO_COLLAPSE: + return EditResId(RID_OUTLUNDO_COLLAPSE); + + case OLUNDO_ATTR: + return EditResId(RID_OUTLUNDO_ATTR); + + case OLUNDO_INSERT: + return EditResId(RID_OUTLUNDO_INSERT); + } + OUString aComment; switch ( nId ) { @@ -1656,13 +1741,35 @@ OUString EditEngine::GetUndoComment( sal_uInt16 nId ) const return aComment; } -tools::Rectangle EditEngine::GetBulletArea( sal_Int32 ) +tools::Rectangle EditEngine::GetBulletArea( sal_Int32 nPara ) { + if (Outliner* pOwner = getImpl().GetOwner()) + { + tools::Rectangle aBulletArea { Point(), Point() }; + if ( nPara < pOwner->pParaList->GetParagraphCount() ) + { + if ( pOwner->ImplHasNumberFormat( nPara ) ) + aBulletArea = pOwner->ImpCalcBulletArea( nPara, false, false ); + } + return aBulletArea; + } return tools::Rectangle( Point(), Point() ); } -OUString EditEngine::CalcFieldValue( const SvxFieldItem&, sal_Int32, sal_Int32, std::optional&, std::optional&, std::optional& ) +std::optional EditEngine::GetCompatFlag(SdrCompatibilityFlag eFlag) const { + if (Outliner* pOwner = getImpl().GetOwner()) + return pOwner->GetCompatFlag(eFlag); + return {}; +} + +OUString EditEngine::CalcFieldValue( const SvxFieldItem& rField, sal_Int32 nPara, sal_Int32 nPos, + std::optional& rpTxtColor, + std::optional& rpFldColor, + std::optional& rpFldLineStyle) +{ + if (Outliner* pOwner = getImpl().GetOwner()) + return pOwner->CalcFieldValue( rField, nPara, nPos, rpTxtColor, rpFldColor, rpFldLineStyle ); return OUString(' '); } @@ -1964,4 +2071,14 @@ EFieldInfo& EFieldInfo::operator= ( const EFieldInfo& rFldInfo ) return *this; } +sal_Int16 EditEngine::GetDepth(sal_Int32 nPara) const +{ + return getImpl().GetOwner()->GetDepth(nPara); +} + +Outliner* EditEngine::GetOwner() +{ + return getImpl().GetOwner(); +} + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/editeng/source/editeng/impedit.hxx b/editeng/source/editeng/impedit.hxx index 5880c10579bc..1c84bc84ddec 100644 --- a/editeng/source/editeng/impedit.hxx +++ b/editeng/source/editeng/impedit.hxx @@ -626,6 +626,9 @@ private: Timer maStatusTimer; Size maLOKSpecialPaperSize; + // only valid when used from an Outliner + Outliner* mpOwner; + Link maStatusHdlLink; Link maNotifyHdl; Link maHtmlImportHdl; @@ -875,7 +878,7 @@ private: /// Obtains a view shell ID from the active EditView. ViewShellId CreateViewShellId(); - ImpEditEngine(EditEngine* pEditEngine, SfxItemPool* pPool); + ImpEditEngine(EditEngine* pEditEngine, SfxItemPool* pPool, Outliner* pEngOwner = nullptr); void InitDoc(bool bKeepParaAttribs); EditDoc& GetEditDoc() { return maEditDoc; } const EditDoc& GetEditDoc() const { return maEditDoc; } @@ -1371,6 +1374,8 @@ public: static bool IsSimpleCharInput( const KeyEvent& rKeyEvent ); void RemoveParagraph( sal_Int32 nPara ); + Outliner* GetOwner() { return mpOwner; } + #ifdef DBG_UTIL void DumpData(bool bInfoBox); #endif diff --git a/editeng/source/editeng/impedit2.cxx b/editeng/source/editeng/impedit2.cxx index 9a68fa50df87..b1bdda2a62d5 100644 --- a/editeng/source/editeng/impedit2.cxx +++ b/editeng/source/editeng/impedit2.cxx @@ -77,7 +77,6 @@ #include #include #include -#include using namespace ::com::sun::star; @@ -94,7 +93,7 @@ static sal_uInt16 lcl_CalcExtraSpace( const SvxLineSpacingItem& rLSItem ) constexpr tools::Long constMaxPaperSize = 0x7FFFFFFF; -ImpEditEngine::ImpEditEngine( EditEngine* pEE, SfxItemPool* pItemPool ) : +ImpEditEngine::ImpEditEngine( EditEngine* pEE, SfxItemPool* pItemPool, Outliner* pEngOwner ) : pSharedVCL(EditDLL::Get().GetSharedVclResources()), maPaperSize(constMaxPaperSize, constMaxPaperSize), maMinAutoPaperSize(0, 0), @@ -114,6 +113,7 @@ ImpEditEngine::ImpEditEngine( EditEngine* pEE, SfxItemPool* pItemPool ) : mnCurTextHeight(0), maOnlineSpellTimer("editeng::ImpEditEngine aOnlineSpellTimer"), maStatusTimer("editeng::ImpEditEngine aStatusTimer"), + mpOwner(pEngOwner), mbKernAsianPunctuation(false), mbAddExtLeading(false), mbIsFormatting(false), @@ -4750,9 +4750,8 @@ bool ImpEditEngine::isInEmptyClusterAtTheEnd(const ParaPortion& rPortion, bool b { if (nCurrent == nPortion) { - OutlinerEditEng* pOutlEditEng{ dynamic_cast(mpEditEngine)}; - if (!bIsScaling && pOutlEditEng) - return pOutlEditEng->GetDepth(nCurrent) < 0; + if (!bIsScaling && mpEditEngine->GetOwner() != nullptr) + return mpEditEngine->GetDepth(nCurrent) < 0; else return true; } diff --git a/editeng/source/editeng/impedit3.cxx b/editeng/source/editeng/impedit3.cxx index c3806fe306eb..3efe4431afcb 100644 --- a/editeng/source/editeng/impedit3.cxx +++ b/editeng/source/editeng/impedit3.cxx @@ -46,7 +46,6 @@ #include #include #include -#include #include #include @@ -3810,11 +3809,9 @@ void ImpEditEngine::StripAllPortions( OutputDevice& rOutDev, tools::Rectangle aC { // tdf#148966 don't paint the line break following a // multiline field based on a compat flag - OutlinerEditEng* pOutlEditEng{ dynamic_cast(mpEditEngine)}; int nStartNextLine = rParaPortion.GetLines()[nLine + 1].GetStartPortion(); const TextPortion& rNextTextPortion = rParaPortion.GetTextPortions()[nStartNextLine]; - if (pOutlEditEng - && pOutlEditEng->GetCompatFlag(SdrCompatibilityFlag::IgnoreBreakAfterMultilineField) + if (mpEditEngine->GetCompatFlag(SdrCompatibilityFlag::IgnoreBreakAfterMultilineField) .value_or(false)) { if (rNextTextPortion.GetKind() == PortionKind::LINEBREAK) diff --git a/editeng/source/outliner/outleeng.cxx b/editeng/source/outliner/outleeng.cxx deleted file mode 100644 index 457bb0b0d139..000000000000 --- a/editeng/source/outliner/outleeng.cxx +++ /dev/null @@ -1,183 +0,0 @@ -/* -*- 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 . - */ - -#include -#include - -#include -#include -#include "paralist.hxx" -#include -#include -#include -#include "outlundo.hxx" - -OutlinerEditEng::OutlinerEditEng( Outliner* pEngOwner, SfxItemPool* pPool ) - : EditEngine( pPool ) -{ - pOwner = pEngOwner; -} - -OutlinerEditEng::~OutlinerEditEng() -{ -} - -void OutlinerEditEng::ProcessFirstLineOfParagraph(sal_Int32 nPara, const Point& rStartPos, OutputDevice& rOutDev, StripPortionsHelper& rStripPortionsHelper) -{ - if( GetControlWord() & EEControlBits::OUTLINER ) - { - PaintFirstLineInfo aInfo(nPara, rStartPos, &rOutDev, rStripPortionsHelper); - pOwner->maPaintFirstLineHdl.Call( &aInfo ); - } - - pOwner->StripBullet(nPara, rStartPos, rOutDev, rStripPortionsHelper); -} - -const SvxNumberFormat* OutlinerEditEng::GetNumberFormat( sal_Int32 nPara ) const -{ - const SvxNumberFormat* pFmt = nullptr; - if (pOwner) - pFmt = pOwner->GetNumberFormat( nPara ); - return pFmt; -} - - -tools::Rectangle OutlinerEditEng::GetBulletArea( sal_Int32 nPara ) -{ - tools::Rectangle aBulletArea { Point(), Point() }; - if ( nPara < pOwner->pParaList->GetParagraphCount() ) - { - if ( pOwner->ImplHasNumberFormat( nPara ) ) - aBulletArea = pOwner->ImpCalcBulletArea( nPara, false, false ); - } - return aBulletArea; -} - -std::optional OutlinerEditEng::GetCompatFlag(SdrCompatibilityFlag eFlag) const -{ - if(pOwner) - { - return pOwner->GetCompatFlag(eFlag); - } - return {}; -} - -void OutlinerEditEng::ParagraphInserted( sal_Int32 nNewParagraph ) -{ - pOwner->ParagraphInserted( nNewParagraph ); - - EditEngine::ParagraphInserted( nNewParagraph ); -} - -void OutlinerEditEng::ParagraphDeleted( sal_Int32 nDeletedParagraph ) -{ - pOwner->ParagraphDeleted( nDeletedParagraph ); - - EditEngine::ParagraphDeleted( nDeletedParagraph ); -} - -void OutlinerEditEng::ParagraphConnected( sal_Int32 /*nLeftParagraph*/, sal_Int32 nRightParagraph ) -{ - if( pOwner && pOwner->IsUndoEnabled() && !pOwner->GetEditEngine().IsInUndo() ) - { - Paragraph* pPara = pOwner->GetParagraph( nRightParagraph ); - if( pPara && Outliner::HasParaFlag( pPara, ParaFlag::ISPAGE ) ) - { - pOwner->InsertUndo( std::make_unique( pOwner, nRightParagraph, ParaFlag::ISPAGE, ParaFlag::NONE ) ); - } - } -} - - -void OutlinerEditEng::StyleSheetChanged( SfxStyleSheet* pStyle ) -{ - pOwner->StyleSheetChanged( pStyle ); -} - -void OutlinerEditEng::ParaAttribsChanged( sal_Int32 nPara ) -{ - pOwner->ParaAttribsChanged( nPara ); -} - -bool OutlinerEditEng::SpellNextDocument() -{ - return pOwner->SpellNextDocument(); -} - -bool OutlinerEditEng::ConvertNextDocument() -{ - return pOwner->ConvertNextDocument(); -} - -OUString OutlinerEditEng::GetUndoComment( sal_uInt16 nUndoId ) const -{ - switch( nUndoId ) - { - case OLUNDO_DEPTH: - return EditResId(RID_OUTLUNDO_DEPTH); - - case OLUNDO_EXPAND: - return EditResId(RID_OUTLUNDO_EXPAND); - - case OLUNDO_COLLAPSE: - return EditResId(RID_OUTLUNDO_COLLAPSE); - - case OLUNDO_ATTR: - return EditResId(RID_OUTLUNDO_ATTR); - - case OLUNDO_INSERT: - return EditResId(RID_OUTLUNDO_INSERT); - - default: - return EditEngine::GetUndoComment( nUndoId ); - } -} - -OUString OutlinerEditEng::CalcFieldValue( const SvxFieldItem& rField, sal_Int32 nPara, sal_Int32 nPos, std::optional& rpTxtColor, std::optional& rpFldColor, std::optional& rpFldLineStyle ) -{ - return pOwner->CalcFieldValue( rField, nPara, nPos, rpTxtColor, rpFldColor, rpFldLineStyle ); -} - -void OutlinerEditEng::SetParaAttribs( sal_Int32 nPara, const SfxItemSet& rSet ) -{ - Paragraph* pPara = pOwner->pParaList->GetParagraph( nPara ); - if( !pPara ) - return; - - if ( !IsInUndo() && IsUndoEnabled() ) - pOwner->UndoActionStart( OLUNDO_ATTR ); - - EditEngine::SetParaAttribs( nPara, rSet ); - - pOwner->ImplCheckNumBulletItem( nPara ); - // #i100014# - // It is not a good idea to subtract 1 from a count and cast the result - // to sal_uInt16 without check, if the count is 0. - pOwner->ImplCheckParagraphs( nPara, pOwner->pParaList->GetParagraphCount() ); - - if ( !IsInUndo() && IsUndoEnabled() ) - pOwner->UndoActionEnd(); -} - -sal_Int16 OutlinerEditEng::GetDepth(sal_Int32 nPara) const -{ - return pOwner->GetDepth(nPara); -} - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/editeng/source/outliner/outlin2.cxx b/editeng/source/outliner/outlin2.cxx index 39506b2e1028..8023e77b9741 100644 --- a/editeng/source/outliner/outlin2.cxx +++ b/editeng/source/outliner/outlin2.cxx @@ -29,8 +29,7 @@ #include #include -#include "paralist.hxx" -#include +#include #include @@ -497,16 +496,6 @@ bool Outliner::ShouldCreateBigTextObject() const return pEditEngine->ShouldCreateBigTextObject(); } -const EditEngine& Outliner::GetEditEngine() const -{ - return *pEditEngine; -} - -EditEngine& Outliner::GetEditEngine() -{ - return *pEditEngine; -} - void Outliner::SetVertical(bool bVertical) { pEditEngine->SetVertical(bVertical); diff --git a/editeng/source/outliner/outliner.cxx b/editeng/source/outliner/outliner.cxx index 9d216af0ff3f..314a507d8655 100644 --- a/editeng/source/outliner/outliner.cxx +++ b/editeng/source/outliner/outliner.cxx @@ -27,10 +27,9 @@ #include #include -#include "paralist.hxx" +#include #include -#include -#include "outlundo.hxx" +#include #include #include #include @@ -1169,7 +1168,7 @@ bool Outliner::ImpCanDeleteSelectedPages( OutlinerView* pCurView ) } Outliner::Outliner(SfxItemPool* pPool, OutlinerMode nMode) - : pEditEngine(new OutlinerEditEng(this, pPool)) + : pEditEngine(new EditEngine(this, pPool)) , pParaList(new ParagraphList) , mnFirstSelPage(0) , nDepthChangedHdlPrevDepth(0) diff --git a/editeng/source/outliner/outlundo.cxx b/editeng/source/outliner/outlundo.cxx index 86e63ac1e8b9..1189dea6b66f 100644 --- a/editeng/source/outliner/outlundo.cxx +++ b/editeng/source/outliner/outlundo.cxx @@ -20,7 +20,7 @@ #include #include -#include "outlundo.hxx" +#include OutlinerUndoBase::OutlinerUndoBase( sal_uInt16 _nId, Outliner* pOutliner ) diff --git a/editeng/source/outliner/outlvw.cxx b/editeng/source/outliner/outlvw.cxx index 56a4528e9d5b..66c5c19b1f9a 100644 --- a/editeng/source/outliner/outlvw.cxx +++ b/editeng/source/outliner/outlvw.cxx @@ -31,9 +31,8 @@ #include #include -#include -#include "paralist.hxx" -#include "outlundo.hxx" +#include +#include #include #include #include @@ -52,7 +51,7 @@ using namespace ::com::sun::star; OutlinerView::OutlinerView(Outliner& rOut, vcl::Window* pWin) : rOwner(rOut) - , pEditView(new EditView(rOut.getOutlinerEditEng(), pWin)) + , pEditView(new EditView(rOut.GetEditEngine(), pWin)) { } diff --git a/editeng/source/outliner/paralist.cxx b/editeng/source/outliner/paralist.cxx index 9ced9f808386..a356fe367b7e 100644 --- a/editeng/source/outliner/paralist.cxx +++ b/editeng/source/outliner/paralist.cxx @@ -18,7 +18,7 @@ */ -#include "paralist.hxx" +#include #include #include diff --git a/include/editeng/editeng.hxx b/include/editeng/editeng.hxx index 5b48537e18b0..680d6e1d069d 100644 --- a/include/editeng/editeng.hxx +++ b/include/editeng/editeng.hxx @@ -113,6 +113,8 @@ class LinkParamNone; class DrawPortionInfo; class DrawBulletInfo; class StripPortionsHelper; +enum class SdrCompatibilityFlag; +class Outliner; /** values for: SfxItemSet GetAttribs( const ESelection& rSel, EditEngineAttribs nOnlyHardAttrib = EditEngineAttribs::All ); @@ -196,6 +198,7 @@ private: SAL_DLLPRIVATE void SetInSelectionMode(bool b); public: + EditEngine(Outliner* pEngOwner, SfxItemPool* pItemPool); EditEngine(SfxItemPool* pItemPool); virtual ~EditEngine(); @@ -626,6 +629,16 @@ public: void SetLOKSpecialPaperSize(const Size& rSize); const Size& GetLOKSpecialPaperSize() const; + + // Only useful when this is Outliner capable. + sal_Int16 GetDepth( sal_Int32 nPara ) const; + + // Only useful when this is Outliner capable. + /// @returns state of the SdrCompatibilityFlag + std::optional GetCompatFlag(SdrCompatibilityFlag eFlag) const; + + // Only useful when this is Outliner capable. + Outliner* GetOwner(); }; #endif // INCLUDED_EDITENG_EDITENG_HXX diff --git a/include/editeng/outliner.hxx b/include/editeng/outliner.hxx index 134583d36396..377d98858886 100644 --- a/include/editeng/outliner.hxx +++ b/include/editeng/outliner.hxx @@ -44,7 +44,7 @@ #include #include -class OutlinerEditEng; +class EditEngine; class Outliner; class EditView; class EditUndo; @@ -131,7 +131,7 @@ private: friend class ParagraphList; friend class OutlinerView; friend class OutlinerParaObject; - friend class OutlinerEditEng; + friend class EditEngine; friend class OutlinerUndoCheckPara; friend class OutlinerUndoChangeParaFlags; @@ -547,7 +547,7 @@ public: struct DepthChangeHdlParam { Outliner* pOutliner; Paragraph* pPara; ParaFlag nPrevFlags; }; private: friend class OutlinerView; - friend class OutlinerEditEng; + friend class EditEngine; friend class OutlinerParaObject; friend class OLUndoExpand; friend class OutlinerUndoChangeDepth; @@ -556,7 +556,7 @@ private: friend class TextChainingUtils; - std::unique_ptr pEditEngine; + std::unique_ptr pEditEngine; std::unique_ptr pParaList; ViewList aViewList; @@ -617,8 +617,6 @@ private: SAL_DLLPRIVATE void ImplCheckDepth( sal_Int16& rnDepth ) const; - SAL_DLLPRIVATE OutlinerEditEng& getOutlinerEditEng() { return *pEditEngine; } - protected: SAL_DLLPRIVATE void ParagraphInserted( sal_Int32 nParagraph ); SAL_DLLPRIVATE void ParagraphDeleted( sal_Int32 nParagraph ); @@ -630,7 +628,7 @@ protected: SAL_DLLPRIVATE void StripBullet( sal_Int32 nPara, const Point& rStartPos, OutputDevice& rOutDev, StripPortionsHelper& rStripPortionsHelper); - // used by OutlinerEditEng. Allows Outliner objects to provide + // used by EditEngine. Allows Outliner objects to provide // bullet access to the EditEngine. SAL_DLLPRIVATE const SvxNumberFormat* GetNumberFormat( sal_Int32 nPara ) const; @@ -895,8 +893,8 @@ public: bool ShouldCreateBigTextObject() const; - const EditEngine& GetEditEngine() const; - EditEngine& GetEditEngine(); + const EditEngine& GetEditEngine() const { return *pEditEngine; } + EditEngine& GetEditEngine() { return *pEditEngine; } // this is needed for StarOffice Api SAL_DLLPRIVATE void SetLevelDependentStyleSheet( sal_Int32 nPara ); diff --git a/solenv/clang-format/excludelist b/solenv/clang-format/excludelist index 610f50f09120..9eac9332dfc0 100644 --- a/solenv/clang-format/excludelist +++ b/solenv/clang-format/excludelist @@ -3163,8 +3163,9 @@ editeng/inc/editattr.hxx editeng/inc/editdoc.hxx editeng/inc/edtspell.hxx editeng/inc/eerdll2.hxx -editeng/inc/outleeng.hxx +editeng/inc/outlundo.hxx editeng/inc/unomodel.hxx +editeng/inc/paralist.hxx editeng/qa/items/borderline_test.cxx editeng/qa/lookuptree/lookuptree_test.cxx editeng/qa/unit/core-test.cxx @@ -3248,11 +3249,9 @@ editeng/source/outliner/outlin2.cxx editeng/source/outliner/outliner.cxx editeng/source/outliner/outlobj.cxx editeng/source/outliner/outlundo.cxx -editeng/source/outliner/outlundo.hxx editeng/source/outliner/outlvw.cxx editeng/source/outliner/overflowingtxt.cxx editeng/source/outliner/paralist.cxx -editeng/source/outliner/paralist.hxx editeng/source/rtf/rtfitem.cxx editeng/source/rtf/svxrtf.cxx editeng/source/uno/UnoForbiddenCharsTable.cxx From 2bc4c7ea1922daec14a23cea9d9452205d58b408 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= Date: Sun, 27 Sep 2026 15:48:43 +0000 Subject: [PATCH 072/289] save the document Basic and dialog libraries without the BasicManager MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Store the library containers directly. Creating the BasicManager first loads the libraries only to save them again. Signed-off-by: Caolán McNamara Change-Id: I056cf4d8549ab5b9ecf31072704bfcd70e13f7e6 Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/13645 Reviewed-by: Noel Grandin Tested-by: Jenkins CPCI (cherry picked from commit 358ad5b06facfa12061d94586f66cfbd01ffe4d3) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211525 Tested-by: Jenkins Reviewed-by: Xisco Fauli --- sfx2/source/doc/objstor.cxx | 58 +++++++++++++++++++++++++++---------- 1 file changed, 42 insertions(+), 16 deletions(-) diff --git a/sfx2/source/doc/objstor.cxx b/sfx2/source/doc/objstor.cxx index 136b1678e5cf..47ca42c49816 100644 --- a/sfx2/source/doc/objstor.cxx +++ b/sfx2/source/doc/objstor.cxx @@ -56,6 +56,7 @@ #include #include #include +#include #include #include #include @@ -1232,6 +1233,22 @@ bool SfxObjectShell::IsPackageStorageFormat_Impl(const SfxMedium &rMedium) } +#if HAVE_FEATURE_SCRIPTING +namespace +{ +// A loaded library is stored through the document BasicManager, and an unloaded one is copied +// from the old storage. +bool lcl_isAnyLibraryLoaded( const uno::Reference< script::XStorageBasedLibraryContainer >& xContainer ) +{ + if ( !xContainer.is() ) + return false; + const uno::Sequence< OUString > aNames = xContainer->getElementNames(); + return std::any_of( aNames.begin(), aNames.end(), + [&xContainer]( const OUString& rName ) { return xContainer->isLibraryLoaded( rName ); } ); +} +} +#endif + bool SfxObjectShell::DoSave() // DoSave is only invoked for OLE. Save your own documents in the SFX through // DoSave_Impl order to allow for the creation of backups. @@ -1277,7 +1294,7 @@ bool SfxObjectShell::DoSave() bOk = true; } #if HAVE_FEATURE_SCRIPTING - if ( HasBasic() ) + if ( !pImpl->m_bNoBasicCapabilities ) { try { @@ -1296,16 +1313,21 @@ bool SfxObjectShell::DoSave() if ( GetMedium()->GetStorage()->hasByName( aDialogsStorageName ) ) GetMedium()->GetStorage()->copyElementTo( aDialogsStorageName, xTmpStorage, aDialogsStorageName ); - GetBasicManager(); - - // disconnect from the current storage - pImpl->aBasicManager.setStorage( xTmpStorage ); - - // store to the current storage - pImpl->aBasicManager.storeLibrariesToStorage( GetMedium()->GetStorage() ); - - // connect to the current storage back - pImpl->aBasicManager.setStorage( GetMedium()->GetStorage() ); + const uno::Reference< script::XStorageBasedLibraryContainer > aContainers[] + = { GetBasicContainer(), GetDialogContainer() }; + if ( lcl_isAnyLibraryLoaded( aContainers[0] ) ) + GetBasicManager(); + for ( const auto& xContainer : aContainers ) + { + if ( !xContainer.is() ) + continue; + // disconnect from the current storage + xContainer->setRootStorage( xTmpStorage ); + // store to the current storage + xContainer->storeLibrariesToStorage( GetMedium()->GetStorage() ); + // connect to the current storage back + xContainer->setRootStorage( GetMedium()->GetStorage() ); + } } catch( uno::Exception& ) { @@ -3475,13 +3497,17 @@ bool SfxObjectShell::SaveAsOwnFormat( SfxMedium& rMedium ) SetupStorage( xStorage, nVersion, bTemplate ); #if HAVE_FEATURE_SCRIPTING - if ( HasBasic() ) + if ( !pImpl->m_bNoBasicCapabilities ) { - // Initialize Basic - GetBasicManager(); - // Save dialog/script container - pImpl->aBasicManager.storeLibrariesToStorage( xStorage ); + if ( uno::Reference< script::XStorageBasedLibraryContainer > xBasicLibraries = GetBasicContainer() ) + { + if ( lcl_isAnyLibraryLoaded( xBasicLibraries ) ) + GetBasicManager(); + xBasicLibraries->storeLibrariesToStorage( xStorage ); + } + if ( uno::Reference< script::XStorageBasedLibraryContainer > xDialogLibraries = GetDialogContainer() ) + xDialogLibraries->storeLibrariesToStorage( xStorage ); } #endif From 8cd7669caf1946c9a079fd8ed98815e0b633b984 Mon Sep 17 00:00:00 2001 From: Heiko Tietze Date: Wed, 30 Sep 2026 14:02:17 +0200 Subject: [PATCH 073/289] Resolves tdf#173747 - Spelling and Grammar Checker Readability Using 0xf10d0c ("Dark Red 1") for Spelling brings a contrast of 4.8 and 4.37:1 against white and dark respectively. 0x3465a4 ("Dark Blue 1") for Grammar results in 5.92 / 3.54. Change-Id: I8347c2dd68e25aea33f7f2476f6b6d2db370ee7e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211616 Tested-by: Jenkins Reviewed-by: Heiko Tietze --- svtools/source/config/colorcfg.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/svtools/source/config/colorcfg.cxx b/svtools/source/config/colorcfg.cxx index c818c6f9bc53..7663f61ca3b1 100644 --- a/svtools/source/config/colorcfg.cxx +++ b/svtools/source/config/colorcfg.cxx @@ -533,8 +533,8 @@ Color ColorConfig::GetDefaultColor(ColorConfigEntry eEntry, int nMod) { COL_BLACK, COL_BLACK }, // FONTCOLOR { COL_BLUE, Color(0x1D99F3) }, // LINKS { Color(0x0000cc), Color(0x9B59B6) }, // LINKSVISITED - { COL_LIGHTRED, Color(0xC9211E) }, // SPELL - { COL_LIGHTBLUE, Color(0x729FCF) }, // GRAMMAR + { Color(0xf10d0c), Color(0xf10d0c) }, // SPELL (Dark Red 1) + { Color(0x3465a4), Color(0x3465a4) }, // GRAMMAR (Dark Blue 1) { COL_LIGHTMAGENTA, Color(0x780373) }, // SMARTTAGS { COL_GRAY, Color(0x1C1C1C) }, // SHADOWCOLOR { COL_GRAY7, COL_GRAY7 }, // WRITERTEXTGRID From 78416405b81ac06bb421e581a5662edbaf407a35 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A1szl=C3=B3=20N=C3=A9meth?= Date: Wed, 30 Sep 2026 23:35:29 +0200 Subject: [PATCH 074/289] tdf#173389 sw: add tests for improved compound-based "smart" hyphenation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Because losing compound boundary information in the new versions of the Dutch Hunspell dictionary, add German test documents and unit tests for compound-based "smart" hyphenation, testing also the Hunspell-based morphological analysis, which was improved for the languages with fogemorphemes in commit e668dc84eb97bf46fc108ec209fc8383a34123f7. Also remove the unnecessary dependency of the compound-based "smart" hyphenation, i.e. Hunspell-based morphological analysis of the test words from the Dutch and Hungarian *non-compound-based* unit tests. This enables the plain "smart" hyphenation tests for all versions of the Dutch and Hungarian Hunspell dictionaries. The German unit test improves the hyphenation in the following three lines: * Unter|drückung: Un-terdrückung -> Unter-drückung * Gleich|berechtigung: Gleichberech-tigung -> Gleichberechti-gung * Sklaven|handel: Sklavenhan-del -> Sklaven-handel (where the word "Sklave" has got an "n" fogemorpheme). These 3 lines are 10% of the hyphenated lines, while the German dictionary still lacks of compound boundary data for all the dictionary words, only compound splitting heuristics of Hunspell is used here, yet. Note: The Dutch tests became outdated temporarily because of the recent version of the Dutch dictionary, where the test compound words moved into the .dic file, but without compound boundary information. Unit testing uses system-installed German spelling and hyphenation dictionaries. E.g. installation of the missing dictionaries: sudo apt-get install hunspell-de-de-frami sudo apt-get install hyphen-de Follow-up to commit commit f9f694f5d9f39c5801bc5fec45867252c293bbcb "tdf#173389 sw: add compound-based “smart” hyphenation for readability" and commit e668dc84eb97bf46fc108ec209fc8383a34123f7 "tdf#173389 cui offapi sw xmloff: add custom compound-based hyphenation". Change-Id: I1c1fb28d6c0299a284951adc96b77d3205db5f4a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211642 Tested-by: Jenkins Reviewed-by: László Németh --- .../data/tdf119908_smart_hyphenation_de.odt | Bin 0 -> 70010 bytes .../data/tdf173389_smart_hyphenation_de.odt | Bin 0 -> 70035 bytes sw/qa/extras/layout/layout3.cxx | 1030 +++++++++++++++-- 3 files changed, 902 insertions(+), 128 deletions(-) create mode 100644 sw/qa/extras/layout/data/tdf119908_smart_hyphenation_de.odt create mode 100644 sw/qa/extras/layout/data/tdf173389_smart_hyphenation_de.odt diff --git a/sw/qa/extras/layout/data/tdf119908_smart_hyphenation_de.odt b/sw/qa/extras/layout/data/tdf119908_smart_hyphenation_de.odt new file mode 100644 index 0000000000000000000000000000000000000000..d1cc1754b6344d159de05a2ff8f53d60809e8e0d GIT binary patch literal 70010 zcmb5V1#Biwt|*#J7$?j$VPsP!u2_NFX3b0I!bjFe5A(5D?Hm@b?xFzye_6D!+@ck!grq;FwPA30wIJPUwRa3JFW zTSlSYS}Mu`-@!{eqcBVA?G>C*0E$K24rsRiZpHNvVPA^yMq7r{`R3#lcK3H@pDT%rr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moc10%h@gQvC#9*4(}V~CioUSHp~`)dPm0xe5I1Qr)ei9(Ta zgb0$J4w*m*4@5=jd<#W(6H4O$Kp~f>uiVz%yA^juL=5_^bgM`OKQ2vRJ{3bpH+o0g^s9+39#{x&jqllz$ zhI(_CJ>3S3NFY*(>%6{+vpGl*?*9%FDkumOjseFL;qPwSNEza4-%TNR0l<4>007lj zVh19T$T8s<(t6g|7 zfZ!%iF$e$z5hBQ#h|h^?tK%Ft{yq~VRmr<`uE{EckHnBs+Y!xvPnD_wr)Ib5R-%gF zq$OdrY3I8?HYb_rspsKtnZu0&kkJx@Cc#c10ztlaFPyr<4~Iz5xkZ4*V$t| fC;u%M1i7})(5{ZWeCxM;2W}WJ>8uHXfd>8!$AUk& literal 0 HcmV?d00001 diff --git a/sw/qa/extras/layout/data/tdf173389_smart_hyphenation_de.odt b/sw/qa/extras/layout/data/tdf173389_smart_hyphenation_de.odt new file mode 100644 index 0000000000000000000000000000000000000000..1450465fb500193f30f98516ac9256b5ba691bbf GIT binary patch literal 70035 zcmb5V1CS?A(=Iyp&W^1e+vbjK+n)K2ZSB~$ZQHhO+xFT2d(QWrb8fu%y>UCDA}X`v zsm{*m?0T{)OHL9L37?FrfdOw3K4?Ef{4 z10$Wjp`o#r@n6x#p6>r0iT`hq=GOYA#tw7>=8o3-whsRRjP-B8wl=m-wtr1_`VTma ze}nr6Vxa$@O#OE+X=`s|YH#e|@SlfCAnhxtNsNUDrGqz-2 z`4kdK)}``Kzt+c_#Mf2}rnwNHB}(}HL4A`Fb+-esp|^Vc)Z?5Tlps)S$w?B7j#u?*wq{reYhlAjPxaFx$ z2(&^bvx+G;As{KnrBQIBhs*cx!fw49Ql^t#`X#j3zu9=*^F^&S7>Djl=U~pq zkHqjqh8)qo0%bnCqw#UJY&jRxGJ&V@3@ccR!QlF89dJ{(Cr64j+)z(F6ry?Q^Bw8FOlTroPo_k$je9mxt`f*{M(0AV_kc zBCXcY9TdDZ0tc)ScLBedC9+xPJi(Y(Y$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Q81n4_W48{_p&(bAHavhGZZ+C`=X{0PsZ>0KlK0 zngK{5kpsLjq;=KU_~UKZRV;YEWCi_=fB*pOCo2GW33mU{8={;0R?E40tLzt`I&~NU z0Ouylo!kK6iuWO7eEt@yt%kgUF8p1fQ^l-X=bDfN_(}{Jy`7_R(C*A)aB8+{Y;{x& zoU|kinT+-E*c9T%+>Tk$KIPK~0PE-G&&{F$09Kw9oQn?{>rIj;Z(JTG_;_sf`e*f6 f*W~}SB2K35724d0m2Lg8o#251MMsbeOf>Kp3z?1Q literal 0 HcmV?d00001 diff --git a/sw/qa/extras/layout/layout3.cxx b/sw/qa/extras/layout/layout3.cxx index 51e0d1e54499..74d8e173ca8f 100644 --- a/sw/qa/extras/layout/layout3.cxx +++ b/sw/qa/extras/layout/layout3.cxx @@ -868,44 +868,6 @@ CPPUNIT_TEST_FIXTURE(SwLayoutWriter3, testTdf119908_smart_hyphenation_hu) if (!xSpell.is() || !xSpell->hasLanguage(static_cast(eLang))) return; - std::vector> aCompound = { - { u"jogorvoslatért"_ustr, "hy:3" }, { u"valamint"_ustr, "hy:4" }, - { u"alapfokon"_ustr, "pa:fokon" }, { u"jótéteményekben"_ustr, "hy:2" }, - { u"elismerésének"_ustr, "hy:2" }, - }; - - // tests supported by the actual spelling dictionary - bool aTests[5]; - - // check Hunspell-based morphological analysis & hyphenation - bool bHunspell = xSpell->isValid("", static_cast(eLang), - uno::Sequence()); - if (bHunspell) - { - // check dictionary support of compound splitting - for (size_t i = 0; i < aCompound.size(); ++i) - { - aTests[i] = false; - // get morphological analysis of the test word - uno::Reference xTmpRes = xSpell->spell( - "" + aCompound[i].first + "", - static_cast(eLang), uno::Sequence()); - if (xTmpRes.is()) - { - uno::Sequence seq = xTmpRes->getAlternatives(); - if (seq.hasElements()) - { - sal_Int32 nEndOfFirstAnalysis = seq[0].indexOf(""); - // use only the first analysis, like the lingucomponent implementation - OUString morph(seq[0].copy(0, nEndOfFirstAnalysis)); - - // check compound data - aTests[i] = morph.indexOf(aCompound[i].second) > -1; - } - } - } - } - createSwDoc("tdf119908_smart_hyphenation_hu.odt"); // Ensure that all text portions are calculated before testing. SwViewShell* pViewShell = getSwDoc()->getIDocumentLayoutAccess().GetCurrentViewShell(); @@ -915,7 +877,7 @@ CPPUNIT_TEST_FIXTURE(SwLayoutWriter3, testTdf119908_smart_hyphenation_hu) xmlDocUniquePtr pXmlDoc = parseLayoutDump(); - // 53 hyphenations on 5 pages using compound-based smart hyphenation + // 53 hyphenations on 5 pages using non-compound-based smart hyphenation // This was 67 without smart hyphenation and 53 without compound-based smart hyphenation // (using only the plain or interoperable smart hyphenation). @@ -1057,12 +1019,9 @@ CPPUNIT_TEST_FIXTURE(SwLayoutWriter3, testTdf119908_smart_hyphenation_hu) // no compound-based "smart" hyphenation of the compound "jog|orvoslat" // This is hyphenated as "jogor-voslat", not "jog-orvoslat" - if (bHunspell && aTests[0]) - { - assertXPath(pXmlDoc, "/root/page[1]/body/txt[10]/SwParaPortion/SwLineLayout[2]", "portion", - u"alapvető jogokat sértő eljárások ellen az illetékes hazai bíróságokhoz " - u"tényleges jogor"); - } + assertXPath(pXmlDoc, "/root/page[1]/body/txt[10]/SwParaPortion/SwLineLayout[2]", "portion", + u"alapvető jogokat sértő eljárások ellen az illetékes hazai bíróságokhoz " + u"tényleges jogor"); assertXPath(pXmlDoc, "/root/page[1]/body/txt[10]/SwParaPortion/SwLineLayout[2]/SwHyphPortion", 1); @@ -1117,12 +1076,9 @@ CPPUNIT_TEST_FIXTURE(SwLayoutWriter3, testTdf119908_smart_hyphenation_hu) // no compound-based "smart" hyphenation of the compound "vala|mint" // This is hyphenated as "va-lamint" without enabled compound-based "smart" hyphenation - if (bHunspell && aTests[1]) - { - assertXPath(pXmlDoc, "/root/page[1]/body/txt[22]/SwParaPortion/SwLineLayout[1]", "portion", - u"Minden személynek joga van minden országot, ideértve saját hazáját is, " - u"elhagyni, va"); - } + assertXPath(pXmlDoc, "/root/page[1]/body/txt[22]/SwParaPortion/SwLineLayout[1]", "portion", + u"Minden személynek joga van minden országot, ideértve saját hazáját is, " + u"elhagyni, va"); assertXPath(pXmlDoc, "/root/page[1]/body/txt[22]/SwParaPortion/SwLineLayout[1]/SwHyphPortion", 1); @@ -1261,12 +1217,9 @@ CPPUNIT_TEST_FIXTURE(SwLayoutWriter3, testTdf119908_smart_hyphenation_hu) // no compound-based "smart" hyphenation of the compound "alap|fokon" // This is hyphenated as "alapfo-kon", not "alap-fokon" - if (bHunspell && aTests[2]) - { - assertXPath( - pXmlDoc, "/root/page[1]/body/txt[13]/SwParaPortion/SwLineLayout[1]", "portion", - u"Minden személynek joga van az oktatáshoz. Az oktatásnak legalábbis elemi és alapfo"); - } + assertXPath( + pXmlDoc, "/root/page[1]/body/txt[13]/SwParaPortion/SwLineLayout[1]", "portion", + u"Minden személynek joga van az oktatáshoz. Az oktatásnak legalábbis elemi és alapfo"); assertXPath(pXmlDoc, "/root/page[1]/body/txt[13]/SwParaPortion/SwLineLayout[1]/SwHyphPortion", 1); @@ -1291,14 +1244,10 @@ CPPUNIT_TEST_FIXTURE(SwLayoutWriter3, testTdf119908_smart_hyphenation_hu) // no compound-based "smart" hyphenation of the compound "jó|téteményekben" // This is not hyphenated, when compound-based smart hyphenation is disabled - if (bHunspell && aTests[3]) - { - assertXPath( - pXmlDoc, "/root/page[1]/body/txt[17]/SwParaPortion/SwLineLayout[2]", "portion", - u"a művészetek élvezéséhez, valamint a tudomány haladásában és az abból származó "); - assertXPath(pXmlDoc, - "/root/page[1]/body/txt[4]/SwParaPortion/SwLineLayout[2]/SwHyphPortion", 0); - } + assertXPath(pXmlDoc, "/root/page[1]/body/txt[17]/SwParaPortion/SwLineLayout[2]", "portion", + u"a művészetek élvezéséhez, valamint a tudomány haladásában és az abból származó "); + assertXPath(pXmlDoc, "/root/page[1]/body/txt[4]/SwParaPortion/SwLineLayout[2]/SwHyphPortion", + 0); assertXPath( pXmlDoc, "/root/page[1]/body/txt[18]/SwParaPortion/SwLineLayout[1]", "portion", @@ -1339,14 +1288,27 @@ CPPUNIT_TEST_FIXTURE(SwLayoutWriter3, testTdf119908_smart_hyphenation_hu) // no compound-based "smart" hyphenation of the compound "el|ismerésének" // This is not hyphenated by the plain, i.e. not compound-based "smart" hyphenation. - if (bHunspell && aTests[4]) - { - assertXPath(pXmlDoc, "/root/page[1]/body/txt[4]/SwParaPortion/SwLineLayout[2]", "portion", - u"zásoknak lehet alávetve, amelyeket a törvény kizárólag mások jogai és " - u"szabadságai "); - assertXPath(pXmlDoc, - "/root/page[1]/body/txt[4]/SwParaPortion/SwLineLayout[2]/SwHyphPortion", 0); - } + assertXPath(pXmlDoc, "/root/page[1]/body/txt[4]/SwParaPortion/SwLineLayout[2]", "portion", + u"zásoknak lehet alávetve, amelyeket a törvény kizárólag mások jogai és " + u"szabadságai "); + assertXPath(pXmlDoc, "/root/page[1]/body/txt[4]/SwParaPortion/SwLineLayout[2]/SwHyphPortion", + 0); + + // follow-up to the non-compound-based "smart" hyphenation in the previous line + + assertXPath( + pXmlDoc, "/root/page[1]/body/txt[4]/SwParaPortion/SwLineLayout[3]", "portion", + u"elismerésének és tiszteletben tartásának biztosítása, valamint a demokratikus társada"); + assertXPath(pXmlDoc, "/root/page[1]/body/txt[4]/SwParaPortion/SwLineLayout[3]/SwHyphPortion", + 1); + + // follow-up to the non-compound-based "smart" hyphenation in the first line of the paragraph + + assertXPath( + pXmlDoc, "/root/page[1]/body/txt[4]/SwParaPortion/SwLineLayout[4]", "portion", + u"lom erkölcse, közrendje és általános jóléte jogos követelményeinek kielégítése érdeké"); + assertXPath(pXmlDoc, "/root/page[1]/body/txt[4]/SwParaPortion/SwLineLayout[4]/SwHyphPortion", + 1); assertXPath( pXmlDoc, "/root/page[1]/body/txt[5]/SwParaPortion/SwLineLayout[1]", "portion", @@ -1361,8 +1323,7 @@ CPPUNIT_TEST_FIXTURE(SwLayoutWriter3, testTdf119908_smart_hyphenation_hu) pXmlDoc, "/root/page[1]/body/txt[7]/SwParaPortion/SwLineLayout[1]", "portion", u"A jelen Nyilatkozat egyetlen rendelkezése sem értelmezhető úgy, hogy az valamely "); - if (bHunspell && aTests[4]) - assertXPath(pXmlDoc, "/root/page[1]/body/txt/SwParaPortion/SwLineLayout/SwHyphPortion", 5); + assertXPath(pXmlDoc, "/root/page[1]/body/txt/SwParaPortion/SwLineLayout/SwHyphPortion", 6); } // check smart hyphenation and compound-based smart hyphenation @@ -1828,7 +1789,7 @@ CPPUNIT_TEST_FIXTURE(SwLayoutWriter3, testTdf173389_smart_hyphenation_hu) pWrtShell->Left(SwCursorSkipMode::Chars, /*bSelect=*/true, 2766, /*bBasicCall=*/false); pWrtShell->Delete(); - // 5 hyphenations on page 5 + // 6 hyphenations on page 5 pViewShell->Reformat(); pXmlDoc = parseLayoutDump(); @@ -1893,43 +1854,6 @@ CPPUNIT_TEST_FIXTURE(SwLayoutWriter3, testTdf119908_smart_hyphenation_nl) if (!xSpell.is() || !xSpell->hasLanguage(static_cast(eLang))) return; - std::vector> aCompound = { - { u"arbeidsvoorwaarden"_ustr, "pa:arbeids" }, - { u"doeleinden"_ustr, "pa:doel" }, - }; - - // tests supported by the actual spelling dictionary - bool aTests[2]; - - // check Hunspell-based morphological analysis & hyphenation - bool bHunspell = xSpell->isValid("", static_cast(eLang), - uno::Sequence()); - if (bHunspell) - { - // check dictionary support of compound splitting - for (size_t i = 0; i < aCompound.size(); ++i) - { - aTests[i] = false; - // get morphological analysis of the test word - uno::Reference xTmpRes = xSpell->spell( - "" + aCompound[i].first + "", - static_cast(eLang), uno::Sequence()); - if (xTmpRes.is()) - { - uno::Sequence seq = xTmpRes->getAlternatives(); - if (seq.hasElements()) - { - sal_Int32 nEndOfFirstAnalysis = seq[0].indexOf(""); - // use only the first analysis, like the lingucomponent implementation - OUString morph(seq[0].copy(0, nEndOfFirstAnalysis)); - - // check compound data - aTests[i] = morph.indexOf(aCompound[i].second) > -1; - } - } - } - } - createSwDoc("tdf119908_smart_hyphenation_nl.odt"); // Ensure that all text portions are calculated before testing. SwViewShell* pViewShell = getSwDoc()->getIDocumentLayoutAccess().GetCurrentViewShell(); @@ -1949,14 +1873,11 @@ CPPUNIT_TEST_FIXTURE(SwLayoutWriter3, testTdf119908_smart_hyphenation_nl) pXmlDoc = parseLayoutDump(); // no compound-based "smart" hyphenation of the compound "arbeids|voorwaarden" - // This is hyphenated as "ar-beidsvoorwaarden" previously, not "arbeids-voorwaarden" + // This is hyphenated as "ar-beidsvoorwaarden", not "arbeids-voorwaarden" - if (bHunspell && aTests[0]) - { - assertXPath(pXmlDoc, "/root/page[1]/body/txt[25]/SwParaPortion/SwLineLayout[1]", "portion", - u"Een ieder heeft recht op arbeid, op vrije keuze van beroep, op rechtmatige " - u"en gunstige ar"); - } + assertXPath(pXmlDoc, "/root/page[1]/body/txt[25]/SwParaPortion/SwLineLayout[1]", "portion", + u"Een ieder heeft recht op arbeid, op vrije keuze van beroep, op rechtmatige " + u"en gunstige ar"); assertXPath(pXmlDoc, "/root/page[1]/body/txt[25]/SwParaPortion/SwLineLayout[1]/SwHyphPortion", 1); @@ -1969,15 +1890,12 @@ CPPUNIT_TEST_FIXTURE(SwLayoutWriter3, testTdf119908_smart_hyphenation_nl) pViewShell->Reformat(); pXmlDoc = parseLayoutDump(); - // compound-based "smart" hyphenation of the compound "doel|einden" - // This is hyphenated as "doelein-den" previously, not "doel-einden" + // no compound-based "smart" hyphenation of the compound "doel|einden" + // This is hyphenated as "doelein-den", not "doel-einden" - if (bHunspell && aTests[1]) - { - assertXPath(pXmlDoc, "/root/page[1]/body/txt[1]/SwParaPortion/SwLineLayout[1]", "portion", - u"Deze rechten en vrijheden mogen in geen geval worden uitgeoefend in strijd " - u"met de doelein"); - } + assertXPath(pXmlDoc, "/root/page[1]/body/txt[1]/SwParaPortion/SwLineLayout[1]", "portion", + u"Deze rechten en vrijheden mogen in geen geval worden uitgeoefend in strijd " + u"met de doelein"); assertXPath(pXmlDoc, "/root/page[1]/body/txt[1]/SwParaPortion/SwLineLayout[1]/SwHyphPortion", 1); } @@ -2085,6 +2003,862 @@ CPPUNIT_TEST_FIXTURE(SwLayoutWriter3, testTdf173389_smart_hyphenation_nl) 1); } +// check smart hyphenation and disabled compound-based smart hyphenation +CPPUNIT_TEST_FIXTURE(SwLayoutWriter3, testTdf119908_smart_hyphenation_de) +{ + uno::Reference xHyphenator = LinguMgr::GetHyphenator(); + if (!xHyphenator->hasLocale(lang::Locale(u"de"_ustr, u"DE"_ustr, OUString()))) + return; + + // compound-based hyphenation needs Hunspell morphological analysis + uno::Reference xSpell = LinguMgr::GetSpellChecker(); + LanguageType eLang + = LanguageTag::convertToLanguageType(lang::Locale(u"de"_ustr, u"DE"_ustr, OUString())); + if (!xSpell.is() || !xSpell->hasLanguage(static_cast(eLang))) + return; + + createSwDoc("tdf119908_smart_hyphenation_de.odt"); + // Ensure that all text portions are calculated before testing. + SwViewShell* pViewShell = getSwDoc()->getIDocumentLayoutAccess().GetCurrentViewShell(); + + CPPUNIT_ASSERT(pViewShell); + pViewShell->Reformat(); + + xmlDocUniquePtr pXmlDoc = parseLayoutDump(); + + // 30 hyphenations on 5 pages using non-compound-based smart hyphenation + // This was 35 without smart hyphenation + + // 9 hyphenations on page 1 + + // "smart" hyphenation: disabled hyphenation of "geführt" by shrinking + // This was "ge-führt" + + assertXPath(pXmlDoc, "/root/page[1]/body/txt[4]/SwParaPortion/SwLineLayout[1]", "portion", + u"da die Nichtanerkennung und Verachtung der Menschenrechte zu Akten der Barbarei " + u"geführt "); + + // "smart" hyphenation: disabled hyphenation of "damit" by shrinking + // This was "da-mit" + + assertXPath(pXmlDoc, "/root/page[1]/body/txt[5]/SwParaPortion/SwLineLayout[1]", "portion", + u"da es notwendig ist, die Menschenrechte durch die Herrschaft des Rechtes zu " + u"schützen, damit "); + + // no compound-based "smart" hyphenation of the compound "Unter|drückung" + // This is hyphenated as "Un-terdrückung", not "Unter-drückung" + + assertXPath( + pXmlDoc, "/root/page[1]/body/txt[5]/SwParaPortion/SwLineLayout[2]", "portion", + u"der Mensch nicht gezwungen wird, als letztes Mittel zum Aufstand gegen Tyrannei und Un"); + assertXPath(pXmlDoc, "/root/page[1]/body/txt[5]/SwParaPortion/SwLineLayout[2]/SwHyphPortion", + 1); + + // "smart" hyphenation: disabled hyphenation of "Nationen" by shrinking + // This was "Natio-nen" + + assertXPath(pXmlDoc, "/root/page[1]/body/txt[6]/SwParaPortion/SwLineLayout[1]", "portion", + u"da es notwendig ist, die Entwicklung freundschaftlicher Beziehungen zwischen den " + u"Nationen "); + + assertXPath(pXmlDoc, "/root/page[1]/body/txt[7]/SwParaPortion/SwLineLayout[1]", "portion", + u"da die Völker der Vereinten Nationen in der Charta ihren Glauben an die " + u"grundlegenden Men"); + assertXPath(pXmlDoc, "/root/page[1]/body/txt[7]/SwParaPortion/SwLineLayout[1]/SwHyphPortion", + 1); + + // no compound-based "smart" hyphenation of the compound "Gleich|berechtigung" + // This is hyphenated as "Gleichberech-tigung", not "Gleichberechti-gung" + + assertXPath( + pXmlDoc, "/root/page[1]/body/txt[7]/SwParaPortion/SwLineLayout[2]", "portion", + u"schenrechte, an die Würde und den Wert der menschlichen Person und an die Gleichberech"); + assertXPath(pXmlDoc, "/root/page[1]/body/txt[7]/SwParaPortion/SwLineLayout[2]/SwHyphPortion", + 1); + + // "smart" hyphenation: disabled hyphenation of "Nationen" by shrinking + // This was "Natio-nen" + + assertXPath(pXmlDoc, "/root/page[1]/body/txt[8]/SwParaPortion/SwLineLayout[1]", "portion", + u"da die Mitgliedstaaten sich verpflichtet haben, in Zusammenarbeit mit den " + u"Vereinten Nationen "); + + assertXPath( + pXmlDoc, "/root/page[1]/body/txt[8]/SwParaPortion/SwLineLayout[2]", "portion", + u"auf die allgemeine Achtung und Einhaltung der Menschenrechte und Grundfreiheiten hinzu"); + assertXPath(pXmlDoc, "/root/page[1]/body/txt[8]/SwParaPortion/SwLineLayout[2]/SwHyphPortion", + 1); + + // "smart" justification: better word spacing by shrinking + // This ended with "für", not "für die" + + assertXPath(pXmlDoc, "/root/page[1]/body/txt[9]/SwParaPortion/SwLineLayout[1]", "portion", + u"da ein gemeinsames Verständnis dieser Rechte und Freiheiten von größter " + u"Wichtigkeit für die "); + + // "smart" hyphenation: disabled hyphenation of "nationale" by shrinking + // This was "natio-nale" + + assertXPath(pXmlDoc, "/root/page[1]/body/txt[11]/SwParaPortion/SwLineLayout[4]", "portion", + u"die Achtung vor diesen Rechten und Freiheiten zu fördern und durch " + u"fortschreitende nationale "); + + // follow-up to the "smart" hyphenation in the previous line + // This was "Ein-haltung", now "Einhal-tung" + + assertXPath( + pXmlDoc, "/root/page[1]/body/txt[11]/SwParaPortion/SwLineLayout[5]", "portion", + u"und internationale Maßnahmen ihre allgemeine und tatsächliche Anerkennung und Einhal"); + assertXPath(pXmlDoc, "/root/page[1]/body/txt[11]/SwParaPortion/SwLineLayout[5]/SwHyphPortion", + 1); + + assertXPath(pXmlDoc, "/root/page[1]/body/txt[15]/SwParaPortion/SwLineLayout[1]", "portion", + u"Jeder hat Anspruch auf die in dieser Erklärung verkündeten Rechte und Freiheiten " + u"ohne ir"); + assertXPath(pXmlDoc, "/root/page[1]/body/txt[15]/SwParaPortion/SwLineLayout[1]/SwHyphPortion", + 1); + + assertXPath(pXmlDoc, "/root/page[1]/body/txt[15]/SwParaPortion/SwLineLayout[2]", "portion", + u"gendeinen Unterschied, etwa nach Rasse, Hautfarbe, Geschlecht, Sprache, " + u"Religion, politi"); + assertXPath(pXmlDoc, "/root/page[1]/body/txt[15]/SwParaPortion/SwLineLayout[2]/SwHyphPortion", + 1); + + // "smart" justification: better word spacing by shrinking + // This ended with "Geburt", not "Geburt oder" + + assertXPath(pXmlDoc, "/root/page[1]/body/txt[15]/SwParaPortion/SwLineLayout[3]", "portion", + u"scher oder sonstiger Überzeugung, nationaler oder sozialer Herkunft, Vermögen, " + u"Geburt oder "); + + assertXPath( + pXmlDoc, "/root/page[1]/body/txt[16]/SwParaPortion/SwLineLayout[2]", "portion", + u"oder internationalen Stellung des Landes oder Gebiets, dem eine Person angehört, gleich"); + assertXPath(pXmlDoc, "/root/page[1]/body/txt[16]/SwParaPortion/SwLineLayout[2]/SwHyphPortion", + 1); + + // "smart" justification: better word spacing by shrinking + // This ended with "besitzt", not "besitzt oder" + + assertXPath(pXmlDoc, "/root/page[1]/body/txt[16]/SwParaPortion/SwLineLayout[3]", "portion", + u"gültig ob dieses unabhängig ist, unter Treuhandschaft steht, keine " + u"Selbstregierung besitzt oder "); + + // no compound-based "smart" hyphenation of the compound "Sklaven|handel" + // This is hyphenated as "Sklavenhan-del", not "Sklaven-handel", + // 1) like without "smart" hyphenation and 2) with compound-based hyphenation + + assertXPath(pXmlDoc, "/root/page[1]/body/txt[20]/SwParaPortion/SwLineLayout[1]", "portion", + u"Niemand darf in Sklaverei oder Leibeigenschaft gehalten werden; Sklaverei und " + u"Sklavenhan"); + assertXPath(pXmlDoc, "/root/page[1]/body/txt[20]/SwParaPortion/SwLineLayout[1]/SwHyphPortion", + 1); + + assertXPath(pXmlDoc, "/root/page[1]/body/txt/SwParaPortion/SwLineLayout/SwHyphPortion", 9); + + // delete page 1 to update hyphenation on the next page + + SwWrtShell* const pWrtShell = getSwDocShell()->GetWrtShell(); + pWrtShell->Right(SwCursorSkipMode::Chars, /*bSelect=*/true, 3170, /*bBasicCall=*/false); + pWrtShell->Delete(); + + // 7 hyphenations on page 2 + + pViewShell->Reformat(); + pXmlDoc = parseLayoutDump(); + + assertXPath( + pXmlDoc, "/root/page[1]/body/txt[6]/SwParaPortion/SwLineLayout[1]", "portion", + u"Alle Menschen sind vor dem Gesetz gleich und haben ohne Unterschied Anspruch auf glei"); + assertXPath(pXmlDoc, "/root/page[1]/body/txt[6]/SwParaPortion/SwLineLayout[1]/SwHyphPortion", + 1); + + assertXPath( + pXmlDoc, "/root/page[1]/body/txt[6]/SwParaPortion/SwLineLayout[2]", "portion", + u"chen Schutz durch das Gesetz. Alle haben Anspruch auf gleichen Schutz gegen jede Diskri"); + assertXPath(pXmlDoc, "/root/page[1]/body/txt[6]/SwParaPortion/SwLineLayout[2]/SwHyphPortion", + 1); + + // "smart" hyphenation: disabled hyphenation of "derartigen" by shrinking + // This was "derarti-gen" + + assertXPath(pXmlDoc, "/root/page[1]/body/txt[6]/SwParaPortion/SwLineLayout[3]", "portion", + u"minierung, die gegen diese Erklärung verstößt, und gegen jede Aufhetzung zu " + u"einer derartigen "); + + // "smart" hyphenation: disabled hyphenation of "Gesetz" by shrinking + // This was "Ge-setz" + + assertXPath(pXmlDoc, "/root/page[1]/body/txt[8]/SwParaPortion/SwLineLayout[2]", "portion", + u"Gerichten gegen Handlungen, durch die seine ihm nach der Verfassung oder nach " + u"dem Gesetz "); + + // "smart" hyphenation: disabled hyphenation of "erhobenen" by shrinking + // This was "erhobe-nen" + + assertXPath(pXmlDoc, "/root/page[1]/body/txt[12]/SwParaPortion/SwLineLayout[1]", "portion", + u"Jeder hat bei der Feststellung seiner Rechte und Pflichten sowie bei einer gegen " + u"ihn erhobenen "); + + // follow-up to the "smart" hyphenation in the previous line + // This was "öf-fentliches", now "öffentli-ches" + + assertXPath(pXmlDoc, "/root/page[1]/body/txt[12]/SwParaPortion/SwLineLayout[2]", "portion", + u"strafrechtlichen Beschuldigung in voller Gleichheit Anspruch auf ein gerechtes " + u"und öffentli"); + assertXPath(pXmlDoc, "/root/page[1]/body/txt[12]/SwParaPortion/SwLineLayout[2]/SwHyphPortion", + 1); + + // "smart" justification: better word spacing by shrinking + // This ended with "für", not "für seine" + + assertXPath(pXmlDoc, "/root/page[1]/body/txt[14]/SwParaPortion/SwLineLayout[2]", "portion", + u"zu gelten, solange seine Schuld nicht in einem öffentlichen Verfahren, in dem er " + u"alle für seine "); + + assertXPath( + pXmlDoc, "/root/page[1]/body/txt[15]/SwParaPortion/SwLineLayout[3]", "portion", + u"keine schwerere Strafe als die zum Zeitpunkt der Begehung der strafbaren Handlung ange"); + assertXPath(pXmlDoc, "/root/page[1]/body/txt[15]/SwParaPortion/SwLineLayout[3]/SwHyphPortion", + 1); + + // "smart" justification: better word spacing by shrinking + // This ended with "Wohnung", not "Wohnung und" + + assertXPath(pXmlDoc, "/root/page[1]/body/txt[17]/SwParaPortion/SwLineLayout[1]", "portion", + u"Niemand darf willkürlichen Eingriffen in sein Privatleben, seine Familie, seine " + u"Wohnung und "); + + // follow-up to the "smart" justification in the previous line + + assertXPath(pXmlDoc, "/root/page[1]/body/txt[17]/SwParaPortion/SwLineLayout[2]", "portion", + u"seinen Schriftverkehr oder Beeinträchtigungen seiner Ehre und seines Rufes " + u"ausgesetzt wer"); + assertXPath(pXmlDoc, "/root/page[1]/body/txt[17]/SwParaPortion/SwLineLayout[2]/SwHyphPortion", + 1); + + // follow-up to the "smart" justification in the previous line + // This was "Beeinträch-tigungen", not "Beeinträchtigun-gen". + + assertXPath(pXmlDoc, "/root/page[1]/body/txt[17]/SwParaPortion/SwLineLayout[3]", "portion", + u"den. Jeder hat Anspruch auf rechtlichen Schutz gegen solche Eingriffe oder " + u"Beeinträchtigun"); + assertXPath(pXmlDoc, "/root/page[1]/body/txt[17]/SwParaPortion/SwLineLayout[3]/SwHyphPortion", + 1); + + // "smart" hyphenation: enabled hyphenation by shrinking ("wer-den") + // This wasn't hyphenated before, resulting in exceeding maximum word spacing + + assertXPath(pXmlDoc, "/root/page[1]/body/txt[26]/SwParaPortion/SwLineLayout[1]", "portion", + u"Niemandem darf seine Staatsangehörigkeit willkürlich entzogen noch das Recht " + u"versagt wer"); + assertXPath(pXmlDoc, "/root/page[1]/body/txt[26]/SwParaPortion/SwLineLayout[1]/SwHyphPortion", + 1); + + assertXPath(pXmlDoc, "/root/page[1]/body/txt/SwParaPortion/SwLineLayout/SwHyphPortion", 7); + + // delete page 2 to update hyphenation on the next page + + pWrtShell->Right(SwCursorSkipMode::Chars, /*bSelect=*/false, 2734, /*bBasicCall=*/false); + pWrtShell->Left(SwCursorSkipMode::Chars, /*bSelect=*/true, 2734, /*bBasicCall=*/false); + pWrtShell->Delete(); + + // 7 hyphenations on page 3 + + pViewShell->Reformat(); + pXmlDoc = parseLayoutDump(); + + // "smart" hyphenation: enabled hyphenation by shrinking ("Staats-angehörigkeit") + // compound-based "smart" hyphenation keeps it (analysis: "Staats|angehörigkeit") + // This wasn't hyphenated before + + assertXPath( + pXmlDoc, "/root/page[1]/body/txt[1]/SwParaPortion/SwLineLayout[1]", "portion", + u"Heiratsfähige Frauen und Männer haben ohne Beschränkung auf Grund der Rasse, der Staats"); + assertXPath(pXmlDoc, "/root/page[1]/body/txt[1]/SwParaPortion/SwLineLayout[1]/SwHyphPortion", + 1); + + // smart hyphenation: better spacing by shrinking + // This was "innezu-haben" (now "innezuha-ben") + + assertXPath(pXmlDoc, "/root/page[1]/body/txt[5]/SwParaPortion/SwLineLayout[1]", "portion", + u"Jeder hat das Recht, sowohl allein als auch in Gemeinschaft mit anderen Eigentum " + u"innezuha"); + assertXPath(pXmlDoc, "/root/page[1]/body/txt[5]/SwParaPortion/SwLineLayout[1]/SwHyphPortion", + 1); + + assertXPath(pXmlDoc, "/root/page[1]/body/txt[8]/SwParaPortion/SwLineLayout[2]", "portion", + u"die Freiheit ein, seine Religion oder Überzeugung zu wechseln, sowie die " + u"Freiheit, seine Re"); + assertXPath(pXmlDoc, "/root/page[1]/body/txt[8]/SwParaPortion/SwLineLayout[2]/SwHyphPortion", + 1); + + // "smart" justification: better word spacing by shrinking + // This ended with "Recht", not "Recht schließt" + + assertXPath(pXmlDoc, "/root/page[1]/body/txt[10]/SwParaPortion/SwLineLayout[1]", "portion", + u"Jeder hat das Recht auf Meinungsfreiheit und freie Meinungsäußerung; dieses " + u"Recht schließt "); + + // "smart" hyphenation: better word spacing by shrinking + // This was "zu-sammenzuschließen" (now "zusam-menzuschließen"). + + assertXPath( + pXmlDoc, "/root/page[1]/body/txt[12]/SwParaPortion/SwLineLayout[1]", "portion", + u"Alle Menschen haben das Recht, sich friedlich zu versammeln und zu Vereinigungen zusam"); + assertXPath(pXmlDoc, "/root/page[1]/body/txt[12]/SwParaPortion/SwLineLayout[1]/SwHyphPortion", + 1); + + assertXPath(pXmlDoc, "/root/page[1]/body/txt[15]/SwParaPortion/SwLineLayout[1]", "portion", + u"Jeder hat das Recht, an der Gestaltung der öffentlichen Angelegenheiten seines " + u"Landes un"); + assertXPath(pXmlDoc, "/root/page[1]/body/txt[15]/SwParaPortion/SwLineLayout[1]/SwHyphPortion", + 1); + + // "smart" hyphenation: disabled hyphenation of "darauf" by shrinking + // This was "dar-auf" + + assertXPath(pXmlDoc, "/root/page[1]/body/txt[19]/SwParaPortion/SwLineLayout[1]", "portion", + u"Jeder hat als Mitglied der Gesellschaft das Recht auf soziale Sicherheit und " + u"Anspruch darauf, "); + + assertXPath( + pXmlDoc, "/root/page[1]/body/txt[19]/SwParaPortion/SwLineLayout[2]", "portion", + u"durch innerstaatliche Maßnahmen und internationale Zusammenarbeit sowie unter Berück"); + assertXPath(pXmlDoc, "/root/page[1]/body/txt[19]/SwParaPortion/SwLineLayout[2]/SwHyphPortion", + 1); + + // smart hyphenation: better spacing by shrinking + // compound-based hyphenation keeps the same break point (analysis: "Arbeits|bedingungen") + // This was "Ar-beitsbedingungen" (now "Arbeits-bedingungen") + + assertXPath(pXmlDoc, "/root/page[1]/body/txt[21]/SwParaPortion/SwLineLayout[1]", "portion", + u"Jeder hat das Recht auf Arbeit, auf freie Berufswahl, auf gerechte und " + u"befriedigende Arbeits"); + assertXPath(pXmlDoc, "/root/page[1]/body/txt[21]/SwParaPortion/SwLineLayout[1]/SwHyphPortion", + 1); + + assertXPath(pXmlDoc, "/root/page[1]/body/txt/SwParaPortion/SwLineLayout/SwHyphPortion", 7); + + // delete page 3 to update hyphenation on the next page + + pWrtShell->Right(SwCursorSkipMode::Chars, /*bSelect=*/false, 2945, /*bBasicCall=*/false); + pWrtShell->Left(SwCursorSkipMode::Chars, /*bSelect=*/true, 2945, /*bBasicCall=*/false); + pWrtShell->Delete(); + + // 7 hyphenations on page 4 + + pViewShell->Reformat(); + pXmlDoc = parseLayoutDump(); + + // smart hyphenation: better spacing by shrinking + // This was "Be-grenzung" (now "Begren-zung") + + assertXPath(pXmlDoc, "/root/page[1]/body/txt[1]/SwParaPortion/SwLineLayout[1]", "portion", + u"Jeder hat das Recht auf Erholung und Freizeit und insbesondere auf eine " + u"vernünftige Begren"); + assertXPath(pXmlDoc, "/root/page[1]/body/txt[1]/SwParaPortion/SwLineLayout[1]/SwHyphPortion", + 1); + + assertXPath( + pXmlDoc, "/root/page[1]/body/txt[6]/SwParaPortion/SwLineLayout[1]", "portion", + u"Jeder hat das Recht auf Bildung. Die Bildung ist unentgeltlich, zum mindesten der Grund"); + assertXPath(pXmlDoc, "/root/page[1]/body/txt[6]/SwParaPortion/SwLineLayout[1]/SwHyphPortion", + 1); + + // "smart" hyphenation: enabled hyphenation by shrinking ("Hoch-schulunterricht") + // compound-based "smart" hyphenations keeps it (analysis: "Hoch|schul|unterricht") + // This wasn't hyphenated before + + assertXPath( + pXmlDoc, "/root/page[1]/body/txt[6]/SwParaPortion/SwLineLayout[3]", "portion", + u"Fach- und Berufsschulunterricht müssen allgemein verfügbar gemacht werden, und der Hoch"); + assertXPath(pXmlDoc, "/root/page[1]/body/txt[6]/SwParaPortion/SwLineLayout[3]/SwHyphPortion", + 1); + + assertXPath(pXmlDoc, "/root/page[1]/body/txt[7]/SwParaPortion/SwLineLayout[1]", "portion", + u"Die Bildung muß auf die volle Entfaltung der menschlichen Persönlichkeit und auf " + u"die Stär"); + assertXPath(pXmlDoc, "/root/page[1]/body/txt[7]/SwParaPortion/SwLineLayout[1]/SwHyphPortion", + 1); + + // "smart" hyphenation: better spacing by shrinking + // This wasn't hyphenated before (now "teil-zuhaben") + + assertXPath(pXmlDoc, "/root/page[1]/body/txt[10]/SwParaPortion/SwLineLayout[2]", "portion", + u"Künsten zu erfreuen und am wissenschaftlichen Fortschritt und dessen " + u"Errungenschaften teil"); + assertXPath(pXmlDoc, "/root/page[1]/body/txt[10]/SwParaPortion/SwLineLayout[2]/SwHyphPortion", + 1); + + // "smart" hyphenation: disabled hyphenation of "Erklärung" by shrinking + // This was "Erklä-rung" + + assertXPath(pXmlDoc, "/root/page[1]/body/txt[13]/SwParaPortion/SwLineLayout[1]", "portion", + u"Jeder hat Anspruch auf eine soziale und internationale Ordnung, in der die in " + u"dieser Erklärung "); + + assertXPath( + pXmlDoc, "/root/page[1]/body/txt[16]/SwParaPortion/SwLineLayout[1]", "portion", + u"Jeder ist bei der Ausübung seiner Rechte und Freiheiten nur den Beschränkungen unterwor"); + assertXPath(pXmlDoc, "/root/page[1]/body/txt[16]/SwParaPortion/SwLineLayout[1]/SwHyphPortion", + 1); + + // "smart" justification: better word spacing by shrinking + // This ended with "Achtung", not "Achtung der" + + assertXPath(pXmlDoc, "/root/page[1]/body/txt[16]/SwParaPortion/SwLineLayout[2]", "portion", + u"fen, die das Gesetz ausschließlich zu dem Zweck vorsieht, die Anerkennung und " + u"Achtung der "); + + // "smart" hyphenation: enabled hyphenation by shrinking ("Grund-sätzen") + // compound-based "smart" hyphenations keeps it (analysis: "Grund|sätzen") + // This wasn't hyphenated before + + assertXPath(pXmlDoc, "/root/page[1]/body/txt[17]/SwParaPortion/SwLineLayout[1]", "portion", + u"Diese Rechte und Freiheiten dürfen in keinem Fall im Widerspruch zu den Zielen " + u"und Grund"); + assertXPath(pXmlDoc, "/root/page[1]/body/txt[17]/SwParaPortion/SwLineLayout[1]/SwHyphPortion", + 1); + + // "smart" justification: better word spacing by shrinking + // This ended with "oder", not "oder eine" + + assertXPath(pXmlDoc, "/root/page[1]/body/txt[19]/SwParaPortion/SwLineLayout[2]", "portion", + u"eine Gruppe oder eine Person irgendein Recht begründet, eine Tätigkeit auszuüben " + u"oder eine "); + + assertXPath(pXmlDoc, "/root/page[1]/body/txt/SwParaPortion/SwLineLayout/SwHyphPortion", 7); +} + +// check smart hyphenation and enabled compound-based smart hyphenation +CPPUNIT_TEST_FIXTURE(SwLayoutWriter3, testTdf173389_smart_hyphenation_de) +{ + uno::Reference xHyphenator = LinguMgr::GetHyphenator(); + if (!xHyphenator->hasLocale(lang::Locale(u"de"_ustr, u"DE"_ustr, OUString()))) + return; + + // compound-based hyphenation needs Hunspell morphological analysis + uno::Reference xSpell = LinguMgr::GetSpellChecker(); + LanguageType eLang + = LanguageTag::convertToLanguageType(lang::Locale(u"de"_ustr, u"DE"_ustr, OUString())); + if (!xSpell.is() || !xSpell->hasLanguage(static_cast(eLang))) + return; + + createSwDoc("tdf173389_smart_hyphenation_de.odt"); + // Ensure that all text portions are calculated before testing. + SwViewShell* pViewShell = getSwDoc()->getIDocumentLayoutAccess().GetCurrentViewShell(); + + CPPUNIT_ASSERT(pViewShell); + pViewShell->Reformat(); + + xmlDocUniquePtr pXmlDoc = parseLayoutDump(); + + // 30 hyphenations on 5 pages using non-compound-based smart hyphenation + // This was 35 without smart hyphenation + + // 9 hyphenations on page 1 + + // "smart" hyphenation: disabled hyphenation of "geführt" by shrinking + // This was "ge-führt" + + assertXPath(pXmlDoc, "/root/page[1]/body/txt[4]/SwParaPortion/SwLineLayout[1]", "portion", + u"da die Nichtanerkennung und Verachtung der Menschenrechte zu Akten der Barbarei " + u"geführt "); + + // "smart" hyphenation: disabled hyphenation of "damit" by shrinking + // This was "da-mit" + + assertXPath(pXmlDoc, "/root/page[1]/body/txt[5]/SwParaPortion/SwLineLayout[1]", "portion", + u"da es notwendig ist, die Menschenrechte durch die Herrschaft des Rechtes zu " + u"schützen, damit "); + + // compound-based "smart" hyphenation of the compound "Unter|drückung" + // This is hyphenated as "Unter-drückung", not "Un-terdrückung" + + assertXPath(pXmlDoc, "/root/page[1]/body/txt[5]/SwParaPortion/SwLineLayout[2]", "portion", + u"der Mensch nicht gezwungen wird, als letztes Mittel zum Aufstand gegen Tyrannei " + u"und Unter"); + assertXPath(pXmlDoc, "/root/page[1]/body/txt[5]/SwParaPortion/SwLineLayout[2]/SwHyphPortion", + 1); + + // "smart" hyphenation: disabled hyphenation of "Nationen" by shrinking + // This was "Natio-nen" + + assertXPath(pXmlDoc, "/root/page[1]/body/txt[6]/SwParaPortion/SwLineLayout[1]", "portion", + u"da es notwendig ist, die Entwicklung freundschaftlicher Beziehungen zwischen den " + u"Nationen "); + + assertXPath(pXmlDoc, "/root/page[1]/body/txt[7]/SwParaPortion/SwLineLayout[1]", "portion", + u"da die Völker der Vereinten Nationen in der Charta ihren Glauben an die " + u"grundlegenden Men"); + assertXPath(pXmlDoc, "/root/page[1]/body/txt[7]/SwParaPortion/SwLineLayout[1]/SwHyphPortion", + 1); + + // compound-based "smart" hyphenation of the compound "Gleich|berechtigung" + // This is hyphenated as "Gleichberechti-gung", not "Gleichberech-tigung" + + assertXPath(pXmlDoc, "/root/page[1]/body/txt[7]/SwParaPortion/SwLineLayout[2]", "portion", + u"schenrechte, an die Würde und den Wert der menschlichen Person und an die " + u"Gleichberechti"); + assertXPath(pXmlDoc, "/root/page[1]/body/txt[7]/SwParaPortion/SwLineLayout[2]/SwHyphPortion", + 1); + + // "smart" hyphenation: disabled hyphenation of "Nationen" by shrinking + // This was "Natio-nen" + + assertXPath(pXmlDoc, "/root/page[1]/body/txt[8]/SwParaPortion/SwLineLayout[1]", "portion", + u"da die Mitgliedstaaten sich verpflichtet haben, in Zusammenarbeit mit den " + u"Vereinten Nationen "); + + assertXPath( + pXmlDoc, "/root/page[1]/body/txt[8]/SwParaPortion/SwLineLayout[2]", "portion", + u"auf die allgemeine Achtung und Einhaltung der Menschenrechte und Grundfreiheiten hinzu"); + assertXPath(pXmlDoc, "/root/page[1]/body/txt[8]/SwParaPortion/SwLineLayout[2]/SwHyphPortion", + 1); + + // "smart" justification: better word spacing by shrinking + // This ended with "für", not "für die" + + assertXPath(pXmlDoc, "/root/page[1]/body/txt[9]/SwParaPortion/SwLineLayout[1]", "portion", + u"da ein gemeinsames Verständnis dieser Rechte und Freiheiten von größter " + u"Wichtigkeit für die "); + + // "smart" hyphenation: disabled hyphenation of "nationale" by shrinking + // This was "natio-nale" + + assertXPath(pXmlDoc, "/root/page[1]/body/txt[11]/SwParaPortion/SwLineLayout[4]", "portion", + u"die Achtung vor diesen Rechten und Freiheiten zu fördern und durch " + u"fortschreitende nationale "); + + // follow-up to the "smart" hyphenation in the previous line + // This was "Ein-haltung", now "Einhal-tung" + + assertXPath( + pXmlDoc, "/root/page[1]/body/txt[11]/SwParaPortion/SwLineLayout[5]", "portion", + u"und internationale Maßnahmen ihre allgemeine und tatsächliche Anerkennung und Einhal"); + assertXPath(pXmlDoc, "/root/page[1]/body/txt[11]/SwParaPortion/SwLineLayout[5]/SwHyphPortion", + 1); + + assertXPath(pXmlDoc, "/root/page[1]/body/txt[15]/SwParaPortion/SwLineLayout[1]", "portion", + u"Jeder hat Anspruch auf die in dieser Erklärung verkündeten Rechte und Freiheiten " + u"ohne ir"); + assertXPath(pXmlDoc, "/root/page[1]/body/txt[15]/SwParaPortion/SwLineLayout[1]/SwHyphPortion", + 1); + + assertXPath(pXmlDoc, "/root/page[1]/body/txt[15]/SwParaPortion/SwLineLayout[2]", "portion", + u"gendeinen Unterschied, etwa nach Rasse, Hautfarbe, Geschlecht, Sprache, " + u"Religion, politi"); + assertXPath(pXmlDoc, "/root/page[1]/body/txt[15]/SwParaPortion/SwLineLayout[2]/SwHyphPortion", + 1); + + // "smart" justification: better word spacing by shrinking + // This ended with "Geburt", not "Geburt oder" + + assertXPath(pXmlDoc, "/root/page[1]/body/txt[15]/SwParaPortion/SwLineLayout[3]", "portion", + u"scher oder sonstiger Überzeugung, nationaler oder sozialer Herkunft, Vermögen, " + u"Geburt oder "); + + assertXPath( + pXmlDoc, "/root/page[1]/body/txt[16]/SwParaPortion/SwLineLayout[2]", "portion", + u"oder internationalen Stellung des Landes oder Gebiets, dem eine Person angehört, gleich"); + assertXPath(pXmlDoc, "/root/page[1]/body/txt[16]/SwParaPortion/SwLineLayout[2]/SwHyphPortion", + 1); + + // "smart" justification: better word spacing by shrinking + // This ended with "besitzt", not "besitzt oder" + + assertXPath(pXmlDoc, "/root/page[1]/body/txt[16]/SwParaPortion/SwLineLayout[3]", "portion", + u"gültig ob dieses unabhängig ist, unter Treuhandschaft steht, keine " + u"Selbstregierung besitzt oder "); + + // compound-based "smart" hyphenation of the compound "Sklaven|handel" + // This is hyphenated as "Sklaven-handel" (not "Sklavenhan-del" like with + // non-compound-based hyphenation) + + assertXPath(pXmlDoc, "/root/page[1]/body/txt[20]/SwParaPortion/SwLineLayout[1]", "portion", + u"Niemand darf in Sklaverei oder Leibeigenschaft gehalten werden; Sklaverei und " + u"Sklaven"); + assertXPath(pXmlDoc, "/root/page[1]/body/txt[20]/SwParaPortion/SwLineLayout[1]/SwHyphPortion", + 1); + + assertXPath(pXmlDoc, "/root/page[1]/body/txt/SwParaPortion/SwLineLayout/SwHyphPortion", 9); + + // delete page 1 to update hyphenation on the next page + + SwWrtShell* const pWrtShell = getSwDocShell()->GetWrtShell(); + pWrtShell->Right(SwCursorSkipMode::Chars, /*bSelect=*/true, 3170, /*bBasicCall=*/false); + pWrtShell->Delete(); + + // 7 hyphenations on page 2 + + pViewShell->Reformat(); + pXmlDoc = parseLayoutDump(); + + assertXPath( + pXmlDoc, "/root/page[1]/body/txt[6]/SwParaPortion/SwLineLayout[1]", "portion", + u"Alle Menschen sind vor dem Gesetz gleich und haben ohne Unterschied Anspruch auf glei"); + assertXPath(pXmlDoc, "/root/page[1]/body/txt[6]/SwParaPortion/SwLineLayout[1]/SwHyphPortion", + 1); + + assertXPath( + pXmlDoc, "/root/page[1]/body/txt[6]/SwParaPortion/SwLineLayout[2]", "portion", + u"chen Schutz durch das Gesetz. Alle haben Anspruch auf gleichen Schutz gegen jede Diskri"); + assertXPath(pXmlDoc, "/root/page[1]/body/txt[6]/SwParaPortion/SwLineLayout[2]/SwHyphPortion", + 1); + + // "smart" hyphenation: disabled hyphenation of "derartigen" by shrinking + // This was "derarti-gen" + + assertXPath(pXmlDoc, "/root/page[1]/body/txt[6]/SwParaPortion/SwLineLayout[3]", "portion", + u"minierung, die gegen diese Erklärung verstößt, und gegen jede Aufhetzung zu " + u"einer derartigen "); + + // "smart" hyphenation: disabled hyphenation of "Gesetz" by shrinking + // This was "Ge-setz" + + assertXPath(pXmlDoc, "/root/page[1]/body/txt[8]/SwParaPortion/SwLineLayout[2]", "portion", + u"Gerichten gegen Handlungen, durch die seine ihm nach der Verfassung oder nach " + u"dem Gesetz "); + + // "smart" hyphenation: disabled hyphenation of "erhobenen" by shrinking + // This was "erhobe-nen" + + assertXPath(pXmlDoc, "/root/page[1]/body/txt[12]/SwParaPortion/SwLineLayout[1]", "portion", + u"Jeder hat bei der Feststellung seiner Rechte und Pflichten sowie bei einer gegen " + u"ihn erhobenen "); + + // follow-up to the "smart" hyphenation in the previous line + // This was "öf-fentliches", now "öffentli-ches" + + assertXPath(pXmlDoc, "/root/page[1]/body/txt[12]/SwParaPortion/SwLineLayout[2]", "portion", + u"strafrechtlichen Beschuldigung in voller Gleichheit Anspruch auf ein gerechtes " + u"und öffentli"); + assertXPath(pXmlDoc, "/root/page[1]/body/txt[12]/SwParaPortion/SwLineLayout[2]/SwHyphPortion", + 1); + + // "smart" justification: better word spacing by shrinking + // This ended with "für", not "für seine" + + assertXPath(pXmlDoc, "/root/page[1]/body/txt[14]/SwParaPortion/SwLineLayout[2]", "portion", + u"zu gelten, solange seine Schuld nicht in einem öffentlichen Verfahren, in dem er " + u"alle für seine "); + + assertXPath( + pXmlDoc, "/root/page[1]/body/txt[15]/SwParaPortion/SwLineLayout[3]", "portion", + u"keine schwerere Strafe als die zum Zeitpunkt der Begehung der strafbaren Handlung ange"); + assertXPath(pXmlDoc, "/root/page[1]/body/txt[15]/SwParaPortion/SwLineLayout[3]/SwHyphPortion", + 1); + + // "smart" justification: better word spacing by shrinking + // This ended with "Wohnung", not "Wohnung und" + + assertXPath(pXmlDoc, "/root/page[1]/body/txt[17]/SwParaPortion/SwLineLayout[1]", "portion", + u"Niemand darf willkürlichen Eingriffen in sein Privatleben, seine Familie, seine " + u"Wohnung und "); + + // follow-up to the "smart" justification in the previous line + + assertXPath(pXmlDoc, "/root/page[1]/body/txt[17]/SwParaPortion/SwLineLayout[2]", "portion", + u"seinen Schriftverkehr oder Beeinträchtigungen seiner Ehre und seines Rufes " + u"ausgesetzt wer"); + assertXPath(pXmlDoc, "/root/page[1]/body/txt[17]/SwParaPortion/SwLineLayout[2]/SwHyphPortion", + 1); + + // follow-up to the "smart" justification in the previous line + // This was "Beeinträch-tigungen", not "Beeinträchtigun-gen". + + assertXPath(pXmlDoc, "/root/page[1]/body/txt[17]/SwParaPortion/SwLineLayout[3]", "portion", + u"den. Jeder hat Anspruch auf rechtlichen Schutz gegen solche Eingriffe oder " + u"Beeinträchtigun"); + assertXPath(pXmlDoc, "/root/page[1]/body/txt[17]/SwParaPortion/SwLineLayout[3]/SwHyphPortion", + 1); + + // "smart" hyphenation: enabled hyphenation by shrinking ("wer-den") + // This wasn't hyphenated before, resulting in exceeding maximum word spacing + + assertXPath(pXmlDoc, "/root/page[1]/body/txt[26]/SwParaPortion/SwLineLayout[1]", "portion", + u"Niemandem darf seine Staatsangehörigkeit willkürlich entzogen noch das Recht " + u"versagt wer"); + assertXPath(pXmlDoc, "/root/page[1]/body/txt[26]/SwParaPortion/SwLineLayout[1]/SwHyphPortion", + 1); + + assertXPath(pXmlDoc, "/root/page[1]/body/txt/SwParaPortion/SwLineLayout/SwHyphPortion", 7); + + // delete page 2 to update hyphenation on the next page + + pWrtShell->Right(SwCursorSkipMode::Chars, /*bSelect=*/false, 2734, /*bBasicCall=*/false); + pWrtShell->Left(SwCursorSkipMode::Chars, /*bSelect=*/true, 2734, /*bBasicCall=*/false); + pWrtShell->Delete(); + + // 7 hyphenations on page 3 + + pViewShell->Reformat(); + pXmlDoc = parseLayoutDump(); + + // "smart" hyphenation: enabled hyphenation by shrinking ("Staats-angehörigkeit") + // compound-based "smart" hyphenation keeps it (analysis: "Staats|angehörigkeit") + // This wasn't hyphenated before + + assertXPath( + pXmlDoc, "/root/page[1]/body/txt[1]/SwParaPortion/SwLineLayout[1]", "portion", + u"Heiratsfähige Frauen und Männer haben ohne Beschränkung auf Grund der Rasse, der Staats"); + assertXPath(pXmlDoc, "/root/page[1]/body/txt[1]/SwParaPortion/SwLineLayout[1]/SwHyphPortion", + 1); + + // smart hyphenation: better spacing by shrinking + // This was "innezu-haben" (now "innezuha-ben") + + assertXPath(pXmlDoc, "/root/page[1]/body/txt[5]/SwParaPortion/SwLineLayout[1]", "portion", + u"Jeder hat das Recht, sowohl allein als auch in Gemeinschaft mit anderen Eigentum " + u"innezuha"); + assertXPath(pXmlDoc, "/root/page[1]/body/txt[5]/SwParaPortion/SwLineLayout[1]/SwHyphPortion", + 1); + + assertXPath(pXmlDoc, "/root/page[1]/body/txt[8]/SwParaPortion/SwLineLayout[2]", "portion", + u"die Freiheit ein, seine Religion oder Überzeugung zu wechseln, sowie die " + u"Freiheit, seine Re"); + assertXPath(pXmlDoc, "/root/page[1]/body/txt[8]/SwParaPortion/SwLineLayout[2]/SwHyphPortion", + 1); + + // "smart" justification: better word spacing by shrinking + // This ended with "Recht", not "Recht schließt" + + assertXPath(pXmlDoc, "/root/page[1]/body/txt[10]/SwParaPortion/SwLineLayout[1]", "portion", + u"Jeder hat das Recht auf Meinungsfreiheit und freie Meinungsäußerung; dieses " + u"Recht schließt "); + + // "smart" hyphenation: better word spacing by shrinking + // This was "zu-sammenzuschließen" (now "zusam-menzuschließen"). + + assertXPath( + pXmlDoc, "/root/page[1]/body/txt[12]/SwParaPortion/SwLineLayout[1]", "portion", + u"Alle Menschen haben das Recht, sich friedlich zu versammeln und zu Vereinigungen zusam"); + assertXPath(pXmlDoc, "/root/page[1]/body/txt[12]/SwParaPortion/SwLineLayout[1]/SwHyphPortion", + 1); + + assertXPath(pXmlDoc, "/root/page[1]/body/txt[15]/SwParaPortion/SwLineLayout[1]", "portion", + u"Jeder hat das Recht, an der Gestaltung der öffentlichen Angelegenheiten seines " + u"Landes un"); + assertXPath(pXmlDoc, "/root/page[1]/body/txt[15]/SwParaPortion/SwLineLayout[1]/SwHyphPortion", + 1); + + // "smart" hyphenation: disabled hyphenation of "darauf" by shrinking + // This was "dar-auf" + + assertXPath(pXmlDoc, "/root/page[1]/body/txt[19]/SwParaPortion/SwLineLayout[1]", "portion", + u"Jeder hat als Mitglied der Gesellschaft das Recht auf soziale Sicherheit und " + u"Anspruch darauf, "); + + assertXPath( + pXmlDoc, "/root/page[1]/body/txt[19]/SwParaPortion/SwLineLayout[2]", "portion", + u"durch innerstaatliche Maßnahmen und internationale Zusammenarbeit sowie unter Berück"); + assertXPath(pXmlDoc, "/root/page[1]/body/txt[19]/SwParaPortion/SwLineLayout[2]/SwHyphPortion", + 1); + + // smart hyphenation: better spacing by shrinking + // compound-based hyphenation keeps the same break point (analysis: "Arbeits|bedingungen") + // This was "Ar-beitsbedingungen" (now "Arbeits-bedingungen") + + assertXPath(pXmlDoc, "/root/page[1]/body/txt[21]/SwParaPortion/SwLineLayout[1]", "portion", + u"Jeder hat das Recht auf Arbeit, auf freie Berufswahl, auf gerechte und " + u"befriedigende Arbeits"); + assertXPath(pXmlDoc, "/root/page[1]/body/txt[21]/SwParaPortion/SwLineLayout[1]/SwHyphPortion", + 1); + + assertXPath(pXmlDoc, "/root/page[1]/body/txt/SwParaPortion/SwLineLayout/SwHyphPortion", 7); + + // delete page 3 to update hyphenation on the next page + + pWrtShell->Right(SwCursorSkipMode::Chars, /*bSelect=*/false, 2945, /*bBasicCall=*/false); + pWrtShell->Left(SwCursorSkipMode::Chars, /*bSelect=*/true, 2945, /*bBasicCall=*/false); + pWrtShell->Delete(); + + // 7 hyphenations on page 4 + + pViewShell->Reformat(); + pXmlDoc = parseLayoutDump(); + + // smart hyphenation: better spacing by shrinking + // This was "Be-grenzung" (now "Begren-zung") + + assertXPath(pXmlDoc, "/root/page[1]/body/txt[1]/SwParaPortion/SwLineLayout[1]", "portion", + u"Jeder hat das Recht auf Erholung und Freizeit und insbesondere auf eine " + u"vernünftige Begren"); + assertXPath(pXmlDoc, "/root/page[1]/body/txt[1]/SwParaPortion/SwLineLayout[1]/SwHyphPortion", + 1); + + assertXPath( + pXmlDoc, "/root/page[1]/body/txt[6]/SwParaPortion/SwLineLayout[1]", "portion", + u"Jeder hat das Recht auf Bildung. Die Bildung ist unentgeltlich, zum mindesten der Grund"); + assertXPath(pXmlDoc, "/root/page[1]/body/txt[6]/SwParaPortion/SwLineLayout[1]/SwHyphPortion", + 1); + + // "smart" hyphenation: enabled hyphenation by shrinking ("Hoch-schulunterricht") + // compound-based "smart" hyphenations keeps it (analysis: "Hoch|schul|unterricht") + // This wasn't hyphenated before + + assertXPath( + pXmlDoc, "/root/page[1]/body/txt[6]/SwParaPortion/SwLineLayout[3]", "portion", + u"Fach- und Berufsschulunterricht müssen allgemein verfügbar gemacht werden, und der Hoch"); + assertXPath(pXmlDoc, "/root/page[1]/body/txt[6]/SwParaPortion/SwLineLayout[3]/SwHyphPortion", + 1); + + assertXPath(pXmlDoc, "/root/page[1]/body/txt[7]/SwParaPortion/SwLineLayout[1]", "portion", + u"Die Bildung muß auf die volle Entfaltung der menschlichen Persönlichkeit und auf " + u"die Stär"); + assertXPath(pXmlDoc, "/root/page[1]/body/txt[7]/SwParaPortion/SwLineLayout[1]/SwHyphPortion", + 1); + + // "smart" hyphenation: better spacing by shrinking + // This wasn't hyphenated before (now "teil-zuhaben") + + assertXPath(pXmlDoc, "/root/page[1]/body/txt[10]/SwParaPortion/SwLineLayout[2]", "portion", + u"Künsten zu erfreuen und am wissenschaftlichen Fortschritt und dessen " + u"Errungenschaften teil"); + assertXPath(pXmlDoc, "/root/page[1]/body/txt[10]/SwParaPortion/SwLineLayout[2]/SwHyphPortion", + 1); + + // "smart" hyphenation: disabled hyphenation of "Erklärung" by shrinking + // This was "Erklä-rung" + + assertXPath(pXmlDoc, "/root/page[1]/body/txt[13]/SwParaPortion/SwLineLayout[1]", "portion", + u"Jeder hat Anspruch auf eine soziale und internationale Ordnung, in der die in " + u"dieser Erklärung "); + + assertXPath( + pXmlDoc, "/root/page[1]/body/txt[16]/SwParaPortion/SwLineLayout[1]", "portion", + u"Jeder ist bei der Ausübung seiner Rechte und Freiheiten nur den Beschränkungen unterwor"); + assertXPath(pXmlDoc, "/root/page[1]/body/txt[16]/SwParaPortion/SwLineLayout[1]/SwHyphPortion", + 1); + + // "smart" justification: better word spacing by shrinking + // This ended with "Achtung", not "Achtung der" + + assertXPath(pXmlDoc, "/root/page[1]/body/txt[16]/SwParaPortion/SwLineLayout[2]", "portion", + u"fen, die das Gesetz ausschließlich zu dem Zweck vorsieht, die Anerkennung und " + u"Achtung der "); + + // "smart" hyphenation: enabled hyphenation by shrinking ("Grund-sätzen") + // compound-based "smart" hyphenations keeps it (analysis: "Grund|sätzen") + // This wasn't hyphenated before + + assertXPath(pXmlDoc, "/root/page[1]/body/txt[17]/SwParaPortion/SwLineLayout[1]", "portion", + u"Diese Rechte und Freiheiten dürfen in keinem Fall im Widerspruch zu den Zielen " + u"und Grund"); + assertXPath(pXmlDoc, "/root/page[1]/body/txt[17]/SwParaPortion/SwLineLayout[1]/SwHyphPortion", + 1); + + // "smart" justification: better word spacing by shrinking + // This ended with "oder", not "oder eine" + + assertXPath(pXmlDoc, "/root/page[1]/body/txt[19]/SwParaPortion/SwLineLayout[2]", "portion", + u"eine Gruppe oder eine Person irgendein Recht begründet, eine Tätigkeit auszuüben " + u"oder eine "); + + assertXPath(pXmlDoc, "/root/page[1]/body/txt/SwParaPortion/SwLineLayout/SwHyphPortion", 7); +} + CPPUNIT_TEST_FIXTURE(SwLayoutWriter3, testTdf158333) { createSwDoc("tdf130088.docx"); From 24f40c4b11185d559fd9b41275cbe911cb0bae49 Mon Sep 17 00:00:00 2001 From: Mike Kaganski Date: Tue, 22 Sep 2026 11:27:24 +0500 Subject: [PATCH 075/289] tdf#163272 sw,drawinglayer,vcl: give anchored content its own /Lang With Tagged PDF on, a paragraph in a language other than the document's gets /Lang on its structure element. What is anchored in the paragraph is tagged inside that same element and inherits the attribute, so a frame's text and its description would be declared the paragraph's language. 0d2d9e656d87647f904f1a463ed9b879c2bfb10c (tdf#163272 sw: give a paragraph its own /Lang, 2026-09-21) avoided that by putting no /Lang on such a paragraph, on a check of one node of a text frame that can cover several. Its text still carried the language, on a Span, while what was anchored in it specified none and inherited the document's. In a German document that declared a shape's English text German. See https://gerrit.collaboraoffice.com/c/online/+/13117/comment/89a7866d_907a2957/ The paragraph specifies its own language now, and a frame anchored in it no longer inherits it. A Figure, a Formula and a frame's Division specify the document's where the paragraph's differs, which is what the frame's own paragraphs are measured against. A drawing shape's text is tagged by drawinglayer, which takes the locale of the drawn portions and specifies it where they agree; such a shape is nested in its anchor paragraph in Writer and in no such paragraph elsewhere, so there is nothing to compare against. A drawing shape's own element specifies the document's language too. svx anchors it under the anchor paragraph, drawinglayer opens it there, and it carries the shape's title and description. Without the attribute, a described shape in a paragraph that specifies one would have its description declared the paragraph's language, and its text likewise where the portions disagree. testParagraphLanguage compared a structure type against a language and quoted no text, so nothing identified the words affected. It lists every element holding text or a description now, against the language it specifies, an entry reading "P de-DE: Ein deutscher Absatz mit einem Bild."; one specifying none is listed without a language, so correct inheritance is asserted too. PDFiumPageObject gained getMarkedContentID to join a page object's text to its element. Signed-off-by: Mike Kaganski Change-Id: I1eecf0b56f09fc6d144894910a9037d89884dd3b Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/13239 Reviewed-by: Miklos Vajna Tested-by: Jenkins CPCI (cherry picked from commit 898a2e1b3a6fc07d7b43315b2f4781b32f1a20d3) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211609 Tested-by: Jenkins Reviewed-by: Xisco Fauli --- .../processor2d/vclmetafileprocessor2d.cxx | 55 ++++++++ include/vcl/filter/PDFiumLibrary.hxx | 2 + sw/qa/core/text/EnhancedPDFExportHelper.cxx | 121 ++++++++++++++---- sw/qa/core/text/data/paragraph-language.fodt | 7 +- .../core/text/EnhancedPDFExportHelper.cxx | 42 ++++-- vcl/qa/cppunit/PDFiumLibraryTest.cxx | 6 + vcl/source/pdf/PDFiumLibrary.cxx | 6 + 7 files changed, 201 insertions(+), 38 deletions(-) diff --git a/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx b/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx index ecdb9d310fb3..65956a51da37 100644 --- a/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx +++ b/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx @@ -27,6 +27,7 @@ #include #include #include +#include #include #include #include @@ -221,6 +222,39 @@ tools::Rectangle getPDFGraphicRect(const basegfx::B2DVector& rTranslate, sal_Int32(ceil(aCurrentRange.getMaxX())), sal_Int32(ceil(aCurrentRange.getMaxY()))); } +// the one language a paragraph's text is in, false once its portions disagree +bool getTextLanguage(const drawinglayer::primitive2d::Primitive2DContainer& rChildren, + LanguageType& rLanguage) +{ + for (const auto& rCandidate : rChildren) + { + if (const auto* pText + = dynamic_cast( + rCandidate.get())) + { + // a bullet, a tab and an empty line carry no locale, and would read as the UI's + if (pText->getLocale().Language.isEmpty()) + continue; + + const LanguageType eLanguage(LanguageTag(pText->getLocale()).getLanguageType()); + if (eLanguage == LANGUAGE_DONTKNOW) + continue; + if (rLanguage != LANGUAGE_DONTKNOW && rLanguage != eLanguage) + return false; + rLanguage = eLanguage; + } + else if (const auto* pGroup + = dynamic_cast( + rCandidate.get())) + { + if (!getTextLanguage(pGroup->getChildren(), rLanguage)) + return false; + } + } + + return true; +} + } // end of anonymous namespace namespace drawinglayer::processor2d @@ -1599,6 +1633,15 @@ void VclMetafileProcessor2D::processTextHierarchyParagraphPrimitive2D( mpPDFExtOutDevData->WrapBeginStructureElement(vcl::pdf::StructElement::Paragraph); } + // a run in another language would need an element of its own, so name only one + LanguageType eLanguage(LANGUAGE_DONTKNOW); + if (getTextLanguage(rParagraphPrimitive.getChildren(), eLanguage) + && eLanguage != LANGUAGE_DONTKNOW && eLanguage != LANGUAGE_NONE) + { + mpPDFExtOutDevData->SetStructureAttributeNumerical(vcl::pdf::PDFWriter::Language, + static_cast(eLanguage)); + } + // Process recursively and add MetaFile comment process(rParagraphPrimitive); mpMetaFile->AddAction(new MetaCommentAction(aCommentString)); @@ -2774,6 +2817,18 @@ void VclMetafileProcessor2D::processStructureTagPrimitive2D( mpPDFExtOutDevData->SetCurrentStructureElement(id); } mpPDFExtOutDevData->WrapBeginStructureElement(rTagElement); + // a title, a description and text that states no language are the document's + if (const css::lang::Locale& rLocale = mpPDFExtOutDevData->GetDocumentLocale(); + rStructureTagCandidate.GetAnchorStructureElementKey() != nullptr + && !rLocale.Language.isEmpty()) + { + const LanguageType eLanguage(LanguageTag(rLocale).getLanguageType()); + if (eLanguage != LANGUAGE_DONTKNOW && eLanguage != LANGUAGE_NONE) + { + mpPDFExtOutDevData->SetStructureAttributeNumerical( + vcl::pdf::PDFWriter::Language, static_cast(eLanguage)); + } + } switch (rTagElement) { case vcl::pdf::StructElement::H1: diff --git a/include/vcl/filter/PDFiumLibrary.hxx b/include/vcl/filter/PDFiumLibrary.hxx index 47e333b4f95b..deab99c59a49 100644 --- a/include/vcl/filter/PDFiumLibrary.hxx +++ b/include/vcl/filter/PDFiumLibrary.hxx @@ -226,6 +226,8 @@ public: virtual PDFPageObjectType getType() = 0; virtual OUString getText(std::unique_ptr const& pTextPage) = 0; + // what ties the object to a structure element within the page, or -1 + virtual int getMarkedContentID() = 0; virtual int getFormObjectCount() = 0; virtual std::unique_ptr getFormObject(int nIndex) = 0; diff --git a/sw/qa/core/text/EnhancedPDFExportHelper.cxx b/sw/qa/core/text/EnhancedPDFExportHelper.cxx index d51c63266cea..5ba09a358fb7 100644 --- a/sw/qa/core/text/EnhancedPDFExportHelper.cxx +++ b/sw/qa/core/text/EnhancedPDFExportHelper.cxx @@ -12,11 +12,13 @@ #include #include +#include #include #include #include #include +#include #include namespace @@ -31,6 +33,50 @@ public: } }; +// the text an element's own marked content holds, excluding any nested element's +OUString lcl_GetOwnText(vcl::pdf::PDFiumStructureElement& rElement, + const std::unordered_map& rTexts) +{ + OUString aText; + for (int i = 0; i < rElement.getNumberOfChildren(); ++i) + { + if (const int nMarkedContentID = rElement.getChildMarkedContentID(i); nMarkedContentID >= 0) + { + const auto it = rTexts.find(nMarkedContentID); + if (it != rTexts.end()) + aText += it->second; + } + } + return aText.trim(); +} + +// every element holding text or a description, in document order, with the language it +// specifies - one specifying none is listed without a language, and inherits its parent's +OUString lcl_CollectLanguages(vcl::pdf::PDFiumStructureElement& rElement, + const std::unordered_map& rTexts) +{ + OUString aLanguages; + OUString aLabel(lcl_GetOwnText(rElement, rTexts)); + if (aLabel.isEmpty()) + { + // a frame holds no text of its own, so its description identifies it + aLabel = rElement.getAltText(); + } + if (!aLabel.isEmpty()) + { + const OUString aLanguage(rElement.getLang()); + aLanguages = rElement.getType() + (aLanguage.isEmpty() ? u""_ustr : " " + aLanguage) + ": " + + aLabel + "\n"; + } + + for (int i = 0; i < rElement.getNumberOfChildren(); ++i) + { + if (const auto pChild = rElement.getChild(i)) + aLanguages += lcl_CollectLanguages(*pChild, rTexts); + } + return aLanguages; +} + CPPUNIT_TEST_FIXTURE(Test, testTdf171022) { createSwDoc("structure-destinations.fodt"); @@ -342,35 +388,64 @@ CPPUNIT_TEST_FIXTURE(Test, testParagraphLanguage) save(TestFilter::PDF_WRITER, { comphelper::makePropertyValue(u"FilterData"_ustr, aFilterData) }); + // the value the entries below state where they state one, and what the rest inherit vcl::filter::PDFDocument aDocument; - maTempFile.CloseStream(); CPPUNIT_ASSERT(aDocument.Read(*maTempFile.GetStream(StreamMode::READ))); + auto pCatalog = aDocument.GetCatalog(); + CPPUNIT_ASSERT(pCatalog); + CPPUNIT_ASSERT(pCatalog->GetDictionary()); + auto pDocumentLanguage = dynamic_cast( + pCatalog->GetDictionary()->LookupElement("Lang"_ostr)); + CPPUNIT_ASSERT(pDocumentLanguage); + CPPUNIT_ASSERT_EQUAL("en-US"_ostr, pDocumentLanguage->GetValue()); - // every structure element that names a language, sorted: they are emitted by object and - // not by document order - std::vector aLanguages; - for (auto* pObject : aDocument.GetObjects()) + auto pPdfDocument = parsePDFExport(vcl::pdf::PDFiumLibrary::get()); + auto pPdfPage = pPdfDocument->openPage(0); + CPPUNIT_ASSERT(pPdfPage); + auto pTextPage = pPdfPage->getTextPage(); + + // the text behind each marked content id, to identify the element covering it + std::unordered_map aTexts; + for (int i = 0; i < pPdfPage->getObjectCount(); ++i) { - auto pType = dynamic_cast(pObject->Lookup("S"_ostr)); - auto pLang - = dynamic_cast(pObject->Lookup("Lang"_ostr)); - if (!pType || !pLang) - continue; - - aLanguages.push_back(pType->GetValue() + "=" + pLang->GetValue()); + auto pObject = pPdfPage->getObject(i); + if (const int nMarkedContentID = pObject->getMarkedContentID(); nMarkedContentID >= 0) + aTexts[nMarkedContentID] += pObject->getText(pTextPage); } - std::sort(aLanguages.begin(), aLanguages.end()); - CPPUNIT_ASSERT_EQUAL(size_t(5), aLanguages.size()); - // the German words in an English paragraph, and the text of the paragraph holding a frame, - // which says nothing itself because what is anchored there hangs under it - CPPUNIT_ASSERT_EQUAL("Span=de-DE"_ostr, aLanguages[0]); - CPPUNIT_ASSERT_EQUAL("Span=de-DE"_ostr, aLanguages[1]); - // Without the fix this was de-DE: the run differs from its paragraph, not from the document - CPPUNIT_ASSERT_EQUAL("Span=en-US"_ostr, aLanguages[2]); - // and without it neither German paragraph named a language at all - CPPUNIT_ASSERT_EQUAL("Standard=de-DE"_ostr, aLanguages[3]); - CPPUNIT_ASSERT_EQUAL("Standard=de-DE"_ostr, aLanguages[4]); + auto pTree = pPdfPage->getStructureTree(); + CPPUNIT_ASSERT(pTree); + OUString aLanguages; + for (int i = 0; i < pTree->getNumberOfChildren(); ++i) + { + if (const auto pChild = pTree->getChild(i)) + aLanguages += lcl_CollectLanguages(*pChild, aTexts); + } + + CPPUNIT_ASSERT_EQUAL( + // specifies no language, being in the document's, so it inherits + u"P: A paragraph in the language of the document.\n" + "P de-DE: Ein Absatz, der ganz und gar deutsch ist.\n" + // the gap is where the German span took its words out of the paragraph + "P: English with in it.\n" + "Span de-DE: ein paar deutsche Worte\n" + "P de-DE: Ein deutscher Absatz mit darin.\n" + // the run differs from its paragraph, not from the document + "Span en-US: a few English words\n" + // a paragraph holding an anchor specified no language before, a Span carrying it + "P de-DE: Ein deutscher Absatz mit einem Rahmen.\n" + // the shape's own element, so its description does not inherit the paragraph's + "Div en-US: A shape described in the language of the document\n" + // the shape's text, tagged by drawinglayer since fr1 has no parent style + "P en-US: Text inside the frame.\n" + "P de-DE: Ein deutscher Absatz mit einem Textrahmen.\n" + // a Writer text frame, identified by its description + "Div en-US: Described in the language of the document\n" + // specifies none: the frame's Div specifies en-US for what it contains + "P: Text in a Writer frame.\n" + "P de-DE: Ein deutscher Absatz mit einem Bild.\n" + "Figure en-US: A picture described in the language of the document\n"_ustr, + aLanguages); } } diff --git a/sw/qa/core/text/data/paragraph-language.fodt b/sw/qa/core/text/data/paragraph-language.fodt index ad7c53e52e12..941855249155 100644 --- a/sw/qa/core/text/data/paragraph-language.fodt +++ b/sw/qa/core/text/data/paragraph-language.fodt @@ -17,6 +17,9 @@ + + + @@ -30,7 +33,9 @@ Ein Absatz, der ganz und gar deutsch ist. English with ein paar deutsche Worte in it. Ein deutscher Absatz mit a few English words darin. - Ein deutscher Absatz mit einem Rahmen.Text inside the frame. + Ein deutscher Absatz mit einem Rahmen.Text inside the frame.A shape described in the language of the document + Ein deutscher Absatz mit einem Textrahmen.Text in a Writer frame.Described in the language of the document + Ein deutscher Absatz mit einem Bild.iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mNk+M9QDwADhgGAWjR9awAAAABJRU5ErkJggg==A picture described in the language of the document diff --git a/sw/source/core/text/EnhancedPDFExportHelper.cxx b/sw/source/core/text/EnhancedPDFExportHelper.cxx index bd2c58adbf5d..870d4d0d1866 100644 --- a/sw/source/core/text/EnhancedPDFExportHelper.cxx +++ b/sw/source/core/text/EnhancedPDFExportHelper.cxx @@ -460,17 +460,26 @@ const SwTextNode* lcl_JumpedToNode(const SwEditShell& rSh, const SwPosition& rBe return rPoint == rBeforeJump ? nullptr : rPoint.GetNode().GetTextNode(); } -// the language a paragraph declares for itself, as against the one a run of text sets +// the language of a paragraph, as against the one a run of text sets LanguageType lcl_GetParagraphLanguage(const SwTextFrame& rFrame, const TypedWhichId nWhich) { - // what is anchored here is tagged inside the paragraph's element and would inherit a - // language put there; the node, not the frame, because a split paragraph is one element - if (!rFrame.GetTextNodeFirst()->GetAnchoredFlys().empty()) - return LANGUAGE_DONTKNOW; return rFrame.GetTextNodeForParaProps()->GetSwAttrSet().Get(nWhich).GetLanguage(); } +// the language an element inherits from the element around it +LanguageType lcl_GetInheritedLanguage(const SwFrame& rFrame, const SwEnhancedPDFState& rState) +{ + // a frame's element sits in its anchor's, and what the frame holds sits in the frame's + if (rFrame.IsFlyFrame()) + { + const SwFrame* pAnchor = static_cast(rFrame).GetAnchorFrame(); + if (auto pAnchorText = pAnchor ? pAnchor->DynCastTextFrame() : nullptr) + return lcl_GetParagraphLanguage(*pAnchorText, rState.m_nLanguageWhich); + } + return rState.m_eLanguageDefault; +} + // the language a run of text is measured against LanguageType lcl_GetEnclosingLanguage(const SwTextPaintInfo& rInf, const SwEnhancedPDFState& rState) { @@ -1050,17 +1059,14 @@ void SwTaggedPDFHelper::SetAttributes(vcl::pdf::StructElement eType) case vcl::pdf::StructElement::Formula: case vcl::pdf::StructElement::Figure: - bAltText = - bPlacement = - bWidth = - bHeight = - bBox = true; + bAltText = bLanguage = bPlacement = bWidth = bHeight = bBox = true; break; case vcl::pdf::StructElement::Division: if (pFrame->IsFlyFrame()) // this can be something else too { bAltText = true; + bLanguage = true; bBox = true; } break; @@ -1160,12 +1166,20 @@ void SwTaggedPDFHelper::SetAttributes(vcl::pdf::StructElement eType) mpPDFExtOutDevData->SetStructureAttributeNumerical( vcl::pdf::PDFWriter::TextIndent, nVal ); } - if (bLanguage && pFrame->IsTextFrame()) + if (bLanguage) { const SwEnhancedPDFState& rState(*mpPDFExtOutDevData->GetSwPDFState()); - const LanguageType nLanguage(lcl_GetParagraphLanguage( - static_cast(*pFrame), rState.m_nLanguageWhich)); - if (LANGUAGE_DONTKNOW != nLanguage && rState.m_eLanguageDefault != nLanguage) + LanguageType nLanguage(LANGUAGE_DONTKNOW); + if (auto pText = pFrame->DynCastTextFrame()) + nLanguage = lcl_GetParagraphLanguage(*pText, rState.m_nLanguageWhich); + else if (pFrame->IsFlyFrame()) + { + // a frame's contents measure against this + nLanguage = rState.m_eLanguageDefault; + } + + if (nLanguage != LANGUAGE_DONTKNOW + && nLanguage != lcl_GetInheritedLanguage(*pFrame, rState)) { mpPDFExtOutDevData->SetStructureAttributeNumerical( vcl::pdf::PDFWriter::Language, static_cast(nLanguage)); diff --git a/vcl/qa/cppunit/PDFiumLibraryTest.cxx b/vcl/qa/cppunit/PDFiumLibraryTest.cxx index 1bd2d3b1cd8a..2b84aa4bc49b 100644 --- a/vcl/qa/cppunit/PDFiumLibraryTest.cxx +++ b/vcl/qa/cppunit/PDFiumLibraryTest.cxx @@ -515,6 +515,12 @@ CPPUNIT_TEST_FIXTURE(PDFiumLibraryTest, testStructureTree) auto pPage = pDocument->openPage(0); CPPUNIT_ASSERT(pPage); + // the page object side of the marked content ids the structure tree references + bool bFoundFirstMark = false; + for (int i = 0; !bFoundFirstMark && i < pPage->getObjectCount(); ++i) + bFoundFirstMark = pPage->getObject(i)->getMarkedContentID() == 0; + CPPUNIT_ASSERT(bFoundFirstMark); + auto pTree = pPage->getStructureTree(); CPPUNIT_ASSERT(pTree); CPPUNIT_ASSERT_EQUAL(1, pTree->getNumberOfChildren()); diff --git a/vcl/source/pdf/PDFiumLibrary.cxx b/vcl/source/pdf/PDFiumLibrary.cxx index 3c8c6f4f0875..ba8cec5bf443 100644 --- a/vcl/source/pdf/PDFiumLibrary.cxx +++ b/vcl/source/pdf/PDFiumLibrary.cxx @@ -443,6 +443,7 @@ public: PDFPageObjectType getType() override; OUString getText(std::unique_ptr const& pTextPage) override; + int getMarkedContentID() override; int getFormObjectCount() override; std::unique_ptr getFormObject(int nIndex) override; @@ -1215,6 +1216,11 @@ OUString PDFiumPageObjectImpl::getText(std::unique_ptr const& rT return pTextPage->getText(mpPageObject); } +int PDFiumPageObjectImpl::getMarkedContentID() +{ + return FPDFPageObj_GetMarkedContentID(mpPageObject); +} + PDFPageObjectType PDFiumPageObjectImpl::getType() { return static_cast(FPDFPageObj_GetType(mpPageObject)); From 447298ce46feb9ea7c20a05cff93a9863ca4787a Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Tue, 22 Sep 2026 11:47:10 +0200 Subject: [PATCH 076/289] rename EditEngine::GetDepth to GetNumberingDepth to distinguish it from the various other depths we have. Change-Id: I2917ecc55baa90c375150d2066b98c6e5f384626 Signed-off-by: Noel Grandin Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/13272 Tested-by: Jenkins CPCI Reviewed-by: Mike Kaganski (cherry picked from commit dc56f1179397f2b6765cdf12a3d09a99fcf7e679) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211652 Reviewed-by: Xisco Fauli Tested-by: Jenkins --- editeng/source/editeng/editeng.cxx | 2 +- editeng/source/editeng/impedit2.cxx | 2 +- include/editeng/editeng.hxx | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/editeng/source/editeng/editeng.cxx b/editeng/source/editeng/editeng.cxx index 0ea714323b3d..428010540d05 100644 --- a/editeng/source/editeng/editeng.cxx +++ b/editeng/source/editeng/editeng.cxx @@ -2071,7 +2071,7 @@ EFieldInfo& EFieldInfo::operator= ( const EFieldInfo& rFldInfo ) return *this; } -sal_Int16 EditEngine::GetDepth(sal_Int32 nPara) const +sal_Int16 EditEngine::GetNumberingDepth(sal_Int32 nPara) const { return getImpl().GetOwner()->GetDepth(nPara); } diff --git a/editeng/source/editeng/impedit2.cxx b/editeng/source/editeng/impedit2.cxx index b1bdda2a62d5..98295c3e20d2 100644 --- a/editeng/source/editeng/impedit2.cxx +++ b/editeng/source/editeng/impedit2.cxx @@ -4751,7 +4751,7 @@ bool ImpEditEngine::isInEmptyClusterAtTheEnd(const ParaPortion& rPortion, bool b if (nCurrent == nPortion) { if (!bIsScaling && mpEditEngine->GetOwner() != nullptr) - return mpEditEngine->GetDepth(nCurrent) < 0; + return mpEditEngine->GetNumberingDepth(nCurrent) < 0; else return true; } diff --git a/include/editeng/editeng.hxx b/include/editeng/editeng.hxx index 680d6e1d069d..938a5478a7f1 100644 --- a/include/editeng/editeng.hxx +++ b/include/editeng/editeng.hxx @@ -631,7 +631,7 @@ public: const Size& GetLOKSpecialPaperSize() const; // Only useful when this is Outliner capable. - sal_Int16 GetDepth( sal_Int32 nPara ) const; + sal_Int16 GetNumberingDepth( sal_Int32 nPara ) const; // Only useful when this is Outliner capable. /// @returns state of the SdrCompatibilityFlag From b1cbe9451223a0d6177d71de4a365f1b19abd316 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= Date: Sun, 27 Sep 2026 16:30:03 +0000 Subject: [PATCH 077/289] don't create the BasicManager to warn about Basic on HTML export MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Check the library indexes for modules instead, which needs no library to be loaded. Signed-off-by: Caolán McNamara Change-Id: I49c7de85cc5f473bc69d3077fdf4ba6a77466adf Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/13648 Reviewed-by: Noel Grandin Tested-by: Jenkins CPCI (cherry picked from commit 0bb0a36eb420ff7aafcf0851ff7028b7377407a1) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211627 Tested-by: Jenkins Reviewed-by: Xisco Fauli --- sw/source/uibase/app/docsh.cxx | 21 +++------------------ 1 file changed, 3 insertions(+), 18 deletions(-) diff --git a/sw/source/uibase/app/docsh.cxx b/sw/source/uibase/app/docsh.cxx index 611cef415c28..baa018c80675 100644 --- a/sw/source/uibase/app/docsh.cxx +++ b/sw/source/uibase/app/docsh.cxx @@ -37,6 +37,7 @@ #include #include #include +#include #include #include #include @@ -637,25 +638,9 @@ bool SwDocShell::ConvertTo( SfxMedium& rMedium ) #if HAVE_FEATURE_SCRIPTING if( !officecfg::Office::Common::Filter::HTML::Export::Basic::get() && officecfg::Office::Common::Filter::HTML::Export::Warning::get() - && HasBasic() ) + && sfx2::DocumentMacroMode::containerHasBasicMacros( GetBasicContainer() ) ) { - uno::Reference< XLibraryContainer > xLibCont = GetBasicContainer(); - uno::Reference< XNameAccess > xLib; - const Sequence aNames = xLibCont->getElementNames(); - for(const OUString& rName : aNames) - { - Any aLib = xLibCont->getByName(rName); - aLib >>= xLib; - if(xLib.is()) - { - Sequence aModNames = xLib->getElementNames(); - if(aModNames.hasElements()) - { - SetError(WARN_SWG_HTML_NO_MACROS); - break; - } - } - } + SetError(WARN_SWG_HTML_NO_MACROS); } #endif } From 73c41f63cd4ca67670ef552c0d35014fd1cf5ce8 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Tue, 22 Sep 2026 12:14:26 +0200 Subject: [PATCH 078/289] Rename again in EditTextObject I messed up in commit e174028ce0335d702ecdad5eac823845a16e2f6d Author: Noel Grandin Date: Mon Sep 21 18:13:44 2026 +0200 Rename paragraph related types in EditTextObject. This is not the primary paragraph data structure for EditEngine. Add some commentary to reduce the chance of anyone else making this mistake. Rename typedef EditEngineParagraphs -> EditTextObjectParagraphs Rename class EditEngineParagraph -> EditTextObjectParagraph Change-Id: I810571cb61b944dd9d056145fe4cef14ba3e43bb Signed-off-by: Noel Grandin Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/13273 Tested-by: Jenkins CPCI Reviewed-by: Mike Kaganski (cherry picked from commit e8dde7d988a1768b68380ab95ba8fabb5feefc2e) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211653 Tested-by: Jenkins Reviewed-by: Xisco Fauli --- editeng/source/editeng/editobj.cxx | 58 ++++++++++++------------- editeng/source/editeng/editobj2.hxx | 16 +++---- editeng/source/editeng/fieldupdater.cxx | 12 ++--- editeng/source/editeng/impedit4.cxx | 4 +- include/editeng/editobj.hxx | 17 +++++--- 5 files changed, 56 insertions(+), 51 deletions(-) diff --git a/editeng/source/editeng/editobj.cxx b/editeng/source/editeng/editobj.cxx index 212ac18725b4..f807423768b2 100644 --- a/editeng/source/editeng/editobj.cxx +++ b/editeng/source/editeng/editobj.cxx @@ -87,14 +87,14 @@ const XParaPortion& XParaPortionList::operator [](size_t i) const return *maList[i]; } -EditEngineParagraph::EditEngineParagraph( SfxItemPool& rPool ) : +EditTextObjectParagraph::EditTextObjectParagraph( SfxItemPool& rPool ) : eFamily(SfxStyleFamily::Para), aParaAttribs(SfxItemSet::makeFixedSfxItemSet(rPool)) { } // the real Copy constructor is nonsense, since I have to work with another Pool! -EditEngineParagraph::EditEngineParagraph( const EditEngineParagraph& rCopyFrom, SfxItemPool& rPoolToUse ) : +EditTextObjectParagraph::EditTextObjectParagraph( const EditTextObjectParagraph& rCopyFrom, SfxItemPool& rPoolToUse ) : maText(rCopyFrom.maText), aStyle(rCopyFrom.aStyle), eFamily(rCopyFrom.eFamily), @@ -115,35 +115,35 @@ EditEngineParagraph::EditEngineParagraph( const EditEngineParagraph& rCopyFrom, mpWrongs.reset(rCopyFrom.GetWrongList()->Clone()); } -EditEngineParagraph::~EditEngineParagraph() +EditTextObjectParagraph::~EditTextObjectParagraph() { maCharAttribs.clear(); } -void EditEngineParagraph::NormalizeString( svl::SharedStringPool& rPool ) +void EditTextObjectParagraph::NormalizeString( svl::SharedStringPool& rPool ) { maText = rPool.intern(OUString(maText.getData())); } -OUString EditEngineParagraph::GetText() const +OUString EditTextObjectParagraph::GetText() const { rtl_uString* p = const_cast(maText.getData()); return OUString(p); } -sal_Int32 EditEngineParagraph::GetTextLen() const +sal_Int32 EditTextObjectParagraph::GetTextLen() const { const rtl_uString* p = maText.getData(); return p->length; } -void EditEngineParagraph::SetText( const OUString& rStr ) +void EditTextObjectParagraph::SetText( const OUString& rStr ) { maText = svl::SharedString(rStr.pData, nullptr); } -void EditEngineParagraph::dumpAsXml(xmlTextWriterPtr pWriter) const +void EditTextObjectParagraph::dumpAsXml(xmlTextWriterPtr pWriter) const { (void)xmlTextWriterStartElement(pWriter, BAD_CAST("ContentInfo")); (void)xmlTextWriterWriteAttribute(pWriter, BAD_CAST("style"), BAD_CAST(aStyle.toUtf8().getStr())); @@ -167,18 +167,18 @@ void EditEngineParagraph::dumpAsXml(xmlTextWriterPtr pWriter) const (void)xmlTextWriterEndElement(pWriter); } -const WrongList* EditEngineParagraph::GetWrongList() const +const WrongList* EditTextObjectParagraph::GetWrongList() const { return mpWrongs.get(); } -void EditEngineParagraph::SetWrongList( WrongList* p ) +void EditTextObjectParagraph::SetWrongList( WrongList* p ) { mpWrongs.reset(p); } // #i102062# -bool EditEngineParagraph::isWrongListEqual(const EditEngineParagraph& rCompare) const +bool EditTextObjectParagraph::isWrongListEqual(const EditTextObjectParagraph& rCompare) const { if(GetWrongList() == rCompare.GetWrongList()) return true; @@ -190,7 +190,7 @@ bool EditEngineParagraph::isWrongListEqual(const EditEngineParagraph& rCompare) } #if DEBUG_EDIT_ENGINE -void EditEngineParagraph::Dump() const +void EditTextObjectParagraph::Dump() const { cout << "--" << endl; cout << "text: '" << OUString(const_cast(maText.getData())) << "'" << endl; @@ -205,7 +205,7 @@ void EditEngineParagraph::Dump() const } #endif -bool EditEngineParagraph::Equals(const EditEngineParagraph& rCompare, bool bComparePool) const +bool EditTextObjectParagraph::Equals(const EditTextObjectParagraph& rCompare, bool bComparePool) const { return maText == rCompare.maText && aStyle == rCompare.aStyle && eFamily == rCompare.eFamily && aParaAttribs.Equals(rCompare.aParaAttribs, bComparePool) @@ -294,7 +294,7 @@ EditTextObject::EditTextObject( const EditTextObject& r ) maParagraphs.reserve(r.maParagraphs.size()); for (auto const& content : r.maParagraphs) - maParagraphs.push_back(std::unique_ptr(new EditEngineParagraph(*content, *mpPool))); + maParagraphs.push_back(std::unique_ptr(new EditTextObjectParagraph(*content, *mpPool))); } EditTextObject::EditTextObject( EditTextObject&& ) noexcept = default; @@ -319,7 +319,7 @@ void EditTextObject::NormalizeString( svl::SharedStringPool& rPool ) { for (auto const& content : maParagraphs) { - EditEngineParagraph& rInfo = *content; + EditTextObjectParagraph& rInfo = *content; rInfo.NormalizeString(rPool); } } @@ -330,7 +330,7 @@ std::vector EditTextObject::GetSharedStrings() const aSSs.reserve(maParagraphs.size()); for (auto const& content : maParagraphs) { - const EditEngineParagraph& rInfo = *content; + const EditTextObjectParagraph& rInfo = *content; aSSs.push_back(rInfo.GetSharedString()); } return aSSs; @@ -376,9 +376,9 @@ TextRotation EditTextObject::GetRotation() const return meRotation; } -EditEngineParagraph* EditTextObject::CreateAndInsertParagraph() +EditTextObjectParagraph* EditTextObject::CreateAndInsertParagraph() { - maParagraphs.push_back(std::unique_ptr(new EditEngineParagraph(*mpPool))); + maParagraphs.push_back(std::unique_ptr(new EditTextObjectParagraph(*mpPool))); return maParagraphs.back().get(); } @@ -471,7 +471,7 @@ bool EditTextObject::HasOnlineSpellErrors() const void EditTextObject::GetCharAttribs( sal_Int32 nPara, std::vector& rLst ) const { rLst.clear(); - const EditEngineParagraph& rC = *maParagraphs[nPara]; + const EditTextObjectParagraph& rC = *maParagraphs[nPara]; for (const XEditAttribute & rAttr : rC.maCharAttribs) { EECharAttrib aEEAttr(rAttr.GetStart(), rAttr.GetEnd(), rAttr.GetItem()); @@ -488,7 +488,7 @@ const SvxFieldItem* EditTextObject::GetField() const { if (maParagraphs.size() == 1) { - const EditEngineParagraph& rC = *maParagraphs[0]; + const EditTextObjectParagraph& rC = *maParagraphs[0]; if (rC.GetText().getLength() == 1) { size_t nAttribs = rC.maCharAttribs.size(); @@ -505,7 +505,7 @@ const SvxFieldItem* EditTextObject::GetField() const const SvxFieldData* EditTextObject::GetFieldData(sal_Int32 nPara, size_t nPos, sal_Int32 nType) const { - const EditEngineParagraph& rC = *maParagraphs[nPara]; + const EditTextObjectParagraph& rC = *maParagraphs[nPara]; if (nPos >= rC.maCharAttribs.size()) // URL position is out-of-bound. return nullptr; @@ -538,7 +538,7 @@ bool EditTextObject::HasField( sal_Int32 nType ) const size_t nParagraphs = maParagraphs.size(); for (size_t nPara = 0; nPara < nParagraphs; ++nPara) { - const EditEngineParagraph& rC = *maParagraphs[nPara]; + const EditTextObjectParagraph& rC = *maParagraphs[nPara]; size_t nAttrs = rC.maCharAttribs.size(); for (size_t nAttr = 0; nAttr < nAttrs; ++nAttr) { @@ -560,7 +560,7 @@ bool EditTextObject::HasField( sal_Int32 nType ) const const SfxItemSet& EditTextObject::GetParaAttribs(sal_Int32 nPara) const { - const EditEngineParagraph& rC = *maParagraphs[nPara]; + const EditTextObjectParagraph& rC = *maParagraphs[nPara]; return rC.GetParaAttribs(); } @@ -570,7 +570,7 @@ bool EditTextObject::RemoveCharAttribs( sal_uInt16 _nWhich ) for ( size_t nPara = maParagraphs.size(); nPara; ) { - EditEngineParagraph& rC = *maParagraphs[--nPara]; + EditTextObjectParagraph& rC = *maParagraphs[--nPara]; for (size_t nAttr = rC.maCharAttribs.size(); nAttr; ) { @@ -625,7 +625,7 @@ void EditTextObject::GetAllSections( std::vector& rAttrs ) con for (size_t nPara = 0; nPara < maParagraphs.size(); ++nPara) { aBorders.clear(); - const EditEngineParagraph& rC = *maParagraphs[nPara]; + const EditTextObjectParagraph& rC = *maParagraphs[nPara]; aBorders.push_back(0); aBorders.push_back(rC.GetText().getLength()); for (const XEditAttribute & rAttr : rC.maCharAttribs) @@ -671,7 +671,7 @@ void EditTextObject::GetAllSections( std::vector& rAttrs ) con std::vector::iterator itAttr = aAttrs.begin(); for (sal_Int32 nPara = 0; nPara < static_cast(maParagraphs.size()); ++nPara) { - const EditEngineParagraph& rC = *maParagraphs[nPara]; + const EditTextObjectParagraph& rC = *maParagraphs[nPara]; itAttr = std::find_if(itAttr, aAttrs.end(), FindByParagraph(nPara)); if (itAttr == aAttrs.end()) @@ -721,14 +721,14 @@ void EditTextObject::GetAllSections( std::vector& rAttrs ) con void EditTextObject::GetStyleSheet(sal_Int32 nPara, OUString& rName, SfxStyleFamily& rFamily) const { - const EditEngineParagraph& rC = *maParagraphs[nPara]; + const EditTextObjectParagraph& rC = *maParagraphs[nPara]; rName = rC.GetStyle(); rFamily = rC.GetFamily(); } void EditTextObject::SetStyleSheet(sal_Int32 nPara, const OUString& rName, const SfxStyleFamily& rFamily) { - EditEngineParagraph& rC = *maParagraphs[nPara]; + EditTextObjectParagraph& rC = *maParagraphs[nPara]; rC.SetStyle(rName); rC.SetFamily(rFamily); } @@ -742,7 +742,7 @@ bool EditTextObject::ImpChangeStyleSheets( for (size_t nPara = 0; nPara < nParagraphs; ++nPara) { - EditEngineParagraph& rC = *maParagraphs[nPara]; + EditTextObjectParagraph& rC = *maParagraphs[nPara]; if ( rC.GetFamily() == eOldFamily ) { if ( rC.GetStyle() == rOldName ) diff --git a/editeng/source/editeng/editobj2.hxx b/editeng/source/editeng/editobj2.hxx index 351bd7547ec1..50d5e1ab515f 100644 --- a/editeng/source/editeng/editobj2.hxx +++ b/editeng/source/editeng/editobj2.hxx @@ -112,7 +112,7 @@ public: double getSpacingScaleY() const { return mfSpacingScaleY; } }; -class EditEngineParagraph +class EditTextObjectParagraph { friend class EditTextObject; @@ -129,13 +129,13 @@ private: sal_Int16 mnNumberingStartValue { -1 }; bool mbNumberingRestart { false }; - EditEngineParagraph( SfxItemPool& rPool ); - EditEngineParagraph( const EditEngineParagraph& rCopyFrom, SfxItemPool& rPoolToUse ); + EditTextObjectParagraph( SfxItemPool& rPool ); + EditTextObjectParagraph( const EditTextObjectParagraph& rCopyFrom, SfxItemPool& rPoolToUse ); public: - ~EditEngineParagraph(); - EditEngineParagraph(const EditEngineParagraph&) = delete; - EditEngineParagraph& operator=(const EditEngineParagraph&) = delete; + ~EditTextObjectParagraph(); + EditTextObjectParagraph(const EditTextObjectParagraph&) = delete; + EditTextObjectParagraph& operator=(const EditTextObjectParagraph&) = delete; void NormalizeString( svl::SharedStringPool& rPool ); const svl::SharedString& GetSharedString() const { return maText;} @@ -159,10 +159,10 @@ public: const WrongList* GetWrongList() const; void SetWrongList( WrongList* p ); - bool Equals( const EditEngineParagraph& rCompare, bool bComparePool ) const; + bool Equals( const EditTextObjectParagraph& rCompare, bool bComparePool ) const; // #i102062# - bool isWrongListEqual(const EditEngineParagraph& rCompare) const; + bool isWrongListEqual(const EditTextObjectParagraph& rCompare) const; sal_Int16 GetNumberingDepth() const { return mnNumberingDepth; } void SetNumberingDepth(sal_Int16 nDepth) { mnNumberingDepth = nDepth; } diff --git a/editeng/source/editeng/fieldupdater.cxx b/editeng/source/editeng/fieldupdater.cxx index 35164b2af220..81447cc855f2 100644 --- a/editeng/source/editeng/fieldupdater.cxx +++ b/editeng/source/editeng/fieldupdater.cxx @@ -44,10 +44,10 @@ public: void updateTableFields(int nTab) { SfxItemPool* pPool = mrObj.GetPool(); - EditTextObject::EditEngineParagraphs& rContents = mrObj.GetParagraphs(); - for (std::unique_ptr & i : rContents) + EditTextObject::EditTextObjectParagraphs& rContents = mrObj.GetParagraphs(); + for (std::unique_ptr & i : rContents) { - EditEngineParagraph& rContent = *i; + EditTextObjectParagraph& rContent = *i; for (XEditAttribute & rAttr : rContent.GetCharAttribs()) { const SfxPoolItem* pItem = rAttr.GetItem(); @@ -71,10 +71,10 @@ public: void UpdatePageRelativeURLs(const std::function& rItemCallback) { - EditTextObject::EditEngineParagraphs& rContents = mrObj.GetParagraphs(); - for (std::unique_ptr & i : rContents) + EditTextObject::EditTextObjectParagraphs& rContents = mrObj.GetParagraphs(); + for (std::unique_ptr & i : rContents) { - EditEngineParagraph& rContent = *i; + EditTextObjectParagraph& rContent = *i; for (XEditAttribute & rAttr : rContent.GetCharAttribs()) { const SfxPoolItem* pItem = rAttr.GetItem(); diff --git a/editeng/source/editeng/impedit4.cxx b/editeng/source/editeng/impedit4.cxx index 83f29cc656c8..f1450560c27a 100644 --- a/editeng/source/editeng/impedit4.cxx +++ b/editeng/source/editeng/impedit4.cxx @@ -1227,7 +1227,7 @@ EditTextObject ImpEditEngine::CreateTextObject( EditSelection aSel, SfxItemPool* nEndPos = aSel.Max().GetIndex(); - EditEngineParagraph *pC = aTxtObj.CreateAndInsertParagraph(); + EditTextObjectParagraph *pC = aTxtObj.CreateAndInsertParagraph(); // The paragraph attributes ... pC->GetParaAttribs().Set( pNode->GetContentAttribs().GetItems() ); @@ -1399,7 +1399,7 @@ EditSelection ImpEditEngine::InsertTextObject( const EditTextObject& rTextObject for (sal_Int32 n = 0; n < nContents; ++n, ++nPara) { - const EditEngineParagraph* pC = rTextObject.GetParagraphs()[n].get(); + const EditTextObjectParagraph* pC = rTextObject.GetParagraphs()[n].get(); bool bNewContent = aPaM.GetNode()->Len() == 0; const sal_Int32 nStartPos = aPaM.GetIndex(); diff --git a/include/editeng/editobj.hxx b/include/editeng/editobj.hxx index 7d40f5a9ad09..4b4bb525cd20 100644 --- a/include/editeng/editobj.hxx +++ b/include/editeng/editobj.hxx @@ -40,7 +40,7 @@ class SvxFieldData; enum class OutlinerMode; struct EECharAttrib; typedef struct _xmlTextWriter* xmlTextWriterPtr; -class EditEngineParagraph; +class EditTextObjectParagraph; class XParaPortionList; namespace editeng { @@ -55,10 +55,15 @@ class SharedStringPool; enum class TextRotation { NONE, TOPTOBOTTOM, BOTTOMTOTOP }; +/** + This object is used to copy document/text info in and out of EditEngine. + It is not used internally to editeng as storage mechanism, just a means + of extracing and inserting data. +*/ class EDITENG_DLLPUBLIC EditTextObject final { public: - typedef std::vector > EditEngineParagraphs; + typedef std::vector > EditTextObjectParagraphs; EditTextObject(SfxItemPool* pPool, MapUnit eDefaultMetric, bool bVertical, TextRotation eRotation, SvtScriptType eScriptType); @@ -153,9 +158,9 @@ public: // #i102062# bool isWrongListEqual(const EditTextObject& rCompare) const; - EditEngineParagraph* CreateAndInsertParagraph(); - EditEngineParagraphs& GetParagraphs() { return maParagraphs;} - const EditEngineParagraphs& GetParagraphs() const { return maParagraphs;} + EditTextObjectParagraph* CreateAndInsertParagraph(); + EditTextObjectParagraphs& GetParagraphs() { return maParagraphs;} + const EditTextObjectParagraphs& GetParagraphs() const { return maParagraphs;} bool HasMetric() const { return meMetric != MapUnit::LASTENUMDUMMY; } MapUnit GetMetric() const { return meMetric; } @@ -169,7 +174,7 @@ private: bool ImpChangeStyleSheets( std::u16string_view rOldName, SfxStyleFamily eOldFamily, const OUString& rNewName, SfxStyleFamily eNewFamily ); - EditEngineParagraphs maParagraphs; + EditTextObjectParagraphs maParagraphs; rtl::Reference mpPool; std::unique_ptr mpPortionInfo; OutlinerMode meUserType; From 5a343d265fc5e1ac86b926957a65d1ae6d937ad0 Mon Sep 17 00:00:00 2001 From: Olivier Hallot Date: Thu, 1 Oct 2026 08:41:07 -0300 Subject: [PATCH 079/289] Update git submodules * Update helpcontent2 from branch 'master' to 5c387d491750bbc4e5c3ddef61eb94002959a0c2 - tdf#173756 Link to converting text to numbers + Refactor Change-Id: Ib797d40bf8573c5612d6317e608a4737894da711 Reviewed-on: https://gerrit.libreoffice.org/c/help/+/211539 Tested-by: Jenkins Reviewed-by: Olivier Hallot --- helpcontent2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/helpcontent2 b/helpcontent2 index 5ca01b661149..5c387d491750 160000 --- a/helpcontent2 +++ b/helpcontent2 @@ -1 +1 @@ -Subproject commit 5ca01b66114919efccfccb77f006e8744b6d79fe +Subproject commit 5c387d491750bbc4e5c3ddef61eb94002959a0c2 From 74b1296771b6fc3b5a26b2f06f66e6f17adca891 Mon Sep 17 00:00:00 2001 From: Olivier Hallot Date: Thu, 1 Oct 2026 08:41:29 -0300 Subject: [PATCH 080/289] Update git submodules * Update helpcontent2 from branch 'master' to e80198e1d1d98518188321158da8488f32675bea - tdf#172958 Split alignment between dialog and sidebar Change-Id: If973e320cb2986137cfc08df6463c46dfae0e761 Reviewed-on: https://gerrit.libreoffice.org/c/help/+/211631 Reviewed-by: Olivier Hallot Tested-by: Jenkins --- helpcontent2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/helpcontent2 b/helpcontent2 index 5c387d491750..e80198e1d1d9 160000 --- a/helpcontent2 +++ b/helpcontent2 @@ -1 +1 @@ -Subproject commit 5c387d491750bbc4e5c3ddef61eb94002959a0c2 +Subproject commit e80198e1d1d98518188321158da8488f32675bea From b00fc0d4e7f4c5ff538904a1789310da404b4c2e Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Tue, 29 Sep 2026 17:03:20 +0200 Subject: [PATCH 081/289] add some editeng/sd unit tests which will be useful in upcoming changes to EditEngine/Outliner Change-Id: I762a5b213f3ee9a65a83ac8b17d377f9d91a2a2a Signed-off-by: Noel Grandin Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/13817 Tested-by: Jenkins CPCI Reviewed-by: Mike Kaganski (cherry picked from commit a6899cb5b04532f2efa24619b93ba0e9fef6c344) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211654 Tested-by: Jenkins Reviewed-by: Xisco Fauli --- editeng/qa/unit/core-test.cxx | 95 ++++++++++++++++++++++++ sd/qa/unit/uiimpress.cxx | 133 ++++++++++++++++++++++++++++++++++ 2 files changed, 228 insertions(+) diff --git a/editeng/qa/unit/core-test.cxx b/editeng/qa/unit/core-test.cxx index 7dacf23e5501..d74e1e322c4a 100644 --- a/editeng/qa/unit/core-test.cxx +++ b/editeng/qa/unit/core-test.cxx @@ -43,6 +43,7 @@ #include #include #include +#include #include #include @@ -50,6 +51,10 @@ #include #include #include +#include +#include +#include +#include using namespace com::sun::star; @@ -147,6 +152,12 @@ public: void testAutoDirNotPreservedOnParaBreak(); void testFontTypographicConversion(); + void testOutlinerRemoveTrailingParagraphs(); + void testOutlinerAddTextNumbering(); + void testOutlinerLastParagraphIsChild(); + void testOutlinerUndoParaFlag(); + void testOutlinerReadDepth(); + DECL_STATIC_LINK(Test, CalcFieldValueHdl, EditFieldInfo*, void); CPPUNIT_TEST_SUITE(Test); @@ -186,6 +197,11 @@ public: CPPUNIT_TEST(testEscapementNotPreservedOnParaBreak); CPPUNIT_TEST(testAutoDirNotPreservedOnParaBreak); CPPUNIT_TEST(testFontTypographicConversion); + CPPUNIT_TEST(testOutlinerRemoveTrailingParagraphs); + CPPUNIT_TEST(testOutlinerAddTextNumbering); + CPPUNIT_TEST(testOutlinerLastParagraphIsChild); + CPPUNIT_TEST(testOutlinerUndoParaFlag); + CPPUNIT_TEST(testOutlinerReadDepth); CPPUNIT_TEST_SUITE_END(); private: @@ -2623,6 +2639,85 @@ void Test::testFontTypographicConversion() #endif } +void Test::testOutlinerRemoveTrailingParagraphs() +{ + Outliner aOutliner(mpItemPool.get(), OutlinerMode::OutlineObject); + aOutliner.SetText(u"a\nb\nc"_ustr, aOutliner.GetParagraph(0)); + CPPUNIT_ASSERT_EQUAL(sal_Int32(3), aOutliner.GetParagraphCount()); + + // The last removal leaves no paragraph at the removed position. + aOutliner.Remove(aOutliner.GetParagraph(1), 2); + CPPUNIT_ASSERT_EQUAL(sal_Int32(1), aOutliner.GetParagraphCount()); + CPPUNIT_ASSERT_EQUAL(u"a"_ustr, aOutliner.GetText(aOutliner.GetParagraph(0))); +} + +void Test::testOutlinerAddTextNumbering() +{ + Outliner aSource(mpItemPool.get(), OutlinerMode::OutlineObject); + aSource.SetText(u"x\ny"_ustr, aSource.GetParagraph(0)); + aSource.SetNumberingStartValue(1, 5); + std::optional oParaObj = aSource.CreateParaObject(); + CPPUNIT_ASSERT(oParaObj); + + Outliner aOutliner(mpItemPool.get(), OutlinerMode::OutlineObject); + aOutliner.SetText(u"a"_ustr, aOutliner.GetParagraph(0)); + aOutliner.AddText(*oParaObj); + CPPUNIT_ASSERT_EQUAL(sal_Int32(3), aOutliner.GetParagraphCount()); + + // The start value belongs to the appended "y", not to the paragraph at its source index. + CPPUNIT_ASSERT_EQUAL(sal_Int16(-1), aOutliner.GetNumberingStartValue(1)); + CPPUNIT_ASSERT_EQUAL(sal_Int16(5), aOutliner.GetNumberingStartValue(2)); +} + +void Test::testOutlinerLastParagraphIsChild() +{ + Outliner aOutliner(mpItemPool.get(), OutlinerMode::OutlineObject); + aOutliner.SetText(u"a\nb\nc"_ustr, aOutliner.GetParagraph(0)); + aOutliner.SetDepth(aOutliner.GetParagraph(0), 0); + aOutliner.SetDepth(aOutliner.GetParagraph(1), 0); + aOutliner.SetDepth(aOutliner.GetParagraph(2), 1); + + // "c", the last paragraph, is a child of "b". + CPPUNIT_ASSERT(aOutliner.HasChildren(aOutliner.GetParagraph(1))); + CPPUNIT_ASSERT(aOutliner.IsExpanded(aOutliner.GetParagraph(1))); + CPPUNIT_ASSERT(!aOutliner.HasChildren(aOutliner.GetParagraph(0))); +} + +void Test::testOutlinerUndoParaFlag() +{ + Outliner aOutliner(mpItemPool.get(), OutlinerMode::OutlineView); + ScopedVclPtrInstance xWindow(nullptr, WB_APP | WB_STDWORK); + OutlinerView aView(aOutliner, xWindow.get()); + aOutliner.InsertView(&aView); + comphelper::ScopeGuard aGuard([&aOutliner, &aView] { aOutliner.RemoveView(&aView); }); + aOutliner.SetText(u"a"_ustr, aOutliner.GetParagraph(0)); + aOutliner.EnableUndo(true); + + aOutliner.SetParaFlag(aOutliner.GetParagraph(0), ParaFlag::ISPAGE); + CPPUNIT_ASSERT(Outliner::HasParaFlag(aOutliner.GetParagraph(0), ParaFlag::ISPAGE)); + + // Undo clears the flag again. + CPPUNIT_ASSERT(aOutliner.GetUndoManager().Undo()); + CPPUNIT_ASSERT(!Outliner::HasParaFlag(aOutliner.GetParagraph(0), ParaFlag::ISPAGE)); +} + +void Test::testOutlinerReadDepth() +{ + Outliner aOutliner(mpItemPool.get(), OutlinerMode::OutlineView); + SvMemoryStream aStream; + aStream.WriteOString("a\n\tb"); + aStream.Seek(0); + aOutliner.Read(aStream, OUString(), EETextFormat::Text); + // The text is read into the empty paragraph in front, which stays. + CPPUNIT_ASSERT_EQUAL(sal_Int32(3), aOutliner.GetParagraphCount()); + CPPUNIT_ASSERT_EQUAL(u"a"_ustr, aOutliner.GetText(aOutliner.GetParagraph(0))); + CPPUNIT_ASSERT_EQUAL(u"b"_ustr, aOutliner.GetText(aOutliner.GetParagraph(1))); + + // Each paragraph takes the depth of its outline level, not the depth set before reading. + CPPUNIT_ASSERT_EQUAL(sal_Int16(-1), aOutliner.GetDepth(0)); + CPPUNIT_ASSERT_EQUAL(sal_Int16(-1), aOutliner.GetDepth(1)); +} + CPPUNIT_TEST_SUITE_REGISTRATION(Test); } diff --git a/sd/qa/unit/uiimpress.cxx b/sd/qa/unit/uiimpress.cxx index 1335ed4f8fea..97132449fb03 100644 --- a/sd/qa/unit/uiimpress.cxx +++ b/sd/qa/unit/uiimpress.cxx @@ -66,6 +66,8 @@ #include #include #include +#include +#include #include #include #include @@ -93,8 +95,54 @@ public: sd::slidesorter::SlideSorterViewShell* getSlideSorterViewShell(const css::uno::Reference& xComp = nullptr); void lcl_search(const OUString& rKey, bool bFindAll = false, bool bBackwards = false); + // Opens a new presentation in Outline view, with one slide per title. + OutlinerView* createOutlineView(std::initializer_list aTitles); + // Sends keys to the Outline view, where postKeyEvent() does not reach. + void typeOutlineKey(sal_uInt16 nKey); + void typeOutlineString(std::u16string_view aStr); }; +void SdUiImpressTest::typeOutlineKey(sal_uInt16 nKey) +{ + auto pImpressDocument = dynamic_cast(mxComponent.get()); + sd::ViewShell* pViewShell = pImpressDocument->GetDocShell()->GetViewShell(); + pViewShell->KeyInput(KeyEvent(0, vcl::KeyCode(nKey)), pViewShell->GetActiveWindow()); + Scheduler::ProcessEventsToIdle(); +} + +void SdUiImpressTest::typeOutlineString(std::u16string_view aStr) +{ + auto pImpressDocument = dynamic_cast(mxComponent.get()); + sd::ViewShell* pViewShell = pImpressDocument->GetDocShell()->GetViewShell(); + for (const char16_t c : aStr) + pViewShell->KeyInput(KeyEvent(c, vcl::KeyCode()), pViewShell->GetActiveWindow()); + Scheduler::ProcessEventsToIdle(); +} + +OutlinerView* SdUiImpressTest::createOutlineView(std::initializer_list aTitles) +{ + createSdImpressDoc(); + dispatchCommand(mxComponent, u".uno:OutlineMode"_ustr, {}); + auto pImpressDocument = dynamic_cast(mxComponent.get()); + CPPUNIT_ASSERT(pImpressDocument); + sd::ViewShell* pViewShell = pImpressDocument->GetDocShell()->GetViewShell(); + CPPUNIT_ASSERT_EQUAL(sd::ViewShell::ST_OUTLINE, pViewShell->GetShellType()); + auto pView = static_cast(pViewShell->GetView()); + OutlinerView* pOutlinerView = pView->GetViewByWindow(pViewShell->GetActiveWindow()); + CPPUNIT_ASSERT(pOutlinerView); + + bool bFirst = true; + for (const std::u16string_view& aTitle : aTitles) + { + if (!std::exchange(bFirst, false)) + typeOutlineKey(KEY_RETURN); + typeOutlineString(aTitle); + } + CPPUNIT_ASSERT_EQUAL(sal_uInt16(aTitles.size()), + pImpressDocument->GetDoc()->GetSdPageCount(PageKind::Standard)); + return pOutlinerView; +} + void SdUiImpressTest::checkCurrentPageNumber(sal_uInt16 nNum) { uno::Reference xModel(mxComponent, uno::UNO_QUERY); @@ -2734,6 +2782,91 @@ CPPUNIT_TEST_FIXTURE(SdUiImpressTest, testTdf166401_anEditElsewhereIsLeftAlone) pView->SdrEndTextEdit(); } +CPPUNIT_TEST_FIXTURE(SdUiImpressTest, testOutlineDemoteTitle) +{ + OutlinerView* pOutlinerView = createOutlineView({ u"A", u"B" }); + auto pImpressDocument = dynamic_cast(mxComponent.get()); + + // Tab in front of "B" turns the title of the second slide into a paragraph of the first. + pOutlinerView->SetSelection(ESelection(1, 0, 1, 0)); + typeOutlineKey(KEY_TAB); + CPPUNIT_ASSERT_EQUAL(sal_uInt16(1), + pImpressDocument->GetDoc()->GetSdPageCount(PageKind::Standard)); + CPPUNIT_ASSERT_EQUAL(sal_Int32(2), pOutlinerView->GetOutliner().GetParagraphCount()); +} + +CPPUNIT_TEST_FIXTURE(SdUiImpressTest, testOutlineSelectedPages) +{ + createOutlineView({ u"A", u"B" }); + auto pImpressDocument = dynamic_cast(mxComponent.get()); + SdDrawDocument* pDoc = pImpressDocument->GetDoc(); + pDoc->GetSdPage(0, PageKind::Standard)->SetSelected(false); + pDoc->GetSdPage(1, PageKind::Standard)->SetSelected(false); + + // The state of the summary slide command marks the slide of the cursor as selected. + SfxPoolItemHolder aState; + pImpressDocument->GetDocShell()->GetViewShell()->GetViewFrame()->GetDispatcher()->QueryState( + SID_SUMMARY_PAGE, aState); + CPPUNIT_ASSERT(!pDoc->GetSdPage(0, PageKind::Standard)->IsSelected()); + CPPUNIT_ASSERT(pDoc->GetSdPage(1, PageKind::Standard)->IsSelected()); +} + +CPPUNIT_TEST_FIXTURE(SdUiImpressTest, testOutlineDeleteAcrossSlides) +{ + // Slides "A" with the body paragraph "x", "B" and "C". + createSdImpressDoc(); + auto pImpressDocument = dynamic_cast(mxComponent.get()); + SdDrawDocument* pDoc = pImpressDocument->GetDoc(); + auto xDrawPages = mxComponent.queryThrow()->getDrawPages(); + xDrawPages->insertNewByIndex(0); + xDrawPages->insertNewByIndex(1); + const std::u16string_view aTitles[] = { u"A", u"B", u"C" }; + for (sal_uInt16 i = 0; i < std::size(aTitles); ++i) + { + SdPage* pPage = pDoc->GetSdPage(i, PageKind::Standard); + pPage->SetAutoLayout(AUTOLAYOUT_TITLE_CONTENT, true); + auto pTitle = static_cast(pPage->GetPresObj(PresObjKind::Title)); + pTitle->SetText(OUString(aTitles[i])); + pTitle->SetEmptyPresObj(false); + } + auto pBody = static_cast( + pDoc->GetSdPage(0, PageKind::Standard)->GetPresObj(PresObjKind::Outline)); + pBody->SetText(u"x"_ustr); + pBody->SetEmptyPresObj(false); + + dispatchCommand(mxComponent, u".uno:OutlineMode"_ustr, {}); + sd::ViewShell* pViewShell = pImpressDocument->GetDocShell()->GetViewShell(); + CPPUNIT_ASSERT_EQUAL(sd::ViewShell::ST_OUTLINE, pViewShell->GetShellType()); + auto pView = static_cast(pViewShell->GetView()); + OutlinerView* pOutlinerView = pView->GetViewByWindow(pViewShell->GetActiveWindow()); + CPPUNIT_ASSERT(pOutlinerView); + Outliner& rOutliner = pOutlinerView->GetOutliner(); + CPPUNIT_ASSERT_EQUAL(sal_Int32(4), rOutliner.GetParagraphCount()); + + // Deleting from the end of "A" to the end of "B" removes the second slide only. + pOutlinerView->SetSelection(ESelection(0, 1, 2, 1)); + typeOutlineKey(KEY_DELETE); + CPPUNIT_ASSERT_EQUAL(sal_Int32(2), rOutliner.GetParagraphCount()); + CPPUNIT_ASSERT_EQUAL(sal_uInt16(2), pDoc->GetSdPageCount(PageKind::Standard)); +} + +CPPUNIT_TEST_FIXTURE(SdUiImpressTest, testOutlineMoveTitleUp) +{ + OutlinerView* pOutlinerView = createOutlineView({ u"A", u"B", u"C" }); + auto pImpressDocument = dynamic_cast(mxComponent.get()); + SdDrawDocument* pDoc = pImpressDocument->GetDoc(); + SdPage* pPageB = pDoc->GetSdPage(1, PageKind::Standard); + SdPage* pPageC = pDoc->GetSdPage(2, PageKind::Standard); + + // Moving "C" up moves its slide in front of the slide of "B". + pOutlinerView->SetSelection(ESelection(2, 0, 2, 1)); + dispatchCommand(mxComponent, u".uno:OutlineUp"_ustr, {}); + CPPUNIT_ASSERT_EQUAL(u"C"_ustr, pOutlinerView->GetOutliner().GetText( + pOutlinerView->GetOutliner().GetParagraph(1))); + CPPUNIT_ASSERT_EQUAL(pPageC, pDoc->GetSdPage(1, PageKind::Standard)); + CPPUNIT_ASSERT_EQUAL(pPageB, pDoc->GetSdPage(2, PageKind::Standard)); +} + CPPUNIT_PLUGIN_IMPLEMENT(); /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ From 693d5f6c6baf3ae7ad7e249b1f20ab0020bfc2fa Mon Sep 17 00:00:00 2001 From: Xisco Fauli Date: Thu, 1 Oct 2026 11:32:53 +0200 Subject: [PATCH 082/289] CppunitTest_editeng_core: use CPPUNIT_TEST_FIXTURE Change-Id: Ic998ad967c60ce1846689a234f7304f5aef3136c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211661 Reviewed-by: Xisco Fauli Tested-by: Jenkins --- editeng/qa/unit/core-test.cxx | 209 +++++++--------------------------- 1 file changed, 42 insertions(+), 167 deletions(-) diff --git a/editeng/qa/unit/core-test.cxx b/editeng/qa/unit/core-test.cxx index d74e1e322c4a..f3328e29d426 100644 --- a/editeng/qa/unit/core-test.cxx +++ b/editeng/qa/unit/core-test.cxx @@ -78,138 +78,14 @@ public: test::BootstrapFixture::tearDown(); } -#if HAVE_MORE_FONTS - /// Test text portions position when percentage line spacing is set - void testLineSpacing(); -#endif - - void testConstruction(); - - /// Test UNO service class that implements text field items. - void testUnoTextFields(); - - /// Test Copy/Paste with hyperlinks in text using Legacy Format - void testHyperlinkCopyPaste(); - - /// Test Copy/Paste using Legacy Format - void testCopyPaste(); - - /// Test Paste using HTML - void testHTMLPaste(); - - /// Test Paste using an HTML fragment - void testHTMLFragmentPaste(); - - /// Test Paste using an RTF - void testRTFPaste(); - - /// Test Paste preference HTML/ - void testRTFHTMLPaste(); - - /// Test Copy/Paste with selective selection over multiple paragraphs - void testMultiParaSelCopyPaste(); - - /// Test Copy/Paste with Tabs - void testTabsCopyPaste(); - - /// Test hyperlinks - void testHyperlinkSearch(); - - /// Test Copy/Paste with Bold/Italic text using Legacy Format - void testBoldItalicCopyPaste(); - - /// Test Copy/Paste with Underline text using Legacy Format - void testUnderlineCopyPaste(); - - /// Test Copy/Paste with multiple paragraphs - void testMultiParaCopyPaste(); - - /// Test Copy/Paste with multiple paragraphs having Bold/Italic text - void testParaBoldItalicCopyPaste(); - - void testParaStartCopyPaste(); - - void testSectionAttributes(); - - void testLargeParaCopyPaste(); - - void testTransliterate(); - - void testTdf147196TitleCaseMultilineTransliteration(); - - void testTdf148148CaseWhitespaceOnlyTransliteration(); - - void testSingleLine(); - void testMoveParagraph(); - void testCreateLines(); - void testTdf154248MultilineFieldWrapping(); - void testTdf151748StaleKashidaArray(); - void testTdf162803StaleKashidaArray(); - void testTdf157037PasteTextAutoDirection(); - void testFontVariationsItem(); - void testFontVariationsScript(); - void testEscapementNotPreservedOnParaBreak(); - void testAutoDirNotPreservedOnParaBreak(); - void testFontTypographicConversion(); - - void testOutlinerRemoveTrailingParagraphs(); - void testOutlinerAddTextNumbering(); - void testOutlinerLastParagraphIsChild(); - void testOutlinerUndoParaFlag(); - void testOutlinerReadDepth(); - DECL_STATIC_LINK(Test, CalcFieldValueHdl, EditFieldInfo*, void); - CPPUNIT_TEST_SUITE(Test); -#if HAVE_MORE_FONTS - CPPUNIT_TEST(testLineSpacing); -#endif - CPPUNIT_TEST(testConstruction); - CPPUNIT_TEST(testUnoTextFields); - CPPUNIT_TEST(testHyperlinkCopyPaste); - CPPUNIT_TEST(testCopyPaste); - CPPUNIT_TEST(testHTMLPaste); - CPPUNIT_TEST(testHTMLFragmentPaste); - CPPUNIT_TEST(testRTFPaste); - CPPUNIT_TEST(testRTFHTMLPaste); - CPPUNIT_TEST(testMultiParaSelCopyPaste); - CPPUNIT_TEST(testTabsCopyPaste); - CPPUNIT_TEST(testHyperlinkSearch); - CPPUNIT_TEST(testBoldItalicCopyPaste); - CPPUNIT_TEST(testUnderlineCopyPaste); - CPPUNIT_TEST(testMultiParaCopyPaste); - CPPUNIT_TEST(testParaBoldItalicCopyPaste); - CPPUNIT_TEST(testParaStartCopyPaste); - CPPUNIT_TEST(testSectionAttributes); - CPPUNIT_TEST(testLargeParaCopyPaste); - CPPUNIT_TEST(testTransliterate); - CPPUNIT_TEST(testTdf147196TitleCaseMultilineTransliteration); - CPPUNIT_TEST(testTdf148148CaseWhitespaceOnlyTransliteration); - CPPUNIT_TEST(testSingleLine); - CPPUNIT_TEST(testMoveParagraph); - CPPUNIT_TEST(testCreateLines); - CPPUNIT_TEST(testTdf154248MultilineFieldWrapping); - CPPUNIT_TEST(testTdf151748StaleKashidaArray); - CPPUNIT_TEST(testTdf162803StaleKashidaArray); - CPPUNIT_TEST(testTdf157037PasteTextAutoDirection); - CPPUNIT_TEST(testFontVariationsItem); - CPPUNIT_TEST(testFontVariationsScript); - CPPUNIT_TEST(testEscapementNotPreservedOnParaBreak); - CPPUNIT_TEST(testAutoDirNotPreservedOnParaBreak); - CPPUNIT_TEST(testFontTypographicConversion); - CPPUNIT_TEST(testOutlinerRemoveTrailingParagraphs); - CPPUNIT_TEST(testOutlinerAddTextNumbering); - CPPUNIT_TEST(testOutlinerLastParagraphIsChild); - CPPUNIT_TEST(testOutlinerUndoParaFlag); - CPPUNIT_TEST(testOutlinerReadDepth); - CPPUNIT_TEST_SUITE_END(); - -private: +protected: rtl::Reference mpItemPool; }; #if HAVE_MORE_FONTS -void Test::testLineSpacing() +CPPUNIT_TEST_FIXTURE(Test, testLineSpacing) { // Create EditEngine's instance EditEngine aEditEngine(mpItemPool.get()); @@ -286,7 +162,7 @@ void Test::testLineSpacing() } #endif -void Test::testConstruction() +CPPUNIT_TEST_FIXTURE(Test, testConstruction) { EditEngine aEngine(mpItemPool.get()); @@ -302,7 +178,7 @@ bool includes(const uno::Sequence& rSeq, std::u16string_view rVal) return false; } -void Test::testUnoTextFields() +CPPUNIT_TEST_FIXTURE(Test, testUnoTextFields) { { // DATE @@ -457,7 +333,7 @@ IMPL_STATIC_LINK(Test, CalcFieldValueHdl, EditFieldInfo*, pInfo, void) } } -void Test::testHyperlinkCopyPaste() +CPPUNIT_TEST_FIXTURE(Test, testHyperlinkCopyPaste) { // Create Outliner instance Outliner aOutliner(mpItemPool.get(), OutlinerMode::TextObject); @@ -587,7 +463,7 @@ void Test::testHyperlinkCopyPaste() CPPUNIT_ASSERT_EQUAL(aRepres1, pACPURLField3->GetRepresentation()); } -void Test::testCopyPaste() +CPPUNIT_TEST_FIXTURE(Test, testCopyPaste) { // Create EditEngine's instance EditEngine aEditEngine(mpItemPool.get()); @@ -683,7 +559,7 @@ sal_Bool TestTransferable::isDataFlavorSupported(const datatransfer::DataFlavor& return false; } -void Test::testHTMLPaste() +CPPUNIT_TEST_FIXTURE(Test, testHTMLPaste) { // Given an empty editeng document: EditEngine aEditEngine(mpItemPool.get()); @@ -704,7 +580,7 @@ void Test::testHTMLPaste() CPPUNIT_ASSERT_EQUAL(u"test"_ustr, rDoc.GetParaAsString(static_cast(0))); } -void Test::testHTMLFragmentPaste() +CPPUNIT_TEST_FIXTURE(Test, testHTMLFragmentPaste) { // Given an empty editeng document: EditEngine aEditEngine(mpItemPool.get()); @@ -725,7 +601,7 @@ void Test::testHTMLFragmentPaste() CPPUNIT_ASSERT_EQUAL(u"abc"_ustr, rDoc.GetParaAsString(static_cast(0))); } -void Test::testRTFPaste() +CPPUNIT_TEST_FIXTURE(Test, testRTFPaste) { // Given an empty editeng document: EditEngine aEditEngine(mpItemPool.get()); @@ -747,7 +623,7 @@ void Test::testRTFPaste() rDoc.GetParaAsString(static_cast(0))); } -void Test::testRTFHTMLPaste() +CPPUNIT_TEST_FIXTURE(Test, testRTFHTMLPaste) { // Given an empty editeng document: EditEngine aEditEngine(mpItemPool.get()); @@ -779,7 +655,7 @@ void Test::testRTFHTMLPaste() // i.e. HTML is preferred over HTML. CPPUNIT_ASSERT_EQUAL(u"abc"_ustr, rDoc.GetParaAsString(static_cast(0))); } -void Test::testMultiParaSelCopyPaste() +CPPUNIT_TEST_FIXTURE(Test, testMultiParaSelCopyPaste) { // Create EditEngine's instance EditEngine aEditEngine(mpItemPool.get()); @@ -825,7 +701,7 @@ void Test::testMultiParaSelCopyPaste() CPPUNIT_ASSERT_EQUAL( u"This is second"_ustr, rDoc.GetParaAsString(sal_Int32(3)) ); } -void Test::testTabsCopyPaste() +CPPUNIT_TEST_FIXTURE(Test, testTabsCopyPaste) { // Create EditEngine's instance EditEngine aEditEngine(mpItemPool.get()); @@ -897,7 +773,7 @@ public: // Odd accounting for hyperlink position & size etc. // https://bugzilla.novell.com/show_bug.cgi?id=467459 -void Test::testHyperlinkSearch() +CPPUNIT_TEST_FIXTURE(Test, testHyperlinkSearch) { UrlEditEngine aEngine(mpItemPool.get()); EditDoc& rDoc = aEngine.GetEditDoc(); @@ -977,7 +853,7 @@ bool hasItalic(const editeng::Section& rSecAttr) }); } -void Test::testBoldItalicCopyPaste() +CPPUNIT_TEST_FIXTURE(Test, testBoldItalicCopyPaste) { // Create EditEngine's instance EditEngine aEditEngine(mpItemPool.get()); @@ -1160,7 +1036,7 @@ bool hasUnderline(const editeng::Section& rSecAttr) }); } -void Test::testUnderlineCopyPaste() +CPPUNIT_TEST_FIXTURE(Test, testUnderlineCopyPaste) { // Create EditEngine's instance EditEngine aEditEngine(mpItemPool.get()); @@ -1255,7 +1131,7 @@ void Test::testUnderlineCopyPaste() CPPUNIT_ASSERT_MESSAGE("This section must be underlined.", hasUnderline(aAttrs2[3])); } -void Test::testMultiParaCopyPaste() +CPPUNIT_TEST_FIXTURE(Test, testMultiParaCopyPaste) { // Create EditEngine's instance EditEngine aEditEngine(mpItemPool.get()); @@ -1298,7 +1174,7 @@ void Test::testMultiParaCopyPaste() CPPUNIT_ASSERT_EQUAL(aSecondPara, rDoc.GetParaAsString(sal_Int32(3))); } -void Test::testParaBoldItalicCopyPaste() +CPPUNIT_TEST_FIXTURE(Test, testParaBoldItalicCopyPaste) { // Create EditEngine's instance EditEngine aEditEngine(mpItemPool.get()); @@ -1570,7 +1446,7 @@ void Test::testParaBoldItalicCopyPaste() CPPUNIT_ASSERT_MESSAGE("This section must be bold.", hasBold(aAttrs3[14])); } -void Test::testParaStartCopyPaste() +CPPUNIT_TEST_FIXTURE(Test, testParaStartCopyPaste) { // Create EditEngine's instance EditEngine aEditEngine(mpItemPool.get()); @@ -1616,7 +1492,7 @@ void Test::testParaStartCopyPaste() CPPUNIT_ASSERT_EQUAL( aThirdPara, rDoc.GetParaAsString(sal_Int32(3)) ); } -void Test::testSectionAttributes() +CPPUNIT_TEST_FIXTURE(Test, testSectionAttributes) { EditEngine aEngine(mpItemPool.get()); @@ -1758,7 +1634,7 @@ void Test::testSectionAttributes() } } -void Test::testLargeParaCopyPaste() +CPPUNIT_TEST_FIXTURE(Test, testLargeParaCopyPaste) { // Create EditEngine's instance EditEngine aEditEngine(mpItemPool.get()); @@ -1839,7 +1715,7 @@ OUString lcl_translitTest(EditEngine& aEditEngine, const OUString& text, const E return aEditEngine.GetText(); } -void Test::testTransliterate() +CPPUNIT_TEST_FIXTURE(Test, testTransliterate) { // Create EditEngine's instance EditEngine editEng(mpItemPool.get()); @@ -1958,7 +1834,7 @@ void Test::testTransliterate() } -void Test::testTdf147196TitleCaseMultilineTransliteration() +CPPUNIT_TEST_FIXTURE(Test, testTdf147196TitleCaseMultilineTransliteration) { EditEngine editEng( mpItemPool.get() ); editEng.SetText(u"2.2 Publication of information - CAA\nSection 4.2 of a CA\'s Certificate Policy and/or Certification Practice Statement SHALL state the CA\'s policy or practice on processing CAA Records for Fully Qualified Domain Names; that policy shall be consistent with these Requirements. \n\nIt shall clearly specify the set of Issuer Domain Names that the CA recognises in CAA \"issue\" or \"issuewild\" records as permitting it to issue. The CA SHALL log all actions taken, if any, consistent with its processing practice."_ustr); @@ -1966,7 +1842,7 @@ void Test::testTdf147196TitleCaseMultilineTransliteration() CPPUNIT_ASSERT_EQUAL(u"2.2 Publication Of Information - Caa\nSection 4.2 Of A Ca\'s Certificate Policy And/Or Certification Practice Statement Shall State The Ca\'s Policy Or Practice On Processing Caa Records For Fully Qualified Domain Names; That Policy Shall Be Consistent With These Requirements. \n\nIt Shall Clearly Specify The Set Of Issuer Domain Names That The Ca Recognises In Caa \"Issue\" Or \"Issuewild\" Records As Permitting It To Issue. The Ca Shall Log All Actions Taken, If Any, Consistent With Its Processing Practice."_ustr, editEng.GetText()); } -void Test::testTdf148148CaseWhitespaceOnlyTransliteration() +CPPUNIT_TEST_FIXTURE(Test, testTdf148148CaseWhitespaceOnlyTransliteration) { using TF = TransliterationFlags; EditEngine editEng(mpItemPool.get()); @@ -2049,7 +1925,7 @@ void Test::testTdf148148CaseWhitespaceOnlyTransliteration() } -void Test::testSingleLine() +CPPUNIT_TEST_FIXTURE(Test, testSingleLine) { EditEngine aEditEngine(mpItemPool.get()); @@ -2061,7 +1937,7 @@ void Test::testSingleLine() CPPUNIT_ASSERT_EQUAL(sal_Int32(1), aEditEngine.GetLineCount(0)); } -void Test::testMoveParagraph() +CPPUNIT_TEST_FIXTURE(Test, testMoveParagraph) { EditEngine aEditEngine(mpItemPool.get()); aEditEngine.SetPaperSize(Size(5000, 5000)); @@ -2150,7 +2026,7 @@ void Test::testMoveParagraph() CPPUNIT_ASSERT_EQUAL(u"Paragraph 5"_ustr, aEditEngine.GetText(4)); } -void Test::testCreateLines() +CPPUNIT_TEST_FIXTURE(Test, testCreateLines) { ScopedVclPtrInstance pVirtualDevice(DeviceFormat::WITHOUT_ALPHA); @@ -2221,7 +2097,7 @@ void Test::testCreateLines() // CPPUNIT_ASSERT_MESSAGE("INTENTIONALLY FALSE", false); } -void Test::testTdf154248MultilineFieldWrapping() +CPPUNIT_TEST_FIXTURE(Test, testTdf154248MultilineFieldWrapping) { // If field wrapping changes, this test may need to be updated @@ -2280,7 +2156,7 @@ void Test::testTdf154248MultilineFieldWrapping() } // tdf#151748: Verify that editeng produces an empty kashida array if the line does not have room -void Test::testTdf151748StaleKashidaArray() +CPPUNIT_TEST_FIXTURE(Test, testTdf151748StaleKashidaArray) { ScopedVclPtrInstance pVirtualDevice(DeviceFormat::WITHOUT_ALPHA); @@ -2342,7 +2218,7 @@ void Test::testTdf151748StaleKashidaArray() } // tdf#162803: Verify that editeng clears stale kashida data during layout -void Test::testTdf162803StaleKashidaArray() +CPPUNIT_TEST_FIXTURE(Test, testTdf162803StaleKashidaArray) { ScopedVclPtrInstance pVirtualDevice(DeviceFormat::WITHOUT_ALPHA); @@ -2459,7 +2335,7 @@ public: } }; -void Test::testTdf157037PasteTextAutoDirection() +CPPUNIT_TEST_FIXTURE(Test, testTdf157037PasteTextAutoDirection) { // Given an empty editeng document: EditEngine aEditEngine(mpItemPool.get()); @@ -2486,7 +2362,7 @@ void Test::testTdf157037PasteTextAutoDirection() CPPUNIT_ASSERT(!aEditEngine.IsRightToLeft(4)); } -void Test::testFontVariationsScript() +CPPUNIT_TEST_FIXTURE(Test, testFontVariationsScript) { CPPUNIT_ASSERT(IsScriptItemValid(EE_CHAR_FONTVARIATIONS, i18n::ScriptType::LATIN)); CPPUNIT_ASSERT(!IsScriptItemValid(EE_CHAR_FONTVARIATIONS, i18n::ScriptType::ASIAN)); @@ -2506,7 +2382,7 @@ void Test::testFontVariationsScript() GetScriptItemId(EE_CHAR_FONTVARIATIONS, SvtScriptType::COMPLEX)); } -void Test::testFontVariationsItem() +CPPUNIT_TEST_FIXTURE(Test, testFontVariationsItem) { // Test default construction (empty variations) SvxFontVariationsItem aItem1(EE_CHAR_FONTVARIATIONS); @@ -2544,7 +2420,7 @@ void Test::testFontVariationsItem() CPPUNIT_ASSERT(aItem4.operator==(aItem2)); } -void Test::testEscapementNotPreservedOnParaBreak() +CPPUNIT_TEST_FIXTURE(Test, testEscapementNotPreservedOnParaBreak) { EditEngine aEditEngine(mpItemPool.get()); EditDoc& rDoc = aEditEngine.GetEditDoc(); @@ -2588,7 +2464,7 @@ void Test::testEscapementNotPreservedOnParaBreak() CPPUNIT_ASSERT_MESSAGE("Escapement attribute should NOT be included.", !pEscAttr); } -void Test::testAutoDirNotPreservedOnParaBreak() +CPPUNIT_TEST_FIXTURE(Test, testAutoDirNotPreservedOnParaBreak) { EditEngine aEditEngine(mpItemPool.get()); EditDoc& rDoc = aEditEngine.GetEditDoc(); @@ -2621,9 +2497,9 @@ void Test::testAutoDirNotPreservedOnParaBreak() CPPUNIT_ASSERT(!pNode2->GetContentAttribs().HasItem(EE_PARA_AUTOWRITINGDIR)); } -void Test::testFontTypographicConversion() -{ #if HAVE_MORE_FONTS +CPPUNIT_TEST_FIXTURE(Test, testFontTypographicConversion) +{ EditEngine aEditEngine(mpItemPool.get()); SfxItemSet aSet(aEditEngine.GetEmptyItemSet()); @@ -2636,10 +2512,10 @@ void Test::testFontTypographicConversion() const SvxFontItem& rStored = aStored.Get(EE_CHAR_FONTINFO); CPPUNIT_ASSERT_EQUAL(u"DejaVu Sans"_ustr, rStored.GetFamilyName()); CPPUNIT_ASSERT_EQUAL(u"Condensed"_ustr, rStored.GetStyleName()); -#endif } +#endif -void Test::testOutlinerRemoveTrailingParagraphs() +CPPUNIT_TEST_FIXTURE(Test, testOutlinerRemoveTrailingParagraphs) { Outliner aOutliner(mpItemPool.get(), OutlinerMode::OutlineObject); aOutliner.SetText(u"a\nb\nc"_ustr, aOutliner.GetParagraph(0)); @@ -2651,7 +2527,7 @@ void Test::testOutlinerRemoveTrailingParagraphs() CPPUNIT_ASSERT_EQUAL(u"a"_ustr, aOutliner.GetText(aOutliner.GetParagraph(0))); } -void Test::testOutlinerAddTextNumbering() +CPPUNIT_TEST_FIXTURE(Test, testOutlinerAddTextNumbering) { Outliner aSource(mpItemPool.get(), OutlinerMode::OutlineObject); aSource.SetText(u"x\ny"_ustr, aSource.GetParagraph(0)); @@ -2669,7 +2545,7 @@ void Test::testOutlinerAddTextNumbering() CPPUNIT_ASSERT_EQUAL(sal_Int16(5), aOutliner.GetNumberingStartValue(2)); } -void Test::testOutlinerLastParagraphIsChild() +CPPUNIT_TEST_FIXTURE(Test, testOutlinerLastParagraphIsChild) { Outliner aOutliner(mpItemPool.get(), OutlinerMode::OutlineObject); aOutliner.SetText(u"a\nb\nc"_ustr, aOutliner.GetParagraph(0)); @@ -2683,7 +2559,7 @@ void Test::testOutlinerLastParagraphIsChild() CPPUNIT_ASSERT(!aOutliner.HasChildren(aOutliner.GetParagraph(0))); } -void Test::testOutlinerUndoParaFlag() +CPPUNIT_TEST_FIXTURE(Test, testOutlinerUndoParaFlag) { Outliner aOutliner(mpItemPool.get(), OutlinerMode::OutlineView); ScopedVclPtrInstance xWindow(nullptr, WB_APP | WB_STDWORK); @@ -2701,7 +2577,7 @@ void Test::testOutlinerUndoParaFlag() CPPUNIT_ASSERT(!Outliner::HasParaFlag(aOutliner.GetParagraph(0), ParaFlag::ISPAGE)); } -void Test::testOutlinerReadDepth() +CPPUNIT_TEST_FIXTURE(Test, testOutlinerReadDepth) { Outliner aOutliner(mpItemPool.get(), OutlinerMode::OutlineView); SvMemoryStream aStream; @@ -2718,7 +2594,6 @@ void Test::testOutlinerReadDepth() CPPUNIT_ASSERT_EQUAL(sal_Int16(-1), aOutliner.GetDepth(1)); } -CPPUNIT_TEST_SUITE_REGISTRATION(Test); } CPPUNIT_PLUGIN_IMPLEMENT(); From 401d9a5d4a0f7c4ddfd19673ea2906cfb08d18ac Mon Sep 17 00:00:00 2001 From: Christian Lohmaier Date: Wed, 30 Sep 2026 20:43:11 +0200 Subject: [PATCH 083/289] fix openldap with Xcode 16: declaration directly after case not accepted if wrapping the case insto a block, Xcode 16 is happy. Solves building on macOS 14 that is stuck with Xcode 16 (at least when not trying to sideload anything newer) Without the block it fails with "error: expected expression" on the variable declaration lines. Change-Id: I0888fc5d2d6088f6071a72cde0c26532779cedad Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211633 Reviewed-by: Christian Lohmaier Tested-by: Jenkins --- external/openldap/UnpackedTarball_openldap.mk | 1 + .../openldap-Xcode-16-case-block.patch.1 | 46 +++++++++++++++++++ 2 files changed, 47 insertions(+) create mode 100644 external/openldap/openldap-Xcode-16-case-block.patch.1 diff --git a/external/openldap/UnpackedTarball_openldap.mk b/external/openldap/UnpackedTarball_openldap.mk index 661d509187f9..3488732b9e6d 100644 --- a/external/openldap/UnpackedTarball_openldap.mk +++ b/external/openldap/UnpackedTarball_openldap.mk @@ -24,6 +24,7 @@ $(eval $(call gb_UnpackedTarball_update_autoconf_configs,openldap,\ $(eval $(call gb_UnpackedTarball_add_patches,openldap,\ external/openldap/openldap-2.4.44.patch.1 \ + external/openldap/openldap-Xcode-16-case-block.patch.1 \ )) # vim: set noet sw=4 ts=4: diff --git a/external/openldap/openldap-Xcode-16-case-block.patch.1 b/external/openldap/openldap-Xcode-16-case-block.patch.1 new file mode 100644 index 000000000000..d74900146224 --- /dev/null +++ b/external/openldap/openldap-Xcode-16-case-block.patch.1 @@ -0,0 +1,46 @@ +Xcode doesn't accept decarations directly after case +diff -ur openldap.org/libraries/libldap/tls_o.c openldap/libraries/libldap/tls_o.c +--- openldap.org/libraries/libldap/tls_o.c 2026-09-30 18:59:22 ++++ openldap/libraries/libldap/tls_o.c 2026-09-30 19:01:10 +@@ -544,6 +544,7 @@ + while ((info = OSSL_STORE_load( sctx ))) { + switch (OSSL_STORE_INFO_get_type( info )) { + case OSSL_STORE_INFO_CERT: ++ { + X509 *cert = OSSL_STORE_INFO_get0_CERT( info ); + X509_STORE *store = SSL_CTX_get_cert_store( ctx ); + if ( !X509_STORE_add_cert( store, cert ) ) { +@@ -565,6 +566,7 @@ + } + } + break; ++ } + default: + /* ignore other types */ + break; +@@ -754,6 +756,7 @@ + } + break; + case OSSL_STORE_INFO_CERT: ++ { + X509 *cert = OSSL_STORE_INFO_get0_CERT(info); + int is_ca = X509_check_ca( cert ); + if ( !is_ca && !SSL_CTX_use_certificate( ctx, cert )) { +@@ -773,7 +776,9 @@ + return -1; + } + break; ++ } + case OSSL_STORE_INFO_CRL: ++ { + X509_STORE *x509_s = SSL_CTX_get_cert_store( ctx ); + if ( !X509_STORE_add_crl( x509_s, + OSSL_STORE_INFO_get0_CRL(info) )) { +@@ -785,6 +790,7 @@ + return -1; + } + break; ++ } + default: + /* ignore other types */ + break; From b94e7a82c70bbc3249f58a241baec354864236f1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= Date: Sat, 26 Sep 2026 20:55:20 +0000 Subject: [PATCH 084/289] don't preload a password protected library of a document MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Preloading it when the library container is created recursed. It gets loaded along with the document's Basic project instead. Signed-off-by: Caolán McNamara Change-Id: I14b24d93dacdbf856bc9ef5d3e6fa1a885666100 Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/13616 Tested-by: Jenkins CPCI Reviewed-by: Noel Grandin (cherry picked from commit ef186208097f9525e3e376fb8e677c643498f02f) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211598 Tested-by: Xisco Fauli Reviewed-by: Xisco Fauli --- basic/source/uno/namecont.cxx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/basic/source/uno/namecont.cxx b/basic/source/uno/namecont.cxx index e116b65dcb35..2e6b9f686124 100644 --- a/basic/source/uno/namecont.cxx +++ b/basic/source/uno/namecont.cxx @@ -952,10 +952,12 @@ void SfxLibraryContainer::init_Impl( const OUString& rInitialDocumentURL, // Preload? { + // A password-protected library of a document is loaded with the document's Basic project. + const bool bDocumentContainer = Reference< XModel >( mxOwnerDocument ).is(); for (auto& aName : maNameContainer.getElementNames()) { SfxLibrary* pImplLib = getImplLib( aName ); - if( pImplLib->mbPreload ) + if( pImplLib->mbPreload && !( bDocumentContainer && pImplLib->mbPasswordProtected ) ) { loadLibrary_Impl(aName, guard); } From c80b6acef58f8879a06976321df64ef0b71d43c7 Mon Sep 17 00:00:00 2001 From: Xisco Fauli Date: Thu, 1 Oct 2026 10:09:26 +0200 Subject: [PATCH 085/289] python3: upgrade to 3.13.16 Downloaded from https://www.python.org/ftp/python/3.13.16/Python-3.13.16.tar.xz Change-Id: Ic86fd03f87d26a96f7eb4e350b3766ce0992cdbb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211649 Tested-by: Jenkins Reviewed-by: Xisco Fauli --- configure.ac | 2 +- download.lst | 4 ++-- external/python3/ubsan.patch.0 | 6 +++--- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/configure.ac b/configure.ac index 81dc59a566b6..67f6f68965a3 100644 --- a/configure.ac +++ b/configure.ac @@ -10834,7 +10834,7 @@ if test \( "$cross_compiling" = yes -a -z "$PYTHON_FOR_BUILD" \) -o "$enable_pyt SYSTEM_PYTHON= PYTHON_VERSION_MAJOR=3 PYTHON_VERSION_MINOR=13 - PYTHON_VERSION=${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}.15 + PYTHON_VERSION=${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}.16 if ! grep -q -i python.*${PYTHON_VERSION} ${SRC_ROOT}/download.lst; then AC_MSG_ERROR([PYTHON_VERSION ${PYTHON_VERSION} but no matching file in download.lst]) fi diff --git a/download.lst b/download.lst index 09a8cb6bfe98..2fe3e0a8296d 100644 --- a/download.lst +++ b/download.lst @@ -581,8 +581,8 @@ POSTGRESQL_TARBALL := postgresql-15.19.tar.bz2 # three static lines # so that git cherry-pick # will not run into conflicts -PYTHON_SHA256SUM := 1e66a7945a48390ee4c2a4268a0e4185884059a13c4aab6d148aa208deea4a76 -PYTHON_TARBALL := Python-3.13.15.tar.xz +PYTHON_SHA256SUM := f4b1bfb3c79b5bb11b8d228a12504163b4c0dab4d679828d8f5f26b6cb6ab35d +PYTHON_TARBALL := Python-3.13.16.tar.xz # three static lines # so that git cherry-pick # will not run into conflicts diff --git a/external/python3/ubsan.patch.0 b/external/python3/ubsan.patch.0 index 0ae1e4abf281..07fc51205024 100644 --- a/external/python3/ubsan.patch.0 +++ b/external/python3/ubsan.patch.0 @@ -61,7 +61,7 @@ PyObject *key, *value; --- Parser/lexer/buffer.c +++ Parser/lexer/buffer.c -@@ -27,8 +27,8 @@ +@@ -29,8 +29,8 @@ for (index = tok->tok_mode_stack_index; index >= 0; --index) { mode = &(tok->tok_mode_stack[index]); @@ -69,6 +69,6 @@ - mode->f_string_multi_line_start = mode->f_string_multi_line_start_offset < 0 ? NULL : tok->buf + mode->f_string_multi_line_start_offset; + mode->f_string_start = mode->f_string_start_offset < 0 ? NULL : (char *) (((intptr_t) tok->buf) + mode->f_string_start_offset); + mode->f_string_multi_line_start = mode->f_string_multi_line_start_offset < 0 ? NULL : (char *) (((intptr_t) tok->buf) + mode->f_string_multi_line_start_offset); + mode->last_expr_start = mode->last_expr_start_offset < 0 + ? NULL : tok->buf + mode->last_expr_start_offset; } - } - From eec52071ef7b2f22ea7cf38b782b72e5cd63caa5 Mon Sep 17 00:00:00 2001 From: Mike Kaganski Date: Wed, 23 Sep 2026 16:50:28 +0500 Subject: [PATCH 086/289] tdf#157028 vcl: use object streams in an encrypted file too Object streams and a cross-reference stream shrink a tagged PDF, but I1e27dc3a8f43aa8b6c75ae930615c8d4b4645627 ("tdf#157028 vcl: write the structure tree into object streams") left an encrypted export out of both, so a password kept the whole structure tree uncompressed. The spreadsheet reported in tdf#166233, attachment 171182, exported tagged at 2368642 bytes, and at 13465120 with a password. The protected export is 2389620 bytes now, and what it has over the plain tagged one is what encryption itself costs. This writer encrypts a string as it builds the object. ISO 32000-2 7.5.7 forbids encrypting a string in an object stream separately: the stream that carries it is encrypted instead. So the strings of a stream-bound object go in plain now, and the object stream is encrypted as a whole, with the cipher set up for the stream's own object number rather than for the objects inside. The stream's /Length counts what the cipher adds. Only the structure elements and the ID tree put strings in a stream, so only those two builders ask getStringEncryptor for one, and it returns nothing while the file uses object streams. Signed-off-by: Mike Kaganski Change-Id: Ia6a063244baf456d7c7368a6bba7a8cbb96e31b0 Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/13370 Reviewed-by: Miklos Vajna Tested-by: Jenkins CPCI (cherry picked from commit 59193295323917bd065ea3a235f7653ad7f9b04b) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211655 Tested-by: Jenkins Reviewed-by: Xisco Fauli --- vcl/inc/pdf/pdfwriter_impl.hxx | 9 ++- .../cppunit/pdfexport/PDFEncryptionTest.cxx | 78 +++++++++++++++++++ vcl/source/pdf/pdfwriter_impl.cxx | 46 ++++++++--- 3 files changed, 122 insertions(+), 11 deletions(-) diff --git a/vcl/inc/pdf/pdfwriter_impl.hxx b/vcl/inc/pdf/pdfwriter_impl.hxx index 65366b43360e..c0b31a636aef 100644 --- a/vcl/inc/pdf/pdfwriter_impl.hxx +++ b/vcl/inc/pdf/pdfwriter_impl.hxx @@ -1094,7 +1094,14 @@ private: bool emitTrailer(); /// whether this file may carry object streams and a cross-reference stream bool useObjectStreams() const; - /// writes a whole object, into an object stream where the file may have one + /// what encrypts a string as an object is built, and nothing for an object bound for a stream + std::shared_ptr getStringEncryptor(sal_Int32 nObject); +#ifndef NDEBUG + /// objects whose strings went in plain, checked once the last object stream is flushed + std::unordered_set m_aPlainStringObjects; +#endif + /// writes a whole object, into an object stream where the file may have one; a body + /// holding strings takes its encryptor from getStringEncryptor bool writeObject(sal_Int32 nObject, std::string_view aBody); /// writes an object's body into the pending object stream rather than into the file bool writeCompressedObject(sal_Int32 nObject, std::string_view aBody); diff --git a/vcl/qa/cppunit/pdfexport/PDFEncryptionTest.cxx b/vcl/qa/cppunit/pdfexport/PDFEncryptionTest.cxx index b59cfe80feb0..bc10ec757fdf 100644 --- a/vcl/qa/cppunit/pdfexport/PDFEncryptionTest.cxx +++ b/vcl/qa/cppunit/pdfexport/PDFEncryptionTest.cxx @@ -12,16 +12,21 @@ #include #include +#include #include #include #include +#include #include #include #include #include +#include +#include +#include #include #include @@ -88,6 +93,79 @@ CPPUNIT_TEST_FIXTURE(PDFEncryptionTest, testEncryptionRoundtrip_PDF_1_7) CPPUNIT_ASSERT_EQUAL(17, nFileVersion); } +// encryption used to cost a tagged file its object streams, and so most of its size +CPPUNIT_TEST_FIXTURE(PDFEncryptionTest, testEncryptedTaggedUsesObjectStreams) +{ + loadFromURL(u"private:factory/swriter"_ustr); + auto xText = mxComponent.queryThrow()->getText(); + xText->setString(u"Some tagged text"_ustr); + // a footnote, because its element is the one this writer gives an /ID to + auto xFactory = mxComponent.queryThrow(); + auto xFootnote = xFactory->createInstance(u"com.sun.star.text.Footnote"_ustr) + .queryThrow(); + xText->insertTextContent(xText->getEnd(), xFootnote, false); + xFootnote.queryThrow()->setString(u"The note this refers to"_ustr); + + uno::Sequence aFilterData{ comphelper::makePropertyValue(u"UseTaggedPDF"_ustr, true), + comphelper::makePropertyValue(u"EncryptFile"_ustr, true), + comphelper::makePropertyValue(u"DocumentOpenPassword"_ustr, + u"secret"_ustr) }; + mxComponent.queryThrow()->storeToURL( + maTempFile.GetURL(), + { comphelper::makePropertyValue(u"FilterName"_ustr, u"writer_pdf_Export"_ustr), + comphelper::makePropertyValue(u"FilterData"_ustr, aFilterData) }); + + std::unique_ptr pPdfDocument + = parsePDFExport(vcl::pdf::PDFiumLibrary::get(), "secret"_ostr); + + // the structure tree went into object streams, which is what the encryption used to cost. + // Only strings and stream data are encrypted, so the stream's own dictionary reads plainly + const std::string_view aFile(static_cast(maMemory.GetData()), maMemory.GetSize()); + // an unencrypted export has object streams anyway, so the rest tests nothing without this + CPPUNIT_ASSERT(aFile.find("/Encrypt") != std::string_view::npos); + const size_t nObjStm = aFile.find("/ObjStm"); + CPPUNIT_ASSERT(nObjStm != std::string_view::npos); + + // /Length has to count what the cipher adds, or a reader that trusts it stops mid-block. + // pdfium does not: it scans for endstream, so only the byte count catches this + // the writer puts exactly one newline here, and the cipher's own first byte may be another + const size_t nData = aFile.find(">>\nstream\n", nObjStm); + CPPUNIT_ASSERT(nData != std::string_view::npos); + const size_t nLength = aFile.find("/Length ", nObjStm); + CPPUNIT_ASSERT(nLength != std::string_view::npos); + // inside this dictionary, so it is this stream's length and not a later object's + CPPUNIT_ASSERT_LESS(nData, nLength); + const sal_Int32 nDeclared = o3tl::toInt32(aFile.substr(nLength + 8, 12)); + CPPUNIT_ASSERT(nData + 10 + nDeclared + 10 <= aFile.size()); + CPPUNIT_ASSERT_EQUAL("\nendstream"_ostr, OString(aFile.substr(nData + 10 + nDeclared, 10))); + + // reading the footnote element's /ID back through the password distinguishes a plain + // string from one encrypted a second time + CPPUNIT_ASSERT_EQUAL(1, pPdfDocument->getPageCount()); + auto pPage = pPdfDocument->openPage(0); + CPPUNIT_ASSERT(pPage); + auto pTree = pPage->getStructureTree(); + CPPUNIT_ASSERT(pTree); + CPPUNIT_ASSERT_GREATER(0, pTree->getNumberOfChildren()); + + OUString aID; + const auto aFindID = [&aID](auto& rSelf, vcl::pdf::PDFiumStructureElement& rElement) -> void { + if (aID.isEmpty()) + aID = rElement.getID(); + for (int i = 0; i < rElement.getNumberOfChildren() && aID.isEmpty(); ++i) + { + if (const auto pKid = rElement.getChild(i)) + rSelf(rSelf, *pKid); + } + }; + for (int i = 0; i < pTree->getNumberOfChildren() && aID.isEmpty(); ++i) + { + if (const auto pChild = pTree->getChild(i)) + aFindID(aFindID, *pChild); + } + CPPUNIT_ASSERT(aID.startsWith("id")); +} + CPPUNIT_TEST_FIXTURE(PDFEncryptionTest, testEncryptionRoundtrip_PDF_2_0) { loadFromURL(u"private:factory/swriter"_ustr); diff --git a/vcl/source/pdf/pdfwriter_impl.cxx b/vcl/source/pdf/pdfwriter_impl.cxx index a235af9b7cd8..3459e15e2d12 100644 --- a/vcl/source/pdf/pdfwriter_impl.cxx +++ b/vcl/source/pdf/pdfwriter_impl.cxx @@ -844,15 +844,26 @@ bool PDFWriterImpl::useObjectStreams() const { if (m_aContext.Version < PDFWriter::PDFVersion::PDF_1_5) return false; - // a string in an object stream shall not be separately encrypted, while this writer - // encrypts every string as it builds the object - if (m_aContext.Encryption.canEncrypt()) - return false; // sdext reads the embedded original document out of a trailer, and a cross-reference // stream leaves none return m_aDocumentAttachedFiles.empty(); } +std::shared_ptr PDFWriterImpl::getStringEncryptor(sal_Int32 nObject) +{ + if (!useObjectStreams()) + return m_pPDFEncryptor; + +#ifndef NDEBUG + m_aPlainStringObjects.insert(nObject); +#else + (void)nObject; +#endif + // ISO 32000-2 7.5.7: a string in an object stream is not encrypted on its own, the + // stream carrying it is + return nullptr; +} + bool PDFWriterImpl::writeObject(sal_Int32 nObject, std::string_view aBody) { if (useObjectStreams()) @@ -895,14 +906,24 @@ bool PDFWriterImpl::emitObjectStream() aLine.append(OString::number(nStreamObject) + " 0 obj\n<(m_aCompressedObjects.size())) + "/First " + OString::number(nFirst) + "/Length " - + OString::number(static_cast(aStream.size()))); + + OString::number(calculateStreamSize(aStream.size()))); if (!g_bDebugDisableCompression) aLine.append("/Filter/FlateDecode"); aLine.append(">>\nstream\n"); - if (!updateObject(nStreamObject) || !writeBuffer(aLine) - || !writeBufferBytes(aStream.data(), aStream.size()) - || !writeBuffer("\nendstream\nendobj\n\n")) + if (!updateObject(nStreamObject) || !writeBuffer(aLine)) + return false; + + // ISO 32000-2 7.5.7: a string in here is not encrypted on its own, the stream holding + // it is, with the cipher set up for the stream's own object number + checkAndEnableStreamEncryption(nStreamObject); + // the strings inside are covered by nothing else, so stream encryption must really be on + assert((!m_aContext.Encryption.canEncrypt() + || (m_pPDFEncryptor && m_pPDFEncryptor->isStreamEncryptionEnabled())) + && "an object stream is going out unencrypted"); + const bool bBodies = writeBufferBytes(aStream.data(), aStream.size()); + disableStreamEncryption(); + if (!bBodies || !writeBuffer("\nendstream\nendobj\n\n")) return false; // only now can an entry name the stream, which is in the file @@ -958,7 +979,7 @@ sal_Int32 PDFWriterImpl::emitStructIDTree(sal_Int32 const nObject) ids.emplace(GenerateID(n), n); } OStringBuffer buf; - COSWriter aWriter(buf, m_aContext.Encryption.getParams(), m_pPDFEncryptor); + COSWriter aWriter(buf, m_aContext.Encryption.getParams(), getStringEncryptor(nObject)); buf.append("< Date: Wed, 30 Sep 2026 10:04:49 +0000 Subject: [PATCH 087/289] ofz#566755881 Out-of-memory MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Caolán McNamara Change-Id: I07ae0a230816dad69b12474601e600105b97fab6 Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/13882 Reviewed-by: Noel Grandin Tested-by: Jenkins CPCI (cherry picked from commit 851a5f7919c538a895ba850f49f5f5210988508e) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211666 Tested-by: Jenkins Reviewed-by: Xisco Fauli --- sw/source/writerfilter/rtftok/rtfdispatchvalue.cxx | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/sw/source/writerfilter/rtftok/rtfdispatchvalue.cxx b/sw/source/writerfilter/rtftok/rtfdispatchvalue.cxx index 408a586fbc59..c990b14097d7 100644 --- a/sw/source/writerfilter/rtftok/rtfdispatchvalue.cxx +++ b/sw/source/writerfilter/rtftok/rtfdispatchvalue.cxx @@ -263,6 +263,15 @@ bool RTFDocumentImpl::dispatchCharacterAttributeValue(RTFKeyword nKeyword, int n bool RTFDocumentImpl::dispatchParagraphSprmValue(RTFKeyword nKeyword, int nParam) { + // far deeper table nesting than any real document uses + constexpr int nMaxTableDepth = 1024; + if (nKeyword == RTFKeyword::ITAP && nParam > nMaxTableDepth) + { + SAL_WARN("writerfilter.rtf", + "table nesting depth " << nParam << " limited to " << nMaxTableDepth); + nParam = nMaxTableDepth; + } + int nSprm = 0; tools::SvRef pIntValue(new RTFValue(nParam)); From 0e64bd4f89e96ccec336dd3f6df8bb9f6c3d40f1 Mon Sep 17 00:00:00 2001 From: Neil Roberts Date: Wed, 23 Sep 2026 15:53:38 +0200 Subject: [PATCH 088/289] tdf#173585 sw: Add a unit test for when findAll finds no results The test replicates the instructions in the bug report. Jenkins is building with optimisations for MacOS so the test should be able to catch the original problem if it were to regress. Change-Id: Ia8fd381be15ef3986fdb1f515be45097abf614ff Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211377 Tested-by: Jenkins Reviewed-by: Dan Williams Reviewed-by: Neil Roberts --- sw/qa/extras/uiwriter/uiwriter7.cxx | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/sw/qa/extras/uiwriter/uiwriter7.cxx b/sw/qa/extras/uiwriter/uiwriter7.cxx index 3c1ea262135e..1f87027e6eaf 100644 --- a/sw/qa/extras/uiwriter/uiwriter7.cxx +++ b/sw/qa/extras/uiwriter/uiwriter7.cxx @@ -22,6 +22,7 @@ #include #include #include +#include #include #include @@ -405,6 +406,30 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest7, testTextSearch) pCursor->GetPointNode().GetTextNode()->GetText()); } +CPPUNIT_TEST_FIXTURE(SwUiWriterTest7, testTextSearchNoResults) +{ + // Check searching for a string with no matches. This should check tdf#173585 + + // Create a new empty Writer document + createSwDoc(); + + // Search for “Hello” in italics + uno::Reference xSearch(mxComponent, uno::UNO_QUERY_THROW); + uno::Reference xSearchDescriptor(xSearch->createSearchDescriptor(), + uno::UNO_QUERY_THROW); + + xSearchDescriptor->setSearchString(u"Hello"_ustr); + + uno::Sequence aAttributes(comphelper::InitPropertySequence( + { { "CharPosture", uno::Any(css::awt::FontSlant_ITALIC) } })); + xSearchDescriptor->setSearchAttributes(aAttributes); + + uno::Reference xIndex = xSearch->findAll(xSearchDescriptor); + + // There should be no matches + CPPUNIT_ASSERT_EQUAL(sal_Int32(0), xIndex->getCount()); +} + CPPUNIT_TEST_FIXTURE(SwUiWriterTest7, testTdf131431) { // the goal of this test is to check if replaceAll does not go into an infinite loop From e1288295dd3121d97dba2a0176517c39d5ab5f9e Mon Sep 17 00:00:00 2001 From: Xisco Fauli Date: Thu, 1 Oct 2026 11:51:17 +0200 Subject: [PATCH 089/289] harfbuzz: upgrade to 14.5.1 Downloaded from https://github.com/harfbuzz/harfbuzz/releases/download/14.5.1/harfbuzz-14.5.1.tar.xz Change-Id: I3e3c5cb6eed0cbee69edb34ced5dbf40c248b30e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211665 Reviewed-by: Xisco Fauli Tested-by: Jenkins --- download.lst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/download.lst b/download.lst index 2fe3e0a8296d..e5c4dcf6343f 100644 --- a/download.lst +++ b/download.lst @@ -287,8 +287,8 @@ GRAPHITE_TARBALL := graphite2-minimal-1.3.15.tgz # three static lines # so that git cherry-pick # will not run into conflicts -HARFBUZZ_SHA256SUM := b7132e148358a45185c9feafd049dbaf243649d3c44414b3534d9c95d18592b9 -HARFBUZZ_TARBALL := harfbuzz-14.5.0.tar.xz +HARFBUZZ_SHA256SUM := 7e2fa4e8c7c98e8d8140671f5772542afaaa6acccfbd746506886b6d85f7f8d6 +HARFBUZZ_TARBALL := harfbuzz-14.5.1.tar.xz # three static lines # so that git cherry-pick # will not run into conflicts From 2bb3fe5cce699d615d9d65442d9a673846484e34 Mon Sep 17 00:00:00 2001 From: Aron Budea Date: Mon, 7 Sep 2026 15:50:03 +0930 Subject: [PATCH 090/289] cool#16124 Should be able to edit text after selecting image in bg When image is wrapped through in document body. Separate part of SwFEShell::ShouldObjectBeSelected() to SwFEShell::IsTextOverBgObjectAt(), and use it to detect text overlapping background image. Handle case when DocumentSettingId::PAINT_HELL_OVER_HEADER_FOOTER is set. (see eg. SwFlyFrame::InitDrawObj()) Not part of this change: updating mouse pointer over objects/text. Related to b860aea9d6f8ac46f6d2575ead25337495ec9a88, which introduced special handling of PAINT_HELL_OVER_HEADER_FOOTER for DOCX compatibility. Change-Id: I571942a43c3c1d5a5be5906fcce08640739e6493 Signed-off-by: Aron Budea Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/11523 Tested-by: Jenkins CPCI Reviewed-by: Mike Kaganski (cherry picked from commit 3bae82eb865b2568506417349d2f3a62bfd775e8) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211680 Tested-by: Jenkins Reviewed-by: Xisco Fauli --- sw/inc/fesh.hxx | 2 + sw/source/core/frmedt/feshview.cxx | 122 +++++++++++++++-------------- sw/source/uibase/docvw/edtwin.cxx | 26 ++++-- 3 files changed, 87 insertions(+), 63 deletions(-) diff --git a/sw/inc/fesh.hxx b/sw/inc/fesh.hxx index bc14afba28bd..7df474767099 100644 --- a/sw/inc/fesh.hxx +++ b/sw/inc/fesh.hxx @@ -299,6 +299,8 @@ public: /// Same as IsObjSelectable(), but return the object as well. SdrObject* GetObjAt(const Point& rPt); bool IsInsideSelectedObj( const Point& rPt ); ///< returns enum values + /** Returns true if it is background object, and is covered by text at the given point. */ + bool IsTextOverBgObjectAt(const Point& rPt, const SdrObject* pObj); /** Test if there is a draw object at that position and if it should be selected. The 'should' is aimed at Writer text fly frames which may be in front of the draw object. */ diff --git a/sw/source/core/frmedt/feshview.cxx b/sw/source/core/frmedt/feshview.cxx index 28fdfb6dc8fd..7e090e127c3e 100644 --- a/sw/source/core/frmedt/feshview.cxx +++ b/sw/source/core/frmedt/feshview.cxx @@ -1365,6 +1365,67 @@ SdrObject* SwFEShell::GetObjAt( const Point& rPt ) return pRet; } +bool SwFEShell::IsTextOverBgObjectAt(const Point& rPt, const SdrObject* pObj) +{ + // Can return false in a number of cases, eg. when not background object + if (!pObj) + return false; + + // #i89920# + // Do not select object in background which is overlapping this text + // at the given position. + const SwContact* pContact = ::GetUserCall(pObj); + if (!pContact) + return false; + + const SwAnchoredObject* pAnchoredObj = pContact->GetAnchoredObj(pObj); + const SwFrameFormat* pFormat = pAnchoredObj->GetFrameFormat(); + const SwFormatSurround& rSurround = pFormat->GetSurround(); + // Function only relevant for objects with Through wrap + if (rSurround.GetSurround() != css::text::WrapTextMode_THROUGH) + return false; + + // Not background object + const SdrLayerID nLayerId = pObj->GetLayer(); + const IDocumentDrawModelAccess& rIDDMA = getIDocumentDrawModelAccess(); + if (nLayerId != rIDDMA.GetHeaderFooterHellId() && nLayerId != rIDDMA.GetHellId()) + return false; + + const SwPageFrame* pPageFrame = GetLayout()->GetPageAtPos(rPt); + const SwContentFrame* pContentFrame(pPageFrame?pPageFrame->ContainsContent():nullptr); + while (pContentFrame) + { + if (pContentFrame->UnionFrame().Contains(rPt)) + { + const SwTextFrame* pTextFrame = pContentFrame->DynCastTextFrame(); + if (pTextFrame) + { + SwPosition aPos(GetDoc()->GetNodes()); + Point aTmpPt(rPt); + if (pTextFrame->GetKeyCursorOfst(&aPos, aTmpPt)) + { + SwRect aCursorCharRect; + if (pTextFrame->GetCharRect(aCursorCharRect, aPos)) + { + if (aCursorCharRect.Overlaps(SwRect(pObj->GetLastBoundRect()))) + { + return true; + } + } + } + } + else + { + return true; + } + break; + } + + pContentFrame = pContentFrame->GetNextContentFrame(); + } + return false; +} + // Test if there is an object at that position and if it should be selected. bool SwFEShell::ShouldObjectBeSelected(const Point& rPt, bool *pSelectFrameInsteadOfCroppedImage) { @@ -1384,64 +1445,8 @@ bool SwFEShell::ShouldObjectBeSelected(const Point& rPt, bool *pSelectFrameInste if (pObj) { - bRet = true; - const IDocumentDrawModelAccess& rIDDMA = getIDocumentDrawModelAccess(); - // #i89920# - // Do not select object in background which is overlapping this text - // at the given position. - bool bObjInBackground( false ); - if ( pObj->GetLayer() == rIDDMA.GetHellId() ) - { - if (const SwContact* pContact = ::GetUserCall( pObj )) - { - const SwAnchoredObject* pAnchoredObj = pContact->GetAnchoredObj( pObj ); - const SwFrameFormat* pFormat = pAnchoredObj->GetFrameFormat(); - const SwFormatSurround& rSurround = pFormat->GetSurround(); - if ( rSurround.GetSurround() == css::text::WrapTextMode_THROUGH ) - { - bObjInBackground = true; - } - } - } - if ( bObjInBackground ) - { - const SwPageFrame* pPageFrame = GetLayout()->GetPageAtPos( rPt ); - if( pPageFrame ) - { - const SwContentFrame* pContentFrame( pPageFrame->ContainsContent() ); - while ( pContentFrame ) - { - if ( pContentFrame->UnionFrame().Contains( rPt ) ) - { - const SwTextFrame* pTextFrame = pContentFrame->DynCastTextFrame(); - if ( pTextFrame ) - { - SwPosition aPos(GetDoc()->GetNodes()); - Point aTmpPt( rPt ); - if (pTextFrame->GetKeyCursorOfst(&aPos, aTmpPt)) - { - SwRect aCursorCharRect; - if (pTextFrame->GetCharRect(aCursorCharRect, - aPos)) - { - if ( aCursorCharRect.Overlaps( SwRect( pObj->GetLastBoundRect() ) ) ) - { - bRet = false; - } - } - } - } - else - { - bRet = false; - } - break; - } - - pContentFrame = pContentFrame->GetNextContentFrame(); - } - } - } + // Text in front takes precedence over background object + bRet = !IsTextOverBgObjectAt(rPt, pObj); // Don't select header / footer objects in body edition and vice-versa SwContact* pContact = static_cast(pObj->GetUserCall()); @@ -1457,6 +1462,7 @@ bool SwFEShell::ShouldObjectBeSelected(const Point& rPt, bool *pSelectFrameInste if ( bRet ) { + const IDocumentDrawModelAccess& rIDDMA = getIDocumentDrawModelAccess(); const SdrPage* pPage = rIDDMA.GetDrawModel()->GetPage(0); for(auto it = pPage->begin() + pObj->GetOrdNum() + 1; it != pPage->end(); ++it) { diff --git a/sw/source/uibase/docvw/edtwin.cxx b/sw/source/uibase/docvw/edtwin.cxx index 563810ddc5ea..e795b67f3e08 100644 --- a/sw/source/uibase/docvw/edtwin.cxx +++ b/sw/source/uibase/docvw/edtwin.cxx @@ -3346,8 +3346,9 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt) bool bHitHandle = pHdl && pHdl->GetKind() != SdrHdlKind::Anchor && pHdl->GetKind() != SdrHdlKind::Anchor_TR; - if ((rSh.IsInsideSelectedObj(aDocPos) || bHitHandle) - && (aMEvt.GetModifier() != KEY_SHIFT || bHitHandle)) + if ((rSh.IsInsideSelectedObj(aDocPos) + && !rSh.IsTextOverBgObjectAt(aDocPos, rSh.GetObjAt(aDocPos)) + && aMEvt.GetModifier() != KEY_SHIFT) || bHitHandle) { rSh.EnterSelFrameMode( &aDocPos ); if ( !m_pApplyTempl ) @@ -3471,8 +3472,8 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt) bOnlyText = KEY_MOD1 != aMEvt.GetModifier(); } else if ( rSh.IsSelFrameMode() && - (m_aActHitType == SdrHitKind::NONE || - !rSh.IsInsideSelectedObj( aDocPos ))) + (m_aActHitType == SdrHitKind::NONE || !rSh.IsInsideSelectedObj(aDocPos) + || rSh.IsTextOverBgObjectAt(aDocPos, rSh.GetObjAt(aDocPos))) ) { m_rView.NoRotate(); SdrHdl *pHdl; @@ -3493,6 +3494,11 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt) if (aMEvt.IsMod1()) nFlag = nFlag | SW_ENTER_GROUP; + // UnSelectFrame() might affect result, calculate here to agree + // with previous IsInsideSelectedObj() + const bool bTextOverBgObject + = rSh.IsTextOverBgObjectAt(aDocPos, rSh.GetObjAt(aDocPos)); + if ( rSh.IsSelFrameMode() ) { rSh.UnSelectFrame(); @@ -3500,7 +3506,17 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt) m_rView.AttrChangedNotify(nullptr); } - bool bSelObj = rSh.SelectObj( aDocPos, nFlag ); + bool bSelObj = false; + if ( !bTextOverBgObject ) + { + bSelObj = rSh.SelectObj(aDocPos, nFlag); + } + else + { + // to show caret + bOnlyText = true; + } + if( bUnLockView ) rSh.LockView( false ); From d615c8f532a1e82bc117bf650a6f652a53d0ac97 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Attila=20Sz=C5=B1cs?= Date: Mon, 28 Sep 2026 04:24:25 +0200 Subject: [PATCH 091/289] sw: DOCX import: fix z-order of a shape over a shape with a text box MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit A shape that goes over a shape with a text box was put one place too high and ended up over the shapes that should have covered it. Regression from commit da7414e63578c17adb7f5f3345fa2143f0bc769c (sw: fix setting mbIsTextBox on shapes' text boxes). GraphicZOrderHelper::findZOrder() works out where a shape goes by reading the z-order of the shape it is to sit on and adding to it. 200cd2b99bee (tdf#138995 DOCX import: fix handling of textbox zorders) made it add one more place when that shape has a text box, since a shape and its text box are two objects and going over the pair means passing both. The z-order it reads back, though, is the one SwXShape reports, and that is SwTextBoxHelper::getOrdNum(), which leaves the text frames out. Until de070c8e5932 nothing set the flag it asks for: SetTextBox(true) was called on the shape's SdrObject, which is not a SwFlyDrawObj, so IsTextBox() stayed false, the text frames were counted like any other object, and the extra place was right. Now that the flag reaches the text frame, a shape and its text box take a single place in that numbering, so the extra place is one too many. 200cd2b99bee noted that it was needed until there is a setter version of SwTextBoxHelper::getOrdNum(); that setter still does not exist, but the numbers the filter reads back no longer count the text frames, so there is nothing left for the extra place to skip. Signed-off-by: Attila Szűcs Change-Id: Id8d6746c3832e5e512cb0a970d07440f1afb67bc Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/13659 Tested-by: Jenkins CPCI Reviewed-by: Stephan Bergmann Reviewed-by: Michael Stahl (cherry picked from commit eb4fe084855f60a41de4493aa289160ba074e14c) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211667 Reviewed-by: Xisco Fauli Tested-by: Jenkins --- sw/qa/core/doc/data/textbox-shape-zorder.docx | Bin 0 -> 1412 bytes sw/qa/core/doc/doc.cxx | 32 ++++++++++++++++++ .../writerfilter/dmapper/GraphicHelpers.cxx | 17 +++------- 3 files changed, 36 insertions(+), 13 deletions(-) create mode 100644 sw/qa/core/doc/data/textbox-shape-zorder.docx diff --git a/sw/qa/core/doc/data/textbox-shape-zorder.docx b/sw/qa/core/doc/data/textbox-shape-zorder.docx new file mode 100644 index 0000000000000000000000000000000000000000..11e43241e44ece6f3d79ef40badae5b518deda05 GIT binary patch literal 1412 zcmWIWW@Zs#U|`^2xWH`_D?Wqa`fDI>6C(qIFp!RR&d)1J%`1rysVqn>j@7Hk&8ZDI z>Bnryv-h*;#Pu0!%h^1|Fv`{`%%%wuJe_?7AUk`{gk!QE+t9z(Ft3ht2|M{V%nG$mrZmugktty!`?OJpGc@GEi^YSl}pPtqaKnWZBwf}yt2Zo6b zFl@MibbL{2PO-ioi0nOY&3DLvhvCB9V3&KDQEV*%&f+asM5i*lbj}Vlkw5zI^6klu zj9P4N|L48kRe7uPuHmH@a~oD^G%gH|>p#b_qh$G4J_*&ATjuO>W;7NuX%DSE=DEzq z`LIMs>XC^Jic2>NXaeP<<(phJS|$zo;PB_nyXAntF;sE z%6yQ&^ZoCN4==8sUF241z#^mFE|w=%?f-m*xT^9u(tm!(;t#8;I0C4|l1P_lxFqbZKJgG3;b)>a*S5 zcRAwo^qlRP-(Q!%t+`MlbYJ3qeG%B}OW%T$+)qeWX%`R0nUFZT`0+BM1NXETe&l+&|huHKu?lkA?Y)@gmE zP4mX;EmMyizM@ySI5%_6vNM)D9Jy?KFDvVChOc)a{gmS?j!3g!esY^?vuK#^E{hF3AhdE`8q0H};kl zs+s&fc}i^3+PI(VUo~+u#x@HnwdB29(9dF6xUjazbaz@!WOamBpmxRsAG3*B(r$O& zNxrS9IQaVEkEvIU+(WvjhOBsz^lsHD!+4)dA1se9K3aF{Q%~mnZyCHBQ!+bOexDhy zQk&&@^O*Bp+9Qwta@j`MS6FZkB_>%qH%1jB1T^?gpOG{{7*kmBM=seN1{eY@SkMoz>ko)B6HOu6Q%+jPu|5^ z?E1Wa`^ztHbFFIm&E|eH`+Mwk&<6hYKAB&3drhjV_0QgGo}RXM`mqXE=Jko}=r2fHxzP2s7?t3z&+* zpaGawu@++J2B7C{h;{~s21Xg65lA^5T_bwtL1_E})QFLl0=!w-KuVZ_a3_%7$^zm6 E06`&PwEzGB literal 0 HcmV?d00001 diff --git a/sw/qa/core/doc/doc.cxx b/sw/qa/core/doc/doc.cxx index 564b938ebd60..47b041342a77 100644 --- a/sw/qa/core/doc/doc.cxx +++ b/sw/qa/core/doc/doc.cxx @@ -240,6 +240,38 @@ CPPUNIT_TEST_FIXTURE(SwCoreDocTest, testTextBoxZOrder) CPPUNIT_ASSERT_EQUAL(static_cast(2), pEllipseShape->GetOrdNum()); } +CPPUNIT_TEST_FIXTURE(SwCoreDocTest, testShapeZOrderOverTextBox) +{ + // Given a document with a shape that has a text box at the bottom and two plain shapes over + // it, the three of them asking for that order: + createSwDoc("textbox-shape-zorder.docx"); + + // Then the shapes have to keep the order the document gives them. + uno::Reference xBottom(getShapeByName(u"WithTextBox"), uno::UNO_QUERY); + uno::Reference xMiddle(getShapeByName(u"Middle"), uno::UNO_QUERY); + uno::Reference xTop(getShapeByName(u"Top"), uno::UNO_QUERY); + CPPUNIT_ASSERT(xBottom.is()); + CPPUNIT_ASSERT(xMiddle.is()); + CPPUNIT_ASSERT(xTop.is()); + + sal_Int32 nBottom = 0; + sal_Int32 nMiddle = 0; + sal_Int32 nTop = 0; + xBottom->getPropertyValue(u"ZOrder"_ustr) >>= nBottom; + xMiddle->getPropertyValue(u"ZOrder"_ustr) >>= nMiddle; + xTop->getPropertyValue(u"ZOrder"_ustr) >>= nTop; + + // Without the accompanying fix in place, this test would have failed with: + // - Expected: 1 + // - Actual : 2 + // The shape over the text box was put one place too high and ended up over the shape that5 + // should have covered it: the import added a place for the text frame of the text box, + // which the z-order it read back does not count. + CPPUNIT_ASSERT_EQUAL(static_cast(0), nBottom); + CPPUNIT_ASSERT_EQUAL(static_cast(1), nMiddle); + CPPUNIT_ASSERT_EQUAL(static_cast(2), nTop); +} + CPPUNIT_TEST_FIXTURE(SwCoreDocTest, testTextBoxMakeFlyFrame) { // Given a document with an as-char textbox (as-char draw format + at-char fly format): diff --git a/sw/source/writerfilter/dmapper/GraphicHelpers.cxx b/sw/source/writerfilter/dmapper/GraphicHelpers.cxx index 7ba57f9b778a..76b0bc5820ff 100644 --- a/sw/source/writerfilter/dmapper/GraphicHelpers.cxx +++ b/sw/source/writerfilter/dmapper/GraphicHelpers.cxx @@ -356,19 +356,10 @@ sal_Int32 GraphicZOrderHelper::findZOrder(sal_Int64 relativeHeight, bool bOldSty --it; itemZOrderOffset = 1; // after the topmost - // Check if this shape has a textbox. If so, the textbox will have its own ZOrder, so - // suggest a larger offset. - bool bTextBox = false; - uno::Reference xShape = it->second; - uno::Reference xInfo = xShape->getPropertySetInfo(); - if (xInfo->hasPropertyByName(u"TextBox"_ustr)) - { - xShape->getPropertyValue(u"TextBox"_ustr) >>= bTextBox; - } - if (bTextBox) - { - ++itemZOrderOffset; - } + // The z-order read below is the one SwXShape reports, which counts the shapes only: + // SwTextBoxHelper::getOrdNum() leaves the text frame of a shape with a text box out of it. + // So a shape and its text box take one place here, not two, and the offset above + // already puts this shape after both of them. } // SwXFrame::getPropertyValue throws uno::RuntimeException // when its GetFrameFormat() returns nullptr From bb952370f75fbcd7f09f65bc6dffa97428422670 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Attila=20Sz=C5=B1cs?= Date: Thu, 24 Sep 2026 12:00:32 +0200 Subject: [PATCH 092/289] tdf#169795 sw: fix crashes around tracked changes in cells with formula MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Copying a cell over another one with change recording on could crash, or destroy the tracked change it had just recorded when the target cell had a number format. The root cause was that formulas and formatted numbers overwrite existing cells and destroy some tracked changes.. The cursor could point to a character that is not exist anymore. So, first i made some cursor position fix in some key points to avoid some crashes. Then disabled tracked changes when a cell with formula is changed. Every time it was recalculated, it generated a new tracked change. Normally if we want it to be tracked, we should track the formula inside, not the visible value .. but we don't have that type of tracked change. ChgTextToNum() could also generate lost tracked changes: If we copied a formatted number cell content to an other similar cell, (for example a currency like $1,000.00 to $10.00) by replacing the text ... then at first it generated a cell content like $1,000.00($10.00) where ($10.00) is a delete change.. Then the ChgTextToNum() reformatted the cell.. and overwritten it with the $1,000.00 ... so we lost the delete change. now i changed it so it can keep tracked deletion changes as well (it was able to store some insert changes) and then it checked if the format is fine for the real text .. If it is, then it will leave it.. so tracked changes survive. If the format is not good, then i keep the old way of working to replace cell with the new value... and make it 1 insert tracked change I do this to avoid complex problems.. because at format changes a lot of things can change.. position of the characters .. and it could be a confusion where the old delete change should start from. It would need more planning to figure out a way to handle it. Side note: in some cases if we modify the value of the formatted number cell to something that does not fit the format, it can lose the formation and change to pure text. (so all track changes will work on it) like if you change this: $1,123,234.00 -> $1,123234.00 (This is not my change. i just mentioned this behavior.) Signed-off-by: Attila Szűcs Change-Id: I152ec4720ec8e133800186c7e5787fe0f6954fc8 Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/13456 Tested-by: Jenkins CPCI Reviewed-by: Stephan Bergmann (cherry picked from commit 699b9cb056cb283fc2699763e1a2340e12680c3f) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211684 Tested-by: Jenkins Reviewed-by: Xisco Fauli --- sw/inc/crsrsh.hxx | 4 +- sw/qa/core/undo/data/tdf169795.odt | Bin 0 -> 13287 bytes sw/qa/core/undo/undo.cxx | 180 +++++++++++++++++++++++++++++ sw/source/core/crsr/crsrsh.cxx | 19 +++ sw/source/core/doc/tblcpy.cxx | 17 ++- sw/source/core/inc/UndoTable.hxx | 6 +- sw/source/core/table/swtable.cxx | 21 +++- sw/source/core/txtnode/txtedt.cxx | 6 +- sw/source/core/undo/untbl.cxx | 102 ++++++++++++++-- 9 files changed, 332 insertions(+), 23 deletions(-) create mode 100755 sw/qa/core/undo/data/tdf169795.odt diff --git a/sw/inc/crsrsh.hxx b/sw/inc/crsrsh.hxx index d21dac474ced..288bd88f202c 100644 --- a/sw/inc/crsrsh.hxx +++ b/sw/inc/crsrsh.hxx @@ -664,7 +664,7 @@ public: // select a table row, column or box (based on the current cursor) bool SelTableRow() { return SelTableRowOrCol( true ); } bool SelTableCol() { return SelTableRowOrCol( false ); } - bool SelTableBox(); + SW_DLLPUBLIC bool SelTableBox(); SW_DLLPUBLIC bool SelTable(); @@ -870,7 +870,7 @@ public: bool CheckTableBoxContent( const SwPosition* pPos = nullptr ); void SaveTableBoxContent( const SwPosition* pPos = nullptr ); void ClearTableBoxContent(); - bool EndAllTableBoxEdit(); + SW_DLLPUBLIC bool EndAllTableBoxEdit(); void SetSelTableCells( bool bFlag ) { m_bSelTableCells = bFlag; } bool IsSelTableCells() const { return m_bSelTableCells; } diff --git a/sw/qa/core/undo/data/tdf169795.odt b/sw/qa/core/undo/data/tdf169795.odt new file mode 100755 index 0000000000000000000000000000000000000000..c675f82c7ed58d8caf4cc4ea1c8e56dd17b152cc GIT binary patch literal 13287 zcmeHuWmH_twk`yh03mqrKyY`0CAhmwu%@xbT|;muxVyU(+#7dycXx+J_8mEUpL^eV zf8L+>u zD}bJrmAQ$5o}G!M1%rcyA-$!Zt%)tYr4_)!(9*yj1hBB9w*xrY$^Eq$JUskgi@oyy zi;!P?AUz8cBY>?Py^W#KP}GoxHzS(Q36C#ecvgS`2F8Z6zuq*hjm=LDhT%LBeYqtp zN<}`qa6fHwqf~@tC9FE>NDsd^xH7+8iPeCLykE??W{-xuk-k1>fqQtwOVZE%8q;flvggejht;{014xZkE^!d9L=1qxBx$<_Ygi z9^F%#u#ws20OZ^)oz>>@V=eC$w-{rWV*?laiSDzNkI}lx%*V3(jh~%gcAn`+UU1jT zsvU&P1%|VL_YphQ=S0e)Wpa{m@YOfQ<1mmA5Z+J_5dWpVKYQ^n-Mx0uUYnq$g^>x+ z-sZ1euw`cW&&o!8oo#F9Y!0xccLJFoX)akVvZH&pw(4h)-h7grM_p*d&O?Pnp^Mo3 zE_rVy3!|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-K zCXMUD&crWUZRhE98%@_P=Y2i@q;PkH{M{`i@Nmg0f)|R>QHpeaLZ2YR`9^@X5stSA zs}DRHMnQBie~f?vlao_L#{=na;0V3mKqw@SFR9OzE`w;vA*^&}A@Z=ex3B{<%NH~Jt;WgR;o9Y zaT@9{ZK_DjtnR;9~kvi;d<*T$KJ=LXMWjGaOOIqkY zpGCwYd$EP$TJ`#n$s~IWrO@U%KwR^jS2|v?x9O<5TunfsEqu{6Ou?48t=bb}5NTOj zWpMhs$-}_<#LHi)MQJhlPxWxGdHsBULNEWj)FRB+6JJ_b=?k5>j0nTON&sHZ{*owZ z(@sV--y1I9v060=No?V+zRc10*>G}4KUs)FeLTL}JoJB((UKtcJG^9ZS#kYnQuSF~ zk$^LvUtnX4h4gn6<&2lUE`L;biKD%EXy{7xa!H;3YyD+>4 zyU70vc0s!cH5z}D^lSHD+x1$p@rUzIcMuh)e-osaD`Og%#|IYc( zK;iF*@!wSNs>Iham%rl2f4Kg9%l{rk{F`eK>pzDS|E%&y>VLi|zY*}?q)hp5c=*3F k{&T~Bzesh$OV1G|Tc)f7mKtR+p{r>d70CGcOumAu6 literal 0 HcmV?d00001 diff --git a/sw/qa/core/undo/undo.cxx b/sw/qa/core/undo/undo.cxx index 339fed31c1f2..5355eb4e9249 100644 --- a/sw/qa/core/undo/undo.cxx +++ b/sw/qa/core/undo/undo.cxx @@ -25,6 +25,17 @@ #include #include #include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include /// Covers sw/source/core/undo/ fixes. class SwCoreUndoTest : public SwModelTestBase @@ -105,6 +116,175 @@ CPPUNIT_TEST_FIXTURE(SwCoreUndoTest, testTableCopyRedline) pWrtShell->Undo(); } +namespace +{ +/// Put the view cursor into the given cell of the given table. +void lcl_GotoCell(const uno::Reference& xComponent, SwXTextDocument* pTextDoc, + const OUString& rTable, const OUString& rCell) +{ + uno::Reference xSupplier(xComponent, uno::UNO_QUERY_THROW); + uno::Reference xTable(xSupplier->getTextTables()->getByName(rTable), + uno::UNO_QUERY_THROW); + uno::Reference xCell(xTable->getCellByName(rCell), uno::UNO_QUERY_THROW); + uno::Reference xCursorSupplier(pTextDoc->getCurrentController(), + uno::UNO_QUERY_THROW); + xCursorSupplier->getViewCursor()->gotoRange(xCell->getStart(), /*bExpand=*/false); +} + +/// The text of the given cell of the given table. +OUString lcl_GetCellText(const uno::Reference& xComponent, const OUString& rTable, + const OUString& rCell) +{ + uno::Reference xSupplier(xComponent, uno::UNO_QUERY_THROW); + uno::Reference xTable(xSupplier->getTextTables()->getByName(rTable), + uno::UNO_QUERY_THROW); + uno::Reference xCell(xTable->getCellByName(rCell), uno::UNO_QUERY_THROW); + return xCell->getString(); +} + +/// The formula of the given cell of the given table, empty when it holds none. +OUString lcl_GetCellFormula(const uno::Reference& xComponent, + const OUString& rTable, const OUString& rCell) +{ + uno::Reference xSupplier(xComponent, uno::UNO_QUERY_THROW); + uno::Reference xTable(xSupplier->getTextTables()->getByName(rTable), + uno::UNO_QUERY_THROW); + uno::Reference xCell(xTable->getCellByName(rCell)); + CPPUNIT_ASSERT(xCell.is()); + return xCell->getFormula(); +} + +/// The tracked changes of the document, as a ":" list. +OUString lcl_GetRedlines(SwDoc* pDoc) +{ + OUString aRet; + const SwRedlineTable& rTable = pDoc->getIDocumentRedlineAccess().GetRedlineTable(); + for (SwRedlineTable::size_type i = 0; i < rTable.size(); ++i) + { + if (!aRet.isEmpty()) + aRet += " "; + aRet += SwRedlineTypeToOUString(rTable[i]->GetType()) + ":" + rTable[i]->GetText(); + } + return aRet; +} + +/// Every cursor position has to stay inside the text of the node it points at. +void lcl_AssertCursorInText(SwWrtShell* pWrtShell) +{ + for (const SwPaM& rPaM : pWrtShell->GetCursor()->GetRingContainer()) + { + for (const SwPosition* pPos : { rPaM.GetPoint(), rPaM.GetMark() }) + { + const SwContentNode* pContentNode = pPos->GetNode().GetContentNode(); + if (!pContentNode) + continue; + CPPUNIT_ASSERT_LESSEQUAL(pContentNode->Len(), pPos->GetContentIndex()); + } + } +} +} + +CPPUNIT_TEST_FIXTURE(SwCoreUndoTest, testTdf169795CopyCellWithFormula) +{ + // Given a document with two tables and change recording enabled, where the cell to copy + // holds a formula and the cell to copy it over does not: + createSwDoc("tdf169795.odt"); + SwDocShell* pDocShell = getSwDocShell(); + SwWrtShell* pWrtShell = pDocShell->GetWrtShell(); + SwXTextDocument* pTextDoc = getSwTextDoc(); + SwDoc* pDoc = pWrtShell->GetDoc(); + pDoc->getIDocumentRedlineAccess().SetRedlineFlags(RedlineFlags::On | RedlineFlags::ShowInsert + | RedlineFlags::ShowDelete); + CPPUNIT_ASSERT_EQUAL(OUString(), lcl_GetCellFormula(mxComponent, u"Table1"_ustr, u"D2"_ustr)); + + // When copying that whole cell, "$100.00", over "$10.00": + lcl_GotoCell(mxComponent, pTextDoc, u"Table2"_ustr, u"D3"_ustr); + pWrtShell->SelTableBox(); + rtl::Reference pTransfer = new SwTransferable(*pWrtShell); + pTransfer->Copy(); + TransferableDataHelper aHelper(pTransfer); + lcl_GotoCell(mxComponent, pTextDoc, u"Table1"_ustr, u"D2"_ustr); + pWrtShell->SelTableBox(); + SwTransferable::Paste(*pWrtShell, aHelper); + + // Then no change is recorded over the cell: what it shows is worked out from the formula in + // its new place, not text that somebody wrote, so there is nothing to accept or reject. + // Without the accompanying fix in place, the copy was recorded as a change over text that + // the recalculation then rewrote, and the records left over that text described text that + // was no longer there. + CPPUNIT_ASSERT_EQUAL(OUString(), lcl_GetRedlines(pDoc)); + CPPUNIT_ASSERT(!lcl_GetCellFormula(mxComponent, u"Table1"_ustr, u"D2"_ustr).isEmpty()); + CPPUNIT_ASSERT_EQUAL(u"$10.00"_ustr, lcl_GetCellText(mxComponent, u"Table1"_ustr, u"D2"_ustr)); + + // And undo takes the formula away again, leaving the old value behind. + pWrtShell->Undo(); + CPPUNIT_ASSERT_EQUAL(OUString(), lcl_GetRedlines(pDoc)); + CPPUNIT_ASSERT_EQUAL(OUString(), lcl_GetCellFormula(mxComponent, u"Table1"_ustr, u"D2"_ustr)); + CPPUNIT_ASSERT_EQUAL(u"$10.00"_ustr, lcl_GetCellText(mxComponent, u"Table1"_ustr, u"D2"_ustr)); + + // The cursor has to stay inside the text it points at. Without the fix, undo left it on the + // range of the pasted text, which the undo removed again, so it pointed past the end of the + // cell text: content index 11 of a 6 character long node. + lcl_AssertCursorInText(pWrtShell); + + // ... and counting words over that selection must not run out of the text either; this is + // what the status bar does, and what crashed in SwScanner. + SwDocStat aDocStat; + pWrtShell->CountWords(aDocStat); + + // Redo puts the formula back, again without recording a change, and again with a cursor that + // describes something. Without the fix, redo went down the route the copy had not taken. + pWrtShell->Redo(); + CPPUNIT_ASSERT_EQUAL(OUString(), lcl_GetRedlines(pDoc)); + CPPUNIT_ASSERT(!lcl_GetCellFormula(mxComponent, u"Table1"_ustr, u"D2"_ustr).isEmpty()); + lcl_AssertCursorInText(pWrtShell); + pWrtShell->CountWords(aDocStat); +} + +CPPUNIT_TEST_FIXTURE(SwCoreUndoTest, testTdf169795NumFormatCellPasteKeepsTrackedChanges) +{ + // Given a document with number cells and change recording enabled: + createSwDoc("tdf169795.odt"); + SwDocShell* pDocShell = getSwDocShell(); + SwWrtShell* pWrtShell = pDocShell->GetWrtShell(); + SwXTextDocument* pTextDoc = getSwTextDoc(); + SwDoc* pDoc = pWrtShell->GetDoc(); + pDoc->getIDocumentRedlineAccess().SetRedlineFlags(RedlineFlags::On | RedlineFlags::ShowInsert + | RedlineFlags::ShowDelete); + + // When copying one currency cell over another one: + lcl_GotoCell(mxComponent, pTextDoc, u"Table1"_ustr, u"C3"_ustr); + pWrtShell->SelTableBox(); + rtl::Reference pTransfer = new SwTransferable(*pWrtShell); + pTransfer->Copy(); + TransferableDataHelper aHelper(pTransfer); + lcl_GotoCell(mxComponent, pTextDoc, u"Table1"_ustr, u"C2"_ustr); + pWrtShell->SelTableBox(); + SwTransferable::Paste(*pWrtShell, aHelper); + + // Then the old value has to be kept as a deletion. + // Without the accompanying fix in place, the number format of the box regenerated the text + // of the cell right after the copy, which dropped the deletion: only the insertion was left, + // and the old value was gone for good. + OUString aExpected(u"Insert:$2.00 Delete:$1.00"_ustr); + CPPUNIT_ASSERT_EQUAL(aExpected, lcl_GetRedlines(pDoc)); + + // Leaving the cell must not drop it either, that is where the cell is checked against its + // number format. + pWrtShell->EndAllTableBoxEdit(); + CPPUNIT_ASSERT_EQUAL(aExpected, lcl_GetRedlines(pDoc)); + + // And undo and redo have to be symmetric: undo leaves the old value alone, + pWrtShell->Undo(); + CPPUNIT_ASSERT_EQUAL(OUString(), lcl_GetRedlines(pDoc)); + CPPUNIT_ASSERT_EQUAL(u"$1.00"_ustr, lcl_GetCellText(mxComponent, u"Table1"_ustr, u"C2"_ustr)); + + // ... and redo puts the very same pair of changes back. Without the fix, redo produced two + // empty redlines instead, which piled up over further undo and redo rounds. + pWrtShell->Redo(); + CPPUNIT_ASSERT_EQUAL(aExpected, lcl_GetRedlines(pDoc)); +} + CPPUNIT_TEST_FIXTURE(SwCoreUndoTest, testImagePropsCreateUndoAndModifyDoc) { createSwDoc("image-as-character.odt"); diff --git a/sw/source/core/crsr/crsrsh.cxx b/sw/source/core/crsr/crsrsh.cxx index 119e8ab3421a..2cd9507cbd67 100644 --- a/sw/source/core/crsr/crsrsh.cxx +++ b/sw/source/core/crsr/crsrsh.cxx @@ -4276,6 +4276,25 @@ void SwCursorShell::ClearUpCursors() pStartCursor->DeleteMark(); bChanged = true; } + + // sw_PosOk only asks whether the position is in a content node, so a + // content index pointing past the end of the text survives it. + // It should not happen, but still happened when an undo left it behind when + // it rebuilt the text it had selected. + // Keep the offsets inside the node, so that users of the selection cannot run + // out of bounds. + for (SwPaM& rPaM : pStartCursor->GetRingContainer()) + { + for (SwPosition* pPos : { rPaM.GetPoint(), rPaM.GetMark() }) + { + const SwContentNode* pContentNode = pPos->GetNode().GetContentNode(); + if (pContentNode && pPos->GetContentIndex() > pContentNode->Len()) + { + pPos->SetContent(pContentNode->Len()); + bChanged = true; + } + } + } if (pStartCursor->GetPoint()->GetNode().IsTableNode()) { // tdf#106959: When cursor points to start of a table, the proper content diff --git a/sw/source/core/doc/tblcpy.cxx b/sw/source/core/doc/tblcpy.cxx index 986da9801782..3ee04912120e 100644 --- a/sw/source/core/doc/tblcpy.cxx +++ b/sw/source/core/doc/tblcpy.cxx @@ -505,10 +505,19 @@ static void lcl_CpyBox( const SwTable& rCpyTable, const SwTableBox* pCpyBox, pDstBox->GetSttNd()->EndOfSectionIndex() - pDstBox->GetSttIdx() ); - if( pUndo ) - pUndo->AddBoxBefore( *pDstBox, bDelContent ); + // Do not record (track) changes if the cell holds a formula. + // The text that arrives with the copy will be recalculated based on the formula, + // and that would eliminate the tracked change from the cell anyway. + // TODO: if we want tracked changes to work on it, we should create a new type of + // tracked change that track the formula changes, not the cell values changes. + const bool bTrackChanges = !pCpyBox + || SfxItemState::SET + != pCpyBox->GetFrameFormat()->GetItemState( RES_BOXATR_FORMULA, false ); - bool bUndoRedline = pUndo && rDoc.getIDocumentRedlineAccess().IsRedlineOn(); + if( pUndo ) + pUndo->AddBoxBefore( *pDstBox, bDelContent, bTrackChanges ); + + bool bUndoRedline = pUndo && bTrackChanges && rDoc.getIDocumentRedlineAccess().IsRedlineOn(); ::sw::UndoGuard const undoGuard(rDoc.GetIDocumentUndoRedo()); SwNodeIndex aSavePos( aInsIdx, -1 ); @@ -574,7 +583,7 @@ static void lcl_CpyBox( const SwTable& rCpyTable, const SwTableBox* pCpyBox, //b6341295: Table copy redlining will be managed by AddBoxAfter() if( pUndo ) - pUndo->AddBoxAfter( *pDstBox, aInsIdx, bDelContent ); + pUndo->AddBoxAfter( *pDstBox, aInsIdx, bDelContent, bTrackChanges ); // heading SwTextNode *const pTextNd = aSavePos.GetNode().GetTextNode(); diff --git a/sw/source/core/inc/UndoTable.hxx b/sw/source/core/inc/UndoTable.hxx index 39e2adbcd01c..a62569036354 100644 --- a/sw/source/core/inc/UndoTable.hxx +++ b/sw/source/core/inc/UndoTable.hxx @@ -292,9 +292,11 @@ public: virtual void UndoImpl( ::sw::UndoRedoContext & ) override; virtual void RedoImpl( ::sw::UndoRedoContext & ) override; - void AddBoxBefore( const SwTableBox& rBox, bool bDelContent ); + /// bTrackChanges is false for a box that is copied without recording it as a change, even + /// though changes are being recorded: see lcl_CpyBox(). + void AddBoxBefore( const SwTableBox& rBox, bool bDelContent, bool bTrackChanges ); void AddBoxAfter( const SwTableBox& rBox, const SwNodeIndex& rIdx, - bool bDelContent ); + bool bDelContent, bool bTrackChanges ); bool IsEmpty() const; bool InsertRow( SwTable& rTable, const SwSelBoxes& rBoxes, sal_uInt16 nCnt ); diff --git a/sw/source/core/table/swtable.cxx b/sw/source/core/table/swtable.cxx index 5eb4018e007e..c5ad983470e6 100644 --- a/sw/source/core/table/swtable.cxx +++ b/sw/source/core/table/swtable.cxx @@ -2431,7 +2431,16 @@ void ChgTextToNum( SwTableBox& rBox, const OUString& rText, const Color* pCol, } rBox.SetSaveNumFormatColor( pCol ? *pCol : std::optional() ); - if( pTNd->GetText() != rText ) + // What the cell shows is its text without what a tracked deletion took out of it, which is + // also the text HasNumContent() and IsNumberChanged() work the value out from. Ask whether + // that already says what the format wants: if it does there is nothing to do, and the + // changes recorded in the cell are left alone. + // + // If it does not, the text is rewritten as a whole below, which loses the changes recorded + // over it. That is coarse, but a number format is free to rewrite the text into anything - + // a number can come out as words, or grow a thousands separator that shifts every position + // after it - so there is no general way to carry a set of changes across a reformat. + if( pTNd->GetRedlineText() != rText ) { // Exchange text. Bugfix to keep Tabs (front and back!) and annotations (inword comment anchors) const OUString& rOrig = pTNd->GetText(); @@ -2475,12 +2484,18 @@ void ChgTextToNum( SwTableBox& rBox, const OUString& rText, const Color* pCol, while( nCommentPos > aIdx.GetIndex() && nCommentPos == nEndPos ); } + const sal_Int32 nInsStt = aIdx.GetIndex(); pTNd->EraseText( aIdx, n, SwInsertFlags::EMPTYEXPAND ); pTNd->InsertText( rText, aIdx, SwInsertFlags::EMPTYEXPAND ); - if( rDoc.getIDocumentRedlineAccess().IsRedlineOn() ) + // The text of a box with a formula is worked out from the formula and is rewritten + // whenever the table is recalculated, by a change to some other box as much as by one + // here. Nobody wrote it, so do not record it as an insertion. + const bool bFormulaBox = SfxItemState::SET + == rBox.GetFrameFormat()->GetItemState( RES_BOXATR_FORMULA, false ); + if( rDoc.getIDocumentRedlineAccess().IsRedlineOn() && !bFormulaBox ) { - SwPaM aTemp(*pTNd, 0, *pTNd, rText.getLength()); + SwPaM aTemp(*pTNd, nInsStt, *pTNd, nInsStt + rText.getLength()); rDoc.getIDocumentRedlineAccess().AppendRedline(new SwRangeRedline(RedlineType::Insert, aTemp), true); } } diff --git a/sw/source/core/txtnode/txtedt.cxx b/sw/source/core/txtnode/txtedt.cxx index 9bcdfddc2131..46953d1aaa5e 100644 --- a/sw/source/core/txtnode/txtedt.cxx +++ b/sw/source/core/txtnode/txtedt.cxx @@ -18,6 +18,7 @@ */ #include +#include #include #include @@ -751,7 +752,10 @@ SwScanner::SwScanner(std::function aGe , m_bClip(bClp) { m_nStartPos = m_nBegin = nStart; - m_nEndPos = nEnd; + // The range comes from a selection, which can be stale - e.g. an undo that + // rebuilt the text leaves the cursor describing the old, longer text. Keep + // the scan inside the string; + m_nEndPos = std::min(nEnd, m_aPreDashReplacementText.getLength()); //MSWord f.e has special emdash and endash behaviour in that they break //words for the purposes of word counting, while a hyphen etc. doesn't. diff --git a/sw/source/core/undo/untbl.cxx b/sw/source/core/undo/untbl.cxx index 3307b43b07bd..8e9f03e49b5c 100644 --- a/sw/source/core/undo/untbl.cxx +++ b/sw/source/core/undo/untbl.cxx @@ -19,6 +19,8 @@ #include +#include + #include #include #include @@ -91,6 +93,10 @@ struct UndoTableCpyTable_Entry // Was the last paragraph of the new and the first paragraph of the old content joined? bool bJoin; // For redlining only + // Was this box copied as a change? A box that holds a formula is not, see lcl_CpyBox(), + // and then undo and redo have to take the same route the copy took. + bool bTrackChanges; + explicit UndoTableCpyTable_Entry( const SwTableBox& rBox ); void dumpAsXml(xmlTextWriterPtr pWriter) const; @@ -2360,7 +2366,7 @@ void SwUndoTableNumFormat::SetBox( const SwTableBox& rBox ) UndoTableCpyTable_Entry::UndoTableCpyTable_Entry( const SwTableBox& rBox ) : nBoxIdx( rBox.GetSttIdx() ), nOffset( 0 ), - bJoin( false ) + bJoin( false ), bTrackChanges( true ) { } @@ -2397,6 +2403,11 @@ void UndoTableCpyTable_Entry::dumpAsXml(xmlTextWriterPtr pWriter) const BAD_CAST(OString::boolean(bJoin).getStr())); (void)xmlTextWriterEndElement(pWriter); + (void)xmlTextWriterStartElement(pWriter, BAD_CAST("bTrackChanges")); + (void)xmlTextWriterWriteAttribute(pWriter, BAD_CAST("value"), + BAD_CAST(OString::boolean(bTrackChanges).getStr())); + (void)xmlTextWriterEndElement(pWriter); + (void)xmlTextWriterEndElement(pWriter); } @@ -2411,6 +2422,39 @@ SwUndoTableCpyTable::~SwUndoTableCpyTable() m_pInsRowUndo.reset(); } +namespace +{ +// Move cursors off the temporary node at the start of the box, onto the content that stays. +// +// UndoImpl() and RedoImpl() park cursors on that node while they hand the content of the box to +// an undo object, the same way AddBoxBefore() does, and the node is deleted right after, so the +// cursors have to come off it first. This is what AddBoxAfter() does at the end of a copy. +void lcl_MoveCursorsOffTempNode(const SwTableBox & rBox) +{ + SwPaM aPam(SwNodeIndex(*rBox.GetSttNd(), 1)); + if (!aPam.GetPoint()->GetNode().IsTextNode()) + return; + aPam.SetMark(); + aPam.Move(fnMoveForward, GoInContent); + ::PaMCorrAbs(aPam, *aPam.GetPoint()); +} + +// Put the cursor at the start of the content of the box that starts at nBoxStart. +void lcl_SetCursorToBoxContent(::sw::UndoRedoContext & rContext, + const SwTableNode *const pTableNd, SwNodeOffset const nBoxStart) +{ + if (!pTableNd) + return; + const SwTableBox *const pBox = pTableNd->GetTable().GetTableBox(nBoxStart); + if (!pBox || !pBox->GetSttNd()) + return; + SwPaM & rPaM(rContext.GetCursorSupplier().CreateNewShellCursor()); + rPaM.DeleteMark(); + rPaM.GetPoint()->Assign(*pBox->GetSttNd()); + rPaM.Move(fnMoveForward, GoInContent); +} +} + void SwUndoTableCpyTable::UndoImpl(::sw::UndoRedoContext & rContext) { SwDoc & rDoc = rContext.GetDoc(); @@ -2436,14 +2480,22 @@ void SwUndoTableCpyTable::UndoImpl(::sw::UndoRedoContext & rContext) SwTableBox& rBox = *pBox; SwNodeIndex aInsIdx( *rBox.GetSttNd(), 1 ); - rDoc.GetNodes().MakeTextNode( aInsIdx.GetNode(), rDoc.GetDfltTextFormatColl() ); + SwTextNode *const pNewNode( + rDoc.GetNodes().MakeTextNode( aInsIdx.GetNode(), rDoc.GetDfltTextFormatColl() )); // b62341295: Redline for copying tables const SwNode *pEndNode = rBox.GetSttNd()->EndOfSectionNode(); SwPaM aPam( aInsIdx.GetNode(), *pEndNode ); std::unique_ptr pUndo; - if( IDocumentRedlineAccess::IsRedlineOn( GetRedlineFlags() ) ) + { // move cursors to the new node which precedes aPam, the way AddBoxBefore() does: + // the content below is about to be handed to an undo object, and a cursor left in it + // still points there once that object lets the nodes go. + SwPosition const pos(*pNewNode, 0); + ::PaMCorrAbs(aPam, pos); + } + + if( IDocumentRedlineAccess::IsRedlineOn( GetRedlineFlags() ) && pEntry->bTrackChanges ) { bool bDeleteCompleteParagraph = false; bool bShiftPam = false; @@ -2465,8 +2517,14 @@ void SwUndoTableCpyTable::UndoImpl(::sw::UndoRedoContext & rContext) SwTextNode *pText = aTmpIdx.GetNode().GetTextNode(); if( pText ) { + // The content start was recorded when the copy was done. The text of a + // box can be rebuilt after that, by the number format of the box + // regenerating it from the value, and that leaves the recorded offset + // describing text that is no longer there. Keep it inside the text, the + // same way the redline table clamps its own stale positions. aPam.GetPoint()->Assign(*pText, - pUndoRedlineDelete->ContentStart() ); + std::min(pUndoRedlineDelete->ContentStart(), + pText->GetText().getLength()) ); } else aPam.GetPoint()->Assign( aTmpIdx ); @@ -2510,6 +2568,7 @@ void SwUndoTableCpyTable::UndoImpl(::sw::UndoRedoContext & rContext) pEntry->pUndo = std::move(pUndo); aInsIdx = rBox.GetSttIdx() + 1; + lcl_MoveCursorsOffTempNode( rBox ); rDoc.GetNodes().Delete( aInsIdx ); SfxItemSet aTmpSet(SfxItemSet::makeFixedSfxItemSetUndoImpl(rContext); } + + if (!m_vArr.empty()) + lcl_SetCursorToBoxContent(rContext, pTableNd, m_vArr[0]->nBoxIdx + m_vArr[0]->nOffset); + DEBUG_REDLINE( rDoc ) } @@ -2570,15 +2633,24 @@ void SwUndoTableCpyTable::RedoImpl(::sw::UndoRedoContext & rContext) SwNodeIndex aInsIdx( *rBox.GetSttNd(), 1 ); // b62341295: Redline for copying tables - Start. - rDoc.GetNodes().MakeTextNode( aInsIdx.GetNode(), rDoc.GetDfltTextFormatColl() ); + SwTextNode *const pNewNode( + rDoc.GetNodes().MakeTextNode( aInsIdx.GetNode(), rDoc.GetDfltTextFormatColl() )); SwPaM aPam( aInsIdx.GetNode(), *rBox.GetSttNd()->EndOfSectionNode()); - std::unique_ptr pUndo(IDocumentRedlineAccess::IsRedlineOn(GetRedlineFlags()) + const bool bRedlineBox = IDocumentRedlineAccess::IsRedlineOn(GetRedlineFlags()) + && pEntry->bTrackChanges; + if( !bRedlineBox ) + { // as in UndoImpl() above: take cursors out of the content that the undo object below + // is about to take over + SwPosition const pos(*pNewNode, 0); + ::PaMCorrAbs(aPam, pos); + } + std::unique_ptr pUndo(bRedlineBox ? nullptr : std::make_unique(aPam, SwDeleteFlags::Default, true)); if( pEntry->pUndo ) { pEntry->pUndo->UndoImpl(rContext); - if( IDocumentRedlineAccess::IsRedlineOn( GetRedlineFlags() ) ) + if( bRedlineBox ) { // PrepareRedline has to be called with the beginning of the old content // When new and old content has been joined, the rIter.pAktPam has been set @@ -2603,6 +2675,7 @@ void SwUndoTableCpyTable::RedoImpl(::sw::UndoRedoContext & rContext) // b62341295: Redline for copying tables - End. aInsIdx = rBox.GetSttIdx() + 1; + lcl_MoveCursorsOffTempNode( rBox ); rDoc.GetNodes().Delete( aInsIdx ); SfxItemSet aTmpSet(SfxItemSet::makeFixedSfxItemSetnOffset = rBox.GetSttIdx() - pEntry->nBoxIdx; } + + if (!m_vArr.empty()) + lcl_SetCursorToBoxContent(rContext, pTableNd, m_vArr[0]->nBoxIdx + m_vArr[0]->nOffset); + DEBUG_REDLINE( rDoc ) } -void SwUndoTableCpyTable::AddBoxBefore( const SwTableBox& rBox, bool bDelContent ) +void SwUndoTableCpyTable::AddBoxBefore( const SwTableBox& rBox, bool bDelContent, + bool bTrackChanges ) { if (!m_vArr.empty() && !bDelContent) return; UndoTableCpyTable_Entry* pEntry = new UndoTableCpyTable_Entry( rBox ); + pEntry->bTrackChanges = bTrackChanges; m_vArr.push_back(std::unique_ptr(pEntry)); SwDoc& rDoc = rBox.GetFrameFormat()->GetDoc(); @@ -2649,7 +2728,7 @@ void SwUndoTableCpyTable::AddBoxBefore( const SwTableBox& rBox, bool bDelContent SwTextNode *const pNewNode(rDoc.GetNodes().MakeTextNode(aInsIdx.GetNode(), rDoc.GetDfltTextFormatColl())); SwPaM aPam( aInsIdx.GetNode(), *rBox.GetSttNd()->EndOfSectionNode() ); - if( !rDoc.getIDocumentRedlineAccess().IsRedlineOn() ) + if( !bTrackChanges || !rDoc.getIDocumentRedlineAccess().IsRedlineOn() ) { { // move cursors to new node which precedes aPam SwPosition const pos(*pNewNode, 0); @@ -2670,7 +2749,8 @@ void SwUndoTableCpyTable::AddBoxBefore( const SwTableBox& rBox, bool bDelContent DEBUG_REDLINE( rDoc ) } -void SwUndoTableCpyTable::AddBoxAfter( const SwTableBox& rBox, const SwNodeIndex& rIdx, bool bDelContent ) +void SwUndoTableCpyTable::AddBoxAfter( const SwTableBox& rBox, const SwNodeIndex& rIdx, + bool bDelContent, bool bTrackChanges ) { UndoTableCpyTable_Entry *const pEntry = m_vArr.back().get(); @@ -2687,7 +2767,7 @@ void SwUndoTableCpyTable::AddBoxAfter( const SwTableBox& rBox, const SwNodeIndex pam.Move(fnMoveForward, GoInContent); ::PaMCorrAbs(pam, *pam.GetPoint()); } - if( rDoc.getIDocumentRedlineAccess().IsRedlineOn() ) + if( bTrackChanges && rDoc.getIDocumentRedlineAccess().IsRedlineOn() ) { SwPosition aTmpPos( rIdx ); pEntry->pUndo = PrepareRedline( rDoc, rBox, aTmpPos, pEntry->bJoin, false ); From 4998ea86318ad7eed32913db9b86ab0f68a48608 Mon Sep 17 00:00:00 2001 From: Mike Kaganski Date: Wed, 23 Sep 2026 20:31:27 +0500 Subject: [PATCH 093/289] sw: emit a Ruby's RB before its RT ISO 32000-2 Table 369 makes the order normative: a Ruby shall contain one RB followed by an RT, or by RP, RT and RP. A ruby's two sub-lines paint in visual order, though, and each opened its structure element as it painted, so an exported ruby held its RT before its RB. PAC 2026 reports that as two errors per ruby; veraPDF does not report it. An element is ordered among its siblings where its type is set, not where it is painted, so both kids are created and typed before either sub-line paints, and each sub-line then enters the kid already created for it. Which sub-line carries the annotation follows OnTop, while bRubyTop only reflects where a squared grid puts the annotation and is true everywhere else. Keying the role off bRubyTop tagged the base of a ruby positioned below outside a squared grid, or to the right, as the RT and its annotation as the RB, so both the role and the element follow OnTop now. A squared grid with the ruby text below was already right, bRubyTop and OnTop agreeing there. The kids are created only where BeginInlineStructureElements would enter them: a ruby in the repeated headline row of a follow table would otherwise leave an empty RB and RT on the table, once per following page. testLinkWithRuby asserted only that both kids are present, the order being wrong when it was written; it compares them in order now. Signed-off-by: Mike Kaganski Change-Id: I8e38a3544008f79939d7d0795c4808a1a72caad7 Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/13402 Reviewed-by: Miklos Vajna Tested-by: Jenkins CPCI (cherry picked from commit 65c62bc31aff793465f31ab6172c118921fe9d51) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211690 Reviewed-by: Xisco Fauli Tested-by: Jenkins --- sw/inc/EnhancedPDFExportHelper.hxx | 18 +++++- sw/qa/core/text/EnhancedPDFExportHelper.cxx | 61 +++++++++++++++++++ sw/qa/core/text/data/ruby-positions.fodt | 26 ++++++++ .../core/text/EnhancedPDFExportHelper.cxx | 32 ++++++++-- sw/source/core/text/pormulti.cxx | 16 ++++- vcl/qa/cppunit/pdfexport/pdfexport.cxx | 8 +-- 6 files changed, 147 insertions(+), 14 deletions(-) create mode 100644 sw/qa/core/text/data/ruby-positions.fodt diff --git a/sw/inc/EnhancedPDFExportHelper.hxx b/sw/inc/EnhancedPDFExportHelper.hxx index 9fbbf8428e23..a2c6bbd37494 100644 --- a/sw/inc/EnhancedPDFExportHelper.hxx +++ b/sw/inc/EnhancedPDFExportHelper.hxx @@ -26,6 +26,7 @@ #include "swtypes.hxx" #include +#include #include namespace vcl @@ -121,9 +122,15 @@ struct Por_Info Ruby: 0-> Ruby 1-> RT 2-> RB */ int const m_Mode; + /// the element to enter, created before the portion paints, or -1 to create one + const sal_Int32 m_nExistingId; - Por_Info(const SwLinePortion& rPor, const SwTextPainter& rTextPainter, int const nMode) - : mrPor(rPor), mrTextPainter(rTextPainter), m_Mode(nMode) {}; + Por_Info(const SwLinePortion& rPor, const SwTextPainter& rTextPainter, int const nMode, + const sal_Int32 nExistingId = -1) + : mrPor(rPor) + , mrTextPainter(rTextPainter) + , m_Mode(nMode) + , m_nExistingId(nExistingId){}; }; struct lt_TableColumn @@ -154,7 +161,8 @@ class SwTaggedPDFHelper const Por_Info* mpPorInfo; void OpenTagImpl(void const* pKey); - sal_Int32 BeginTagImpl(void const* pKey,vcl::pdf::StructElement aTagRole, const OUString& rTagName); + sal_Int32 BeginTagImpl(void const* pKey, vcl::pdf::StructElement aTagRole, + const OUString& rTagName, sal_Int32 nExistingId = -1); void BeginTag(vcl::pdf::StructElement aTagRole, const OUString& rTagName); void EndTag(); void DeferTag(); @@ -189,6 +197,10 @@ class SwTaggedPDFHelper public: + /// a Ruby's RB and RT, created before either sub-line paints so that they end up in that order + static std::pair CreateRubyKids(const OutputDevice& rOut, + const SwFrame& rFrame); + // pFrameInfo != 0 => BeginBlockStructureElement // pPorInfo != 0 => BeginInlineStructureElement // pFrameInfo, pPorInfo = 0 => BeginNonStructureElement diff --git a/sw/qa/core/text/EnhancedPDFExportHelper.cxx b/sw/qa/core/text/EnhancedPDFExportHelper.cxx index 5ba09a358fb7..6e948e91fa34 100644 --- a/sw/qa/core/text/EnhancedPDFExportHelper.cxx +++ b/sw/qa/core/text/EnhancedPDFExportHelper.cxx @@ -77,6 +77,27 @@ OUString lcl_CollectLanguages(vcl::pdf::PDFiumStructureElement& rElement, return aLanguages; } +// the kids of every Ruby, in the order they are emitted, each with the text it covers +OUString lcl_CollectRubies(vcl::pdf::PDFiumStructureElement& rElement, + const std::unordered_map& rTexts) +{ + OUString aRubies; + if (rElement.getType() == "Ruby") + { + for (int i = 0; i < rElement.getNumberOfChildren(); ++i) + { + if (const auto pKid = rElement.getChild(i)) + aRubies += pKid->getType() + ": " + lcl_GetOwnText(*pKid, rTexts) + "\n"; + } + } + for (int i = 0; i < rElement.getNumberOfChildren(); ++i) + { + if (const auto pChild = rElement.getChild(i)) + aRubies += lcl_CollectRubies(*pChild, rTexts); + } + return aRubies; +} + CPPUNIT_TEST_FIXTURE(Test, testTdf171022) { createSwDoc("structure-destinations.fodt"); @@ -447,6 +468,46 @@ CPPUNIT_TEST_FIXTURE(Test, testParagraphLanguage) "Figure en-US: A picture described in the language of the document\n"_ustr, aLanguages); } + +CPPUNIT_TEST_FIXTURE(Test, testRubyStructureOrder) +{ + createSwDoc("ruby-positions.fodt"); + + uno::Sequence aFilterData{ comphelper::makePropertyValue(u"UseTaggedPDF"_ustr, true) }; + save(TestFilter::PDF_WRITER, + { comphelper::makePropertyValue(u"FilterData"_ustr, aFilterData) }); + + auto pPdfDocument = parsePDFExport(vcl::pdf::PDFiumLibrary::get()); + auto pPdfPage = pPdfDocument->openPage(0); + CPPUNIT_ASSERT(pPdfPage); + auto pTextPage = pPdfPage->getTextPage(); + + // the text behind each marked content id, to identify the element covering it + std::unordered_map aTexts; + for (int i = 0; i < pPdfPage->getObjectCount(); ++i) + { + auto pObject = pPdfPage->getObject(i); + if (const int nMarkedContentID = pObject->getMarkedContentID(); nMarkedContentID >= 0) + aTexts[nMarkedContentID] += pObject->getText(pTextPage); + } + + auto pTree = pPdfPage->getStructureTree(); + CPPUNIT_ASSERT(pTree); + OUString aRubies; + for (int i = 0; i < pTree->getNumberOfChildren(); ++i) + { + if (const auto pChild = pTree->getChild(i)) + aRubies += lcl_CollectRubies(*pChild, aTexts); + } + + // ISO 32000-2 Table 369 requires RB first. An annotation above its base paints first and + // is still the RT; one below paints second and is still the RT + CPPUNIT_ASSERT_EQUAL(u"RB: base above\n" + "RT: anno above\n" + "RB: base below\n" + "RT: anno below\n"_ustr, + aRubies); +} } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/qa/core/text/data/ruby-positions.fodt b/sw/qa/core/text/data/ruby-positions.fodt new file mode 100644 index 000000000000..d143d7625c03 --- /dev/null +++ b/sw/qa/core/text/data/ruby-positions.fodt @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + + + + + + + base aboveanno above + base belowanno below + + + diff --git a/sw/source/core/text/EnhancedPDFExportHelper.cxx b/sw/source/core/text/EnhancedPDFExportHelper.cxx index 870d4d0d1866..d83174ce6ca0 100644 --- a/sw/source/core/text/EnhancedPDFExportHelper.cxx +++ b/sw/source/core/text/EnhancedPDFExportHelper.cxx @@ -771,12 +771,33 @@ void SwTaggedPDFHelper::OpenTagImpl(void const*const pKey) #endif } -sal_Int32 SwTaggedPDFHelper::BeginTagImpl(void const*const pKey, - vcl::pdf::StructElement const eType, const OUString& rString) +std::pair SwTaggedPDFHelper::CreateRubyKids(const OutputDevice& rOut, + const SwFrame& rFrame) +{ + auto* pPDFExtOutDevData = dynamic_cast(rOut.GetExtOutDevData()); + // the check BeginInlineStructureElements makes, so no kid is created that nothing enters + if (!pPDFExtOutDevData || !pPDFExtOutDevData->GetIsExportTaggedPDF() + || lcl_IsInNonStructEnv(rFrame)) + return { -1, -1 }; + + // ISO 32000-2 Table 369 requires RB before RT, and an element is ordered among its + // siblings where its type is set, which is here rather than where the sub-line paints + const sal_Int32 nRB(pPDFExtOutDevData->EnsureStructureElement(nullptr)); + pPDFExtOutDevData->InitStructureElement(nRB, vcl::pdf::StructElement::RB, u"RB"_ustr); + const sal_Int32 nRT(pPDFExtOutDevData->EnsureStructureElement(nullptr)); + pPDFExtOutDevData->InitStructureElement(nRT, vcl::pdf::StructElement::RT, u"RT"_ustr); + return { nRB, nRT }; +} + +sal_Int32 SwTaggedPDFHelper::BeginTagImpl(const void* const pKey, + const vcl::pdf::StructElement eType, + const OUString& rString, const sal_Int32 nExistingId) { // write new tag - const sal_Int32 nId = mpPDFExtOutDevData->EnsureStructureElement(pKey); - mpPDFExtOutDevData->InitStructureElement(nId, eType, rString); + const sal_Int32 nId + = nExistingId != -1 ? nExistingId : mpPDFExtOutDevData->EnsureStructureElement(pKey); + if (nExistingId == -1) + mpPDFExtOutDevData->InitStructureElement(nId, eType, rString); mpPDFExtOutDevData->BeginStructureElement(nId); m_aOpenedTags.push_back(nId); @@ -815,7 +836,8 @@ void SwTaggedPDFHelper::BeginTag(vcl::pdf::StructElement eType, const OUString& } } - sal_Int32 const nId = BeginTagImpl(pKey, eType, rString); + const sal_Int32 nId + = BeginTagImpl(pKey, eType, rString, mpPorInfo ? mpPorInfo->m_nExistingId : -1); // which tag a destination pointing at this node names if (mpFrameInfo && mpFrameInfo->mrFrame.IsTextFrame()) diff --git a/sw/source/core/text/pormulti.cxx b/sw/source/core/text/pormulti.cxx index 0048e6193c70..10bfaf25fe9e 100644 --- a/sw/source/core/text/pormulti.cxx +++ b/sw/source/core/text/pormulti.cxx @@ -19,6 +19,7 @@ #include #include +#include #include @@ -1657,6 +1658,15 @@ void SwTextPainter::PaintMultiPortion( const SwRect &rPaint, OSL_ENSURE( nullptr == GetInfo().GetUnderFnt() || rMulti.IsBidi(), " Only BiDi portions are allowed to use the common underlining font" ); + // the two sub-lines paint in visual order, so both kids are created before either of them + sal_Int32 nRB(-1); + sal_Int32 nRT(-1); + if (rMulti.IsRuby()) + { + std::tie(nRB, nRT) + = SwTaggedPDFHelper::CreateRubyKids(*GetInfo().GetOut(), *GetInfo().GetTextFrame()); + } + ::std::optional oTag; if (rMulti.IsDouble()) { @@ -1665,7 +1675,8 @@ void SwTextPainter::PaintMultiPortion( const SwRect &rPaint, } else if (rMulti.IsRuby()) { - Por_Info const por(rMulti, *this, bRubyTop ? 1 : 2); + // OnTop selects the sub-line with the annotation; bRubyTop applies to a squared grid only + const Por_Info por(rMulti, *this, rMulti.OnTop() ? 1 : 2, rMulti.OnTop() ? nRT : nRB); oTag.emplace(nullptr, nullptr, &por, *GetInfo().GetOut()); GetInfo().SetRuby( rMulti.OnTop() ); } @@ -1843,7 +1854,8 @@ void SwTextPainter::PaintMultiPortion( const SwRect &rPaint, if (rMulti.IsRuby()) { oTag.reset(); - Por_Info const por(rMulti, *this, bRubyTop ? 2 : 1); + const Por_Info por(rMulti, *this, rMulti.OnTop() ? 2 : 1, + rMulti.OnTop() ? nRB : nRT); oTag.emplace(nullptr, nullptr, &por, *GetInfo().GetOut()); } } diff --git a/vcl/qa/cppunit/pdfexport/pdfexport.cxx b/vcl/qa/cppunit/pdfexport/pdfexport.cxx index 8767dc7ca1c8..91af7f55e361 100644 --- a/vcl/qa/cppunit/pdfexport/pdfexport.cxx +++ b/vcl/qa/cppunit/pdfexport/pdfexport.cxx @@ -3105,8 +3105,8 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest, testLinkWithRuby) // the ruby reads between the text before it and the text after it CPPUNIT_ASSERT_EQUAL(size_t(1), nMCIDBeforeRuby); - // the base and the ruby text, each with its own content; RB before RT would - // be the reading order, but the paint order puts RT first + // the base and the ruby text, each with its own content, in the order + // ISO 32000-2 Table 369 requires rather than the paint order auto pRubyKids = dynamic_cast(pRubySE->Lookup("K"_ostr)); CPPUNIT_ASSERT(pRubyKids); CPPUNIT_ASSERT_EQUAL(size_t(2), pRubyKids->GetElements().size()); @@ -3125,8 +3125,8 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest, testLinkWithRuby) CPPUNIT_ASSERT_EQUAL(size_t(1), pKidKids->GetElements().size()); CPPUNIT_ASSERT(dynamic_cast(pKidKids->GetElement(0))); } - CPPUNIT_ASSERT(std::find(aRubyKids.begin(), aRubyKids.end(), "RB"_ostr) != aRubyKids.end()); - CPPUNIT_ASSERT(std::find(aRubyKids.begin(), aRubyKids.end(), "RT"_ostr) != aRubyKids.end()); + CPPUNIT_ASSERT_EQUAL("RB"_ostr, aRubyKids[0]); + CPPUNIT_ASSERT_EQUAL("RT"_ostr, aRubyKids[1]); } CPPUNIT_TEST_FIXTURE(PdfExportTest, testLinkWithSpan) From e269db95ff8398202a1a1073ae77a95fe15ddeb9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= Date: Wed, 30 Sep 2026 08:07:26 +0000 Subject: [PATCH 094/289] sfx2: start ImportFrom from the same link update state as Load MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit as ConvertFrom and SwDocShell::Load already do for an initial load, so links are left alone until UpdateLinks decides what to do with them Signed-off-by: Caolán McNamara Change-Id: Ifbc334736988a8a747f83ef4830cf95cb485a148 Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/13866 Reviewed-by: Noel Grandin Tested-by: Jenkins CPCI (cherry picked from commit 8d57e690c64fa6e4385e396d115cc5124ffbf34d) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211668 Tested-by: Jenkins Reviewed-by: Xisco Fauli --- sfx2/source/doc/objstor.cxx | 6 ++++++ .../ooxmlimport/data/linked-picture.docx | Bin 0 -> 1731 bytes .../ooxmlimport/data/linked-picture.png | Bin 0 -> 766 bytes sw/qa/extras/ooxmlimport/ooxmlimport2.cxx | 18 ++++++++++++++++++ 4 files changed, 24 insertions(+) create mode 100644 sw/qa/extras/ooxmlimport/data/linked-picture.docx create mode 100644 sw/qa/extras/ooxmlimport/data/linked-picture.png diff --git a/sfx2/source/doc/objstor.cxx b/sfx2/source/doc/objstor.cxx index 47ca42c49816..e6e61e5753c0 100644 --- a/sfx2/source/doc/objstor.cxx +++ b/sfx2/source/doc/objstor.cxx @@ -2600,6 +2600,12 @@ bool SfxObjectShell::ImportFrom(SfxMedium& rMedium, aArgs[u"InsertMode"_ustr] <<= true; aArgs[u"TextInsertModeRange"_ustr] <<= xInsertPosition; } + else + { + // Links stay un-updated during import, as when loading our own format, until + // UpdateLinks settles them. + GetEmbeddedObjectContainer().setUserAllowsLinkUpdate(false); + } // #i119492# During loading, some OLE objects like chart will be set // modified flag, so needs to reset the flag to false after loading diff --git a/sw/qa/extras/ooxmlimport/data/linked-picture.docx b/sw/qa/extras/ooxmlimport/data/linked-picture.docx new file mode 100644 index 0000000000000000000000000000000000000000..8099491bf7e103aa9effc77f255fbe4637856bd7 GIT binary patch literal 1731 zcmZ`(3pf*M7~Yyqh~}DunJLU|D|K?6V>m7?%U$k5GC~N8ltwzIbPTzZ|MUFc^F7c1e$W5C|NFi6IFOJG007twaBISN7t_yc zy%l6MAOIjOh@KV^;l~e$ANO@WaqMukH;Nc`G?Cnmf3Oq!Gk;k$v>6%ecLuue2{>J? z0SWhep4D*`(`*uMv!+~eRu$2;V#+8c=;P-7J9|)$!b6R~Gl8Wsdt&GBCSK>69b*OF zOizI+kq`B|&Aum-=~5<$;#fuCZbiz+jXT`)RFHNwDhlyt+o#Ymj5cn*Jy1UWw%0L`Hp>rgd`9Z=Ku;cadQh zU$)N3^lrT=(Eb~a%qUJGEdp-P0*=H4(KqVw(P%Vk{k+Je;yZRih5Af=sl%&dN?>y& z<42A1P=_TzH)n_3`|A^n*f|~nX<&&pR%m0TRbe!iC|4bxjZxvyU)oY0)zVv*C+1Tq zy^+Uk^K>{i3wvV5wbh178^Wo`*M?LNwud&ev-%~{c(ww{Gt_mw5ju?Xwu@YSQ5UG3 zI?5U-f#6~HVPd&{RG;4^58ahr*^2I#!W7eecSn8*m~aCfijAoVT5t;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P1=FzHoB#j- literal 0 HcmV?d00001 diff --git a/sw/qa/extras/ooxmlimport/data/linked-picture.png b/sw/qa/extras/ooxmlimport/data/linked-picture.png new file mode 100644 index 0000000000000000000000000000000000000000..fdad35484e7ce888980129b39a0bee72183342dd GIT binary patch literal 766 zcmeAS@N?(olHy`uVBq!ia0vp^4j|0I0wfs{c7_5;mUKs7M+SzC{oH>NS%G}U;vjb? zhIQv;UIIA^$sR$z3=CCj3=9n|3=F@3LJcn%7)lKo7+xhXFj&oCU=S~uvn$XBD8ZEE z?e4AqR;AAL~1hoju~|@c5C^J{`U~7V*a`1WgMI%8UXX zgcd6t`{8S{Pe@R9<9+s^c``V!8>%NwUNbQGU2X%1j|wWc^(fPwQAuhTRkvC>O- zq*xp-sitTo1t!1McRJ4~*W`Llaf^-%3xh{c;vI{FQIowfwVzH5v zv9*I|!Ti2+F&Z~ptQqDtxyvjH$h>;GB2;rPL;daFt&ZEG^@9Z&rc?z6^Ew^8sXs%r zvCr_7&r2tnf+y-Od<}(KRh`>U{N`k1FmPLHDEnFFE8_xrU%rPs_!;*4ShhyIV|Mt@ zJ$aVFeQ^er$Pcl`TpV1C91aXj0u2l-3Jl21ALn@QSN0j)t+se@u5Mwj)*jUrlBaJe z1)CrL{y%en-}`!omIu8~dw(pj1IDmwiEBhja#3nxNvduNkYF$}Ff`CLG}1LP2r)Fb wGO(~RHq$mRv@$TLdMYgg(~z5=l9^VCOM^K?L$h+)9H0gUPgg&ebxsLQ0F)UHt^fc4 literal 0 HcmV?d00001 diff --git a/sw/qa/extras/ooxmlimport/ooxmlimport2.cxx b/sw/qa/extras/ooxmlimport/ooxmlimport2.cxx index cc94561f6931..820909fc0a59 100644 --- a/sw/qa/extras/ooxmlimport/ooxmlimport2.cxx +++ b/sw/qa/extras/ooxmlimport/ooxmlimport2.cxx @@ -18,9 +18,11 @@ #include +#include #include #include #include +#include #include #include #include @@ -39,6 +41,7 @@ #include #include #include +#include #include #include @@ -1511,6 +1514,21 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf165348_lockFileOnRepair) ucb::InteractiveAugmentedIOException); } +CPPUNIT_TEST_FIXTURE(Test, testLinkedPictureNotReadOnLoad) +{ + // Given a document whose picture is only a link to a file next to it, loaded with link + // updates off: + loadFromFile(u"linked-picture.docx", + { comphelper::makePropertyValue(u"UpdateDocMode"_ustr, + sal_Int16(document::UpdateDocMode::NO_UPDATE)) }); + + // Then the linked file is not read, so the picture has no pixels: + auto xGraphic = getProperty>(getShape(1), u"Graphic"_ustr); + // Without the accompanying fix in place, this test would have failed, the import read the + // linked file and the picture was a bitmap. + CPPUNIT_ASSERT(Graphic(xGraphic).GetType() != GraphicType::Bitmap); +} + // tests should only be added to ooxmlIMPORT *if* they fail round-tripping in ooxmlEXPORT } // end of anonymous namespace From ed58a00d89bfcf4e890fef8b4b4cef6f3c5e47f2 Mon Sep 17 00:00:00 2001 From: Xisco Fauli Date: Thu, 1 Oct 2026 15:57:56 +0200 Subject: [PATCH 095/289] libpng: upgrade to 1.6.59 Downloaded from https://sourceforge.net/projects/libpng/files/libpng16/1.6.59/libpng-1.6.59.tar.xz/download Change-Id: Ice6941e10ba25064fbd9744f6a914f62b117e425 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211687 Tested-by: Jenkins Reviewed-by: Xisco Fauli --- download.lst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/download.lst b/download.lst index e5c4dcf6343f..1527938f9947 100644 --- a/download.lst +++ b/download.lst @@ -559,8 +559,8 @@ PIXMAN_TARBALL := pixman-0.46.4.tar.xz # three static lines # so that git cherry-pick # will not run into conflicts -LIBPNG_SHA256SUM := 28eb403f51f0f7405249132cecfe82ea5c0ef97f1b32c5a65828814ae0d34775 -LIBPNG_TARBALL := libpng-1.6.58.tar.xz +LIBPNG_SHA256SUM := d80dd2a38a37f803cb9b6ac7b14bd6e74ddc3b654780a8380bdf93523fdb4389 +LIBPNG_TARBALL := libpng-1.6.59.tar.xz # three static lines # so that git cherry-pick # will not run into conflicts From 04871f8ccf2f12f8bd1863ca3c806520aaa88645 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= Date: Wed, 30 Sep 2026 19:50:46 +0000 Subject: [PATCH 096/289] crashtesting: measure HTML form controls without a hidden view MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit crash on import of bugtrackers/html/novell574949-2.html, novell574949-3.html and novell688091-3.html, a debug build asserts: soffice.bin: include/o3tl/typed_flags_set.hxx:168: constexpr typename o3tl::typed_flags::Wrap operator&(E, E) [with E = SwFrameType; typename o3tl::typed_flags::Wrap = o3tl::is_typed_flags::Wrap]: Assertion `o3tl::detail::isNonNegative( o3tl::to_underlying(lhs))' failed. and valgrind of novell688091-3.html reports: Invalid read of size 4 at SwFrame::GetType() const (frame.hxx:533) by SwFrame::IsContentFrame() const (frame.hxx:1283) by SwContentFrame::ImplGetNextContentFrame(bool) const (findfrm.cxx:523) by SwContentFrame::GetPrevContentFrame() const (cntfrm.hxx:138) by SwFrame::FindPrevCnt_() (findfrm.cxx:1250) by SwFrame::FindPrevCnt() const (findfrm.cxx:267) by SwTextFrame::IsHiddenNowImpl() const (txtfrm.cxx:1635) by SwTextFrame::Prepare(PrepareHint, void const*, bool) (txtfrm.cxx:3047) by SwFlyInContentFrame::NotifyBackground(SwPageFrame*, SwRect const&, PrepareHint) (flyincnt.cxx:230) by SwFlyInContentFrame::DestroyImpl() (flyincnt.cxx:51) by SwLayoutFrame::DestroyImpl() (ssfrm.cxx:509) by SwSectionFrame::DestroyImpl() (sectfrm.cxx:192) by SwLayoutFrame::DestroyImpl() (ssfrm.cxx:572) by SwCellFrame::DestroyImpl() (tabfrm.cxx:6021) by SwLayoutFrame::DestroyImpl() (ssfrm.cxx:572) by SwRowFrame::DestroyImpl() (tabfrm.cxx:4853) by SwTabFrame::DestroyImpl() (tabfrm.cxx:154) by SwTableNode::DelFrames(SwRootFrame const*) (ndtbl.cxx:2530) by (anonymous namespace)::TableSaveStruct::MakeTable(unsigned short, SwPosition&, SwDoc*) (htmltab.cxx:4754) by SwHTMLParser::BuildTable(SvxAdjust, bool, bool, bool) (htmltab.cxx:5167) Address 0x2d286d30 is 272 bytes inside a block of size 472 free'd at operator delete(void*, unsigned long) (vg_replace_malloc.c:1146) by SwSectionFrame::~SwSectionFrame() (sectfrm.cxx:197) by SwFrame::DestroyFrame(SwFrame*) (ssfrm.cxx:392) by SwLayoutFrame::DestroyImpl() (ssfrm.cxx:572) by SwCellFrame::DestroyImpl() (tabfrm.cxx:6021) by SwLayoutFrame::DestroyImpl() (ssfrm.cxx:572) by SwRowFrame::DestroyImpl() (tabfrm.cxx:4853) by SwTabFrame::DestroyImpl() (tabfrm.cxx:154) by SwTableNode::DelFrames(SwRootFrame const*) (ndtbl.cxx:2530) by (anonymous namespace)::TableSaveStruct::MakeTable(unsigned short, SwPosition&, SwDoc*) (htmltab.cxx:4754) by SwHTMLParser::BuildTable(SvxAdjust, bool, bool, bool) (htmltab.cxx:5167) SetControlSize creates a hidden temporary view to measure a form control, so a layout exists while the document is still being parsed, which is an unusual thing to attempt, so it seems easiest to just avoid that entirely. The temporary view is originally, since: commit ff09ed094d6b1d9b41f482a5b349c4fd9e80d857 Date: Mon Jul 7 11:06:22 2008 +0000 INTEGRATION: CWS ab53 (1.26.112); FILE MERGED 2008/06/20 06:47:28 tkr 1.26.112.1: #i47763# synchronous html import But svx already had a way to get a control for a plain window with no view with: commit e1137040e3b75a458273ada254dda07b3aa7da6e Date: Tue Nov 14 12:48:07 2006 +0000 INTEGRATION: CWS aw024 (1.18.138); FILE MERGED ... 2006/03/21 13:20:59 fs 1.18.138.7: #i62854# +GetTemporaryControlForWindow ... The recent problem only shows up in crashtesting since hidden text support was added to html filter in: commit eb9ca728e179aab3f51be4d96b02a03e502a1f87 Date: Fri Sep 18 08:36:02 2026 +0200 Related: cool#16219 engine sw HTML import: handle hidden text Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/12991 so drop the temporary view and realize the control with GetTemporaryControlForWindow in a hidden window of the parser's own when there is no view. valgrind is clean on all of these documents, and the 104 controls in them and in the sw HTML test documents keep the same sizes. Signed-off-by: Caolán McNamara Change-Id: I47c26c7efba47f747cd1ec29b21350172b1df0c2 Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/13960 Reviewed-by: Noel Grandin Tested-by: Jenkins CPCI (cherry picked from commit c7e0ef4a46fb127962a69b2124de46bc46486685) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211685 Reviewed-by: Xisco Fauli Tested-by: Jenkins --- sw/source/filter/html/htmlform.cxx | 44 +++++++++++------------------- sw/source/filter/html/swhtml.cxx | 16 ++++------- sw/source/filter/html/swhtml.hxx | 10 +++++-- 3 files changed, 29 insertions(+), 41 deletions(-) diff --git a/sw/source/filter/html/htmlform.cxx b/sw/source/filter/html/htmlform.cxx index b5bba1c50762..c4b2b29768db 100644 --- a/sw/source/filter/html/htmlform.cxx +++ b/sw/source/filter/html/htmlform.cxx @@ -32,13 +32,11 @@ #include #include #include +#include #include #include #include -#include #include -#include -#include #include #include #include @@ -52,6 +50,7 @@ #include #include #include +#include #include #include #include @@ -73,7 +72,6 @@ #include #include #include -#include #include #include #include @@ -626,28 +624,6 @@ void SwHTMLParser::SetControlSize( const uno::Reference< drawing::XShape >& rSha uno::Reference< beans::XPropertySet > xPropSet( rShape, UNO_QUERY ); SwViewShell *pVSh = m_xDoc->getIDocumentLayoutAccess().GetCurrentViewShell(); - if( !pVSh && !m_nEventId ) - { - // If there is no view shell by now and the doc shell is an internal - // one, no view shell will be created. That for, we have to do that of - // our own. This happens if a linked section is inserted or refreshed. - SwDocShell *pDocSh = m_xDoc->GetDocShell(); - if( pDocSh ) - { - if ( pDocSh->GetMedium() ) - { - // if there is no hidden property in the MediaDescriptor it should be removed after loading - const SfxBoolItem* pHiddenItem = pDocSh->GetMedium()->GetItemSet().GetItem(SID_HIDDEN, false); - m_bRemoveHidden = ( pHiddenItem == nullptr || !pHiddenItem->GetValue() ); - } - - m_pTempViewFrame = SfxViewFrame::LoadHiddenDocument( *pDocSh, SFX_INTERFACE_NONE ); - CallStartAction(); - pVSh = m_xDoc->getIDocumentLayoutAccess().GetCurrentViewShell(); - // this ridiculous hack also enables Undo, so turn it off again - m_xDoc->GetIDocumentUndoRedo().DoUndo(false); - } - } SwXShape *pSwShape = comphelper::getFromUnoTunnel(xPropSet); @@ -665,9 +641,21 @@ void SwHTMLParser::SetControlSize( const uno::Reference< drawing::XShape >& rSha const SdrView* pDrawView = pVSh ? pVSh->GetDrawView() : nullptr; const SdrUnoObj *pFormObj = dynamic_cast( pObj ); - uno::Reference< awt::XControl > xControl; + utl::SharedUNOComponent xControl; if ( pDrawView && pVSh->GetWin() && pFormObj ) - xControl = pFormObj->GetUnoControl( *pDrawView, *pVSh->GetWin()->GetOutDev() ); + { + xControl.reset(pFormObj->GetUnoControl(*pDrawView, *pVSh->GetWin()->GetOutDev()), + utl::SharedUNOComponent::NoTakeOwnership); + } + else if ( !pVSh && pFormObj ) + { + // With no view, the control is realized in a hidden window of its own to be measured. + if (!m_xControlSizeWindow) + m_xControlSizeWindow = VclPtr::Create(nullptr, WB_STDWORK); + xControl.reset( + pFormObj->GetTemporaryControlForWindow(*m_xControlSizeWindow, m_xControlSizeContainer), + utl::SharedUNOComponent::TakeOwnership); + } awt::Size aSz( rShape->getSize() ); awt::Size aNewSz( 0, 0 ); diff --git a/sw/source/filter/html/swhtml.cxx b/sw/source/filter/html/swhtml.cxx index 58e1da7ed454..14a21b54dd38 100644 --- a/sw/source/filter/html/swhtml.cxx +++ b/sw/source/filter/html/swhtml.cxx @@ -50,6 +50,7 @@ #include #include #include +#include #include #include @@ -310,15 +311,13 @@ SwHTMLParser::SwHTMLParser( SwDoc* pD, SwPaM& rCursor, SvStream& rIn, m_bInFootEndNoteAnchor( false ), m_bInFootEndNoteSymbol( false ), m_bIgnoreHTMLComments( bNoHTMLComments ), - m_bRemoveHidden( false ), m_bBodySeen( false ), m_bReadingHeaderOrFooter( false ), m_bNotifyMacroEventRead( false ), m_isInTableStructure(false), m_nTableDepth( 0 ), m_nFloatingFrames( 0 ), - m_nListItems( 0 ), - m_pTempViewFrame(nullptr) + m_nListItems( 0 ) { // If requested explicitly, then force ignoring of comments (don't create postits for them). if (!bFuzzing) @@ -533,15 +532,12 @@ SwHTMLParser::~SwHTMLParser() m_xDoc.clear(); - if ( m_pTempViewFrame ) + if (m_xControlSizeContainer.is()) { - m_pTempViewFrame->DoClose(); - - // the temporary view frame is hidden, so the hidden flag might need to be removed - SwDocShell* pShell = m_xDoc.is() ? m_xDoc->GetDocShell() : nullptr; - if ( m_bRemoveHidden && pShell && pShell->GetMedium() ) - pShell->GetMedium()->GetItemSet().ClearItem( SID_HIDDEN ); + uno::Reference(m_xControlSizeContainer, uno::UNO_QUERY_THROW)->dispose(); + m_xControlSizeContainer.clear(); } + m_xControlSizeWindow.disposeAndClear(); } IMPL_LINK_NOARG( SwHTMLParser, AsyncCallback, void*, void ) diff --git a/sw/source/filter/html/swhtml.hxx b/sw/source/filter/html/swhtml.hxx index 00d65bc6e162..9977f994a978 100644 --- a/sw/source/filter/html/swhtml.hxx +++ b/sw/source/filter/html/swhtml.hxx @@ -37,6 +37,8 @@ #include #include #include +#include +#include #include #include @@ -46,7 +48,7 @@ #include class SfxMedium; -class SfxViewFrame; +class WorkWindow; class SdrObject; class SvxMacroTableDtor; class SwDoc; @@ -484,7 +486,6 @@ class SwHTMLParser : public SfxHTMLParser, public SvtListener bool m_bInFootEndNoteAnchor : 1; bool m_bInFootEndNoteSymbol : 1; bool m_bIgnoreHTMLComments : 1; - bool m_bRemoveHidden : 1; // the filter implementation might set the hidden flag bool m_bBodySeen : 1; bool m_bReadingHeaderOrFooter : 1; @@ -498,7 +499,10 @@ class SwHTMLParser : public SfxHTMLParser, public SvtListener /// the names corresponding to the DOCINFO field subtypes INFO[1-4] OUString m_InfoNames[4]; - SfxViewFrame* m_pTempViewFrame; + // A hidden window, and the control container on it, in which a form control is realized to + // measure its size when the document has no view. + VclPtr m_xControlSizeWindow; + uno::Reference m_xControlSizeContainer; bool m_bXHTML = false; bool m_bReqIF = false; From 434f3ee8a5e8a7789de93a567cec274c4f2de6e9 Mon Sep 17 00:00:00 2001 From: Justin Luth Date: Thu, 1 Oct 2026 11:20:28 -0400 Subject: [PATCH 097/289] tdf#162752 GetScalingOfSelectedText: avoid endless loop What seems to be a long-standing calamity was apparently exposed by my 7.5 commit 0031f34d0ba99de5384e13843e99ffbb01f729d0. Without this fix, nIdx was never changing, so the while loop ran infinitely - ever since initial creation. Since synchronized SwTextNode::GetMinMaxSize (mentioned in the comment) doesn't loop, it doesn't seem to need any changes. Change-Id: I503839d93f212d354dd66e8a5dfdf3f4730f068f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211691 Tested-by: Jenkins Reviewed-by: Justin Luth --- sw/source/core/text/itratr.cxx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sw/source/core/text/itratr.cxx b/sw/source/core/text/itratr.cxx index a11fef9483fb..ee9c41bfd5d5 100644 --- a/sw/source/core/text/itratr.cxx +++ b/sw/source/core/text/itratr.cxx @@ -1606,9 +1606,10 @@ sal_uInt16 SwTextFrame::GetScalingOfSelectedText( nProWidth += aIter.GetFnt()->GetTextSize_( aDrawInf ).Width(); nIdx++; } - else if ( pHint && ( cChar == CH_TXTATR_BREAKWORD || cChar == CH_TXTATR_INWORD ) ) + else if (cChar == CH_TXTATR_BREAKWORD || cChar == CH_TXTATR_INWORD) { - switch( pHint->Which() ) + const sal_uInt16 nWhich = pHint ? pHint->Which() : 0; + switch(nWhich) { case RES_TXTATR_FTN : { From b4a56008439f7d723ab345765eb2e9ad676a5148 Mon Sep 17 00:00:00 2001 From: Neil Roberts Date: Thu, 1 Oct 2026 21:36:35 +0200 Subject: [PATCH 098/289] Related tdf#173585 Assert that pointer is not null when deref SwUnoCursor Changes SwUnoCursor::operator* to use shared_ptr::operator* so that it will assert that the pointer is not null. This should help catch cases that were relying on undefined behaviour to get a pointer to the returned reference. Change-Id: If90db9404a34fb08bfef506eb00ebd99fb82406b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211698 Tested-by: Jenkins Reviewed-by: Neil Roberts --- sw/inc/unocrsr.hxx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/sw/inc/unocrsr.hxx b/sw/inc/unocrsr.hxx index e00ff8e38c01..d74dfd250bae 100644 --- a/sw/inc/unocrsr.hxx +++ b/sw/inc/unocrsr.hxx @@ -141,7 +141,11 @@ namespace sw SwUnoCursor* operator->() const { return get(); } SwUnoCursor& operator*() const - { return *get(); } + { + // shared_ptr::operator* is used instead of get() so that it will assert that the + // pointer is not null. See tdf#173585 + return *m_pCursor; + } UnoCursorPointer& operator=(const UnoCursorPointer& aOther) { if (m_pCursor) From a18375bf84af8e1e65cc865b1b4e86c53999741b Mon Sep 17 00:00:00 2001 From: Neil Roberts Date: Thu, 1 Oct 2026 13:26:12 +0200 Subject: [PATCH 099/289] tdf#173818 Update sensitivity of letter spacing label when change alignment MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The justification section of the dialog is all disabled whenever the chosen alignment is something other than “justify”. When the value is changed the sensitivity of all of the controls is updated, except that the update for the label for letter spacing was missing. This looked weird on the dialog. Change-Id: Ibc774402ce72f820f14ea8265b20cb0113f84be9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211675 Tested-by: Jenkins Reviewed-by: Neil Roberts --- cui/source/tabpages/paragrph.cxx | 1 + 1 file changed, 1 insertion(+) diff --git a/cui/source/tabpages/paragrph.cxx b/cui/source/tabpages/paragrph.cxx index a9e246b4efce..62f26bb5655f 100644 --- a/cui/source/tabpages/paragrph.cxx +++ b/cui/source/tabpages/paragrph.cxx @@ -1710,6 +1710,7 @@ IMPL_LINK_NOARG(SvxParaAlignTabPage, AlignHdl_Impl, weld::Toggleable&, void) m_xLabelMinimum->set_sensitive(bJustify); m_xLabelDesired->set_sensitive(bJustify); m_xLabelMaximum->set_sensitive(bJustify); + m_xLabelLetterSpacing->set_sensitive(bJustify); m_xWordSpacing->set_sensitive(bJustify); m_xWordSpacingMinimum->set_sensitive(bJustify); m_xWordSpacingMaximum->set_sensitive(bJustify); From d16199baa9092226aef586991255ec8542b17efb Mon Sep 17 00:00:00 2001 From: Michael Weghorn Date: Thu, 1 Oct 2026 13:55:41 +0200 Subject: [PATCH 100/289] tdf#173695 svx: Set fixed height for ColorWindow's icon view Following up to commit 6296615b8d5c96530c59b06a9873be3614a1e76c (master-android) Author: Michael Weghorn Date: Tue Sep 29 14:20:18 2026 +0200 tdf#173695 svx: Ensure minimum height for ColorWindow and commit 5c53840b5737132931559d27f73103d90164c80b Author: Michael Weghorn Date: Wed Sep 30 10:15:59 2026 +0200 tdf#173695 svx: Increase min height for ColorWindow icon view to 250 , switch from using a minimum height of 250 to using that as the fixed height. The idea of using a minimum size was to still allow using more space for the ColorWindow when a palette with a lot of colors is initially selected. However, the fact that the size of the popup differs depending on what palette is initiallly selected is considered confusing/as a bug, so instead use a fixed height after all, see discussion in tdf#173695 for more details/background. A fixed height was also used when SvxColorValueSet was still used in ColorWindow, i.e. before commit a4d5983b4e9331950fce1a6895d55becabcdaf5f Author: Michael Weghorn Date: Fri Jun 5 11:48:54 2026 +0200 tdf#130857 Port ColorWindow from SvxColorValueSet to ColorIconView By then, the size could more easily be optimized to just fit the colors of the "Standard" palette. With weld::IconView being used now, the exact spacing can differ depending on what toolkit/theme/style is used, see the above-mentioned 5c53840b5737132931559d27f73103d90164c80b for more details. Which properties are evaluated in the .ui file depends on the weld implementation. While the GTK implementation evaluates GtkScrolledWindow::min-content-height and GtkScrolledWindow::max-content-height, the vcl one doesn't do that. Also set GtkWidget::height-request so the fixed height also applies for that one. Change-Id: I7c49218872610bcf345b35849d664f85d29fdc47 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211678 Tested-by: Jenkins Reviewed-by: Michael Weghorn --- svx/source/tbxctrls/tbcontrl.cxx | 5 ----- svx/uiconfig/ui/colorwindow.ui | 7 +++++-- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/svx/source/tbxctrls/tbcontrl.cxx b/svx/source/tbxctrls/tbcontrl.cxx index 2f998c5e03ac..d6b2851ea856 100644 --- a/svx/source/tbxctrls/tbcontrl.cxx +++ b/svx/source/tbxctrls/tbcontrl.cxx @@ -2123,11 +2123,6 @@ ColorWindow::ColorWindow(OUString rCommand, mxPaletteManager->ReloadColorSet(maColorIconView); mxPaletteManager->ReloadRecentColorSet(maRecentColorIconView); - // ensure minimum height to also provide space for palettes with - // more colors when one with few colors is initially selected - if (maColorIconView.get_size_request().Height() < 250) - maColorIconView.set_size_request(-1, 250); - AddStatusListener( u".uno:ColorTableState"_ustr ); AddStatusListener( maCommand ); if ( maCommand == ".uno:FrameLineColor" ) diff --git a/svx/uiconfig/ui/colorwindow.ui b/svx/uiconfig/ui/colorwindow.ui index 5c51bceccf7c..973897eefd21 100644 --- a/svx/uiconfig/ui/colorwindow.ui +++ b/svx/uiconfig/ui/colorwindow.ui @@ -123,20 +123,23 @@ + 250 True True - True + start never in + 250 False + 250 True True True True + start 6 - True coloriconview_model 12 0 From ec695f6118616fb7e69cd311858a6f19619e184a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= Date: Sun, 27 Sep 2026 15:31:31 +0000 Subject: [PATCH 101/289] ofz#566727923 refuse a delete whose two ends are not in the same cell MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit /src/libreoffice/sw/source/core/table/swtable.cxx:2347:73: runtime error: member call on address 0x5ae75cdc3ea0 which does not point to an object of type 'SwNode' #0 0x5ae73cde0805 in SwTable::GetTableNode() const /src/libreoffice/sw/source/core/table/swtable.cxx:2347:73 #1 0x5ae73cddf1d6 in SwTable::SwClientNotify(SwModify const&, SfxHint const&) /src/libreoffice/sw/source/core/table/swtable.cxx:329:39 #2 0x5ae73be96db9 in SwModify::CallSwClientNotify(SfxHint const&) const /src/libreoffice/sw/source/core/attr/calbck.cxx:276:20 #3 0x5ae73be96f81 in sw::BroadcastingModify::CallSwClientNotify(SfxHint const&) const /src/libreoffice/sw/source/core/attr/calbck.cxx:297:15 #4 0x5ae73c389203 in SwDoc::IsUsed(sw::BroadcastingModify const&) const /src/libreoffice/sw/source/core/doc/poolfmt.cxx:108:13 #5 0x5ae73c472533 in SwDoc::GetUniqueTableName() const /src/libreoffice/sw/source/core/docnode/ndtbl.cxx:4265:38 #6 0x5ae73c46dc3b in SwDoc::InsertTable(SwInsertTableOptions const&, SwPosition const&, unsigned short, unsigned short, short, SwTableAutoFormat const*, std::__1::vector> const*, bool, bool, rtl::OUString const&) /src/libreoffice/sw/source/core/docnode/ndtbl.cxx:379:22 #7 0x5ae73ba4ba51 in WW8TabDesc::CreateSwTable() /src/libreoffice/sw/source/filter/ww8/ww8par2.cxx:2415:30 #8 0x5ae73ba595f0 in SwWW8ImplReader::StartTable(int) /src/libreoffice/sw/source/filter/ww8/ww8par2.cxx:3428:23 a tracked deletion applied at import ran from one cell to two cells later, and removed the whole section of the cell between them while the table still listed that cell a range that ends in another table, runs into a cell from outside, or ends in a nested table leaves a box without its cell in the same way Signed-off-by: Caolán McNamara Change-Id: I1f07e0e1784d88e47feb97bce4490ba3db83e7cb Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/13647 Tested-by: Jenkins CPCI Reviewed-by: Noel Grandin (cherry picked from commit 898c0e4329e20e3bc2988cc1f576bad1074fff4f) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211701 Tested-by: Jenkins Reviewed-by: Xisco Fauli --- sw/qa/core/docnode/data/ofz566727923.doc | Bin 0 -> 12415 bytes sw/qa/core/docnode/docnode.cxx | 12 ++++++++++++ .../doc/DocumentContentOperationsManager.cxx | 8 ++++++++ 3 files changed, 20 insertions(+) create mode 100644 sw/qa/core/docnode/data/ofz566727923.doc diff --git a/sw/qa/core/docnode/data/ofz566727923.doc b/sw/qa/core/docnode/data/ofz566727923.doc new file mode 100644 index 0000000000000000000000000000000000000000..4c836d08156998b515db8736c5aab77c59a247ef GIT binary patch literal 12415 zcmeI2eQcH09mmg8`f{;o_o)|z3sic zY#`y>eDC?4bAG?``a9?Rp5ODl`}@&Ho_%@z-^~t_5*C#m9L(4_dJuhI>Rug9`o8)?v&fvC;F(Hq5xGTXsfn9zINI5T#a80;y}vI({?Ez}l|Mv9_RB z>us;1+6K--dDdB&ZhO_^NrPfxuTtk?tTPuknF*sj^Pnd^D@^phg|kt2-Z*iVyd5)n z-?;YVBo8B~MzwppJ?USmS;Ne&HyzBN&x&cK`k?jSOL+l1LbEQdl+<2N+BrJxQ#RT0 zp=>R(k9)6pwaAvFw3t5E#q2!V8&>7TX?29OV@}LNG46?Z_0;mLx1U(!3f9W)!N9sI z2Ca)K%=Z}~`GYIEBBjr`^0^xAb=1#h=aUDftr=U>(KV(zQK zc8(M?o3{VL7gsW*Yr4{xTH9NAe$!bb^p8ych55-LBq>b)kvloJz;$mINS=LZYf17X zsjJ+{xrnHXG$)#KHw1Q#a*NDLvxQry!`|X8mPr;|6^N{?Jv6dMYuTONo0{yaTE3>FqUwfd&f&VgoTt$7WRWN($zX^ny| zYYzLE2#s(oR699@6>O{~UxVMZ?hw5fAQ1X1l5{4wBX>+H{VL>bn-fo#ANI#X=7lCiMSfhX9mX1Iv=T_Wzu(b z?EDr9UqG5-1kFlWjy&}A2OqC&8}*aNV`kdqpB~aEdgNR3_v`QUc|bHV%rNaIg{0&p6jaUaI0T*K21qxk(ZfzLp+p0O4I)A#)Q ziWceb$+LQd3Fz3K(eEAnjeTO?G4-)2e}I<1p%gTKCE5Zh7OfuD-VRrWxzx;mH)l>vSd)i_Lok zzIjmliKU(I5Kniw|A?y2ld4@{(CnR0C}s=!PW!*2Kk}+yF5wgAtL}2?Ob-26goU zTKcwkx6EjvOrA(_Nk#^jTSpwZR$CgCB-@YjH(8k|U#X2wFI8Jqrn-foEQaLya-y_lE3+%pAj(@CW;ni5-< zN0~SqQaF=ksxw*3v_Wc73zRkB;$*!S+>duAT>llsHLU5Efo@K%e=T^fAZFx;|F=7o z(OApNw^yvK zJUJ;6^gJGUfg8>>Py96p3#n(=+UU~UPwok*t z{ML`x;a@^=iD_`S;VI}b&aiL z>z>}e-lm@R?oV;@_RVPTZ0&MugpPN|*SB}H_hr;_DX6qC+97%IsytJyHLV48;6bnx zd>cFr9s!Sm?}A-G@842p|9`mTIVw=<1YDN;{hUvs@Gy$B!45Hpyn$Mi`4mcBf34{g z;0NGIum?N^eh8icd%<%+?_Gc9&bFL6iI8I=c&HDha+FD7OEj3B7)%%bTKs3dC00nx zaN=w}=d}tdO4ekn4Kfq8XUNO8Rw{QxN?l>WPZ9va^Dbc}&*v%UK_<}wd1El1)nYziIGN{RfK<{`e6#cQR0g&% z>&E#(&=*{(p_JCuZWK~WGp98EX`w@*0B?+ZFnVFDZ*TQgTC4TADJS`@U*?+Fm9&qE tp6J71d~QCw*sKZ<{{=m(25), nBoxes); + CPPUNIT_ASSERT_EQUAL(25, nCellSections); +} + CPPUNIT_PLUGIN_IMPLEMENT(); /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/core/doc/DocumentContentOperationsManager.cxx b/sw/source/core/doc/DocumentContentOperationsManager.cxx index bf81bb73ca9a..4900cdbff110 100644 --- a/sw/source/core/doc/DocumentContentOperationsManager.cxx +++ b/sw/source/core/doc/DocumentContentOperationsManager.cxx @@ -4609,6 +4609,14 @@ bool DocumentContentOperationsManager::DeleteRangeImplImpl(SwPaM & rPam, SwDelet return false; } + // A delete stays within one cell of a table, the same rule that a cursor selection follows + const SwStartNode* pStartBox = pStart->GetNode().FindTableBoxStartNode(); + const SwStartNode* pEndBox = pEnd->GetNode().FindTableBoxStartNode(); + if (pStartBox != pEndBox) + { + return false; + } + if( m_rDoc.GetAutoCorrExceptWord() ) { // if necessary the saved Word for the exception From 8c112eb826b9dbd13295dcd8efec779f217b40fe Mon Sep 17 00:00:00 2001 From: Mike Kaganski Date: Mon, 28 Sep 2026 21:10:00 +0500 Subject: [PATCH 102/289] tdf#163240 sw: let a link's rectangle cover the ruby it ends in A ruby makes its line taller than the line's own text, so for a hyperlink that ends inside one the selection region for that line was split into two rectangles: the band holding the line's text, which runs on under the ruby's base, and above it a band reaching only as far as the ruby begins. Neither covered the phonetic annotation standing above the base. Each became a link annotation in the exported PDF, so clicking the phonetic annotation did nothing, while a 6.9pt annotation stood over blank space carrying no structure element, which veraPDF reported under ISO 14289-1 7.18.5: A Link annotation is an Artifact or is nested within null tag (standard type = null) instead of Link Export a document whose hyperlink ends in a ruby to PDF with tagged PDF enabled, then run veraPDF over the result in PDF/UA-1 mode to see it. The same document with its text running down the page draws the clause twice. The rectangle a hit test returns for a character is as tall as the whole line, ruby and all, so GetCursorRectsContainingText, which 6593d680e21c24501a58bac216de4a7c71541959 (tdf#157816 sw: PDF export: filter out links on empty space, fields, 2023-11-02) added to drop a rectangle holding no text, kept the empty band. Ask for the real height and the comparison narrows to the band of the portion the character is in. Dropping the empty band would leave the phonetic annotation uncovered, so grow the surviving rectangle over the ruby as well, using the extent GetCharRect reports for a position inside a ruby portion. Where the text runs down the page a band's height is measured along X, which the real height carries as a negative height, so narrow across the line there instead. The region split still hands such a line back in pieces, and the piece holding the ruby holds none of the line's text, so nothing paints in it and nothing tags it. Pieces that tile one strip of a line are therefore joined into one annotation. Where the text wraps onto a further line the pieces no longer tile, and such a page keeps an annotation a validator rejects. veraPDF no longer reports 7.18.5, in either writing direction, for a line that does not wrap, and the phonetic annotation is inside the link's rectangle. An annotation is a plain box, so a ruby over part of a link raises that line's whole rectangle, and a link ending partway through a ruby's base widens it to the end of that base. Signed-off-by: Mike Kaganski Change-Id: Ide896d00c7619b772802762e85abfb6e2cf7ef0a Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/13704 Reviewed-by: Miklos Vajna Tested-by: Jenkins CPCI (cherry picked from commit 3c9aede98b24d272e6dfcae0f3b898777fa89d44) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211703 Tested-by: Jenkins Reviewed-by: Xisco Fauli --- sw/qa/core/text/EnhancedPDFExportHelper.cxx | 128 ++++++++++++++++++ .../text/data/link-ends-in-ruby-vertical.fodt | 34 +++++ sw/qa/core/text/data/link-ends-in-ruby.fodt | 34 +++++ .../text/data/link-part-ruby-one-line.fodt | 34 +++++ .../text/data/link-starts-after-ruby.fodt | 34 +++++ .../data/link-starts-at-abutting-ruby.fodt | 34 +++++ .../core/text/EnhancedPDFExportHelper.cxx | 100 +++++++++++++- 7 files changed, 395 insertions(+), 3 deletions(-) create mode 100644 sw/qa/core/text/data/link-ends-in-ruby-vertical.fodt create mode 100644 sw/qa/core/text/data/link-ends-in-ruby.fodt create mode 100644 sw/qa/core/text/data/link-part-ruby-one-line.fodt create mode 100644 sw/qa/core/text/data/link-starts-after-ruby.fodt create mode 100644 sw/qa/core/text/data/link-starts-at-abutting-ruby.fodt diff --git a/sw/qa/core/text/EnhancedPDFExportHelper.cxx b/sw/qa/core/text/EnhancedPDFExportHelper.cxx index 6e948e91fa34..f77e3267bb29 100644 --- a/sw/qa/core/text/EnhancedPDFExportHelper.cxx +++ b/sw/qa/core/text/EnhancedPDFExportHelper.cxx @@ -16,6 +16,7 @@ #include #include +#include #include #include #include @@ -469,6 +470,133 @@ CPPUNIT_TEST_FIXTURE(Test, testParagraphLanguage) aLanguages); } +// the rectangle of every link annotation, down the page, each annotation carrying the +// /StructParent that ISO 14289-1 7.18.5 needs to find its Link element +std::vector lcl_CollectTaggedLinkRects(vcl::filter::PDFDocument& rDocument) +{ + std::vector aRects; + for (auto* pObject : rDocument.GetObjects()) + { + auto pSubtype = dynamic_cast(pObject->Lookup("Subtype"_ostr)); + if (!pSubtype || pSubtype->GetValue() != "Link") + continue; + CPPUNIT_ASSERT_MESSAGE("a link annotation with no /StructParent", + pObject->Lookup("StructParent"_ostr)); + auto pRect = dynamic_cast(pObject->Lookup("Rect"_ostr)); + CPPUNIT_ASSERT(pRect); + CPPUNIT_ASSERT_EQUAL(size_t(4), pRect->GetElements().size()); + const auto aCorner = [pRect](size_t nIndex) { + auto pNumber = dynamic_cast(pRect->GetElement(nIndex)); + CPPUNIT_ASSERT(pNumber); + return pNumber->GetValue(); + }; + aRects.emplace_back(aCorner(0), aCorner(1), aCorner(2), aCorner(3)); + } + // PDF y coordinates increase upwards, so the highest bottom is the first line + std::ranges::sort(aRects, + [](const basegfx::B2DRectangle& rLeft, const basegfx::B2DRectangle& rRight) { + return rLeft.getMinY() > rRight.getMinY(); + }); + return aRects; +} + +CPPUNIT_TEST_FIXTURE(Test, testLinkEndsInRuby) +{ + createSwDoc("link-ends-in-ruby.fodt"); + + uno::Sequence aFilterData{ comphelper::makePropertyValue(u"UseTaggedPDF"_ustr, true) }; + save(TestFilter::PDF_WRITER, + { comphelper::makePropertyValue(u"FilterData"_ustr, aFilterData) }); + + vcl::filter::PDFDocument aDocument; + CPPUNIT_ASSERT(aDocument.Read(*maTempFile.GetStream(StreamMode::READ))); + + // one rectangle per line the link covers, and no third one over the empty band beside + // the ruby, which no structure element could cover + const std::vector aRects(lcl_CollectTaggedLinkRects(aDocument)); + CPPUNIT_ASSERT_EQUAL(size_t(2), aRects.size()); + // the first line holds text alone; the second carries the ruby, and its rectangle + // stands over the ruby's band so that the phonetic annotation takes the click + CPPUNIT_ASSERT_DOUBLES_EQUAL(13.8, aRects[0].getHeight(), 0.5); + CPPUNIT_ASSERT_DOUBLES_EQUAL(20.7, aRects[1].getHeight(), 0.5); +} + +CPPUNIT_TEST_FIXTURE(Test, testLinkEndsInRubyVertical) +{ + createSwDoc("link-ends-in-ruby-vertical.fodt"); + + uno::Sequence aFilterData{ comphelper::makePropertyValue(u"UseTaggedPDF"_ustr, true) }; + save(TestFilter::PDF_WRITER, + { comphelper::makePropertyValue(u"FilterData"_ustr, aFilterData) }); + + vcl::filter::PDFDocument aDocument; + CPPUNIT_ASSERT(aDocument.Read(*maTempFile.GetStream(StreamMode::READ))); + + // the region split hands this line back in pieces, one of them holding the ruby and + // none of the line's text, which nothing paints in and so nothing tags; the count is + // what this pins - the width was already right before the pieces were joined + const std::vector aRects(lcl_CollectTaggedLinkRects(aDocument)); + CPPUNIT_ASSERT_EQUAL(size_t(1), aRects.size()); + CPPUNIT_ASSERT_DOUBLES_EQUAL(20.7, aRects[0].getWidth(), 0.5); +} + +CPPUNIT_TEST_FIXTURE(Test, testLinkPartRubyOneLine) +{ + createSwDoc("link-part-ruby-one-line.fodt"); + + uno::Sequence aFilterData{ comphelper::makePropertyValue(u"UseTaggedPDF"_ustr, true) }; + save(TestFilter::PDF_WRITER, + { comphelper::makePropertyValue(u"FilterData"_ustr, aFilterData) }); + + vcl::filter::PDFDocument aDocument; + CPPUNIT_ASSERT(aDocument.Read(*maTempFile.GetStream(StreamMode::READ))); + + // an annotation is a plain box, so a ruby over the link's second half raises the whole + // rectangle; leaving the first half its own height would need a quadrilateral + const std::vector aRects(lcl_CollectTaggedLinkRects(aDocument)); + CPPUNIT_ASSERT_EQUAL(size_t(1), aRects.size()); + CPPUNIT_ASSERT_DOUBLES_EQUAL(20.7, aRects[0].getHeight(), 0.5); +} + +CPPUNIT_TEST_FIXTURE(Test, testLinkStartsAfterRuby) +{ + createSwDoc("link-starts-after-ruby.fodt"); + + uno::Sequence aFilterData{ comphelper::makePropertyValue(u"UseTaggedPDF"_ustr, true) }; + save(TestFilter::PDF_WRITER, + { comphelper::makePropertyValue(u"FilterData"_ustr, aFilterData) }); + + vcl::filter::PDFDocument aDocument; + CPPUNIT_ASSERT(aDocument.Read(*maTempFile.GetStream(StreamMode::READ))); + + const std::vector aRects(lcl_CollectTaggedLinkRects(aDocument)); + CPPUNIT_ASSERT_EQUAL(size_t(1), aRects.size()); + // the ruby raises the line, so the link standing beside it is as tall as the line + CPPUNIT_ASSERT_DOUBLES_EQUAL(20.7, aRects[0].getHeight(), 0.5); + // the ruby belongs to no link, so the rectangle starts to the right of it, not at the + // left text margin of 56.7pt + CPPUNIT_ASSERT_GREATER(65.0, aRects[0].getMinX()); +} + +CPPUNIT_TEST_FIXTURE(Test, testLinkStartsAtAbuttingRuby) +{ + createSwDoc("link-starts-at-abutting-ruby.fodt"); + + uno::Sequence aFilterData{ comphelper::makePropertyValue(u"UseTaggedPDF"_ustr, true) }; + save(TestFilter::PDF_WRITER, + { comphelper::makePropertyValue(u"FilterData"_ustr, aFilterData) }); + + vcl::filter::PDFDocument aDocument; + CPPUNIT_ASSERT(aDocument.Read(*maTempFile.GetStream(StreamMode::READ))); + + const std::vector aRects(lcl_CollectTaggedLinkRects(aDocument)); + CPPUNIT_ASSERT_EQUAL(size_t(1), aRects.size()); + CPPUNIT_ASSERT_DOUBLES_EQUAL(20.7, aRects[0].getHeight(), 0.5); + // a hit test at the link's first character lands in the ruby before it, which the link + // does not cover, so the rectangle starts at the second ruby + CPPUNIT_ASSERT_GREATER(65.0, aRects[0].getMinX()); +} + CPPUNIT_TEST_FIXTURE(Test, testRubyStructureOrder) { createSwDoc("ruby-positions.fodt"); diff --git a/sw/qa/core/text/data/link-ends-in-ruby-vertical.fodt b/sw/qa/core/text/data/link-ends-in-ruby-vertical.fodt new file mode 100644 index 000000000000..1a6e03ea217a --- /dev/null +++ b/sw/qa/core/text/data/link-ends-in-ruby-vertical.fodt @@ -0,0 +1,34 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + A hyperlink long enough to wrap, ending in a phonetic annotation whose band is taller than the rest of the line baseruby + + + diff --git a/sw/qa/core/text/data/link-ends-in-ruby.fodt b/sw/qa/core/text/data/link-ends-in-ruby.fodt new file mode 100644 index 000000000000..488e3479921c --- /dev/null +++ b/sw/qa/core/text/data/link-ends-in-ruby.fodt @@ -0,0 +1,34 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + A hyperlink long enough to wrap, ending in a phonetic annotation whose band is taller than the rest of the line baseruby + + + diff --git a/sw/qa/core/text/data/link-part-ruby-one-line.fodt b/sw/qa/core/text/data/link-part-ruby-one-line.fodt new file mode 100644 index 000000000000..5420774f421b --- /dev/null +++ b/sw/qa/core/text/data/link-part-ruby-one-line.fodt @@ -0,0 +1,34 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + plain half then baseruby + + + diff --git a/sw/qa/core/text/data/link-starts-after-ruby.fodt b/sw/qa/core/text/data/link-starts-after-ruby.fodt new file mode 100644 index 000000000000..5126d517094c --- /dev/null +++ b/sw/qa/core/text/data/link-starts-after-ruby.fodt @@ -0,0 +1,34 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + baserubylink after the ruby + + + diff --git a/sw/qa/core/text/data/link-starts-at-abutting-ruby.fodt b/sw/qa/core/text/data/link-starts-at-abutting-ruby.fodt new file mode 100644 index 000000000000..287e2e957f75 --- /dev/null +++ b/sw/qa/core/text/data/link-starts-at-abutting-ruby.fodt @@ -0,0 +1,34 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + baserubywordyomi and more + + + diff --git a/sw/source/core/text/EnhancedPDFExportHelper.cxx b/sw/source/core/text/EnhancedPDFExportHelper.cxx index d83174ce6ca0..c84c1b0b1995 100644 --- a/sw/source/core/text/EnhancedPDFExportHelper.cxx +++ b/sw/source/core/text/EnhancedPDFExportHelper.cxx @@ -30,6 +30,7 @@ #include #include +#include #include #include #include @@ -598,6 +599,8 @@ bool lcl_TryMoveToNonHiddenField(SwEditShell& rShell, const SwTextNode& rNd, con // the centre of a one-glyph rectangle falls in that glyph's second half, so the hit // test below returns the character that contains the point cms.m_bPosMatchesBounds = true; + // the band of the portion, not the taller band a ruby gives the line + cms.m_bRealHeight = true; SwPosition pos(rShell.GetDoc()->GetNodes()); if (rShell.GetLayout()->GetModelPositionForViewPoint(&pos, center, &cms) && *pStart <= pos && pos <= *pEnd) @@ -606,15 +609,106 @@ bool lcl_TryMoveToNonHiddenField(SwEditShell& rShell, const SwTextNode& rNd, con std::pair const tmp(center, false); SwContentFrame const*const pFrame( pos.nNode.GetNode().GetTextNode()->getLayoutFrame(rShell.GetLayout(), &pos, &tmp)); - if (pFrame->GetCharRect(charRect, pos, &cms, false) - && rRect.Overlaps(charRect)) + if (pFrame->GetCharRect(charRect, pos, &cms, false)) { - ret.push_back(rRect); + // a reverse portion in a vertical frame can give a negative offset, which + // no band matches + if (cms.m_aRealHeight.X() >= 0) + { + // the band lies along X, and its extent arrives as a negative height, in + // a vertical frame or a rotated portion but not in the two together + if (cms.m_aRealHeight.Y() > 0) + { + charRect.SetPosY(charRect.Top() + cms.m_aRealHeight.X()); + charRect.Height(cms.m_aRealHeight.Y()); + } + else if (cms.m_aRealHeight.Y() < 0) + { + charRect.SetPosX(charRect.Left() + cms.m_aRealHeight.X()); + charRect.Width(-cms.m_aRealHeight.Y()); + } + } + if (rRect.Overlaps(charRect)) + { + ret.push_back(rRect); + } } } // reset stupid static var that may have gotten set now SwTextCursor::SetRightMargin(false); // WTF is this crap } + + if (ret.empty()) + return ret; + + // a ruby's band holds no text of the line, so grow the rectangle over the ruby portion + const auto aCoverRuby = [&rShell, &ret](const SwPosition& rPos, sal_Int32 nRubyAt, + const SwRect& rOnItsLine) -> bool { + const SwTextNode* pNode = rPos.GetNode().GetTextNode(); + // a hit test descends into a ruby for the position right after it too, so the hint + // decides whether the link reaches into one + if (!pNode || nRubyAt < 0 || !pNode->GetTextAttrAt(nRubyAt, RES_TXTATR_CJK_RUBY)) + return false; + + const std::pair aPoint(rOnItsLine.Center(), false); + const SwContentFrame* pFrame = pNode->getLayoutFrame(rShell.GetLayout(), &rPos, &aPoint); + if (!pFrame) + return false; + + SwCursorMoveState cms(CursorMoveState::NONE); + cms.m_b2Lines = true; + // CalcFrameRects sets it too - an undersized frame is not scrolled to be hit + cms.m_bNoScroll = true; + // the multi type is the innermost portion's, the portion rectangle the outermost + // one's, so a nested ruby would grow over whatever encloses it + if (!pFrame->GetCharRect(o3tl::temporary(SwRect()), rPos, &cms, false) || !cms.m_p2Lines + || cms.m_p2Lines->nMultiType != MultiPortionType::RUBY + || cms.m_p2Lines->aPortion2.HasArea()) + { + return false; + } + + bool bGrown = false; + for (SwRect& rKept : ret) + { + if (rKept.Overlaps(cms.m_p2Lines->aPortion)) + { + rKept.Union(cms.m_p2Lines->aPortion); + bGrown = true; + } + } + return bGrown; + }; + // either end may reach into a ruby; the rectangle only picks the frame of a node laid + // out more than once, and any rectangle of the link serves for that + const bool bStartGrown = aCoverRuby(*pStart, pStart->GetContentIndex(), ret.front()); + const bool bEndGrown = aCoverRuby(*pEnd, pEnd->GetContentIndex() - 1, ret.back()); + if (!bStartGrown && !bEndGrown) + return ret; + + // rectangles that tile one strip of a line are one annotation + for (bool bMerged = true; bMerged;) + { + bMerged = false; + for (size_t i = 0; !bMerged && i + 1 < ret.size(); ++i) + { + for (size_t j = i + 1; !bMerged && j < ret.size(); ++j) + { + const SwRect aUnion(ret[i].GetUnion(ret[j])); + // the full extent across the line, and no gap along it + const bool bTiles + = (aUnion.Width() == ret[i].Width() && aUnion.Width() == ret[j].Width() + && aUnion.Height() <= ret[i].Height() + ret[j].Height()) + || (aUnion.Height() == ret[i].Height() && aUnion.Height() == ret[j].Height() + && aUnion.Width() <= ret[i].Width() + ret[j].Width()); + if (!bTiles) + continue; + ret[i] = aUnion; + ret.erase(ret.begin() + j); + bMerged = true; + } + } + } return ret; } From c5592ec7db0dfbdcdf488a4de42acdf34bfda164 Mon Sep 17 00:00:00 2001 From: Mike Kaganski Date: Tue, 29 Sep 2026 11:06:18 +0500 Subject: [PATCH 103/289] tdf#163240 sw: build a link's rectangles from its line pieces Exporting a hyperlink laid out down the page, over more than one line, produced link annotations a PDF/UA validator rejects: on a vertical page whose link wraps, two of the three annotations carried no structure element, and veraPDF reported both under ISO 14289-1 7.18.5: A Link annotation is an Artifact or is nested within null tag (standard type = null) instead of Link Export a document whose hyperlink ends in a ruby and runs over several lines down the page to PDF with tagged PDF enabled, then run veraPDF over the result in PDF/UA-1 mode to see it. An annotation is tied to a structure element by the text painted inside it, so one holding no text of any line is tied to nothing. That is what the region CalcFrameRects returns can hand out: it covers the selection in whatever rectangles fall out of inverting the pieces it was built from, and one of those can span several lines while another holds a ruby and none of the text beside it. Let CalcFrameRects return those pieces as well, and the holes it cuts afterwards, and take the shape from the pieces and the area from the region: the pieces follow the lines and, once the overlapping ones are joined, no longer overlap each other, so every part of the region falls in exactly one of them. What tdf#157816 requires still decides each part, and the parts a piece has left are joined unless the join would reach over a hole - a fly, a drop cap - that the selection excludes on purpose. Every annotation now holds text of the lines it covers, so every one of them is tagged, and a ruby sits inside the rectangle of the line that carries it. The narrowing to a portion's band, the growing over a ruby portion and the joining of tiling rectangles that Ide896d00c7619b772802762e85abfb6e2cf7ef0a ("tdf#163240 sw: let a link's rectangle cover the ruby it ends in") added are all gone. On the horizontal document that change was measured against, the exported rectangles are the same to the last digit. Signed-off-by: Mike Kaganski Change-Id: I9faf2bc10af491576cc2f4ba5f3e3433eb03d16c Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/13767 Reviewed-by: Miklos Vajna Tested-by: Jenkins CPCI (cherry picked from commit e77b1d25d3601315f80169e4e811d74ef2ff0374) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211704 Reviewed-by: Xisco Fauli Tested-by: Jenkins --- sw/inc/swregion.hxx | 6 + sw/qa/core/text/EnhancedPDFExportHelper.cxx | 25 +++ .../link-ends-in-ruby-vertical-wrapped.fodt | 34 +++ sw/source/core/bastyp/swregion.cxx | 2 + sw/source/core/inc/rootfrm.hxx | 7 +- sw/source/core/layout/trvlfrm.cxx | 9 +- .../core/text/EnhancedPDFExportHelper.cxx | 196 +++++++----------- 7 files changed, 161 insertions(+), 118 deletions(-) create mode 100644 sw/qa/core/text/data/link-ends-in-ruby-vertical-wrapped.fodt diff --git a/sw/inc/swregion.hxx b/sw/inc/swregion.hxx index 338a30649c7a..1a951ab1658b 100644 --- a/sw/inc/swregion.hxx +++ b/sw/inc/swregion.hxx @@ -35,6 +35,7 @@ typedef std::vector SwRects; class SwRegionRects : public SwRects { SwRect m_aOrigin; // Origin area, limits the total area e.g. for Invert() + SwRects* m_pSubtracted = nullptr; inline void InsertRect( const SwRect &rRect, const sal_uInt16 nPos, bool &rDel); @@ -45,6 +46,11 @@ public: // most likely want to call ChangeOrigin() afterwards. explicit SwRegionRects( sal_uInt16 nInit = 20 ); + // Append every rectangle punched from here on, for a caller that wants the pieces a + // selection was built from and not only the region Invert() leaves. Invert() punches + // into a region of its own, so its own work is not recorded. + void RecordSubtracted(SwRects* pRects) { m_pSubtracted = pRects; } + // For punching from aOrigin. void operator-=( const SwRect& rRect ); void operator+=( const SwRect& rRect ); diff --git a/sw/qa/core/text/EnhancedPDFExportHelper.cxx b/sw/qa/core/text/EnhancedPDFExportHelper.cxx index f77e3267bb29..714d06a5dcd9 100644 --- a/sw/qa/core/text/EnhancedPDFExportHelper.cxx +++ b/sw/qa/core/text/EnhancedPDFExportHelper.cxx @@ -540,6 +540,31 @@ CPPUNIT_TEST_FIXTURE(Test, testLinkEndsInRubyVertical) CPPUNIT_ASSERT_DOUBLES_EQUAL(20.7, aRects[0].getWidth(), 0.5); } +CPPUNIT_TEST_FIXTURE(Test, testLinkEndsInRubyVerticalWrapped) +{ + createSwDoc("link-ends-in-ruby-vertical-wrapped.fodt"); + + uno::Sequence aFilterData{ comphelper::makePropertyValue(u"UseTaggedPDF"_ustr, true) }; + save(TestFilter::PDF_WRITER, + { comphelper::makePropertyValue(u"FilterData"_ustr, aFilterData) }); + + vcl::filter::PDFDocument aDocument; + CPPUNIT_ASSERT(aDocument.Read(*maTempFile.GetStream(StreamMode::READ))); + + // an annotation for each of the three lines, all tagged, which the collector asserts + std::vector aRects(lcl_CollectTaggedLinkRects(aDocument)); + CPPUNIT_ASSERT_EQUAL(size_t(3), aRects.size()); + // the text runs down the page from the right, so the widest x is the first line + std::ranges::sort(aRects, + [](const basegfx::B2DRectangle& rLeft, const basegfx::B2DRectangle& rRight) { + return rLeft.getMinX() > rRight.getMinX(); + }); + // only the third line carries the ruby, and only it is as wide as a ruby makes a line + CPPUNIT_ASSERT_DOUBLES_EQUAL(13.8, aRects[0].getWidth(), 0.5); + CPPUNIT_ASSERT_DOUBLES_EQUAL(13.8, aRects[1].getWidth(), 0.5); + CPPUNIT_ASSERT_DOUBLES_EQUAL(20.7, aRects[2].getWidth(), 0.5); +} + CPPUNIT_TEST_FIXTURE(Test, testLinkPartRubyOneLine) { createSwDoc("link-part-ruby-one-line.fodt"); diff --git a/sw/qa/core/text/data/link-ends-in-ruby-vertical-wrapped.fodt b/sw/qa/core/text/data/link-ends-in-ruby-vertical-wrapped.fodt new file mode 100644 index 000000000000..a8763d79c69e --- /dev/null +++ b/sw/qa/core/text/data/link-ends-in-ruby-vertical-wrapped.fodt @@ -0,0 +1,34 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + A hyperlink long enough to wrap, ending in a phonetic annotation whose band is taller than the rest of the line A hyperlink long enough to wrap, ending in a phonetic annotation whose band is taller than the rest of the line A hyperlink long enough to wrap, ending in a phonetic annotation whose band is taller than the rest of the line A hyperlink long enough to wrap, ending in a phonetic annotation whose band is taller than the rest of the line baseruby + + + diff --git a/sw/source/core/bastyp/swregion.cxx b/sw/source/core/bastyp/swregion.cxx index 97e271811ab8..8872c2e85203 100644 --- a/sw/source/core/bastyp/swregion.cxx +++ b/sw/source/core/bastyp/swregion.cxx @@ -65,6 +65,8 @@ void SwRegionRects::operator+=( const SwRect &rRect ) */ void SwRegionRects::operator-=( const SwRect &rRect ) { + if (m_pSubtracted) + m_pSubtracted->push_back(rRect); sal_uInt16 nMax = size(); for ( sal_uInt16 i = 0; i < nMax; ++i ) { diff --git a/sw/source/core/inc/rootfrm.hxx b/sw/source/core/inc/rootfrm.hxx index 7813a79686a1..4b5c2029e6e6 100644 --- a/sw/source/core/inc/rootfrm.hxx +++ b/sw/source/core/inc/rootfrm.hxx @@ -342,7 +342,12 @@ public: bool IsBetweenPages(const Point& rPt) const; enum class RectsMode { Default, NoAnchoredFlys }; - void CalcFrameRects(SwShellCursor const&, SwRects &, RectsMode eMode = RectsMode::Default); + /// pPieces, when given, also receives the rectangles the selection was built from, + /// which follow the lines while the region left in the second argument need not, and + /// pHoles the ones cut out of it afterwards - a fly, a drop cap. The two account for + /// the region only in NoAnchoredFlys mode, where nothing is added back to it. + void CalcFrameRects(SwShellCursor const&, SwRects&, RectsMode eMode = RectsMode::Default, + SwRects* pPieces = nullptr, SwRects* pHoles = nullptr); /** * Calculates the cells included from the current selection diff --git a/sw/source/core/layout/trvlfrm.cxx b/sw/source/core/layout/trvlfrm.cxx index 85ce7e34b0e4..6cbb00a305f1 100644 --- a/sw/source/core/layout/trvlfrm.cxx +++ b/sw/source/core/layout/trvlfrm.cxx @@ -2113,7 +2113,8 @@ static void Add( SwRegionRects& rRegion, const SwRect& rRect ) * rectangles are available for highlighting. * In the end the Flys are cut out of the region. */ -void SwRootFrame::CalcFrameRects(SwShellCursor const& rCursor, SwRects & rRects, RectsMode const eMode) +void SwRootFrame::CalcFrameRects(SwShellCursor const& rCursor, SwRects& rRects, + RectsMode const eMode, SwRects* pPieces, SwRects* pHoles) { auto [pStartPos, pEndPos] = rCursor.StartEnd(); // SwPosition* @@ -2126,6 +2127,11 @@ void SwRootFrame::CalcFrameRects(SwShellCursor const& rCursor, SwRects & rRects, SwRegionRects aRegion( !bIgnoreVisArea ? pSh->VisArea() : getFrameArea() ); + if (pPieces) + pPieces->clear(); + if (pHoles) + pHoles->clear(); + aRegion.RecordSubtracted(pPieces); if( !pStartPos->GetNode().IsContentNode() || !pStartPos->GetNode().GetContentNode()->getLayoutFrame(this) || ( pStartPos->GetNode() != pEndPos->GetNode() && @@ -2656,6 +2662,7 @@ void SwRootFrame::CalcFrameRects(SwShellCursor const& rCursor, SwRects & rRects, } aRegion.Invert(); + aRegion.RecordSubtracted(pHoles); // what follows cuts holes, not pieces pSt2Pos.reset(); pEnd2Pos.reset(); diff --git a/sw/source/core/text/EnhancedPDFExportHelper.cxx b/sw/source/core/text/EnhancedPDFExportHelper.cxx index c84c1b0b1995..84875715f893 100644 --- a/sw/source/core/text/EnhancedPDFExportHelper.cxx +++ b/sw/source/core/text/EnhancedPDFExportHelper.cxx @@ -30,7 +30,6 @@ #include #include -#include #include #include #include @@ -581,133 +580,98 @@ bool lcl_TryMoveToNonHiddenField(SwEditShell& rShell, const SwTextNode& rNd, con return true; }; +// absorb into rRects[rInto] one rectangle that touches it, nSlack twips apart counting as +// touching, unless their union would reach over one of rHoles +bool lcl_AbsorbOne(SwRects& rRects, size_t& rInto, tools::Long nSlack, const SwRects& rHoles) +{ + const SwRect aGrown(rRects[rInto].Pos() - Point(nSlack, nSlack), + rRects[rInto].SSize() + Size(2 * nSlack, 2 * nSlack)); + for (size_t i = 0; i < rRects.size(); ++i) + { + if (i == rInto || !aGrown.Overlaps(rRects[i])) + continue; + const SwRect aJoined(rRects[rInto].GetUnion(rRects[i])); + if (std::ranges::any_of( + rHoles, [&aJoined](const SwRect& rHole) { return aJoined.Overlaps(rHole); })) + { + continue; + } + rRects[rInto] = aJoined; + rRects.erase(rRects.begin() + i); + if (i < rInto) + --rInto; + return true; + } + return false; +} + +void lcl_JoinTouching(SwRects& rRects, tools::Long nSlack, const SwRects& rHoles) +{ + // the union of two rectangles reaches further than either, so one that has just grown is + // offered the whole vector again, those already passed included + for (size_t i = 0; i < rRects.size(); ++i) + { + while (lcl_AbsorbOne(rRects, i, nSlack, rHoles)) + { + } + } +} + // tdf#157816: try to check if the rectangle contains actual text ::std::vector GetCursorRectsContainingText(SwCursorShell const& rShell) { - ::std::vector ret; - SwRects rects; - rShell.GetLayout()->CalcFrameRects(*rShell.GetCursor_(), rects, SwRootFrame::RectsMode::NoAnchoredFlys); + SwRects region; + SwRects pieces; + SwRects holes; + // the pieces specify which lines each part of the region belongs to + rShell.GetLayout()->CalcFrameRects(*rShell.GetCursor_(), region, + SwRootFrame::RectsMode::NoAnchoredFlys, &pieces, &holes); auto const [pStart, pEnd] = rShell.GetCursor_()->StartEnd(); - for (SwRect const& rRect : rects) + // a ruby's band overlaps its line's text band while lines only abut, so this leaves + // the pieces not overlapping each other; a piece spans its lines whole, so vetoing on + // a hole here would refuse every join + lcl_JoinTouching(pieces, 0, {}); + + ::std::vector ret; + for (const SwRect& rPiece : pieces) { - Point center(rRect.Center()); - SwSpecialPos special; - SwCursorMoveState cms(CursorMoveState::NONE); - cms.m_pSpecialPos = &special; - cms.m_bFieldInfo = true; - // the centre of a one-glyph rectangle falls in that glyph's second half, so the hit - // test below returns the character that contains the point - cms.m_bPosMatchesBounds = true; - // the band of the portion, not the taller band a ruby gives the line - cms.m_bRealHeight = true; - SwPosition pos(rShell.GetDoc()->GetNodes()); - if (rShell.GetLayout()->GetModelPositionForViewPoint(&pos, center, &cms) - && *pStart <= pos && pos <= *pEnd) + SwRects parts; + for (const SwRect& rRect : region) { - SwRect charRect; - std::pair const tmp(center, false); - SwContentFrame const*const pFrame( - pos.nNode.GetNode().GetTextNode()->getLayoutFrame(rShell.GetLayout(), &pos, &tmp)); - if (pFrame->GetCharRect(charRect, pos, &cms, false)) + SwRect aPart(rRect); + aPart.Intersection(rPiece); + if (!aPart.HasArea()) + continue; + + Point center(aPart.Center()); + SwSpecialPos special; + SwCursorMoveState cms(CursorMoveState::NONE); + cms.m_pSpecialPos = &special; + cms.m_bFieldInfo = true; + // the centre of a one-glyph rectangle falls in that glyph's second half, so the + // hit test below returns the character that contains the point + cms.m_bPosMatchesBounds = true; + SwPosition pos(rShell.GetDoc()->GetNodes()); + if (rShell.GetLayout()->GetModelPositionForViewPoint(&pos, center, &cms) + && *pStart <= pos && pos <= *pEnd) { - // a reverse portion in a vertical frame can give a negative offset, which - // no band matches - if (cms.m_aRealHeight.X() >= 0) + SwRect charRect; + std::pair const tmp(center, false); + SwContentFrame const* const pFrame( + pos.GetNode().GetTextNode()->getLayoutFrame(rShell.GetLayout(), &pos, &tmp)); + if (pFrame->GetCharRect(charRect, pos, &cms, false) && aPart.Overlaps(charRect)) { - // the band lies along X, and its extent arrives as a negative height, in - // a vertical frame or a rotated portion but not in the two together - if (cms.m_aRealHeight.Y() > 0) - { - charRect.SetPosY(charRect.Top() + cms.m_aRealHeight.X()); - charRect.Height(cms.m_aRealHeight.Y()); - } - else if (cms.m_aRealHeight.Y() < 0) - { - charRect.SetPosX(charRect.Left() + cms.m_aRealHeight.X()); - charRect.Width(-cms.m_aRealHeight.Y()); - } - } - if (rRect.Overlaps(charRect)) - { - ret.push_back(rRect); + parts.push_back(aPart); } } + // reset stupid static var that may have gotten set now + SwTextCursor::SetRightMargin(false); // WTF is this crap } - // reset stupid static var that may have gotten set now - SwTextCursor::SetRightMargin(false); // WTF is this crap - } - - if (ret.empty()) - return ret; - - // a ruby's band holds no text of the line, so grow the rectangle over the ruby portion - const auto aCoverRuby = [&rShell, &ret](const SwPosition& rPos, sal_Int32 nRubyAt, - const SwRect& rOnItsLine) -> bool { - const SwTextNode* pNode = rPos.GetNode().GetTextNode(); - // a hit test descends into a ruby for the position right after it too, so the hint - // decides whether the link reaches into one - if (!pNode || nRubyAt < 0 || !pNode->GetTextAttrAt(nRubyAt, RES_TXTATR_CJK_RUBY)) - return false; - - const std::pair aPoint(rOnItsLine.Center(), false); - const SwContentFrame* pFrame = pNode->getLayoutFrame(rShell.GetLayout(), &rPos, &aPoint); - if (!pFrame) - return false; - - SwCursorMoveState cms(CursorMoveState::NONE); - cms.m_b2Lines = true; - // CalcFrameRects sets it too - an undersized frame is not scrolled to be hit - cms.m_bNoScroll = true; - // the multi type is the innermost portion's, the portion rectangle the outermost - // one's, so a nested ruby would grow over whatever encloses it - if (!pFrame->GetCharRect(o3tl::temporary(SwRect()), rPos, &cms, false) || !cms.m_p2Lines - || cms.m_p2Lines->nMultiType != MultiPortionType::RUBY - || cms.m_p2Lines->aPortion2.HasArea()) - { - return false; - } - - bool bGrown = false; - for (SwRect& rKept : ret) - { - if (rKept.Overlaps(cms.m_p2Lines->aPortion)) - { - rKept.Union(cms.m_p2Lines->aPortion); - bGrown = true; - } - } - return bGrown; - }; - // either end may reach into a ruby; the rectangle only picks the frame of a node laid - // out more than once, and any rectangle of the link serves for that - const bool bStartGrown = aCoverRuby(*pStart, pStart->GetContentIndex(), ret.front()); - const bool bEndGrown = aCoverRuby(*pEnd, pEnd->GetContentIndex() - 1, ret.back()); - if (!bStartGrown && !bEndGrown) - return ret; - - // rectangles that tile one strip of a line are one annotation - for (bool bMerged = true; bMerged;) - { - bMerged = false; - for (size_t i = 0; !bMerged && i + 1 < ret.size(); ++i) - { - for (size_t j = i + 1; !bMerged && j < ret.size(); ++j) - { - const SwRect aUnion(ret[i].GetUnion(ret[j])); - // the full extent across the line, and no gap along it - const bool bTiles - = (aUnion.Width() == ret[i].Width() && aUnion.Width() == ret[j].Width() - && aUnion.Height() <= ret[i].Height() + ret[j].Height()) - || (aUnion.Height() == ret[i].Height() && aUnion.Height() == ret[j].Height() - && aUnion.Width() <= ret[i].Width() + ret[j].Width()); - if (!bTiles) - continue; - ret[i] = aUnion; - ret.erase(ret.begin() + j); - bMerged = true; - } - } + // what holds no text is gone, so joining the rest keeps a line whole, and a hole + // stops a join that would cover what the selection excludes on purpose + lcl_JoinTouching(parts, 2, holes); + ret.insert(ret.end(), parts.begin(), parts.end()); } return ret; } From 0e705d4a0b812d671814e38db3ca2fc97560c8c8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= Date: Sun, 27 Sep 2026 17:06:52 +0000 Subject: [PATCH 104/289] keep each string of a Basic image string pool inside the pool MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit an image with string offsets outside its pool is not loaded Signed-off-by: Caolán McNamara Change-Id: I55360ac5f348929f29514982fcf74c7ddb93961e Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/13652 Reviewed-by: Noel Grandin Tested-by: Jenkins CPCI (cherry picked from commit fc0c18c508cd34bc8a17d534193de8992acdade0) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211625 Tested-by: Jenkins Reviewed-by: Xisco Fauli --- basic/source/classes/image.cxx | 23 +++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) diff --git a/basic/source/classes/image.cxx b/basic/source/classes/image.cxx index ec67430dff39..2b42ce3dced3 100644 --- a/basic/source/classes/image.cxx +++ b/basic/source/classes/image.cxx @@ -222,9 +222,21 @@ bool SbiImage::Load( SvStream& r, sal_uInt32& nVersion ) mvStringOffsets[ i ] = static_cast(nOff); } r.ReadUInt32( nLen ); + if (r.good() + && (nLen > r.remainingSize() + || std::any_of(mvStringOffsets.begin(), mvStringOffsets.end(), + [nLen](sal_uInt32 nOff) { return nOff >= nLen; }))) + { + SAL_WARN("basic", "Parsing error: string pool of " << nLen + << " does not fit the record or its string offsets"); + MakeStrings(0); + bError = true; + break; + } if (r.good()) { - pStrings.reset(new sal_Unicode[ nLen ]); + // The element past the pool ends the last string. + pStrings.reset(new sal_Unicode[ nLen + 1 ]()); nStringSize = static_cast(nLen); if (GetToUnicodePoolData(r, nLen, nNext)) @@ -234,13 +246,16 @@ bool SbiImage::Load( SvStream& r, sal_uInt32& nVersion ) } else { - std::unique_ptr pByteStrings(new char[nLen]); + std::unique_ptr pByteStrings(new char[nLen]()); r.ReadBytes(pByteStrings.get(), nLen); for (size_t j = 0; j < mvStringOffsets.size(); j++) { sal_uInt16 nOff2 = static_cast(mvStringOffsets[j]); - OUString aStr(pByteStrings.get() + nOff2, strlen(pByteStrings.get() + nOff2), eCharSet); - std::copy_n(aStr.getStr(), aStr.getLength() + 1, + const sal_uInt32 nAvail = nLen - nOff2; + const char* pByteString = pByteStrings.get() + nOff2; + OUString aStr(pByteString, strnlen(pByteString, nAvail), eCharSet); + std::copy_n(aStr.getStr(), + std::min(aStr.getLength() + 1, nAvail), pStrings.get() + nOff2); } } From 4f3909125e153f15585f50c854adac68fd6b3cce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= Date: Mon, 28 Sep 2026 14:02:08 +0000 Subject: [PATCH 105/289] only use the form import object when it is a form component MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Caolán McNamara Change-Id: I38968a0834a044ceb068337fe1d96eb364739019 Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/13698 Reviewed-by: Noel Grandin (cherry picked from commit ed137476afd19a0324bf117fd315b751bfa920c9) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211626 Reviewed-by: Xisco Fauli Tested-by: Jenkins --- xmloff/source/forms/elementimport.cxx | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/xmloff/source/forms/elementimport.cxx b/xmloff/source/forms/elementimport.cxx index 49b32b8e4e60..43b1465f1d12 100644 --- a/xmloff/source/forms/elementimport.cxx +++ b/xmloff/source/forms/elementimport.cxx @@ -37,6 +37,7 @@ #include #include #include +#include #include #include #include @@ -587,6 +588,13 @@ namespace xmloff OStringBuffer("OElementImport::createElement: service factory gave me no object (service name: " + OUStringToOString(m_sServiceName, RTL_TEXTENCODING_ASCII_US) + ")!").getStr()); + // only use the created object when it is a form component + if (!Reference< XFormComponent >(xPure, UNO_QUERY).is()) + { + SAL_WARN("xmloff.forms", "OElementImport::createElement: " << m_sServiceName + << " is not a form component"); + return xReturn; + } xReturn.set(xPure, UNO_QUERY); if (auto const props = Reference(xPure, css::uno::UNO_QUERY)) { From 2bcd6f706379bc3c2c104d5ba6d22c106d9c3b8d Mon Sep 17 00:00:00 2001 From: Julien Nabet Date: Thu, 1 Oct 2026 21:36:19 +0200 Subject: [PATCH 106/289] tdf#144175: Remove strings from l10n in html export + convert datetime to ISO format Result: For the change of lcl_AddStamp, I used GPT 5.6 Luna. Change-Id: Ia73e9c00f17653aa5ab491c4bbc1d3d933105836 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211696 Reviewed-by: Julien Nabet Tested-by: Jenkins --- sc/inc/globstr.hrc | 4 ---- sc/source/filter/html/htmlexp.cxx | 40 +++++++++---------------------- 2 files changed, 11 insertions(+), 33 deletions(-) diff --git a/sc/inc/globstr.hrc b/sc/inc/globstr.hrc index ab57077239c7..a659141189bf 100644 --- a/sc/inc/globstr.hrc +++ b/sc/inc/globstr.hrc @@ -373,10 +373,6 @@ #define STR_LINKERRORFILE NC_("STR_LINKERRORFILE", "File:") #define STR_LINKERRORTAB NC_("STR_LINKERRORTAB", "Sheet:") #define STR_OVERVIEW NC_("STR_OVERVIEW", "Overview") -#define STR_DOC_INFO NC_("STR_DOC_INFO", "Doc.Information") -#define STR_DOC_PRINTED NC_("STR_DOC_PRINTED", "Printed") -#define STR_BY NC_("STR_BY", "by") -#define STR_ON NC_("STR_ON", "on") #define STR_TRUST_DOCUMENT_WARNING NC_("STR_TRUST_DOCUMENT_WARNING", "Are you sure you trust this document?") #define STR_WEBSERVICE_WITH_LINKS_WARNING NC_("STR_WEBSERVICE_WITH_LINKS_WARNING", "Links to remote locations can be constructed that transmit local data to the remote server.") #define STR_REIMPORT_AFTER_LOAD NC_("STR_REIMPORT_AFTER_LOAD", "This file contains queries. The results of these queries were not saved.\nDo you want these queries to be repeated?") diff --git a/sc/source/filter/html/htmlexp.cxx b/sc/source/filter/html/htmlexp.cxx index 263823f0e3ec..9ee6284ce8ea 100644 --- a/sc/source/filter/html/htmlexp.cxx +++ b/sc/source/filter/html/htmlexp.cxx @@ -47,6 +47,7 @@ #include #include #include +#include #include #include #include @@ -134,8 +135,6 @@ const char ScHTMLExport::sIndentSource[nIndentMax+1] = #define OUT_SP_CSTR_ASS( s ) rStrm.WriteChar(' ').WriteOString( s ).WriteChar( '=' ) -#define GLOBSTR(id) ScResId( id ) - void ScFormatFilterPluginImpl::ScExportHTML( SvStream& rStrm, const OUString& rBaseURL, ScDocument* pDoc, const ScRange& rRange, const rtl_TextEncoding /*eNach*/, bool bAll, const OUString& rStreamPath, OUString& rNonConvertibleChars, const OUString& rFilterOptions ) @@ -163,33 +162,17 @@ static OString lcl_getColGroupString(sal_Int32 nSpan, sal_Int32 nWidth) return aByteStr.makeStringAndClear(); } -static void lcl_AddStamp( OUString& rStr, std::u16string_view rName, - const css::util::DateTime& rDateTime, - const LocaleDataWrapper& rLoc ) +static void lcl_AddStamp(OUString& rStr, std::u16string_view rName, + const css::util::DateTime& rDateTime) { - Date aD(rDateTime.Day, rDateTime.Month, rDateTime.Year); - tools::Time aT(rDateTime.Hours, rDateTime.Minutes, rDateTime.Seconds, - rDateTime.NanoSeconds); - DateTime aDateTime(aD,aT); - - OUString aStrDate = rLoc.getDate( aDateTime ); - OUString aStrTime = rLoc.getTime( aDateTime ); - - rStr += GLOBSTR( STR_BY ) + " "; + rStr += u"by "_ustr; if (!rName.empty()) rStr += rName; else - rStr += "???"; - rStr += " " + GLOBSTR( STR_ON ) + " "; - if (!aStrDate.isEmpty()) - rStr += aStrDate; - else - rStr += "???"; - rStr += ", "; - if (!aStrTime.isEmpty()) - rStr += aStrTime; - else - rStr += "???"; + rStr += u"???"_ustr; + + rStr += u" on "_ustr; + rStr += utl::toISO8601(rDateTime); } static OString lcl_makeHTMLColorTriplet(const Color& rColor) @@ -336,10 +319,9 @@ void ScHTMLExport::WriteHeader() if (!xDocProps->getPrintedBy().isEmpty()) { - OUT_COMMENT( GLOBSTR( STR_DOC_INFO ) ); - OUString aStrOut = GLOBSTR( STR_DOC_PRINTED ) + ": "; - lcl_AddStamp( aStrOut, xDocProps->getPrintedBy(), - xDocProps->getPrintDate(), ScGlobal::getLocaleData() ); + OUT_COMMENT( u"Doc.Information" ); + OUString aStrOut = u"Printed: "_ustr; + lcl_AddStamp( aStrOut, xDocProps->getPrintedBy(), xDocProps->getPrintDate() ); OUT_COMMENT( aStrOut ); } From 8674bad247a7eb8d648182f5b313dc7ae2d9fbaf Mon Sep 17 00:00:00 2001 From: Xisco Fauli Date: Thu, 1 Oct 2026 16:36:13 +0200 Subject: [PATCH 107/289] ofz#557634294 Null-dereference Change-Id: I7cc8e50a4727df3b3fc1a4463d56fe9052d1ed2f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211688 Tested-by: Jenkins Reviewed-by: Xisco Fauli --- vcl/source/filter/jxl/reader.cxx | 27 +++++++++------------------ 1 file changed, 9 insertions(+), 18 deletions(-) diff --git a/vcl/source/filter/jxl/reader.cxx b/vcl/source/filter/jxl/reader.cxx index 4393b02bc8d9..1af5d1e61c0c 100644 --- a/vcl/source/filter/jxl/reader.cxx +++ b/vcl/source/filter/jxl/reader.cxx @@ -78,7 +78,6 @@ static bool readJxl(SvStream& stream, Graphic& graphic) } // Try using partially read image if there is an error. - bool success = true; for (;;) { JxlDecoderStatus status = JxlDecoderProcessInput(dec.get()); @@ -86,8 +85,7 @@ static bool readJxl(SvStream& stream, Graphic& graphic) if (status == JXL_DEC_ERROR) { SAL_WARN("vcl.filter.jxl", "Decoder error"); - success = false; - break; + return false; } else if (status == JXL_DEC_NEED_MORE_INPUT || status == JXL_DEC_SUCCESS || status == JXL_DEC_FULL_IMAGE) @@ -103,8 +101,7 @@ static bool readJxl(SvStream& stream, Graphic& graphic) if (status == JXL_DEC_NEED_MORE_INPUT) { SAL_WARN("vcl.filter.jxl", "Incomplete/truncated file"); - success = false; - break; + return false; } else { @@ -117,8 +114,7 @@ static bool readJxl(SvStream& stream, Graphic& graphic) if (JXL_DEC_SUCCESS != JxlDecoderSetInput(dec.get(), data.data(), nBytesRead)) { SAL_WARN("vcl.filter.jxl", "JxlDecoderSetInput failed"); - success = false; - break; + return false; } } else if (status == JXL_DEC_BASIC_INFO) @@ -126,8 +122,7 @@ static bool readJxl(SvStream& stream, Graphic& graphic) if (JXL_DEC_SUCCESS != JxlDecoderGetBasicInfo(dec.get(), &info)) { SAL_WARN("vcl.filter.jxl", "JxlDecoderGetBasicInfo failed"); - success = false; - break; + return false; } xsize = info.xsize; ysize = info.ysize; @@ -140,30 +135,26 @@ static bool readJxl(SvStream& stream, Graphic& graphic) if (JXL_DEC_SUCCESS != JxlDecoderImageOutBufferSize(dec.get(), &format, &buffer_size)) { SAL_WARN("vcl.filter.jxl", "JxlDecoderImageOutBufferSize failed"); - success = false; - break; + return false; } if (buffer_size != xsize * ysize * 4) { SAL_WARN("vcl.filter.jxl", "Invalid out buffer size, expected " << xsize * ysize * 4 << " but got " << buffer_size); - success = false; - break; + return false; } pixels.resize(xsize * ysize * 4); if (JXL_DEC_SUCCESS != JxlDecoderSetImageOutBuffer(dec.get(), &format, pixels.data(), pixels.size())) { SAL_WARN("vcl.filter.jxl", "JxlDecoderSetImageOutBuffer failed"); - success = false; - break; + return false; } } else if (status != JXL_DEC_COLOR_ENCODING) // not using color profile { SAL_WARN("vcl.filter.jxl", "Unknown JxlDecoderStatus"); - success = false; - break; + return false; } } @@ -191,7 +182,7 @@ static bool readJxl(SvStream& stream, Graphic& graphic) access.reset(); // Flush BitmapScopedWriteAccess graphic = bitmap; - return success; + return true; } bool ImportJxlGraphic(SvStream& rStream, Graphic& rGraphic) From 4f8889f928840ed79f608083640e178becc96292 Mon Sep 17 00:00:00 2001 From: Mike Kaganski Date: Thu, 24 Sep 2026 13:11:43 +0500 Subject: [PATCH 108/289] vcl: anchor the object-stream test on /Type/ObjStm testEncryptedTaggedUsesObjectStreams searched the whole exported file for /ObjStm, which binary data can hold, and every later search starts from that match. The writer emits /Type/ObjStm, with /Length and the stream data after it in the same dictionary. Signed-off-by: Mike Kaganski Change-Id: Ibb1417ee9bd399ea183883d2849f02a4e3d945c4 Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/13491 Tested-by: Jenkins CPCI Reviewed-by: Miklos Vajna (cherry picked from commit 8171259354f2e36fddcdb815d393d7d60c303e01) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211702 Reviewed-by: Xisco Fauli Tested-by: Jenkins --- vcl/qa/cppunit/pdfexport/PDFEncryptionTest.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/vcl/qa/cppunit/pdfexport/PDFEncryptionTest.cxx b/vcl/qa/cppunit/pdfexport/PDFEncryptionTest.cxx index bc10ec757fdf..ec6111ca93b9 100644 --- a/vcl/qa/cppunit/pdfexport/PDFEncryptionTest.cxx +++ b/vcl/qa/cppunit/pdfexport/PDFEncryptionTest.cxx @@ -123,7 +123,8 @@ CPPUNIT_TEST_FIXTURE(PDFEncryptionTest, testEncryptedTaggedUsesObjectStreams) const std::string_view aFile(static_cast(maMemory.GetData()), maMemory.GetSize()); // an unencrypted export has object streams anyway, so the rest tests nothing without this CPPUNIT_ASSERT(aFile.find("/Encrypt") != std::string_view::npos); - const size_t nObjStm = aFile.find("/ObjStm"); + // the dictionary entry, not a chance match in binary data + const size_t nObjStm = aFile.find("/Type/ObjStm"); CPPUNIT_ASSERT(nObjStm != std::string_view::npos); // /Length has to count what the cipher adds, or a reader that trusts it stops mid-block. From 2f4485547fd2e095e4341c818600c1802e562cac Mon Sep 17 00:00:00 2001 From: Michael Weghorn Date: Thu, 1 Oct 2026 23:19:51 +0200 Subject: [PATCH 109/289] sw: Port styles presets panel from ValueSet to weld::IconView Port the "Style Presets" panel in Writer's experimental "Design" sidebar panel from using a custom ValueSet widget to using weld::IconView. This helps to be more consistent with other platform/toolkit widgets and reduces custom logic. The UI can be triggered like this: * start Writer * in "Tools" -> "Options" -> "Advanced", enable experimental features (and restart as needed) * open the sidebar * switch to the "Design" sidebar panel Change-Id: I5ac862254c2e09f8ad595eff1623d9f2f5f9b676 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211705 Tested-by: Jenkins Reviewed-by: Michael Weghorn --- .../uibase/sidebar/StylePresetsPanel.cxx | 26 ++++++++-------- .../uibase/sidebar/StylePresetsPanel.hxx | 11 ++++--- sw/uiconfig/swriter/ui/sidebarstylepresets.ui | 30 ++++++++++++------- 3 files changed, 36 insertions(+), 31 deletions(-) diff --git a/sw/source/uibase/sidebar/StylePresetsPanel.cxx b/sw/source/uibase/sidebar/StylePresetsPanel.cxx index 73b762668eb0..b35302196f81 100644 --- a/sw/source/uibase/sidebar/StylePresetsPanel.cxx +++ b/sw/source/uibase/sidebar/StylePresetsPanel.cxx @@ -16,7 +16,8 @@ #include #include #include -#include +#include +#include #include #include @@ -142,13 +143,9 @@ std::unique_ptr StylePresetsPanel::Create(weld::Widget* pParent) StylePresetsPanel::StylePresetsPanel(weld::Widget* pParent) : PanelLayout(pParent, u"StylePresetsPanel"_ustr, u"modules/swriter/ui/sidebarstylepresets.ui"_ustr) - , mxValueSet(new ValueSet(nullptr)) - , mxValueSetWin(new weld::CustomWeld(*m_xBuilder, u"valueset"_ustr, *mxValueSet)) + , m_pIconView(m_xBuilder->weld_icon_view("iconview")) { - mxValueSet->SetColCount(2); - - mxValueSet->SetColor(Application::GetSettings().GetStyleSettings().GetFaceColor()); - mxValueSet->SetDoubleClickHdl(LINK(this, StylePresetsPanel, DoubleClickHdl)); + m_pIconView->connect_item_activated(LINK(this, StylePresetsPanel, ItemActivatedHdl)); RefreshList(); } @@ -167,12 +164,12 @@ void StylePresetsPanel::RefreshList() OUString aName = aTemplates.GetName(i,j); OUString aURL = aTemplates.GetPath(i,j); Bitmap aPreview = CreatePreview(aURL, aName); - sal_uInt16 nId = j + 1; - mxValueSet->InsertItem(nId, Image(aPreview), aName); + m_pIconView->insert(j, nullptr, nullptr, &aPreview, nullptr); + m_pIconView->set_item_accessible_name(j, aName); + m_pIconView->set_item_tooltip_text(j, aName); maTemplateEntries.push_back(std::make_unique(aURL)); - mxValueSet->SetItemData(nId, maTemplateEntries.back().get()); + m_pIconView->set_id(j, weld::toId(maTemplateEntries.back().get())); } - mxValueSet->SetOptimalSize(); } } } @@ -181,10 +178,9 @@ StylePresetsPanel::~StylePresetsPanel() { } -IMPL_LINK_NOARG(StylePresetsPanel, DoubleClickHdl, ValueSet*, void) +IMPL_LINK(StylePresetsPanel, ItemActivatedHdl, const weld::TreeIter&, rIter, bool) { - sal_Int32 nItemId = mxValueSet->GetSelectedItemId(); - TemplateEntry* pEntry = static_cast(mxValueSet->GetItemData(nItemId)); + TemplateEntry* pEntry = weld::fromId(m_pIconView->get_id(rIter)); if (SwDocShell* pDocSh = static_cast(SfxObjectShell::Current())) { @@ -193,6 +189,8 @@ IMPL_LINK_NOARG(StylePresetsPanel, DoubleClickHdl, ValueSet*, void) aOption.SetNumRules(true); pDocSh->LoadStylesFromFile(pEntry->maURL, aOption, false); } + + return true; } void StylePresetsPanel::NotifyItemUpdate(const sal_uInt16 /*nSId*/, diff --git a/sw/source/uibase/sidebar/StylePresetsPanel.hxx b/sw/source/uibase/sidebar/StylePresetsPanel.hxx index f91268886332..fe467aea6a6a 100644 --- a/sw/source/uibase/sidebar/StylePresetsPanel.hxx +++ b/sw/source/uibase/sidebar/StylePresetsPanel.hxx @@ -10,11 +10,11 @@ #pragma once -#include - #include #include -#include +#include + +#include #include namespace sw::sidebar { @@ -49,12 +49,11 @@ private: void RefreshList(); - std::unique_ptr mxValueSet; - std::unique_ptr mxValueSetWin; + std::unique_ptr m_pIconView; std::vector> maTemplateEntries; - DECL_LINK(DoubleClickHdl, ValueSet*, void); + DECL_LINK(ItemActivatedHdl, const weld::TreeIter&, bool); }; } // end of namespace sw::sidebar diff --git a/sw/uiconfig/swriter/ui/sidebarstylepresets.ui b/sw/uiconfig/swriter/ui/sidebarstylepresets.ui index f0b1c4ad3f6d..610d283af30e 100644 --- a/sw/uiconfig/swriter/ui/sidebarstylepresets.ui +++ b/sw/uiconfig/swriter/ui/sidebarstylepresets.ui @@ -2,6 +2,16 @@ + + + + + + + + + + True @@ -25,18 +35,16 @@ never in - + True - False - - - True - True - GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_KEY_PRESS_MASK | GDK_KEY_RELEASE_MASK | GDK_STRUCTURE_MASK - True - True - - + True + 6 + True + True + iconview_model + 2 + 0 + 2 From d01ab87ffbac8bb692cfa30c70e32b608fd069ae Mon Sep 17 00:00:00 2001 From: Michael Weghorn Date: Thu, 1 Oct 2026 14:20:34 +0200 Subject: [PATCH 110/289] svx: Drop commented code in LineWidthValueSet::UserDraw It's commented out ever since it was added in commit d02f75a8c36705924ddd6a5921fe3012fafce812 Date: Wed Apr 10 08:20:16 2013 +0000 Resolves: #i121420# merge sidebar feature Change-Id: I90d9c52eb0b8ed3eea53731c9aad92390e7ab853 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211706 Tested-by: Jenkins Reviewed-by: Michael Weghorn --- svx/source/sidebar/line/LineWidthValueSet.cxx | 3 --- 1 file changed, 3 deletions(-) diff --git a/svx/source/sidebar/line/LineWidthValueSet.cxx b/svx/source/sidebar/line/LineWidthValueSet.cxx index a8fc15ebd7dd..aa3b077509e8 100644 --- a/svx/source/sidebar/line/LineWidthValueSet.cxx +++ b/svx/source/sidebar/line/LineWidthValueSet.cxx @@ -87,9 +87,6 @@ void LineWidthValueSet::UserDraw( const UserDrawEvent& rUDEvt ) tools::Long nRectWidth = aRect.GetWidth(); Point aBLPos = aRect.TopLeft(); - //const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings(); - //Color aBackColor(0,0,200); - //const Color aTextColor = rStyleSettings.GetFieldTextColor(); auto popIt = pDev->ScopedPush(vcl::PushFlags::FONT | vcl::PushFlags::LINECOLOR | vcl::PushFlags::FILLCOLOR); vcl::Font aFont(OutputDevice::GetDefaultFont(DefaultFontType::UI_SANS, MsLangId::getConfiguredSystemLanguage(), GetDefaultFontFlags::OnlyOne)); From 13730b3da00b20c97fa7f37b20144c8790b9fc4c Mon Sep 17 00:00:00 2001 From: Michael Weghorn Date: Thu, 1 Oct 2026 14:28:41 +0200 Subject: [PATCH 111/289] svx: Resave floatinglineproperty.ui with glade 3.40 This is used for the popup that allows configuring the line thickness which can be triggered like this: * start Writer * insert a chart using "Insert" -> "Chart..." * select the chart wall in the chart * open the "Properties" sidebar deck * in the "Line" section of that sidebar deck, click on the "Thickness" button/combobox Change-Id: Ib06e95f19d33e983c9641e920572cd57a3272b5a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211707 Tested-by: Jenkins Reviewed-by: Michael Weghorn --- svx/uiconfig/ui/floatinglineproperty.ui | 68 ++++++++++++------------- 1 file changed, 34 insertions(+), 34 deletions(-) diff --git a/svx/uiconfig/ui/floatinglineproperty.ui b/svx/uiconfig/ui/floatinglineproperty.ui index d005903ff34c..2fd7770216e2 100644 --- a/svx/uiconfig/ui/floatinglineproperty.ui +++ b/svx/uiconfig/ui/floatinglineproperty.ui @@ -1,37 +1,42 @@ - + + + 500 + 1 + 10 + - False - True - 4 + False + True + 4 none - + True - False + False True True - 6 + 6 True - True + True True True - never - never - in + never + never + in True - False + False True - True + True GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_KEY_PRESS_MASK | GDK_KEY_RELEASE_MASK | GDK_STRUCTURE_MASK True True @@ -41,55 +46,50 @@ - 0 - 0 + 0 + 0 - + True - False - 12 + False + 12 True - False + False Custom Line Thickness: - True - spin + True + spin end - 0 - 0 + 0 + 0 True - True - adjustment1 + True True + adjustment1 1 - 1 - 0 + 1 + 0 - 0 - 1 + 0 + 1 - - 500 - 1 - 10 - From 3637c687b5d4f9eed60d198de04fd955031768ec Mon Sep 17 00:00:00 2001 From: Michael Weghorn Date: Thu, 1 Oct 2026 19:07:02 +0200 Subject: [PATCH 112/289] svx: Stop double-tracking of selected entry in LineWidthValueSet Instead of tracking the currently selected entry via LineWidthValueSet::nSelItem in addition to using the selection logic of the ValueSet base class, drop that separate member and use the existing ValueSet logic to determine what item is selected. This will also make it a bit more straight-forward to port away from the custom LineWidthValueSet to using a weld::TreeView in an upcoming commit. The popup for configuring the line thickness that uses this code can be triggered like this: * start Writer * insert a chart using "Insert" -> "Chart..." * select the chart wall in the chart * open the "Properties" sidebar deck * in the "Line" section of that sidebar deck, click on the "Thickness" button/combobox Change-Id: Ie45eb1233b70c7a5ff814ade3fde774e2eb983b7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211708 Tested-by: Jenkins Reviewed-by: Michael Weghorn --- svx/source/sidebar/line/LineWidthPopup.cxx | 2 +- svx/source/sidebar/line/LineWidthValueSet.cxx | 10 ++++------ svx/source/sidebar/line/LineWidthValueSet.hxx | 2 -- 3 files changed, 5 insertions(+), 9 deletions(-) diff --git a/svx/source/sidebar/line/LineWidthPopup.cxx b/svx/source/sidebar/line/LineWidthPopup.cxx index 782b801c51f0..7f14d4666d98 100644 --- a/svx/source/sidebar/line/LineWidthPopup.cxx +++ b/svx/source/sidebar/line/LineWidthPopup.cxx @@ -132,7 +132,7 @@ IMPL_LINK_NOARG(LineWidthPopup, VSSelectHdl, ValueSet*, void) IMPL_LINK_NOARG(LineWidthPopup, MFModifyHdl, weld::MetricSpinButton&, void) { - if (m_xVSWidth->GetSelItem()) + if (!m_xVSWidth->IsNoSelection() && m_xVSWidth->GetSelectedItemId() != 0) { m_xVSWidth->SetSelItem(0); m_xVSWidth->SetFormat(); diff --git a/svx/source/sidebar/line/LineWidthValueSet.cxx b/svx/source/sidebar/line/LineWidthValueSet.cxx index aa3b077509e8..2ea25a861e38 100644 --- a/svx/source/sidebar/line/LineWidthValueSet.cxx +++ b/svx/source/sidebar/line/LineWidthValueSet.cxx @@ -31,7 +31,6 @@ namespace svx::sidebar { LineWidthValueSet::LineWidthValueSet() : ValueSet(nullptr) - , nSelItem(0) , bCusEnable(false) { } @@ -54,7 +53,6 @@ void LineWidthValueSet::SetUnit(std::array const & strUnits) void LineWidthValueSet::SetSelItem(sal_uInt16 nSel) { - nSelItem = nSel; if(nSel == 0) { SelectItem(1); // ,false); // 'false' nut supported by AOO @@ -62,7 +60,7 @@ void LineWidthValueSet::SetSelItem(sal_uInt16 nSel) } else { - SelectItem(nSelItem); + SelectItem(nSel); GrabFocus(); } } @@ -115,7 +113,7 @@ void LineWidthValueSet::UserDraw( const UserDrawEvent& rUDEvt ) } else { - if( nSelItem == nItemId ) + if (IsItemSelected(nItemId)) { tools::Rectangle aBackRect = aRect; aBackRect.AdjustTop(3 ); @@ -125,7 +123,7 @@ void LineWidthValueSet::UserDraw( const UserDrawEvent& rUDEvt ) } //draw text - if(nSelItem == nItemId ) + if (IsItemSelected(nItemId)) aFont.SetColor(COL_WHITE); else aFont.SetColor(Application::GetSettings().GetStyleSettings().GetFieldTextColor()); @@ -134,7 +132,7 @@ void LineWidthValueSet::UserDraw( const UserDrawEvent& rUDEvt ) pDev->DrawText(aStart, maStrUnits[ nItemId - 1 ]); //can't set DrawTextFlags::EndEllipsis here ,or the text will disappear //draw line - if( nSelItem == nItemId ) + if (IsItemSelected(nItemId)) pDev->SetLineColor(COL_WHITE); else pDev->SetLineColor(Application::GetSettings().GetStyleSettings().GetFieldTextColor()); diff --git a/svx/source/sidebar/line/LineWidthValueSet.hxx b/svx/source/sidebar/line/LineWidthValueSet.hxx index 225e706a6d6e..b4838480e876 100644 --- a/svx/source/sidebar/line/LineWidthValueSet.hxx +++ b/svx/source/sidebar/line/LineWidthValueSet.hxx @@ -33,7 +33,6 @@ public: void SetUnit(std::array const & strUnits); void SetSelItem(sal_uInt16 nSel); - sal_uInt16 GetSelItem() const { return nSelItem;} void SetImage(const Image& img); void SetCusEnable(bool bEnable); @@ -42,7 +41,6 @@ public: virtual void SetDrawingArea(weld::DrawingArea* pDrawingArea) override; private: - sal_uInt16 nSelItem; std::array maStrUnits; Image imgCus; bool bCusEnable; From da48b6c1f21916ec2943223dddcb29ca8ea1ec65 Mon Sep 17 00:00:00 2001 From: Michael Weghorn Date: Thu, 1 Oct 2026 19:22:00 +0200 Subject: [PATCH 113/289] svx: Replace LineWidthValueSet::SetSelItem Inline the logic when called with a non-zero param to the only caller that passes a non-zero value. Rename to LineWidthValueSet::UnselectItems and stop passing any param for the callers previously passing a zero parameter. This will also make it a bit more straight-forward to port away from the custom LineWidthValueSet to using a weld::TreeView in an upcoming commit. The popup for configuring the line thickness that uses this code can be triggered like this: * start Writer * insert a chart using "Insert" -> "Chart..." * select the chart wall in the chart * open the "Properties" sidebar deck * in the "Line" section of that sidebar deck, click on the "Thickness" button/combobox Change-Id: Ieed1323cd8d82c498a676c4408754880f61a8fcd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211709 Reviewed-by: Michael Weghorn Tested-by: Jenkins --- svx/source/sidebar/line/LineWidthPopup.cxx | 12 +++++++----- svx/source/sidebar/line/LineWidthValueSet.cxx | 14 +++----------- svx/source/sidebar/line/LineWidthValueSet.hxx | 2 +- 3 files changed, 11 insertions(+), 17 deletions(-) diff --git a/svx/source/sidebar/line/LineWidthPopup.cxx b/svx/source/sidebar/line/LineWidthPopup.cxx index 7f14d4666d98..4a0493880ffb 100644 --- a/svx/source/sidebar/line/LineWidthPopup.cxx +++ b/svx/source/sidebar/line/LineWidthPopup.cxx @@ -81,7 +81,7 @@ LineWidthPopup::LineWidthPopup(weld::Widget* pParent, LinePropertyPanelBase& rPa m_xVSWidth->SetItemData(8, reinterpret_cast(60)); m_xVSWidth->SetImage(m_aIMGCusGray); - m_xVSWidth->SetSelItem(0); + m_xVSWidth->UnselectItems(); m_xVSWidth->SetSelectHdl(LINK(this, LineWidthPopup, VSSelectHdl)); m_xMFWidth->connect_value_changed(LINK(this, LineWidthPopup, MFModifyHdl)); @@ -134,7 +134,7 @@ IMPL_LINK_NOARG(LineWidthPopup, MFModifyHdl, weld::MetricSpinButton&, void) { if (!m_xVSWidth->IsNoSelection() && m_xVSWidth->GetSelectedItemId() != 0) { - m_xVSWidth->SetSelItem(0); + m_xVSWidth->UnselectItems(); m_xVSWidth->SetFormat(); m_xVSWidth->Invalidate(); } @@ -148,7 +148,7 @@ IMPL_LINK_NOARG(LineWidthPopup, MFModifyHdl, weld::MetricSpinButton&, void) void LineWidthPopup::SetWidthSelect(tools::Long lValue, bool bValuable, MapUnit eMapUnit) { m_bVSFocus = true; - m_xVSWidth->SetSelItem(0); + m_xVSWidth->UnselectItems(); m_eMapUnit = eMapUnit; SvtViewOptions aWinOpt(EViewType::Window, u"PopupPanel_LineWidth"_ustr); if (aWinOpt.Exists()) @@ -192,7 +192,9 @@ void LineWidthPopup::SetWidthSelect(tools::Long lValue, bool bValuable, MapUnit { if (strCurrValue == maStrUnits[i]) { - m_xVSWidth->SetSelItem(i + 1); + m_xVSWidth->SelectItem(i + 1); + m_xVSWidth->GrabFocus(); + break; } } @@ -200,7 +202,7 @@ void LineWidthPopup::SetWidthSelect(tools::Long lValue, bool bValuable, MapUnit if (i >= 8) { m_bVSFocus = false; - m_xVSWidth->SetSelItem(0); + m_xVSWidth->UnselectItems(); } m_xVSWidth->SetFormat(); diff --git a/svx/source/sidebar/line/LineWidthValueSet.cxx b/svx/source/sidebar/line/LineWidthValueSet.cxx index 2ea25a861e38..f09a52b5e784 100644 --- a/svx/source/sidebar/line/LineWidthValueSet.cxx +++ b/svx/source/sidebar/line/LineWidthValueSet.cxx @@ -51,18 +51,10 @@ void LineWidthValueSet::SetUnit(std::array const & strUnits) maStrUnits = strUnits; } -void LineWidthValueSet::SetSelItem(sal_uInt16 nSel) +void LineWidthValueSet::UnselectItems() { - if(nSel == 0) - { - SelectItem(1); // ,false); // 'false' nut supported by AOO - SetNoSelection(); - } - else - { - SelectItem(nSel); - GrabFocus(); - } + SelectItem(1); // ,false); // 'false' nut supported by AOO + SetNoSelection(); } void LineWidthValueSet::SetImage(const Image& img) diff --git a/svx/source/sidebar/line/LineWidthValueSet.hxx b/svx/source/sidebar/line/LineWidthValueSet.hxx index b4838480e876..6bc611105210 100644 --- a/svx/source/sidebar/line/LineWidthValueSet.hxx +++ b/svx/source/sidebar/line/LineWidthValueSet.hxx @@ -32,7 +32,7 @@ public: virtual ~LineWidthValueSet() override; void SetUnit(std::array const & strUnits); - void SetSelItem(sal_uInt16 nSel); + void UnselectItems(); void SetImage(const Image& img); void SetCusEnable(bool bEnable); From d5c619d39f60f0a02d832138c031c15c043d8520 Mon Sep 17 00:00:00 2001 From: Michael Weghorn Date: Thu, 1 Oct 2026 20:39:40 +0200 Subject: [PATCH 114/289] svx: Don't calculate the same Y coord twice `aLineEnd` uses the same calculation for the Y coordinate as `aLineStart`. Simplify and make that more obvious by reusing the already calculated one from `aLineStart` Change-Id: I7e12c6fcf526d50dcd6d1d9dc19805cc01837c2e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211710 Tested-by: Jenkins Reviewed-by: Michael Weghorn --- svx/source/sidebar/line/LineWidthValueSet.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/svx/source/sidebar/line/LineWidthValueSet.cxx b/svx/source/sidebar/line/LineWidthValueSet.cxx index f09a52b5e784..ffae2c8ee62e 100644 --- a/svx/source/sidebar/line/LineWidthValueSet.cxx +++ b/svx/source/sidebar/line/LineWidthValueSet.cxx @@ -85,7 +85,7 @@ void LineWidthValueSet::UserDraw( const UserDrawEvent& rUDEvt ) aFont.SetFontSize( aSize ); Point aLineStart(aBLPos.X() + 5, aBLPos.Y() + ( nRectHeight - nItemId )/2); - Point aLineEnd(aBLPos.X() + nRectWidth * 7 / 9 - 10, aBLPos.Y() + ( nRectHeight - nItemId )/2); + Point aLineEnd(aBLPos.X() + nRectWidth * 7 / 9 - 10, aLineStart.Y()); if (nItemId == 9) { Point aImgStart(aBLPos.X() + 5, aBLPos.Y() + ( nRectHeight - 23 ) / 2); From 9c385138fd24e6ef7d48a95a0cb9f847857f86a0 Mon Sep 17 00:00:00 2001 From: Michael Weghorn Date: Thu, 1 Oct 2026 20:48:23 +0200 Subject: [PATCH 115/289] svx: Draw filled rect at once instead of one line at a time Simplify drawing a line of N pixels height by drawing a filled rectangle of that height, instead of drawing N lines with a height of 1 pixel each. The popup for configuring the line thickness that uses this code can be triggered like this: * start Writer * insert a chart using "Insert" -> "Chart..." * select the chart wall in the chart * open the "Properties" sidebar deck * in the "Line" section of that sidebar deck, click on the "Thickness" button/combobox Change-Id: Ie5f3bb7c25cfddaf17f3b181f6d0cac4723e1459 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211711 Tested-by: Jenkins Reviewed-by: Michael Weghorn --- svx/source/sidebar/line/LineWidthValueSet.cxx | 22 ++++++++----------- 1 file changed, 9 insertions(+), 13 deletions(-) diff --git a/svx/source/sidebar/line/LineWidthValueSet.cxx b/svx/source/sidebar/line/LineWidthValueSet.cxx index ffae2c8ee62e..2686df9a07e2 100644 --- a/svx/source/sidebar/line/LineWidthValueSet.cxx +++ b/svx/source/sidebar/line/LineWidthValueSet.cxx @@ -74,7 +74,7 @@ void LineWidthValueSet::UserDraw( const UserDrawEvent& rUDEvt ) sal_uInt16 nItemId = rUDEvt.GetItemId(); tools::Long nRectHeight = aRect.GetHeight(); - tools::Long nRectWidth = aRect.GetWidth(); + const tools::Long nRectWidth = aRect.GetWidth(); Point aBLPos = aRect.TopLeft(); auto popIt = pDev->ScopedPush(vcl::PushFlags::FONT | vcl::PushFlags::LINECOLOR | vcl::PushFlags::FILLCOLOR); @@ -85,7 +85,6 @@ void LineWidthValueSet::UserDraw( const UserDrawEvent& rUDEvt ) aFont.SetFontSize( aSize ); Point aLineStart(aBLPos.X() + 5, aBLPos.Y() + ( nRectHeight - nItemId )/2); - Point aLineEnd(aBLPos.X() + nRectWidth * 7 / 9 - 10, aLineStart.Y()); if (nItemId == 9) { Point aImgStart(aBLPos.X() + 5, aBLPos.Y() + ( nRectHeight - 23 ) / 2); @@ -124,17 +123,14 @@ void LineWidthValueSet::UserDraw( const UserDrawEvent& rUDEvt ) pDev->DrawText(aStart, maStrUnits[ nItemId - 1 ]); //can't set DrawTextFlags::EndEllipsis here ,or the text will disappear //draw line - if (IsItemSelected(nItemId)) - pDev->SetLineColor(COL_WHITE); - else - pDev->SetLineColor(Application::GetSettings().GetStyleSettings().GetFieldTextColor()); - - for(sal_uInt16 i = 1; i <= nItemId; i++) - { - pDev->DrawLine(aLineStart,aLineEnd ); - aLineStart.setY(aLineStart.getY() + 1); - aLineEnd.setY (aLineEnd.getY() + 1); - } + const Color aLineColor + = IsItemSelected(nItemId) + ? COL_WHITE + : Application::GetSettings().GetStyleSettings().GetFieldTextColor(); + pDev->SetLineColor(aLineColor); + pDev->SetFillColor(aLineColor); + const sal_Int32 nLineWidth = nRectWidth * 7 / 9 - 15; + pDev->DrawRect(tools::Rectangle(aLineStart, Size(nLineWidth, nItemId))); } Invalidate( aRect ); From 4af0e70a49d4165845337e49396ade5d7daa2282 Mon Sep 17 00:00:00 2001 From: Michael Weghorn Date: Thu, 1 Oct 2026 09:46:54 +0200 Subject: [PATCH 116/289] chart2: Rename ChartTypeTabPage::getCurrent{Paramter -> Parameter} Fix typo in method name. Change-Id: I8f61fcd3d156c3cf7ba73e34bcfb5637bd54e9ac Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211657 Tested-by: Jenkins Reviewed-by: Michael Weghorn --- chart2/source/controller/dialogs/tp_ChartType.cxx | 10 +++++----- chart2/source/controller/dialogs/tp_ChartType.hxx | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/chart2/source/controller/dialogs/tp_ChartType.cxx b/chart2/source/controller/dialogs/tp_ChartType.cxx index e4d10a9d1d02..eb8f8003196a 100644 --- a/chart2/source/controller/dialogs/tp_ChartType.cxx +++ b/chart2/source/controller/dialogs/tp_ChartType.cxx @@ -153,7 +153,7 @@ ChartTypeTabPage::~ChartTypeTabPage() m_xSubTypeList.reset(); } -ChartTypeParameter ChartTypeTabPage::getCurrentParamter() const +ChartTypeParameter ChartTypeTabPage::getCurrentParameter() const { ChartTypeParameter aParameter; aParameter.nSubTypeIndex = static_cast(m_xSubTypeList->GetSelectedItemId()); @@ -181,7 +181,7 @@ void ChartTypeTabPage::stateChanged() return; m_nChangingCalls++; - ChartTypeParameter aParameter( getCurrentParamter() ); + ChartTypeParameter aParameter(getCurrentParameter()); if( m_pCurrentMainType ) { m_pCurrentMainType->adjustParameterToSubType( aParameter ); @@ -228,7 +228,7 @@ IMPL_LINK_NOARG(ChartTypeTabPage, SelectSubTypeHdl, ValueSet*, void) { if( m_pCurrentMainType ) { - ChartTypeParameter aParameter( getCurrentParamter() ); + ChartTypeParameter aParameter(getCurrentParameter()); m_pCurrentMainType->adjustParameterToSubType( aParameter ); fillAllControls( aParameter, false ); commitToModel( aParameter ); @@ -239,7 +239,7 @@ IMPL_LINK_NOARG(ChartTypeTabPage, SelectMainTypeHdl, weld::ItemView&, void) { se void ChartTypeTabPage::selectMainType() { - ChartTypeParameter aParameter( getCurrentParamter() ); + ChartTypeParameter aParameter(getCurrentParameter()); if( m_pCurrentMainType ) { @@ -391,7 +391,7 @@ rtl::Reference< ChartTypeTemplate > ChartTypeTabPage::getCurrentTemplate() const { if( m_pCurrentMainType && m_xChartModel.is() ) { - ChartTypeParameter aParameter( getCurrentParamter() ); + ChartTypeParameter aParameter(getCurrentParameter()); m_pCurrentMainType->adjustParameterToSubType( aParameter ); rtl::Reference< ::chart::ChartTypeManager > xChartTypeManager = m_xChartModel->getTypeManager(); return m_pCurrentMainType->getCurrentTemplate( aParameter, xChartTypeManager ); diff --git a/chart2/source/controller/dialogs/tp_ChartType.hxx b/chart2/source/controller/dialogs/tp_ChartType.hxx index 37d38bfd592c..2b52be483049 100644 --- a/chart2/source/controller/dialogs/tp_ChartType.hxx +++ b/chart2/source/controller/dialogs/tp_ChartType.hxx @@ -61,7 +61,7 @@ private: ChartTypeDialogController* getSelectedMainType(); void showAllControls( ChartTypeDialogController& rTypeController ); void fillAllControls( const ChartTypeParameter& rParameter, bool bAlsoResetSubTypeList=true ); - ChartTypeParameter getCurrentParamter() const; + ChartTypeParameter getCurrentParameter() const; virtual void stateChanged() override; From e011f744363c30e5ffc55846dd7a5ac28e5bae96 Mon Sep 17 00:00:00 2001 From: Michael Weghorn Date: Thu, 1 Oct 2026 10:29:15 +0200 Subject: [PATCH 117/289] chart2: Port "Chart Type" dialog from ValueSet to weld::IconView Port the widget to select the chart subtype in the "Chart Type" dialog from using a ValueSet widget to using weld::IconView. This helps to be more consistent with other platform/toolkit widgets and reduces custom logic. Adjust indices used to account for the fact that weld::IconView indices are 0-based while the ValueSet ones are 1-based. The dialog can be triggered like this: * start Writer * insert a chart using "Insert" -> "Chart..." * right-click on one of the bars in the chart to open the context menu * activate the "Chart Type..." menu item The chart sidebar (ChartTypePanel) will also be ported in an upcoming commit. Change-Id: I188f812f2d03fa8cbd97ffaaab3081094809887e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211658 Tested-by: Jenkins Reviewed-by: Michael Weghorn --- .../controller/dialogs/tp_ChartType.cxx | 42 +++++--------- .../controller/dialogs/tp_ChartType.hxx | 7 ++- chart2/uiconfig/ui/tp_ChartType.ui | 58 +++++++++---------- 3 files changed, 47 insertions(+), 60 deletions(-) diff --git a/chart2/source/controller/dialogs/tp_ChartType.cxx b/chart2/source/controller/dialogs/tp_ChartType.cxx index eb8f8003196a..6f045bb15eb1 100644 --- a/chart2/source/controller/dialogs/tp_ChartType.cxx +++ b/chart2/source/controller/dialogs/tp_ChartType.cxx @@ -31,6 +31,7 @@ #include #include +#include #include #include #include @@ -56,12 +57,8 @@ ChartTypeTabPage::ChartTypeTabPage(weld::Container* pPage, weld::DialogControlle , m_aTimerTriggeredControllerLock( m_xChartModel ) , m_xFT_ChooseType(m_xBuilder->weld_label(u"FT_CAPTION_FOR_WIZARD"_ustr)) , m_xMainTypeList(m_xBuilder->weld_tree_view(u"charttype"_ustr)) - , m_xSubTypeList(new ValueSet(m_xBuilder->weld_scrolled_window(u"subtypewin"_ustr, true))) - , m_xSubTypeListWin(new weld::CustomWeld(*m_xBuilder, u"subtype"_ustr, *m_xSubTypeList)) + , m_xSubTypeList(m_xBuilder->weld_icon_view(u"subtype"_ustr)) { - Size aSize(m_xSubTypeList->GetDrawingArea()->get_ref_device().LogicToPixel(Size(150, 50), MapMode(MapUnit::MapAppFont))); - m_xSubTypeListWin->set_size_request(aSize.Width(), aSize.Height()); - if (bShowDescription) { m_xFT_ChooseType->show(); @@ -74,16 +71,7 @@ ChartTypeTabPage::ChartTypeTabPage(weld::Container* pPage, weld::DialogControlle SetPageTitle(SchResId(STR_PAGE_CHARTTYPE)); m_xMainTypeList->connect_selection_changed(LINK(this, ChartTypeTabPage, SelectMainTypeHdl)); - m_xSubTypeList->SetSelectHdl( LINK( this, ChartTypeTabPage, SelectSubTypeHdl ) ); - - m_xSubTypeList->SetStyle(m_xSubTypeList->GetStyle() | - WB_ITEMBORDER | WB_DOUBLEBORDER | WB_NAMEFIELD | WB_FLATVALUESET | WB_3DLOOK ); - // Set number of columns in chart type selector. - // TODO: Ideally this would not be hard-coded, but determined - // programmatically based on the maximum number of chart types across all - // controllers. - m_xSubTypeList->SetColCount(4); - m_xSubTypeList->SetLineCount(1); + m_xSubTypeList->connect_item_activated(LINK(this, ChartTypeTabPage, ActivateSubTypeHdl)); bool bEnableComplexChartTypes = true; uno::Reference< beans::XPropertySet > xProps( static_cast(m_xChartModel.get()), uno::UNO_QUERY ); @@ -149,14 +137,12 @@ ChartTypeTabPage::~ChartTypeTabPage() m_pSplineResourceGroup.reset(); m_pGeometryResourceGroup.reset(); m_pSortByXValuesResourceGroup.reset(); - m_xSubTypeListWin.reset(); - m_xSubTypeList.reset(); } ChartTypeParameter ChartTypeTabPage::getCurrentParameter() const { ChartTypeParameter aParameter; - aParameter.nSubTypeIndex = static_cast(m_xSubTypeList->GetSelectedItemId()); + aParameter.nSubTypeIndex = static_cast(m_xSubTypeList->get_selected_index() + 1); m_pDim3DLookResourceGroup->fillParameter( aParameter ); m_pStackingResourceGroup->fillParameter( aParameter ); m_pSplineResourceGroup->fillParameter( aParameter ); @@ -224,7 +210,7 @@ ChartTypeDialogController* ChartTypeTabPage::getSelectedMainType() return pTypeController; } -IMPL_LINK_NOARG(ChartTypeTabPage, SelectSubTypeHdl, ValueSet*, void) +IMPL_LINK_NOARG(ChartTypeTabPage, ActivateSubTypeHdl, const weld::TreeIter&, bool) { if( m_pCurrentMainType ) { @@ -233,6 +219,8 @@ IMPL_LINK_NOARG(ChartTypeTabPage, SelectSubTypeHdl, ValueSet*, void) fillAllControls( aParameter, false ); commitToModel( aParameter ); } + + return true; } IMPL_LINK_NOARG(ChartTypeTabPage, SelectMainTypeHdl, weld::ItemView&, void) { selectMainType(); } @@ -282,7 +270,7 @@ void ChartTypeTabPage::selectMainType() void ChartTypeTabPage::showAllControls( ChartTypeDialogController& rTypeController ) { m_xMainTypeList->show(); - m_xSubTypeList->Show(); + m_xSubTypeList->show(); bool bShow = rTypeController.shouldShow_3DLookControl(); m_pDim3DLookResourceGroup->showControls( bShow ); @@ -302,17 +290,19 @@ void ChartTypeTabPage::fillAllControls( const ChartTypeParameter& rParameter, bo m_nChangingCalls++; if( m_pCurrentMainType && bAlsoResetSubTypeList ) { - m_xSubTypeList->Clear(); + m_xSubTypeList->clear(); const std::vector aEntries = m_pCurrentMainType->getSubTypes(rParameter); - int nIndex = 1; + int nIndex = 0; for (const ChartTypeEntry& rEntry : aEntries) { - m_xSubTypeList->InsertItem(nIndex, rEntry.aImage); - m_xSubTypeList->SetItemText(nIndex, rEntry.sName); + const Bitmap aBitmap = rEntry.aImage.GetBitmap(); + m_xSubTypeList->insert(nIndex, nullptr, nullptr, &aBitmap, nullptr); + m_xSubTypeList->set_item_tooltip_text(nIndex, rEntry.sName); + m_xSubTypeList->set_item_accessible_name(nIndex, rEntry.sName); nIndex++; } } - m_xSubTypeList->SelectItem( static_cast( rParameter.nSubTypeIndex) ); + m_xSubTypeList->select(rParameter.nSubTypeIndex - 1); m_pDim3DLookResourceGroup->fillControls( rParameter ); m_pStackingResourceGroup->fillControls( rParameter ); m_pSplineResourceGroup->fillControls( rParameter ); @@ -373,7 +363,7 @@ void ChartTypeTabPage::initializePage() if( !bFound ) { m_xMainTypeList->show(); - m_xSubTypeList->Show(); + m_xSubTypeList->show(); m_pDim3DLookResourceGroup->showControls( false ); m_pStackingResourceGroup->showControls( false ); m_pSplineResourceGroup->showControls( false ); diff --git a/chart2/source/controller/dialogs/tp_ChartType.hxx b/chart2/source/controller/dialogs/tp_ChartType.hxx index 2b52be483049..1d90c3a89b18 100644 --- a/chart2/source/controller/dialogs/tp_ChartType.hxx +++ b/chart2/source/controller/dialogs/tp_ChartType.hxx @@ -30,7 +30,9 @@ namespace weld { class CustomWeld; +class IconView; class ItemView; +class TreeIter; } class ValueSet; @@ -69,7 +71,7 @@ private: void selectMainType(); DECL_LINK(SelectMainTypeHdl, weld::ItemView&, void); - DECL_LINK(SelectSubTypeHdl, ValueSet*, void ); + DECL_LINK(ActivateSubTypeHdl, const weld::TreeIter&, bool); std::unique_ptr m_pDim3DLookResourceGroup; std::unique_ptr m_pStackingResourceGroup; @@ -88,8 +90,7 @@ private: std::unique_ptr m_xFT_ChooseType; std::unique_ptr m_xMainTypeList; - std::unique_ptr m_xSubTypeList; - std::unique_ptr m_xSubTypeListWin; + std::unique_ptr m_xSubTypeList; }; } //namespace chart diff --git a/chart2/uiconfig/ui/tp_ChartType.ui b/chart2/uiconfig/ui/tp_ChartType.ui index dc1036d90702..80f91f9817a2 100644 --- a/chart2/uiconfig/ui/tp_ChartType.ui +++ b/chart2/uiconfig/ui/tp_ChartType.ui @@ -34,6 +34,16 @@ + + + + + + + + + + True False @@ -80,37 +90,6 @@ True True 6 - - - True - True - never - never - in - - - True - True - - - True - GDK_BUTTON_MOTION_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_STRUCTURE_MASK - True - - - Select a sub type of the basic chart type. - - - - - - - - - 0 - 0 - - @@ -501,6 +480,23 @@ 2 + + + subtype + True + True + 6 + subtype_model + 4 + 0 + 2 + True + + + 0 + 0 + + 1 From da60cd7b8975e252db5f09d400e22545f4157568 Mon Sep 17 00:00:00 2001 From: Michael Weghorn Date: Thu, 1 Oct 2026 10:45:25 +0200 Subject: [PATCH 118/289] tdf#130857 Define widgets in "Chart Type" dialog in order Switch the order in which the widgets in the .ui file are defined so that the order better matches the visual appearance and logical order, which makes sure that tab focus order with the Qt-based VCL plugins is correct as well when using native Qt widgets (SAL_VCL_QT_USE_WELDED_WIDGETS=1), where focus order is (by default) based on widget creation order. See commit 02692566ad9fc7c3484f8581ffa0004cd4e43987 Author: Michael Weghorn Date: Thu Oct 24 17:43:35 2024 +0200 tdf#130857 optnewdictionarydialog.ui: Define focusable widgets in order for more background. The dialog can e.g. be triggered like this: * start Writer * insert a chart using "Insert" -> "Chart..." * right-click on one of the bars in the chart to open the context menu * activate the "Chart Type..." menu item The Python script mentioned in the commit message of commit 327679b2fb96b70797a61ff07ddd8d8b3f3a2606 Author: Michael Weghorn Date: Wed Jul 8 15:50:59 2026 +0200 tdf#130857 Define widgets in Calc "General" options page in order was used to reorder the GtkGrid children automatically. Change-Id: Iafe15ceba9e7c8b7651114e538b9ca20915c2367 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211659 Tested-by: Jenkins Reviewed-by: Michael Weghorn --- chart2/uiconfig/ui/tp_ChartType.ui | 138 ++++++++++++++--------------- 1 file changed, 69 insertions(+), 69 deletions(-) diff --git a/chart2/uiconfig/ui/tp_ChartType.ui b/chart2/uiconfig/ui/tp_ChartType.ui index 80f91f9817a2..022c62a86d05 100644 --- a/chart2/uiconfig/ui/tp_ChartType.ui +++ b/chart2/uiconfig/ui/tp_ChartType.ui @@ -82,6 +82,58 @@ True True 12 + + + False + True + never + in + + + True + True + True + liststore2 + False + False + 0 + False + + + + + + + + + 0 + + + + + + + + + + 1 + + + + + + + Select a basic chart type. + + + + + + + 0 + 0 + + @@ -90,6 +142,23 @@ True True 6 + + + subtype + True + True + 6 + subtype_model + 4 + 0 + 2 + True + + + 0 + 0 + + @@ -480,81 +549,12 @@ 2 - - - subtype - True - True - 6 - subtype_model - 4 - 0 - 2 - True - - - 0 - 0 - - 1 0 - - - False - True - never - in - - - True - True - True - liststore2 - False - False - 0 - False - - - - - - - - - 0 - - - - - - - - - - 1 - - - - - - - Select a basic chart type. - - - - - - - 0 - 0 - - False From dbc1b391dedeec51fb8527951770581a0b3708f0 Mon Sep 17 00:00:00 2001 From: Michael Weghorn Date: Thu, 1 Oct 2026 11:17:24 +0200 Subject: [PATCH 119/289] chart2: Port "Chart Type" sidebar section from ValueSet to weld::IconView In the same way that Change-Id: I188f812f2d03fa8cbd97ffaaab3081094809887e Author: Michael Weghorn Date: Thu Oct 1 10:29:15 2026 +0200 chart2: Port "Chart Type" dialog from ValueSet to weld::IconView had done for the "Chart Type" dialog, also port the chart sidebar from using the custom ValueSet widget to weld::IconView. This helps to be more consistent with other platform/toolkit widgets and reduces custom logic. It can be triggered like this: * start Writer * insert a chart using "Insert" -> "Chart..." * while the chart is still selected, open the "Properties" sidebar deck Change-Id: I858dda4b9d5bf62291ee3b0c76b13ee92221f9e6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211660 Reviewed-by: Michael Weghorn Tested-by: Jenkins --- .../controller/sidebar/ChartTypePanel.cxx | 43 +++++--------- .../controller/sidebar/ChartTypePanel.hxx | 9 ++- chart2/uiconfig/ui/sidebartype.ui | 59 +++++++++---------- 3 files changed, 48 insertions(+), 63 deletions(-) diff --git a/chart2/source/controller/sidebar/ChartTypePanel.cxx b/chart2/source/controller/sidebar/ChartTypePanel.cxx index b2985a9e3350..eb3f1cc9ddc0 100644 --- a/chart2/source/controller/sidebar/ChartTypePanel.cxx +++ b/chart2/source/controller/sidebar/ChartTypePanel.cxx @@ -29,7 +29,7 @@ #include #include -#include +#include #include #include @@ -54,20 +54,10 @@ ChartTypePanel::ChartTypePanel(weld::Widget* pParent, ::chart::ChartController* , m_nChangingCalls(0) , m_aTimerTriggeredControllerLock(m_xChartModel) , m_xMainTypeList(m_xBuilder->weld_combo_box(u"cmb_chartType"_ustr)) - , m_xSubTypeList(new ValueSet(m_xBuilder->weld_scrolled_window(u"subtypewin"_ustr, true))) - , m_xSubTypeListWin(new weld::CustomWeld(*m_xBuilder, u"subtype"_ustr, *m_xSubTypeList)) + , m_xSubTypeList(m_xBuilder->weld_icon_view(u"subtype"_ustr)) { - Size aSize(m_xSubTypeList->GetDrawingArea()->get_ref_device().LogicToPixel( - Size(120, 40), MapMode(MapUnit::MapAppFont))); - m_xSubTypeListWin->set_size_request(aSize.Width(), aSize.Height()); - m_xMainTypeList->connect_changed(LINK(this, ChartTypePanel, SelectMainTypeHdl)); - m_xSubTypeList->SetSelectHdl(LINK(this, ChartTypePanel, SelectSubTypeHdl)); - - m_xSubTypeList->SetStyle(m_xSubTypeList->GetStyle() | WB_ITEMBORDER | WB_DOUBLEBORDER - | WB_NAMEFIELD | WB_FLATVALUESET | WB_3DLOOK); - m_xSubTypeList->SetColCount(4); - m_xSubTypeList->SetLineCount(1); + m_xSubTypeList->connect_item_activated(LINK(this, ChartTypePanel, ActivateSubTypeHdl)); bool bEnableComplexChartTypes = true; uno::Reference xProps(static_cast(m_xChartModel.get()), @@ -131,17 +121,12 @@ ChartTypePanel::~ChartTypePanel() m_pSplineResourceGroup.reset(); m_pGeometryResourceGroup.reset(); m_pSortByXValuesResourceGroup.reset(); - m_xSubTypeListWin.reset(); - m_xSubTypeList.reset(); - - m_xSubTypeListWin.reset(); - m_xSubTypeList.reset(); m_xMainTypeList.reset(); } IMPL_LINK_NOARG(ChartTypePanel, SelectMainTypeHdl, weld::ComboBox&, void) { selectMainType(); } -IMPL_LINK_NOARG(ChartTypePanel, SelectSubTypeHdl, ValueSet*, void) +IMPL_LINK_NOARG(ChartTypePanel, ActivateSubTypeHdl, const weld::TreeIter&, bool) { if (m_pCurrentMainType) { @@ -150,6 +135,8 @@ IMPL_LINK_NOARG(ChartTypePanel, SelectSubTypeHdl, ValueSet*, void) fillAllControls(aParameter, false); commitToModel(aParameter); } + + return true; } void ChartTypePanel::Initialize() @@ -207,7 +194,7 @@ void ChartTypePanel::Initialize() if (!bFound) { - m_xSubTypeList->Hide(); + m_xSubTypeList->hide(); m_pDim3DLookResourceGroup->showControls(false); m_pStackingResourceGroup->showControls(false); m_pSplineResourceGroup->showControls(false); @@ -310,7 +297,7 @@ ChartTypeDialogController* ChartTypePanel::getSelectedMainType() void ChartTypePanel::showAllControls(ChartTypeDialogController& rTypeController) { m_xMainTypeList->show(); - m_xSubTypeList->Show(); + m_xSubTypeList->show(); bool bShow = rTypeController.shouldShow_3DLookControl(); m_pDim3DLookResourceGroup->showControls(bShow); @@ -331,17 +318,19 @@ void ChartTypePanel::fillAllControls(const ChartTypeParameter& rParameter, m_nChangingCalls++; if (m_pCurrentMainType && bAlsoResetSubTypeList) { - m_xSubTypeList->Clear(); + m_xSubTypeList->clear(); const std::vector aEntries = m_pCurrentMainType->getSubTypes(rParameter); - int nIndex = 1; + int nIndex = 0; for (const ChartTypeEntry& rEntry : aEntries) { - m_xSubTypeList->InsertItem(nIndex, rEntry.aImage); - m_xSubTypeList->SetItemText(nIndex, rEntry.sName); + const Bitmap aBitmap = rEntry.aImage.GetBitmap(); + m_xSubTypeList->insert(nIndex, nullptr, nullptr, &aBitmap, nullptr); + m_xSubTypeList->set_item_tooltip_text(nIndex, rEntry.sName); + m_xSubTypeList->set_item_accessible_name(nIndex, rEntry.sName); nIndex++; } } - m_xSubTypeList->SelectItem(static_cast(rParameter.nSubTypeIndex)); + m_xSubTypeList->select(rParameter.nSubTypeIndex - 1); m_pDim3DLookResourceGroup->fillControls(rParameter); m_pStackingResourceGroup->fillControls(rParameter); m_pSplineResourceGroup->fillControls(rParameter); @@ -353,7 +342,7 @@ void ChartTypePanel::fillAllControls(const ChartTypeParameter& rParameter, ChartTypeParameter ChartTypePanel::getCurrentParameter() const { ChartTypeParameter aParameter; - aParameter.nSubTypeIndex = static_cast(m_xSubTypeList->GetSelectedItemId()); + aParameter.nSubTypeIndex = static_cast(m_xSubTypeList->get_selected_index() + 1); m_pDim3DLookResourceGroup->fillParameter(aParameter); m_pStackingResourceGroup->fillParameter(aParameter); m_pSplineResourceGroup->fillParameter(aParameter); diff --git a/chart2/source/controller/sidebar/ChartTypePanel.hxx b/chart2/source/controller/sidebar/ChartTypePanel.hxx index 1460d0e76096..49e4893345c5 100644 --- a/chart2/source/controller/sidebar/ChartTypePanel.hxx +++ b/chart2/source/controller/sidebar/ChartTypePanel.hxx @@ -32,11 +32,11 @@ namespace com::sun::star::util class XModifyListener; } -class ValueSet; - namespace weld { class CustomWeld; +class IconView; +class TreeIter; } namespace chart @@ -87,7 +87,7 @@ private: void selectMainType(); DECL_LINK(SelectMainTypeHdl, weld::ComboBox&, void); - DECL_LINK(SelectSubTypeHdl, ValueSet*, void); + DECL_LINK(ActivateSubTypeHdl, const weld::TreeIter&, bool); vcl::EnumContext maContext; @@ -114,8 +114,7 @@ private: TimerTriggeredControllerLock m_aTimerTriggeredControllerLock; std::unique_ptr m_xMainTypeList; - std::unique_ptr m_xSubTypeList; - std::unique_ptr m_xSubTypeListWin; + std::unique_ptr m_xSubTypeList; }; } } // end of namespace ::chart::sidebar diff --git a/chart2/uiconfig/ui/sidebartype.ui b/chart2/uiconfig/ui/sidebartype.ui index 1576b88922c9..f443eb957346 100644 --- a/chart2/uiconfig/ui/sidebartype.ui +++ b/chart2/uiconfig/ui/sidebartype.ui @@ -1,5 +1,5 @@ - + @@ -32,6 +32,16 @@ + + + + + + + + + + True @@ -45,36 +55,6 @@ 6 3 6 - - - True - True - 6 - True - never - never - in - - - True - False - - - True - False - GDK_BUTTON_MOTION_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_STRUCTURE_MASK - True - - - - - - - 0 - 1 - 2 - - _3D Look @@ -370,6 +350,23 @@ 4 + + + True + True + 6 + subtype_model + 4 + 0 + 2 + True + + + 0 + 1 + 2 + + From 03bbcf8ba49878c64ace96ec8923ea20b6e88504 Mon Sep 17 00:00:00 2001 From: Andrea Gelmini Date: Fri, 2 Oct 2026 18:57:06 +0200 Subject: [PATCH 120/289] Remove duplicated include Change-Id: Ie1e72f1a4bc8708140e2dbaa3b499861f1d43c82 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211758 Reviewed-by: Dan Williams Tested-by: Jenkins --- sw/source/uibase/config/viewopt.cxx | 1 - 1 file changed, 1 deletion(-) diff --git a/sw/source/uibase/config/viewopt.cxx b/sw/source/uibase/config/viewopt.cxx index e010d4348f3a..206f9bb68b16 100644 --- a/sw/source/uibase/config/viewopt.cxx +++ b/sw/source/uibase/config/viewopt.cxx @@ -26,7 +26,6 @@ #include #include #include -#include #include #include #include From aced10b0eb58a5e38bc6d7d65ee4692d6b028cfa Mon Sep 17 00:00:00 2001 From: Andrea Gelmini Date: Fri, 2 Oct 2026 19:18:28 +0200 Subject: [PATCH 121/289] Removed exec bits on odt file Change-Id: I18330953b9c8519b0d3ae85d798793f01f1f124f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211759 Reviewed-by: Dan Williams Tested-by: Jenkins --- sw/qa/core/undo/data/tdf169795.odt | Bin 1 file changed, 0 insertions(+), 0 deletions(-) mode change 100755 => 100644 sw/qa/core/undo/data/tdf169795.odt diff --git a/sw/qa/core/undo/data/tdf169795.odt b/sw/qa/core/undo/data/tdf169795.odt old mode 100755 new mode 100644 From 35a1c9b83b26db3e64bbad118c1738c9cc7234d3 Mon Sep 17 00:00:00 2001 From: Andrea Gelmini Date: Fri, 2 Oct 2026 19:19:28 +0200 Subject: [PATCH 122/289] Fix typo Change-Id: I48d050d00b956c300cb1a99c0e60918bb4156ada Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211762 Reviewed-by: Dan Williams Tested-by: Jenkins --- sw/source/ui/vba/vbaapplication.hxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sw/source/ui/vba/vbaapplication.hxx b/sw/source/ui/vba/vbaapplication.hxx index ac573e3a4f80..e97dfb838293 100644 --- a/sw/source/ui/vba/vbaapplication.hxx +++ b/sw/source/ui/vba/vbaapplication.hxx @@ -125,7 +125,7 @@ public: // XSinkCaller virtual void SAL_CALL CallSinks( const OUString& Method, css::uno::Sequence< css::uno::Any >& Arguments ) override; - // this should be SwXTextDocument, but the inheritance hierarchy makes that impossoble + // this should be SwXTextDocument, but the inheritance hierarchy makes that impossible virtual SfxBaseModel* getCurrentDocument() override; rtl::Reference getCurrentSwDocument(); From aa8ffbbea9ff3c9d93c6e25826450f5aa97259c1 Mon Sep 17 00:00:00 2001 From: Andrea Gelmini Date: Fri, 2 Oct 2026 19:19:26 +0200 Subject: [PATCH 123/289] Fix typo Change-Id: Ic2c704f63f6977f6a45e8290860a9e920bbad66e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211760 Reviewed-by: Dan Williams Tested-by: Jenkins --- include/editeng/editobj.hxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/editeng/editobj.hxx b/include/editeng/editobj.hxx index 4b4bb525cd20..c341020cd425 100644 --- a/include/editeng/editobj.hxx +++ b/include/editeng/editobj.hxx @@ -58,7 +58,7 @@ enum class TextRotation { NONE, TOPTOBOTTOM, BOTTOMTOTOP }; /** This object is used to copy document/text info in and out of EditEngine. It is not used internally to editeng as storage mechanism, just a means - of extracing and inserting data. + of extracting and inserting data. */ class EDITENG_DLLPUBLIC EditTextObject final { From b34777e7d4d69c123c1d46a9fb5840ecaea79a93 Mon Sep 17 00:00:00 2001 From: Andrea Gelmini Date: Fri, 2 Oct 2026 19:19:29 +0200 Subject: [PATCH 124/289] Fix typo Change-Id: I48d050d00b956c300cb1a99c0e60918bb4156adb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211763 Reviewed-by: Dan Williams Tested-by: Andrea Gelmini --- sw/source/ui/vba/vbadocument.hxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sw/source/ui/vba/vbadocument.hxx b/sw/source/ui/vba/vbadocument.hxx index 7abc36547770..74cfde4d08b8 100644 --- a/sw/source/ui/vba/vbadocument.hxx +++ b/sw/source/ui/vba/vbadocument.hxx @@ -46,7 +46,7 @@ private: css::uno::Reference< css::container::XNameAccess > getFormControls() const; protected: - // this should be SwXTextDocument, but the inheritance hierarchy makes that impossoble + // this should be SwXTextDocument, but the inheritance hierarchy makes that impossible virtual SfxBaseModel* getModel() const override; public: From 872fa43021ba15962be1240d65c89be5b75a9029 Mon Sep 17 00:00:00 2001 From: Michael Weghorn Date: Fri, 2 Oct 2026 15:32:27 +0200 Subject: [PATCH 125/289] vcl: Declare var where it's assigned in VirtualDevice::ImplInitVirDev Merge 3 lines into one. Change-Id: I3ecb6615e6d6021273016df05a77fb40628992a3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211744 Tested-by: Jenkins Reviewed-by: Dan Williams --- vcl/source/gdi/virdev.cxx | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/vcl/source/gdi/virdev.cxx b/vcl/source/gdi/virdev.cxx index 8e16aa5279f5..1717c4cf24bc 100644 --- a/vcl/source/gdi/virdev.cxx +++ b/vcl/source/gdi/virdev.cxx @@ -151,11 +151,9 @@ void VirtualDevice::ImplInitVirDev( const OutputDevice* pOutDev, if( !pOutDev ) return; - SalGraphics* pGraphics; if ( !pOutDev->mpGraphics ) (void)pOutDev->AcquireGraphics(); - pGraphics = pOutDev->mpGraphics; - if ( pGraphics ) + if (SalGraphics* pGraphics = pOutDev->mpGraphics) { if (pData) mpVirDev = pSVData->mpDefInst->CreateVirtualDevice(*pGraphics, nDX, nDY, meFormatAndAlpha, *pData); From 342dabb28d51986e8bae52fd93b17df2874ac84b Mon Sep 17 00:00:00 2001 From: Li-Wen Hsu Date: Sat, 3 Oct 2026 03:52:10 +0800 Subject: [PATCH 126/289] gbuild: Use date -r for the BSDs as on macOS When building with `--with-java`, `jar --date=` gets an empty value on the BSDs due to "date: illegal option -- d" and causes build failure. All the BSDs use `date -r EPOCH` and the `date` in macOS is derived from BSD's. `date -d @EPOCH` is GNU coreutils syntax. Claude Code (Opus 5.5) was used to analyze the issue and to draft the first fix. Change-Id: I5c28c58985f0fdf2a44a608000b9d14ebd33a6ef Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211765 Reviewed-by: Ilmari Lauhakangas Tested-by: Jenkins --- solenv/gbuild/Jar.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/solenv/gbuild/Jar.mk b/solenv/gbuild/Jar.mk index d69e784dbe36..be63820c21ea 100644 --- a/solenv/gbuild/Jar.mk +++ b/solenv/gbuild/Jar.mk @@ -19,7 +19,7 @@ # Jar class -gb_Jar_JARCOMMAND := jar $(if $(SOURCE_DATE_EPOCH),--date="$(shell date $(if $(filter $(OS),MACOSX),-r ,-d @)$(SOURCE_DATE_EPOCH) -u +'%FT%T+00:00')") +gb_Jar_JARCOMMAND := jar $(if $(SOURCE_DATE_EPOCH),--date="$(shell date $(if $(filter $(OS),DRAGONFLY FREEBSD MACOSX NETBSD OPENBSD),-r ,-d @)$(SOURCE_DATE_EPOCH) -u +'%FT%T+00:00')") gb_Jar_LAYER_DIRS := \ URE:$(INSTROOT)/$(LIBO_URE_SHARE_JAVA_FOLDER) \ From 179a31e987fb68f9919ab9fd25fe2181afb0d326 Mon Sep 17 00:00:00 2001 From: Andrea Gelmini Date: Fri, 2 Oct 2026 18:56:46 +0200 Subject: [PATCH 127/289] Removed duplicated include Change-Id: I81bd1625316de0191cb443e8167c4f925ddfa111 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211757 Reviewed-by: Andrea Gelmini Tested-by: Jenkins --- editeng/qa/unit/core-test.cxx | 1 - 1 file changed, 1 deletion(-) diff --git a/editeng/qa/unit/core-test.cxx b/editeng/qa/unit/core-test.cxx index f3328e29d426..326037ddba73 100644 --- a/editeng/qa/unit/core-test.cxx +++ b/editeng/qa/unit/core-test.cxx @@ -54,7 +54,6 @@ #include #include #include -#include using namespace com::sun::star; From f0bc159124672f695f3d6135eef6dfca2b07bb09 Mon Sep 17 00:00:00 2001 From: Andrea Gelmini Date: Sat, 3 Oct 2026 00:13:21 +0200 Subject: [PATCH 128/289] Fix typos Change-Id: I2f3539c4536a090ccb827e12a39f4718a73fe4fd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211771 Tested-by: Julien Nabet Reviewed-by: Julien Nabet --- sw/qa/extras/ooxmlexport/ooxmlexport19.cxx | 4 ++-- sw/source/core/doc/DocumentContentOperationsManager.cxx | 2 +- sw/source/core/doc/tblcpy.cxx | 2 +- sw/source/core/layout/findfrm.cxx | 2 +- sw/source/filter/ww8/ww8atr.cxx | 2 +- sw/source/writerfilter/dmapper/DomainMapper_Impl.cxx | 2 +- vcl/inc/pdf/pdfwriter_impl.hxx | 2 +- 7 files changed, 8 insertions(+), 8 deletions(-) diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport19.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport19.cxx index 4607f172ecaf..d6d6e3137530 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport19.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport19.cxx @@ -483,7 +483,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf169024_verticalTopFrame) // gets exported as 'bottom' in DOCX, and import maps 'bottom' to top of Line of Text again auto verify = [this]() { - // To Character anchored Line of Text need to be LINE_TOP in order for the GUI to pick it up + // To Character anchored Line of Text needs to be LINE_TOP in order for the GUI to pick it up CPPUNIT_ASSERT_EQUAL(text::RelOrientation::TEXT_LINE, getProperty(getShape(1), u"VertOrientRelation"_ustr)); CPPUNIT_ASSERT_EQUAL(text::VertOrientation::LINE_TOP, @@ -508,7 +508,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf169024) createSwDoc("tdf90153.docx"); //saveAndReload(TestFilter::DOCX); - // To Character anchored Line of Text need to be LINE_BOTTOM in order for the GUI to pick it up + // To Character anchored Line of Text needs to be LINE_BOTTOM in order for the GUI to pick it up CPPUNIT_ASSERT_EQUAL(text::RelOrientation::TEXT_LINE, getProperty(getShape(1), u"VertOrientRelation"_ustr)); CPPUNIT_ASSERT_EQUAL(text::VertOrientation::LINE_BOTTOM, diff --git a/sw/source/core/doc/DocumentContentOperationsManager.cxx b/sw/source/core/doc/DocumentContentOperationsManager.cxx index 4900cdbff110..dffebc8950a7 100644 --- a/sw/source/core/doc/DocumentContentOperationsManager.cxx +++ b/sw/source/core/doc/DocumentContentOperationsManager.cxx @@ -2187,7 +2187,7 @@ void DocumentContentOperationsManager::DeleteDummyChar( void DocumentContentOperationsManager::DeleteRange( SwPaM & rPam ) { - // Seek all redlines that are in that PaM to be deleted.. + // Seek all redlines that are in that PaM to be deleted. SwRedlineTable::size_type nRedlStart = m_rDoc.getIDocumentRedlineAccess().GetRedlinePos( rPam.Start()->GetNode(), RedlineType::Any); SwRedlineTable::size_type nRedlEnd = m_rDoc.getIDocumentRedlineAccess().GetRedlineEndPos( diff --git a/sw/source/core/doc/tblcpy.cxx b/sw/source/core/doc/tblcpy.cxx index 3ee04912120e..fd8fa474abb3 100644 --- a/sw/source/core/doc/tblcpy.cxx +++ b/sw/source/core/doc/tblcpy.cxx @@ -509,7 +509,7 @@ static void lcl_CpyBox( const SwTable& rCpyTable, const SwTableBox* pCpyBox, // The text that arrives with the copy will be recalculated based on the formula, // and that would eliminate the tracked change from the cell anyway. // TODO: if we want tracked changes to work on it, we should create a new type of - // tracked change that track the formula changes, not the cell values changes. + // tracked change that tracks the formula changes, not the cell value changes. const bool bTrackChanges = !pCpyBox || SfxItemState::SET != pCpyBox->GetFrameFormat()->GetItemState( RES_BOXATR_FORMULA, false ); diff --git a/sw/source/core/layout/findfrm.cxx b/sw/source/core/layout/findfrm.cxx index 92debcf4216f..24b464df097b 100644 --- a/sw/source/core/layout/findfrm.cxx +++ b/sw/source/core/layout/findfrm.cxx @@ -424,7 +424,7 @@ const SwLayoutFrame *SwFrame::ImplGetNextLayoutLeaf( bool bFwd ) const if ( !bGoingDown ) { // I cannot go down, because either I'm currently going up or - // because the is no lower. + // because there is no lower. // I'll try to go forward: p = lcl_FindLayoutFrame( pFrame, bFwd ); bGoingFwdOrBwd = nullptr != p; diff --git a/sw/source/filter/ww8/ww8atr.cxx b/sw/source/filter/ww8/ww8atr.cxx index 2d6f9783e314..29a0fd68fb25 100644 --- a/sw/source/filter/ww8/ww8atr.cxx +++ b/sw/source/filter/ww8/ww8atr.cxx @@ -3763,7 +3763,7 @@ static bool lcl_IsAtTextEnd(const SwFormatFootnote& rFootnote) pSectNd = pSectNd->StartOfSectionNode()->FindSectionNode(); if (!pSectNd) - bRet = false; // the is ftn/end collected at Page- or Doc-End + bRet = false; // this is ftn/end collected at Page- or Doc-End } return bRet; } diff --git a/sw/source/writerfilter/dmapper/DomainMapper_Impl.cxx b/sw/source/writerfilter/dmapper/DomainMapper_Impl.cxx index b015ec1112bb..0a09997434a3 100644 --- a/sw/source/writerfilter/dmapper/DomainMapper_Impl.cxx +++ b/sw/source/writerfilter/dmapper/DomainMapper_Impl.cxx @@ -7517,7 +7517,7 @@ void DomainMapper_Impl::handleToc OUString sFigureSequence; OUString aBookmarkName; -// \a Builds a table of figures but does not include the captions's label and number +// \a Builds a table of figures but does not include the captions' label and number if( lcl_FindInCommand( pContext->GetCommand(), 'a', sValue )) { //make it a table of figures bTableOfFigures = true; diff --git a/vcl/inc/pdf/pdfwriter_impl.hxx b/vcl/inc/pdf/pdfwriter_impl.hxx index c0b31a636aef..693ae7d0de5a 100644 --- a/vcl/inc/pdf/pdfwriter_impl.hxx +++ b/vcl/inc/pdf/pdfwriter_impl.hxx @@ -857,7 +857,7 @@ private: AlphaMask m_aAlphaMask; }; - /// Cache some most recent bitmaps we've exported, in case we encounter them again.. + /// Cache some most recent bitmaps we've exported, in case we encounter them again. o3tl::lru_map> m_aPDFBmpCache; sal_Int32 m_nCurrentPage; From f6b0e1736e7f16ca49e7995f1ea0e1e3f98277b2 Mon Sep 17 00:00:00 2001 From: Andrea Gelmini Date: Sat, 3 Oct 2026 00:13:27 +0200 Subject: [PATCH 129/289] Fix typos Change-Id: I57ddd4f37138287fce235b10469257c1bcb1efe7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211772 Tested-by: Jenkins Reviewed-by: Julien Nabet --- vcl/source/app/salplug.cxx | 2 +- vcl/source/window/printdlg.cxx | 8 ++++---- xmlsecurity/source/dialogs/certificatechooser.cxx | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/vcl/source/app/salplug.cxx b/vcl/source/app/salplug.cxx index 08359289014d..61847c266f5e 100644 --- a/vcl/source/app/salplug.cxx +++ b/vcl/source/app/salplug.cxx @@ -17,7 +17,7 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -// Th current high-level preprocessor structure is: +// The current high-level preprocessor structure is: // // if !HAVE_FEATURE_UI // => STATIC_SAL_INSTANCE diff --git a/vcl/source/window/printdlg.cxx b/vcl/source/window/printdlg.cxx index 2599f2a860bd..acafaaa1c7bf 100644 --- a/vcl/source/window/printdlg.cxx +++ b/vcl/source/window/printdlg.cxx @@ -359,13 +359,13 @@ void PrintDialog::PrintPreviewWindow::preparePreviewBitmap() // tdf#141761 // The display quality of the Preview is pretty ugly when // FormControls are used. I made a deep-dive why this happens, - // and in principle the reason is the Mteafile::Scale used + // and in principle the reason is the Metafile::Scale used // below. Since Metafile actions are integer, that floating point // scale leads to rounding errors that make the lines painting // the FormControls disappear in the surrounding ClipRegions. - // That Scale cannot be avoided since the Metafile contains it's + // That Scale cannot be avoided since the Metafile contains its // own SetMapMode commands which *will* be executed on ::Play, - // so the ::Scale is the only possibility fr Metafile currently: + // so the ::Scale is the only possibility for Metafile currently: // Giving a Size as parameter in ::Play will *not* work due to // the relativeMapMode that gets created will fail on // ::SetMapMode actions in the Metafile - and FormControls DO @@ -393,7 +393,7 @@ void PrintDialog::PrintPreviewWindow::preparePreviewBitmap() // memory problems, still limit to a useful factor is // necessary, also empirically estimated to // avoid the quality from collapsing (using a direct - // in-between , ceil'd result) + // in-between, ceil'd result) static const double fMaximumQualitySquare(1396221.0); if(fNewNeededPixels > fMaximumQualitySquare) diff --git a/xmlsecurity/source/dialogs/certificatechooser.cxx b/xmlsecurity/source/dialogs/certificatechooser.cxx index b286b324b2eb..b02435090dbf 100644 --- a/xmlsecurity/source/dialogs/certificatechooser.cxx +++ b/xmlsecurity/source/dialogs/certificatechooser.cxx @@ -108,7 +108,7 @@ void CertificateChooser::BeforeRun() // We can't check for personal certificates before raising this dialog, // because the mozilla implementation throws a NoPassword exception, // if the user pressed cancel, and also if the database does not exist! - // But in the later case, the is no password query, and the user is confused + // But in the later case, there is no password query, and the user is confused // that nothing happens when pressing "Add..." in the SignatureDialog. // PostUserEvent( LINK( this, CertificateChooser, Initialize ) ); From 3bc01f0c998c855dc16ca5aa620290a3cefc5d79 Mon Sep 17 00:00:00 2001 From: Andrea Gelmini Date: Sat, 3 Oct 2026 00:13:14 +0200 Subject: [PATCH 130/289] Fix typos Change-Id: I3fb0e9e9d2b16195bf9445d01da8b5936c148544 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211770 Tested-by: Jenkins Reviewed-by: Julien Nabet --- sfx2/source/doc/objstor.cxx | 2 +- starmath/inc/node.hxx | 10 +++++----- starmath/source/ooxmlexport.cxx | 2 +- svx/source/sidebar/line/LineWidthPopup.cxx | 2 +- sw/inc/crsrsh.hxx | 2 +- sw/inc/doc.hxx | 2 +- sw/inc/fesh.hxx | 2 +- sw/qa/core/doc/doc.cxx | 2 +- 8 files changed, 12 insertions(+), 12 deletions(-) diff --git a/sfx2/source/doc/objstor.cxx b/sfx2/source/doc/objstor.cxx index e6e61e5753c0..c3b988a14177 100644 --- a/sfx2/source/doc/objstor.cxx +++ b/sfx2/source/doc/objstor.cxx @@ -2875,7 +2875,7 @@ bool SfxObjectShell::DoSave_Impl( const SfxItemSet* pArgs ) pSet->ClearItem( SID_VERSION ); pSet->ClearItem( SID_DOC_BASEURL ); - // copy the version comment and major items for the checkin only + // copy the version comment and major items for the check-in only if ( pRetrMedium->IsInCheckIn( ) ) { const SfxPoolItem* pMajor = pArgs->GetItem( SID_DOCINFO_MAJOR ); diff --git a/starmath/inc/node.hxx b/starmath/inc/node.hxx index b7e91bbed42f..90b4bd933ee3 100644 --- a/starmath/inc/node.hxx +++ b/starmath/inc/node.hxx @@ -463,10 +463,10 @@ private: }; -/** Abstract baseclass for all composite node +/** Abstract base class for all composite nodes * - * Subclasses of this class can have subnodes. Nodes that doesn't derivate from - * this class does not have subnodes. + * Subclasses of this class can have subnodes. Nodes that don't derive from + * this class do not have subnodes. */ class SmStructureNode : public SmNode { @@ -589,9 +589,9 @@ private: }; -/** Abstract base class for all visible node +/** Abstract base class for all visible nodes * - * Nodes that doesn't derivate from this class doesn't draw anything, but their + * Nodes that don't derive from this class don't draw anything, but their * children. */ class SmVisibleNode : public SmNode diff --git a/starmath/source/ooxmlexport.cxx b/starmath/source/ooxmlexport.cxx index 06a79fd190f1..bbb352c04958 100644 --- a/starmath/source/ooxmlexport.cxx +++ b/starmath/source/ooxmlexport.cxx @@ -85,7 +85,7 @@ void SmOoxmlExport::ConvertFromStarMath( const ::sax_fastparser::FSHelperPtr& se // part of the ooxml math stuff. // The w prefix is bound in a DOCX and nowhere else. A formula in a presentation or a -// spreadsheet goes out inside a slide or a sheet, which never declare it, so run +// spreadsheet goes out inside a slide or a sheet, which never declares it, so run // properties there would leave the prefix unbound. bool SmOoxmlExport::WritesRunProperties() const { diff --git a/svx/source/sidebar/line/LineWidthPopup.cxx b/svx/source/sidebar/line/LineWidthPopup.cxx index 4a0493880ffb..d9930790cfc5 100644 --- a/svx/source/sidebar/line/LineWidthPopup.cxx +++ b/svx/source/sidebar/line/LineWidthPopup.cxx @@ -117,7 +117,7 @@ IMPL_LINK_NOARG(LineWidthPopup, VSSelectHdl, ValueSet*, void) } else { - m_xVSWidth->SetNoSelection(); //add , set no selection and keep the last select item + m_xVSWidth->SetNoSelection(); // add: set no selection and keep the last selected item m_xVSWidth->SetFormat(); m_xVSWidth->Invalidate(); } diff --git a/sw/inc/crsrsh.hxx b/sw/inc/crsrsh.hxx index 288bd88f202c..82094b0988dc 100644 --- a/sw/inc/crsrsh.hxx +++ b/sw/inc/crsrsh.hxx @@ -136,7 +136,7 @@ namespace sw { bool ReplaceImpl(SwPaM & rCursor, OUString const& rReplacement, bool const bRegExp, SwDoc & rDoc, SwRootFrame const*const pLayout); -/// Helperfunction to resolve backward references in regular expressions +/// Helper function to resolve backward references in regular expressions std::optional ReplaceBackReferences(const i18nutil::SearchOptions2& rSearchOpt, SwPaM* pPam, SwRootFrame const* pLayout ); diff --git a/sw/inc/doc.hxx b/sw/inc/doc.hxx index 2a212d84788d..60ab9535da64 100644 --- a/sw/inc/doc.hxx +++ b/sw/inc/doc.hxx @@ -1595,7 +1595,7 @@ public: const SfxItemSet* pSet ); void SetFormatItemByAutoFormat( const SwPaM& rPam, const SfxItemSet& ); - // Only for SW-textbloxks! Does not pay any attention to layout! + // Only for SW text blocks! Does not pay any attention to layout! void ClearDoc(); // Deletes all content! // Query /set data for PagePreview. diff --git a/sw/inc/fesh.hxx b/sw/inc/fesh.hxx index 7df474767099..9332023fd1b4 100644 --- a/sw/inc/fesh.hxx +++ b/sw/inc/fesh.hxx @@ -299,7 +299,7 @@ public: /// Same as IsObjSelectable(), but return the object as well. SdrObject* GetObjAt(const Point& rPt); bool IsInsideSelectedObj( const Point& rPt ); ///< returns enum values - /** Returns true if it is background object, and is covered by text at the given point. */ + /** Returns true if it is a background object, and is covered by text at the given point. */ bool IsTextOverBgObjectAt(const Point& rPt, const SdrObject* pObj); /** Test if there is a draw object at that position and if it should be selected. The 'should' is aimed at Writer text fly frames which may be in front of diff --git a/sw/qa/core/doc/doc.cxx b/sw/qa/core/doc/doc.cxx index 47b041342a77..9224d3114bf7 100644 --- a/sw/qa/core/doc/doc.cxx +++ b/sw/qa/core/doc/doc.cxx @@ -264,7 +264,7 @@ CPPUNIT_TEST_FIXTURE(SwCoreDocTest, testShapeZOrderOverTextBox) // Without the accompanying fix in place, this test would have failed with: // - Expected: 1 // - Actual : 2 - // The shape over the text box was put one place too high and ended up over the shape that5 + // The shape over the text box was put one place too high and ended up over the shape that // should have covered it: the import added a place for the text frame of the text box, // which the z-order it read back does not count. CPPUNIT_ASSERT_EQUAL(static_cast(0), nBottom); From a56dd019a60c37298af59574a455ab2b50e4c9fe Mon Sep 17 00:00:00 2001 From: Andreas Heinisch Date: Wed, 30 Sep 2026 17:04:02 +0200 Subject: [PATCH 131/289] tdf#57274 - Link empty cells in paste special with paste all and link Ignore the objects flag since ScViewFunc::PasteFromClip removes it. Change-Id: Ica6961af920832de8cd16ecc945b0ea356fcc1b1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211628 Tested-by: Jenkins Reviewed-by: Andreas Heinisch --- sc/qa/unit/uicalc/uicalc.cxx | 37 +++++++++++++++++++++++++++++++++ sc/source/core/data/column3.cxx | 4 +++- 2 files changed, 40 insertions(+), 1 deletion(-) diff --git a/sc/qa/unit/uicalc/uicalc.cxx b/sc/qa/unit/uicalc/uicalc.cxx index e31ab4e065de..7c7f2628c03f 100644 --- a/sc/qa/unit/uicalc/uicalc.cxx +++ b/sc/qa/unit/uicalc/uicalc.cxx @@ -2161,6 +2161,43 @@ CPPUNIT_TEST_FIXTURE(ScUiCalcTest, testPasteAsLink) WEIGHT_NORMAL, aFont.GetWeightMaybeAskConfig()); } +CPPUNIT_TEST_FIXTURE(ScUiCalcTest, testTdf57274_paste_special_link_empty_cells) +{ + createScDoc(); + ScDocument* pDoc = getScDoc(); + + // Source range A1:A3 spans several rows including an empty cell in A2 + insertStringToCell(u"A1"_ustr, u"1"); + insertStringToCell(u"A3"_ustr, u"3"); + + goToCell(u"A1:A3"_ustr); + dispatchCommand(mxComponent, u".uno:Copy"_ustr, {}); + + // Paste Special with paste all and link + goToCell(u"B1"_ustr); + uno::Sequence aArgs = comphelper::InitPropertySequence( + { { "Flags", uno::Any(u"A"_ustr) }, + { "FormulaCommand", uno::Any(sal_uInt16(ScPasteFunc::NONE)) }, + { "SkipEmptyCells", uno::Any(false) }, + { "Transpose", uno::Any(false) }, + { "AsLink", uno::Any(true) }, + { "MoveMode", uno::Any(sal_uInt16(InsCellCmd::INS_NONE)) } }); + dispatchCommand(mxComponent, u".uno:InsertContents"_ustr, aArgs); + + CPPUNIT_ASSERT_EQUAL(u"=$Sheet1.$A$1"_ustr, pDoc->GetFormula(1, 0, 0)); // B1 + // Without the fix in place, this test would have failed with + // - Expected: =$Sheet1.$A$2 + // - Actual : + // i.e. no reference was created for the empty source cell + CPPUNIT_ASSERT_EQUAL(u"=$Sheet1.$A$2"_ustr, pDoc->GetFormula(1, 1, 0)); // B2 + CPPUNIT_ASSERT_EQUAL(0.0, pDoc->GetValue(1, 1, 0)); // B2 + CPPUNIT_ASSERT_EQUAL(u"=$Sheet1.$A$3"_ustr, pDoc->GetFormula(1, 2, 0)); // B3 + + // The link to the previously empty cell must follow its source + insertStringToCell(u"A2"_ustr, u"2"); + CPPUNIT_ASSERT_EQUAL(2.0, pDoc->GetValue(1, 1, 0)); // B2 +} + CPPUNIT_TEST_FIXTURE(ScUiCalcTest, testTdf119659) { createScDoc(); diff --git a/sc/source/core/data/column3.cxx b/sc/source/core/data/column3.cxx index 8328314c0662..0859ab9ac45c 100644 --- a/sc/source/core/data/column3.cxx +++ b/sc/source/core/data/column3.cxx @@ -1556,7 +1556,9 @@ void ScColumn::CopyFromClip( return; ScDocument& rDocument = GetDoc(); - if (rCxt.isAsLink() && rCxt.getInsertFlag() == InsertDeleteFlags::ALL) + // tdf#57274 - ignore objects since ScViewFunc::PasteFromClip removes the objects flag + if (rCxt.isAsLink() + && (rCxt.getInsertFlag() | InsertDeleteFlags::OBJECTS) == InsertDeleteFlags::ALL) { // We also reference empty cells for "ALL" // InsertDeleteFlags::ALL must always contain more flags when compared to "Insert contents" as From daa89fdb7fe7f6e30316cf53342d495d96c9d808 Mon Sep 17 00:00:00 2001 From: Andrea Gelmini Date: Sat, 3 Oct 2026 18:25:26 +0200 Subject: [PATCH 132/289] Fix typos Change-Id: I0e2b8adff439cf24155505746233fe6d1481a193 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211779 Tested-by: Jenkins Reviewed-by: Julien Nabet --- dbaccess/source/ui/control/tabletree.cxx | 2 +- dbaccess/source/ui/inc/tabletree.hxx | 2 +- drawinglayer/source/tools/wmfemfhelper.cxx | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/dbaccess/source/ui/control/tabletree.cxx b/dbaccess/source/ui/control/tabletree.cxx index d6103f165cba..fd90292b9e51 100644 --- a/dbaccess/source/ui/control/tabletree.cxx +++ b/dbaccess/source/ui/control/tabletree.cxx @@ -232,7 +232,7 @@ void OTableTreeListBox::UpdateTableList( const Reference< XConnection >& _rxConn if ( bSupportsCatalogs || bSupportsSchemas ) { // we display empty catalogs if the DB supports catalogs, and they're noted at the beginning of a - // composed name. Otherwise, we display empty schematas. (also see the tree structure explained in + // composed name. Otherwise, we display empty schemas. (also see the tree structure explained in // implAddEntry) bool bCatalogs = bSupportsCatalogs && xMeta->isCatalogAtStart(); diff --git a/dbaccess/source/ui/inc/tabletree.hxx b/dbaccess/source/ui/inc/tabletree.hxx index 6a19bb5285eb..0a9ca4e7e8a3 100644 --- a/dbaccess/source/ui/inc/tabletree.hxx +++ b/dbaccess/source/ui/inc/tabletree.hxx @@ -40,7 +40,7 @@ class OTableTreeListBox : public TreeListBox std::unique_ptr< ImageProvider > m_xImageProvider; // provider for our images bool m_bVirtualRoot; // should the first entry be visible - bool m_bNoEmptyFolders; // should empty catalogs/schematas be prevented from being displayed? + bool m_bNoEmptyFolders; // should empty catalogs/schemas be prevented from being displayed? bool m_bShowToggles; // show toggle buttons public: diff --git a/drawinglayer/source/tools/wmfemfhelper.cxx b/drawinglayer/source/tools/wmfemfhelper.cxx index 20e80981e9f3..2ba9eddd99a7 100644 --- a/drawinglayer/source/tools/wmfemfhelper.cxx +++ b/drawinglayer/source/tools/wmfemfhelper.cxx @@ -1896,7 +1896,7 @@ namespace wmfemfhelper { rTargetHolders.Push(); - // for sub-Mteafile contents, do start with new, default render state + // for sub-Metafile contents, do start with new, default render state // #i124686# ...but copy font, this is already set accordingly vcl::Font aTargetFont = rPropertyHolders.Current().getFont(); rPropertyHolders.PushDefault(); @@ -2723,7 +2723,7 @@ namespace wmfemfhelper drawinglayer::primitive2d::Primitive2DContainer xSubContent; { rTargetHolders.Push(); - // #i# for sub-Mteafile contents, do start with new, default render state + // #i# for sub-Metafile contents, do start with new, default render state rPropertyHolders.PushDefault(); implInterpretMetafile(rContent, rTargetHolders, rPropertyHolders, rViewInformation); xSubContent = rTargetHolders.Current().getPrimitive2DSequence(rPropertyHolders.Current()); From 6531640d6f05c9959168996c743c7248d560d6d2 Mon Sep 17 00:00:00 2001 From: Andreas Heinisch Date: Thu, 1 Oct 2026 21:51:27 +0200 Subject: [PATCH 133/289] tdf#125846 - Remove the terminate listener of an embedded object only once Otherwise, all remaining listeners will be checked, leading to performance issues when closing a document with many objects like formulas. Change-Id: I99b4b536e40af8a9045c7da6356cca87d3c88b02 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211697 Reviewed-by: Andreas Heinisch Tested-by: Jenkins --- embeddedobj/source/general/docholder.cxx | 12 ++++++++---- embeddedobj/source/inc/docholder.hxx | 2 +- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/embeddedobj/source/general/docholder.cxx b/embeddedobj/source/general/docholder.cxx index 2b1d08b08d18..76eebd5bea7f 100644 --- a/embeddedobj/source/general/docholder.cxx +++ b/embeddedobj/source/general/docholder.cxx @@ -156,7 +156,7 @@ DocumentHolder::DocumentHolder( uno::Reference< uno::XComponentContext > xContex m_bReadOnly( false ), m_bWaitForClose( false ), m_bAllowClosing( false ), - m_bDesktopTerminated( false ), + m_bTerminateListenerRegistered( false ), m_nNoBorderResizeReact( 0 ), m_nNoResizeReact( 0 ) { @@ -165,6 +165,7 @@ DocumentHolder::DocumentHolder( uno::Reference< uno::XComponentContext > xContex try { xDesktop->addTerminateListener( this ); + m_bTerminateListenerRegistered = true; } catch ( const uno::Exception& ) { @@ -198,8 +199,7 @@ DocumentHolder::~DocumentHolder() m_xInterceptor.clear(); } - if ( !m_bDesktopTerminated ) - FreeOffice(); + FreeOffice(); } @@ -233,6 +233,10 @@ void DocumentHolder::CloseFrame() void DocumentHolder::FreeOffice() { + // tdf#125846 - deregister listener only once since a second removal would check all listeners + if (!m_bTerminateListenerRegistered) + return; + m_bTerminateListenerRegistered = false; try { uno::Reference< frame::XDesktop2 > xDesktop = frame::Desktop::create( m_xContext ); xDesktop->removeTerminateListener( this ); @@ -1152,8 +1156,8 @@ void SAL_CALL DocumentHolder::notifyTermination( const lang::EventObject& aSourc { OSL_ENSURE( !m_xComponent.is(), "Just a disaster..." ); + m_bTerminateListenerRegistered = false; uno::Reference< frame::XDesktop > xDesktop( aSource.Source, uno::UNO_QUERY ); - m_bDesktopTerminated = true; if ( xDesktop.is() ) xDesktop->removeTerminateListener( static_cast(this) ); } diff --git a/embeddedobj/source/inc/docholder.hxx b/embeddedobj/source/inc/docholder.hxx index 2c221cc411c6..21e915d09e32 100644 --- a/embeddedobj/source/inc/docholder.hxx +++ b/embeddedobj/source/inc/docholder.hxx @@ -77,7 +77,7 @@ private: bool m_bWaitForClose; bool m_bAllowClosing; - bool m_bDesktopTerminated; + bool m_bTerminateListenerRegistered; sal_Int32 m_nNoBorderResizeReact; sal_Int32 m_nNoResizeReact; From c3709595f320862a673dda58db56968b974e67e7 Mon Sep 17 00:00:00 2001 From: Laurent Balland Date: Sat, 3 Oct 2026 20:40:50 +0200 Subject: [PATCH 134/289] Update git submodules * Update helpcontent2 from branch 'master' to c081e947a6b2e424325c60058a40042510e1807a - tdf#173835 Select All Sheets also select hidden sheets - Correct capitalization of "Select All Sheets" command like in UI - Add some precision about the hidden sheets which are also selected Change-Id: I154b5de6c298a7933a2398c09e7af9d3938649d1 Reviewed-on: https://gerrit.libreoffice.org/c/help/+/211777 Tested-by: Jenkins Reviewed-by: Olivier Hallot --- helpcontent2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/helpcontent2 b/helpcontent2 index e80198e1d1d9..c081e947a6b2 160000 --- a/helpcontent2 +++ b/helpcontent2 @@ -1 +1 @@ -Subproject commit e80198e1d1d98518188321158da8488f32675bea +Subproject commit c081e947a6b2e424325c60058a40042510e1807a From eb37c62b08d9d422748c2733f9591666f15c50cd Mon Sep 17 00:00:00 2001 From: Julien Nabet Date: Sat, 3 Oct 2026 22:17:27 +0200 Subject: [PATCH 135/289] Fix weird encoding From ea8767fe503384eeabda0d008acf748086d8ef66 tdf#138234 Focus the frame before executing toolbar action Change-Id: I3c4bc9181df4b6c0abdfd4233829319d61f3224d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211784 Reviewed-by: Julien Nabet Tested-by: Julien Nabet --- framework/source/uielement/generictoolbarcontroller.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/framework/source/uielement/generictoolbarcontroller.cxx b/framework/source/uielement/generictoolbarcontroller.cxx index f21d5af33994..d32807c2425a 100644 --- a/framework/source/uielement/generictoolbarcontroller.cxx +++ b/framework/source/uielement/generictoolbarcontroller.cxx @@ -155,8 +155,8 @@ void SAL_CALL GenericToolbarController::execute( sal_Int16 KeyModifier ) xDispatch = pIter->second; // tdf#138234 If this toolbar is a floating window then - // clicking on a button probably took the window focus. Let’s - // give it back to the toolbar’s frame. + // clicking on a button probably took the window focus. Let's + // give it back to the toolbar's frame. if ( m_xFrame.is() && m_xFrame->getContainerWindow().is() ) m_xFrame->getContainerWindow()->setFocus(); } From 889c92e926b5a15ea928ecc5b3f22a2a57a12e1c Mon Sep 17 00:00:00 2001 From: Julien Nabet Date: Sat, 3 Oct 2026 23:06:21 +0200 Subject: [PATCH 136/289] Revert "Fix weird encoding" This reverts commit eb37c62b08d9d422748c2733f9591666f15c50cd. Reason for revert: not wrong encoding, it was some Unicode Change-Id: I7ad4fa180099676b2b0e480146947ca65a2cf53a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211785 Tested-by: Julien Nabet Reviewed-by: Julien Nabet --- framework/source/uielement/generictoolbarcontroller.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/framework/source/uielement/generictoolbarcontroller.cxx b/framework/source/uielement/generictoolbarcontroller.cxx index d32807c2425a..f21d5af33994 100644 --- a/framework/source/uielement/generictoolbarcontroller.cxx +++ b/framework/source/uielement/generictoolbarcontroller.cxx @@ -155,8 +155,8 @@ void SAL_CALL GenericToolbarController::execute( sal_Int16 KeyModifier ) xDispatch = pIter->second; // tdf#138234 If this toolbar is a floating window then - // clicking on a button probably took the window focus. Let's - // give it back to the toolbar's frame. + // clicking on a button probably took the window focus. Let’s + // give it back to the toolbar’s frame. if ( m_xFrame.is() && m_xFrame->getContainerWindow().is() ) m_xFrame->getContainerWindow()->setFocus(); } From 8f2eee739de0d78b6d70351a166bd14769807050 Mon Sep 17 00:00:00 2001 From: Julien Nabet Date: Fri, 2 Oct 2026 13:48:38 +0200 Subject: [PATCH 137/289] Related tdf#173496: fix regression from previous patch on Pages The regression was when clicking on Pages, it was impossible to type a range. But following https://bugs.documentfoundation.org/show_bug.cgi?id=173496#c17 from Heiko, if we use placeholder instead + keep what the user may typed, it simplifies the pb. So here are the changes: - display placeholder when clicking "Pages" except if user typed something. Also preserve what the user typed whatever it happens then (e.g. changing page orientation) => change UI test to correspond to the whole change abovev - add a delay mechanism for the preview when on Pages. Indeed, when typing first character, placeholder was still in background for a brief time + there was a slight lag when typing a character These changes have been proposed by GPT 5.6 Luna but I could test them and make UITest_calc_dialogs is ok for me (we'll see on Jenkins). Change-Id: Ifa57a8d1fded24cc03ed8f0589828931e897d641 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211738 Tested-by: Jenkins Reviewed-by: Julien Nabet --- sc/qa/uitest/calc_dialogs/printDialog.py | 34 +++++++++++----------- vcl/inc/printdlg.hxx | 3 ++ vcl/source/window/printdlg.cxx | 36 ++++++++++++++---------- 3 files changed, 42 insertions(+), 31 deletions(-) diff --git a/sc/qa/uitest/calc_dialogs/printDialog.py b/sc/qa/uitest/calc_dialogs/printDialog.py index cd359539cab1..0057ebf52e2f 100644 --- a/sc/qa/uitest/calc_dialogs/printDialog.py +++ b/sc/qa/uitest/calc_dialogs/printDialog.py @@ -7,7 +7,7 @@ # 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, select_by_text +from uitest.uihelper.common import get_state_as_dict, get_url_for_data_file, select_by_text, mkPropertyValues class printDialog(UITestCase): def test_printDialog(self): @@ -22,11 +22,11 @@ class printDialog(UITestCase): xPortraiTotalNumberPages = xDialog.getChild("totalnumpages") self.assertEqual(get_state_as_dict(xPortraiTotalNumberPages)["Text"], "/ 2") - xPortraiPageRange = xDialog.getChild("pagerange") - self.assertEqual(get_state_as_dict(xPortraiPageRange)["Text"], "1-2") + xPageRange = xDialog.getChild("pagerange") + self.assertEqual(get_state_as_dict(xPageRange)["Text"], "") - xpageorientationbox = xDialog.getChild("pageorientationbox") - select_by_text(xpageorientationbox, "Landscape") + xPageOrientationBox = xDialog.getChild("pageorientationbox") + select_by_text(xPageOrientationBox, "Landscape") # Without the fix in place, this test would have failed with # Expected: "/ 1" @@ -34,17 +34,19 @@ class printDialog(UITestCase): xLandscapeTotalNumberPages = xDialog.getChild("totalnumpages") self.assertEqual(get_state_as_dict(xLandscapeTotalNumberPages)["Text"], "/ 1") - # Without the fix in place, this test would have failed with - # Expected: "1" - # Actual : "1-2" - xLandscapePageRange = xDialog.getChild("pagerange") - self.assertEqual(get_state_as_dict(xLandscapePageRange)["Text"], "1") + # Page range is empty by default and must not be populated automatically + self.assertEqual(get_state_as_dict(xPageRange)["Text"], "") - # check that when reselecting Portrait, the range is again 1-2 - # Expected: "1-2" - # Actual : "1" - select_by_text(xpageorientationbox, "Portrait") - xPortraitPageRange = xDialog.getChild("pagerange") - self.assertEqual(get_state_as_dict(xPortraitPageRange)["Text"], "1-2") + select_by_text(xPageOrientationBox, "Portrait") + # Page range must remain empty when the number of pages changes. + self.assertEqual(get_state_as_dict(xPageRange)["Text"], "") + + # User enters a page range. + xPageRange.executeAction("TYPE", mkPropertyValues({"TEXT": "2-3"})) + + select_by_text(xPageOrientationBox, "Landscape") + select_by_text(xPageOrientationBox, "Portrait") + + self.assertEqual(get_state_as_dict(xPageRange)["Text"], "2-3") # vim: set shiftwidth=4 softtabstop=4 expandtab: diff --git a/vcl/inc/printdlg.hxx b/vcl/inc/printdlg.hxx index 3db74784fc2b..6d60f4321e38 100644 --- a/vcl/inc/printdlg.hxx +++ b/vcl/inc/printdlg.hxx @@ -224,6 +224,9 @@ namespace vcl Idle maUpdatePreviewIdle; DECL_LINK(updatePreviewIdle, Timer*, void); + Timer maPageRangeUpdateTimer; + DECL_LINK(PageRangeUpdateTimerHdl, Timer*, void); + DECL_LINK(ClickOKCancelHdl, weld::Button&, void); DECL_LINK(ClickForwardHdl, weld::Button&, void); DECL_LINK(ClickBackwardHdl, weld::Button&, void); diff --git a/vcl/source/window/printdlg.cxx b/vcl/source/window/printdlg.cxx index acafaaa1c7bf..d45aedb6125e 100644 --- a/vcl/source/window/printdlg.cxx +++ b/vcl/source/window/printdlg.cxx @@ -586,6 +586,7 @@ PrintDialog::PrintDialog(weld::Window* i_pWindow, std::shared_ptrgetValue(u"PageRange"_ustr); @@ -663,6 +664,10 @@ PrintDialog::PrintDialog(weld::Window* i_pWindow, std::shared_ptrgetMultipage() ); // setup optional UI options set by application @@ -1031,6 +1036,12 @@ IMPL_LINK_NOARG(PrintDialog, updatePreviewIdle, Timer*, void) preparePreview(std::exchange(mbUseCacheForPreview, true)); } +IMPL_LINK_NOARG(PrintDialog, PageRangeUpdateTimerHdl, Timer*, void) +{ + schedulePreviewUpdate(false); +} + + void PrintDialog::preparePreview( bool i_bMayUseCache ) { VclPtr aPrt( maPController->getPrinter() ); @@ -1169,17 +1180,7 @@ void PrintDialog::updatePageRange(sal_Int32 nPages) pContentVal->Value >>= nContent; if (nContent == 1) - { - OUString sRange; - if (nPages == 1) - sRange = u"1"_ustr; - else - sRange = u"1-"_ustr + OUString::number(nPages); - - mxPageRangeEdit->set_text(sRange); - maPController->setValue(u"PageRange"_ustr, Any(sRange)); - return; - } + return; // User-controlled page range OUString sRange; @@ -1203,7 +1204,6 @@ void PrintDialog::updatePageRange(sal_Int32 nPages) return; } - mxPageRangeEdit->set_text(sRange); maPController->setValue(u"PageRange"_ustr, Any(sRange)); } @@ -1899,7 +1899,10 @@ void PrintDialog::setupOptionalUI() PropertyValue* pVal = maPController->getValue( aPropertyName ); if( pVal && pVal->Value.hasValue() ) pVal->Value >>= aCurVal; - xField->set_text( aCurVal ); + if (aPropertyName != "PageRange") + { + xField->set_text( aCurVal ); + } xField->connect_changed( LINK( this, PrintDialog, UIOption_EntryModifyHdl ) ); xField->show(); @@ -2495,8 +2498,11 @@ IMPL_LINK(PrintDialog, UIOption_EntryModifyHdl, weld::TextWidget&, i_rBox, void) checkOptionalControlDependencies(); - // update preview and page settings - schedulePreviewUpdate(false); + if (pVal->Name == "PageRange") + maPageRangeUpdateTimer.Start(); + else + schedulePreviewUpdate(false); + } } From f38bf2917bf534c8319eff028bd617ac88d84e2f Mon Sep 17 00:00:00 2001 From: Manish Bera Date: Wed, 8 Apr 2026 21:13:18 +0530 Subject: [PATCH 138/289] Add unit tests for cppumaker Change-Id: I4f53f7ee2d7f5147d09e0ff3bbde9f48f10ff85a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/203324 Tested-by: Jenkins Reviewed-by: Hossein --- codemaker/Module_codemaker.mk | 2 +- codemaker/PythonTest_codemaker_python.mk | 17 - codemaker/Test_codemaker.mk | 20 + codemaker/tests/Readme.md | 94 ++++ codemaker/tests/codemakertests.py | 274 +++++++++++ .../test/codemaker/codemakertests/Any.hdl | 12 + .../test/codemaker/codemakertests/Any.hpp | 10 + .../test/codemaker/codemakertests/Boolean.hdl | 12 + .../test/codemaker/codemakertests/Boolean.hpp | 10 + .../test/codemaker/codemakertests/Byte.hdl | 12 + .../test/codemaker/codemakertests/Byte.hpp | 10 + .../test/codemaker/codemakertests/Char.hdl | 12 + .../test/codemaker/codemakertests/Char.hpp | 10 + .../test/codemaker/codemakertests/Double.hdl | 11 + .../test/codemaker/codemakertests/Double.hpp | 9 + .../test/codemaker/codemakertests/Enum.hdl | 12 + .../test/codemaker/codemakertests/Enum.hpp | 10 + .../test/codemaker/codemakertests/Enum1.hdl | 47 ++ .../test/codemaker/codemakertests/Enum1.hpp | 27 ++ .../test/codemaker/codemakertests/Enum2.hdl | 51 ++ .../test/codemaker/codemakertests/Enum2.hpp | 27 ++ .../test/codemaker/codemakertests/Enum3.hdl | 49 ++ .../test/codemaker/codemakertests/Enum3.hpp | 27 ++ .../test/codemaker/codemakertests/Enum4.hdl | 47 ++ .../test/codemaker/codemakertests/Enum4.hpp | 27 ++ .../test/codemaker/codemakertests/Float.hdl | 11 + .../test/codemaker/codemakertests/Float.hpp | 9 + .../test/codemaker/codemakertests/Hyper.hdl | 12 + .../test/codemaker/codemakertests/Hyper.hpp | 10 + .../test/codemaker/codemakertests/Long.hdl | 12 + .../test/codemaker/codemakertests/Long.hpp | 10 + .../codemaker/codemakertests/PolyStruct.hdl | 32 ++ .../codemaker/codemakertests/PolyStruct.hpp | 80 +++ .../test/codemaker/codemakertests/S1.hpp | 301 ++++++++++++ .../test/codemaker/codemakertests/S2.hpp | 57 +++ .../test/codemaker/codemakertests/S4.hpp | 50 ++ .../codemaker/codemakertests/SequenceAny.hdl | 13 + .../codemaker/codemakertests/SequenceAny.hpp | 11 + .../codemakertests/SequenceBoolean.hdl | 13 + .../codemakertests/SequenceBoolean.hpp | 11 + .../codemaker/codemakertests/SequenceByte.hdl | 13 + .../codemaker/codemakertests/SequenceByte.hpp | 11 + .../codemaker/codemakertests/SequenceChar.hdl | 13 + .../codemaker/codemakertests/SequenceChar.hpp | 11 + .../codemakertests/SequenceDouble.hdl | 13 + .../codemakertests/SequenceDouble.hpp | 11 + .../codemaker/codemakertests/SequenceEnum.hdl | 13 + .../codemaker/codemakertests/SequenceEnum.hpp | 11 + .../codemakertests/SequenceFloat.hdl | 13 + .../codemakertests/SequenceFloat.hpp | 11 + .../codemakertests/SequenceHyper.hdl | 13 + .../codemakertests/SequenceHyper.hpp | 11 + .../codemaker/codemakertests/SequenceLong.hdl | 13 + .../codemaker/codemakertests/SequenceLong.hpp | 11 + .../codemakertests/SequenceShort.hdl | 13 + .../codemakertests/SequenceShort.hpp | 11 + .../codemakertests/SequenceString.hdl | 13 + .../codemakertests/SequenceString.hpp | 11 + .../codemakertests/SequenceStruct.hdl | 13 + .../codemakertests/SequenceStruct.hpp | 11 + .../codemaker/codemakertests/SequenceType.hdl | 13 + .../codemaker/codemakertests/SequenceType.hpp | 11 + .../codemakertests/SequenceUnsignedHyper.hdl | 13 + .../codemakertests/SequenceUnsignedHyper.hpp | 11 + .../codemakertests/SequenceUnsignedLong.hdl | 13 + .../codemakertests/SequenceUnsignedLong.hpp | 11 + .../codemakertests/SequenceUnsignedShort.hdl | 13 + .../codemakertests/SequenceUnsignedShort.hpp | 11 + .../codemakertests/SequenceXInterface.hdl | 13 + .../codemakertests/SequenceXInterface.hpp | 11 + .../codemakertests/SequenceXNamingService.hdl | 13 + .../codemakertests/SequenceXNamingService.hpp | 11 + .../test/codemaker/codemakertests/Service.hpp | 63 +++ .../test/codemaker/codemakertests/Short.hdl | 12 + .../test/codemaker/codemakertests/Short.hpp | 10 + .../test/codemaker/codemakertests/String.hdl | 12 + .../test/codemaker/codemakertests/String.hpp | 10 + .../test/codemaker/codemakertests/Struct.hdl | 12 + .../test/codemaker/codemakertests/Struct.hpp | 10 + .../test/codemaker/codemakertests/Struct1.hdl | 33 ++ .../test/codemaker/codemakertests/Struct1.hpp | 54 +++ .../test/codemaker/codemakertests/Struct2.hdl | 167 +++++++ .../test/codemaker/codemakertests/Struct2.hpp | 454 ++++++++++++++++++ .../codemakertests/TestConstantsBasic.hdl | 22 + .../codemakertests/TestConstantsBasic.hpp | 3 + .../test/codemaker/codemakertests/Type.hdl | 12 + .../test/codemaker/codemakertests/Type.hpp | 9 + .../codemakertests/UnsignedHyper.hdl | 12 + .../codemakertests/UnsignedHyper.hpp | 10 + .../codemaker/codemakertests/UnsignedLong.hdl | 12 + .../codemaker/codemakertests/UnsignedLong.hpp | 10 + .../codemakertests/UnsignedShort.hdl | 12 + .../codemakertests/UnsignedShort.hpp | 10 + .../test/codemaker/codemakertests/XIfc.hdl | 43 ++ .../test/codemaker/codemakertests/XIfc.hpp | 45 ++ .../codemaker/codemakertests/XInterface.hdl | 13 + .../codemaker/codemakertests/XInterface.hpp | 11 + .../codemakertests/XNamingService.hdl | 13 + .../codemakertests/XNamingService.hpp | 11 + .../test/codemaker/codemakertests/XTest.hdl | 48 ++ .../test/codemaker/codemakertests/XTest.hpp | 43 ++ .../codemaker/codemakertests/abstract.hpp | 50 ++ .../test/codemaker/codemakertests/assert.hpp | 50 ++ .../test/codemaker/codemakertests/break.hpp | 50 ++ .../test/codemaker/codemakertests/catch.hpp | 50 ++ .../test/codemaker/codemakertests/class.hpp | 50 ++ .../codemaker/codemakertests/continue.hpp | 50 ++ .../test/codemaker/codemakertests/do.hpp | 50 ++ .../test/codemaker/codemakertests/else.hpp | 50 ++ .../codemakertests/exceptions/MyBaseError.hdl | 46 ++ .../codemakertests/exceptions/MyBaseError.hpp | 80 +++ .../codemakertests/exceptions/SimpleError.hdl | 42 ++ .../codemakertests/exceptions/SimpleError.hpp | 66 +++ .../test/codemaker/codemakertests/extends.hpp | 50 ++ .../test/codemaker/codemakertests/final.hpp | 50 ++ .../test/codemaker/codemakertests/finally.hpp | 50 ++ .../test/codemaker/codemakertests/for.hpp | 50 ++ .../test/codemaker/codemakertests/goto.hpp | 50 ++ .../test/codemaker/codemakertests/if.hpp | 50 ++ .../codemaker/codemakertests/implements.hpp | 50 ++ .../test/codemaker/codemakertests/import.hpp | 50 ++ .../codemaker/codemakertests/instanceof.hpp | 50 ++ .../test/codemaker/codemakertests/int.hpp | 50 ++ .../test/codemaker/codemakertests/native.hpp | 50 ++ .../test/codemaker/codemakertests/new.hpp | 50 ++ .../test/codemaker/codemakertests/package.hpp | 50 ++ .../test/codemaker/codemakertests/private.hpp | 50 ++ .../codemaker/codemakertests/protected.hpp | 50 ++ .../test/codemaker/codemakertests/public.hpp | 50 ++ .../test/codemaker/codemakertests/return.hpp | 50 ++ .../codemakertests/services/abstract.hpp | 67 +++ .../codemakertests/services/assert.hpp | 67 +++ .../codemakertests/services/break.hpp | 67 +++ .../codemakertests/services/catch.hpp | 67 +++ .../codemakertests/services/class.hpp | 67 +++ .../codemakertests/services/continue.hpp | 67 +++ .../codemaker/codemakertests/services/do.hpp | 67 +++ .../codemakertests/services/else.hpp | 67 +++ .../codemakertests/services/extends.hpp | 67 +++ .../codemakertests/services/final.hpp | 67 +++ .../codemakertests/services/finally.hpp | 67 +++ .../codemaker/codemakertests/services/for.hpp | 67 +++ .../codemakertests/services/goto.hpp | 67 +++ .../codemaker/codemakertests/services/if.hpp | 67 +++ .../codemakertests/services/implements.hpp | 67 +++ .../codemakertests/services/import.hpp | 67 +++ .../codemakertests/services/instanceof.hpp | 67 +++ .../codemaker/codemakertests/services/int.hpp | 67 +++ .../codemakertests/services/native.hpp | 67 +++ .../codemaker/codemakertests/services/new.hpp | 67 +++ .../codemakertests/services/package.hpp | 67 +++ .../codemakertests/services/private.hpp | 67 +++ .../codemakertests/services/protected.hpp | 67 +++ .../codemakertests/services/public.hpp | 67 +++ .../codemakertests/services/return.hpp | 67 +++ .../codemakertests/services/static.hpp | 67 +++ .../codemakertests/services/strictfp.hpp | 67 +++ .../codemakertests/services/super.hpp | 67 +++ .../codemakertests/services/synchronized.hpp | 67 +++ .../codemakertests/services/this.hpp | 67 +++ .../codemakertests/services/throw.hpp | 67 +++ .../codemakertests/services/throws.hpp | 67 +++ .../codemaker/codemakertests/services/try.hpp | 67 +++ .../codemakertests/services/volatile.hpp | 67 +++ .../codemakertests/services/while.hpp | 67 +++ .../test/codemaker/codemakertests/static.hpp | 50 ++ .../codemaker/codemakertests/strictfp.hpp | 50 ++ .../test/codemaker/codemakertests/super.hpp | 50 ++ .../codemaker/codemakertests/synchronized.hpp | 50 ++ .../test/codemaker/codemakertests/this.hpp | 50 ++ .../test/codemaker/codemakertests/throw.hpp | 50 ++ .../test/codemaker/codemakertests/throws.hpp | 50 ++ .../test/codemaker/codemakertests/try.hpp | 50 ++ .../codemaker/codemakertests/volatile.hpp | 50 ++ .../test/codemaker/codemakertests/while.hpp | 50 ++ .../test/__init__.pyi | 0 .../test/codemaker/__init__.pyi | 0 .../test/codemaker/codemakertests}/Any.pyi | 0 .../codemaker/codemakertests}/Boolean.pyi | 0 .../test/codemaker/codemakertests}/Byte.pyi | 0 .../test/codemaker/codemakertests}/Char.pyi | 0 .../test/codemaker/codemakertests}/Double.pyi | 0 .../test/codemaker/codemakertests/Enum.pyi | 6 + .../test/codemaker/codemakertests}/Enum1.pyi | 0 .../test/codemaker/codemakertests}/Enum2.pyi | 0 .../test/codemaker/codemakertests}/Enum3.pyi | 0 .../test/codemaker/codemakertests}/Enum4.pyi | 0 .../test/codemaker/codemakertests}/Float.pyi | 0 .../test/codemaker/codemakertests}/Hyper.pyi | 0 .../test/codemaker/codemakertests}/Long.pyi | 0 .../codemaker/codemakertests}/PolyStruct.pyi | 0 .../test/codemaker/codemakertests/S1.pyi | 52 ++ .../test/codemaker/codemakertests}/S2.pyi | 4 +- .../test/codemaker/codemakertests}/S4.pyi | 4 +- .../codemaker/codemakertests}/SequenceAny.pyi | 0 .../codemakertests}/SequenceBoolean.pyi | 0 .../codemakertests}/SequenceByte.pyi | 0 .../codemakertests}/SequenceChar.pyi | 0 .../codemakertests}/SequenceDouble.pyi | 0 .../codemaker/codemakertests/SequenceEnum.pyi | 7 + .../codemakertests}/SequenceFloat.pyi | 0 .../codemakertests}/SequenceHyper.pyi | 0 .../codemakertests}/SequenceLong.pyi | 0 .../codemakertests}/SequenceShort.pyi | 0 .../codemakertests}/SequenceString.pyi | 0 .../codemakertests/SequenceStruct.pyi | 7 + .../codemakertests}/SequenceType.pyi | 0 .../codemakertests}/SequenceUnsignedHyper.pyi | 0 .../codemakertests}/SequenceUnsignedLong.pyi | 0 .../codemakertests}/SequenceUnsignedShort.pyi | 0 .../codemakertests}/SequenceXInterface.pyi | 0 .../SequenceXNamingService.pyi | 0 .../codemaker/codemakertests}/Service.pyi | 0 .../test/codemaker/codemakertests}/Short.pyi | 0 .../test/codemaker/codemakertests}/String.pyi | 0 .../test/codemaker/codemakertests/Struct.pyi | 6 + .../codemaker/codemakertests}/Struct1.pyi | 0 .../test/codemaker/codemakertests/Struct2.pyi | 105 ++++ .../codemakertests}/TestConstantsBasic.pyi | 0 .../test/codemaker/codemakertests}/Type.pyi | 0 .../codemakertests}/UnsignedHyper.pyi | 0 .../codemakertests}/UnsignedLong.pyi | 0 .../codemakertests}/UnsignedShort.pyi | 0 .../test/codemaker/codemakertests}/XIfc.pyi | 6 +- .../codemaker/codemakertests}/XInterface.pyi | 0 .../codemakertests}/XNamingService.pyi | 0 .../test/codemaker/codemakertests}/XTest.pyi | 0 .../codemaker/codemakertests}/__init__.pyi | 0 .../codemaker/codemakertests}/abstract.pyi | 0 .../test/codemaker/codemakertests}/assert.pyi | 0 .../test/codemaker/codemakertests}/break.pyi | 0 .../test/codemaker/codemakertests}/catch.pyi | 0 .../test/codemaker/codemakertests}/class.pyi | 0 .../codemaker/codemakertests}/continue.pyi | 0 .../test/codemaker/codemakertests}/do.pyi | 0 .../test/codemaker/codemakertests}/else.pyi | 0 .../exceptions/MyBaseError.pyi | 0 .../exceptions/SimpleError.pyi | 0 .../codemakertests}/exceptions/__init__.pyi | 0 .../codemaker/codemakertests}/extends.pyi | 0 .../test/codemaker/codemakertests}/final.pyi | 0 .../codemaker/codemakertests}/finally.pyi | 0 .../test/codemaker/codemakertests}/for.pyi | 0 .../test/codemaker/codemakertests}/goto.pyi | 0 .../test/codemaker/codemakertests}/if.pyi | 0 .../codemaker/codemakertests}/implements.pyi | 0 .../test/codemaker/codemakertests}/import.pyi | 0 .../codemaker/codemakertests}/instanceof.pyi | 0 .../test/codemaker/codemakertests}/int.pyi | 0 .../test/codemaker/codemakertests}/native.pyi | 0 .../test/codemaker/codemakertests}/new.pyi | 0 .../codemaker/codemakertests}/package.pyi | 0 .../codemaker/codemakertests}/private.pyi | 0 .../codemaker/codemakertests}/protected.pyi | 0 .../test/codemaker/codemakertests}/public.pyi | 0 .../test/codemaker/codemakertests}/return.pyi | 0 .../codemakertests}/services/__init__.pyi | 0 .../codemakertests}/services/abstract.pyi | 0 .../codemakertests}/services/assert.pyi | 0 .../codemakertests}/services/break.pyi | 0 .../codemakertests}/services/catch.pyi | 0 .../codemakertests}/services/class.pyi | 0 .../codemakertests}/services/continue.pyi | 0 .../codemaker/codemakertests}/services/do.pyi | 0 .../codemakertests}/services/else.pyi | 0 .../codemakertests}/services/extends.pyi | 0 .../codemakertests}/services/final.pyi | 0 .../codemakertests}/services/finally.pyi | 0 .../codemakertests}/services/for.pyi | 0 .../codemakertests}/services/goto.pyi | 0 .../codemaker/codemakertests}/services/if.pyi | 0 .../codemakertests}/services/implements.pyi | 0 .../codemakertests}/services/import.pyi | 0 .../codemakertests}/services/instanceof.pyi | 0 .../codemakertests}/services/int.pyi | 0 .../codemakertests}/services/native.pyi | 0 .../codemakertests}/services/new.pyi | 0 .../codemakertests}/services/package.pyi | 0 .../codemakertests}/services/private.pyi | 0 .../codemakertests}/services/protected.pyi | 0 .../codemakertests}/services/public.pyi | 0 .../codemakertests}/services/return.pyi | 0 .../codemakertests}/services/static.pyi | 0 .../codemakertests}/services/strictfp.pyi | 0 .../codemakertests}/services/super.pyi | 0 .../codemakertests}/services/synchronized.pyi | 0 .../codemakertests}/services/this.pyi | 0 .../codemakertests}/services/throw.pyi | 0 .../codemakertests}/services/throws.pyi | 0 .../codemakertests}/services/try.pyi | 0 .../codemakertests}/services/volatile.pyi | 0 .../codemakertests}/services/while.pyi | 0 .../test/codemaker/codemakertests}/static.pyi | 0 .../codemaker/codemakertests}/strictfp.pyi | 0 .../test/codemaker/codemakertests}/super.pyi | 0 .../codemakertests}/synchronized.pyi | 0 .../test/codemaker/codemakertests}/this.pyi | 0 .../test/codemaker/codemakertests}/throw.pyi | 0 .../test/codemaker/codemakertests}/throws.pyi | 0 .../test/codemaker/codemakertests}/try.pyi | 0 .../codemaker/codemakertests}/volatile.pyi | 0 .../test/codemaker/codemakertests}/while.pyi | 0 codemaker/tests/pythonmaker/README.md | 71 --- .../test/codemaker/pythonmaker/Enum.pyi | 6 - .../test/codemaker/pythonmaker/S1.pyi | 52 -- .../codemaker/pythonmaker/SequenceEnum.pyi | 7 - .../codemaker/pythonmaker/SequenceStruct.pyi | 7 - .../test/codemaker/pythonmaker/Struct.pyi | 6 - .../test/codemaker/pythonmaker/Struct2.pyi | 105 ---- .../tests/pythonmaker/test_pythonmaker.py | 246 ---------- .../idl/pythontypes.idl => tests.idl} | 7 +- 311 files changed, 7535 insertions(+), 529 deletions(-) delete mode 100644 codemaker/PythonTest_codemaker_python.mk create mode 100644 codemaker/Test_codemaker.mk create mode 100644 codemaker/tests/Readme.md create mode 100644 codemaker/tests/codemakertests.py create mode 100644 codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/Any.hdl create mode 100644 codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/Any.hpp create mode 100644 codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/Boolean.hdl create mode 100644 codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/Boolean.hpp create mode 100644 codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/Byte.hdl create mode 100644 codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/Byte.hpp create mode 100644 codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/Char.hdl create mode 100644 codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/Char.hpp create mode 100644 codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/Double.hdl create mode 100644 codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/Double.hpp create mode 100644 codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/Enum.hdl create mode 100644 codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/Enum.hpp create mode 100644 codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/Enum1.hdl create mode 100644 codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/Enum1.hpp create mode 100644 codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/Enum2.hdl create mode 100644 codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/Enum2.hpp create mode 100644 codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/Enum3.hdl create mode 100644 codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/Enum3.hpp create mode 100644 codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/Enum4.hdl create mode 100644 codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/Enum4.hpp create mode 100644 codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/Float.hdl create mode 100644 codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/Float.hpp create mode 100644 codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/Hyper.hdl create mode 100644 codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/Hyper.hpp create mode 100644 codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/Long.hdl create mode 100644 codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/Long.hpp create mode 100644 codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/PolyStruct.hdl create mode 100644 codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/PolyStruct.hpp create mode 100644 codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/S1.hpp create mode 100644 codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/S2.hpp create mode 100644 codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/S4.hpp create mode 100644 codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/SequenceAny.hdl create mode 100644 codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/SequenceAny.hpp create mode 100644 codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/SequenceBoolean.hdl create mode 100644 codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/SequenceBoolean.hpp create mode 100644 codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/SequenceByte.hdl create mode 100644 codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/SequenceByte.hpp create mode 100644 codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/SequenceChar.hdl create mode 100644 codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/SequenceChar.hpp create mode 100644 codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/SequenceDouble.hdl create mode 100644 codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/SequenceDouble.hpp create mode 100644 codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/SequenceEnum.hdl create mode 100644 codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/SequenceEnum.hpp create mode 100644 codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/SequenceFloat.hdl create mode 100644 codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/SequenceFloat.hpp create mode 100644 codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/SequenceHyper.hdl create mode 100644 codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/SequenceHyper.hpp create mode 100644 codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/SequenceLong.hdl create mode 100644 codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/SequenceLong.hpp create mode 100644 codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/SequenceShort.hdl create mode 100644 codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/SequenceShort.hpp create mode 100644 codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/SequenceString.hdl create mode 100644 codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/SequenceString.hpp create mode 100644 codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/SequenceStruct.hdl create mode 100644 codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/SequenceStruct.hpp create mode 100644 codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/SequenceType.hdl create mode 100644 codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/SequenceType.hpp create mode 100644 codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/SequenceUnsignedHyper.hdl create mode 100644 codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/SequenceUnsignedHyper.hpp create mode 100644 codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/SequenceUnsignedLong.hdl create mode 100644 codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/SequenceUnsignedLong.hpp create mode 100644 codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/SequenceUnsignedShort.hdl create mode 100644 codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/SequenceUnsignedShort.hpp create mode 100644 codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/SequenceXInterface.hdl create mode 100644 codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/SequenceXInterface.hpp create mode 100644 codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/SequenceXNamingService.hdl create mode 100644 codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/SequenceXNamingService.hpp create mode 100644 codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/Service.hpp create mode 100644 codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/Short.hdl create mode 100644 codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/Short.hpp create mode 100644 codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/String.hdl create mode 100644 codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/String.hpp create mode 100644 codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/Struct.hdl create mode 100644 codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/Struct.hpp create mode 100644 codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/Struct1.hdl create mode 100644 codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/Struct1.hpp create mode 100644 codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/Struct2.hdl create mode 100644 codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/Struct2.hpp create mode 100644 codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/TestConstantsBasic.hdl create mode 100644 codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/TestConstantsBasic.hpp create mode 100644 codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/Type.hdl create mode 100644 codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/Type.hpp create mode 100644 codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/UnsignedHyper.hdl create mode 100644 codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/UnsignedHyper.hpp create mode 100644 codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/UnsignedLong.hdl create mode 100644 codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/UnsignedLong.hpp create mode 100644 codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/UnsignedShort.hdl create mode 100644 codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/UnsignedShort.hpp create mode 100644 codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/XIfc.hdl create mode 100644 codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/XIfc.hpp create mode 100644 codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/XInterface.hdl create mode 100644 codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/XInterface.hpp create mode 100644 codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/XNamingService.hdl create mode 100644 codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/XNamingService.hpp create mode 100644 codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/XTest.hdl create mode 100644 codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/XTest.hpp create mode 100644 codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/abstract.hpp create mode 100644 codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/assert.hpp create mode 100644 codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/break.hpp create mode 100644 codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/catch.hpp create mode 100644 codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/class.hpp create mode 100644 codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/continue.hpp create mode 100644 codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/do.hpp create mode 100644 codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/else.hpp create mode 100644 codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/exceptions/MyBaseError.hdl create mode 100644 codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/exceptions/MyBaseError.hpp create mode 100644 codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/exceptions/SimpleError.hdl create mode 100644 codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/exceptions/SimpleError.hpp create mode 100644 codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/extends.hpp create mode 100644 codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/final.hpp create mode 100644 codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/finally.hpp create mode 100644 codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/for.hpp create mode 100644 codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/goto.hpp create mode 100644 codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/if.hpp create mode 100644 codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/implements.hpp create mode 100644 codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/import.hpp create mode 100644 codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/instanceof.hpp create mode 100644 codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/int.hpp create mode 100644 codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/native.hpp create mode 100644 codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/new.hpp create mode 100644 codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/package.hpp create mode 100644 codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/private.hpp create mode 100644 codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/protected.hpp create mode 100644 codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/public.hpp create mode 100644 codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/return.hpp create mode 100644 codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/services/abstract.hpp create mode 100644 codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/services/assert.hpp create mode 100644 codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/services/break.hpp create mode 100644 codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/services/catch.hpp create mode 100644 codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/services/class.hpp create mode 100644 codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/services/continue.hpp create mode 100644 codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/services/do.hpp create mode 100644 codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/services/else.hpp create mode 100644 codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/services/extends.hpp create mode 100644 codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/services/final.hpp create mode 100644 codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/services/finally.hpp create mode 100644 codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/services/for.hpp create mode 100644 codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/services/goto.hpp create mode 100644 codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/services/if.hpp create mode 100644 codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/services/implements.hpp create mode 100644 codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/services/import.hpp create mode 100644 codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/services/instanceof.hpp create mode 100644 codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/services/int.hpp create mode 100644 codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/services/native.hpp create mode 100644 codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/services/new.hpp create mode 100644 codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/services/package.hpp create mode 100644 codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/services/private.hpp create mode 100644 codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/services/protected.hpp create mode 100644 codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/services/public.hpp create mode 100644 codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/services/return.hpp create mode 100644 codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/services/static.hpp create mode 100644 codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/services/strictfp.hpp create mode 100644 codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/services/super.hpp create mode 100644 codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/services/synchronized.hpp create mode 100644 codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/services/this.hpp create mode 100644 codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/services/throw.hpp create mode 100644 codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/services/throws.hpp create mode 100644 codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/services/try.hpp create mode 100644 codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/services/volatile.hpp create mode 100644 codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/services/while.hpp create mode 100644 codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/static.hpp create mode 100644 codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/strictfp.hpp create mode 100644 codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/super.hpp create mode 100644 codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/synchronized.hpp create mode 100644 codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/this.hpp create mode 100644 codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/throw.hpp create mode 100644 codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/throws.hpp create mode 100644 codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/try.hpp create mode 100644 codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/volatile.hpp create mode 100644 codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/while.hpp rename codemaker/tests/{pythonmaker/expected_pyi_stubs => expected_pythonmaker_stubs}/test/__init__.pyi (100%) rename codemaker/tests/{pythonmaker/expected_pyi_stubs => expected_pythonmaker_stubs}/test/codemaker/__init__.pyi (100%) rename codemaker/tests/{pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker => expected_pythonmaker_stubs/test/codemaker/codemakertests}/Any.pyi (100%) rename codemaker/tests/{pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker => expected_pythonmaker_stubs/test/codemaker/codemakertests}/Boolean.pyi (100%) rename codemaker/tests/{pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker => expected_pythonmaker_stubs/test/codemaker/codemakertests}/Byte.pyi (100%) rename codemaker/tests/{pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker => expected_pythonmaker_stubs/test/codemaker/codemakertests}/Char.pyi (100%) rename codemaker/tests/{pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker => expected_pythonmaker_stubs/test/codemaker/codemakertests}/Double.pyi (100%) create mode 100644 codemaker/tests/expected_pythonmaker_stubs/test/codemaker/codemakertests/Enum.pyi rename codemaker/tests/{pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker => expected_pythonmaker_stubs/test/codemaker/codemakertests}/Enum1.pyi (100%) rename codemaker/tests/{pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker => expected_pythonmaker_stubs/test/codemaker/codemakertests}/Enum2.pyi (100%) rename codemaker/tests/{pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker => expected_pythonmaker_stubs/test/codemaker/codemakertests}/Enum3.pyi (100%) rename codemaker/tests/{pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker => expected_pythonmaker_stubs/test/codemaker/codemakertests}/Enum4.pyi (100%) rename codemaker/tests/{pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker => expected_pythonmaker_stubs/test/codemaker/codemakertests}/Float.pyi (100%) rename codemaker/tests/{pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker => expected_pythonmaker_stubs/test/codemaker/codemakertests}/Hyper.pyi (100%) rename codemaker/tests/{pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker => expected_pythonmaker_stubs/test/codemaker/codemakertests}/Long.pyi (100%) rename codemaker/tests/{pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker => expected_pythonmaker_stubs/test/codemaker/codemakertests}/PolyStruct.pyi (100%) create mode 100644 codemaker/tests/expected_pythonmaker_stubs/test/codemaker/codemakertests/S1.pyi rename codemaker/tests/{pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker => expected_pythonmaker_stubs/test/codemaker/codemakertests}/S2.pyi (69%) rename codemaker/tests/{pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker => expected_pythonmaker_stubs/test/codemaker/codemakertests}/S4.pyi (79%) rename codemaker/tests/{pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker => expected_pythonmaker_stubs/test/codemaker/codemakertests}/SequenceAny.pyi (100%) rename codemaker/tests/{pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker => expected_pythonmaker_stubs/test/codemaker/codemakertests}/SequenceBoolean.pyi (100%) rename codemaker/tests/{pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker => expected_pythonmaker_stubs/test/codemaker/codemakertests}/SequenceByte.pyi (100%) rename codemaker/tests/{pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker => expected_pythonmaker_stubs/test/codemaker/codemakertests}/SequenceChar.pyi (100%) rename codemaker/tests/{pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker => expected_pythonmaker_stubs/test/codemaker/codemakertests}/SequenceDouble.pyi (100%) create mode 100644 codemaker/tests/expected_pythonmaker_stubs/test/codemaker/codemakertests/SequenceEnum.pyi rename codemaker/tests/{pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker => expected_pythonmaker_stubs/test/codemaker/codemakertests}/SequenceFloat.pyi (100%) rename codemaker/tests/{pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker => expected_pythonmaker_stubs/test/codemaker/codemakertests}/SequenceHyper.pyi (100%) rename codemaker/tests/{pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker => expected_pythonmaker_stubs/test/codemaker/codemakertests}/SequenceLong.pyi (100%) rename codemaker/tests/{pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker => expected_pythonmaker_stubs/test/codemaker/codemakertests}/SequenceShort.pyi (100%) rename codemaker/tests/{pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker => expected_pythonmaker_stubs/test/codemaker/codemakertests}/SequenceString.pyi (100%) create mode 100644 codemaker/tests/expected_pythonmaker_stubs/test/codemaker/codemakertests/SequenceStruct.pyi rename codemaker/tests/{pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker => expected_pythonmaker_stubs/test/codemaker/codemakertests}/SequenceType.pyi (100%) rename codemaker/tests/{pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker => expected_pythonmaker_stubs/test/codemaker/codemakertests}/SequenceUnsignedHyper.pyi (100%) rename codemaker/tests/{pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker => expected_pythonmaker_stubs/test/codemaker/codemakertests}/SequenceUnsignedLong.pyi (100%) rename codemaker/tests/{pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker => expected_pythonmaker_stubs/test/codemaker/codemakertests}/SequenceUnsignedShort.pyi (100%) rename codemaker/tests/{pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker => expected_pythonmaker_stubs/test/codemaker/codemakertests}/SequenceXInterface.pyi (100%) rename codemaker/tests/{pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker => expected_pythonmaker_stubs/test/codemaker/codemakertests}/SequenceXNamingService.pyi (100%) rename codemaker/tests/{pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker => expected_pythonmaker_stubs/test/codemaker/codemakertests}/Service.pyi (100%) rename codemaker/tests/{pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker => expected_pythonmaker_stubs/test/codemaker/codemakertests}/Short.pyi (100%) rename codemaker/tests/{pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker => expected_pythonmaker_stubs/test/codemaker/codemakertests}/String.pyi (100%) create mode 100644 codemaker/tests/expected_pythonmaker_stubs/test/codemaker/codemakertests/Struct.pyi rename codemaker/tests/{pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker => expected_pythonmaker_stubs/test/codemaker/codemakertests}/Struct1.pyi (100%) create mode 100644 codemaker/tests/expected_pythonmaker_stubs/test/codemaker/codemakertests/Struct2.pyi rename codemaker/tests/{pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker => expected_pythonmaker_stubs/test/codemaker/codemakertests}/TestConstantsBasic.pyi (100%) rename codemaker/tests/{pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker => expected_pythonmaker_stubs/test/codemaker/codemakertests}/Type.pyi (100%) rename codemaker/tests/{pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker => expected_pythonmaker_stubs/test/codemaker/codemakertests}/UnsignedHyper.pyi (100%) rename codemaker/tests/{pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker => expected_pythonmaker_stubs/test/codemaker/codemakertests}/UnsignedLong.pyi (100%) rename codemaker/tests/{pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker => expected_pythonmaker_stubs/test/codemaker/codemakertests}/UnsignedShort.pyi (100%) rename codemaker/tests/{pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker => expected_pythonmaker_stubs/test/codemaker/codemakertests}/XIfc.pyi (52%) rename codemaker/tests/{pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker => expected_pythonmaker_stubs/test/codemaker/codemakertests}/XInterface.pyi (100%) rename codemaker/tests/{pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker => expected_pythonmaker_stubs/test/codemaker/codemakertests}/XNamingService.pyi (100%) rename codemaker/tests/{pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker => expected_pythonmaker_stubs/test/codemaker/codemakertests}/XTest.pyi (100%) rename codemaker/tests/{pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker => expected_pythonmaker_stubs/test/codemaker/codemakertests}/__init__.pyi (100%) rename codemaker/tests/{pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker => expected_pythonmaker_stubs/test/codemaker/codemakertests}/abstract.pyi (100%) rename codemaker/tests/{pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker => expected_pythonmaker_stubs/test/codemaker/codemakertests}/assert.pyi (100%) rename codemaker/tests/{pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker => expected_pythonmaker_stubs/test/codemaker/codemakertests}/break.pyi (100%) rename codemaker/tests/{pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker => expected_pythonmaker_stubs/test/codemaker/codemakertests}/catch.pyi (100%) rename codemaker/tests/{pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker => expected_pythonmaker_stubs/test/codemaker/codemakertests}/class.pyi (100%) rename codemaker/tests/{pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker => expected_pythonmaker_stubs/test/codemaker/codemakertests}/continue.pyi (100%) rename codemaker/tests/{pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker => expected_pythonmaker_stubs/test/codemaker/codemakertests}/do.pyi (100%) rename codemaker/tests/{pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker => expected_pythonmaker_stubs/test/codemaker/codemakertests}/else.pyi (100%) rename codemaker/tests/{pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker => expected_pythonmaker_stubs/test/codemaker/codemakertests}/exceptions/MyBaseError.pyi (100%) rename codemaker/tests/{pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker => expected_pythonmaker_stubs/test/codemaker/codemakertests}/exceptions/SimpleError.pyi (100%) rename codemaker/tests/{pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker => expected_pythonmaker_stubs/test/codemaker/codemakertests}/exceptions/__init__.pyi (100%) rename codemaker/tests/{pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker => expected_pythonmaker_stubs/test/codemaker/codemakertests}/extends.pyi (100%) rename codemaker/tests/{pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker => expected_pythonmaker_stubs/test/codemaker/codemakertests}/final.pyi (100%) rename codemaker/tests/{pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker => expected_pythonmaker_stubs/test/codemaker/codemakertests}/finally.pyi (100%) rename codemaker/tests/{pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker => expected_pythonmaker_stubs/test/codemaker/codemakertests}/for.pyi (100%) rename codemaker/tests/{pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker => expected_pythonmaker_stubs/test/codemaker/codemakertests}/goto.pyi (100%) rename codemaker/tests/{pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker => expected_pythonmaker_stubs/test/codemaker/codemakertests}/if.pyi (100%) rename codemaker/tests/{pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker => expected_pythonmaker_stubs/test/codemaker/codemakertests}/implements.pyi (100%) rename codemaker/tests/{pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker => expected_pythonmaker_stubs/test/codemaker/codemakertests}/import.pyi (100%) rename codemaker/tests/{pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker => expected_pythonmaker_stubs/test/codemaker/codemakertests}/instanceof.pyi (100%) rename codemaker/tests/{pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker => expected_pythonmaker_stubs/test/codemaker/codemakertests}/int.pyi (100%) rename codemaker/tests/{pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker => expected_pythonmaker_stubs/test/codemaker/codemakertests}/native.pyi (100%) rename codemaker/tests/{pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker => expected_pythonmaker_stubs/test/codemaker/codemakertests}/new.pyi (100%) rename codemaker/tests/{pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker => expected_pythonmaker_stubs/test/codemaker/codemakertests}/package.pyi (100%) rename codemaker/tests/{pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker => expected_pythonmaker_stubs/test/codemaker/codemakertests}/private.pyi (100%) rename codemaker/tests/{pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker => expected_pythonmaker_stubs/test/codemaker/codemakertests}/protected.pyi (100%) rename codemaker/tests/{pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker => expected_pythonmaker_stubs/test/codemaker/codemakertests}/public.pyi (100%) rename codemaker/tests/{pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker => expected_pythonmaker_stubs/test/codemaker/codemakertests}/return.pyi (100%) rename codemaker/tests/{pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker => expected_pythonmaker_stubs/test/codemaker/codemakertests}/services/__init__.pyi (100%) rename codemaker/tests/{pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker => expected_pythonmaker_stubs/test/codemaker/codemakertests}/services/abstract.pyi (100%) rename codemaker/tests/{pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker => expected_pythonmaker_stubs/test/codemaker/codemakertests}/services/assert.pyi (100%) rename codemaker/tests/{pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker => expected_pythonmaker_stubs/test/codemaker/codemakertests}/services/break.pyi (100%) rename codemaker/tests/{pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker => expected_pythonmaker_stubs/test/codemaker/codemakertests}/services/catch.pyi (100%) rename codemaker/tests/{pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker => expected_pythonmaker_stubs/test/codemaker/codemakertests}/services/class.pyi (100%) rename codemaker/tests/{pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker => expected_pythonmaker_stubs/test/codemaker/codemakertests}/services/continue.pyi (100%) rename codemaker/tests/{pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker => expected_pythonmaker_stubs/test/codemaker/codemakertests}/services/do.pyi (100%) rename codemaker/tests/{pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker => expected_pythonmaker_stubs/test/codemaker/codemakertests}/services/else.pyi (100%) rename codemaker/tests/{pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker => expected_pythonmaker_stubs/test/codemaker/codemakertests}/services/extends.pyi (100%) rename codemaker/tests/{pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker => expected_pythonmaker_stubs/test/codemaker/codemakertests}/services/final.pyi (100%) rename codemaker/tests/{pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker => expected_pythonmaker_stubs/test/codemaker/codemakertests}/services/finally.pyi (100%) rename codemaker/tests/{pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker => expected_pythonmaker_stubs/test/codemaker/codemakertests}/services/for.pyi (100%) rename codemaker/tests/{pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker => expected_pythonmaker_stubs/test/codemaker/codemakertests}/services/goto.pyi (100%) rename codemaker/tests/{pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker => expected_pythonmaker_stubs/test/codemaker/codemakertests}/services/if.pyi (100%) rename codemaker/tests/{pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker => expected_pythonmaker_stubs/test/codemaker/codemakertests}/services/implements.pyi (100%) rename codemaker/tests/{pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker => expected_pythonmaker_stubs/test/codemaker/codemakertests}/services/import.pyi (100%) rename codemaker/tests/{pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker => expected_pythonmaker_stubs/test/codemaker/codemakertests}/services/instanceof.pyi (100%) rename codemaker/tests/{pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker => expected_pythonmaker_stubs/test/codemaker/codemakertests}/services/int.pyi (100%) rename codemaker/tests/{pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker => expected_pythonmaker_stubs/test/codemaker/codemakertests}/services/native.pyi (100%) rename codemaker/tests/{pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker => expected_pythonmaker_stubs/test/codemaker/codemakertests}/services/new.pyi (100%) rename codemaker/tests/{pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker => expected_pythonmaker_stubs/test/codemaker/codemakertests}/services/package.pyi (100%) rename codemaker/tests/{pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker => expected_pythonmaker_stubs/test/codemaker/codemakertests}/services/private.pyi (100%) rename codemaker/tests/{pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker => expected_pythonmaker_stubs/test/codemaker/codemakertests}/services/protected.pyi (100%) rename codemaker/tests/{pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker => expected_pythonmaker_stubs/test/codemaker/codemakertests}/services/public.pyi (100%) rename codemaker/tests/{pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker => expected_pythonmaker_stubs/test/codemaker/codemakertests}/services/return.pyi (100%) rename codemaker/tests/{pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker => expected_pythonmaker_stubs/test/codemaker/codemakertests}/services/static.pyi (100%) rename codemaker/tests/{pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker => expected_pythonmaker_stubs/test/codemaker/codemakertests}/services/strictfp.pyi (100%) rename codemaker/tests/{pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker => expected_pythonmaker_stubs/test/codemaker/codemakertests}/services/super.pyi (100%) rename codemaker/tests/{pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker => expected_pythonmaker_stubs/test/codemaker/codemakertests}/services/synchronized.pyi (100%) rename codemaker/tests/{pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker => expected_pythonmaker_stubs/test/codemaker/codemakertests}/services/this.pyi (100%) rename codemaker/tests/{pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker => expected_pythonmaker_stubs/test/codemaker/codemakertests}/services/throw.pyi (100%) rename codemaker/tests/{pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker => expected_pythonmaker_stubs/test/codemaker/codemakertests}/services/throws.pyi (100%) rename codemaker/tests/{pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker => expected_pythonmaker_stubs/test/codemaker/codemakertests}/services/try.pyi (100%) rename codemaker/tests/{pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker => expected_pythonmaker_stubs/test/codemaker/codemakertests}/services/volatile.pyi (100%) rename codemaker/tests/{pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker => expected_pythonmaker_stubs/test/codemaker/codemakertests}/services/while.pyi (100%) rename codemaker/tests/{pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker => expected_pythonmaker_stubs/test/codemaker/codemakertests}/static.pyi (100%) rename codemaker/tests/{pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker => expected_pythonmaker_stubs/test/codemaker/codemakertests}/strictfp.pyi (100%) rename codemaker/tests/{pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker => expected_pythonmaker_stubs/test/codemaker/codemakertests}/super.pyi (100%) rename codemaker/tests/{pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker => expected_pythonmaker_stubs/test/codemaker/codemakertests}/synchronized.pyi (100%) rename codemaker/tests/{pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker => expected_pythonmaker_stubs/test/codemaker/codemakertests}/this.pyi (100%) rename codemaker/tests/{pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker => expected_pythonmaker_stubs/test/codemaker/codemakertests}/throw.pyi (100%) rename codemaker/tests/{pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker => expected_pythonmaker_stubs/test/codemaker/codemakertests}/throws.pyi (100%) rename codemaker/tests/{pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker => expected_pythonmaker_stubs/test/codemaker/codemakertests}/try.pyi (100%) rename codemaker/tests/{pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker => expected_pythonmaker_stubs/test/codemaker/codemakertests}/volatile.pyi (100%) rename codemaker/tests/{pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker => expected_pythonmaker_stubs/test/codemaker/codemakertests}/while.pyi (100%) delete mode 100644 codemaker/tests/pythonmaker/README.md delete mode 100644 codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/Enum.pyi delete mode 100644 codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/S1.pyi delete mode 100644 codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/SequenceEnum.pyi delete mode 100644 codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/SequenceStruct.pyi delete mode 100644 codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/Struct.pyi delete mode 100644 codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/Struct2.pyi delete mode 100644 codemaker/tests/pythonmaker/test_pythonmaker.py rename codemaker/tests/{pythonmaker/idl/pythontypes.idl => tests.idl} (99%) diff --git a/codemaker/Module_codemaker.mk b/codemaker/Module_codemaker.mk index 33df554c3d48..17f60623c959 100644 --- a/codemaker/Module_codemaker.mk +++ b/codemaker/Module_codemaker.mk @@ -24,7 +24,7 @@ $(eval $(call gb_Module_add_targets,codemaker,\ endif $(eval $(call gb_Module_add_check_targets,codemaker,\ - PythonTest_codemaker_python \ + Test_codemaker \ )) # vim:set noet sw=4 ts=4: diff --git a/codemaker/PythonTest_codemaker_python.mk b/codemaker/PythonTest_codemaker_python.mk deleted file mode 100644 index be453aa5eedf..000000000000 --- a/codemaker/PythonTest_codemaker_python.mk +++ /dev/null @@ -1,17 +0,0 @@ -# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*- -# -# This file is part of the LibreOffice project. -# -# This Source Code Form is subject to the terms of the Mozilla Public -# License, v. 2.0. If a copy of the MPL was not distributed with this -# file, You can obtain one at http://mozilla.org/MPL/2.0/. -# - -$(eval $(call gb_PythonTest_PythonTest,codemaker_python)) -$(eval $(call gb_PythonTest_add_modules,codemaker_python,$(SRCDIR)/codemaker/tests/pythonmaker,\ - test_pythonmaker \ -)) - -$(call gb_PythonTest_get_target,codemaker_python): $(call gb_Executable_get_target,pythonmaker) - -# vim: set noet sw=4 ts=4: diff --git a/codemaker/Test_codemaker.mk b/codemaker/Test_codemaker.mk new file mode 100644 index 000000000000..bc4a7cf69fb7 --- /dev/null +++ b/codemaker/Test_codemaker.mk @@ -0,0 +1,20 @@ +# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*- +# +# This file is part of the LibreOffice project. +# +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. +# + +# Golden-file tests for both cppumaker and pythonmaker (see README.md there) +$(eval $(call gb_PythonTest_PythonTest,codemaker)) +$(eval $(call gb_PythonTest_add_modules,codemaker,$(SRCDIR)/codemaker/tests,\ + codemakertests \ +)) + +$(call gb_PythonTest_get_target,codemaker): \ + $(call gb_Executable_get_target,cppumaker) \ + $(call gb_Executable_get_target,pythonmaker) + +# vim: set noet sw=4 ts=4: diff --git a/codemaker/tests/Readme.md b/codemaker/tests/Readme.md new file mode 100644 index 000000000000..e473616c87f6 --- /dev/null +++ b/codemaker/tests/Readme.md @@ -0,0 +1,94 @@ +# Codemaker Test Suite + +This directory contains the integration test suite for the UNO code generators `cppumaker` and `pythonmaker`. The suite ensures that: + +- `cppumaker` correctly generates C++ headers (`.hpp` and `.hdl`), and +- `pythonmaker` correctly generates Python stub files (`.pyi`) + +from the same UNO IDL definitions. It verifies the syntactic correctness of the output and protects against future regressions. + +The tests are automatically executed as part of the `make check` command for the `codemaker` module. They can also be run on their own with: + +```bash +make codemaker.check +``` + +## Testing Philosophy + +The test suite follows a "Golden File" testing methodology. This is a standard and robust approach for testing compilers and code generators. The process is as follows: + +1. **Source IDL:** A single comprehensive test IDL file (`tests.idl`) serves as the source of truth for all UNO constructs that the generators are expected to handle. Both tools are fed the same file. +2. **Generate Output:** During the test run, this IDL is compiled into a temporary `.rdb` file with `unoidl-write`, and each tool (`cppumaker`, `pythonmaker`) is executed to generate its output in its own temporary directory. +3. **Compare Against "Golden" Files:** The newly generated output is recursively compared against a set of manually verified, correct "golden" files: + - `expected_cppumaker_stubs/` for `cppumaker` + - `expected_pythonmaker_stubs/` for `pythonmaker` +4. **Pass/Fail:** A test passes only if the generated output is an exact match to the golden files. Any difference (missing files, extra files, or content mismatches) causes the test to fail. + +This approach ensures that any change to a generator that alters its output is immediately detected. + +## Directory Structure + +- `tests.idl`: The master IDL file containing all test cases. This includes enums, constants, typedefs, structs (plain, inherited, and polymorphic), exceptions, interfaces, services, and singletons. It also includes edge cases like the use of keywords as identifiers. All types live in the tool-neutral module `test::codemaker::codemakertests`, so the generated paths and namespaces (e.g. `test/codemaker/codemakertests/...`) are the same for both tools. +- `expected_cppumaker_stubs/`: The "golden" `.hpp` and `.hdl` file structure that `cppumaker` is expected to generate from `tests.idl`. This is the reference standard for correctness of `cppumaker`. +- `expected_pythonmaker_stubs/`: The "golden" `.pyi` file structure that `pythonmaker` is expected to generate from `tests.idl`. This is the reference standard for correctness of `pythonmaker`. +- `codemakertests.py`: The Python script that orchestrates the tests. It is executed by the build system and, for each tool, compiles the IDL, runs the tool, and compares the output directory with the matching golden directory. It contains one test class per tool (`TestCppuMaker`, `TestPythonMaker`) sharing a common implementation. +- `README.md`: This file. + +The gbuild makefile that integrates the script into `make check` is `codemaker/Test_codemaker.mk`, registered in `codemaker/Module_codemaker.mk`. It depends on both the `cppumaker` and `pythonmaker` executables. + +--- + +## How to Modify or Extend the Test Suite + +Future developers may need to modify these tests when fixing a bug or adding a new feature to either tool. Here is the standard workflow. + +### Regenerating the Golden Files + +Both golden directories are regenerated from `tests.idl` with the freshly built tools. Run the following from `instdir/program` (the tools need the libraries located there): + +```bash +mkdir -p ../../workdir/golden_tmp + +# 1. Compile the shared IDL to an .rdb +../sdk/bin/unoidl-write.exe ../../workdir/UnoApiTarget/udkapi.rdb ../../codemaker/tests/tests.idl ../../workdir/golden_tmp/tests.rdb + +# 2. Clear the old golden files +rm -rf ../../codemaker/tests/expected_cppumaker_stubs ../../codemaker/tests/expected_pythonmaker_stubs +mkdir -p ../../codemaker/tests/expected_cppumaker_stubs ../../codemaker/tests/expected_pythonmaker_stubs + +# 3. Generate the stubs straight into the golden directories +../sdk/bin/cppumaker.exe -O ../../codemaker/tests/expected_cppumaker_stubs ../../workdir/golden_tmp/tests.rdb -X ../../workdir/UnoApiTarget/udkapi.rdb +../sdk/bin/pythonmaker.exe -O ../../codemaker/tests/expected_pythonmaker_stubs ../../workdir/golden_tmp/tests.rdb -X ../../workdir/UnoApiTarget/udkapi.rdb + +# 4. Remove leftovers (the test ignores *.tmp files of pythonmaker) +find ../../codemaker/tests/expected_pythonmaker_stubs -name '*.tmp' -delete +rm -rf ../../workdir/golden_tmp +``` + +(On Linux/macOS, drop the `.exe` suffix; the SDK tools are in `instdir/sdk/bin`, or in the `LibreOffice*_SDK/bin` directory of the installation.) Only one of the two tools has to be regenerated if only one is affected; the other directory is left untouched. Always review the result with `git diff` before committing. + +### Scenario 1: Fixing a Bug in a Generator + +If you have fixed a bug that was causing a tool to generate incorrect output, the corresponding test should now fail because the new, correct output will not match the old, incorrect golden files. + +1. **Verify the Fix:** After fixing the C++ code of the tool, run `make codemaker.check` to confirm that the test fails as expected. The error output lists the differing files and shows the first difference. +2. **Regenerate the Golden Files:** Follow the steps in "Regenerating the Golden Files" above. +3. **Review the Changes:** Use `git diff` to confirm that only the intended differences appear in the golden files. +4. **Validate:** + - For `cppumaker`: ensure the new generated headers are syntactically correct and type-safe (often verified simply by checking that a full LibreOffice build succeeds with your new `cppumaker`). + - For `pythonmaker`: run `mypy --strict codemaker/tests/expected_pythonmaker_stubs/` to ensure the new golden files are syntactically correct and type-safe. +5. **Commit:** Commit the changes to the tool's C++ source code **along with** the updated golden files in your patch. The commit message should explain that the golden files were updated to reflect the bug fix. + +### Scenario 2: Adding a New Feature to a Generator + +If you add support for a new IDL feature (e.g., a new type or an annotation), you should add a test case for it. + +1. **Add a Test Case to the IDL:** + - Open `codemaker/tests/tests.idl`. + - Add a new, simple example of the feature you've implemented. For example, add a new `interface` with a specific attribute you are now supporting. +2. **Generate and Verify the New Golden Files:** + - Since you've added a new type, new output files will be generated. Regenerate the golden files as described above. Note that the IDL is shared, so a change to `tests.idl` may also change the output of the _other_ tool; review the golden files of both tools. + - Locate the newly generated files for your new test case. + - **Manually inspect these new files** to ensure they are 100% correct (valid C++ for `cppumaker`; run `mypy --strict` on them for `pythonmaker`). +3. **Run the Full Test Suite:** Run `make codemaker.check`. The tests should now pass, as the newly generated output will match your newly added golden files. +4. **Commit:** Commit the changes to the tool's source code, the updated `tests.idl`, and the new golden files together in your patch. diff --git a/codemaker/tests/codemakertests.py b/codemaker/tests/codemakertests.py new file mode 100644 index 000000000000..d93ba3a8b119 --- /dev/null +++ b/codemaker/tests/codemakertests.py @@ -0,0 +1,274 @@ +#! /usr/bin/env python +# -*- 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/. +# + +"""Golden-file tests for the codemaker tools (cppumaker and pythonmaker). + +Both tools are fed the same IDL (tests.idl). The IDL is compiled to a +temporary .rdb with unoidl-write, each tool is run on it, and the generated +output is compared byte-for-byte with the golden files stored next to this +script: + + expected_cppumaker_stubs/ <- golden output of cppumaker + expected_pythonmaker_stubs/ <- golden output of pythonmaker +""" +import filecmp +import difflib +import glob +import os +import shutil +import subprocess +import unittest + +from typing import TYPE_CHECKING, List, Optional, Set + +HERE: str = os.path.dirname(os.path.abspath(__file__)) + +if TYPE_CHECKING: + # For the type checker the mixin is a TestCase (so self.fail() etc. are + # known); at run time it stays a plain mixin, so unittest does not collect + # the shared base class as a test of its own. + _MixinBase = unittest.TestCase +else: + _MixinBase = object + + +class CodemakerGoldenTestMixin(_MixinBase): + """Shared logic for golden-file comparison of a codemaker tool. + + Subclasses must also derive from unittest.TestCase and set: + TOOL_NAME - executable name in the SDK (without suffix) + GOLDEN_DIRNAME - directory (next to this script) with the golden files + IS_OUTPUT_FILE - predicate deciding which generated files are compared + """ + + TOOL_NAME: str = "" + GOLDEN_DIRNAME: str = "" + + @staticmethod + def IS_OUTPUT_FILE(name: str) -> bool: # pragma: no cover - overridden + raise NotImplementedError + + def setUp(self) -> None: + # Build environment + self.srcdir: str = os.environ.get("SRCDIR", os.getcwd()) + self.builddir: str = os.environ.get("BUILDDIR", os.getcwd()) + self.instdir: str = os.environ.get( + "INSTDIR", os.path.join(self.builddir, "instdir") + ) + self.workdir: str = os.environ.get( + "WORKDIR", os.path.join(self.builddir, "workdir") + ) + + # SDK tools + self.unoidl_write: Optional[str] = None + self.tool: Optional[str] = None + + sdk_patterns: List[str] = [ + os.path.join(self.instdir, "sdk", "bin"), + os.path.join(self.instdir, "LibreOffice*_SDK", "bin"), + ] + exe_suffix: str = ".exe" if os.name == "nt" else "" + + for pattern in sdk_patterns: + for sdk_dir in glob.glob(pattern): + unoidl_path = os.path.join(sdk_dir, "unoidl-write" + exe_suffix) + tool_path = os.path.join(sdk_dir, self.TOOL_NAME + exe_suffix) + if os.path.exists(unoidl_path) and os.path.exists(tool_path): + self.unoidl_write = unoidl_path + self.tool = tool_path + break + if self.unoidl_write and self.tool: + break + + # Test paths + self.golden_dir: str = os.path.join(HERE, self.GOLDEN_DIRNAME) + self.idl_file: str = os.path.join(HERE, "tests.idl") + + self.test_workdir: str = os.path.join( + self.workdir, self.TOOL_NAME + "_test" + ) + os.makedirs(self.test_workdir, exist_ok=True) + + self.types_rdb: str = os.path.join( + self.workdir, "UnoApiTarget", "udkapi.rdb" + ) + self.temp_rdb: str = os.path.join(self.test_workdir, "temptest.rdb") + self.output_dir: str = os.path.join(self.test_workdir, "generated_stubs") + + def tearDown(self) -> None: + if os.path.exists(self.test_workdir): + shutil.rmtree(self.test_workdir, ignore_errors=True) + + # test + + def test_golden_comparison(self) -> None: + self.assertIsNotNone( + self.unoidl_write, "unoidl-write or %s not found in SDK" % self.TOOL_NAME + ) + self.assertIsNotNone(self.tool, "%s not found in SDK" % self.TOOL_NAME) + + assert self.unoidl_write is not None + assert self.tool is not None + + self.assertTrue( + os.path.exists(self.types_rdb), + "udkapi.rdb not found at: " + self.types_rdb, + ) + self.assertTrue( + os.path.exists(self.idl_file), + "IDL file not found at: " + self.idl_file, + ) + + self._convert_idl_to_rdb() + self._generate_stubs() + self._compare_with_expected_files() + + # helpers + + def _run(self, cmd: List[str], what: str) -> None: + try: + subprocess.run( + cmd, + cwd=self.test_workdir, + capture_output=True, + text=True, + check=True, + ) + except subprocess.CalledProcessError as e: + self.fail( + "Failed to %s:\n%s\nCommand: %s" + % (what, e.stderr or "", " ".join(cmd)) + ) + + def _convert_idl_to_rdb(self) -> None: + assert self.unoidl_write is not None + self._run( + [self.unoidl_write, self.types_rdb, self.idl_file, self.temp_rdb], + "convert IDL to RDB", + ) + self.assertTrue( + os.path.exists(self.temp_rdb), + "RDB file was not created by unoidl-write", + ) + + def _generate_stubs(self) -> None: + assert self.tool is not None + os.makedirs(self.output_dir, exist_ok=True) + self._run( + [self.tool, "-O", self.output_dir, self.temp_rdb, "-X", self.types_rdb], + "generate stubs with " + self.TOOL_NAME, + ) + self.assertGreater( + len(self._list_files(self.output_dir)), + 0, + self.TOOL_NAME + " produced no output files", + ) + + def _list_files(self, base: str) -> List[str]: + """Relative paths of all relevant files below base.""" + result: List[str] = [] + for root, _, files in os.walk(base): + for name in files: + if self.IS_OUTPUT_FILE(name): + result.append(os.path.relpath(os.path.join(root, name), base)) + return result + + def _compare_with_expected_files(self) -> None: + if not os.path.exists(self.golden_dir): + self.fail("Expected directory does not exist: " + self.golden_dir) + + expected_files: List[str] = self._list_files(self.golden_dir) + generated_files: List[str] = self._list_files(self.output_dir) + + expected_set: Set[str] = set(expected_files) + generated_set: Set[str] = set(generated_files) + + missing: Set[str] = expected_set - generated_set + extra: Set[str] = generated_set - expected_set + + if missing: + self.fail( + "Missing generated files (%d):\n %s" + % (len(missing), "\n ".join(sorted(missing))) + ) + if extra: + self.fail( + "Unexpected generated files (%d):\n %s" + % (len(extra), "\n ".join(sorted(extra))) + ) + + differences: List[str] = [ + rel + for rel in sorted(expected_files) + if not filecmp.cmp( + os.path.join(self.golden_dir, rel), + os.path.join(self.output_dir, rel), + shallow=False, + ) + ] + + if differences: + self.fail( + "File content differences found (%d):\n %s\n\n%s" + % ( + len(differences), + "\n ".join(differences), + self._diff_excerpt(differences[0]), + ) + ) + + def _diff_excerpt(self, rel_path: str, max_lines: int = 40) -> str: + """Short unified diff of the first differing file, to ease debugging.""" + + def read(path: str) -> List[str]: + with open(path, encoding="utf-8", errors="replace") as f: + return f.readlines() + + diff = list( + difflib.unified_diff( + read(os.path.join(self.golden_dir, rel_path)), + read(os.path.join(self.output_dir, rel_path)), + fromfile="expected/" + rel_path, + tofile="generated/" + rel_path, + ) + ) + text = "".join(diff[:max_lines]) + if len(diff) > max_lines: + text += "... (%d more diff lines)\n" % (len(diff) - max_lines) + return "First difference:\n" + text + + +class TestCppuMaker(CodemakerGoldenTestMixin, unittest.TestCase): + """cppumaker must generate exactly the golden .hpp/.hdl headers.""" + + TOOL_NAME = "cppumaker" + GOLDEN_DIRNAME = "expected_cppumaker_stubs" + + @staticmethod + def IS_OUTPUT_FILE(name: str) -> bool: + return name.lower().endswith((".hpp", ".hdl")) + + +class TestPythonMaker(CodemakerGoldenTestMixin, unittest.TestCase): + """pythonmaker must generate exactly the golden .pyi stubs.""" + + TOOL_NAME = "pythonmaker" + GOLDEN_DIRNAME = "expected_pythonmaker_stubs" + + @staticmethod + def IS_OUTPUT_FILE(name: str) -> bool: + # pythonmaker may leave temporary files behind; ignore them + return not name.lower().endswith(".tmp") + + +if __name__ == "__main__": + unittest.main() + +# vim: set shiftwidth=4 softtabstop=4 expandtab: diff --git a/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/Any.hdl b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/Any.hdl new file mode 100644 index 000000000000..bd7f8886ab1e --- /dev/null +++ b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/Any.hdl @@ -0,0 +1,12 @@ +#pragma once + +#include "sal/config.h" + +#include "com/sun/star/uno/Any.h" +#include "cppu/macros.hxx" + +namespace test { namespace codemaker { namespace codemakertests { + +typedef ::css::uno::Any Any; + +} } } diff --git a/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/Any.hpp b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/Any.hpp new file mode 100644 index 000000000000..eb1c28945d45 --- /dev/null +++ b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/Any.hpp @@ -0,0 +1,10 @@ +#pragma once + +#include "sal/config.h" + +#include "test/codemaker/codemakertests/Any.hdl" + +#include "com/sun/star/uno/Any.hxx" +#include "com/sun/star/uno/Type.hxx" +#include "cppu/unotype.hxx" + diff --git a/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/Boolean.hdl b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/Boolean.hdl new file mode 100644 index 000000000000..8ac7f43a4471 --- /dev/null +++ b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/Boolean.hdl @@ -0,0 +1,12 @@ +#pragma once + +#include "sal/config.h" + +#include "cppu/macros.hxx" +#include "sal/types.h" + +namespace test { namespace codemaker { namespace codemakertests { + +typedef ::sal_Bool Boolean; + +} } } diff --git a/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/Boolean.hpp b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/Boolean.hpp new file mode 100644 index 000000000000..daff2d14b62d --- /dev/null +++ b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/Boolean.hpp @@ -0,0 +1,10 @@ +#pragma once + +#include "sal/config.h" + +#include "test/codemaker/codemakertests/Boolean.hdl" + +#include "com/sun/star/uno/Type.hxx" +#include "cppu/unotype.hxx" +#include "sal/types.h" + diff --git a/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/Byte.hdl b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/Byte.hdl new file mode 100644 index 000000000000..1ac733e9e22e --- /dev/null +++ b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/Byte.hdl @@ -0,0 +1,12 @@ +#pragma once + +#include "sal/config.h" + +#include "cppu/macros.hxx" +#include "sal/types.h" + +namespace test { namespace codemaker { namespace codemakertests { + +typedef ::sal_Int8 Byte; + +} } } diff --git a/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/Byte.hpp b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/Byte.hpp new file mode 100644 index 000000000000..3d491b72ce7f --- /dev/null +++ b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/Byte.hpp @@ -0,0 +1,10 @@ +#pragma once + +#include "sal/config.h" + +#include "test/codemaker/codemakertests/Byte.hdl" + +#include "com/sun/star/uno/Type.hxx" +#include "cppu/unotype.hxx" +#include "sal/types.h" + diff --git a/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/Char.hdl b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/Char.hdl new file mode 100644 index 000000000000..0d65c7263d4e --- /dev/null +++ b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/Char.hdl @@ -0,0 +1,12 @@ +#pragma once + +#include "sal/config.h" + +#include "cppu/macros.hxx" +#include "sal/types.h" + +namespace test { namespace codemaker { namespace codemakertests { + +typedef ::sal_Unicode Char; + +} } } diff --git a/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/Char.hpp b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/Char.hpp new file mode 100644 index 000000000000..51ff5e88999c --- /dev/null +++ b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/Char.hpp @@ -0,0 +1,10 @@ +#pragma once + +#include "sal/config.h" + +#include "test/codemaker/codemakertests/Char.hdl" + +#include "com/sun/star/uno/Type.hxx" +#include "cppu/unotype.hxx" +#include "sal/types.h" + diff --git a/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/Double.hdl b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/Double.hdl new file mode 100644 index 000000000000..80586ed2d964 --- /dev/null +++ b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/Double.hdl @@ -0,0 +1,11 @@ +#pragma once + +#include "sal/config.h" + +#include "cppu/macros.hxx" + +namespace test { namespace codemaker { namespace codemakertests { + +typedef double Double; + +} } } diff --git a/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/Double.hpp b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/Double.hpp new file mode 100644 index 000000000000..2d9dd4625db2 --- /dev/null +++ b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/Double.hpp @@ -0,0 +1,9 @@ +#pragma once + +#include "sal/config.h" + +#include "test/codemaker/codemakertests/Double.hdl" + +#include "com/sun/star/uno/Type.hxx" +#include "cppu/unotype.hxx" + diff --git a/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/Enum.hdl b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/Enum.hdl new file mode 100644 index 000000000000..205bd9adeb3e --- /dev/null +++ b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/Enum.hdl @@ -0,0 +1,12 @@ +#pragma once + +#include "sal/config.h" + +#include "test/codemaker/codemakertests/Enum2.hdl" +#include "cppu/macros.hxx" + +namespace test { namespace codemaker { namespace codemakertests { + +typedef ::test::codemaker::codemakertests::Enum2 Enum; + +} } } diff --git a/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/Enum.hpp b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/Enum.hpp new file mode 100644 index 000000000000..8e837cae4335 --- /dev/null +++ b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/Enum.hpp @@ -0,0 +1,10 @@ +#pragma once + +#include "sal/config.h" + +#include "test/codemaker/codemakertests/Enum.hdl" + +#include "test/codemaker/codemakertests/Enum2.hpp" +#include "com/sun/star/uno/Type.hxx" +#include "cppu/unotype.hxx" + diff --git a/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/Enum1.hdl b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/Enum1.hdl new file mode 100644 index 000000000000..78bc2a19444d --- /dev/null +++ b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/Enum1.hdl @@ -0,0 +1,47 @@ +#pragma once + +#include "sal/config.h" + +#include "cppu/macros.hxx" + +namespace com { namespace sun { namespace star { namespace uno { class Type; } } } } + +namespace test { namespace codemaker { namespace codemakertests { + +#if defined LIBO_INTERNAL_ONLY + +#if defined __GNUC__ + +enum class Enum1 +{ + +#else + +enum class SAL_DLLPUBLIC_RTTI Enum1 +{ + +#endif + +#else + +enum SAL_DLLPUBLIC_RTTI Enum1 +{ + +#endif + Enum1_VALUE_NEG = -1, + Enum1_VALUE_ZERO = 0, + Enum1_VALUE_POS = 1, + Enum1_MAKE_FIXED_SIZE = SAL_MAX_ENUM +}; + +#if defined LIBO_INTERNAL_ONLY +constexpr auto Enum1_VALUE_NEG = Enum1::Enum1_VALUE_NEG; +constexpr auto Enum1_VALUE_ZERO = Enum1::Enum1_VALUE_ZERO; +constexpr auto Enum1_VALUE_POS = Enum1::Enum1_VALUE_POS; +#endif + +inline ::css::uno::Type const & cppu_detail_getUnoType(SAL_UNUSED_PARAMETER ::test::codemaker::codemakertests::Enum1 const *); +} } } + +SAL_DEPRECATED("use cppu::UnoType") inline ::css::uno::Type const & SAL_CALL getCppuType(const ::test::codemaker::codemakertests::Enum1 *); + diff --git a/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/Enum1.hpp b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/Enum1.hpp new file mode 100644 index 000000000000..e4bf4b2962f3 --- /dev/null +++ b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/Enum1.hpp @@ -0,0 +1,27 @@ +#pragma once + +#include "sal/config.h" + +#include "test/codemaker/codemakertests/Enum1.hdl" + +#include "com/sun/star/uno/Type.hxx" +#include "cppu/unotype.hxx" + +namespace test { namespace codemaker { namespace codemakertests { + +inline ::css::uno::Type const & cppu_detail_getUnoType(SAL_UNUSED_PARAMETER ::test::codemaker::codemakertests::Enum1 const *) { + static typelib_TypeDescriptionReference * the_type = 0; + if ( !the_type ) + { + typelib_static_enum_type_init( &the_type, + "test.codemaker.codemakertests.Enum1", + ::test::codemaker::codemakertests::Enum1_VALUE_NEG ); + } + return * reinterpret_cast< ::css::uno::Type * >( &the_type ); +} + +} } } + +SAL_DEPRECATED("use cppu::UnoType") inline ::css::uno::Type const & SAL_CALL getCppuType(SAL_UNUSED_PARAMETER ::test::codemaker::codemakertests::Enum1 const *) { + return ::cppu::UnoType< ::test::codemaker::codemakertests::Enum1 >::get(); +} diff --git a/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/Enum2.hdl b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/Enum2.hdl new file mode 100644 index 000000000000..0b313b299bef --- /dev/null +++ b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/Enum2.hdl @@ -0,0 +1,51 @@ +#pragma once + +#include "sal/config.h" + +#include "cppu/macros.hxx" + +namespace com { namespace sun { namespace star { namespace uno { class Type; } } } } + +namespace test { namespace codemaker { namespace codemakertests { + +#if defined LIBO_INTERNAL_ONLY + +#if defined __GNUC__ + +enum class Enum2 +{ + +#else + +enum class SAL_DLLPUBLIC_RTTI Enum2 +{ + +#endif + +#else + +enum SAL_DLLPUBLIC_RTTI Enum2 +{ + +#endif + Enum2_FLAG_NONE = 0, + Enum2_FLAG_READ = 1, + Enum2_FLAG_WRITE = 2, + Enum2_FLAG_EXEC = 4, + Enum2_FLAG_ALL = 7, + Enum2_MAKE_FIXED_SIZE = SAL_MAX_ENUM +}; + +#if defined LIBO_INTERNAL_ONLY +constexpr auto Enum2_FLAG_NONE = Enum2::Enum2_FLAG_NONE; +constexpr auto Enum2_FLAG_READ = Enum2::Enum2_FLAG_READ; +constexpr auto Enum2_FLAG_WRITE = Enum2::Enum2_FLAG_WRITE; +constexpr auto Enum2_FLAG_EXEC = Enum2::Enum2_FLAG_EXEC; +constexpr auto Enum2_FLAG_ALL = Enum2::Enum2_FLAG_ALL; +#endif + +inline ::css::uno::Type const & cppu_detail_getUnoType(SAL_UNUSED_PARAMETER ::test::codemaker::codemakertests::Enum2 const *); +} } } + +SAL_DEPRECATED("use cppu::UnoType") inline ::css::uno::Type const & SAL_CALL getCppuType(const ::test::codemaker::codemakertests::Enum2 *); + diff --git a/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/Enum2.hpp b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/Enum2.hpp new file mode 100644 index 000000000000..d12380e2d09e --- /dev/null +++ b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/Enum2.hpp @@ -0,0 +1,27 @@ +#pragma once + +#include "sal/config.h" + +#include "test/codemaker/codemakertests/Enum2.hdl" + +#include "com/sun/star/uno/Type.hxx" +#include "cppu/unotype.hxx" + +namespace test { namespace codemaker { namespace codemakertests { + +inline ::css::uno::Type const & cppu_detail_getUnoType(SAL_UNUSED_PARAMETER ::test::codemaker::codemakertests::Enum2 const *) { + static typelib_TypeDescriptionReference * the_type = 0; + if ( !the_type ) + { + typelib_static_enum_type_init( &the_type, + "test.codemaker.codemakertests.Enum2", + ::test::codemaker::codemakertests::Enum2_FLAG_NONE ); + } + return * reinterpret_cast< ::css::uno::Type * >( &the_type ); +} + +} } } + +SAL_DEPRECATED("use cppu::UnoType") inline ::css::uno::Type const & SAL_CALL getCppuType(SAL_UNUSED_PARAMETER ::test::codemaker::codemakertests::Enum2 const *) { + return ::cppu::UnoType< ::test::codemaker::codemakertests::Enum2 >::get(); +} diff --git a/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/Enum3.hdl b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/Enum3.hdl new file mode 100644 index 000000000000..43c8cef71d5d --- /dev/null +++ b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/Enum3.hdl @@ -0,0 +1,49 @@ +#pragma once + +#include "sal/config.h" + +#include "cppu/macros.hxx" + +namespace com { namespace sun { namespace star { namespace uno { class Type; } } } } + +namespace test { namespace codemaker { namespace codemakertests { + +#if defined LIBO_INTERNAL_ONLY + +#if defined __GNUC__ + +enum class Enum3 +{ + +#else + +enum class SAL_DLLPUBLIC_RTTI Enum3 +{ + +#endif + +#else + +enum SAL_DLLPUBLIC_RTTI Enum3 +{ + +#endif + Enum3_FIRST = 10, + Enum3_SECOND = 20, + Enum3_THIRD = 100, + Enum3_FOURTH = 255, + Enum3_MAKE_FIXED_SIZE = SAL_MAX_ENUM +}; + +#if defined LIBO_INTERNAL_ONLY +constexpr auto Enum3_FIRST = Enum3::Enum3_FIRST; +constexpr auto Enum3_SECOND = Enum3::Enum3_SECOND; +constexpr auto Enum3_THIRD = Enum3::Enum3_THIRD; +constexpr auto Enum3_FOURTH = Enum3::Enum3_FOURTH; +#endif + +inline ::css::uno::Type const & cppu_detail_getUnoType(SAL_UNUSED_PARAMETER ::test::codemaker::codemakertests::Enum3 const *); +} } } + +SAL_DEPRECATED("use cppu::UnoType") inline ::css::uno::Type const & SAL_CALL getCppuType(const ::test::codemaker::codemakertests::Enum3 *); + diff --git a/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/Enum3.hpp b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/Enum3.hpp new file mode 100644 index 000000000000..3c553373f7d3 --- /dev/null +++ b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/Enum3.hpp @@ -0,0 +1,27 @@ +#pragma once + +#include "sal/config.h" + +#include "test/codemaker/codemakertests/Enum3.hdl" + +#include "com/sun/star/uno/Type.hxx" +#include "cppu/unotype.hxx" + +namespace test { namespace codemaker { namespace codemakertests { + +inline ::css::uno::Type const & cppu_detail_getUnoType(SAL_UNUSED_PARAMETER ::test::codemaker::codemakertests::Enum3 const *) { + static typelib_TypeDescriptionReference * the_type = 0; + if ( !the_type ) + { + typelib_static_enum_type_init( &the_type, + "test.codemaker.codemakertests.Enum3", + ::test::codemaker::codemakertests::Enum3_FIRST ); + } + return * reinterpret_cast< ::css::uno::Type * >( &the_type ); +} + +} } } + +SAL_DEPRECATED("use cppu::UnoType") inline ::css::uno::Type const & SAL_CALL getCppuType(SAL_UNUSED_PARAMETER ::test::codemaker::codemakertests::Enum3 const *) { + return ::cppu::UnoType< ::test::codemaker::codemakertests::Enum3 >::get(); +} diff --git a/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/Enum4.hdl b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/Enum4.hdl new file mode 100644 index 000000000000..c04cccaa7f41 --- /dev/null +++ b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/Enum4.hdl @@ -0,0 +1,47 @@ +#pragma once + +#include "sal/config.h" + +#include "cppu/macros.hxx" + +namespace com { namespace sun { namespace star { namespace uno { class Type; } } } } + +namespace test { namespace codemaker { namespace codemakertests { + +#if defined LIBO_INTERNAL_ONLY + +#if defined __GNUC__ + +enum class Enum4 +{ + +#else + +enum class SAL_DLLPUBLIC_RTTI Enum4 +{ + +#endif + +#else + +enum SAL_DLLPUBLIC_RTTI Enum4 +{ + +#endif + Enum4_AUTO_A = 0, + Enum4_AUTO_B = 1, + Enum4_AUTO_C = 2, + Enum4_MAKE_FIXED_SIZE = SAL_MAX_ENUM +}; + +#if defined LIBO_INTERNAL_ONLY +constexpr auto Enum4_AUTO_A = Enum4::Enum4_AUTO_A; +constexpr auto Enum4_AUTO_B = Enum4::Enum4_AUTO_B; +constexpr auto Enum4_AUTO_C = Enum4::Enum4_AUTO_C; +#endif + +inline ::css::uno::Type const & cppu_detail_getUnoType(SAL_UNUSED_PARAMETER ::test::codemaker::codemakertests::Enum4 const *); +} } } + +SAL_DEPRECATED("use cppu::UnoType") inline ::css::uno::Type const & SAL_CALL getCppuType(const ::test::codemaker::codemakertests::Enum4 *); + diff --git a/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/Enum4.hpp b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/Enum4.hpp new file mode 100644 index 000000000000..a37ec7e470ca --- /dev/null +++ b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/Enum4.hpp @@ -0,0 +1,27 @@ +#pragma once + +#include "sal/config.h" + +#include "test/codemaker/codemakertests/Enum4.hdl" + +#include "com/sun/star/uno/Type.hxx" +#include "cppu/unotype.hxx" + +namespace test { namespace codemaker { namespace codemakertests { + +inline ::css::uno::Type const & cppu_detail_getUnoType(SAL_UNUSED_PARAMETER ::test::codemaker::codemakertests::Enum4 const *) { + static typelib_TypeDescriptionReference * the_type = 0; + if ( !the_type ) + { + typelib_static_enum_type_init( &the_type, + "test.codemaker.codemakertests.Enum4", + ::test::codemaker::codemakertests::Enum4_AUTO_A ); + } + return * reinterpret_cast< ::css::uno::Type * >( &the_type ); +} + +} } } + +SAL_DEPRECATED("use cppu::UnoType") inline ::css::uno::Type const & SAL_CALL getCppuType(SAL_UNUSED_PARAMETER ::test::codemaker::codemakertests::Enum4 const *) { + return ::cppu::UnoType< ::test::codemaker::codemakertests::Enum4 >::get(); +} diff --git a/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/Float.hdl b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/Float.hdl new file mode 100644 index 000000000000..e70505cc71a1 --- /dev/null +++ b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/Float.hdl @@ -0,0 +1,11 @@ +#pragma once + +#include "sal/config.h" + +#include "cppu/macros.hxx" + +namespace test { namespace codemaker { namespace codemakertests { + +typedef float Float; + +} } } diff --git a/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/Float.hpp b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/Float.hpp new file mode 100644 index 000000000000..09b1c2af417e --- /dev/null +++ b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/Float.hpp @@ -0,0 +1,9 @@ +#pragma once + +#include "sal/config.h" + +#include "test/codemaker/codemakertests/Float.hdl" + +#include "com/sun/star/uno/Type.hxx" +#include "cppu/unotype.hxx" + diff --git a/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/Hyper.hdl b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/Hyper.hdl new file mode 100644 index 000000000000..38639d2fcab2 --- /dev/null +++ b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/Hyper.hdl @@ -0,0 +1,12 @@ +#pragma once + +#include "sal/config.h" + +#include "cppu/macros.hxx" +#include "sal/types.h" + +namespace test { namespace codemaker { namespace codemakertests { + +typedef ::sal_Int64 Hyper; + +} } } diff --git a/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/Hyper.hpp b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/Hyper.hpp new file mode 100644 index 000000000000..a3bebb2c3118 --- /dev/null +++ b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/Hyper.hpp @@ -0,0 +1,10 @@ +#pragma once + +#include "sal/config.h" + +#include "test/codemaker/codemakertests/Hyper.hdl" + +#include "com/sun/star/uno/Type.hxx" +#include "cppu/unotype.hxx" +#include "sal/types.h" + diff --git a/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/Long.hdl b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/Long.hdl new file mode 100644 index 000000000000..4f8c3a8e8c4c --- /dev/null +++ b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/Long.hdl @@ -0,0 +1,12 @@ +#pragma once + +#include "sal/config.h" + +#include "cppu/macros.hxx" +#include "sal/types.h" + +namespace test { namespace codemaker { namespace codemakertests { + +typedef ::sal_Int32 Long; + +} } } diff --git a/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/Long.hpp b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/Long.hpp new file mode 100644 index 000000000000..3d5a811bee4e --- /dev/null +++ b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/Long.hpp @@ -0,0 +1,10 @@ +#pragma once + +#include "sal/config.h" + +#include "test/codemaker/codemakertests/Long.hdl" + +#include "com/sun/star/uno/Type.hxx" +#include "cppu/unotype.hxx" +#include "sal/types.h" + diff --git a/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/PolyStruct.hdl b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/PolyStruct.hdl new file mode 100644 index 000000000000..cf366e755312 --- /dev/null +++ b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/PolyStruct.hdl @@ -0,0 +1,32 @@ +#pragma once + +#include "sal/config.h" + +#include "cppu/macros.hxx" +#include "sal/types.h" + +namespace com { namespace sun { namespace star { namespace uno { class Type; } } } } + +namespace test { namespace codemaker { namespace codemakertests { + +#ifdef _WIN32 +# pragma pack(push, 8) +#endif + +template< typename typeparam_if, typename typeparam_else > struct SAL_DLLPUBLIC_RTTI PolyStruct { + inline PolyStruct(); + + inline PolyStruct(typeparam_if const & member1_, const ::sal_Int32& member2_); + + typeparam_if member1; + ::sal_Int32 member2; +}; + +#ifdef _WIN32 +# pragma pack(pop) +#endif + +} } } + +template< typename typeparam_if, typename typeparam_else > SAL_DEPRECATED("use cppu::UnoType") inline ::css::uno::Type const & SAL_CALL getCppuType(const ::test::codemaker::codemakertests::PolyStruct< typeparam_if, typeparam_else > *); + diff --git a/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/PolyStruct.hpp b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/PolyStruct.hpp new file mode 100644 index 000000000000..fba705a98807 --- /dev/null +++ b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/PolyStruct.hpp @@ -0,0 +1,80 @@ +#pragma once + +#include "sal/config.h" + +#include "test/codemaker/codemakertests/PolyStruct.hdl" + +#include "com/sun/star/uno/Type.hxx" +#include "cppu/unotype.hxx" +#include "rtl/strbuf.hxx" +#include "rtl/textenc.h" +#include "rtl/ustring.hxx" +#include "sal/types.h" +#include "typelib/typeclass.h" +#include "typelib/typedescription.h" + +namespace test { namespace codemaker { namespace codemakertests { + +template< typename typeparam_if, typename typeparam_else > inline PolyStruct< typeparam_if, typeparam_else >::PolyStruct() + : member1() + , member2(0) +{ +} + +template< typename typeparam_if, typename typeparam_else > inline PolyStruct< typeparam_if, typeparam_else >::PolyStruct(typeparam_if const & member1_, const ::sal_Int32& member2_) + : member1(member1_) + , member2(member2_) +{ +} + +template< typename typeparam_if, typename typeparam_else > +inline PolyStruct< typeparam_if, typeparam_else > +make_PolyStruct(typeparam_if const & member1_, const ::sal_Int32& member2_) +{ + return PolyStruct< typeparam_if, typeparam_else >(member1_, member2_); +} + +template< typename typeparam_if, typename typeparam_else > inline bool operator==(const PolyStruct< typeparam_if, typeparam_else >& the_lhs, const PolyStruct< typeparam_if, typeparam_else >& the_rhs) +{ + return the_lhs.member1 == the_rhs.member1 + && the_lhs.member2 == the_rhs.member2; +} +template< typename typeparam_if, typename typeparam_else > inline bool operator!=(const PolyStruct< typeparam_if, typeparam_else >& the_lhs, const PolyStruct< typeparam_if, typeparam_else >& the_rhs) +{ +return !operator==(the_lhs, the_rhs); +} +} } } + +namespace cppu { + +template< typename typeparam_if, typename typeparam_else > class UnoType< ::test::codemaker::codemakertests::PolyStruct< typeparam_if, typeparam_else > > { +public: + static inline ::css::uno::Type const & get() { + //TODO: On certain platforms with weak memory models, the following code can result in some threads observing that the_type points to garbage + static ::typelib_TypeDescriptionReference * the_type = 0; + if (the_type == 0) { + ::rtl::OStringBuffer the_buffer("test.codemaker.codemakertests.PolyStruct<"); + the_buffer.append(::rtl::OUStringToOString(::cppu::getTypeFavourChar(static_cast< typeparam_if * >(0)).getTypeName(), RTL_TEXTENCODING_UTF8)); + the_buffer.append(','); + the_buffer.append(::rtl::OUStringToOString(::cppu::getTypeFavourChar(static_cast< typeparam_else * >(0)).getTypeName(), RTL_TEXTENCODING_UTF8)); + the_buffer.append('>'); + ::typelib_TypeDescriptionReference * the_members[] = { + ::cppu::getTypeFavourChar(static_cast< typeparam_if * >(0)).getTypeLibType(), + ::cppu::UnoType< ::sal_Int32 >::get().getTypeLibType() }; + static ::sal_Bool const the_parameterizedTypes[] = { true, false }; + ::typelib_static_struct_type_init(&the_type, the_buffer.getStr(), 0, 2, the_members, the_parameterizedTypes); + } + return *reinterpret_cast< ::css::uno::Type * >(&the_type); + } + +private: + UnoType(UnoType &); // not defined + ~UnoType(); // not defined + void operator =(UnoType); // not defined +}; + +} + +template< typename typeparam_if, typename typeparam_else > SAL_DEPRECATED("use cppu::UnoType") inline ::css::uno::Type const & SAL_CALL getCppuType(SAL_UNUSED_PARAMETER ::test::codemaker::codemakertests::PolyStruct< typeparam_if, typeparam_else > const *) { + return ::cppu::UnoType< ::test::codemaker::codemakertests::PolyStruct< typeparam_if, typeparam_else > >::get(); + } diff --git a/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/S1.hpp b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/S1.hpp new file mode 100644 index 000000000000..43d0de005c1e --- /dev/null +++ b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/S1.hpp @@ -0,0 +1,301 @@ +#pragma once + +#include "sal/config.h" + +#include + +#include "com/sun/star/lang/ClassNotFoundException.hpp" +#include "com/sun/star/lang/IllegalAccessException.hpp" +#include "com/sun/star/uno/DeploymentException.hpp" +#include "com/sun/star/uno/Exception.hpp" +#include "com/sun/star/uno/RuntimeException.hpp" +#include "com/sun/star/uno/XComponentContext.hpp" +#include "com/sun/star/uno/XInterface.hpp" +#include "com/sun/star/uno/XNamingService.hpp" +#include "test/codemaker/codemakertests/Any.hpp" +#include "test/codemaker/codemakertests/Boolean.hpp" +#include "test/codemaker/codemakertests/Byte.hpp" +#include "test/codemaker/codemakertests/Char.hpp" +#include "test/codemaker/codemakertests/Double.hpp" +#include "test/codemaker/codemakertests/Enum.hpp" +#include "test/codemaker/codemakertests/Enum2.hpp" +#include "test/codemaker/codemakertests/Float.hpp" +#include "test/codemaker/codemakertests/Hyper.hpp" +#include "test/codemaker/codemakertests/Long.hpp" +#include "test/codemaker/codemakertests/SequenceAny.hpp" +#include "test/codemaker/codemakertests/SequenceBoolean.hpp" +#include "test/codemaker/codemakertests/SequenceByte.hpp" +#include "test/codemaker/codemakertests/SequenceChar.hpp" +#include "test/codemaker/codemakertests/SequenceDouble.hpp" +#include "test/codemaker/codemakertests/SequenceEnum.hpp" +#include "test/codemaker/codemakertests/SequenceFloat.hpp" +#include "test/codemaker/codemakertests/SequenceHyper.hpp" +#include "test/codemaker/codemakertests/SequenceLong.hpp" +#include "test/codemaker/codemakertests/SequenceShort.hpp" +#include "test/codemaker/codemakertests/SequenceString.hpp" +#include "test/codemaker/codemakertests/SequenceStruct.hpp" +#include "test/codemaker/codemakertests/SequenceType.hpp" +#include "test/codemaker/codemakertests/SequenceUnsignedHyper.hpp" +#include "test/codemaker/codemakertests/SequenceUnsignedLong.hpp" +#include "test/codemaker/codemakertests/SequenceUnsignedShort.hpp" +#include "test/codemaker/codemakertests/SequenceXInterface.hpp" +#include "test/codemaker/codemakertests/SequenceXNamingService.hpp" +#include "test/codemaker/codemakertests/Short.hpp" +#include "test/codemaker/codemakertests/String.hpp" +#include "test/codemaker/codemakertests/Struct.hpp" +#include "test/codemaker/codemakertests/Struct1.hpp" +#include "test/codemaker/codemakertests/Type.hpp" +#include "test/codemaker/codemakertests/UnsignedHyper.hpp" +#include "test/codemaker/codemakertests/UnsignedLong.hpp" +#include "test/codemaker/codemakertests/UnsignedShort.hpp" +#include "test/codemaker/codemakertests/XInterface.hpp" +#include "test/codemaker/codemakertests/XNamingService.hpp" +#include "test/codemaker/codemakertests/XTest.hpp" +#include "com/sun/star/uno/Any.hxx" +#include "com/sun/star/uno/Reference.hxx" +#include "com/sun/star/uno/Sequence.hxx" +#include "com/sun/star/uno/Type.hxx" +#include "cppu/unotype.hxx" +#include "rtl/ustring.h" +#include "rtl/ustring.hxx" +#include "sal/types.h" + +#if defined ANDROID || defined IOS //TODO +#include +#include +#endif + +#if defined LO_URE_CURRENT_ENV && defined LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_S1 && (LO_URE_CURRENT_ENV) == (LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_S1) && defined LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_S1 +extern "C" ::css::uno::XInterface * SAL_CALL LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_S1(::css::uno::XComponentContext *, ::css::uno::Sequence< ::css::uno::Any > const &); +#endif + +namespace test { namespace codemaker { namespace codemakertests { + +class S1 { +public: + static ::css::uno::Reference< ::test::codemaker::codemakertests::XTest > create1(::css::uno::Reference< ::css::uno::XComponentContext > const & the_context) { + assert(the_context.is()); + ::css::uno::Reference< ::test::codemaker::codemakertests::XTest > the_instance; + try { +#if defined LO_URE_CURRENT_ENV && defined LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_S1 && (LO_URE_CURRENT_ENV) == (LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_S1) && defined LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_S1 + the_instance = ::css::uno::Reference< ::test::codemaker::codemakertests::XTest >(::css::uno::Reference< ::css::uno::XInterface >(static_cast< ::css::uno::XInterface * >((*LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_S1)(the_context.get(), ::css::uno::Sequence< ::css::uno::Any >())), ::SAL_NO_ACQUIRE), ::css::uno::UNO_QUERY); + ::css::uno::Reference< ::css::lang::XInitialization > init(the_instance, ::css::uno::UNO_QUERY); + if (init.is()) { + init->initialize(::css::uno::Sequence< ::css::uno::Any >()); + } +#else + the_instance = ::css::uno::Reference< ::test::codemaker::codemakertests::XTest >(the_context->getServiceManager()->createInstanceWithArgumentsAndContext( "test.codemaker.codemakertests.S1", ::css::uno::Sequence< ::css::uno::Any >(), the_context), ::css::uno::UNO_QUERY); +#endif + } catch (const ::css::uno::RuntimeException &) { + throw; + } catch (const ::css::uno::Exception & the_exception) { + throw ::css::uno::DeploymentException(::rtl::OUString("component context fails to supply service ") + "test.codemaker.codemakertests.S1" + " of type " + "test.codemaker.codemakertests.XTest" + ": " + the_exception.Message, the_context); + } + if (!the_instance.is()) { + throw ::css::uno::DeploymentException(::rtl::OUString("component context fails to supply service ") + "test.codemaker.codemakertests.S1" + " of type " + "test.codemaker.codemakertests.XTest", the_context); + } + return the_instance; + } + + static ::css::uno::Reference< ::test::codemaker::codemakertests::XTest > create2(::css::uno::Reference< ::css::uno::XComponentContext > const & the_context, const ::css::uno::Sequence< ::css::uno::Any >& create2) { + assert(the_context.is()); + ::css::uno::Reference< ::test::codemaker::codemakertests::XTest > the_instance; +#if defined LO_URE_CURRENT_ENV && defined LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_S1 && (LO_URE_CURRENT_ENV) == (LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_S1) && defined LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_S1 + the_instance = ::css::uno::Reference< ::test::codemaker::codemakertests::XTest >(::css::uno::Reference< ::css::uno::XInterface >(static_cast< ::css::uno::XInterface * >((*LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_S1)(the_context.get(), create2)), ::SAL_NO_ACQUIRE), ::css::uno::UNO_QUERY); + ::css::uno::Reference< ::css::lang::XInitialization > init(the_instance, ::css::uno::UNO_QUERY); + if (init.is()) { + init->initialize(the_arguments); + } +#else + the_instance = ::css::uno::Reference< ::test::codemaker::codemakertests::XTest >(the_context->getServiceManager()->createInstanceWithArgumentsAndContext( "test.codemaker.codemakertests.S1", create2, the_context), ::css::uno::UNO_QUERY); +#endif + if (!the_instance.is()) { + throw ::css::uno::DeploymentException(::rtl::OUString("component context fails to supply service ") + "test.codemaker.codemakertests.S1" + " of type " + "test.codemaker.codemakertests.XTest", the_context); + } + return the_instance; + } + + static ::css::uno::Reference< ::test::codemaker::codemakertests::XTest > create3(::css::uno::Reference< ::css::uno::XComponentContext > const & the_context, const ::css::uno::Sequence< ::css::uno::Any >& S1) { + assert(the_context.is()); + ::css::uno::Sequence< ::css::uno::Any > the_arguments(1); + ::css::uno::Any* the_arguments_array = the_arguments.getArray(); + the_arguments_array[0] <<= S1; + ::css::uno::Reference< ::test::codemaker::codemakertests::XTest > the_instance; + try { +#if defined LO_URE_CURRENT_ENV && defined LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_S1 && (LO_URE_CURRENT_ENV) == (LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_S1) && defined LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_S1 + the_instance = ::css::uno::Reference< ::test::codemaker::codemakertests::XTest >(::css::uno::Reference< ::css::uno::XInterface >(static_cast< ::css::uno::XInterface * >((*LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_S1)(the_context.get(), the_arguments)), ::SAL_NO_ACQUIRE), ::css::uno::UNO_QUERY); + ::css::uno::Reference< ::css::lang::XInitialization > init(the_instance, ::css::uno::UNO_QUERY); + if (init.is()) { + init->initialize(the_arguments); + } +#else + the_instance = ::css::uno::Reference< ::test::codemaker::codemakertests::XTest >(the_context->getServiceManager()->createInstanceWithArgumentsAndContext( "test.codemaker.codemakertests.S1", the_arguments, the_context), ::css::uno::UNO_QUERY); +#endif + } catch (const ::css::uno::RuntimeException &) { + throw; + } catch (const ::css::lang::ClassNotFoundException &) { + throw; + } catch (const ::css::lang::IllegalAccessException &) { + throw; + } catch (const ::css::uno::Exception & the_exception) { + throw ::css::uno::DeploymentException(::rtl::OUString("component context fails to supply service ") + "test.codemaker.codemakertests.S1" + " of type " + "test.codemaker.codemakertests.XTest" + ": " + the_exception.Message, the_context); + } + if (!the_instance.is()) { + throw ::css::uno::DeploymentException(::rtl::OUString("component context fails to supply service ") + "test.codemaker.codemakertests.S1" + " of type " + "test.codemaker.codemakertests.XTest", the_context); + } + return the_instance; + } + + static ::css::uno::Reference< ::test::codemaker::codemakertests::XTest > create4(::css::uno::Reference< ::css::uno::XComponentContext > const & the_context, ::sal_Int32 javamaker, ::sal_Int32 S1, ::sal_Int32 create4) { + assert(the_context.is()); + ::css::uno::Sequence< ::css::uno::Any > the_arguments(3); + ::css::uno::Any* the_arguments_array = the_arguments.getArray(); + the_arguments_array[0] <<= javamaker; + the_arguments_array[1] <<= S1; + the_arguments_array[2] <<= create4; + ::css::uno::Reference< ::test::codemaker::codemakertests::XTest > the_instance; + try { +#if defined LO_URE_CURRENT_ENV && defined LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_S1 && (LO_URE_CURRENT_ENV) == (LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_S1) && defined LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_S1 + the_instance = ::css::uno::Reference< ::test::codemaker::codemakertests::XTest >(::css::uno::Reference< ::css::uno::XInterface >(static_cast< ::css::uno::XInterface * >((*LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_S1)(the_context.get(), the_arguments)), ::SAL_NO_ACQUIRE), ::css::uno::UNO_QUERY); + ::css::uno::Reference< ::css::lang::XInitialization > init(the_instance, ::css::uno::UNO_QUERY); + if (init.is()) { + init->initialize(the_arguments); + } +#else + the_instance = ::css::uno::Reference< ::test::codemaker::codemakertests::XTest >(the_context->getServiceManager()->createInstanceWithArgumentsAndContext( "test.codemaker.codemakertests.S1", the_arguments, the_context), ::css::uno::UNO_QUERY); +#endif + } catch (const ::css::uno::RuntimeException &) { + throw; + } catch (const ::css::uno::Exception & the_exception) { + throw ::css::uno::DeploymentException(::rtl::OUString("component context fails to supply service ") + "test.codemaker.codemakertests.S1" + " of type " + "test.codemaker.codemakertests.XTest" + ": " + the_exception.Message, the_context); + } + if (!the_instance.is()) { + throw ::css::uno::DeploymentException(::rtl::OUString("component context fails to supply service ") + "test.codemaker.codemakertests.S1" + " of type " + "test.codemaker.codemakertests.XTest", the_context); + } + return the_instance; + } + + static ::css::uno::Reference< ::test::codemaker::codemakertests::XTest > create5(::css::uno::Reference< ::css::uno::XComponentContext > const & the_context, ::sal_Bool p1, ::sal_Int8 p2, ::sal_Int16 p3, ::sal_uInt16 p4, ::sal_Int32 p5, ::sal_uInt32 p6, ::sal_Int64 p7, ::sal_uInt64 p8, float p9, double p10, ::sal_Unicode p11, const ::rtl::OUString& p12, const ::css::uno::Type& p13, const ::css::uno::Any& p14, ::test::codemaker::codemakertests::Enum2 p15, const ::test::codemaker::codemakertests::Struct1& p16, const ::css::uno::Reference< ::css::uno::XInterface >& p17, const ::css::uno::Reference< ::css::uno::XNamingService >& p18, ::sal_Bool t1, ::sal_Int8 t2, ::sal_Int16 t3, ::sal_uInt16 t4, ::sal_Int32 t5, ::sal_uInt32 t6, ::sal_Int64 t7, ::sal_uInt64 t8, float t9, double t10, ::sal_Unicode t11, const ::rtl::OUString& t12, const ::css::uno::Type& t13, const ::css::uno::Any& t14, ::test::codemaker::codemakertests::Enum2 t15, const ::test::codemaker::codemakertests::Struct1& t16, const ::css::uno::Reference< ::css::uno::XInterface >& t17, const ::css::uno::Reference< ::css::uno::XNamingService >& t18, const ::css::uno::Sequence< ::sal_Bool >& a1, const ::css::uno::Sequence< ::sal_Int8 >& a2, const ::css::uno::Sequence< ::sal_Int16 >& a3, const ::css::uno::Sequence< ::sal_uInt16 >& a4, const ::css::uno::Sequence< ::sal_Int32 >& a5, const ::css::uno::Sequence< ::sal_uInt32 >& a6, const ::css::uno::Sequence< ::sal_Int64 >& a7, const ::css::uno::Sequence< ::sal_uInt64 >& a8, const ::css::uno::Sequence< float >& a9, const ::css::uno::Sequence< double >& a10, const ::css::uno::Sequence< ::sal_Unicode >& a11, const ::css::uno::Sequence< ::rtl::OUString >& a12, const ::css::uno::Sequence< ::css::uno::Type >& a13, const ::css::uno::Sequence< ::css::uno::Any >& a14, const ::css::uno::Sequence< ::test::codemaker::codemakertests::Enum2 >& a15, const ::css::uno::Sequence< ::test::codemaker::codemakertests::Struct1 >& a16, const ::css::uno::Sequence< ::css::uno::Reference< ::css::uno::XInterface > >& a17, const ::css::uno::Sequence< ::css::uno::Reference< ::css::uno::XNamingService > >& a18, const ::css::uno::Sequence< ::css::uno::Sequence< ::sal_Bool > >& aa1, const ::css::uno::Sequence< ::css::uno::Sequence< ::sal_Int8 > >& aa2, const ::css::uno::Sequence< ::css::uno::Sequence< ::sal_Int16 > >& aa3, const ::css::uno::Sequence< ::css::uno::Sequence< ::sal_uInt16 > >& aa4, const ::css::uno::Sequence< ::css::uno::Sequence< ::sal_Int32 > >& aa5, const ::css::uno::Sequence< ::css::uno::Sequence< ::sal_uInt32 > >& aa6, const ::css::uno::Sequence< ::css::uno::Sequence< ::sal_Int64 > >& aa7, const ::css::uno::Sequence< ::css::uno::Sequence< ::sal_uInt64 > >& aa8, const ::css::uno::Sequence< ::css::uno::Sequence< float > >& aa9, const ::css::uno::Sequence< ::css::uno::Sequence< double > >& aa10, const ::css::uno::Sequence< ::css::uno::Sequence< ::sal_Unicode > >& aa11, const ::css::uno::Sequence< ::css::uno::Sequence< ::rtl::OUString > >& aa12, const ::css::uno::Sequence< ::css::uno::Sequence< ::css::uno::Type > >& aa13, const ::css::uno::Sequence< ::css::uno::Sequence< ::css::uno::Any > >& aa14, const ::css::uno::Sequence< ::css::uno::Sequence< ::test::codemaker::codemakertests::Enum2 > >& aa15, const ::css::uno::Sequence< ::css::uno::Sequence< ::test::codemaker::codemakertests::Struct1 > >& aa16, const ::css::uno::Sequence< ::css::uno::Sequence< ::css::uno::Reference< ::css::uno::XInterface > > >& aa17, const ::css::uno::Sequence< ::css::uno::Sequence< ::css::uno::Reference< ::css::uno::XNamingService > > >& aa18, const ::css::uno::Sequence< ::css::uno::Sequence< ::sal_Bool > >& at1, const ::css::uno::Sequence< ::css::uno::Sequence< ::sal_Int8 > >& at2, const ::css::uno::Sequence< ::css::uno::Sequence< ::sal_Int16 > >& at3, const ::css::uno::Sequence< ::css::uno::Sequence< ::sal_uInt16 > >& at4, const ::css::uno::Sequence< ::css::uno::Sequence< ::sal_Int32 > >& at5, const ::css::uno::Sequence< ::css::uno::Sequence< ::sal_uInt32 > >& at6, const ::css::uno::Sequence< ::css::uno::Sequence< ::sal_Int64 > >& at7, const ::css::uno::Sequence< ::css::uno::Sequence< ::sal_uInt64 > >& at8, const ::css::uno::Sequence< ::css::uno::Sequence< float > >& at9, const ::css::uno::Sequence< ::css::uno::Sequence< double > >& at10, const ::css::uno::Sequence< ::css::uno::Sequence< ::sal_Unicode > >& at11, const ::css::uno::Sequence< ::css::uno::Sequence< ::rtl::OUString > >& at12, const ::css::uno::Sequence< ::css::uno::Sequence< ::css::uno::Type > >& at13, const ::css::uno::Sequence< ::css::uno::Sequence< ::css::uno::Any > >& at14, const ::css::uno::Sequence< ::css::uno::Sequence< ::test::codemaker::codemakertests::Enum2 > >& at15, const ::css::uno::Sequence< ::css::uno::Sequence< ::test::codemaker::codemakertests::Struct1 > >& at16, const ::css::uno::Sequence< ::css::uno::Sequence< ::css::uno::Reference< ::css::uno::XInterface > > >& at17, const ::css::uno::Sequence< ::css::uno::Sequence< ::css::uno::Reference< ::css::uno::XNamingService > > >& at18) { + assert(the_context.is()); + ::css::uno::Sequence< ::css::uno::Any > the_arguments(90); + ::css::uno::Any* the_arguments_array = the_arguments.getArray(); + the_arguments_array[0] <<= p1; + the_arguments_array[1] <<= p2; + the_arguments_array[2] <<= p3; + the_arguments_array[3] <<= p4; + the_arguments_array[4] <<= p5; + the_arguments_array[5] <<= p6; + the_arguments_array[6] <<= p7; + the_arguments_array[7] <<= p8; + the_arguments_array[8] <<= p9; + the_arguments_array[9] <<= p10; + the_arguments_array[10] = ::css::uno::Any(&p11, ::cppu::UnoType< ::cppu::UnoCharType >::get()); + the_arguments_array[11] <<= p12; + the_arguments_array[12] <<= p13; + the_arguments_array[13] = p14; + the_arguments_array[14] <<= p15; + the_arguments_array[15] <<= p16; + the_arguments_array[16] <<= p17; + the_arguments_array[17] <<= p18; + the_arguments_array[18] <<= t1; + the_arguments_array[19] <<= t2; + the_arguments_array[20] <<= t3; + the_arguments_array[21] <<= t4; + the_arguments_array[22] <<= t5; + the_arguments_array[23] <<= t6; + the_arguments_array[24] <<= t7; + the_arguments_array[25] <<= t8; + the_arguments_array[26] <<= t9; + the_arguments_array[27] <<= t10; + the_arguments_array[28] <<= t11; + the_arguments_array[29] <<= t12; + the_arguments_array[30] <<= t13; + the_arguments_array[31] = t14; + the_arguments_array[32] <<= t15; + the_arguments_array[33] <<= t16; + the_arguments_array[34] <<= t17; + the_arguments_array[35] <<= t18; + the_arguments_array[36] <<= a1; + the_arguments_array[37] <<= a2; + the_arguments_array[38] <<= a3; + the_arguments_array[39] <<= a4; + the_arguments_array[40] <<= a5; + the_arguments_array[41] <<= a6; + the_arguments_array[42] <<= a7; + the_arguments_array[43] <<= a8; + the_arguments_array[44] <<= a9; + the_arguments_array[45] <<= a10; + the_arguments_array[46] = ::css::uno::Any(&a11, ::cppu::UnoType< ::cppu::UnoSequenceType< ::cppu::UnoCharType > >::get()); + the_arguments_array[47] <<= a12; + the_arguments_array[48] <<= a13; + the_arguments_array[49] <<= a14; + the_arguments_array[50] <<= a15; + the_arguments_array[51] <<= a16; + the_arguments_array[52] <<= a17; + the_arguments_array[53] <<= a18; + the_arguments_array[54] <<= aa1; + the_arguments_array[55] <<= aa2; + the_arguments_array[56] <<= aa3; + the_arguments_array[57] <<= aa4; + the_arguments_array[58] <<= aa5; + the_arguments_array[59] <<= aa6; + the_arguments_array[60] <<= aa7; + the_arguments_array[61] <<= aa8; + the_arguments_array[62] <<= aa9; + the_arguments_array[63] <<= aa10; + the_arguments_array[64] = ::css::uno::Any(&aa11, ::cppu::UnoType< ::cppu::UnoSequenceType< ::cppu::UnoSequenceType< ::cppu::UnoCharType > > >::get()); + the_arguments_array[65] <<= aa12; + the_arguments_array[66] <<= aa13; + the_arguments_array[67] <<= aa14; + the_arguments_array[68] <<= aa15; + the_arguments_array[69] <<= aa16; + the_arguments_array[70] <<= aa17; + the_arguments_array[71] <<= aa18; + the_arguments_array[72] <<= at1; + the_arguments_array[73] <<= at2; + the_arguments_array[74] <<= at3; + the_arguments_array[75] <<= at4; + the_arguments_array[76] <<= at5; + the_arguments_array[77] <<= at6; + the_arguments_array[78] <<= at7; + the_arguments_array[79] <<= at8; + the_arguments_array[80] <<= at9; + the_arguments_array[81] <<= at10; + the_arguments_array[82] <<= at11; + the_arguments_array[83] <<= at12; + the_arguments_array[84] <<= at13; + the_arguments_array[85] <<= at14; + the_arguments_array[86] <<= at15; + the_arguments_array[87] <<= at16; + the_arguments_array[88] <<= at17; + the_arguments_array[89] <<= at18; + ::css::uno::Reference< ::test::codemaker::codemakertests::XTest > the_instance; + try { +#if defined LO_URE_CURRENT_ENV && defined LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_S1 && (LO_URE_CURRENT_ENV) == (LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_S1) && defined LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_S1 + the_instance = ::css::uno::Reference< ::test::codemaker::codemakertests::XTest >(::css::uno::Reference< ::css::uno::XInterface >(static_cast< ::css::uno::XInterface * >((*LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_S1)(the_context.get(), the_arguments)), ::SAL_NO_ACQUIRE), ::css::uno::UNO_QUERY); + ::css::uno::Reference< ::css::lang::XInitialization > init(the_instance, ::css::uno::UNO_QUERY); + if (init.is()) { + init->initialize(the_arguments); + } +#else + the_instance = ::css::uno::Reference< ::test::codemaker::codemakertests::XTest >(the_context->getServiceManager()->createInstanceWithArgumentsAndContext( "test.codemaker.codemakertests.S1", the_arguments, the_context), ::css::uno::UNO_QUERY); +#endif + } catch (const ::css::uno::RuntimeException &) { + throw; + } catch (const ::css::uno::Exception & the_exception) { + throw ::css::uno::DeploymentException(::rtl::OUString("component context fails to supply service ") + "test.codemaker.codemakertests.S1" + " of type " + "test.codemaker.codemakertests.XTest" + ": " + the_exception.Message, the_context); + } + if (!the_instance.is()) { + throw ::css::uno::DeploymentException(::rtl::OUString("component context fails to supply service ") + "test.codemaker.codemakertests.S1" + " of type " + "test.codemaker.codemakertests.XTest", the_context); + } + return the_instance; + } + +private: + S1(); // not implemented + S1(S1 &); // not implemented + ~S1(); // not implemented + void operator =(S1); // not implemented +}; + +} } } diff --git a/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/S2.hpp b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/S2.hpp new file mode 100644 index 000000000000..6073fa705dc4 --- /dev/null +++ b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/S2.hpp @@ -0,0 +1,57 @@ +#pragma once + +#include "sal/config.h" + +#include + +#include "com/sun/star/uno/DeploymentException.hpp" +#include "com/sun/star/uno/Exception.hpp" +#include "com/sun/star/uno/RuntimeException.hpp" +#include "com/sun/star/uno/XComponentContext.hpp" +#include "test/codemaker/codemakertests/XTest.hpp" +#include "com/sun/star/uno/Reference.hxx" +#include "cppu/unotype.hxx" +#include "rtl/ustring.h" +#include "rtl/ustring.hxx" + +#if defined ANDROID || defined IOS //TODO +#include +#include +#endif + +#if defined LO_URE_CURRENT_ENV && defined LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_S2 && (LO_URE_CURRENT_ENV) == (LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_S2) && defined LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_S2 +extern "C" ::css::uno::XInterface * SAL_CALL LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_S2(::css::uno::XComponentContext *, ::css::uno::Sequence< ::css::uno::Any > const &); +#endif + +namespace test { namespace codemaker { namespace codemakertests { + +class S2 { +public: + static ::css::uno::Reference< ::test::codemaker::codemakertests::XTest > create(::css::uno::Reference< ::css::uno::XComponentContext > const & the_context) { + assert(the_context.is()); + ::css::uno::Reference< ::test::codemaker::codemakertests::XTest > the_instance; + try { +#if defined LO_URE_CURRENT_ENV && defined LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_S2 && (LO_URE_CURRENT_ENV) == (LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_S2) && defined LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_S2 + the_instance = ::css::uno::Reference< ::test::codemaker::codemakertests::XTest >(::css::uno::Reference< ::css::uno::XInterface >(static_cast< ::css::uno::XInterface * >((*LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_S2)(the_context.get(), ::css::uno::Sequence< ::css::uno::Any >())), ::SAL_NO_ACQUIRE), ::css::uno::UNO_QUERY); +#else + the_instance = ::css::uno::Reference< ::test::codemaker::codemakertests::XTest >(the_context->getServiceManager()->createInstanceWithContext( "test.codemaker.codemakertests.S2", the_context), ::css::uno::UNO_QUERY); +#endif + } catch (const ::css::uno::RuntimeException &) { + throw; + } catch (const ::css::uno::Exception & the_exception) { + throw ::css::uno::DeploymentException(::rtl::OUString("component context fails to supply service ") + "test.codemaker.codemakertests.S2" + " of type " + "test.codemaker.codemakertests.XTest" + ": " + the_exception.Message, the_context); + } + if (!the_instance.is()) { + throw ::css::uno::DeploymentException(::rtl::OUString("component context fails to supply service ") + "test.codemaker.codemakertests.S2" + " of type " + "test.codemaker.codemakertests.XTest", the_context); + } + return the_instance; + } + +private: + S2(); // not implemented + S2(S2 &); // not implemented + ~S2(); // not implemented + void operator =(S2); // not implemented +}; + +} } } diff --git a/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/S4.hpp b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/S4.hpp new file mode 100644 index 000000000000..6b75cde8a04a --- /dev/null +++ b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/S4.hpp @@ -0,0 +1,50 @@ +#pragma once + +#include "sal/config.h" + +#include + +#include "com/sun/star/uno/DeploymentException.hpp" +#include "com/sun/star/uno/XComponentContext.hpp" +#include "test/codemaker/codemakertests/XTest.hpp" +#include "com/sun/star/uno/Any.hxx" +#include "com/sun/star/uno/Reference.hxx" +#include "cppu/unotype.hxx" +#include "rtl/ustring.h" +#include "rtl/ustring.hxx" + +#if defined ANDROID || defined IOS //TODO +#include +#include +#endif + +#if defined LO_URE_CURRENT_ENV && defined LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_S4 && (LO_URE_CURRENT_ENV) == (LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_S4) && defined LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_S4 +extern "C" ::css::uno::XInterface * SAL_CALL LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_S4(::css::uno::XComponentContext *, ::css::uno::Sequence< ::css::uno::Any > const &); +#endif + +namespace test { namespace codemaker { namespace codemakertests { + +class S4 { +public: + static ::css::uno::Reference< ::test::codemaker::codemakertests::XTest > get(::css::uno::Reference< ::css::uno::XComponentContext > const & the_context) { + assert(the_context.is()); + ::css::uno::Reference< ::test::codemaker::codemakertests::XTest > instance; +#if defined LO_URE_CURRENT_ENV && defined LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_S4 && (LO_URE_CURRENT_ENV) == (LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_S4) && defined LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_S4 + instance = ::css::uno::Reference< ::test::codemaker::codemakertests::XTest >(::css::uno::Reference< ::css::uno::XInterface >(static_cast< ::css::uno::XInterface * >((*LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_S4)(the_context.get(), ::css::uno::Sequence< ::css::uno::Any >())), ::SAL_NO_ACQUIRE), ::css::uno::UNO_QUERY); +#else + the_context->getValueByName(::rtl::OUString( "/singletons/test.codemaker.codemakertests.S4" )) >>= instance; +#endif + if (!instance.is()) { + throw ::css::uno::DeploymentException(::rtl::OUString( "component context fails to supply singleton test.codemaker.codemakertests.S4 of type test.codemaker.codemakertests.XTest" ), the_context); + } + return instance; + } + +private: + S4(); // not implemented + S4(S4 &); // not implemented + ~S4(); // not implemented + void operator =(S4); // not implemented +}; + +} } } diff --git a/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/SequenceAny.hdl b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/SequenceAny.hdl new file mode 100644 index 000000000000..98b332338162 --- /dev/null +++ b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/SequenceAny.hdl @@ -0,0 +1,13 @@ +#pragma once + +#include "sal/config.h" + +#include "test/codemaker/codemakertests/Any.hdl" +#include "com/sun/star/uno/Sequence.h" +#include "cppu/macros.hxx" + +namespace test { namespace codemaker { namespace codemakertests { + +typedef ::css::uno::Sequence< ::css::uno::Any > SequenceAny; + +} } } diff --git a/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/SequenceAny.hpp b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/SequenceAny.hpp new file mode 100644 index 000000000000..60af83adb14e --- /dev/null +++ b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/SequenceAny.hpp @@ -0,0 +1,11 @@ +#pragma once + +#include "sal/config.h" + +#include "test/codemaker/codemakertests/SequenceAny.hdl" + +#include "test/codemaker/codemakertests/Any.hpp" +#include "com/sun/star/uno/Sequence.hxx" +#include "com/sun/star/uno/Type.hxx" +#include "cppu/unotype.hxx" + diff --git a/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/SequenceBoolean.hdl b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/SequenceBoolean.hdl new file mode 100644 index 000000000000..e9c9ba90563f --- /dev/null +++ b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/SequenceBoolean.hdl @@ -0,0 +1,13 @@ +#pragma once + +#include "sal/config.h" + +#include "test/codemaker/codemakertests/Boolean.hdl" +#include "com/sun/star/uno/Sequence.h" +#include "cppu/macros.hxx" + +namespace test { namespace codemaker { namespace codemakertests { + +typedef ::css::uno::Sequence< ::sal_Bool > SequenceBoolean; + +} } } diff --git a/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/SequenceBoolean.hpp b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/SequenceBoolean.hpp new file mode 100644 index 000000000000..e5835183f7f0 --- /dev/null +++ b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/SequenceBoolean.hpp @@ -0,0 +1,11 @@ +#pragma once + +#include "sal/config.h" + +#include "test/codemaker/codemakertests/SequenceBoolean.hdl" + +#include "test/codemaker/codemakertests/Boolean.hpp" +#include "com/sun/star/uno/Sequence.hxx" +#include "com/sun/star/uno/Type.hxx" +#include "cppu/unotype.hxx" + diff --git a/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/SequenceByte.hdl b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/SequenceByte.hdl new file mode 100644 index 000000000000..ef2087b3fe58 --- /dev/null +++ b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/SequenceByte.hdl @@ -0,0 +1,13 @@ +#pragma once + +#include "sal/config.h" + +#include "test/codemaker/codemakertests/Byte.hdl" +#include "com/sun/star/uno/Sequence.h" +#include "cppu/macros.hxx" + +namespace test { namespace codemaker { namespace codemakertests { + +typedef ::css::uno::Sequence< ::sal_Int8 > SequenceByte; + +} } } diff --git a/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/SequenceByte.hpp b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/SequenceByte.hpp new file mode 100644 index 000000000000..d68226604f8c --- /dev/null +++ b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/SequenceByte.hpp @@ -0,0 +1,11 @@ +#pragma once + +#include "sal/config.h" + +#include "test/codemaker/codemakertests/SequenceByte.hdl" + +#include "test/codemaker/codemakertests/Byte.hpp" +#include "com/sun/star/uno/Sequence.hxx" +#include "com/sun/star/uno/Type.hxx" +#include "cppu/unotype.hxx" + diff --git a/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/SequenceChar.hdl b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/SequenceChar.hdl new file mode 100644 index 000000000000..6359e2a5c186 --- /dev/null +++ b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/SequenceChar.hdl @@ -0,0 +1,13 @@ +#pragma once + +#include "sal/config.h" + +#include "test/codemaker/codemakertests/Char.hdl" +#include "com/sun/star/uno/Sequence.h" +#include "cppu/macros.hxx" + +namespace test { namespace codemaker { namespace codemakertests { + +typedef ::css::uno::Sequence< ::sal_Unicode > SequenceChar; + +} } } diff --git a/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/SequenceChar.hpp b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/SequenceChar.hpp new file mode 100644 index 000000000000..9ba4f38cc749 --- /dev/null +++ b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/SequenceChar.hpp @@ -0,0 +1,11 @@ +#pragma once + +#include "sal/config.h" + +#include "test/codemaker/codemakertests/SequenceChar.hdl" + +#include "test/codemaker/codemakertests/Char.hpp" +#include "com/sun/star/uno/Sequence.hxx" +#include "com/sun/star/uno/Type.hxx" +#include "cppu/unotype.hxx" + diff --git a/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/SequenceDouble.hdl b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/SequenceDouble.hdl new file mode 100644 index 000000000000..a0e8a842c1b4 --- /dev/null +++ b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/SequenceDouble.hdl @@ -0,0 +1,13 @@ +#pragma once + +#include "sal/config.h" + +#include "test/codemaker/codemakertests/Double.hdl" +#include "com/sun/star/uno/Sequence.h" +#include "cppu/macros.hxx" + +namespace test { namespace codemaker { namespace codemakertests { + +typedef ::css::uno::Sequence< double > SequenceDouble; + +} } } diff --git a/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/SequenceDouble.hpp b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/SequenceDouble.hpp new file mode 100644 index 000000000000..86b56f4d3704 --- /dev/null +++ b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/SequenceDouble.hpp @@ -0,0 +1,11 @@ +#pragma once + +#include "sal/config.h" + +#include "test/codemaker/codemakertests/SequenceDouble.hdl" + +#include "test/codemaker/codemakertests/Double.hpp" +#include "com/sun/star/uno/Sequence.hxx" +#include "com/sun/star/uno/Type.hxx" +#include "cppu/unotype.hxx" + diff --git a/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/SequenceEnum.hdl b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/SequenceEnum.hdl new file mode 100644 index 000000000000..8103464b4709 --- /dev/null +++ b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/SequenceEnum.hdl @@ -0,0 +1,13 @@ +#pragma once + +#include "sal/config.h" + +#include "test/codemaker/codemakertests/Enum.hdl" +#include "com/sun/star/uno/Sequence.h" +#include "cppu/macros.hxx" + +namespace test { namespace codemaker { namespace codemakertests { + +typedef ::css::uno::Sequence< ::test::codemaker::codemakertests::Enum2 > SequenceEnum; + +} } } diff --git a/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/SequenceEnum.hpp b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/SequenceEnum.hpp new file mode 100644 index 000000000000..d80d416cc4cf --- /dev/null +++ b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/SequenceEnum.hpp @@ -0,0 +1,11 @@ +#pragma once + +#include "sal/config.h" + +#include "test/codemaker/codemakertests/SequenceEnum.hdl" + +#include "test/codemaker/codemakertests/Enum.hpp" +#include "com/sun/star/uno/Sequence.hxx" +#include "com/sun/star/uno/Type.hxx" +#include "cppu/unotype.hxx" + diff --git a/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/SequenceFloat.hdl b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/SequenceFloat.hdl new file mode 100644 index 000000000000..c79d816747c6 --- /dev/null +++ b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/SequenceFloat.hdl @@ -0,0 +1,13 @@ +#pragma once + +#include "sal/config.h" + +#include "test/codemaker/codemakertests/Float.hdl" +#include "com/sun/star/uno/Sequence.h" +#include "cppu/macros.hxx" + +namespace test { namespace codemaker { namespace codemakertests { + +typedef ::css::uno::Sequence< float > SequenceFloat; + +} } } diff --git a/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/SequenceFloat.hpp b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/SequenceFloat.hpp new file mode 100644 index 000000000000..df5c36b636e0 --- /dev/null +++ b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/SequenceFloat.hpp @@ -0,0 +1,11 @@ +#pragma once + +#include "sal/config.h" + +#include "test/codemaker/codemakertests/SequenceFloat.hdl" + +#include "test/codemaker/codemakertests/Float.hpp" +#include "com/sun/star/uno/Sequence.hxx" +#include "com/sun/star/uno/Type.hxx" +#include "cppu/unotype.hxx" + diff --git a/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/SequenceHyper.hdl b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/SequenceHyper.hdl new file mode 100644 index 000000000000..f0053217cc40 --- /dev/null +++ b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/SequenceHyper.hdl @@ -0,0 +1,13 @@ +#pragma once + +#include "sal/config.h" + +#include "test/codemaker/codemakertests/Hyper.hdl" +#include "com/sun/star/uno/Sequence.h" +#include "cppu/macros.hxx" + +namespace test { namespace codemaker { namespace codemakertests { + +typedef ::css::uno::Sequence< ::sal_Int64 > SequenceHyper; + +} } } diff --git a/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/SequenceHyper.hpp b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/SequenceHyper.hpp new file mode 100644 index 000000000000..fc9f06d9e3d9 --- /dev/null +++ b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/SequenceHyper.hpp @@ -0,0 +1,11 @@ +#pragma once + +#include "sal/config.h" + +#include "test/codemaker/codemakertests/SequenceHyper.hdl" + +#include "test/codemaker/codemakertests/Hyper.hpp" +#include "com/sun/star/uno/Sequence.hxx" +#include "com/sun/star/uno/Type.hxx" +#include "cppu/unotype.hxx" + diff --git a/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/SequenceLong.hdl b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/SequenceLong.hdl new file mode 100644 index 000000000000..413f62ea2219 --- /dev/null +++ b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/SequenceLong.hdl @@ -0,0 +1,13 @@ +#pragma once + +#include "sal/config.h" + +#include "test/codemaker/codemakertests/Long.hdl" +#include "com/sun/star/uno/Sequence.h" +#include "cppu/macros.hxx" + +namespace test { namespace codemaker { namespace codemakertests { + +typedef ::css::uno::Sequence< ::sal_Int32 > SequenceLong; + +} } } diff --git a/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/SequenceLong.hpp b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/SequenceLong.hpp new file mode 100644 index 000000000000..34b718c722ec --- /dev/null +++ b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/SequenceLong.hpp @@ -0,0 +1,11 @@ +#pragma once + +#include "sal/config.h" + +#include "test/codemaker/codemakertests/SequenceLong.hdl" + +#include "test/codemaker/codemakertests/Long.hpp" +#include "com/sun/star/uno/Sequence.hxx" +#include "com/sun/star/uno/Type.hxx" +#include "cppu/unotype.hxx" + diff --git a/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/SequenceShort.hdl b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/SequenceShort.hdl new file mode 100644 index 000000000000..3355c8906038 --- /dev/null +++ b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/SequenceShort.hdl @@ -0,0 +1,13 @@ +#pragma once + +#include "sal/config.h" + +#include "test/codemaker/codemakertests/Short.hdl" +#include "com/sun/star/uno/Sequence.h" +#include "cppu/macros.hxx" + +namespace test { namespace codemaker { namespace codemakertests { + +typedef ::css::uno::Sequence< ::sal_Int16 > SequenceShort; + +} } } diff --git a/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/SequenceShort.hpp b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/SequenceShort.hpp new file mode 100644 index 000000000000..c3ad5e4b90cf --- /dev/null +++ b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/SequenceShort.hpp @@ -0,0 +1,11 @@ +#pragma once + +#include "sal/config.h" + +#include "test/codemaker/codemakertests/SequenceShort.hdl" + +#include "test/codemaker/codemakertests/Short.hpp" +#include "com/sun/star/uno/Sequence.hxx" +#include "com/sun/star/uno/Type.hxx" +#include "cppu/unotype.hxx" + diff --git a/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/SequenceString.hdl b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/SequenceString.hdl new file mode 100644 index 000000000000..d012e803cb4d --- /dev/null +++ b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/SequenceString.hdl @@ -0,0 +1,13 @@ +#pragma once + +#include "sal/config.h" + +#include "test/codemaker/codemakertests/String.hdl" +#include "com/sun/star/uno/Sequence.h" +#include "cppu/macros.hxx" + +namespace test { namespace codemaker { namespace codemakertests { + +typedef ::css::uno::Sequence< ::rtl::OUString > SequenceString; + +} } } diff --git a/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/SequenceString.hpp b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/SequenceString.hpp new file mode 100644 index 000000000000..7d6f2c491da3 --- /dev/null +++ b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/SequenceString.hpp @@ -0,0 +1,11 @@ +#pragma once + +#include "sal/config.h" + +#include "test/codemaker/codemakertests/SequenceString.hdl" + +#include "test/codemaker/codemakertests/String.hpp" +#include "com/sun/star/uno/Sequence.hxx" +#include "com/sun/star/uno/Type.hxx" +#include "cppu/unotype.hxx" + diff --git a/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/SequenceStruct.hdl b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/SequenceStruct.hdl new file mode 100644 index 000000000000..96317ff98711 --- /dev/null +++ b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/SequenceStruct.hdl @@ -0,0 +1,13 @@ +#pragma once + +#include "sal/config.h" + +#include "test/codemaker/codemakertests/Struct.hdl" +#include "com/sun/star/uno/Sequence.h" +#include "cppu/macros.hxx" + +namespace test { namespace codemaker { namespace codemakertests { + +typedef ::css::uno::Sequence< ::test::codemaker::codemakertests::Struct1 > SequenceStruct; + +} } } diff --git a/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/SequenceStruct.hpp b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/SequenceStruct.hpp new file mode 100644 index 000000000000..da68e13ff91a --- /dev/null +++ b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/SequenceStruct.hpp @@ -0,0 +1,11 @@ +#pragma once + +#include "sal/config.h" + +#include "test/codemaker/codemakertests/SequenceStruct.hdl" + +#include "test/codemaker/codemakertests/Struct.hpp" +#include "com/sun/star/uno/Sequence.hxx" +#include "com/sun/star/uno/Type.hxx" +#include "cppu/unotype.hxx" + diff --git a/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/SequenceType.hdl b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/SequenceType.hdl new file mode 100644 index 000000000000..f6046ae760ac --- /dev/null +++ b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/SequenceType.hdl @@ -0,0 +1,13 @@ +#pragma once + +#include "sal/config.h" + +#include "test/codemaker/codemakertests/Type.hdl" +#include "com/sun/star/uno/Sequence.h" +#include "cppu/macros.hxx" + +namespace test { namespace codemaker { namespace codemakertests { + +typedef ::css::uno::Sequence< ::css::uno::Type > SequenceType; + +} } } diff --git a/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/SequenceType.hpp b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/SequenceType.hpp new file mode 100644 index 000000000000..8a456ea779bb --- /dev/null +++ b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/SequenceType.hpp @@ -0,0 +1,11 @@ +#pragma once + +#include "sal/config.h" + +#include "test/codemaker/codemakertests/SequenceType.hdl" + +#include "test/codemaker/codemakertests/Type.hpp" +#include "com/sun/star/uno/Sequence.hxx" +#include "com/sun/star/uno/Type.hxx" +#include "cppu/unotype.hxx" + diff --git a/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/SequenceUnsignedHyper.hdl b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/SequenceUnsignedHyper.hdl new file mode 100644 index 000000000000..bf8d4f67b311 --- /dev/null +++ b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/SequenceUnsignedHyper.hdl @@ -0,0 +1,13 @@ +#pragma once + +#include "sal/config.h" + +#include "test/codemaker/codemakertests/UnsignedHyper.hdl" +#include "com/sun/star/uno/Sequence.h" +#include "cppu/macros.hxx" + +namespace test { namespace codemaker { namespace codemakertests { + +typedef ::css::uno::Sequence< ::sal_uInt64 > SequenceUnsignedHyper; + +} } } diff --git a/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/SequenceUnsignedHyper.hpp b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/SequenceUnsignedHyper.hpp new file mode 100644 index 000000000000..bef888295f3b --- /dev/null +++ b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/SequenceUnsignedHyper.hpp @@ -0,0 +1,11 @@ +#pragma once + +#include "sal/config.h" + +#include "test/codemaker/codemakertests/SequenceUnsignedHyper.hdl" + +#include "test/codemaker/codemakertests/UnsignedHyper.hpp" +#include "com/sun/star/uno/Sequence.hxx" +#include "com/sun/star/uno/Type.hxx" +#include "cppu/unotype.hxx" + diff --git a/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/SequenceUnsignedLong.hdl b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/SequenceUnsignedLong.hdl new file mode 100644 index 000000000000..dc61c6943c7f --- /dev/null +++ b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/SequenceUnsignedLong.hdl @@ -0,0 +1,13 @@ +#pragma once + +#include "sal/config.h" + +#include "test/codemaker/codemakertests/UnsignedLong.hdl" +#include "com/sun/star/uno/Sequence.h" +#include "cppu/macros.hxx" + +namespace test { namespace codemaker { namespace codemakertests { + +typedef ::css::uno::Sequence< ::sal_uInt32 > SequenceUnsignedLong; + +} } } diff --git a/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/SequenceUnsignedLong.hpp b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/SequenceUnsignedLong.hpp new file mode 100644 index 000000000000..085605f36fc0 --- /dev/null +++ b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/SequenceUnsignedLong.hpp @@ -0,0 +1,11 @@ +#pragma once + +#include "sal/config.h" + +#include "test/codemaker/codemakertests/SequenceUnsignedLong.hdl" + +#include "test/codemaker/codemakertests/UnsignedLong.hpp" +#include "com/sun/star/uno/Sequence.hxx" +#include "com/sun/star/uno/Type.hxx" +#include "cppu/unotype.hxx" + diff --git a/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/SequenceUnsignedShort.hdl b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/SequenceUnsignedShort.hdl new file mode 100644 index 000000000000..3cebbd75f23b --- /dev/null +++ b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/SequenceUnsignedShort.hdl @@ -0,0 +1,13 @@ +#pragma once + +#include "sal/config.h" + +#include "test/codemaker/codemakertests/UnsignedShort.hdl" +#include "com/sun/star/uno/Sequence.h" +#include "cppu/macros.hxx" + +namespace test { namespace codemaker { namespace codemakertests { + +typedef ::css::uno::Sequence< ::sal_uInt16 > SequenceUnsignedShort; + +} } } diff --git a/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/SequenceUnsignedShort.hpp b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/SequenceUnsignedShort.hpp new file mode 100644 index 000000000000..9a92f6972737 --- /dev/null +++ b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/SequenceUnsignedShort.hpp @@ -0,0 +1,11 @@ +#pragma once + +#include "sal/config.h" + +#include "test/codemaker/codemakertests/SequenceUnsignedShort.hdl" + +#include "test/codemaker/codemakertests/UnsignedShort.hpp" +#include "com/sun/star/uno/Sequence.hxx" +#include "com/sun/star/uno/Type.hxx" +#include "cppu/unotype.hxx" + diff --git a/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/SequenceXInterface.hdl b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/SequenceXInterface.hdl new file mode 100644 index 000000000000..c7869b9c7403 --- /dev/null +++ b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/SequenceXInterface.hdl @@ -0,0 +1,13 @@ +#pragma once + +#include "sal/config.h" + +#include "test/codemaker/codemakertests/XInterface.hdl" +#include "com/sun/star/uno/Sequence.h" +#include "cppu/macros.hxx" + +namespace test { namespace codemaker { namespace codemakertests { + +typedef ::css::uno::Sequence< ::css::uno::Reference< ::css::uno::XInterface > > SequenceXInterface; + +} } } diff --git a/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/SequenceXInterface.hpp b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/SequenceXInterface.hpp new file mode 100644 index 000000000000..eed68e38bc89 --- /dev/null +++ b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/SequenceXInterface.hpp @@ -0,0 +1,11 @@ +#pragma once + +#include "sal/config.h" + +#include "test/codemaker/codemakertests/SequenceXInterface.hdl" + +#include "test/codemaker/codemakertests/XInterface.hpp" +#include "com/sun/star/uno/Sequence.hxx" +#include "com/sun/star/uno/Type.hxx" +#include "cppu/unotype.hxx" + diff --git a/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/SequenceXNamingService.hdl b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/SequenceXNamingService.hdl new file mode 100644 index 000000000000..8fab9b7abdce --- /dev/null +++ b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/SequenceXNamingService.hdl @@ -0,0 +1,13 @@ +#pragma once + +#include "sal/config.h" + +#include "test/codemaker/codemakertests/XNamingService.hdl" +#include "com/sun/star/uno/Sequence.h" +#include "cppu/macros.hxx" + +namespace test { namespace codemaker { namespace codemakertests { + +typedef ::css::uno::Sequence< ::css::uno::Reference< ::css::uno::XNamingService > > SequenceXNamingService; + +} } } diff --git a/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/SequenceXNamingService.hpp b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/SequenceXNamingService.hpp new file mode 100644 index 000000000000..8aa9c7caec7a --- /dev/null +++ b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/SequenceXNamingService.hpp @@ -0,0 +1,11 @@ +#pragma once + +#include "sal/config.h" + +#include "test/codemaker/codemakertests/SequenceXNamingService.hdl" + +#include "test/codemaker/codemakertests/XNamingService.hpp" +#include "com/sun/star/uno/Sequence.hxx" +#include "com/sun/star/uno/Type.hxx" +#include "cppu/unotype.hxx" + diff --git a/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/Service.hpp b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/Service.hpp new file mode 100644 index 000000000000..389a9db20627 --- /dev/null +++ b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/Service.hpp @@ -0,0 +1,63 @@ +#pragma once + +#include "sal/config.h" + +#include + +#include "com/sun/star/uno/DeploymentException.hpp" +#include "com/sun/star/uno/Exception.hpp" +#include "com/sun/star/uno/RuntimeException.hpp" +#include "com/sun/star/uno/XComponentContext.hpp" +#include "com/sun/star/uno/XInterface.hpp" +#include "com/sun/star/uno/Any.hxx" +#include "com/sun/star/uno/Reference.hxx" +#include "com/sun/star/uno/Sequence.hxx" +#include "cppu/unotype.hxx" +#include "rtl/ustring.h" +#include "rtl/ustring.hxx" + +#if defined ANDROID || defined IOS //TODO +#include +#include +#endif + +#if defined LO_URE_CURRENT_ENV && defined LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_Service && (LO_URE_CURRENT_ENV) == (LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_Service) && defined LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_Service +extern "C" ::css::uno::XInterface * SAL_CALL LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_Service(::css::uno::XComponentContext *, ::css::uno::Sequence< ::css::uno::Any > const &); +#endif + +namespace test { namespace codemaker { namespace codemakertests { + +class Service { +public: + static ::css::uno::Reference< ::css::uno::XInterface > create(::css::uno::Reference< ::css::uno::XComponentContext > const & the_context, const ::css::uno::Sequence< ::css::uno::Any >& args) { + assert(the_context.is()); + ::css::uno::Reference< ::css::uno::XInterface > the_instance; + try { +#if defined LO_URE_CURRENT_ENV && defined LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_Service && (LO_URE_CURRENT_ENV) == (LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_Service) && defined LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_Service + the_instance = ::css::uno::Reference< ::css::uno::XInterface >(::css::uno::Reference< ::css::uno::XInterface >(static_cast< ::css::uno::XInterface * >((*LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_Service)(the_context.get(), args)), ::SAL_NO_ACQUIRE), ::css::uno::UNO_QUERY); + ::css::uno::Reference< ::css::lang::XInitialization > init(the_instance, ::css::uno::UNO_QUERY); + if (init.is()) { + init->initialize(the_arguments); + } +#else + the_instance = ::css::uno::Reference< ::css::uno::XInterface >(the_context->getServiceManager()->createInstanceWithArgumentsAndContext( "test.codemaker.codemakertests.Service", args, the_context), ::css::uno::UNO_QUERY); +#endif + } catch (const ::css::uno::RuntimeException &) { + throw; + } catch (const ::css::uno::Exception & the_exception) { + throw ::css::uno::DeploymentException(::rtl::OUString("component context fails to supply service ") + "test.codemaker.codemakertests.Service" + " of type " + "com.sun.star.uno.XInterface" + ": " + the_exception.Message, the_context); + } + if (!the_instance.is()) { + throw ::css::uno::DeploymentException(::rtl::OUString("component context fails to supply service ") + "test.codemaker.codemakertests.Service" + " of type " + "com.sun.star.uno.XInterface", the_context); + } + return the_instance; + } + +private: + Service(); // not implemented + Service(Service &); // not implemented + ~Service(); // not implemented + void operator =(Service); // not implemented +}; + +} } } diff --git a/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/Short.hdl b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/Short.hdl new file mode 100644 index 000000000000..626dadc4282b --- /dev/null +++ b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/Short.hdl @@ -0,0 +1,12 @@ +#pragma once + +#include "sal/config.h" + +#include "cppu/macros.hxx" +#include "sal/types.h" + +namespace test { namespace codemaker { namespace codemakertests { + +typedef ::sal_Int16 Short; + +} } } diff --git a/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/Short.hpp b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/Short.hpp new file mode 100644 index 000000000000..b4f7a25b7d36 --- /dev/null +++ b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/Short.hpp @@ -0,0 +1,10 @@ +#pragma once + +#include "sal/config.h" + +#include "test/codemaker/codemakertests/Short.hdl" + +#include "com/sun/star/uno/Type.hxx" +#include "cppu/unotype.hxx" +#include "sal/types.h" + diff --git a/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/String.hdl b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/String.hdl new file mode 100644 index 000000000000..f9ec9e033516 --- /dev/null +++ b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/String.hdl @@ -0,0 +1,12 @@ +#pragma once + +#include "sal/config.h" + +#include "cppu/macros.hxx" +#include "rtl/ustring.hxx" + +namespace test { namespace codemaker { namespace codemakertests { + +typedef ::rtl::OUString String; + +} } } diff --git a/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/String.hpp b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/String.hpp new file mode 100644 index 000000000000..de94d4ac48c2 --- /dev/null +++ b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/String.hpp @@ -0,0 +1,10 @@ +#pragma once + +#include "sal/config.h" + +#include "test/codemaker/codemakertests/String.hdl" + +#include "com/sun/star/uno/Type.hxx" +#include "cppu/unotype.hxx" +#include "rtl/ustring.hxx" + diff --git a/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/Struct.hdl b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/Struct.hdl new file mode 100644 index 000000000000..19f145b49b6a --- /dev/null +++ b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/Struct.hdl @@ -0,0 +1,12 @@ +#pragma once + +#include "sal/config.h" + +#include "test/codemaker/codemakertests/Struct1.hdl" +#include "cppu/macros.hxx" + +namespace test { namespace codemaker { namespace codemakertests { + +typedef ::test::codemaker::codemakertests::Struct1 Struct; + +} } } diff --git a/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/Struct.hpp b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/Struct.hpp new file mode 100644 index 000000000000..615a0068f305 --- /dev/null +++ b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/Struct.hpp @@ -0,0 +1,10 @@ +#pragma once + +#include "sal/config.h" + +#include "test/codemaker/codemakertests/Struct.hdl" + +#include "test/codemaker/codemakertests/Struct1.hpp" +#include "com/sun/star/uno/Type.hxx" +#include "cppu/unotype.hxx" + diff --git a/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/Struct1.hdl b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/Struct1.hdl new file mode 100644 index 000000000000..4cd6b1a40a77 --- /dev/null +++ b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/Struct1.hdl @@ -0,0 +1,33 @@ +#pragma once + +#include "sal/config.h" + +#include "cppu/macros.hxx" +#include "sal/types.h" + +namespace com { namespace sun { namespace star { namespace uno { class Type; } } } } + +namespace test { namespace codemaker { namespace codemakertests { + +#ifdef _WIN32 +# pragma pack(push, 8) +#endif + +struct SAL_DLLPUBLIC_RTTI SAL_WARN_UNUSED Struct1 { + inline Struct1(); + + inline Struct1(const ::sal_Int32& member1_); + + ::sal_Int32 member1; +}; + +#ifdef _WIN32 +# pragma pack(pop) +#endif + + +inline ::css::uno::Type const & cppu_detail_getUnoType(SAL_UNUSED_PARAMETER ::test::codemaker::codemakertests::Struct1 const *); +} } } + +SAL_DEPRECATED("use cppu::UnoType") inline ::css::uno::Type const & SAL_CALL getCppuType(const ::test::codemaker::codemakertests::Struct1 *); + diff --git a/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/Struct1.hpp b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/Struct1.hpp new file mode 100644 index 000000000000..d40182ecd521 --- /dev/null +++ b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/Struct1.hpp @@ -0,0 +1,54 @@ +#pragma once + +#include "sal/config.h" + +#include "test/codemaker/codemakertests/Struct1.hdl" + +#include "com/sun/star/uno/Type.hxx" +#include "cppu/unotype.hxx" +#include "sal/types.h" +#include "typelib/typeclass.h" +#include "typelib/typedescription.h" + +namespace test { namespace codemaker { namespace codemakertests { + +inline Struct1::Struct1() + : member1(0) +{ +} + +inline Struct1::Struct1(const ::sal_Int32& member1_) + : member1(member1_) +{ +} + + +inline bool operator==(const Struct1& the_lhs, const Struct1& the_rhs) +{ + return the_lhs.member1 == the_rhs.member1; +} + +inline bool operator!=(const Struct1& the_lhs, const Struct1& the_rhs) +{ +return !operator==(the_lhs, the_rhs); +} +} } } + +namespace test { namespace codemaker { namespace codemakertests { + +inline ::css::uno::Type const & cppu_detail_getUnoType(SAL_UNUSED_PARAMETER ::test::codemaker::codemakertests::Struct1 const *) { + //TODO: On certain platforms with weak memory models, the following code can result in some threads observing that the_type points to garbage + static ::typelib_TypeDescriptionReference * the_type = 0; + if (the_type == 0) { + ::typelib_TypeDescriptionReference * the_members[] = { + ::cppu::UnoType< ::sal_Int32 >::get().getTypeLibType() }; + ::typelib_static_struct_type_init(&the_type, "test.codemaker.codemakertests.Struct1", 0, 1, the_members, 0); + } + return *reinterpret_cast< ::css::uno::Type * >(&the_type); +} + +} } } + +SAL_DEPRECATED("use cppu::UnoType") inline ::css::uno::Type const & SAL_CALL getCppuType(SAL_UNUSED_PARAMETER ::test::codemaker::codemakertests::Struct1 const *) { + return ::cppu::UnoType< ::test::codemaker::codemakertests::Struct1 >::get(); +} diff --git a/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/Struct2.hdl b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/Struct2.hdl new file mode 100644 index 000000000000..a633fc0c384f --- /dev/null +++ b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/Struct2.hdl @@ -0,0 +1,167 @@ +#pragma once + +#include "sal/config.h" + +namespace com { namespace sun { namespace star { namespace uno { class XInterface; } } } } +namespace com { namespace sun { namespace star { namespace uno { class XNamingService; } } } } +#include "test/codemaker/codemakertests/Any.hdl" +#include "test/codemaker/codemakertests/Boolean.hdl" +#include "test/codemaker/codemakertests/Byte.hdl" +#include "test/codemaker/codemakertests/Char.hdl" +#include "test/codemaker/codemakertests/Double.hdl" +#include "test/codemaker/codemakertests/Enum.hdl" +#include "test/codemaker/codemakertests/Enum2.hdl" +#include "test/codemaker/codemakertests/Float.hdl" +#include "test/codemaker/codemakertests/Hyper.hdl" +#include "test/codemaker/codemakertests/Long.hdl" +#include "test/codemaker/codemakertests/SequenceAny.hdl" +#include "test/codemaker/codemakertests/SequenceBoolean.hdl" +#include "test/codemaker/codemakertests/SequenceByte.hdl" +#include "test/codemaker/codemakertests/SequenceChar.hdl" +#include "test/codemaker/codemakertests/SequenceDouble.hdl" +#include "test/codemaker/codemakertests/SequenceEnum.hdl" +#include "test/codemaker/codemakertests/SequenceFloat.hdl" +#include "test/codemaker/codemakertests/SequenceHyper.hdl" +#include "test/codemaker/codemakertests/SequenceLong.hdl" +#include "test/codemaker/codemakertests/SequenceShort.hdl" +#include "test/codemaker/codemakertests/SequenceString.hdl" +#include "test/codemaker/codemakertests/SequenceStruct.hdl" +#include "test/codemaker/codemakertests/SequenceType.hdl" +#include "test/codemaker/codemakertests/SequenceUnsignedHyper.hdl" +#include "test/codemaker/codemakertests/SequenceUnsignedLong.hdl" +#include "test/codemaker/codemakertests/SequenceUnsignedShort.hdl" +#include "test/codemaker/codemakertests/SequenceXInterface.hdl" +#include "test/codemaker/codemakertests/SequenceXNamingService.hdl" +#include "test/codemaker/codemakertests/Short.hdl" +#include "test/codemaker/codemakertests/String.hdl" +#include "test/codemaker/codemakertests/Struct.hdl" +#include "test/codemaker/codemakertests/Struct1.hdl" +#include "test/codemaker/codemakertests/Type.hdl" +#include "test/codemaker/codemakertests/UnsignedHyper.hdl" +#include "test/codemaker/codemakertests/UnsignedLong.hdl" +#include "test/codemaker/codemakertests/UnsignedShort.hdl" +#include "test/codemaker/codemakertests/XInterface.hdl" +#include "test/codemaker/codemakertests/XNamingService.hdl" +#include "com/sun/star/uno/Any.h" +#include "com/sun/star/uno/Reference.h" +#include "com/sun/star/uno/Sequence.h" +#include "com/sun/star/uno/Type.h" +#include "cppu/macros.hxx" +#include "rtl/ustring.hxx" +#include "sal/types.h" + +namespace com { namespace sun { namespace star { namespace uno { class Type; } } } } + +namespace test { namespace codemaker { namespace codemakertests { + +#ifdef _WIN32 +# pragma pack(push, 8) +#endif + +struct SAL_DLLPUBLIC_RTTI Struct2 { + inline Struct2(); + + inline Struct2(const ::sal_Bool& p1_, const ::sal_Int8& p2_, const ::sal_Int16& p3_, const ::sal_uInt16& p4_, const ::sal_Int32& p5_, const ::sal_uInt32& p6_, const ::sal_Int64& p7_, const ::sal_uInt64& p8_, const float& p9_, const double& p10_, const ::sal_Unicode& p11_, const ::rtl::OUString& p12_, const ::css::uno::Type& p13_, const ::css::uno::Any& p14_, const ::test::codemaker::codemakertests::Enum2& p15_, const ::test::codemaker::codemakertests::Struct1& p16_, const ::css::uno::Reference< ::css::uno::XInterface >& p17_, const ::css::uno::Reference< ::css::uno::XNamingService >& p18_, const ::sal_Bool& t1_, const ::sal_Int8& t2_, const ::sal_Int16& t3_, const ::sal_uInt16& t4_, const ::sal_Int32& t5_, const ::sal_uInt32& t6_, const ::sal_Int64& t7_, const ::sal_uInt64& t8_, const float& t9_, const double& t10_, const ::sal_Unicode& t11_, const ::rtl::OUString& t12_, const ::css::uno::Type& t13_, const ::css::uno::Any& t14_, const ::test::codemaker::codemakertests::Enum2& t15_, const ::test::codemaker::codemakertests::Struct1& t16_, const ::css::uno::Reference< ::css::uno::XInterface >& t17_, const ::css::uno::Reference< ::css::uno::XNamingService >& t18_, const ::css::uno::Sequence< ::sal_Bool >& a1_, const ::css::uno::Sequence< ::sal_Int8 >& a2_, const ::css::uno::Sequence< ::sal_Int16 >& a3_, const ::css::uno::Sequence< ::sal_uInt16 >& a4_, const ::css::uno::Sequence< ::sal_Int32 >& a5_, const ::css::uno::Sequence< ::sal_uInt32 >& a6_, const ::css::uno::Sequence< ::sal_Int64 >& a7_, const ::css::uno::Sequence< ::sal_uInt64 >& a8_, const ::css::uno::Sequence< float >& a9_, const ::css::uno::Sequence< double >& a10_, const ::css::uno::Sequence< ::sal_Unicode >& a11_, const ::css::uno::Sequence< ::rtl::OUString >& a12_, const ::css::uno::Sequence< ::css::uno::Type >& a13_, const ::css::uno::Sequence< ::css::uno::Any >& a14_, const ::css::uno::Sequence< ::test::codemaker::codemakertests::Enum2 >& a15_, const ::css::uno::Sequence< ::test::codemaker::codemakertests::Struct1 >& a16_, const ::css::uno::Sequence< ::css::uno::Reference< ::css::uno::XInterface > >& a17_, const ::css::uno::Sequence< ::css::uno::Reference< ::css::uno::XNamingService > >& a18_, const ::css::uno::Sequence< ::css::uno::Sequence< ::sal_Bool > >& aa1_, const ::css::uno::Sequence< ::css::uno::Sequence< ::sal_Int8 > >& aa2_, const ::css::uno::Sequence< ::css::uno::Sequence< ::sal_Int16 > >& aa3_, const ::css::uno::Sequence< ::css::uno::Sequence< ::sal_uInt16 > >& aa4_, const ::css::uno::Sequence< ::css::uno::Sequence< ::sal_Int32 > >& aa5_, const ::css::uno::Sequence< ::css::uno::Sequence< ::sal_uInt32 > >& aa6_, const ::css::uno::Sequence< ::css::uno::Sequence< ::sal_Int64 > >& aa7_, const ::css::uno::Sequence< ::css::uno::Sequence< ::sal_uInt64 > >& aa8_, const ::css::uno::Sequence< ::css::uno::Sequence< float > >& aa9_, const ::css::uno::Sequence< ::css::uno::Sequence< double > >& aa10_, const ::css::uno::Sequence< ::css::uno::Sequence< ::sal_Unicode > >& aa11_, const ::css::uno::Sequence< ::css::uno::Sequence< ::rtl::OUString > >& aa12_, const ::css::uno::Sequence< ::css::uno::Sequence< ::css::uno::Type > >& aa13_, const ::css::uno::Sequence< ::css::uno::Sequence< ::css::uno::Any > >& aa14_, const ::css::uno::Sequence< ::css::uno::Sequence< ::test::codemaker::codemakertests::Enum2 > >& aa15_, const ::css::uno::Sequence< ::css::uno::Sequence< ::test::codemaker::codemakertests::Struct1 > >& aa16_, const ::css::uno::Sequence< ::css::uno::Sequence< ::css::uno::Reference< ::css::uno::XInterface > > >& aa17_, const ::css::uno::Sequence< ::css::uno::Sequence< ::css::uno::Reference< ::css::uno::XNamingService > > >& aa18_, const ::css::uno::Sequence< ::css::uno::Sequence< ::sal_Bool > >& at1_, const ::css::uno::Sequence< ::css::uno::Sequence< ::sal_Int8 > >& at2_, const ::css::uno::Sequence< ::css::uno::Sequence< ::sal_Int16 > >& at3_, const ::css::uno::Sequence< ::css::uno::Sequence< ::sal_uInt16 > >& at4_, const ::css::uno::Sequence< ::css::uno::Sequence< ::sal_Int32 > >& at5_, const ::css::uno::Sequence< ::css::uno::Sequence< ::sal_uInt32 > >& at6_, const ::css::uno::Sequence< ::css::uno::Sequence< ::sal_Int64 > >& at7_, const ::css::uno::Sequence< ::css::uno::Sequence< ::sal_uInt64 > >& at8_, const ::css::uno::Sequence< ::css::uno::Sequence< float > >& at9_, const ::css::uno::Sequence< ::css::uno::Sequence< double > >& at10_, const ::css::uno::Sequence< ::css::uno::Sequence< ::sal_Unicode > >& at11_, const ::css::uno::Sequence< ::css::uno::Sequence< ::rtl::OUString > >& at12_, const ::css::uno::Sequence< ::css::uno::Sequence< ::css::uno::Type > >& at13_, const ::css::uno::Sequence< ::css::uno::Sequence< ::css::uno::Any > >& at14_, const ::css::uno::Sequence< ::css::uno::Sequence< ::test::codemaker::codemakertests::Enum2 > >& at15_, const ::css::uno::Sequence< ::css::uno::Sequence< ::test::codemaker::codemakertests::Struct1 > >& at16_, const ::css::uno::Sequence< ::css::uno::Sequence< ::css::uno::Reference< ::css::uno::XInterface > > >& at17_, const ::css::uno::Sequence< ::css::uno::Sequence< ::css::uno::Reference< ::css::uno::XNamingService > > >& at18_); + + ::sal_Bool p1; + ::sal_Int8 p2; + ::sal_Int16 p3; + ::sal_uInt16 p4; + ::sal_Int32 p5; + ::sal_uInt32 p6; + ::sal_Int64 p7; + ::sal_uInt64 p8; + float p9; + double p10; + ::sal_Unicode p11; + ::rtl::OUString p12; + ::css::uno::Type p13; + ::css::uno::Any p14; + ::test::codemaker::codemakertests::Enum2 p15; + ::test::codemaker::codemakertests::Struct1 p16; + ::css::uno::Reference< ::css::uno::XInterface > p17; + ::css::uno::Reference< ::css::uno::XNamingService > p18; + ::sal_Bool t1; + ::sal_Int8 t2; + ::sal_Int16 t3; + ::sal_uInt16 t4; + ::sal_Int32 t5; + ::sal_uInt32 t6; + ::sal_Int64 t7; + ::sal_uInt64 t8; + float t9; + double t10; + ::sal_Unicode t11; + ::rtl::OUString t12; + ::css::uno::Type t13; + ::css::uno::Any t14; + ::test::codemaker::codemakertests::Enum2 t15; + ::test::codemaker::codemakertests::Struct1 t16; + ::css::uno::Reference< ::css::uno::XInterface > t17; + ::css::uno::Reference< ::css::uno::XNamingService > t18; + ::css::uno::Sequence< ::sal_Bool > a1; + ::css::uno::Sequence< ::sal_Int8 > a2; + ::css::uno::Sequence< ::sal_Int16 > a3; + ::css::uno::Sequence< ::sal_uInt16 > a4; + ::css::uno::Sequence< ::sal_Int32 > a5; + ::css::uno::Sequence< ::sal_uInt32 > a6; + ::css::uno::Sequence< ::sal_Int64 > a7; + ::css::uno::Sequence< ::sal_uInt64 > a8; + ::css::uno::Sequence< float > a9; + ::css::uno::Sequence< double > a10; + ::css::uno::Sequence< ::sal_Unicode > a11; + ::css::uno::Sequence< ::rtl::OUString > a12; + ::css::uno::Sequence< ::css::uno::Type > a13; + ::css::uno::Sequence< ::css::uno::Any > a14; + ::css::uno::Sequence< ::test::codemaker::codemakertests::Enum2 > a15; + ::css::uno::Sequence< ::test::codemaker::codemakertests::Struct1 > a16; + ::css::uno::Sequence< ::css::uno::Reference< ::css::uno::XInterface > > a17; + ::css::uno::Sequence< ::css::uno::Reference< ::css::uno::XNamingService > > a18; + ::css::uno::Sequence< ::css::uno::Sequence< ::sal_Bool > > aa1; + ::css::uno::Sequence< ::css::uno::Sequence< ::sal_Int8 > > aa2; + ::css::uno::Sequence< ::css::uno::Sequence< ::sal_Int16 > > aa3; + ::css::uno::Sequence< ::css::uno::Sequence< ::sal_uInt16 > > aa4; + ::css::uno::Sequence< ::css::uno::Sequence< ::sal_Int32 > > aa5; + ::css::uno::Sequence< ::css::uno::Sequence< ::sal_uInt32 > > aa6; + ::css::uno::Sequence< ::css::uno::Sequence< ::sal_Int64 > > aa7; + ::css::uno::Sequence< ::css::uno::Sequence< ::sal_uInt64 > > aa8; + ::css::uno::Sequence< ::css::uno::Sequence< float > > aa9; + ::css::uno::Sequence< ::css::uno::Sequence< double > > aa10; + ::css::uno::Sequence< ::css::uno::Sequence< ::sal_Unicode > > aa11; + ::css::uno::Sequence< ::css::uno::Sequence< ::rtl::OUString > > aa12; + ::css::uno::Sequence< ::css::uno::Sequence< ::css::uno::Type > > aa13; + ::css::uno::Sequence< ::css::uno::Sequence< ::css::uno::Any > > aa14; + ::css::uno::Sequence< ::css::uno::Sequence< ::test::codemaker::codemakertests::Enum2 > > aa15; + ::css::uno::Sequence< ::css::uno::Sequence< ::test::codemaker::codemakertests::Struct1 > > aa16; + ::css::uno::Sequence< ::css::uno::Sequence< ::css::uno::Reference< ::css::uno::XInterface > > > aa17; + ::css::uno::Sequence< ::css::uno::Sequence< ::css::uno::Reference< ::css::uno::XNamingService > > > aa18; + ::css::uno::Sequence< ::css::uno::Sequence< ::sal_Bool > > at1; + ::css::uno::Sequence< ::css::uno::Sequence< ::sal_Int8 > > at2; + ::css::uno::Sequence< ::css::uno::Sequence< ::sal_Int16 > > at3; + ::css::uno::Sequence< ::css::uno::Sequence< ::sal_uInt16 > > at4; + ::css::uno::Sequence< ::css::uno::Sequence< ::sal_Int32 > > at5; + ::css::uno::Sequence< ::css::uno::Sequence< ::sal_uInt32 > > at6; + ::css::uno::Sequence< ::css::uno::Sequence< ::sal_Int64 > > at7; + ::css::uno::Sequence< ::css::uno::Sequence< ::sal_uInt64 > > at8; + ::css::uno::Sequence< ::css::uno::Sequence< float > > at9; + ::css::uno::Sequence< ::css::uno::Sequence< double > > at10; + ::css::uno::Sequence< ::css::uno::Sequence< ::sal_Unicode > > at11; + ::css::uno::Sequence< ::css::uno::Sequence< ::rtl::OUString > > at12; + ::css::uno::Sequence< ::css::uno::Sequence< ::css::uno::Type > > at13; + ::css::uno::Sequence< ::css::uno::Sequence< ::css::uno::Any > > at14; + ::css::uno::Sequence< ::css::uno::Sequence< ::test::codemaker::codemakertests::Enum2 > > at15; + ::css::uno::Sequence< ::css::uno::Sequence< ::test::codemaker::codemakertests::Struct1 > > at16; + ::css::uno::Sequence< ::css::uno::Sequence< ::css::uno::Reference< ::css::uno::XInterface > > > at17; + ::css::uno::Sequence< ::css::uno::Sequence< ::css::uno::Reference< ::css::uno::XNamingService > > > at18; +}; + +#ifdef _WIN32 +# pragma pack(pop) +#endif + + +inline ::css::uno::Type const & cppu_detail_getUnoType(SAL_UNUSED_PARAMETER ::test::codemaker::codemakertests::Struct2 const *); +} } } + +SAL_DEPRECATED("use cppu::UnoType") inline ::css::uno::Type const & SAL_CALL getCppuType(const ::test::codemaker::codemakertests::Struct2 *); + diff --git a/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/Struct2.hpp b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/Struct2.hpp new file mode 100644 index 000000000000..a2b79afd3ff3 --- /dev/null +++ b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/Struct2.hpp @@ -0,0 +1,454 @@ +#pragma once + +#include "sal/config.h" + +#include "test/codemaker/codemakertests/Struct2.hdl" + +#include "com/sun/star/uno/XInterface.hpp" +#include "com/sun/star/uno/XNamingService.hpp" +#include "test/codemaker/codemakertests/Any.hpp" +#include "test/codemaker/codemakertests/Boolean.hpp" +#include "test/codemaker/codemakertests/Byte.hpp" +#include "test/codemaker/codemakertests/Char.hpp" +#include "test/codemaker/codemakertests/Double.hpp" +#include "test/codemaker/codemakertests/Enum.hpp" +#include "test/codemaker/codemakertests/Enum2.hpp" +#include "test/codemaker/codemakertests/Float.hpp" +#include "test/codemaker/codemakertests/Hyper.hpp" +#include "test/codemaker/codemakertests/Long.hpp" +#include "test/codemaker/codemakertests/SequenceAny.hpp" +#include "test/codemaker/codemakertests/SequenceBoolean.hpp" +#include "test/codemaker/codemakertests/SequenceByte.hpp" +#include "test/codemaker/codemakertests/SequenceChar.hpp" +#include "test/codemaker/codemakertests/SequenceDouble.hpp" +#include "test/codemaker/codemakertests/SequenceEnum.hpp" +#include "test/codemaker/codemakertests/SequenceFloat.hpp" +#include "test/codemaker/codemakertests/SequenceHyper.hpp" +#include "test/codemaker/codemakertests/SequenceLong.hpp" +#include "test/codemaker/codemakertests/SequenceShort.hpp" +#include "test/codemaker/codemakertests/SequenceString.hpp" +#include "test/codemaker/codemakertests/SequenceStruct.hpp" +#include "test/codemaker/codemakertests/SequenceType.hpp" +#include "test/codemaker/codemakertests/SequenceUnsignedHyper.hpp" +#include "test/codemaker/codemakertests/SequenceUnsignedLong.hpp" +#include "test/codemaker/codemakertests/SequenceUnsignedShort.hpp" +#include "test/codemaker/codemakertests/SequenceXInterface.hpp" +#include "test/codemaker/codemakertests/SequenceXNamingService.hpp" +#include "test/codemaker/codemakertests/Short.hpp" +#include "test/codemaker/codemakertests/String.hpp" +#include "test/codemaker/codemakertests/Struct.hpp" +#include "test/codemaker/codemakertests/Struct1.hpp" +#include "test/codemaker/codemakertests/Type.hpp" +#include "test/codemaker/codemakertests/UnsignedHyper.hpp" +#include "test/codemaker/codemakertests/UnsignedLong.hpp" +#include "test/codemaker/codemakertests/UnsignedShort.hpp" +#include "test/codemaker/codemakertests/XInterface.hpp" +#include "test/codemaker/codemakertests/XNamingService.hpp" +#include "com/sun/star/uno/Any.hxx" +#include "com/sun/star/uno/Reference.hxx" +#include "com/sun/star/uno/Sequence.hxx" +#include "com/sun/star/uno/Type.hxx" +#include "cppu/unotype.hxx" +#include "rtl/ustring.hxx" +#include "sal/types.h" +#include "typelib/typeclass.h" +#include "typelib/typedescription.h" + +namespace test { namespace codemaker { namespace codemakertests { + +inline Struct2::Struct2() + : p1(false) + , p2(0) + , p3(0) + , p4(0) + , p5(0) + , p6(0) + , p7(0) + , p8(0) + , p9(0) + , p10(0) + , p11(0) + , p12() + , p13() + , p14() + , p15(::test::codemaker::codemakertests::Enum2_FLAG_NONE) + , p16() + , p17() + , p18() + , t1(false) + , t2(0) + , t3(0) + , t4(0) + , t5(0) + , t6(0) + , t7(0) + , t8(0) + , t9(0) + , t10(0) + , t11(0) + , t12() + , t13() + , t14() + , t15(::test::codemaker::codemakertests::Enum2_FLAG_NONE) + , t16() + , t17() + , t18() + , a1() + , a2() + , a3() + , a4() + , a5() + , a6() + , a7() + , a8() + , a9() + , a10() + , a11() + , a12() + , a13() + , a14() + , a15() + , a16() + , a17() + , a18() + , aa1() + , aa2() + , aa3() + , aa4() + , aa5() + , aa6() + , aa7() + , aa8() + , aa9() + , aa10() + , aa11() + , aa12() + , aa13() + , aa14() + , aa15() + , aa16() + , aa17() + , aa18() + , at1() + , at2() + , at3() + , at4() + , at5() + , at6() + , at7() + , at8() + , at9() + , at10() + , at11() + , at12() + , at13() + , at14() + , at15() + , at16() + , at17() + , at18() +{ +} + +inline Struct2::Struct2(const ::sal_Bool& p1_, const ::sal_Int8& p2_, const ::sal_Int16& p3_, const ::sal_uInt16& p4_, const ::sal_Int32& p5_, const ::sal_uInt32& p6_, const ::sal_Int64& p7_, const ::sal_uInt64& p8_, const float& p9_, const double& p10_, const ::sal_Unicode& p11_, const ::rtl::OUString& p12_, const ::css::uno::Type& p13_, const ::css::uno::Any& p14_, const ::test::codemaker::codemakertests::Enum2& p15_, const ::test::codemaker::codemakertests::Struct1& p16_, const ::css::uno::Reference< ::css::uno::XInterface >& p17_, const ::css::uno::Reference< ::css::uno::XNamingService >& p18_, const ::sal_Bool& t1_, const ::sal_Int8& t2_, const ::sal_Int16& t3_, const ::sal_uInt16& t4_, const ::sal_Int32& t5_, const ::sal_uInt32& t6_, const ::sal_Int64& t7_, const ::sal_uInt64& t8_, const float& t9_, const double& t10_, const ::sal_Unicode& t11_, const ::rtl::OUString& t12_, const ::css::uno::Type& t13_, const ::css::uno::Any& t14_, const ::test::codemaker::codemakertests::Enum2& t15_, const ::test::codemaker::codemakertests::Struct1& t16_, const ::css::uno::Reference< ::css::uno::XInterface >& t17_, const ::css::uno::Reference< ::css::uno::XNamingService >& t18_, const ::css::uno::Sequence< ::sal_Bool >& a1_, const ::css::uno::Sequence< ::sal_Int8 >& a2_, const ::css::uno::Sequence< ::sal_Int16 >& a3_, const ::css::uno::Sequence< ::sal_uInt16 >& a4_, const ::css::uno::Sequence< ::sal_Int32 >& a5_, const ::css::uno::Sequence< ::sal_uInt32 >& a6_, const ::css::uno::Sequence< ::sal_Int64 >& a7_, const ::css::uno::Sequence< ::sal_uInt64 >& a8_, const ::css::uno::Sequence< float >& a9_, const ::css::uno::Sequence< double >& a10_, const ::css::uno::Sequence< ::sal_Unicode >& a11_, const ::css::uno::Sequence< ::rtl::OUString >& a12_, const ::css::uno::Sequence< ::css::uno::Type >& a13_, const ::css::uno::Sequence< ::css::uno::Any >& a14_, const ::css::uno::Sequence< ::test::codemaker::codemakertests::Enum2 >& a15_, const ::css::uno::Sequence< ::test::codemaker::codemakertests::Struct1 >& a16_, const ::css::uno::Sequence< ::css::uno::Reference< ::css::uno::XInterface > >& a17_, const ::css::uno::Sequence< ::css::uno::Reference< ::css::uno::XNamingService > >& a18_, const ::css::uno::Sequence< ::css::uno::Sequence< ::sal_Bool > >& aa1_, const ::css::uno::Sequence< ::css::uno::Sequence< ::sal_Int8 > >& aa2_, const ::css::uno::Sequence< ::css::uno::Sequence< ::sal_Int16 > >& aa3_, const ::css::uno::Sequence< ::css::uno::Sequence< ::sal_uInt16 > >& aa4_, const ::css::uno::Sequence< ::css::uno::Sequence< ::sal_Int32 > >& aa5_, const ::css::uno::Sequence< ::css::uno::Sequence< ::sal_uInt32 > >& aa6_, const ::css::uno::Sequence< ::css::uno::Sequence< ::sal_Int64 > >& aa7_, const ::css::uno::Sequence< ::css::uno::Sequence< ::sal_uInt64 > >& aa8_, const ::css::uno::Sequence< ::css::uno::Sequence< float > >& aa9_, const ::css::uno::Sequence< ::css::uno::Sequence< double > >& aa10_, const ::css::uno::Sequence< ::css::uno::Sequence< ::sal_Unicode > >& aa11_, const ::css::uno::Sequence< ::css::uno::Sequence< ::rtl::OUString > >& aa12_, const ::css::uno::Sequence< ::css::uno::Sequence< ::css::uno::Type > >& aa13_, const ::css::uno::Sequence< ::css::uno::Sequence< ::css::uno::Any > >& aa14_, const ::css::uno::Sequence< ::css::uno::Sequence< ::test::codemaker::codemakertests::Enum2 > >& aa15_, const ::css::uno::Sequence< ::css::uno::Sequence< ::test::codemaker::codemakertests::Struct1 > >& aa16_, const ::css::uno::Sequence< ::css::uno::Sequence< ::css::uno::Reference< ::css::uno::XInterface > > >& aa17_, const ::css::uno::Sequence< ::css::uno::Sequence< ::css::uno::Reference< ::css::uno::XNamingService > > >& aa18_, const ::css::uno::Sequence< ::css::uno::Sequence< ::sal_Bool > >& at1_, const ::css::uno::Sequence< ::css::uno::Sequence< ::sal_Int8 > >& at2_, const ::css::uno::Sequence< ::css::uno::Sequence< ::sal_Int16 > >& at3_, const ::css::uno::Sequence< ::css::uno::Sequence< ::sal_uInt16 > >& at4_, const ::css::uno::Sequence< ::css::uno::Sequence< ::sal_Int32 > >& at5_, const ::css::uno::Sequence< ::css::uno::Sequence< ::sal_uInt32 > >& at6_, const ::css::uno::Sequence< ::css::uno::Sequence< ::sal_Int64 > >& at7_, const ::css::uno::Sequence< ::css::uno::Sequence< ::sal_uInt64 > >& at8_, const ::css::uno::Sequence< ::css::uno::Sequence< float > >& at9_, const ::css::uno::Sequence< ::css::uno::Sequence< double > >& at10_, const ::css::uno::Sequence< ::css::uno::Sequence< ::sal_Unicode > >& at11_, const ::css::uno::Sequence< ::css::uno::Sequence< ::rtl::OUString > >& at12_, const ::css::uno::Sequence< ::css::uno::Sequence< ::css::uno::Type > >& at13_, const ::css::uno::Sequence< ::css::uno::Sequence< ::css::uno::Any > >& at14_, const ::css::uno::Sequence< ::css::uno::Sequence< ::test::codemaker::codemakertests::Enum2 > >& at15_, const ::css::uno::Sequence< ::css::uno::Sequence< ::test::codemaker::codemakertests::Struct1 > >& at16_, const ::css::uno::Sequence< ::css::uno::Sequence< ::css::uno::Reference< ::css::uno::XInterface > > >& at17_, const ::css::uno::Sequence< ::css::uno::Sequence< ::css::uno::Reference< ::css::uno::XNamingService > > >& at18_) + : p1(p1_) + , p2(p2_) + , p3(p3_) + , p4(p4_) + , p5(p5_) + , p6(p6_) + , p7(p7_) + , p8(p8_) + , p9(p9_) + , p10(p10_) + , p11(p11_) + , p12(p12_) + , p13(p13_) + , p14(p14_) + , p15(p15_) + , p16(p16_) + , p17(p17_) + , p18(p18_) + , t1(t1_) + , t2(t2_) + , t3(t3_) + , t4(t4_) + , t5(t5_) + , t6(t6_) + , t7(t7_) + , t8(t8_) + , t9(t9_) + , t10(t10_) + , t11(t11_) + , t12(t12_) + , t13(t13_) + , t14(t14_) + , t15(t15_) + , t16(t16_) + , t17(t17_) + , t18(t18_) + , a1(a1_) + , a2(a2_) + , a3(a3_) + , a4(a4_) + , a5(a5_) + , a6(a6_) + , a7(a7_) + , a8(a8_) + , a9(a9_) + , a10(a10_) + , a11(a11_) + , a12(a12_) + , a13(a13_) + , a14(a14_) + , a15(a15_) + , a16(a16_) + , a17(a17_) + , a18(a18_) + , aa1(aa1_) + , aa2(aa2_) + , aa3(aa3_) + , aa4(aa4_) + , aa5(aa5_) + , aa6(aa6_) + , aa7(aa7_) + , aa8(aa8_) + , aa9(aa9_) + , aa10(aa10_) + , aa11(aa11_) + , aa12(aa12_) + , aa13(aa13_) + , aa14(aa14_) + , aa15(aa15_) + , aa16(aa16_) + , aa17(aa17_) + , aa18(aa18_) + , at1(at1_) + , at2(at2_) + , at3(at3_) + , at4(at4_) + , at5(at5_) + , at6(at6_) + , at7(at7_) + , at8(at8_) + , at9(at9_) + , at10(at10_) + , at11(at11_) + , at12(at12_) + , at13(at13_) + , at14(at14_) + , at15(at15_) + , at16(at16_) + , at17(at17_) + , at18(at18_) +{ +} + + +inline bool operator==(const Struct2& the_lhs, const Struct2& the_rhs) +{ + return the_lhs.p1 == the_rhs.p1 + && the_lhs.p2 == the_rhs.p2 + && the_lhs.p3 == the_rhs.p3 + && the_lhs.p4 == the_rhs.p4 + && the_lhs.p5 == the_rhs.p5 + && the_lhs.p6 == the_rhs.p6 + && the_lhs.p7 == the_rhs.p7 + && the_lhs.p8 == the_rhs.p8 + && the_lhs.p9 == the_rhs.p9 + && the_lhs.p10 == the_rhs.p10 + && the_lhs.p11 == the_rhs.p11 + && the_lhs.p12 == the_rhs.p12 + && the_lhs.p13 == the_rhs.p13 + && the_lhs.p14 == the_rhs.p14 + && the_lhs.p15 == the_rhs.p15 + && the_lhs.p16 == the_rhs.p16 + && the_lhs.p17 == the_rhs.p17 + && the_lhs.p18 == the_rhs.p18 + && the_lhs.t1 == the_rhs.t1 + && the_lhs.t2 == the_rhs.t2 + && the_lhs.t3 == the_rhs.t3 + && the_lhs.t4 == the_rhs.t4 + && the_lhs.t5 == the_rhs.t5 + && the_lhs.t6 == the_rhs.t6 + && the_lhs.t7 == the_rhs.t7 + && the_lhs.t8 == the_rhs.t8 + && the_lhs.t9 == the_rhs.t9 + && the_lhs.t10 == the_rhs.t10 + && the_lhs.t11 == the_rhs.t11 + && the_lhs.t12 == the_rhs.t12 + && the_lhs.t13 == the_rhs.t13 + && the_lhs.t14 == the_rhs.t14 + && the_lhs.t15 == the_rhs.t15 + && the_lhs.t16 == the_rhs.t16 + && the_lhs.t17 == the_rhs.t17 + && the_lhs.t18 == the_rhs.t18 + && the_lhs.a1 == the_rhs.a1 + && the_lhs.a2 == the_rhs.a2 + && the_lhs.a3 == the_rhs.a3 + && the_lhs.a4 == the_rhs.a4 + && the_lhs.a5 == the_rhs.a5 + && the_lhs.a6 == the_rhs.a6 + && the_lhs.a7 == the_rhs.a7 + && the_lhs.a8 == the_rhs.a8 + && the_lhs.a9 == the_rhs.a9 + && the_lhs.a10 == the_rhs.a10 + && the_lhs.a11 == the_rhs.a11 + && the_lhs.a12 == the_rhs.a12 + && the_lhs.a13 == the_rhs.a13 + && the_lhs.a14 == the_rhs.a14 + && the_lhs.a15 == the_rhs.a15 + && the_lhs.a16 == the_rhs.a16 + && the_lhs.a17 == the_rhs.a17 + && the_lhs.a18 == the_rhs.a18 + && the_lhs.aa1 == the_rhs.aa1 + && the_lhs.aa2 == the_rhs.aa2 + && the_lhs.aa3 == the_rhs.aa3 + && the_lhs.aa4 == the_rhs.aa4 + && the_lhs.aa5 == the_rhs.aa5 + && the_lhs.aa6 == the_rhs.aa6 + && the_lhs.aa7 == the_rhs.aa7 + && the_lhs.aa8 == the_rhs.aa8 + && the_lhs.aa9 == the_rhs.aa9 + && the_lhs.aa10 == the_rhs.aa10 + && the_lhs.aa11 == the_rhs.aa11 + && the_lhs.aa12 == the_rhs.aa12 + && the_lhs.aa13 == the_rhs.aa13 + && the_lhs.aa14 == the_rhs.aa14 + && the_lhs.aa15 == the_rhs.aa15 + && the_lhs.aa16 == the_rhs.aa16 + && the_lhs.aa17 == the_rhs.aa17 + && the_lhs.aa18 == the_rhs.aa18 + && the_lhs.at1 == the_rhs.at1 + && the_lhs.at2 == the_rhs.at2 + && the_lhs.at3 == the_rhs.at3 + && the_lhs.at4 == the_rhs.at4 + && the_lhs.at5 == the_rhs.at5 + && the_lhs.at6 == the_rhs.at6 + && the_lhs.at7 == the_rhs.at7 + && the_lhs.at8 == the_rhs.at8 + && the_lhs.at9 == the_rhs.at9 + && the_lhs.at10 == the_rhs.at10 + && the_lhs.at11 == the_rhs.at11 + && the_lhs.at12 == the_rhs.at12 + && the_lhs.at13 == the_rhs.at13 + && the_lhs.at14 == the_rhs.at14 + && the_lhs.at15 == the_rhs.at15 + && the_lhs.at16 == the_rhs.at16 + && the_lhs.at17 == the_rhs.at17 + && the_lhs.at18 == the_rhs.at18; +} + +inline bool operator!=(const Struct2& the_lhs, const Struct2& the_rhs) +{ +return !operator==(the_lhs, the_rhs); +} +} } } + +namespace test { namespace codemaker { namespace codemakertests { + +inline ::css::uno::Type const & cppu_detail_getUnoType(SAL_UNUSED_PARAMETER ::test::codemaker::codemakertests::Struct2 const *) { + //TODO: On certain platforms with weak memory models, the following code can result in some threads observing that the_type points to garbage + static ::typelib_TypeDescriptionReference * the_type = 0; + if (the_type == 0) { + ::typelib_TypeDescriptionReference * the_members[] = { + ::cppu::UnoType< ::sal_Bool >::get().getTypeLibType(), + ::cppu::UnoType< ::sal_Int8 >::get().getTypeLibType(), + ::cppu::UnoType< ::sal_Int16 >::get().getTypeLibType(), + ::cppu::UnoType< ::cppu::UnoUnsignedShortType >::get().getTypeLibType(), + ::cppu::UnoType< ::sal_Int32 >::get().getTypeLibType(), + ::cppu::UnoType< ::sal_uInt32 >::get().getTypeLibType(), + ::cppu::UnoType< ::sal_Int64 >::get().getTypeLibType(), + ::cppu::UnoType< ::sal_uInt64 >::get().getTypeLibType(), + ::cppu::UnoType< float >::get().getTypeLibType(), + ::cppu::UnoType< double >::get().getTypeLibType(), + ::cppu::UnoType< ::cppu::UnoCharType >::get().getTypeLibType(), + ::cppu::UnoType< ::rtl::OUString >::get().getTypeLibType(), + ::cppu::UnoType< ::css::uno::Type >::get().getTypeLibType(), + ::cppu::UnoType< ::css::uno::Any >::get().getTypeLibType(), + ::cppu::UnoType< ::test::codemaker::codemakertests::Enum2 >::get().getTypeLibType(), + ::cppu::UnoType< ::test::codemaker::codemakertests::Struct1 >::get().getTypeLibType(), + ::cppu::UnoType< ::css::uno::Reference< ::css::uno::XInterface > >::get().getTypeLibType(), + ::cppu::UnoType< ::css::uno::Reference< ::css::uno::XNamingService > >::get().getTypeLibType(), + ::cppu::UnoType< ::sal_Bool >::get().getTypeLibType(), + ::cppu::UnoType< ::sal_Int8 >::get().getTypeLibType(), + ::cppu::UnoType< ::sal_Int16 >::get().getTypeLibType(), + ::cppu::UnoType< ::cppu::UnoUnsignedShortType >::get().getTypeLibType(), + ::cppu::UnoType< ::sal_Int32 >::get().getTypeLibType(), + ::cppu::UnoType< ::sal_uInt32 >::get().getTypeLibType(), + ::cppu::UnoType< ::sal_Int64 >::get().getTypeLibType(), + ::cppu::UnoType< ::sal_uInt64 >::get().getTypeLibType(), + ::cppu::UnoType< float >::get().getTypeLibType(), + ::cppu::UnoType< double >::get().getTypeLibType(), + ::cppu::UnoType< ::cppu::UnoCharType >::get().getTypeLibType(), + ::cppu::UnoType< ::rtl::OUString >::get().getTypeLibType(), + ::cppu::UnoType< ::css::uno::Type >::get().getTypeLibType(), + ::cppu::UnoType< ::css::uno::Any >::get().getTypeLibType(), + ::cppu::UnoType< ::test::codemaker::codemakertests::Enum2 >::get().getTypeLibType(), + ::cppu::UnoType< ::test::codemaker::codemakertests::Struct1 >::get().getTypeLibType(), + ::cppu::UnoType< ::css::uno::Reference< ::css::uno::XInterface > >::get().getTypeLibType(), + ::cppu::UnoType< ::css::uno::Reference< ::css::uno::XNamingService > >::get().getTypeLibType(), + ::cppu::UnoType< ::cppu::UnoSequenceType< ::sal_Bool > >::get().getTypeLibType(), + ::cppu::UnoType< ::cppu::UnoSequenceType< ::sal_Int8 > >::get().getTypeLibType(), + ::cppu::UnoType< ::cppu::UnoSequenceType< ::sal_Int16 > >::get().getTypeLibType(), + ::cppu::UnoType< ::cppu::UnoSequenceType< ::cppu::UnoUnsignedShortType > >::get().getTypeLibType(), + ::cppu::UnoType< ::cppu::UnoSequenceType< ::sal_Int32 > >::get().getTypeLibType(), + ::cppu::UnoType< ::cppu::UnoSequenceType< ::sal_uInt32 > >::get().getTypeLibType(), + ::cppu::UnoType< ::cppu::UnoSequenceType< ::sal_Int64 > >::get().getTypeLibType(), + ::cppu::UnoType< ::cppu::UnoSequenceType< ::sal_uInt64 > >::get().getTypeLibType(), + ::cppu::UnoType< ::cppu::UnoSequenceType< float > >::get().getTypeLibType(), + ::cppu::UnoType< ::cppu::UnoSequenceType< double > >::get().getTypeLibType(), + ::cppu::UnoType< ::cppu::UnoSequenceType< ::cppu::UnoCharType > >::get().getTypeLibType(), + ::cppu::UnoType< ::cppu::UnoSequenceType< ::rtl::OUString > >::get().getTypeLibType(), + ::cppu::UnoType< ::cppu::UnoSequenceType< ::css::uno::Type > >::get().getTypeLibType(), + ::cppu::UnoType< ::cppu::UnoSequenceType< ::css::uno::Any > >::get().getTypeLibType(), + ::cppu::UnoType< ::cppu::UnoSequenceType< ::test::codemaker::codemakertests::Enum2 > >::get().getTypeLibType(), + ::cppu::UnoType< ::cppu::UnoSequenceType< ::test::codemaker::codemakertests::Struct1 > >::get().getTypeLibType(), + ::cppu::UnoType< ::cppu::UnoSequenceType< ::css::uno::Reference< ::css::uno::XInterface > > >::get().getTypeLibType(), + ::cppu::UnoType< ::cppu::UnoSequenceType< ::css::uno::Reference< ::css::uno::XNamingService > > >::get().getTypeLibType(), + ::cppu::UnoType< ::cppu::UnoSequenceType< ::cppu::UnoSequenceType< ::sal_Bool > > >::get().getTypeLibType(), + ::cppu::UnoType< ::cppu::UnoSequenceType< ::cppu::UnoSequenceType< ::sal_Int8 > > >::get().getTypeLibType(), + ::cppu::UnoType< ::cppu::UnoSequenceType< ::cppu::UnoSequenceType< ::sal_Int16 > > >::get().getTypeLibType(), + ::cppu::UnoType< ::cppu::UnoSequenceType< ::cppu::UnoSequenceType< ::cppu::UnoUnsignedShortType > > >::get().getTypeLibType(), + ::cppu::UnoType< ::cppu::UnoSequenceType< ::cppu::UnoSequenceType< ::sal_Int32 > > >::get().getTypeLibType(), + ::cppu::UnoType< ::cppu::UnoSequenceType< ::cppu::UnoSequenceType< ::sal_uInt32 > > >::get().getTypeLibType(), + ::cppu::UnoType< ::cppu::UnoSequenceType< ::cppu::UnoSequenceType< ::sal_Int64 > > >::get().getTypeLibType(), + ::cppu::UnoType< ::cppu::UnoSequenceType< ::cppu::UnoSequenceType< ::sal_uInt64 > > >::get().getTypeLibType(), + ::cppu::UnoType< ::cppu::UnoSequenceType< ::cppu::UnoSequenceType< float > > >::get().getTypeLibType(), + ::cppu::UnoType< ::cppu::UnoSequenceType< ::cppu::UnoSequenceType< double > > >::get().getTypeLibType(), + ::cppu::UnoType< ::cppu::UnoSequenceType< ::cppu::UnoSequenceType< ::cppu::UnoCharType > > >::get().getTypeLibType(), + ::cppu::UnoType< ::cppu::UnoSequenceType< ::cppu::UnoSequenceType< ::rtl::OUString > > >::get().getTypeLibType(), + ::cppu::UnoType< ::cppu::UnoSequenceType< ::cppu::UnoSequenceType< ::css::uno::Type > > >::get().getTypeLibType(), + ::cppu::UnoType< ::cppu::UnoSequenceType< ::cppu::UnoSequenceType< ::css::uno::Any > > >::get().getTypeLibType(), + ::cppu::UnoType< ::cppu::UnoSequenceType< ::cppu::UnoSequenceType< ::test::codemaker::codemakertests::Enum2 > > >::get().getTypeLibType(), + ::cppu::UnoType< ::cppu::UnoSequenceType< ::cppu::UnoSequenceType< ::test::codemaker::codemakertests::Struct1 > > >::get().getTypeLibType(), + ::cppu::UnoType< ::cppu::UnoSequenceType< ::cppu::UnoSequenceType< ::css::uno::Reference< ::css::uno::XInterface > > > >::get().getTypeLibType(), + ::cppu::UnoType< ::cppu::UnoSequenceType< ::cppu::UnoSequenceType< ::css::uno::Reference< ::css::uno::XNamingService > > > >::get().getTypeLibType(), + ::cppu::UnoType< ::cppu::UnoSequenceType< ::cppu::UnoSequenceType< ::sal_Bool > > >::get().getTypeLibType(), + ::cppu::UnoType< ::cppu::UnoSequenceType< ::cppu::UnoSequenceType< ::sal_Int8 > > >::get().getTypeLibType(), + ::cppu::UnoType< ::cppu::UnoSequenceType< ::cppu::UnoSequenceType< ::sal_Int16 > > >::get().getTypeLibType(), + ::cppu::UnoType< ::cppu::UnoSequenceType< ::cppu::UnoSequenceType< ::cppu::UnoUnsignedShortType > > >::get().getTypeLibType(), + ::cppu::UnoType< ::cppu::UnoSequenceType< ::cppu::UnoSequenceType< ::sal_Int32 > > >::get().getTypeLibType(), + ::cppu::UnoType< ::cppu::UnoSequenceType< ::cppu::UnoSequenceType< ::sal_uInt32 > > >::get().getTypeLibType(), + ::cppu::UnoType< ::cppu::UnoSequenceType< ::cppu::UnoSequenceType< ::sal_Int64 > > >::get().getTypeLibType(), + ::cppu::UnoType< ::cppu::UnoSequenceType< ::cppu::UnoSequenceType< ::sal_uInt64 > > >::get().getTypeLibType(), + ::cppu::UnoType< ::cppu::UnoSequenceType< ::cppu::UnoSequenceType< float > > >::get().getTypeLibType(), + ::cppu::UnoType< ::cppu::UnoSequenceType< ::cppu::UnoSequenceType< double > > >::get().getTypeLibType(), + ::cppu::UnoType< ::cppu::UnoSequenceType< ::cppu::UnoSequenceType< ::cppu::UnoCharType > > >::get().getTypeLibType(), + ::cppu::UnoType< ::cppu::UnoSequenceType< ::cppu::UnoSequenceType< ::rtl::OUString > > >::get().getTypeLibType(), + ::cppu::UnoType< ::cppu::UnoSequenceType< ::cppu::UnoSequenceType< ::css::uno::Type > > >::get().getTypeLibType(), + ::cppu::UnoType< ::cppu::UnoSequenceType< ::cppu::UnoSequenceType< ::css::uno::Any > > >::get().getTypeLibType(), + ::cppu::UnoType< ::cppu::UnoSequenceType< ::cppu::UnoSequenceType< ::test::codemaker::codemakertests::Enum2 > > >::get().getTypeLibType(), + ::cppu::UnoType< ::cppu::UnoSequenceType< ::cppu::UnoSequenceType< ::test::codemaker::codemakertests::Struct1 > > >::get().getTypeLibType(), + ::cppu::UnoType< ::cppu::UnoSequenceType< ::cppu::UnoSequenceType< ::css::uno::Reference< ::css::uno::XInterface > > > >::get().getTypeLibType(), + ::cppu::UnoType< ::cppu::UnoSequenceType< ::cppu::UnoSequenceType< ::css::uno::Reference< ::css::uno::XNamingService > > > >::get().getTypeLibType() }; + ::typelib_static_struct_type_init(&the_type, "test.codemaker.codemakertests.Struct2", 0, 90, the_members, 0); + } + return *reinterpret_cast< ::css::uno::Type * >(&the_type); +} + +} } } + +SAL_DEPRECATED("use cppu::UnoType") inline ::css::uno::Type const & SAL_CALL getCppuType(SAL_UNUSED_PARAMETER ::test::codemaker::codemakertests::Struct2 const *) { + return ::cppu::UnoType< ::test::codemaker::codemakertests::Struct2 >::get(); +} diff --git a/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/TestConstantsBasic.hdl b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/TestConstantsBasic.hdl new file mode 100644 index 000000000000..332ab7603299 --- /dev/null +++ b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/TestConstantsBasic.hdl @@ -0,0 +1,22 @@ +#pragma once + +#include "sal/config.h" + +#include "cppu/macros.hxx" +#include "sal/types.h" + +namespace test { namespace codemaker { namespace codemakertests { namespace TestConstantsBasic { + +static const ::sal_Bool BOOL_FALSE = sal_False; +static const ::sal_Bool BOOL_TRUE = sal_True; +static const ::sal_Int64 HYPER_MAX = (sal_Int64) SAL_CONST_INT64(9223372036854775807); +static const ::sal_Int64 HYPER_MIN = SAL_MIN_INT64; +static const ::sal_Int32 LONG_HEX = (sal_Int32)2147483647; +static const ::sal_Int32 LONG_MAX = (sal_Int32)2147483647; +static const ::sal_Int32 LONG_MIN = SAL_MIN_INT32; +static const ::sal_Int16 SHORT_MAX = (sal_Int16)32767; +static const ::sal_Int16 SHORT_MIN = (sal_Int16)-32768; +static const ::sal_uInt32 ULONG_MAX = (sal_uInt32)4294967295U; +static const ::sal_uInt16 USHORT_MAX = (sal_uInt16)65535; + +} } } } diff --git a/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/TestConstantsBasic.hpp b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/TestConstantsBasic.hpp new file mode 100644 index 000000000000..63aae64a2f3c --- /dev/null +++ b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/TestConstantsBasic.hpp @@ -0,0 +1,3 @@ +#pragma once + +#include "test/codemaker/codemakertests/TestConstantsBasic.hdl" diff --git a/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/Type.hdl b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/Type.hdl new file mode 100644 index 000000000000..d8516ce00693 --- /dev/null +++ b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/Type.hdl @@ -0,0 +1,12 @@ +#pragma once + +#include "sal/config.h" + +#include "com/sun/star/uno/Type.h" +#include "cppu/macros.hxx" + +namespace test { namespace codemaker { namespace codemakertests { + +typedef ::css::uno::Type Type; + +} } } diff --git a/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/Type.hpp b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/Type.hpp new file mode 100644 index 000000000000..17ce82f69d30 --- /dev/null +++ b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/Type.hpp @@ -0,0 +1,9 @@ +#pragma once + +#include "sal/config.h" + +#include "test/codemaker/codemakertests/Type.hdl" + +#include "com/sun/star/uno/Type.hxx" +#include "cppu/unotype.hxx" + diff --git a/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/UnsignedHyper.hdl b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/UnsignedHyper.hdl new file mode 100644 index 000000000000..27ff48af6441 --- /dev/null +++ b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/UnsignedHyper.hdl @@ -0,0 +1,12 @@ +#pragma once + +#include "sal/config.h" + +#include "cppu/macros.hxx" +#include "sal/types.h" + +namespace test { namespace codemaker { namespace codemakertests { + +typedef ::sal_uInt64 UnsignedHyper; + +} } } diff --git a/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/UnsignedHyper.hpp b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/UnsignedHyper.hpp new file mode 100644 index 000000000000..5dcc616ecb57 --- /dev/null +++ b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/UnsignedHyper.hpp @@ -0,0 +1,10 @@ +#pragma once + +#include "sal/config.h" + +#include "test/codemaker/codemakertests/UnsignedHyper.hdl" + +#include "com/sun/star/uno/Type.hxx" +#include "cppu/unotype.hxx" +#include "sal/types.h" + diff --git a/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/UnsignedLong.hdl b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/UnsignedLong.hdl new file mode 100644 index 000000000000..bc9536672e02 --- /dev/null +++ b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/UnsignedLong.hdl @@ -0,0 +1,12 @@ +#pragma once + +#include "sal/config.h" + +#include "cppu/macros.hxx" +#include "sal/types.h" + +namespace test { namespace codemaker { namespace codemakertests { + +typedef ::sal_uInt32 UnsignedLong; + +} } } diff --git a/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/UnsignedLong.hpp b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/UnsignedLong.hpp new file mode 100644 index 000000000000..64081d134992 --- /dev/null +++ b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/UnsignedLong.hpp @@ -0,0 +1,10 @@ +#pragma once + +#include "sal/config.h" + +#include "test/codemaker/codemakertests/UnsignedLong.hdl" + +#include "com/sun/star/uno/Type.hxx" +#include "cppu/unotype.hxx" +#include "sal/types.h" + diff --git a/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/UnsignedShort.hdl b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/UnsignedShort.hdl new file mode 100644 index 000000000000..f28935c98453 --- /dev/null +++ b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/UnsignedShort.hdl @@ -0,0 +1,12 @@ +#pragma once + +#include "sal/config.h" + +#include "cppu/macros.hxx" +#include "sal/types.h" + +namespace test { namespace codemaker { namespace codemakertests { + +typedef ::sal_uInt16 UnsignedShort; + +} } } diff --git a/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/UnsignedShort.hpp b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/UnsignedShort.hpp new file mode 100644 index 000000000000..db6796a83954 --- /dev/null +++ b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/UnsignedShort.hpp @@ -0,0 +1,10 @@ +#pragma once + +#include "sal/config.h" + +#include "test/codemaker/codemakertests/UnsignedShort.hdl" + +#include "com/sun/star/uno/Type.hxx" +#include "cppu/unotype.hxx" +#include "sal/types.h" + diff --git a/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/XIfc.hdl b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/XIfc.hdl new file mode 100644 index 000000000000..d76f1e224e15 --- /dev/null +++ b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/XIfc.hdl @@ -0,0 +1,43 @@ +#pragma once + +#include "sal/config.h" + +#include "com/sun/star/uno/XInterface.hdl" +#include "test/codemaker/codemakertests/PolyStruct.hdl" +#include "com/sun/star/uno/Any.h" +#include "com/sun/star/uno/Reference.h" +#include "cppu/macros.hxx" +#include "sal/types.h" + +namespace com { namespace sun { namespace star { namespace uno { class Type; } } } } + +namespace test { namespace codemaker { namespace codemakertests { + +class SAL_NO_VTABLE SAL_DLLPUBLIC_RTTI XIfc : public ::css::uno::XInterface +{ +public: +#if defined LIBO_INTERNAL_ONLY + XIfc() = default; + XIfc(XIfc const &) = default; + XIfc(XIfc &&) = default; + XIfc & operator =(XIfc const &) = default; + XIfc & operator =(XIfc &&) = default; +#endif + + + // Methods + virtual void SAL_CALL f1( const ::test::codemaker::codemakertests::PolyStruct< ::sal_Int32, ::sal_Int32 >& arg ) = 0; + virtual void SAL_CALL f2( const ::test::codemaker::codemakertests::PolyStruct< ::css::uno::Any, ::css::uno::Reference< ::css::uno::XInterface > >& arg ) = 0; + + static inline ::css::uno::Type const & SAL_CALL static_type(void * = 0); + +protected: + ~XIfc() SAL_NOEXCEPT {} // avoid warnings about virtual members and non-virtual dtor +}; + + +inline ::css::uno::Type const & cppu_detail_getUnoType(SAL_UNUSED_PARAMETER ::test::codemaker::codemakertests::XIfc const *); +} } } + +SAL_DEPRECATED("use cppu::UnoType") inline ::css::uno::Type const & SAL_CALL getCppuType(const ::css::uno::Reference< ::test::codemaker::codemakertests::XIfc > *); + diff --git a/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/XIfc.hpp b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/XIfc.hpp new file mode 100644 index 000000000000..e1ebcb8068a7 --- /dev/null +++ b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/XIfc.hpp @@ -0,0 +1,45 @@ +#pragma once + +#include "sal/config.h" + +#include "test/codemaker/codemakertests/XIfc.hdl" + +#include "com/sun/star/uno/XInterface.hpp" +#include "test/codemaker/codemakertests/PolyStruct.hpp" +#include "com/sun/star/uno/Any.hxx" +#include "com/sun/star/uno/Reference.hxx" +#include "com/sun/star/uno/Type.hxx" +#include "cppu/unotype.hxx" +#include "sal/types.h" + +#if defined LIBO_INTERNAL_ONLY +#include +#endif + +namespace test { namespace codemaker { namespace codemakertests { + +inline ::css::uno::Type const & cppu_detail_getUnoType(SAL_UNUSED_PARAMETER ::test::codemaker::codemakertests::XIfc const *) { + static typelib_TypeDescriptionReference * the_type = 0; + if ( !the_type ) + { + typelib_static_mi_interface_type_init( &the_type, "test.codemaker.codemakertests.XIfc", 0, 0 ); + } + return * reinterpret_cast< ::css::uno::Type * >( &the_type ); +} + +} } } + +SAL_DEPRECATED("use cppu::UnoType") inline ::css::uno::Type const & SAL_CALL getCppuType(SAL_UNUSED_PARAMETER ::css::uno::Reference< ::test::codemaker::codemakertests::XIfc > const *) { + return ::cppu::UnoType< ::css::uno::Reference< ::test::codemaker::codemakertests::XIfc > >::get(); +} + +::css::uno::Type const & ::test::codemaker::codemakertests::XIfc::static_type(SAL_UNUSED_PARAMETER void *) { + return ::cppu::UnoType< ::test::codemaker::codemakertests::XIfc >::get(); +} + +#if defined LIBO_INTERNAL_ONLY +namespace cppu::detail { +template<> struct IsUnoInterfaceType<::test::codemaker::codemakertests::XIfc>: ::std::true_type {}; +} +#endif + diff --git a/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/XInterface.hdl b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/XInterface.hdl new file mode 100644 index 000000000000..70c736395bff --- /dev/null +++ b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/XInterface.hdl @@ -0,0 +1,13 @@ +#pragma once + +#include "sal/config.h" + +namespace com { namespace sun { namespace star { namespace uno { class XInterface; } } } } +#include "com/sun/star/uno/Reference.h" +#include "cppu/macros.hxx" + +namespace test { namespace codemaker { namespace codemakertests { + +typedef ::css::uno::Reference< ::css::uno::XInterface > XInterface; + +} } } diff --git a/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/XInterface.hpp b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/XInterface.hpp new file mode 100644 index 000000000000..ded0aaf41655 --- /dev/null +++ b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/XInterface.hpp @@ -0,0 +1,11 @@ +#pragma once + +#include "sal/config.h" + +#include "test/codemaker/codemakertests/XInterface.hdl" + +#include "com/sun/star/uno/XInterface.hpp" +#include "com/sun/star/uno/Reference.hxx" +#include "com/sun/star/uno/Type.hxx" +#include "cppu/unotype.hxx" + diff --git a/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/XNamingService.hdl b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/XNamingService.hdl new file mode 100644 index 000000000000..713af2fa44e6 --- /dev/null +++ b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/XNamingService.hdl @@ -0,0 +1,13 @@ +#pragma once + +#include "sal/config.h" + +namespace com { namespace sun { namespace star { namespace uno { class XNamingService; } } } } +#include "com/sun/star/uno/Reference.h" +#include "cppu/macros.hxx" + +namespace test { namespace codemaker { namespace codemakertests { + +typedef ::css::uno::Reference< ::css::uno::XNamingService > XNamingService; + +} } } diff --git a/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/XNamingService.hpp b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/XNamingService.hpp new file mode 100644 index 000000000000..5c22fbf3bc3c --- /dev/null +++ b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/XNamingService.hpp @@ -0,0 +1,11 @@ +#pragma once + +#include "sal/config.h" + +#include "test/codemaker/codemakertests/XNamingService.hdl" + +#include "com/sun/star/uno/XNamingService.hpp" +#include "com/sun/star/uno/Reference.hxx" +#include "com/sun/star/uno/Type.hxx" +#include "cppu/unotype.hxx" + diff --git a/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/XTest.hdl b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/XTest.hdl new file mode 100644 index 000000000000..e2ca4701052c --- /dev/null +++ b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/XTest.hdl @@ -0,0 +1,48 @@ +#pragma once + +#include "sal/config.h" + +#include "com/sun/star/uno/XInterface.hdl" +#include "com/sun/star/uno/Reference.h" +#include "cppu/macros.hxx" +#include "sal/types.h" + +namespace com { namespace sun { namespace star { namespace uno { class Type; } } } } + +namespace test { namespace codemaker { namespace codemakertests { + +class SAL_NO_VTABLE SAL_DLLPUBLIC_RTTI XTest : public ::css::uno::XInterface +{ +public: +#if defined LIBO_INTERNAL_ONLY + XTest() = default; + XTest(XTest const &) = default; + XTest(XTest &&) = default; + XTest & operator =(XTest const &) = default; + XTest & operator =(XTest &&) = default; +#endif + + + // Attributes + virtual ::sal_Int32 SAL_CALL getA1() = 0; + virtual void SAL_CALL setA1( ::sal_Int32 _a1 ) = 0; + virtual ::sal_Int32 SAL_CALL getA2() = 0; + virtual ::sal_Int32 SAL_CALL getA3() = 0; + virtual void SAL_CALL setA3( ::sal_Int32 _a3 ) = 0; + virtual ::sal_Int32 SAL_CALL getA4() = 0; + + // Methods + virtual ::sal_Bool SAL_CALL test() = 0; + + static inline ::css::uno::Type const & SAL_CALL static_type(void * = 0); + +protected: + ~XTest() SAL_NOEXCEPT {} // avoid warnings about virtual members and non-virtual dtor +}; + + +inline ::css::uno::Type const & cppu_detail_getUnoType(SAL_UNUSED_PARAMETER ::test::codemaker::codemakertests::XTest const *); +} } } + +SAL_DEPRECATED("use cppu::UnoType") inline ::css::uno::Type const & SAL_CALL getCppuType(const ::css::uno::Reference< ::test::codemaker::codemakertests::XTest > *); + diff --git a/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/XTest.hpp b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/XTest.hpp new file mode 100644 index 000000000000..f7d2c66d416c --- /dev/null +++ b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/XTest.hpp @@ -0,0 +1,43 @@ +#pragma once + +#include "sal/config.h" + +#include "test/codemaker/codemakertests/XTest.hdl" + +#include "com/sun/star/uno/XInterface.hpp" +#include "com/sun/star/uno/Reference.hxx" +#include "com/sun/star/uno/Type.hxx" +#include "cppu/unotype.hxx" +#include "sal/types.h" + +#if defined LIBO_INTERNAL_ONLY +#include +#endif + +namespace test { namespace codemaker { namespace codemakertests { + +inline ::css::uno::Type const & cppu_detail_getUnoType(SAL_UNUSED_PARAMETER ::test::codemaker::codemakertests::XTest const *) { + static typelib_TypeDescriptionReference * the_type = 0; + if ( !the_type ) + { + typelib_static_mi_interface_type_init( &the_type, "test.codemaker.codemakertests.XTest", 0, 0 ); + } + return * reinterpret_cast< ::css::uno::Type * >( &the_type ); +} + +} } } + +SAL_DEPRECATED("use cppu::UnoType") inline ::css::uno::Type const & SAL_CALL getCppuType(SAL_UNUSED_PARAMETER ::css::uno::Reference< ::test::codemaker::codemakertests::XTest > const *) { + return ::cppu::UnoType< ::css::uno::Reference< ::test::codemaker::codemakertests::XTest > >::get(); +} + +::css::uno::Type const & ::test::codemaker::codemakertests::XTest::static_type(SAL_UNUSED_PARAMETER void *) { + return ::cppu::UnoType< ::test::codemaker::codemakertests::XTest >::get(); +} + +#if defined LIBO_INTERNAL_ONLY +namespace cppu::detail { +template<> struct IsUnoInterfaceType<::test::codemaker::codemakertests::XTest>: ::std::true_type {}; +} +#endif + diff --git a/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/abstract.hpp b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/abstract.hpp new file mode 100644 index 000000000000..21893cf1feb4 --- /dev/null +++ b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/abstract.hpp @@ -0,0 +1,50 @@ +#pragma once + +#include "sal/config.h" + +#include + +#include "com/sun/star/uno/DeploymentException.hpp" +#include "com/sun/star/uno/XComponentContext.hpp" +#include "com/sun/star/uno/XNamingService.hpp" +#include "com/sun/star/uno/Any.hxx" +#include "com/sun/star/uno/Reference.hxx" +#include "cppu/unotype.hxx" +#include "rtl/ustring.h" +#include "rtl/ustring.hxx" + +#if defined ANDROID || defined IOS //TODO +#include +#include +#endif + +#if defined LO_URE_CURRENT_ENV && defined LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_abstract && (LO_URE_CURRENT_ENV) == (LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_abstract) && defined LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_abstract +extern "C" ::css::uno::XInterface * SAL_CALL LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_abstract(::css::uno::XComponentContext *, ::css::uno::Sequence< ::css::uno::Any > const &); +#endif + +namespace test { namespace codemaker { namespace codemakertests { + +class abstract { +public: + static ::css::uno::Reference< ::css::uno::XNamingService > get(::css::uno::Reference< ::css::uno::XComponentContext > const & the_context) { + assert(the_context.is()); + ::css::uno::Reference< ::css::uno::XNamingService > instance; +#if defined LO_URE_CURRENT_ENV && defined LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_abstract && (LO_URE_CURRENT_ENV) == (LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_abstract) && defined LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_abstract + instance = ::css::uno::Reference< ::css::uno::XNamingService >(::css::uno::Reference< ::css::uno::XInterface >(static_cast< ::css::uno::XInterface * >((*LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_abstract)(the_context.get(), ::css::uno::Sequence< ::css::uno::Any >())), ::SAL_NO_ACQUIRE), ::css::uno::UNO_QUERY); +#else + the_context->getValueByName(::rtl::OUString( "/singletons/test.codemaker.codemakertests.abstract" )) >>= instance; +#endif + if (!instance.is()) { + throw ::css::uno::DeploymentException(::rtl::OUString( "component context fails to supply singleton test.codemaker.codemakertests.abstract of type com.sun.star.uno.XNamingService" ), the_context); + } + return instance; + } + +private: + abstract(); // not implemented + abstract(abstract &); // not implemented + ~abstract(); // not implemented + void operator =(abstract); // not implemented +}; + +} } } diff --git a/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/assert.hpp b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/assert.hpp new file mode 100644 index 000000000000..c85e484e9558 --- /dev/null +++ b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/assert.hpp @@ -0,0 +1,50 @@ +#pragma once + +#include "sal/config.h" + +#include + +#include "com/sun/star/uno/DeploymentException.hpp" +#include "com/sun/star/uno/XComponentContext.hpp" +#include "com/sun/star/uno/XNamingService.hpp" +#include "com/sun/star/uno/Any.hxx" +#include "com/sun/star/uno/Reference.hxx" +#include "cppu/unotype.hxx" +#include "rtl/ustring.h" +#include "rtl/ustring.hxx" + +#if defined ANDROID || defined IOS //TODO +#include +#include +#endif + +#if defined LO_URE_CURRENT_ENV && defined LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_assert && (LO_URE_CURRENT_ENV) == (LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_assert) && defined LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_assert +extern "C" ::css::uno::XInterface * SAL_CALL LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_assert(::css::uno::XComponentContext *, ::css::uno::Sequence< ::css::uno::Any > const &); +#endif + +namespace test { namespace codemaker { namespace codemakertests { + +class singleton_assert { +public: + static ::css::uno::Reference< ::css::uno::XNamingService > get(::css::uno::Reference< ::css::uno::XComponentContext > const & the_context) { + assert(the_context.is()); + ::css::uno::Reference< ::css::uno::XNamingService > instance; +#if defined LO_URE_CURRENT_ENV && defined LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_assert && (LO_URE_CURRENT_ENV) == (LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_assert) && defined LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_assert + instance = ::css::uno::Reference< ::css::uno::XNamingService >(::css::uno::Reference< ::css::uno::XInterface >(static_cast< ::css::uno::XInterface * >((*LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_assert)(the_context.get(), ::css::uno::Sequence< ::css::uno::Any >())), ::SAL_NO_ACQUIRE), ::css::uno::UNO_QUERY); +#else + the_context->getValueByName(::rtl::OUString( "/singletons/test.codemaker.codemakertests.assert" )) >>= instance; +#endif + if (!instance.is()) { + throw ::css::uno::DeploymentException(::rtl::OUString( "component context fails to supply singleton test.codemaker.codemakertests.assert of type com.sun.star.uno.XNamingService" ), the_context); + } + return instance; + } + +private: + singleton_assert(); // not implemented + singleton_assert(singleton_assert &); // not implemented + ~singleton_assert(); // not implemented + void operator =(singleton_assert); // not implemented +}; + +} } } diff --git a/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/break.hpp b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/break.hpp new file mode 100644 index 000000000000..005d9a787f14 --- /dev/null +++ b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/break.hpp @@ -0,0 +1,50 @@ +#pragma once + +#include "sal/config.h" + +#include + +#include "com/sun/star/uno/DeploymentException.hpp" +#include "com/sun/star/uno/XComponentContext.hpp" +#include "com/sun/star/uno/XNamingService.hpp" +#include "com/sun/star/uno/Any.hxx" +#include "com/sun/star/uno/Reference.hxx" +#include "cppu/unotype.hxx" +#include "rtl/ustring.h" +#include "rtl/ustring.hxx" + +#if defined ANDROID || defined IOS //TODO +#include +#include +#endif + +#if defined LO_URE_CURRENT_ENV && defined LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_break && (LO_URE_CURRENT_ENV) == (LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_break) && defined LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_break +extern "C" ::css::uno::XInterface * SAL_CALL LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_break(::css::uno::XComponentContext *, ::css::uno::Sequence< ::css::uno::Any > const &); +#endif + +namespace test { namespace codemaker { namespace codemakertests { + +class singleton_break { +public: + static ::css::uno::Reference< ::css::uno::XNamingService > get(::css::uno::Reference< ::css::uno::XComponentContext > const & the_context) { + assert(the_context.is()); + ::css::uno::Reference< ::css::uno::XNamingService > instance; +#if defined LO_URE_CURRENT_ENV && defined LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_break && (LO_URE_CURRENT_ENV) == (LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_break) && defined LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_break + instance = ::css::uno::Reference< ::css::uno::XNamingService >(::css::uno::Reference< ::css::uno::XInterface >(static_cast< ::css::uno::XInterface * >((*LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_break)(the_context.get(), ::css::uno::Sequence< ::css::uno::Any >())), ::SAL_NO_ACQUIRE), ::css::uno::UNO_QUERY); +#else + the_context->getValueByName(::rtl::OUString( "/singletons/test.codemaker.codemakertests.break" )) >>= instance; +#endif + if (!instance.is()) { + throw ::css::uno::DeploymentException(::rtl::OUString( "component context fails to supply singleton test.codemaker.codemakertests.break of type com.sun.star.uno.XNamingService" ), the_context); + } + return instance; + } + +private: + singleton_break(); // not implemented + singleton_break(singleton_break &); // not implemented + ~singleton_break(); // not implemented + void operator =(singleton_break); // not implemented +}; + +} } } diff --git a/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/catch.hpp b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/catch.hpp new file mode 100644 index 000000000000..3caeb2139b30 --- /dev/null +++ b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/catch.hpp @@ -0,0 +1,50 @@ +#pragma once + +#include "sal/config.h" + +#include + +#include "com/sun/star/uno/DeploymentException.hpp" +#include "com/sun/star/uno/XComponentContext.hpp" +#include "com/sun/star/uno/XNamingService.hpp" +#include "com/sun/star/uno/Any.hxx" +#include "com/sun/star/uno/Reference.hxx" +#include "cppu/unotype.hxx" +#include "rtl/ustring.h" +#include "rtl/ustring.hxx" + +#if defined ANDROID || defined IOS //TODO +#include +#include +#endif + +#if defined LO_URE_CURRENT_ENV && defined LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_catch && (LO_URE_CURRENT_ENV) == (LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_catch) && defined LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_catch +extern "C" ::css::uno::XInterface * SAL_CALL LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_catch(::css::uno::XComponentContext *, ::css::uno::Sequence< ::css::uno::Any > const &); +#endif + +namespace test { namespace codemaker { namespace codemakertests { + +class singleton_catch { +public: + static ::css::uno::Reference< ::css::uno::XNamingService > get(::css::uno::Reference< ::css::uno::XComponentContext > const & the_context) { + assert(the_context.is()); + ::css::uno::Reference< ::css::uno::XNamingService > instance; +#if defined LO_URE_CURRENT_ENV && defined LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_catch && (LO_URE_CURRENT_ENV) == (LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_catch) && defined LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_catch + instance = ::css::uno::Reference< ::css::uno::XNamingService >(::css::uno::Reference< ::css::uno::XInterface >(static_cast< ::css::uno::XInterface * >((*LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_catch)(the_context.get(), ::css::uno::Sequence< ::css::uno::Any >())), ::SAL_NO_ACQUIRE), ::css::uno::UNO_QUERY); +#else + the_context->getValueByName(::rtl::OUString( "/singletons/test.codemaker.codemakertests.catch" )) >>= instance; +#endif + if (!instance.is()) { + throw ::css::uno::DeploymentException(::rtl::OUString( "component context fails to supply singleton test.codemaker.codemakertests.catch of type com.sun.star.uno.XNamingService" ), the_context); + } + return instance; + } + +private: + singleton_catch(); // not implemented + singleton_catch(singleton_catch &); // not implemented + ~singleton_catch(); // not implemented + void operator =(singleton_catch); // not implemented +}; + +} } } diff --git a/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/class.hpp b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/class.hpp new file mode 100644 index 000000000000..ce1e9473a17a --- /dev/null +++ b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/class.hpp @@ -0,0 +1,50 @@ +#pragma once + +#include "sal/config.h" + +#include + +#include "com/sun/star/uno/DeploymentException.hpp" +#include "com/sun/star/uno/XComponentContext.hpp" +#include "com/sun/star/uno/XNamingService.hpp" +#include "com/sun/star/uno/Any.hxx" +#include "com/sun/star/uno/Reference.hxx" +#include "cppu/unotype.hxx" +#include "rtl/ustring.h" +#include "rtl/ustring.hxx" + +#if defined ANDROID || defined IOS //TODO +#include +#include +#endif + +#if defined LO_URE_CURRENT_ENV && defined LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_class && (LO_URE_CURRENT_ENV) == (LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_class) && defined LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_class +extern "C" ::css::uno::XInterface * SAL_CALL LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_class(::css::uno::XComponentContext *, ::css::uno::Sequence< ::css::uno::Any > const &); +#endif + +namespace test { namespace codemaker { namespace codemakertests { + +class singleton_class { +public: + static ::css::uno::Reference< ::css::uno::XNamingService > get(::css::uno::Reference< ::css::uno::XComponentContext > const & the_context) { + assert(the_context.is()); + ::css::uno::Reference< ::css::uno::XNamingService > instance; +#if defined LO_URE_CURRENT_ENV && defined LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_class && (LO_URE_CURRENT_ENV) == (LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_class) && defined LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_class + instance = ::css::uno::Reference< ::css::uno::XNamingService >(::css::uno::Reference< ::css::uno::XInterface >(static_cast< ::css::uno::XInterface * >((*LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_class)(the_context.get(), ::css::uno::Sequence< ::css::uno::Any >())), ::SAL_NO_ACQUIRE), ::css::uno::UNO_QUERY); +#else + the_context->getValueByName(::rtl::OUString( "/singletons/test.codemaker.codemakertests.class" )) >>= instance; +#endif + if (!instance.is()) { + throw ::css::uno::DeploymentException(::rtl::OUString( "component context fails to supply singleton test.codemaker.codemakertests.class of type com.sun.star.uno.XNamingService" ), the_context); + } + return instance; + } + +private: + singleton_class(); // not implemented + singleton_class(singleton_class &); // not implemented + ~singleton_class(); // not implemented + void operator =(singleton_class); // not implemented +}; + +} } } diff --git a/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/continue.hpp b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/continue.hpp new file mode 100644 index 000000000000..0df5128d1992 --- /dev/null +++ b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/continue.hpp @@ -0,0 +1,50 @@ +#pragma once + +#include "sal/config.h" + +#include + +#include "com/sun/star/uno/DeploymentException.hpp" +#include "com/sun/star/uno/XComponentContext.hpp" +#include "com/sun/star/uno/XNamingService.hpp" +#include "com/sun/star/uno/Any.hxx" +#include "com/sun/star/uno/Reference.hxx" +#include "cppu/unotype.hxx" +#include "rtl/ustring.h" +#include "rtl/ustring.hxx" + +#if defined ANDROID || defined IOS //TODO +#include +#include +#endif + +#if defined LO_URE_CURRENT_ENV && defined LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_continue && (LO_URE_CURRENT_ENV) == (LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_continue) && defined LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_continue +extern "C" ::css::uno::XInterface * SAL_CALL LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_continue(::css::uno::XComponentContext *, ::css::uno::Sequence< ::css::uno::Any > const &); +#endif + +namespace test { namespace codemaker { namespace codemakertests { + +class singleton_continue { +public: + static ::css::uno::Reference< ::css::uno::XNamingService > get(::css::uno::Reference< ::css::uno::XComponentContext > const & the_context) { + assert(the_context.is()); + ::css::uno::Reference< ::css::uno::XNamingService > instance; +#if defined LO_URE_CURRENT_ENV && defined LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_continue && (LO_URE_CURRENT_ENV) == (LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_continue) && defined LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_continue + instance = ::css::uno::Reference< ::css::uno::XNamingService >(::css::uno::Reference< ::css::uno::XInterface >(static_cast< ::css::uno::XInterface * >((*LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_continue)(the_context.get(), ::css::uno::Sequence< ::css::uno::Any >())), ::SAL_NO_ACQUIRE), ::css::uno::UNO_QUERY); +#else + the_context->getValueByName(::rtl::OUString( "/singletons/test.codemaker.codemakertests.continue" )) >>= instance; +#endif + if (!instance.is()) { + throw ::css::uno::DeploymentException(::rtl::OUString( "component context fails to supply singleton test.codemaker.codemakertests.continue of type com.sun.star.uno.XNamingService" ), the_context); + } + return instance; + } + +private: + singleton_continue(); // not implemented + singleton_continue(singleton_continue &); // not implemented + ~singleton_continue(); // not implemented + void operator =(singleton_continue); // not implemented +}; + +} } } diff --git a/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/do.hpp b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/do.hpp new file mode 100644 index 000000000000..d3161063c599 --- /dev/null +++ b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/do.hpp @@ -0,0 +1,50 @@ +#pragma once + +#include "sal/config.h" + +#include + +#include "com/sun/star/uno/DeploymentException.hpp" +#include "com/sun/star/uno/XComponentContext.hpp" +#include "com/sun/star/uno/XNamingService.hpp" +#include "com/sun/star/uno/Any.hxx" +#include "com/sun/star/uno/Reference.hxx" +#include "cppu/unotype.hxx" +#include "rtl/ustring.h" +#include "rtl/ustring.hxx" + +#if defined ANDROID || defined IOS //TODO +#include +#include +#endif + +#if defined LO_URE_CURRENT_ENV && defined LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_do && (LO_URE_CURRENT_ENV) == (LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_do) && defined LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_do +extern "C" ::css::uno::XInterface * SAL_CALL LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_do(::css::uno::XComponentContext *, ::css::uno::Sequence< ::css::uno::Any > const &); +#endif + +namespace test { namespace codemaker { namespace codemakertests { + +class singleton_do { +public: + static ::css::uno::Reference< ::css::uno::XNamingService > get(::css::uno::Reference< ::css::uno::XComponentContext > const & the_context) { + assert(the_context.is()); + ::css::uno::Reference< ::css::uno::XNamingService > instance; +#if defined LO_URE_CURRENT_ENV && defined LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_do && (LO_URE_CURRENT_ENV) == (LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_do) && defined LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_do + instance = ::css::uno::Reference< ::css::uno::XNamingService >(::css::uno::Reference< ::css::uno::XInterface >(static_cast< ::css::uno::XInterface * >((*LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_do)(the_context.get(), ::css::uno::Sequence< ::css::uno::Any >())), ::SAL_NO_ACQUIRE), ::css::uno::UNO_QUERY); +#else + the_context->getValueByName(::rtl::OUString( "/singletons/test.codemaker.codemakertests.do" )) >>= instance; +#endif + if (!instance.is()) { + throw ::css::uno::DeploymentException(::rtl::OUString( "component context fails to supply singleton test.codemaker.codemakertests.do of type com.sun.star.uno.XNamingService" ), the_context); + } + return instance; + } + +private: + singleton_do(); // not implemented + singleton_do(singleton_do &); // not implemented + ~singleton_do(); // not implemented + void operator =(singleton_do); // not implemented +}; + +} } } diff --git a/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/else.hpp b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/else.hpp new file mode 100644 index 000000000000..524848708cb3 --- /dev/null +++ b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/else.hpp @@ -0,0 +1,50 @@ +#pragma once + +#include "sal/config.h" + +#include + +#include "com/sun/star/uno/DeploymentException.hpp" +#include "com/sun/star/uno/XComponentContext.hpp" +#include "com/sun/star/uno/XNamingService.hpp" +#include "com/sun/star/uno/Any.hxx" +#include "com/sun/star/uno/Reference.hxx" +#include "cppu/unotype.hxx" +#include "rtl/ustring.h" +#include "rtl/ustring.hxx" + +#if defined ANDROID || defined IOS //TODO +#include +#include +#endif + +#if defined LO_URE_CURRENT_ENV && defined LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_else && (LO_URE_CURRENT_ENV) == (LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_else) && defined LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_else +extern "C" ::css::uno::XInterface * SAL_CALL LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_else(::css::uno::XComponentContext *, ::css::uno::Sequence< ::css::uno::Any > const &); +#endif + +namespace test { namespace codemaker { namespace codemakertests { + +class singleton_else { +public: + static ::css::uno::Reference< ::css::uno::XNamingService > get(::css::uno::Reference< ::css::uno::XComponentContext > const & the_context) { + assert(the_context.is()); + ::css::uno::Reference< ::css::uno::XNamingService > instance; +#if defined LO_URE_CURRENT_ENV && defined LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_else && (LO_URE_CURRENT_ENV) == (LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_else) && defined LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_else + instance = ::css::uno::Reference< ::css::uno::XNamingService >(::css::uno::Reference< ::css::uno::XInterface >(static_cast< ::css::uno::XInterface * >((*LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_else)(the_context.get(), ::css::uno::Sequence< ::css::uno::Any >())), ::SAL_NO_ACQUIRE), ::css::uno::UNO_QUERY); +#else + the_context->getValueByName(::rtl::OUString( "/singletons/test.codemaker.codemakertests.else" )) >>= instance; +#endif + if (!instance.is()) { + throw ::css::uno::DeploymentException(::rtl::OUString( "component context fails to supply singleton test.codemaker.codemakertests.else of type com.sun.star.uno.XNamingService" ), the_context); + } + return instance; + } + +private: + singleton_else(); // not implemented + singleton_else(singleton_else &); // not implemented + ~singleton_else(); // not implemented + void operator =(singleton_else); // not implemented +}; + +} } } diff --git a/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/exceptions/MyBaseError.hdl b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/exceptions/MyBaseError.hdl new file mode 100644 index 000000000000..183aeaf624e8 --- /dev/null +++ b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/exceptions/MyBaseError.hdl @@ -0,0 +1,46 @@ +#pragma once + +#include "sal/config.h" + +#include "com/sun/star/uno/Exception.hdl" +#include "cppu/macros.hxx" +#include "rtl/ustring.hxx" +#include "sal/types.h" + +namespace com { namespace sun { namespace star { namespace uno { class Type; } } } } + +namespace test { namespace codemaker { namespace codemakertests { namespace exceptions { + +class CPPU_GCC_DLLPUBLIC_EXPORT SAL_WARN_UNUSED MyBaseError : public ::css::uno::Exception +{ +public: + inline CPPU_GCC_DLLPRIVATE MyBaseError( +#if defined LIBO_USE_SOURCE_LOCATION + o3tl::source_location location = o3tl::source_location::current() +#endif + ); + + inline CPPU_GCC_DLLPRIVATE MyBaseError(const ::rtl::OUString& Message_, const ::css::uno::Reference< ::css::uno::XInterface >& Context_, const ::sal_Int32& ErrorCode_, const ::rtl::OUString& Details_ +#if defined LIBO_USE_SOURCE_LOCATION + , o3tl::source_location location = o3tl::source_location::current() +#endif + ); + +#if !defined LIBO_INTERNAL_ONLY + inline CPPU_GCC_DLLPRIVATE MyBaseError(MyBaseError const &); + + inline CPPU_GCC_DLLPRIVATE ~MyBaseError(); + + inline CPPU_GCC_DLLPRIVATE MyBaseError & operator =(MyBaseError const &); +#endif + + ::sal_Int32 ErrorCode CPPU_GCC3_ALIGN( ::css::uno::Exception ); + ::rtl::OUString Details; +}; + + +inline ::css::uno::Type const & cppu_detail_getUnoType(SAL_UNUSED_PARAMETER ::test::codemaker::codemakertests::exceptions::MyBaseError const *); +} } } } + +SAL_DEPRECATED("use cppu::UnoType") inline ::css::uno::Type const & SAL_CALL getCppuType(const ::test::codemaker::codemakertests::exceptions::MyBaseError *); + diff --git a/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/exceptions/MyBaseError.hpp b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/exceptions/MyBaseError.hpp new file mode 100644 index 000000000000..15806cc48220 --- /dev/null +++ b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/exceptions/MyBaseError.hpp @@ -0,0 +1,80 @@ +#pragma once + +#include "sal/config.h" + +#include "test/codemaker/codemakertests/exceptions/MyBaseError.hdl" + +#include "com/sun/star/uno/Exception.hpp" +#include "com/sun/star/uno/Type.hxx" +#include "cppu/unotype.hxx" +#include "rtl/ustring.hxx" +#include "sal/types.h" + +namespace test { namespace codemaker { namespace codemakertests { namespace exceptions { + +inline MyBaseError::MyBaseError( +#if defined LIBO_USE_SOURCE_LOCATION + o3tl::source_location location +#endif +) + : ::css::uno::Exception( +#if defined LIBO_USE_SOURCE_LOCATION + location +#endif +) + , ErrorCode(0) + , Details() +{ } + +inline MyBaseError::MyBaseError(const ::rtl::OUString& Message_, const ::css::uno::Reference< ::css::uno::XInterface >& Context_, const ::sal_Int32& ErrorCode_, const ::rtl::OUString& Details_ +#if defined LIBO_USE_SOURCE_LOCATION + , o3tl::source_location location +#endif +) + : ::css::uno::Exception(Message_, Context_ +#if defined LIBO_USE_SOURCE_LOCATION + , location +#endif +) + , ErrorCode(ErrorCode_) + , Details(Details_) +{ } + +#if !defined LIBO_INTERNAL_ONLY +MyBaseError::MyBaseError(MyBaseError const & the_other): ::css::uno::Exception(the_other), ErrorCode(the_other.ErrorCode), Details(the_other.Details) {} + +MyBaseError::~MyBaseError() {} + +MyBaseError & MyBaseError::operator =(MyBaseError const & the_other) { + //TODO: Just like its implicitly-defined counterpart, this function definition is not exception-safe + ::css::uno::Exception::operator =(the_other); + ErrorCode = the_other.ErrorCode; + Details = the_other.Details; + return *this; +} +#endif + +} } } } + +namespace test { namespace codemaker { namespace codemakertests { namespace exceptions { + +inline ::css::uno::Type const & cppu_detail_getUnoType(SAL_UNUSED_PARAMETER ::test::codemaker::codemakertests::exceptions::MyBaseError const *) { + static typelib_TypeDescriptionReference * the_type = 0; + if ( !the_type ) + { + typelib_TypeDescriptionReference * aMemberRefs[2]; + const ::css::uno::Type& rMemberType_long = ::cppu::UnoType< ::sal_Int32 >::get(); + aMemberRefs[0] = rMemberType_long.getTypeLibType(); + const ::css::uno::Type& rMemberType_string = ::cppu::UnoType< ::rtl::OUString >::get(); + aMemberRefs[1] = rMemberType_string.getTypeLibType(); + + typelib_static_compound_type_init( &the_type, typelib_TypeClass_EXCEPTION, "test.codemaker.codemakertests.exceptions.MyBaseError", * ::typelib_static_type_getByTypeClass( typelib_TypeClass_EXCEPTION ), 2, aMemberRefs ); + } + return * reinterpret_cast< const ::css::uno::Type * >( &the_type ); +} + +} } } } + +SAL_DEPRECATED("use cppu::UnoType") inline ::css::uno::Type const & SAL_CALL getCppuType(SAL_UNUSED_PARAMETER ::test::codemaker::codemakertests::exceptions::MyBaseError const *) { + return ::cppu::UnoType< ::test::codemaker::codemakertests::exceptions::MyBaseError >::get(); +} diff --git a/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/exceptions/SimpleError.hdl b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/exceptions/SimpleError.hdl new file mode 100644 index 000000000000..827373c83b72 --- /dev/null +++ b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/exceptions/SimpleError.hdl @@ -0,0 +1,42 @@ +#pragma once + +#include "sal/config.h" + +#include "com/sun/star/uno/Exception.hdl" +#include "cppu/macros.hxx" + +namespace com { namespace sun { namespace star { namespace uno { class Type; } } } } + +namespace test { namespace codemaker { namespace codemakertests { namespace exceptions { + +class CPPU_GCC_DLLPUBLIC_EXPORT SAL_WARN_UNUSED SimpleError : public ::css::uno::Exception +{ +public: + inline CPPU_GCC_DLLPRIVATE SimpleError( +#if defined LIBO_USE_SOURCE_LOCATION + o3tl::source_location location = o3tl::source_location::current() +#endif + ); + + inline CPPU_GCC_DLLPRIVATE SimpleError(const ::rtl::OUString& Message_, const ::css::uno::Reference< ::css::uno::XInterface >& Context_ = ::css::uno::Reference< ::css::uno::XInterface >() +#if defined LIBO_USE_SOURCE_LOCATION + , o3tl::source_location location = o3tl::source_location::current() +#endif + ); + +#if !defined LIBO_INTERNAL_ONLY + inline CPPU_GCC_DLLPRIVATE SimpleError(SimpleError const &); + + inline CPPU_GCC_DLLPRIVATE ~SimpleError(); + + inline CPPU_GCC_DLLPRIVATE SimpleError & operator =(SimpleError const &); +#endif + +}; + + +inline ::css::uno::Type const & cppu_detail_getUnoType(SAL_UNUSED_PARAMETER ::test::codemaker::codemakertests::exceptions::SimpleError const *); +} } } } + +SAL_DEPRECATED("use cppu::UnoType") inline ::css::uno::Type const & SAL_CALL getCppuType(const ::test::codemaker::codemakertests::exceptions::SimpleError *); + diff --git a/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/exceptions/SimpleError.hpp b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/exceptions/SimpleError.hpp new file mode 100644 index 000000000000..2f0440752d8e --- /dev/null +++ b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/exceptions/SimpleError.hpp @@ -0,0 +1,66 @@ +#pragma once + +#include "sal/config.h" + +#include "test/codemaker/codemakertests/exceptions/SimpleError.hdl" + +#include "com/sun/star/uno/Exception.hpp" +#include "com/sun/star/uno/Type.hxx" +#include "cppu/unotype.hxx" + +namespace test { namespace codemaker { namespace codemakertests { namespace exceptions { + +inline SimpleError::SimpleError( +#if defined LIBO_USE_SOURCE_LOCATION + o3tl::source_location location +#endif +) + : ::css::uno::Exception( +#if defined LIBO_USE_SOURCE_LOCATION + location +#endif +) +{ } + +inline SimpleError::SimpleError(const ::rtl::OUString& Message_, const ::css::uno::Reference< ::css::uno::XInterface >& Context_ +#if defined LIBO_USE_SOURCE_LOCATION + , o3tl::source_location location +#endif +) + : ::css::uno::Exception(Message_, Context_ +#if defined LIBO_USE_SOURCE_LOCATION + , location +#endif +) +{ } + +#if !defined LIBO_INTERNAL_ONLY +SimpleError::SimpleError(SimpleError const & the_other): ::css::uno::Exception(the_other) {} + +SimpleError::~SimpleError() {} + +SimpleError & SimpleError::operator =(SimpleError const & the_other) { + //TODO: Just like its implicitly-defined counterpart, this function definition is not exception-safe + ::css::uno::Exception::operator =(the_other); + return *this; +} +#endif + +} } } } + +namespace test { namespace codemaker { namespace codemakertests { namespace exceptions { + +inline ::css::uno::Type const & cppu_detail_getUnoType(SAL_UNUSED_PARAMETER ::test::codemaker::codemakertests::exceptions::SimpleError const *) { + static typelib_TypeDescriptionReference * the_type = 0; + if ( !the_type ) + { + typelib_static_compound_type_init( &the_type, typelib_TypeClass_EXCEPTION, "test.codemaker.codemakertests.exceptions.SimpleError", * ::typelib_static_type_getByTypeClass( typelib_TypeClass_EXCEPTION ), 0, 0 ); + } + return * reinterpret_cast< const ::css::uno::Type * >( &the_type ); +} + +} } } } + +SAL_DEPRECATED("use cppu::UnoType") inline ::css::uno::Type const & SAL_CALL getCppuType(SAL_UNUSED_PARAMETER ::test::codemaker::codemakertests::exceptions::SimpleError const *) { + return ::cppu::UnoType< ::test::codemaker::codemakertests::exceptions::SimpleError >::get(); +} diff --git a/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/extends.hpp b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/extends.hpp new file mode 100644 index 000000000000..075b8e6e8f1f --- /dev/null +++ b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/extends.hpp @@ -0,0 +1,50 @@ +#pragma once + +#include "sal/config.h" + +#include + +#include "com/sun/star/uno/DeploymentException.hpp" +#include "com/sun/star/uno/XComponentContext.hpp" +#include "com/sun/star/uno/XNamingService.hpp" +#include "com/sun/star/uno/Any.hxx" +#include "com/sun/star/uno/Reference.hxx" +#include "cppu/unotype.hxx" +#include "rtl/ustring.h" +#include "rtl/ustring.hxx" + +#if defined ANDROID || defined IOS //TODO +#include +#include +#endif + +#if defined LO_URE_CURRENT_ENV && defined LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_extends && (LO_URE_CURRENT_ENV) == (LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_extends) && defined LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_extends +extern "C" ::css::uno::XInterface * SAL_CALL LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_extends(::css::uno::XComponentContext *, ::css::uno::Sequence< ::css::uno::Any > const &); +#endif + +namespace test { namespace codemaker { namespace codemakertests { + +class extends { +public: + static ::css::uno::Reference< ::css::uno::XNamingService > get(::css::uno::Reference< ::css::uno::XComponentContext > const & the_context) { + assert(the_context.is()); + ::css::uno::Reference< ::css::uno::XNamingService > instance; +#if defined LO_URE_CURRENT_ENV && defined LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_extends && (LO_URE_CURRENT_ENV) == (LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_extends) && defined LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_extends + instance = ::css::uno::Reference< ::css::uno::XNamingService >(::css::uno::Reference< ::css::uno::XInterface >(static_cast< ::css::uno::XInterface * >((*LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_extends)(the_context.get(), ::css::uno::Sequence< ::css::uno::Any >())), ::SAL_NO_ACQUIRE), ::css::uno::UNO_QUERY); +#else + the_context->getValueByName(::rtl::OUString( "/singletons/test.codemaker.codemakertests.extends" )) >>= instance; +#endif + if (!instance.is()) { + throw ::css::uno::DeploymentException(::rtl::OUString( "component context fails to supply singleton test.codemaker.codemakertests.extends of type com.sun.star.uno.XNamingService" ), the_context); + } + return instance; + } + +private: + extends(); // not implemented + extends(extends &); // not implemented + ~extends(); // not implemented + void operator =(extends); // not implemented +}; + +} } } diff --git a/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/final.hpp b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/final.hpp new file mode 100644 index 000000000000..4b45f4b57549 --- /dev/null +++ b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/final.hpp @@ -0,0 +1,50 @@ +#pragma once + +#include "sal/config.h" + +#include + +#include "com/sun/star/uno/DeploymentException.hpp" +#include "com/sun/star/uno/XComponentContext.hpp" +#include "com/sun/star/uno/XNamingService.hpp" +#include "com/sun/star/uno/Any.hxx" +#include "com/sun/star/uno/Reference.hxx" +#include "cppu/unotype.hxx" +#include "rtl/ustring.h" +#include "rtl/ustring.hxx" + +#if defined ANDROID || defined IOS //TODO +#include +#include +#endif + +#if defined LO_URE_CURRENT_ENV && defined LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_final && (LO_URE_CURRENT_ENV) == (LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_final) && defined LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_final +extern "C" ::css::uno::XInterface * SAL_CALL LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_final(::css::uno::XComponentContext *, ::css::uno::Sequence< ::css::uno::Any > const &); +#endif + +namespace test { namespace codemaker { namespace codemakertests { + +class final { +public: + static ::css::uno::Reference< ::css::uno::XNamingService > get(::css::uno::Reference< ::css::uno::XComponentContext > const & the_context) { + assert(the_context.is()); + ::css::uno::Reference< ::css::uno::XNamingService > instance; +#if defined LO_URE_CURRENT_ENV && defined LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_final && (LO_URE_CURRENT_ENV) == (LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_final) && defined LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_final + instance = ::css::uno::Reference< ::css::uno::XNamingService >(::css::uno::Reference< ::css::uno::XInterface >(static_cast< ::css::uno::XInterface * >((*LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_final)(the_context.get(), ::css::uno::Sequence< ::css::uno::Any >())), ::SAL_NO_ACQUIRE), ::css::uno::UNO_QUERY); +#else + the_context->getValueByName(::rtl::OUString( "/singletons/test.codemaker.codemakertests.final" )) >>= instance; +#endif + if (!instance.is()) { + throw ::css::uno::DeploymentException(::rtl::OUString( "component context fails to supply singleton test.codemaker.codemakertests.final of type com.sun.star.uno.XNamingService" ), the_context); + } + return instance; + } + +private: + final(); // not implemented + final(final &); // not implemented + ~final(); // not implemented + void operator =(final); // not implemented +}; + +} } } diff --git a/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/finally.hpp b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/finally.hpp new file mode 100644 index 000000000000..c9a19d9589c2 --- /dev/null +++ b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/finally.hpp @@ -0,0 +1,50 @@ +#pragma once + +#include "sal/config.h" + +#include + +#include "com/sun/star/uno/DeploymentException.hpp" +#include "com/sun/star/uno/XComponentContext.hpp" +#include "com/sun/star/uno/XNamingService.hpp" +#include "com/sun/star/uno/Any.hxx" +#include "com/sun/star/uno/Reference.hxx" +#include "cppu/unotype.hxx" +#include "rtl/ustring.h" +#include "rtl/ustring.hxx" + +#if defined ANDROID || defined IOS //TODO +#include +#include +#endif + +#if defined LO_URE_CURRENT_ENV && defined LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_finally && (LO_URE_CURRENT_ENV) == (LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_finally) && defined LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_finally +extern "C" ::css::uno::XInterface * SAL_CALL LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_finally(::css::uno::XComponentContext *, ::css::uno::Sequence< ::css::uno::Any > const &); +#endif + +namespace test { namespace codemaker { namespace codemakertests { + +class finally { +public: + static ::css::uno::Reference< ::css::uno::XNamingService > get(::css::uno::Reference< ::css::uno::XComponentContext > const & the_context) { + assert(the_context.is()); + ::css::uno::Reference< ::css::uno::XNamingService > instance; +#if defined LO_URE_CURRENT_ENV && defined LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_finally && (LO_URE_CURRENT_ENV) == (LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_finally) && defined LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_finally + instance = ::css::uno::Reference< ::css::uno::XNamingService >(::css::uno::Reference< ::css::uno::XInterface >(static_cast< ::css::uno::XInterface * >((*LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_finally)(the_context.get(), ::css::uno::Sequence< ::css::uno::Any >())), ::SAL_NO_ACQUIRE), ::css::uno::UNO_QUERY); +#else + the_context->getValueByName(::rtl::OUString( "/singletons/test.codemaker.codemakertests.finally" )) >>= instance; +#endif + if (!instance.is()) { + throw ::css::uno::DeploymentException(::rtl::OUString( "component context fails to supply singleton test.codemaker.codemakertests.finally of type com.sun.star.uno.XNamingService" ), the_context); + } + return instance; + } + +private: + finally(); // not implemented + finally(finally &); // not implemented + ~finally(); // not implemented + void operator =(finally); // not implemented +}; + +} } } diff --git a/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/for.hpp b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/for.hpp new file mode 100644 index 000000000000..090f325bc137 --- /dev/null +++ b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/for.hpp @@ -0,0 +1,50 @@ +#pragma once + +#include "sal/config.h" + +#include + +#include "com/sun/star/uno/DeploymentException.hpp" +#include "com/sun/star/uno/XComponentContext.hpp" +#include "com/sun/star/uno/XNamingService.hpp" +#include "com/sun/star/uno/Any.hxx" +#include "com/sun/star/uno/Reference.hxx" +#include "cppu/unotype.hxx" +#include "rtl/ustring.h" +#include "rtl/ustring.hxx" + +#if defined ANDROID || defined IOS //TODO +#include +#include +#endif + +#if defined LO_URE_CURRENT_ENV && defined LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_for && (LO_URE_CURRENT_ENV) == (LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_for) && defined LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_for +extern "C" ::css::uno::XInterface * SAL_CALL LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_for(::css::uno::XComponentContext *, ::css::uno::Sequence< ::css::uno::Any > const &); +#endif + +namespace test { namespace codemaker { namespace codemakertests { + +class singleton_for { +public: + static ::css::uno::Reference< ::css::uno::XNamingService > get(::css::uno::Reference< ::css::uno::XComponentContext > const & the_context) { + assert(the_context.is()); + ::css::uno::Reference< ::css::uno::XNamingService > instance; +#if defined LO_URE_CURRENT_ENV && defined LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_for && (LO_URE_CURRENT_ENV) == (LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_for) && defined LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_for + instance = ::css::uno::Reference< ::css::uno::XNamingService >(::css::uno::Reference< ::css::uno::XInterface >(static_cast< ::css::uno::XInterface * >((*LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_for)(the_context.get(), ::css::uno::Sequence< ::css::uno::Any >())), ::SAL_NO_ACQUIRE), ::css::uno::UNO_QUERY); +#else + the_context->getValueByName(::rtl::OUString( "/singletons/test.codemaker.codemakertests.for" )) >>= instance; +#endif + if (!instance.is()) { + throw ::css::uno::DeploymentException(::rtl::OUString( "component context fails to supply singleton test.codemaker.codemakertests.for of type com.sun.star.uno.XNamingService" ), the_context); + } + return instance; + } + +private: + singleton_for(); // not implemented + singleton_for(singleton_for &); // not implemented + ~singleton_for(); // not implemented + void operator =(singleton_for); // not implemented +}; + +} } } diff --git a/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/goto.hpp b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/goto.hpp new file mode 100644 index 000000000000..942f6e3f953f --- /dev/null +++ b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/goto.hpp @@ -0,0 +1,50 @@ +#pragma once + +#include "sal/config.h" + +#include + +#include "com/sun/star/uno/DeploymentException.hpp" +#include "com/sun/star/uno/XComponentContext.hpp" +#include "com/sun/star/uno/XNamingService.hpp" +#include "com/sun/star/uno/Any.hxx" +#include "com/sun/star/uno/Reference.hxx" +#include "cppu/unotype.hxx" +#include "rtl/ustring.h" +#include "rtl/ustring.hxx" + +#if defined ANDROID || defined IOS //TODO +#include +#include +#endif + +#if defined LO_URE_CURRENT_ENV && defined LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_goto && (LO_URE_CURRENT_ENV) == (LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_goto) && defined LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_goto +extern "C" ::css::uno::XInterface * SAL_CALL LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_goto(::css::uno::XComponentContext *, ::css::uno::Sequence< ::css::uno::Any > const &); +#endif + +namespace test { namespace codemaker { namespace codemakertests { + +class singleton_goto { +public: + static ::css::uno::Reference< ::css::uno::XNamingService > get(::css::uno::Reference< ::css::uno::XComponentContext > const & the_context) { + assert(the_context.is()); + ::css::uno::Reference< ::css::uno::XNamingService > instance; +#if defined LO_URE_CURRENT_ENV && defined LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_goto && (LO_URE_CURRENT_ENV) == (LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_goto) && defined LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_goto + instance = ::css::uno::Reference< ::css::uno::XNamingService >(::css::uno::Reference< ::css::uno::XInterface >(static_cast< ::css::uno::XInterface * >((*LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_goto)(the_context.get(), ::css::uno::Sequence< ::css::uno::Any >())), ::SAL_NO_ACQUIRE), ::css::uno::UNO_QUERY); +#else + the_context->getValueByName(::rtl::OUString( "/singletons/test.codemaker.codemakertests.goto" )) >>= instance; +#endif + if (!instance.is()) { + throw ::css::uno::DeploymentException(::rtl::OUString( "component context fails to supply singleton test.codemaker.codemakertests.goto of type com.sun.star.uno.XNamingService" ), the_context); + } + return instance; + } + +private: + singleton_goto(); // not implemented + singleton_goto(singleton_goto &); // not implemented + ~singleton_goto(); // not implemented + void operator =(singleton_goto); // not implemented +}; + +} } } diff --git a/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/if.hpp b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/if.hpp new file mode 100644 index 000000000000..fb0b221b386c --- /dev/null +++ b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/if.hpp @@ -0,0 +1,50 @@ +#pragma once + +#include "sal/config.h" + +#include + +#include "com/sun/star/uno/DeploymentException.hpp" +#include "com/sun/star/uno/XComponentContext.hpp" +#include "com/sun/star/uno/XNamingService.hpp" +#include "com/sun/star/uno/Any.hxx" +#include "com/sun/star/uno/Reference.hxx" +#include "cppu/unotype.hxx" +#include "rtl/ustring.h" +#include "rtl/ustring.hxx" + +#if defined ANDROID || defined IOS //TODO +#include +#include +#endif + +#if defined LO_URE_CURRENT_ENV && defined LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_if && (LO_URE_CURRENT_ENV) == (LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_if) && defined LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_if +extern "C" ::css::uno::XInterface * SAL_CALL LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_if(::css::uno::XComponentContext *, ::css::uno::Sequence< ::css::uno::Any > const &); +#endif + +namespace test { namespace codemaker { namespace codemakertests { + +class singleton_if { +public: + static ::css::uno::Reference< ::css::uno::XNamingService > get(::css::uno::Reference< ::css::uno::XComponentContext > const & the_context) { + assert(the_context.is()); + ::css::uno::Reference< ::css::uno::XNamingService > instance; +#if defined LO_URE_CURRENT_ENV && defined LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_if && (LO_URE_CURRENT_ENV) == (LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_if) && defined LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_if + instance = ::css::uno::Reference< ::css::uno::XNamingService >(::css::uno::Reference< ::css::uno::XInterface >(static_cast< ::css::uno::XInterface * >((*LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_if)(the_context.get(), ::css::uno::Sequence< ::css::uno::Any >())), ::SAL_NO_ACQUIRE), ::css::uno::UNO_QUERY); +#else + the_context->getValueByName(::rtl::OUString( "/singletons/test.codemaker.codemakertests.if" )) >>= instance; +#endif + if (!instance.is()) { + throw ::css::uno::DeploymentException(::rtl::OUString( "component context fails to supply singleton test.codemaker.codemakertests.if of type com.sun.star.uno.XNamingService" ), the_context); + } + return instance; + } + +private: + singleton_if(); // not implemented + singleton_if(singleton_if &); // not implemented + ~singleton_if(); // not implemented + void operator =(singleton_if); // not implemented +}; + +} } } diff --git a/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/implements.hpp b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/implements.hpp new file mode 100644 index 000000000000..4b1906be3e8a --- /dev/null +++ b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/implements.hpp @@ -0,0 +1,50 @@ +#pragma once + +#include "sal/config.h" + +#include + +#include "com/sun/star/uno/DeploymentException.hpp" +#include "com/sun/star/uno/XComponentContext.hpp" +#include "com/sun/star/uno/XNamingService.hpp" +#include "com/sun/star/uno/Any.hxx" +#include "com/sun/star/uno/Reference.hxx" +#include "cppu/unotype.hxx" +#include "rtl/ustring.h" +#include "rtl/ustring.hxx" + +#if defined ANDROID || defined IOS //TODO +#include +#include +#endif + +#if defined LO_URE_CURRENT_ENV && defined LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_implements && (LO_URE_CURRENT_ENV) == (LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_implements) && defined LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_implements +extern "C" ::css::uno::XInterface * SAL_CALL LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_implements(::css::uno::XComponentContext *, ::css::uno::Sequence< ::css::uno::Any > const &); +#endif + +namespace test { namespace codemaker { namespace codemakertests { + +class implements { +public: + static ::css::uno::Reference< ::css::uno::XNamingService > get(::css::uno::Reference< ::css::uno::XComponentContext > const & the_context) { + assert(the_context.is()); + ::css::uno::Reference< ::css::uno::XNamingService > instance; +#if defined LO_URE_CURRENT_ENV && defined LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_implements && (LO_URE_CURRENT_ENV) == (LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_implements) && defined LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_implements + instance = ::css::uno::Reference< ::css::uno::XNamingService >(::css::uno::Reference< ::css::uno::XInterface >(static_cast< ::css::uno::XInterface * >((*LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_implements)(the_context.get(), ::css::uno::Sequence< ::css::uno::Any >())), ::SAL_NO_ACQUIRE), ::css::uno::UNO_QUERY); +#else + the_context->getValueByName(::rtl::OUString( "/singletons/test.codemaker.codemakertests.implements" )) >>= instance; +#endif + if (!instance.is()) { + throw ::css::uno::DeploymentException(::rtl::OUString( "component context fails to supply singleton test.codemaker.codemakertests.implements of type com.sun.star.uno.XNamingService" ), the_context); + } + return instance; + } + +private: + implements(); // not implemented + implements(implements &); // not implemented + ~implements(); // not implemented + void operator =(implements); // not implemented +}; + +} } } diff --git a/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/import.hpp b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/import.hpp new file mode 100644 index 000000000000..d834638b54db --- /dev/null +++ b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/import.hpp @@ -0,0 +1,50 @@ +#pragma once + +#include "sal/config.h" + +#include + +#include "com/sun/star/uno/DeploymentException.hpp" +#include "com/sun/star/uno/XComponentContext.hpp" +#include "com/sun/star/uno/XNamingService.hpp" +#include "com/sun/star/uno/Any.hxx" +#include "com/sun/star/uno/Reference.hxx" +#include "cppu/unotype.hxx" +#include "rtl/ustring.h" +#include "rtl/ustring.hxx" + +#if defined ANDROID || defined IOS //TODO +#include +#include +#endif + +#if defined LO_URE_CURRENT_ENV && defined LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_import && (LO_URE_CURRENT_ENV) == (LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_import) && defined LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_import +extern "C" ::css::uno::XInterface * SAL_CALL LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_import(::css::uno::XComponentContext *, ::css::uno::Sequence< ::css::uno::Any > const &); +#endif + +namespace test { namespace codemaker { namespace codemakertests { + +class import { +public: + static ::css::uno::Reference< ::css::uno::XNamingService > get(::css::uno::Reference< ::css::uno::XComponentContext > const & the_context) { + assert(the_context.is()); + ::css::uno::Reference< ::css::uno::XNamingService > instance; +#if defined LO_URE_CURRENT_ENV && defined LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_import && (LO_URE_CURRENT_ENV) == (LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_import) && defined LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_import + instance = ::css::uno::Reference< ::css::uno::XNamingService >(::css::uno::Reference< ::css::uno::XInterface >(static_cast< ::css::uno::XInterface * >((*LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_import)(the_context.get(), ::css::uno::Sequence< ::css::uno::Any >())), ::SAL_NO_ACQUIRE), ::css::uno::UNO_QUERY); +#else + the_context->getValueByName(::rtl::OUString( "/singletons/test.codemaker.codemakertests.import" )) >>= instance; +#endif + if (!instance.is()) { + throw ::css::uno::DeploymentException(::rtl::OUString( "component context fails to supply singleton test.codemaker.codemakertests.import of type com.sun.star.uno.XNamingService" ), the_context); + } + return instance; + } + +private: + import(); // not implemented + import(import &); // not implemented + ~import(); // not implemented + void operator =(import); // not implemented +}; + +} } } diff --git a/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/instanceof.hpp b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/instanceof.hpp new file mode 100644 index 000000000000..f70d06f3a82f --- /dev/null +++ b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/instanceof.hpp @@ -0,0 +1,50 @@ +#pragma once + +#include "sal/config.h" + +#include + +#include "com/sun/star/uno/DeploymentException.hpp" +#include "com/sun/star/uno/XComponentContext.hpp" +#include "com/sun/star/uno/XNamingService.hpp" +#include "com/sun/star/uno/Any.hxx" +#include "com/sun/star/uno/Reference.hxx" +#include "cppu/unotype.hxx" +#include "rtl/ustring.h" +#include "rtl/ustring.hxx" + +#if defined ANDROID || defined IOS //TODO +#include +#include +#endif + +#if defined LO_URE_CURRENT_ENV && defined LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_instanceof && (LO_URE_CURRENT_ENV) == (LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_instanceof) && defined LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_instanceof +extern "C" ::css::uno::XInterface * SAL_CALL LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_instanceof(::css::uno::XComponentContext *, ::css::uno::Sequence< ::css::uno::Any > const &); +#endif + +namespace test { namespace codemaker { namespace codemakertests { + +class instanceof { +public: + static ::css::uno::Reference< ::css::uno::XNamingService > get(::css::uno::Reference< ::css::uno::XComponentContext > const & the_context) { + assert(the_context.is()); + ::css::uno::Reference< ::css::uno::XNamingService > instance; +#if defined LO_URE_CURRENT_ENV && defined LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_instanceof && (LO_URE_CURRENT_ENV) == (LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_instanceof) && defined LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_instanceof + instance = ::css::uno::Reference< ::css::uno::XNamingService >(::css::uno::Reference< ::css::uno::XInterface >(static_cast< ::css::uno::XInterface * >((*LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_instanceof)(the_context.get(), ::css::uno::Sequence< ::css::uno::Any >())), ::SAL_NO_ACQUIRE), ::css::uno::UNO_QUERY); +#else + the_context->getValueByName(::rtl::OUString( "/singletons/test.codemaker.codemakertests.instanceof" )) >>= instance; +#endif + if (!instance.is()) { + throw ::css::uno::DeploymentException(::rtl::OUString( "component context fails to supply singleton test.codemaker.codemakertests.instanceof of type com.sun.star.uno.XNamingService" ), the_context); + } + return instance; + } + +private: + instanceof(); // not implemented + instanceof(instanceof &); // not implemented + ~instanceof(); // not implemented + void operator =(instanceof); // not implemented +}; + +} } } diff --git a/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/int.hpp b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/int.hpp new file mode 100644 index 000000000000..13c3d252b793 --- /dev/null +++ b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/int.hpp @@ -0,0 +1,50 @@ +#pragma once + +#include "sal/config.h" + +#include + +#include "com/sun/star/uno/DeploymentException.hpp" +#include "com/sun/star/uno/XComponentContext.hpp" +#include "com/sun/star/uno/XNamingService.hpp" +#include "com/sun/star/uno/Any.hxx" +#include "com/sun/star/uno/Reference.hxx" +#include "cppu/unotype.hxx" +#include "rtl/ustring.h" +#include "rtl/ustring.hxx" + +#if defined ANDROID || defined IOS //TODO +#include +#include +#endif + +#if defined LO_URE_CURRENT_ENV && defined LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_int && (LO_URE_CURRENT_ENV) == (LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_int) && defined LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_int +extern "C" ::css::uno::XInterface * SAL_CALL LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_int(::css::uno::XComponentContext *, ::css::uno::Sequence< ::css::uno::Any > const &); +#endif + +namespace test { namespace codemaker { namespace codemakertests { + +class singleton_int { +public: + static ::css::uno::Reference< ::css::uno::XNamingService > get(::css::uno::Reference< ::css::uno::XComponentContext > const & the_context) { + assert(the_context.is()); + ::css::uno::Reference< ::css::uno::XNamingService > instance; +#if defined LO_URE_CURRENT_ENV && defined LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_int && (LO_URE_CURRENT_ENV) == (LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_int) && defined LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_int + instance = ::css::uno::Reference< ::css::uno::XNamingService >(::css::uno::Reference< ::css::uno::XInterface >(static_cast< ::css::uno::XInterface * >((*LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_int)(the_context.get(), ::css::uno::Sequence< ::css::uno::Any >())), ::SAL_NO_ACQUIRE), ::css::uno::UNO_QUERY); +#else + the_context->getValueByName(::rtl::OUString( "/singletons/test.codemaker.codemakertests.int" )) >>= instance; +#endif + if (!instance.is()) { + throw ::css::uno::DeploymentException(::rtl::OUString( "component context fails to supply singleton test.codemaker.codemakertests.int of type com.sun.star.uno.XNamingService" ), the_context); + } + return instance; + } + +private: + singleton_int(); // not implemented + singleton_int(singleton_int &); // not implemented + ~singleton_int(); // not implemented + void operator =(singleton_int); // not implemented +}; + +} } } diff --git a/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/native.hpp b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/native.hpp new file mode 100644 index 000000000000..33e894ddfb0a --- /dev/null +++ b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/native.hpp @@ -0,0 +1,50 @@ +#pragma once + +#include "sal/config.h" + +#include + +#include "com/sun/star/uno/DeploymentException.hpp" +#include "com/sun/star/uno/XComponentContext.hpp" +#include "com/sun/star/uno/XNamingService.hpp" +#include "com/sun/star/uno/Any.hxx" +#include "com/sun/star/uno/Reference.hxx" +#include "cppu/unotype.hxx" +#include "rtl/ustring.h" +#include "rtl/ustring.hxx" + +#if defined ANDROID || defined IOS //TODO +#include +#include +#endif + +#if defined LO_URE_CURRENT_ENV && defined LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_native && (LO_URE_CURRENT_ENV) == (LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_native) && defined LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_native +extern "C" ::css::uno::XInterface * SAL_CALL LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_native(::css::uno::XComponentContext *, ::css::uno::Sequence< ::css::uno::Any > const &); +#endif + +namespace test { namespace codemaker { namespace codemakertests { + +class native { +public: + static ::css::uno::Reference< ::css::uno::XNamingService > get(::css::uno::Reference< ::css::uno::XComponentContext > const & the_context) { + assert(the_context.is()); + ::css::uno::Reference< ::css::uno::XNamingService > instance; +#if defined LO_URE_CURRENT_ENV && defined LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_native && (LO_URE_CURRENT_ENV) == (LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_native) && defined LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_native + instance = ::css::uno::Reference< ::css::uno::XNamingService >(::css::uno::Reference< ::css::uno::XInterface >(static_cast< ::css::uno::XInterface * >((*LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_native)(the_context.get(), ::css::uno::Sequence< ::css::uno::Any >())), ::SAL_NO_ACQUIRE), ::css::uno::UNO_QUERY); +#else + the_context->getValueByName(::rtl::OUString( "/singletons/test.codemaker.codemakertests.native" )) >>= instance; +#endif + if (!instance.is()) { + throw ::css::uno::DeploymentException(::rtl::OUString( "component context fails to supply singleton test.codemaker.codemakertests.native of type com.sun.star.uno.XNamingService" ), the_context); + } + return instance; + } + +private: + native(); // not implemented + native(native &); // not implemented + ~native(); // not implemented + void operator =(native); // not implemented +}; + +} } } diff --git a/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/new.hpp b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/new.hpp new file mode 100644 index 000000000000..166cfcd2d305 --- /dev/null +++ b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/new.hpp @@ -0,0 +1,50 @@ +#pragma once + +#include "sal/config.h" + +#include + +#include "com/sun/star/uno/DeploymentException.hpp" +#include "com/sun/star/uno/XComponentContext.hpp" +#include "com/sun/star/uno/XNamingService.hpp" +#include "com/sun/star/uno/Any.hxx" +#include "com/sun/star/uno/Reference.hxx" +#include "cppu/unotype.hxx" +#include "rtl/ustring.h" +#include "rtl/ustring.hxx" + +#if defined ANDROID || defined IOS //TODO +#include +#include +#endif + +#if defined LO_URE_CURRENT_ENV && defined LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_new && (LO_URE_CURRENT_ENV) == (LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_new) && defined LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_new +extern "C" ::css::uno::XInterface * SAL_CALL LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_new(::css::uno::XComponentContext *, ::css::uno::Sequence< ::css::uno::Any > const &); +#endif + +namespace test { namespace codemaker { namespace codemakertests { + +class singleton_new { +public: + static ::css::uno::Reference< ::css::uno::XNamingService > get(::css::uno::Reference< ::css::uno::XComponentContext > const & the_context) { + assert(the_context.is()); + ::css::uno::Reference< ::css::uno::XNamingService > instance; +#if defined LO_URE_CURRENT_ENV && defined LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_new && (LO_URE_CURRENT_ENV) == (LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_new) && defined LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_new + instance = ::css::uno::Reference< ::css::uno::XNamingService >(::css::uno::Reference< ::css::uno::XInterface >(static_cast< ::css::uno::XInterface * >((*LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_new)(the_context.get(), ::css::uno::Sequence< ::css::uno::Any >())), ::SAL_NO_ACQUIRE), ::css::uno::UNO_QUERY); +#else + the_context->getValueByName(::rtl::OUString( "/singletons/test.codemaker.codemakertests.new" )) >>= instance; +#endif + if (!instance.is()) { + throw ::css::uno::DeploymentException(::rtl::OUString( "component context fails to supply singleton test.codemaker.codemakertests.new of type com.sun.star.uno.XNamingService" ), the_context); + } + return instance; + } + +private: + singleton_new(); // not implemented + singleton_new(singleton_new &); // not implemented + ~singleton_new(); // not implemented + void operator =(singleton_new); // not implemented +}; + +} } } diff --git a/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/package.hpp b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/package.hpp new file mode 100644 index 000000000000..513483c423bf --- /dev/null +++ b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/package.hpp @@ -0,0 +1,50 @@ +#pragma once + +#include "sal/config.h" + +#include + +#include "com/sun/star/uno/DeploymentException.hpp" +#include "com/sun/star/uno/XComponentContext.hpp" +#include "com/sun/star/uno/XNamingService.hpp" +#include "com/sun/star/uno/Any.hxx" +#include "com/sun/star/uno/Reference.hxx" +#include "cppu/unotype.hxx" +#include "rtl/ustring.h" +#include "rtl/ustring.hxx" + +#if defined ANDROID || defined IOS //TODO +#include +#include +#endif + +#if defined LO_URE_CURRENT_ENV && defined LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_package && (LO_URE_CURRENT_ENV) == (LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_package) && defined LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_package +extern "C" ::css::uno::XInterface * SAL_CALL LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_package(::css::uno::XComponentContext *, ::css::uno::Sequence< ::css::uno::Any > const &); +#endif + +namespace test { namespace codemaker { namespace codemakertests { + +class package { +public: + static ::css::uno::Reference< ::css::uno::XNamingService > get(::css::uno::Reference< ::css::uno::XComponentContext > const & the_context) { + assert(the_context.is()); + ::css::uno::Reference< ::css::uno::XNamingService > instance; +#if defined LO_URE_CURRENT_ENV && defined LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_package && (LO_URE_CURRENT_ENV) == (LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_package) && defined LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_package + instance = ::css::uno::Reference< ::css::uno::XNamingService >(::css::uno::Reference< ::css::uno::XInterface >(static_cast< ::css::uno::XInterface * >((*LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_package)(the_context.get(), ::css::uno::Sequence< ::css::uno::Any >())), ::SAL_NO_ACQUIRE), ::css::uno::UNO_QUERY); +#else + the_context->getValueByName(::rtl::OUString( "/singletons/test.codemaker.codemakertests.package" )) >>= instance; +#endif + if (!instance.is()) { + throw ::css::uno::DeploymentException(::rtl::OUString( "component context fails to supply singleton test.codemaker.codemakertests.package of type com.sun.star.uno.XNamingService" ), the_context); + } + return instance; + } + +private: + package(); // not implemented + package(package &); // not implemented + ~package(); // not implemented + void operator =(package); // not implemented +}; + +} } } diff --git a/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/private.hpp b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/private.hpp new file mode 100644 index 000000000000..c7e3b574a2bb --- /dev/null +++ b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/private.hpp @@ -0,0 +1,50 @@ +#pragma once + +#include "sal/config.h" + +#include + +#include "com/sun/star/uno/DeploymentException.hpp" +#include "com/sun/star/uno/XComponentContext.hpp" +#include "com/sun/star/uno/XNamingService.hpp" +#include "com/sun/star/uno/Any.hxx" +#include "com/sun/star/uno/Reference.hxx" +#include "cppu/unotype.hxx" +#include "rtl/ustring.h" +#include "rtl/ustring.hxx" + +#if defined ANDROID || defined IOS //TODO +#include +#include +#endif + +#if defined LO_URE_CURRENT_ENV && defined LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_private && (LO_URE_CURRENT_ENV) == (LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_private) && defined LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_private +extern "C" ::css::uno::XInterface * SAL_CALL LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_private(::css::uno::XComponentContext *, ::css::uno::Sequence< ::css::uno::Any > const &); +#endif + +namespace test { namespace codemaker { namespace codemakertests { + +class singleton_private { +public: + static ::css::uno::Reference< ::css::uno::XNamingService > get(::css::uno::Reference< ::css::uno::XComponentContext > const & the_context) { + assert(the_context.is()); + ::css::uno::Reference< ::css::uno::XNamingService > instance; +#if defined LO_URE_CURRENT_ENV && defined LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_private && (LO_URE_CURRENT_ENV) == (LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_private) && defined LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_private + instance = ::css::uno::Reference< ::css::uno::XNamingService >(::css::uno::Reference< ::css::uno::XInterface >(static_cast< ::css::uno::XInterface * >((*LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_private)(the_context.get(), ::css::uno::Sequence< ::css::uno::Any >())), ::SAL_NO_ACQUIRE), ::css::uno::UNO_QUERY); +#else + the_context->getValueByName(::rtl::OUString( "/singletons/test.codemaker.codemakertests.private" )) >>= instance; +#endif + if (!instance.is()) { + throw ::css::uno::DeploymentException(::rtl::OUString( "component context fails to supply singleton test.codemaker.codemakertests.private of type com.sun.star.uno.XNamingService" ), the_context); + } + return instance; + } + +private: + singleton_private(); // not implemented + singleton_private(singleton_private &); // not implemented + ~singleton_private(); // not implemented + void operator =(singleton_private); // not implemented +}; + +} } } diff --git a/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/protected.hpp b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/protected.hpp new file mode 100644 index 000000000000..f1a4d848cdf0 --- /dev/null +++ b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/protected.hpp @@ -0,0 +1,50 @@ +#pragma once + +#include "sal/config.h" + +#include + +#include "com/sun/star/uno/DeploymentException.hpp" +#include "com/sun/star/uno/XComponentContext.hpp" +#include "com/sun/star/uno/XNamingService.hpp" +#include "com/sun/star/uno/Any.hxx" +#include "com/sun/star/uno/Reference.hxx" +#include "cppu/unotype.hxx" +#include "rtl/ustring.h" +#include "rtl/ustring.hxx" + +#if defined ANDROID || defined IOS //TODO +#include +#include +#endif + +#if defined LO_URE_CURRENT_ENV && defined LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_protected && (LO_URE_CURRENT_ENV) == (LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_protected) && defined LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_protected +extern "C" ::css::uno::XInterface * SAL_CALL LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_protected(::css::uno::XComponentContext *, ::css::uno::Sequence< ::css::uno::Any > const &); +#endif + +namespace test { namespace codemaker { namespace codemakertests { + +class singleton_protected { +public: + static ::css::uno::Reference< ::css::uno::XNamingService > get(::css::uno::Reference< ::css::uno::XComponentContext > const & the_context) { + assert(the_context.is()); + ::css::uno::Reference< ::css::uno::XNamingService > instance; +#if defined LO_URE_CURRENT_ENV && defined LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_protected && (LO_URE_CURRENT_ENV) == (LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_protected) && defined LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_protected + instance = ::css::uno::Reference< ::css::uno::XNamingService >(::css::uno::Reference< ::css::uno::XInterface >(static_cast< ::css::uno::XInterface * >((*LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_protected)(the_context.get(), ::css::uno::Sequence< ::css::uno::Any >())), ::SAL_NO_ACQUIRE), ::css::uno::UNO_QUERY); +#else + the_context->getValueByName(::rtl::OUString( "/singletons/test.codemaker.codemakertests.protected" )) >>= instance; +#endif + if (!instance.is()) { + throw ::css::uno::DeploymentException(::rtl::OUString( "component context fails to supply singleton test.codemaker.codemakertests.protected of type com.sun.star.uno.XNamingService" ), the_context); + } + return instance; + } + +private: + singleton_protected(); // not implemented + singleton_protected(singleton_protected &); // not implemented + ~singleton_protected(); // not implemented + void operator =(singleton_protected); // not implemented +}; + +} } } diff --git a/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/public.hpp b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/public.hpp new file mode 100644 index 000000000000..f32c890048f7 --- /dev/null +++ b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/public.hpp @@ -0,0 +1,50 @@ +#pragma once + +#include "sal/config.h" + +#include + +#include "com/sun/star/uno/DeploymentException.hpp" +#include "com/sun/star/uno/XComponentContext.hpp" +#include "com/sun/star/uno/XNamingService.hpp" +#include "com/sun/star/uno/Any.hxx" +#include "com/sun/star/uno/Reference.hxx" +#include "cppu/unotype.hxx" +#include "rtl/ustring.h" +#include "rtl/ustring.hxx" + +#if defined ANDROID || defined IOS //TODO +#include +#include +#endif + +#if defined LO_URE_CURRENT_ENV && defined LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_public && (LO_URE_CURRENT_ENV) == (LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_public) && defined LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_public +extern "C" ::css::uno::XInterface * SAL_CALL LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_public(::css::uno::XComponentContext *, ::css::uno::Sequence< ::css::uno::Any > const &); +#endif + +namespace test { namespace codemaker { namespace codemakertests { + +class singleton_public { +public: + static ::css::uno::Reference< ::css::uno::XNamingService > get(::css::uno::Reference< ::css::uno::XComponentContext > const & the_context) { + assert(the_context.is()); + ::css::uno::Reference< ::css::uno::XNamingService > instance; +#if defined LO_URE_CURRENT_ENV && defined LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_public && (LO_URE_CURRENT_ENV) == (LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_public) && defined LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_public + instance = ::css::uno::Reference< ::css::uno::XNamingService >(::css::uno::Reference< ::css::uno::XInterface >(static_cast< ::css::uno::XInterface * >((*LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_public)(the_context.get(), ::css::uno::Sequence< ::css::uno::Any >())), ::SAL_NO_ACQUIRE), ::css::uno::UNO_QUERY); +#else + the_context->getValueByName(::rtl::OUString( "/singletons/test.codemaker.codemakertests.public" )) >>= instance; +#endif + if (!instance.is()) { + throw ::css::uno::DeploymentException(::rtl::OUString( "component context fails to supply singleton test.codemaker.codemakertests.public of type com.sun.star.uno.XNamingService" ), the_context); + } + return instance; + } + +private: + singleton_public(); // not implemented + singleton_public(singleton_public &); // not implemented + ~singleton_public(); // not implemented + void operator =(singleton_public); // not implemented +}; + +} } } diff --git a/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/return.hpp b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/return.hpp new file mode 100644 index 000000000000..a73e66377de3 --- /dev/null +++ b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/return.hpp @@ -0,0 +1,50 @@ +#pragma once + +#include "sal/config.h" + +#include + +#include "com/sun/star/uno/DeploymentException.hpp" +#include "com/sun/star/uno/XComponentContext.hpp" +#include "com/sun/star/uno/XNamingService.hpp" +#include "com/sun/star/uno/Any.hxx" +#include "com/sun/star/uno/Reference.hxx" +#include "cppu/unotype.hxx" +#include "rtl/ustring.h" +#include "rtl/ustring.hxx" + +#if defined ANDROID || defined IOS //TODO +#include +#include +#endif + +#if defined LO_URE_CURRENT_ENV && defined LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_return && (LO_URE_CURRENT_ENV) == (LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_return) && defined LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_return +extern "C" ::css::uno::XInterface * SAL_CALL LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_return(::css::uno::XComponentContext *, ::css::uno::Sequence< ::css::uno::Any > const &); +#endif + +namespace test { namespace codemaker { namespace codemakertests { + +class singleton_return { +public: + static ::css::uno::Reference< ::css::uno::XNamingService > get(::css::uno::Reference< ::css::uno::XComponentContext > const & the_context) { + assert(the_context.is()); + ::css::uno::Reference< ::css::uno::XNamingService > instance; +#if defined LO_URE_CURRENT_ENV && defined LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_return && (LO_URE_CURRENT_ENV) == (LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_return) && defined LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_return + instance = ::css::uno::Reference< ::css::uno::XNamingService >(::css::uno::Reference< ::css::uno::XInterface >(static_cast< ::css::uno::XInterface * >((*LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_return)(the_context.get(), ::css::uno::Sequence< ::css::uno::Any >())), ::SAL_NO_ACQUIRE), ::css::uno::UNO_QUERY); +#else + the_context->getValueByName(::rtl::OUString( "/singletons/test.codemaker.codemakertests.return" )) >>= instance; +#endif + if (!instance.is()) { + throw ::css::uno::DeploymentException(::rtl::OUString( "component context fails to supply singleton test.codemaker.codemakertests.return of type com.sun.star.uno.XNamingService" ), the_context); + } + return instance; + } + +private: + singleton_return(); // not implemented + singleton_return(singleton_return &); // not implemented + ~singleton_return(); // not implemented + void operator =(singleton_return); // not implemented +}; + +} } } diff --git a/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/services/abstract.hpp b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/services/abstract.hpp new file mode 100644 index 000000000000..52a45fac6f26 --- /dev/null +++ b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/services/abstract.hpp @@ -0,0 +1,67 @@ +#pragma once + +#include "sal/config.h" + +#include + +#include "com/sun/star/uno/DeploymentException.hpp" +#include "com/sun/star/uno/Exception.hpp" +#include "com/sun/star/uno/RuntimeException.hpp" +#include "com/sun/star/uno/XComponentContext.hpp" +#include "com/sun/star/uno/XInterface.hpp" +#include "com/sun/star/uno/Any.hxx" +#include "com/sun/star/uno/Reference.hxx" +#include "com/sun/star/uno/Sequence.hxx" +#include "cppu/unotype.hxx" +#include "rtl/ustring.h" +#include "rtl/ustring.hxx" +#include "sal/types.h" + +#if defined ANDROID || defined IOS //TODO +#include +#include +#endif + +#if defined LO_URE_CURRENT_ENV && defined LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_services_dot_abstract && (LO_URE_CURRENT_ENV) == (LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_services_dot_abstract) && defined LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_services_dot_abstract +extern "C" ::css::uno::XInterface * SAL_CALL LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_services_dot_abstract(::css::uno::XComponentContext *, ::css::uno::Sequence< ::css::uno::Any > const &); +#endif + +namespace test { namespace codemaker { namespace codemakertests { namespace services { + +class abstract { +public: + static ::css::uno::Reference< ::css::uno::XInterface > method_abstract(::css::uno::Reference< ::css::uno::XComponentContext > const & the_context, ::sal_Int32 abstract) { + assert(the_context.is()); + ::css::uno::Sequence< ::css::uno::Any > the_arguments(1); + ::css::uno::Any* the_arguments_array = the_arguments.getArray(); + the_arguments_array[0] <<= abstract; + ::css::uno::Reference< ::css::uno::XInterface > the_instance; + try { +#if defined LO_URE_CURRENT_ENV && defined LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_services_dot_abstract && (LO_URE_CURRENT_ENV) == (LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_services_dot_abstract) && defined LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_services_dot_abstract + the_instance = ::css::uno::Reference< ::css::uno::XInterface >(::css::uno::Reference< ::css::uno::XInterface >(static_cast< ::css::uno::XInterface * >((*LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_services_dot_abstract)(the_context.get(), the_arguments)), ::SAL_NO_ACQUIRE), ::css::uno::UNO_QUERY); + ::css::uno::Reference< ::css::lang::XInitialization > init(the_instance, ::css::uno::UNO_QUERY); + if (init.is()) { + init->initialize(the_arguments); + } +#else + the_instance = ::css::uno::Reference< ::css::uno::XInterface >(the_context->getServiceManager()->createInstanceWithArgumentsAndContext( "test.codemaker.codemakertests.services.abstract", the_arguments, the_context), ::css::uno::UNO_QUERY); +#endif + } catch (const ::css::uno::RuntimeException &) { + throw; + } catch (const ::css::uno::Exception & the_exception) { + throw ::css::uno::DeploymentException(::rtl::OUString("component context fails to supply service ") + "test.codemaker.codemakertests.services.abstract" + " of type " + "com.sun.star.uno.XInterface" + ": " + the_exception.Message, the_context); + } + if (!the_instance.is()) { + throw ::css::uno::DeploymentException(::rtl::OUString("component context fails to supply service ") + "test.codemaker.codemakertests.services.abstract" + " of type " + "com.sun.star.uno.XInterface", the_context); + } + return the_instance; + } + +private: + abstract(); // not implemented + abstract(abstract &); // not implemented + ~abstract(); // not implemented + void operator =(abstract); // not implemented +}; + +} } } } diff --git a/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/services/assert.hpp b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/services/assert.hpp new file mode 100644 index 000000000000..40c5ffc1126b --- /dev/null +++ b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/services/assert.hpp @@ -0,0 +1,67 @@ +#pragma once + +#include "sal/config.h" + +#include + +#include "com/sun/star/uno/DeploymentException.hpp" +#include "com/sun/star/uno/Exception.hpp" +#include "com/sun/star/uno/RuntimeException.hpp" +#include "com/sun/star/uno/XComponentContext.hpp" +#include "com/sun/star/uno/XInterface.hpp" +#include "com/sun/star/uno/Any.hxx" +#include "com/sun/star/uno/Reference.hxx" +#include "com/sun/star/uno/Sequence.hxx" +#include "cppu/unotype.hxx" +#include "rtl/ustring.h" +#include "rtl/ustring.hxx" +#include "sal/types.h" + +#if defined ANDROID || defined IOS //TODO +#include +#include +#endif + +#if defined LO_URE_CURRENT_ENV && defined LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_services_dot_assert && (LO_URE_CURRENT_ENV) == (LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_services_dot_assert) && defined LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_services_dot_assert +extern "C" ::css::uno::XInterface * SAL_CALL LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_services_dot_assert(::css::uno::XComponentContext *, ::css::uno::Sequence< ::css::uno::Any > const &); +#endif + +namespace test { namespace codemaker { namespace codemakertests { namespace services { + +class service_assert { +public: + static ::css::uno::Reference< ::css::uno::XInterface > method_assert(::css::uno::Reference< ::css::uno::XComponentContext > const & the_context, ::sal_Int32 param_assert) { + assert(the_context.is()); + ::css::uno::Sequence< ::css::uno::Any > the_arguments(1); + ::css::uno::Any* the_arguments_array = the_arguments.getArray(); + the_arguments_array[0] <<= param_assert; + ::css::uno::Reference< ::css::uno::XInterface > the_instance; + try { +#if defined LO_URE_CURRENT_ENV && defined LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_services_dot_assert && (LO_URE_CURRENT_ENV) == (LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_services_dot_assert) && defined LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_services_dot_assert + the_instance = ::css::uno::Reference< ::css::uno::XInterface >(::css::uno::Reference< ::css::uno::XInterface >(static_cast< ::css::uno::XInterface * >((*LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_services_dot_assert)(the_context.get(), the_arguments)), ::SAL_NO_ACQUIRE), ::css::uno::UNO_QUERY); + ::css::uno::Reference< ::css::lang::XInitialization > init(the_instance, ::css::uno::UNO_QUERY); + if (init.is()) { + init->initialize(the_arguments); + } +#else + the_instance = ::css::uno::Reference< ::css::uno::XInterface >(the_context->getServiceManager()->createInstanceWithArgumentsAndContext( "test.codemaker.codemakertests.services.assert", the_arguments, the_context), ::css::uno::UNO_QUERY); +#endif + } catch (const ::css::uno::RuntimeException &) { + throw; + } catch (const ::css::uno::Exception & the_exception) { + throw ::css::uno::DeploymentException(::rtl::OUString("component context fails to supply service ") + "test.codemaker.codemakertests.services.assert" + " of type " + "com.sun.star.uno.XInterface" + ": " + the_exception.Message, the_context); + } + if (!the_instance.is()) { + throw ::css::uno::DeploymentException(::rtl::OUString("component context fails to supply service ") + "test.codemaker.codemakertests.services.assert" + " of type " + "com.sun.star.uno.XInterface", the_context); + } + return the_instance; + } + +private: + service_assert(); // not implemented + service_assert(service_assert &); // not implemented + ~service_assert(); // not implemented + void operator =(service_assert); // not implemented +}; + +} } } } diff --git a/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/services/break.hpp b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/services/break.hpp new file mode 100644 index 000000000000..4f2bd0327782 --- /dev/null +++ b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/services/break.hpp @@ -0,0 +1,67 @@ +#pragma once + +#include "sal/config.h" + +#include + +#include "com/sun/star/uno/DeploymentException.hpp" +#include "com/sun/star/uno/Exception.hpp" +#include "com/sun/star/uno/RuntimeException.hpp" +#include "com/sun/star/uno/XComponentContext.hpp" +#include "com/sun/star/uno/XInterface.hpp" +#include "com/sun/star/uno/Any.hxx" +#include "com/sun/star/uno/Reference.hxx" +#include "com/sun/star/uno/Sequence.hxx" +#include "cppu/unotype.hxx" +#include "rtl/ustring.h" +#include "rtl/ustring.hxx" +#include "sal/types.h" + +#if defined ANDROID || defined IOS //TODO +#include +#include +#endif + +#if defined LO_URE_CURRENT_ENV && defined LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_services_dot_break && (LO_URE_CURRENT_ENV) == (LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_services_dot_break) && defined LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_services_dot_break +extern "C" ::css::uno::XInterface * SAL_CALL LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_services_dot_break(::css::uno::XComponentContext *, ::css::uno::Sequence< ::css::uno::Any > const &); +#endif + +namespace test { namespace codemaker { namespace codemakertests { namespace services { + +class service_break { +public: + static ::css::uno::Reference< ::css::uno::XInterface > method_break(::css::uno::Reference< ::css::uno::XComponentContext > const & the_context, ::sal_Int32 param_break) { + assert(the_context.is()); + ::css::uno::Sequence< ::css::uno::Any > the_arguments(1); + ::css::uno::Any* the_arguments_array = the_arguments.getArray(); + the_arguments_array[0] <<= param_break; + ::css::uno::Reference< ::css::uno::XInterface > the_instance; + try { +#if defined LO_URE_CURRENT_ENV && defined LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_services_dot_break && (LO_URE_CURRENT_ENV) == (LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_services_dot_break) && defined LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_services_dot_break + the_instance = ::css::uno::Reference< ::css::uno::XInterface >(::css::uno::Reference< ::css::uno::XInterface >(static_cast< ::css::uno::XInterface * >((*LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_services_dot_break)(the_context.get(), the_arguments)), ::SAL_NO_ACQUIRE), ::css::uno::UNO_QUERY); + ::css::uno::Reference< ::css::lang::XInitialization > init(the_instance, ::css::uno::UNO_QUERY); + if (init.is()) { + init->initialize(the_arguments); + } +#else + the_instance = ::css::uno::Reference< ::css::uno::XInterface >(the_context->getServiceManager()->createInstanceWithArgumentsAndContext( "test.codemaker.codemakertests.services.break", the_arguments, the_context), ::css::uno::UNO_QUERY); +#endif + } catch (const ::css::uno::RuntimeException &) { + throw; + } catch (const ::css::uno::Exception & the_exception) { + throw ::css::uno::DeploymentException(::rtl::OUString("component context fails to supply service ") + "test.codemaker.codemakertests.services.break" + " of type " + "com.sun.star.uno.XInterface" + ": " + the_exception.Message, the_context); + } + if (!the_instance.is()) { + throw ::css::uno::DeploymentException(::rtl::OUString("component context fails to supply service ") + "test.codemaker.codemakertests.services.break" + " of type " + "com.sun.star.uno.XInterface", the_context); + } + return the_instance; + } + +private: + service_break(); // not implemented + service_break(service_break &); // not implemented + ~service_break(); // not implemented + void operator =(service_break); // not implemented +}; + +} } } } diff --git a/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/services/catch.hpp b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/services/catch.hpp new file mode 100644 index 000000000000..329312745d78 --- /dev/null +++ b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/services/catch.hpp @@ -0,0 +1,67 @@ +#pragma once + +#include "sal/config.h" + +#include + +#include "com/sun/star/uno/DeploymentException.hpp" +#include "com/sun/star/uno/Exception.hpp" +#include "com/sun/star/uno/RuntimeException.hpp" +#include "com/sun/star/uno/XComponentContext.hpp" +#include "com/sun/star/uno/XInterface.hpp" +#include "com/sun/star/uno/Any.hxx" +#include "com/sun/star/uno/Reference.hxx" +#include "com/sun/star/uno/Sequence.hxx" +#include "cppu/unotype.hxx" +#include "rtl/ustring.h" +#include "rtl/ustring.hxx" +#include "sal/types.h" + +#if defined ANDROID || defined IOS //TODO +#include +#include +#endif + +#if defined LO_URE_CURRENT_ENV && defined LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_services_dot_catch && (LO_URE_CURRENT_ENV) == (LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_services_dot_catch) && defined LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_services_dot_catch +extern "C" ::css::uno::XInterface * SAL_CALL LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_services_dot_catch(::css::uno::XComponentContext *, ::css::uno::Sequence< ::css::uno::Any > const &); +#endif + +namespace test { namespace codemaker { namespace codemakertests { namespace services { + +class service_catch { +public: + static ::css::uno::Reference< ::css::uno::XInterface > method_catch(::css::uno::Reference< ::css::uno::XComponentContext > const & the_context, ::sal_Int32 param_catch) { + assert(the_context.is()); + ::css::uno::Sequence< ::css::uno::Any > the_arguments(1); + ::css::uno::Any* the_arguments_array = the_arguments.getArray(); + the_arguments_array[0] <<= param_catch; + ::css::uno::Reference< ::css::uno::XInterface > the_instance; + try { +#if defined LO_URE_CURRENT_ENV && defined LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_services_dot_catch && (LO_URE_CURRENT_ENV) == (LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_services_dot_catch) && defined LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_services_dot_catch + the_instance = ::css::uno::Reference< ::css::uno::XInterface >(::css::uno::Reference< ::css::uno::XInterface >(static_cast< ::css::uno::XInterface * >((*LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_services_dot_catch)(the_context.get(), the_arguments)), ::SAL_NO_ACQUIRE), ::css::uno::UNO_QUERY); + ::css::uno::Reference< ::css::lang::XInitialization > init(the_instance, ::css::uno::UNO_QUERY); + if (init.is()) { + init->initialize(the_arguments); + } +#else + the_instance = ::css::uno::Reference< ::css::uno::XInterface >(the_context->getServiceManager()->createInstanceWithArgumentsAndContext( "test.codemaker.codemakertests.services.catch", the_arguments, the_context), ::css::uno::UNO_QUERY); +#endif + } catch (const ::css::uno::RuntimeException &) { + throw; + } catch (const ::css::uno::Exception & the_exception) { + throw ::css::uno::DeploymentException(::rtl::OUString("component context fails to supply service ") + "test.codemaker.codemakertests.services.catch" + " of type " + "com.sun.star.uno.XInterface" + ": " + the_exception.Message, the_context); + } + if (!the_instance.is()) { + throw ::css::uno::DeploymentException(::rtl::OUString("component context fails to supply service ") + "test.codemaker.codemakertests.services.catch" + " of type " + "com.sun.star.uno.XInterface", the_context); + } + return the_instance; + } + +private: + service_catch(); // not implemented + service_catch(service_catch &); // not implemented + ~service_catch(); // not implemented + void operator =(service_catch); // not implemented +}; + +} } } } diff --git a/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/services/class.hpp b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/services/class.hpp new file mode 100644 index 000000000000..9bf5df291223 --- /dev/null +++ b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/services/class.hpp @@ -0,0 +1,67 @@ +#pragma once + +#include "sal/config.h" + +#include + +#include "com/sun/star/uno/DeploymentException.hpp" +#include "com/sun/star/uno/Exception.hpp" +#include "com/sun/star/uno/RuntimeException.hpp" +#include "com/sun/star/uno/XComponentContext.hpp" +#include "com/sun/star/uno/XInterface.hpp" +#include "com/sun/star/uno/Any.hxx" +#include "com/sun/star/uno/Reference.hxx" +#include "com/sun/star/uno/Sequence.hxx" +#include "cppu/unotype.hxx" +#include "rtl/ustring.h" +#include "rtl/ustring.hxx" +#include "sal/types.h" + +#if defined ANDROID || defined IOS //TODO +#include +#include +#endif + +#if defined LO_URE_CURRENT_ENV && defined LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_services_dot_class && (LO_URE_CURRENT_ENV) == (LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_services_dot_class) && defined LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_services_dot_class +extern "C" ::css::uno::XInterface * SAL_CALL LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_services_dot_class(::css::uno::XComponentContext *, ::css::uno::Sequence< ::css::uno::Any > const &); +#endif + +namespace test { namespace codemaker { namespace codemakertests { namespace services { + +class service_class { +public: + static ::css::uno::Reference< ::css::uno::XInterface > method_class(::css::uno::Reference< ::css::uno::XComponentContext > const & the_context, ::sal_Int32 param_class) { + assert(the_context.is()); + ::css::uno::Sequence< ::css::uno::Any > the_arguments(1); + ::css::uno::Any* the_arguments_array = the_arguments.getArray(); + the_arguments_array[0] <<= param_class; + ::css::uno::Reference< ::css::uno::XInterface > the_instance; + try { +#if defined LO_URE_CURRENT_ENV && defined LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_services_dot_class && (LO_URE_CURRENT_ENV) == (LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_services_dot_class) && defined LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_services_dot_class + the_instance = ::css::uno::Reference< ::css::uno::XInterface >(::css::uno::Reference< ::css::uno::XInterface >(static_cast< ::css::uno::XInterface * >((*LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_services_dot_class)(the_context.get(), the_arguments)), ::SAL_NO_ACQUIRE), ::css::uno::UNO_QUERY); + ::css::uno::Reference< ::css::lang::XInitialization > init(the_instance, ::css::uno::UNO_QUERY); + if (init.is()) { + init->initialize(the_arguments); + } +#else + the_instance = ::css::uno::Reference< ::css::uno::XInterface >(the_context->getServiceManager()->createInstanceWithArgumentsAndContext( "test.codemaker.codemakertests.services.class", the_arguments, the_context), ::css::uno::UNO_QUERY); +#endif + } catch (const ::css::uno::RuntimeException &) { + throw; + } catch (const ::css::uno::Exception & the_exception) { + throw ::css::uno::DeploymentException(::rtl::OUString("component context fails to supply service ") + "test.codemaker.codemakertests.services.class" + " of type " + "com.sun.star.uno.XInterface" + ": " + the_exception.Message, the_context); + } + if (!the_instance.is()) { + throw ::css::uno::DeploymentException(::rtl::OUString("component context fails to supply service ") + "test.codemaker.codemakertests.services.class" + " of type " + "com.sun.star.uno.XInterface", the_context); + } + return the_instance; + } + +private: + service_class(); // not implemented + service_class(service_class &); // not implemented + ~service_class(); // not implemented + void operator =(service_class); // not implemented +}; + +} } } } diff --git a/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/services/continue.hpp b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/services/continue.hpp new file mode 100644 index 000000000000..4de444b4ae03 --- /dev/null +++ b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/services/continue.hpp @@ -0,0 +1,67 @@ +#pragma once + +#include "sal/config.h" + +#include + +#include "com/sun/star/uno/DeploymentException.hpp" +#include "com/sun/star/uno/Exception.hpp" +#include "com/sun/star/uno/RuntimeException.hpp" +#include "com/sun/star/uno/XComponentContext.hpp" +#include "com/sun/star/uno/XInterface.hpp" +#include "com/sun/star/uno/Any.hxx" +#include "com/sun/star/uno/Reference.hxx" +#include "com/sun/star/uno/Sequence.hxx" +#include "cppu/unotype.hxx" +#include "rtl/ustring.h" +#include "rtl/ustring.hxx" +#include "sal/types.h" + +#if defined ANDROID || defined IOS //TODO +#include +#include +#endif + +#if defined LO_URE_CURRENT_ENV && defined LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_services_dot_continue && (LO_URE_CURRENT_ENV) == (LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_services_dot_continue) && defined LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_services_dot_continue +extern "C" ::css::uno::XInterface * SAL_CALL LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_services_dot_continue(::css::uno::XComponentContext *, ::css::uno::Sequence< ::css::uno::Any > const &); +#endif + +namespace test { namespace codemaker { namespace codemakertests { namespace services { + +class service_continue { +public: + static ::css::uno::Reference< ::css::uno::XInterface > method_continue(::css::uno::Reference< ::css::uno::XComponentContext > const & the_context, ::sal_Int32 param_continue) { + assert(the_context.is()); + ::css::uno::Sequence< ::css::uno::Any > the_arguments(1); + ::css::uno::Any* the_arguments_array = the_arguments.getArray(); + the_arguments_array[0] <<= param_continue; + ::css::uno::Reference< ::css::uno::XInterface > the_instance; + try { +#if defined LO_URE_CURRENT_ENV && defined LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_services_dot_continue && (LO_URE_CURRENT_ENV) == (LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_services_dot_continue) && defined LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_services_dot_continue + the_instance = ::css::uno::Reference< ::css::uno::XInterface >(::css::uno::Reference< ::css::uno::XInterface >(static_cast< ::css::uno::XInterface * >((*LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_services_dot_continue)(the_context.get(), the_arguments)), ::SAL_NO_ACQUIRE), ::css::uno::UNO_QUERY); + ::css::uno::Reference< ::css::lang::XInitialization > init(the_instance, ::css::uno::UNO_QUERY); + if (init.is()) { + init->initialize(the_arguments); + } +#else + the_instance = ::css::uno::Reference< ::css::uno::XInterface >(the_context->getServiceManager()->createInstanceWithArgumentsAndContext( "test.codemaker.codemakertests.services.continue", the_arguments, the_context), ::css::uno::UNO_QUERY); +#endif + } catch (const ::css::uno::RuntimeException &) { + throw; + } catch (const ::css::uno::Exception & the_exception) { + throw ::css::uno::DeploymentException(::rtl::OUString("component context fails to supply service ") + "test.codemaker.codemakertests.services.continue" + " of type " + "com.sun.star.uno.XInterface" + ": " + the_exception.Message, the_context); + } + if (!the_instance.is()) { + throw ::css::uno::DeploymentException(::rtl::OUString("component context fails to supply service ") + "test.codemaker.codemakertests.services.continue" + " of type " + "com.sun.star.uno.XInterface", the_context); + } + return the_instance; + } + +private: + service_continue(); // not implemented + service_continue(service_continue &); // not implemented + ~service_continue(); // not implemented + void operator =(service_continue); // not implemented +}; + +} } } } diff --git a/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/services/do.hpp b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/services/do.hpp new file mode 100644 index 000000000000..b503d6b1aeb1 --- /dev/null +++ b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/services/do.hpp @@ -0,0 +1,67 @@ +#pragma once + +#include "sal/config.h" + +#include + +#include "com/sun/star/uno/DeploymentException.hpp" +#include "com/sun/star/uno/Exception.hpp" +#include "com/sun/star/uno/RuntimeException.hpp" +#include "com/sun/star/uno/XComponentContext.hpp" +#include "com/sun/star/uno/XInterface.hpp" +#include "com/sun/star/uno/Any.hxx" +#include "com/sun/star/uno/Reference.hxx" +#include "com/sun/star/uno/Sequence.hxx" +#include "cppu/unotype.hxx" +#include "rtl/ustring.h" +#include "rtl/ustring.hxx" +#include "sal/types.h" + +#if defined ANDROID || defined IOS //TODO +#include +#include +#endif + +#if defined LO_URE_CURRENT_ENV && defined LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_services_dot_do && (LO_URE_CURRENT_ENV) == (LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_services_dot_do) && defined LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_services_dot_do +extern "C" ::css::uno::XInterface * SAL_CALL LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_services_dot_do(::css::uno::XComponentContext *, ::css::uno::Sequence< ::css::uno::Any > const &); +#endif + +namespace test { namespace codemaker { namespace codemakertests { namespace services { + +class service_do { +public: + static ::css::uno::Reference< ::css::uno::XInterface > method_do(::css::uno::Reference< ::css::uno::XComponentContext > const & the_context, ::sal_Int32 param_do) { + assert(the_context.is()); + ::css::uno::Sequence< ::css::uno::Any > the_arguments(1); + ::css::uno::Any* the_arguments_array = the_arguments.getArray(); + the_arguments_array[0] <<= param_do; + ::css::uno::Reference< ::css::uno::XInterface > the_instance; + try { +#if defined LO_URE_CURRENT_ENV && defined LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_services_dot_do && (LO_URE_CURRENT_ENV) == (LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_services_dot_do) && defined LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_services_dot_do + the_instance = ::css::uno::Reference< ::css::uno::XInterface >(::css::uno::Reference< ::css::uno::XInterface >(static_cast< ::css::uno::XInterface * >((*LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_services_dot_do)(the_context.get(), the_arguments)), ::SAL_NO_ACQUIRE), ::css::uno::UNO_QUERY); + ::css::uno::Reference< ::css::lang::XInitialization > init(the_instance, ::css::uno::UNO_QUERY); + if (init.is()) { + init->initialize(the_arguments); + } +#else + the_instance = ::css::uno::Reference< ::css::uno::XInterface >(the_context->getServiceManager()->createInstanceWithArgumentsAndContext( "test.codemaker.codemakertests.services.do", the_arguments, the_context), ::css::uno::UNO_QUERY); +#endif + } catch (const ::css::uno::RuntimeException &) { + throw; + } catch (const ::css::uno::Exception & the_exception) { + throw ::css::uno::DeploymentException(::rtl::OUString("component context fails to supply service ") + "test.codemaker.codemakertests.services.do" + " of type " + "com.sun.star.uno.XInterface" + ": " + the_exception.Message, the_context); + } + if (!the_instance.is()) { + throw ::css::uno::DeploymentException(::rtl::OUString("component context fails to supply service ") + "test.codemaker.codemakertests.services.do" + " of type " + "com.sun.star.uno.XInterface", the_context); + } + return the_instance; + } + +private: + service_do(); // not implemented + service_do(service_do &); // not implemented + ~service_do(); // not implemented + void operator =(service_do); // not implemented +}; + +} } } } diff --git a/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/services/else.hpp b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/services/else.hpp new file mode 100644 index 000000000000..83c7c284877b --- /dev/null +++ b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/services/else.hpp @@ -0,0 +1,67 @@ +#pragma once + +#include "sal/config.h" + +#include + +#include "com/sun/star/uno/DeploymentException.hpp" +#include "com/sun/star/uno/Exception.hpp" +#include "com/sun/star/uno/RuntimeException.hpp" +#include "com/sun/star/uno/XComponentContext.hpp" +#include "com/sun/star/uno/XInterface.hpp" +#include "com/sun/star/uno/Any.hxx" +#include "com/sun/star/uno/Reference.hxx" +#include "com/sun/star/uno/Sequence.hxx" +#include "cppu/unotype.hxx" +#include "rtl/ustring.h" +#include "rtl/ustring.hxx" +#include "sal/types.h" + +#if defined ANDROID || defined IOS //TODO +#include +#include +#endif + +#if defined LO_URE_CURRENT_ENV && defined LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_services_dot_else && (LO_URE_CURRENT_ENV) == (LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_services_dot_else) && defined LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_services_dot_else +extern "C" ::css::uno::XInterface * SAL_CALL LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_services_dot_else(::css::uno::XComponentContext *, ::css::uno::Sequence< ::css::uno::Any > const &); +#endif + +namespace test { namespace codemaker { namespace codemakertests { namespace services { + +class service_else { +public: + static ::css::uno::Reference< ::css::uno::XInterface > method_else(::css::uno::Reference< ::css::uno::XComponentContext > const & the_context, ::sal_Int32 param_else) { + assert(the_context.is()); + ::css::uno::Sequence< ::css::uno::Any > the_arguments(1); + ::css::uno::Any* the_arguments_array = the_arguments.getArray(); + the_arguments_array[0] <<= param_else; + ::css::uno::Reference< ::css::uno::XInterface > the_instance; + try { +#if defined LO_URE_CURRENT_ENV && defined LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_services_dot_else && (LO_URE_CURRENT_ENV) == (LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_services_dot_else) && defined LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_services_dot_else + the_instance = ::css::uno::Reference< ::css::uno::XInterface >(::css::uno::Reference< ::css::uno::XInterface >(static_cast< ::css::uno::XInterface * >((*LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_services_dot_else)(the_context.get(), the_arguments)), ::SAL_NO_ACQUIRE), ::css::uno::UNO_QUERY); + ::css::uno::Reference< ::css::lang::XInitialization > init(the_instance, ::css::uno::UNO_QUERY); + if (init.is()) { + init->initialize(the_arguments); + } +#else + the_instance = ::css::uno::Reference< ::css::uno::XInterface >(the_context->getServiceManager()->createInstanceWithArgumentsAndContext( "test.codemaker.codemakertests.services.else", the_arguments, the_context), ::css::uno::UNO_QUERY); +#endif + } catch (const ::css::uno::RuntimeException &) { + throw; + } catch (const ::css::uno::Exception & the_exception) { + throw ::css::uno::DeploymentException(::rtl::OUString("component context fails to supply service ") + "test.codemaker.codemakertests.services.else" + " of type " + "com.sun.star.uno.XInterface" + ": " + the_exception.Message, the_context); + } + if (!the_instance.is()) { + throw ::css::uno::DeploymentException(::rtl::OUString("component context fails to supply service ") + "test.codemaker.codemakertests.services.else" + " of type " + "com.sun.star.uno.XInterface", the_context); + } + return the_instance; + } + +private: + service_else(); // not implemented + service_else(service_else &); // not implemented + ~service_else(); // not implemented + void operator =(service_else); // not implemented +}; + +} } } } diff --git a/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/services/extends.hpp b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/services/extends.hpp new file mode 100644 index 000000000000..664d58a105cb --- /dev/null +++ b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/services/extends.hpp @@ -0,0 +1,67 @@ +#pragma once + +#include "sal/config.h" + +#include + +#include "com/sun/star/uno/DeploymentException.hpp" +#include "com/sun/star/uno/Exception.hpp" +#include "com/sun/star/uno/RuntimeException.hpp" +#include "com/sun/star/uno/XComponentContext.hpp" +#include "com/sun/star/uno/XInterface.hpp" +#include "com/sun/star/uno/Any.hxx" +#include "com/sun/star/uno/Reference.hxx" +#include "com/sun/star/uno/Sequence.hxx" +#include "cppu/unotype.hxx" +#include "rtl/ustring.h" +#include "rtl/ustring.hxx" +#include "sal/types.h" + +#if defined ANDROID || defined IOS //TODO +#include +#include +#endif + +#if defined LO_URE_CURRENT_ENV && defined LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_services_dot_extends && (LO_URE_CURRENT_ENV) == (LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_services_dot_extends) && defined LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_services_dot_extends +extern "C" ::css::uno::XInterface * SAL_CALL LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_services_dot_extends(::css::uno::XComponentContext *, ::css::uno::Sequence< ::css::uno::Any > const &); +#endif + +namespace test { namespace codemaker { namespace codemakertests { namespace services { + +class extends { +public: + static ::css::uno::Reference< ::css::uno::XInterface > method_extends(::css::uno::Reference< ::css::uno::XComponentContext > const & the_context, ::sal_Int32 extends) { + assert(the_context.is()); + ::css::uno::Sequence< ::css::uno::Any > the_arguments(1); + ::css::uno::Any* the_arguments_array = the_arguments.getArray(); + the_arguments_array[0] <<= extends; + ::css::uno::Reference< ::css::uno::XInterface > the_instance; + try { +#if defined LO_URE_CURRENT_ENV && defined LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_services_dot_extends && (LO_URE_CURRENT_ENV) == (LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_services_dot_extends) && defined LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_services_dot_extends + the_instance = ::css::uno::Reference< ::css::uno::XInterface >(::css::uno::Reference< ::css::uno::XInterface >(static_cast< ::css::uno::XInterface * >((*LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_services_dot_extends)(the_context.get(), the_arguments)), ::SAL_NO_ACQUIRE), ::css::uno::UNO_QUERY); + ::css::uno::Reference< ::css::lang::XInitialization > init(the_instance, ::css::uno::UNO_QUERY); + if (init.is()) { + init->initialize(the_arguments); + } +#else + the_instance = ::css::uno::Reference< ::css::uno::XInterface >(the_context->getServiceManager()->createInstanceWithArgumentsAndContext( "test.codemaker.codemakertests.services.extends", the_arguments, the_context), ::css::uno::UNO_QUERY); +#endif + } catch (const ::css::uno::RuntimeException &) { + throw; + } catch (const ::css::uno::Exception & the_exception) { + throw ::css::uno::DeploymentException(::rtl::OUString("component context fails to supply service ") + "test.codemaker.codemakertests.services.extends" + " of type " + "com.sun.star.uno.XInterface" + ": " + the_exception.Message, the_context); + } + if (!the_instance.is()) { + throw ::css::uno::DeploymentException(::rtl::OUString("component context fails to supply service ") + "test.codemaker.codemakertests.services.extends" + " of type " + "com.sun.star.uno.XInterface", the_context); + } + return the_instance; + } + +private: + extends(); // not implemented + extends(extends &); // not implemented + ~extends(); // not implemented + void operator =(extends); // not implemented +}; + +} } } } diff --git a/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/services/final.hpp b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/services/final.hpp new file mode 100644 index 000000000000..c2b93f80cc7d --- /dev/null +++ b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/services/final.hpp @@ -0,0 +1,67 @@ +#pragma once + +#include "sal/config.h" + +#include + +#include "com/sun/star/uno/DeploymentException.hpp" +#include "com/sun/star/uno/Exception.hpp" +#include "com/sun/star/uno/RuntimeException.hpp" +#include "com/sun/star/uno/XComponentContext.hpp" +#include "com/sun/star/uno/XInterface.hpp" +#include "com/sun/star/uno/Any.hxx" +#include "com/sun/star/uno/Reference.hxx" +#include "com/sun/star/uno/Sequence.hxx" +#include "cppu/unotype.hxx" +#include "rtl/ustring.h" +#include "rtl/ustring.hxx" +#include "sal/types.h" + +#if defined ANDROID || defined IOS //TODO +#include +#include +#endif + +#if defined LO_URE_CURRENT_ENV && defined LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_services_dot_final && (LO_URE_CURRENT_ENV) == (LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_services_dot_final) && defined LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_services_dot_final +extern "C" ::css::uno::XInterface * SAL_CALL LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_services_dot_final(::css::uno::XComponentContext *, ::css::uno::Sequence< ::css::uno::Any > const &); +#endif + +namespace test { namespace codemaker { namespace codemakertests { namespace services { + +class final { +public: + static ::css::uno::Reference< ::css::uno::XInterface > method_final(::css::uno::Reference< ::css::uno::XComponentContext > const & the_context, ::sal_Int32 final) { + assert(the_context.is()); + ::css::uno::Sequence< ::css::uno::Any > the_arguments(1); + ::css::uno::Any* the_arguments_array = the_arguments.getArray(); + the_arguments_array[0] <<= final; + ::css::uno::Reference< ::css::uno::XInterface > the_instance; + try { +#if defined LO_URE_CURRENT_ENV && defined LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_services_dot_final && (LO_URE_CURRENT_ENV) == (LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_services_dot_final) && defined LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_services_dot_final + the_instance = ::css::uno::Reference< ::css::uno::XInterface >(::css::uno::Reference< ::css::uno::XInterface >(static_cast< ::css::uno::XInterface * >((*LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_services_dot_final)(the_context.get(), the_arguments)), ::SAL_NO_ACQUIRE), ::css::uno::UNO_QUERY); + ::css::uno::Reference< ::css::lang::XInitialization > init(the_instance, ::css::uno::UNO_QUERY); + if (init.is()) { + init->initialize(the_arguments); + } +#else + the_instance = ::css::uno::Reference< ::css::uno::XInterface >(the_context->getServiceManager()->createInstanceWithArgumentsAndContext( "test.codemaker.codemakertests.services.final", the_arguments, the_context), ::css::uno::UNO_QUERY); +#endif + } catch (const ::css::uno::RuntimeException &) { + throw; + } catch (const ::css::uno::Exception & the_exception) { + throw ::css::uno::DeploymentException(::rtl::OUString("component context fails to supply service ") + "test.codemaker.codemakertests.services.final" + " of type " + "com.sun.star.uno.XInterface" + ": " + the_exception.Message, the_context); + } + if (!the_instance.is()) { + throw ::css::uno::DeploymentException(::rtl::OUString("component context fails to supply service ") + "test.codemaker.codemakertests.services.final" + " of type " + "com.sun.star.uno.XInterface", the_context); + } + return the_instance; + } + +private: + final(); // not implemented + final(final &); // not implemented + ~final(); // not implemented + void operator =(final); // not implemented +}; + +} } } } diff --git a/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/services/finally.hpp b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/services/finally.hpp new file mode 100644 index 000000000000..db87297cf7c4 --- /dev/null +++ b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/services/finally.hpp @@ -0,0 +1,67 @@ +#pragma once + +#include "sal/config.h" + +#include + +#include "com/sun/star/uno/DeploymentException.hpp" +#include "com/sun/star/uno/Exception.hpp" +#include "com/sun/star/uno/RuntimeException.hpp" +#include "com/sun/star/uno/XComponentContext.hpp" +#include "com/sun/star/uno/XInterface.hpp" +#include "com/sun/star/uno/Any.hxx" +#include "com/sun/star/uno/Reference.hxx" +#include "com/sun/star/uno/Sequence.hxx" +#include "cppu/unotype.hxx" +#include "rtl/ustring.h" +#include "rtl/ustring.hxx" +#include "sal/types.h" + +#if defined ANDROID || defined IOS //TODO +#include +#include +#endif + +#if defined LO_URE_CURRENT_ENV && defined LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_services_dot_finally && (LO_URE_CURRENT_ENV) == (LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_services_dot_finally) && defined LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_services_dot_finally +extern "C" ::css::uno::XInterface * SAL_CALL LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_services_dot_finally(::css::uno::XComponentContext *, ::css::uno::Sequence< ::css::uno::Any > const &); +#endif + +namespace test { namespace codemaker { namespace codemakertests { namespace services { + +class finally { +public: + static ::css::uno::Reference< ::css::uno::XInterface > method_finally(::css::uno::Reference< ::css::uno::XComponentContext > const & the_context, ::sal_Int32 finally) { + assert(the_context.is()); + ::css::uno::Sequence< ::css::uno::Any > the_arguments(1); + ::css::uno::Any* the_arguments_array = the_arguments.getArray(); + the_arguments_array[0] <<= finally; + ::css::uno::Reference< ::css::uno::XInterface > the_instance; + try { +#if defined LO_URE_CURRENT_ENV && defined LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_services_dot_finally && (LO_URE_CURRENT_ENV) == (LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_services_dot_finally) && defined LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_services_dot_finally + the_instance = ::css::uno::Reference< ::css::uno::XInterface >(::css::uno::Reference< ::css::uno::XInterface >(static_cast< ::css::uno::XInterface * >((*LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_services_dot_finally)(the_context.get(), the_arguments)), ::SAL_NO_ACQUIRE), ::css::uno::UNO_QUERY); + ::css::uno::Reference< ::css::lang::XInitialization > init(the_instance, ::css::uno::UNO_QUERY); + if (init.is()) { + init->initialize(the_arguments); + } +#else + the_instance = ::css::uno::Reference< ::css::uno::XInterface >(the_context->getServiceManager()->createInstanceWithArgumentsAndContext( "test.codemaker.codemakertests.services.finally", the_arguments, the_context), ::css::uno::UNO_QUERY); +#endif + } catch (const ::css::uno::RuntimeException &) { + throw; + } catch (const ::css::uno::Exception & the_exception) { + throw ::css::uno::DeploymentException(::rtl::OUString("component context fails to supply service ") + "test.codemaker.codemakertests.services.finally" + " of type " + "com.sun.star.uno.XInterface" + ": " + the_exception.Message, the_context); + } + if (!the_instance.is()) { + throw ::css::uno::DeploymentException(::rtl::OUString("component context fails to supply service ") + "test.codemaker.codemakertests.services.finally" + " of type " + "com.sun.star.uno.XInterface", the_context); + } + return the_instance; + } + +private: + finally(); // not implemented + finally(finally &); // not implemented + ~finally(); // not implemented + void operator =(finally); // not implemented +}; + +} } } } diff --git a/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/services/for.hpp b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/services/for.hpp new file mode 100644 index 000000000000..3be6616b7f05 --- /dev/null +++ b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/services/for.hpp @@ -0,0 +1,67 @@ +#pragma once + +#include "sal/config.h" + +#include + +#include "com/sun/star/uno/DeploymentException.hpp" +#include "com/sun/star/uno/Exception.hpp" +#include "com/sun/star/uno/RuntimeException.hpp" +#include "com/sun/star/uno/XComponentContext.hpp" +#include "com/sun/star/uno/XInterface.hpp" +#include "com/sun/star/uno/Any.hxx" +#include "com/sun/star/uno/Reference.hxx" +#include "com/sun/star/uno/Sequence.hxx" +#include "cppu/unotype.hxx" +#include "rtl/ustring.h" +#include "rtl/ustring.hxx" +#include "sal/types.h" + +#if defined ANDROID || defined IOS //TODO +#include +#include +#endif + +#if defined LO_URE_CURRENT_ENV && defined LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_services_dot_for && (LO_URE_CURRENT_ENV) == (LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_services_dot_for) && defined LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_services_dot_for +extern "C" ::css::uno::XInterface * SAL_CALL LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_services_dot_for(::css::uno::XComponentContext *, ::css::uno::Sequence< ::css::uno::Any > const &); +#endif + +namespace test { namespace codemaker { namespace codemakertests { namespace services { + +class service_for { +public: + static ::css::uno::Reference< ::css::uno::XInterface > method_for(::css::uno::Reference< ::css::uno::XComponentContext > const & the_context, ::sal_Int32 param_for) { + assert(the_context.is()); + ::css::uno::Sequence< ::css::uno::Any > the_arguments(1); + ::css::uno::Any* the_arguments_array = the_arguments.getArray(); + the_arguments_array[0] <<= param_for; + ::css::uno::Reference< ::css::uno::XInterface > the_instance; + try { +#if defined LO_URE_CURRENT_ENV && defined LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_services_dot_for && (LO_URE_CURRENT_ENV) == (LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_services_dot_for) && defined LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_services_dot_for + the_instance = ::css::uno::Reference< ::css::uno::XInterface >(::css::uno::Reference< ::css::uno::XInterface >(static_cast< ::css::uno::XInterface * >((*LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_services_dot_for)(the_context.get(), the_arguments)), ::SAL_NO_ACQUIRE), ::css::uno::UNO_QUERY); + ::css::uno::Reference< ::css::lang::XInitialization > init(the_instance, ::css::uno::UNO_QUERY); + if (init.is()) { + init->initialize(the_arguments); + } +#else + the_instance = ::css::uno::Reference< ::css::uno::XInterface >(the_context->getServiceManager()->createInstanceWithArgumentsAndContext( "test.codemaker.codemakertests.services.for", the_arguments, the_context), ::css::uno::UNO_QUERY); +#endif + } catch (const ::css::uno::RuntimeException &) { + throw; + } catch (const ::css::uno::Exception & the_exception) { + throw ::css::uno::DeploymentException(::rtl::OUString("component context fails to supply service ") + "test.codemaker.codemakertests.services.for" + " of type " + "com.sun.star.uno.XInterface" + ": " + the_exception.Message, the_context); + } + if (!the_instance.is()) { + throw ::css::uno::DeploymentException(::rtl::OUString("component context fails to supply service ") + "test.codemaker.codemakertests.services.for" + " of type " + "com.sun.star.uno.XInterface", the_context); + } + return the_instance; + } + +private: + service_for(); // not implemented + service_for(service_for &); // not implemented + ~service_for(); // not implemented + void operator =(service_for); // not implemented +}; + +} } } } diff --git a/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/services/goto.hpp b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/services/goto.hpp new file mode 100644 index 000000000000..fc95d9d1d5d1 --- /dev/null +++ b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/services/goto.hpp @@ -0,0 +1,67 @@ +#pragma once + +#include "sal/config.h" + +#include + +#include "com/sun/star/uno/DeploymentException.hpp" +#include "com/sun/star/uno/Exception.hpp" +#include "com/sun/star/uno/RuntimeException.hpp" +#include "com/sun/star/uno/XComponentContext.hpp" +#include "com/sun/star/uno/XInterface.hpp" +#include "com/sun/star/uno/Any.hxx" +#include "com/sun/star/uno/Reference.hxx" +#include "com/sun/star/uno/Sequence.hxx" +#include "cppu/unotype.hxx" +#include "rtl/ustring.h" +#include "rtl/ustring.hxx" +#include "sal/types.h" + +#if defined ANDROID || defined IOS //TODO +#include +#include +#endif + +#if defined LO_URE_CURRENT_ENV && defined LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_services_dot_goto && (LO_URE_CURRENT_ENV) == (LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_services_dot_goto) && defined LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_services_dot_goto +extern "C" ::css::uno::XInterface * SAL_CALL LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_services_dot_goto(::css::uno::XComponentContext *, ::css::uno::Sequence< ::css::uno::Any > const &); +#endif + +namespace test { namespace codemaker { namespace codemakertests { namespace services { + +class service_goto { +public: + static ::css::uno::Reference< ::css::uno::XInterface > method_goto(::css::uno::Reference< ::css::uno::XComponentContext > const & the_context, ::sal_Int32 param_goto) { + assert(the_context.is()); + ::css::uno::Sequence< ::css::uno::Any > the_arguments(1); + ::css::uno::Any* the_arguments_array = the_arguments.getArray(); + the_arguments_array[0] <<= param_goto; + ::css::uno::Reference< ::css::uno::XInterface > the_instance; + try { +#if defined LO_URE_CURRENT_ENV && defined LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_services_dot_goto && (LO_URE_CURRENT_ENV) == (LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_services_dot_goto) && defined LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_services_dot_goto + the_instance = ::css::uno::Reference< ::css::uno::XInterface >(::css::uno::Reference< ::css::uno::XInterface >(static_cast< ::css::uno::XInterface * >((*LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_services_dot_goto)(the_context.get(), the_arguments)), ::SAL_NO_ACQUIRE), ::css::uno::UNO_QUERY); + ::css::uno::Reference< ::css::lang::XInitialization > init(the_instance, ::css::uno::UNO_QUERY); + if (init.is()) { + init->initialize(the_arguments); + } +#else + the_instance = ::css::uno::Reference< ::css::uno::XInterface >(the_context->getServiceManager()->createInstanceWithArgumentsAndContext( "test.codemaker.codemakertests.services.goto", the_arguments, the_context), ::css::uno::UNO_QUERY); +#endif + } catch (const ::css::uno::RuntimeException &) { + throw; + } catch (const ::css::uno::Exception & the_exception) { + throw ::css::uno::DeploymentException(::rtl::OUString("component context fails to supply service ") + "test.codemaker.codemakertests.services.goto" + " of type " + "com.sun.star.uno.XInterface" + ": " + the_exception.Message, the_context); + } + if (!the_instance.is()) { + throw ::css::uno::DeploymentException(::rtl::OUString("component context fails to supply service ") + "test.codemaker.codemakertests.services.goto" + " of type " + "com.sun.star.uno.XInterface", the_context); + } + return the_instance; + } + +private: + service_goto(); // not implemented + service_goto(service_goto &); // not implemented + ~service_goto(); // not implemented + void operator =(service_goto); // not implemented +}; + +} } } } diff --git a/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/services/if.hpp b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/services/if.hpp new file mode 100644 index 000000000000..dcc2f942eda2 --- /dev/null +++ b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/services/if.hpp @@ -0,0 +1,67 @@ +#pragma once + +#include "sal/config.h" + +#include + +#include "com/sun/star/uno/DeploymentException.hpp" +#include "com/sun/star/uno/Exception.hpp" +#include "com/sun/star/uno/RuntimeException.hpp" +#include "com/sun/star/uno/XComponentContext.hpp" +#include "com/sun/star/uno/XInterface.hpp" +#include "com/sun/star/uno/Any.hxx" +#include "com/sun/star/uno/Reference.hxx" +#include "com/sun/star/uno/Sequence.hxx" +#include "cppu/unotype.hxx" +#include "rtl/ustring.h" +#include "rtl/ustring.hxx" +#include "sal/types.h" + +#if defined ANDROID || defined IOS //TODO +#include +#include +#endif + +#if defined LO_URE_CURRENT_ENV && defined LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_services_dot_if && (LO_URE_CURRENT_ENV) == (LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_services_dot_if) && defined LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_services_dot_if +extern "C" ::css::uno::XInterface * SAL_CALL LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_services_dot_if(::css::uno::XComponentContext *, ::css::uno::Sequence< ::css::uno::Any > const &); +#endif + +namespace test { namespace codemaker { namespace codemakertests { namespace services { + +class service_if { +public: + static ::css::uno::Reference< ::css::uno::XInterface > method_if(::css::uno::Reference< ::css::uno::XComponentContext > const & the_context, ::sal_Int32 param_if) { + assert(the_context.is()); + ::css::uno::Sequence< ::css::uno::Any > the_arguments(1); + ::css::uno::Any* the_arguments_array = the_arguments.getArray(); + the_arguments_array[0] <<= param_if; + ::css::uno::Reference< ::css::uno::XInterface > the_instance; + try { +#if defined LO_URE_CURRENT_ENV && defined LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_services_dot_if && (LO_URE_CURRENT_ENV) == (LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_services_dot_if) && defined LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_services_dot_if + the_instance = ::css::uno::Reference< ::css::uno::XInterface >(::css::uno::Reference< ::css::uno::XInterface >(static_cast< ::css::uno::XInterface * >((*LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_services_dot_if)(the_context.get(), the_arguments)), ::SAL_NO_ACQUIRE), ::css::uno::UNO_QUERY); + ::css::uno::Reference< ::css::lang::XInitialization > init(the_instance, ::css::uno::UNO_QUERY); + if (init.is()) { + init->initialize(the_arguments); + } +#else + the_instance = ::css::uno::Reference< ::css::uno::XInterface >(the_context->getServiceManager()->createInstanceWithArgumentsAndContext( "test.codemaker.codemakertests.services.if", the_arguments, the_context), ::css::uno::UNO_QUERY); +#endif + } catch (const ::css::uno::RuntimeException &) { + throw; + } catch (const ::css::uno::Exception & the_exception) { + throw ::css::uno::DeploymentException(::rtl::OUString("component context fails to supply service ") + "test.codemaker.codemakertests.services.if" + " of type " + "com.sun.star.uno.XInterface" + ": " + the_exception.Message, the_context); + } + if (!the_instance.is()) { + throw ::css::uno::DeploymentException(::rtl::OUString("component context fails to supply service ") + "test.codemaker.codemakertests.services.if" + " of type " + "com.sun.star.uno.XInterface", the_context); + } + return the_instance; + } + +private: + service_if(); // not implemented + service_if(service_if &); // not implemented + ~service_if(); // not implemented + void operator =(service_if); // not implemented +}; + +} } } } diff --git a/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/services/implements.hpp b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/services/implements.hpp new file mode 100644 index 000000000000..83c324c08abb --- /dev/null +++ b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/services/implements.hpp @@ -0,0 +1,67 @@ +#pragma once + +#include "sal/config.h" + +#include + +#include "com/sun/star/uno/DeploymentException.hpp" +#include "com/sun/star/uno/Exception.hpp" +#include "com/sun/star/uno/RuntimeException.hpp" +#include "com/sun/star/uno/XComponentContext.hpp" +#include "com/sun/star/uno/XInterface.hpp" +#include "com/sun/star/uno/Any.hxx" +#include "com/sun/star/uno/Reference.hxx" +#include "com/sun/star/uno/Sequence.hxx" +#include "cppu/unotype.hxx" +#include "rtl/ustring.h" +#include "rtl/ustring.hxx" +#include "sal/types.h" + +#if defined ANDROID || defined IOS //TODO +#include +#include +#endif + +#if defined LO_URE_CURRENT_ENV && defined LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_services_dot_implements && (LO_URE_CURRENT_ENV) == (LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_services_dot_implements) && defined LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_services_dot_implements +extern "C" ::css::uno::XInterface * SAL_CALL LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_services_dot_implements(::css::uno::XComponentContext *, ::css::uno::Sequence< ::css::uno::Any > const &); +#endif + +namespace test { namespace codemaker { namespace codemakertests { namespace services { + +class implements { +public: + static ::css::uno::Reference< ::css::uno::XInterface > method_implements(::css::uno::Reference< ::css::uno::XComponentContext > const & the_context, ::sal_Int32 implements) { + assert(the_context.is()); + ::css::uno::Sequence< ::css::uno::Any > the_arguments(1); + ::css::uno::Any* the_arguments_array = the_arguments.getArray(); + the_arguments_array[0] <<= implements; + ::css::uno::Reference< ::css::uno::XInterface > the_instance; + try { +#if defined LO_URE_CURRENT_ENV && defined LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_services_dot_implements && (LO_URE_CURRENT_ENV) == (LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_services_dot_implements) && defined LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_services_dot_implements + the_instance = ::css::uno::Reference< ::css::uno::XInterface >(::css::uno::Reference< ::css::uno::XInterface >(static_cast< ::css::uno::XInterface * >((*LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_services_dot_implements)(the_context.get(), the_arguments)), ::SAL_NO_ACQUIRE), ::css::uno::UNO_QUERY); + ::css::uno::Reference< ::css::lang::XInitialization > init(the_instance, ::css::uno::UNO_QUERY); + if (init.is()) { + init->initialize(the_arguments); + } +#else + the_instance = ::css::uno::Reference< ::css::uno::XInterface >(the_context->getServiceManager()->createInstanceWithArgumentsAndContext( "test.codemaker.codemakertests.services.implements", the_arguments, the_context), ::css::uno::UNO_QUERY); +#endif + } catch (const ::css::uno::RuntimeException &) { + throw; + } catch (const ::css::uno::Exception & the_exception) { + throw ::css::uno::DeploymentException(::rtl::OUString("component context fails to supply service ") + "test.codemaker.codemakertests.services.implements" + " of type " + "com.sun.star.uno.XInterface" + ": " + the_exception.Message, the_context); + } + if (!the_instance.is()) { + throw ::css::uno::DeploymentException(::rtl::OUString("component context fails to supply service ") + "test.codemaker.codemakertests.services.implements" + " of type " + "com.sun.star.uno.XInterface", the_context); + } + return the_instance; + } + +private: + implements(); // not implemented + implements(implements &); // not implemented + ~implements(); // not implemented + void operator =(implements); // not implemented +}; + +} } } } diff --git a/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/services/import.hpp b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/services/import.hpp new file mode 100644 index 000000000000..cdb438ebcdc1 --- /dev/null +++ b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/services/import.hpp @@ -0,0 +1,67 @@ +#pragma once + +#include "sal/config.h" + +#include + +#include "com/sun/star/uno/DeploymentException.hpp" +#include "com/sun/star/uno/Exception.hpp" +#include "com/sun/star/uno/RuntimeException.hpp" +#include "com/sun/star/uno/XComponentContext.hpp" +#include "com/sun/star/uno/XInterface.hpp" +#include "com/sun/star/uno/Any.hxx" +#include "com/sun/star/uno/Reference.hxx" +#include "com/sun/star/uno/Sequence.hxx" +#include "cppu/unotype.hxx" +#include "rtl/ustring.h" +#include "rtl/ustring.hxx" +#include "sal/types.h" + +#if defined ANDROID || defined IOS //TODO +#include +#include +#endif + +#if defined LO_URE_CURRENT_ENV && defined LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_services_dot_import && (LO_URE_CURRENT_ENV) == (LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_services_dot_import) && defined LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_services_dot_import +extern "C" ::css::uno::XInterface * SAL_CALL LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_services_dot_import(::css::uno::XComponentContext *, ::css::uno::Sequence< ::css::uno::Any > const &); +#endif + +namespace test { namespace codemaker { namespace codemakertests { namespace services { + +class import { +public: + static ::css::uno::Reference< ::css::uno::XInterface > method_import(::css::uno::Reference< ::css::uno::XComponentContext > const & the_context, ::sal_Int32 import) { + assert(the_context.is()); + ::css::uno::Sequence< ::css::uno::Any > the_arguments(1); + ::css::uno::Any* the_arguments_array = the_arguments.getArray(); + the_arguments_array[0] <<= import; + ::css::uno::Reference< ::css::uno::XInterface > the_instance; + try { +#if defined LO_URE_CURRENT_ENV && defined LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_services_dot_import && (LO_URE_CURRENT_ENV) == (LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_services_dot_import) && defined LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_services_dot_import + the_instance = ::css::uno::Reference< ::css::uno::XInterface >(::css::uno::Reference< ::css::uno::XInterface >(static_cast< ::css::uno::XInterface * >((*LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_services_dot_import)(the_context.get(), the_arguments)), ::SAL_NO_ACQUIRE), ::css::uno::UNO_QUERY); + ::css::uno::Reference< ::css::lang::XInitialization > init(the_instance, ::css::uno::UNO_QUERY); + if (init.is()) { + init->initialize(the_arguments); + } +#else + the_instance = ::css::uno::Reference< ::css::uno::XInterface >(the_context->getServiceManager()->createInstanceWithArgumentsAndContext( "test.codemaker.codemakertests.services.import", the_arguments, the_context), ::css::uno::UNO_QUERY); +#endif + } catch (const ::css::uno::RuntimeException &) { + throw; + } catch (const ::css::uno::Exception & the_exception) { + throw ::css::uno::DeploymentException(::rtl::OUString("component context fails to supply service ") + "test.codemaker.codemakertests.services.import" + " of type " + "com.sun.star.uno.XInterface" + ": " + the_exception.Message, the_context); + } + if (!the_instance.is()) { + throw ::css::uno::DeploymentException(::rtl::OUString("component context fails to supply service ") + "test.codemaker.codemakertests.services.import" + " of type " + "com.sun.star.uno.XInterface", the_context); + } + return the_instance; + } + +private: + import(); // not implemented + import(import &); // not implemented + ~import(); // not implemented + void operator =(import); // not implemented +}; + +} } } } diff --git a/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/services/instanceof.hpp b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/services/instanceof.hpp new file mode 100644 index 000000000000..a46d76cf9277 --- /dev/null +++ b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/services/instanceof.hpp @@ -0,0 +1,67 @@ +#pragma once + +#include "sal/config.h" + +#include + +#include "com/sun/star/uno/DeploymentException.hpp" +#include "com/sun/star/uno/Exception.hpp" +#include "com/sun/star/uno/RuntimeException.hpp" +#include "com/sun/star/uno/XComponentContext.hpp" +#include "com/sun/star/uno/XInterface.hpp" +#include "com/sun/star/uno/Any.hxx" +#include "com/sun/star/uno/Reference.hxx" +#include "com/sun/star/uno/Sequence.hxx" +#include "cppu/unotype.hxx" +#include "rtl/ustring.h" +#include "rtl/ustring.hxx" +#include "sal/types.h" + +#if defined ANDROID || defined IOS //TODO +#include +#include +#endif + +#if defined LO_URE_CURRENT_ENV && defined LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_services_dot_instanceof && (LO_URE_CURRENT_ENV) == (LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_services_dot_instanceof) && defined LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_services_dot_instanceof +extern "C" ::css::uno::XInterface * SAL_CALL LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_services_dot_instanceof(::css::uno::XComponentContext *, ::css::uno::Sequence< ::css::uno::Any > const &); +#endif + +namespace test { namespace codemaker { namespace codemakertests { namespace services { + +class instanceof { +public: + static ::css::uno::Reference< ::css::uno::XInterface > method_instanceof(::css::uno::Reference< ::css::uno::XComponentContext > const & the_context, ::sal_Int32 instanceof) { + assert(the_context.is()); + ::css::uno::Sequence< ::css::uno::Any > the_arguments(1); + ::css::uno::Any* the_arguments_array = the_arguments.getArray(); + the_arguments_array[0] <<= instanceof; + ::css::uno::Reference< ::css::uno::XInterface > the_instance; + try { +#if defined LO_URE_CURRENT_ENV && defined LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_services_dot_instanceof && (LO_URE_CURRENT_ENV) == (LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_services_dot_instanceof) && defined LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_services_dot_instanceof + the_instance = ::css::uno::Reference< ::css::uno::XInterface >(::css::uno::Reference< ::css::uno::XInterface >(static_cast< ::css::uno::XInterface * >((*LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_services_dot_instanceof)(the_context.get(), the_arguments)), ::SAL_NO_ACQUIRE), ::css::uno::UNO_QUERY); + ::css::uno::Reference< ::css::lang::XInitialization > init(the_instance, ::css::uno::UNO_QUERY); + if (init.is()) { + init->initialize(the_arguments); + } +#else + the_instance = ::css::uno::Reference< ::css::uno::XInterface >(the_context->getServiceManager()->createInstanceWithArgumentsAndContext( "test.codemaker.codemakertests.services.instanceof", the_arguments, the_context), ::css::uno::UNO_QUERY); +#endif + } catch (const ::css::uno::RuntimeException &) { + throw; + } catch (const ::css::uno::Exception & the_exception) { + throw ::css::uno::DeploymentException(::rtl::OUString("component context fails to supply service ") + "test.codemaker.codemakertests.services.instanceof" + " of type " + "com.sun.star.uno.XInterface" + ": " + the_exception.Message, the_context); + } + if (!the_instance.is()) { + throw ::css::uno::DeploymentException(::rtl::OUString("component context fails to supply service ") + "test.codemaker.codemakertests.services.instanceof" + " of type " + "com.sun.star.uno.XInterface", the_context); + } + return the_instance; + } + +private: + instanceof(); // not implemented + instanceof(instanceof &); // not implemented + ~instanceof(); // not implemented + void operator =(instanceof); // not implemented +}; + +} } } } diff --git a/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/services/int.hpp b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/services/int.hpp new file mode 100644 index 000000000000..e8a7d4759741 --- /dev/null +++ b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/services/int.hpp @@ -0,0 +1,67 @@ +#pragma once + +#include "sal/config.h" + +#include + +#include "com/sun/star/uno/DeploymentException.hpp" +#include "com/sun/star/uno/Exception.hpp" +#include "com/sun/star/uno/RuntimeException.hpp" +#include "com/sun/star/uno/XComponentContext.hpp" +#include "com/sun/star/uno/XInterface.hpp" +#include "com/sun/star/uno/Any.hxx" +#include "com/sun/star/uno/Reference.hxx" +#include "com/sun/star/uno/Sequence.hxx" +#include "cppu/unotype.hxx" +#include "rtl/ustring.h" +#include "rtl/ustring.hxx" +#include "sal/types.h" + +#if defined ANDROID || defined IOS //TODO +#include +#include +#endif + +#if defined LO_URE_CURRENT_ENV && defined LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_services_dot_int && (LO_URE_CURRENT_ENV) == (LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_services_dot_int) && defined LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_services_dot_int +extern "C" ::css::uno::XInterface * SAL_CALL LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_services_dot_int(::css::uno::XComponentContext *, ::css::uno::Sequence< ::css::uno::Any > const &); +#endif + +namespace test { namespace codemaker { namespace codemakertests { namespace services { + +class service_int { +public: + static ::css::uno::Reference< ::css::uno::XInterface > method_int(::css::uno::Reference< ::css::uno::XComponentContext > const & the_context, ::sal_Int32 param_int) { + assert(the_context.is()); + ::css::uno::Sequence< ::css::uno::Any > the_arguments(1); + ::css::uno::Any* the_arguments_array = the_arguments.getArray(); + the_arguments_array[0] <<= param_int; + ::css::uno::Reference< ::css::uno::XInterface > the_instance; + try { +#if defined LO_URE_CURRENT_ENV && defined LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_services_dot_int && (LO_URE_CURRENT_ENV) == (LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_services_dot_int) && defined LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_services_dot_int + the_instance = ::css::uno::Reference< ::css::uno::XInterface >(::css::uno::Reference< ::css::uno::XInterface >(static_cast< ::css::uno::XInterface * >((*LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_services_dot_int)(the_context.get(), the_arguments)), ::SAL_NO_ACQUIRE), ::css::uno::UNO_QUERY); + ::css::uno::Reference< ::css::lang::XInitialization > init(the_instance, ::css::uno::UNO_QUERY); + if (init.is()) { + init->initialize(the_arguments); + } +#else + the_instance = ::css::uno::Reference< ::css::uno::XInterface >(the_context->getServiceManager()->createInstanceWithArgumentsAndContext( "test.codemaker.codemakertests.services.int", the_arguments, the_context), ::css::uno::UNO_QUERY); +#endif + } catch (const ::css::uno::RuntimeException &) { + throw; + } catch (const ::css::uno::Exception & the_exception) { + throw ::css::uno::DeploymentException(::rtl::OUString("component context fails to supply service ") + "test.codemaker.codemakertests.services.int" + " of type " + "com.sun.star.uno.XInterface" + ": " + the_exception.Message, the_context); + } + if (!the_instance.is()) { + throw ::css::uno::DeploymentException(::rtl::OUString("component context fails to supply service ") + "test.codemaker.codemakertests.services.int" + " of type " + "com.sun.star.uno.XInterface", the_context); + } + return the_instance; + } + +private: + service_int(); // not implemented + service_int(service_int &); // not implemented + ~service_int(); // not implemented + void operator =(service_int); // not implemented +}; + +} } } } diff --git a/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/services/native.hpp b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/services/native.hpp new file mode 100644 index 000000000000..41c0b5309ee7 --- /dev/null +++ b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/services/native.hpp @@ -0,0 +1,67 @@ +#pragma once + +#include "sal/config.h" + +#include + +#include "com/sun/star/uno/DeploymentException.hpp" +#include "com/sun/star/uno/Exception.hpp" +#include "com/sun/star/uno/RuntimeException.hpp" +#include "com/sun/star/uno/XComponentContext.hpp" +#include "com/sun/star/uno/XInterface.hpp" +#include "com/sun/star/uno/Any.hxx" +#include "com/sun/star/uno/Reference.hxx" +#include "com/sun/star/uno/Sequence.hxx" +#include "cppu/unotype.hxx" +#include "rtl/ustring.h" +#include "rtl/ustring.hxx" +#include "sal/types.h" + +#if defined ANDROID || defined IOS //TODO +#include +#include +#endif + +#if defined LO_URE_CURRENT_ENV && defined LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_services_dot_native && (LO_URE_CURRENT_ENV) == (LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_services_dot_native) && defined LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_services_dot_native +extern "C" ::css::uno::XInterface * SAL_CALL LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_services_dot_native(::css::uno::XComponentContext *, ::css::uno::Sequence< ::css::uno::Any > const &); +#endif + +namespace test { namespace codemaker { namespace codemakertests { namespace services { + +class native { +public: + static ::css::uno::Reference< ::css::uno::XInterface > method_native(::css::uno::Reference< ::css::uno::XComponentContext > const & the_context, ::sal_Int32 native) { + assert(the_context.is()); + ::css::uno::Sequence< ::css::uno::Any > the_arguments(1); + ::css::uno::Any* the_arguments_array = the_arguments.getArray(); + the_arguments_array[0] <<= native; + ::css::uno::Reference< ::css::uno::XInterface > the_instance; + try { +#if defined LO_URE_CURRENT_ENV && defined LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_services_dot_native && (LO_URE_CURRENT_ENV) == (LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_services_dot_native) && defined LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_services_dot_native + the_instance = ::css::uno::Reference< ::css::uno::XInterface >(::css::uno::Reference< ::css::uno::XInterface >(static_cast< ::css::uno::XInterface * >((*LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_services_dot_native)(the_context.get(), the_arguments)), ::SAL_NO_ACQUIRE), ::css::uno::UNO_QUERY); + ::css::uno::Reference< ::css::lang::XInitialization > init(the_instance, ::css::uno::UNO_QUERY); + if (init.is()) { + init->initialize(the_arguments); + } +#else + the_instance = ::css::uno::Reference< ::css::uno::XInterface >(the_context->getServiceManager()->createInstanceWithArgumentsAndContext( "test.codemaker.codemakertests.services.native", the_arguments, the_context), ::css::uno::UNO_QUERY); +#endif + } catch (const ::css::uno::RuntimeException &) { + throw; + } catch (const ::css::uno::Exception & the_exception) { + throw ::css::uno::DeploymentException(::rtl::OUString("component context fails to supply service ") + "test.codemaker.codemakertests.services.native" + " of type " + "com.sun.star.uno.XInterface" + ": " + the_exception.Message, the_context); + } + if (!the_instance.is()) { + throw ::css::uno::DeploymentException(::rtl::OUString("component context fails to supply service ") + "test.codemaker.codemakertests.services.native" + " of type " + "com.sun.star.uno.XInterface", the_context); + } + return the_instance; + } + +private: + native(); // not implemented + native(native &); // not implemented + ~native(); // not implemented + void operator =(native); // not implemented +}; + +} } } } diff --git a/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/services/new.hpp b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/services/new.hpp new file mode 100644 index 000000000000..5a1b88551720 --- /dev/null +++ b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/services/new.hpp @@ -0,0 +1,67 @@ +#pragma once + +#include "sal/config.h" + +#include + +#include "com/sun/star/uno/DeploymentException.hpp" +#include "com/sun/star/uno/Exception.hpp" +#include "com/sun/star/uno/RuntimeException.hpp" +#include "com/sun/star/uno/XComponentContext.hpp" +#include "com/sun/star/uno/XInterface.hpp" +#include "com/sun/star/uno/Any.hxx" +#include "com/sun/star/uno/Reference.hxx" +#include "com/sun/star/uno/Sequence.hxx" +#include "cppu/unotype.hxx" +#include "rtl/ustring.h" +#include "rtl/ustring.hxx" +#include "sal/types.h" + +#if defined ANDROID || defined IOS //TODO +#include +#include +#endif + +#if defined LO_URE_CURRENT_ENV && defined LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_services_dot_new && (LO_URE_CURRENT_ENV) == (LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_services_dot_new) && defined LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_services_dot_new +extern "C" ::css::uno::XInterface * SAL_CALL LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_services_dot_new(::css::uno::XComponentContext *, ::css::uno::Sequence< ::css::uno::Any > const &); +#endif + +namespace test { namespace codemaker { namespace codemakertests { namespace services { + +class service_new { +public: + static ::css::uno::Reference< ::css::uno::XInterface > method_new(::css::uno::Reference< ::css::uno::XComponentContext > const & the_context, ::sal_Int32 param_new) { + assert(the_context.is()); + ::css::uno::Sequence< ::css::uno::Any > the_arguments(1); + ::css::uno::Any* the_arguments_array = the_arguments.getArray(); + the_arguments_array[0] <<= param_new; + ::css::uno::Reference< ::css::uno::XInterface > the_instance; + try { +#if defined LO_URE_CURRENT_ENV && defined LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_services_dot_new && (LO_URE_CURRENT_ENV) == (LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_services_dot_new) && defined LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_services_dot_new + the_instance = ::css::uno::Reference< ::css::uno::XInterface >(::css::uno::Reference< ::css::uno::XInterface >(static_cast< ::css::uno::XInterface * >((*LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_services_dot_new)(the_context.get(), the_arguments)), ::SAL_NO_ACQUIRE), ::css::uno::UNO_QUERY); + ::css::uno::Reference< ::css::lang::XInitialization > init(the_instance, ::css::uno::UNO_QUERY); + if (init.is()) { + init->initialize(the_arguments); + } +#else + the_instance = ::css::uno::Reference< ::css::uno::XInterface >(the_context->getServiceManager()->createInstanceWithArgumentsAndContext( "test.codemaker.codemakertests.services.new", the_arguments, the_context), ::css::uno::UNO_QUERY); +#endif + } catch (const ::css::uno::RuntimeException &) { + throw; + } catch (const ::css::uno::Exception & the_exception) { + throw ::css::uno::DeploymentException(::rtl::OUString("component context fails to supply service ") + "test.codemaker.codemakertests.services.new" + " of type " + "com.sun.star.uno.XInterface" + ": " + the_exception.Message, the_context); + } + if (!the_instance.is()) { + throw ::css::uno::DeploymentException(::rtl::OUString("component context fails to supply service ") + "test.codemaker.codemakertests.services.new" + " of type " + "com.sun.star.uno.XInterface", the_context); + } + return the_instance; + } + +private: + service_new(); // not implemented + service_new(service_new &); // not implemented + ~service_new(); // not implemented + void operator =(service_new); // not implemented +}; + +} } } } diff --git a/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/services/package.hpp b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/services/package.hpp new file mode 100644 index 000000000000..2c4cc58a1bce --- /dev/null +++ b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/services/package.hpp @@ -0,0 +1,67 @@ +#pragma once + +#include "sal/config.h" + +#include + +#include "com/sun/star/uno/DeploymentException.hpp" +#include "com/sun/star/uno/Exception.hpp" +#include "com/sun/star/uno/RuntimeException.hpp" +#include "com/sun/star/uno/XComponentContext.hpp" +#include "com/sun/star/uno/XInterface.hpp" +#include "com/sun/star/uno/Any.hxx" +#include "com/sun/star/uno/Reference.hxx" +#include "com/sun/star/uno/Sequence.hxx" +#include "cppu/unotype.hxx" +#include "rtl/ustring.h" +#include "rtl/ustring.hxx" +#include "sal/types.h" + +#if defined ANDROID || defined IOS //TODO +#include +#include +#endif + +#if defined LO_URE_CURRENT_ENV && defined LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_services_dot_package && (LO_URE_CURRENT_ENV) == (LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_services_dot_package) && defined LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_services_dot_package +extern "C" ::css::uno::XInterface * SAL_CALL LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_services_dot_package(::css::uno::XComponentContext *, ::css::uno::Sequence< ::css::uno::Any > const &); +#endif + +namespace test { namespace codemaker { namespace codemakertests { namespace services { + +class package { +public: + static ::css::uno::Reference< ::css::uno::XInterface > method_package(::css::uno::Reference< ::css::uno::XComponentContext > const & the_context, ::sal_Int32 package) { + assert(the_context.is()); + ::css::uno::Sequence< ::css::uno::Any > the_arguments(1); + ::css::uno::Any* the_arguments_array = the_arguments.getArray(); + the_arguments_array[0] <<= package; + ::css::uno::Reference< ::css::uno::XInterface > the_instance; + try { +#if defined LO_URE_CURRENT_ENV && defined LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_services_dot_package && (LO_URE_CURRENT_ENV) == (LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_services_dot_package) && defined LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_services_dot_package + the_instance = ::css::uno::Reference< ::css::uno::XInterface >(::css::uno::Reference< ::css::uno::XInterface >(static_cast< ::css::uno::XInterface * >((*LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_services_dot_package)(the_context.get(), the_arguments)), ::SAL_NO_ACQUIRE), ::css::uno::UNO_QUERY); + ::css::uno::Reference< ::css::lang::XInitialization > init(the_instance, ::css::uno::UNO_QUERY); + if (init.is()) { + init->initialize(the_arguments); + } +#else + the_instance = ::css::uno::Reference< ::css::uno::XInterface >(the_context->getServiceManager()->createInstanceWithArgumentsAndContext( "test.codemaker.codemakertests.services.package", the_arguments, the_context), ::css::uno::UNO_QUERY); +#endif + } catch (const ::css::uno::RuntimeException &) { + throw; + } catch (const ::css::uno::Exception & the_exception) { + throw ::css::uno::DeploymentException(::rtl::OUString("component context fails to supply service ") + "test.codemaker.codemakertests.services.package" + " of type " + "com.sun.star.uno.XInterface" + ": " + the_exception.Message, the_context); + } + if (!the_instance.is()) { + throw ::css::uno::DeploymentException(::rtl::OUString("component context fails to supply service ") + "test.codemaker.codemakertests.services.package" + " of type " + "com.sun.star.uno.XInterface", the_context); + } + return the_instance; + } + +private: + package(); // not implemented + package(package &); // not implemented + ~package(); // not implemented + void operator =(package); // not implemented +}; + +} } } } diff --git a/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/services/private.hpp b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/services/private.hpp new file mode 100644 index 000000000000..2e3a2d3c98d2 --- /dev/null +++ b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/services/private.hpp @@ -0,0 +1,67 @@ +#pragma once + +#include "sal/config.h" + +#include + +#include "com/sun/star/uno/DeploymentException.hpp" +#include "com/sun/star/uno/Exception.hpp" +#include "com/sun/star/uno/RuntimeException.hpp" +#include "com/sun/star/uno/XComponentContext.hpp" +#include "com/sun/star/uno/XInterface.hpp" +#include "com/sun/star/uno/Any.hxx" +#include "com/sun/star/uno/Reference.hxx" +#include "com/sun/star/uno/Sequence.hxx" +#include "cppu/unotype.hxx" +#include "rtl/ustring.h" +#include "rtl/ustring.hxx" +#include "sal/types.h" + +#if defined ANDROID || defined IOS //TODO +#include +#include +#endif + +#if defined LO_URE_CURRENT_ENV && defined LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_services_dot_private && (LO_URE_CURRENT_ENV) == (LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_services_dot_private) && defined LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_services_dot_private +extern "C" ::css::uno::XInterface * SAL_CALL LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_services_dot_private(::css::uno::XComponentContext *, ::css::uno::Sequence< ::css::uno::Any > const &); +#endif + +namespace test { namespace codemaker { namespace codemakertests { namespace services { + +class service_private { +public: + static ::css::uno::Reference< ::css::uno::XInterface > method_private(::css::uno::Reference< ::css::uno::XComponentContext > const & the_context, ::sal_Int32 param_private) { + assert(the_context.is()); + ::css::uno::Sequence< ::css::uno::Any > the_arguments(1); + ::css::uno::Any* the_arguments_array = the_arguments.getArray(); + the_arguments_array[0] <<= param_private; + ::css::uno::Reference< ::css::uno::XInterface > the_instance; + try { +#if defined LO_URE_CURRENT_ENV && defined LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_services_dot_private && (LO_URE_CURRENT_ENV) == (LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_services_dot_private) && defined LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_services_dot_private + the_instance = ::css::uno::Reference< ::css::uno::XInterface >(::css::uno::Reference< ::css::uno::XInterface >(static_cast< ::css::uno::XInterface * >((*LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_services_dot_private)(the_context.get(), the_arguments)), ::SAL_NO_ACQUIRE), ::css::uno::UNO_QUERY); + ::css::uno::Reference< ::css::lang::XInitialization > init(the_instance, ::css::uno::UNO_QUERY); + if (init.is()) { + init->initialize(the_arguments); + } +#else + the_instance = ::css::uno::Reference< ::css::uno::XInterface >(the_context->getServiceManager()->createInstanceWithArgumentsAndContext( "test.codemaker.codemakertests.services.private", the_arguments, the_context), ::css::uno::UNO_QUERY); +#endif + } catch (const ::css::uno::RuntimeException &) { + throw; + } catch (const ::css::uno::Exception & the_exception) { + throw ::css::uno::DeploymentException(::rtl::OUString("component context fails to supply service ") + "test.codemaker.codemakertests.services.private" + " of type " + "com.sun.star.uno.XInterface" + ": " + the_exception.Message, the_context); + } + if (!the_instance.is()) { + throw ::css::uno::DeploymentException(::rtl::OUString("component context fails to supply service ") + "test.codemaker.codemakertests.services.private" + " of type " + "com.sun.star.uno.XInterface", the_context); + } + return the_instance; + } + +private: + service_private(); // not implemented + service_private(service_private &); // not implemented + ~service_private(); // not implemented + void operator =(service_private); // not implemented +}; + +} } } } diff --git a/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/services/protected.hpp b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/services/protected.hpp new file mode 100644 index 000000000000..25215cb30920 --- /dev/null +++ b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/services/protected.hpp @@ -0,0 +1,67 @@ +#pragma once + +#include "sal/config.h" + +#include + +#include "com/sun/star/uno/DeploymentException.hpp" +#include "com/sun/star/uno/Exception.hpp" +#include "com/sun/star/uno/RuntimeException.hpp" +#include "com/sun/star/uno/XComponentContext.hpp" +#include "com/sun/star/uno/XInterface.hpp" +#include "com/sun/star/uno/Any.hxx" +#include "com/sun/star/uno/Reference.hxx" +#include "com/sun/star/uno/Sequence.hxx" +#include "cppu/unotype.hxx" +#include "rtl/ustring.h" +#include "rtl/ustring.hxx" +#include "sal/types.h" + +#if defined ANDROID || defined IOS //TODO +#include +#include +#endif + +#if defined LO_URE_CURRENT_ENV && defined LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_services_dot_protected && (LO_URE_CURRENT_ENV) == (LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_services_dot_protected) && defined LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_services_dot_protected +extern "C" ::css::uno::XInterface * SAL_CALL LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_services_dot_protected(::css::uno::XComponentContext *, ::css::uno::Sequence< ::css::uno::Any > const &); +#endif + +namespace test { namespace codemaker { namespace codemakertests { namespace services { + +class service_protected { +public: + static ::css::uno::Reference< ::css::uno::XInterface > method_protected(::css::uno::Reference< ::css::uno::XComponentContext > const & the_context, ::sal_Int32 param_protected) { + assert(the_context.is()); + ::css::uno::Sequence< ::css::uno::Any > the_arguments(1); + ::css::uno::Any* the_arguments_array = the_arguments.getArray(); + the_arguments_array[0] <<= param_protected; + ::css::uno::Reference< ::css::uno::XInterface > the_instance; + try { +#if defined LO_URE_CURRENT_ENV && defined LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_services_dot_protected && (LO_URE_CURRENT_ENV) == (LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_services_dot_protected) && defined LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_services_dot_protected + the_instance = ::css::uno::Reference< ::css::uno::XInterface >(::css::uno::Reference< ::css::uno::XInterface >(static_cast< ::css::uno::XInterface * >((*LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_services_dot_protected)(the_context.get(), the_arguments)), ::SAL_NO_ACQUIRE), ::css::uno::UNO_QUERY); + ::css::uno::Reference< ::css::lang::XInitialization > init(the_instance, ::css::uno::UNO_QUERY); + if (init.is()) { + init->initialize(the_arguments); + } +#else + the_instance = ::css::uno::Reference< ::css::uno::XInterface >(the_context->getServiceManager()->createInstanceWithArgumentsAndContext( "test.codemaker.codemakertests.services.protected", the_arguments, the_context), ::css::uno::UNO_QUERY); +#endif + } catch (const ::css::uno::RuntimeException &) { + throw; + } catch (const ::css::uno::Exception & the_exception) { + throw ::css::uno::DeploymentException(::rtl::OUString("component context fails to supply service ") + "test.codemaker.codemakertests.services.protected" + " of type " + "com.sun.star.uno.XInterface" + ": " + the_exception.Message, the_context); + } + if (!the_instance.is()) { + throw ::css::uno::DeploymentException(::rtl::OUString("component context fails to supply service ") + "test.codemaker.codemakertests.services.protected" + " of type " + "com.sun.star.uno.XInterface", the_context); + } + return the_instance; + } + +private: + service_protected(); // not implemented + service_protected(service_protected &); // not implemented + ~service_protected(); // not implemented + void operator =(service_protected); // not implemented +}; + +} } } } diff --git a/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/services/public.hpp b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/services/public.hpp new file mode 100644 index 000000000000..608a94e99ee4 --- /dev/null +++ b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/services/public.hpp @@ -0,0 +1,67 @@ +#pragma once + +#include "sal/config.h" + +#include + +#include "com/sun/star/uno/DeploymentException.hpp" +#include "com/sun/star/uno/Exception.hpp" +#include "com/sun/star/uno/RuntimeException.hpp" +#include "com/sun/star/uno/XComponentContext.hpp" +#include "com/sun/star/uno/XInterface.hpp" +#include "com/sun/star/uno/Any.hxx" +#include "com/sun/star/uno/Reference.hxx" +#include "com/sun/star/uno/Sequence.hxx" +#include "cppu/unotype.hxx" +#include "rtl/ustring.h" +#include "rtl/ustring.hxx" +#include "sal/types.h" + +#if defined ANDROID || defined IOS //TODO +#include +#include +#endif + +#if defined LO_URE_CURRENT_ENV && defined LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_services_dot_public && (LO_URE_CURRENT_ENV) == (LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_services_dot_public) && defined LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_services_dot_public +extern "C" ::css::uno::XInterface * SAL_CALL LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_services_dot_public(::css::uno::XComponentContext *, ::css::uno::Sequence< ::css::uno::Any > const &); +#endif + +namespace test { namespace codemaker { namespace codemakertests { namespace services { + +class service_public { +public: + static ::css::uno::Reference< ::css::uno::XInterface > method_public(::css::uno::Reference< ::css::uno::XComponentContext > const & the_context, ::sal_Int32 param_public) { + assert(the_context.is()); + ::css::uno::Sequence< ::css::uno::Any > the_arguments(1); + ::css::uno::Any* the_arguments_array = the_arguments.getArray(); + the_arguments_array[0] <<= param_public; + ::css::uno::Reference< ::css::uno::XInterface > the_instance; + try { +#if defined LO_URE_CURRENT_ENV && defined LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_services_dot_public && (LO_URE_CURRENT_ENV) == (LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_services_dot_public) && defined LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_services_dot_public + the_instance = ::css::uno::Reference< ::css::uno::XInterface >(::css::uno::Reference< ::css::uno::XInterface >(static_cast< ::css::uno::XInterface * >((*LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_services_dot_public)(the_context.get(), the_arguments)), ::SAL_NO_ACQUIRE), ::css::uno::UNO_QUERY); + ::css::uno::Reference< ::css::lang::XInitialization > init(the_instance, ::css::uno::UNO_QUERY); + if (init.is()) { + init->initialize(the_arguments); + } +#else + the_instance = ::css::uno::Reference< ::css::uno::XInterface >(the_context->getServiceManager()->createInstanceWithArgumentsAndContext( "test.codemaker.codemakertests.services.public", the_arguments, the_context), ::css::uno::UNO_QUERY); +#endif + } catch (const ::css::uno::RuntimeException &) { + throw; + } catch (const ::css::uno::Exception & the_exception) { + throw ::css::uno::DeploymentException(::rtl::OUString("component context fails to supply service ") + "test.codemaker.codemakertests.services.public" + " of type " + "com.sun.star.uno.XInterface" + ": " + the_exception.Message, the_context); + } + if (!the_instance.is()) { + throw ::css::uno::DeploymentException(::rtl::OUString("component context fails to supply service ") + "test.codemaker.codemakertests.services.public" + " of type " + "com.sun.star.uno.XInterface", the_context); + } + return the_instance; + } + +private: + service_public(); // not implemented + service_public(service_public &); // not implemented + ~service_public(); // not implemented + void operator =(service_public); // not implemented +}; + +} } } } diff --git a/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/services/return.hpp b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/services/return.hpp new file mode 100644 index 000000000000..9d5ffe600e98 --- /dev/null +++ b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/services/return.hpp @@ -0,0 +1,67 @@ +#pragma once + +#include "sal/config.h" + +#include + +#include "com/sun/star/uno/DeploymentException.hpp" +#include "com/sun/star/uno/Exception.hpp" +#include "com/sun/star/uno/RuntimeException.hpp" +#include "com/sun/star/uno/XComponentContext.hpp" +#include "com/sun/star/uno/XInterface.hpp" +#include "com/sun/star/uno/Any.hxx" +#include "com/sun/star/uno/Reference.hxx" +#include "com/sun/star/uno/Sequence.hxx" +#include "cppu/unotype.hxx" +#include "rtl/ustring.h" +#include "rtl/ustring.hxx" +#include "sal/types.h" + +#if defined ANDROID || defined IOS //TODO +#include +#include +#endif + +#if defined LO_URE_CURRENT_ENV && defined LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_services_dot_return && (LO_URE_CURRENT_ENV) == (LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_services_dot_return) && defined LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_services_dot_return +extern "C" ::css::uno::XInterface * SAL_CALL LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_services_dot_return(::css::uno::XComponentContext *, ::css::uno::Sequence< ::css::uno::Any > const &); +#endif + +namespace test { namespace codemaker { namespace codemakertests { namespace services { + +class service_return { +public: + static ::css::uno::Reference< ::css::uno::XInterface > method_return(::css::uno::Reference< ::css::uno::XComponentContext > const & the_context, ::sal_Int32 param_return) { + assert(the_context.is()); + ::css::uno::Sequence< ::css::uno::Any > the_arguments(1); + ::css::uno::Any* the_arguments_array = the_arguments.getArray(); + the_arguments_array[0] <<= param_return; + ::css::uno::Reference< ::css::uno::XInterface > the_instance; + try { +#if defined LO_URE_CURRENT_ENV && defined LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_services_dot_return && (LO_URE_CURRENT_ENV) == (LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_services_dot_return) && defined LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_services_dot_return + the_instance = ::css::uno::Reference< ::css::uno::XInterface >(::css::uno::Reference< ::css::uno::XInterface >(static_cast< ::css::uno::XInterface * >((*LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_services_dot_return)(the_context.get(), the_arguments)), ::SAL_NO_ACQUIRE), ::css::uno::UNO_QUERY); + ::css::uno::Reference< ::css::lang::XInitialization > init(the_instance, ::css::uno::UNO_QUERY); + if (init.is()) { + init->initialize(the_arguments); + } +#else + the_instance = ::css::uno::Reference< ::css::uno::XInterface >(the_context->getServiceManager()->createInstanceWithArgumentsAndContext( "test.codemaker.codemakertests.services.return", the_arguments, the_context), ::css::uno::UNO_QUERY); +#endif + } catch (const ::css::uno::RuntimeException &) { + throw; + } catch (const ::css::uno::Exception & the_exception) { + throw ::css::uno::DeploymentException(::rtl::OUString("component context fails to supply service ") + "test.codemaker.codemakertests.services.return" + " of type " + "com.sun.star.uno.XInterface" + ": " + the_exception.Message, the_context); + } + if (!the_instance.is()) { + throw ::css::uno::DeploymentException(::rtl::OUString("component context fails to supply service ") + "test.codemaker.codemakertests.services.return" + " of type " + "com.sun.star.uno.XInterface", the_context); + } + return the_instance; + } + +private: + service_return(); // not implemented + service_return(service_return &); // not implemented + ~service_return(); // not implemented + void operator =(service_return); // not implemented +}; + +} } } } diff --git a/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/services/static.hpp b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/services/static.hpp new file mode 100644 index 000000000000..8c81df978818 --- /dev/null +++ b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/services/static.hpp @@ -0,0 +1,67 @@ +#pragma once + +#include "sal/config.h" + +#include + +#include "com/sun/star/uno/DeploymentException.hpp" +#include "com/sun/star/uno/Exception.hpp" +#include "com/sun/star/uno/RuntimeException.hpp" +#include "com/sun/star/uno/XComponentContext.hpp" +#include "com/sun/star/uno/XInterface.hpp" +#include "com/sun/star/uno/Any.hxx" +#include "com/sun/star/uno/Reference.hxx" +#include "com/sun/star/uno/Sequence.hxx" +#include "cppu/unotype.hxx" +#include "rtl/ustring.h" +#include "rtl/ustring.hxx" +#include "sal/types.h" + +#if defined ANDROID || defined IOS //TODO +#include +#include +#endif + +#if defined LO_URE_CURRENT_ENV && defined LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_services_dot_static && (LO_URE_CURRENT_ENV) == (LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_services_dot_static) && defined LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_services_dot_static +extern "C" ::css::uno::XInterface * SAL_CALL LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_services_dot_static(::css::uno::XComponentContext *, ::css::uno::Sequence< ::css::uno::Any > const &); +#endif + +namespace test { namespace codemaker { namespace codemakertests { namespace services { + +class service_static { +public: + static ::css::uno::Reference< ::css::uno::XInterface > method_static(::css::uno::Reference< ::css::uno::XComponentContext > const & the_context, ::sal_Int32 param_static) { + assert(the_context.is()); + ::css::uno::Sequence< ::css::uno::Any > the_arguments(1); + ::css::uno::Any* the_arguments_array = the_arguments.getArray(); + the_arguments_array[0] <<= param_static; + ::css::uno::Reference< ::css::uno::XInterface > the_instance; + try { +#if defined LO_URE_CURRENT_ENV && defined LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_services_dot_static && (LO_URE_CURRENT_ENV) == (LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_services_dot_static) && defined LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_services_dot_static + the_instance = ::css::uno::Reference< ::css::uno::XInterface >(::css::uno::Reference< ::css::uno::XInterface >(static_cast< ::css::uno::XInterface * >((*LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_services_dot_static)(the_context.get(), the_arguments)), ::SAL_NO_ACQUIRE), ::css::uno::UNO_QUERY); + ::css::uno::Reference< ::css::lang::XInitialization > init(the_instance, ::css::uno::UNO_QUERY); + if (init.is()) { + init->initialize(the_arguments); + } +#else + the_instance = ::css::uno::Reference< ::css::uno::XInterface >(the_context->getServiceManager()->createInstanceWithArgumentsAndContext( "test.codemaker.codemakertests.services.static", the_arguments, the_context), ::css::uno::UNO_QUERY); +#endif + } catch (const ::css::uno::RuntimeException &) { + throw; + } catch (const ::css::uno::Exception & the_exception) { + throw ::css::uno::DeploymentException(::rtl::OUString("component context fails to supply service ") + "test.codemaker.codemakertests.services.static" + " of type " + "com.sun.star.uno.XInterface" + ": " + the_exception.Message, the_context); + } + if (!the_instance.is()) { + throw ::css::uno::DeploymentException(::rtl::OUString("component context fails to supply service ") + "test.codemaker.codemakertests.services.static" + " of type " + "com.sun.star.uno.XInterface", the_context); + } + return the_instance; + } + +private: + service_static(); // not implemented + service_static(service_static &); // not implemented + ~service_static(); // not implemented + void operator =(service_static); // not implemented +}; + +} } } } diff --git a/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/services/strictfp.hpp b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/services/strictfp.hpp new file mode 100644 index 000000000000..6d77ac9c423c --- /dev/null +++ b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/services/strictfp.hpp @@ -0,0 +1,67 @@ +#pragma once + +#include "sal/config.h" + +#include + +#include "com/sun/star/uno/DeploymentException.hpp" +#include "com/sun/star/uno/Exception.hpp" +#include "com/sun/star/uno/RuntimeException.hpp" +#include "com/sun/star/uno/XComponentContext.hpp" +#include "com/sun/star/uno/XInterface.hpp" +#include "com/sun/star/uno/Any.hxx" +#include "com/sun/star/uno/Reference.hxx" +#include "com/sun/star/uno/Sequence.hxx" +#include "cppu/unotype.hxx" +#include "rtl/ustring.h" +#include "rtl/ustring.hxx" +#include "sal/types.h" + +#if defined ANDROID || defined IOS //TODO +#include +#include +#endif + +#if defined LO_URE_CURRENT_ENV && defined LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_services_dot_strictfp && (LO_URE_CURRENT_ENV) == (LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_services_dot_strictfp) && defined LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_services_dot_strictfp +extern "C" ::css::uno::XInterface * SAL_CALL LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_services_dot_strictfp(::css::uno::XComponentContext *, ::css::uno::Sequence< ::css::uno::Any > const &); +#endif + +namespace test { namespace codemaker { namespace codemakertests { namespace services { + +class strictfp { +public: + static ::css::uno::Reference< ::css::uno::XInterface > method_strictfp(::css::uno::Reference< ::css::uno::XComponentContext > const & the_context, ::sal_Int32 strictfp) { + assert(the_context.is()); + ::css::uno::Sequence< ::css::uno::Any > the_arguments(1); + ::css::uno::Any* the_arguments_array = the_arguments.getArray(); + the_arguments_array[0] <<= strictfp; + ::css::uno::Reference< ::css::uno::XInterface > the_instance; + try { +#if defined LO_URE_CURRENT_ENV && defined LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_services_dot_strictfp && (LO_URE_CURRENT_ENV) == (LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_services_dot_strictfp) && defined LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_services_dot_strictfp + the_instance = ::css::uno::Reference< ::css::uno::XInterface >(::css::uno::Reference< ::css::uno::XInterface >(static_cast< ::css::uno::XInterface * >((*LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_services_dot_strictfp)(the_context.get(), the_arguments)), ::SAL_NO_ACQUIRE), ::css::uno::UNO_QUERY); + ::css::uno::Reference< ::css::lang::XInitialization > init(the_instance, ::css::uno::UNO_QUERY); + if (init.is()) { + init->initialize(the_arguments); + } +#else + the_instance = ::css::uno::Reference< ::css::uno::XInterface >(the_context->getServiceManager()->createInstanceWithArgumentsAndContext( "test.codemaker.codemakertests.services.strictfp", the_arguments, the_context), ::css::uno::UNO_QUERY); +#endif + } catch (const ::css::uno::RuntimeException &) { + throw; + } catch (const ::css::uno::Exception & the_exception) { + throw ::css::uno::DeploymentException(::rtl::OUString("component context fails to supply service ") + "test.codemaker.codemakertests.services.strictfp" + " of type " + "com.sun.star.uno.XInterface" + ": " + the_exception.Message, the_context); + } + if (!the_instance.is()) { + throw ::css::uno::DeploymentException(::rtl::OUString("component context fails to supply service ") + "test.codemaker.codemakertests.services.strictfp" + " of type " + "com.sun.star.uno.XInterface", the_context); + } + return the_instance; + } + +private: + strictfp(); // not implemented + strictfp(strictfp &); // not implemented + ~strictfp(); // not implemented + void operator =(strictfp); // not implemented +}; + +} } } } diff --git a/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/services/super.hpp b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/services/super.hpp new file mode 100644 index 000000000000..4f4d0fbf0014 --- /dev/null +++ b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/services/super.hpp @@ -0,0 +1,67 @@ +#pragma once + +#include "sal/config.h" + +#include + +#include "com/sun/star/uno/DeploymentException.hpp" +#include "com/sun/star/uno/Exception.hpp" +#include "com/sun/star/uno/RuntimeException.hpp" +#include "com/sun/star/uno/XComponentContext.hpp" +#include "com/sun/star/uno/XInterface.hpp" +#include "com/sun/star/uno/Any.hxx" +#include "com/sun/star/uno/Reference.hxx" +#include "com/sun/star/uno/Sequence.hxx" +#include "cppu/unotype.hxx" +#include "rtl/ustring.h" +#include "rtl/ustring.hxx" +#include "sal/types.h" + +#if defined ANDROID || defined IOS //TODO +#include +#include +#endif + +#if defined LO_URE_CURRENT_ENV && defined LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_services_dot_super && (LO_URE_CURRENT_ENV) == (LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_services_dot_super) && defined LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_services_dot_super +extern "C" ::css::uno::XInterface * SAL_CALL LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_services_dot_super(::css::uno::XComponentContext *, ::css::uno::Sequence< ::css::uno::Any > const &); +#endif + +namespace test { namespace codemaker { namespace codemakertests { namespace services { + +class super { +public: + static ::css::uno::Reference< ::css::uno::XInterface > method_super(::css::uno::Reference< ::css::uno::XComponentContext > const & the_context, ::sal_Int32 super) { + assert(the_context.is()); + ::css::uno::Sequence< ::css::uno::Any > the_arguments(1); + ::css::uno::Any* the_arguments_array = the_arguments.getArray(); + the_arguments_array[0] <<= super; + ::css::uno::Reference< ::css::uno::XInterface > the_instance; + try { +#if defined LO_URE_CURRENT_ENV && defined LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_services_dot_super && (LO_URE_CURRENT_ENV) == (LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_services_dot_super) && defined LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_services_dot_super + the_instance = ::css::uno::Reference< ::css::uno::XInterface >(::css::uno::Reference< ::css::uno::XInterface >(static_cast< ::css::uno::XInterface * >((*LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_services_dot_super)(the_context.get(), the_arguments)), ::SAL_NO_ACQUIRE), ::css::uno::UNO_QUERY); + ::css::uno::Reference< ::css::lang::XInitialization > init(the_instance, ::css::uno::UNO_QUERY); + if (init.is()) { + init->initialize(the_arguments); + } +#else + the_instance = ::css::uno::Reference< ::css::uno::XInterface >(the_context->getServiceManager()->createInstanceWithArgumentsAndContext( "test.codemaker.codemakertests.services.super", the_arguments, the_context), ::css::uno::UNO_QUERY); +#endif + } catch (const ::css::uno::RuntimeException &) { + throw; + } catch (const ::css::uno::Exception & the_exception) { + throw ::css::uno::DeploymentException(::rtl::OUString("component context fails to supply service ") + "test.codemaker.codemakertests.services.super" + " of type " + "com.sun.star.uno.XInterface" + ": " + the_exception.Message, the_context); + } + if (!the_instance.is()) { + throw ::css::uno::DeploymentException(::rtl::OUString("component context fails to supply service ") + "test.codemaker.codemakertests.services.super" + " of type " + "com.sun.star.uno.XInterface", the_context); + } + return the_instance; + } + +private: + super(); // not implemented + super(super &); // not implemented + ~super(); // not implemented + void operator =(super); // not implemented +}; + +} } } } diff --git a/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/services/synchronized.hpp b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/services/synchronized.hpp new file mode 100644 index 000000000000..b6d7b468a9b8 --- /dev/null +++ b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/services/synchronized.hpp @@ -0,0 +1,67 @@ +#pragma once + +#include "sal/config.h" + +#include + +#include "com/sun/star/uno/DeploymentException.hpp" +#include "com/sun/star/uno/Exception.hpp" +#include "com/sun/star/uno/RuntimeException.hpp" +#include "com/sun/star/uno/XComponentContext.hpp" +#include "com/sun/star/uno/XInterface.hpp" +#include "com/sun/star/uno/Any.hxx" +#include "com/sun/star/uno/Reference.hxx" +#include "com/sun/star/uno/Sequence.hxx" +#include "cppu/unotype.hxx" +#include "rtl/ustring.h" +#include "rtl/ustring.hxx" +#include "sal/types.h" + +#if defined ANDROID || defined IOS //TODO +#include +#include +#endif + +#if defined LO_URE_CURRENT_ENV && defined LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_services_dot_synchronized && (LO_URE_CURRENT_ENV) == (LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_services_dot_synchronized) && defined LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_services_dot_synchronized +extern "C" ::css::uno::XInterface * SAL_CALL LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_services_dot_synchronized(::css::uno::XComponentContext *, ::css::uno::Sequence< ::css::uno::Any > const &); +#endif + +namespace test { namespace codemaker { namespace codemakertests { namespace services { + +class synchronized { +public: + static ::css::uno::Reference< ::css::uno::XInterface > method_synchronized(::css::uno::Reference< ::css::uno::XComponentContext > const & the_context, ::sal_Int32 synchronized) { + assert(the_context.is()); + ::css::uno::Sequence< ::css::uno::Any > the_arguments(1); + ::css::uno::Any* the_arguments_array = the_arguments.getArray(); + the_arguments_array[0] <<= synchronized; + ::css::uno::Reference< ::css::uno::XInterface > the_instance; + try { +#if defined LO_URE_CURRENT_ENV && defined LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_services_dot_synchronized && (LO_URE_CURRENT_ENV) == (LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_services_dot_synchronized) && defined LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_services_dot_synchronized + the_instance = ::css::uno::Reference< ::css::uno::XInterface >(::css::uno::Reference< ::css::uno::XInterface >(static_cast< ::css::uno::XInterface * >((*LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_services_dot_synchronized)(the_context.get(), the_arguments)), ::SAL_NO_ACQUIRE), ::css::uno::UNO_QUERY); + ::css::uno::Reference< ::css::lang::XInitialization > init(the_instance, ::css::uno::UNO_QUERY); + if (init.is()) { + init->initialize(the_arguments); + } +#else + the_instance = ::css::uno::Reference< ::css::uno::XInterface >(the_context->getServiceManager()->createInstanceWithArgumentsAndContext( "test.codemaker.codemakertests.services.synchronized", the_arguments, the_context), ::css::uno::UNO_QUERY); +#endif + } catch (const ::css::uno::RuntimeException &) { + throw; + } catch (const ::css::uno::Exception & the_exception) { + throw ::css::uno::DeploymentException(::rtl::OUString("component context fails to supply service ") + "test.codemaker.codemakertests.services.synchronized" + " of type " + "com.sun.star.uno.XInterface" + ": " + the_exception.Message, the_context); + } + if (!the_instance.is()) { + throw ::css::uno::DeploymentException(::rtl::OUString("component context fails to supply service ") + "test.codemaker.codemakertests.services.synchronized" + " of type " + "com.sun.star.uno.XInterface", the_context); + } + return the_instance; + } + +private: + synchronized(); // not implemented + synchronized(synchronized &); // not implemented + ~synchronized(); // not implemented + void operator =(synchronized); // not implemented +}; + +} } } } diff --git a/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/services/this.hpp b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/services/this.hpp new file mode 100644 index 000000000000..59634daff52b --- /dev/null +++ b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/services/this.hpp @@ -0,0 +1,67 @@ +#pragma once + +#include "sal/config.h" + +#include + +#include "com/sun/star/uno/DeploymentException.hpp" +#include "com/sun/star/uno/Exception.hpp" +#include "com/sun/star/uno/RuntimeException.hpp" +#include "com/sun/star/uno/XComponentContext.hpp" +#include "com/sun/star/uno/XInterface.hpp" +#include "com/sun/star/uno/Any.hxx" +#include "com/sun/star/uno/Reference.hxx" +#include "com/sun/star/uno/Sequence.hxx" +#include "cppu/unotype.hxx" +#include "rtl/ustring.h" +#include "rtl/ustring.hxx" +#include "sal/types.h" + +#if defined ANDROID || defined IOS //TODO +#include +#include +#endif + +#if defined LO_URE_CURRENT_ENV && defined LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_services_dot_this && (LO_URE_CURRENT_ENV) == (LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_services_dot_this) && defined LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_services_dot_this +extern "C" ::css::uno::XInterface * SAL_CALL LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_services_dot_this(::css::uno::XComponentContext *, ::css::uno::Sequence< ::css::uno::Any > const &); +#endif + +namespace test { namespace codemaker { namespace codemakertests { namespace services { + +class service_this { +public: + static ::css::uno::Reference< ::css::uno::XInterface > method_this(::css::uno::Reference< ::css::uno::XComponentContext > const & the_context, ::sal_Int32 param_this) { + assert(the_context.is()); + ::css::uno::Sequence< ::css::uno::Any > the_arguments(1); + ::css::uno::Any* the_arguments_array = the_arguments.getArray(); + the_arguments_array[0] <<= param_this; + ::css::uno::Reference< ::css::uno::XInterface > the_instance; + try { +#if defined LO_URE_CURRENT_ENV && defined LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_services_dot_this && (LO_URE_CURRENT_ENV) == (LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_services_dot_this) && defined LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_services_dot_this + the_instance = ::css::uno::Reference< ::css::uno::XInterface >(::css::uno::Reference< ::css::uno::XInterface >(static_cast< ::css::uno::XInterface * >((*LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_services_dot_this)(the_context.get(), the_arguments)), ::SAL_NO_ACQUIRE), ::css::uno::UNO_QUERY); + ::css::uno::Reference< ::css::lang::XInitialization > init(the_instance, ::css::uno::UNO_QUERY); + if (init.is()) { + init->initialize(the_arguments); + } +#else + the_instance = ::css::uno::Reference< ::css::uno::XInterface >(the_context->getServiceManager()->createInstanceWithArgumentsAndContext( "test.codemaker.codemakertests.services.this", the_arguments, the_context), ::css::uno::UNO_QUERY); +#endif + } catch (const ::css::uno::RuntimeException &) { + throw; + } catch (const ::css::uno::Exception & the_exception) { + throw ::css::uno::DeploymentException(::rtl::OUString("component context fails to supply service ") + "test.codemaker.codemakertests.services.this" + " of type " + "com.sun.star.uno.XInterface" + ": " + the_exception.Message, the_context); + } + if (!the_instance.is()) { + throw ::css::uno::DeploymentException(::rtl::OUString("component context fails to supply service ") + "test.codemaker.codemakertests.services.this" + " of type " + "com.sun.star.uno.XInterface", the_context); + } + return the_instance; + } + +private: + service_this(); // not implemented + service_this(service_this &); // not implemented + ~service_this(); // not implemented + void operator =(service_this); // not implemented +}; + +} } } } diff --git a/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/services/throw.hpp b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/services/throw.hpp new file mode 100644 index 000000000000..36ba6182ca32 --- /dev/null +++ b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/services/throw.hpp @@ -0,0 +1,67 @@ +#pragma once + +#include "sal/config.h" + +#include + +#include "com/sun/star/uno/DeploymentException.hpp" +#include "com/sun/star/uno/Exception.hpp" +#include "com/sun/star/uno/RuntimeException.hpp" +#include "com/sun/star/uno/XComponentContext.hpp" +#include "com/sun/star/uno/XInterface.hpp" +#include "com/sun/star/uno/Any.hxx" +#include "com/sun/star/uno/Reference.hxx" +#include "com/sun/star/uno/Sequence.hxx" +#include "cppu/unotype.hxx" +#include "rtl/ustring.h" +#include "rtl/ustring.hxx" +#include "sal/types.h" + +#if defined ANDROID || defined IOS //TODO +#include +#include +#endif + +#if defined LO_URE_CURRENT_ENV && defined LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_services_dot_throw && (LO_URE_CURRENT_ENV) == (LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_services_dot_throw) && defined LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_services_dot_throw +extern "C" ::css::uno::XInterface * SAL_CALL LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_services_dot_throw(::css::uno::XComponentContext *, ::css::uno::Sequence< ::css::uno::Any > const &); +#endif + +namespace test { namespace codemaker { namespace codemakertests { namespace services { + +class service_throw { +public: + static ::css::uno::Reference< ::css::uno::XInterface > method_throw(::css::uno::Reference< ::css::uno::XComponentContext > const & the_context, ::sal_Int32 param_throw) { + assert(the_context.is()); + ::css::uno::Sequence< ::css::uno::Any > the_arguments(1); + ::css::uno::Any* the_arguments_array = the_arguments.getArray(); + the_arguments_array[0] <<= param_throw; + ::css::uno::Reference< ::css::uno::XInterface > the_instance; + try { +#if defined LO_URE_CURRENT_ENV && defined LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_services_dot_throw && (LO_URE_CURRENT_ENV) == (LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_services_dot_throw) && defined LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_services_dot_throw + the_instance = ::css::uno::Reference< ::css::uno::XInterface >(::css::uno::Reference< ::css::uno::XInterface >(static_cast< ::css::uno::XInterface * >((*LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_services_dot_throw)(the_context.get(), the_arguments)), ::SAL_NO_ACQUIRE), ::css::uno::UNO_QUERY); + ::css::uno::Reference< ::css::lang::XInitialization > init(the_instance, ::css::uno::UNO_QUERY); + if (init.is()) { + init->initialize(the_arguments); + } +#else + the_instance = ::css::uno::Reference< ::css::uno::XInterface >(the_context->getServiceManager()->createInstanceWithArgumentsAndContext( "test.codemaker.codemakertests.services.throw", the_arguments, the_context), ::css::uno::UNO_QUERY); +#endif + } catch (const ::css::uno::RuntimeException &) { + throw; + } catch (const ::css::uno::Exception & the_exception) { + throw ::css::uno::DeploymentException(::rtl::OUString("component context fails to supply service ") + "test.codemaker.codemakertests.services.throw" + " of type " + "com.sun.star.uno.XInterface" + ": " + the_exception.Message, the_context); + } + if (!the_instance.is()) { + throw ::css::uno::DeploymentException(::rtl::OUString("component context fails to supply service ") + "test.codemaker.codemakertests.services.throw" + " of type " + "com.sun.star.uno.XInterface", the_context); + } + return the_instance; + } + +private: + service_throw(); // not implemented + service_throw(service_throw &); // not implemented + ~service_throw(); // not implemented + void operator =(service_throw); // not implemented +}; + +} } } } diff --git a/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/services/throws.hpp b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/services/throws.hpp new file mode 100644 index 000000000000..00b13c7ff02d --- /dev/null +++ b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/services/throws.hpp @@ -0,0 +1,67 @@ +#pragma once + +#include "sal/config.h" + +#include + +#include "com/sun/star/uno/DeploymentException.hpp" +#include "com/sun/star/uno/Exception.hpp" +#include "com/sun/star/uno/RuntimeException.hpp" +#include "com/sun/star/uno/XComponentContext.hpp" +#include "com/sun/star/uno/XInterface.hpp" +#include "com/sun/star/uno/Any.hxx" +#include "com/sun/star/uno/Reference.hxx" +#include "com/sun/star/uno/Sequence.hxx" +#include "cppu/unotype.hxx" +#include "rtl/ustring.h" +#include "rtl/ustring.hxx" +#include "sal/types.h" + +#if defined ANDROID || defined IOS //TODO +#include +#include +#endif + +#if defined LO_URE_CURRENT_ENV && defined LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_services_dot_throws && (LO_URE_CURRENT_ENV) == (LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_services_dot_throws) && defined LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_services_dot_throws +extern "C" ::css::uno::XInterface * SAL_CALL LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_services_dot_throws(::css::uno::XComponentContext *, ::css::uno::Sequence< ::css::uno::Any > const &); +#endif + +namespace test { namespace codemaker { namespace codemakertests { namespace services { + +class throws { +public: + static ::css::uno::Reference< ::css::uno::XInterface > method_throws(::css::uno::Reference< ::css::uno::XComponentContext > const & the_context, ::sal_Int32 throws) { + assert(the_context.is()); + ::css::uno::Sequence< ::css::uno::Any > the_arguments(1); + ::css::uno::Any* the_arguments_array = the_arguments.getArray(); + the_arguments_array[0] <<= throws; + ::css::uno::Reference< ::css::uno::XInterface > the_instance; + try { +#if defined LO_URE_CURRENT_ENV && defined LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_services_dot_throws && (LO_URE_CURRENT_ENV) == (LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_services_dot_throws) && defined LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_services_dot_throws + the_instance = ::css::uno::Reference< ::css::uno::XInterface >(::css::uno::Reference< ::css::uno::XInterface >(static_cast< ::css::uno::XInterface * >((*LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_services_dot_throws)(the_context.get(), the_arguments)), ::SAL_NO_ACQUIRE), ::css::uno::UNO_QUERY); + ::css::uno::Reference< ::css::lang::XInitialization > init(the_instance, ::css::uno::UNO_QUERY); + if (init.is()) { + init->initialize(the_arguments); + } +#else + the_instance = ::css::uno::Reference< ::css::uno::XInterface >(the_context->getServiceManager()->createInstanceWithArgumentsAndContext( "test.codemaker.codemakertests.services.throws", the_arguments, the_context), ::css::uno::UNO_QUERY); +#endif + } catch (const ::css::uno::RuntimeException &) { + throw; + } catch (const ::css::uno::Exception & the_exception) { + throw ::css::uno::DeploymentException(::rtl::OUString("component context fails to supply service ") + "test.codemaker.codemakertests.services.throws" + " of type " + "com.sun.star.uno.XInterface" + ": " + the_exception.Message, the_context); + } + if (!the_instance.is()) { + throw ::css::uno::DeploymentException(::rtl::OUString("component context fails to supply service ") + "test.codemaker.codemakertests.services.throws" + " of type " + "com.sun.star.uno.XInterface", the_context); + } + return the_instance; + } + +private: + throws(); // not implemented + throws(throws &); // not implemented + ~throws(); // not implemented + void operator =(throws); // not implemented +}; + +} } } } diff --git a/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/services/try.hpp b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/services/try.hpp new file mode 100644 index 000000000000..babe6976384b --- /dev/null +++ b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/services/try.hpp @@ -0,0 +1,67 @@ +#pragma once + +#include "sal/config.h" + +#include + +#include "com/sun/star/uno/DeploymentException.hpp" +#include "com/sun/star/uno/Exception.hpp" +#include "com/sun/star/uno/RuntimeException.hpp" +#include "com/sun/star/uno/XComponentContext.hpp" +#include "com/sun/star/uno/XInterface.hpp" +#include "com/sun/star/uno/Any.hxx" +#include "com/sun/star/uno/Reference.hxx" +#include "com/sun/star/uno/Sequence.hxx" +#include "cppu/unotype.hxx" +#include "rtl/ustring.h" +#include "rtl/ustring.hxx" +#include "sal/types.h" + +#if defined ANDROID || defined IOS //TODO +#include +#include +#endif + +#if defined LO_URE_CURRENT_ENV && defined LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_services_dot_try && (LO_URE_CURRENT_ENV) == (LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_services_dot_try) && defined LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_services_dot_try +extern "C" ::css::uno::XInterface * SAL_CALL LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_services_dot_try(::css::uno::XComponentContext *, ::css::uno::Sequence< ::css::uno::Any > const &); +#endif + +namespace test { namespace codemaker { namespace codemakertests { namespace services { + +class service_try { +public: + static ::css::uno::Reference< ::css::uno::XInterface > method_try(::css::uno::Reference< ::css::uno::XComponentContext > const & the_context, ::sal_Int32 param_try) { + assert(the_context.is()); + ::css::uno::Sequence< ::css::uno::Any > the_arguments(1); + ::css::uno::Any* the_arguments_array = the_arguments.getArray(); + the_arguments_array[0] <<= param_try; + ::css::uno::Reference< ::css::uno::XInterface > the_instance; + try { +#if defined LO_URE_CURRENT_ENV && defined LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_services_dot_try && (LO_URE_CURRENT_ENV) == (LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_services_dot_try) && defined LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_services_dot_try + the_instance = ::css::uno::Reference< ::css::uno::XInterface >(::css::uno::Reference< ::css::uno::XInterface >(static_cast< ::css::uno::XInterface * >((*LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_services_dot_try)(the_context.get(), the_arguments)), ::SAL_NO_ACQUIRE), ::css::uno::UNO_QUERY); + ::css::uno::Reference< ::css::lang::XInitialization > init(the_instance, ::css::uno::UNO_QUERY); + if (init.is()) { + init->initialize(the_arguments); + } +#else + the_instance = ::css::uno::Reference< ::css::uno::XInterface >(the_context->getServiceManager()->createInstanceWithArgumentsAndContext( "test.codemaker.codemakertests.services.try", the_arguments, the_context), ::css::uno::UNO_QUERY); +#endif + } catch (const ::css::uno::RuntimeException &) { + throw; + } catch (const ::css::uno::Exception & the_exception) { + throw ::css::uno::DeploymentException(::rtl::OUString("component context fails to supply service ") + "test.codemaker.codemakertests.services.try" + " of type " + "com.sun.star.uno.XInterface" + ": " + the_exception.Message, the_context); + } + if (!the_instance.is()) { + throw ::css::uno::DeploymentException(::rtl::OUString("component context fails to supply service ") + "test.codemaker.codemakertests.services.try" + " of type " + "com.sun.star.uno.XInterface", the_context); + } + return the_instance; + } + +private: + service_try(); // not implemented + service_try(service_try &); // not implemented + ~service_try(); // not implemented + void operator =(service_try); // not implemented +}; + +} } } } diff --git a/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/services/volatile.hpp b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/services/volatile.hpp new file mode 100644 index 000000000000..a397bed603cc --- /dev/null +++ b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/services/volatile.hpp @@ -0,0 +1,67 @@ +#pragma once + +#include "sal/config.h" + +#include + +#include "com/sun/star/uno/DeploymentException.hpp" +#include "com/sun/star/uno/Exception.hpp" +#include "com/sun/star/uno/RuntimeException.hpp" +#include "com/sun/star/uno/XComponentContext.hpp" +#include "com/sun/star/uno/XInterface.hpp" +#include "com/sun/star/uno/Any.hxx" +#include "com/sun/star/uno/Reference.hxx" +#include "com/sun/star/uno/Sequence.hxx" +#include "cppu/unotype.hxx" +#include "rtl/ustring.h" +#include "rtl/ustring.hxx" +#include "sal/types.h" + +#if defined ANDROID || defined IOS //TODO +#include +#include +#endif + +#if defined LO_URE_CURRENT_ENV && defined LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_services_dot_volatile && (LO_URE_CURRENT_ENV) == (LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_services_dot_volatile) && defined LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_services_dot_volatile +extern "C" ::css::uno::XInterface * SAL_CALL LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_services_dot_volatile(::css::uno::XComponentContext *, ::css::uno::Sequence< ::css::uno::Any > const &); +#endif + +namespace test { namespace codemaker { namespace codemakertests { namespace services { + +class service_volatile { +public: + static ::css::uno::Reference< ::css::uno::XInterface > method_volatile(::css::uno::Reference< ::css::uno::XComponentContext > const & the_context, ::sal_Int32 param_volatile) { + assert(the_context.is()); + ::css::uno::Sequence< ::css::uno::Any > the_arguments(1); + ::css::uno::Any* the_arguments_array = the_arguments.getArray(); + the_arguments_array[0] <<= param_volatile; + ::css::uno::Reference< ::css::uno::XInterface > the_instance; + try { +#if defined LO_URE_CURRENT_ENV && defined LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_services_dot_volatile && (LO_URE_CURRENT_ENV) == (LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_services_dot_volatile) && defined LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_services_dot_volatile + the_instance = ::css::uno::Reference< ::css::uno::XInterface >(::css::uno::Reference< ::css::uno::XInterface >(static_cast< ::css::uno::XInterface * >((*LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_services_dot_volatile)(the_context.get(), the_arguments)), ::SAL_NO_ACQUIRE), ::css::uno::UNO_QUERY); + ::css::uno::Reference< ::css::lang::XInitialization > init(the_instance, ::css::uno::UNO_QUERY); + if (init.is()) { + init->initialize(the_arguments); + } +#else + the_instance = ::css::uno::Reference< ::css::uno::XInterface >(the_context->getServiceManager()->createInstanceWithArgumentsAndContext( "test.codemaker.codemakertests.services.volatile", the_arguments, the_context), ::css::uno::UNO_QUERY); +#endif + } catch (const ::css::uno::RuntimeException &) { + throw; + } catch (const ::css::uno::Exception & the_exception) { + throw ::css::uno::DeploymentException(::rtl::OUString("component context fails to supply service ") + "test.codemaker.codemakertests.services.volatile" + " of type " + "com.sun.star.uno.XInterface" + ": " + the_exception.Message, the_context); + } + if (!the_instance.is()) { + throw ::css::uno::DeploymentException(::rtl::OUString("component context fails to supply service ") + "test.codemaker.codemakertests.services.volatile" + " of type " + "com.sun.star.uno.XInterface", the_context); + } + return the_instance; + } + +private: + service_volatile(); // not implemented + service_volatile(service_volatile &); // not implemented + ~service_volatile(); // not implemented + void operator =(service_volatile); // not implemented +}; + +} } } } diff --git a/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/services/while.hpp b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/services/while.hpp new file mode 100644 index 000000000000..85475b11038e --- /dev/null +++ b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/services/while.hpp @@ -0,0 +1,67 @@ +#pragma once + +#include "sal/config.h" + +#include + +#include "com/sun/star/uno/DeploymentException.hpp" +#include "com/sun/star/uno/Exception.hpp" +#include "com/sun/star/uno/RuntimeException.hpp" +#include "com/sun/star/uno/XComponentContext.hpp" +#include "com/sun/star/uno/XInterface.hpp" +#include "com/sun/star/uno/Any.hxx" +#include "com/sun/star/uno/Reference.hxx" +#include "com/sun/star/uno/Sequence.hxx" +#include "cppu/unotype.hxx" +#include "rtl/ustring.h" +#include "rtl/ustring.hxx" +#include "sal/types.h" + +#if defined ANDROID || defined IOS //TODO +#include +#include +#endif + +#if defined LO_URE_CURRENT_ENV && defined LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_services_dot_while && (LO_URE_CURRENT_ENV) == (LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_services_dot_while) && defined LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_services_dot_while +extern "C" ::css::uno::XInterface * SAL_CALL LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_services_dot_while(::css::uno::XComponentContext *, ::css::uno::Sequence< ::css::uno::Any > const &); +#endif + +namespace test { namespace codemaker { namespace codemakertests { namespace services { + +class service_while { +public: + static ::css::uno::Reference< ::css::uno::XInterface > method_while(::css::uno::Reference< ::css::uno::XComponentContext > const & the_context, ::sal_Int32 param_while) { + assert(the_context.is()); + ::css::uno::Sequence< ::css::uno::Any > the_arguments(1); + ::css::uno::Any* the_arguments_array = the_arguments.getArray(); + the_arguments_array[0] <<= param_while; + ::css::uno::Reference< ::css::uno::XInterface > the_instance; + try { +#if defined LO_URE_CURRENT_ENV && defined LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_services_dot_while && (LO_URE_CURRENT_ENV) == (LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_services_dot_while) && defined LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_services_dot_while + the_instance = ::css::uno::Reference< ::css::uno::XInterface >(::css::uno::Reference< ::css::uno::XInterface >(static_cast< ::css::uno::XInterface * >((*LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_services_dot_while)(the_context.get(), the_arguments)), ::SAL_NO_ACQUIRE), ::css::uno::UNO_QUERY); + ::css::uno::Reference< ::css::lang::XInitialization > init(the_instance, ::css::uno::UNO_QUERY); + if (init.is()) { + init->initialize(the_arguments); + } +#else + the_instance = ::css::uno::Reference< ::css::uno::XInterface >(the_context->getServiceManager()->createInstanceWithArgumentsAndContext( "test.codemaker.codemakertests.services.while", the_arguments, the_context), ::css::uno::UNO_QUERY); +#endif + } catch (const ::css::uno::RuntimeException &) { + throw; + } catch (const ::css::uno::Exception & the_exception) { + throw ::css::uno::DeploymentException(::rtl::OUString("component context fails to supply service ") + "test.codemaker.codemakertests.services.while" + " of type " + "com.sun.star.uno.XInterface" + ": " + the_exception.Message, the_context); + } + if (!the_instance.is()) { + throw ::css::uno::DeploymentException(::rtl::OUString("component context fails to supply service ") + "test.codemaker.codemakertests.services.while" + " of type " + "com.sun.star.uno.XInterface", the_context); + } + return the_instance; + } + +private: + service_while(); // not implemented + service_while(service_while &); // not implemented + ~service_while(); // not implemented + void operator =(service_while); // not implemented +}; + +} } } } diff --git a/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/static.hpp b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/static.hpp new file mode 100644 index 000000000000..b6d303af98c5 --- /dev/null +++ b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/static.hpp @@ -0,0 +1,50 @@ +#pragma once + +#include "sal/config.h" + +#include + +#include "com/sun/star/uno/DeploymentException.hpp" +#include "com/sun/star/uno/XComponentContext.hpp" +#include "com/sun/star/uno/XNamingService.hpp" +#include "com/sun/star/uno/Any.hxx" +#include "com/sun/star/uno/Reference.hxx" +#include "cppu/unotype.hxx" +#include "rtl/ustring.h" +#include "rtl/ustring.hxx" + +#if defined ANDROID || defined IOS //TODO +#include +#include +#endif + +#if defined LO_URE_CURRENT_ENV && defined LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_static && (LO_URE_CURRENT_ENV) == (LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_static) && defined LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_static +extern "C" ::css::uno::XInterface * SAL_CALL LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_static(::css::uno::XComponentContext *, ::css::uno::Sequence< ::css::uno::Any > const &); +#endif + +namespace test { namespace codemaker { namespace codemakertests { + +class singleton_static { +public: + static ::css::uno::Reference< ::css::uno::XNamingService > get(::css::uno::Reference< ::css::uno::XComponentContext > const & the_context) { + assert(the_context.is()); + ::css::uno::Reference< ::css::uno::XNamingService > instance; +#if defined LO_URE_CURRENT_ENV && defined LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_static && (LO_URE_CURRENT_ENV) == (LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_static) && defined LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_static + instance = ::css::uno::Reference< ::css::uno::XNamingService >(::css::uno::Reference< ::css::uno::XInterface >(static_cast< ::css::uno::XInterface * >((*LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_static)(the_context.get(), ::css::uno::Sequence< ::css::uno::Any >())), ::SAL_NO_ACQUIRE), ::css::uno::UNO_QUERY); +#else + the_context->getValueByName(::rtl::OUString( "/singletons/test.codemaker.codemakertests.static" )) >>= instance; +#endif + if (!instance.is()) { + throw ::css::uno::DeploymentException(::rtl::OUString( "component context fails to supply singleton test.codemaker.codemakertests.static of type com.sun.star.uno.XNamingService" ), the_context); + } + return instance; + } + +private: + singleton_static(); // not implemented + singleton_static(singleton_static &); // not implemented + ~singleton_static(); // not implemented + void operator =(singleton_static); // not implemented +}; + +} } } diff --git a/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/strictfp.hpp b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/strictfp.hpp new file mode 100644 index 000000000000..292c962b931b --- /dev/null +++ b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/strictfp.hpp @@ -0,0 +1,50 @@ +#pragma once + +#include "sal/config.h" + +#include + +#include "com/sun/star/uno/DeploymentException.hpp" +#include "com/sun/star/uno/XComponentContext.hpp" +#include "com/sun/star/uno/XNamingService.hpp" +#include "com/sun/star/uno/Any.hxx" +#include "com/sun/star/uno/Reference.hxx" +#include "cppu/unotype.hxx" +#include "rtl/ustring.h" +#include "rtl/ustring.hxx" + +#if defined ANDROID || defined IOS //TODO +#include +#include +#endif + +#if defined LO_URE_CURRENT_ENV && defined LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_strictfp && (LO_URE_CURRENT_ENV) == (LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_strictfp) && defined LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_strictfp +extern "C" ::css::uno::XInterface * SAL_CALL LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_strictfp(::css::uno::XComponentContext *, ::css::uno::Sequence< ::css::uno::Any > const &); +#endif + +namespace test { namespace codemaker { namespace codemakertests { + +class strictfp { +public: + static ::css::uno::Reference< ::css::uno::XNamingService > get(::css::uno::Reference< ::css::uno::XComponentContext > const & the_context) { + assert(the_context.is()); + ::css::uno::Reference< ::css::uno::XNamingService > instance; +#if defined LO_URE_CURRENT_ENV && defined LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_strictfp && (LO_URE_CURRENT_ENV) == (LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_strictfp) && defined LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_strictfp + instance = ::css::uno::Reference< ::css::uno::XNamingService >(::css::uno::Reference< ::css::uno::XInterface >(static_cast< ::css::uno::XInterface * >((*LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_strictfp)(the_context.get(), ::css::uno::Sequence< ::css::uno::Any >())), ::SAL_NO_ACQUIRE), ::css::uno::UNO_QUERY); +#else + the_context->getValueByName(::rtl::OUString( "/singletons/test.codemaker.codemakertests.strictfp" )) >>= instance; +#endif + if (!instance.is()) { + throw ::css::uno::DeploymentException(::rtl::OUString( "component context fails to supply singleton test.codemaker.codemakertests.strictfp of type com.sun.star.uno.XNamingService" ), the_context); + } + return instance; + } + +private: + strictfp(); // not implemented + strictfp(strictfp &); // not implemented + ~strictfp(); // not implemented + void operator =(strictfp); // not implemented +}; + +} } } diff --git a/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/super.hpp b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/super.hpp new file mode 100644 index 000000000000..2671761cf876 --- /dev/null +++ b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/super.hpp @@ -0,0 +1,50 @@ +#pragma once + +#include "sal/config.h" + +#include + +#include "com/sun/star/uno/DeploymentException.hpp" +#include "com/sun/star/uno/XComponentContext.hpp" +#include "com/sun/star/uno/XNamingService.hpp" +#include "com/sun/star/uno/Any.hxx" +#include "com/sun/star/uno/Reference.hxx" +#include "cppu/unotype.hxx" +#include "rtl/ustring.h" +#include "rtl/ustring.hxx" + +#if defined ANDROID || defined IOS //TODO +#include +#include +#endif + +#if defined LO_URE_CURRENT_ENV && defined LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_super && (LO_URE_CURRENT_ENV) == (LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_super) && defined LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_super +extern "C" ::css::uno::XInterface * SAL_CALL LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_super(::css::uno::XComponentContext *, ::css::uno::Sequence< ::css::uno::Any > const &); +#endif + +namespace test { namespace codemaker { namespace codemakertests { + +class super { +public: + static ::css::uno::Reference< ::css::uno::XNamingService > get(::css::uno::Reference< ::css::uno::XComponentContext > const & the_context) { + assert(the_context.is()); + ::css::uno::Reference< ::css::uno::XNamingService > instance; +#if defined LO_URE_CURRENT_ENV && defined LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_super && (LO_URE_CURRENT_ENV) == (LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_super) && defined LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_super + instance = ::css::uno::Reference< ::css::uno::XNamingService >(::css::uno::Reference< ::css::uno::XInterface >(static_cast< ::css::uno::XInterface * >((*LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_super)(the_context.get(), ::css::uno::Sequence< ::css::uno::Any >())), ::SAL_NO_ACQUIRE), ::css::uno::UNO_QUERY); +#else + the_context->getValueByName(::rtl::OUString( "/singletons/test.codemaker.codemakertests.super" )) >>= instance; +#endif + if (!instance.is()) { + throw ::css::uno::DeploymentException(::rtl::OUString( "component context fails to supply singleton test.codemaker.codemakertests.super of type com.sun.star.uno.XNamingService" ), the_context); + } + return instance; + } + +private: + super(); // not implemented + super(super &); // not implemented + ~super(); // not implemented + void operator =(super); // not implemented +}; + +} } } diff --git a/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/synchronized.hpp b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/synchronized.hpp new file mode 100644 index 000000000000..8249308a5159 --- /dev/null +++ b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/synchronized.hpp @@ -0,0 +1,50 @@ +#pragma once + +#include "sal/config.h" + +#include + +#include "com/sun/star/uno/DeploymentException.hpp" +#include "com/sun/star/uno/XComponentContext.hpp" +#include "com/sun/star/uno/XNamingService.hpp" +#include "com/sun/star/uno/Any.hxx" +#include "com/sun/star/uno/Reference.hxx" +#include "cppu/unotype.hxx" +#include "rtl/ustring.h" +#include "rtl/ustring.hxx" + +#if defined ANDROID || defined IOS //TODO +#include +#include +#endif + +#if defined LO_URE_CURRENT_ENV && defined LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_synchronized && (LO_URE_CURRENT_ENV) == (LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_synchronized) && defined LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_synchronized +extern "C" ::css::uno::XInterface * SAL_CALL LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_synchronized(::css::uno::XComponentContext *, ::css::uno::Sequence< ::css::uno::Any > const &); +#endif + +namespace test { namespace codemaker { namespace codemakertests { + +class synchronized { +public: + static ::css::uno::Reference< ::css::uno::XNamingService > get(::css::uno::Reference< ::css::uno::XComponentContext > const & the_context) { + assert(the_context.is()); + ::css::uno::Reference< ::css::uno::XNamingService > instance; +#if defined LO_URE_CURRENT_ENV && defined LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_synchronized && (LO_URE_CURRENT_ENV) == (LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_synchronized) && defined LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_synchronized + instance = ::css::uno::Reference< ::css::uno::XNamingService >(::css::uno::Reference< ::css::uno::XInterface >(static_cast< ::css::uno::XInterface * >((*LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_synchronized)(the_context.get(), ::css::uno::Sequence< ::css::uno::Any >())), ::SAL_NO_ACQUIRE), ::css::uno::UNO_QUERY); +#else + the_context->getValueByName(::rtl::OUString( "/singletons/test.codemaker.codemakertests.synchronized" )) >>= instance; +#endif + if (!instance.is()) { + throw ::css::uno::DeploymentException(::rtl::OUString( "component context fails to supply singleton test.codemaker.codemakertests.synchronized of type com.sun.star.uno.XNamingService" ), the_context); + } + return instance; + } + +private: + synchronized(); // not implemented + synchronized(synchronized &); // not implemented + ~synchronized(); // not implemented + void operator =(synchronized); // not implemented +}; + +} } } diff --git a/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/this.hpp b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/this.hpp new file mode 100644 index 000000000000..74dedcae29e3 --- /dev/null +++ b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/this.hpp @@ -0,0 +1,50 @@ +#pragma once + +#include "sal/config.h" + +#include + +#include "com/sun/star/uno/DeploymentException.hpp" +#include "com/sun/star/uno/XComponentContext.hpp" +#include "com/sun/star/uno/XNamingService.hpp" +#include "com/sun/star/uno/Any.hxx" +#include "com/sun/star/uno/Reference.hxx" +#include "cppu/unotype.hxx" +#include "rtl/ustring.h" +#include "rtl/ustring.hxx" + +#if defined ANDROID || defined IOS //TODO +#include +#include +#endif + +#if defined LO_URE_CURRENT_ENV && defined LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_this && (LO_URE_CURRENT_ENV) == (LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_this) && defined LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_this +extern "C" ::css::uno::XInterface * SAL_CALL LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_this(::css::uno::XComponentContext *, ::css::uno::Sequence< ::css::uno::Any > const &); +#endif + +namespace test { namespace codemaker { namespace codemakertests { + +class singleton_this { +public: + static ::css::uno::Reference< ::css::uno::XNamingService > get(::css::uno::Reference< ::css::uno::XComponentContext > const & the_context) { + assert(the_context.is()); + ::css::uno::Reference< ::css::uno::XNamingService > instance; +#if defined LO_URE_CURRENT_ENV && defined LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_this && (LO_URE_CURRENT_ENV) == (LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_this) && defined LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_this + instance = ::css::uno::Reference< ::css::uno::XNamingService >(::css::uno::Reference< ::css::uno::XInterface >(static_cast< ::css::uno::XInterface * >((*LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_this)(the_context.get(), ::css::uno::Sequence< ::css::uno::Any >())), ::SAL_NO_ACQUIRE), ::css::uno::UNO_QUERY); +#else + the_context->getValueByName(::rtl::OUString( "/singletons/test.codemaker.codemakertests.this" )) >>= instance; +#endif + if (!instance.is()) { + throw ::css::uno::DeploymentException(::rtl::OUString( "component context fails to supply singleton test.codemaker.codemakertests.this of type com.sun.star.uno.XNamingService" ), the_context); + } + return instance; + } + +private: + singleton_this(); // not implemented + singleton_this(singleton_this &); // not implemented + ~singleton_this(); // not implemented + void operator =(singleton_this); // not implemented +}; + +} } } diff --git a/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/throw.hpp b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/throw.hpp new file mode 100644 index 000000000000..e54e17bfe445 --- /dev/null +++ b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/throw.hpp @@ -0,0 +1,50 @@ +#pragma once + +#include "sal/config.h" + +#include + +#include "com/sun/star/uno/DeploymentException.hpp" +#include "com/sun/star/uno/XComponentContext.hpp" +#include "com/sun/star/uno/XNamingService.hpp" +#include "com/sun/star/uno/Any.hxx" +#include "com/sun/star/uno/Reference.hxx" +#include "cppu/unotype.hxx" +#include "rtl/ustring.h" +#include "rtl/ustring.hxx" + +#if defined ANDROID || defined IOS //TODO +#include +#include +#endif + +#if defined LO_URE_CURRENT_ENV && defined LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_throw && (LO_URE_CURRENT_ENV) == (LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_throw) && defined LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_throw +extern "C" ::css::uno::XInterface * SAL_CALL LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_throw(::css::uno::XComponentContext *, ::css::uno::Sequence< ::css::uno::Any > const &); +#endif + +namespace test { namespace codemaker { namespace codemakertests { + +class singleton_throw { +public: + static ::css::uno::Reference< ::css::uno::XNamingService > get(::css::uno::Reference< ::css::uno::XComponentContext > const & the_context) { + assert(the_context.is()); + ::css::uno::Reference< ::css::uno::XNamingService > instance; +#if defined LO_URE_CURRENT_ENV && defined LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_throw && (LO_URE_CURRENT_ENV) == (LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_throw) && defined LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_throw + instance = ::css::uno::Reference< ::css::uno::XNamingService >(::css::uno::Reference< ::css::uno::XInterface >(static_cast< ::css::uno::XInterface * >((*LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_throw)(the_context.get(), ::css::uno::Sequence< ::css::uno::Any >())), ::SAL_NO_ACQUIRE), ::css::uno::UNO_QUERY); +#else + the_context->getValueByName(::rtl::OUString( "/singletons/test.codemaker.codemakertests.throw" )) >>= instance; +#endif + if (!instance.is()) { + throw ::css::uno::DeploymentException(::rtl::OUString( "component context fails to supply singleton test.codemaker.codemakertests.throw of type com.sun.star.uno.XNamingService" ), the_context); + } + return instance; + } + +private: + singleton_throw(); // not implemented + singleton_throw(singleton_throw &); // not implemented + ~singleton_throw(); // not implemented + void operator =(singleton_throw); // not implemented +}; + +} } } diff --git a/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/throws.hpp b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/throws.hpp new file mode 100644 index 000000000000..011fe31f6c32 --- /dev/null +++ b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/throws.hpp @@ -0,0 +1,50 @@ +#pragma once + +#include "sal/config.h" + +#include + +#include "com/sun/star/uno/DeploymentException.hpp" +#include "com/sun/star/uno/XComponentContext.hpp" +#include "com/sun/star/uno/XNamingService.hpp" +#include "com/sun/star/uno/Any.hxx" +#include "com/sun/star/uno/Reference.hxx" +#include "cppu/unotype.hxx" +#include "rtl/ustring.h" +#include "rtl/ustring.hxx" + +#if defined ANDROID || defined IOS //TODO +#include +#include +#endif + +#if defined LO_URE_CURRENT_ENV && defined LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_throws && (LO_URE_CURRENT_ENV) == (LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_throws) && defined LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_throws +extern "C" ::css::uno::XInterface * SAL_CALL LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_throws(::css::uno::XComponentContext *, ::css::uno::Sequence< ::css::uno::Any > const &); +#endif + +namespace test { namespace codemaker { namespace codemakertests { + +class throws { +public: + static ::css::uno::Reference< ::css::uno::XNamingService > get(::css::uno::Reference< ::css::uno::XComponentContext > const & the_context) { + assert(the_context.is()); + ::css::uno::Reference< ::css::uno::XNamingService > instance; +#if defined LO_URE_CURRENT_ENV && defined LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_throws && (LO_URE_CURRENT_ENV) == (LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_throws) && defined LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_throws + instance = ::css::uno::Reference< ::css::uno::XNamingService >(::css::uno::Reference< ::css::uno::XInterface >(static_cast< ::css::uno::XInterface * >((*LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_throws)(the_context.get(), ::css::uno::Sequence< ::css::uno::Any >())), ::SAL_NO_ACQUIRE), ::css::uno::UNO_QUERY); +#else + the_context->getValueByName(::rtl::OUString( "/singletons/test.codemaker.codemakertests.throws" )) >>= instance; +#endif + if (!instance.is()) { + throw ::css::uno::DeploymentException(::rtl::OUString( "component context fails to supply singleton test.codemaker.codemakertests.throws of type com.sun.star.uno.XNamingService" ), the_context); + } + return instance; + } + +private: + throws(); // not implemented + throws(throws &); // not implemented + ~throws(); // not implemented + void operator =(throws); // not implemented +}; + +} } } diff --git a/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/try.hpp b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/try.hpp new file mode 100644 index 000000000000..e401ed2cf78e --- /dev/null +++ b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/try.hpp @@ -0,0 +1,50 @@ +#pragma once + +#include "sal/config.h" + +#include + +#include "com/sun/star/uno/DeploymentException.hpp" +#include "com/sun/star/uno/XComponentContext.hpp" +#include "com/sun/star/uno/XNamingService.hpp" +#include "com/sun/star/uno/Any.hxx" +#include "com/sun/star/uno/Reference.hxx" +#include "cppu/unotype.hxx" +#include "rtl/ustring.h" +#include "rtl/ustring.hxx" + +#if defined ANDROID || defined IOS //TODO +#include +#include +#endif + +#if defined LO_URE_CURRENT_ENV && defined LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_try && (LO_URE_CURRENT_ENV) == (LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_try) && defined LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_try +extern "C" ::css::uno::XInterface * SAL_CALL LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_try(::css::uno::XComponentContext *, ::css::uno::Sequence< ::css::uno::Any > const &); +#endif + +namespace test { namespace codemaker { namespace codemakertests { + +class singleton_try { +public: + static ::css::uno::Reference< ::css::uno::XNamingService > get(::css::uno::Reference< ::css::uno::XComponentContext > const & the_context) { + assert(the_context.is()); + ::css::uno::Reference< ::css::uno::XNamingService > instance; +#if defined LO_URE_CURRENT_ENV && defined LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_try && (LO_URE_CURRENT_ENV) == (LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_try) && defined LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_try + instance = ::css::uno::Reference< ::css::uno::XNamingService >(::css::uno::Reference< ::css::uno::XInterface >(static_cast< ::css::uno::XInterface * >((*LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_try)(the_context.get(), ::css::uno::Sequence< ::css::uno::Any >())), ::SAL_NO_ACQUIRE), ::css::uno::UNO_QUERY); +#else + the_context->getValueByName(::rtl::OUString( "/singletons/test.codemaker.codemakertests.try" )) >>= instance; +#endif + if (!instance.is()) { + throw ::css::uno::DeploymentException(::rtl::OUString( "component context fails to supply singleton test.codemaker.codemakertests.try of type com.sun.star.uno.XNamingService" ), the_context); + } + return instance; + } + +private: + singleton_try(); // not implemented + singleton_try(singleton_try &); // not implemented + ~singleton_try(); // not implemented + void operator =(singleton_try); // not implemented +}; + +} } } diff --git a/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/volatile.hpp b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/volatile.hpp new file mode 100644 index 000000000000..63e32c2a1dc5 --- /dev/null +++ b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/volatile.hpp @@ -0,0 +1,50 @@ +#pragma once + +#include "sal/config.h" + +#include + +#include "com/sun/star/uno/DeploymentException.hpp" +#include "com/sun/star/uno/XComponentContext.hpp" +#include "com/sun/star/uno/XNamingService.hpp" +#include "com/sun/star/uno/Any.hxx" +#include "com/sun/star/uno/Reference.hxx" +#include "cppu/unotype.hxx" +#include "rtl/ustring.h" +#include "rtl/ustring.hxx" + +#if defined ANDROID || defined IOS //TODO +#include +#include +#endif + +#if defined LO_URE_CURRENT_ENV && defined LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_volatile && (LO_URE_CURRENT_ENV) == (LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_volatile) && defined LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_volatile +extern "C" ::css::uno::XInterface * SAL_CALL LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_volatile(::css::uno::XComponentContext *, ::css::uno::Sequence< ::css::uno::Any > const &); +#endif + +namespace test { namespace codemaker { namespace codemakertests { + +class singleton_volatile { +public: + static ::css::uno::Reference< ::css::uno::XNamingService > get(::css::uno::Reference< ::css::uno::XComponentContext > const & the_context) { + assert(the_context.is()); + ::css::uno::Reference< ::css::uno::XNamingService > instance; +#if defined LO_URE_CURRENT_ENV && defined LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_volatile && (LO_URE_CURRENT_ENV) == (LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_volatile) && defined LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_volatile + instance = ::css::uno::Reference< ::css::uno::XNamingService >(::css::uno::Reference< ::css::uno::XInterface >(static_cast< ::css::uno::XInterface * >((*LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_volatile)(the_context.get(), ::css::uno::Sequence< ::css::uno::Any >())), ::SAL_NO_ACQUIRE), ::css::uno::UNO_QUERY); +#else + the_context->getValueByName(::rtl::OUString( "/singletons/test.codemaker.codemakertests.volatile" )) >>= instance; +#endif + if (!instance.is()) { + throw ::css::uno::DeploymentException(::rtl::OUString( "component context fails to supply singleton test.codemaker.codemakertests.volatile of type com.sun.star.uno.XNamingService" ), the_context); + } + return instance; + } + +private: + singleton_volatile(); // not implemented + singleton_volatile(singleton_volatile &); // not implemented + ~singleton_volatile(); // not implemented + void operator =(singleton_volatile); // not implemented +}; + +} } } diff --git a/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/while.hpp b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/while.hpp new file mode 100644 index 000000000000..d7adda81b8db --- /dev/null +++ b/codemaker/tests/expected_cppumaker_stubs/test/codemaker/codemakertests/while.hpp @@ -0,0 +1,50 @@ +#pragma once + +#include "sal/config.h" + +#include + +#include "com/sun/star/uno/DeploymentException.hpp" +#include "com/sun/star/uno/XComponentContext.hpp" +#include "com/sun/star/uno/XNamingService.hpp" +#include "com/sun/star/uno/Any.hxx" +#include "com/sun/star/uno/Reference.hxx" +#include "cppu/unotype.hxx" +#include "rtl/ustring.h" +#include "rtl/ustring.hxx" + +#if defined ANDROID || defined IOS //TODO +#include +#include +#endif + +#if defined LO_URE_CURRENT_ENV && defined LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_while && (LO_URE_CURRENT_ENV) == (LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_while) && defined LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_while +extern "C" ::css::uno::XInterface * SAL_CALL LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_while(::css::uno::XComponentContext *, ::css::uno::Sequence< ::css::uno::Any > const &); +#endif + +namespace test { namespace codemaker { namespace codemakertests { + +class singleton_while { +public: + static ::css::uno::Reference< ::css::uno::XNamingService > get(::css::uno::Reference< ::css::uno::XComponentContext > const & the_context) { + assert(the_context.is()); + ::css::uno::Reference< ::css::uno::XNamingService > instance; +#if defined LO_URE_CURRENT_ENV && defined LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_while && (LO_URE_CURRENT_ENV) == (LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_while) && defined LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_while + instance = ::css::uno::Reference< ::css::uno::XNamingService >(::css::uno::Reference< ::css::uno::XInterface >(static_cast< ::css::uno::XInterface * >((*LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_while)(the_context.get(), ::css::uno::Sequence< ::css::uno::Any >())), ::SAL_NO_ACQUIRE), ::css::uno::UNO_QUERY); +#else + the_context->getValueByName(::rtl::OUString( "/singletons/test.codemaker.codemakertests.while" )) >>= instance; +#endif + if (!instance.is()) { + throw ::css::uno::DeploymentException(::rtl::OUString( "component context fails to supply singleton test.codemaker.codemakertests.while of type com.sun.star.uno.XNamingService" ), the_context); + } + return instance; + } + +private: + singleton_while(); // not implemented + singleton_while(singleton_while &); // not implemented + ~singleton_while(); // not implemented + void operator =(singleton_while); // not implemented +}; + +} } } diff --git a/codemaker/tests/pythonmaker/expected_pyi_stubs/test/__init__.pyi b/codemaker/tests/expected_pythonmaker_stubs/test/__init__.pyi similarity index 100% rename from codemaker/tests/pythonmaker/expected_pyi_stubs/test/__init__.pyi rename to codemaker/tests/expected_pythonmaker_stubs/test/__init__.pyi diff --git a/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/__init__.pyi b/codemaker/tests/expected_pythonmaker_stubs/test/codemaker/__init__.pyi similarity index 100% rename from codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/__init__.pyi rename to codemaker/tests/expected_pythonmaker_stubs/test/codemaker/__init__.pyi diff --git a/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/Any.pyi b/codemaker/tests/expected_pythonmaker_stubs/test/codemaker/codemakertests/Any.pyi similarity index 100% rename from codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/Any.pyi rename to codemaker/tests/expected_pythonmaker_stubs/test/codemaker/codemakertests/Any.pyi diff --git a/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/Boolean.pyi b/codemaker/tests/expected_pythonmaker_stubs/test/codemaker/codemakertests/Boolean.pyi similarity index 100% rename from codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/Boolean.pyi rename to codemaker/tests/expected_pythonmaker_stubs/test/codemaker/codemakertests/Boolean.pyi diff --git a/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/Byte.pyi b/codemaker/tests/expected_pythonmaker_stubs/test/codemaker/codemakertests/Byte.pyi similarity index 100% rename from codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/Byte.pyi rename to codemaker/tests/expected_pythonmaker_stubs/test/codemaker/codemakertests/Byte.pyi diff --git a/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/Char.pyi b/codemaker/tests/expected_pythonmaker_stubs/test/codemaker/codemakertests/Char.pyi similarity index 100% rename from codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/Char.pyi rename to codemaker/tests/expected_pythonmaker_stubs/test/codemaker/codemakertests/Char.pyi diff --git a/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/Double.pyi b/codemaker/tests/expected_pythonmaker_stubs/test/codemaker/codemakertests/Double.pyi similarity index 100% rename from codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/Double.pyi rename to codemaker/tests/expected_pythonmaker_stubs/test/codemaker/codemakertests/Double.pyi diff --git a/codemaker/tests/expected_pythonmaker_stubs/test/codemaker/codemakertests/Enum.pyi b/codemaker/tests/expected_pythonmaker_stubs/test/codemaker/codemakertests/Enum.pyi new file mode 100644 index 000000000000..050fef5751c9 --- /dev/null +++ b/codemaker/tests/expected_pythonmaker_stubs/test/codemaker/codemakertests/Enum.pyi @@ -0,0 +1,6 @@ +# Auto-generated by pythonmaker - DO NOT EDIT. +from __future__ import annotations + +from test.codemaker.codemakertests.Enum2 import Enum2 as test_codemaker_codemakertests_Enum2_ + +Enum = test_codemaker_codemakertests_Enum2_ diff --git a/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/Enum1.pyi b/codemaker/tests/expected_pythonmaker_stubs/test/codemaker/codemakertests/Enum1.pyi similarity index 100% rename from codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/Enum1.pyi rename to codemaker/tests/expected_pythonmaker_stubs/test/codemaker/codemakertests/Enum1.pyi diff --git a/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/Enum2.pyi b/codemaker/tests/expected_pythonmaker_stubs/test/codemaker/codemakertests/Enum2.pyi similarity index 100% rename from codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/Enum2.pyi rename to codemaker/tests/expected_pythonmaker_stubs/test/codemaker/codemakertests/Enum2.pyi diff --git a/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/Enum3.pyi b/codemaker/tests/expected_pythonmaker_stubs/test/codemaker/codemakertests/Enum3.pyi similarity index 100% rename from codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/Enum3.pyi rename to codemaker/tests/expected_pythonmaker_stubs/test/codemaker/codemakertests/Enum3.pyi diff --git a/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/Enum4.pyi b/codemaker/tests/expected_pythonmaker_stubs/test/codemaker/codemakertests/Enum4.pyi similarity index 100% rename from codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/Enum4.pyi rename to codemaker/tests/expected_pythonmaker_stubs/test/codemaker/codemakertests/Enum4.pyi diff --git a/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/Float.pyi b/codemaker/tests/expected_pythonmaker_stubs/test/codemaker/codemakertests/Float.pyi similarity index 100% rename from codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/Float.pyi rename to codemaker/tests/expected_pythonmaker_stubs/test/codemaker/codemakertests/Float.pyi diff --git a/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/Hyper.pyi b/codemaker/tests/expected_pythonmaker_stubs/test/codemaker/codemakertests/Hyper.pyi similarity index 100% rename from codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/Hyper.pyi rename to codemaker/tests/expected_pythonmaker_stubs/test/codemaker/codemakertests/Hyper.pyi diff --git a/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/Long.pyi b/codemaker/tests/expected_pythonmaker_stubs/test/codemaker/codemakertests/Long.pyi similarity index 100% rename from codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/Long.pyi rename to codemaker/tests/expected_pythonmaker_stubs/test/codemaker/codemakertests/Long.pyi diff --git a/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/PolyStruct.pyi b/codemaker/tests/expected_pythonmaker_stubs/test/codemaker/codemakertests/PolyStruct.pyi similarity index 100% rename from codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/PolyStruct.pyi rename to codemaker/tests/expected_pythonmaker_stubs/test/codemaker/codemakertests/PolyStruct.pyi diff --git a/codemaker/tests/expected_pythonmaker_stubs/test/codemaker/codemakertests/S1.pyi b/codemaker/tests/expected_pythonmaker_stubs/test/codemaker/codemakertests/S1.pyi new file mode 100644 index 000000000000..b2e4a2844e44 --- /dev/null +++ b/codemaker/tests/expected_pythonmaker_stubs/test/codemaker/codemakertests/S1.pyi @@ -0,0 +1,52 @@ +# Auto-generated by pythonmaker - DO NOT EDIT. +from __future__ import annotations + +from com.sun.star.lang.ClassNotFoundException import ClassNotFoundException as com_sun_star_lang_ClassNotFoundException_ +from com.sun.star.lang.IllegalAccessException import IllegalAccessException as com_sun_star_lang_IllegalAccessException_ +from com.sun.star.uno.DeploymentException import DeploymentException as com_sun_star_uno_DeploymentException_ +from com.sun.star.uno.Exception import Exception as com_sun_star_uno_Exception_ +from com.sun.star.uno.RuntimeException import RuntimeException as com_sun_star_uno_RuntimeException_ +from com.sun.star.uno.XComponentContext import XComponentContext as com_sun_star_uno_XComponentContext_ +from com.sun.star.uno.XInterface import XInterface as com_sun_star_uno_XInterface_ +from com.sun.star.uno.XNamingService import XNamingService as com_sun_star_uno_XNamingService_ +from test.codemaker.codemakertests.Enum2 import Enum2 as test_codemaker_codemakertests_Enum2_ +from test.codemaker.codemakertests.Struct1 import Struct1 as test_codemaker_codemakertests_Struct1_ +from test.codemaker.codemakertests.XTest import XTest as test_codemaker_codemakertests_XTest_ +from typing import Any +from typing import List +from typing import Type + +class S1: + @staticmethod + def create1(ctx: com_sun_star_uno_XComponentContext_) -> test_codemaker_codemakertests_XTest_: + ... + + @staticmethod + def create2(ctx: com_sun_star_uno_XComponentContext_, *args: Any) -> test_codemaker_codemakertests_XTest_: + """Raises: + com_sun_star_uno_RuntimeException_ + com_sun_star_lang_ClassNotFoundException_ + com_sun_star_uno_Exception_ + com_sun_star_lang_IllegalAccessException_ + com_sun_star_uno_DeploymentException_ + """ + ... + + @staticmethod + def create3(ctx: com_sun_star_uno_XComponentContext_, S1: List[Any]) -> test_codemaker_codemakertests_XTest_: + """Raises: + com_sun_star_uno_RuntimeException_ + com_sun_star_lang_ClassNotFoundException_ + com_sun_star_lang_IllegalAccessException_ + com_sun_star_uno_DeploymentException_ + """ + ... + + @staticmethod + def create4(ctx: com_sun_star_uno_XComponentContext_, javamaker: int, S1: int, create4: int) -> test_codemaker_codemakertests_XTest_: + ... + + @staticmethod + def create5(ctx: com_sun_star_uno_XComponentContext_, p1: bool, p2: int, p3: int, p4: int, p5: int, p6: int, p7: int, p8: int, p9: float, p10: float, p11: str, p12: str, p13: Type[Any], p14: Any, p15: test_codemaker_codemakertests_Enum2_, p16: test_codemaker_codemakertests_Struct1_, p17: com_sun_star_uno_XInterface_, p18: com_sun_star_uno_XNamingService_, t1: bool, t2: int, t3: int, t4: int, t5: int, t6: int, t7: int, t8: int, t9: float, t10: float, t11: str, t12: str, t13: Type[Any], t14: Any, t15: test_codemaker_codemakertests_Enum2_, t16: test_codemaker_codemakertests_Struct1_, t17: com_sun_star_uno_XInterface_, t18: com_sun_star_uno_XNamingService_, a1: List[bool], a2: List[int], a3: List[int], a4: List[int], a5: List[int], a6: List[int], a7: List[int], a8: List[int], a9: List[float], a10: List[float], a11: List[str], a12: List[str], a13: List[Type[Any]], a14: List[Any], a15: List[test_codemaker_codemakertests_Enum2_], a16: List[test_codemaker_codemakertests_Struct1_], a17: List[com_sun_star_uno_XInterface_], a18: List[com_sun_star_uno_XNamingService_], aa1: List[List[bool]], aa2: List[List[int]], aa3: List[List[int]], aa4: List[List[int]], aa5: List[List[int]], aa6: List[List[int]], aa7: List[List[int]], aa8: List[List[int]], aa9: List[List[float]], aa10: List[List[float]], aa11: List[List[str]], aa12: List[List[str]], aa13: List[List[Type[Any]]], aa14: List[List[Any]], aa15: List[List[test_codemaker_codemakertests_Enum2_]], aa16: List[List[test_codemaker_codemakertests_Struct1_]], aa17: List[List[com_sun_star_uno_XInterface_]], aa18: List[List[com_sun_star_uno_XNamingService_]], at1: List[List[bool]], at2: List[List[int]], at3: List[List[int]], at4: List[List[int]], at5: List[List[int]], at6: List[List[int]], at7: List[List[int]], at8: List[List[int]], at9: List[List[float]], at10: List[List[float]], at11: List[List[str]], at12: List[List[str]], at13: List[List[Type[Any]]], at14: List[List[Any]], at15: List[List[test_codemaker_codemakertests_Enum2_]], at16: List[List[test_codemaker_codemakertests_Struct1_]], at17: List[List[com_sun_star_uno_XInterface_]], at18: List[List[com_sun_star_uno_XNamingService_]]) -> test_codemaker_codemakertests_XTest_: + ... + diff --git a/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/S2.pyi b/codemaker/tests/expected_pythonmaker_stubs/test/codemaker/codemakertests/S2.pyi similarity index 69% rename from codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/S2.pyi rename to codemaker/tests/expected_pythonmaker_stubs/test/codemaker/codemakertests/S2.pyi index 32fcfaecd2a2..16b62f38bcf5 100644 --- a/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/S2.pyi +++ b/codemaker/tests/expected_pythonmaker_stubs/test/codemaker/codemakertests/S2.pyi @@ -2,10 +2,10 @@ from __future__ import annotations from com.sun.star.uno.XComponentContext import XComponentContext as com_sun_star_uno_XComponentContext_ -from test.codemaker.pythonmaker.XTest import XTest as test_codemaker_pythonmaker_XTest_ +from test.codemaker.codemakertests.XTest import XTest as test_codemaker_codemakertests_XTest_ class S2: @staticmethod - def create(ctx: com_sun_star_uno_XComponentContext_) -> test_codemaker_pythonmaker_XTest_: + def create(ctx: com_sun_star_uno_XComponentContext_) -> test_codemaker_codemakertests_XTest_: ... diff --git a/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/S4.pyi b/codemaker/tests/expected_pythonmaker_stubs/test/codemaker/codemakertests/S4.pyi similarity index 79% rename from codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/S4.pyi rename to codemaker/tests/expected_pythonmaker_stubs/test/codemaker/codemakertests/S4.pyi index 1ee119510671..bbf1b90cdd76 100644 --- a/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/S4.pyi +++ b/codemaker/tests/expected_pythonmaker_stubs/test/codemaker/codemakertests/S4.pyi @@ -3,11 +3,11 @@ from __future__ import annotations from com.sun.star.uno.DeploymentException import DeploymentException as com_sun_star_uno_DeploymentException_ from com.sun.star.uno.XComponentContext import XComponentContext as com_sun_star_uno_XComponentContext_ -from test.codemaker.pythonmaker.XTest import XTest as test_codemaker_pythonmaker_XTest_ +from test.codemaker.codemakertests.XTest import XTest as test_codemaker_codemakertests_XTest_ class S4: @staticmethod - def get(ctx: com_sun_star_uno_XComponentContext_) -> test_codemaker_pythonmaker_XTest_: + def get(ctx: com_sun_star_uno_XComponentContext_) -> test_codemaker_codemakertests_XTest_: """Raises: com_sun_star_uno_DeploymentException_ """ diff --git a/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/SequenceAny.pyi b/codemaker/tests/expected_pythonmaker_stubs/test/codemaker/codemakertests/SequenceAny.pyi similarity index 100% rename from codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/SequenceAny.pyi rename to codemaker/tests/expected_pythonmaker_stubs/test/codemaker/codemakertests/SequenceAny.pyi diff --git a/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/SequenceBoolean.pyi b/codemaker/tests/expected_pythonmaker_stubs/test/codemaker/codemakertests/SequenceBoolean.pyi similarity index 100% rename from codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/SequenceBoolean.pyi rename to codemaker/tests/expected_pythonmaker_stubs/test/codemaker/codemakertests/SequenceBoolean.pyi diff --git a/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/SequenceByte.pyi b/codemaker/tests/expected_pythonmaker_stubs/test/codemaker/codemakertests/SequenceByte.pyi similarity index 100% rename from codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/SequenceByte.pyi rename to codemaker/tests/expected_pythonmaker_stubs/test/codemaker/codemakertests/SequenceByte.pyi diff --git a/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/SequenceChar.pyi b/codemaker/tests/expected_pythonmaker_stubs/test/codemaker/codemakertests/SequenceChar.pyi similarity index 100% rename from codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/SequenceChar.pyi rename to codemaker/tests/expected_pythonmaker_stubs/test/codemaker/codemakertests/SequenceChar.pyi diff --git a/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/SequenceDouble.pyi b/codemaker/tests/expected_pythonmaker_stubs/test/codemaker/codemakertests/SequenceDouble.pyi similarity index 100% rename from codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/SequenceDouble.pyi rename to codemaker/tests/expected_pythonmaker_stubs/test/codemaker/codemakertests/SequenceDouble.pyi diff --git a/codemaker/tests/expected_pythonmaker_stubs/test/codemaker/codemakertests/SequenceEnum.pyi b/codemaker/tests/expected_pythonmaker_stubs/test/codemaker/codemakertests/SequenceEnum.pyi new file mode 100644 index 000000000000..e11335ffb1be --- /dev/null +++ b/codemaker/tests/expected_pythonmaker_stubs/test/codemaker/codemakertests/SequenceEnum.pyi @@ -0,0 +1,7 @@ +# Auto-generated by pythonmaker - DO NOT EDIT. +from __future__ import annotations + +from test.codemaker.codemakertests.Enum2 import Enum2 as test_codemaker_codemakertests_Enum2_ +from typing import List + +SequenceEnum = List[test_codemaker_codemakertests_Enum2_] diff --git a/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/SequenceFloat.pyi b/codemaker/tests/expected_pythonmaker_stubs/test/codemaker/codemakertests/SequenceFloat.pyi similarity index 100% rename from codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/SequenceFloat.pyi rename to codemaker/tests/expected_pythonmaker_stubs/test/codemaker/codemakertests/SequenceFloat.pyi diff --git a/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/SequenceHyper.pyi b/codemaker/tests/expected_pythonmaker_stubs/test/codemaker/codemakertests/SequenceHyper.pyi similarity index 100% rename from codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/SequenceHyper.pyi rename to codemaker/tests/expected_pythonmaker_stubs/test/codemaker/codemakertests/SequenceHyper.pyi diff --git a/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/SequenceLong.pyi b/codemaker/tests/expected_pythonmaker_stubs/test/codemaker/codemakertests/SequenceLong.pyi similarity index 100% rename from codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/SequenceLong.pyi rename to codemaker/tests/expected_pythonmaker_stubs/test/codemaker/codemakertests/SequenceLong.pyi diff --git a/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/SequenceShort.pyi b/codemaker/tests/expected_pythonmaker_stubs/test/codemaker/codemakertests/SequenceShort.pyi similarity index 100% rename from codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/SequenceShort.pyi rename to codemaker/tests/expected_pythonmaker_stubs/test/codemaker/codemakertests/SequenceShort.pyi diff --git a/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/SequenceString.pyi b/codemaker/tests/expected_pythonmaker_stubs/test/codemaker/codemakertests/SequenceString.pyi similarity index 100% rename from codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/SequenceString.pyi rename to codemaker/tests/expected_pythonmaker_stubs/test/codemaker/codemakertests/SequenceString.pyi diff --git a/codemaker/tests/expected_pythonmaker_stubs/test/codemaker/codemakertests/SequenceStruct.pyi b/codemaker/tests/expected_pythonmaker_stubs/test/codemaker/codemakertests/SequenceStruct.pyi new file mode 100644 index 000000000000..11befb7343a3 --- /dev/null +++ b/codemaker/tests/expected_pythonmaker_stubs/test/codemaker/codemakertests/SequenceStruct.pyi @@ -0,0 +1,7 @@ +# Auto-generated by pythonmaker - DO NOT EDIT. +from __future__ import annotations + +from test.codemaker.codemakertests.Struct1 import Struct1 as test_codemaker_codemakertests_Struct1_ +from typing import List + +SequenceStruct = List[test_codemaker_codemakertests_Struct1_] diff --git a/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/SequenceType.pyi b/codemaker/tests/expected_pythonmaker_stubs/test/codemaker/codemakertests/SequenceType.pyi similarity index 100% rename from codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/SequenceType.pyi rename to codemaker/tests/expected_pythonmaker_stubs/test/codemaker/codemakertests/SequenceType.pyi diff --git a/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/SequenceUnsignedHyper.pyi b/codemaker/tests/expected_pythonmaker_stubs/test/codemaker/codemakertests/SequenceUnsignedHyper.pyi similarity index 100% rename from codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/SequenceUnsignedHyper.pyi rename to codemaker/tests/expected_pythonmaker_stubs/test/codemaker/codemakertests/SequenceUnsignedHyper.pyi diff --git a/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/SequenceUnsignedLong.pyi b/codemaker/tests/expected_pythonmaker_stubs/test/codemaker/codemakertests/SequenceUnsignedLong.pyi similarity index 100% rename from codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/SequenceUnsignedLong.pyi rename to codemaker/tests/expected_pythonmaker_stubs/test/codemaker/codemakertests/SequenceUnsignedLong.pyi diff --git a/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/SequenceUnsignedShort.pyi b/codemaker/tests/expected_pythonmaker_stubs/test/codemaker/codemakertests/SequenceUnsignedShort.pyi similarity index 100% rename from codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/SequenceUnsignedShort.pyi rename to codemaker/tests/expected_pythonmaker_stubs/test/codemaker/codemakertests/SequenceUnsignedShort.pyi diff --git a/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/SequenceXInterface.pyi b/codemaker/tests/expected_pythonmaker_stubs/test/codemaker/codemakertests/SequenceXInterface.pyi similarity index 100% rename from codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/SequenceXInterface.pyi rename to codemaker/tests/expected_pythonmaker_stubs/test/codemaker/codemakertests/SequenceXInterface.pyi diff --git a/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/SequenceXNamingService.pyi b/codemaker/tests/expected_pythonmaker_stubs/test/codemaker/codemakertests/SequenceXNamingService.pyi similarity index 100% rename from codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/SequenceXNamingService.pyi rename to codemaker/tests/expected_pythonmaker_stubs/test/codemaker/codemakertests/SequenceXNamingService.pyi diff --git a/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/Service.pyi b/codemaker/tests/expected_pythonmaker_stubs/test/codemaker/codemakertests/Service.pyi similarity index 100% rename from codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/Service.pyi rename to codemaker/tests/expected_pythonmaker_stubs/test/codemaker/codemakertests/Service.pyi diff --git a/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/Short.pyi b/codemaker/tests/expected_pythonmaker_stubs/test/codemaker/codemakertests/Short.pyi similarity index 100% rename from codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/Short.pyi rename to codemaker/tests/expected_pythonmaker_stubs/test/codemaker/codemakertests/Short.pyi diff --git a/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/String.pyi b/codemaker/tests/expected_pythonmaker_stubs/test/codemaker/codemakertests/String.pyi similarity index 100% rename from codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/String.pyi rename to codemaker/tests/expected_pythonmaker_stubs/test/codemaker/codemakertests/String.pyi diff --git a/codemaker/tests/expected_pythonmaker_stubs/test/codemaker/codemakertests/Struct.pyi b/codemaker/tests/expected_pythonmaker_stubs/test/codemaker/codemakertests/Struct.pyi new file mode 100644 index 000000000000..14be27f4049e --- /dev/null +++ b/codemaker/tests/expected_pythonmaker_stubs/test/codemaker/codemakertests/Struct.pyi @@ -0,0 +1,6 @@ +# Auto-generated by pythonmaker - DO NOT EDIT. +from __future__ import annotations + +from test.codemaker.codemakertests.Struct1 import Struct1 as test_codemaker_codemakertests_Struct1_ + +Struct = test_codemaker_codemakertests_Struct1_ diff --git a/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/Struct1.pyi b/codemaker/tests/expected_pythonmaker_stubs/test/codemaker/codemakertests/Struct1.pyi similarity index 100% rename from codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/Struct1.pyi rename to codemaker/tests/expected_pythonmaker_stubs/test/codemaker/codemakertests/Struct1.pyi diff --git a/codemaker/tests/expected_pythonmaker_stubs/test/codemaker/codemakertests/Struct2.pyi b/codemaker/tests/expected_pythonmaker_stubs/test/codemaker/codemakertests/Struct2.pyi new file mode 100644 index 000000000000..6b6ee650e878 --- /dev/null +++ b/codemaker/tests/expected_pythonmaker_stubs/test/codemaker/codemakertests/Struct2.pyi @@ -0,0 +1,105 @@ +# Auto-generated by pythonmaker - DO NOT EDIT. +from __future__ import annotations + +from com.sun.star.uno.XInterface import XInterface as com_sun_star_uno_XInterface_ +from com.sun.star.uno.XNamingService import XNamingService as com_sun_star_uno_XNamingService_ +from test.codemaker.codemakertests.Enum2 import Enum2 as test_codemaker_codemakertests_Enum2_ +from test.codemaker.codemakertests.Struct1 import Struct1 as test_codemaker_codemakertests_Struct1_ +from typing import Any +from typing import List +from typing import Type + +class Struct2(object): + def __init__(self, p1: bool | None = ..., p2: int | None = ..., p3: int | None = ..., p4: int | None = ..., p5: int | None = ..., p6: int | None = ..., p7: int | None = ..., p8: int | None = ..., p9: float | None = ..., p10: float | None = ..., p11: str | None = ..., p12: str | None = ..., p13: Type[Any] | None = ..., p14: Any | None = ..., p15: test_codemaker_codemakertests_Enum2_ | None = ..., p16: test_codemaker_codemakertests_Struct1_ | None = ..., p17: com_sun_star_uno_XInterface_ | None = ..., p18: com_sun_star_uno_XNamingService_ | None = ..., t1: bool | None = ..., t2: int | None = ..., t3: int | None = ..., t4: int | None = ..., t5: int | None = ..., t6: int | None = ..., t7: int | None = ..., t8: int | None = ..., t9: float | None = ..., t10: float | None = ..., t11: str | None = ..., t12: str | None = ..., t13: Type[Any] | None = ..., t14: Any | None = ..., t15: test_codemaker_codemakertests_Enum2_ | None = ..., t16: test_codemaker_codemakertests_Struct1_ | None = ..., t17: com_sun_star_uno_XInterface_ | None = ..., t18: com_sun_star_uno_XNamingService_ | None = ..., a1: List[bool] | None = ..., a2: List[int] | None = ..., a3: List[int] | None = ..., a4: List[int] | None = ..., a5: List[int] | None = ..., a6: List[int] | None = ..., a7: List[int] | None = ..., a8: List[int] | None = ..., a9: List[float] | None = ..., a10: List[float] | None = ..., a11: List[str] | None = ..., a12: List[str] | None = ..., a13: List[Type[Any]] | None = ..., a14: List[Any] | None = ..., a15: List[test_codemaker_codemakertests_Enum2_] | None = ..., a16: List[test_codemaker_codemakertests_Struct1_] | None = ..., a17: List[com_sun_star_uno_XInterface_] | None = ..., a18: List[com_sun_star_uno_XNamingService_] | None = ..., aa1: List[List[bool]] | None = ..., aa2: List[List[int]] | None = ..., aa3: List[List[int]] | None = ..., aa4: List[List[int]] | None = ..., aa5: List[List[int]] | None = ..., aa6: List[List[int]] | None = ..., aa7: List[List[int]] | None = ..., aa8: List[List[int]] | None = ..., aa9: List[List[float]] | None = ..., aa10: List[List[float]] | None = ..., aa11: List[List[str]] | None = ..., aa12: List[List[str]] | None = ..., aa13: List[List[Type[Any]]] | None = ..., aa14: List[List[Any]] | None = ..., aa15: List[List[test_codemaker_codemakertests_Enum2_]] | None = ..., aa16: List[List[test_codemaker_codemakertests_Struct1_]] | None = ..., aa17: List[List[com_sun_star_uno_XInterface_]] | None = ..., aa18: List[List[com_sun_star_uno_XNamingService_]] | None = ..., at1: List[List[bool]] | None = ..., at2: List[List[int]] | None = ..., at3: List[List[int]] | None = ..., at4: List[List[int]] | None = ..., at5: List[List[int]] | None = ..., at6: List[List[int]] | None = ..., at7: List[List[int]] | None = ..., at8: List[List[int]] | None = ..., at9: List[List[float]] | None = ..., at10: List[List[float]] | None = ..., at11: List[List[str]] | None = ..., at12: List[List[str]] | None = ..., at13: List[List[Type[Any]]] | None = ..., at14: List[List[Any]] | None = ..., at15: List[List[test_codemaker_codemakertests_Enum2_]] | None = ..., at16: List[List[test_codemaker_codemakertests_Struct1_]] | None = ..., at17: List[List[com_sun_star_uno_XInterface_]] | None = ..., at18: List[List[com_sun_star_uno_XNamingService_]] | None = ...) -> None: + ... + + p1: bool + p2: int + p3: int + p4: int + p5: int + p6: int + p7: int + p8: int + p9: float + p10: float + p11: str + p12: str + p13: Type[Any] + p14: Any + p15: test_codemaker_codemakertests_Enum2_ + p16: test_codemaker_codemakertests_Struct1_ + p17: com_sun_star_uno_XInterface_ + p18: com_sun_star_uno_XNamingService_ + t1: bool + t2: int + t3: int + t4: int + t5: int + t6: int + t7: int + t8: int + t9: float + t10: float + t11: str + t12: str + t13: Type[Any] + t14: Any + t15: test_codemaker_codemakertests_Enum2_ + t16: test_codemaker_codemakertests_Struct1_ + t17: com_sun_star_uno_XInterface_ + t18: com_sun_star_uno_XNamingService_ + a1: List[bool] + a2: List[int] + a3: List[int] + a4: List[int] + a5: List[int] + a6: List[int] + a7: List[int] + a8: List[int] + a9: List[float] + a10: List[float] + a11: List[str] + a12: List[str] + a13: List[Type[Any]] + a14: List[Any] + a15: List[test_codemaker_codemakertests_Enum2_] + a16: List[test_codemaker_codemakertests_Struct1_] + a17: List[com_sun_star_uno_XInterface_] + a18: List[com_sun_star_uno_XNamingService_] + aa1: List[List[bool]] + aa2: List[List[int]] + aa3: List[List[int]] + aa4: List[List[int]] + aa5: List[List[int]] + aa6: List[List[int]] + aa7: List[List[int]] + aa8: List[List[int]] + aa9: List[List[float]] + aa10: List[List[float]] + aa11: List[List[str]] + aa12: List[List[str]] + aa13: List[List[Type[Any]]] + aa14: List[List[Any]] + aa15: List[List[test_codemaker_codemakertests_Enum2_]] + aa16: List[List[test_codemaker_codemakertests_Struct1_]] + aa17: List[List[com_sun_star_uno_XInterface_]] + aa18: List[List[com_sun_star_uno_XNamingService_]] + at1: List[List[bool]] + at2: List[List[int]] + at3: List[List[int]] + at4: List[List[int]] + at5: List[List[int]] + at6: List[List[int]] + at7: List[List[int]] + at8: List[List[int]] + at9: List[List[float]] + at10: List[List[float]] + at11: List[List[str]] + at12: List[List[str]] + at13: List[List[Type[Any]]] + at14: List[List[Any]] + at15: List[List[test_codemaker_codemakertests_Enum2_]] + at16: List[List[test_codemaker_codemakertests_Struct1_]] + at17: List[List[com_sun_star_uno_XInterface_]] + at18: List[List[com_sun_star_uno_XNamingService_]] diff --git a/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/TestConstantsBasic.pyi b/codemaker/tests/expected_pythonmaker_stubs/test/codemaker/codemakertests/TestConstantsBasic.pyi similarity index 100% rename from codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/TestConstantsBasic.pyi rename to codemaker/tests/expected_pythonmaker_stubs/test/codemaker/codemakertests/TestConstantsBasic.pyi diff --git a/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/Type.pyi b/codemaker/tests/expected_pythonmaker_stubs/test/codemaker/codemakertests/Type.pyi similarity index 100% rename from codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/Type.pyi rename to codemaker/tests/expected_pythonmaker_stubs/test/codemaker/codemakertests/Type.pyi diff --git a/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/UnsignedHyper.pyi b/codemaker/tests/expected_pythonmaker_stubs/test/codemaker/codemakertests/UnsignedHyper.pyi similarity index 100% rename from codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/UnsignedHyper.pyi rename to codemaker/tests/expected_pythonmaker_stubs/test/codemaker/codemakertests/UnsignedHyper.pyi diff --git a/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/UnsignedLong.pyi b/codemaker/tests/expected_pythonmaker_stubs/test/codemaker/codemakertests/UnsignedLong.pyi similarity index 100% rename from codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/UnsignedLong.pyi rename to codemaker/tests/expected_pythonmaker_stubs/test/codemaker/codemakertests/UnsignedLong.pyi diff --git a/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/UnsignedShort.pyi b/codemaker/tests/expected_pythonmaker_stubs/test/codemaker/codemakertests/UnsignedShort.pyi similarity index 100% rename from codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/UnsignedShort.pyi rename to codemaker/tests/expected_pythonmaker_stubs/test/codemaker/codemakertests/UnsignedShort.pyi diff --git a/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/XIfc.pyi b/codemaker/tests/expected_pythonmaker_stubs/test/codemaker/codemakertests/XIfc.pyi similarity index 52% rename from codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/XIfc.pyi rename to codemaker/tests/expected_pythonmaker_stubs/test/codemaker/codemakertests/XIfc.pyi index 87940d5ea949..5a38044491db 100644 --- a/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/XIfc.pyi +++ b/codemaker/tests/expected_pythonmaker_stubs/test/codemaker/codemakertests/XIfc.pyi @@ -3,15 +3,15 @@ from __future__ import annotations from abc import abstractmethod from com.sun.star.uno.XInterface import XInterface as com_sun_star_uno_XInterface_ -from test.codemaker.pythonmaker.PolyStruct import PolyStruct as test_codemaker_pythonmaker_PolyStruct_ +from test.codemaker.codemakertests.PolyStruct import PolyStruct as test_codemaker_codemakertests_PolyStruct_ from typing import Any class XIfc(com_sun_star_uno_XInterface_): @abstractmethod - def f1(self, arg: test_codemaker_pythonmaker_PolyStruct_[int, int]) -> None: + def f1(self, arg: test_codemaker_codemakertests_PolyStruct_[int, int]) -> None: ... @abstractmethod - def f2(self, arg: test_codemaker_pythonmaker_PolyStruct_[Any, com_sun_star_uno_XInterface_]) -> None: + def f2(self, arg: test_codemaker_codemakertests_PolyStruct_[Any, com_sun_star_uno_XInterface_]) -> None: ... diff --git a/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/XInterface.pyi b/codemaker/tests/expected_pythonmaker_stubs/test/codemaker/codemakertests/XInterface.pyi similarity index 100% rename from codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/XInterface.pyi rename to codemaker/tests/expected_pythonmaker_stubs/test/codemaker/codemakertests/XInterface.pyi diff --git a/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/XNamingService.pyi b/codemaker/tests/expected_pythonmaker_stubs/test/codemaker/codemakertests/XNamingService.pyi similarity index 100% rename from codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/XNamingService.pyi rename to codemaker/tests/expected_pythonmaker_stubs/test/codemaker/codemakertests/XNamingService.pyi diff --git a/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/XTest.pyi b/codemaker/tests/expected_pythonmaker_stubs/test/codemaker/codemakertests/XTest.pyi similarity index 100% rename from codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/XTest.pyi rename to codemaker/tests/expected_pythonmaker_stubs/test/codemaker/codemakertests/XTest.pyi diff --git a/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/__init__.pyi b/codemaker/tests/expected_pythonmaker_stubs/test/codemaker/codemakertests/__init__.pyi similarity index 100% rename from codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/__init__.pyi rename to codemaker/tests/expected_pythonmaker_stubs/test/codemaker/codemakertests/__init__.pyi diff --git a/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/abstract.pyi b/codemaker/tests/expected_pythonmaker_stubs/test/codemaker/codemakertests/abstract.pyi similarity index 100% rename from codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/abstract.pyi rename to codemaker/tests/expected_pythonmaker_stubs/test/codemaker/codemakertests/abstract.pyi diff --git a/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/assert.pyi b/codemaker/tests/expected_pythonmaker_stubs/test/codemaker/codemakertests/assert.pyi similarity index 100% rename from codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/assert.pyi rename to codemaker/tests/expected_pythonmaker_stubs/test/codemaker/codemakertests/assert.pyi diff --git a/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/break.pyi b/codemaker/tests/expected_pythonmaker_stubs/test/codemaker/codemakertests/break.pyi similarity index 100% rename from codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/break.pyi rename to codemaker/tests/expected_pythonmaker_stubs/test/codemaker/codemakertests/break.pyi diff --git a/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/catch.pyi b/codemaker/tests/expected_pythonmaker_stubs/test/codemaker/codemakertests/catch.pyi similarity index 100% rename from codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/catch.pyi rename to codemaker/tests/expected_pythonmaker_stubs/test/codemaker/codemakertests/catch.pyi diff --git a/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/class.pyi b/codemaker/tests/expected_pythonmaker_stubs/test/codemaker/codemakertests/class.pyi similarity index 100% rename from codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/class.pyi rename to codemaker/tests/expected_pythonmaker_stubs/test/codemaker/codemakertests/class.pyi diff --git a/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/continue.pyi b/codemaker/tests/expected_pythonmaker_stubs/test/codemaker/codemakertests/continue.pyi similarity index 100% rename from codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/continue.pyi rename to codemaker/tests/expected_pythonmaker_stubs/test/codemaker/codemakertests/continue.pyi diff --git a/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/do.pyi b/codemaker/tests/expected_pythonmaker_stubs/test/codemaker/codemakertests/do.pyi similarity index 100% rename from codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/do.pyi rename to codemaker/tests/expected_pythonmaker_stubs/test/codemaker/codemakertests/do.pyi diff --git a/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/else.pyi b/codemaker/tests/expected_pythonmaker_stubs/test/codemaker/codemakertests/else.pyi similarity index 100% rename from codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/else.pyi rename to codemaker/tests/expected_pythonmaker_stubs/test/codemaker/codemakertests/else.pyi diff --git a/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/exceptions/MyBaseError.pyi b/codemaker/tests/expected_pythonmaker_stubs/test/codemaker/codemakertests/exceptions/MyBaseError.pyi similarity index 100% rename from codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/exceptions/MyBaseError.pyi rename to codemaker/tests/expected_pythonmaker_stubs/test/codemaker/codemakertests/exceptions/MyBaseError.pyi diff --git a/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/exceptions/SimpleError.pyi b/codemaker/tests/expected_pythonmaker_stubs/test/codemaker/codemakertests/exceptions/SimpleError.pyi similarity index 100% rename from codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/exceptions/SimpleError.pyi rename to codemaker/tests/expected_pythonmaker_stubs/test/codemaker/codemakertests/exceptions/SimpleError.pyi diff --git a/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/exceptions/__init__.pyi b/codemaker/tests/expected_pythonmaker_stubs/test/codemaker/codemakertests/exceptions/__init__.pyi similarity index 100% rename from codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/exceptions/__init__.pyi rename to codemaker/tests/expected_pythonmaker_stubs/test/codemaker/codemakertests/exceptions/__init__.pyi diff --git a/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/extends.pyi b/codemaker/tests/expected_pythonmaker_stubs/test/codemaker/codemakertests/extends.pyi similarity index 100% rename from codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/extends.pyi rename to codemaker/tests/expected_pythonmaker_stubs/test/codemaker/codemakertests/extends.pyi diff --git a/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/final.pyi b/codemaker/tests/expected_pythonmaker_stubs/test/codemaker/codemakertests/final.pyi similarity index 100% rename from codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/final.pyi rename to codemaker/tests/expected_pythonmaker_stubs/test/codemaker/codemakertests/final.pyi diff --git a/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/finally.pyi b/codemaker/tests/expected_pythonmaker_stubs/test/codemaker/codemakertests/finally.pyi similarity index 100% rename from codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/finally.pyi rename to codemaker/tests/expected_pythonmaker_stubs/test/codemaker/codemakertests/finally.pyi diff --git a/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/for.pyi b/codemaker/tests/expected_pythonmaker_stubs/test/codemaker/codemakertests/for.pyi similarity index 100% rename from codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/for.pyi rename to codemaker/tests/expected_pythonmaker_stubs/test/codemaker/codemakertests/for.pyi diff --git a/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/goto.pyi b/codemaker/tests/expected_pythonmaker_stubs/test/codemaker/codemakertests/goto.pyi similarity index 100% rename from codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/goto.pyi rename to codemaker/tests/expected_pythonmaker_stubs/test/codemaker/codemakertests/goto.pyi diff --git a/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/if.pyi b/codemaker/tests/expected_pythonmaker_stubs/test/codemaker/codemakertests/if.pyi similarity index 100% rename from codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/if.pyi rename to codemaker/tests/expected_pythonmaker_stubs/test/codemaker/codemakertests/if.pyi diff --git a/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/implements.pyi b/codemaker/tests/expected_pythonmaker_stubs/test/codemaker/codemakertests/implements.pyi similarity index 100% rename from codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/implements.pyi rename to codemaker/tests/expected_pythonmaker_stubs/test/codemaker/codemakertests/implements.pyi diff --git a/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/import.pyi b/codemaker/tests/expected_pythonmaker_stubs/test/codemaker/codemakertests/import.pyi similarity index 100% rename from codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/import.pyi rename to codemaker/tests/expected_pythonmaker_stubs/test/codemaker/codemakertests/import.pyi diff --git a/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/instanceof.pyi b/codemaker/tests/expected_pythonmaker_stubs/test/codemaker/codemakertests/instanceof.pyi similarity index 100% rename from codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/instanceof.pyi rename to codemaker/tests/expected_pythonmaker_stubs/test/codemaker/codemakertests/instanceof.pyi diff --git a/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/int.pyi b/codemaker/tests/expected_pythonmaker_stubs/test/codemaker/codemakertests/int.pyi similarity index 100% rename from codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/int.pyi rename to codemaker/tests/expected_pythonmaker_stubs/test/codemaker/codemakertests/int.pyi diff --git a/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/native.pyi b/codemaker/tests/expected_pythonmaker_stubs/test/codemaker/codemakertests/native.pyi similarity index 100% rename from codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/native.pyi rename to codemaker/tests/expected_pythonmaker_stubs/test/codemaker/codemakertests/native.pyi diff --git a/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/new.pyi b/codemaker/tests/expected_pythonmaker_stubs/test/codemaker/codemakertests/new.pyi similarity index 100% rename from codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/new.pyi rename to codemaker/tests/expected_pythonmaker_stubs/test/codemaker/codemakertests/new.pyi diff --git a/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/package.pyi b/codemaker/tests/expected_pythonmaker_stubs/test/codemaker/codemakertests/package.pyi similarity index 100% rename from codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/package.pyi rename to codemaker/tests/expected_pythonmaker_stubs/test/codemaker/codemakertests/package.pyi diff --git a/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/private.pyi b/codemaker/tests/expected_pythonmaker_stubs/test/codemaker/codemakertests/private.pyi similarity index 100% rename from codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/private.pyi rename to codemaker/tests/expected_pythonmaker_stubs/test/codemaker/codemakertests/private.pyi diff --git a/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/protected.pyi b/codemaker/tests/expected_pythonmaker_stubs/test/codemaker/codemakertests/protected.pyi similarity index 100% rename from codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/protected.pyi rename to codemaker/tests/expected_pythonmaker_stubs/test/codemaker/codemakertests/protected.pyi diff --git a/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/public.pyi b/codemaker/tests/expected_pythonmaker_stubs/test/codemaker/codemakertests/public.pyi similarity index 100% rename from codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/public.pyi rename to codemaker/tests/expected_pythonmaker_stubs/test/codemaker/codemakertests/public.pyi diff --git a/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/return.pyi b/codemaker/tests/expected_pythonmaker_stubs/test/codemaker/codemakertests/return.pyi similarity index 100% rename from codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/return.pyi rename to codemaker/tests/expected_pythonmaker_stubs/test/codemaker/codemakertests/return.pyi diff --git a/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/services/__init__.pyi b/codemaker/tests/expected_pythonmaker_stubs/test/codemaker/codemakertests/services/__init__.pyi similarity index 100% rename from codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/services/__init__.pyi rename to codemaker/tests/expected_pythonmaker_stubs/test/codemaker/codemakertests/services/__init__.pyi diff --git a/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/services/abstract.pyi b/codemaker/tests/expected_pythonmaker_stubs/test/codemaker/codemakertests/services/abstract.pyi similarity index 100% rename from codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/services/abstract.pyi rename to codemaker/tests/expected_pythonmaker_stubs/test/codemaker/codemakertests/services/abstract.pyi diff --git a/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/services/assert.pyi b/codemaker/tests/expected_pythonmaker_stubs/test/codemaker/codemakertests/services/assert.pyi similarity index 100% rename from codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/services/assert.pyi rename to codemaker/tests/expected_pythonmaker_stubs/test/codemaker/codemakertests/services/assert.pyi diff --git a/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/services/break.pyi b/codemaker/tests/expected_pythonmaker_stubs/test/codemaker/codemakertests/services/break.pyi similarity index 100% rename from codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/services/break.pyi rename to codemaker/tests/expected_pythonmaker_stubs/test/codemaker/codemakertests/services/break.pyi diff --git a/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/services/catch.pyi b/codemaker/tests/expected_pythonmaker_stubs/test/codemaker/codemakertests/services/catch.pyi similarity index 100% rename from codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/services/catch.pyi rename to codemaker/tests/expected_pythonmaker_stubs/test/codemaker/codemakertests/services/catch.pyi diff --git a/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/services/class.pyi b/codemaker/tests/expected_pythonmaker_stubs/test/codemaker/codemakertests/services/class.pyi similarity index 100% rename from codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/services/class.pyi rename to codemaker/tests/expected_pythonmaker_stubs/test/codemaker/codemakertests/services/class.pyi diff --git a/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/services/continue.pyi b/codemaker/tests/expected_pythonmaker_stubs/test/codemaker/codemakertests/services/continue.pyi similarity index 100% rename from codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/services/continue.pyi rename to codemaker/tests/expected_pythonmaker_stubs/test/codemaker/codemakertests/services/continue.pyi diff --git a/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/services/do.pyi b/codemaker/tests/expected_pythonmaker_stubs/test/codemaker/codemakertests/services/do.pyi similarity index 100% rename from codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/services/do.pyi rename to codemaker/tests/expected_pythonmaker_stubs/test/codemaker/codemakertests/services/do.pyi diff --git a/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/services/else.pyi b/codemaker/tests/expected_pythonmaker_stubs/test/codemaker/codemakertests/services/else.pyi similarity index 100% rename from codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/services/else.pyi rename to codemaker/tests/expected_pythonmaker_stubs/test/codemaker/codemakertests/services/else.pyi diff --git a/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/services/extends.pyi b/codemaker/tests/expected_pythonmaker_stubs/test/codemaker/codemakertests/services/extends.pyi similarity index 100% rename from codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/services/extends.pyi rename to codemaker/tests/expected_pythonmaker_stubs/test/codemaker/codemakertests/services/extends.pyi diff --git a/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/services/final.pyi b/codemaker/tests/expected_pythonmaker_stubs/test/codemaker/codemakertests/services/final.pyi similarity index 100% rename from codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/services/final.pyi rename to codemaker/tests/expected_pythonmaker_stubs/test/codemaker/codemakertests/services/final.pyi diff --git a/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/services/finally.pyi b/codemaker/tests/expected_pythonmaker_stubs/test/codemaker/codemakertests/services/finally.pyi similarity index 100% rename from codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/services/finally.pyi rename to codemaker/tests/expected_pythonmaker_stubs/test/codemaker/codemakertests/services/finally.pyi diff --git a/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/services/for.pyi b/codemaker/tests/expected_pythonmaker_stubs/test/codemaker/codemakertests/services/for.pyi similarity index 100% rename from codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/services/for.pyi rename to codemaker/tests/expected_pythonmaker_stubs/test/codemaker/codemakertests/services/for.pyi diff --git a/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/services/goto.pyi b/codemaker/tests/expected_pythonmaker_stubs/test/codemaker/codemakertests/services/goto.pyi similarity index 100% rename from codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/services/goto.pyi rename to codemaker/tests/expected_pythonmaker_stubs/test/codemaker/codemakertests/services/goto.pyi diff --git a/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/services/if.pyi b/codemaker/tests/expected_pythonmaker_stubs/test/codemaker/codemakertests/services/if.pyi similarity index 100% rename from codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/services/if.pyi rename to codemaker/tests/expected_pythonmaker_stubs/test/codemaker/codemakertests/services/if.pyi diff --git a/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/services/implements.pyi b/codemaker/tests/expected_pythonmaker_stubs/test/codemaker/codemakertests/services/implements.pyi similarity index 100% rename from codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/services/implements.pyi rename to codemaker/tests/expected_pythonmaker_stubs/test/codemaker/codemakertests/services/implements.pyi diff --git a/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/services/import.pyi b/codemaker/tests/expected_pythonmaker_stubs/test/codemaker/codemakertests/services/import.pyi similarity index 100% rename from codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/services/import.pyi rename to codemaker/tests/expected_pythonmaker_stubs/test/codemaker/codemakertests/services/import.pyi diff --git a/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/services/instanceof.pyi b/codemaker/tests/expected_pythonmaker_stubs/test/codemaker/codemakertests/services/instanceof.pyi similarity index 100% rename from codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/services/instanceof.pyi rename to codemaker/tests/expected_pythonmaker_stubs/test/codemaker/codemakertests/services/instanceof.pyi diff --git a/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/services/int.pyi b/codemaker/tests/expected_pythonmaker_stubs/test/codemaker/codemakertests/services/int.pyi similarity index 100% rename from codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/services/int.pyi rename to codemaker/tests/expected_pythonmaker_stubs/test/codemaker/codemakertests/services/int.pyi diff --git a/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/services/native.pyi b/codemaker/tests/expected_pythonmaker_stubs/test/codemaker/codemakertests/services/native.pyi similarity index 100% rename from codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/services/native.pyi rename to codemaker/tests/expected_pythonmaker_stubs/test/codemaker/codemakertests/services/native.pyi diff --git a/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/services/new.pyi b/codemaker/tests/expected_pythonmaker_stubs/test/codemaker/codemakertests/services/new.pyi similarity index 100% rename from codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/services/new.pyi rename to codemaker/tests/expected_pythonmaker_stubs/test/codemaker/codemakertests/services/new.pyi diff --git a/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/services/package.pyi b/codemaker/tests/expected_pythonmaker_stubs/test/codemaker/codemakertests/services/package.pyi similarity index 100% rename from codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/services/package.pyi rename to codemaker/tests/expected_pythonmaker_stubs/test/codemaker/codemakertests/services/package.pyi diff --git a/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/services/private.pyi b/codemaker/tests/expected_pythonmaker_stubs/test/codemaker/codemakertests/services/private.pyi similarity index 100% rename from codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/services/private.pyi rename to codemaker/tests/expected_pythonmaker_stubs/test/codemaker/codemakertests/services/private.pyi diff --git a/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/services/protected.pyi b/codemaker/tests/expected_pythonmaker_stubs/test/codemaker/codemakertests/services/protected.pyi similarity index 100% rename from codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/services/protected.pyi rename to codemaker/tests/expected_pythonmaker_stubs/test/codemaker/codemakertests/services/protected.pyi diff --git a/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/services/public.pyi b/codemaker/tests/expected_pythonmaker_stubs/test/codemaker/codemakertests/services/public.pyi similarity index 100% rename from codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/services/public.pyi rename to codemaker/tests/expected_pythonmaker_stubs/test/codemaker/codemakertests/services/public.pyi diff --git a/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/services/return.pyi b/codemaker/tests/expected_pythonmaker_stubs/test/codemaker/codemakertests/services/return.pyi similarity index 100% rename from codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/services/return.pyi rename to codemaker/tests/expected_pythonmaker_stubs/test/codemaker/codemakertests/services/return.pyi diff --git a/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/services/static.pyi b/codemaker/tests/expected_pythonmaker_stubs/test/codemaker/codemakertests/services/static.pyi similarity index 100% rename from codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/services/static.pyi rename to codemaker/tests/expected_pythonmaker_stubs/test/codemaker/codemakertests/services/static.pyi diff --git a/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/services/strictfp.pyi b/codemaker/tests/expected_pythonmaker_stubs/test/codemaker/codemakertests/services/strictfp.pyi similarity index 100% rename from codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/services/strictfp.pyi rename to codemaker/tests/expected_pythonmaker_stubs/test/codemaker/codemakertests/services/strictfp.pyi diff --git a/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/services/super.pyi b/codemaker/tests/expected_pythonmaker_stubs/test/codemaker/codemakertests/services/super.pyi similarity index 100% rename from codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/services/super.pyi rename to codemaker/tests/expected_pythonmaker_stubs/test/codemaker/codemakertests/services/super.pyi diff --git a/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/services/synchronized.pyi b/codemaker/tests/expected_pythonmaker_stubs/test/codemaker/codemakertests/services/synchronized.pyi similarity index 100% rename from codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/services/synchronized.pyi rename to codemaker/tests/expected_pythonmaker_stubs/test/codemaker/codemakertests/services/synchronized.pyi diff --git a/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/services/this.pyi b/codemaker/tests/expected_pythonmaker_stubs/test/codemaker/codemakertests/services/this.pyi similarity index 100% rename from codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/services/this.pyi rename to codemaker/tests/expected_pythonmaker_stubs/test/codemaker/codemakertests/services/this.pyi diff --git a/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/services/throw.pyi b/codemaker/tests/expected_pythonmaker_stubs/test/codemaker/codemakertests/services/throw.pyi similarity index 100% rename from codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/services/throw.pyi rename to codemaker/tests/expected_pythonmaker_stubs/test/codemaker/codemakertests/services/throw.pyi diff --git a/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/services/throws.pyi b/codemaker/tests/expected_pythonmaker_stubs/test/codemaker/codemakertests/services/throws.pyi similarity index 100% rename from codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/services/throws.pyi rename to codemaker/tests/expected_pythonmaker_stubs/test/codemaker/codemakertests/services/throws.pyi diff --git a/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/services/try.pyi b/codemaker/tests/expected_pythonmaker_stubs/test/codemaker/codemakertests/services/try.pyi similarity index 100% rename from codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/services/try.pyi rename to codemaker/tests/expected_pythonmaker_stubs/test/codemaker/codemakertests/services/try.pyi diff --git a/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/services/volatile.pyi b/codemaker/tests/expected_pythonmaker_stubs/test/codemaker/codemakertests/services/volatile.pyi similarity index 100% rename from codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/services/volatile.pyi rename to codemaker/tests/expected_pythonmaker_stubs/test/codemaker/codemakertests/services/volatile.pyi diff --git a/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/services/while.pyi b/codemaker/tests/expected_pythonmaker_stubs/test/codemaker/codemakertests/services/while.pyi similarity index 100% rename from codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/services/while.pyi rename to codemaker/tests/expected_pythonmaker_stubs/test/codemaker/codemakertests/services/while.pyi diff --git a/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/static.pyi b/codemaker/tests/expected_pythonmaker_stubs/test/codemaker/codemakertests/static.pyi similarity index 100% rename from codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/static.pyi rename to codemaker/tests/expected_pythonmaker_stubs/test/codemaker/codemakertests/static.pyi diff --git a/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/strictfp.pyi b/codemaker/tests/expected_pythonmaker_stubs/test/codemaker/codemakertests/strictfp.pyi similarity index 100% rename from codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/strictfp.pyi rename to codemaker/tests/expected_pythonmaker_stubs/test/codemaker/codemakertests/strictfp.pyi diff --git a/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/super.pyi b/codemaker/tests/expected_pythonmaker_stubs/test/codemaker/codemakertests/super.pyi similarity index 100% rename from codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/super.pyi rename to codemaker/tests/expected_pythonmaker_stubs/test/codemaker/codemakertests/super.pyi diff --git a/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/synchronized.pyi b/codemaker/tests/expected_pythonmaker_stubs/test/codemaker/codemakertests/synchronized.pyi similarity index 100% rename from codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/synchronized.pyi rename to codemaker/tests/expected_pythonmaker_stubs/test/codemaker/codemakertests/synchronized.pyi diff --git a/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/this.pyi b/codemaker/tests/expected_pythonmaker_stubs/test/codemaker/codemakertests/this.pyi similarity index 100% rename from codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/this.pyi rename to codemaker/tests/expected_pythonmaker_stubs/test/codemaker/codemakertests/this.pyi diff --git a/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/throw.pyi b/codemaker/tests/expected_pythonmaker_stubs/test/codemaker/codemakertests/throw.pyi similarity index 100% rename from codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/throw.pyi rename to codemaker/tests/expected_pythonmaker_stubs/test/codemaker/codemakertests/throw.pyi diff --git a/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/throws.pyi b/codemaker/tests/expected_pythonmaker_stubs/test/codemaker/codemakertests/throws.pyi similarity index 100% rename from codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/throws.pyi rename to codemaker/tests/expected_pythonmaker_stubs/test/codemaker/codemakertests/throws.pyi diff --git a/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/try.pyi b/codemaker/tests/expected_pythonmaker_stubs/test/codemaker/codemakertests/try.pyi similarity index 100% rename from codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/try.pyi rename to codemaker/tests/expected_pythonmaker_stubs/test/codemaker/codemakertests/try.pyi diff --git a/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/volatile.pyi b/codemaker/tests/expected_pythonmaker_stubs/test/codemaker/codemakertests/volatile.pyi similarity index 100% rename from codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/volatile.pyi rename to codemaker/tests/expected_pythonmaker_stubs/test/codemaker/codemakertests/volatile.pyi diff --git a/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/while.pyi b/codemaker/tests/expected_pythonmaker_stubs/test/codemaker/codemakertests/while.pyi similarity index 100% rename from codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/while.pyi rename to codemaker/tests/expected_pythonmaker_stubs/test/codemaker/codemakertests/while.pyi diff --git a/codemaker/tests/pythonmaker/README.md b/codemaker/tests/pythonmaker/README.md deleted file mode 100644 index 19ba0b183ac3..000000000000 --- a/codemaker/tests/pythonmaker/README.md +++ /dev/null @@ -1,71 +0,0 @@ -# Pythonmaker Test Suite - -This directory contains the integration test suite for the `pythonmaker` tool. The purpose of this suite is to ensure that `pythonmaker` correctly generates Python stub files (`.pyi`) from UNO IDL definitions. It verifies the syntactic correctness of the output and protects against future regressions. - -The test is automatically executed as part of the `make check` command for the `codemaker` module. - -## Testing Philosophy - -The test suite follows a "Golden File" testing methodology. This is a standard and robust approach for testing compilers and code generators. The process is as follows: - -1. **Source IDL:** A comprehensive test IDL file (`idl/pythontypes.idl`) serves as the single source of truth for all UNO constructs that `pythonmaker` is expected to handle. -2. **Generate Output:** During the test run, this IDL is compiled into an `.rdb` file, and `pythonmaker` is executed to generate a complete set of `.pyi` stubs in a temporary directory. -3. **Compare Against "Golden" Files:** The newly generated stubs are recursively compared against a set of manually verified, correct "golden" stub files located in the `expected_pyi_stubs/` directory. -4. **Pass/Fail:** The test passes only if the generated output is an exact match to the golden files. Any difference—missing files, extra files, or content mismatches—will cause the test to fail. - -This approach ensures that any change to `pythonmaker` that alters its output is immediately detected. - -## Directory Structure - -- `idl/pythontypes.idl`: The master IDL file containing all test cases. This includes enums, constants, typedefs, structs (plain, inherited, and polymorphic), exceptions, interfaces, services, and singletons. It also includes edge cases like the use of keywords as identifiers. -- `expected_pyi_stubs/`: Contains the "golden" `.pyi` file structure that `pythonmaker` is expected to generate from `pythontypes.idl`. This is the reference standard for correctness. -- `test_pythonmaker.py`: The Python script that orchestrates the entire test. It is executed by the build system and is responsible for compiling the IDL, running `pythonmaker`, and performing the directory comparison. -- `makefile.mk`: The gbuild makefile that integrates the Python test script into the LibreOffice `make check` process. - ---- - -## How to Modify or Extend the Test Suite - -Future developers may need to modify these tests when fixing a bug or adding a new feature to `pythonmaker`. Here is the standard workflow. - -### Scenario 1: Fixing a Bug in `pythonmaker` - -If you have fixed a bug that was causing `pythonmaker` to generate incorrect `.pyi` files, the test suite should now fail because the new, correct output will not match the old, incorrect golden files. - -**To update the tests:** - -1. **Verify the Fix:** After fixing the C++ code in `pythonmaker`, run the test to confirm that it fails as expected. The `diff` error will show you the difference between the new output and the old golden files. -2. **Regenerate the Golden Files:** - a. First, delete the old golden files to ensure a clean slate. - ```bash - rm -rf codemaker/tests/pythonmaker/expected_pyi_stubs/* - ``` - b. Run your updated `pythonmaker` manually to generate the new, correct stubs into a temporary directory. You can find the exact command to run from the test script's log output during a `make check` run. A typical command would be: - ```bash - # Run from .../libreoffice/instdir/program/ - ./pathToPythonmaker.exe -O /path/to/new_golden_output /path/to/test.rdb - ``` -3. **Replace the Golden Files:** Copy the entire generated output into the `expected_pyi_stubs/` directory. - ```bash - cp -r /path/to/new_golden_output/* codemaker/tests/pythonmaker/expected_pyi_stubs/ - ``` -4. **Validate:** Run `mypy --strict codemaker/tests/pythonmaker/expected_pyi_stubs/` to ensure the new golden files are syntactically correct and type-safe. -5. **Commit:** Commit the changes to `pythonmaker`'s C++ code **along with** the updated golden files in your patch. The commit message should explain that the golden files were updated to reflect the bug fix. - -### Scenario 2: Adding a New Feature to `pythonmaker` - -If you add support for a new IDL feature (e.g., a new type or an annotation), you should add a test case for it. - -1. **Add a Test Case to the IDL:** - * Open `codemaker/tests/pythonmaker/idl/pythontypes.idl`. - * Add a new, simple example of the feature you've implemented. For example, add a new `interface` with a specific attribute you are now supporting. -2. **Generate and Verify the New Golden File:** - * Since you've added a new type, a new `.pyi` file will be generated. Run `pythonmaker` manually as described above. - * Locate the newly generated `.pyi` file for your new test case. - * **Manually inspect this new file** to ensure it is 100% correct. - * Run `mypy --strict` on this individual file. - * Once verified, place this new golden file in the correct subdirectory within `expected_pyi_stubs/`. -3. **Run the Full Test Suite:** Run `make check` for the module. The test should now pass, as the newly generated output will match your newly added golden file. -4. **Commit:** Commit the changes to `pythonmaker`'s C++ code, the updated `pythontypes.idl`, and the new golden `.pyi` file(s) together in your patch. - -By following this workflow, the test suite remains a reliable and comprehensive measure of `pythonmaker`'s correctness. diff --git a/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/Enum.pyi b/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/Enum.pyi deleted file mode 100644 index d2c2bc3bb3a5..000000000000 --- a/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/Enum.pyi +++ /dev/null @@ -1,6 +0,0 @@ -# Auto-generated by pythonmaker - DO NOT EDIT. -from __future__ import annotations - -from test.codemaker.pythonmaker.Enum2 import Enum2 as test_codemaker_pythonmaker_Enum2_ - -Enum = test_codemaker_pythonmaker_Enum2_ diff --git a/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/S1.pyi b/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/S1.pyi deleted file mode 100644 index 275d4be7f698..000000000000 --- a/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/S1.pyi +++ /dev/null @@ -1,52 +0,0 @@ -# Auto-generated by pythonmaker - DO NOT EDIT. -from __future__ import annotations - -from com.sun.star.lang.ClassNotFoundException import ClassNotFoundException as com_sun_star_lang_ClassNotFoundException_ -from com.sun.star.lang.IllegalAccessException import IllegalAccessException as com_sun_star_lang_IllegalAccessException_ -from com.sun.star.uno.DeploymentException import DeploymentException as com_sun_star_uno_DeploymentException_ -from com.sun.star.uno.Exception import Exception as com_sun_star_uno_Exception_ -from com.sun.star.uno.RuntimeException import RuntimeException as com_sun_star_uno_RuntimeException_ -from com.sun.star.uno.XComponentContext import XComponentContext as com_sun_star_uno_XComponentContext_ -from com.sun.star.uno.XInterface import XInterface as com_sun_star_uno_XInterface_ -from com.sun.star.uno.XNamingService import XNamingService as com_sun_star_uno_XNamingService_ -from test.codemaker.pythonmaker.Enum2 import Enum2 as test_codemaker_pythonmaker_Enum2_ -from test.codemaker.pythonmaker.Struct1 import Struct1 as test_codemaker_pythonmaker_Struct1_ -from test.codemaker.pythonmaker.XTest import XTest as test_codemaker_pythonmaker_XTest_ -from typing import Any -from typing import List -from typing import Type - -class S1: - @staticmethod - def create1(ctx: com_sun_star_uno_XComponentContext_) -> test_codemaker_pythonmaker_XTest_: - ... - - @staticmethod - def create2(ctx: com_sun_star_uno_XComponentContext_, *args: Any) -> test_codemaker_pythonmaker_XTest_: - """Raises: - com_sun_star_uno_RuntimeException_ - com_sun_star_lang_ClassNotFoundException_ - com_sun_star_uno_Exception_ - com_sun_star_lang_IllegalAccessException_ - com_sun_star_uno_DeploymentException_ - """ - ... - - @staticmethod - def create3(ctx: com_sun_star_uno_XComponentContext_, S1: List[Any]) -> test_codemaker_pythonmaker_XTest_: - """Raises: - com_sun_star_uno_RuntimeException_ - com_sun_star_lang_ClassNotFoundException_ - com_sun_star_lang_IllegalAccessException_ - com_sun_star_uno_DeploymentException_ - """ - ... - - @staticmethod - def create4(ctx: com_sun_star_uno_XComponentContext_, javamaker: int, S1: int, create4: int) -> test_codemaker_pythonmaker_XTest_: - ... - - @staticmethod - def create5(ctx: com_sun_star_uno_XComponentContext_, p1: bool, p2: int, p3: int, p4: int, p5: int, p6: int, p7: int, p8: int, p9: float, p10: float, p11: str, p12: str, p13: Type[Any], p14: Any, p15: test_codemaker_pythonmaker_Enum2_, p16: test_codemaker_pythonmaker_Struct1_, p17: com_sun_star_uno_XInterface_, p18: com_sun_star_uno_XNamingService_, t1: bool, t2: int, t3: int, t4: int, t5: int, t6: int, t7: int, t8: int, t9: float, t10: float, t11: str, t12: str, t13: Type[Any], t14: Any, t15: test_codemaker_pythonmaker_Enum2_, t16: test_codemaker_pythonmaker_Struct1_, t17: com_sun_star_uno_XInterface_, t18: com_sun_star_uno_XNamingService_, a1: List[bool], a2: List[int], a3: List[int], a4: List[int], a5: List[int], a6: List[int], a7: List[int], a8: List[int], a9: List[float], a10: List[float], a11: List[str], a12: List[str], a13: List[Type[Any]], a14: List[Any], a15: List[test_codemaker_pythonmaker_Enum2_], a16: List[test_codemaker_pythonmaker_Struct1_], a17: List[com_sun_star_uno_XInterface_], a18: List[com_sun_star_uno_XNamingService_], aa1: List[List[bool]], aa2: List[List[int]], aa3: List[List[int]], aa4: List[List[int]], aa5: List[List[int]], aa6: List[List[int]], aa7: List[List[int]], aa8: List[List[int]], aa9: List[List[float]], aa10: List[List[float]], aa11: List[List[str]], aa12: List[List[str]], aa13: List[List[Type[Any]]], aa14: List[List[Any]], aa15: List[List[test_codemaker_pythonmaker_Enum2_]], aa16: List[List[test_codemaker_pythonmaker_Struct1_]], aa17: List[List[com_sun_star_uno_XInterface_]], aa18: List[List[com_sun_star_uno_XNamingService_]], at1: List[List[bool]], at2: List[List[int]], at3: List[List[int]], at4: List[List[int]], at5: List[List[int]], at6: List[List[int]], at7: List[List[int]], at8: List[List[int]], at9: List[List[float]], at10: List[List[float]], at11: List[List[str]], at12: List[List[str]], at13: List[List[Type[Any]]], at14: List[List[Any]], at15: List[List[test_codemaker_pythonmaker_Enum2_]], at16: List[List[test_codemaker_pythonmaker_Struct1_]], at17: List[List[com_sun_star_uno_XInterface_]], at18: List[List[com_sun_star_uno_XNamingService_]]) -> test_codemaker_pythonmaker_XTest_: - ... - diff --git a/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/SequenceEnum.pyi b/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/SequenceEnum.pyi deleted file mode 100644 index c0eae23cc497..000000000000 --- a/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/SequenceEnum.pyi +++ /dev/null @@ -1,7 +0,0 @@ -# Auto-generated by pythonmaker - DO NOT EDIT. -from __future__ import annotations - -from test.codemaker.pythonmaker.Enum2 import Enum2 as test_codemaker_pythonmaker_Enum2_ -from typing import List - -SequenceEnum = List[test_codemaker_pythonmaker_Enum2_] diff --git a/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/SequenceStruct.pyi b/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/SequenceStruct.pyi deleted file mode 100644 index d607af826208..000000000000 --- a/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/SequenceStruct.pyi +++ /dev/null @@ -1,7 +0,0 @@ -# Auto-generated by pythonmaker - DO NOT EDIT. -from __future__ import annotations - -from test.codemaker.pythonmaker.Struct1 import Struct1 as test_codemaker_pythonmaker_Struct1_ -from typing import List - -SequenceStruct = List[test_codemaker_pythonmaker_Struct1_] diff --git a/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/Struct.pyi b/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/Struct.pyi deleted file mode 100644 index e9127de5dbeb..000000000000 --- a/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/Struct.pyi +++ /dev/null @@ -1,6 +0,0 @@ -# Auto-generated by pythonmaker - DO NOT EDIT. -from __future__ import annotations - -from test.codemaker.pythonmaker.Struct1 import Struct1 as test_codemaker_pythonmaker_Struct1_ - -Struct = test_codemaker_pythonmaker_Struct1_ diff --git a/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/Struct2.pyi b/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/Struct2.pyi deleted file mode 100644 index 7136529440d3..000000000000 --- a/codemaker/tests/pythonmaker/expected_pyi_stubs/test/codemaker/pythonmaker/Struct2.pyi +++ /dev/null @@ -1,105 +0,0 @@ -# Auto-generated by pythonmaker - DO NOT EDIT. -from __future__ import annotations - -from com.sun.star.uno.XInterface import XInterface as com_sun_star_uno_XInterface_ -from com.sun.star.uno.XNamingService import XNamingService as com_sun_star_uno_XNamingService_ -from test.codemaker.pythonmaker.Enum2 import Enum2 as test_codemaker_pythonmaker_Enum2_ -from test.codemaker.pythonmaker.Struct1 import Struct1 as test_codemaker_pythonmaker_Struct1_ -from typing import Any -from typing import List -from typing import Type - -class Struct2(object): - def __init__(self, p1: bool | None = ..., p2: int | None = ..., p3: int | None = ..., p4: int | None = ..., p5: int | None = ..., p6: int | None = ..., p7: int | None = ..., p8: int | None = ..., p9: float | None = ..., p10: float | None = ..., p11: str | None = ..., p12: str | None = ..., p13: Type[Any] | None = ..., p14: Any | None = ..., p15: test_codemaker_pythonmaker_Enum2_ | None = ..., p16: test_codemaker_pythonmaker_Struct1_ | None = ..., p17: com_sun_star_uno_XInterface_ | None = ..., p18: com_sun_star_uno_XNamingService_ | None = ..., t1: bool | None = ..., t2: int | None = ..., t3: int | None = ..., t4: int | None = ..., t5: int | None = ..., t6: int | None = ..., t7: int | None = ..., t8: int | None = ..., t9: float | None = ..., t10: float | None = ..., t11: str | None = ..., t12: str | None = ..., t13: Type[Any] | None = ..., t14: Any | None = ..., t15: test_codemaker_pythonmaker_Enum2_ | None = ..., t16: test_codemaker_pythonmaker_Struct1_ | None = ..., t17: com_sun_star_uno_XInterface_ | None = ..., t18: com_sun_star_uno_XNamingService_ | None = ..., a1: List[bool] | None = ..., a2: List[int] | None = ..., a3: List[int] | None = ..., a4: List[int] | None = ..., a5: List[int] | None = ..., a6: List[int] | None = ..., a7: List[int] | None = ..., a8: List[int] | None = ..., a9: List[float] | None = ..., a10: List[float] | None = ..., a11: List[str] | None = ..., a12: List[str] | None = ..., a13: List[Type[Any]] | None = ..., a14: List[Any] | None = ..., a15: List[test_codemaker_pythonmaker_Enum2_] | None = ..., a16: List[test_codemaker_pythonmaker_Struct1_] | None = ..., a17: List[com_sun_star_uno_XInterface_] | None = ..., a18: List[com_sun_star_uno_XNamingService_] | None = ..., aa1: List[List[bool]] | None = ..., aa2: List[List[int]] | None = ..., aa3: List[List[int]] | None = ..., aa4: List[List[int]] | None = ..., aa5: List[List[int]] | None = ..., aa6: List[List[int]] | None = ..., aa7: List[List[int]] | None = ..., aa8: List[List[int]] | None = ..., aa9: List[List[float]] | None = ..., aa10: List[List[float]] | None = ..., aa11: List[List[str]] | None = ..., aa12: List[List[str]] | None = ..., aa13: List[List[Type[Any]]] | None = ..., aa14: List[List[Any]] | None = ..., aa15: List[List[test_codemaker_pythonmaker_Enum2_]] | None = ..., aa16: List[List[test_codemaker_pythonmaker_Struct1_]] | None = ..., aa17: List[List[com_sun_star_uno_XInterface_]] | None = ..., aa18: List[List[com_sun_star_uno_XNamingService_]] | None = ..., at1: List[List[bool]] | None = ..., at2: List[List[int]] | None = ..., at3: List[List[int]] | None = ..., at4: List[List[int]] | None = ..., at5: List[List[int]] | None = ..., at6: List[List[int]] | None = ..., at7: List[List[int]] | None = ..., at8: List[List[int]] | None = ..., at9: List[List[float]] | None = ..., at10: List[List[float]] | None = ..., at11: List[List[str]] | None = ..., at12: List[List[str]] | None = ..., at13: List[List[Type[Any]]] | None = ..., at14: List[List[Any]] | None = ..., at15: List[List[test_codemaker_pythonmaker_Enum2_]] | None = ..., at16: List[List[test_codemaker_pythonmaker_Struct1_]] | None = ..., at17: List[List[com_sun_star_uno_XInterface_]] | None = ..., at18: List[List[com_sun_star_uno_XNamingService_]] | None = ...) -> None: - ... - - p1: bool - p2: int - p3: int - p4: int - p5: int - p6: int - p7: int - p8: int - p9: float - p10: float - p11: str - p12: str - p13: Type[Any] - p14: Any - p15: test_codemaker_pythonmaker_Enum2_ - p16: test_codemaker_pythonmaker_Struct1_ - p17: com_sun_star_uno_XInterface_ - p18: com_sun_star_uno_XNamingService_ - t1: bool - t2: int - t3: int - t4: int - t5: int - t6: int - t7: int - t8: int - t9: float - t10: float - t11: str - t12: str - t13: Type[Any] - t14: Any - t15: test_codemaker_pythonmaker_Enum2_ - t16: test_codemaker_pythonmaker_Struct1_ - t17: com_sun_star_uno_XInterface_ - t18: com_sun_star_uno_XNamingService_ - a1: List[bool] - a2: List[int] - a3: List[int] - a4: List[int] - a5: List[int] - a6: List[int] - a7: List[int] - a8: List[int] - a9: List[float] - a10: List[float] - a11: List[str] - a12: List[str] - a13: List[Type[Any]] - a14: List[Any] - a15: List[test_codemaker_pythonmaker_Enum2_] - a16: List[test_codemaker_pythonmaker_Struct1_] - a17: List[com_sun_star_uno_XInterface_] - a18: List[com_sun_star_uno_XNamingService_] - aa1: List[List[bool]] - aa2: List[List[int]] - aa3: List[List[int]] - aa4: List[List[int]] - aa5: List[List[int]] - aa6: List[List[int]] - aa7: List[List[int]] - aa8: List[List[int]] - aa9: List[List[float]] - aa10: List[List[float]] - aa11: List[List[str]] - aa12: List[List[str]] - aa13: List[List[Type[Any]]] - aa14: List[List[Any]] - aa15: List[List[test_codemaker_pythonmaker_Enum2_]] - aa16: List[List[test_codemaker_pythonmaker_Struct1_]] - aa17: List[List[com_sun_star_uno_XInterface_]] - aa18: List[List[com_sun_star_uno_XNamingService_]] - at1: List[List[bool]] - at2: List[List[int]] - at3: List[List[int]] - at4: List[List[int]] - at5: List[List[int]] - at6: List[List[int]] - at7: List[List[int]] - at8: List[List[int]] - at9: List[List[float]] - at10: List[List[float]] - at11: List[List[str]] - at12: List[List[str]] - at13: List[List[Type[Any]]] - at14: List[List[Any]] - at15: List[List[test_codemaker_pythonmaker_Enum2_]] - at16: List[List[test_codemaker_pythonmaker_Struct1_]] - at17: List[List[com_sun_star_uno_XInterface_]] - at18: List[List[com_sun_star_uno_XNamingService_]] diff --git a/codemaker/tests/pythonmaker/test_pythonmaker.py b/codemaker/tests/pythonmaker/test_pythonmaker.py deleted file mode 100644 index e455cef2d224..000000000000 --- a/codemaker/tests/pythonmaker/test_pythonmaker.py +++ /dev/null @@ -1,246 +0,0 @@ -#! /usr/bin/env python -# -*- 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/. -# - -import unittest -import os -import subprocess -import shutil -import filecmp -import glob -import sys - -from typing import Optional, List, Set - - -class TestPythonMaker(unittest.TestCase): - """Test pythonmaker tool by comparing generated stubs with expected files""" - - def setUp(self) -> None: - # Build environment - self.srcdir: str = os.environ.get("SRCDIR", os.getcwd()) - self.builddir: str = os.environ.get("BUILDDIR", os.getcwd()) - self.instdir: str = os.environ.get( - "INSTDIR", os.path.join(self.builddir, "instdir") - ) - self.workdir: str = os.environ.get( - "WORKDIR", os.path.join(self.builddir, "workdir") - ) - - # SDK tools - self.unoidl_write: Optional[str] = None - self.pythonmaker: Optional[str] = None - - sdk_patterns: List[str] = [ - os.path.join(self.instdir, "sdk", "bin"), - os.path.join(self.instdir, "LibreOffice*_SDK", "bin"), - ] - - exe_suffix: str = ".exe" if os.name == "nt" else "" - - for pattern in sdk_patterns: - for sdk_dir in glob.glob(pattern): - unoidl_path = os.path.join(sdk_dir, "unoidl-write" + exe_suffix) - pythonmaker_path = os.path.join(sdk_dir, "pythonmaker" + exe_suffix) - - if os.path.exists(unoidl_path) and os.path.exists(pythonmaker_path): - self.unoidl_write = unoidl_path - self.pythonmaker = pythonmaker_path - break - - if self.unoidl_write and self.pythonmaker: - break - - # Program directory - self.program_dir: Optional[str] - - if sys.platform == "darwin": - self.program_dir = None - app_patterns: List[str] = [ - os.path.join( - self.instdir, - "LibreOfficeDev.app", - "Contents", - "Resources", - ), - os.path.join( - self.instdir, - "LibreOffice.app", - "Contents", - "Resources", - ), - ] - for pattern in app_patterns: - if os.path.exists(pattern): - self.program_dir = pattern - break - else: - self.program_dir = os.path.join(self.instdir, "program") - - # Test paths - self.golden_dir: str = os.path.join( - self.srcdir, - "codemaker", - "tests", - "pythonmaker", - "expected_pyi_stubs", - ) - - self.idl_file: str = os.path.join( - self.srcdir, - "codemaker", - "tests", - "pythonmaker", - "idl", - "pythontypes.idl", - ) - - self.test_workdir: str = os.path.join(self.workdir, "pythonmaker_test") - os.makedirs(self.test_workdir, exist_ok=True) - - self.types_rdb: str = os.path.join( - self.workdir, "UnoApiTarget", "udkapi.rdb" - ) - - self.temp_rdb: str = os.path.join(self.test_workdir, "temptest.rdb") - self.output_dir: str = os.path.join(self.test_workdir, "generated_stubs") - - def tearDown(self) -> None: - if os.path.exists(self.test_workdir): - shutil.rmtree(self.test_workdir, ignore_errors=True) - - def test_pythonmaker_golden_comparison(self) -> None: - self.assertIsNotNone(self.unoidl_write) - self.assertIsNotNone(self.pythonmaker) - self.assertIsNotNone(self.program_dir) - - assert self.unoidl_write is not None - assert self.pythonmaker is not None - - self.assertTrue(os.path.exists(self.unoidl_write)) - self.assertTrue(os.path.exists(self.pythonmaker)) - self.assertTrue(os.path.exists(self.types_rdb)) - - self._convert_idl_to_rdb() - self._generate_python_stubs() - self._compare_with_expected_files() - - def _convert_idl_to_rdb(self) -> None: - assert self.unoidl_write is not None - - cmd: List[str] = [ - self.unoidl_write, - self.types_rdb, - self.idl_file, - self.temp_rdb, - ] - - try: - subprocess.run( - cmd, - cwd=self.test_workdir, - capture_output=True, - text=True, - check=True, - ) - self.assertTrue(os.path.exists(self.temp_rdb)) - except subprocess.CalledProcessError as e: - self.fail( - "Failed to convert IDL to RDB:\n" - + (e.stderr or "") - + "\nCommand: " - + " ".join(cmd) - ) - - def _generate_python_stubs(self) -> None: - assert self.pythonmaker is not None - - os.makedirs(self.output_dir, exist_ok=True) - - cmd: List[str] = [ - self.pythonmaker, - "-O", - self.output_dir, - self.temp_rdb, - "-X", - self.types_rdb, - ] - - try: - subprocess.run( - cmd, - cwd=self.test_workdir, - capture_output=True, - text=True, - check=True, - ) - - generated_files: List[str] = [] - for _, _, files in os.walk(self.output_dir): - for name in files: - if not name.lower().endswith(".tmp"): - generated_files.append(name) - - self.assertGreater(len(generated_files), 0) - - except subprocess.CalledProcessError as e: - self.fail( - "Failed to generate Python stubs:\n" - + (e.stderr or "") - + "\nCommand: " - + " ".join(cmd) - ) - - def _compare_with_expected_files(self) -> None: - if not os.path.exists(self.golden_dir): - self.fail("Expected directory does not exist: " + self.golden_dir) - - expected_files: List[str] = [] - for root, _, files in os.walk(self.golden_dir): - for name in files: - expected_files.append( - os.path.relpath(os.path.join(root, name), self.golden_dir) - ) - - generated_files: List[str] = [] - for root, _, files in os.walk(self.output_dir): - for name in files: - if not name.lower().endswith(".tmp"): - generated_files.append( - os.path.relpath(os.path.join(root, name), self.output_dir) - ) - - expected_set: Set[str] = set(expected_files) - generated_set: Set[str] = set(generated_files) - - missing = expected_set - generated_set - extra = generated_set - expected_set - - if missing: - self.fail("Missing generated files: " + str(missing)) - if extra: - self.fail("Unexpected generated files: " + str(extra)) - - differences: List[str] = [] - for rel_path in expected_files: - if not filecmp.cmp( - os.path.join(self.golden_dir, rel_path), - os.path.join(self.output_dir, rel_path), - shallow=False, - ): - differences.append(rel_path) - - if differences: - self.fail("File content differences found in: " + str(differences)) - - -if __name__ == "__main__": - unittest.main() - -# vim: set shiftwidth=4 softtabstop=4 expandtab: \ No newline at end of file diff --git a/codemaker/tests/pythonmaker/idl/pythontypes.idl b/codemaker/tests/tests.idl similarity index 99% rename from codemaker/tests/pythonmaker/idl/pythontypes.idl rename to codemaker/tests/tests.idl index c8215efd1dc8..0994eb3a3d08 100644 --- a/codemaker/tests/pythonmaker/idl/pythontypes.idl +++ b/codemaker/tests/tests.idl @@ -1,9 +1,8 @@ - module test { module codemaker { - module pythonmaker + module codemakertests { // --- ENUMS --- // Simple enum with negative and positive values @@ -230,7 +229,7 @@ module test get raises(com::sun::star::uno::DeploymentException); }; }; - service S1 : test::codemaker::pythonmaker::XTest + service S1 : test::codemaker::codemakertests::XTest { create1(); create2([in] any... create2) raises(com::sun::star::uno::RuntimeException, @@ -452,4 +451,4 @@ module test //TODO: singleton void: com::sun::star::uno::XNamingService; singleton volatile : com::sun::star::uno::XNamingService; singleton while : com::sun::star::uno::XNamingService; - };};}; \ No newline at end of file + };};}; From b97af65b5d7fe9dcb86604c4de9b14f920bea3ae Mon Sep 17 00:00:00 2001 From: Michael Weghorn Date: Fri, 2 Oct 2026 14:07:07 +0200 Subject: [PATCH 139/289] svx: Switch GalleryIconView::mpParent to reference ... and rename accordingly. This makes clear it's always non-null. Change-Id: I95774bd2e4b6e830f6550f0277217489848be068 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211740 Tested-by: Jenkins Reviewed-by: Michael Weghorn --- include/svx/galctrl.hxx | 5 ++--- svx/source/gallery2/galbrws1.cxx | 2 +- svx/source/gallery2/galctrl.cxx | 15 ++++++++------- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/include/svx/galctrl.hxx b/include/svx/galctrl.hxx index 955ed8fa987d..899af1fc4e15 100644 --- a/include/svx/galctrl.hxx +++ b/include/svx/galctrl.hxx @@ -91,7 +91,7 @@ class GalleryIconView final : public ValueSet private: std::unique_ptr mxDragDropTargetHelper; - GalleryBrowser* mpParent; + GalleryBrowser& mrParent; GalleryTheme* mpTheme; // ValueSet @@ -105,8 +105,7 @@ private: virtual void SetDrawingArea(weld::DrawingArea* pDrawingArea) override; public: - - GalleryIconView(GalleryBrowser* pParent, std::unique_ptr xScrolledWindow); + GalleryIconView(GalleryBrowser& rParent, std::unique_ptr xScrolledWindow); void SetTheme(GalleryTheme* pTheme) { mpTheme = pTheme; } virtual ~GalleryIconView() override; diff --git a/svx/source/gallery2/galbrws1.cxx b/svx/source/gallery2/galbrws1.cxx index 763bb875a571..53df45b87bda 100644 --- a/svx/source/gallery2/galbrws1.cxx +++ b/svx/source/gallery2/galbrws1.cxx @@ -134,7 +134,7 @@ GalleryBrowser::GalleryBrowser( aImgReadOnly ( RID_SVXBMP_THEME_READONLY ) //maThemeSelectionHandler(std::move(aThemeSelectionHandler)) , mpCurTheme(nullptr) - , mxIconView(new GalleryIconView(this, rBuilder.weld_scrolled_window(u"galleryscroll"_ustr, true))) + , mxIconView(new GalleryIconView(*this, rBuilder.weld_scrolled_window(u"galleryscroll"_ustr, true))) , mxIconViewWin(new weld::CustomWeld(rBuilder, u"gallery"_ustr, *mxIconView)) , mxListView(rBuilder.weld_tree_view(u"gallerylist"_ustr)) , mxPreview(new GalleryPreview(this, rBuilder.weld_scrolled_window(u"previewscroll"_ustr))) diff --git a/svx/source/gallery2/galctrl.cxx b/svx/source/gallery2/galctrl.cxx index 4404e03298fc..453b16ff9a9b 100644 --- a/svx/source/gallery2/galctrl.cxx +++ b/svx/source/gallery2/galctrl.cxx @@ -300,9 +300,10 @@ void GalleryIconView::drawTransparenceBackground(vcl::RenderContext& rOut, const rOut.DrawCheckered(rPos, rSize, nLen, aW, aG); } -GalleryIconView::GalleryIconView(GalleryBrowser* pParent, std::unique_ptr xScrolledWindow) +GalleryIconView::GalleryIconView(GalleryBrowser& rParent, + std::unique_ptr xScrolledWindow) : ValueSet(std::move(xScrolledWindow)) - , mpParent(pParent) + , mrParent(rParent) , mpTheme(nullptr) { } @@ -322,7 +323,7 @@ void GalleryIconView::SetDrawingArea(weld::DrawingArea* pDrawingArea) SetItemWidth( S_THUMB + 6 ); SetItemHeight( S_THUMB + 6 ); - mxDragDropTargetHelper.reset(new GalleryDragDrop(mpParent, pDrawingArea->get_drop_target())); + mxDragDropTargetHelper.reset(new GalleryDragDrop(&mrParent, pDrawingArea->get_drop_target())); } void GalleryIconView::UserDraw(const UserDrawEvent& rUDEvt) @@ -391,7 +392,7 @@ bool GalleryIconView::MouseButtonDown(const MouseEvent& rMEvt) bool bRet = ValueSet::MouseButtonDown(rMEvt); if (rMEvt.GetClicks() == 2) - mpParent->TogglePreview(); + mrParent.TogglePreview(); return bRet; } @@ -402,7 +403,7 @@ bool GalleryIconView::Command(const CommandEvent& rCEvt) if (!bRet && rCEvt.GetCommand() == CommandEventId::ContextMenu) { - bRet = mpParent->ShowContextMenu(rCEvt); + bRet = mrParent.ShowContextMenu(rCEvt); } return bRet; @@ -410,7 +411,7 @@ bool GalleryIconView::Command(const CommandEvent& rCEvt) bool GalleryIconView::KeyInput(const KeyEvent& rKEvt) { - if (!mpTheme || !mpParent->KeyInput(rKEvt)) + if (!mpTheme || !mrParent.KeyInput(rKEvt)) return ValueSet::KeyInput(rKEvt); return true; } @@ -418,7 +419,7 @@ bool GalleryIconView::KeyInput(const KeyEvent& rKEvt) bool GalleryIconView::StartDrag() { Select(); - return mpParent->StartDrag(); + return mrParent.StartDrag(); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ From b52914ff4eb151063fc48e298747925ed661a734 Mon Sep 17 00:00:00 2001 From: Michael Weghorn Date: Fri, 2 Oct 2026 14:13:19 +0200 Subject: [PATCH 140/289] svx: Drop superfluous local var in GalleryPreview::KeyInput Just use GalleryPreview::mpParent directly. Change-Id: I2ea18576496b2fc532b83502bd386579caa55a5d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211741 Reviewed-by: Michael Weghorn Tested-by: Jenkins --- svx/source/gallery2/galctrl.cxx | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/svx/source/gallery2/galctrl.cxx b/svx/source/gallery2/galctrl.cxx index 453b16ff9a9b..66598284de5a 100644 --- a/svx/source/gallery2/galctrl.cxx +++ b/svx/source/gallery2/galctrl.cxx @@ -150,35 +150,33 @@ bool GalleryPreview::KeyInput(const KeyEvent& rKEvt) { if(mpTheme) { - GalleryBrowser* pBrowser = mpParent; - switch( rKEvt.GetKeyCode().GetCode() ) { case KEY_BACKSPACE: - pBrowser->TogglePreview(); + mpParent->TogglePreview(); break; case KEY_HOME: - pBrowser->Travel( GalleryBrowserTravel::First ); + mpParent->Travel(GalleryBrowserTravel::First); break; case KEY_END: - pBrowser->Travel( GalleryBrowserTravel::Last ); + mpParent->Travel(GalleryBrowserTravel::Last); break; case KEY_LEFT: case KEY_UP: - pBrowser->Travel( GalleryBrowserTravel::Previous ); + mpParent->Travel(GalleryBrowserTravel::Previous); break; case KEY_RIGHT: case KEY_DOWN: - pBrowser->Travel( GalleryBrowserTravel::Next ); + mpParent->Travel(GalleryBrowserTravel::Next); break; default: { - if (!pBrowser->KeyInput(rKEvt)) + if (!mpParent->KeyInput(rKEvt)) return false; } break; From 6d9b8d423ad59ff6c1164d06277d1aac842a2c98 Mon Sep 17 00:00:00 2001 From: Michael Weghorn Date: Fri, 2 Oct 2026 14:19:55 +0200 Subject: [PATCH 141/289] svx: Switch GalleryPreview::mpParent to reference ... and rename accordingly. This makes clear it's always non-null. Change-Id: I33b68dcf3f6cff8680249671121efe25333bbd61 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211742 Tested-by: Jenkins Reviewed-by: Michael Weghorn --- include/svx/galctrl.hxx | 5 ++--- svx/source/gallery2/galbrws1.cxx | 2 +- svx/source/gallery2/galctrl.cxx | 25 +++++++++++++------------ 3 files changed, 16 insertions(+), 16 deletions(-) diff --git a/include/svx/galctrl.hxx b/include/svx/galctrl.hxx index 899af1fc4e15..917f6de652ed 100644 --- a/include/svx/galctrl.hxx +++ b/include/svx/galctrl.hxx @@ -40,7 +40,7 @@ private: std::unique_ptr mxScrolledWindow; GraphicObject m_aGraphicObj; tools::Rectangle m_aPreviewRect; - GalleryBrowser* mpParent; + GalleryBrowser& mrParent; GalleryTheme* mpTheme; bool ImplGetGraphicCenterRect( const Graphic& rGraphic, tools::Rectangle& rResultRect ) const; @@ -53,8 +53,7 @@ private: virtual bool KeyInput( const KeyEvent& rKEvt ) override; public: - - GalleryPreview(GalleryBrowser* pParent, std::unique_ptr xScrolledWindow); + GalleryPreview(GalleryBrowser& rParent, std::unique_ptr xScrolledWindow); void SetTheme(GalleryTheme* pTheme) { mpTheme = pTheme; } virtual ~GalleryPreview() override; diff --git a/svx/source/gallery2/galbrws1.cxx b/svx/source/gallery2/galbrws1.cxx index 53df45b87bda..5687032ed23e 100644 --- a/svx/source/gallery2/galbrws1.cxx +++ b/svx/source/gallery2/galbrws1.cxx @@ -137,7 +137,7 @@ GalleryBrowser::GalleryBrowser( , mxIconView(new GalleryIconView(*this, rBuilder.weld_scrolled_window(u"galleryscroll"_ustr, true))) , mxIconViewWin(new weld::CustomWeld(rBuilder, u"gallery"_ustr, *mxIconView)) , mxListView(rBuilder.weld_tree_view(u"gallerylist"_ustr)) - , mxPreview(new GalleryPreview(this, rBuilder.weld_scrolled_window(u"previewscroll"_ustr))) + , mxPreview(new GalleryPreview(*this, rBuilder.weld_scrolled_window(u"previewscroll"_ustr))) , mxPreviewWin(new weld::CustomWeld(rBuilder, u"preview"_ustr, *mxPreview)) , mxIconButton(rBuilder.weld_toggle_button(u"icon"_ustr)) , mxListButton(rBuilder.weld_toggle_button(u"list"_ustr)) diff --git a/svx/source/gallery2/galctrl.cxx b/svx/source/gallery2/galctrl.cxx index 66598284de5a..054c62ffa2ce 100644 --- a/svx/source/gallery2/galctrl.cxx +++ b/svx/source/gallery2/galctrl.cxx @@ -38,9 +38,10 @@ #include #include -GalleryPreview::GalleryPreview(GalleryBrowser* pParent, std::unique_ptr xScrolledWindow) +GalleryPreview::GalleryPreview(GalleryBrowser& rParent, + std::unique_ptr xScrolledWindow) : mxScrolledWindow(std::move(xScrolledWindow)) - , mpParent(pParent) + , mrParent(rParent) , mpTheme(nullptr) { } @@ -68,7 +69,7 @@ void GalleryPreview::SetDrawingArea(weld::DrawingArea* pDrawingArea) pDrawingArea->set_size_request(aSize.Width(), aSize.Height()); SetOutputSizePixel(aSize); - mxDragDropTargetHelper.reset(new GalleryDragDrop(mpParent, pDrawingArea->get_drop_target())); + mxDragDropTargetHelper.reset(new GalleryDragDrop(&mrParent, pDrawingArea->get_drop_target())); } namespace @@ -132,7 +133,7 @@ void GalleryPreview::Paint(vcl::RenderContext& rRenderContext, const tools::Rect bool GalleryPreview::MouseButtonDown(const MouseEvent& rMEvt) { if (mpTheme && (rMEvt.GetClicks() == 2)) - mpParent->TogglePreview(); + mrParent.TogglePreview(); return true; } @@ -140,7 +141,7 @@ bool GalleryPreview::Command(const CommandEvent& rCEvt) { if (mpTheme && (rCEvt.GetCommand() == CommandEventId::ContextMenu)) { - mpParent->ShowContextMenu(rCEvt); + mrParent.ShowContextMenu(rCEvt); return true; } return false; @@ -153,30 +154,30 @@ bool GalleryPreview::KeyInput(const KeyEvent& rKEvt) switch( rKEvt.GetKeyCode().GetCode() ) { case KEY_BACKSPACE: - mpParent->TogglePreview(); + mrParent.TogglePreview(); break; case KEY_HOME: - mpParent->Travel(GalleryBrowserTravel::First); + mrParent.Travel(GalleryBrowserTravel::First); break; case KEY_END: - mpParent->Travel(GalleryBrowserTravel::Last); + mrParent.Travel(GalleryBrowserTravel::Last); break; case KEY_LEFT: case KEY_UP: - mpParent->Travel(GalleryBrowserTravel::Previous); + mrParent.Travel(GalleryBrowserTravel::Previous); break; case KEY_RIGHT: case KEY_DOWN: - mpParent->Travel(GalleryBrowserTravel::Next); + mrParent.Travel(GalleryBrowserTravel::Next); break; default: { - if (!mpParent->KeyInput(rKEvt)) + if (!mrParent.KeyInput(rKEvt)) return false; } break; @@ -190,7 +191,7 @@ bool GalleryPreview::KeyInput(const KeyEvent& rKEvt) bool GalleryPreview::StartDrag() { if (mpTheme) - return mpParent->StartDrag(); + return mrParent.StartDrag(); return true; } From cf80890d16f7ef318155efe5843f99153d199e07 Mon Sep 17 00:00:00 2001 From: Michael Weghorn Date: Fri, 2 Oct 2026 14:26:08 +0200 Subject: [PATCH 142/289] svx: Drop commented code from GalleryBrowser ctor commit 09c6204b6309321aa25c542f918fde9f5f3f7fe2 Date: Thu Feb 29 17:15:23 2024 +0100 tdf#81880 Search the Gallery dropped the `maThemeSelectionHandler` member, but left this code using it, but commented out. Drop it, as it's no longer relevant. Change-Id: I50c8f255a2eb993497aafe20b5bafab18054b682 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211743 Tested-by: Jenkins Reviewed-by: Michael Weghorn --- svx/source/gallery2/galbrws1.cxx | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/svx/source/gallery2/galbrws1.cxx b/svx/source/gallery2/galbrws1.cxx index 5687032ed23e..98adffad8f42 100644 --- a/svx/source/gallery2/galbrws1.cxx +++ b/svx/source/gallery2/galbrws1.cxx @@ -119,12 +119,8 @@ public: } -GalleryBrowser::GalleryBrowser( - weld::Builder& rBuilder, - Gallery* pGallery)//, - //std::function aThemeSelectionHandler) - : - mxNewTheme(rBuilder.weld_button(u"insert"_ustr)), +GalleryBrowser::GalleryBrowser(weld::Builder& rBuilder, Gallery* pGallery) + : mxNewTheme(rBuilder.weld_button(u"insert"_ustr)), mxThemes(rBuilder.weld_tree_view(u"themelist"_ustr)), mxMoreGalleries(rBuilder.weld_button(u"btnMoreGalleries"_ustr)), mpGallery ( pGallery ), @@ -132,7 +128,6 @@ GalleryBrowser::GalleryBrowser( aImgNormal ( RID_SVXBMP_THEME_NORMAL ), aImgDefault ( RID_SVXBMP_THEME_DEFAULT ), aImgReadOnly ( RID_SVXBMP_THEME_READONLY ) - //maThemeSelectionHandler(std::move(aThemeSelectionHandler)) , mpCurTheme(nullptr) , mxIconView(new GalleryIconView(*this, rBuilder.weld_scrolled_window(u"galleryscroll"_ustr, true))) , mxIconViewWin(new weld::CustomWeld(rBuilder, u"gallery"_ustr, *mxIconView)) From 26c7824bd44a9c99eeeef6c6e7f3f2c6026d650c Mon Sep 17 00:00:00 2001 From: Christopher Sherlock Date: Wed, 15 Apr 2026 22:23:27 +1000 Subject: [PATCH 143/289] vcl: rename opaque variables and add comments in lcl_convertLogicValue() The previous variable names (n1, n2, n3, a4) provided no context about the mathematical operations being performed during unit conversion. This commit replaces them with descriptive names (nSourceValue, nMultiplier, nDivisor, aBigValue) to clearly reflect their roles. Additionally, inline comments were added to explain the BigInt fallback path and the manual round-to-nearest integer division logic, making the function significantly easier to read and maintain. Change-Id: I7f83842a486861fc53173b41febfad6f766efbbe Reviewed-on: https://gerrit.libreoffice.org/c/core/+/203682 Reviewed-by: Dan Williams Tested-by: Jenkins --- vcl/source/outdev/map.cxx | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/vcl/source/outdev/map.cxx b/vcl/source/outdev/map.cxx index 9ebba821c0bd..498b979db460 100644 --- a/vcl/source/outdev/map.cxx +++ b/vcl/source/outdev/map.cxx @@ -950,29 +950,33 @@ static std::pair lcl_calcConversionMapRes(const MapMode& return result; } -static tools::Long lcl_convertLogicValue(const tools::Long n1, const o3tl::Length eFrom, const o3tl::Length eTo) +static tools::Long lcl_convertLogicValue(const tools::Long nSourceValue, const o3tl::Length eSourceUnit, const o3tl::Length eDestUnit) { - if (n1 == 0 || eFrom == o3tl::Length::invalid || eTo == o3tl::Length::invalid) + if (nSourceValue == 0 || eSourceUnit == o3tl::Length::invalid || eDestUnit == o3tl::Length::invalid) return 0; bool bOverflow; - const auto nResult = o3tl::convert(n1, eFrom, eTo, bOverflow); + const auto nResult = o3tl::convert(nSourceValue, eSourceUnit, eDestUnit, bOverflow); + // Fast path: conversion succeeded without integer overflow if (!bOverflow) return nResult; - const auto [n2, n3] = o3tl::getConversionMulDiv(eFrom, eTo); - BigInt a4 = n1; - a4 *= n2; + // Fallback: Use BigInt to prevent overflow during intermediate multiplication + const auto [nMultiplier, nDivisor] = o3tl::getConversionMulDiv(eSourceUnit, eDestUnit); + BigInt aBigValue = nSourceValue; + aBigValue *= nMultiplier; - if ( a4.IsNeg() ) - a4 -= n3 / 2; + // Manual rounding: standard integer division truncates towards zero. + // We add or subtract half the divisor before dividing to achieve round-to-nearest. + if (aBigValue.IsNeg()) + aBigValue -= nDivisor / 2; else - a4 += n3 / 2; + aBigValue += nDivisor / 2; - a4 /= n3; + aBigValue /= nDivisor; - return static_cast(a4); + return static_cast(aBigValue); } Point OutputDevice::LogicToLogic( const Point& rPtSource, From 0e696c7ec5f01fe6225df81d5292822c324a4060 Mon Sep 17 00:00:00 2001 From: Michael Weghorn Date: Fri, 2 Oct 2026 09:12:02 +0200 Subject: [PATCH 144/289] svx: Don't use 'p' prefix for non-pointer members The `p` naming prefix is for pointers. Don't use it for non-pointer members, to avoid confusion. Change-Id: I8fa5faee5af10d69e5096036dd939bd2b22749ce Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211730 Tested-by: Jenkins Reviewed-by: Dan Williams Reviewed-by: Michael Weghorn --- svx/source/inc/DefaultShapesPanel.hxx | 2 +- svx/source/inc/ShapesUtil.hxx | 7 ++--- .../sidebar/shapes/DefaultShapesPanel.cxx | 30 +++++++++---------- svx/source/sidebar/shapes/ShapesUtil.cxx | 22 +++++++------- 4 files changed, 30 insertions(+), 31 deletions(-) diff --git a/svx/source/inc/DefaultShapesPanel.hxx b/svx/source/inc/DefaultShapesPanel.hxx index 788acab692a0..cd5c72df072a 100644 --- a/svx/source/inc/DefaultShapesPanel.hxx +++ b/svx/source/inc/DefaultShapesPanel.hxx @@ -68,7 +68,7 @@ private: std::unique_ptr mx3DObjectSetWin; Reference< XFrame > mxFrame; - std::map> mpShapesSetMap; + std::map> m_aShapesSetMap; void populateShapes(); void Initialize(); diff --git a/svx/source/inc/ShapesUtil.hxx b/svx/source/inc/ShapesUtil.hxx index a9c84d52c517..1b2920083609 100644 --- a/svx/source/inc/ShapesUtil.hxx +++ b/svx/source/inc/ShapesUtil.hxx @@ -27,10 +27,9 @@ class SvxShapeCommandsMap { public: SvxShapeCommandsMap(); - std::map mpLineShapes, mpCurveShapes, - mpConnectorShapes, mpBasicShapes, mpSymbolShapes, - mpBlockArrowShapes, mpFlowchartShapes, - mpCalloutShapes, mpStarShapes, mp3DShapes; + std::map m_aLineShapes, m_aCurveShapes, m_aConnectorShapes, + m_aBasicShapes, m_aSymbolShapes, m_aBlockArrowShapes, m_aFlowchartShapes, m_aCalloutShapes, + m_aStarShapes, m_a3DShapes; }; } diff --git a/svx/source/sidebar/shapes/DefaultShapesPanel.cxx b/svx/source/sidebar/shapes/DefaultShapesPanel.cxx index 4275da409e1b..6390505ea71b 100644 --- a/svx/source/sidebar/shapes/DefaultShapesPanel.cxx +++ b/svx/source/sidebar/shapes/DefaultShapesPanel.cxx @@ -74,20 +74,20 @@ std::unique_ptr DefaultShapesPanel::Create( void DefaultShapesPanel::Initialize() { - mpShapesSetMap = decltype(mpShapesSetMap){ - { mxLineArrowSet.get(), mpLineShapes }, - { mxCurveSet.get(), mpCurveShapes }, - { mxConnectorSet.get(), mpConnectorShapes }, - { mxBasicShapeSet.get(), mpBasicShapes }, - { mxSymbolShapeSet.get(), mpSymbolShapes }, - { mxBlockArrowSet.get(), mpBlockArrowShapes }, - { mxFlowchartSet.get(), mpFlowchartShapes }, - { mxCalloutSet.get(), mpCalloutShapes }, - { mxStarSet.get(), mpStarShapes }, - { mx3DObjectSet.get(), mp3DShapes } + m_aShapesSetMap = decltype(m_aShapesSetMap){ + { mxLineArrowSet.get(), m_aLineShapes }, + { mxCurveSet.get(), m_aCurveShapes }, + { mxConnectorSet.get(), m_aConnectorShapes }, + { mxBasicShapeSet.get(), m_aBasicShapes }, + { mxSymbolShapeSet.get(), m_aSymbolShapes }, + { mxBlockArrowSet.get(), m_aBlockArrowShapes }, + { mxFlowchartSet.get(), m_aFlowchartShapes }, + { mxCalloutSet.get(), m_aCalloutShapes }, + { mxStarSet.get(), m_aStarShapes }, + { mx3DObjectSet.get(), m_a3DShapes } }; populateShapes(); - for(auto& aSetMap: mpShapesSetMap) + for (auto& aSetMap : m_aShapesSetMap) { aSetMap.first->SetColor(Application::GetSettings().GetStyleSettings().GetDialogColor()); aSetMap.first->SetSelectHdl(LINK(this, DefaultShapesPanel, ShapeSelectHdl)); @@ -96,7 +96,7 @@ void DefaultShapesPanel::Initialize() DefaultShapesPanel::~DefaultShapesPanel() { - mpShapesSetMap.clear(); + m_aShapesSetMap.clear(); mxLineArrowSetWin.reset(); mxLineArrowSet.reset(); mxCurveSetWin.reset(); @@ -121,7 +121,7 @@ DefaultShapesPanel::~DefaultShapesPanel() IMPL_LINK(DefaultShapesPanel, ShapeSelectHdl, ValueSet*, rValueSet, void) { - for(auto& aSetMap : mpShapesSetMap) + for (auto& aSetMap : m_aShapesSetMap) { if(rValueSet == aSetMap.first) { @@ -137,7 +137,7 @@ void DefaultShapesPanel::populateShapes() { OUString sSlotStr, sLabel; Image aSlotImage; - for(auto& aSet : mpShapesSetMap) + for (auto& aSet : m_aShapesSetMap) { aSet.first->SetColCount(6); for(std::map::size_type i = 0; i < aSet.second.size(); i++) diff --git a/svx/source/sidebar/shapes/ShapesUtil.cxx b/svx/source/sidebar/shapes/ShapesUtil.cxx index 3f238030d8ef..f2178c1b9fe2 100644 --- a/svx/source/sidebar/shapes/ShapesUtil.cxx +++ b/svx/source/sidebar/shapes/ShapesUtil.cxx @@ -24,7 +24,7 @@ namespace svx::sidebar{ SvxShapeCommandsMap::SvxShapeCommandsMap() { - mpLineShapes = decltype(mpLineShapes){ + m_aLineShapes = decltype(m_aLineShapes){ {0, ".uno:Line"}, {1, ".uno:LineArrowEnd"}, {2, ".uno:LineCircleArrow"}, @@ -37,7 +37,7 @@ SvxShapeCommandsMap::SvxShapeCommandsMap() {9, ".uno:Line_Diagonal"} }; - mpCurveShapes = decltype(mpCurveShapes){ + m_aCurveShapes = decltype(m_aCurveShapes){ {0, ".uno:Freeline_Unfilled"}, {1, ".uno:Bezier_Unfilled"}, {2, ".uno:Polygon_Unfilled"}, @@ -48,7 +48,7 @@ SvxShapeCommandsMap::SvxShapeCommandsMap() {7, ".uno:Polygon_Diagonal"} }; - mpConnectorShapes = decltype(mpConnectorShapes){ + m_aConnectorShapes = decltype(m_aConnectorShapes){ {0, ".uno:ConnectorArrowEnd"}, {1, ".uno:ConnectorLineArrowEnd"}, {2, ".uno:ConnectorCurveArrowEnd"}, @@ -63,7 +63,7 @@ SvxShapeCommandsMap::SvxShapeCommandsMap() {11, ".uno:ConnectorLinesArrows"} }; - mpBasicShapes = decltype(mpBasicShapes){ + m_aBasicShapes = decltype(m_aBasicShapes){ {0, ".uno:BasicShapes.rectangle"}, {1, ".uno:BasicShapes.round-rectangle"}, {2, ".uno:BasicShapes.quadrat"}, @@ -91,7 +91,7 @@ SvxShapeCommandsMap::SvxShapeCommandsMap() {24, ".uno:BasicShapes.sinusoid"} }; - mpSymbolShapes = decltype(mpSymbolShapes){ + m_aSymbolShapes = decltype(m_aSymbolShapes){ {0, ".uno:SymbolShapes.smiley"}, {1, ".uno:SymbolShapes.sun"}, {2, ".uno:SymbolShapes.moon"}, @@ -112,7 +112,7 @@ SvxShapeCommandsMap::SvxShapeCommandsMap() {17, ".uno:SymbolShapes.diamond-bevel"} }; - mpBlockArrowShapes = decltype(mpBlockArrowShapes){ + m_aBlockArrowShapes = decltype(m_aBlockArrowShapes){ {0, ".uno:ArrowShapes.left-arrow"}, {1, ".uno:ArrowShapes.right-arrow"}, {2, ".uno:ArrowShapes.up-arrow"}, @@ -141,7 +141,7 @@ SvxShapeCommandsMap::SvxShapeCommandsMap() {25, ".uno:ArrowShapes.s-sharped-arrow"} }; - mpFlowchartShapes = decltype(mpFlowchartShapes){ + m_aFlowchartShapes = decltype(m_aFlowchartShapes){ {0, ".uno:FlowChartShapes.flowchart-process"}, {1, ".uno:FlowChartShapes.flowchart-alternate-process"}, {2, ".uno:FlowChartShapes.flowchart-decision"}, @@ -172,7 +172,7 @@ SvxShapeCommandsMap::SvxShapeCommandsMap() {27, ".uno:FlowChartShapes.flowchart-display"} }; - mpCalloutShapes = decltype(mpCalloutShapes){ + m_aCalloutShapes = decltype(m_aCalloutShapes){ {0, ".uno:CalloutShapes.rectangular-callout"}, {1, ".uno:CalloutShapes.round-rectangular-callout"}, {2, ".uno:CalloutShapes.round-callout"}, @@ -182,7 +182,7 @@ SvxShapeCommandsMap::SvxShapeCommandsMap() {6, ".uno:CalloutShapes.line-callout-3"} }; - mpStarShapes = decltype(mpStarShapes){ + m_aStarShapes = decltype(m_aStarShapes){ {0, ".uno:StarShapes.star4"}, {1, ".uno:StarShapes.star5"}, {2, ".uno:StarShapes.star6"}, @@ -197,7 +197,7 @@ SvxShapeCommandsMap::SvxShapeCommandsMap() {11, ".uno:StarShapes.concave-star6"} }; - mp3DShapes = decltype(mp3DShapes){ + m_a3DShapes = decltype(m_a3DShapes){ {0, ".uno:Cube"}, {1, ".uno:Sphere"}, {2, ".uno:Cylinder"}, @@ -210,4 +210,4 @@ SvxShapeCommandsMap::SvxShapeCommandsMap() } } -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ \ No newline at end of file +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ From d4867f33e9045ffd3f3ff630c6482bed49267904 Mon Sep 17 00:00:00 2001 From: Michael Weghorn Date: Fri, 2 Oct 2026 09:29:43 +0200 Subject: [PATCH 145/289] svx: Use vector instead of map that only uses element index as key The std::map members of SvxShapeCommandsMap use ascending integers for the key, i.e. keys start with 0 and go up to N-1 if N is the number of elements. Vector elements can be accessed by index as well, so switch to using std::vector to simplify the logic. To be safe, add an index check in DefaultShapesPanel::ShapeSelectHdl (std::map::operator[]() would implicitly insert a new element when called with a non-existing key.) and switch to std::vector::at() that performs bounds checks. Change-Id: I0afc8d53a98d529b0d30344fccedd2167b5f595c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211731 Reviewed-by: Dan Williams Tested-by: Jenkins Reviewed-by: Michael Weghorn --- svx/source/inc/DefaultShapesPanel.hxx | 2 +- svx/source/inc/ShapesUtil.hxx | 16 +- .../sidebar/shapes/DefaultShapesPanel.cxx | 7 +- svx/source/sidebar/shapes/ShapesUtil.cxx | 329 +++++++++--------- 4 files changed, 181 insertions(+), 173 deletions(-) diff --git a/svx/source/inc/DefaultShapesPanel.hxx b/svx/source/inc/DefaultShapesPanel.hxx index cd5c72df072a..3d929fcef8dd 100644 --- a/svx/source/inc/DefaultShapesPanel.hxx +++ b/svx/source/inc/DefaultShapesPanel.hxx @@ -68,7 +68,7 @@ private: std::unique_ptr mx3DObjectSetWin; Reference< XFrame > mxFrame; - std::map> m_aShapesSetMap; + std::map> m_aShapesSetMap; void populateShapes(); void Initialize(); diff --git a/svx/source/inc/ShapesUtil.hxx b/svx/source/inc/ShapesUtil.hxx index 1b2920083609..f44bb828398e 100644 --- a/svx/source/inc/ShapesUtil.hxx +++ b/svx/source/inc/ShapesUtil.hxx @@ -18,18 +18,26 @@ */ #pragma once -#include #include +#include + namespace svx::sidebar { class SvxShapeCommandsMap { public: SvxShapeCommandsMap(); - std::map m_aLineShapes, m_aCurveShapes, m_aConnectorShapes, - m_aBasicShapes, m_aSymbolShapes, m_aBlockArrowShapes, m_aFlowchartShapes, m_aCalloutShapes, - m_aStarShapes, m_a3DShapes; + std::vector m_aLineShapes; + std::vector m_aCurveShapes; + std::vector m_aConnectorShapes; + std::vector m_aBasicShapes; + std::vector m_aSymbolShapes; + std::vector m_aBlockArrowShapes; + std::vector m_aFlowchartShapes; + std::vector m_aCalloutShapes; + std::vector m_aStarShapes; + std::vector m_a3DShapes; }; } diff --git a/svx/source/sidebar/shapes/DefaultShapesPanel.cxx b/svx/source/sidebar/shapes/DefaultShapesPanel.cxx index 6390505ea71b..d1eba4a44122 100644 --- a/svx/source/sidebar/shapes/DefaultShapesPanel.cxx +++ b/svx/source/sidebar/shapes/DefaultShapesPanel.cxx @@ -126,7 +126,8 @@ IMPL_LINK(DefaultShapesPanel, ShapeSelectHdl, ValueSet*, rValueSet, void) if(rValueSet == aSetMap.first) { sal_uInt16 nSelectionId = aSetMap.first->GetSelectedItemId(); - comphelper::dispatchCommand(aSetMap.second[nSelectionId - 1], {}); + if (nSelectionId > 0 && nSelectionId <= aSetMap.second.size()) + comphelper::dispatchCommand(aSetMap.second.at(nSelectionId - 1), {}); } else aSetMap.first->SetNoSelection(); @@ -140,9 +141,9 @@ void DefaultShapesPanel::populateShapes() for (auto& aSet : m_aShapesSetMap) { aSet.first->SetColCount(6); - for(std::map::size_type i = 0; i < aSet.second.size(); i++) + for (size_t i = 0; i < aSet.second.size(); i++) { - sSlotStr = aSet.second[i]; + sSlotStr = aSet.second.at(i); aSlotImage = vcl::CommandInfoProvider::GetImageForCommand(sSlotStr, mxFrame); auto aProperties = vcl::CommandInfoProvider::GetCommandProperties(sSlotStr, vcl::CommandInfoProvider::GetModuleIdentifier(mxFrame)); diff --git a/svx/source/sidebar/shapes/ShapesUtil.cxx b/svx/source/sidebar/shapes/ShapesUtil.cxx index f2178c1b9fe2..11d8417c42a8 100644 --- a/svx/source/sidebar/shapes/ShapesUtil.cxx +++ b/svx/source/sidebar/shapes/ShapesUtil.cxx @@ -18,194 +18,193 @@ */ #include -#include #include namespace svx::sidebar{ SvxShapeCommandsMap::SvxShapeCommandsMap() { - m_aLineShapes = decltype(m_aLineShapes){ - {0, ".uno:Line"}, - {1, ".uno:LineArrowEnd"}, - {2, ".uno:LineCircleArrow"}, - {3, ".uno:LineSquareArrow"}, - {4, ".uno:LineArrows"}, - {5, ".uno:LineArrowStart"}, - {6, ".uno:LineArrowCircle"}, - {7, ".uno:LineArrowSquare"}, - {8, ".uno:MeasureLine"}, - {9, ".uno:Line_Diagonal"} + m_aLineShapes = { + ".uno:Line", + ".uno:LineArrowEnd", + ".uno:LineCircleArrow", + ".uno:LineSquareArrow", + ".uno:LineArrows", + ".uno:LineArrowStart", + ".uno:LineArrowCircle", + ".uno:LineArrowSquare", + ".uno:MeasureLine", + ".uno:Line_Diagonal" }; - m_aCurveShapes = decltype(m_aCurveShapes){ - {0, ".uno:Freeline_Unfilled"}, - {1, ".uno:Bezier_Unfilled"}, - {2, ".uno:Polygon_Unfilled"}, - {3, ".uno:Polygon_Diagonal_Unfilled"}, - {4, ".uno:Freeline"}, - {5, ".uno:BezierFill"}, - {6, ".uno:Polygon"}, - {7, ".uno:Polygon_Diagonal"} + m_aCurveShapes = { + ".uno:Freeline_Unfilled", + ".uno:Bezier_Unfilled", + ".uno:Polygon_Unfilled", + ".uno:Polygon_Diagonal_Unfilled", + ".uno:Freeline", + ".uno:BezierFill", + ".uno:Polygon", + ".uno:Polygon_Diagonal" }; - m_aConnectorShapes = decltype(m_aConnectorShapes){ - {0, ".uno:ConnectorArrowEnd"}, - {1, ".uno:ConnectorLineArrowEnd"}, - {2, ".uno:ConnectorCurveArrowEnd"}, - {3, ".uno:ConnectorLinesArrowEnd"}, - {4, ".uno:Connector"}, - {5, ".uno:ConnectorLine"}, - {6, ".uno:ConnectorCurve"}, - {7, ".uno:ConnectorLines"}, - {8, ".uno:ConnectorArrows"}, - {9, ".uno:ConnectorLineArrows"}, - {10, ".uno:ConnectorCurveArrows"}, - {11, ".uno:ConnectorLinesArrows"} + m_aConnectorShapes = { + ".uno:ConnectorArrowEnd", + ".uno:ConnectorLineArrowEnd", + ".uno:ConnectorCurveArrowEnd", + ".uno:ConnectorLinesArrowEnd", + ".uno:Connector", + ".uno:ConnectorLine", + ".uno:ConnectorCurve", + ".uno:ConnectorLines", + ".uno:ConnectorArrows", + ".uno:ConnectorLineArrows", + ".uno:ConnectorCurveArrows", + ".uno:ConnectorLinesArrows" }; - m_aBasicShapes = decltype(m_aBasicShapes){ - {0, ".uno:BasicShapes.rectangle"}, - {1, ".uno:BasicShapes.round-rectangle"}, - {2, ".uno:BasicShapes.quadrat"}, - {3, ".uno:BasicShapes.round-quadrat"}, - {4, ".uno:BasicShapes.parallelogram"}, - {5, ".uno:BasicShapes.trapezoid"}, - {6, ".uno:BasicShapes.ellipse"}, - {7, ".uno:BasicShapes.circle"}, - {8, ".uno:BasicShapes.circle-pie"}, - {9, ".uno:CircleCut"}, - {10, ".uno:Arc"}, - {11, ".uno:BasicShapes.block-arc"}, - {12, ".uno:BasicShapes.isosceles-triangle"}, - {13, ".uno:BasicShapes.right-triangle"}, - {14, ".uno:BasicShapes.diamond"}, - {15, ".uno:BasicShapes.pentagon"}, - {16, ".uno:BasicShapes.hexagon"}, - {17, ".uno:BasicShapes.octagon"}, - {18, ".uno:BasicShapes.cross"}, - {19, ".uno:BasicShapes.can"}, - {20, ".uno:BasicShapes.cube"}, - {21, ".uno:BasicShapes.paper"}, - {22, ".uno:BasicShapes.frame"}, - {23, ".uno:BasicShapes.ring"}, - {24, ".uno:BasicShapes.sinusoid"} + m_aBasicShapes = { + ".uno:BasicShapes.rectangle", + ".uno:BasicShapes.round-rectangle", + ".uno:BasicShapes.quadrat", + ".uno:BasicShapes.round-quadrat", + ".uno:BasicShapes.parallelogram", + ".uno:BasicShapes.trapezoid", + ".uno:BasicShapes.ellipse", + ".uno:BasicShapes.circle", + ".uno:BasicShapes.circle-pie", + ".uno:CircleCut", + ".uno:Arc", + ".uno:BasicShapes.block-arc", + ".uno:BasicShapes.isosceles-triangle", + ".uno:BasicShapes.right-triangle", + ".uno:BasicShapes.diamond", + ".uno:BasicShapes.pentagon", + ".uno:BasicShapes.hexagon", + ".uno:BasicShapes.octagon", + ".uno:BasicShapes.cross", + ".uno:BasicShapes.can", + ".uno:BasicShapes.cube", + ".uno:BasicShapes.paper", + ".uno:BasicShapes.frame", + ".uno:BasicShapes.ring", + ".uno:BasicShapes.sinusoid" }; - m_aSymbolShapes = decltype(m_aSymbolShapes){ - {0, ".uno:SymbolShapes.smiley"}, - {1, ".uno:SymbolShapes.sun"}, - {2, ".uno:SymbolShapes.moon"}, - {3, ".uno:SymbolShapes.lightning"}, - {4, ".uno:SymbolShapes.heart"}, - {5, ".uno:SymbolShapes.flower"}, - {6, ".uno:SymbolShapes.cloud"}, - {7, ".uno:SymbolShapes.forbidden"}, - {8, ".uno:SymbolShapes.puzzle"}, - {9, ".uno:SymbolShapes.bracket-pair"}, - {10, ".uno:SymbolShapes.left-bracket"}, - {11, ".uno:SymbolShapes.right-bracket"}, - {12, ".uno:SymbolShapes.brace-pair"}, - {13, ".uno:SymbolShapes.left-brace"}, - {14, ".uno:SymbolShapes.right-brace"}, - {15, ".uno:SymbolShapes.quad-bevel"}, - {16, ".uno:SymbolShapes.octagon-bevel"}, - {17, ".uno:SymbolShapes.diamond-bevel"} + m_aSymbolShapes = { + ".uno:SymbolShapes.smiley", + ".uno:SymbolShapes.sun", + ".uno:SymbolShapes.moon", + ".uno:SymbolShapes.lightning", + ".uno:SymbolShapes.heart", + ".uno:SymbolShapes.flower", + ".uno:SymbolShapes.cloud", + ".uno:SymbolShapes.forbidden", + ".uno:SymbolShapes.puzzle", + ".uno:SymbolShapes.bracket-pair", + ".uno:SymbolShapes.left-bracket", + ".uno:SymbolShapes.right-bracket", + ".uno:SymbolShapes.brace-pair", + ".uno:SymbolShapes.left-brace", + ".uno:SymbolShapes.right-brace", + ".uno:SymbolShapes.quad-bevel", + ".uno:SymbolShapes.octagon-bevel", + ".uno:SymbolShapes.diamond-bevel" }; - m_aBlockArrowShapes = decltype(m_aBlockArrowShapes){ - {0, ".uno:ArrowShapes.left-arrow"}, - {1, ".uno:ArrowShapes.right-arrow"}, - {2, ".uno:ArrowShapes.up-arrow"}, - {3, ".uno:ArrowShapes.down-arrow"}, - {4, ".uno:ArrowShapes.left-right-arrow"}, - {5, ".uno:ArrowShapes.up-down-arrow"}, - {6, ".uno:ArrowShapes.up-right-arrow"}, - {7, ".uno:ArrowShapes.up-right-down-arrow"}, - {8, ".uno:ArrowShapes.quad-arrow"}, - {9, ".uno:ArrowShapes.corner-right-arrow"}, - {10, ".uno:ArrowShapes.split-arrow"}, - {11, ".uno:ArrowShapes.striped-right-arrow"}, - {12, ".uno:ArrowShapes.notched-right-arrow"}, - {13, ".uno:ArrowShapes.pentagon-right"}, - {14, ".uno:ArrowShapes.chevron"}, - {15, ".uno:ArrowShapes.right-arrow-callout"}, - {16, ".uno:ArrowShapes.left-arrow-callout"}, - {17, ".uno:ArrowShapes.up-arrow-callout"}, - {18, ".uno:ArrowShapes.left-right-arrow-callout"}, - {19, ".uno:ArrowShapes.up-down-arrow-callout"}, - {20, ".uno:ArrowShapes.up-right-arrow-callout"}, - {21, ".uno:ArrowShapes.quad-arrow-callout"}, - {22, ".uno:ArrowShapes.circular-arrow"}, - {23, ".uno:ArrowShapes.down-arrow-callout"}, - {24, ".uno:ArrowShapes.split-round-arrow"}, - {25, ".uno:ArrowShapes.s-sharped-arrow"} + m_aBlockArrowShapes = { + ".uno:ArrowShapes.left-arrow", + ".uno:ArrowShapes.right-arrow", + ".uno:ArrowShapes.up-arrow", + ".uno:ArrowShapes.down-arrow", + ".uno:ArrowShapes.left-right-arrow", + ".uno:ArrowShapes.up-down-arrow", + ".uno:ArrowShapes.up-right-arrow", + ".uno:ArrowShapes.up-right-down-arrow", + ".uno:ArrowShapes.quad-arrow", + ".uno:ArrowShapes.corner-right-arrow", + ".uno:ArrowShapes.split-arrow", + ".uno:ArrowShapes.striped-right-arrow", + ".uno:ArrowShapes.notched-right-arrow", + ".uno:ArrowShapes.pentagon-right", + ".uno:ArrowShapes.chevron", + ".uno:ArrowShapes.right-arrow-callout", + ".uno:ArrowShapes.left-arrow-callout", + ".uno:ArrowShapes.up-arrow-callout", + ".uno:ArrowShapes.left-right-arrow-callout", + ".uno:ArrowShapes.up-down-arrow-callout", + ".uno:ArrowShapes.up-right-arrow-callout", + ".uno:ArrowShapes.quad-arrow-callout", + ".uno:ArrowShapes.circular-arrow", + ".uno:ArrowShapes.down-arrow-callout", + ".uno:ArrowShapes.split-round-arrow", + ".uno:ArrowShapes.s-sharped-arrow" }; - m_aFlowchartShapes = decltype(m_aFlowchartShapes){ - {0, ".uno:FlowChartShapes.flowchart-process"}, - {1, ".uno:FlowChartShapes.flowchart-alternate-process"}, - {2, ".uno:FlowChartShapes.flowchart-decision"}, - {3, ".uno:FlowChartShapes.flowchart-data"}, - {4, ".uno:FlowChartShapes.flowchart-predefined-process"}, - {5, ".uno:FlowChartShapes.flowchart-internal-storage"}, - {6, ".uno:FlowChartShapes.flowchart-document"}, - {7, ".uno:FlowChartShapes.flowchart-multidocument"}, - {8, ".uno:FlowChartShapes.flowchart-terminator"}, - {9, ".uno:FlowChartShapes.flowchart-preparation"}, - {10, ".uno:FlowChartShapes.flowchart-manual-input"}, - {11, ".uno:FlowChartShapes.flowchart-manual-operation"}, - {12, ".uno:FlowChartShapes.flowchart-connector"}, - {13, ".uno:FlowChartShapes.flowchart-off-page-connector"}, - {14, ".uno:FlowChartShapes.flowchart-card"}, - {15, ".uno:FlowChartShapes.flowchart-punched-tape"}, - {16, ".uno:FlowChartShapes.flowchart-summing-junction"}, - {17, ".uno:FlowChartShapes.flowchart-or"}, - {18, ".uno:FlowChartShapes.flowchart-collate"}, - {19, ".uno:FlowChartShapes.flowchart-sort"}, - {20, ".uno:FlowChartShapes.flowchart-extract"}, - {21, ".uno:FlowChartShapes.flowchart-merge"}, - {22, ".uno:FlowChartShapes.flowchart-stored-data"}, - {23, ".uno:FlowChartShapes.flowchart-delay"}, - {24, ".uno:FlowChartShapes.flowchart-sequential-access"}, - {25, ".uno:FlowChartShapes.flowchart-magnetic-disk"}, - {26, ".uno:FlowChartShapes.flowchart-direct-access-storage"}, - {27, ".uno:FlowChartShapes.flowchart-display"} + m_aFlowchartShapes = { + ".uno:FlowChartShapes.flowchart-process", + ".uno:FlowChartShapes.flowchart-alternate-process", + ".uno:FlowChartShapes.flowchart-decision", + ".uno:FlowChartShapes.flowchart-data", + ".uno:FlowChartShapes.flowchart-predefined-process", + ".uno:FlowChartShapes.flowchart-internal-storage", + ".uno:FlowChartShapes.flowchart-document", + ".uno:FlowChartShapes.flowchart-multidocument", + ".uno:FlowChartShapes.flowchart-terminator", + ".uno:FlowChartShapes.flowchart-preparation", + ".uno:FlowChartShapes.flowchart-manual-input", + ".uno:FlowChartShapes.flowchart-manual-operation", + ".uno:FlowChartShapes.flowchart-connector", + ".uno:FlowChartShapes.flowchart-off-page-connector", + ".uno:FlowChartShapes.flowchart-card", + ".uno:FlowChartShapes.flowchart-punched-tape", + ".uno:FlowChartShapes.flowchart-summing-junction", + ".uno:FlowChartShapes.flowchart-or", + ".uno:FlowChartShapes.flowchart-collate", + ".uno:FlowChartShapes.flowchart-sort", + ".uno:FlowChartShapes.flowchart-extract", + ".uno:FlowChartShapes.flowchart-merge", + ".uno:FlowChartShapes.flowchart-stored-data", + ".uno:FlowChartShapes.flowchart-delay", + ".uno:FlowChartShapes.flowchart-sequential-access", + ".uno:FlowChartShapes.flowchart-magnetic-disk", + ".uno:FlowChartShapes.flowchart-direct-access-storage", + ".uno:FlowChartShapes.flowchart-display" }; - m_aCalloutShapes = decltype(m_aCalloutShapes){ - {0, ".uno:CalloutShapes.rectangular-callout"}, - {1, ".uno:CalloutShapes.round-rectangular-callout"}, - {2, ".uno:CalloutShapes.round-callout"}, - {3, ".uno:CalloutShapes.cloud-callout"}, - {4, ".uno:CalloutShapes.line-callout-1"}, - {5, ".uno:CalloutShapes.line-callout-2"}, - {6, ".uno:CalloutShapes.line-callout-3"} + m_aCalloutShapes = { + ".uno:CalloutShapes.rectangular-callout", + ".uno:CalloutShapes.round-rectangular-callout", + ".uno:CalloutShapes.round-callout", + ".uno:CalloutShapes.cloud-callout", + ".uno:CalloutShapes.line-callout-1", + ".uno:CalloutShapes.line-callout-2", + ".uno:CalloutShapes.line-callout-3" }; - m_aStarShapes = decltype(m_aStarShapes){ - {0, ".uno:StarShapes.star4"}, - {1, ".uno:StarShapes.star5"}, - {2, ".uno:StarShapes.star6"}, - {3, ".uno:StarShapes.star8"}, - {4, ".uno:StarShapes.star12"}, - {5, ".uno:StarShapes.star24"}, - {6, ".uno:StarShapes.bang"}, - {7, ".uno:StarShapes.vertical-scroll"}, - {8, ".uno:StarShapes.horizontal-scroll"}, - {9, ".uno:StarShapes.signet"}, - {10, ".uno:StarShapes.doorplate"}, - {11, ".uno:StarShapes.concave-star6"} + m_aStarShapes = { + ".uno:StarShapes.star4", + ".uno:StarShapes.star5", + ".uno:StarShapes.star6", + ".uno:StarShapes.star8", + ".uno:StarShapes.star12", + ".uno:StarShapes.star24", + ".uno:StarShapes.bang", + ".uno:StarShapes.vertical-scroll", + ".uno:StarShapes.horizontal-scroll", + ".uno:StarShapes.signet", + ".uno:StarShapes.doorplate", + ".uno:StarShapes.concave-star6" }; - m_a3DShapes = decltype(m_a3DShapes){ - {0, ".uno:Cube"}, - {1, ".uno:Sphere"}, - {2, ".uno:Cylinder"}, - {3, ".uno:Cone"}, - {4, ".uno:Cyramid"}, - {5, ".uno:Torus"}, - {6, ".uno:Shell3D"}, - {7, ".uno:HalfSphere"} + m_a3DShapes = { + ".uno:Cube", + ".uno:Sphere", + ".uno:Cylinder", + ".uno:Cone", + ".uno:Cyramid", + ".uno:Torus", + ".uno:Shell3D", + ".uno:HalfSphere" }; } } From 97bbfedf4294755a6c479ce4ada94a23befc1045 Mon Sep 17 00:00:00 2001 From: Michael Weghorn Date: Fri, 2 Oct 2026 09:40:16 +0200 Subject: [PATCH 146/289] svx: Use OUString literals in SvxShapeCommandsMap ctor Change-Id: Ia409297982b341fc3e1562378339b49bb7f88078 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211732 Tested-by: Jenkins Reviewed-by: Michael Weghorn Reviewed-by: Dan Williams --- svx/source/sidebar/shapes/ShapesUtil.cxx | 308 +++++++++++------------ 1 file changed, 154 insertions(+), 154 deletions(-) diff --git a/svx/source/sidebar/shapes/ShapesUtil.cxx b/svx/source/sidebar/shapes/ShapesUtil.cxx index 11d8417c42a8..0fb6a1450177 100644 --- a/svx/source/sidebar/shapes/ShapesUtil.cxx +++ b/svx/source/sidebar/shapes/ShapesUtil.cxx @@ -24,187 +24,187 @@ namespace svx::sidebar{ SvxShapeCommandsMap::SvxShapeCommandsMap() { m_aLineShapes = { - ".uno:Line", - ".uno:LineArrowEnd", - ".uno:LineCircleArrow", - ".uno:LineSquareArrow", - ".uno:LineArrows", - ".uno:LineArrowStart", - ".uno:LineArrowCircle", - ".uno:LineArrowSquare", - ".uno:MeasureLine", - ".uno:Line_Diagonal" + u".uno:Line"_ustr, + u".uno:LineArrowEnd"_ustr, + u".uno:LineCircleArrow"_ustr, + u".uno:LineSquareArrow"_ustr, + u".uno:LineArrows"_ustr, + u".uno:LineArrowStart"_ustr, + u".uno:LineArrowCircle"_ustr, + u".uno:LineArrowSquare"_ustr, + u".uno:MeasureLine"_ustr, + u".uno:Line_Diagonal"_ustr }; m_aCurveShapes = { - ".uno:Freeline_Unfilled", - ".uno:Bezier_Unfilled", - ".uno:Polygon_Unfilled", - ".uno:Polygon_Diagonal_Unfilled", - ".uno:Freeline", - ".uno:BezierFill", - ".uno:Polygon", - ".uno:Polygon_Diagonal" + u".uno:Freeline_Unfilled"_ustr, + u".uno:Bezier_Unfilled"_ustr, + u".uno:Polygon_Unfilled"_ustr, + u".uno:Polygon_Diagonal_Unfilled"_ustr, + u".uno:Freeline"_ustr, + u".uno:BezierFill"_ustr, + u".uno:Polygon"_ustr, + u".uno:Polygon_Diagonal"_ustr }; m_aConnectorShapes = { - ".uno:ConnectorArrowEnd", - ".uno:ConnectorLineArrowEnd", - ".uno:ConnectorCurveArrowEnd", - ".uno:ConnectorLinesArrowEnd", - ".uno:Connector", - ".uno:ConnectorLine", - ".uno:ConnectorCurve", - ".uno:ConnectorLines", - ".uno:ConnectorArrows", - ".uno:ConnectorLineArrows", - ".uno:ConnectorCurveArrows", - ".uno:ConnectorLinesArrows" + u".uno:ConnectorArrowEnd"_ustr, + u".uno:ConnectorLineArrowEnd"_ustr, + u".uno:ConnectorCurveArrowEnd"_ustr, + u".uno:ConnectorLinesArrowEnd"_ustr, + u".uno:Connector"_ustr, + u".uno:ConnectorLine"_ustr, + u".uno:ConnectorCurve"_ustr, + u".uno:ConnectorLines"_ustr, + u".uno:ConnectorArrows"_ustr, + u".uno:ConnectorLineArrows"_ustr, + u".uno:ConnectorCurveArrows"_ustr, + u".uno:ConnectorLinesArrows"_ustr }; m_aBasicShapes = { - ".uno:BasicShapes.rectangle", - ".uno:BasicShapes.round-rectangle", - ".uno:BasicShapes.quadrat", - ".uno:BasicShapes.round-quadrat", - ".uno:BasicShapes.parallelogram", - ".uno:BasicShapes.trapezoid", - ".uno:BasicShapes.ellipse", - ".uno:BasicShapes.circle", - ".uno:BasicShapes.circle-pie", - ".uno:CircleCut", - ".uno:Arc", - ".uno:BasicShapes.block-arc", - ".uno:BasicShapes.isosceles-triangle", - ".uno:BasicShapes.right-triangle", - ".uno:BasicShapes.diamond", - ".uno:BasicShapes.pentagon", - ".uno:BasicShapes.hexagon", - ".uno:BasicShapes.octagon", - ".uno:BasicShapes.cross", - ".uno:BasicShapes.can", - ".uno:BasicShapes.cube", - ".uno:BasicShapes.paper", - ".uno:BasicShapes.frame", - ".uno:BasicShapes.ring", - ".uno:BasicShapes.sinusoid" + u".uno:BasicShapes.rectangle"_ustr, + u".uno:BasicShapes.round-rectangle"_ustr, + u".uno:BasicShapes.quadrat"_ustr, + u".uno:BasicShapes.round-quadrat"_ustr, + u".uno:BasicShapes.parallelogram"_ustr, + u".uno:BasicShapes.trapezoid"_ustr, + u".uno:BasicShapes.ellipse"_ustr, + u".uno:BasicShapes.circle"_ustr, + u".uno:BasicShapes.circle-pie"_ustr, + u".uno:CircleCut"_ustr, + u".uno:Arc"_ustr, + u".uno:BasicShapes.block-arc"_ustr, + u".uno:BasicShapes.isosceles-triangle"_ustr, + u".uno:BasicShapes.right-triangle"_ustr, + u".uno:BasicShapes.diamond"_ustr, + u".uno:BasicShapes.pentagon"_ustr, + u".uno:BasicShapes.hexagon"_ustr, + u".uno:BasicShapes.octagon"_ustr, + u".uno:BasicShapes.cross"_ustr, + u".uno:BasicShapes.can"_ustr, + u".uno:BasicShapes.cube"_ustr, + u".uno:BasicShapes.paper"_ustr, + u".uno:BasicShapes.frame"_ustr, + u".uno:BasicShapes.ring"_ustr, + u".uno:BasicShapes.sinusoid"_ustr }; m_aSymbolShapes = { - ".uno:SymbolShapes.smiley", - ".uno:SymbolShapes.sun", - ".uno:SymbolShapes.moon", - ".uno:SymbolShapes.lightning", - ".uno:SymbolShapes.heart", - ".uno:SymbolShapes.flower", - ".uno:SymbolShapes.cloud", - ".uno:SymbolShapes.forbidden", - ".uno:SymbolShapes.puzzle", - ".uno:SymbolShapes.bracket-pair", - ".uno:SymbolShapes.left-bracket", - ".uno:SymbolShapes.right-bracket", - ".uno:SymbolShapes.brace-pair", - ".uno:SymbolShapes.left-brace", - ".uno:SymbolShapes.right-brace", - ".uno:SymbolShapes.quad-bevel", - ".uno:SymbolShapes.octagon-bevel", - ".uno:SymbolShapes.diamond-bevel" + u".uno:SymbolShapes.smiley"_ustr, + u".uno:SymbolShapes.sun"_ustr, + u".uno:SymbolShapes.moon"_ustr, + u".uno:SymbolShapes.lightning"_ustr, + u".uno:SymbolShapes.heart"_ustr, + u".uno:SymbolShapes.flower"_ustr, + u".uno:SymbolShapes.cloud"_ustr, + u".uno:SymbolShapes.forbidden"_ustr, + u".uno:SymbolShapes.puzzle"_ustr, + u".uno:SymbolShapes.bracket-pair"_ustr, + u".uno:SymbolShapes.left-bracket"_ustr, + u".uno:SymbolShapes.right-bracket"_ustr, + u".uno:SymbolShapes.brace-pair"_ustr, + u".uno:SymbolShapes.left-brace"_ustr, + u".uno:SymbolShapes.right-brace"_ustr, + u".uno:SymbolShapes.quad-bevel"_ustr, + u".uno:SymbolShapes.octagon-bevel"_ustr, + u".uno:SymbolShapes.diamond-bevel"_ustr }; m_aBlockArrowShapes = { - ".uno:ArrowShapes.left-arrow", - ".uno:ArrowShapes.right-arrow", - ".uno:ArrowShapes.up-arrow", - ".uno:ArrowShapes.down-arrow", - ".uno:ArrowShapes.left-right-arrow", - ".uno:ArrowShapes.up-down-arrow", - ".uno:ArrowShapes.up-right-arrow", - ".uno:ArrowShapes.up-right-down-arrow", - ".uno:ArrowShapes.quad-arrow", - ".uno:ArrowShapes.corner-right-arrow", - ".uno:ArrowShapes.split-arrow", - ".uno:ArrowShapes.striped-right-arrow", - ".uno:ArrowShapes.notched-right-arrow", - ".uno:ArrowShapes.pentagon-right", - ".uno:ArrowShapes.chevron", - ".uno:ArrowShapes.right-arrow-callout", - ".uno:ArrowShapes.left-arrow-callout", - ".uno:ArrowShapes.up-arrow-callout", - ".uno:ArrowShapes.left-right-arrow-callout", - ".uno:ArrowShapes.up-down-arrow-callout", - ".uno:ArrowShapes.up-right-arrow-callout", - ".uno:ArrowShapes.quad-arrow-callout", - ".uno:ArrowShapes.circular-arrow", - ".uno:ArrowShapes.down-arrow-callout", - ".uno:ArrowShapes.split-round-arrow", - ".uno:ArrowShapes.s-sharped-arrow" + u".uno:ArrowShapes.left-arrow"_ustr, + u".uno:ArrowShapes.right-arrow"_ustr, + u".uno:ArrowShapes.up-arrow"_ustr, + u".uno:ArrowShapes.down-arrow"_ustr, + u".uno:ArrowShapes.left-right-arrow"_ustr, + u".uno:ArrowShapes.up-down-arrow"_ustr, + u".uno:ArrowShapes.up-right-arrow"_ustr, + u".uno:ArrowShapes.up-right-down-arrow"_ustr, + u".uno:ArrowShapes.quad-arrow"_ustr, + u".uno:ArrowShapes.corner-right-arrow"_ustr, + u".uno:ArrowShapes.split-arrow"_ustr, + u".uno:ArrowShapes.striped-right-arrow"_ustr, + u".uno:ArrowShapes.notched-right-arrow"_ustr, + u".uno:ArrowShapes.pentagon-right"_ustr, + u".uno:ArrowShapes.chevron"_ustr, + u".uno:ArrowShapes.right-arrow-callout"_ustr, + u".uno:ArrowShapes.left-arrow-callout"_ustr, + u".uno:ArrowShapes.up-arrow-callout"_ustr, + u".uno:ArrowShapes.left-right-arrow-callout"_ustr, + u".uno:ArrowShapes.up-down-arrow-callout"_ustr, + u".uno:ArrowShapes.up-right-arrow-callout"_ustr, + u".uno:ArrowShapes.quad-arrow-callout"_ustr, + u".uno:ArrowShapes.circular-arrow"_ustr, + u".uno:ArrowShapes.down-arrow-callout"_ustr, + u".uno:ArrowShapes.split-round-arrow"_ustr, + u".uno:ArrowShapes.s-sharped-arrow"_ustr }; m_aFlowchartShapes = { - ".uno:FlowChartShapes.flowchart-process", - ".uno:FlowChartShapes.flowchart-alternate-process", - ".uno:FlowChartShapes.flowchart-decision", - ".uno:FlowChartShapes.flowchart-data", - ".uno:FlowChartShapes.flowchart-predefined-process", - ".uno:FlowChartShapes.flowchart-internal-storage", - ".uno:FlowChartShapes.flowchart-document", - ".uno:FlowChartShapes.flowchart-multidocument", - ".uno:FlowChartShapes.flowchart-terminator", - ".uno:FlowChartShapes.flowchart-preparation", - ".uno:FlowChartShapes.flowchart-manual-input", - ".uno:FlowChartShapes.flowchart-manual-operation", - ".uno:FlowChartShapes.flowchart-connector", - ".uno:FlowChartShapes.flowchart-off-page-connector", - ".uno:FlowChartShapes.flowchart-card", - ".uno:FlowChartShapes.flowchart-punched-tape", - ".uno:FlowChartShapes.flowchart-summing-junction", - ".uno:FlowChartShapes.flowchart-or", - ".uno:FlowChartShapes.flowchart-collate", - ".uno:FlowChartShapes.flowchart-sort", - ".uno:FlowChartShapes.flowchart-extract", - ".uno:FlowChartShapes.flowchart-merge", - ".uno:FlowChartShapes.flowchart-stored-data", - ".uno:FlowChartShapes.flowchart-delay", - ".uno:FlowChartShapes.flowchart-sequential-access", - ".uno:FlowChartShapes.flowchart-magnetic-disk", - ".uno:FlowChartShapes.flowchart-direct-access-storage", - ".uno:FlowChartShapes.flowchart-display" + u".uno:FlowChartShapes.flowchart-process"_ustr, + u".uno:FlowChartShapes.flowchart-alternate-process"_ustr, + u".uno:FlowChartShapes.flowchart-decision"_ustr, + u".uno:FlowChartShapes.flowchart-data"_ustr, + u".uno:FlowChartShapes.flowchart-predefined-process"_ustr, + u".uno:FlowChartShapes.flowchart-internal-storage"_ustr, + u".uno:FlowChartShapes.flowchart-document"_ustr, + u".uno:FlowChartShapes.flowchart-multidocument"_ustr, + u".uno:FlowChartShapes.flowchart-terminator"_ustr, + u".uno:FlowChartShapes.flowchart-preparation"_ustr, + u".uno:FlowChartShapes.flowchart-manual-input"_ustr, + u".uno:FlowChartShapes.flowchart-manual-operation"_ustr, + u".uno:FlowChartShapes.flowchart-connector"_ustr, + u".uno:FlowChartShapes.flowchart-off-page-connector"_ustr, + u".uno:FlowChartShapes.flowchart-card"_ustr, + u".uno:FlowChartShapes.flowchart-punched-tape"_ustr, + u".uno:FlowChartShapes.flowchart-summing-junction"_ustr, + u".uno:FlowChartShapes.flowchart-or"_ustr, + u".uno:FlowChartShapes.flowchart-collate"_ustr, + u".uno:FlowChartShapes.flowchart-sort"_ustr, + u".uno:FlowChartShapes.flowchart-extract"_ustr, + u".uno:FlowChartShapes.flowchart-merge"_ustr, + u".uno:FlowChartShapes.flowchart-stored-data"_ustr, + u".uno:FlowChartShapes.flowchart-delay"_ustr, + u".uno:FlowChartShapes.flowchart-sequential-access"_ustr, + u".uno:FlowChartShapes.flowchart-magnetic-disk"_ustr, + u".uno:FlowChartShapes.flowchart-direct-access-storage"_ustr, + u".uno:FlowChartShapes.flowchart-display"_ustr }; m_aCalloutShapes = { - ".uno:CalloutShapes.rectangular-callout", - ".uno:CalloutShapes.round-rectangular-callout", - ".uno:CalloutShapes.round-callout", - ".uno:CalloutShapes.cloud-callout", - ".uno:CalloutShapes.line-callout-1", - ".uno:CalloutShapes.line-callout-2", - ".uno:CalloutShapes.line-callout-3" + u".uno:CalloutShapes.rectangular-callout"_ustr, + u".uno:CalloutShapes.round-rectangular-callout"_ustr, + u".uno:CalloutShapes.round-callout"_ustr, + u".uno:CalloutShapes.cloud-callout"_ustr, + u".uno:CalloutShapes.line-callout-1"_ustr, + u".uno:CalloutShapes.line-callout-2"_ustr, + u".uno:CalloutShapes.line-callout-3"_ustr }; m_aStarShapes = { - ".uno:StarShapes.star4", - ".uno:StarShapes.star5", - ".uno:StarShapes.star6", - ".uno:StarShapes.star8", - ".uno:StarShapes.star12", - ".uno:StarShapes.star24", - ".uno:StarShapes.bang", - ".uno:StarShapes.vertical-scroll", - ".uno:StarShapes.horizontal-scroll", - ".uno:StarShapes.signet", - ".uno:StarShapes.doorplate", - ".uno:StarShapes.concave-star6" + u".uno:StarShapes.star4"_ustr, + u".uno:StarShapes.star5"_ustr, + u".uno:StarShapes.star6"_ustr, + u".uno:StarShapes.star8"_ustr, + u".uno:StarShapes.star12"_ustr, + u".uno:StarShapes.star24"_ustr, + u".uno:StarShapes.bang"_ustr, + u".uno:StarShapes.vertical-scroll"_ustr, + u".uno:StarShapes.horizontal-scroll"_ustr, + u".uno:StarShapes.signet"_ustr, + u".uno:StarShapes.doorplate"_ustr, + u".uno:StarShapes.concave-star6"_ustr }; m_a3DShapes = { - ".uno:Cube", - ".uno:Sphere", - ".uno:Cylinder", - ".uno:Cone", - ".uno:Cyramid", - ".uno:Torus", - ".uno:Shell3D", - ".uno:HalfSphere" + u".uno:Cube"_ustr, + u".uno:Sphere"_ustr, + u".uno:Cylinder"_ustr, + u".uno:Cone"_ustr, + u".uno:Cyramid"_ustr, + u".uno:Torus"_ustr, + u".uno:Shell3D"_ustr, + u".uno:HalfSphere"_ustr }; } } From 19da11d8f9a493795e54e162aed2e0532c5c9cb6 Mon Sep 17 00:00:00 2001 From: Michael Weghorn Date: Fri, 2 Oct 2026 09:57:05 +0200 Subject: [PATCH 147/289] svx: Resave defaultshapespanel.ui with glade 3.40 This is used for the "Default" section in the Impress/Draw "Shapes" sidebar deck. Change-Id: I783ce750b98a112f2aa3c5a1c8f6fe86e2402d03 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211733 Tested-by: Jenkins Reviewed-by: Michael Weghorn Reviewed-by: Dan Williams --- svx/uiconfig/ui/defaultshapespanel.ui | 134 +++++++++++++------------- 1 file changed, 67 insertions(+), 67 deletions(-) diff --git a/svx/uiconfig/ui/defaultshapespanel.ui b/svx/uiconfig/ui/defaultshapespanel.ui index f47a3cd673f6..190945a3ab70 100644 --- a/svx/uiconfig/ui/defaultshapespanel.ui +++ b/svx/uiconfig/ui/defaultshapespanel.ui @@ -1,37 +1,37 @@ - + True - False + False True True - False + False True - 6 + 6 vertical 12 True - False + False vertical 3 True - False - 0 - none + False + 0 + none - 50 + 50 True - True + True GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_KEY_PRESS_MASK | GDK_KEY_RELEASE_MASK | GDK_STRUCTURE_MASK 12 @@ -39,7 +39,7 @@ True - False + False Lines and Arrows @@ -56,14 +56,14 @@ True - False - 0 - none + False + 0 + none - 50 + 50 True - True + True GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_KEY_PRESS_MASK | GDK_KEY_RELEASE_MASK | GDK_STRUCTURE_MASK 12 @@ -71,7 +71,7 @@ True - False + False Curves and Polygons @@ -88,14 +88,14 @@ True - False - 0 - none + False + 0 + none - 50 + 50 True - True + True GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_KEY_PRESS_MASK | GDK_KEY_RELEASE_MASK | GDK_STRUCTURE_MASK 12 @@ -103,7 +103,7 @@ True - False + False Connectors @@ -120,14 +120,14 @@ True - False - 0 - none + False + 0 + none - 100 + 100 True - True + True GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_KEY_PRESS_MASK | GDK_KEY_RELEASE_MASK | GDK_STRUCTURE_MASK 12 @@ -135,7 +135,7 @@ True - False + False Basic Shapes @@ -152,14 +152,14 @@ True - False - 0 - none + False + 0 + none - 75 + 75 True - True + True GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_KEY_PRESS_MASK | GDK_KEY_RELEASE_MASK | GDK_STRUCTURE_MASK 12 @@ -167,7 +167,7 @@ True - False + False Symbol Shapes @@ -184,14 +184,14 @@ True - False - 0 - none + False + 0 + none - 125 + 125 True - True + True GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_KEY_PRESS_MASK | GDK_KEY_RELEASE_MASK | GDK_STRUCTURE_MASK 12 @@ -199,7 +199,7 @@ True - False + False Block Arrows @@ -216,14 +216,14 @@ True - False - 0 - none + False + 0 + none - 125 + 125 True - True + True GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_KEY_PRESS_MASK | GDK_KEY_RELEASE_MASK | GDK_STRUCTURE_MASK 12 @@ -231,7 +231,7 @@ True - False + False Flowchart @@ -248,14 +248,14 @@ True - False - 0 - none + False + 0 + none - 50 + 50 True - True + True GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_KEY_PRESS_MASK | GDK_KEY_RELEASE_MASK | GDK_STRUCTURE_MASK 12 @@ -263,7 +263,7 @@ True - False + False Callouts @@ -280,14 +280,14 @@ True - False - 0 - none + False + 0 + none - 50 + 50 True - True + True GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_KEY_PRESS_MASK | GDK_KEY_RELEASE_MASK | GDK_STRUCTURE_MASK 12 @@ -295,7 +295,7 @@ True - False + False Stars and Banners @@ -312,14 +312,14 @@ True - False - 0 - none + False + 0 + none - 50 + 50 True - True + True GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_KEY_PRESS_MASK | GDK_KEY_RELEASE_MASK | GDK_STRUCTURE_MASK 12 @@ -327,7 +327,7 @@ True - False + False 3D Objects @@ -350,8 +350,8 @@ - 0 - 0 + 0 + 0 From 7003eb6fc63468f8622ae3c1ef369d61e41c5a37 Mon Sep 17 00:00:00 2001 From: Xisco Fauli Date: Fri, 2 Oct 2026 10:27:22 +0200 Subject: [PATCH 148/289] fix headers Change-Id: Ia2732cc041367bc113654bc424ea6621f3961e9f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211724 Tested-by: Jenkins Reviewed-by: Xisco Fauli --- chart2/CppunitTest_chart2_correlation_coefficient.mk | 4 +--- chart2/qa/unit/correlation_coefficient_test.cxx | 4 +--- chart2/source/inc/CorrelationCoefficient.hxx | 5 ++--- chart2/source/model/template/CorrelationCircleChartType.cxx | 4 +--- chart2/source/model/template/CorrelationCircleChartType.hxx | 5 ++--- .../model/template/CorrelationCircleChartTypeTemplate.cxx | 4 +--- .../model/template/CorrelationCircleChartTypeTemplate.hxx | 5 ++--- .../model/template/CorrelationCircleDataInterpreter.cxx | 4 +--- .../model/template/CorrelationCircleDataInterpreter.hxx | 5 ++--- chart2/source/view/charttypes/CorrelationCircleChart.cxx | 4 +--- chart2/source/view/charttypes/CorrelationCircleChart.hxx | 5 ++--- formula/CppunitTest_formula_ooxml.mk | 4 +--- formula/inc/OOXMLRewriter.hxx | 4 +--- formula/qa/unit/OOXMLRewriterTest.cxx | 4 +--- formula/source/core/api/OOXMLRewriter.cxx | 4 +--- include/comphelper/propcontainerimplhelper.hxx | 4 +--- include/comphelper/propimplhelper.hxx | 4 +--- include/comphelper/unique_unlock.hxx | 4 +--- include/svx/fillbitmaplink.hxx | 5 ++--- include/xmloff/SoundReference.hxx | 6 ++---- offapi/com/sun/star/chart/CorrelationCircleDiagram.idl | 4 +--- offapi/com/sun/star/presentation/XSoundReference.idl | 6 ++---- sc/CppunitTest_sc_dynamic_array_functions_test.mk | 4 +--- sc/CppunitTest_sc_oox_helpers_test.mk | 4 +--- sc/qa/uitest/chart2/correlationCircle.py | 4 +--- sc/qa/unit/RedundantParenthesesStripperTest.cxx | 4 +--- sc/qa/unit/functions_dynamic_array.cxx | 4 +--- sc/qa/unit/ucalc_spilled_range.cxx | 4 +--- sc/source/filter/inc/personsfragment.hxx | 4 +--- sc/source/filter/inc/threadedcommentsfragment.hxx | 4 +--- sc/source/filter/oox/personsfragment.cxx | 4 +--- sc/source/filter/oox/threadedcommentsfragment.cxx | 4 +--- .../ui/inc/operation/InsertThreadedCommentOperation.hxx | 4 +--- sc/source/ui/operation/InsertThreadedCommentOperation.cxx | 4 +--- sd/inc/SdSoundLink.hxx | 6 ++---- svx/inc/sdgclitm.hxx | 4 +--- svx/source/xoutdev/fillbitmaplink.cxx | 4 +--- sw/inc/databindingnamespaces.hxx | 4 +--- sw/qa/core/text/EnhancedPDFExportHelper.cxx | 4 +--- sw/source/core/inc/fillattrcache.hxx | 5 ++--- uitest/uitest/uihelper/chart.py | 4 +--- 41 files changed, 51 insertions(+), 126 deletions(-) diff --git a/chart2/CppunitTest_chart2_correlation_coefficient.mk b/chart2/CppunitTest_chart2_correlation_coefficient.mk index 71476366d55e..c5bc94afa046 100644 --- a/chart2/CppunitTest_chart2_correlation_coefficient.mk +++ b/chart2/CppunitTest_chart2_correlation_coefficient.mk @@ -1,8 +1,6 @@ # -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t; fill-column: 100 -*- # -# Copyright the LibreOffice contributors. -# -# SPDX-License-Identifier: MPL-2.0 +# 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 diff --git a/chart2/qa/unit/correlation_coefficient_test.cxx b/chart2/qa/unit/correlation_coefficient_test.cxx index 6d0b703b2181..e60f6a489edf 100644 --- a/chart2/qa/unit/correlation_coefficient_test.cxx +++ b/chart2/qa/unit/correlation_coefficient_test.cxx @@ -1,8 +1,6 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */ /* - * Copyright the LibreOffice contributors. - * - * SPDX-License-Identifier: MPL-2.0 + * 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 diff --git a/chart2/source/inc/CorrelationCoefficient.hxx b/chart2/source/inc/CorrelationCoefficient.hxx index dd50d1a25bf9..e1ad7bb2e654 100644 --- a/chart2/source/inc/CorrelationCoefficient.hxx +++ b/chart2/source/inc/CorrelationCoefficient.hxx @@ -1,13 +1,12 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */ /* - * Copyright the LibreOffice contributors. - * - * SPDX-License-Identifier: MPL-2.0 + * 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/. */ + #pragma once #include diff --git a/chart2/source/model/template/CorrelationCircleChartType.cxx b/chart2/source/model/template/CorrelationCircleChartType.cxx index ab6bbff5ea1c..6868148c0a74 100644 --- a/chart2/source/model/template/CorrelationCircleChartType.cxx +++ b/chart2/source/model/template/CorrelationCircleChartType.cxx @@ -1,8 +1,6 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */ /* - * Copyright the LibreOffice contributors. - * - * SPDX-License-Identifier: MPL-2.0 + * 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 diff --git a/chart2/source/model/template/CorrelationCircleChartType.hxx b/chart2/source/model/template/CorrelationCircleChartType.hxx index 74b0e87906e0..bf434268fc6b 100644 --- a/chart2/source/model/template/CorrelationCircleChartType.hxx +++ b/chart2/source/model/template/CorrelationCircleChartType.hxx @@ -1,13 +1,12 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */ /* - * Copyright the LibreOffice contributors. - * - * SPDX-License-Identifier: MPL-2.0 + * 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/. */ + #pragma once #include diff --git a/chart2/source/model/template/CorrelationCircleChartTypeTemplate.cxx b/chart2/source/model/template/CorrelationCircleChartTypeTemplate.cxx index 7f0bb60ce9a3..f63ab5f82a29 100644 --- a/chart2/source/model/template/CorrelationCircleChartTypeTemplate.cxx +++ b/chart2/source/model/template/CorrelationCircleChartTypeTemplate.cxx @@ -1,8 +1,6 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */ /* - * Copyright the LibreOffice contributors. - * - * SPDX-License-Identifier: MPL-2.0 + * 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 diff --git a/chart2/source/model/template/CorrelationCircleChartTypeTemplate.hxx b/chart2/source/model/template/CorrelationCircleChartTypeTemplate.hxx index 2d4d02412073..7906d52fc9c4 100644 --- a/chart2/source/model/template/CorrelationCircleChartTypeTemplate.hxx +++ b/chart2/source/model/template/CorrelationCircleChartTypeTemplate.hxx @@ -1,13 +1,12 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */ /* - * Copyright the LibreOffice contributors. - * - * SPDX-License-Identifier: MPL-2.0 + * 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/. */ + #pragma once #include diff --git a/chart2/source/model/template/CorrelationCircleDataInterpreter.cxx b/chart2/source/model/template/CorrelationCircleDataInterpreter.cxx index 18c0192c7ae8..58496604efce 100644 --- a/chart2/source/model/template/CorrelationCircleDataInterpreter.cxx +++ b/chart2/source/model/template/CorrelationCircleDataInterpreter.cxx @@ -1,8 +1,6 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */ /* - * Copyright the LibreOffice contributors. - * - * SPDX-License-Identifier: MPL-2.0 + * 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 diff --git a/chart2/source/model/template/CorrelationCircleDataInterpreter.hxx b/chart2/source/model/template/CorrelationCircleDataInterpreter.hxx index 778beb08e8d3..e7f2c45efc68 100644 --- a/chart2/source/model/template/CorrelationCircleDataInterpreter.hxx +++ b/chart2/source/model/template/CorrelationCircleDataInterpreter.hxx @@ -1,13 +1,12 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */ /* - * Copyright the LibreOffice contributors. - * - * SPDX-License-Identifier: MPL-2.0 + * 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/. */ + #pragma once #include diff --git a/chart2/source/view/charttypes/CorrelationCircleChart.cxx b/chart2/source/view/charttypes/CorrelationCircleChart.cxx index 621a2ef24056..06918877be82 100644 --- a/chart2/source/view/charttypes/CorrelationCircleChart.cxx +++ b/chart2/source/view/charttypes/CorrelationCircleChart.cxx @@ -1,8 +1,6 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */ /* - * Copyright the LibreOffice contributors. - * - * SPDX-License-Identifier: MPL-2.0 + * 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 diff --git a/chart2/source/view/charttypes/CorrelationCircleChart.hxx b/chart2/source/view/charttypes/CorrelationCircleChart.hxx index 6852fc0fbd9f..7c5c57a7080c 100644 --- a/chart2/source/view/charttypes/CorrelationCircleChart.hxx +++ b/chart2/source/view/charttypes/CorrelationCircleChart.hxx @@ -1,13 +1,12 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */ /* - * Copyright the LibreOffice contributors. - * - * SPDX-License-Identifier: MPL-2.0 + * 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/. */ + #pragma once #include diff --git a/formula/CppunitTest_formula_ooxml.mk b/formula/CppunitTest_formula_ooxml.mk index 5c082b9a47e5..3a479683b1ef 100644 --- a/formula/CppunitTest_formula_ooxml.mk +++ b/formula/CppunitTest_formula_ooxml.mk @@ -1,8 +1,6 @@ # -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t; fill-column: 100 -*- # -# Copyright the LibreOffice contributors. -# -# SPDX-License-Identifier: MPL-2.0 +# 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 diff --git a/formula/inc/OOXMLRewriter.hxx b/formula/inc/OOXMLRewriter.hxx index bd82e97f7d8b..f9a3d2c66119 100644 --- a/formula/inc/OOXMLRewriter.hxx +++ b/formula/inc/OOXMLRewriter.hxx @@ -1,8 +1,6 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */ /* - * Copyright the LibreOffice contributors. - * - * SPDX-License-Identifier: MPL-2.0 + * 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 diff --git a/formula/qa/unit/OOXMLRewriterTest.cxx b/formula/qa/unit/OOXMLRewriterTest.cxx index 47af68931752..c30017938192 100644 --- a/formula/qa/unit/OOXMLRewriterTest.cxx +++ b/formula/qa/unit/OOXMLRewriterTest.cxx @@ -1,8 +1,6 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */ /* - * Copyright the LibreOffice contributors. - * - * SPDX-License-Identifier: MPL-2.0 + * 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 diff --git a/formula/source/core/api/OOXMLRewriter.cxx b/formula/source/core/api/OOXMLRewriter.cxx index db448b8a8331..b181ef6824df 100644 --- a/formula/source/core/api/OOXMLRewriter.cxx +++ b/formula/source/core/api/OOXMLRewriter.cxx @@ -1,8 +1,6 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */ /* - * Copyright the LibreOffice contributors. - * - * SPDX-License-Identifier: MPL-2.0 + * 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 diff --git a/include/comphelper/propcontainerimplhelper.hxx b/include/comphelper/propcontainerimplhelper.hxx index f654e49b4418..1cea6e664122 100644 --- a/include/comphelper/propcontainerimplhelper.hxx +++ b/include/comphelper/propcontainerimplhelper.hxx @@ -1,8 +1,6 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */ /* - * Copyright the LibreOffice contributors. - * - * SPDX-License-Identifier: MPL-2.0 + * 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 diff --git a/include/comphelper/propimplhelper.hxx b/include/comphelper/propimplhelper.hxx index c1deba69eef2..fb882578d20f 100644 --- a/include/comphelper/propimplhelper.hxx +++ b/include/comphelper/propimplhelper.hxx @@ -1,8 +1,6 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */ /* - * Copyright the LibreOffice contributors. - * - * SPDX-License-Identifier: MPL-2.0 + * 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 diff --git a/include/comphelper/unique_unlock.hxx b/include/comphelper/unique_unlock.hxx index c8cb06728997..51c25ca64258 100644 --- a/include/comphelper/unique_unlock.hxx +++ b/include/comphelper/unique_unlock.hxx @@ -1,8 +1,6 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */ /* - * Copyright the LibreOffice contributors. - * - * SPDX-License-Identifier: MPL-2.0 + * 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 diff --git a/include/svx/fillbitmaplink.hxx b/include/svx/fillbitmaplink.hxx index 48ef03a74700..de06cb16f6f2 100644 --- a/include/svx/fillbitmaplink.hxx +++ b/include/svx/fillbitmaplink.hxx @@ -1,13 +1,12 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */ /* - * Copyright the LibreOffice contributors. - * - * SPDX-License-Identifier: MPL-2.0 + * 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 INCLUDED_SVX_FILLBITMAPLINK_HXX #define INCLUDED_SVX_FILLBITMAPLINK_HXX diff --git a/include/xmloff/SoundReference.hxx b/include/xmloff/SoundReference.hxx index 3bd673ecbb98..b508ed5fbac2 100644 --- a/include/xmloff/SoundReference.hxx +++ b/include/xmloff/SoundReference.hxx @@ -1,8 +1,6 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */ /* - * Copyright the LibreOffice contributors. - * - * SPDX-License-Identifier: MPL-2.0 + * 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 diff --git a/offapi/com/sun/star/chart/CorrelationCircleDiagram.idl b/offapi/com/sun/star/chart/CorrelationCircleDiagram.idl index 875268c26547..264f6e988b0a 100644 --- a/offapi/com/sun/star/chart/CorrelationCircleDiagram.idl +++ b/offapi/com/sun/star/chart/CorrelationCircleDiagram.idl @@ -1,8 +1,6 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */ /* - * Copyright the LibreOffice contributors. - * - * SPDX-License-Identifier: MPL-2.0 + * 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 diff --git a/offapi/com/sun/star/presentation/XSoundReference.idl b/offapi/com/sun/star/presentation/XSoundReference.idl index fd9644cf2221..9e7513197930 100644 --- a/offapi/com/sun/star/presentation/XSoundReference.idl +++ b/offapi/com/sun/star/presentation/XSoundReference.idl @@ -1,8 +1,6 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */ /* - * Copyright the LibreOffice contributors. - * - * SPDX-License-Identifier: MPL-2.0 + * 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 diff --git a/sc/CppunitTest_sc_dynamic_array_functions_test.mk b/sc/CppunitTest_sc_dynamic_array_functions_test.mk index 36ea8374aa98..10d3f29c5b05 100644 --- a/sc/CppunitTest_sc_dynamic_array_functions_test.mk +++ b/sc/CppunitTest_sc_dynamic_array_functions_test.mk @@ -1,8 +1,6 @@ # -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t; fill-column: 100 -*- # -# Copyright the LibreOffice contributors. -# -# SPDX-License-Identifier: MPL-2.0 +# 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 diff --git a/sc/CppunitTest_sc_oox_helpers_test.mk b/sc/CppunitTest_sc_oox_helpers_test.mk index 1c2072d6700a..300d395e86e4 100644 --- a/sc/CppunitTest_sc_oox_helpers_test.mk +++ b/sc/CppunitTest_sc_oox_helpers_test.mk @@ -1,8 +1,6 @@ # -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t; fill-column: 100 -*- # -# Copyright the LibreOffice contributors. -# -# SPDX-License-Identifier: MPL-2.0 +# 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 diff --git a/sc/qa/uitest/chart2/correlationCircle.py b/sc/qa/uitest/chart2/correlationCircle.py index 21f44b9ffc8a..9a712eaf0fb5 100644 --- a/sc/qa/uitest/chart2/correlationCircle.py +++ b/sc/qa/uitest/chart2/correlationCircle.py @@ -1,8 +1,6 @@ # -*- tab-width: 4; indent-tabs-mode: nil; py-indent-offset: 4 -*- # -# Copyright the LibreOffice contributors. -# -# SPDX-License-Identifier: MPL-2.0 +# 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 diff --git a/sc/qa/unit/RedundantParenthesesStripperTest.cxx b/sc/qa/unit/RedundantParenthesesStripperTest.cxx index 9720792bb26c..47c468cf3c98 100644 --- a/sc/qa/unit/RedundantParenthesesStripperTest.cxx +++ b/sc/qa/unit/RedundantParenthesesStripperTest.cxx @@ -1,8 +1,6 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */ /* - * Copyright the LibreOffice contributors. - * - * SPDX-License-Identifier: MPL-2.0 + * 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 diff --git a/sc/qa/unit/functions_dynamic_array.cxx b/sc/qa/unit/functions_dynamic_array.cxx index 6e05546be470..814a78f16d2a 100644 --- a/sc/qa/unit/functions_dynamic_array.cxx +++ b/sc/qa/unit/functions_dynamic_array.cxx @@ -1,8 +1,6 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */ /* - * Copyright the LibreOffice contributors. - * - * SPDX-License-Identifier: MPL-2.0 + * 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 diff --git a/sc/qa/unit/ucalc_spilled_range.cxx b/sc/qa/unit/ucalc_spilled_range.cxx index 50974cfdb329..5309ef53a821 100644 --- a/sc/qa/unit/ucalc_spilled_range.cxx +++ b/sc/qa/unit/ucalc_spilled_range.cxx @@ -1,8 +1,6 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */ /* - * Copyright the LibreOffice contributors. - * - * SPDX-License-Identifier: MPL-2.0 + * 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 diff --git a/sc/source/filter/inc/personsfragment.hxx b/sc/source/filter/inc/personsfragment.hxx index 7268644a9548..7814172e1c33 100644 --- a/sc/source/filter/inc/personsfragment.hxx +++ b/sc/source/filter/inc/personsfragment.hxx @@ -1,8 +1,6 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */ /* - * Copyright the LibreOffice contributors. - * - * SPDX-License-Identifier: MPL-2.0 + * 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 diff --git a/sc/source/filter/inc/threadedcommentsfragment.hxx b/sc/source/filter/inc/threadedcommentsfragment.hxx index dd2d74e570ba..b9d1fb4c90b7 100644 --- a/sc/source/filter/inc/threadedcommentsfragment.hxx +++ b/sc/source/filter/inc/threadedcommentsfragment.hxx @@ -1,8 +1,6 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */ /* - * Copyright the LibreOffice contributors. - * - * SPDX-License-Identifier: MPL-2.0 + * 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 diff --git a/sc/source/filter/oox/personsfragment.cxx b/sc/source/filter/oox/personsfragment.cxx index 953ee36c0dd2..b42f3ae11166 100644 --- a/sc/source/filter/oox/personsfragment.cxx +++ b/sc/source/filter/oox/personsfragment.cxx @@ -1,8 +1,6 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */ /* - * Copyright the LibreOffice contributors. - * - * SPDX-License-Identifier: MPL-2.0 + * 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 diff --git a/sc/source/filter/oox/threadedcommentsfragment.cxx b/sc/source/filter/oox/threadedcommentsfragment.cxx index 97a55de95105..2cd85f57061d 100644 --- a/sc/source/filter/oox/threadedcommentsfragment.cxx +++ b/sc/source/filter/oox/threadedcommentsfragment.cxx @@ -1,8 +1,6 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */ /* - * Copyright the LibreOffice contributors. - * - * SPDX-License-Identifier: MPL-2.0 + * 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 diff --git a/sc/source/ui/inc/operation/InsertThreadedCommentOperation.hxx b/sc/source/ui/inc/operation/InsertThreadedCommentOperation.hxx index 347d8926799d..7a9156031cd6 100644 --- a/sc/source/ui/inc/operation/InsertThreadedCommentOperation.hxx +++ b/sc/source/ui/inc/operation/InsertThreadedCommentOperation.hxx @@ -1,8 +1,6 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */ /* - * Copyright the LibreOffice contributors. - * - * SPDX-License-Identifier: MPL-2.0 + * 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 diff --git a/sc/source/ui/operation/InsertThreadedCommentOperation.cxx b/sc/source/ui/operation/InsertThreadedCommentOperation.cxx index d3b30834b832..a783e9532fd2 100644 --- a/sc/source/ui/operation/InsertThreadedCommentOperation.cxx +++ b/sc/source/ui/operation/InsertThreadedCommentOperation.cxx @@ -1,8 +1,6 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */ /* - * Copyright the LibreOffice contributors. - * - * SPDX-License-Identifier: MPL-2.0 + * 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 diff --git a/sd/inc/SdSoundLink.hxx b/sd/inc/SdSoundLink.hxx index 0d9b00884dae..38db4bd9d97e 100644 --- a/sd/inc/SdSoundLink.hxx +++ b/sd/inc/SdSoundLink.hxx @@ -1,8 +1,6 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */ /* - * Copyright the LibreOffice contributors. - * - * SPDX-License-Identifier: MPL-2.0 + * 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 diff --git a/svx/inc/sdgclitm.hxx b/svx/inc/sdgclitm.hxx index ca7d16aae271..67153b49eec7 100644 --- a/svx/inc/sdgclitm.hxx +++ b/svx/inc/sdgclitm.hxx @@ -1,8 +1,6 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */ /* - * Copyright the LibreOffice contributors. - * - * SPDX-License-Identifier: MPL-2.0 + * 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 diff --git a/svx/source/xoutdev/fillbitmaplink.cxx b/svx/source/xoutdev/fillbitmaplink.cxx index 0a5256430d3e..d5027a984967 100644 --- a/svx/source/xoutdev/fillbitmaplink.cxx +++ b/svx/source/xoutdev/fillbitmaplink.cxx @@ -1,8 +1,6 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */ /* - * Copyright the LibreOffice contributors. - * - * SPDX-License-Identifier: MPL-2.0 + * 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 diff --git a/sw/inc/databindingnamespaces.hxx b/sw/inc/databindingnamespaces.hxx index 883a934de89a..467000d95b9b 100644 --- a/sw/inc/databindingnamespaces.hxx +++ b/sw/inc/databindingnamespaces.hxx @@ -1,8 +1,6 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */ /* - * Copyright the LibreOffice contributors. - * - * SPDX-License-Identifier: MPL-2.0 + * 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 diff --git a/sw/qa/core/text/EnhancedPDFExportHelper.cxx b/sw/qa/core/text/EnhancedPDFExportHelper.cxx index 714d06a5dcd9..b3b626304dbf 100644 --- a/sw/qa/core/text/EnhancedPDFExportHelper.cxx +++ b/sw/qa/core/text/EnhancedPDFExportHelper.cxx @@ -1,8 +1,6 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */ /* - * Copyright the LibreOffice contributors. - * - * SPDX-License-Identifier: MPL-2.0 + * 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 diff --git a/sw/source/core/inc/fillattrcache.hxx b/sw/source/core/inc/fillattrcache.hxx index 7211bc8dc122..bda5f5a18011 100644 --- a/sw/source/core/inc/fillattrcache.hxx +++ b/sw/source/core/inc/fillattrcache.hxx @@ -1,13 +1,12 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */ /* - * Copyright the LibreOffice contributors. - * - * SPDX-License-Identifier: MPL-2.0 + * 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 INCLUDED_SW_SOURCE_CORE_INC_FILLATTRCACHE_HXX #define INCLUDED_SW_SOURCE_CORE_INC_FILLATTRCACHE_HXX diff --git a/uitest/uitest/uihelper/chart.py b/uitest/uitest/uihelper/chart.py index 27962f5001b7..6d8f0bed0151 100644 --- a/uitest/uitest/uihelper/chart.py +++ b/uitest/uitest/uihelper/chart.py @@ -1,8 +1,6 @@ # -*- tab-width: 4; indent-tabs-mode: nil; py-indent-offset: 4 -*- # -# Copyright the LibreOffice contributors. -# -# SPDX-License-Identifier: MPL-2.0 +# 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 From 14312e4eb8416888f9a645f0d5f4bf0da913ff38 Mon Sep 17 00:00:00 2001 From: "Armin Le Grand (collabora)" Date: Tue, 7 Jul 2026 21:42:26 +0200 Subject: [PATCH 149/289] Correct renaming of ObjectStyles II Whatever SdDrawDocument::renameObjectStylesIfNeeded is intended to do, it changes the look of SdrObjects when doing what it does. I am not sure if these are just the 'wrong' StyleSheets that got copied or something else. It may happen when slides from more than two sources get copied to a document: The newly imported styles get 'extended' names following a naming scheme. When pasting from a 2nd document, the *same* names for slides get created using that naming scheme, so before these were re-used here assuming they have the same content - which is wrong. To just *ensure* that the objects look will not change, compare previous ItemValues with those ItemValues after changing the style, that guarantees equal look - for the cost of some more hard-set attributes, but less StyleSheets. I see that these corrections *are* done, so that is a clear hint that re-setting these Styles in this whole import has basic errors, I have to correct the values. Also use a SdrObjListIter, the version before *only* visited all SdrObjects plain on SdrPage, leaving all GroupContent out. Signed-off-by: Armin Le Grand (collabora) Change-Id: I0cf1f823bddcea0b0087244268d1dc224da39638 Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/6449 Reviewed-by: Armin Le Grand Tested-by: Jenkins CPCI (cherry picked from commit 605790cb198686d382c809de949094755e70e833) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/208432 Tested-by: Jenkins Reviewed-by: Xisco Fauli --- sd/source/core/drawdoc3.cxx | 58 +++++++++++++++++++++++++++++++++---- 1 file changed, 52 insertions(+), 6 deletions(-) diff --git a/sd/source/core/drawdoc3.cxx b/sd/source/core/drawdoc3.cxx index c319561f74a1..c765e9eb423b 100644 --- a/sd/source/core/drawdoc3.cxx +++ b/sd/source/core/drawdoc3.cxx @@ -30,6 +30,8 @@ #include #include +#include +#include #include #include #include @@ -1035,15 +1037,59 @@ void SdDrawDocument::renameObjectStylesIfNeeded(sal_uInt32 nInsertPos, try { for (sal_uInt32 p = nInsertPos; p < nInsertPos + nBMSdPageCount ; p++) { - if (SdPage* pPage = static_cast(GetPage(p))) { - for (const rtl::Reference& pObj : *pPage) + if (SdPage* pPage = static_cast(GetPage(p))) + { + // iterate over ALL SdrObjects, including GroupContent + SdrObjListIter aObjIter(pPage); + + for (SdrObject* pObject(aObjIter.Next()); pObject; pObject = aObjIter.Next()) { - if (pObj->GetStyleSheet()) + if (pObject->GetStyleSheet()) { - OUString aStyleName = pObj->GetStyleSheet()->GetName(); - SfxStyleSheet* pSheet = lcl_findStyle(rStyleContext.aGraphicStyles, Concat2View(aStyleName + rStyleContext.aRenameString)); + const OUString& rStyleName(pObject->GetStyleSheet()->GetName()); + SfxStyleSheet* pSheet = lcl_findStyle(rStyleContext.aGraphicStyles, Concat2View(rStyleName + rStyleContext.aRenameString)); + if (pSheet) - pObj->SetStyleSheet(pSheet, true); + { + // for whatever reason this change of StyleSheet *changes* the look of SdrObjects, + // which is not wanted. I am not sure if these are just the 'wrong' StyleSheets that + // got copied or something else. It may happen when slides from more than two sources + // get copied to a document: The newly imported styles get 'extended' names following + // a naming scheme. When pasting from a 2nd document, the *same* names for slides get + // created using that naming scheme, so before these were re-used here assuming they + // have the same content - which is wrong. + // To just *ensure* that the objects look will not change, compare previous ItemValues + // with those ItemValues after changing the style, that guarantees equal look - for the + // cost of some more hard-set attributes, but less StyleSheets. + // i see that these corrections *are* done, so that is a clear hint that re-setting + // these Styles in this whole import has basic errors, I have to correct the values. + + // To do so: create a copy of the current state of all Items with the original + // state, as hard attribute, in a temporary SfxItemSet, using deep-detection (bParent == true) + SfxItemSet aCopyOfOrig(*pObject->GetMergedItemSet().GetPool(), pObject->GetMergedItemSet().GetRanges()); + SfxWhichIter aWhichIter(pObject->GetMergedItemSet()); + for (sal_uInt16 nWhich = aWhichIter.FirstWhich(); nWhich; nWhich = aWhichIter.NextWhich()) + aCopyOfOrig.Put(pObject->GetMergedItem(nWhich)); + + // set new style + pObject->SetStyleSheet(pSheet, true); + + // iterate over Items after StyleSheet change, also deep-detection (bParent == true) + for (sal_uInt16 nWhich = aWhichIter.FirstWhich(); nWhich; nWhich = aWhichIter.NextWhich()) + { + const SfxPoolItem& rOld(aCopyOfOrig.Get(nWhich)); + const SfxPoolItem& rNew(pObject->GetMergedItem(nWhich)); + + // if that Item *changed* from the SdrObject's perspective + // *including* the newly applied Style, it is wrong. + // Set that Item to original as hard/direct Item to get that + // value reliably back. + // NOTE: When looking at some cases this needed to be done for + // about eight to twelve Items, not too much + if (!SfxPoolItem::areSame(rOld, rNew)) + pObject->SetMergedItem(rOld); + } + } } } } From 1c0b50766a70bce7a979106ea5cdc5c447030f82 Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Tue, 7 Jul 2026 09:12:39 +0200 Subject: [PATCH 150/289] Fix heap-use-after-free ...as seen once during JunitTest_forms_complex, > ==2007790==ERROR: AddressSanitizer: heap-use-after-free on address 0x7ccbfe8b3a38 at pc 0x7f5c5361ed51 bp 0x7b5bd4ac7420 sp 0x7b5bd4ac7418 > READ of size 2 at 0x7ccbfe8b3a38 thread T8 > #0 in SfxItemPool::IsInRange(unsigned short) const at engine/include/svl/itempool.hxx:331:66 > #1 in SfxItemPool::getTargetPool(unsigned short) const at engine/svl/source/items/itempool.cxx:452:9 > #2 in SfxItemPool::CheckItemInfoFlag(unsigned short, unsigned short) const at engine/svl/source/items/itempool.cxx:461:26 > #3 in SfxItemPool::NeedsSurrogateSupport(unsigned short) const at engine/include/svl/itempool.hxx:343:18 > #4 in SfxItemSet::checkRemovePoolRegistration(SfxPoolItem const*) at engine/svl/source/items/itemset.cxx:384:20 > #5 in SfxItemSet::ClearSingleItem_PrepareRemove(SfxPoolItem const*) at engine/svl/source/items/itemset.cxx:364:5 > #6 in SfxItemSet::ClearAllItemsImpl() at engine/svl/source/items/itemset.cxx:443:9 > #7 in SfxItemSet::~SfxItemSet() at engine/svl/source/items/itemset.cxx:318:5 > #8 in std::_Optional_payload_base::_M_destroy() at ~/gcc/inst/lib/gcc/x86_64-pc-linux-gnu/17.0.0/../../../../include/c++/17.0.0/optional:305:23 > #9 in std::_Optional_payload_base::_M_reset() at ~/gcc/inst/lib/gcc/x86_64-pc-linux-gnu/17.0.0/../../../../include/c++/17.0.0/optional:341:4 > #10 in std::_Optional_payload::~_Optional_payload() at ~/gcc/inst/lib/gcc/x86_64-pc-linux-gnu/17.0.0/../../../../include/c++/17.0.0/optional:464:57 > #11 in std::_Optional_base::~_Optional_base() at ~/gcc/inst/lib/gcc/x86_64-pc-linux-gnu/17.0.0/../../../../include/c++/17.0.0/optional:488:12 > #12 in std::optional::~optional() at ~/gcc/inst/lib/gcc/x86_64-pc-linux-gnu/17.0.0/../../../../include/c++/17.0.0/optional:781:11 > #13 in sdr::properties::DefaultProperties::~DefaultProperties() at engine/svx/source/sdr/properties/defaultproperties.cxx:92:50 > #14 in sdr::properties::AttributeProperties::~AttributeProperties() at engine/svx/source/sdr/properties/attributeproperties.cxx:221:9 > #15 in sdr::properties::TextProperties::~TextProperties() at engine/svx/source/sdr/properties/textproperties.cxx:79:9 > #16 in sdr::properties::RectangleProperties::~RectangleProperties() at engine/svx/source/sdr/properties/rectangleproperties.cxx:38:9 > #17 in sdr::properties::RectangleProperties::~RectangleProperties() at engine/svx/source/sdr/properties/rectangleproperties.cxx:37:9 > #18 in std::default_delete::operator()(sdr::properties::BaseProperties*) const at ~/gcc/inst/lib/gcc/x86_64-pc-linux-gnu/17.0.0/../../../../include/c++/17.0.0/bits/unique_ptr.h:92:2 > #19 in std::__uniq_ptr_impl>::reset(sdr::properties::BaseProperties*) at ~/gcc/inst/lib/gcc/x86_64-pc-linux-gnu/17.0.0/../../../../include/c++/17.0.0/bits/unique_ptr.h:204:4 > #20 in std::unique_ptr>::reset(sdr::properties::BaseProperties*) at ~/gcc/inst/lib/gcc/x86_64-pc-linux-gnu/17.0.0/../../../../include/c++/17.0.0/bits/unique_ptr.h:530:7 > #21 in SdrObject::~SdrObject() at engine/svx/source/svdraw/svdobj.cxx:589:18 > #22 in SdrAttrObj::~SdrAttrObj() at engine/svx/source/svdraw/svdoattr.cxx:42:28 > #23 in SdrTextObj::~SdrTextObj() at engine/svx/source/svdraw/svdotext.cxx:156:1 > #24 in SdrRectObj::~SdrRectObj() at engine/svx/source/svdraw/svdorect.cxx:69:25 > #25 in SdrUnoObj::~SdrUnoObj() at engine/svx/source/svdraw/svdouno.cxx:223:1 > #26 in FmFormObj::~FmFormObj() at engine/svx/source/form/fmobj.cxx:120:1 > #27 in FmFormObj::~FmFormObj() at engine/svx/source/form/fmobj.cxx:113:1 > #28 in SdrObject::release() at engine/svx/source/svdraw/svdobj.cxx:612:9 > #29 in rtl::Reference::clear() at engine/include/rtl/ref.hxx:181:19 > #30 in SvxShape::~SvxShape() at engine/svx/source/unodraw/unoshape.cxx:199:21 > #31 in SvxShapeText::~SvxShapeText() at engine/svx/source/unodraw/unoshape.cxx:3828:1 > #32 in SvxShapeControl::~SvxShapeControl() at engine/svx/source/unodraw/unoshap2.cxx:393:1 > #33 in SvxShapeControl::~SvxShapeControl() at engine/svx/source/unodraw/unoshap2.cxx:392:1 > #34 in cppu::OWeakObject::release() at engine/cppuhelper/source/weak.cxx:231:9 > #35 in cppu::OWeakAggObject::release() at engine/cppuhelper/source/weak.cxx:293:22 > #36 in cppu::WeakAggImplHelper12::release() at engine/include/cppuhelper/implbase12.hxx:161:31 > #37 in SvxShapeText::release() at engine/include/svx/unoshape.hxx:357:17 > #38 in SvxShapeControl::release() at engine/include/svx/unoshape.hxx:508:21 > #39 in freeUnoInterfaceProxy at engine/bridges/source/cpp_uno/shared/unointerfaceproxy.cxx:42:19 > #40 in (anonymous namespace)::s_stub_defenv_revokeInterface(__va_list_tag (*) [1]) at engine/cppu/source/uno/lbenv.cxx:369:17 > #41 in s_environment_invoke_v(_uno_Environment*, _uno_Environment*, void (*)(__va_list_tag (*) [1]), __va_list_tag (*) [1]) at engine/cppu/source/uno/EnvStack.cxx:292:9 > #42 in uno_Environment_invoke_v at engine/cppu/source/uno/EnvStack.cxx:310:5 > #43 in uno_Environment_invoke at engine/cppu/source/uno/EnvStack.cxx:318:5 > #44 in (anonymous namespace)::defenv_revokeInterface(_uno_ExtEnvironment*, void*) at engine/cppu/source/uno/lbenv.cxx:423:5 > #45 in releaseProxy at engine/bridges/source/cpp_uno/shared/unointerfaceproxy.cxx:78:9 > #46 in com::sun::star::uno::UnoInterfaceReference::~UnoInterfaceReference() at engine/include/uno/dispatcher.hxx:93:9 > #47 in binaryurp::Bridge::releaseStub(rtl::OUString const&, com::sun::star::uno::TypeDescription const&) at engine/binaryurp/source/bridge.cxx:509:1 > #48 in binaryurp::IncomingRequest::execute_throw(binaryurp::BinaryAny*, std::__debug::vector>*) const at engine/binaryurp/source/incomingrequest.cxx:138:18 > #49 in binaryurp::IncomingRequest::execute() const at engine/binaryurp/source/incomingrequest.cxx:79:26 > #50 in request at engine/binaryurp/source/reader.cxx:86:9 > #51 in cppu_threadpool::JobQueue::enter(void const*, bool) at engine/cppu/source/threadpool/jobqueue.cxx:100:17 > #52 in cppu_threadpool::ORequestThread::run() at engine/cppu/source/threadpool/thread.cxx:165:31 > #53 in threadFunc at engine/include/osl/thread.hxx:175:15 > #54 in osl_thread_start_Impl(void*) at engine/sal/osl/unx/thread.cxx:240:9 > > 0x7ccbfe8b3a38 is located 184 bytes inside of 648-byte region [0x7ccbfe8b3980,0x7ccbfe8b3c08) > freed by thread T23 here: > #0 in operator delete(void*, unsigned long) at ~/github.com/llvm/llvm-project/compiler-rt/lib/asan/asan_new_delete.cpp:187:3 > #1 in SdrItemPool::~SdrItemPool() at engine/svx/source/svdraw/svdattr.cxx:514:1 > #2 in salhelper::SimpleReferenceObject::release() at engine/include/salhelper/simplereferenceobject.hxx:61:13 > #3 in rtl::Reference::~Reference() at engine/include/rtl/ref.hxx:116:22 > #4 in SdrModel::~SdrModel() at engine/svx/source/svdraw/svdmodel.cxx:275:1 > #5 in FmFormModel::~FmFormModel() at engine/svx/source/form/fmmodel.cxx:69:1 > #6 in SdDrawDocument::~SdDrawDocument() at engine/sd/source/core/drawdoc.cxx:418:1 > #7 in sd::DrawDocShell::~DrawDocShell() at engine/sd/source/ui/docshell/docshell.cxx:192:9 > #8 in sd::GraphicDocShell::~GraphicDocShell() at engine/sd/source/ui/docshell/grdocsh.cxx:57:38 > #9 in sd::GraphicDocShell::~GraphicDocShell() at engine/sd/source/ui/docshell/grdocsh.cxx:57:37 > #10 in cppu::OWeakObject::release() at engine/cppuhelper/source/weak.cxx:231:9 > #11 in rtl::Reference::~Reference() at engine/include/rtl/ref.hxx:116:22 > #12 in IMPL_SfxBaseModel_DataContainer::~IMPL_SfxBaseModel_DataContainer() at engine/sfx2/source/doc/sfxbasemodel.cxx:268:5 > #13 in void std::destroy_at(IMPL_SfxBaseModel_DataContainer*) at ~/gcc/inst/lib/gcc/x86_64-pc-linux-gnu/17.0.0/../../../../include/c++/17.0.0/bits/stl_construct.h:88:15 > #14 in void std::_Destroy(IMPL_SfxBaseModel_DataContainer*) at ~/gcc/inst/lib/gcc/x86_64-pc-linux-gnu/17.0.0/../../../../include/c++/17.0.0/bits/stl_construct.h:164:7 > #15 in void std::allocator_traits>::destroy(std::allocator&, IMPL_SfxBaseModel_DataContainer*) at ~/gcc/inst/lib/gcc/x86_64-pc-linux-gnu/17.0.0/../../../../include/c++/17.0.0/bits/alloc_traits.h:863:4 > #16 in std::_Sp_counted_ptr_inplace, (__gnu_cxx::_Lock_policy)2>::_M_dispose() at ~/gcc/inst/lib/gcc/x86_64-pc-linux-gnu/17.0.0/../../../../include/c++/17.0.0/bits/shared_ptr_base.h:650:2 > #17 in std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release() at ~/gcc/inst/lib/gcc/x86_64-pc-linux-gnu/17.0.0/../../../../include/c++/17.0.0/bits/shared_ptr_base.h:423:8 > #18 in std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count() at ~/gcc/inst/lib/gcc/x86_64-pc-linux-gnu/17.0.0/../../../../include/c++/17.0.0/bits/shared_ptr_base.h:1100:11 > #19 in std::__shared_ptr::~__shared_ptr() at ~/gcc/inst/lib/gcc/x86_64-pc-linux-gnu/17.0.0/../../../../include/c++/17.0.0/bits/shared_ptr_base.h:1574:31 > #20 in std::__shared_ptr::reset() at ~/gcc/inst/lib/gcc/x86_64-pc-linux-gnu/17.0.0/../../../../include/c++/17.0.0/bits/shared_ptr_base.h:1692:9 > #21 in SfxBaseModel::dispose() at engine/sfx2/source/doc/sfxbasemodel.cxx:802:13 > #22 in SdXImpressDocument::dispose() at engine/sd/source/ui/unoidl/unomodel.cxx:5515:19 > #23 in SfxBaseModel::close(bool) at engine/sfx2/source/doc/sfxbasemodel.cxx:1544:5 > #24 in gcc3::callVirtualMethod(void*, unsigned int, void*, _typelib_TypeDescriptionReference*, bool, unsigned long*, unsigned int, unsigned long*, double*) at engine/bridges/source/cpp_uno/gcc3_linux_x86-64/callvirtualmethod.cxx:87:5 > #25 in cpp_call(bridges::cpp_uno::shared::UnoInterfaceProxy*, bridges::cpp_uno::shared::VtableSlot, _typelib_TypeDescriptionReference*, int, _typelib_MethodParameter*, void*, void**, _uno_Any**) at engine/bridges/source/cpp_uno/gcc3_linux_x86-64/uno2cpp.cxx:230:13 > #26 in unoInterfaceProxyDispatch at engine/bridges/source/cpp_uno/gcc3_linux_x86-64/uno2cpp.cxx:410:13 > #27 in binaryurp::IncomingRequest::execute_throw(binaryurp::BinaryAny*, std::__debug::vector>*) const at engine/binaryurp/source/incomingrequest.cxx:236:13 > #28 in binaryurp::IncomingRequest::execute() const at engine/binaryurp/source/incomingrequest.cxx:79:26 > #29 in request at engine/binaryurp/source/reader.cxx:86:9 > #30 in cppu_threadpool::JobQueue::enter(void const*, bool) at engine/cppu/source/threadpool/jobqueue.cxx:100:17 > #31 in cppu_threadpool::ORequestThread::run() at engine/cppu/source/threadpool/thread.cxx:165:31 > #32 in threadFunc at engine/include/osl/thread.hxx:175:15 > #33 in osl_thread_start_Impl(void*) at engine/sal/osl/unx/thread.cxx:240:9 Change-Id: Ib38eb730f9178976d4432f77857b4f09ebfbdbcf Signed-off-by: Stephan Bergmann Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/6296 Tested-by: Jenkins CPCI Reviewed-by: Michael Stahl (cherry picked from commit 7a151cb95d66be93ef2a2687d1ff55ca37daa410) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211728 Tested-by: Jenkins Reviewed-by: Xisco Fauli --- include/svx/sdr/properties/defaultproperties.hxx | 5 +++++ svx/source/sdr/properties/defaultproperties.cxx | 3 +++ 2 files changed, 8 insertions(+) diff --git a/include/svx/sdr/properties/defaultproperties.hxx b/include/svx/sdr/properties/defaultproperties.hxx index 868a141b5237..06ba74845630 100644 --- a/include/svx/sdr/properties/defaultproperties.hxx +++ b/include/svx/sdr/properties/defaultproperties.hxx @@ -25,8 +25,10 @@ #include #include +#include #include #include +#include #include struct _xmlTextWriter; @@ -36,6 +38,9 @@ namespace sdr::properties { class SVXCORE_DLLPUBLIC DefaultProperties : public BaseProperties { + // Make sure the pool outlives any use via moItemSet: + rtl::Reference m_itemPoolHolder; + protected: // the to be used ItemSet mutable std::optional moItemSet; diff --git a/svx/source/sdr/properties/defaultproperties.cxx b/svx/source/sdr/properties/defaultproperties.cxx index 3354172d3cb0..cf2d196f3862 100644 --- a/svx/source/sdr/properties/defaultproperties.cxx +++ b/svx/source/sdr/properties/defaultproperties.cxx @@ -21,6 +21,7 @@ #include #include +#include #include #include #include @@ -41,11 +42,13 @@ namespace sdr::properties DefaultProperties::DefaultProperties(SdrObject& rObj) : BaseProperties(rObj) + , m_itemPoolHolder(&rObj.getSdrModelFromSdrObject().GetItemPool()) { } DefaultProperties::DefaultProperties(const DefaultProperties& rProps, SdrObject& rObj) : BaseProperties(rObj) + , m_itemPoolHolder(&rObj.getSdrModelFromSdrObject().GetItemPool()) { if(!rProps.moItemSet) return; From 5519a3d4073ae4f04f8e1aa453fbc0ea9c8e19e4 Mon Sep 17 00:00:00 2001 From: "Armin Le Grand (collabora)" Date: Thu, 9 Jul 2026 20:52:38 +0200 Subject: [PATCH 151/289] Correct StyleSheet handling when cloning to different Model II Until now the 'local' StyleSheet got set, but that may not be the same as the original. It was/gets identified just by searching by name and type, not comparing content. What to do? We could... (a) the Style-Friendly way: - check if StyleSheet is identical - if not, create a new in-between StyleSheet hosting missing Items - if yes, use, done. (b) the pragmatic/practical way: - Just hard-attribute the Items that are detected as different similar to what BurnInStyleSheetAttributes does/did, but only for a view differing Items (b) is the most simple for now, but will lead to more hard attributes. The other possibilities will be better in the long term. For now, I will use (b). Note that there are more cases in that VERY complex and grown stuff emerging from SdDrawDocument::PasteBookmarkAsPage. More things will need to be fixed, see this as a 1st step. Needed to adapt postProcessAfterCloneToDifferentModel due to UT testTdf96206 failing, see comment there for details. That 1st implementation showed weaknesses with those Items critical and only on MasterPages, so decided to give up on that and implement ContentCompare to SdPage::Equals. That was easier than thought: No parameter needed, only used by InsertBookmarkAsPage_FindDuplicateLayouts::operator(). Thus, SdPage::Equals needs no change, just SdrObject::Equals. Due to still problems with Items corrected in Objects on MasterPages I will for now exclude this. Could now isolate remaining problems, these are defaults and/or PresObj things on MasterPages. Important is that I can completely correct all Items for all Objects in postProcessAfterCloneToDifferentModel. I can react to these false-positives in the ContentCompare in SdrObject::Equals. Signed-off-by: Armin Le Grand (collabora) Change-Id: I10e17c8d6a893dbe92ab716182f07bafce1f3284 Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/6595 Tested-by: Jenkins CPCI Reviewed-by: Armin Le Grand (cherry picked from commit 92ffaeac04c5c8586006b026f29ce12fba3674f1) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211729 Tested-by: Jenkins Reviewed-by: Xisco Fauli --- basctl/source/dlged/dlgedobj.cxx | 2 +- basctl/source/inc/dlgedobj.hxx | 6 +- include/svx/annotation/AnnotationObject.hxx | 2 +- include/svx/cube3d.hxx | 5 +- include/svx/lathe3d.hxx | 5 +- include/svx/obj3d.hxx | 11 +- include/svx/scene3d.hxx | 4 +- .../svx/sdr/properties/defaultproperties.hxx | 6 +- include/svx/sdr/properties/properties.hxx | 13 +- include/svx/sphere3d.hxx | 6 +- include/svx/svdoashp.hxx | 5 +- include/svx/svdobj.hxx | 11 +- include/svx/svdocapt.hxx | 5 +- include/svx/svdocirc.hxx | 6 +- include/svx/svdoedge.hxx | 4 +- include/svx/svdograf.hxx | 5 +- include/svx/svdogrp.hxx | 4 +- include/svx/svdomeas.hxx | 4 +- include/svx/svdomedia.hxx | 5 +- include/svx/svdoole2.hxx | 6 +- include/svx/svdopage.hxx | 3 +- include/svx/svdopath.hxx | 5 +- include/svx/svdorect.hxx | 5 +- include/svx/svdotable.hxx | 3 +- include/svx/svdotext.hxx | 4 +- include/svx/svdouno.hxx | 3 +- include/svx/svdovirt.hxx | 3 +- reportdesign/inc/RptObject.hxx | 4 +- reportdesign/source/core/sdr/RptObject.cxx | 4 +- sd/qa/unit/uiimpress.cxx | 2 +- svx/inc/extrud3d.hxx | 6 +- svx/inc/polygn3d.hxx | 4 +- .../sdr/properties/attributeproperties.hxx | 9 +- svx/inc/sdr/properties/captionproperties.hxx | 6 +- svx/inc/sdr/properties/cellproperties.hxx | 2 +- svx/inc/sdr/properties/circleproperties.hxx | 6 +- .../sdr/properties/connectorproperties.hxx | 6 +- .../sdr/properties/customshapeproperties.hxx | 7 +- .../sdr/properties/e3dcompoundproperties.hxx | 8 +- .../sdr/properties/e3dextrudeproperties.hxx | 6 +- svx/inc/sdr/properties/e3dlatheproperties.hxx | 6 +- svx/inc/sdr/properties/e3dproperties.hxx | 6 +- svx/inc/sdr/properties/e3dsceneproperties.hxx | 6 +- .../sdr/properties/e3dsphereproperties.hxx | 6 +- svx/inc/sdr/properties/emptyproperties.hxx | 6 +- svx/inc/sdr/properties/graphicproperties.hxx | 6 +- svx/inc/sdr/properties/groupproperties.hxx | 7 +- svx/inc/sdr/properties/measureproperties.hxx | 6 +- svx/inc/sdr/properties/oleproperties.hxx | 6 +- svx/inc/sdr/properties/pageproperties.hxx | 6 +- .../sdr/properties/rectangleproperties.hxx | 6 +- svx/inc/sdr/properties/textproperties.hxx | 7 +- svx/source/annotation/AnnotationObject.cxx | 2 +- svx/source/engine3d/cube3d.cxx | 2 +- svx/source/engine3d/extrud3d.cxx | 2 +- svx/source/engine3d/lathe3d.cxx | 2 +- svx/source/engine3d/obj3d.cxx | 4 +- svx/source/engine3d/polygn3d.cxx | 2 +- svx/source/engine3d/scene3d.cxx | 2 +- svx/source/engine3d/sphere3d.cxx | 2 +- svx/source/form/fmobj.cxx | 2 +- svx/source/inc/fmobj.hxx | 4 +- .../sdr/properties/attributeproperties.cxx | 157 +++++++++++------- .../sdr/properties/captionproperties.cxx | 2 +- .../sdr/properties/circleproperties.cxx | 2 +- .../sdr/properties/connectorproperties.cxx | 2 +- .../sdr/properties/customshapeproperties.cxx | 2 +- .../sdr/properties/defaultproperties.cxx | 2 +- .../sdr/properties/e3dcompoundproperties.cxx | 2 +- .../sdr/properties/e3dextrudeproperties.cxx | 2 +- .../sdr/properties/e3dlatheproperties.cxx | 2 +- svx/source/sdr/properties/e3dproperties.cxx | 2 +- .../sdr/properties/e3dsceneproperties.cxx | 2 +- .../sdr/properties/e3dsphereproperties.cxx | 2 +- svx/source/sdr/properties/emptyproperties.cxx | 2 +- .../sdr/properties/graphicproperties.cxx | 2 +- svx/source/sdr/properties/groupproperties.cxx | 2 +- .../sdr/properties/measureproperties.cxx | 2 +- svx/source/sdr/properties/oleproperties.cxx | 2 +- svx/source/sdr/properties/pageproperties.cxx | 2 +- svx/source/sdr/properties/properties.cxx | 9 + .../sdr/properties/rectangleproperties.cxx | 2 +- svx/source/sdr/properties/textproperties.cxx | 2 +- svx/source/svdraw/svdoashp.cxx | 2 +- svx/source/svdraw/svdobj.cxx | 101 ++++++++++- svx/source/svdraw/svdocapt.cxx | 2 +- svx/source/svdraw/svdocirc.cxx | 2 +- svx/source/svdraw/svdoedge.cxx | 2 +- svx/source/svdraw/svdograf.cxx | 2 +- svx/source/svdraw/svdogrp.cxx | 2 +- svx/source/svdraw/svdomeas.cxx | 2 +- svx/source/svdraw/svdomedia.cxx | 2 +- svx/source/svdraw/svdoole2.cxx | 2 +- svx/source/svdraw/svdopage.cxx | 2 +- svx/source/svdraw/svdopath.cxx | 2 +- svx/source/svdraw/svdorect.cxx | 2 +- svx/source/svdraw/svdotext.cxx | 2 +- svx/source/svdraw/svdouno.cxx | 2 +- svx/source/svdraw/svdovirt.cxx | 2 +- svx/source/table/cell.cxx | 2 +- svx/source/table/svdotable.cxx | 6 +- sw/inc/dcontact.hxx | 5 +- sw/source/core/draw/dcontact.cxx | 2 +- sw/source/core/draw/dflyobj.cxx | 2 +- sw/source/core/inc/dflyobj.hxx | 7 +- 105 files changed, 400 insertions(+), 268 deletions(-) diff --git a/basctl/source/dlged/dlgedobj.cxx b/basctl/source/dlged/dlgedobj.cxx index b65fd897a6b2..c70b74f6a415 100644 --- a/basctl/source/dlged/dlgedobj.cxx +++ b/basctl/source/dlged/dlgedobj.cxx @@ -901,7 +901,7 @@ SdrObjKind DlgEdObj::GetObjIdentifier() const } } -rtl::Reference DlgEdObj::CloneSdrObject(SdrModel& rTargetModel) const +rtl::Reference DlgEdObj::implCloneSdrObject(SdrModel& rTargetModel) const { return new DlgEdObj(rTargetModel, *this); } diff --git a/basctl/source/inc/dlgedobj.hxx b/basctl/source/inc/dlgedobj.hxx index 469628ae75fe..488fc9b737f9 100644 --- a/basctl/source/inc/dlgedobj.hxx +++ b/basctl/source/inc/dlgedobj.hxx @@ -47,15 +47,15 @@ class DlgEdObj: public SdrUnoObj friend class DlgEdPropListenerImpl; friend class DlgEdForm; -private: bool bIsListening; rtl::Reference pDlgEdForm; rtl::Reference m_xPropertyChangeListener; rtl::Reference m_xContainerListener; -private: DlgEditor& GetDialogEditor (); + virtual rtl::Reference implCloneSdrObject(SdrModel& rTargetModel) const override; // not working yet + protected: DlgEdObj(SdrModel& rSdrModel); // copy constructor @@ -98,8 +98,6 @@ public: virtual SdrInventor GetObjInventor() const override; virtual SdrObjKind GetObjIdentifier() const override; - virtual rtl::Reference CloneSdrObject(SdrModel& rTargetModel) const override; // not working yet - // FullDrag support virtual rtl::Reference getFullDragClone() const override; diff --git a/include/svx/annotation/AnnotationObject.hxx b/include/svx/annotation/AnnotationObject.hxx index 79732042465f..922c3a1d5b60 100644 --- a/include/svx/annotation/AnnotationObject.hxx +++ b/include/svx/annotation/AnnotationObject.hxx @@ -38,7 +38,7 @@ public: void setup(); - rtl::Reference CloneSdrObject(SdrModel& rTargetModel) const override; + rtl::Reference implCloneSdrObject(SdrModel& rTargetModel) const override; SdrObjKind GetObjIdentifier() const override; OUString TakeObjNameSingul() const override; diff --git a/include/svx/cube3d.hxx b/include/svx/cube3d.hxx index 3c8323197f8e..96075956819e 100644 --- a/include/svx/cube3d.hxx +++ b/include/svx/cube3d.hxx @@ -54,10 +54,11 @@ class SAL_WARN_UNUSED E3dCubeObj final : public E3dCompoundObject void SetDefaultAttributes(const E3dDefaultAttributes& rDefault); virtual std::unique_ptr CreateObjectSpecificViewContact() override; -private: // protected destructor - due to final, make private virtual ~E3dCubeObj() override; + virtual rtl::Reference implCloneSdrObject(SdrModel& rTargetModel) const override; + public: SVXCORE_DLLPUBLIC E3dCubeObj(SdrModel& rSdrModel, const E3dDefaultAttributes& rDefault, @@ -69,8 +70,6 @@ public: virtual SdrObjKind GetObjIdentifier() const override; virtual rtl::Reference DoConvertToPolyObj(bool bBezier, bool bAddText) const override; - virtual rtl::Reference CloneSdrObject(SdrModel& rTargetModel) const override; - // Set local parameters with geometry recreation void SetCubePos(const basegfx::B3DPoint& rNew); const basegfx::B3DPoint& GetCubePos() const { return m_aCubePos; } diff --git a/include/svx/lathe3d.hxx b/include/svx/lathe3d.hxx index d442119ad430..53abedc97056 100644 --- a/include/svx/lathe3d.hxx +++ b/include/svx/lathe3d.hxx @@ -47,10 +47,11 @@ class E3dLatheObj final : public E3dCompoundObject virtual std::unique_ptr CreateObjectSpecificProperties() override; void SetDefaultAttributes(const E3dDefaultAttributes& rDefault); -private: // protected destructor - due to final, make private virtual ~E3dLatheObj() override; + virtual rtl::Reference implCloneSdrObject(SdrModel& rTargetModel) const override; + public: SVXCORE_DLLPUBLIC E3dLatheObj( SdrModel& rSdrModel, @@ -101,8 +102,6 @@ public: virtual SdrObjKind GetObjIdentifier() const override; - virtual rtl::Reference CloneSdrObject(SdrModel& rTargetModel) const override; - virtual rtl::Reference DoConvertToPolyObj(bool bBezier, bool bAddText) const override; // TakeObjName...() is for the display in the UI, for example "3 frames selected". diff --git a/include/svx/obj3d.hxx b/include/svx/obj3d.hxx index 26f7a56d1d5d..d632c0059eb1 100644 --- a/include/svx/obj3d.hxx +++ b/include/svx/obj3d.hxx @@ -61,11 +61,12 @@ public: class SVXCORE_DLLPUBLIC E3dObject : public SdrAttrObj { -private: // Allow everything for E3dObjList and E3dDragMethod friend class E3dDragMethod; - protected: + virtual rtl::Reference implCloneSdrObject(SdrModel& rTargetModel) const override; + +protected: virtual std::unique_ptr CreateObjectSpecificProperties() override; basegfx::B3DRange maLocalBoundVol; // surrounding volume of the object (from the geometry generation) @@ -125,7 +126,6 @@ public: // TakeObjName...() is for the display in the UI, for example "3 frames selected". virtual OUString TakeObjNameSingul() const override; virtual OUString TakeObjNamePlural() const override; - virtual rtl::Reference CloneSdrObject(SdrModel& rTargetModel) const override; virtual std::unique_ptr NewGeoData() const override; virtual void SaveGeoData(SdrObjGeoData& rGeo) const override; @@ -152,13 +152,14 @@ public: class SVXCORE_DLLPUBLIC E3dCompoundObject : public E3dObject { -private: // to allow sdr::properties::E3dCompoundProperties access to SetGeometryValid() friend class sdr::properties::E3dCompoundProperties; friend class sdr::properties::E3dExtrudeProperties; friend class sdr::properties::E3dLatheProperties; friend class sdr::properties::E3dSphereProperties; + virtual rtl::Reference implCloneSdrObject(SdrModel& rTargetModel) const override; + protected: virtual std::unique_ptr CreateObjectSpecificProperties() override; @@ -179,8 +180,6 @@ public: virtual SdrObjKind GetObjIdentifier() const override; virtual void RecalcSnapRect() override; - - virtual rtl::Reference CloneSdrObject(SdrModel& rTargetModel) const override; }; #endif // INCLUDED_SVX_OBJ3D_HXX diff --git a/include/svx/scene3d.hxx b/include/svx/scene3d.hxx index 02da7a56495f..86158da94d71 100644 --- a/include/svx/scene3d.hxx +++ b/include/svx/scene3d.hxx @@ -73,6 +73,8 @@ class SVXCORE_DLLPUBLIC E3dScene final : public E3dObject, public SdrObjList void SetDefaultAttributes(); void ImpCleanup3DDepthMapper(); + virtual rtl::Reference implCloneSdrObject(SdrModel& rTargetModel) const override; + public: E3dScene(SdrModel& rSdrModel); E3dScene(SdrModel& rSdrModel, E3dScene const &); @@ -120,8 +122,6 @@ public: const Camera3D& GetCamera() const { return m_aCamera; } void removeAllNonSelectedObjects(); - virtual rtl::Reference CloneSdrObject(SdrModel& rTargetModel) const override; - virtual std::unique_ptr NewGeoData() const override; virtual void SaveGeoData(SdrObjGeoData& rGeo) const override; virtual void RestoreGeoData(const SdrObjGeoData& rGeo) override; diff --git a/include/svx/sdr/properties/defaultproperties.hxx b/include/svx/sdr/properties/defaultproperties.hxx index 06ba74845630..d41606892426 100644 --- a/include/svx/sdr/properties/defaultproperties.hxx +++ b/include/svx/sdr/properties/defaultproperties.hxx @@ -41,6 +41,9 @@ namespace sdr::properties // Make sure the pool outlives any use via moItemSet: rtl::Reference m_itemPoolHolder; + // Clone() operator, normally just calls the local copy constructor + SAL_DLLPRIVATE virtual std::unique_ptr implCloneProperties(SdrObject& rObj) const override; + protected: // the to be used ItemSet mutable std::optional moItemSet; @@ -81,9 +84,6 @@ namespace sdr::properties SAL_DLLPRIVATE void dumpAsXml(xmlTextWriterPtr pWriter) const override; - // Clone() operator, normally just calls the local copy constructor - SAL_DLLPRIVATE virtual std::unique_ptr Clone(SdrObject& rObj) const override; - // get itemset SAL_DLLPRIVATE virtual const SfxItemSet& GetObjectItemSet() const override; diff --git a/include/svx/sdr/properties/properties.hxx b/include/svx/sdr/properties/properties.hxx index dce0c01c1e2b..1d4e199aaffb 100644 --- a/include/svx/sdr/properties/properties.hxx +++ b/include/svx/sdr/properties/properties.hxx @@ -72,15 +72,16 @@ namespace sdr::properties { class SVXCORE_DLLPUBLIC BaseProperties { - private: // the owner of this Properties. Set from constructor and not // to be changed in any way. SdrObject& mrObject; + // thje Clone-implementations, overloaded for each derivation + virtual std::unique_ptr implCloneProperties(SdrObject& rObj) const = 0; + protected: // internal access to SdrObject const SdrObject& GetSdrObject() const; - SdrObject& GetSdrObject(); public: @@ -90,11 +91,17 @@ namespace sdr::properties // destructor virtual ~BaseProperties(); + // create needed SfxItemSet, overloaded in all derivations as needed virtual SfxItemSet CreateObjectSpecificItemSet(SfxItemPool& pPool) = 0; + // Regulates Styles/Items between models when a Clone to another model + // was done. This is needed to evtl. also clone Styles and/or attributes + // to target model + virtual void postProcessAfterCloneToDifferentModel(const SdrObject& rSrcObj); + // Clone() operator, normally just calls the local copy constructor, // see above. - virtual std::unique_ptr Clone(SdrObject& rObj) const = 0; + std::unique_ptr Clone(SdrObject& rObj) const; // Get the local ItemSet. This directly returns the local ItemSet of the object. No // merging of ItemSets is done for e.g. Group objects. diff --git a/include/svx/sphere3d.hxx b/include/svx/sphere3d.hxx index 42bd8ebbfa53..500a03ccd58e 100644 --- a/include/svx/sphere3d.hxx +++ b/include/svx/sphere3d.hxx @@ -34,7 +34,6 @@ class E3dDefaultAttributes; */ class E3dSphereObj final : public E3dCompoundObject { -private: basegfx::B3DPoint m_aCenter; basegfx::B3DVector m_aSize; @@ -42,10 +41,11 @@ private: virtual std::unique_ptr CreateObjectSpecificProperties() override; void SetDefaultAttributes(const E3dDefaultAttributes& rDefault); -private: // protected destructor - due to final, make private virtual ~E3dSphereObj() override; + virtual rtl::Reference implCloneSdrObject(SdrModel& rTargetModel) const override; + public: SVXCORE_DLLPUBLIC E3dSphereObj( SdrModel& rSdrModel, @@ -70,8 +70,6 @@ public: virtual SdrObjKind GetObjIdentifier() const override; virtual rtl::Reference DoConvertToPolyObj(bool bBezier, bool bAddText) const override; - virtual rtl::Reference CloneSdrObject(SdrModel& rTargetModel) const override; - const basegfx::B3DPoint& Center() const { return m_aCenter; } const basegfx::B3DVector& Size() const { return m_aSize; } diff --git a/include/svx/svdoashp.hxx b/include/svx/svdoashp.hxx index b57f1a3f89eb..138da821537c 100644 --- a/include/svx/svdoashp.hxx +++ b/include/svx/svdoashp.hxx @@ -74,11 +74,12 @@ struct SdrCustomShapeInteraction class SVXCORE_DLLPUBLIC SdrObjCustomShape : public SdrTextObj { -private: // fObjectRotation is containing the object rotation in degrees. double m_fObjectRotation; bool mbAdjustingTextFrameWidthAndHeight; + virtual rtl::Reference implCloneSdrObject(SdrModel& rTargetModel) const override; + protected: virtual std::unique_ptr CreateObjectSpecificViewContact() override; virtual void setUnoShape(const css::uno::Reference& rxUnoShape) override; @@ -113,7 +114,6 @@ public: // returns the new text rect that corresponds to the current logic rect, the return value can be empty if nothing changed. tools::Rectangle ImpCalculateTextFrame( const bool bHgt, const bool bWdt ); -public: // #i37011# const SdrObject* GetSdrObjectFromCustomShape() const; const SdrObject* GetSdrObjectShadowFromCustomShape() const; @@ -209,7 +209,6 @@ public: virtual void TakeTextAnchorRect( tools::Rectangle& rAnchorRect ) const override; virtual void TakeTextRect( SdrOutliner& rOutliner, tools::Rectangle& rTextRect, bool bNoEditText, tools::Rectangle* pAnchorRect, bool bLineWidth = true ) const override; - virtual rtl::Reference CloneSdrObject(SdrModel& rTargetModel) const override; virtual OUString TakeObjNameSingul() const override; virtual OUString TakeObjNamePlural() const override; diff --git a/include/svx/svdobj.hxx b/include/svx/svdobj.hxx index 351f3ff7101e..f675fe93b10c 100644 --- a/include/svx/svdobj.hxx +++ b/include/svx/svdobj.hxx @@ -254,6 +254,9 @@ private: friend class SdrVirtObj; friend class SdrRectObj; + // Returns a copy of the object. Every inherited class must reimplement this. + virtual rtl::Reference implCloneSdrObject(SdrModel& rTargetModel) const = 0; + // OperationSmiley: Allow at each SdrObject to set a FillGeometryDefiningShape, // so that for SdrObjects where this is set, the definition of a defined FillStyle // will use this, but the local geometry will be filled. This allows to fill @@ -452,8 +455,12 @@ public: // means no change of the rotation point (only centered) and no shear allowed virtual bool HasLimitedRotation() const; - // Returns a copy of the object. Every inherited class must reimplement this. - virtual rtl::Reference CloneSdrObject(SdrModel& rTargetModel) const = 0; + // Returns a copy of the object. Internally uses the virtual and + // overridden method implCloneSdrObject that is implemented for each + // derivation. If cloned to another SdrModel it will support calling + // postProcessAfterCloneToDifferentModel + rtl::Reference CloneSdrObject(SdrModel& rTargetModel) const; + // helper, since Clone always return the type of the current subclass template static rtl::Reference Clone(T const & rObj, SdrModel& rTargetModel) diff --git a/include/svx/svdocapt.hxx b/include/svx/svdocapt.hxx index 4b0f593a147e..35ca8bfde6cd 100644 --- a/include/svx/svdocapt.hxx +++ b/include/svx/svdocapt.hxx @@ -40,7 +40,6 @@ public: // SdrCaptionObj class SVXCORE_DLLPUBLIC SdrCaptionObj final : public SdrRectObj { -private: // to allow sdr::properties::CaptionProperties access to ImpRecalcTail() friend class sdr::properties::CaptionProperties; friend class SdrTextObj; // for ImpRecalcTail() during AutoGrow @@ -71,6 +70,8 @@ private: // protected destructor SAL_DLLPRIVATE virtual ~SdrCaptionObj() override; + SAL_DLLPRIVATE virtual rtl::Reference implCloneSdrObject(SdrModel& rTargetModel) const override; + public: SAL_DLLPRIVATE SdrCaptionObj(SdrModel& rSdrModel); @@ -84,8 +85,6 @@ public: SAL_DLLPRIVATE virtual void TakeObjInfo(SdrObjTransformInfoRec& rInfo) const override; SAL_DLLPRIVATE virtual SdrObjKind GetObjIdentifier() const override; - SAL_DLLPRIVATE virtual rtl::Reference CloneSdrObject(SdrModel& rTargetModel) const override; - // for calc: special shadow only for text box void SetSpecialTextBoxShadow() { mbSpecialTextBoxShadow = true; } bool GetSpecialTextBoxShadow() const { return mbSpecialTextBoxShadow; } diff --git a/include/svx/svdocirc.hxx b/include/svx/svdocirc.hxx index 322ac1bbf383..a642eec936d8 100644 --- a/include/svx/svdocirc.hxx +++ b/include/svx/svdocirc.hxx @@ -42,7 +42,6 @@ extern SVXCORE_DLLPUBLIC SdrCircKind ToSdrCircKind(SdrObjKind); class SVXCORE_DLLPUBLIC SdrCircObj final : public SdrRectObj { -private: // to allow sdr::properties::CircleProperties access to ImpSetAttrToCircInfo() friend class sdr::properties::CircleProperties; @@ -64,10 +63,11 @@ private: SAL_DLLPRIVATE virtual void Notify(SfxBroadcaster& rBC, const SfxHint& rHint) override; -private: // protected destructor - due to final, make private SAL_DLLPRIVATE virtual ~SdrCircObj() override; + SAL_DLLPRIVATE virtual rtl::Reference implCloneSdrObject(SdrModel& rTargetModel) const override; + public: SAL_DLLPRIVATE SdrCircObj( SdrModel& rSdrModel, @@ -99,8 +99,6 @@ public: SAL_DLLPRIVATE virtual OUString TakeObjNameSingul() const override; SAL_DLLPRIVATE virtual OUString TakeObjNamePlural() const override; - SAL_DLLPRIVATE virtual rtl::Reference CloneSdrObject(SdrModel& rTargetModel) const override; - SAL_DLLPRIVATE virtual void RecalcSnapRect() override; SAL_DLLPRIVATE virtual void NbcSetSnapRect(const tools::Rectangle& rRect) override; SAL_DLLPRIVATE virtual basegfx::B2DPolyPolygon TakeXorPoly() const override; diff --git a/include/svx/svdoedge.hxx b/include/svx/svdoedge.hxx index 2c1e4684a408..6089b215301d 100644 --- a/include/svx/svdoedge.hxx +++ b/include/svx/svdoedge.hxx @@ -134,7 +134,6 @@ public: /// Utility class SdrEdgeObj class SVXCORE_DLLPUBLIC SdrEdgeObj final : public SdrTextObj { -private: // to allow sdr::properties::ConnectorProperties access to ImpSetAttrToEdgeInfo() friend class sdr::properties::ConnectorProperties; @@ -169,6 +168,8 @@ private: // to a correct state for first real layouting bool mbSuppressed : 1; + virtual rtl::Reference implCloneSdrObject(SdrModel& rTargetModel) const override; + public: // Interface to default connect suppression void SetSuppressDefaultConnect(bool bNew) { mbSuppressDefaultConnect = bNew; } @@ -224,7 +225,6 @@ public: SAL_DLLPRIVATE virtual void RecalcSnapRect() override; SAL_DLLPRIVATE virtual void TakeUnrotatedSnapRect(tools::Rectangle& rRect) const override; - virtual rtl::Reference CloneSdrObject(SdrModel& rTargetModel) const override; SAL_DLLPRIVATE virtual OUString TakeObjNameSingul() const override; SAL_DLLPRIVATE virtual OUString TakeObjNamePlural() const override; diff --git a/include/svx/svdograf.hxx b/include/svx/svdograf.hxx index 20cbd6aa3c1c..d407950399c5 100644 --- a/include/svx/svdograf.hxx +++ b/include/svx/svdograf.hxx @@ -66,7 +66,6 @@ class SdrGraphicLink; */ class SVXCORE_DLLPUBLIC SdrGrafObj final : public SdrRectObj { -private: // to allow sdr::properties::GraphicProperties access to SetXPolyDirty() friend class sdr::properties::GraphicProperties; @@ -109,6 +108,8 @@ private: // protected destructor SAL_DLLPRIVATE virtual ~SdrGrafObj() override; + virtual rtl::Reference implCloneSdrObject(SdrModel& rTargetModel) const override; + public: SdrGrafObj(SdrModel& rSdrModel); // Copy constructor @@ -166,8 +167,6 @@ public: SAL_DLLPRIVATE virtual OUString TakeObjNameSingul() const override; SAL_DLLPRIVATE virtual OUString TakeObjNamePlural() const override; - virtual rtl::Reference CloneSdrObject(SdrModel& rTargetModel) const override; - SAL_DLLPRIVATE virtual sal_uInt32 GetHdlCount() const override; SAL_DLLPRIVATE virtual void AddToHdlList(SdrHdlList& rHdlList) const override; diff --git a/include/svx/svdogrp.hxx b/include/svx/svdogrp.hxx index 08de5020cba7..61be5586b716 100644 --- a/include/svx/svdogrp.hxx +++ b/include/svx/svdogrp.hxx @@ -47,6 +47,8 @@ private: // the DiagramHelper if this SdrObjGroup host a Diagram std::shared_ptr< svx::diagram::DiagramHelper_svx > mp_DiagramHelper; + virtual rtl::Reference implCloneSdrObject(SdrModel& rTargetModel) const override; + public: SdrObjGroup(SdrModel& rSdrModel); // Copy constructor @@ -74,8 +76,6 @@ public: virtual const tools::Rectangle& GetCurrentBoundRect() const override; virtual const tools::Rectangle& GetSnapRect() const override; - virtual rtl::Reference CloneSdrObject(SdrModel& rTargetModel) const override; - virtual OUString TakeObjNameSingul() const override; virtual OUString TakeObjNamePlural() const override; diff --git a/include/svx/svdomeas.hxx b/include/svx/svdomeas.hxx index 77309db6af9d..a7db2f06bdda 100644 --- a/include/svx/svdomeas.hxx +++ b/include/svx/svdomeas.hxx @@ -43,7 +43,6 @@ public: class SVXCORE_DLLPUBLIC SdrMeasureObj final : public SdrTextObj { -private: // to allow sdr::properties::MeasureProperties access to SetTextDirty() friend class sdr::properties::MeasureProperties; friend class SdrMeasureField; @@ -76,6 +75,8 @@ private: SAL_DLLPRIVATE virtual void SaveGeoData(SdrObjGeoData& rGeo) const override; SAL_DLLPRIVATE virtual void RestoreGeoData(const SdrObjGeoData& rGeo) override; + SAL_DLLPRIVATE virtual rtl::Reference implCloneSdrObject(SdrModel& rTargetModel) const override; + public: SAL_DLLPRIVATE SdrMeasureObj(SdrModel& rSdrModel); // Copy constructor @@ -89,7 +90,6 @@ public: SAL_DLLPRIVATE virtual void TakeObjInfo(SdrObjTransformInfoRec& rInfo) const override; SAL_DLLPRIVATE virtual SdrObjKind GetObjIdentifier() const override; virtual void TakeUnrotatedSnapRect(tools::Rectangle& rRect) const override; - SAL_DLLPRIVATE virtual rtl::Reference CloneSdrObject(SdrModel& rTargetModel) const override; SAL_DLLPRIVATE virtual OUString TakeObjNameSingul() const override; SAL_DLLPRIVATE virtual OUString TakeObjNamePlural() const override; diff --git a/include/svx/svdomedia.hxx b/include/svx/svdomedia.hxx index 9869758d6d74..ce9ddb5774ff 100644 --- a/include/svx/svdomedia.hxx +++ b/include/svx/svdomedia.hxx @@ -34,10 +34,11 @@ class SVXCORE_DLLPUBLIC SdrMediaObj final : public SdrRectObj friend class sdr::contact::ViewContactOfSdrMediaObj; friend class SdrMediaLink; -private: // protected destructor - due to final, make private SAL_DLLPRIVATE virtual ~SdrMediaObj() override; + virtual rtl::Reference implCloneSdrObject(SdrModel& rTargetModel) const override; + public: SAL_DLLPRIVATE SdrMediaObj(SdrModel& rSdrModel); // Copy constructor @@ -54,8 +55,6 @@ public: SAL_DLLPRIVATE virtual OUString TakeObjNameSingul() const override; SAL_DLLPRIVATE virtual OUString TakeObjNamePlural() const override; - virtual rtl::Reference CloneSdrObject(SdrModel& rTargetModel) const override; - virtual void AdjustToMaxRect( const tools::Rectangle& rMaxRect, bool bShrinkOnly = false ) override; void setURL(const OUString& rURL, const OUString& rReferer); diff --git a/include/svx/svdoole2.hxx b/include/svx/svdoole2.hxx index 63707fc8d6f7..f16089ede671 100644 --- a/include/svx/svdoole2.hxx +++ b/include/svx/svdoole2.hxx @@ -45,10 +45,8 @@ class SvxOle2Shape; class SVXCORE_DLLPUBLIC SdrOle2Obj : public SdrRectObj { -private: std::unique_ptr mpImpl; -private: SVX_DLLPRIVATE void Connect_Impl(SvxOle2Shape* pCreator = nullptr); SVX_DLLPRIVATE void Disconnect_Impl(); SVX_DLLPRIVATE void AddListeners_Impl(); @@ -61,6 +59,8 @@ private: SVX_DLLPRIVATE void Init(); + virtual rtl::Reference implCloneSdrObject(SdrModel& rTargetModel) const override; + protected: virtual std::unique_ptr CreateObjectSpecificViewContact() override; virtual std::unique_ptr CreateObjectSpecificProperties() override; @@ -140,8 +140,6 @@ public: virtual OUString TakeObjNameSingul() const override; virtual OUString TakeObjNamePlural() const override; - virtual rtl::Reference CloneSdrObject(SdrModel& rTargetModel) const override; - virtual void NbcMove(const Size& rSize) override; virtual void NbcResize(const Point& rRef, double xFact, double yFact) override; virtual void NbcSetSnapRect(const tools::Rectangle& rRect) override; diff --git a/include/svx/svdopage.hxx b/include/svx/svdopage.hxx index 279c75c758a6..5d0650b7fe6c 100644 --- a/include/svx/svdopage.hxx +++ b/include/svx/svdopage.hxx @@ -41,6 +41,8 @@ private: // protected destructor virtual ~SdrPageObj() override; + virtual rtl::Reference implCloneSdrObject(SdrModel& rTargetModel) const override; + public: SdrPageObj( SdrModel& rSdrModel, @@ -60,7 +62,6 @@ public: virtual SdrObjKind GetObjIdentifier() const override; virtual void TakeObjInfo(SdrObjTransformInfoRec& rInfo) const override; - virtual rtl::Reference CloneSdrObject(SdrModel& rTargetModel) const override; virtual OUString TakeObjNameSingul() const override; virtual OUString TakeObjNamePlural() const override; diff --git a/include/svx/svdopath.hxx b/include/svx/svdopath.hxx index 3d63acf27fe4..b440fa5dfe49 100644 --- a/include/svx/svdopath.hxx +++ b/include/svx/svdopath.hxx @@ -41,7 +41,6 @@ public: class SVXCORE_DLLPUBLIC SdrPathObj final : public SdrTextObj { -private: friend class ImpPathForDragAndCreate; virtual std::unique_ptr CreateObjectSpecificViewContact() override; @@ -59,10 +58,11 @@ private: void ImpForceLineAngle(); ImpPathForDragAndCreate& impGetDAC() const; -private: // protected destructor - due to final, make private virtual ~SdrPathObj() override; + virtual rtl::Reference implCloneSdrObject(SdrModel& rTargetModel) const override; + public: SdrPathObj( SdrModel& rSdrModel, @@ -77,7 +77,6 @@ public: virtual void TakeObjInfo(SdrObjTransformInfoRec& rInfo) const override; virtual SdrObjKind GetObjIdentifier() const override; virtual void TakeUnrotatedSnapRect(tools::Rectangle& rRect) const override; - virtual rtl::Reference CloneSdrObject(SdrModel& rTargetModel) const override; virtual OUString TakeObjNameSingul() const override; virtual OUString TakeObjNamePlural() const override; diff --git a/include/svx/svdorect.hxx b/include/svx/svdorect.hxx index a50a5524daeb..9a3f7d3f0b50 100644 --- a/include/svx/svdorect.hxx +++ b/include/svx/svdorect.hxx @@ -37,18 +37,18 @@ namespace sdr::properties { /// Rectangle objects (rectangle, circle, ...) class SVXCORE_DLLPUBLIC SdrRectObj : public SdrTextObj { -private: // to allow sdr::properties::RectangleProperties access to SetXPolyDirty() friend class sdr::properties::RectangleProperties; friend class SdrTextObj; // Due to SetXPolyDirty for GrowAdjust + virtual rtl::Reference implCloneSdrObject(SdrModel& rTargetModel) const override; + protected: virtual std::unique_ptr CreateObjectSpecificViewContact() override; virtual std::unique_ptr CreateObjectSpecificProperties() override; std::optional mpXPoly; -protected: XPolygon ImpCalcXPoly(const tools::Rectangle& rRect1, tools::Long nRad1) const; void SetXPolyDirty(); @@ -82,7 +82,6 @@ public: virtual OUString TakeObjNameSingul() const override; virtual OUString TakeObjNamePlural() const override; - virtual rtl::Reference CloneSdrObject(SdrModel& rTargetModel) const override; virtual void RecalcSnapRect() override; virtual void NbcSetSnapRect(const tools::Rectangle& rRect) override; virtual void NbcSetLogicRect(const tools::Rectangle& rRect, bool bAdaptTextMinSize = true) override; diff --git a/include/svx/svdotable.hxx b/include/svx/svdotable.hxx index 17ebb8692a8c..bf552e92f09a 100644 --- a/include/svx/svdotable.hxx +++ b/include/svx/svdotable.hxx @@ -93,6 +93,8 @@ class SVXCORE_DLLPUBLIC SdrTableObj final : public ::SdrTextObj // protected destructor virtual ~SdrTableObj() override; + virtual rtl::Reference implCloneSdrObject(SdrModel& rTargetModel) const override; + public: SdrTableObj(SdrModel& rSdrModel); // Copy constructor @@ -203,7 +205,6 @@ public: virtual bool AdjustTextFrameWidthAndHeight() override; virtual OUString TakeObjNameSingul() const override; virtual OUString TakeObjNamePlural() const override; - virtual rtl::Reference CloneSdrObject(SdrModel& rTargetModel) const override; virtual void RecalcSnapRect() override; virtual const tools::Rectangle& GetSnapRect() const override; virtual void NbcSetSnapRect(const tools::Rectangle& rRect) override; diff --git a/include/svx/svdotext.hxx b/include/svx/svdotext.hxx index 0a7d9db01fc5..8e1da77ccaec 100644 --- a/include/svx/svdotext.hxx +++ b/include/svx/svdotext.hxx @@ -119,7 +119,6 @@ namespace sdr::properties // SdrTextObj class SVXCORE_DLLPUBLIC SdrTextObj : public SdrAttrObj, public svx::ITextProvider { -private: // Cell needs access to ImpGetDrawOutliner(); friend class sdr::table::Cell; friend class sdr::table::SdrTableRtfExporter; @@ -132,6 +131,8 @@ private: // CustomShapeproperties need to access the "mbTextFrame" member: friend class sdr::properties::CustomShapeProperties; + virtual rtl::Reference implCloneSdrObject(SdrModel& rTargetModel) const override; + protected: virtual std::unique_ptr CreateObjectSpecificProperties() override; virtual std::unique_ptr CreateObjectSpecificViewContact() override; @@ -463,7 +464,6 @@ public: virtual void TakeUnrotatedSnapRect(tools::Rectangle& rRect) const; virtual OUString TakeObjNameSingul() const override; virtual OUString TakeObjNamePlural() const override; - virtual rtl::Reference CloneSdrObject(SdrModel& rTargetModel) const override; virtual basegfx::B2DPolyPolygon TakeXorPoly() const override; virtual basegfx::B2DPolyPolygon TakeContour() const override; virtual void RecalcSnapRect() override; diff --git a/include/svx/svdouno.hxx b/include/svx/svdouno.hxx index bebd81fa6259..c7ccd903b43f 100644 --- a/include/svx/svdouno.hxx +++ b/include/svx/svdouno.hxx @@ -48,6 +48,8 @@ class SVXCORE_DLLPUBLIC SdrUnoObj : public SdrRectObj OUString m_aUnoControlModelTypeName; OUString m_aUnoControlTypeName; + virtual rtl::Reference implCloneSdrObject(SdrModel& rTargetModel) const override; + protected: css::uno::Reference< css::awt::XControlModel > m_xUnoControlModel; // Can also be set from outside @@ -71,7 +73,6 @@ public: virtual void TakeObjInfo(SdrObjTransformInfoRec& rInfo) const override; virtual SdrObjKind GetObjIdentifier() const override; - virtual rtl::Reference CloneSdrObject(SdrModel& rTargetModel) const override; virtual void NbcResize(const Point& rRef, double xFact, double yFact) override; virtual void NbcSetLayer(SdrLayerID nLayer) override; diff --git a/include/svx/svdovirt.hxx b/include/svx/svdovirt.hxx index 13671663b8f9..e16352dd68c0 100644 --- a/include/svx/svdovirt.hxx +++ b/include/svx/svdovirt.hxx @@ -30,6 +30,8 @@ class SVXCORE_DLLPUBLIC SdrVirtObj : public SdrObject { SdrVirtObj(const SdrVirtObj&) = delete; + virtual rtl::Reference implCloneSdrObject(SdrModel& rTargetModel) const override; + public: virtual sdr::properties::BaseProperties& GetProperties() const override; @@ -81,7 +83,6 @@ public: virtual const tools::Rectangle& GetCurrentBoundRect() const override; virtual const tools::Rectangle& GetLastBoundRect() const override; virtual void RecalcBoundRect() override; - virtual rtl::Reference CloneSdrObject(SdrModel& rTargetModel) const override; virtual OUString TakeObjNameSingul() const override; virtual OUString TakeObjNamePlural() const override; diff --git a/reportdesign/inc/RptObject.hxx b/reportdesign/inc/RptObject.hxx index 0ccb5ba5eec6..b11ef62fb1ac 100644 --- a/reportdesign/inc/RptObject.hxx +++ b/reportdesign/inc/RptObject.hxx @@ -182,7 +182,7 @@ public: virtual SdrObjKind GetObjIdentifier() const override; virtual SdrInventor GetObjInventor() const override; // Clone() should make a complete copy of the object. - virtual rtl::Reference CloneSdrObject(SdrModel& rTargetModel) const override; + virtual rtl::Reference implCloneSdrObject(SdrModel& rTargetModel) const override; virtual void initializeOle() override; void initializeChart( const css::uno::Reference< css::frame::XModel>& _xModel); @@ -262,7 +262,7 @@ public: virtual css::uno::Reference< css::drawing::XShape > getUnoShape() override; virtual SdrObjKind GetObjIdentifier() const override; virtual SdrInventor GetObjInventor() const override; - virtual rtl::Reference CloneSdrObject(SdrModel& rTargetModel) const override; + virtual rtl::Reference implCloneSdrObject(SdrModel& rTargetModel) const override; private: virtual void setUnoShape( const css::uno::Reference< css::drawing::XShape >& rxUnoShape ) override; diff --git a/reportdesign/source/core/sdr/RptObject.cxx b/reportdesign/source/core/sdr/RptObject.cxx index c451206fd82e..ae9003e61753 100644 --- a/reportdesign/source/core/sdr/RptObject.cxx +++ b/reportdesign/source/core/sdr/RptObject.cxx @@ -903,7 +903,7 @@ void OUnoObject::setUnoShape( const uno::Reference< drawing::XShape >& rxUnoShap releaseUnoShape(); } -rtl::Reference OUnoObject::CloneSdrObject(SdrModel& rTargetModel) const +rtl::Reference OUnoObject::implCloneSdrObject(SdrModel& rTargetModel) const { return new OUnoObject(rTargetModel, *this); } @@ -1116,7 +1116,7 @@ static uno::Reference< chart2::data::XDatabaseDataProvider > lcl_getDataProvider } // Clone() should make a complete copy of the object. -rtl::Reference OOle2Obj::CloneSdrObject(SdrModel& rTargetModel) const +rtl::Reference OOle2Obj::implCloneSdrObject(SdrModel& rTargetModel) const { return new OOle2Obj(rTargetModel, *this); } diff --git a/sd/qa/unit/uiimpress.cxx b/sd/qa/unit/uiimpress.cxx index 97132449fb03..e49a8b1e42ec 100644 --- a/sd/qa/unit/uiimpress.cxx +++ b/sd/qa/unit/uiimpress.cxx @@ -849,7 +849,7 @@ CPPUNIT_TEST_FIXTURE(SdUiImpressTest, testTdf96708) const sal_uInt16 nMasterPageCnt2 = pDoc->GetMasterSdPageCount(PageKind::Standard); //FIXME: tdf#151802: Number of master pages should be 4, it's 5 instead - //CPPUNIT_ASSERT_EQUAL(nMasterPageCnt1, nMasterPageCnt2); + // CPPUNIT_ASSERT_EQUAL(nMasterPageCnt1, nMasterPageCnt2); CPPUNIT_ASSERT_EQUAL(sal_uInt16(5), nMasterPageCnt2); } diff --git a/svx/inc/extrud3d.hxx b/svx/inc/extrud3d.hxx index cd6c2e00972b..3d0f40413619 100644 --- a/svx/inc/extrud3d.hxx +++ b/svx/inc/extrud3d.hxx @@ -37,7 +37,6 @@ class E3dDefaultAttributes; class SAL_WARN_UNUSED E3dExtrudeObj final : public E3dCompoundObject { -private: // to allow sdr::properties::E3dExtrudeProperties access to SetGeometryValid() friend class sdr::properties::E3dExtrudeProperties; @@ -48,10 +47,11 @@ private: virtual std::unique_ptr CreateObjectSpecificProperties() override; void SetDefaultAttributes(const E3dDefaultAttributes& rDefault); -private: // protected destructor - due to final, make private virtual ~E3dExtrudeObj() override; + virtual rtl::Reference implCloneSdrObject(SdrModel& rTargetModel) const override; + public: SVXCORE_DLLPUBLIC E3dExtrudeObj( SdrModel& rSdrModel, @@ -95,8 +95,6 @@ public: virtual SdrObjKind GetObjIdentifier() const override; - virtual rtl::Reference CloneSdrObject(SdrModel& rTargetModel) const override; - // TakeObjName...() is for the display in the UI (for example "3 frames selected") virtual OUString TakeObjNameSingul() const override; virtual OUString TakeObjNamePlural() const override; diff --git a/svx/inc/polygn3d.hxx b/svx/inc/polygn3d.hxx index 1a9a645b9faa..5c2236dd6610 100644 --- a/svx/inc/polygn3d.hxx +++ b/svx/inc/polygn3d.hxx @@ -39,6 +39,8 @@ class E3dPolygonObj final : public E3dCompoundObject // protected destructor virtual ~E3dPolygonObj() override; + virtual rtl::Reference implCloneSdrObject(SdrModel& rTargetModel) const override; + public: void SetPolyPolygon3D(const basegfx::B3DPolyPolygon& rNewPolyPoly3D); void SetPolyNormals3D(const basegfx::B3DPolyPolygon& rNewPolyPoly3D); @@ -57,8 +59,6 @@ public: virtual rtl::Reference DoConvertToPolyObj(bool bBezier, bool bAddText) const override; - virtual rtl::Reference CloneSdrObject(SdrModel& rTargetModel) const override; - // LineOnly? bool GetLineOnly() const { return bLineOnly; } void SetLineOnly(bool bNew); diff --git a/svx/inc/sdr/properties/attributeproperties.hxx b/svx/inc/sdr/properties/attributeproperties.hxx index adc303de00a6..93cad9e3b395 100644 --- a/svx/inc/sdr/properties/attributeproperties.hxx +++ b/svx/inc/sdr/properties/attributeproperties.hxx @@ -29,6 +29,12 @@ namespace sdr::properties { class AttributeProperties : public DefaultProperties, public SfxListener, public svl::StyleSheetUser { + // Clone() operator, normally just calls the local copy constructor + virtual std::unique_ptr implCloneProperties(SdrObject& rObj) const override; + + // Regulates Styles/Items between models + virtual void postProcessAfterCloneToDifferentModel(const SdrObject& rSrcObj) override; + // core to set parent at SfxItemSet and to execute the hard attribute computations void ImpSetParentAtSfxItemSet(bool bDontRemoveHardAttr); @@ -58,9 +64,6 @@ namespace sdr::properties AttributeProperties(const AttributeProperties& rProps, SdrObject& rObj); public: - // Clone() operator, normally just calls the local copy constructor - virtual std::unique_ptr Clone(SdrObject& rObj) const override; - // Get the local ItemSet. This directly returns the local ItemSet of the object. No // merging of ItemSets is done for e.g. Group objects. virtual const SfxItemSet& GetObjectItemSet() const override final; diff --git a/svx/inc/sdr/properties/captionproperties.hxx b/svx/inc/sdr/properties/captionproperties.hxx index 20d2e3b0636f..647914e82394 100644 --- a/svx/inc/sdr/properties/captionproperties.hxx +++ b/svx/inc/sdr/properties/captionproperties.hxx @@ -27,6 +27,9 @@ namespace sdr::properties { class CaptionProperties final : public RectangleProperties { + // Clone() operator, normally just calls the local copy constructor + virtual std::unique_ptr implCloneProperties(SdrObject& rObj) const override; + // create a new itemset virtual SfxItemSet CreateObjectSpecificItemSet(SfxItemPool& rPool) override; @@ -43,9 +46,6 @@ namespace sdr::properties // destructor virtual ~CaptionProperties() override; - // Clone() operator, normally just calls the local copy constructor - virtual std::unique_ptr Clone(SdrObject& rObj) const override; - // set a new StyleSheet and broadcast virtual void SetStyleSheet(SfxStyleSheet* pNewStyleSheet, bool bDontRemoveHardAttr, bool bBroadcast, bool bAdjustTextFrameWidthAndHeight = true) override; diff --git a/svx/inc/sdr/properties/cellproperties.hxx b/svx/inc/sdr/properties/cellproperties.hxx index ba023b9059be..7ed3a857d79a 100644 --- a/svx/inc/sdr/properties/cellproperties.hxx +++ b/svx/inc/sdr/properties/cellproperties.hxx @@ -61,7 +61,7 @@ public: ~CellProperties(); // Clone() operator, normally just calls the local copy constructor - std::unique_ptr Clone(SdrObject& rObj) const override; + std::unique_ptr implCloneProperties(SdrObject& rObj) const override; void ForceDefaultAttributes() override; diff --git a/svx/inc/sdr/properties/circleproperties.hxx b/svx/inc/sdr/properties/circleproperties.hxx index bb70bc814ae6..8f920fd89f40 100644 --- a/svx/inc/sdr/properties/circleproperties.hxx +++ b/svx/inc/sdr/properties/circleproperties.hxx @@ -27,6 +27,9 @@ namespace sdr::properties { class CircleProperties final : public RectangleProperties { + // Clone() operator, normally just calls the local copy constructor + virtual std::unique_ptr implCloneProperties(SdrObject& rObj) const override; + // create a new itemset virtual SfxItemSet CreateObjectSpecificItemSet(SfxItemPool& rPool) override; @@ -43,9 +46,6 @@ namespace sdr::properties // destructor virtual ~CircleProperties() override; - // Clone() operator, normally just calls the local copy constructor - virtual std::unique_ptr Clone(SdrObject& rObj) const override; - // set a new StyleSheet and broadcast virtual void SetStyleSheet(SfxStyleSheet* pNewStyleSheet, bool bDontRemoveHardAttr, bool bBroadcast, bool bAdjustTextFrameWidthAndHeight = true) override; diff --git a/svx/inc/sdr/properties/connectorproperties.hxx b/svx/inc/sdr/properties/connectorproperties.hxx index b0d66de6544d..bc4dd3e75df3 100644 --- a/svx/inc/sdr/properties/connectorproperties.hxx +++ b/svx/inc/sdr/properties/connectorproperties.hxx @@ -27,6 +27,9 @@ namespace sdr::properties { class ConnectorProperties final : public TextProperties { + // Clone() operator, normally just calls the local copy constructor + virtual std::unique_ptr implCloneProperties(SdrObject& rObj) const override; + // create a new itemset virtual SfxItemSet CreateObjectSpecificItemSet(SfxItemPool& rPool) override; @@ -43,9 +46,6 @@ namespace sdr::properties // destructor virtual ~ConnectorProperties() override; - // Clone() operator, normally just calls the local copy constructor - virtual std::unique_ptr Clone(SdrObject& rObj) const override; - // set a new StyleSheet and broadcast virtual void SetStyleSheet(SfxStyleSheet* pNewStyleSheet, bool bDontRemoveHardAttr, bool bBroadcast, bool bAdjustTextFrameWidthAndHeight = true) override; diff --git a/svx/inc/sdr/properties/customshapeproperties.hxx b/svx/inc/sdr/properties/customshapeproperties.hxx index 4f7e60f3cd43..7b54f2efbee0 100644 --- a/svx/inc/sdr/properties/customshapeproperties.hxx +++ b/svx/inc/sdr/properties/customshapeproperties.hxx @@ -27,7 +27,9 @@ namespace sdr::properties { class CustomShapeProperties final : public TextProperties { - private: + // Clone() operator, normally just calls the local copy constructor + virtual std::unique_ptr implCloneProperties(SdrObject& rObj) const override; + void UpdateTextFrameStatus(bool bInvalidateRenderGeometry); // create a new itemset @@ -72,9 +74,6 @@ namespace sdr::properties // destructor virtual ~CustomShapeProperties() override; - // Clone() operator, normally just calls the local copy constructor - virtual std::unique_ptr Clone(SdrObject& rObj) const override; - // This is the notifier from SfxListener virtual void Notify(SfxBroadcaster& rBC, const SfxHint& rHint) override; }; diff --git a/svx/inc/sdr/properties/e3dcompoundproperties.hxx b/svx/inc/sdr/properties/e3dcompoundproperties.hxx index 6dc9afd4d356..c4232eeba378 100644 --- a/svx/inc/sdr/properties/e3dcompoundproperties.hxx +++ b/svx/inc/sdr/properties/e3dcompoundproperties.hxx @@ -27,7 +27,10 @@ namespace sdr::properties { class E3dCompoundProperties : public E3dProperties { - protected: + // Clone() operator, normally just calls the local copy constructor + virtual std::unique_ptr implCloneProperties(SdrObject& rObj) const override; + + protected: // Called after ItemChange() is done for all items. virtual void PostItemChange(const sal_uInt16 nWhich) override; @@ -41,9 +44,6 @@ namespace sdr::properties // destructor virtual ~E3dCompoundProperties() override; - // Clone() operator, normally just calls the local copy constructor - virtual std::unique_ptr Clone(SdrObject& rObj) const override; - // Get merged ItemSet. Normally, this maps directly to GetObjectItemSet(), but may // be overridden e.g for group objects to return a merged ItemSet of the object. // When using this method the returned ItemSet may contain items in the state diff --git a/svx/inc/sdr/properties/e3dextrudeproperties.hxx b/svx/inc/sdr/properties/e3dextrudeproperties.hxx index 072b1c796919..e1be2fe05be4 100644 --- a/svx/inc/sdr/properties/e3dextrudeproperties.hxx +++ b/svx/inc/sdr/properties/e3dextrudeproperties.hxx @@ -27,6 +27,9 @@ namespace sdr::properties { class E3dExtrudeProperties final : public E3dCompoundProperties { + // Clone() operator, normally just calls the local copy constructor + virtual std::unique_ptr implCloneProperties(SdrObject& rObj) const override; + // Called after ItemChange() is done for all items. virtual void PostItemChange(const sal_uInt16 nWhich) override; @@ -39,9 +42,6 @@ namespace sdr::properties // destructor virtual ~E3dExtrudeProperties() override; - - // Clone() operator, normally just calls the local copy constructor - virtual std::unique_ptr Clone(SdrObject& rObj) const override; }; } // end of namespace sdr::properties diff --git a/svx/inc/sdr/properties/e3dlatheproperties.hxx b/svx/inc/sdr/properties/e3dlatheproperties.hxx index 56e46fb8b578..a2e18968121b 100644 --- a/svx/inc/sdr/properties/e3dlatheproperties.hxx +++ b/svx/inc/sdr/properties/e3dlatheproperties.hxx @@ -27,6 +27,9 @@ namespace sdr::properties { class E3dLatheProperties final : public E3dCompoundProperties { + // Clone() operator, normally just calls the local copy constructor + virtual std::unique_ptr implCloneProperties(SdrObject& rObj) const override; + // Called after ItemChange() is done for all items. virtual void PostItemChange(const sal_uInt16 nWhich) override; @@ -39,9 +42,6 @@ namespace sdr::properties // destructor virtual ~E3dLatheProperties() override; - - // Clone() operator, normally just calls the local copy constructor - virtual std::unique_ptr Clone(SdrObject& rObj) const override; }; } // end of namespace sdr::properties diff --git a/svx/inc/sdr/properties/e3dproperties.hxx b/svx/inc/sdr/properties/e3dproperties.hxx index 4e93d5887cd9..b8cca761b595 100644 --- a/svx/inc/sdr/properties/e3dproperties.hxx +++ b/svx/inc/sdr/properties/e3dproperties.hxx @@ -27,6 +27,9 @@ namespace sdr::properties { class E3dProperties : public AttributeProperties { + // Clone() operator, normally just calls the local copy constructor + virtual std::unique_ptr implCloneProperties(SdrObject& rObj) const override; + protected: // create a new itemset virtual SfxItemSet CreateObjectSpecificItemSet(SfxItemPool& rPool) override; @@ -43,9 +46,6 @@ namespace sdr::properties // destructor virtual ~E3dProperties() override; - - // Clone() operator, normally just calls the local copy constructor - virtual std::unique_ptr Clone(SdrObject& rObj) const override; }; } // end of namespace sdr::properties diff --git a/svx/inc/sdr/properties/e3dsceneproperties.hxx b/svx/inc/sdr/properties/e3dsceneproperties.hxx index d1c10fc73afb..b5ff6b24d703 100644 --- a/svx/inc/sdr/properties/e3dsceneproperties.hxx +++ b/svx/inc/sdr/properties/e3dsceneproperties.hxx @@ -27,6 +27,9 @@ namespace sdr::properties { class E3dSceneProperties final : public E3dProperties { + // Clone() operator, normally just calls the local copy constructor + virtual std::unique_ptr implCloneProperties(SdrObject& rObj) const override; + // Called after ItemChange() is done for all items. virtual void PostItemChange(const sal_uInt16 nWhich) override; @@ -40,9 +43,6 @@ namespace sdr::properties // destructor virtual ~E3dSceneProperties() override; - // Clone() operator, normally just calls the local copy constructor - virtual std::unique_ptr Clone(SdrObject& rObj) const override; - // get merged ItemSet. Normally, this maps directly to GetObjectItemSet(), but may // be overridden e.g for group objects to return a merged ItemSet of the object. // When using this method the returned ItemSet may contain items in the state diff --git a/svx/inc/sdr/properties/e3dsphereproperties.hxx b/svx/inc/sdr/properties/e3dsphereproperties.hxx index 61870c939d6d..937c79debbf2 100644 --- a/svx/inc/sdr/properties/e3dsphereproperties.hxx +++ b/svx/inc/sdr/properties/e3dsphereproperties.hxx @@ -27,6 +27,9 @@ namespace sdr::properties { class E3dSphereProperties final : public E3dCompoundProperties { + // Clone() operator, normally just calls the local copy constructor + virtual std::unique_ptr implCloneProperties(SdrObject& rObj) const override; + // Called after ItemChange() is done for all items. virtual void PostItemChange(const sal_uInt16 nWhich) override; @@ -39,9 +42,6 @@ namespace sdr::properties // destructor virtual ~E3dSphereProperties() override; - - // Clone() operator, normally just calls the local copy constructor - virtual std::unique_ptr Clone(SdrObject& rObj) const override; }; } // end of namespace sdr::properties diff --git a/svx/inc/sdr/properties/emptyproperties.hxx b/svx/inc/sdr/properties/emptyproperties.hxx index 65cc0a85c743..f9363a0d78d5 100644 --- a/svx/inc/sdr/properties/emptyproperties.hxx +++ b/svx/inc/sdr/properties/emptyproperties.hxx @@ -30,13 +30,13 @@ namespace sdr::properties { class EmptyProperties final : public BaseProperties { + // Clone() operator, normally just calls the local copy constructor + virtual std::unique_ptr implCloneProperties(SdrObject& rObj) const override; + public: // basic constructor explicit EmptyProperties(SdrObject& rObj); - // Clone() operator, normally just calls the local copy constructor - virtual std::unique_ptr Clone(SdrObject& rObj) const override; - // create a new object specific itemset with object specific ranges. virtual SfxItemSet CreateObjectSpecificItemSet(SfxItemPool& pPool) override; diff --git a/svx/inc/sdr/properties/graphicproperties.hxx b/svx/inc/sdr/properties/graphicproperties.hxx index e1ab266ce058..96089310b8b3 100644 --- a/svx/inc/sdr/properties/graphicproperties.hxx +++ b/svx/inc/sdr/properties/graphicproperties.hxx @@ -27,6 +27,9 @@ namespace sdr::properties { class GraphicProperties final : public RectangleProperties { + // Clone() operator, normally just calls the local copy constructor + virtual std::unique_ptr implCloneProperties(SdrObject& rObj) const override; + // apply the correct SfyStyleSheet from SdrObject's SdrModel virtual void applyDefaultStyleSheetFromSdrModel() override; @@ -46,9 +49,6 @@ namespace sdr::properties // destructor virtual ~GraphicProperties() override; - // Clone() operator, normally just calls the local copy constructor - virtual std::unique_ptr Clone(SdrObject& rObj) const override; - // set a new StyleSheet and broadcast virtual void SetStyleSheet(SfxStyleSheet* pNewStyleSheet, bool bDontRemoveHardAttr, bool bBroadcast, bool bAdjustTextFrameWidthAndHeight = true) override; diff --git a/svx/inc/sdr/properties/groupproperties.hxx b/svx/inc/sdr/properties/groupproperties.hxx index a2f83af65c7c..a2974a6a10f4 100644 --- a/svx/inc/sdr/properties/groupproperties.hxx +++ b/svx/inc/sdr/properties/groupproperties.hxx @@ -28,8 +28,12 @@ namespace sdr::properties { class GroupProperties final : public BaseProperties { + // Clone() operator, normally just calls the local copy constructor + virtual std::unique_ptr implCloneProperties(SdrObject& rObj) const override; + // the to be used ItemSet mutable std::optional moMergedItemSet; + public: // basic constructor explicit GroupProperties(SdrObject& rObj); @@ -40,9 +44,6 @@ namespace sdr::properties // create a new object specific itemset with object specific ranges. virtual SfxItemSet CreateObjectSpecificItemSet(SfxItemPool& pPool) override; - // Clone() operator, normally just calls the local copy constructor - virtual std::unique_ptr Clone(SdrObject& rObj) const override; - // get itemset virtual const SfxItemSet& GetObjectItemSet() const override; diff --git a/svx/inc/sdr/properties/measureproperties.hxx b/svx/inc/sdr/properties/measureproperties.hxx index 7d85743489ad..7c70c1984a25 100644 --- a/svx/inc/sdr/properties/measureproperties.hxx +++ b/svx/inc/sdr/properties/measureproperties.hxx @@ -27,6 +27,9 @@ namespace sdr::properties { class MeasureProperties final : public TextProperties { + // Clone() operator, normally just calls the local copy constructor + virtual std::unique_ptr implCloneProperties(SdrObject& rObj) const override; + // create a new itemset virtual SfxItemSet CreateObjectSpecificItemSet(SfxItemPool& rPool) override; @@ -43,9 +46,6 @@ namespace sdr::properties // destructor virtual ~MeasureProperties() override; - // Clone() operator, normally just calls the local copy constructor - virtual std::unique_ptr Clone(SdrObject& rObj) const override; - // set a new StyleSheet and broadcast virtual void SetStyleSheet(SfxStyleSheet* pNewStyleSheet, bool bDontRemoveHardAttr, bool bBroadcast, bool bAdjustTextFrameWidthAndHeight = true) override; diff --git a/svx/inc/sdr/properties/oleproperties.hxx b/svx/inc/sdr/properties/oleproperties.hxx index 2a35c3ad0ec4..f4753967f122 100644 --- a/svx/inc/sdr/properties/oleproperties.hxx +++ b/svx/inc/sdr/properties/oleproperties.hxx @@ -27,6 +27,9 @@ namespace sdr::properties { class OleProperties final : public RectangleProperties { + // Clone() operator, normally just calls the local copy constructor + virtual std::unique_ptr implCloneProperties(SdrObject& rObj) const override; + // apply the correct SfyStyleSheet from SdrObject's SdrModel virtual void applyDefaultStyleSheetFromSdrModel() override; @@ -39,9 +42,6 @@ namespace sdr::properties // destructor virtual ~OleProperties() override; - - // Clone() operator, normally just calls the local copy constructor - virtual std::unique_ptr Clone(SdrObject& rObj) const override; }; } // end of namespace sdr::properties diff --git a/svx/inc/sdr/properties/pageproperties.hxx b/svx/inc/sdr/properties/pageproperties.hxx index 6ec599e80a04..0828cfeac268 100644 --- a/svx/inc/sdr/properties/pageproperties.hxx +++ b/svx/inc/sdr/properties/pageproperties.hxx @@ -28,6 +28,9 @@ namespace sdr::properties { class PageProperties final : public BaseProperties { + // Clone() operator, normally just calls the local copy constructor + virtual std::unique_ptr implCloneProperties(SdrObject& rObj) const override; + // the to be used ItemSet mutable std::optional mxEmptyItemSet; @@ -44,9 +47,6 @@ namespace sdr::properties // create a new object specific itemset with object specific ranges. virtual SfxItemSet CreateObjectSpecificItemSet(SfxItemPool& pPool) override; - // Clone() operator, normally just calls the local copy constructor - virtual std::unique_ptr Clone(SdrObject& rObj) const override; - virtual const SfxItemSet& GetObjectItemSet() const override; // get the installed StyleSheet diff --git a/svx/inc/sdr/properties/rectangleproperties.hxx b/svx/inc/sdr/properties/rectangleproperties.hxx index bcef4f758f7a..fb5aed74bc96 100644 --- a/svx/inc/sdr/properties/rectangleproperties.hxx +++ b/svx/inc/sdr/properties/rectangleproperties.hxx @@ -27,6 +27,9 @@ namespace sdr::properties { class RectangleProperties : public TextProperties { + // Clone() operator, normally just calls the local copy constructor + virtual std::unique_ptr implCloneProperties(SdrObject& rObj) const override; + protected: // react on ItemSet changes virtual void ItemSetChanged(std::span< const SfxPoolItem* const > aChangedItems, sal_uInt16 nDeletedWhich, bool bAdjustTextFrameWidthAndHeight = true) override; @@ -41,9 +44,6 @@ namespace sdr::properties // destructor virtual ~RectangleProperties() override; - // Clone() operator, normally just calls the local copy constructor - virtual std::unique_ptr Clone(SdrObject& rObj) const override; - // set a new StyleSheet and broadcast virtual void SetStyleSheet(SfxStyleSheet* pNewStyleSheet, bool bDontRemoveHardAttr, bool bBroadcast, bool bAdjustTextFrameWidthAndHeight = true) override; diff --git a/svx/inc/sdr/properties/textproperties.hxx b/svx/inc/sdr/properties/textproperties.hxx index 980096229253..f6b152aee1b3 100644 --- a/svx/inc/sdr/properties/textproperties.hxx +++ b/svx/inc/sdr/properties/textproperties.hxx @@ -28,10 +28,12 @@ namespace sdr::properties { class TextProperties : public AttributeProperties { - private: // #i101556# versioning support sal_uInt32 maVersion; + // Clone() operator, normally just calls the local copy constructor + virtual std::unique_ptr implCloneProperties(SdrObject& rObj) const override; + protected: // create a new itemset virtual SfxItemSet CreateObjectSpecificItemSet(SfxItemPool& rPool) override; @@ -55,9 +57,6 @@ namespace sdr::properties // destructor virtual ~TextProperties() override; - // Clone() operator, normally just calls the local copy constructor - virtual std::unique_ptr Clone(SdrObject& rObj) const override; - // set a new StyleSheet and broadcast virtual void SetStyleSheet(SfxStyleSheet* pNewStyleSheet, bool bDontRemoveHardAttr, bool bBroadcast, bool bAdjustTextFrameWidthAndHeight = true) override; diff --git a/svx/source/annotation/AnnotationObject.cxx b/svx/source/annotation/AnnotationObject.cxx index 75de32522e92..d84e83c3461c 100644 --- a/svx/source/annotation/AnnotationObject.cxx +++ b/svx/source/annotation/AnnotationObject.cxx @@ -232,7 +232,7 @@ OUString AnnotationObject::TakeObjNameSingul() const OUString AnnotationObject::TakeObjNamePlural() const { return u"Annotations"_ustr; } -rtl::Reference AnnotationObject::CloneSdrObject(SdrModel& rTargetModel) const +rtl::Reference AnnotationObject::implCloneSdrObject(SdrModel& rTargetModel) const { return new AnnotationObject(rTargetModel, *this); } diff --git a/svx/source/engine3d/cube3d.cxx b/svx/source/engine3d/cube3d.cxx index 42a215dd3477..ecda75591485 100644 --- a/svx/source/engine3d/cube3d.cxx +++ b/svx/source/engine3d/cube3d.cxx @@ -95,7 +95,7 @@ rtl::Reference E3dCubeObj::DoConvertToPolyObj(bool /*bBezier*/, bool return nullptr; } -rtl::Reference E3dCubeObj::CloneSdrObject(SdrModel& rTargetModel) const +rtl::Reference E3dCubeObj::implCloneSdrObject(SdrModel& rTargetModel) const { return new E3dCubeObj(rTargetModel, *this); } diff --git a/svx/source/engine3d/extrud3d.cxx b/svx/source/engine3d/extrud3d.cxx index fa9b73e02797..a58ce4915f68 100644 --- a/svx/source/engine3d/extrud3d.cxx +++ b/svx/source/engine3d/extrud3d.cxx @@ -112,7 +112,7 @@ SdrObjKind E3dExtrudeObj::GetObjIdentifier() const return SdrObjKind::E3D_Extrusion; } -rtl::Reference E3dExtrudeObj::CloneSdrObject(SdrModel& rTargetModel) const +rtl::Reference E3dExtrudeObj::implCloneSdrObject(SdrModel& rTargetModel) const { return new E3dExtrudeObj(rTargetModel, *this); } diff --git a/svx/source/engine3d/lathe3d.cxx b/svx/source/engine3d/lathe3d.cxx index e8664cb949ad..22ab4f70d0fb 100644 --- a/svx/source/engine3d/lathe3d.cxx +++ b/svx/source/engine3d/lathe3d.cxx @@ -117,7 +117,7 @@ SdrObjKind E3dLatheObj::GetObjIdentifier() const return SdrObjKind::E3D_Lathe; } -rtl::Reference E3dLatheObj::CloneSdrObject(SdrModel& rTargetModel) const +rtl::Reference E3dLatheObj::implCloneSdrObject(SdrModel& rTargetModel) const { return new E3dLatheObj(rTargetModel, *this); } diff --git a/svx/source/engine3d/obj3d.cxx b/svx/source/engine3d/obj3d.cxx index 0955681dbc4c..9422d961402f 100644 --- a/svx/source/engine3d/obj3d.cxx +++ b/svx/source/engine3d/obj3d.cxx @@ -397,7 +397,7 @@ OUString E3dObject::TakeObjNamePlural() const return SvxResId(STR_ObjNamePluralObj3d); } -rtl::Reference E3dObject::CloneSdrObject(SdrModel& rTargetModel) const +rtl::Reference E3dObject::implCloneSdrObject(SdrModel& rTargetModel) const { return new E3dObject(rTargetModel, *this); } @@ -593,7 +593,7 @@ void E3dCompoundObject::RecalcSnapRect() sal_Int32(ceil(aSnapRange.getMaxX())), sal_Int32(ceil(aSnapRange.getMaxY()))); } -rtl::Reference E3dCompoundObject::CloneSdrObject(SdrModel& rTargetModel) const +rtl::Reference E3dCompoundObject::implCloneSdrObject(SdrModel& rTargetModel) const { return new E3dCompoundObject(rTargetModel, *this); } diff --git a/svx/source/engine3d/polygn3d.cxx b/svx/source/engine3d/polygn3d.cxx index 3303cfe77d60..1b71210fcbc2 100644 --- a/svx/source/engine3d/polygn3d.cxx +++ b/svx/source/engine3d/polygn3d.cxx @@ -223,7 +223,7 @@ rtl::Reference E3dPolygonObj::DoConvertToPolyObj(bool /*bBezier*/, return nullptr; } -rtl::Reference E3dPolygonObj::CloneSdrObject(SdrModel& rTargetModel) const +rtl::Reference E3dPolygonObj::implCloneSdrObject(SdrModel& rTargetModel) const { return new E3dPolygonObj(rTargetModel, *this); } diff --git a/svx/source/engine3d/scene3d.cxx b/svx/source/engine3d/scene3d.cxx index fb1151cceb74..0c59b2c2b9d6 100644 --- a/svx/source/engine3d/scene3d.cxx +++ b/svx/source/engine3d/scene3d.cxx @@ -439,7 +439,7 @@ void E3dScene::removeAllNonSelectedObjects() } } -rtl::Reference E3dScene::CloneSdrObject(SdrModel& rTargetModel) const +rtl::Reference E3dScene::implCloneSdrObject(SdrModel& rTargetModel) const { return new E3dScene(rTargetModel, *this); } diff --git a/svx/source/engine3d/sphere3d.cxx b/svx/source/engine3d/sphere3d.cxx index 35c6dc0135d2..a3a75ae55067 100644 --- a/svx/source/engine3d/sphere3d.cxx +++ b/svx/source/engine3d/sphere3d.cxx @@ -99,7 +99,7 @@ rtl::Reference E3dSphereObj::DoConvertToPolyObj(bool /*bBezier*/, boo return nullptr; } -rtl::Reference E3dSphereObj::CloneSdrObject(SdrModel& rTargetModel) const +rtl::Reference E3dSphereObj::implCloneSdrObject(SdrModel& rTargetModel) const { return new E3dSphereObj(rTargetModel, *this); } diff --git a/svx/source/form/fmobj.cxx b/svx/source/form/fmobj.cxx index 6a82eef6b2d3..b1e4b0e5de49 100644 --- a/svx/source/form/fmobj.cxx +++ b/svx/source/form/fmobj.cxx @@ -358,7 +358,7 @@ SdrObjKind FmFormObj::GetObjIdentifier() const return SdrObjKind::UNO; } -rtl::Reference FmFormObj::CloneSdrObject(SdrModel& rTargetModel) const +rtl::Reference FmFormObj::implCloneSdrObject(SdrModel& rTargetModel) const { return new FmFormObj(rTargetModel, *this); } diff --git a/svx/source/inc/fmobj.hxx b/svx/source/inc/fmobj.hxx index d19399a737ee..629e2f201db0 100644 --- a/svx/source/inc/fmobj.hxx +++ b/svx/source/inc/fmobj.hxx @@ -50,6 +50,8 @@ class UNLESS_MERGELIBS(SVXCORE_DLLPUBLIC) FmFormObj final : public SdrUnoObj // protected destructor SAL_DLLPRIVATE virtual ~FmFormObj() override; + SAL_DLLPRIVATE virtual rtl::Reference implCloneSdrObject(SdrModel& rTargetModel) const override; + public: FmFormObj( SdrModel& rSdrModel, @@ -79,8 +81,6 @@ public: SAL_DLLPRIVATE virtual SdrObjKind GetObjIdentifier() const override; SAL_DLLPRIVATE virtual void NbcReformatText() override; - SAL_DLLPRIVATE virtual rtl::Reference CloneSdrObject(SdrModel& rTargetModel) const override; - SAL_DLLPRIVATE static css::uno::Reference< css::uno::XInterface> ensureModelEnv( const css::uno::Reference< css::uno::XInterface>& _rSourceContainer, const css::uno::Reference< css::form::XForms>& _rTopLevelDestContainer); diff --git a/svx/source/sdr/properties/attributeproperties.cxx b/svx/source/sdr/properties/attributeproperties.cxx index 3ccf39277635..53c79dbef826 100644 --- a/svx/source/sdr/properties/attributeproperties.cxx +++ b/svx/source/sdr/properties/attributeproperties.cxx @@ -144,74 +144,103 @@ namespace sdr::properties : DefaultProperties(rProps, rObj), mpStyleSheet(nullptr) { - SfxStyleSheet* pTargetStyleSheet(rProps.GetStyleSheet()); + const bool bModelChange(&rObj.getSdrModelFromSdrObject() != &rProps.GetSdrObject().getSdrModelFromSdrObject()); - if(pTargetStyleSheet) + if (bModelChange) { - const bool bModelChange(&rObj.getSdrModelFromSdrObject() != &rProps.GetSdrObject().getSdrModelFromSdrObject()); - - if(bModelChange) - { - // tdf#117506 - // The error shows that it is definitely necessary to solve this problem. - // Interestingly I already had a note here for 'work needed'. - // Checked in libreoffice-6-0 what happened there. In principle, the whole - // ::Clone of SdrPage and SdrObject happened in the same SdrModel, only - // afterwards a ::SetModel was used at the cloned SdrPage which went through - // all layers. The StyleSheet-problem was solved in - // AttributeProperties::MoveToItemPool at the end. There, a StyleSheet with the - // same name was searched for in the target-SdrModel. - // Start by resetting the current TargetStyleSheet so that nothing goes wrong - // when we do not find a fitting TargetStyleSheet. - // Note: The test for SdrModelChange above was wrong (compared the already set - // new SdrObject), so this never triggered and pTargetStyleSheet was never set to - // nullptr before. This means that a StyleSheet from another SdrModel was used - // which of course is very dangerous. Interestingly did not crash since when that - // other SdrModel was destroyed the ::Notify mechanism still worked reliably - // and disconnected these Properties successfully from the alien-StyleSheet. - pTargetStyleSheet = nullptr; - - // Check if we have a TargetStyleSheetPool at the target-SdrModel. This *should* - // be the case already (SdrModel::Merge and SdDrawDocument::InsertBookmarkAsPage - // have already cloned the StyleSheets to the target-SdrModel when used in Draw/impress). - // If none is found, ImpGetDefaultStyleSheet will be used to set a 'default' - // StyleSheet as StyleSheet implicitly later (that's what happened in the task, - // thus the FillStyle changed to the 'default' Blue). - // Note: It *may* be necessary to do more for StyleSheets, e.g. clone/copy the - // StyleSheet Hierarchy from the source SdrModel and/or add the Items from there - // as hard attributes. If needed, have a look at the older AttributeProperties::SetModel - // implementation from e.g. libreoffice-6-0. - SfxStyleSheetBasePool* pTargetStyleSheetPool(rObj.getSdrModelFromSdrObject().GetStyleSheetPool()); - - if(nullptr != pTargetStyleSheetPool) - { - // If we have a TargetStyleSheetPool, search for the used StyleSheet - // in the target SdrModel using the Name from the original StyleSheet - // in the source-SdrModel. - pTargetStyleSheet = dynamic_cast< SfxStyleSheet* >( - pTargetStyleSheetPool->Find( - rProps.GetStyleSheet()->GetName(), - rProps.GetStyleSheet()->GetFamily())); - } - } - } - - if(!pTargetStyleSheet) - return; - - if(HasSfxItemSet()) - { - // The SfxItemSet has been cloned and exists, - // we can directly set the SfxStyleSheet at it - ImpAddStyleSheet(pTargetStyleSheet, true); + // use default; will be corrected/handled in call to + // postProcessAfterCloneToDifferentModel below. Thus, + // also do not yet call ImpAddStyleSheet here + mpStyleSheet = GetSdrObject().getSdrModelFromSdrObject().GetDefaultStyleSheet(); } else { - // No SfxItemSet exists yet (there is none in - // the source, so none was cloned). Remember the - // SfxStyleSheet to set it when the SfxItemSet - // got constructed on-demand - mpStyleSheet = pTargetStyleSheet; + // copy existing one + mpStyleSheet = rProps.GetStyleSheet(); + + // add StyleSheet && establish the parent-links in the SfxItemSet + ImpAddStyleSheet(mpStyleSheet, true); + } + } + + void AttributeProperties::postProcessAfterCloneToDifferentModel(const SdrObject& rSrcObj) + { + SdrModel& rDstModel(GetSdrObject().getSdrModelFromSdrObject()); + const bool bModelChange(&rSrcObj.getSdrModelFromSdrObject() != &rDstModel); + + if (!bModelChange) + return; + + // guarantee SfxItemSet existence + DefaultProperties::GetObjectItemSet(); + const sdr::properties::BaseProperties& rSource(rSrcObj.GetProperties()); + SfxStyleSheet* pNewStyleSheet(nullptr); + + if (rDstModel.GetStyleSheetPool()) + { + SfxStyleSheet* pSourceStyleSheet(rSource.GetStyleSheet()); + + if (pSourceStyleSheet) + { + // If we have a TargetStyleSheetPool, search for the used StyleSheet + // in the target SdrModel using the Name from the original StyleSheet + // in the source-SdrModel. + // That will/should work always since Paste from another model will + // in a 1st step copy non-existing StyleSheets to destination model + pNewStyleSheet = dynamic_cast< SfxStyleSheet* >( + rDstModel.GetStyleSheetPool()->Find( + pSourceStyleSheet->GetName(), + pSourceStyleSheet->GetFamily())); + } + } + + // fallback: every SdrObject *should* have a StyleSheet, use + // default from the model + if(!pNewStyleSheet) + pNewStyleSheet = rDstModel.GetDefaultStyleSheet(); + + if(!pNewStyleSheet) + // may still have no StyleSheet, was so before, too, but + // should not happen since a DefaultStyleSheet should + // always be there + return; + + // add StyleSheet && establish the parent-links in the SfxItemSet + if (GetStyleSheet() != pNewStyleSheet) + { + ImpRemoveStyleSheet(); + ImpAddStyleSheet(pNewStyleSheet, true); + } + + if (HasSfxItemSet()) + { + // here we have a model change and a StyleSheet set,. but that + // StyleSheet was found by looking for name & type. It may + // *not* be identical to the StyleSheet from the Source. + + // What to do? We could... + // (a) the Style-friendly way: + // - check if StyleSheet is identical + // - if not, create a new in-between StyleSheet hosting missing Items + // - if yes, use, done. + // (b) the pragmatic/practical way: + // - Just hard-attribute the Items that are detected as different + // similar to what BurnInStyleSheetAttributes does/did, but only + // for differing Items here + // + // (b)) is the most simple for now, but will lead to more hard + // attributes. The other possibilities will be better in the + // long term. For now, I will use (b). + SfxWhichIter aIter(rSource.GetObjectItemSet()); + + for (sal_uInt16 nWhich = aIter.FirstWhich(); nWhich; nWhich = aIter.NextWhich()) + { + const SfxPoolItem& rOld(rSource.GetItem(nWhich)); + const SfxPoolItem& rNew(GetItem(nWhich)); + + if (!SfxPoolItem::areSame(rOld, rNew)) + SetObjectItemDirect(rOld); + } } } @@ -220,7 +249,7 @@ namespace sdr::properties ImpRemoveStyleSheet(); } - std::unique_ptr AttributeProperties::Clone(SdrObject&) const + std::unique_ptr AttributeProperties::implCloneProperties(SdrObject&) const { assert(false && "this class is effectively abstract, should only be instantiating subclasses"); abort(); diff --git a/svx/source/sdr/properties/captionproperties.cxx b/svx/source/sdr/properties/captionproperties.cxx index 958f9eecf080..dd71a6640791 100644 --- a/svx/source/sdr/properties/captionproperties.cxx +++ b/svx/source/sdr/properties/captionproperties.cxx @@ -57,7 +57,7 @@ namespace sdr::properties { } - std::unique_ptr CaptionProperties::Clone(SdrObject& rObj) const + std::unique_ptr CaptionProperties::implCloneProperties(SdrObject& rObj) const { return std::unique_ptr(new CaptionProperties(*this, rObj)); } diff --git a/svx/source/sdr/properties/circleproperties.cxx b/svx/source/sdr/properties/circleproperties.cxx index 217b9e7b257e..404023e507d8 100644 --- a/svx/source/sdr/properties/circleproperties.cxx +++ b/svx/source/sdr/properties/circleproperties.cxx @@ -61,7 +61,7 @@ namespace sdr::properties { } - std::unique_ptr CircleProperties::Clone(SdrObject& rObj) const + std::unique_ptr CircleProperties::implCloneProperties(SdrObject& rObj) const { return std::unique_ptr(new CircleProperties(*this, rObj)); } diff --git a/svx/source/sdr/properties/connectorproperties.cxx b/svx/source/sdr/properties/connectorproperties.cxx index e5e29de75979..778681834821 100644 --- a/svx/source/sdr/properties/connectorproperties.cxx +++ b/svx/source/sdr/properties/connectorproperties.cxx @@ -59,7 +59,7 @@ namespace sdr::properties { } - std::unique_ptr ConnectorProperties::Clone(SdrObject& rObj) const + std::unique_ptr ConnectorProperties::implCloneProperties(SdrObject& rObj) const { return std::unique_ptr(new ConnectorProperties(*this, rObj)); } diff --git a/svx/source/sdr/properties/customshapeproperties.cxx b/svx/source/sdr/properties/customshapeproperties.cxx index c63d7e4a4b3c..d56b32a4b278 100644 --- a/svx/source/sdr/properties/customshapeproperties.cxx +++ b/svx/source/sdr/properties/customshapeproperties.cxx @@ -195,7 +195,7 @@ namespace sdr::properties { } - std::unique_ptr CustomShapeProperties::Clone(SdrObject& rObj) const + std::unique_ptr CustomShapeProperties::implCloneProperties(SdrObject& rObj) const { return std::unique_ptr(new CustomShapeProperties(*this, rObj)); } diff --git a/svx/source/sdr/properties/defaultproperties.cxx b/svx/source/sdr/properties/defaultproperties.cxx index cf2d196f3862..f5a551137660 100644 --- a/svx/source/sdr/properties/defaultproperties.cxx +++ b/svx/source/sdr/properties/defaultproperties.cxx @@ -88,7 +88,7 @@ namespace sdr::properties } } - std::unique_ptr DefaultProperties::Clone(SdrObject& rObj) const + std::unique_ptr DefaultProperties::implCloneProperties(SdrObject& rObj) const { return std::unique_ptr(new DefaultProperties(*this, rObj)); } diff --git a/svx/source/sdr/properties/e3dcompoundproperties.cxx b/svx/source/sdr/properties/e3dcompoundproperties.cxx index 8ad00d6092b9..755af4c8f2c9 100644 --- a/svx/source/sdr/properties/e3dcompoundproperties.cxx +++ b/svx/source/sdr/properties/e3dcompoundproperties.cxx @@ -39,7 +39,7 @@ namespace sdr::properties { } - std::unique_ptr E3dCompoundProperties::Clone(SdrObject& rObj) const + std::unique_ptr E3dCompoundProperties::implCloneProperties(SdrObject& rObj) const { return std::unique_ptr(new E3dCompoundProperties(*this, rObj)); } diff --git a/svx/source/sdr/properties/e3dextrudeproperties.cxx b/svx/source/sdr/properties/e3dextrudeproperties.cxx index 9b9ffd8be9ab..3caac2b5816e 100644 --- a/svx/source/sdr/properties/e3dextrudeproperties.cxx +++ b/svx/source/sdr/properties/e3dextrudeproperties.cxx @@ -37,7 +37,7 @@ namespace sdr::properties { } - std::unique_ptr E3dExtrudeProperties::Clone(SdrObject& rObj) const + std::unique_ptr E3dExtrudeProperties::implCloneProperties(SdrObject& rObj) const { return std::unique_ptr(new E3dExtrudeProperties(*this, rObj)); } diff --git a/svx/source/sdr/properties/e3dlatheproperties.cxx b/svx/source/sdr/properties/e3dlatheproperties.cxx index feb546534d47..329ed34eac37 100644 --- a/svx/source/sdr/properties/e3dlatheproperties.cxx +++ b/svx/source/sdr/properties/e3dlatheproperties.cxx @@ -37,7 +37,7 @@ namespace sdr::properties { } - std::unique_ptr E3dLatheProperties::Clone(SdrObject& rObj) const + std::unique_ptr E3dLatheProperties::implCloneProperties(SdrObject& rObj) const { return std::unique_ptr(new E3dLatheProperties(*this, rObj)); } diff --git a/svx/source/sdr/properties/e3dproperties.cxx b/svx/source/sdr/properties/e3dproperties.cxx index 2cd011ffbb55..672b2249ae81 100644 --- a/svx/source/sdr/properties/e3dproperties.cxx +++ b/svx/source/sdr/properties/e3dproperties.cxx @@ -55,7 +55,7 @@ namespace sdr::properties { } - std::unique_ptr E3dProperties::Clone(SdrObject& rObj) const + std::unique_ptr E3dProperties::implCloneProperties(SdrObject& rObj) const { return std::unique_ptr(new E3dProperties(*this, rObj)); } diff --git a/svx/source/sdr/properties/e3dsceneproperties.cxx b/svx/source/sdr/properties/e3dsceneproperties.cxx index 1716eece9a20..3ca38beacc04 100644 --- a/svx/source/sdr/properties/e3dsceneproperties.cxx +++ b/svx/source/sdr/properties/e3dsceneproperties.cxx @@ -42,7 +42,7 @@ namespace sdr::properties { } - std::unique_ptr E3dSceneProperties::Clone(SdrObject& rObj) const + std::unique_ptr E3dSceneProperties::implCloneProperties(SdrObject& rObj) const { return std::unique_ptr(new E3dSceneProperties(*this, rObj)); } diff --git a/svx/source/sdr/properties/e3dsphereproperties.cxx b/svx/source/sdr/properties/e3dsphereproperties.cxx index 66f01748f293..88a456cc228a 100644 --- a/svx/source/sdr/properties/e3dsphereproperties.cxx +++ b/svx/source/sdr/properties/e3dsphereproperties.cxx @@ -37,7 +37,7 @@ namespace sdr::properties { } - std::unique_ptr E3dSphereProperties::Clone(SdrObject& rObj) const + std::unique_ptr E3dSphereProperties::implCloneProperties(SdrObject& rObj) const { return std::unique_ptr(new E3dSphereProperties(*this, rObj)); } diff --git a/svx/source/sdr/properties/emptyproperties.cxx b/svx/source/sdr/properties/emptyproperties.cxx index 6f7b0f6876e5..3b56b8fa5122 100644 --- a/svx/source/sdr/properties/emptyproperties.cxx +++ b/svx/source/sdr/properties/emptyproperties.cxx @@ -31,7 +31,7 @@ namespace sdr::properties { } - std::unique_ptr EmptyProperties::Clone(SdrObject& rObj) const + std::unique_ptr EmptyProperties::implCloneProperties(SdrObject& rObj) const { return std::unique_ptr(new EmptyProperties(rObj)); } diff --git a/svx/source/sdr/properties/graphicproperties.cxx b/svx/source/sdr/properties/graphicproperties.cxx index 53c97e817952..730ec5314905 100644 --- a/svx/source/sdr/properties/graphicproperties.cxx +++ b/svx/source/sdr/properties/graphicproperties.cxx @@ -89,7 +89,7 @@ namespace sdr::properties { } - std::unique_ptr GraphicProperties::Clone(SdrObject& rObj) const + std::unique_ptr GraphicProperties::implCloneProperties(SdrObject& rObj) const { return std::unique_ptr(new GraphicProperties(*this, rObj)); } diff --git a/svx/source/sdr/properties/groupproperties.cxx b/svx/source/sdr/properties/groupproperties.cxx index 51e6a7d922e9..c4cb117bbbe6 100644 --- a/svx/source/sdr/properties/groupproperties.cxx +++ b/svx/source/sdr/properties/groupproperties.cxx @@ -38,7 +38,7 @@ namespace sdr::properties { } - std::unique_ptr GroupProperties::Clone(SdrObject& rObj) const + std::unique_ptr GroupProperties::implCloneProperties(SdrObject& rObj) const { return std::unique_ptr(new GroupProperties(rObj)); } diff --git a/svx/source/sdr/properties/measureproperties.cxx b/svx/source/sdr/properties/measureproperties.cxx index dd235aab8fe4..9ae9461eac8e 100644 --- a/svx/source/sdr/properties/measureproperties.cxx +++ b/svx/source/sdr/properties/measureproperties.cxx @@ -67,7 +67,7 @@ namespace sdr::properties { } - std::unique_ptr MeasureProperties::Clone(SdrObject& rObj) const + std::unique_ptr MeasureProperties::implCloneProperties(SdrObject& rObj) const { return std::unique_ptr(new MeasureProperties(*this, rObj)); } diff --git a/svx/source/sdr/properties/oleproperties.cxx b/svx/source/sdr/properties/oleproperties.cxx index 5310e74e30c6..ecb6b0b38b08 100644 --- a/svx/source/sdr/properties/oleproperties.cxx +++ b/svx/source/sdr/properties/oleproperties.cxx @@ -56,7 +56,7 @@ namespace sdr::properties { } - std::unique_ptr OleProperties::Clone(SdrObject& rObj) const + std::unique_ptr OleProperties::implCloneProperties(SdrObject& rObj) const { return std::unique_ptr(new OleProperties(*this, rObj)); } diff --git a/svx/source/sdr/properties/pageproperties.cxx b/svx/source/sdr/properties/pageproperties.cxx index 6b532d2d487b..9b5479ac9220 100644 --- a/svx/source/sdr/properties/pageproperties.cxx +++ b/svx/source/sdr/properties/pageproperties.cxx @@ -41,7 +41,7 @@ namespace sdr::properties { } - std::unique_ptr PageProperties::Clone(SdrObject& rObj) const + std::unique_ptr PageProperties::implCloneProperties(SdrObject& rObj) const { return std::unique_ptr(new PageProperties(*this, rObj)); } diff --git a/svx/source/sdr/properties/properties.cxx b/svx/source/sdr/properties/properties.cxx index 612813bb1aac..401a1fc3085b 100644 --- a/svx/source/sdr/properties/properties.cxx +++ b/svx/source/sdr/properties/properties.cxx @@ -40,6 +40,15 @@ namespace sdr::properties { } + void BaseProperties::postProcessAfterCloneToDifferentModel(const SdrObject& /*rSrcObj*/) + { + } + + std::unique_ptr BaseProperties::Clone(SdrObject& rObj) const + { + return implCloneProperties(rObj); + } + const SdrObject& BaseProperties::GetSdrObject() const { return mrObject; diff --git a/svx/source/sdr/properties/rectangleproperties.cxx b/svx/source/sdr/properties/rectangleproperties.cxx index 9242fa5f9ac5..619927399556 100644 --- a/svx/source/sdr/properties/rectangleproperties.cxx +++ b/svx/source/sdr/properties/rectangleproperties.cxx @@ -37,7 +37,7 @@ namespace sdr::properties { } - std::unique_ptr RectangleProperties::Clone(SdrObject& rObj) const + std::unique_ptr RectangleProperties::implCloneProperties(SdrObject& rObj) const { return std::unique_ptr(new RectangleProperties(*this, rObj)); } diff --git a/svx/source/sdr/properties/textproperties.cxx b/svx/source/sdr/properties/textproperties.cxx index b1a3d7a98ca0..afa93e40bfda 100644 --- a/svx/source/sdr/properties/textproperties.cxx +++ b/svx/source/sdr/properties/textproperties.cxx @@ -78,7 +78,7 @@ namespace sdr::properties { } - std::unique_ptr TextProperties::Clone(SdrObject& rObj) const + std::unique_ptr TextProperties::implCloneProperties(SdrObject& rObj) const { return std::unique_ptr(new TextProperties(*this, rObj)); } diff --git a/svx/source/svdraw/svdoashp.cxx b/svx/source/svdraw/svdoashp.cxx index 0af41c392f2e..0a07b633180b 100644 --- a/svx/source/svdraw/svdoashp.cxx +++ b/svx/source/svdraw/svdoashp.cxx @@ -2788,7 +2788,7 @@ void SdrObjCustomShape::NbcSetOutlinerParaObject(std::optional SdrObjCustomShape::CloneSdrObject(SdrModel& rTargetModel) const +rtl::Reference SdrObjCustomShape::implCloneSdrObject(SdrModel& rTargetModel) const { return new SdrObjCustomShape(rTargetModel, *this); } diff --git a/svx/source/svdraw/svdobj.cxx b/svx/source/svdraw/svdobj.cxx index 4eea5bda4ef4..f47485bc983f 100644 --- a/svx/source/svdraw/svdobj.cxx +++ b/svx/source/svdraw/svdobj.cxx @@ -110,8 +110,10 @@ #include #include #include +#include #include #include +#include #include #include @@ -1214,6 +1216,19 @@ bool SdrObject::HasLimitedRotation() const return false; } +rtl::Reference SdrObject::CloneSdrObject(SdrModel& rTargetModel) const +{ + if (&rTargetModel == &getSdrModelFromSdrObject()) + // clone to same model, simple method + return implCloneSdrObject(rTargetModel); + + // clone to different model, need to do more for creating a valid + // Style and Properties + rtl::Reference aRetval(implCloneSdrObject(rTargetModel)); + aRetval->GetProperties().postProcessAfterCloneToDifferentModel(*this); + return aRetval; +} + OUString SdrObject::TakeObjNameSingul() const { OUString sName(SvxResId(STR_ObjNameSingulNONE)); @@ -1920,7 +1935,7 @@ bool SdrObject::HasTextEdit() const bool SdrObject::Equals(const SdrObject& rOtherObj) const { - return (m_aAnchor.X() == rOtherObj.m_aAnchor.X() && m_aAnchor.Y() == rOtherObj.m_aAnchor.Y() && + const bool bEqual(m_aAnchor.X() == rOtherObj.m_aAnchor.X() && m_aAnchor.Y() == rOtherObj.m_aAnchor.Y() && m_nOrdNum == rOtherObj.m_nOrdNum && mnNavigationPosition == rOtherObj.mnNavigationPosition && mbSupportTextIndentingOnLineWidthChange == rOtherObj.mbSupportTextIndentingOnLineWidthChange && m_aCustomPromptText == rOtherObj.m_aCustomPromptText && @@ -1929,7 +1944,87 @@ bool SdrObject::Equals(const SdrObject& rOtherObj) const m_bNotVisibleAsMaster == rOtherObj.m_bNotVisibleAsMaster && m_bEmptyPresObj == rOtherObj.m_bEmptyPresObj && mbVisible == rOtherObj.mbVisible && m_bNoPrint == rOtherObj.m_bNoPrint && m_bSizProt == rOtherObj.m_bSizProt && m_bMovProt == rOtherObj.m_bMovProt && m_bVirtObj == rOtherObj.m_bVirtObj && - mnLayerID == rOtherObj.mnLayerID && GetMergedItemSet().Equals(rOtherObj.GetMergedItemSet(), false) ); + mnLayerID == rOtherObj.mnLayerID && IsGroupObject() == rOtherObj.IsGroupObject()); + + if (!bEqual) + // compare results *without* Items are already not equal, done + return false; + + if (IsGroupObject()) + { + // for GroupObjects, do what was done before. NOTE: This will create + // merged ItemSets for Group content, not sure if that is needed. + // It would also be possible to enter content & compare recursively + return GetMergedItemSet().Equals(rOtherObj.GetMergedItemSet(), false); + } + + // Do ContentCompare - Items are compared including parent e.g. Styles. + // The check above what was done before is more 'hard' in the sense that + // it WILL fail for same Item content when e.g. count of hard Items differs, + // but with parent ItemSet is actually equal. ContentCompare is necessary + // after e.g. in AttributeProperties::postProcessAfterCloneToDifferentModel + // the Items of an Object were hard-set/corrected + const SfxItemSet& rSrcItemSet(GetObjectItemSet()); + const SfxItemSet& rDstItemSet(rOtherObj.GetObjectItemSet()); + SfxWhichIter aIter(rSrcItemSet); + const SdrPage* pPage(getSdrPageFromSdrObject()); + const bool bOnMasterPage(nullptr != pPage && pPage->IsMasterPage()); + + for (sal_uInt16 nWhich = aIter.FirstWhich(); nWhich; nWhich = aIter.NextWhich()) + { + const SfxPoolItem& rOld(rSrcItemSet.Get(nWhich)); + const SfxPoolItem& rNew(rDstItemSet.Get(nWhich)); + + if (!SfxPoolItem::areSame(rOld, rNew)) + { + if (bOnMasterPage) + { + // we have strange effects for Items in Objects on MasterPages on + // some Items that seem to be corrected/set different due to being + // PresObjs or defaults or similar on MasterPage. React on those + // on MasterPages + switch (nWhich) + { + case XATTRSET_LINE: + case XATTRSET_FILL: + // these Items are not really used (maybe removed), + // ignore. Diffs come from these being SfxSetItems + // on different models with slightly different defaults + // in the contained complete default SfxItemSet + continue; + + // somewhere defaults for some objects seem to be set on MasterPages + // that define Items (here: for XATTR_FILLGRADIENT and FillStyle_BITMAP). + // These can be ignored when the FillStyle does not *use* these anyways. + // Better do this already for all FillStyles, you never know. + case XATTR_FILLCOLOR: + if (drawing::FillStyle_SOLID != rSrcItemSet.Get(XATTR_FILLSTYLE).GetValue()) + continue; + break; + case XATTR_FILLGRADIENT: + if (drawing::FillStyle_GRADIENT != rSrcItemSet.Get(XATTR_FILLSTYLE).GetValue()) + continue; + break; + case XATTR_FILLHATCH: + if (drawing::FillStyle_HATCH != rSrcItemSet.Get(XATTR_FILLSTYLE).GetValue()) + continue; + break; + case XATTR_FILLBITMAP: + if (drawing::FillStyle_BITMAP != rSrcItemSet.Get(XATTR_FILLSTYLE).GetValue()) + continue; + break; + + default: break; + } + } + + // Item is different, done + return false; + } + } + + // all Items are Content-Equal + return true; } void SdrObject::dumpAsXml(xmlTextWriterPtr pWriter) const @@ -3461,7 +3556,7 @@ public: { } - rtl::Reference CloneSdrObject(SdrModel& rTargetModel) const override + rtl::Reference implCloneSdrObject(SdrModel& rTargetModel) const override { return new EmptyObject(rTargetModel, *this); } diff --git a/svx/source/svdraw/svdocapt.cxx b/svx/source/svdraw/svdocapt.cxx index d9c45cb2f5a8..1f21395e3323 100644 --- a/svx/source/svdraw/svdocapt.cxx +++ b/svx/source/svdraw/svdocapt.cxx @@ -232,7 +232,7 @@ SdrObjKind SdrCaptionObj::GetObjIdentifier() const return SdrObjKind::Caption; } -rtl::Reference SdrCaptionObj::CloneSdrObject(SdrModel& rTargetModel) const +rtl::Reference SdrCaptionObj::implCloneSdrObject(SdrModel& rTargetModel) const { return new SdrCaptionObj(rTargetModel, *this); } diff --git a/svx/source/svdraw/svdocirc.cxx b/svx/source/svdraw/svdocirc.cxx index 12a04b95ed19..9d68ef5e4288 100644 --- a/svx/source/svdraw/svdocirc.cxx +++ b/svx/source/svdraw/svdocirc.cxx @@ -370,7 +370,7 @@ OUString SdrCircObj::TakeObjNamePlural() const return SvxResId(pID); } -rtl::Reference SdrCircObj::CloneSdrObject(SdrModel& rTargetModel) const +rtl::Reference SdrCircObj::implCloneSdrObject(SdrModel& rTargetModel) const { return new SdrCircObj(rTargetModel, *this); } diff --git a/svx/source/svdraw/svdoedge.cxx b/svx/source/svdraw/svdoedge.cxx index b0cb26dae6ab..0d23a5d9eecd 100644 --- a/svx/source/svdraw/svdoedge.cxx +++ b/svx/source/svdraw/svdoedge.cxx @@ -1721,7 +1721,7 @@ void SdrEdgeObj::Reformat() } } -rtl::Reference SdrEdgeObj::CloneSdrObject(SdrModel& rTargetModel) const +rtl::Reference SdrEdgeObj::implCloneSdrObject(SdrModel& rTargetModel) const { return new SdrEdgeObj(rTargetModel, *this); } diff --git a/svx/source/svdraw/svdograf.cxx b/svx/source/svdraw/svdograf.cxx index 5c21e9ff74c2..b3d163290f00 100644 --- a/svx/source/svdraw/svdograf.cxx +++ b/svx/source/svdraw/svdograf.cxx @@ -856,7 +856,7 @@ rtl::Reference SdrGrafObj::getFullDragClone() const return pRetval; } -rtl::Reference SdrGrafObj::CloneSdrObject(SdrModel& rTargetModel) const +rtl::Reference SdrGrafObj::implCloneSdrObject(SdrModel& rTargetModel) const { return new SdrGrafObj(rTargetModel, *this); } diff --git a/svx/source/svdraw/svdogrp.cxx b/svx/source/svdraw/svdogrp.cxx index 1760373fe791..a426b2f8c36c 100644 --- a/svx/source/svdraw/svdogrp.cxx +++ b/svx/source/svdraw/svdogrp.cxx @@ -268,7 +268,7 @@ const tools::Rectangle& SdrObjGroup::GetSnapRect() const } } -rtl::Reference SdrObjGroup::CloneSdrObject(SdrModel& rTargetModel) const +rtl::Reference SdrObjGroup::implCloneSdrObject(SdrModel& rTargetModel) const { return new SdrObjGroup(rTargetModel, *this); } diff --git a/svx/source/svdraw/svdomeas.cxx b/svx/source/svdraw/svdomeas.cxx index 074676ef1015..c520810f16d0 100644 --- a/svx/source/svdraw/svdomeas.cxx +++ b/svx/source/svdraw/svdomeas.cxx @@ -703,7 +703,7 @@ void SdrMeasureObj::TakeUnrotatedSnapRect(tools::Rectangle& rRect) const } } -rtl::Reference SdrMeasureObj::CloneSdrObject(SdrModel& rTargetModel) const +rtl::Reference SdrMeasureObj::implCloneSdrObject(SdrModel& rTargetModel) const { return new SdrMeasureObj(rTargetModel, *this); } diff --git a/svx/source/svdraw/svdomedia.cxx b/svx/source/svdraw/svdomedia.cxx index 8f9d251171a4..3cdfa995359f 100644 --- a/svx/source/svdraw/svdomedia.cxx +++ b/svx/source/svdraw/svdomedia.cxx @@ -207,7 +207,7 @@ OUString SdrMediaObj::TakeObjNamePlural() const return SvxResId(STR_ObjNamePluralMEDIA); } -rtl::Reference SdrMediaObj::CloneSdrObject(SdrModel& rTargetModel) const +rtl::Reference SdrMediaObj::implCloneSdrObject(SdrModel& rTargetModel) const { return new SdrMediaObj(rTargetModel, *this); } diff --git a/svx/source/svdraw/svdoole2.cxx b/svx/source/svdraw/svdoole2.cxx index 69902e416175..90107e4e1ce5 100644 --- a/svx/source/svdraw/svdoole2.cxx +++ b/svx/source/svdraw/svdoole2.cxx @@ -1577,7 +1577,7 @@ OUString SdrOle2Obj::TakeObjNamePlural() const return SvxResId(mpImpl->mbFrame ? STR_ObjNamePluralFrame : STR_ObjNamePluralOLE2); } -rtl::Reference SdrOle2Obj::CloneSdrObject(SdrModel& rTargetModel) const +rtl::Reference SdrOle2Obj::implCloneSdrObject(SdrModel& rTargetModel) const { return new SdrOle2Obj(rTargetModel, *this); } diff --git a/svx/source/svdraw/svdopage.cxx b/svx/source/svdraw/svdopage.cxx index 448758646afe..a04c84c3f6b2 100644 --- a/svx/source/svdraw/svdopage.cxx +++ b/svx/source/svdraw/svdopage.cxx @@ -151,7 +151,7 @@ void SdrPageObj::TakeObjInfo(SdrObjTransformInfoRec& rInfo) const rInfo.bCanConvToPolyLineToArea=false; } -rtl::Reference SdrPageObj::CloneSdrObject(SdrModel& rTargetModel) const +rtl::Reference SdrPageObj::implCloneSdrObject(SdrModel& rTargetModel) const { return new SdrPageObj(rTargetModel, *this); } diff --git a/svx/source/svdraw/svdopath.cxx b/svx/source/svdraw/svdopath.cxx index dc55745b9505..ed713ad2751e 100644 --- a/svx/source/svdraw/svdopath.cxx +++ b/svx/source/svdraw/svdopath.cxx @@ -1821,7 +1821,7 @@ SdrObjKind SdrPathObj::GetObjIdentifier() const return meKind; } -rtl::Reference SdrPathObj::CloneSdrObject(SdrModel& rTargetModel) const +rtl::Reference SdrPathObj::implCloneSdrObject(SdrModel& rTargetModel) const { return new SdrPathObj(rTargetModel, *this); } diff --git a/svx/source/svdraw/svdorect.cxx b/svx/source/svdraw/svdorect.cxx index 836422abebeb..0c31fbc8f027 100644 --- a/svx/source/svdraw/svdorect.cxx +++ b/svx/source/svdraw/svdorect.cxx @@ -214,7 +214,7 @@ OUString SdrRectObj::TakeObjNamePlural() const return SvxResId(pResId); } -rtl::Reference SdrRectObj::CloneSdrObject(SdrModel& rTargetModel) const +rtl::Reference SdrRectObj::implCloneSdrObject(SdrModel& rTargetModel) const { return new SdrRectObj(rTargetModel, *this); } diff --git a/svx/source/svdraw/svdotext.cxx b/svx/source/svdraw/svdotext.cxx index d8bb27266a09..684060b611ea 100644 --- a/svx/source/svdraw/svdotext.cxx +++ b/svx/source/svdraw/svdotext.cxx @@ -1055,7 +1055,7 @@ OUString SdrTextObj::TakeObjNamePlural() const return sName; } -rtl::Reference SdrTextObj::CloneSdrObject(SdrModel& rTargetModel) const +rtl::Reference SdrTextObj::implCloneSdrObject(SdrModel& rTargetModel) const { return new SdrTextObj(rTargetModel, *this); } diff --git a/svx/source/svdraw/svdouno.cxx b/svx/source/svdraw/svdouno.cxx index 0726d31ef4c4..3d690f889b9d 100644 --- a/svx/source/svdraw/svdouno.cxx +++ b/svx/source/svdraw/svdouno.cxx @@ -274,7 +274,7 @@ OUString SdrUnoObj::TakeObjNamePlural() const return SvxResId(STR_ObjNamePluralUno); } -rtl::Reference SdrUnoObj::CloneSdrObject(SdrModel& rTargetModel) const +rtl::Reference SdrUnoObj::implCloneSdrObject(SdrModel& rTargetModel) const { return new SdrUnoObj(rTargetModel, *this); } diff --git a/svx/source/svdraw/svdovirt.cxx b/svx/source/svdraw/svdovirt.cxx index 3bcd8202ef1d..dcba9c00707b 100644 --- a/svx/source/svdraw/svdovirt.cxx +++ b/svx/source/svdraw/svdovirt.cxx @@ -200,7 +200,7 @@ void SdrVirtObj::RecalcBoundRect() setOutRectangle(aRectangle); } -rtl::Reference SdrVirtObj::CloneSdrObject(SdrModel& rTargetModel) const +rtl::Reference SdrVirtObj::implCloneSdrObject(SdrModel& rTargetModel) const { return new SdrVirtObj(rTargetModel, *this); // TTTT not sure if the above works - how could SdrObjFactory::MakeNewObject diff --git a/svx/source/table/cell.cxx b/svx/source/table/cell.cxx index 49189685be31..06bfbb189e2e 100644 --- a/svx/source/table/cell.cxx +++ b/svx/source/table/cell.cxx @@ -174,7 +174,7 @@ SdrText* CellTextProvider::getText(sal_Int32 nIndex) const { } - std::unique_ptr CellProperties::Clone(SdrObject& rObj) const + std::unique_ptr CellProperties::implCloneProperties(SdrObject& rObj) const { OSL_FAIL("CellProperties::Clone(), does not work yet!"); return std::unique_ptr(new CellProperties(*this, rObj,nullptr)); diff --git a/svx/source/table/svdotable.cxx b/svx/source/table/svdotable.cxx index 38b16e05706e..dbbad0f788a2 100644 --- a/svx/source/table/svdotable.cxx +++ b/svx/source/table/svdotable.cxx @@ -99,7 +99,7 @@ public: TableProperties(const TableProperties& rProps, SdrObject& rObj ); // Clone() operator, normally just calls the local copy constructor - std::unique_ptr Clone(SdrObject& rObj) const override; + std::unique_ptr implCloneProperties(SdrObject& rObj) const override; virtual void ItemChange(const sal_uInt16 nWhich, const SfxPoolItem* pNewItem = nullptr) override; }; @@ -116,7 +116,7 @@ TableProperties::TableProperties(const TableProperties& rProps, SdrObject& rObj) { } -std::unique_ptr TableProperties::Clone(SdrObject& rObj) const +std::unique_ptr TableProperties::implCloneProperties(SdrObject& rObj) const { return std::unique_ptr(new TableProperties(*this, rObj)); } @@ -1782,7 +1782,7 @@ OUString SdrTableObj::TakeObjNamePlural() const } -rtl::Reference SdrTableObj::CloneSdrObject(SdrModel& rTargetModel) const +rtl::Reference SdrTableObj::implCloneSdrObject(SdrModel& rTargetModel) const { return new SdrTableObj(rTargetModel, *this); } diff --git a/sw/inc/dcontact.hxx b/sw/inc/dcontact.hxx index 5e87b3e58d5f..dca8508977b1 100644 --- a/sw/inc/dcontact.hxx +++ b/sw/inc/dcontact.hxx @@ -209,7 +209,6 @@ public: in later headers. */ class SwDrawVirtObj final : public SdrVirtObj { - private: // data for connection to writer layout /** anchored drawing object instance for the 'virtual' drawing object */ @@ -228,6 +227,8 @@ class SwDrawVirtObj final : public SdrVirtObj // protected destructor virtual ~SwDrawVirtObj() override; + virtual rtl::Reference implCloneSdrObject(SdrModel& rTargetModel) const override; + public: SwDrawVirtObj( SdrModel& rSdrModel, @@ -239,8 +240,6 @@ class SwDrawVirtObj final : public SdrVirtObj /// access to offset virtual Point GetOffset() const override; - virtual rtl::Reference CloneSdrObject(SdrModel& rTargetModel) const override; - /// connection to writer layout const SwAnchoredObject& GetAnchoredObj() const { return maAnchoredDrawObj; } SwAnchoredObject& AnchoredObj() { return maAnchoredDrawObj; } diff --git a/sw/source/core/draw/dcontact.cxx b/sw/source/core/draw/dcontact.cxx index eb2d208a5069..bffb0c4df509 100644 --- a/sw/source/core/draw/dcontact.cxx +++ b/sw/source/core/draw/dcontact.cxx @@ -2343,7 +2343,7 @@ SwDrawVirtObj::~SwDrawVirtObj() { } -rtl::Reference SwDrawVirtObj::CloneSdrObject(SdrModel& rTargetModel) const +rtl::Reference SwDrawVirtObj::implCloneSdrObject(SdrModel& rTargetModel) const { return new SwDrawVirtObj(rTargetModel, *this); } diff --git a/sw/source/core/draw/dflyobj.cxx b/sw/source/core/draw/dflyobj.cxx index 446fc2b1ea46..36397d3fab20 100644 --- a/sw/source/core/draw/dflyobj.cxx +++ b/sw/source/core/draw/dflyobj.cxx @@ -145,7 +145,7 @@ SdrObjKind SwFlyDrawObj::GetObjIdentifier() const return SdrObjKind::SwFlyDrawObjIdentifier; } -rtl::Reference SwFlyDrawObj::CloneSdrObject(SdrModel& rTargetModel) const +rtl::Reference SwFlyDrawObj::implCloneSdrObject(SdrModel& rTargetModel) const { return new SwFlyDrawObj(rTargetModel); } diff --git a/sw/source/core/inc/dflyobj.hxx b/sw/source/core/inc/dflyobj.hxx index 1ebcf2cecd43..e58d87452880 100644 --- a/sw/source/core/inc/dflyobj.hxx +++ b/sw/source/core/inc/dflyobj.hxx @@ -33,7 +33,6 @@ class SwFrameFormat; // DrawObjects for Flys class SwFlyDrawObj final : public SdrObject { -private: virtual std::unique_ptr CreateObjectSpecificProperties() override; bool mbIsTextBox; @@ -44,12 +43,12 @@ private: // protected destructor virtual ~SwFlyDrawObj() override; + // for instantiation of this class while loading (via factory + virtual rtl::Reference implCloneSdrObject(SdrModel& rTargetModel) const override; + public: SwFlyDrawObj(SdrModel& rSdrModel); - // for instantiation of this class while loading (via factory - virtual rtl::Reference CloneSdrObject(SdrModel& rTargetModel) const override; - virtual SdrInventor GetObjInventor() const override; virtual SdrObjKind GetObjIdentifier() const override; virtual bool IsTextBox() const override { return mbIsTextBox; } From 0eaa944aa5b0f743c9f58fb2f757eedc619773b9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= Date: Thu, 1 Oct 2026 19:40:56 +0000 Subject: [PATCH 152/289] put calc pivot table database sources under link control MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit like refreshing database range imports, so a pivot table whose source is a database document named by URL, rather than a registered data source, waits until link updates are allowed before it opens it, and counts as an external link so the update links infobar is offered Signed-off-by: Caolán McNamara Change-Id: I90a921ef6c4346da53f4cb28f099518221bd87f7 Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/14114 Tested-by: Jenkins CPCI Reviewed-by: Noel Grandin (cherry picked from commit 0d27a2394257fe817160ed4092aecd4168b792e5) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211721 Tested-by: Jenkins Reviewed-by: Xisco Fauli --- sc/inc/document.hxx | 4 ++++ sc/inc/dpobject.hxx | 6 +++++- sc/source/core/data/document10.cxx | 18 +++++++++++++++++- sc/source/core/data/dpobject.cxx | 30 ++++++++++++++++++++++++++++++ 4 files changed, 56 insertions(+), 2 deletions(-) diff --git a/sc/inc/document.hxx b/sc/inc/document.hxx index c58dc8033a74..ff0e457a6043 100644 --- a/sc/inc/document.hxx +++ b/sc/inc/document.hxx @@ -962,6 +962,10 @@ public: none. */ SC_DLLPUBLIC bool HasDataProviderMappings() const; + /** True when a pivot table takes its data from a database document named by URL rather than + from a registered data source. */ + bool HasDataPilotDatabaseLink() const; + /** True when the document holds anything that fetches content from outside the document and so needs the user to agree before it updates. */ SC_DLLPUBLIC bool HasExternalLinks() const; diff --git a/sc/inc/dpobject.hxx b/sc/inc/dpobject.hxx index 132775ea3385..306ef9e071e9 100644 --- a/sc/inc/dpobject.hxx +++ b/sc/inc/dpobject.hxx @@ -423,7 +423,7 @@ public: private: - static css::uno::Reference createRowSet( + css::uno::Reference createRowSet( sal_Int32 nSdbType, const OUString& rDBName, const OUString& rCommand); void updateCache( @@ -436,6 +436,10 @@ public: ScDPCollection(const ScDPCollection& r); ~ScDPCollection(); + /** True when rDBName is the name of a data source registered in the user's configuration. + Any other name is the URL of a database document. */ + static bool IsRegisteredDatabase(const OUString& rDBName); + TranslateId ReloadCache(const ScDPObject* pDPObj, o3tl::sorted_vector& rRefs); bool ReloadGroupsInCache(const ScDPObject* pDPObj, o3tl::sorted_vector& rRefs); SC_DLLPUBLIC bool GetReferenceGroups(const ScDPObject& rDPObj, const ScDPDimensionSaveData** pGroups) const; diff --git a/sc/source/core/data/document10.cxx b/sc/source/core/data/document10.cxx index b43bab38c6e1..714164aae387 100644 --- a/sc/source/core/data/document10.cxx +++ b/sc/source/core/data/document10.cxx @@ -28,6 +28,8 @@ #include #include #include +#include +#include #include #include #include @@ -1047,6 +1049,20 @@ bool ScDocument::HasDataProviderMappings() const return mpDataMapper && !mpDataMapper->getDataSources().empty(); } +bool ScDocument::HasDataPilotDatabaseLink() const +{ + if (!pDPCollection) + return false; + + for (size_t i = 0, nCount = pDPCollection->GetCount(); i < nCount; ++i) + { + const ScImportSourceDesc* pDesc = (*pDPCollection)[i].GetImportSourceDesc(); + if (pDesc && !ScDPCollection::IsRegisteredDatabase(pDesc->aDBName)) + return true; + } + return false; +} + bool ScDocument::HasExternalLinks() const { if (ScExternalRefManager* pRefMgr = GetExternalRefManager(); pRefMgr && pRefMgr->hasExternalData()) @@ -1059,7 +1075,7 @@ bool ScDocument::HasExternalLinks() const return true; if (HasLinkFormulaNeedingCheck() || HasDataProviderMappings() - || GetDocLinkManager().hasUpdatableLinks()) + || HasDataPilotDatabaseLink() || GetDocLinkManager().hasUpdatableLinks()) return true; const ScDrawLayer* pDrawLayer = GetDrawLayer(); diff --git a/sc/source/core/data/dpobject.cxx b/sc/source/core/data/dpobject.cxx index ab2b0f16509e..6a2d0c9b629a 100644 --- a/sc/source/core/data/dpobject.cxx +++ b/sc/source/core/data/dpobject.cxx @@ -42,6 +42,7 @@ #include #include +#include #include #include #include @@ -3474,6 +3475,24 @@ bool ScDPCollection::DBType::less::operator() (const DBType& left, const DBType& ScDPCollection::DBCaches::DBCaches(ScDocument& rDoc) : mrDoc(rDoc) {} +bool ScDPCollection::IsRegisteredDatabase(const OUString& rDBName) +{ + if (rDBName.isEmpty()) + return false; + + try + { + uno::Reference xContext + = sdb::DatabaseContext::create(comphelper::getProcessComponentContext()); + return xContext->hasRegisteredDatabase(rDBName); + } + catch (const uno::Exception&) + { + TOOLS_WARN_EXCEPTION("sc", "ScDPCollection::IsRegisteredDatabase"); + } + return false; +} + bool ScDPCollection::DBCaches::hasCache(sal_Int32 nSdbType, const OUString& rDBName, const OUString& rCommand) const { DBType aType(nSdbType, rDBName, rCommand); @@ -3532,6 +3551,17 @@ uno::Reference ScDPCollection::DBCaches::createRowSet( sal_Int32 nSdbType, const OUString& rDBName, const OUString& rCommand) { uno::Reference xRowSet; + + // A database document named by URL is an external link, so it is opened only once the user + // allows link updates. + ScDocShell* pDocShell = mrDoc.GetDocumentShell(); + if (pDocShell && !pDocShell->GetEmbeddedObjectContainer().getUserAllowsLinkUpdate() + && !IsRegisteredDatabase(rDBName)) + { + SAL_WARN("sc", "data pilot source " << rDBName << " waits for link updates to be allowed"); + return xRowSet; + } + try { xRowSet.set(comphelper::getProcessServiceFactory()->createInstance( From de88188e2cd8cd78ca46ace27c0a16a48ee538bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= Date: Thu, 1 Oct 2026 07:40:29 +0000 Subject: [PATCH 153/289] dbaccess: take JavaDriverClassPath only from the driver configuration MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit No UI ever wrote this setting into a database document. None of the (631) .odb files in the crashtesting test corpus have it set. Signed-off-by: Caolán McNamara Change-Id: I3d342f16dbd2d16da8a689a9526d90816967f738 Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/14009 Reviewed-by: Noel Grandin Tested-by: Jenkins CPCI (cherry picked from commit aae21cae8f686c0f4d43fcbee8b478aae8d60ff1) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211722 Tested-by: Jenkins Reviewed-by: Xisco Fauli --- dbaccess/CppunitTest_dbaccess_xmlimport.mk | 41 +++++++++++++++ dbaccess/Module_dbaccess.mk | 4 ++ .../qa/unit/data/document_java_classpath.odb | Bin 0 -> 2157 bytes dbaccess/qa/unit/xmlimport.cxx | 49 ++++++++++++++++++ dbaccess/source/filter/xml/xmlfilter.cxx | 5 +- 5 files changed, 98 insertions(+), 1 deletion(-) create mode 100644 dbaccess/CppunitTest_dbaccess_xmlimport.mk create mode 100644 dbaccess/qa/unit/data/document_java_classpath.odb create mode 100644 dbaccess/qa/unit/xmlimport.cxx diff --git a/dbaccess/CppunitTest_dbaccess_xmlimport.mk b/dbaccess/CppunitTest_dbaccess_xmlimport.mk new file mode 100644 index 000000000000..a9232df53872 --- /dev/null +++ b/dbaccess/CppunitTest_dbaccess_xmlimport.mk @@ -0,0 +1,41 @@ +# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t; 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/. +# + +$(eval $(call gb_CppunitTest_CppunitTest,dbaccess_xmlimport)) + +$(eval $(call gb_CppunitTest_use_externals,dbaccess_xmlimport, \ + libxml2 \ +)) + +$(eval $(call gb_CppunitTest_add_exception_objects,dbaccess_xmlimport, \ + dbaccess/qa/unit/xmlimport \ +)) + +$(eval $(call gb_CppunitTest_use_libraries,dbaccess_xmlimport, \ + comphelper \ + cppu \ + cppuhelper \ + sal \ + subsequenttest \ + test \ + tl \ + unotest \ + utl \ +)) + +$(eval $(call gb_CppunitTest_use_sdk_api,dbaccess_xmlimport)) + +$(eval $(call gb_CppunitTest_use_ure,dbaccess_xmlimport)) +$(eval $(call gb_CppunitTest_use_vcl,dbaccess_xmlimport)) + +$(eval $(call gb_CppunitTest_use_rdb,dbaccess_xmlimport,services)) + +$(eval $(call gb_CppunitTest_use_configuration,dbaccess_xmlimport)) + +# vim: set noet sw=4 ts=4: diff --git a/dbaccess/Module_dbaccess.mk b/dbaccess/Module_dbaccess.mk index 035c0445c62c..8072063fb6ab 100644 --- a/dbaccess/Module_dbaccess.mk +++ b/dbaccess/Module_dbaccess.mk @@ -34,6 +34,10 @@ $(eval $(call gb_Module_add_targets,dbaccess,\ UIConfig_dbtdata \ )) +$(eval $(call gb_Module_add_check_targets,dbaccess,\ + CppunitTest_dbaccess_xmlimport \ +)) + ifneq ($(OS),iOS) ifeq ($(ENABLE_FIREBIRD_SDBC),TRUE) $(eval $(call gb_Module_add_check_targets,dbaccess,\ diff --git a/dbaccess/qa/unit/data/document_java_classpath.odb b/dbaccess/qa/unit/data/document_java_classpath.odb new file mode 100644 index 0000000000000000000000000000000000000000..fc8137d9b81036e0f6cadd6aaa7ea793907807b2 GIT binary patch literal 2157 zcmaKt3pCVu8^>oN<8CImlFBtAmp2o`>?D`QFe|pfRO3trV|Fl?%*Z7+Yl~d!%|s;Y zQnC?7#)#fra!F;Y2_q9BSsJ31vE#DV`)A*d*1Owt&U1dh|2fa+`ThRS`Tm~A8!IEL z0a~@)*>;}u1u9Y#V880}fYYcnGCPJzCNY`e)F2X@%Ai}Fq6b?tNGvMLlEEa?gBd}Q zG%}rS8AxK0z5ka?el6MaFjUP;Ac@u{5J(wVS!6bwN~f?aqiNw;92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eMY1t9zuk%{uh5rgHHXGt!+2#%a)@!My^wLcQ-Muw>3`^^4o4+*9Bbzryl}@+ zSi}rG|W=_75OUoQOq>(@g+TRP~_*kj!8 zH;#XO#K5}+0S#=;R$F2OnaPM?v#ex5{~RX=#Dy>-XkU(k0#PmudI*&g8L`${S^NGk ztNNJ>Pga09E^q}+VD&uY<7DA}7;Qx((WxP1)><>E;CP0%T0_xN`*SY_k6iPG)$&Xw zvQuE6m{C=XVNpThKx1Fq9jpRe@S|Lcv|+(Js_dC9<-7uF?)_EAJ93yM7OQCxw4q@`BqgY5>lf#OSLQZs>zSA=dZbT?T)^7{dnw@hAnA-E)W94c5Trkt@ zq*#AP`>sxpb0M0W4P2mtCBUHx|4}1N6^B3@F>0C4g6#Pa|!e`ul11Cj$Z{ zfIWfj=d)`gxv|Z!lZSy5KWq9M!PUUerL_*KZ(bMLm#9^teX;~F5}^K+-IthE*?qDE lFbQBbif|*nQH1Ms20;I + +#include +#include +#include +#include +#include + +using namespace ::com::sun::star; + +namespace +{ +class DBXMLImportTest : public UnoApiTest +{ +public: + DBXMLImportTest() + : UnoApiTest(u"dbaccess/qa/unit/data"_ustr) + { + } +}; + +CPPUNIT_TEST_FIXTURE(DBXMLImportTest, testDocumentJavaClassPathIgnored) +{ + // The database names a Java class path both as a db:java-classpath attribute and as a data + // source setting. Neither reaches the data source, opened by URL as a database range does. + uno::Reference xContext + = sdb::DatabaseContext::create(comphelper::getProcessComponentContext()); + uno::Reference xDataSource( + xContext->getByName(createFileURL(u"document_java_classpath.odb")), uno::UNO_QUERY_THROW); + uno::Sequence aInfo; + xDataSource->getPropertyValue(u"Info"_ustr) >>= aInfo; + comphelper::NamedValueCollection aSettings(aInfo); + CPPUNIT_ASSERT_EQUAL(OUString(), + aSettings.getOrDefault(u"JavaDriverClassPath"_ustr, OUString())); +} +} + +CPPUNIT_PLUGIN_IMPLEMENT(); + +/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */ diff --git a/dbaccess/source/filter/xml/xmlfilter.cxx b/dbaccess/source/filter/xml/xmlfilter.cxx index d3e6a8ea2407..251a0774dda6 100644 --- a/dbaccess/source/filter/xml/xmlfilter.cxx +++ b/dbaccess/source/filter/xml/xmlfilter.cxx @@ -589,7 +589,10 @@ void ODBFilter::setPropertyInfo() Sequence aInfo; if ( !m_aInfoSequence.empty() ) aInfo = comphelper::containerToSequence(m_aInfoSequence); - aDataSourceSettings.merge( ::comphelper::NamedValueCollection( aInfo ), true ); + ::comphelper::NamedValueCollection aDocumentSettings( aInfo ); + // The Java class path of a driver comes from the driver configuration, not the document. + aDocumentSettings.remove( u"JavaDriverClassPath"_ustr ); + aDataSourceSettings.merge( aDocumentSettings, true ); aDataSourceSettings >>= aInfo; if ( aInfo.hasElements() ) From 0f2d89705944d97aee45a17c560825d0df6591e8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= Date: Sun, 27 Sep 2026 22:51:09 +0000 Subject: [PATCH 154/289] check the class of a nested user type found by name in SbiImage::Load MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Caolán McNamara Change-Id: Ic9215a25384e07e6c082efbeb3b79dc4b56d158c Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/13657 Reviewed-by: Noel Grandin Tested-by: Jenkins CPCI (cherry picked from commit 48162866845dd588ec0a85a9e9e93ed4477d7771) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211727 Tested-by: Jenkins Reviewed-by: Xisco Fauli --- basic/source/classes/image.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/basic/source/classes/image.cxx b/basic/source/classes/image.cxx index 2b42ce3dced3..cc9f023ede43 100644 --- a/basic/source/classes/image.cxx +++ b/basic/source/classes/image.cxx @@ -320,7 +320,7 @@ bool SbiImage::Load( SvStream& r, sal_uInt32& nVersion ) // nested user defined types // declared before use, so it is ok to reference it by name on load OUString aNestedTypeName = r.ReadUniOrByteString(eCharSet); - SbxObject* pNestedTypeObj = static_cast< SbxObject* >( rTypes->Find( aNestedTypeName, SbxClassType::Object ) ); + SbxObject* pNestedTypeObj = dynamic_cast< SbxObject* >( rTypes->Find( aNestedTypeName, SbxClassType::Object ) ); if (pNestedTypeObj) { SbxObjectRef pCloneObj = cloneTypeObjectImpl( *pNestedTypeObj ); From 0e9f94c375efdc40911364452fef7c7082f76cb6 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Tue, 29 Sep 2026 14:33:07 +0200 Subject: [PATCH 155/289] remove bounds checking EditDoc methods which just tends to obscure problems, rather than help. Fix a couple of places which have out-of-bounds data, for normal (i.e. not a bug) reasons. Surprisingly, very little fallout. Change-Id: I3ade28e73e584c4885e3e1a896007f535b494058 Signed-off-by: Noel Grandin Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/13788 Tested-by: Jenkins CPCI Reviewed-by: Mike Kaganski (cherry picked from commit 031eddcb0fb671d1e0cdb6b2fd08ad0bba85a926) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211693 Tested-by: Jenkins Reviewed-by: Xisco Fauli --- editeng/source/editeng/editdoc.cxx | 15 ++------------- editeng/source/editeng/impedit2.cxx | 18 +++++++++--------- 2 files changed, 11 insertions(+), 22 deletions(-) diff --git a/editeng/source/editeng/editdoc.cxx b/editeng/source/editeng/editdoc.cxx index 16a76a302004..002b68103477 100644 --- a/editeng/source/editeng/editdoc.cxx +++ b/editeng/source/editeng/editdoc.cxx @@ -3425,12 +3425,12 @@ sal_Int32 EditDoc::GetPos(const ContentNode* pContentNode) const const ContentNode* EditDoc::GetObject(sal_Int32 nPos) const { - return 0 <= nPos && o3tl::make_unsigned(nPos) < maContents.size() ? maContents[nPos].get() : nullptr; + return maContents[nPos].get(); } ContentNode* EditDoc::GetObject(sal_Int32 nPos) { - return 0 <= nPos && o3tl::make_unsigned(nPos) < maContents.size() ? maContents[nPos].get() : nullptr; + return maContents[nPos].get(); } void EditDoc::Insert(sal_Int32 nPos, std::unique_ptr pNode) @@ -3448,11 +3448,6 @@ void EditDoc::Insert(sal_Int32 nPos, std::unique_ptr pNode) void EditDoc::Remove(sal_Int32 nPos) { - if (nPos < 0 || o3tl::make_unsigned(nPos) >= maContents.size()) - { - SAL_WARN( "editeng", "EditDoc::Remove - out of bounds pos " << nPos); - return; - } #if ENABLE_YRS YrsRemovePara(m_pYrsSupplier, m_CommentId, *this, nPos); #endif @@ -3461,12 +3456,6 @@ void EditDoc::Remove(sal_Int32 nPos) std::unique_ptr EditDoc::Release(sal_Int32 nPos) { - if (nPos < 0 || o3tl::make_unsigned(nPos) >= maContents.size()) - { - SAL_WARN( "editeng", "EditDoc::Release - out of bounds pos " << nPos); - return nullptr; - } - #if ENABLE_YRS YrsRemovePara(m_pYrsSupplier, m_CommentId, *this, nPos); #endif diff --git a/editeng/source/editeng/impedit2.cxx b/editeng/source/editeng/impedit2.cxx index 98295c3e20d2..cf49fe3fac22 100644 --- a/editeng/source/editeng/impedit2.cxx +++ b/editeng/source/editeng/impedit2.cxx @@ -1525,10 +1525,10 @@ EditPaM ImpEditEngine::WordLeft( const EditPaM& rPaM ) if ( nCurrentPos == 0 ) { // Previous paragraph... - sal_Int32 nCurPara = maEditDoc.GetPos( aNewPaM.GetNode() ); - ContentNode* pPrevNode = maEditDoc.GetObject( --nCurPara ); - if ( pPrevNode ) + sal_Int32 nPrevPara = maEditDoc.GetPos( aNewPaM.GetNode() ) - 1; + if (nPrevPara >= 0) { + ContentNode* pPrevNode = maEditDoc.GetObject( nPrevPara ); aNewPaM.SetNode( pPrevNode ); aNewPaM.SetIndex( pPrevNode->Len() ); } @@ -1575,10 +1575,10 @@ EditPaM ImpEditEngine::WordRight( const EditPaM& rPaM, sal_Int16 nWordType ) if ( aNewPaM.GetIndex() >= nMax ) { // Next paragraph ... - sal_Int32 nCurPara = maEditDoc.GetPos( aNewPaM.GetNode() ); - ContentNode* pNextNode = maEditDoc.GetObject( ++nCurPara ); - if ( pNextNode ) + sal_Int32 nNextPara = maEditDoc.GetPos( aNewPaM.GetNode() ) + 1; + if (nNextPara < maEditDoc.Count()) { + ContentNode* pNextNode = maEditDoc.GetObject( nNextPara ); aNewPaM.SetNode( pNextNode ); aNewPaM.SetIndex( 0 ); } @@ -2572,7 +2572,7 @@ void ImpEditEngine::ImpRemoveParagraph( sal_Int32 nPara ) { assert(maEditDoc.GetObject(nPara)); - ContentNode* pNextNode = maEditDoc.GetObject( nPara+1 ); + ContentNode* pNextNode = nPara+1 < maEditDoc.Count() ? maEditDoc.GetObject( nPara+1 ) : nullptr; std::unique_ptr pNode = maEditDoc.Release(nPara); maDeletedNodes.push_back(std::make_unique(pNode.get(), nPara)); @@ -4120,7 +4120,7 @@ EditSelection ImpEditEngine::ConvertSelection( EditSelection aNewSelection; // Start... - ContentNode* pNode = maEditDoc.GetObject( nStartPara ); + ContentNode* pNode = nStartPara >= maEditDoc.Count() ? nullptr : maEditDoc.GetObject( nStartPara ); sal_Int32 nIndex = nStartPos; if ( !pNode ) { @@ -4134,7 +4134,7 @@ EditSelection ImpEditEngine::ConvertSelection( aNewSelection.Min().SetIndex( nIndex ); // End... - pNode = maEditDoc.GetObject( nEndPara ); + pNode = nEndPara >= maEditDoc.Count() ? nullptr : maEditDoc.GetObject( nEndPara ); nIndex = nEndPos; if ( !pNode ) { From 34f425f8b8d504fd88bfae40ec63a83653cdd02b Mon Sep 17 00:00:00 2001 From: Vissarion Fisikopoulos Date: Thu, 24 Sep 2026 14:53:11 +0300 Subject: [PATCH 156/289] tdf#170190 svx: keep the operator of every condition in form filter text When a filter condition on a column has more than one part, e.g. "LIKE A* AND LIKE *e", only the first part was converted back to UI text with its operator; the rest were appended as bare values ("LIKE A* AND *e"). Convert all parts the same way and add a UITest. Change-Id: Id6a2ecd5593003c3a9fcef1955f2c672ec1ed520 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211425 Tested-by: Jenkins Reviewed-by: Vissarion Fisikopoulos --- svx/Module_svx.mk | 1 + svx/UITest_svx_form.mk | 16 +++++ svx/qa/uitest/form/tdf170190.py | 53 ++++++++++++++ svx/source/form/formcontroller.cxx | 110 ++++++++++++++++------------- 4 files changed, 131 insertions(+), 49 deletions(-) create mode 100644 svx/UITest_svx_form.mk create mode 100644 svx/qa/uitest/form/tdf170190.py diff --git a/svx/Module_svx.mk b/svx/Module_svx.mk index 089e9a919d57..e6528fa00add 100644 --- a/svx/Module_svx.mk +++ b/svx/Module_svx.mk @@ -70,6 +70,7 @@ $(eval $(call gb_Module_add_subsequentcheck_targets,svx,\ )) $(eval $(call gb_Module_add_uicheck_targets,svx,\ + UITest_svx_form \ UITest_svx_table \ )) diff --git a/svx/UITest_svx_form.mk b/svx/UITest_svx_form.mk new file mode 100644 index 000000000000..18e473824e36 --- /dev/null +++ b/svx/UITest_svx_form.mk @@ -0,0 +1,16 @@ +# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*- +# +# This file is part of the LibreOffice project. +# +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. +# + +$(eval $(call gb_UITest_UITest,svx_form)) + +$(eval $(call gb_UITest_add_modules,svx_form,$(SRCDIR)/svx/qa/uitest,\ + form/ \ +)) + +# vim: set noet sw=4 ts=4: diff --git a/svx/qa/uitest/form/tdf170190.py b/svx/qa/uitest/form/tdf170190.py new file mode 100644 index 000000000000..a307ab336db1 --- /dev/null +++ b/svx/qa/uitest/form/tdf170190.py @@ -0,0 +1,53 @@ +# -*- 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 com.sun.star.awt import Size + +# Bug 170190 - Form based filter reads wrong filter string +class tdf170190(UITestCase): + def test_tdf170190(self): + with self.ui_test.create_doc_in_start_center("writer") as document: + # a form on the Bibliography table, filtered by two conditions on the same column + xForm = document.createInstance("com.sun.star.form.component.DataForm") + xForm.DataSourceName = "Bibliography" + xForm.Command = "biblio" + xForm.CommandType = 0 # TABLE + xForm.Filter = "\"Title\" LIKE 'A%' AND \"Title\" LIKE '%e'" + xForm.ApplyFilter = True + document.DrawPage.Forms.insertByName("Form", xForm) + + xTextField = document.createInstance("com.sun.star.form.component.TextField") + xTextField.DataField = "Title" + xForm.insertByName("Title", xTextField) + xShape = document.createInstance("com.sun.star.drawing.ControlShape") + xShape.Size = Size(5000, 1000) + xShape.Control = xTextField + document.DrawPage.add(xShape) + + xController = document.CurrentController + xController.setFormDesignMode(False) + xToolkit = self.xContext.ServiceManager.createInstance('com.sun.star.awt.Toolkit') + xToolkit.waitUntilAllIdlesDispatched() + self.assertTrue(xForm.isLoaded()) + + # start the form based filter, which shows the current filter in the controls + xController.getControl(xTextField).setFocus() + xToolkit.waitUntilAllIdlesDispatched() + self.xUITest.executeCommand(".uno:FormFilter") + xToolkit.waitUntilAllIdlesDispatched() + + aPredicates = xController.getFormController(xForm).getPredicateExpressions() + self.xUITest.executeCommand(".uno:FormFilterExit") + + # Before the fix: AssertionError: "LIKE 'A%' AND LIKE '%e'" != "LIKE 'A%' AND '%e'" + self.assertEqual(1, len(aPredicates)) + self.assertEqual(1, len(aPredicates[0])) + self.assertEqual("LIKE 'A%' AND LIKE '%e'", " ".join(aPredicates[0][0].split())) + +# vim: set shiftwidth=4 softtabstop=4 expandtab: diff --git a/svx/source/form/formcontroller.cxx b/svx/source/form/formcontroller.cxx index eb6bada9ea15..88a43f43fb97 100644 --- a/svx/source/form/formcontroller.cxx +++ b/svx/source/form/formcontroller.cxx @@ -3020,6 +3020,60 @@ void FormController::setFilter(::std::vector& rFieldInfos) const LocaleDataWrapper& rLocaleWrapper( Application::GetSettings().GetUILocaleDataWrapper() ); OUString strDecimalSeparator = rLocaleWrapper.getNumDecimalSep(); + // convert one structured condition into its UI text, e.g. "LIKE A*" + auto getCriteriaText = [&](const PropertyValue& rRefValue, const Reference< XPropertySet >& xField) -> OUString + { + OUString sPredicate,sErrorMsg; + rRefValue.Value >>= sPredicate; + std::unique_ptr< OSQLParseNode > pParseNode = predicateTree(sErrorMsg, sPredicate, xFormatter, xField, xConnection); + if ( pParseNode == nullptr ) + return OUString(); + + OUString sCriteria; + switch (rRefValue.Handle) + { + case css::sdb::SQLFilterOperator::EQUAL: + sCriteria += "="; + break; + case css::sdb::SQLFilterOperator::NOT_EQUAL: + sCriteria += "!="; + break; + case css::sdb::SQLFilterOperator::LESS: + sCriteria += "<"; + break; + case css::sdb::SQLFilterOperator::GREATER: + sCriteria += ">"; + break; + case css::sdb::SQLFilterOperator::LESS_EQUAL: + sCriteria += "<="; + break; + case css::sdb::SQLFilterOperator::GREATER_EQUAL: + sCriteria += ">="; + break; + case css::sdb::SQLFilterOperator::LIKE: + sCriteria += "LIKE "; + break; + case css::sdb::SQLFilterOperator::NOT_LIKE: + sCriteria += "NOT LIKE "; + break; + case css::sdb::SQLFilterOperator::SQLNULL: + sCriteria += "IS NULL"; + break; + case css::sdb::SQLFilterOperator::NOT_SQLNULL: + sCriteria += "IS NOT NULL"; + break; + } + pParseNode->parseNodeToPredicateStr( sCriteria + ,xConnection + ,xFormatter + ,xField + ,OUString() + ,aAppLocale + ,strDecimalSeparator + ,getParseContext()); + return sCriteria; + }; + // retrieving the filter for (const Sequence < PropertyValue >& rRow : aFilterRows) { @@ -3080,62 +3134,20 @@ void FormController::setFilter(::std::vector& rFieldInfos) // do we already have the control ? if (aRow.find(rFieldInfo.xText) != aRow.end()) { + // further conditions on the same field need their operator too + OUString sCriteria = getCriteriaText(rRefValue, xField); + if (sCriteria.isEmpty()) + sCriteria = ::comphelper::getString(rRefValue.Value); OString aVal = m_pParser->getContext().getIntlKeywordAscii(IParseContext::InternationalKeyCode::And); aRow[rFieldInfo.xText] = aRow[rFieldInfo.xText] + " " + OStringToOUString(aVal, RTL_TEXTENCODING_ASCII_US) + " " + - ::comphelper::getString(rRefValue.Value); + sCriteria; } else { - OUString sPredicate,sErrorMsg; - rRefValue.Value >>= sPredicate; - std::unique_ptr< OSQLParseNode > pParseNode = predicateTree(sErrorMsg, sPredicate, xFormatter, xField, xConnection); - if ( pParseNode != nullptr ) - { - OUString sCriteria; - switch (rRefValue.Handle) - { - case css::sdb::SQLFilterOperator::EQUAL: - sCriteria += "="; - break; - case css::sdb::SQLFilterOperator::NOT_EQUAL: - sCriteria += "!="; - break; - case css::sdb::SQLFilterOperator::LESS: - sCriteria += "<"; - break; - case css::sdb::SQLFilterOperator::GREATER: - sCriteria += ">"; - break; - case css::sdb::SQLFilterOperator::LESS_EQUAL: - sCriteria += "<="; - break; - case css::sdb::SQLFilterOperator::GREATER_EQUAL: - sCriteria += ">="; - break; - case css::sdb::SQLFilterOperator::LIKE: - sCriteria += "LIKE "; - break; - case css::sdb::SQLFilterOperator::NOT_LIKE: - sCriteria += "NOT LIKE "; - break; - case css::sdb::SQLFilterOperator::SQLNULL: - sCriteria += "IS NULL"; - break; - case css::sdb::SQLFilterOperator::NOT_SQLNULL: - sCriteria += "IS NOT NULL"; - break; - } - pParseNode->parseNodeToPredicateStr( sCriteria - ,xConnection - ,xFormatter - ,xField - ,OUString() - ,aAppLocale - ,strDecimalSeparator - ,getParseContext()); + OUString sCriteria = getCriteriaText(rRefValue, xField); + if (!sCriteria.isEmpty()) aRow[rFieldInfo.xText] = sCriteria; - } } } } From 697a89a67477558cdda87cc98a25f216baf9e725 Mon Sep 17 00:00:00 2001 From: Vissarion Fisikopoulos Date: Mon, 28 Sep 2026 11:22:56 +0300 Subject: [PATCH 157/289] tdf#160343 dbaccess: fix Standard Filter on decimals with comma locales The dialog passed values in SQL form (e.g. 4.2), but the composer expects them localized (e.g. 4,2 for German locale) and the filter was dropped. Pass the normalized localized value instead. Add UITest. Change-Id: I9ef28585b9de0144c84b9815811c91f776c34c91 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211504 Tested-by: Jenkins Reviewed-by: Vissarion Fisikopoulos --- dbaccess/qa/uitest/data/tdf160343.odb | Bin 0 -> 3798 bytes dbaccess/qa/uitest/edit_field/tdf160343.py | 56 +++++++++++++++++++++ dbaccess/source/ui/dlg/queryfilter.cxx | 4 +- 3 files changed, 58 insertions(+), 2 deletions(-) create mode 100644 dbaccess/qa/uitest/data/tdf160343.odb create mode 100644 dbaccess/qa/uitest/edit_field/tdf160343.py diff --git a/dbaccess/qa/uitest/data/tdf160343.odb b/dbaccess/qa/uitest/data/tdf160343.odb new file mode 100644 index 0000000000000000000000000000000000000000..b0196b060fa808fe03e31886461e4e9bd10073e6 GIT binary patch literal 3798 zcma)92{@Ep8=kQ*$!KIrLKI=lknBYEY-7uoWiZxe1~VgTS;Ej_h-@QYMJa}mtq_@t z60(;)g`_4+_%iX2`YiwV_5IiXT-UkYbG`4mpYxvkoacG&12MuK*}t6cQI2fJ6iYobmNQ;CwM?XfWDS4uin@V&yOaNVF%$1CK(YadPem zEE4|H855dVlJ6bCY@ddBqEy}v0Nj2S88 zlRVXHN{Ag0IpEi)_?fln#Y~yXGpN5>iH?ZnH&07_F1~_+)S{a8TV2asy-q<-K&|RW zR=`lZ_s`k);Fpw3sY7nu6=u@w5>8#ACu;Mva+<<^)TX5!X$!GSC`jb>PZcjUb$Rdp zrRiDkXT}fFjccxAGuqZx_1xkT4t%$id%*iXM(}_xon4A}#aUsZcu?fQ!3-FwaWZy) z^Xm`cxf#aMxQ93=4on^m2sdG6E1c-WEYc~d1p)y7P8#=4(%caq{`dgkJb-IG1c*v5 zMKkDto_SA7r6t`yCaQB?Pn4*^aHXerQP})gBsVC8N#n$aBfMhEY*Y6yC`MCr>gyE; z&$Z6B=Z&_vCFPepq-IIXok)T2e|VtodR)r%%v6r@-aqAO&`j_oZBgOOO7nc~A?bOs zJ#%YW3z%Hn=JOgI9-7JKSi7O9RYGfT2fPIX8j57A9M&~GzCJFE)4`yoE+U_go}LD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`0Fp9q*W0F54+bL=||K7`0ei$xoi zx}6N_tzk^P8CTSrX2fIG6ee(A8|Kbx;3@`D6~AR6MP$t8lHjn^%XKs&sHlRHUR)mr zQ5Xx0Vxg6*$86?qOQp1tU*RWBvyzBl-s)r?UQ>=wT@*}{d*JnGHHVf)8Sk+hZE?|8 z^p+y{-|&~ehz)vI+-T6Mt{7TyeUSsr39~r&I(%0`|FZFC^U<_1s{0`2RC#Qw~2UnWdy#OQLPAQr0?K)X83tyb4uIDcer20$}gi7JkJ zLYaPT9^Z2Z(0c1pqx zvAk_D^dH@F@Jl-X9lTR4{WrLZE*-YOzcl0~_}}!@_RMb>cYrs%?1cVKplm~%>CEnw zE8EC_9{G*3zHQH$e^=x;_vrU!ejELbj^0u9|JSq|@wjbq96O_PbGm>2>_&WUTM-?# o8LhuCn+Ia&5!;B@ZR?<8ejB}T6Xu`ZIqA|RiN0@28=4RBA8ixe{Qv*} literal 0 HcmV?d00001 diff --git a/dbaccess/qa/uitest/edit_field/tdf160343.py b/dbaccess/qa/uitest/edit_field/tdf160343.py new file mode 100644 index 000000000000..0bd377c2fbdb --- /dev/null +++ b/dbaccess/qa/uitest/edit_field/tdf160343.py @@ -0,0 +1,56 @@ +# -*- 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_url_for_data_file + +from libreoffice.uno.propertyvalue import mkPropertyValues + +# Bug 160343 - Standard filter don't works with numbers with decimals +class tdf160343(UITestCase): + def standard_filter(self, sTable, sField, sCondition, sValue, nExpectedRows): + with self.ui_test.load_file(get_url_for_data_file("tdf160343.odb")): + xToolkit = self.xContext.ServiceManager.createInstance('com.sun.star.awt.Toolkit') + # connects to the database + self.xUITest.executeCommand(".uno:DBViewTables") + xToolkit.waitUntilAllIdlesDispatched() + xDbController = self.ui_test.get_desktop().getActiveFrame().getController() + xTableController = xDbController.loadComponent(0, sTable, False) # DatabaseObject.TABLE + xToolkit.waitUntilAllIdlesDispatched() + xForm = xTableController.CurrentControl.getModel().getParent() + + with self.ui_test.execute_blocking_action( + self.xUITest.executeCommandForProvider, + args=(".uno:FilterCrit", xTableController.getFrame())) as xDialog: + xDialog.getChild("field1").executeAction("SELECT", mkPropertyValues({"TEXT": sField})) + xDialog.getChild("cond1").executeAction("SELECT", mkPropertyValues({"TEXT": sCondition})) + xDialog.getChild("value1").executeAction("SET", mkPropertyValues({"TEXT": sValue})) + xToolkit.waitUntilAllIdlesDispatched() + + # Without the fix in place, with a locale using a decimal comma the value was lost: + # the filter was not set and all rows were shown + self.assertNotEqual("", xForm.Filter) + self.assertEqual(nExpectedRows, xForm.RowCount) + + def test_decimal_german(self): + with self.ui_test.set_config('/org.openoffice.Setup/L10N/ooSetupSystemLocale', 'de-DE'): + self.standard_filter("tbl_Decimal", "Decimal_2", ">", "4,2", 6) + + def test_decimal_english(self): + with self.ui_test.set_config('/org.openoffice.Setup/L10N/ooSetupSystemLocale', 'en-US'): + self.standard_filter("tbl_Decimal", "Decimal_2", ">", "4.2", 6) + + def test_integer_german(self): + with self.ui_test.set_config('/org.openoffice.Setup/L10N/ooSetupSystemLocale', 'de-DE'): + self.standard_filter("tbl_Decimal", "ID", ">", "3", 7) + + def test_date_german(self): + with self.ui_test.set_config('/org.openoffice.Setup/L10N/ooSetupSystemLocale', 'de-DE'): + self.standard_filter("tbl_DateTime", "DateValue", ">", "07.02.2026", 1) + +# vim: set shiftwidth=4 softtabstop=4 expandtab: diff --git a/dbaccess/source/ui/dlg/queryfilter.cxx b/dbaccess/source/ui/dlg/queryfilter.cxx index c9a3bfd090f1..f216c1e2d0fd 100644 --- a/dbaccess/source/ui/dlg/queryfilter.cxx +++ b/dbaccess/source/ui/dlg/queryfilter.cxx @@ -317,8 +317,8 @@ bool DlgFilterCrit::getCondition(const weld::ComboBox& _rField,const weld::Combo _rFilter.Handle = GetOSQLPredicateType( _rComp.get_active_text() ); if ( SQLFilterOperator::SQLNULL != _rFilter.Handle && _rFilter.Handle != SQLFilterOperator::NOT_SQLNULL ) { - OUString sPredicateValue; - m_aPredicateInput.getPredicateValue( _rValue.get_text(), getMatchingColumn( _rValue ) ) >>= sPredicateValue; + OUString sPredicateValue(_rValue.get_text()); + m_aPredicateInput.normalizePredicateString(sPredicateValue, getMatchingColumn(_rValue)); if ( _rFilter.Handle == SQLFilterOperator::LIKE || _rFilter.Handle == SQLFilterOperator::NOT_LIKE ) ::Replace_OS_PlaceHolder( sPredicateValue ); From 73415deaf4285c705fd6fce7589b89ef4b773e0b Mon Sep 17 00:00:00 2001 From: Neil Roberts Date: Thu, 1 Oct 2026 11:35:31 +0200 Subject: [PATCH 158/289] Related tdf#173389 Improve wording in tooltip MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit “If you want to prefer” makes it sound like the user would be doing the preferring, but for some reason they don’t quite dare actually do it and instead they only “want” to do it. I think the intention is probably that the justification algorithm should be doing the preferring. This patch puts the preferring in the passive voice so that the subject of the verb doesn’t have to be mentioned. Change-Id: If6de27be688ccb03d80fa559c6027af08aea7c6c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211669 Reviewed-by: László Németh Tested-by: Jenkins --- cui/uiconfig/ui/paragalignpage.ui | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cui/uiconfig/ui/paragalignpage.ui b/cui/uiconfig/ui/paragalignpage.ui index 7f75098f7373..4ef5e7e35c06 100644 --- a/cui/uiconfig/ui/paragalignpage.ui +++ b/cui/uiconfig/ui/paragalignpage.ui @@ -751,7 +751,7 @@ True - Select this check box, if you want to prefer compound word splitting during justification. + Select this check box, if you want compound word splitting to be preferred during justification. From 800882946559490cc575ad8cafe5d78ce3b66611 Mon Sep 17 00:00:00 2001 From: Neil Roberts Date: Thu, 1 Oct 2026 13:35:43 +0200 Subject: [PATCH 159/289] tdf#173819 Remove checkbox indeterminate state when becoming active MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The paragraph composer checkbox in the edit style dialog is initially set to an indeterminate state when the alignment is something other than justify, presumably because its value is irrelevant in that case. However, if the the user then sets the alignment to justify then nothing was removing the that state. With the GTK plugin it was then not possible to change the value. With the gen plugin however you could still click it to give it a value. This patch just makes the button inactive whenever justify is selected. Weld then also removes the indeterminate state in that case. Change-Id: I9c7bebb168f526497d406b1b93b9d5161e251cfa Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211676 Reviewed-by: László Németh Tested-by: Jenkins Tested-by: László Németh --- cui/source/tabpages/paragrph.cxx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cui/source/tabpages/paragrph.cxx b/cui/source/tabpages/paragrph.cxx index 62f26bb5655f..42f6fbe739f8 100644 --- a/cui/source/tabpages/paragrph.cxx +++ b/cui/source/tabpages/paragrph.cxx @@ -1716,6 +1716,8 @@ IMPL_LINK_NOARG(SvxParaAlignTabPage, AlignHdl_Impl, weld::Toggleable&, void) m_xWordSpacingMaximum->set_sensitive(bJustify); m_xWordSpacingMaximum->set_sensitive(bJustify); m_xParagraphComposer->set_sensitive(bJustify); + if (bJustify && m_xParagraphComposer->get_state() == TRISTATE_INDET) + m_xParagraphComposer->set_active(false); // TODO visualize CharKerning with percentage m_xLetterSpacingMinimum->set_sensitive(bJustify); m_xLetterSpacingMaximum->set_sensitive(bJustify); From dfbde789eeef41f8aee33de12b7b674a49760470 Mon Sep 17 00:00:00 2001 From: Neil Roberts Date: Thu, 1 Oct 2026 13:35:43 +0200 Subject: [PATCH 160/289] tdf#173819 Remove another checkbox indeterminate state when becoming active MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The split compound words checkbox in the edit style dialog is initially set to an indeterminate state when the alignment is something other than justify, presumably because its value is irrelevant in that case. However, if the the user then sets the alignment to justify then nothing was removing the that state. With the GTK plugin it was then not possible to change the value. With the gen plugin however you could still click it to give it a value. This patch just makes the button inactive whenever justify is selected. Weld then also removes the indeterminate state in that case. This patch is similar to the previous one that does the same thing for the paragraph composer checkbox. It is split into a separate patch to make it easier to backport the other patch to the 26.8 branch. Change-Id: Ib55b7a9675ba2c8234e758585d5933cbd39bfdd7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211677 Tested-by: Jenkins Reviewed-by: László Németh Tested-by: László Németh --- cui/source/tabpages/paragrph.cxx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cui/source/tabpages/paragrph.cxx b/cui/source/tabpages/paragrph.cxx index 42f6fbe739f8..760ab3e83279 100644 --- a/cui/source/tabpages/paragrph.cxx +++ b/cui/source/tabpages/paragrph.cxx @@ -1722,6 +1722,8 @@ IMPL_LINK_NOARG(SvxParaAlignTabPage, AlignHdl_Impl, weld::Toggleable&, void) m_xLetterSpacingMinimum->set_sensitive(bJustify); m_xLetterSpacingMaximum->set_sensitive(bJustify); m_xCompoundBased->set_sensitive(bJustify); + if (bJustify && m_xCompoundBased->get_state() == TRISTATE_INDET) + m_xCompoundBased->set_active(false); m_xLabelGlyphScaling->set_sensitive(bJustify); // TODO visualize CharScaleWidth with percentage m_xGlyphScalingMinimum->set_sensitive(bJustify); From 1b1711a4103a6c18acc6901da15d8bee7f2ed357 Mon Sep 17 00:00:00 2001 From: Rene Engelhard Date: Wed, 30 Sep 2026 21:07:59 +0200 Subject: [PATCH 161/289] fix build with (system-)md4c 0.5.x since 689334c8b979923f2992f9239456e7fc366fd3bb. the new stuff in case is not defined in 0.5.x, but since it's fallthrough and break anyway one can probably #if(def) it out completely... version detection using pkg-config. hopefully all distros have it (didn't check.) Change-Id: I1c97b0492c00dbd0ee631f98b207ee6e64744c9d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211635 Tested-by: Jenkins Reviewed-by: Xisco Fauli --- config_host/config_md4c.h.in | 7 +++++++ configure.ac | 10 ++++++++++ sw/source/filter/md/mdcallbcks.cxx | 10 ++++++++++ 3 files changed, 27 insertions(+) create mode 100644 config_host/config_md4c.h.in diff --git a/config_host/config_md4c.h.in b/config_host/config_md4c.h.in new file mode 100644 index 000000000000..510693f3d3de --- /dev/null +++ b/config_host/config_md4c.h.in @@ -0,0 +1,7 @@ +#ifndef CONFIG_MD4C_H +#define CONFIG_MD4C_H + +#undef MD4C_MAJOR +#undef MD4C_MINOR + +#endif diff --git a/configure.ac b/configure.ac index 67f6f68965a3..bf305646be63 100644 --- a/configure.ac +++ b/configure.ac @@ -10141,6 +10141,8 @@ if test "x$with_system_md4c" = "xauto"; then fi AC_MSG_CHECKING([which md4c to use]) +MD4C_MAJOR=0 +MD4C_MINOR=6 case "$with_system_md4c" in yes) AC_MSG_RESULT([system]) @@ -10160,6 +10162,10 @@ case "$with_system_md4c" in AC_CHECK_LIB([md4c-html], [md_html], [ MD4C_LIBS="$MD4C_LIBS -lmd4c-html" ], [ AC_MSG_ERROR([system md4c-html library not found or broken.]) ]) + + MD4C_VERSION=`$PKG_CONFIG --modversion md4c 2>/dev/null` + MD4C_MAJOR=`echo $MD4C_VERSION | cut -d"." -f1` + MD4C_MINOR=`echo $MD4C_VERSION | cut -d"." -f2` ;; ""|no) @@ -10180,6 +10186,9 @@ AC_SUBST(MD4C_LIBS) AC_SUBST(MD4C_CFLAGS) AC_SUBST(BUILD_TYPE) +AC_DEFINE_UNQUOTED(MD4C_MAJOR,$MD4C_MAJOR) +AC_DEFINE_UNQUOTED(MD4C_MINOR,$MD4C_MINOR) + dnl =================================================================== dnl Check for system jpeg dnl =================================================================== @@ -16562,6 +16571,7 @@ AC_CONFIG_HEADERS([config_host/config_lgpl.h]) AC_CONFIG_HEADERS([config_host/config_libcxx.h]) AC_CONFIG_HEADERS([config_host/config_liblangtag.h]) AC_CONFIG_HEADERS([config_host/config_locales.h]) +AC_CONFIG_HEADERS([config_host/config_md4c.h]) AC_CONFIG_HEADERS([config_host/config_mpl.h]) AC_CONFIG_HEADERS([config_host/config_oox.h]) AC_CONFIG_HEADERS([config_host/config_options.h]) diff --git a/sw/source/filter/md/mdcallbcks.cxx b/sw/source/filter/md/mdcallbcks.cxx index db74a16d5706..a8bddb7d36d2 100644 --- a/sw/source/filter/md/mdcallbcks.cxx +++ b/sw/source/filter/md/mdcallbcks.cxx @@ -33,6 +33,8 @@ #include #include +#include + #include "swmd.hxx" int SwMarkdownParser::enter_block_callback(MD_BLOCKTYPE type, void* detail, void* userdata) @@ -83,11 +85,13 @@ int SwMarkdownParser::enter_block_callback(MD_BLOCKTYPE type, void* detail, void parser->StartTable(nRow, nCol); break; } +#if MD4C_MAJOR > 0 || (MD4C_MAJOR == 0 && MD4C_MINOR >= 6) case MD_BLOCK_ADMONITION: case MD_BLOCK_BLANK: case MD_BLOCK_FOOTNOTE_DEF: case MD_BLOCK_FOOTNOTE_DEF_SECTION: break; +#endif case MD_BLOCK_THEAD: case MD_BLOCK_TBODY: break; @@ -142,11 +146,13 @@ int SwMarkdownParser::leave_block_callback(MD_BLOCKTYPE type, void* /*detail*/, case MD_BLOCK_TABLE: parser->EndTable(); break; +#if MD4C_MAJOR > 0 || (MD4C_MAJOR == 0 && MD4C_MINOR >= 6) case MD_BLOCK_ADMONITION: case MD_BLOCK_BLANK: case MD_BLOCK_FOOTNOTE_DEF: case MD_BLOCK_FOOTNOTE_DEF_SECTION: break; +#endif case MD_BLOCK_THEAD: case MD_BLOCK_TBODY: break; @@ -226,6 +232,7 @@ int SwMarkdownParser::enter_span_callback(MD_SPANTYPE type, void* detail, void* case MD_SPAN_LATEXMATH: case MD_SPAN_LATEXMATH_DISPLAY: break; +#if MD4C_MAJOR > 0 || (MD4C_MAJOR == 0 && MD4C_MINOR >= 6) case MD_SPAN_FOOTNOTE_REF: case MD_SPAN_INS: case MD_SPAN_MARK: @@ -233,6 +240,7 @@ int SwMarkdownParser::enter_span_callback(MD_SPANTYPE type, void* detail, void* case MD_SPAN_SUPERSCRIPT: case MD_SPAN_SUBSCRIPT: break; +#endif case MD_SPAN_WIKILINK: { const MD_SPAN_WIKILINK_DETAIL* pWikilink @@ -274,6 +282,7 @@ int SwMarkdownParser::leave_span_callback(MD_SPANTYPE type, void* /*detail*/, vo case MD_SPAN_WIKILINK: case MD_SPAN_U: break; +#if MD4C_MAJOR > 0 || (MD4C_MAJOR == 0 && MD4C_MINOR >= 6) case MD_SPAN_FOOTNOTE_REF: case MD_SPAN_INS: case MD_SPAN_MARK: @@ -281,6 +290,7 @@ int SwMarkdownParser::leave_span_callback(MD_SPANTYPE type, void* /*detail*/, vo case MD_SPAN_SUBSCRIPT: case MD_SPAN_SUPERSCRIPT: break; +#endif } return 0; } From 77478ebbccc83cfd9cf909cc1653a590b4b37ea8 Mon Sep 17 00:00:00 2001 From: Laurent Balland Date: Sat, 3 Oct 2026 17:37:31 +0200 Subject: [PATCH 162/289] tdf#171207 Remove right clic to other navigation buttons After adding a new button in the TabBar with https://gerrit.libreoffice.org/210677 right clic is useless for any button of the TabBar Make some cleanup to remove unused functions Change-Id: Id141c077583e6d3ea774b902046e871af2b8936a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211778 Tested-by: Jenkins Reviewed-by: Heiko Tietze --- include/svtools/tabbar.hxx | 2 -- svtools/source/control/tabbar.cxx | 22 ++-------------------- 2 files changed, 2 insertions(+), 22 deletions(-) diff --git a/include/svtools/tabbar.hxx b/include/svtools/tabbar.hxx index 28f9fef099f7..9928b5e84ee0 100644 --- a/include/svtools/tabbar.hxx +++ b/include/svtools/tabbar.hxx @@ -367,8 +367,6 @@ private: DECL_DLLPRIVATE_LINK(ImplClickHdl, weld::Button&, void); DECL_DLLPRIVATE_LINK(ImplAddClickHandler, weld::Button&, void); DECL_DLLPRIVATE_LINK(ImplListClickHandler, weld::Button&, void); - DECL_DLLPRIVATE_LINK(MousePressHdl, const MouseEvent&, bool); - DECL_DLLPRIVATE_LINK(ContextMenuHdl, const CommandEvent&, void); ImplTabBarItem* seek( size_t i ); ImplTabBarItem* prev(); diff --git a/svtools/source/control/tabbar.cxx b/svtools/source/control/tabbar.cxx index 1399762f7493..b1c3d0e6d112 100644 --- a/svtools/source/control/tabbar.cxx +++ b/svtools/source/control/tabbar.cxx @@ -779,18 +779,6 @@ sal_uInt16 TabBar::ImplGetLastFirstPos() return nLastFirstPos; } -IMPL_LINK(TabBar, ContextMenuHdl, const CommandEvent&, rCommandEvent, void) -{ - maScrollAreaContextHdl.Call(rCommandEvent); -} - -IMPL_LINK(TabBar, MousePressHdl, const MouseEvent&, rMouseEvent, bool) -{ - if (rMouseEvent.IsRight()) - ContextMenuHdl(CommandEvent(rMouseEvent.GetPosPixel(), CommandEventId::ContextMenu, true)); - return false; -} - IMPL_LINK_NOARG( TabBar, ImplListClickHandler, weld::Button&, void ) { maScrollAreaContextHdl.Call( CommandEvent( Point( 0, 0 ), CommandEventId::ContextMenu, true ) ); @@ -813,9 +801,6 @@ void TabBar::ImplInitControls() mpImpl->mxButtonBox.disposeAndReset(VclPtr::Create(this, mbSheets)); - Link aContextLink = LINK( this, TabBar, ContextMenuHdl ); - Link aBtnContextLink = LINK(this, TabBar, MousePressHdl); - if (mnWinStyle & WB_INSERTTAB) { Link aLink = LINK(this, TabBar, ImplAddClickHandler); @@ -825,7 +810,6 @@ void TabBar::ImplInitControls() aLink = LINK( this, TabBar, ImplListClickHandler ); mpImpl->mxButtonBox->m_xListButton->connect_clicked( aLink ); - mpImpl->mxButtonBox->m_xListButton->connect_mouse_press( aBtnContextLink ); mpImpl->mxButtonBox->m_xListButton->show(); } @@ -834,20 +818,18 @@ void TabBar::ImplInitControls() if (mnWinStyle & (WB_MINSCROLL | WB_SCROLL)) { mpImpl->mxButtonBox->m_xPrevRepeater = std::make_shared( - *mpImpl->mxButtonBox->m_xPrevButton, aLink, aContextLink); + *mpImpl->mxButtonBox->m_xPrevButton, aLink ); mpImpl->mxButtonBox->m_xPrevButton->show(); mpImpl->mxButtonBox->m_xNextRepeater = std::make_shared( - *mpImpl->mxButtonBox->m_xNextButton, aLink, aContextLink); + *mpImpl->mxButtonBox->m_xNextButton, aLink ); mpImpl->mxButtonBox->m_xNextButton->show(); } if (mnWinStyle & WB_SCROLL) { mpImpl->mxButtonBox->m_xFirstButton->connect_clicked(aLink); - mpImpl->mxButtonBox->m_xFirstButton->connect_mouse_press(aBtnContextLink); mpImpl->mxButtonBox->m_xFirstButton->show(); mpImpl->mxButtonBox->m_xLastButton->connect_clicked(aLink); - mpImpl->mxButtonBox->m_xLastButton->connect_mouse_press(aBtnContextLink); mpImpl->mxButtonBox->m_xLastButton->show(); } From 6839513b308753ade08ccd8ecf79888f6061b451 Mon Sep 17 00:00:00 2001 From: Neil Roberts Date: Fri, 2 Oct 2026 13:53:18 +0200 Subject: [PATCH 163/289] unochart: Use m_pTableCursor.get() instead of &*m_pTableCursor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit If m_pTableCursor is null then the initial deref in &* is undefined behaviour, even though the resulting reference is only used to get an address. The compiler might take advantage of this to assume that the pointer is never null. For the dynamic_cast it might then always deref the pointer to access the vtable without checking for null. m_pTableCursor can be null if the SwChartDataSequence is disposed. I don’t know whether this results in any bugs in practice, but either way using get() is easier to understand and shouldn’t have any performance impact, so we might as well use it. Change-Id: I9566f4be3345dacb0af3add88cbb3fe2680ff0ce Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211747 Tested-by: Jenkins Reviewed-by: Neil Roberts --- sw/source/core/unocore/unochart.cxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sw/source/core/unocore/unochart.cxx b/sw/source/core/unocore/unochart.cxx index 10ded54ce8ba..3e24abd1471b 100644 --- a/sw/source/core/unocore/unochart.cxx +++ b/sw/source/core/unocore/unochart.cxx @@ -1832,7 +1832,7 @@ SwChartDataSequence::SwChartDataSequence( #if OSL_DEBUG_LEVEL > 0 // check if it can properly convert into a SwUnoTableCursor // which is required for some functions - SwUnoTableCursor* pUnoTableCursor = dynamic_cast(&(*m_pTableCursor)); + SwUnoTableCursor* pUnoTableCursor = dynamic_cast(m_pTableCursor.get()); OSL_ENSURE(pUnoTableCursor, "SwChartDataSequence: cursor not SwUnoTableCursor"); #endif } @@ -1878,7 +1878,7 @@ SwChartDataSequence::SwChartDataSequence( const SwChartDataSequence &rObj ) : #if OSL_DEBUG_LEVEL > 0 // check if it can properly convert into a SwUnoTableCursor // which is required for some functions - SwUnoTableCursor* pUnoTableCursor = dynamic_cast(&(*m_pTableCursor)); + SwUnoTableCursor* pUnoTableCursor = dynamic_cast(m_pTableCursor.get()); OSL_ENSURE(pUnoTableCursor, "SwChartDataSequence: cursor not SwUnoTableCursor"); #endif } @@ -2438,7 +2438,7 @@ void SwChartDataSequence::FillRangeDesc( SwRangeDescriptor &rRangeDesc ) const void SwChartDataSequence::ExtendTo( bool bExtendCol, sal_Int32 nFirstNew, sal_Int32 nCount ) { - SwUnoTableCursor* pUnoTableCursor = dynamic_cast(&(*m_pTableCursor)); + SwUnoTableCursor* pUnoTableCursor = dynamic_cast(m_pTableCursor.get()); if (!pUnoTableCursor) return; From 24571d36354c3bb247e4fc2100bdea3c3536ab03 Mon Sep 17 00:00:00 2001 From: Laurent Balland Date: Sat, 3 Oct 2026 10:06:28 +0200 Subject: [PATCH 164/289] tdf#173835 Include hidden sheets to show SelectAllSheets command Follow-up commit ccbc8791e125f7d508931bcdf33134b44d393d39 "Select All Sheets" command select visible and hidden sheets. So the command should also be available when there are some hidden sheets not selected Change-Id: I3115385853e115d63eff91a800a2bf52c4157dc8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211774 Tested-by: Jenkins Reviewed-by: Heiko Tietze --- sc/source/ui/view/tabvwsha.cxx | 25 ++++++++----------------- 1 file changed, 8 insertions(+), 17 deletions(-) diff --git a/sc/source/ui/view/tabvwsha.cxx b/sc/source/ui/view/tabvwsha.cxx index 850b135a710a..315c4f11fde1 100644 --- a/sc/source/ui/view/tabvwsha.cxx +++ b/sc/source/ui/view/tabvwsha.cxx @@ -198,14 +198,8 @@ void ScTabViewShell::GetState( SfxItemSet& rSet ) SfxViewFrame& rThisFrame = GetViewFrame(); bool bOle = GetViewFrame().GetFrame().IsInPlace(); - SCTAB nTabSelCount = rMark.GetSelectCount(); SCTAB nCountVisible = 0; const SCTAB nTabCount = rDoc.GetTableCount(); - for ( SCTAB i = 0; nCountVisible < 2 && i < nTabCount ; i++ ) - if ( rDoc.IsVisible( i ) ) - ++nCountVisible; - const bool bOnlyOneVisibleSheet = nCountVisible < 2; - bool bAllSelected = true; SfxWhichIter aIter(rSet); sal_uInt16 nWhich = aIter.FirstWhich(); @@ -284,7 +278,10 @@ void ScTabViewShell::GetState( SfxItemSet& rSet ) rSet.Put( SfxUInt16Item( nWhich, static_cast(GetViewData().GetTabNumber()) + 1 ) ); // enabled only if several sheets are visible - if ( bOnlyOneVisibleSheet ) + for ( SCTAB i = 0; nCountVisible < 2 && i < nTabCount ; i++ ) + if ( rDoc.IsVisible( i ) ) + ++nCountVisible; + if ( nCountVisible < 2 ) rSet.DisableItem( nWhich ); break; @@ -555,20 +552,14 @@ void ScTabViewShell::GetState( SfxItemSet& rSet ) break; case FID_TAB_DESELECTALL: - if ( nTabSelCount == 1 ) + if ( rMark.GetSelectCount() == 1 ) rSet.DisableItem( nWhich ); // enabled only if several sheets are selected break; case FID_TAB_SELECTALL: - if ( bOnlyOneVisibleSheet ) - rSet.DisableItem( nWhich ); // enabled only if several sheets are visible - else - { - for ( SCTAB i = 0; i < nTabCount && bAllSelected; i++ ) - bAllSelected = !( rDoc.IsVisible(i) && !rMark.GetTableSelect(i) ); - if ( bAllSelected ) - rSet.DisableItem( nWhich ); // disabled if all sheets are already selected - } + // tdf#173835 count visible and hidden sheets + if ( rDoc.GetTableCount() == rMark.GetSelectCount() ) + rSet.DisableItem( nWhich ); // disabled if all sheets are already selected break; case FID_TOGGLEHIDDENCOLROW: From 194c8298c43a8c9321f591ecf7e992bb6c7390b7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= Date: Wed, 16 Sep 2026 12:45:42 +0000 Subject: [PATCH 165/289] senddoc: pass the mail client its arguments directly MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit so the generic-mailto and xdg-email branch calls the mail client with each attachment path as one argument, as the other branches already do Signed-off-by: Caolán McNamara Change-Id: Id3fba77ebcb7bb10ef6116c311390a0bdeb412ce Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/12783 Tested-by: Jenkins CPCI Reviewed-by: Noel Grandin Reviewed-on: https://gerrit.collaboraoffice.com/c/core/+/12845 Reviewed-by: Miklos Vajna (cherry picked from commit 0d6a67a081caf933eedb28701079f6576aa3700f) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211798 Tested-by: Jenkins Reviewed-by: Xisco Fauli --- shell/source/unix/misc/senddoc.sh | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/shell/source/unix/misc/senddoc.sh b/shell/source/unix/misc/senddoc.sh index 65ade8426d1f..dd2ee8144d54 100755 --- a/shell/source/unix/misc/senddoc.sh +++ b/shell/source/unix/misc/senddoc.sh @@ -277,7 +277,11 @@ case $MAILER_TYPE in generic-mailto | xdg-email) - while [ "$1" != "" ]; do + # The loop shifts options off the front of "$@" while the mail client's arguments are + # appended to the back. The marker separates the two. + set -- "$@" "--end-of-arguments" + + while [ "$1" != "--end-of-arguments" ]; do case $1 in --to) if [ "${TO}" != "" ]; then @@ -309,7 +313,7 @@ case $MAILER_TYPE in MAILTO="${MAILTO:+${MAILTO}&}attach=${ATTACH_URL}&attachment=${ATTACH_URL}" if [ "$MAILER_TYPE" = "xdg-email" ]; then # Also add the argument: see https://gitlab.freedesktop.org/xdg/xdg-utils/-/issues/177 - ATTACH="${ATTACH:+${ATTACH} }--attach \"$2\"" + set -- "$@" --attach "$2" fi shift ;; @@ -318,9 +322,10 @@ case $MAILER_TYPE in esac shift; done + shift MAILTO="mailto:${TO}?${MAILTO}" - eval "${MAILER} ${ATTACH} \"${MAILTO}\"" & + ${MAILER} "$@" "${MAILTO}" & ;; dtmail) From 4e9a1bf3a8a4bbf6adecad84b0d802344b2009d4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= Date: Thu, 1 Oct 2026 22:15:16 +0000 Subject: [PATCH 166/289] odbc: quote connection string values that contain a separator MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit A DSN, user or password with a ";" in it, or starting with "{", gets split by the driver manager, so put it in braces to pass it as one value. Signed-off-by: Caolán McNamara Change-Id: I14d975c319e65921fe06d8be7125c13fc0b93d77 Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/14172 Tested-by: Jenkins CPCI Reviewed-by: Noel Grandin (cherry picked from commit 690a8a312214cbe154773d287dce8e77f84f62aa) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211804 Reviewed-by: Xisco Fauli Tested-by: Jenkins --- .../source/drivers/odbc/OConnection.cxx | 22 ++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/connectivity/source/drivers/odbc/OConnection.cxx b/connectivity/source/drivers/odbc/OConnection.cxx index 89b806564cfc..b0d4379ea454 100644 --- a/connectivity/source/drivers/odbc/OConnection.cxx +++ b/connectivity/source/drivers/odbc/OConnection.cxx @@ -27,7 +27,9 @@ #include #include +#include #include +#include using namespace connectivity::odbc; using namespace connectivity; @@ -166,6 +168,20 @@ SQLRETURN OConnection::OpenConnection(const OUString& aConnectStr, sal_Int32 nTi return nSQLRETURN; } +namespace +{ +// An attribute value ends at the next ";" unless it is in braces, and a braced value ends at the +// first "}". +OUString quoteValue(const OUString& rValue, OConnection& rConnection) +{ + if (rValue.indexOf(';') == -1 && !o3tl::starts_with(o3tl::trim(rValue), u"{")) + return rValue; + if (rValue.indexOf('}') != -1) + rConnection.throwGenericSQLException(STR_URI_SYNTAX_ERROR, rConnection); + return "{" + rValue + "}"; +} +} + SQLRETURN OConnection::Construct(const OUString& url,const Sequence< PropertyValue >& info) { m_aConnectionHandle = SQL_NULL_HANDLE; @@ -179,7 +195,7 @@ SQLRETURN OConnection::Construct(const OUString& url,const Sequence< PropertyVal sal_Int32 nLen = url.indexOf(':'); nLen = url.indexOf(':',nLen+2); OUString aDSN(u"DSN="_ustr), aUID, aPWD, aSysDrvSettings; - aDSN += url.subView(nLen+1); + aDSN += quoteValue(OUString(url.subView(nLen+1)), *this); sal_Int32 nTimeout = 20; bool bSilent = true; @@ -223,13 +239,13 @@ SQLRETURN OConnection::Construct(const OUString& url,const Sequence< PropertyVal { if (!(rPropertyValue.Value >>= aUID)) SAL_WARN("connectivity.odbc", "Construct: unable to get property user"); - aDSN += ";UID=" + aUID; + aDSN += ";UID=" + quoteValue(aUID, *this); } else if (rPropertyValue.Name == "password") { if (!(rPropertyValue.Value >>= aPWD)) SAL_WARN("connectivity.odbc", "Construct: unable to get property password"); - aDSN += ";PWD=" + aPWD; + aDSN += ";PWD=" + quoteValue(aPWD, *this); } else if (rPropertyValue.Name == "UseCatalog") { From ca2645b7078cb269e6982cbb14a021241a23592b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= Date: Tue, 1 Sep 2026 14:35:44 +0000 Subject: [PATCH 167/289] dbaccess: use the same script checks as an office document MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit a database document isn't an SfxObjectShell, so its bound event scripts run from DocumentEventExecutor rather than from SfxEvents_Impl::Execute Change-Id: I72cd173b95301c66c2c10932261bbccbf620c46b Signed-off-by: Caolán McNamara Reviewed-on: https://gerrit.collaboraoffice.com/c/core/+/11742 Tested-by: Jenkins CPCI Reviewed-by: Andras Timar (cherry picked from commit 635a4c0f95b51c108c1ecb723a99fc250a187d61) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211802 Tested-by: Jenkins Reviewed-by: Xisco Fauli --- .../source/core/dataaccess/documenteventexecutor.cxx | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/dbaccess/source/core/dataaccess/documenteventexecutor.cxx b/dbaccess/source/core/dataaccess/documenteventexecutor.cxx index aebaf385e64b..2ce40b75a3f0 100644 --- a/dbaccess/source/core/dataaccess/documenteventexecutor.cxx +++ b/dbaccess/source/core/dataaccess/documenteventexecutor.cxx @@ -27,8 +27,10 @@ #include #include +#include #include #include +#include #include namespace dbaccess @@ -166,6 +168,16 @@ namespace dbaccess if ( bDispatchScriptURL && bNonEmptyScript ) { + // the same three tests an office document takes before a bound script runs + if ( !SfxObjectShell::isScriptURLAllowed( sScript ) ) + return; + + if ( !SfxObjectShell::isScriptAccessAllowed( cppu::getXWeak( xDocument.get() ) ) ) + return; + + if ( SfxObjectShell::UnTrustedScript( sScript ) ) + return; + lcl_dispatchScriptURL_throw( mxDocument, mxURLTransformer, sScript, Event ); } } From 591a860fe4a87f22f0a1f50ae19005e202ce6eab Mon Sep 17 00:00:00 2001 From: Christian Lohmaier Date: Thu, 1 Oct 2026 14:36:41 +0200 Subject: [PATCH 168/289] fix macOS build baseline - you need macOS 14 / Xcode 16 to build that baseline is also fine with a bump to using -std:c++23 earlier code changes (pre 26-2 branch off) already affected building on macOS 13/Xcode 14 and since there have been no reports regarding not being able to build, it is safe to assume that no LibreOffice developer will be affected/the documentation bump comes loooong after-the-fact. End-Users are not affected, the minimum required version to run LibreOffice does not change. Change-Id: Id7ba9bb77188771241b34a318679ddce73eb041f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211683 Tested-by: Jenkins Reviewed-by: Christian Lohmaier Reviewed-by: Dan Williams --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 882ee17cd969..8f2a1a887ab8 100644 --- a/README.md +++ b/README.md @@ -39,7 +39,7 @@ run and compile LibreOffice, also used by the TDF builds: * Build: [wsl-as-helper](https://wiki.documentfoundation.org/Development/BuildingOnWSLWindows) + Visual Studio 2022 * macOS: * Runtime: 11 - * Build: 13 or later + Xcode 14.3 or later (using latest version available for a given version of macOS) + * Build: macOS 14 with Xcode 16.2 or later (using latest version available for a given version of macOS) * Linux: * Runtime: RHEL 9 or CentOS 9 and comparable * Build: either GCC 13; or Clang 18 with libstdc++ 11 From 9117ca006daab2090f09cd6482062b790999ac11 Mon Sep 17 00:00:00 2001 From: Andrea Gelmini Date: Mon, 5 Oct 2026 12:45:33 +0200 Subject: [PATCH 169/289] Fix typo Change-Id: I8be529ff62c2295c7b8d1cd72d101f8cebe365c5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211816 Tested-by: Jenkins Reviewed-by: Julien Nabet --- include/svx/sdr/properties/properties.hxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/svx/sdr/properties/properties.hxx b/include/svx/sdr/properties/properties.hxx index 1d4e199aaffb..4e378caae9d3 100644 --- a/include/svx/sdr/properties/properties.hxx +++ b/include/svx/sdr/properties/properties.hxx @@ -76,7 +76,7 @@ namespace sdr::properties // to be changed in any way. SdrObject& mrObject; - // thje Clone-implementations, overloaded for each derivation + // the Clone-implementations, overloaded for each derivation virtual std::unique_ptr implCloneProperties(SdrObject& rObj) const = 0; protected: From cfbd347df3910bc3c38bb04d7e8f8bb0b8b92175 Mon Sep 17 00:00:00 2001 From: Andrea Gelmini Date: Mon, 5 Oct 2026 15:46:45 +0200 Subject: [PATCH 170/289] Fix typo Change-Id: Ibb16391a70408ab9141f91ae0b85973a950712d5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211833 Reviewed-by: Julien Nabet Tested-by: Julien Nabet --- sd/source/ui/remotecontrol/Receiver.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sd/source/ui/remotecontrol/Receiver.cxx b/sd/source/ui/remotecontrol/Receiver.cxx index 23ac8e9aa4b2..8652225be7db 100644 --- a/sd/source/ui/remotecontrol/Receiver.cxx +++ b/sd/source/ui/remotecontrol/Receiver.cxx @@ -148,7 +148,7 @@ void Receiver::executeCommand( const std::vector &aCommand ) { try { - // std::cerr << "pointer_coordination in the is" << std::endl; + // std::cerr << "pointer_coordination is" << std::endl; xSlideShow->setProperty(beans::PropertyValue(u"PointerPosition"_ustr, -1, Any(pos), beans::PropertyState_DIRECT_VALUE)); } From 5c7c6a2eaa2fb4f83a68895b246fc787f76b5193 Mon Sep 17 00:00:00 2001 From: Andrea Gelmini Date: Mon, 5 Oct 2026 15:46:44 +0200 Subject: [PATCH 171/289] Fix typo Change-Id: I66136c576c101214e248d02f9ebc3666df42ac4a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211832 Reviewed-by: Julien Nabet Tested-by: Julien Nabet --- .../sun/star/configuration/InstallationIncompleteException.idl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/offapi/com/sun/star/configuration/InstallationIncompleteException.idl b/offapi/com/sun/star/configuration/InstallationIncompleteException.idl index 9e79a641e54b..c8dfc84d5f50 100644 --- a/offapi/com/sun/star/configuration/InstallationIncompleteException.idl +++ b/offapi/com/sun/star/configuration/InstallationIncompleteException.idl @@ -22,7 +22,7 @@ /** is thrown when creating a configuration provider fails because - the user's installation for the is missing or incomplete + the user's installation for is missing or incomplete */ published exception InstallationIncompleteException: com::sun::star::configuration::CannotLoadConfigurationException { From ab7a107b8276daf253e68f930458762b61814517 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= Date: Tue, 29 Sep 2026 14:42:34 +0000 Subject: [PATCH 172/289] hsqldb: keep the files of an embedded database in a private directory MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit hsqldb writes its own files next to the database path, and that path was the document's location. Put each embedded database in a subdirectory of a directory the driver owns and removes. Change-Id: I17d2a7e365c51c743d8c359f7b1794b810a8bcc5 Signed-off-by: Caolán McNamara Reviewed-on: https://gerrit.collaboraoffice.com/c/core/+/13818 Reviewed-by: Miklos Vajna Tested-by: Jenkins CPCI (cherry picked from commit 8008e62f8dd6f2b34c35055d070a0b1ecea8826f) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211812 Tested-by: Jenkins Reviewed-by: Xisco Fauli --- .../source/drivers/hsqldb/HDriver.cxx | 31 +++++++++++++++++-- connectivity/source/inc/hsqldb/HDriver.hxx | 4 +++ 2 files changed, 33 insertions(+), 2 deletions(-) diff --git a/connectivity/source/drivers/hsqldb/HDriver.cxx b/connectivity/source/drivers/hsqldb/HDriver.cxx index 93884155048c..f3892457b207 100644 --- a/connectivity/source/drivers/hsqldb/HDriver.cxx +++ b/connectivity/source/drivers/hsqldb/HDriver.cxx @@ -79,7 +79,9 @@ namespace connectivity : ODriverDelegator_BASE(m_aMutex) ,m_xContext(_rxContext) ,m_bInShutDownConnections(false) + ,m_aDatabaseDirectory(nullptr, true) { + m_aDatabaseDirectory.EnableKillingFile(true); } @@ -199,8 +201,33 @@ namespace connectivity ::comphelper::NamedValueCollection aProperties; + // The database path keeps the document's file name as its last part, because the + // streams in older documents are named after it. + OUString sKey = StorageContainer::getRegisteredKey(xStorage); + OUString sDatabasePath; + if (!sKey.isEmpty()) + sDatabasePath = StorageContainer::getRegisteredStorage(sKey).url; + else + { + OUString sDirectoryPath; + if (m_aDatabaseDirectory.IsValid()) + { + const OUString sDirectoryURL + = ::utl::CreateTempURL(&m_aDatabaseDirectory.GetURL(), true); + osl_getSystemPathFromFileURL(sDirectoryURL.pData, &sDirectoryPath.pData); + } + if (sDirectoryPath.isEmpty()) + { + ::connectivity::SharedResources aResources; + const OUString sMessage = aResources.getResourceString(STR_NO_STORAGE); + ::dbtools::throwGenericSQLException(sMessage ,*this); + } + sDatabasePath = sDirectoryPath + OUStringChar(SAL_PATHDELIMITER) + + StorageContainer::removeOldURLPrefix(sSystemPath); + sKey = StorageContainer::registerStorage(xStorage, sDatabasePath); + } + // properties for accessing the embedded storage - OUString sKey = StorageContainer::registerStorage( xStorage, sSystemPath ); aProperties.put( u"storage_key"_ustr, sKey ); aProperties.put( u"storage_class_name"_ustr, u"com.sun.star.sdbcx.comp.hsqldb.StorageAccess"_ustr ); @@ -339,7 +366,7 @@ namespace connectivity Sequence< PropertyValue > aConnectionArgs; aProperties >>= aConnectionArgs; - OUString sConnectURL = "jdbc:hsqldb:" + sSystemPath; + OUString sConnectURL = "jdbc:hsqldb:" + sDatabasePath; Reference xOrig; try { diff --git a/connectivity/source/inc/hsqldb/HDriver.hxx b/connectivity/source/inc/hsqldb/HDriver.hxx index 7b4735517fd5..bfa3f2a0274b 100644 --- a/connectivity/source/inc/hsqldb/HDriver.hxx +++ b/connectivity/source/inc/hsqldb/HDriver.hxx @@ -27,6 +27,7 @@ #include #include #include +#include #include @@ -62,6 +63,9 @@ namespace connectivity::hsqldb css::uno::Reference< css::sdbc::XDriver > m_xDriver; css::uno::Reference< css::uno::XComponentContext > m_xContext; bool m_bInShutDownConnections; + // Private directory, removed with its contents when the driver goes away. It holds one + // subdirectory per registered storage, and that storage's database path lies inside it. + ::utl::TempFileNamed m_aDatabaseDirectory; /** load the driver we want to delegate. The m_xDriver may be if the driver could not be loaded. From e3b0830db395c9ddd76c7b3f3e008d4fe629a8b6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= Date: Mon, 28 Sep 2026 22:51:11 +0000 Subject: [PATCH 173/289] hsqldb: check an existing lock file rather than taking it over MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit backport of upstream HSQLDB svn r3155, from the 1.8.1 release Change-Id: Ide9ff01e0ea589a6676835baf32a8ae09c5234fd Signed-off-by: Caolán McNamara Reviewed-on: https://gerrit.collaboraoffice.com/c/core/+/13737 Tested-by: Jenkins CPCI Reviewed-by: Miklos Vajna (cherry picked from commit 1d872726606d7cac22934b80e508cbfd8866b870) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211813 Tested-by: Jenkins Reviewed-by: Xisco Fauli --- external/hsqldb/UnpackedTarball_hsqldb.mk | 1 + external/hsqldb/patches/lockfile.patch.1 | 30 +++++++++++++++++++++++ 2 files changed, 31 insertions(+) create mode 100644 external/hsqldb/patches/lockfile.patch.1 diff --git a/external/hsqldb/UnpackedTarball_hsqldb.mk b/external/hsqldb/UnpackedTarball_hsqldb.mk index c532b9cc2266..3d0e8d9e4465 100644 --- a/external/hsqldb/UnpackedTarball_hsqldb.mk +++ b/external/hsqldb/UnpackedTarball_hsqldb.mk @@ -33,6 +33,7 @@ $(eval $(call gb_UnpackedTarball_add_patches,hsqldb,\ external/hsqldb/patches/abstract.patch \ external/hsqldb/patches/applet.patch.0 \ external/hsqldb/patches/hsqldb-jar-timestamps.patch.1 \ + external/hsqldb/patches/lockfile.patch.1 \ )) # vim: set noet sw=4 ts=4: diff --git a/external/hsqldb/patches/lockfile.patch.1 b/external/hsqldb/patches/lockfile.patch.1 new file mode 100644 index 000000000000..a079ac9cf9f5 --- /dev/null +++ b/external/hsqldb/patches/lockfile.patch.1 @@ -0,0 +1,30 @@ +From 648ff3be795c39d9d5f8bccb55253fd674ffe91d Mon Sep 17 00:00:00 2001 +From: fredt +Date: Mon, 31 Aug 2009 17:27:31 +0000 +Subject: [PATCH] code updates leading to 1.8.1 release + +git-svn-id: https://svn.code.sf.net/p/hsqldb/svn/base-one/trunk@3155 7c7dc5f5-a22d-0410-a3af-b41755a11667 +--- + src/org/hsqldb/persist/LockFile.java | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/src/org/hsqldb/persist/LockFile.java b/src/org/hsqldb/persist/LockFile.java +index ece83bb..6045bed 100755 +--- a/src/org/hsqldb/persist/LockFile.java ++++ b/src/org/hsqldb/persist/LockFile.java +@@ -795,9 +795,9 @@ public class LockFile { + try { + if (withCreateNewFile) { + try { +- file.createNewFile(); +- +- return; ++ if (file.createNewFile()) { ++ return; ++ } + } catch (IOException ioe) {} + } + +-- +2.55.0 + From 14d535067affe59ceef7b250b040e8f453200b08 Mon Sep 17 00:00:00 2001 From: Xisco Fauli Date: Mon, 5 Oct 2026 14:23:00 +0200 Subject: [PATCH 174/289] CppunitTest_sd_export_tests-ooxml3: drop test dependency It was added in commit de3898aecb11307789644a1814e9cbb1ee4cc29b Author: Stephan Bergmann Date: Sat Jan 22 10:56:15 2022 +0100 Add missing test dependency > [_RUN_____] SdOOXMLExportTest3::testTdf140912_PicturePlaceholder but now testTdf140912_PicturePlaceholder lives in CppunitTest_sd_export_tests-ooxml4 after commit 8d6f1a644895e1a3a1a4ea1fd336125a0ccee964 Author: Xisco Fauli Date: Mon Oct 30 17:21:05 2023 +0100 CppunitTest_sd_export_tests-ooxml3: split in two Change-Id: I840829973cf2e55929b4ca3cba86b1d81031a582 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211824 Reviewed-by: Xisco Fauli Tested-by: Jenkins --- sd/CppunitTest_sd_export_tests-ooxml3.mk | 3 --- 1 file changed, 3 deletions(-) diff --git a/sd/CppunitTest_sd_export_tests-ooxml3.mk b/sd/CppunitTest_sd_export_tests-ooxml3.mk index 4e79f4ccd9cc..88b15f953261 100644 --- a/sd/CppunitTest_sd_export_tests-ooxml3.mk +++ b/sd/CppunitTest_sd_export_tests-ooxml3.mk @@ -11,7 +11,4 @@ $(eval $(call sd_export_test,-ooxml3)) -$(call gb_CppunitTest_get_target,sd_export_tests-ooxml3): \ - $(call gb_Package_get_target,postprocess_images) - # vim: set noet sw=4 ts=4: From 3130f90ac928b20521a28501e58f863b175a310d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= Date: Sat, 18 Jul 2026 14:06:51 +0100 Subject: [PATCH 175/289] crashtesting: ClickAction_VANISH missing from translations MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit seen on converting ooo103896-3.odp to pdf Signed-off-by: Caolán McNamara Change-Id: I5fb08b84fd0b84f704421e0af9a47a8ef34af957 Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/7232 Tested-by: Jenkins CPCI Reviewed-by: Noel Grandin (cherry picked from commit 7b41c8b3f607ff8e6bd3a0d6ec23ff481921b9aa) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/208280 Tested-by: Jenkins Reviewed-by: Xisco Fauli --- sd/inc/strings.hrc | 2 ++ sd/source/ui/unoidl/unomodel.cxx | 45 ++++++++++++++++++++------------ 2 files changed, 30 insertions(+), 17 deletions(-) diff --git a/sd/inc/strings.hrc b/sd/inc/strings.hrc index 2d884d43d3c5..cab549e851c8 100644 --- a/sd/inc/strings.hrc +++ b/sd/inc/strings.hrc @@ -144,6 +144,8 @@ #define STR_GOTO_SLIDE_DLG_TITLE NC_("STR_GOTO_SLIDE_DLG_TITLE", "Go to Slide") #define STR_CLICK_ACTION_BOOKMARK NC_("STR_CLICK_ACTION_BOOKMARK", "Go to page or object") #define STR_CLICK_ACTION_DOCUMENT NC_("STR_CLICK_ACTION_DOCUMENT", "Go to document") +#define STR_CLICK_ACTION_INVISIBLE NC_("STR_CLICK_ACTION_INVISIBLE", "Hide object") +#define STR_CLICK_ACTION_VANISH NC_("STR_CLICK_ACTION_VANISH", "Hide object with effect") #define STR_CLICK_ACTION_SOUND NC_("STR_CLICK_ACTION_SOUND", "Play audio") #define STR_CLICK_ACTION_VERB NC_("STR_CLICK_ACTION_VERB", "Start object action") #define STR_CLICK_ACTION_PROGRAM NC_("STR_CLICK_ACTION_PROGRAM", "Run program") diff --git a/sd/source/ui/unoidl/unomodel.cxx b/sd/source/ui/unoidl/unomodel.cxx index 0bce2d465715..eb03188bd87d 100644 --- a/sd/source/ui/unoidl/unomodel.cxx +++ b/sd/source/ui/unoidl/unomodel.cxx @@ -197,6 +197,8 @@ using namespace ::cppu; using namespace ::com::sun::star; using namespace ::sd; +namespace +{ const TranslateId aTypeResIds[SdLinkTargetType::Count] = { STR_SD_PAGE, // SdLinkTargetType::Page @@ -205,25 +207,34 @@ const TranslateId aTypeResIds[SdLinkTargetType::Count] = STR_MASTERPAGE_NAME, // SdLinkTargetType::MasterPage }; +const TranslateId aClickActionResIds[] = +{ + STR_CLICK_ACTION_NONE, // ClickAction_NONE + STR_CLICK_ACTION_PREVPAGE, // ClickAction_PREVPAGE + STR_CLICK_ACTION_NEXTPAGE, // ClickAction_NEXTPAGE + STR_CLICK_ACTION_FIRSTPAGE, // ClickAction_FIRSTPAGE + STR_CLICK_ACTION_LASTPAGE, // ClickAction_LASTPAGE + STR_CLICK_ACTION_BOOKMARK, // ClickAction_BOOKMARK + STR_CLICK_ACTION_DOCUMENT, // ClickAction_DOCUMENT + STR_CLICK_ACTION_INVISIBLE, // ClickAction_INVISIBLE + STR_CLICK_ACTION_SOUND, // ClickAction_SOUND + STR_CLICK_ACTION_VERB, // ClickAction_VERB + STR_CLICK_ACTION_VANISH, // ClickAction_VANISH + STR_CLICK_ACTION_PROGRAM, // ClickAction_PROGRAM + STR_CLICK_ACTION_MACRO, // ClickAction_MACRO + STR_CLICK_ACTION_STOPPRESENTATION, // ClickAction_STOPPRESENTATION +}; + +static_assert(SAL_N_ELEMENTS(aClickActionResIds) + == static_cast(presentation::ClickAction_STOPPRESENTATION) + 1, + "aClickActionResIds is missing an entry for a presentation::ClickAction value"); +} + TranslateId SdTPAction::GetClickActionSdResId( presentation::ClickAction eCA ) { - switch( eCA ) - { - case presentation::ClickAction_NONE: return STR_CLICK_ACTION_NONE; - case presentation::ClickAction_PREVPAGE: return STR_CLICK_ACTION_PREVPAGE; - case presentation::ClickAction_NEXTPAGE: return STR_CLICK_ACTION_NEXTPAGE; - case presentation::ClickAction_FIRSTPAGE: return STR_CLICK_ACTION_FIRSTPAGE; - case presentation::ClickAction_LASTPAGE: return STR_CLICK_ACTION_LASTPAGE; - case presentation::ClickAction_BOOKMARK: return STR_CLICK_ACTION_BOOKMARK; - case presentation::ClickAction_DOCUMENT: return STR_CLICK_ACTION_DOCUMENT; - case presentation::ClickAction_PROGRAM: return STR_CLICK_ACTION_PROGRAM; - case presentation::ClickAction_MACRO: return STR_CLICK_ACTION_MACRO; - case presentation::ClickAction_SOUND: return STR_CLICK_ACTION_SOUND; - case presentation::ClickAction_VERB: return STR_CLICK_ACTION_VERB; - case presentation::ClickAction_STOPPRESENTATION: return STR_CLICK_ACTION_STOPPRESENTATION; - default: OSL_FAIL( "No StringResource for ClickAction available!" ); - } - return {}; + auto nIndex = static_cast(eCA); + assert(nIndex < SAL_N_ELEMENTS(aClickActionResIds) && "ClickAction out of range"); + return aClickActionResIds[nIndex]; } class SdUnoForbiddenCharsTable : public SvxUnoForbiddenCharsTable, From 06b74e4af31ce9b5508cde6dcdf18d716681596d Mon Sep 17 00:00:00 2001 From: Xisco Fauli Date: Mon, 5 Oct 2026 13:34:32 +0200 Subject: [PATCH 176/289] zxcvbn-c: upgrade to 2.7 Downloaded from https://github.com/tsyrogit/zxcvbn-c/archive/refs/tags/v2.7.tar.gz Change-Id: Ia259aeac26843b7f54a7eb562a2f5a5d3e6f2508 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211818 Tested-by: Jenkins Reviewed-by: Xisco Fauli --- download.lst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/download.lst b/download.lst index 1527938f9947..d59b78070171 100644 --- a/download.lst +++ b/download.lst @@ -701,8 +701,8 @@ ZMF_TARBALL := libzmf-0.0.2.tar.xz # three static lines # so that git cherry-pick # will not run into conflicts -ZXCVBN_C_SHA256SUM := 11e39f6776f9c82c68b2acb94336e32697d4ab6cdb4ac16f9583ccbdd735113a -ZXCVBN_C_TARBALL := zxcvbn-c-2.6.tar.gz +ZXCVBN_C_SHA256SUM := 0548647d8cda5c0d52e6e00cd6896005f2813869f9ed93c245536129e3bd3f4b +ZXCVBN_C_TARBALL := zxcvbn-c-2.7.tar.gz # three static lines # so that git cherry-pick # will not run into conflicts From 970058a668c720ce030c586465c81cdd4a105f2a Mon Sep 17 00:00:00 2001 From: Andreas Heinisch Date: Sun, 4 Oct 2026 17:13:57 +0200 Subject: [PATCH 177/289] tdf#170842 - Check for missing table style info on plain database ranges Change-Id: I8bed747726bd729fcef9b3845c8ba3e62f2ca2a7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211786 Reviewed-by: Andreas Heinisch Tested-by: Jenkins --- include/test/sheet/databaserange.hxx | 1 + sc/qa/extras/scdatabaserangeobj.cxx | 1 + sc/source/ui/unoobj/datauno.cxx | 20 ++++++++++++-------- test/source/sheet/databaserange.cxx | 11 +++++++++++ 4 files changed, 25 insertions(+), 8 deletions(-) diff --git a/include/test/sheet/databaserange.hxx b/include/test/sheet/databaserange.hxx index 9aca2f5eb390..e0ad38f3572f 100644 --- a/include/test/sheet/databaserange.hxx +++ b/include/test/sheet/databaserange.hxx @@ -32,6 +32,7 @@ public: void testTokenIndex(); void testTotalsRow(); void testContainsHeader(); + void testTdf170842_TableStylePropertiesPlainRange(); protected: ~DatabaseRange() {} diff --git a/sc/qa/extras/scdatabaserangeobj.cxx b/sc/qa/extras/scdatabaserangeobj.cxx index 4a035847bba8..0c220a866a59 100644 --- a/sc/qa/extras/scdatabaserangeobj.cxx +++ b/sc/qa/extras/scdatabaserangeobj.cxx @@ -51,6 +51,7 @@ public: CPPUNIT_TEST(testTokenIndex); CPPUNIT_TEST(testTotalsRow); CPPUNIT_TEST(testContainsHeader); + CPPUNIT_TEST(testTdf170842_TableStylePropertiesPlainRange); // XCellRangeReferrer CPPUNIT_TEST(testGetReferredCells); diff --git a/sc/source/ui/unoobj/datauno.cxx b/sc/source/ui/unoobj/datauno.cxx index a0454f8937bf..9e371c814628 100644 --- a/sc/source/ui/unoobj/datauno.cxx +++ b/sc/source/ui/unoobj/datauno.cxx @@ -2129,14 +2129,18 @@ uno::Any SAL_CALL ScDatabaseRangeObj::getPropertyValue( const OUString& aPropert { const ScTableStyleParam* pTableStyleInfo = GetDBData_Impl()->GetTableStyleInfo(); bool bVal = false; - if (aPropertyName == SC_UNONAME_ROW_STRIPES) - bVal = pTableStyleInfo->mbRowStripes; - else if (aPropertyName == SC_UNONAME_COL_STRIPES) - bVal = pTableStyleInfo->mbColumnStripes; - else if (aPropertyName == SC_UNONAME_FIRST_COL) - bVal = pTableStyleInfo->mbFirstColumn; - else if (aPropertyName == SC_UNONAME_LAST_COL) - bVal = pTableStyleInfo->mbLastColumn; + // tdf#170842 - check for missing table style info on plain database ranges + if (pTableStyleInfo) + { + if (aPropertyName == SC_UNONAME_ROW_STRIPES) + bVal = pTableStyleInfo->mbRowStripes; + else if (aPropertyName == SC_UNONAME_COL_STRIPES) + bVal = pTableStyleInfo->mbColumnStripes; + else if (aPropertyName == SC_UNONAME_FIRST_COL) + bVal = pTableStyleInfo->mbFirstColumn; + else if (aPropertyName == SC_UNONAME_LAST_COL) + bVal = pTableStyleInfo->mbLastColumn; + } aRet <<= bVal; } diff --git a/test/source/sheet/databaserange.cxx b/test/source/sheet/databaserange.cxx index ac7d6a38a5a8..92f8a144d359 100644 --- a/test/source/sheet/databaserange.cxx +++ b/test/source/sheet/databaserange.cxx @@ -214,6 +214,17 @@ void DatabaseRange::testContainsHeader() CPPUNIT_ASSERT(xDatabaseRange->getPropertyValue(propName) >>= bContainsHeader); CPPUNIT_ASSERT_MESSAGE("Value of ContainsHeader wasn't changed", !bContainsHeader); } + +void DatabaseRange::testTdf170842_TableStylePropertiesPlainRange() +{ + uno::Reference xDatabaseRange(init(u"DataArea"_ustr), UNO_QUERY_THROW); + + // Without the fix in place, this test would have crashed here + xDatabaseRange->getPropertyValue(u"UseRowStripes"_ustr); + xDatabaseRange->getPropertyValue(u"UseColStripes"_ustr); + xDatabaseRange->getPropertyValue(u"UseFirstColumnFormatting"_ustr); + xDatabaseRange->getPropertyValue(u"UseLastColumnFormatting"_ustr); +} } /* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */ From 1440fb4cb852e554f080a9f6b9f3cc694a2f8256 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= Date: Tue, 29 Sep 2026 16:53:56 +0000 Subject: [PATCH 178/289] hsqldb: read textdb.allow_full_path only as a Java system property MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit as hsqldb 2.x does since 2.1.0 Change-Id: I17101ccd6e8af3adee46644b197d94498b4f32fb Signed-off-by: Caolán McNamara Reviewed-on: https://gerrit.collaboraoffice.com/c/core/+/13829 Tested-by: Jenkins CPCI Reviewed-by: Miklos Vajna (cherry picked from commit 866cad0af60543757ea2ef5a2c484dc79f20d3d5) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211814 Tested-by: Jenkins Reviewed-by: Xisco Fauli --- external/hsqldb/UnpackedTarball_hsqldb.mk | 1 + .../allow-full-path-system-property.patch.1 | 27 +++++++++++++++++++ 2 files changed, 28 insertions(+) create mode 100644 external/hsqldb/patches/allow-full-path-system-property.patch.1 diff --git a/external/hsqldb/UnpackedTarball_hsqldb.mk b/external/hsqldb/UnpackedTarball_hsqldb.mk index 3d0e8d9e4465..97db5ed50aad 100644 --- a/external/hsqldb/UnpackedTarball_hsqldb.mk +++ b/external/hsqldb/UnpackedTarball_hsqldb.mk @@ -34,6 +34,7 @@ $(eval $(call gb_UnpackedTarball_add_patches,hsqldb,\ external/hsqldb/patches/applet.patch.0 \ external/hsqldb/patches/hsqldb-jar-timestamps.patch.1 \ external/hsqldb/patches/lockfile.patch.1 \ + external/hsqldb/patches/allow-full-path-system-property.patch.1 \ )) # vim: set noet sw=4 ts=4: diff --git a/external/hsqldb/patches/allow-full-path-system-property.patch.1 b/external/hsqldb/patches/allow-full-path-system-property.patch.1 new file mode 100644 index 000000000000..631999bcf615 --- /dev/null +++ b/external/hsqldb/patches/allow-full-path-system-property.patch.1 @@ -0,0 +1,27 @@ +From 80a589cc94dd3c67d7cbf978ca4c4328b84eb856 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= +Date: Tue, 29 Sep 2026 15:41:04 +0000 +Subject: [PATCH] read textdb.allow_full_path only as a Java system property + +HSQLDB 2.x reads it that way since 2.1.0, see svn r3769 +https://github.com/ryenus/hsqldb/commit/909e46eb5aea11a38aad3d1f57f5a656eba8132e +--- + src/org/hsqldb/persist/Log.java | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/org/hsqldb/persist/Log.java b/src/org/hsqldb/persist/Log.java +index 284d9f4..18c698b 100644 +--- a/src/org/hsqldb/persist/Log.java ++++ b/src/org/hsqldb/persist/Log.java +@@ -763,7 +763,7 @@ public class Log { + + closeTextCache(table); + +- if (!properties.isPropertyTrue( ++ if (!Boolean.getBoolean( + HsqlDatabaseProperties.textdb_allow_full_path)) { + if (source.indexOf("..") != -1) { + throw (Trace.error(Trace.ACCESS_IS_DENIED, source)); +-- +2.55.0 + From 8f242675c1b1620b00aec00f230df26280eb602a Mon Sep 17 00:00:00 2001 From: Dmytro Kulyk Date: Sat, 3 Oct 2026 22:21:00 +0300 Subject: [PATCH 179/289] tdf#173712 oox: continue a PPTX numbered list that repeats startAt PowerPoint writes the same startAt on every paragraph of a list, and since tdf#168406 each startAt restarted it: 2. 2. 2. instead of 2. 3. 4. Restart only when a list begins at that level or its numbering type or startAt changes, a missing startAt being startAt="1". Paragraphs without a bullet of their own, also without a:pPr, take it from a:lstStyle. Don't set the restart flag in a:lstStyle itself: every paragraph inherits it. An unnumbered paragraph ends the lists at its level and deeper. Change-Id: I26720a6ba54a8050cfb6e0ba892096039c391c36 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211632 Reviewed-by: David Gilbert Tested-by: Jenkins --- oox/inc/drawingml/textbodycontext.hxx | 5 +- oox/inc/drawingml/textparagraphproperties.hxx | 1 + .../textparagraphpropertiescontext.hxx | 41 +++++++--- oox/source/drawingml/textbodycontext.cxx | 24 ++++-- .../textparagraphpropertiescontext.cxx | 79 +++++++------------ 5 files changed, 79 insertions(+), 71 deletions(-) diff --git a/oox/inc/drawingml/textbodycontext.hxx b/oox/inc/drawingml/textbodycontext.hxx index debed75bccb6..33f35978ed95 100644 --- a/oox/inc/drawingml/textbodycontext.hxx +++ b/oox/inc/drawingml/textbodycontext.hxx @@ -20,9 +20,8 @@ #ifndef INCLUDED_OOX_DRAWINGML_TEXTBODYCONTEXT_HXX #define INCLUDED_OOX_DRAWINGML_TEXTBODYCONTEXT_HXX -#include - #include +#include #include #include @@ -39,7 +38,7 @@ public: private: TextBody& mrTextBody; ShapePtr mpShapePtr; - uint16_t mListNumberingMask; + ListNumberingState maListNumberingState; }; // CT_RegularTextRun diff --git a/oox/inc/drawingml/textparagraphproperties.hxx b/oox/inc/drawingml/textparagraphproperties.hxx index c233fda17b47..744cb91a05f2 100644 --- a/oox/inc/drawingml/textparagraphproperties.hxx +++ b/oox/inc/drawingml/textparagraphproperties.hxx @@ -82,6 +82,7 @@ public: sal_Int16 getLevel( ) const { return mnLevel; } PropertyMap& getTextParagraphPropertyMap() { return maTextParagraphPropertyMap; } BulletList& getBulletList() { return maBulletList; } + const BulletList& getBulletList() const { return maBulletList; } TextCharacterProperties& getTextCharacterProperties() { return maTextCharacterProperties; } const TextCharacterProperties& getTextCharacterProperties() const { return maTextCharacterProperties; } diff --git a/oox/inc/drawingml/textparagraphpropertiescontext.hxx b/oox/inc/drawingml/textparagraphpropertiescontext.hxx index 6a002451e49b..e2184060d5fd 100644 --- a/oox/inc/drawingml/textparagraphpropertiescontext.hxx +++ b/oox/inc/drawingml/textparagraphpropertiescontext.hxx @@ -20,41 +20,60 @@ #ifndef INCLUDED_OOX_DRAWINGML_TEXTPARAGRAPHPROPERTIESCONTEXT_HXX #define INCLUDED_OOX_DRAWINGML_TEXTPARAGRAPHPROPERTIESCONTEXT_HXX +#include #include -#include #include +#include #include #include namespace oox::drawingml { +// Numbered list state of a text body, shared by its paragraphs +struct ListNumberingState +{ + explicit ListNumberingState(const TextListStyle& rListStyle) + : mrListStyle(rListStyle) + { + } + + // Numbering type, prefix, suffix and start value of a numbered paragraph + struct Num + { + css::uno::Any maType, maPrefix, maSuffix, maStartAt; + bool operator==(const Num&) const = default; + }; + + // Numbering of the last numbered paragraph at each level, empty if we're not in a list + // there (n=0 is what pptx calls level 1) + std::array maLastNum; + // a:lstStyle of the text body: a paragraph without a bullet of its own takes it from there + const TextListStyle& mrListStyle; + + // A paragraph at nLevel with rBullet as its own bullet; returns true if its numbering restarts + bool markParagraph(int nLevel, const BulletList& rBullet); +}; + class TextParagraphPropertiesContext final : public ::oox::core::ContextHandler2 { public: TextParagraphPropertiesContext( ::oox::core::ContextHandler2Helper const & rParent, const ::oox::AttributeList& rAttributes, TextParagraphProperties& rTextParagraphProperties, - uint16_t* pListNumberingMask = nullptr); + ListNumberingState* pListNumberingState = nullptr); virtual ~TextParagraphPropertiesContext() override; virtual ::oox::core::ContextHandlerRef onCreateContext( ::sal_Int32 Element, const ::oox::AttributeList& rAttribs ) override; private: - // Returns True iff we're tracking numbered lists, and we were not already in a numbered list at this level - bool markListNumbered(); - void markListUnnumbered(); - TextParagraphProperties& mrTextParagraphProperties; BulletList& mrBulletList; std::vector< css::style::TabStop > maTabList; std::shared_ptr< BlipFillProperties > mxBlipProps; - // A pointer to an integer mask where we track the list status - // If bit 'n' is 1 then we're in a numbered list at that level - // (n=0 is what pptx calls level 1) - uint16_t* mpListNumberingMask; - bool mbHaveNum; + // Where we track the list status, if we do + ListNumberingState* mpListNumberingState; }; } diff --git a/oox/source/drawingml/textbodycontext.cxx b/oox/source/drawingml/textbodycontext.cxx index 4566dfb7cbdb..0452d8ba2a04 100644 --- a/oox/source/drawingml/textbodycontext.cxx +++ b/oox/source/drawingml/textbodycontext.cxx @@ -49,25 +49,35 @@ namespace { class TextParagraphContext : public ContextHandler2 { public: - TextParagraphContext( ContextHandler2Helper const & rParent, TextParagraph& rPara, uint16_t& rListNumberingMask ); + TextParagraphContext( ContextHandler2Helper const & rParent, TextParagraph& rPara, ListNumberingState& rListNumberingState ); virtual ContextHandlerRef onCreateContext( sal_Int32 aElementToken, const AttributeList& rAttribs ) override; + virtual void onEndElement() override; protected: TextParagraph& mrParagraph; - uint16_t& mrListNumberingMask; + ListNumberingState& mrListNumberingState; }; } -TextParagraphContext::TextParagraphContext( ContextHandler2Helper const & rParent, TextParagraph& rPara, uint16_t& rListNumberingMask ) +TextParagraphContext::TextParagraphContext( ContextHandler2Helper const & rParent, TextParagraph& rPara, ListNumberingState& rListNumberingState ) : ContextHandler2( rParent ) , mrParagraph( rPara ) -, mrListNumberingMask( rListNumberingMask ) +, mrListNumberingState( rListNumberingState ) { mbEnableTrimSpace = false; } +void TextParagraphContext::onEndElement() +{ + // A paragraph without a:pPr is at level 0, with the bullet of the list style + TextParagraphProperties& rProps = mrParagraph.getProperties(); + if (isCurrentElement(A_TOKEN(p)) && !mrParagraph.hasProperties() + && mrListNumberingState.markParagraph(0, rProps.getBulletList())) + rProps.setRestartNumbering(true); +} + ContextHandlerRef TextParagraphContext::onCreateContext( sal_Int32 aElementToken, const AttributeList& rAttribs ) { // EG_TextRun @@ -96,7 +106,7 @@ ContextHandlerRef TextParagraphContext::onCreateContext( sal_Int32 aElementToken case A_TOKEN( pPr ): case W_TOKEN( pPr ): mrParagraph.setHasProperties(); - return new TextParagraphPropertiesContext( *this, rAttribs, mrParagraph.getProperties(), &mrListNumberingMask ); + return new TextParagraphPropertiesContext( *this, rAttribs, mrParagraph.getProperties(), &mrListNumberingState ); case A_TOKEN( endParaRPr ): return new TextCharacterPropertiesContext( *this, rAttribs, mrParagraph.getEndProperties() ); case W_TOKEN( sdt ): @@ -180,7 +190,7 @@ ContextHandlerRef RegularTextRunContext::onCreateContext( sal_Int32 aElementToke TextBodyContext::TextBodyContext( ContextHandler2Helper const & rParent, TextBody& rTextBody ) : ContextHandler2( rParent ) , mrTextBody( rTextBody ) -, mListNumberingMask(0) +, maListNumberingState( rTextBody.getTextListStyle() ) { } @@ -205,7 +215,7 @@ ContextHandlerRef TextBodyContext::onCreateContext( sal_Int32 aElementToken, con return new TextListStyleContext( *this, mrTextBody.getTextListStyle() ); case A_TOKEN( p ): // CT_TextParagraph case W_TOKEN( p ): - return new TextParagraphContext( *this, mrTextBody.addParagraph(), mListNumberingMask ); + return new TextParagraphContext( *this, mrTextBody.addParagraph(), maListNumberingState ); case W_TOKEN( sdt ): case W_TOKEN( sdtContent ): return this; diff --git a/oox/source/drawingml/textparagraphpropertiescontext.cxx b/oox/source/drawingml/textparagraphpropertiescontext.cxx index 3f0a47488784..5c2af554aa51 100644 --- a/oox/source/drawingml/textparagraphpropertiescontext.cxx +++ b/oox/source/drawingml/textparagraphpropertiescontext.cxx @@ -19,7 +19,10 @@ #include +#include + #include +#include #include #include #include @@ -77,12 +80,11 @@ double lclGetGraphicAspectRatio( const Reference< XGraphic >& rxGraphic ) TextParagraphPropertiesContext::TextParagraphPropertiesContext( ContextHandler2Helper const & rParent, const AttributeList& rAttribs, TextParagraphProperties& rTextParagraphProperties, - uint16_t* pListNumberingMask) + ListNumberingState* pListNumberingState) : ContextHandler2( rParent ) , mrTextParagraphProperties( rTextParagraphProperties ) , mrBulletList( rTextParagraphProperties.getBulletList() ) -, mpListNumberingMask( pListNumberingMask ) -, mbHaveNum( false ) +, mpListNumberingState( pListNumberingState ) { OUString sValue; @@ -192,8 +194,12 @@ TextParagraphPropertiesContext::~TextParagraphPropertiesContext() mrBulletList.setBulletAspectRatio( lclGetGraphicAspectRatio(mxBlipProps->mxFillGraphic) ); } - if( !mbHaveNum ) - markListUnnumbered(); + // The list is tracked only for a:pPr of a paragraph. Not for a:lvl1pPr etc. of a list + // style: a restart there would be inherited by every paragraph using the style + if (mpListNumberingState + && mpListNumberingState->markParagraph(mrTextParagraphProperties.getLevel(), mrBulletList)) + mrTextParagraphProperties.setRestartNumbering(true); + if( mrBulletList.is() ) rPropertyMap.setProperty( PROP_IsNumbering, true); sal_Int16 nLevel = mrTextParagraphProperties.getLevel(); @@ -204,50 +210,30 @@ TextParagraphPropertiesContext::~TextParagraphPropertiesContext() rPropertyMap.setProperty( PROP_ParaAdjust, *mrTextParagraphProperties.getParaAdjust()); } -bool TextParagraphPropertiesContext::markListNumbered() +bool ListNumberingState::markParagraph(int nLevel, const BulletList& rBullet) { - sal_Int16 nLevel = mrTextParagraphProperties.getLevel(); - - // We only track list state in some situations - if (mpListNumberingMask == nullptr) + const BulletList& rNumBullet + = rBullet.is() ? rBullet : mrListStyle.getListStyle()[nLevel].getBulletList(); + sal_Int16 nType = NumberingType::NUMBER_NONE; + rNumBullet.mnNumberingType >>= nType; + if (nType == NumberingType::NUMBER_NONE || nType == NumberingType::CHAR_SPECIAL + || nType == NumberingType::BITMAP) { + // Lists at our level and deeper end + std::fill(maLastNum.begin() + nLevel, maLastNum.end(), Num()); return false; } - uint16_t nOldMask = *mpListNumberingMask; - // The bit that represents this level (..0001000) - uint16_t nOurBit = static_cast(1) << nLevel; + // Lists at deeper levels end + std::fill(maLastNum.begin() + nLevel + 1, maLastNum.end(), Num()); - uint16_t nTmp = nOldMask; - // Clears all bits at our level and lower (..0000xxx) - nTmp &= nOurBit - 1; - // and put our bit in (..0001xxx) - nTmp |= nOurBit; - - *mpListNumberingMask = nTmp; - - return (nOldMask & nOurBit) == 0; -} - -void TextParagraphPropertiesContext::markListUnnumbered() -{ - sal_Int16 nLevel = mrTextParagraphProperties.getLevel(); - - // We only track list state in some situations - if (mpListNumberingMask == nullptr) - { - return; - } - - uint16_t nOldMask = *mpListNumberingMask; - // The bit that represents this level (..0001000) - uint16_t nOurBit = static_cast(1) << nLevel; - - uint16_t nTmp = nOldMask; - // Clears all bits at our level and lower (..0000xxx) - nTmp &= nOurBit - 1; - - *mpListNumberingMask = nTmp; + // A list continues while its numbering stays the same at this level, + // a missing startAt being the same as startAt="1" + Num aNum{ rNumBullet.mnNumberingType, rNumBullet.msNumberingPrefix, + rNumBullet.msNumberingSuffix, rNumBullet.mnStartAt }; + bool bRestart = maLastNum[nLevel] != aNum; + maLastNum[nLevel] = aNum; + return bRestart; } ContextHandlerRef TextParagraphPropertiesContext::onCreateContext( sal_Int32 aElementToken, const AttributeList& rAttribs ) @@ -292,16 +278,9 @@ ContextHandlerRef TextParagraphPropertiesContext::onCreateContext( sal_Int32 aEl break; case A_TOKEN( buAutoNum ): // CT_TextAutonumberBullet { - bool bStartingNumList = markListNumbered(); - mbHaveNum = true; - try { sal_Int32 nType = rAttribs.getToken( XML_type, 0 ); sal_Int32 nStartAt = rAttribs.getInteger( XML_startAt, -1 ); - if( nStartAt >= 0 || bStartingNumList ) - { - mrTextParagraphProperties.setRestartNumbering(true); - } if( nStartAt > 32767 ) { From 57cc8335412710679c34af37d8188f0b8b2317c5 Mon Sep 17 00:00:00 2001 From: Dmytro Kulyk Date: Sat, 3 Oct 2026 22:21:02 +0300 Subject: [PATCH 180/289] tdf#173712 sd: test numbering of PPTX lists that repeat startAt The expected numbers are what PowerPoint for Windows shows. The tests cover: the same startAt on every paragraph, a new startAt or numbering type, plain and unnumbered paragraphs between items, nested lists, and startAt from a:lstStyle. Change-Id: I75d9bfc88ca2e1d73442b28fb039c20fc1f907be Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211783 Tested-by: Jenkins Reviewed-by: David Gilbert --- sd/qa/unit/data/pptx/tdf173712-liststyle.pptx | Bin 0 -> 31009 bytes sd/qa/unit/data/pptx/tdf173712.pptx | Bin 0 -> 31616 bytes sd/qa/unit/layout-tests.cxx | 64 ++++++++++++++++++ 3 files changed, 64 insertions(+) create mode 100644 sd/qa/unit/data/pptx/tdf173712-liststyle.pptx create mode 100644 sd/qa/unit/data/pptx/tdf173712.pptx diff --git a/sd/qa/unit/data/pptx/tdf173712-liststyle.pptx b/sd/qa/unit/data/pptx/tdf173712-liststyle.pptx new file mode 100644 index 0000000000000000000000000000000000000000..150d2ada5ad419b06ef366d077776de026f5aac0 GIT binary patch literal 31009 zcmd?RWl*HemMsj8OCycDySqcsV0v=H#(SjqoUF)uH64S$pheDDN5Hi*i zZ+38-yP9TR0a~0BF+9lVDq0vK5=;G_2p*d1%ShpXo<^`p{h=qA6RA-tZa{(~rs|Xm zaoS*`-!s$)=AziaL*}|nPux4%L4S^dm}Ly^>Q}Xhj^HfZ-+;<(40q>97>`nS=0_=H zq+=kewGNGHc@ks9%BFUb_1g|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75D;A|r!#qMWL@m?F;rFu zvrH0R!KT~U2?bb+rB(BOP+MN#HVAF)icmw)&M*^)Y zfV*9Apojg}g#xiII0nS|y92phD0sRikkD13zyBk1*?Ih_Fi;Aks|!>Z0q|YAkjF`LOG_Y$TbUsKR3NC2y1GCGf2YH?S`00l_N+PO*Ir=Llpf_%Cg4z+JK}{;6`HRnMynR5?EE zJK*ka#Nf=QAdssn+Wr3^H#EEEfd#MaACQ6Teg9S4EA?(5Uo))!3uN4Xf_%+g`Y(|2 z{t5CmE9k#Ke*906ulY9r1v36WLB3|P{1Y;W6cKd&)i!{~#{c&dyulIq&!O#s-q=5Y zzGh$i6EtXDA9P)5?LhQTps#ri{{=GfKS91`4Ez_!z_p%#U=Gm8ePgV-9vR2LcDoDx!45`2hM764QIgg zXSmC53>*&p5bQOa567S3F8eNUIPimK*Kj(#e}=nklHhRQ2UxD*j0FD-cXgZv91nck z`86Jd=>NdG^I?GR`@F^*ko+^=<$D6I9{66gYq-GYS8(7Hw=0CZeZ1Swz^@lK6#6^- z2d)74?xSl3aOCa~zig{lSU1dbw>Gy&Zzi=n;O-v1!DE=$IvM}}AmEza=r`_G4-~|^ zxe0Sc_T5GSk0M-aaD12ewI2V| z5Le~_;eiaXt#hT!-%Itk?Et=5f2{@1%bRl7OZR_jueVF)HNHZ)yZ+!y8`mWp-jV}< zUv5Qvm<~ literal 0 HcmV?d00001 diff --git a/sd/qa/unit/data/pptx/tdf173712.pptx b/sd/qa/unit/data/pptx/tdf173712.pptx new file mode 100644 index 0000000000000000000000000000000000000000..47686f00efd1f5b1eaff77b34e2930f56974317b GIT binary patch literal 31616 zcmd?RWl*HemMsj8OCycDySqcsV0v=H#(SjqoUF)uH64S$pheDDN5Hi*i zZ+38-yP9TR0a~0BF+9lVDq0vK5=;G_2p*d1%ShpXo<^`p{h=qA6RA-tZa{(~rs|Xm zaoS*`-!s$)=AziaL*}|nPux4%L4S^dm}Ly^>Q}Xhj^HfZ-+;<(40q>97>`nS=0_=H z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fXZeC@@W{+GPhm|+AL7}*G>p+7newKr2Lu| zBlN`-Bw8gCFcl6q(Eg()_plkzOutyI00GgibTW;@Ov2708$)ijH(l@Zd)O2U3tn$y z!KCt+QSX-4_jM$H8dp3>RXnmE2q$q}B=|HF3Oo2IzK$i!4Uk-1o6#}vtuF+v^ntP2 z?CtPS#h0_E)K1(*p#6A|P>-Q+jtqcTWCL{#0yH!sQe7`U-BF+I8sP2_928;yb)i74 z^9+G-{(gbnZWO#4*rm{Qqrd(mbM^B0Q)8DEvaYYo#vX&7rQhmh-EI%OV%DYDb$k53 zi~UtU3*1ED<&*wu6=Wi7&@toxG$>dt z2Iy8?4#wXbyv!kkmlnBc5Cybyc`0$L(8!+}ynIJpUzZJD?wGg~znW3rl*G7gaqyxT zm*UqJAG}NaH>@l6N$}2qGq~TtS%Zi${!5$R;I7C#|J1q5MfL0JvU8l+cfj2}h{1_< zFF~%mXz{;6e$(uRW*EG;e?Z3hpX&XFd_&;-FOYHn3Gxj!?!Q3B`zOdZq_h758ULRk z-_W`K3uJ1u|%@=O38k(sTdjYi>N_5EyOZZ`L5b1NpbR zcQuy56$PgZyMb$^_%qzqLkA8AP6TuV#{(L0|JCo`w7XjD0*3=9&A5TnqW?48)oTnK z4*ZPu4V?RnKf_(UyTIYV&o$n_slNO(+|`f-hXX$!bpxlv^Jlp0(^BAg;HMgH@E`>K zAG|wn2Kct(8@wKoKjU3JC*bOVZ*{zZ^Lc#@2R?DTMz}l1yB!Ryy!lO`zq8BW3V?5J zyHNl~@(%H*X+0V#@*^&=7_Ja%iy9` z;WzazGsd@LCh(l`rQr4Jcloy9l^XxAX>Q-Br|P%bzS}6^S%e!6-rXgBqsRYih->p) z;$0fzjmEVye=pVFwgdQL{f!p3x8!b??*BAiZ?_z)f8Fxk{Rdy#xM{iZmK^x=@>} #include #include #include @@ -31,6 +32,28 @@ public: CPPUNIT_ASSERT(pDoc); return pDoc; } + + // Item texts ("A1", "B2", ...) of the layout, each with the label drawn before it + OUString getNumberedItems() + { + xmlDocUniquePtr pXmlDoc = parseLayout(); + OUStringBuffer aItems; + OUString aLabel; + const int nCount = countXPathNodes(pXmlDoc, "//textarray"); + for (int i = 1; i <= nCount; ++i) + { + const OUString aText + = getXPathContent(pXmlDoc, "(//textarray)[" + OString::number(i) + "]/text"); + if (aText.endsWith(".")) + aLabel = aText; + else if (aText.getLength() == 2 && rtl::isAsciiDigit(aText[1])) + { + aItems.append(aLabel + aText + " "); + aLabel.clear(); + } + } + return aItems.makeStringAndClear(); + } }; CPPUNIT_TEST_FIXTURE(SdLayoutTest, testTdf104722) @@ -302,6 +325,47 @@ CPPUNIT_TEST_FIXTURE(SdLayoutTest, numberedList) } } +CPPUNIT_TEST_FIXTURE(SdLayoutTest, testTdf173712) +{ + // Sixteen text boxes with numbered lists; the expected numbers are those PowerPoint shows + createSdImpressDoc("pptx/tdf173712.pptx"); + + // Without the fix in place, e.g. every item of A (startAt="2" on each) was numbered "2." + CPPUNIT_ASSERT_EQUAL( + u"2.A1 3.A2 4.A3 5.A4 " // startAt="2" on every item + "1.B1 2.B2 5.B3 6.B4 " // no startAt, then startAt="5" + "2.C1 3.C2 4.C3 5.C4 " // startAt="2", then startAt="4" + "1.D1 2.D2 3.D3 4.D4 " // no startAt, then startAt="1" + "2.E1 3.E2 E3 2.E4 3.E5 " // plain paragraph between + "2.F1 3.F2 F3 2.F4 3.F5 " // buNone paragraph between + "1.G1 2.G2 I.G3 II.G4 " // arabicPeriod, then romanUcPeriod + "3.H1 4.H2 a.H3 b.H4 5.H5 a.H6 6.H7 " // nested, outer startAt="3" + "1.I1 2.I2 3.I3 2.I4 2.I5 3.I6 " // nested, inner startAt="2" + "2.J1 3.J2 J3 4.J4 5.J5 " // unnumbered lvl="1" paragraph between + "1.K1 a.K2 b.K3 K4 a.K5 2.K6 " // unnumbered paragraph inside the inner list + "2.L1 2.L2 3.L3 2.L4 3.L5 " // startAt="2" on both levels + "2.M1 3.M2 M3 2.M4 3.M5 " // paragraph without a:pPr between + "2.N1 3.N2 1.N3 2.N4 " // startAt="2", then no startAt + "5.O1 6.O2 2.O3 3.O4 " // startAt="5", then startAt="2" + "1.R1 2.R2 R3 1.R4 2.R5 "_ustr, // paragraph without a:pPr, no startAt + getNumberedItems()); +} + +CPPUNIT_TEST_FIXTURE(SdLayoutTest, testTdf173712_listStyle) +{ + // a:lstStyle has for level 1, but no startAt in Z + createSdImpressDoc("pptx/tdf173712-liststyle.pptx"); + + // Without the fix in place, every item was numbered "2." + CPPUNIT_ASSERT_EQUAL( + u"2.U1 3.U2 4.U3 5.U4 " // no a:pPr + "2.V1 3.V2 4.V3 5.V4 " // a:pPr without a bullet + "2.W1 3.W2 4.W3 5.W4 " // own buAutoNum with startAt="2" too + "2.Y1 3.Y2 4.Y3 5.Y4 " // from the list style, own, own, from the list style + "1.Z1 2.Z2 Z3 1.Z4 2.Z5 "_ustr, // no startAt, buNone paragraph between + getNumberedItems()); +} + CPPUNIT_TEST_FIXTURE(SdLayoutTest, testTdf146731) { createSdImpressDoc("pptx/tdf146731.pptx"); From 942302efeae385a5932a704e69b4e9a44959add4 Mon Sep 17 00:00:00 2001 From: Xisco Fauli Date: Mon, 5 Oct 2026 15:37:11 +0200 Subject: [PATCH 181/289] CppunitTest_sd_export_tests-ooxml4: split in two it already has 111 tests Change-Id: I1d0596702d2fc69389436c8d02ae074fb0287f9a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211829 Tested-by: Jenkins Reviewed-by: Xisco Fauli --- sd/CppunitTest_sd_export_tests-ooxml5.mk | 14 + sd/Module_sd.mk | 1 + sd/qa/unit/export-tests-ooxml4.cxx | 1347 --------------------- sd/qa/unit/export-tests-ooxml5.cxx | 1380 ++++++++++++++++++++++ 4 files changed, 1395 insertions(+), 1347 deletions(-) create mode 100644 sd/CppunitTest_sd_export_tests-ooxml5.mk create mode 100644 sd/qa/unit/export-tests-ooxml5.cxx diff --git a/sd/CppunitTest_sd_export_tests-ooxml5.mk b/sd/CppunitTest_sd_export_tests-ooxml5.mk new file mode 100644 index 000000000000..0e75dc1e9ef6 --- /dev/null +++ b/sd/CppunitTest_sd_export_tests-ooxml5.mk @@ -0,0 +1,14 @@ +# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*- +#************************************************************************* +# +# This file is part of the LibreOffice project. +# +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. +# +#************************************************************************* + +$(eval $(call sd_export_test,-ooxml5)) + +# vim: set noet sw=4 ts=4: diff --git a/sd/Module_sd.mk b/sd/Module_sd.mk index 0890fcad4b19..3117aa752bc6 100644 --- a/sd/Module_sd.mk +++ b/sd/Module_sd.mk @@ -41,6 +41,7 @@ $(eval $(call gb_Module_add_slowcheck_targets,sd,\ CppunitTest_sd_export_tests-ooxml2 \ CppunitTest_sd_export_tests-ooxml3 \ CppunitTest_sd_export_tests-ooxml4 \ + CppunitTest_sd_export_tests-ooxml5 \ CppunitTest_sd_export_tests \ CppunitTest_sd_export_tests2 \ CppunitTest_sd_filters_test \ diff --git a/sd/qa/unit/export-tests-ooxml4.cxx b/sd/qa/unit/export-tests-ooxml4.cxx index ba12c3fd301d..33fd9cb8ae72 100644 --- a/sd/qa/unit/export-tests-ooxml4.cxx +++ b/sd/qa/unit/export-tests-ooxml4.cxx @@ -9,16 +9,11 @@ #include "sdmodeltestbase.hxx" #include -#include -#include -#include #include #include #include #include #include -#include -#include #include #include @@ -27,23 +22,15 @@ #include #include #include -#include -#include #include #include #include -#include -#include -#include #include #include -#include -#include #include #include -#include #include class SdOOXMLExportTest4 : public SdModelTestBase @@ -1353,1340 +1340,6 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest4, testAutofittedTextboxIndent) u"1080000"); } -CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest4, testTdf151622_oleIcon) -{ - createSdImpressDoc("odp/ole_icon.odp"); - - save(TestFilter::PPTX); - - xmlDocUniquePtr pXml = parseExport(u"ppt/slides/slide1.xml"_ustr); - - // Without the accompanying fix in place, this test would have failed with: - // - Expression: prop - // - In ..., XPath '//p:oleObj' no attribute 'showAsIcon' exist - // i.e. show as icon option wasn't exported. - assertXPath(pXml, "//p:oleObj", "showAsIcon", u"1"); -} - -CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest4, testTdf152436) -{ - createSdImpressDoc("pptx/ole-emf_min.pptx"); - saveAndReload(TestFilter::PPTX); - - // Check number of shapes after export. - CPPUNIT_ASSERT_EQUAL(sal_Int32(1), getPage(0)->getCount()); -} - -CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest4, testLinkedOLE) -{ - // The linked OLE object needs its link completed during load so it can - // be exported. Use FULL_UPDATE since the default test mode defers links. - uno::Sequence aParams = { - comphelper::makePropertyValue(u"UpdateDocMode"_ustr, - sal_Int16(css::document::UpdateDocMode::FULL_UPDATE)), - }; - loadFromFile(u"odp/linked_ole.odp", aParams); - - save(TestFilter::PPTX); - - xmlDocUniquePtr pXml = parseExport(u"ppt/slides/slide1.xml"_ustr); - - // Without the accompanying fix in place, this test would have failed with: - // - Expected: 1 - // - Actual : 0 - // - In<>, XPath '//p:oleObj' number of nodes is incorrect - // i.e. the linked ole object wasn't exported. - assertXPath(pXml, "//p:oleObj", 1); -} - -CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest4, testTdf102261_testParaTabStopDefaultDistance) -{ - createSdImpressDoc("pptx/tdf102261_testParaTabStopDefaultDistance.pptx"); - saveAndReload(TestFilter::PPTX); - - uno::Reference xShape(getShapeFromPage(0, 0)); - { - uno::Reference xPropSet(getParagraphFromShape(0, xShape), - uno::UNO_QUERY_THROW); - CPPUNIT_ASSERT_EQUAL( - sal_Int32{ 1270 }, - xPropSet->getPropertyValue(u"ParaTabStopDefaultDistance"_ustr).get()); - } - { - uno::Reference xPropSet(getParagraphFromShape(1, xShape), - uno::UNO_QUERY_THROW); - CPPUNIT_ASSERT_EQUAL( - sal_Int32{ 2540 }, - xPropSet->getPropertyValue(u"ParaTabStopDefaultDistance"_ustr).get()); - } -} - -CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest4, testNotesAuthorDate) -{ - createSdImpressDoc("pptx/pres-with-notes.pptx"); - - using ScriptingCfg = officecfg::Office::Common::Security::Scripting; - ScopedConfigValue aCfg1(true); - { - // 1. Remove all personal info, but keep note info - ScopedConfigValue aCfg2(true); - - saveAndReload(TestFilter::PPTX); - - xmlDocUniquePtr pXml = parseExport(u"ppt/commentAuthors.xml"_ustr); - assertXPath(pXml, "/p:cmAuthorLst/p:cmAuthor[@id=0]", "name", u"Hans Wurst"); - assertXPath(pXml, "/p:cmAuthorLst/p:cmAuthor[@id=1]", "name", u"Max Muster"); - - pXml = parseExport(u"ppt/comments/comment1.xml"_ustr); - assertXPath(pXml, "/p:cmLst/p:cm", "dt", u"2024-06-13T12:03:08.000000000"); - } - - { - // 2. Remove all personal info - ScopedConfigValue aCfg2(false); - saveAndReload(TestFilter::PPTX); - - xmlDocUniquePtr pXml = parseExport(u"ppt/commentAuthors.xml"_ustr); - assertXPath(pXml, "/p:cmAuthorLst/p:cmAuthor[@id=0]", "name", u"Author1"); - assertXPath(pXml, "/p:cmAuthorLst/p:cmAuthor[@id=1]", "name", u"Author2"); - - pXml = parseExport(u"ppt/comments/comment1.xml"_ustr); - assertXPathNoAttribute(pXml, "/p:cmLst/p:cm", "dt"); - } -} - -CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest4, testTableCellVerticalPropertyRoundtrip) -{ - createSdImpressDoc("pptx/tcPr-vert-roundtrip.pptx"); - saveAndReload(TestFilter::PPTX); - - xmlDocUniquePtr pXml = parseExport(u"ppt/slides/slide1.xml"_ustr); - - assertXPath(pXml, "(//a:tcPr)[1]", "vert", u"vert"); - assertXPath(pXml, "(//a:tcPr)[2]", "vert", u"vert270"); - assertXPath(pXml, "(//a:tcPr)[3]", "vert", u"wordArtVert"); -} - -CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest4, testTdf157740_slideMasters) -{ - createSdImpressDoc("pptx/tdf157740.pptx"); - saveAndReload(TestFilter::PPTX); - - // The original file has 1 slide master and 7 slide layouts in that master - xmlDocUniquePtr pXmlDocContent = parseExport(u"ppt/presentation.xml"_ustr); - assertXPath(pXmlDocContent, "/p:presentation/p:sldMasterIdLst/p:sldMasterId", 1); - - pXmlDocContent = parseExport(u"ppt/slideMasters/slideMaster1.xml"_ustr); - assertXPath(pXmlDocContent, "/p:sldMaster/p:sldLayoutIdLst/p:sldLayoutId", 7); -} - -CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest4, testNotesMasterThemeNoAfterDeduplicatedMasters) -{ - createSdImpressDoc("n759180.pptx"); - save(TestFilter::PPTX); - - xmlDocUniquePtr pXmlDocContent = parseExport(u"ppt/presentation.xml"_ustr); - assertXPath(pXmlDocContent, "/p:presentation/p:sldMasterIdLst/p:sldMasterId", 1); - - xmlDocUniquePtr pXmlDocRels = parseExport(u"ppt/slideMasters/_rels/slideMaster1.xml.rels"_ustr); - assertXPath(pXmlDocRels, - "/rels:Relationships/rels:Relationship[@Type='http://schemas.openxmlformats.org/" - "officeDocument/2006/relationships/theme']", - "Target", u"../theme/theme1.xml"); - - // The one slide master of this document has 12 layouts, which are imported as 12 master pages - // and written back as one slide master. The notes master theme takes the number after the slide - // master theme, as in the original file, without a gap for the master pages that were merged. - // Without the change in place, this test would have failed with: - // - Expected: ../theme/theme2.xml - // - Actual : ../theme/theme13.xml - pXmlDocRels = parseExport(u"ppt/notesMasters/_rels/notesMaster1.xml.rels"_ustr); - assertXPath(pXmlDocRels, - "/rels:Relationships/rels:Relationship[@Type='http://schemas.openxmlformats.org/" - "officeDocument/2006/relationships/theme']", - "Target", u"../theme/theme2.xml"); - - uno::Reference xNameAccess - = packages::zip::ZipFileAccess::createWithURL(comphelper::getComponentContext(m_xSFactory), - maTempFile.GetURL()); - CPPUNIT_ASSERT_EQUAL(true, bool(xNameAccess->hasByName(u"ppt/theme/theme2.xml"_ustr))); -} - -CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest4, testTdf159931_slideLayouts) -{ - createSdImpressDoc("odp/repeatBitmapMode.odp"); - save(TestFilter::PPTX); - - xmlDocUniquePtr pXmlDocRels1 = parseExport(u"ppt/slides/_rels/slide1.xml.rels"_ustr); - xmlDocUniquePtr pXmlDocRels2 = parseExport(u"ppt/slides/_rels/slide2.xml.rels"_ustr); - - assertXPath(pXmlDocRels1, "(/rels:Relationships/rels:Relationship[@Type='http://" - "schemas.openxmlformats.org/officeDocument/2006/relationships/" - "slideLayout'])"); - - // the relative target e.g. "../slideLayouts/slideLayout2.xml" - OUString sRelativeLayoutPath1 - = getXPathContent(pXmlDocRels1, "(/rels:Relationships/rels:Relationship[@Type='http://" - "schemas.openxmlformats.org/officeDocument/2006/" - "relationships/slideLayout'])/@Target"); - - assertXPath(pXmlDocRels2, "(/rels:Relationships/rels:Relationship[@Type='http://" - "schemas.openxmlformats.org/officeDocument/2006/relationships/" - "slideLayout'])"); - - // the relative target e.g. "../slideLayouts/slideLayout1.xml" - OUString sRelativeLayoutPath2 - = getXPathContent(pXmlDocRels2, "(/rels:Relationships/rels:Relationship[@Type='http://" - "schemas.openxmlformats.org/officeDocument/2006/" - "relationships/slideLayout'])/@Target"); - - uno::Reference xNameAccess - = packages::zip::ZipFileAccess::createWithURL(comphelper::getComponentContext(m_xSFactory), - maTempFile.GetURL()); - - // Check that the referenced slideLayout files exist - // Without the accompanying fix in place, this test would have failed with: - // equality assertion failed - // - Expected: 1 - // - Actual : 0 - // i.e. the referenced slideLayout file was missing on export. - OUString sSlideLayoutName1 = sRelativeLayoutPath1.getToken(2, '/'); - OUString sSlideLayoutName2 = sRelativeLayoutPath2.getToken(2, '/'); - - CPPUNIT_ASSERT_EQUAL(true, - bool(xNameAccess->hasByName("ppt/slideLayouts/" + sSlideLayoutName1))); - CPPUNIT_ASSERT_EQUAL(true, - bool(xNameAccess->hasByName("ppt/slideLayouts/" + sSlideLayoutName2))); -} - -CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest4, testTdf163483_export_math_fallback) -{ - createSdImpressDoc("odp/formula.fodp"); - - // Before export-and-reload, there is a formula on page. - { - auto xProps = getShapeFromPage(0, 0); - auto xInfo = xProps->getPropertyValue(u"Model"_ustr).queryThrow(); - CPPUNIT_ASSERT(xInfo->supportsService(u"com.sun.star.formula.FormulaProperties"_ustr)); - - // tdf#164101: check that the size is imported correctly - css::awt::Size formulaSize = xProps.queryThrow()->getSize(); - CPPUNIT_ASSERT_EQUAL(sal_Int32(1553), formulaSize.Width); - CPPUNIT_ASSERT_EQUAL(sal_Int32(528), formulaSize.Height); - - CPPUNIT_ASSERT_THROW(getShapeFromPage(0, 1), - css::lang::IndexOutOfBoundsException); // Only one shape on page - } - - saveAndReload(TestFilter::PPTX); - - // After save-and-reload, there must still be a single shape; now it's a fallback image. - // When we start to import formulas from PPTX, that will be formula. - { - // Without the fix, this threw IndexOutOfBoundsException, because there was no fallback, - // and no shape got imported. - auto xInfo = getShapeFromPage(0, 0).queryThrow(); - CPPUNIT_ASSERT(xInfo->supportsService(u"com.sun.star.drawing.CustomShape"_ustr)); - - css::awt::Size formulaSize = xInfo.queryThrow()->getSize(); - // The fallback image size after the roundtrip may be a bit different - allow some tolerance - CPPUNIT_ASSERT_DOUBLES_EQUAL(sal_Int32(1553), formulaSize.Width, 1); - CPPUNIT_ASSERT_DOUBLES_EQUAL(sal_Int32(528), formulaSize.Height, 1); - - CPPUNIT_ASSERT_THROW(getShapeFromPage(0, 1), - css::lang::IndexOutOfBoundsException); // Only one shape on page - } - - xmlDocUniquePtr pXmlDoc = parseExport(u"ppt/slides/slide1.xml"_ustr); - - const OUString cNvPr_id = getXPath( - pXmlDoc, "/p:sld/p:cSld/p:spTree/mc:AlternateContent/mc:Choice/p:sp/p:nvSpPr/p:cNvPr", - "id"); - - // Check that the alternate content is exported - assertXPath( - pXmlDoc, - "/p:sld/p:cSld/p:spTree/mc:AlternateContent/mc:Fallback/p:sp/p:spPr/a:blipFill/a:blip", - "embed", u"rId1"); - - // Its cNvPr_id must be the same - assertXPath(pXmlDoc, - "/p:sld/p:cSld/p:spTree/mc:AlternateContent/mc:Fallback/p:sp/p:nvSpPr/p:cNvPr", - "id", cNvPr_id); -} - -CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest4, testTdf169979_missing_ppic) -{ - createSdImpressDoc("odp/tdf169979.odp"); - - save(TestFilter::PPTX); - - xmlDocUniquePtr pXml2 = parseExport(u"ppt/slides/slide2.xml"_ustr); - - // Without the fix in place, this test would have failed with - // - Expected: 1 - // - Actual : 0 - // - In <>, XPath '/p:sld/p:cSld/p:spTree/p:graphicFrame/a:graphic/a:graphicData/p:oleObj/p:pic/p:nvPicPr/p:cNvPr' number of nodes is incorrect - assertXPath(pXml2, - "/p:sld/p:cSld/p:spTree/p:graphicFrame/a:graphic/" - "a:graphicData/p:oleObj/p:pic/p:nvPicPr/p:cNvPr", - "name", u""); - - assertXPath(pXml2, - "/p:sld/p:cSld/p:spTree/p:graphicFrame/a:graphic/" - "a:graphicData/p:oleObj/p:pic/p:nvPicPr/p:cNvPr", - "descr", u""); -} - -CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest4, testEmptyChildTnLstElement) -{ - createSdImpressDoc("odp/emptyChildTnLstElement.odp"); - - // Without the fix in place, this test would have failed with - // - Expected: 0 - // - Actual : 4 - // - validation error in OOXML export: Errors: 4 - saveAndReload(TestFilter::PPTX); - - xmlDocUniquePtr pXmlDoc = parseExport(u"ppt/slides/slide1.xml"_ustr); - - // tdf#170202: Without the fix in place, this test would have failed with - // - Expected: 0 - // - Actual : 1 - CPPUNIT_ASSERT_EQUAL(0, countXPathNodes(pXmlDoc, "//p:sld/p:timing")); -} - -CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest4, testTdf169941_internal_link_to_shapes) -{ - createSdImpressDoc("odp/tdf169941.odp"); - - save(TestFilter::PPTX); - - xmlDocUniquePtr pRelsDoc2 = parseExport(u"ppt/slides/_rels/slide2.xml.rels"_ustr); - - // Without the fix in place, this test would have failed with - // - Expected: slide1.xml - // - Actual : - assertXPath(pRelsDoc2, "/rels:Relationships/rels:Relationship[@Id='rId1']", "Target", - u"slide1.xml"); - - xmlDocUniquePtr pRelsDoc3 = parseExport(u"ppt/slides/_rels/slide3.xml.rels"_ustr); - assertXPath(pRelsDoc3, "/rels:Relationships/rels:Relationship[@Id='rId1']", "Target", - u"slide1.xml"); -} - -CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest4, testEmptyAttrNameElement) -{ - createSdImpressDoc("odp/emptyChildTnLstElement.odp"); - - // Without the fix in place, this test would have failed with - // - Expected: 0 - // - Actual : 2 - // - validation error in OOXML export: Errors: 2 - saveAndReload(TestFilter::PPTX); -} - -CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest4, testPlaceHolderFitHeightToText) -{ - createSdImpressDoc("pptx/tdf160487.pptx"); - saveAndReload(TestFilter::PPTX); - uno::Reference xShape(getShapeFromPage(1, 0)); - bool bTextAutoGrowHeight = false; - xShape->getPropertyValue(u"TextAutoGrowHeight"_ustr) >>= bTextAutoGrowHeight; - CPPUNIT_ASSERT_MESSAGE("PlaceHolder Fit height to text should be true.", bTextAutoGrowHeight); -} - -CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest4, testDeduplicateMasters) -{ - createSdImpressDoc("pptx/onemaster-twolayouts.pptx"); - saveAndReload(TestFilter::PPTX); - - // Check that the document still has one master and two layouts - xmlDocUniquePtr pXmlDocContent = parseExport("ppt/presentation.xml"); - assertXPath(pXmlDocContent, "/p:presentation/p:sldMasterIdLst/p:sldMasterId"_ostr, 1); - pXmlDocContent = parseExport("ppt/slideMasters/slideMaster1.xml"); - assertXPath(pXmlDocContent, "/p:sldMaster/p:sldLayoutIdLst/p:sldLayoutId"_ostr, 2); - - // Check that both background colors have been preserved - uno::Reference xDoc(mxComponent, uno::UNO_QUERY); - CPPUNIT_ASSERT(xDoc.is()); - CPPUNIT_ASSERT_EQUAL(sal_Int32(2), xDoc->getMasterPages()->getCount()); - - uno::Reference xPage(xDoc->getMasterPages()->getByIndex(0), - uno::UNO_QUERY_THROW); - uno::Reference xPropSet(xPage, uno::UNO_QUERY); - uno::Any aAny = xPropSet->getPropertyValue("Background"); - CPPUNIT_ASSERT(aAny.hasValue()); - uno::Reference aXBackgroundPropSet; - aAny >>= aXBackgroundPropSet; - Color nColor; - CPPUNIT_ASSERT(aXBackgroundPropSet->getPropertyValue("FillColor") >>= nColor); - CPPUNIT_ASSERT_EQUAL(Color(0x0E2841), nColor); - - uno::Reference xPage1(xDoc->getMasterPages()->getByIndex(1), - uno::UNO_QUERY_THROW); - uno::Reference xPropSet1(xPage1, uno::UNO_QUERY); - aAny = xPropSet1->getPropertyValue("Background"); - CPPUNIT_ASSERT(aAny.hasValue()); - aAny >>= aXBackgroundPropSet; - CPPUNIT_ASSERT(aXBackgroundPropSet->getPropertyValue("FillColor") >>= nColor); - CPPUNIT_ASSERT_EQUAL(Color(0x000000), nColor); -} - -CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest4, testInvalidAttributeValuesInSrcRect) -{ - createSdImpressDoc("odp/invalidAttributeValuesInSrcRect.odp"); - - // Without the fix in place, this test would have failed with - // - Expected: 0 - // - Actual : 24 - // - validation error in OOXML export: Errors: 24 - saveAndReload(TestFilter::PPTX); -} - -CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest4, testInvalidBuAutoNumEnumValue) -{ - createSdImpressDoc("odp/invalidBuAutoNumEnumValue.odp"); - - // Without the fix in place, this test would have failed with - // - Expected: 0 - // - Actual : 4 - // - validation error in OOXML export: Errors: 4 - saveAndReload(TestFilter::PPTX); -} - -CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest4, testInvalidCxAndCyAttribute) -{ - createSdImpressDoc("odp/invalidCxAndCyAttribute.odp"); - - // Without the fix in place, this test would have failed with - // - Expected: 0 - // - Actual : 4 - // - validation error in OOXML export: Errors: 4 - saveAndReload(TestFilter::PPTX); -} - -CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest4, testBadPercentageValue) -{ - createSdImpressDoc("odp/badPercentageValue.odp"); - - // Without the fix in place, this test would have failed with - // - Expected: 0 - // - Actual : 4 - // - validation error in OOXML export: Errors: 4 - saveAndReload(TestFilter::PPTX); -} - -CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest4, testInvalidAudio) -{ - createSdImpressDoc("odp/invalidAudio.odp"); - - // Without the fix in place, this test would have failed with - // - Expected: 0 - // - Actual : 1 - // - validation error in OOXML export: Errors: 1 - saveAndReload(TestFilter::PPTX); -} - -CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest4, testInvalidPrstDashEnumValue) -{ - createSdImpressDoc("odp/invalidPrstDashEnumValue.odp"); - - // Without the fix in place, this test would have failed with - // - Expected: 0 - // - Actual : 113 - // - validation error in OOXML export: Errors: 113 - saveAndReload(TestFilter::PPTX); -} - -CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest4, testInvalidXmlBy) -{ - createSdImpressDoc("odp/invalidXmlBy.odp"); - - // Without the fix in place, this test would have failed with - // - Expected: 0 - // - Actual : 15 - // - validation error in OOXML export: Errors: 15 - saveAndReload(TestFilter::PPTX); -} - -CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest4, testConvertWithMasterDeduplication) -{ - createSdImpressDoc("odp/dupmastermultlayouts.odp"); - saveAndReload(TestFilter::PPTX); - - uno::Reference xNameAccess - = packages::zip::ZipFileAccess::createWithURL(comphelper::getComponentContext(m_xSFactory), - maTempFile.GetURL()); - - // For each slide check that its layout exists - for (int i = 1; i <= 4; ++i) - { - xmlDocUniquePtr pXmlDocRels - = parseExport("ppt/slides/_rels/slide" + OUString::number(i) + ".xml.rels"); - - assertXPath( - pXmlDocRels, - "(/rels:Relationships/rels:Relationship[@Type='http://schemas.openxmlformats.org/officeDocument/2006/relationships/slideLayout'])"_ostr); - // the relative target e.g. "../slideLayouts/slideLayout2.xml" - OUString sRelativeLayoutPath = getXPathContent( - pXmlDocRels, - "(/rels:Relationships/rels:Relationship[@Type='http://schemas.openxmlformats.org/officeDocument/2006/relationships/slideLayout'])/@Target"_ostr); - - // Check that the referenced slideLayout files exist - // Without the accompanying fix in place, this test would have failed with: - // equality assertion failed - // - Expected: 1 - // - Actual : 0 - // i.e. the referenced slideLayout file was missing on export. - OUString sSlideLayoutName = sRelativeLayoutPath.getToken(2, '/'); - CPPUNIT_ASSERT_EQUAL(true, - bool(xNameAccess->hasByName("ppt/slideLayouts/" + sSlideLayoutName))); - } -} - -CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest4, testTdf162571HorzAnchor) -{ - createSdImpressDoc("pptx/tdf165261.pptx"); - saveAndReload(TestFilter::PPTX); - - uno::Reference xShape(getShapeFromPage(1, 0), uno::UNO_QUERY); - uno::Reference xProp(xShape, uno::UNO_QUERY); - - drawing::TextHorizontalAdjust eHori; - CPPUNIT_ASSERT(xProp->getPropertyValue(u"TextHorizontalAdjust"_ustr) >>= eHori); - CPPUNIT_ASSERT_EQUAL(drawing::TextHorizontalAdjust::TextHorizontalAdjust_LEFT, eHori); -} - -CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest4, testTdf165261HorzAnchor) -{ - createSdImpressDoc("pptx/tdf165261.pptx"); - saveAndReload(TestFilter::PPTX); - - uno::Reference xGroupShape(getShapeFromPage(0, 0), uno::UNO_QUERY); - uno::Reference xShape(xGroupShape->getByIndex(0), uno::UNO_QUERY); - - uno::Reference xProp(xShape, uno::UNO_QUERY); - drawing::TextHorizontalAdjust eHori; - CPPUNIT_ASSERT(xProp->getPropertyValue(u"TextHorizontalAdjust"_ustr) >>= eHori); - CPPUNIT_ASSERT_EQUAL(drawing::TextHorizontalAdjust::TextHorizontalAdjust_CENTER, eHori); -} - -CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest4, testCustomPromptTexts) -{ - createSdImpressDoc("pptx/tdf163239.pptx"); - saveAndReload(TestFilter::PPTX); - - const SdrPage* pPage1 = GetPage(1); - { - // subtitle placeholder text - SdrTextObj* pTxtObj = DynCastSdrTextObj(pPage1->GetObj(0)); - CPPUNIT_ASSERT_MESSAGE("no text object", pTxtObj != nullptr); - CPPUNIT_ASSERT_EQUAL_MESSAGE("Wrong object type!", SdrObjKind::Text, - pTxtObj->GetObjIdentifier()); - const EditTextObject& aEdit = pTxtObj->GetOutlinerParaObject()->GetTextObject(); - OUString aText = aEdit.GetText(0); - CPPUNIT_ASSERT_EQUAL_MESSAGE("Wrong placeholder text!", - u"Click to edit customized Master Subtitle style"_ustr, aText); - - auto xShapeProps(getShapeFromPage(0, 0)); - CPPUNIT_ASSERT(xShapeProps->getPropertyValue(u"CustomPromptText"_ustr) >>= aText); - CPPUNIT_ASSERT_EQUAL_MESSAGE("Wrong placeholder text was set!", - u"Click to edit customized Master Subtitle style"_ustr, aText); - } - - { - SdrTextObj* pTxtObj = DynCastSdrTextObj(pPage1->GetObj(1)); - CPPUNIT_ASSERT_MESSAGE("no text object", pTxtObj != nullptr); - CPPUNIT_ASSERT_EQUAL_MESSAGE("Wrong object type!", SdrObjKind::TitleText, - pTxtObj->GetObjIdentifier()); - const EditTextObject& aEdit = pTxtObj->GetOutlinerParaObject()->GetTextObject(); - OUString aText = aEdit.GetText(0); - CPPUNIT_ASSERT_EQUAL_MESSAGE("Wrong placeholder text!", u"Custom Title 1"_ustr, aText); - - auto xShapeProps(getShapeFromPage(1, 0)); - CPPUNIT_ASSERT(xShapeProps->getPropertyValue(u"CustomPromptText"_ustr) >>= aText); - CPPUNIT_ASSERT_EQUAL_MESSAGE("Wrong placeholder text was set!", u"Custom Title 1"_ustr, - aText); - } - - const SdrPage* pPage2 = GetPage(3); - { - // body placeholder text - SdrTextObj* pTxtObj = DynCastSdrTextObj(pPage2->GetObj(0)); - CPPUNIT_ASSERT_MESSAGE("no text object", pTxtObj != nullptr); - CPPUNIT_ASSERT_EQUAL_MESSAGE("Wrong object type!", SdrObjKind::OutlineText, - pTxtObj->GetObjIdentifier()); - const EditTextObject& aEdit = pTxtObj->GetOutlinerParaObject()->GetTextObject(); - OUString aText = aEdit.GetText(0); - CPPUNIT_ASSERT_EQUAL_MESSAGE("Wrong placeholder text!", u"Text placeholder"_ustr, aText); - - auto xShapeProps(getShapeFromPage(0, 1)); - CPPUNIT_ASSERT(xShapeProps->getPropertyValue(u"CustomPromptText"_ustr) >>= aText); - CPPUNIT_ASSERT_EQUAL_MESSAGE("Wrong placeholder text was set!", u"Text placeholder"_ustr, - aText); - } -} - -CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest4, testPresObjTextStyles) -{ - createSdImpressDoc("pptx/tdf163239_v2.pptx"); - saveAndReload(TestFilter::PPTX); - - uno::Reference xStyleFamiliesSupplier(mxComponent, - uno::UNO_QUERY); - uno::Reference xStyleFamilies - = xStyleFamiliesSupplier->getStyleFamilies(); - // 1st slide - uno::Reference xStyleFamily( - xStyleFamilies->getByName(u"Title Slide"_ustr), uno::UNO_QUERY); - { - // Title style - uno::Reference xStyle(xStyleFamily->getByName(u"title"_ustr), - uno::UNO_QUERY); - uno::Reference xPropSet(xStyle, uno::UNO_QUERY); - CPPUNIT_ASSERT_EQUAL(60.0f, xPropSet->getPropertyValue(u"CharHeight"_ustr).get()); - CPPUNIT_ASSERT_EQUAL(sal_Int16(style::ParagraphAdjust_CENTER), - xPropSet->getPropertyValue(u"ParaAdjust"_ustr).get()); - CPPUNIT_ASSERT_EQUAL(u"Marianne"_ustr, - xPropSet->getPropertyValue(u"CharFontName"_ustr).get()); - } - // 2nd slide - xStyleFamily.set(xStyleFamilies->getByName(u"Title and Content"_ustr), uno::UNO_QUERY); - { - // Title style - uno::Reference xStyle(xStyleFamily->getByName(u"title"_ustr), - uno::UNO_QUERY); - uno::Reference xPropSet(xStyle, uno::UNO_QUERY); - CPPUNIT_ASSERT_EQUAL(44.0f, xPropSet->getPropertyValue(u"CharHeight"_ustr).get()); - CPPUNIT_ASSERT_EQUAL(sal_Int16(style::ParagraphAdjust_LEFT), - xPropSet->getPropertyValue(u"ParaAdjust"_ustr).get()); - CPPUNIT_ASSERT_EQUAL(u"Marianne"_ustr, - xPropSet->getPropertyValue(u"CharFontName"_ustr).get()); - - // outline1 style - xStyle.set(xStyleFamily->getByName(u"outline1"_ustr), uno::UNO_QUERY); - xPropSet.set(xStyle, uno::UNO_QUERY); - CPPUNIT_ASSERT_EQUAL(28.0f, xPropSet->getPropertyValue(u"CharHeight"_ustr).get()); - CPPUNIT_ASSERT_EQUAL(sal_Int16(style::ParagraphAdjust_LEFT), - xPropSet->getPropertyValue(u"ParaAdjust"_ustr).get()); - CPPUNIT_ASSERT_EQUAL(u"Marianne"_ustr, - xPropSet->getPropertyValue(u"CharFontName"_ustr).get()); - - // outline2 style - xStyle.set(xStyleFamily->getByName(u"outline2"_ustr), uno::UNO_QUERY); - xPropSet.set(xStyle, uno::UNO_QUERY); - CPPUNIT_ASSERT_EQUAL(24.0f, xPropSet->getPropertyValue(u"CharHeight"_ustr).get()); - CPPUNIT_ASSERT_EQUAL(sal_Int16(style::ParagraphAdjust_LEFT), - xPropSet->getPropertyValue(u"ParaAdjust"_ustr).get()); - CPPUNIT_ASSERT_EQUAL(u"Marianne"_ustr, - xPropSet->getPropertyValue(u"CharFontName"_ustr).get()); - - // outline5 style - xStyle.set(xStyleFamily->getByName(u"outline5"_ustr), uno::UNO_QUERY); - xPropSet.set(xStyle, uno::UNO_QUERY); - CPPUNIT_ASSERT_EQUAL(18.0f, xPropSet->getPropertyValue(u"CharHeight"_ustr).get()); - CPPUNIT_ASSERT_EQUAL(sal_Int16(style::ParagraphAdjust_LEFT), - xPropSet->getPropertyValue(u"ParaAdjust"_ustr).get()); - CPPUNIT_ASSERT_EQUAL(u"Marianne"_ustr, - xPropSet->getPropertyValue(u"CharFontName"_ustr).get()); - } -} - -CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest4, testTextStylesXML) -{ - createSdImpressDoc("pptx/tdf163239_v2.pptx"); - save(TestFilter::PPTX); - - xmlDocUniquePtr pXmlDocRels = parseExport(u"ppt/slideLayouts/slideLayout1.xml"_ustr); - - assertXPath(pXmlDocRels, "/p:sldLayout/p:cSld/p:spTree/p:sp[1]/p:txBody/a:lstStyle/a:lvl1pPr", - "algn", u"ctr"); - assertXPath(pXmlDocRels, - "/p:sldLayout/p:cSld/p:spTree/p:sp[1]/p:txBody/a:lstStyle/a:lvl1pPr/a:defRPr", "sz", - u"6000"); -} - -CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest4, testTextAlignLeft) -{ - createSdImpressDoc("pptx/presLeftAlign.pptx"); - save(TestFilter::PPTX); - - xmlDocUniquePtr pXmlDocRels = parseExport(u"ppt/slides/slide1.xml"_ustr); - - assertXPath(pXmlDocRels, "/p:sld/p:cSld/p:spTree/p:sp[2]/p:txBody/a:p/a:pPr", "algn", u"l"); -} - -CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest4, testSubtitleNoBullets) -{ - createSdImpressDoc("odp/tdf170166.odp"); - saveAndReload(TestFilter::PPTX); - - const SdrPage* pPage1 = GetPage(1); - { - // subtitle placeholder object - SdrTextObj* pTxtObj = DynCastSdrTextObj(pPage1->GetObj(0)); - CPPUNIT_ASSERT_MESSAGE("no text object", pTxtObj != nullptr); - CPPUNIT_ASSERT_EQUAL_MESSAGE("Wrong object type!", SdrObjKind::Text, - pTxtObj->GetObjIdentifier()); - const EditTextObject& aEdit = pTxtObj->GetOutlinerParaObject()->GetTextObject(); - const SvxNumBulletItem* pNumFmt = aEdit.GetParaAttribs(0).GetItem(EE_PARA_NUMBULLET); - // Without a fix, it will fail with numbering type: SVX_NUM_CHAR_SPECIAL - CPPUNIT_ASSERT(pNumFmt); - CPPUNIT_ASSERT_EQUAL_MESSAGE("Bullet's numbering type is wrong!", SVX_NUM_NUMBER_NONE, - pNumFmt->GetNumRule().GetLevel(0).GetNumberingType()); - } -} - -CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest4, testOLEObjectAnimationTarget) -{ - createSdImpressDoc("pptx/tdf169088.pptx"); - save(TestFilter::PPTX); - - xmlDocUniquePtr pXmlDoc = parseExport(u"ppt/slides/slide1.xml"_ustr); - - const OUString sOleId = getXPath( - pXmlDoc, "/p:sld/p:cSld/p:spTree/p:graphicFrame/p:nvGraphicFramePr/p:cNvPr", "id"); - const OUString sPicId = getXPath(pXmlDoc, - "/p:sld/p:cSld/p:spTree/p:graphicFrame/a:graphic/" - "a:graphicData/p:oleObj/p:pic/p:nvPicPr/p:cNvPr", - "id"); - - // Check OLE id is different from pic id - CPPUNIT_ASSERT_MESSAGE("OLE id is same as pic id", sOleId != sPicId); - - // Check animation target spid matches OLE object id - assertXPath(pXmlDoc, - "/p:sld/p:timing/p:tnLst/p:par/p:cTn/p:childTnLst/p:seq/p:cTn/p:childTnLst/p:par/" - "p:cTn/p:childTnLst/p:par/p:cTn/p:childTnLst/p:par/p:cTn/p:childTnLst/p:set/" - "p:cBhvr/p:tgtEl/p:spTgt", - "spid", sOleId); - - assertXPath(pXmlDoc, - "/p:sld/p:timing/p:tnLst/p:par/p:cTn/p:childTnLst/p:seq/p:cTn/p:childTnLst/p:par/" - "p:cTn/p:childTnLst/p:par/p:cTn/p:childTnLst/p:par/p:cTn/p:childTnLst/p:animEffect/" - "p:cBhvr/p:tgtEl/p:spTgt", - "spid", sOleId); -} - -CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest4, testtdf169496_hidden_graphic) -{ - createSdImpressDoc("pptx/tdf169496_hidden_graphic.pptx"); - save(TestFilter::PPTX); - - xmlDocUniquePtr pXmlDoc = parseExport(u"ppt/slides/slide1.xml"_ustr); - - // Graphic 5 is hidden and Graphic 4 is visible, but their order might change in the XML - // Without the fix the hidden attribute wasn't exported - OUString sName1 - = getXPath(pXmlDoc, "/p:sld/p:cSld/p:spTree/p:pic[1]/p:nvPicPr/p:cNvPr", "name"); - OUString sName2 - = getXPath(pXmlDoc, "/p:sld/p:cSld/p:spTree/p:pic[2]/p:nvPicPr/p:cNvPr", "name"); - if (sName1 == "Graphic 5" && sName2 == "Graphic 4") - { - OUString aHidden - = getXPath(pXmlDoc, "/p:sld/p:cSld/p:spTree/p:pic[1]/p:nvPicPr/p:cNvPr", "hidden"); - bool bHidden = aHidden == u"true"_ustr || aHidden == u"1"; - CPPUNIT_ASSERT_EQUAL_MESSAGE("Graphic 3 is supposed to be hidden", true, bHidden); - - assertXPathNoAttribute(pXmlDoc, "/p:sld/p:cSld/p:spTree/p:pic[2]/p:nvPicPr/p:cNvPr", - "hidden"); - } - else if (sName1 == "Graphic 4" && sName2 == "Graphic 5") - { - assertXPathNoAttribute(pXmlDoc, "/p:sld/p:cSld/p:spTree/p:pic[1]/p:nvPicPr/p:cNvPr", - "hidden"); - - OUString aHidden - = getXPath(pXmlDoc, "/p:sld/p:cSld/p:spTree/p:pic[2]/p:nvPicPr/p:cNvPr", "hidden"); - bool bHidden = aHidden == u"true"_ustr || aHidden == u"1"; - CPPUNIT_ASSERT_EQUAL_MESSAGE("Graphic 4 is supposed to be hidden", true, bHidden); - } - else - CPPUNIT_FAIL("Names of graphics is incorrect"); -} - -CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest4, testHiddenGroupShape) -{ - createSdImpressDoc("pptx/hidden_group_shape.pptx"); - save(TestFilter::PPTX); - - xmlDocUniquePtr pXmlDoc = parseExport(u"ppt/slides/slide1.xml"_ustr); - assertXPath(pXmlDoc, "/p:sld/p:cSld/p:spTree/p:grpSp/p:nvGrpSpPr/p:cNvPr", "hidden", u"1"); -} - -CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest4, testtdf169825_vertical_layouts) -{ - createSdImpressDoc("pptx/tdf169825_vertical_layouts.pptx"); - save(TestFilter::PPTX); - - xmlDocUniquePtr pXmlDocRels = parseExport(u"ppt/slides/_rels/slide1.xml.rels"_ustr); - CPPUNIT_ASSERT(pXmlDocRels); - // find layout XML for the slide from the relationship file - OUString sLayoutRelRelative - = getXPath(pXmlDocRels, "/rels:Relationships/rels:Relationship", "Target"); - OUString sLayoutRelAbs = sLayoutRelRelative.replaceFirst("..", "ppt"); - xmlDocUniquePtr pXmlDocLayout = parseExport(sLayoutRelAbs); - CPPUNIT_ASSERT(pXmlDocLayout); - - // without the SlidePersist::getLayoutFromValueToken() part of the patch, - // this and the next layout types would both be exported as blank - assertXPath(pXmlDocLayout, "/p:sldLayout", "type", u"vertTitleAndTx"); - - pXmlDocRels = parseExport(u"ppt/slides/_rels/slide2.xml.rels"_ustr); - CPPUNIT_ASSERT(pXmlDocRels); - sLayoutRelRelative = getXPath(pXmlDocRels, "/rels:Relationships/rels:Relationship", "Target"); - sLayoutRelAbs = sLayoutRelRelative.replaceFirst("..", "ppt"); - pXmlDocLayout = parseExport(sLayoutRelAbs); - CPPUNIT_ASSERT(pXmlDocLayout); - - assertXPath(pXmlDocLayout, "/p:sldLayout", "type", u"vertTx"); -} - -CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest4, testtdf169825_vertical_layouts_from_scratch) -{ - createSdImpressDoc(); - - uno::Reference xDoc(mxComponent, uno::UNO_QUERY_THROW); - uno::Reference xPages = xDoc->getDrawPages(); - uno::Reference xPage(xPages->getByIndex(0), uno::UNO_QUERY); - uno::Reference xPageSet(xPage, uno::UNO_QUERY_THROW); - xPageSet->setPropertyValue( - "Layout", - uno::Any(static_cast(AutoLayout::AUTOLAYOUT_VTITLE_VCONTENT_OVER_VCONTENT))); - - uno::Reference xPage2(xPages->insertNewByIndex(1), uno::UNO_SET_THROW); - uno::Reference xPageSet2(xPage2, uno::UNO_QUERY_THROW); - xPageSet2->setPropertyValue( - "Layout", uno::Any(static_cast(AutoLayout::AUTOLAYOUT_VTITLE_VCONTENT))); - save(TestFilter::PPTX); - - xmlDocUniquePtr pXmlDocRels = parseExport(u"ppt/slides/_rels/slide1.xml.rels"_ustr); - CPPUNIT_ASSERT(pXmlDocRels); - // find layout XML for the slide from the relationship file - OUString sLayoutRelRelative - = getXPath(pXmlDocRels, "/rels:Relationships/rels:Relationship", "Target"); - OUString sLayoutRelAbs = sLayoutRelRelative.replaceFirst("..", "ppt"); - xmlDocUniquePtr pXmlDocLayout = parseExport(sLayoutRelAbs); - CPPUNIT_ASSERT(pXmlDocLayout); - - // without the fix in place this would be exported as "objTx" - assertXPath(pXmlDocLayout, "/p:sldLayout", "type", u"vertTitleAndTxOverChart"); - - pXmlDocRels = parseExport(u"ppt/slides/_rels/slide2.xml.rels"_ustr); - CPPUNIT_ASSERT(pXmlDocRels); - sLayoutRelRelative = getXPath(pXmlDocRels, "/rels:Relationships/rels:Relationship", "Target"); - sLayoutRelAbs = sLayoutRelRelative.replaceFirst("..", "ppt"); - pXmlDocLayout = parseExport(sLayoutRelAbs); - CPPUNIT_ASSERT(pXmlDocLayout); - - // without the fix in place this would be exported as "picTx" - assertXPath(pXmlDocLayout, "/p:sldLayout", "type", u"vertTitleAndTx"); -} - -CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest4, testtdf169825_layout_type) -{ - createSdImpressDoc("odp/tdf169825_layout_type.odp"); - save(TestFilter::PPTX); - - xmlDocUniquePtr pXmlDocRels = parseExport(u"ppt/slides/_rels/slide1.xml.rels"_ustr); - CPPUNIT_ASSERT(pXmlDocRels); - // find layout XML for the slide from the relationship file - OUString sLayoutRelRelative - = getXPath(pXmlDocRels, "/rels:Relationships/rels:Relationship", "Target"); - OUString sLayoutRelAbs = sLayoutRelRelative.replaceFirst("..", "ppt"); - xmlDocUniquePtr pXmlDocLayout = parseExport(sLayoutRelAbs); - CPPUNIT_ASSERT(pXmlDocLayout); - - // without the fix in place this would be exported as "vertTitleAndTxOverChart" - // while in the original ODP this was - still possibly bogus - notes layout - assertXPath(pXmlDocLayout, "/p:sldLayout", "type", u"blank"); -} - -CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest4, testtdf170102_layout_type) -{ - createSdImpressDoc("odp/tdf170102_layout_type.odp"); - saveAndReload(TestFilter::PPTX); - - uno::Reference xDoc(mxComponent, uno::UNO_QUERY); - CPPUNIT_ASSERT(xDoc.is()); - sal_Int32 nMPCount = xDoc->getMasterPages()->getCount(); - // test roughly the same thing in document and in XML: no drawing object in master page/layout - for (sal_Int32 i = 0; i < nMPCount; i++) - { - uno::Reference xPage(xDoc->getMasterPages()->getByIndex(i), - uno::UNO_QUERY_THROW); - sal_Int32 nObjCount = xPage->getCount(); - for (sal_Int32 j = 0; j < nObjCount; j++) - { - uno::Reference xShapeInfo(xPage->getByIndex(j), - uno::UNO_QUERY_THROW); - // without the fix in place there would be a graphic shape placeholder - CPPUNIT_ASSERT_MESSAGE( - "Unexpected graphic object shape in exported master page", - !xShapeInfo->supportsService(u"com.sun.star.drawing.GraphicObjectShape"_ustr)); - } - - xmlDocUniquePtr pXmlDocLayout = parseExport(u"ppt/slideLayouts/slideLayout"_ustr - + OUString::number(i + 1) + u".xml"_ustr); - CPPUNIT_ASSERT(pXmlDocLayout); - // without the fix in place there would be a pic layout element for the placeholder - CPPUNIT_ASSERT_EQUAL_MESSAGE( - "Unexpected \"pic\" element in exported PPTX slide layout", 0, - countXPathNodes(pXmlDocLayout, "/p:sldLayout/p:cSld/p:spTree/p:pic")); - } -} - -CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest4, testFooterIdxConsistency) -{ - createSdImpressDoc("pptx/multiplelayoutfooter.pptx"); - save(TestFilter::PPTX); - - // slide1 points to slideLayout2 - xmlDocUniquePtr pRelsDoc = parseExport(u"ppt/slides/_rels/slide1.xml.rels"_ustr); - assertXPath(pRelsDoc, - "/rels:Relationships/rels:Relationship[@Type='http://" - "schemas.openxmlformats.org/officeDocument/2006/" - "relationships/slideLayout']", - "Target", u"../slideLayouts/slideLayout2.xml"); - - // And they agree on the idx of the footer: - xmlDocUniquePtr pSlide = parseExport(u"ppt/slides/slide1.xml"_ustr); - OUString aFtrIdx = getXPath(pSlide, "//p:sp/p:nvSpPr/p:nvPr/p:ph", "idx"); - xmlDocUniquePtr pLayout = parseExport(u"ppt/slideLayouts/slideLayout2.xml"_ustr); - assertXPath(pLayout, "//p:sp/p:nvSpPr/p:nvPr/p:ph", "idx", aFtrIdx); - // Without the fix it fails with: - // - Expected: 1 - // - Actual : 2 - // - In <>, attribute 'idx' of '//p:sp/p:nvSpPr/p:nvPr/p:ph' incorrect value. -} - -CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest4, testOmitCanvasSlideExport) -{ - createSdImpressDoc("odp/canvas-slide.odp"); - - SdXImpressDocument* pXImpressDocument = dynamic_cast(mxComponent.get()); - CPPUNIT_ASSERT(pXImpressDocument); - SdDrawDocument* pDoc = pXImpressDocument->GetDoc(); - CPPUNIT_ASSERT_MESSAGE("no document", pDoc != nullptr); - - // the document has 2 pages - one canvas page, and one normal page - CPPUNIT_ASSERT_EQUAL(sal_uInt16(2), pDoc->GetSdPageCount(PageKind::Standard)); - CPPUNIT_ASSERT(pDoc->HasCanvasPage()); - - save(TestFilter::PPTX); - - // Verify that the canvas slide was omitted from the export - // It should have one master slide, and one slide - xmlDocUniquePtr pXmlDocContent = parseExport(u"ppt/presentation.xml"_ustr); - assertXPath(pXmlDocContent, "/p:presentation/p:sldMasterIdLst/p:sldMasterId", 1); - assertXPath(pXmlDocContent, "/p:presentation/p:sldIdLst/p:sldId", 1); -} - -CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest4, testParaAlignStartEnd) -{ - createSdImpressDoc("odp/para-align-start-end.fodp"); - save(TestFilter::PPTX); - - xmlDocUniquePtr pDoc = parseExport(u"ppt/slides/slide1.xml"_ustr); - - // PresentationML doesn't support start and end paragraph alignment. - // Paragraphs should be exported as left/right alignment, depending on para direction. - assertXPath(pDoc, "/p:sld/p:cSld/p:spTree/p:sp[2]/p:txBody/a:p[1]/a:pPr[@algn='l']", 1); - assertXPath(pDoc, "/p:sld/p:cSld/p:spTree/p:sp[2]/p:txBody/a:p[2]/a:pPr[@algn='r']", 1); - assertXPath(pDoc, "/p:sld/p:cSld/p:spTree/p:sp[2]/p:txBody/a:p[3]/a:pPr[@algn='r']", 1); - assertXPath(pDoc, "/p:sld/p:cSld/p:spTree/p:sp[2]/p:txBody/a:p[4]/a:pPr[@algn='l']", 1); -} - -CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest4, testTdf169559) -{ - createSdImpressDoc("pptx/tdf169524.pptx"); - save(TestFilter::PPTX); - - xmlDocUniquePtr pXmlDoc = parseExport(u"ppt/slideMasters/slideMaster1.xml"_ustr); - assertXPath( - pXmlDoc, - "/p:sldMaster/p:cSld/p:spTree/p:sp[2]/p:txBody/a:lstStyle/a:lvl1pPr/a:spcAft/a:spcPts", - "val", u"1701"); -} - -CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest4, testTdf114443_PPSX) -{ - createSdImpressDoc("ppsx/tdf114443-6.ppsx"); - save(TestFilter::PPSX); - - xmlDocUniquePtr pXmlDoc = parseExport(u"[Content_Types].xml"_ustr); - - // Without the fix, this would have been: - // application/vnd.openxmlformats-officedocument.presentationml.presentation.main+xml - // which means the file loses its slideshow/autoplay nature and PowerPoint rejects it. - assertXPath(pXmlDoc, - "/ContentType:Types/ContentType:Override[@PartName='/ppt/presentation.xml']", - "ContentType", - u"application/vnd.openxmlformats-officedocument.presentationml.slideshow.main+xml"); -} - -CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest4, testConnectorShapeAnimationTarget) -{ - createSdImpressDoc("pptx/connector-shape-animations.pptx"); - save(TestFilter::PPTX); - - xmlDocUniquePtr pXmlDoc = parseExport(u"ppt/slides/slide1.xml"_ustr); - - const OUString sConnectorId = getXPath( - pXmlDoc, "/p:sld/p:cSld/p:spTree/p:cxnSp/p:nvCxnSpPr/p:cNvCxnSpPr/a:stCxn", "id"); - - const OUString sShapeId = getXPath( - pXmlDoc, "/p:sld/p:cSld/p:spTree/p:graphicFrame/p:nvGraphicFramePr/p:cNvPr", "id"); - - // Check connector and shape both have the same ID - CPPUNIT_ASSERT_EQUAL_MESSAGE("Connector and the shape doesn't have the same ID", sConnectorId, - sShapeId); - - // Check animation spid matches ShapeId - assertXPath(pXmlDoc, - "/p:sld/p:timing/p:tnLst/p:par/p:cTn/p:childTnLst/p:seq/p:cTn/p:childTnLst/p:par/" - "p:cTn/p:childTnLst/p:par/p:cTn/p:childTnLst/p:par[2]/p:cTn/p:childTnLst/p:set/" - "p:cBhvr/p:tgtEl/p:spTgt", - "spid", sShapeId); -} - -CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest4, testChartExExport) -{ - createSdImpressDoc("pptx/forum-mso-de-138303.pptx"); - save(TestFilter::PPTX); - - xmlDocUniquePtr pDoc = parseExport(u"ppt/slides/slide1.xml"_ustr); - CPPUNIT_ASSERT(pDoc); - - const OString sPath1 = "/p:sld/p:cSld/p:spTree/mc:AlternateContent/mc:Fallback"_ostr; - assertXPath(pDoc, sPath1 + "/xdr:sp"_ostr, 0); - assertXPath(pDoc, sPath1 + "/p:sp"_ostr, 1); - assertXPath(pDoc, sPath1 + "/p:sp/p:nvSpPr/p:nvPr"_ostr, 1); - - pDoc = parseExport(u"ppt/charts/chartEx1.xml"_ustr); - CPPUNIT_ASSERT(pDoc); - - assertXPath(pDoc, "/cx:chartSpace/c:date1904", 0); -} - -// 1. Open PPTX with sections, re-export to PPTX, verify sections preserved -CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest4, testSlideSectionsPPTXImport) -{ - createSdImpressDoc("pptx/slide-section-test.pptx"); - save(TestFilter::PPTX); - - xmlDocUniquePtr pXmlDoc = parseExport(u"ppt/presentation.xml"_ustr); - - static constexpr OString sPath = "/p:presentation/p:extLst/p:ext/p14:sectionLst"_ostr; - assertXPath(pXmlDoc, sPath + "/p14:section", 3); - assertXPath(pXmlDoc, sPath + "/p14:section[1]", "name", u"Section-1"); - assertXPath(pXmlDoc, sPath + "/p14:section[2]", "name", u"Section-2"); - assertXPath(pXmlDoc, sPath + "/p14:section[3]", "name", u"Section-3"); - assertXPath(pXmlDoc, sPath + "/p14:section[1]/p14:sldIdLst/p14:sldId", 4); - assertXPath(pXmlDoc, sPath + "/p14:section[2]/p14:sldIdLst/p14:sldId", 7); - assertXPath(pXmlDoc, sPath + "/p14:section[3]/p14:sldIdLst/p14:sldId", 2); - - // GUIDs preserved - for (sal_Int32 i = 1; i <= 3; ++i) - { - OUString sId = getXPath(pXmlDoc, sPath + "/p14:section[" + OString::number(i) + "]", "id"); - CPPUNIT_ASSERT(!sId.isEmpty()); - CPPUNIT_ASSERT(sId.startsWith("{")); - } - - // Slide IDs non-zero - OUString sSldId = getXPath(pXmlDoc, sPath + "/p14:section[1]/p14:sldIdLst/p14:sldId[1]", "id"); - CPPUNIT_ASSERT(sSldId.toInt32() > 0); -} - -// 2. Export PPTX with sections to ODP -CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest4, testSlideSectionsPPTXToODP) -{ - createSdImpressDoc("pptx/slide-section-test.pptx"); - skipValidation(); - save(TestFilter::ODP); - - xmlDocUniquePtr pXmlDoc = parseExport(u"content.xml"_ustr); - - static constexpr OString sPath - = "/office:document-content/office:body/office:presentation/loext:section-list"_ostr; - assertXPath(pXmlDoc, sPath + "/loext:section", 3); - assertXPath(pXmlDoc, sPath + "/loext:section[1]", "name", u"Section-1"); - assertXPath(pXmlDoc, sPath + "/loext:section[2]", "name", u"Section-2"); - assertXPath(pXmlDoc, sPath + "/loext:section[3]", "name", u"Section-3"); - assertXPath(pXmlDoc, sPath + "/loext:section[1]/loext:section-slide", 4); - assertXPath(pXmlDoc, sPath + "/loext:section[2]/loext:section-slide", 7); - assertXPath(pXmlDoc, sPath + "/loext:section[3]/loext:section-slide", 2); -} - -// 3. Open ODP with sections (PPTX -> ODP -> reload ODP) -CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest4, testSlideSectionsODPImport) -{ - createSdImpressDoc("pptx/slide-section-test.pptx"); - skipValidation(); - saveAndReload(TestFilter::ODP); - - // Verify the in-memory model loaded from ODP - auto* pXImpressDocument = dynamic_cast(mxComponent.get()); - CPPUNIT_ASSERT(pXImpressDocument); - SdDrawDocument* pDoc = pXImpressDocument->GetDoc(); - CPPUNIT_ASSERT(pDoc); - - sd::SlideSectionManager& rMgr = pDoc->GetSectionManager(); - CPPUNIT_ASSERT_EQUAL(sal_Int32(3), rMgr.GetSectionCount()); - CPPUNIT_ASSERT_EQUAL(u"Section-1"_ustr, rMgr.GetSection(0).maName); - CPPUNIT_ASSERT_EQUAL(u"Section-2"_ustr, rMgr.GetSection(1).maName); - CPPUNIT_ASSERT_EQUAL(u"Section-3"_ustr, rMgr.GetSection(2).maName); -} - -// 4. Export ODP with sections to PPTX -CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest4, testSlideSectionsODPToPPTX) -{ - createSdImpressDoc("pptx/slide-section-test.pptx"); - skipValidation(); - saveAndReload(TestFilter::ODP); - save(TestFilter::PPTX); - - xmlDocUniquePtr pXmlDoc = parseExport(u"ppt/presentation.xml"_ustr); - - static constexpr OString sPath = "/p:presentation/p:extLst/p:ext/p14:sectionLst"_ostr; - assertXPath(pXmlDoc, sPath + "/p14:section", 3); - assertXPath(pXmlDoc, sPath + "/p14:section[1]", "name", u"Section-1"); - assertXPath(pXmlDoc, sPath + "/p14:section[2]", "name", u"Section-2"); - assertXPath(pXmlDoc, sPath + "/p14:section[3]", "name", u"Section-3"); - assertXPath(pXmlDoc, sPath + "/p14:section[1]/p14:sldIdLst/p14:sldId", 4); - assertXPath(pXmlDoc, sPath + "/p14:section[2]/p14:sldIdLst/p14:sldId", 7); - assertXPath(pXmlDoc, sPath + "/p14:section[3]/p14:sldIdLst/p14:sldId", 2); - - // Slide IDs non-zero after ODP round-trip - OUString sSldId = getXPath(pXmlDoc, sPath + "/p14:section[1]/p14:sldIdLst/p14:sldId[1]", "id"); - CPPUNIT_ASSERT(sSldId.toInt32() > 0); - - // GUIDs survive ODP round-trip (generated if missing) - for (sal_Int32 i = 1; i <= 3; ++i) - { - OUString sId = getXPath(pXmlDoc, sPath + "/p14:section[" + OString::number(i) + "]", "id"); - CPPUNIT_ASSERT(!sId.isEmpty()); - } -} - -CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest4, testCool16078_placeholderKeepsItsOutline) -{ - // Given a layout whose picture placeholder is clipped to an outline of two elements: - // a frame with two holes, one of them round, and a second path holding a triangle that crosses - // the round one: - createSdImpressDoc("pptx/custgeom-placeholder.pptx"); - save(TestFilter::PPTX); - - // The outline is written back as the placeholder's own geometry. Without it the placeholder - // saved as a plain rectangle, and its fill then hid both holes and what showed through. - xmlDocUniquePtr pLayout = parseExportedLayoutNamed(u"Picture placeholder, clipped outline"); - OString aPath - = "//p:sp[p:nvSpPr/p:nvPr/p:ph/@type='pic']/p:spPr/a:custGeom/a:pathLst/a:path"_ostr; - assertXPath(pLayout, aPath, 1); - // Three contours in one path, which is what subtracts the holes from the frame - the same three - // the ODF side writes. The second path is not one of them: it is filled rather than cut out, so - // the triangle it holds took a piece of the round hole back instead of adding a contour. - assertXPath(pLayout, aPath + "/a:moveTo", 3); - assertXPath(pLayout, aPath + "/a:close", 3); - // Four sides each for the two rectangles, the closing one included. - assertXPath(pLayout, aPath + "/a:lnTo", 8); - // What is left of the round hole is still curves, not a polygon flattened out of them. - assertXPath(pLayout, aPath + "/a:cubicBezTo", 6); - assertXPath(pLayout, aPath + "/a:cubicBezTo[1]/a:pt", 3); - // The frame's own corner, in the path's coordinates. - assertXPath(pLayout, aPath + "/a:moveTo[1]/a:pt", "x", u"0"); - assertXPath(pLayout, aPath + "/a:moveTo[1]/a:pt", "y", u"0"); - - // The preset rectangle it used to write would have claimed the whole frame. - assertXPath(pLayout, "//p:sp[p:nvSpPr/p:nvPr/p:ph/@type='pic']/p:spPr/a:prstGeom", 0); -} - -CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest4, testCool16080_masterKeepsItsPlaceholders) -{ - // Given a deck of one master and eleven layouts, so one Impress master page stands for the - // whole group: - createSdImpressDoc("pptx/master-and-eleven-layouts.pptx"); - save(TestFilter::PPTX); - - // The master part carries its own placeholders. Without the fix it held a shape tree with - // nothing in it, so PowerPoint offered an empty slide master: nothing to inherit from, and - // an edit meant for every layout had to be repeated on each of them. - xmlDocUniquePtr pMaster = parseExport(u"ppt/slideMasters/slideMaster1.xml"_ustr); - static constexpr OString aTree("/p:sldMaster/p:cSld/p:spTree"_ostr); - assertXPath(pMaster, aTree + "/p:sp/p:nvSpPr/p:nvPr/p:ph[@type='title']", 1); - assertXPath(pMaster, aTree + "/p:sp/p:nvSpPr/p:nvPr/p:ph[@type='dt']", 1); - assertXPath(pMaster, aTree + "/p:sp/p:nvSpPr/p:nvPr/p:ph[@type='ftr']", 1); - assertXPath(pMaster, aTree + "/p:sp/p:nvSpPr/p:nvPr/p:ph[@type='sldNum']", 1); - - // The body comes from the first layout that has one, since the page standing for the group is - // the Title Slide layout and has none. That layout inherits the master's geometry, so the - // placeholder lands where the master put it rather than where a layout would. - assertXPath(pMaster, aTree + "/p:sp/p:nvSpPr/p:nvPr/p:ph[@type='body']", 1); - assertXPath(pMaster, aTree + "/p:sp[p:nvSpPr/p:nvPr/p:ph/@type='body']/p:spPr/a:xfrm/a:off", - "y", u"1825560"); -} - -CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest4, testCool16080_layoutShapesStayOnTheirLayout) -{ - // Given a deck whose first layout paints the whole slide blue, and a slide on another layout, - // which is therefore white: - createSdImpressDoc("pptx/layout-own-background.pptx"); - saveAndReload(TestFilter::PPTX); - - utl::TempFileNamed aPng; - aPng.EnableKillingFile(); - uno::Sequence aFilterData{ - comphelper::makePropertyValue(u"PixelWidth"_ustr, sal_Int32(64)), - comphelper::makePropertyValue(u"PixelHeight"_ustr, sal_Int32(36)) - }; - uno::Sequence aDescriptor{ - comphelper::makePropertyValue(u"URL"_ustr, aPng.GetURL()), - comphelper::makePropertyValue(u"FilterName"_ustr, u"PNG"_ustr), - comphelper::makePropertyValue(u"FilterData"_ustr, aFilterData) - }; - auto xExporter = drawing::GraphicExportFilter::create(getComponentContext()); - xExporter->setSourceDocument(getPage(0).queryThrow()); - xExporter->filter(aDescriptor); - - SvFileStream aStream(aPng.GetURL(), StreamMode::READ); - Bitmap aSlide = vcl::PngImageReader(aStream).read(); - CPPUNIT_ASSERT_EQUAL(Size(64, 36), aSlide.GetSizePixel()); - - // The slide is still white. An imported master and layout collapse onto one Impress master - // page, so the page standing for the group holds the first layout's rectangle - and writing - // that page's shapes into the master part painted it under every slide of the deck. Sample - // the side margins, which no placeholder of this layout reaches. - // Without the fix in place, this test would have failed with - // - Expected: rgba[ffffffff] - // - Actual : rgba[0000ffff] - CPPUNIT_ASSERT_EQUAL(COL_WHITE, aSlide.GetPixelColor(2, 18)); - CPPUNIT_ASSERT_EQUAL(COL_WHITE, aSlide.GetPixelColor(61, 18)); - - // The layout it belongs to still paints it, which is what a slide of that layout inherits. - xmlDocUniquePtr pLayout = parseExportedLayoutNamed(u"Title Slide"); - assertXPath(pLayout, - "/p:sldLayout/p:cSld/p:spTree/p:sp[p:nvSpPr/p:cNvPr/@name='Blue background']" - "/p:spPr/a:solidFill/a:srgbClr", - "val", u"0000FF"); -} - -CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest4, testCool16080_masterKeepsWhatItsLayoutsShare) -{ - // Given a deck of one master that draws a rule of its own across the top of the slide, in - // segments of colour, and seven layouts that draw nothing: - createSdImpressDoc("pptx/tdf157740.pptx"); - saveAndReload(TestFilter::PPTX); - - // The rule is on the slide master, so PowerPoint edits it once for every layout. The import - // gives each of the seven Impress master pages a copy, and the master used to get none. - // Without the fix in place, this test would have failed with - // - Expected: 1 - // - Actual : 0 - xmlDocUniquePtr pMaster = parseExport(u"ppt/slideMasters/slideMaster1.xml"_ustr); - assertXPath(pMaster, - "/p:sldMaster/p:cSld/p:spTree/p:grpSp[p:nvGrpSpPr/p:cNvPr/@name='Group 1']", 1); - - // It moved there rather than being written seven more times: a layout holds the three - // placeholders it inherits and nothing else. - xmlDocUniquePtr pLayout = parseExportedLayoutNamed(u"Title, Content over Content"); - static constexpr OString aLayoutTree("/p:sldLayout/p:cSld/p:spTree"_ostr); - assertXPath(pLayout, aLayoutTree + "/*[not(self::p:nvGrpSpPr) and not(self::p:grpSpPr)]", 3); - assertXPath(pLayout, aLayoutTree + "/p:sp/p:nvSpPr/p:nvPr/p:ph", 3); - - // And the slide still shows the rule, wherever it is written - utl::TempFileNamed aPng; - aPng.EnableKillingFile(); - uno::Sequence aFilterData{ - comphelper::makePropertyValue(u"PixelWidth"_ustr, sal_Int32(1920)), - comphelper::makePropertyValue(u"PixelHeight"_ustr, sal_Int32(1080)) - }; - uno::Sequence aDescriptor{ - comphelper::makePropertyValue(u"URL"_ustr, aPng.GetURL()), - comphelper::makePropertyValue(u"FilterName"_ustr, u"PNG"_ustr), - comphelper::makePropertyValue(u"FilterData"_ustr, aFilterData) - }; - auto xExporter = drawing::GraphicExportFilter::create(getComponentContext()); - xExporter->setSourceDocument(getPage(0).queryThrow()); - xExporter->filter(aDescriptor); - - SvFileStream aStream(aPng.GetURL(), StreamMode::READ); - Bitmap aSlide = vcl::PngImageReader(aStream).read(); - CPPUNIT_ASSERT_EQUAL(Size(1920, 1080), aSlide.GetSizePixel()); - // 90EBCD is accent5 of the deck's theme, the fill of the rule's second segment - CPPUNIT_ASSERT_EQUAL(Color(0x90EBCD), aSlide.GetPixelColor(200, 5)); -} - -CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest4, testCool16082_layoutKeepsSubtitle) -{ - // Given a deck whose Title Slide layout carries a subtitle placeholder: - createSdImpressDoc("pptx/master-and-eleven-layouts.pptx"); - save(TestFilter::PPTX); - - // The layout keeps it. Without the fix every layout of a master holding more than one lost its - // subtitle, so a slide made from the layout afterwards had nowhere to put one. - xmlDocUniquePtr pLayout = parseExportedLayoutNamed(u"Title Slide"); - assertXPath(pLayout, "/p:sldLayout/p:cSld/p:spTree/p:sp/p:nvSpPr/p:nvPr/p:ph[@type='subTitle']", - 1); - - // The slide master still gets none, which is what PowerPoint refuses the file over. - xmlDocUniquePtr pMaster = parseExport(u"ppt/slideMasters/slideMaster1.xml"_ustr); - assertXPath(pMaster, "/p:sldMaster/p:cSld/p:spTree/p:sp/p:nvSpPr/p:nvPr/p:ph[@type='subTitle']", - 0); -} - -CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest4, testCool16079_dateTimeField) -{ - // Given a deck whose date placeholders hold an automatically updated date: - createSdImpressDoc("pptx/master-and-eleven-layouts.pptx"); - save(TestFilter::PPTX); - - // The placeholder keeps a field. Without the fix it held our own display string as literal - // text, so PowerPoint showed "" where the original showed a date. The type is the - // one that leaves the format to the reader, which is what a field holding none asks for - the - // alias PowerPoint writes here stands for a fixed MM/DD/YYYY. - xmlDocUniquePtr pLayout = parseExportedLayoutNamed(u"Title Slide"); - assertXPath(pLayout, "//p:sp[p:nvSpPr/p:nvPr/p:ph/@type='dt']/p:txBody/a:p/a:fld", "type", - u"datetime"); -} - -CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest4, testThemeKeepColorTransforms) -{ - createSdImpressDoc("pptx/empty-title-placeholder.pptx"); - save(TestFilter::PPTX); - - xmlDocUniquePtr pXmlDoc = parseExport(u"ppt/theme/theme1.xml"_ustr); - const OString sBasePath = "/a:theme/a:themeElements/a:fmtScheme/a:bgFillStyleLst/a:gradFill[1]" - "/a:gsLst/a:gs[@pos='40000']/a:schemeClr"_ostr; - - // Without the fix satMod would end up negative - assertXPath(pXmlDoc, sBasePath, "val", u"phClr"); - assertXPathChildren(pXmlDoc, sBasePath, 3); - assertXPath(pXmlDoc, sBasePath + "/a:tint", "val", u"45000"); - assertXPath(pXmlDoc, sBasePath + "/a:shade", "val", u"99000"); - assertXPath(pXmlDoc, sBasePath + "/a:satMod", "val", u"350000"); -} - -CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest4, testTdf166401_textGivenToAPicturePlaceholder) -{ - // Given a slide whose picture placeholder is given text without any editing, which is what a - // script does and what leaves the placeholder standing for itself rather than for the text: - createSdImpressDoc("pptx/picture-placeholder-custom-prompt.pptx"); - getShapeFromPage(0, 0).queryThrow()->setString( - u"Given to a picture placeholder"_ustr); - save(TestFilter::PPTX); - - // The placeholder is written with its text. It holds no image, so writing it as a picture wrote - // nothing at all and the text went with the shape. - xmlDocUniquePtr pSlide = parseExport(u"ppt/slides/slide1.xml"_ustr); - static constexpr OString aPlaceholder( - "/p:sld/p:cSld/p:spTree/p:sp[p:nvSpPr/p:nvPr/p:ph/@type='pic']"_ostr); - assertXPath(pSlide, aPlaceholder, 1); - assertXPathContent(pSlide, aPlaceholder + "/p:txBody/a:p/a:r/a:t", - u"Given to a picture placeholder"); -} - CPPUNIT_PLUGIN_IMPLEMENT(); /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sd/qa/unit/export-tests-ooxml5.cxx b/sd/qa/unit/export-tests-ooxml5.cxx new file mode 100644 index 000000000000..a3291d04a5bc --- /dev/null +++ b/sd/qa/unit/export-tests-ooxml5.cxx @@ -0,0 +1,1380 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + */ + +#include "sdmodeltestbase.hxx" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +#include +#include +#include +#include +#include + +#include +#include + +class SdOOXMLExportTest5 : public SdModelTestBase +{ +public: + SdOOXMLExportTest5() + : SdModelTestBase(u"/sd/qa/unit/data/"_ustr) + { + } +}; + +CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest5, testTdf151622_oleIcon) +{ + createSdImpressDoc("odp/ole_icon.odp"); + + save(TestFilter::PPTX); + + xmlDocUniquePtr pXml = parseExport(u"ppt/slides/slide1.xml"_ustr); + + // Without the accompanying fix in place, this test would have failed with: + // - Expression: prop + // - In ..., XPath '//p:oleObj' no attribute 'showAsIcon' exist + // i.e. show as icon option wasn't exported. + assertXPath(pXml, "//p:oleObj", "showAsIcon", u"1"); +} + +CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest5, testTdf152436) +{ + createSdImpressDoc("pptx/ole-emf_min.pptx"); + saveAndReload(TestFilter::PPTX); + + // Check number of shapes after export. + CPPUNIT_ASSERT_EQUAL(sal_Int32(1), getPage(0)->getCount()); +} + +CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest5, testLinkedOLE) +{ + // The linked OLE object needs its link completed during load so it can + // be exported. Use FULL_UPDATE since the default test mode defers links. + uno::Sequence aParams = { + comphelper::makePropertyValue(u"UpdateDocMode"_ustr, + sal_Int16(css::document::UpdateDocMode::FULL_UPDATE)), + }; + loadFromFile(u"odp/linked_ole.odp", aParams); + + save(TestFilter::PPTX); + + xmlDocUniquePtr pXml = parseExport(u"ppt/slides/slide1.xml"_ustr); + + // Without the accompanying fix in place, this test would have failed with: + // - Expected: 1 + // - Actual : 0 + // - In<>, XPath '//p:oleObj' number of nodes is incorrect + // i.e. the linked ole object wasn't exported. + assertXPath(pXml, "//p:oleObj", 1); +} + +CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest5, testTdf102261_testParaTabStopDefaultDistance) +{ + createSdImpressDoc("pptx/tdf102261_testParaTabStopDefaultDistance.pptx"); + saveAndReload(TestFilter::PPTX); + + uno::Reference xShape(getShapeFromPage(0, 0)); + { + uno::Reference xPropSet(getParagraphFromShape(0, xShape), + uno::UNO_QUERY_THROW); + CPPUNIT_ASSERT_EQUAL( + sal_Int32{ 1270 }, + xPropSet->getPropertyValue(u"ParaTabStopDefaultDistance"_ustr).get()); + } + { + uno::Reference xPropSet(getParagraphFromShape(1, xShape), + uno::UNO_QUERY_THROW); + CPPUNIT_ASSERT_EQUAL( + sal_Int32{ 2540 }, + xPropSet->getPropertyValue(u"ParaTabStopDefaultDistance"_ustr).get()); + } +} + +CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest5, testNotesAuthorDate) +{ + createSdImpressDoc("pptx/pres-with-notes.pptx"); + + using ScriptingCfg = officecfg::Office::Common::Security::Scripting; + ScopedConfigValue aCfg1(true); + { + // 1. Remove all personal info, but keep note info + ScopedConfigValue aCfg2(true); + + saveAndReload(TestFilter::PPTX); + + xmlDocUniquePtr pXml = parseExport(u"ppt/commentAuthors.xml"_ustr); + assertXPath(pXml, "/p:cmAuthorLst/p:cmAuthor[@id=0]", "name", u"Hans Wurst"); + assertXPath(pXml, "/p:cmAuthorLst/p:cmAuthor[@id=1]", "name", u"Max Muster"); + + pXml = parseExport(u"ppt/comments/comment1.xml"_ustr); + assertXPath(pXml, "/p:cmLst/p:cm", "dt", u"2024-06-13T12:03:08.000000000"); + } + + { + // 2. Remove all personal info + ScopedConfigValue aCfg2(false); + saveAndReload(TestFilter::PPTX); + + xmlDocUniquePtr pXml = parseExport(u"ppt/commentAuthors.xml"_ustr); + assertXPath(pXml, "/p:cmAuthorLst/p:cmAuthor[@id=0]", "name", u"Author1"); + assertXPath(pXml, "/p:cmAuthorLst/p:cmAuthor[@id=1]", "name", u"Author2"); + + pXml = parseExport(u"ppt/comments/comment1.xml"_ustr); + assertXPathNoAttribute(pXml, "/p:cmLst/p:cm", "dt"); + } +} + +CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest5, testTableCellVerticalPropertyRoundtrip) +{ + createSdImpressDoc("pptx/tcPr-vert-roundtrip.pptx"); + saveAndReload(TestFilter::PPTX); + + xmlDocUniquePtr pXml = parseExport(u"ppt/slides/slide1.xml"_ustr); + + assertXPath(pXml, "(//a:tcPr)[1]", "vert", u"vert"); + assertXPath(pXml, "(//a:tcPr)[2]", "vert", u"vert270"); + assertXPath(pXml, "(//a:tcPr)[3]", "vert", u"wordArtVert"); +} + +CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest5, testTdf157740_slideMasters) +{ + createSdImpressDoc("pptx/tdf157740.pptx"); + saveAndReload(TestFilter::PPTX); + + // The original file has 1 slide master and 7 slide layouts in that master + xmlDocUniquePtr pXmlDocContent = parseExport(u"ppt/presentation.xml"_ustr); + assertXPath(pXmlDocContent, "/p:presentation/p:sldMasterIdLst/p:sldMasterId", 1); + + pXmlDocContent = parseExport(u"ppt/slideMasters/slideMaster1.xml"_ustr); + assertXPath(pXmlDocContent, "/p:sldMaster/p:sldLayoutIdLst/p:sldLayoutId", 7); +} + +CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest5, testNotesMasterThemeNoAfterDeduplicatedMasters) +{ + createSdImpressDoc("n759180.pptx"); + save(TestFilter::PPTX); + + xmlDocUniquePtr pXmlDocContent = parseExport(u"ppt/presentation.xml"_ustr); + assertXPath(pXmlDocContent, "/p:presentation/p:sldMasterIdLst/p:sldMasterId", 1); + + xmlDocUniquePtr pXmlDocRels = parseExport(u"ppt/slideMasters/_rels/slideMaster1.xml.rels"_ustr); + assertXPath(pXmlDocRels, + "/rels:Relationships/rels:Relationship[@Type='http://schemas.openxmlformats.org/" + "officeDocument/2006/relationships/theme']", + "Target", u"../theme/theme1.xml"); + + // The one slide master of this document has 12 layouts, which are imported as 12 master pages + // and written back as one slide master. The notes master theme takes the number after the slide + // master theme, as in the original file, without a gap for the master pages that were merged. + // Without the change in place, this test would have failed with: + // - Expected: ../theme/theme2.xml + // - Actual : ../theme/theme13.xml + pXmlDocRels = parseExport(u"ppt/notesMasters/_rels/notesMaster1.xml.rels"_ustr); + assertXPath(pXmlDocRels, + "/rels:Relationships/rels:Relationship[@Type='http://schemas.openxmlformats.org/" + "officeDocument/2006/relationships/theme']", + "Target", u"../theme/theme2.xml"); + + uno::Reference xNameAccess + = packages::zip::ZipFileAccess::createWithURL(comphelper::getComponentContext(m_xSFactory), + maTempFile.GetURL()); + CPPUNIT_ASSERT_EQUAL(true, bool(xNameAccess->hasByName(u"ppt/theme/theme2.xml"_ustr))); +} + +CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest5, testTdf159931_slideLayouts) +{ + createSdImpressDoc("odp/repeatBitmapMode.odp"); + save(TestFilter::PPTX); + + xmlDocUniquePtr pXmlDocRels1 = parseExport(u"ppt/slides/_rels/slide1.xml.rels"_ustr); + xmlDocUniquePtr pXmlDocRels2 = parseExport(u"ppt/slides/_rels/slide2.xml.rels"_ustr); + + assertXPath(pXmlDocRels1, "(/rels:Relationships/rels:Relationship[@Type='http://" + "schemas.openxmlformats.org/officeDocument/2006/relationships/" + "slideLayout'])"); + + // the relative target e.g. "../slideLayouts/slideLayout2.xml" + OUString sRelativeLayoutPath1 + = getXPathContent(pXmlDocRels1, "(/rels:Relationships/rels:Relationship[@Type='http://" + "schemas.openxmlformats.org/officeDocument/2006/" + "relationships/slideLayout'])/@Target"); + + assertXPath(pXmlDocRels2, "(/rels:Relationships/rels:Relationship[@Type='http://" + "schemas.openxmlformats.org/officeDocument/2006/relationships/" + "slideLayout'])"); + + // the relative target e.g. "../slideLayouts/slideLayout1.xml" + OUString sRelativeLayoutPath2 + = getXPathContent(pXmlDocRels2, "(/rels:Relationships/rels:Relationship[@Type='http://" + "schemas.openxmlformats.org/officeDocument/2006/" + "relationships/slideLayout'])/@Target"); + + uno::Reference xNameAccess + = packages::zip::ZipFileAccess::createWithURL(comphelper::getComponentContext(m_xSFactory), + maTempFile.GetURL()); + + // Check that the referenced slideLayout files exist + // Without the accompanying fix in place, this test would have failed with: + // equality assertion failed + // - Expected: 1 + // - Actual : 0 + // i.e. the referenced slideLayout file was missing on export. + OUString sSlideLayoutName1 = sRelativeLayoutPath1.getToken(2, '/'); + OUString sSlideLayoutName2 = sRelativeLayoutPath2.getToken(2, '/'); + + CPPUNIT_ASSERT_EQUAL(true, + bool(xNameAccess->hasByName("ppt/slideLayouts/" + sSlideLayoutName1))); + CPPUNIT_ASSERT_EQUAL(true, + bool(xNameAccess->hasByName("ppt/slideLayouts/" + sSlideLayoutName2))); +} + +CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest5, testTdf163483_export_math_fallback) +{ + createSdImpressDoc("odp/formula.fodp"); + + // Before export-and-reload, there is a formula on page. + { + auto xProps = getShapeFromPage(0, 0); + auto xInfo = xProps->getPropertyValue(u"Model"_ustr).queryThrow(); + CPPUNIT_ASSERT(xInfo->supportsService(u"com.sun.star.formula.FormulaProperties"_ustr)); + + // tdf#164101: check that the size is imported correctly + css::awt::Size formulaSize = xProps.queryThrow()->getSize(); + CPPUNIT_ASSERT_EQUAL(sal_Int32(1553), formulaSize.Width); + CPPUNIT_ASSERT_EQUAL(sal_Int32(528), formulaSize.Height); + + CPPUNIT_ASSERT_THROW(getShapeFromPage(0, 1), + css::lang::IndexOutOfBoundsException); // Only one shape on page + } + + saveAndReload(TestFilter::PPTX); + + // After save-and-reload, there must still be a single shape; now it's a fallback image. + // When we start to import formulas from PPTX, that will be formula. + { + // Without the fix, this threw IndexOutOfBoundsException, because there was no fallback, + // and no shape got imported. + auto xInfo = getShapeFromPage(0, 0).queryThrow(); + CPPUNIT_ASSERT(xInfo->supportsService(u"com.sun.star.drawing.CustomShape"_ustr)); + + css::awt::Size formulaSize = xInfo.queryThrow()->getSize(); + // The fallback image size after the roundtrip may be a bit different - allow some tolerance + CPPUNIT_ASSERT_DOUBLES_EQUAL(sal_Int32(1553), formulaSize.Width, 1); + CPPUNIT_ASSERT_DOUBLES_EQUAL(sal_Int32(528), formulaSize.Height, 1); + + CPPUNIT_ASSERT_THROW(getShapeFromPage(0, 1), + css::lang::IndexOutOfBoundsException); // Only one shape on page + } + + xmlDocUniquePtr pXmlDoc = parseExport(u"ppt/slides/slide1.xml"_ustr); + + const OUString cNvPr_id = getXPath( + pXmlDoc, "/p:sld/p:cSld/p:spTree/mc:AlternateContent/mc:Choice/p:sp/p:nvSpPr/p:cNvPr", + "id"); + + // Check that the alternate content is exported + assertXPath( + pXmlDoc, + "/p:sld/p:cSld/p:spTree/mc:AlternateContent/mc:Fallback/p:sp/p:spPr/a:blipFill/a:blip", + "embed", u"rId1"); + + // Its cNvPr_id must be the same + assertXPath(pXmlDoc, + "/p:sld/p:cSld/p:spTree/mc:AlternateContent/mc:Fallback/p:sp/p:nvSpPr/p:cNvPr", + "id", cNvPr_id); +} + +CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest5, testTdf169979_missing_ppic) +{ + createSdImpressDoc("odp/tdf169979.odp"); + + save(TestFilter::PPTX); + + xmlDocUniquePtr pXml2 = parseExport(u"ppt/slides/slide2.xml"_ustr); + + // Without the fix in place, this test would have failed with + // - Expected: 1 + // - Actual : 0 + // - In <>, XPath '/p:sld/p:cSld/p:spTree/p:graphicFrame/a:graphic/a:graphicData/p:oleObj/p:pic/p:nvPicPr/p:cNvPr' number of nodes is incorrect + assertXPath(pXml2, + "/p:sld/p:cSld/p:spTree/p:graphicFrame/a:graphic/" + "a:graphicData/p:oleObj/p:pic/p:nvPicPr/p:cNvPr", + "name", u""); + + assertXPath(pXml2, + "/p:sld/p:cSld/p:spTree/p:graphicFrame/a:graphic/" + "a:graphicData/p:oleObj/p:pic/p:nvPicPr/p:cNvPr", + "descr", u""); +} + +CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest5, testEmptyChildTnLstElement) +{ + createSdImpressDoc("odp/emptyChildTnLstElement.odp"); + + // Without the fix in place, this test would have failed with + // - Expected: 0 + // - Actual : 4 + // - validation error in OOXML export: Errors: 4 + saveAndReload(TestFilter::PPTX); + + xmlDocUniquePtr pXmlDoc = parseExport(u"ppt/slides/slide1.xml"_ustr); + + // tdf#170202: Without the fix in place, this test would have failed with + // - Expected: 0 + // - Actual : 1 + CPPUNIT_ASSERT_EQUAL(0, countXPathNodes(pXmlDoc, "//p:sld/p:timing")); +} + +CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest5, testTdf169941_internal_link_to_shapes) +{ + createSdImpressDoc("odp/tdf169941.odp"); + + save(TestFilter::PPTX); + + xmlDocUniquePtr pRelsDoc2 = parseExport(u"ppt/slides/_rels/slide2.xml.rels"_ustr); + + // Without the fix in place, this test would have failed with + // - Expected: slide1.xml + // - Actual : + assertXPath(pRelsDoc2, "/rels:Relationships/rels:Relationship[@Id='rId1']", "Target", + u"slide1.xml"); + + xmlDocUniquePtr pRelsDoc3 = parseExport(u"ppt/slides/_rels/slide3.xml.rels"_ustr); + assertXPath(pRelsDoc3, "/rels:Relationships/rels:Relationship[@Id='rId1']", "Target", + u"slide1.xml"); +} + +CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest5, testEmptyAttrNameElement) +{ + createSdImpressDoc("odp/emptyChildTnLstElement.odp"); + + // Without the fix in place, this test would have failed with + // - Expected: 0 + // - Actual : 2 + // - validation error in OOXML export: Errors: 2 + saveAndReload(TestFilter::PPTX); +} + +CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest5, testPlaceHolderFitHeightToText) +{ + createSdImpressDoc("pptx/tdf160487.pptx"); + saveAndReload(TestFilter::PPTX); + uno::Reference xShape(getShapeFromPage(1, 0)); + bool bTextAutoGrowHeight = false; + xShape->getPropertyValue(u"TextAutoGrowHeight"_ustr) >>= bTextAutoGrowHeight; + CPPUNIT_ASSERT_MESSAGE("PlaceHolder Fit height to text should be true.", bTextAutoGrowHeight); +} + +CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest5, testDeduplicateMasters) +{ + createSdImpressDoc("pptx/onemaster-twolayouts.pptx"); + saveAndReload(TestFilter::PPTX); + + // Check that the document still has one master and two layouts + xmlDocUniquePtr pXmlDocContent = parseExport("ppt/presentation.xml"); + assertXPath(pXmlDocContent, "/p:presentation/p:sldMasterIdLst/p:sldMasterId"_ostr, 1); + pXmlDocContent = parseExport("ppt/slideMasters/slideMaster1.xml"); + assertXPath(pXmlDocContent, "/p:sldMaster/p:sldLayoutIdLst/p:sldLayoutId"_ostr, 2); + + // Check that both background colors have been preserved + uno::Reference xDoc(mxComponent, uno::UNO_QUERY); + CPPUNIT_ASSERT(xDoc.is()); + CPPUNIT_ASSERT_EQUAL(sal_Int32(2), xDoc->getMasterPages()->getCount()); + + uno::Reference xPage(xDoc->getMasterPages()->getByIndex(0), + uno::UNO_QUERY_THROW); + uno::Reference xPropSet(xPage, uno::UNO_QUERY); + uno::Any aAny = xPropSet->getPropertyValue("Background"); + CPPUNIT_ASSERT(aAny.hasValue()); + uno::Reference aXBackgroundPropSet; + aAny >>= aXBackgroundPropSet; + Color nColor; + CPPUNIT_ASSERT(aXBackgroundPropSet->getPropertyValue("FillColor") >>= nColor); + CPPUNIT_ASSERT_EQUAL(Color(0x0E2841), nColor); + + uno::Reference xPage1(xDoc->getMasterPages()->getByIndex(1), + uno::UNO_QUERY_THROW); + uno::Reference xPropSet1(xPage1, uno::UNO_QUERY); + aAny = xPropSet1->getPropertyValue("Background"); + CPPUNIT_ASSERT(aAny.hasValue()); + aAny >>= aXBackgroundPropSet; + CPPUNIT_ASSERT(aXBackgroundPropSet->getPropertyValue("FillColor") >>= nColor); + CPPUNIT_ASSERT_EQUAL(Color(0x000000), nColor); +} + +CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest5, testInvalidAttributeValuesInSrcRect) +{ + createSdImpressDoc("odp/invalidAttributeValuesInSrcRect.odp"); + + // Without the fix in place, this test would have failed with + // - Expected: 0 + // - Actual : 24 + // - validation error in OOXML export: Errors: 24 + saveAndReload(TestFilter::PPTX); +} + +CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest5, testInvalidBuAutoNumEnumValue) +{ + createSdImpressDoc("odp/invalidBuAutoNumEnumValue.odp"); + + // Without the fix in place, this test would have failed with + // - Expected: 0 + // - Actual : 4 + // - validation error in OOXML export: Errors: 4 + saveAndReload(TestFilter::PPTX); +} + +CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest5, testInvalidCxAndCyAttribute) +{ + createSdImpressDoc("odp/invalidCxAndCyAttribute.odp"); + + // Without the fix in place, this test would have failed with + // - Expected: 0 + // - Actual : 4 + // - validation error in OOXML export: Errors: 4 + saveAndReload(TestFilter::PPTX); +} + +CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest5, testBadPercentageValue) +{ + createSdImpressDoc("odp/badPercentageValue.odp"); + + // Without the fix in place, this test would have failed with + // - Expected: 0 + // - Actual : 4 + // - validation error in OOXML export: Errors: 4 + saveAndReload(TestFilter::PPTX); +} + +CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest5, testInvalidAudio) +{ + createSdImpressDoc("odp/invalidAudio.odp"); + + // Without the fix in place, this test would have failed with + // - Expected: 0 + // - Actual : 1 + // - validation error in OOXML export: Errors: 1 + saveAndReload(TestFilter::PPTX); +} + +CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest5, testInvalidPrstDashEnumValue) +{ + createSdImpressDoc("odp/invalidPrstDashEnumValue.odp"); + + // Without the fix in place, this test would have failed with + // - Expected: 0 + // - Actual : 113 + // - validation error in OOXML export: Errors: 113 + saveAndReload(TestFilter::PPTX); +} + +CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest5, testInvalidXmlBy) +{ + createSdImpressDoc("odp/invalidXmlBy.odp"); + + // Without the fix in place, this test would have failed with + // - Expected: 0 + // - Actual : 15 + // - validation error in OOXML export: Errors: 15 + saveAndReload(TestFilter::PPTX); +} + +CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest5, testConvertWithMasterDeduplication) +{ + createSdImpressDoc("odp/dupmastermultlayouts.odp"); + saveAndReload(TestFilter::PPTX); + + uno::Reference xNameAccess + = packages::zip::ZipFileAccess::createWithURL(comphelper::getComponentContext(m_xSFactory), + maTempFile.GetURL()); + + // For each slide check that its layout exists + for (int i = 1; i <= 4; ++i) + { + xmlDocUniquePtr pXmlDocRels + = parseExport("ppt/slides/_rels/slide" + OUString::number(i) + ".xml.rels"); + + assertXPath( + pXmlDocRels, + "(/rels:Relationships/rels:Relationship[@Type='http://schemas.openxmlformats.org/officeDocument/2006/relationships/slideLayout'])"_ostr); + // the relative target e.g. "../slideLayouts/slideLayout2.xml" + OUString sRelativeLayoutPath = getXPathContent( + pXmlDocRels, + "(/rels:Relationships/rels:Relationship[@Type='http://schemas.openxmlformats.org/officeDocument/2006/relationships/slideLayout'])/@Target"_ostr); + + // Check that the referenced slideLayout files exist + // Without the accompanying fix in place, this test would have failed with: + // equality assertion failed + // - Expected: 1 + // - Actual : 0 + // i.e. the referenced slideLayout file was missing on export. + OUString sSlideLayoutName = sRelativeLayoutPath.getToken(2, '/'); + CPPUNIT_ASSERT_EQUAL(true, + bool(xNameAccess->hasByName("ppt/slideLayouts/" + sSlideLayoutName))); + } +} + +CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest5, testTdf162571HorzAnchor) +{ + createSdImpressDoc("pptx/tdf165261.pptx"); + saveAndReload(TestFilter::PPTX); + + uno::Reference xShape(getShapeFromPage(1, 0), uno::UNO_QUERY); + uno::Reference xProp(xShape, uno::UNO_QUERY); + + drawing::TextHorizontalAdjust eHori; + CPPUNIT_ASSERT(xProp->getPropertyValue(u"TextHorizontalAdjust"_ustr) >>= eHori); + CPPUNIT_ASSERT_EQUAL(drawing::TextHorizontalAdjust::TextHorizontalAdjust_LEFT, eHori); +} + +CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest5, testTdf165261HorzAnchor) +{ + createSdImpressDoc("pptx/tdf165261.pptx"); + saveAndReload(TestFilter::PPTX); + + uno::Reference xGroupShape(getShapeFromPage(0, 0), uno::UNO_QUERY); + uno::Reference xShape(xGroupShape->getByIndex(0), uno::UNO_QUERY); + + uno::Reference xProp(xShape, uno::UNO_QUERY); + drawing::TextHorizontalAdjust eHori; + CPPUNIT_ASSERT(xProp->getPropertyValue(u"TextHorizontalAdjust"_ustr) >>= eHori); + CPPUNIT_ASSERT_EQUAL(drawing::TextHorizontalAdjust::TextHorizontalAdjust_CENTER, eHori); +} + +CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest5, testCustomPromptTexts) +{ + createSdImpressDoc("pptx/tdf163239.pptx"); + saveAndReload(TestFilter::PPTX); + + const SdrPage* pPage1 = GetPage(1); + { + // subtitle placeholder text + SdrTextObj* pTxtObj = DynCastSdrTextObj(pPage1->GetObj(0)); + CPPUNIT_ASSERT_MESSAGE("no text object", pTxtObj != nullptr); + CPPUNIT_ASSERT_EQUAL_MESSAGE("Wrong object type!", SdrObjKind::Text, + pTxtObj->GetObjIdentifier()); + const EditTextObject& aEdit = pTxtObj->GetOutlinerParaObject()->GetTextObject(); + OUString aText = aEdit.GetText(0); + CPPUNIT_ASSERT_EQUAL_MESSAGE("Wrong placeholder text!", + u"Click to edit customized Master Subtitle style"_ustr, aText); + + auto xShapeProps(getShapeFromPage(0, 0)); + CPPUNIT_ASSERT(xShapeProps->getPropertyValue(u"CustomPromptText"_ustr) >>= aText); + CPPUNIT_ASSERT_EQUAL_MESSAGE("Wrong placeholder text was set!", + u"Click to edit customized Master Subtitle style"_ustr, aText); + } + + { + SdrTextObj* pTxtObj = DynCastSdrTextObj(pPage1->GetObj(1)); + CPPUNIT_ASSERT_MESSAGE("no text object", pTxtObj != nullptr); + CPPUNIT_ASSERT_EQUAL_MESSAGE("Wrong object type!", SdrObjKind::TitleText, + pTxtObj->GetObjIdentifier()); + const EditTextObject& aEdit = pTxtObj->GetOutlinerParaObject()->GetTextObject(); + OUString aText = aEdit.GetText(0); + CPPUNIT_ASSERT_EQUAL_MESSAGE("Wrong placeholder text!", u"Custom Title 1"_ustr, aText); + + auto xShapeProps(getShapeFromPage(1, 0)); + CPPUNIT_ASSERT(xShapeProps->getPropertyValue(u"CustomPromptText"_ustr) >>= aText); + CPPUNIT_ASSERT_EQUAL_MESSAGE("Wrong placeholder text was set!", u"Custom Title 1"_ustr, + aText); + } + + const SdrPage* pPage2 = GetPage(3); + { + // body placeholder text + SdrTextObj* pTxtObj = DynCastSdrTextObj(pPage2->GetObj(0)); + CPPUNIT_ASSERT_MESSAGE("no text object", pTxtObj != nullptr); + CPPUNIT_ASSERT_EQUAL_MESSAGE("Wrong object type!", SdrObjKind::OutlineText, + pTxtObj->GetObjIdentifier()); + const EditTextObject& aEdit = pTxtObj->GetOutlinerParaObject()->GetTextObject(); + OUString aText = aEdit.GetText(0); + CPPUNIT_ASSERT_EQUAL_MESSAGE("Wrong placeholder text!", u"Text placeholder"_ustr, aText); + + auto xShapeProps(getShapeFromPage(0, 1)); + CPPUNIT_ASSERT(xShapeProps->getPropertyValue(u"CustomPromptText"_ustr) >>= aText); + CPPUNIT_ASSERT_EQUAL_MESSAGE("Wrong placeholder text was set!", u"Text placeholder"_ustr, + aText); + } +} + +CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest5, testPresObjTextStyles) +{ + createSdImpressDoc("pptx/tdf163239_v2.pptx"); + saveAndReload(TestFilter::PPTX); + + uno::Reference xStyleFamiliesSupplier(mxComponent, + uno::UNO_QUERY); + uno::Reference xStyleFamilies + = xStyleFamiliesSupplier->getStyleFamilies(); + // 1st slide + uno::Reference xStyleFamily( + xStyleFamilies->getByName(u"Title Slide"_ustr), uno::UNO_QUERY); + { + // Title style + uno::Reference xStyle(xStyleFamily->getByName(u"title"_ustr), + uno::UNO_QUERY); + uno::Reference xPropSet(xStyle, uno::UNO_QUERY); + CPPUNIT_ASSERT_EQUAL(60.0f, xPropSet->getPropertyValue(u"CharHeight"_ustr).get()); + CPPUNIT_ASSERT_EQUAL(sal_Int16(style::ParagraphAdjust_CENTER), + xPropSet->getPropertyValue(u"ParaAdjust"_ustr).get()); + CPPUNIT_ASSERT_EQUAL(u"Marianne"_ustr, + xPropSet->getPropertyValue(u"CharFontName"_ustr).get()); + } + // 2nd slide + xStyleFamily.set(xStyleFamilies->getByName(u"Title and Content"_ustr), uno::UNO_QUERY); + { + // Title style + uno::Reference xStyle(xStyleFamily->getByName(u"title"_ustr), + uno::UNO_QUERY); + uno::Reference xPropSet(xStyle, uno::UNO_QUERY); + CPPUNIT_ASSERT_EQUAL(44.0f, xPropSet->getPropertyValue(u"CharHeight"_ustr).get()); + CPPUNIT_ASSERT_EQUAL(sal_Int16(style::ParagraphAdjust_LEFT), + xPropSet->getPropertyValue(u"ParaAdjust"_ustr).get()); + CPPUNIT_ASSERT_EQUAL(u"Marianne"_ustr, + xPropSet->getPropertyValue(u"CharFontName"_ustr).get()); + + // outline1 style + xStyle.set(xStyleFamily->getByName(u"outline1"_ustr), uno::UNO_QUERY); + xPropSet.set(xStyle, uno::UNO_QUERY); + CPPUNIT_ASSERT_EQUAL(28.0f, xPropSet->getPropertyValue(u"CharHeight"_ustr).get()); + CPPUNIT_ASSERT_EQUAL(sal_Int16(style::ParagraphAdjust_LEFT), + xPropSet->getPropertyValue(u"ParaAdjust"_ustr).get()); + CPPUNIT_ASSERT_EQUAL(u"Marianne"_ustr, + xPropSet->getPropertyValue(u"CharFontName"_ustr).get()); + + // outline2 style + xStyle.set(xStyleFamily->getByName(u"outline2"_ustr), uno::UNO_QUERY); + xPropSet.set(xStyle, uno::UNO_QUERY); + CPPUNIT_ASSERT_EQUAL(24.0f, xPropSet->getPropertyValue(u"CharHeight"_ustr).get()); + CPPUNIT_ASSERT_EQUAL(sal_Int16(style::ParagraphAdjust_LEFT), + xPropSet->getPropertyValue(u"ParaAdjust"_ustr).get()); + CPPUNIT_ASSERT_EQUAL(u"Marianne"_ustr, + xPropSet->getPropertyValue(u"CharFontName"_ustr).get()); + + // outline5 style + xStyle.set(xStyleFamily->getByName(u"outline5"_ustr), uno::UNO_QUERY); + xPropSet.set(xStyle, uno::UNO_QUERY); + CPPUNIT_ASSERT_EQUAL(18.0f, xPropSet->getPropertyValue(u"CharHeight"_ustr).get()); + CPPUNIT_ASSERT_EQUAL(sal_Int16(style::ParagraphAdjust_LEFT), + xPropSet->getPropertyValue(u"ParaAdjust"_ustr).get()); + CPPUNIT_ASSERT_EQUAL(u"Marianne"_ustr, + xPropSet->getPropertyValue(u"CharFontName"_ustr).get()); + } +} + +CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest5, testTextStylesXML) +{ + createSdImpressDoc("pptx/tdf163239_v2.pptx"); + save(TestFilter::PPTX); + + xmlDocUniquePtr pXmlDocRels = parseExport(u"ppt/slideLayouts/slideLayout1.xml"_ustr); + + assertXPath(pXmlDocRels, "/p:sldLayout/p:cSld/p:spTree/p:sp[1]/p:txBody/a:lstStyle/a:lvl1pPr", + "algn", u"ctr"); + assertXPath(pXmlDocRels, + "/p:sldLayout/p:cSld/p:spTree/p:sp[1]/p:txBody/a:lstStyle/a:lvl1pPr/a:defRPr", "sz", + u"6000"); +} + +CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest5, testTextAlignLeft) +{ + createSdImpressDoc("pptx/presLeftAlign.pptx"); + save(TestFilter::PPTX); + + xmlDocUniquePtr pXmlDocRels = parseExport(u"ppt/slides/slide1.xml"_ustr); + + assertXPath(pXmlDocRels, "/p:sld/p:cSld/p:spTree/p:sp[2]/p:txBody/a:p/a:pPr", "algn", u"l"); +} + +CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest5, testSubtitleNoBullets) +{ + createSdImpressDoc("odp/tdf170166.odp"); + saveAndReload(TestFilter::PPTX); + + const SdrPage* pPage1 = GetPage(1); + { + // subtitle placeholder object + SdrTextObj* pTxtObj = DynCastSdrTextObj(pPage1->GetObj(0)); + CPPUNIT_ASSERT_MESSAGE("no text object", pTxtObj != nullptr); + CPPUNIT_ASSERT_EQUAL_MESSAGE("Wrong object type!", SdrObjKind::Text, + pTxtObj->GetObjIdentifier()); + const EditTextObject& aEdit = pTxtObj->GetOutlinerParaObject()->GetTextObject(); + const SvxNumBulletItem* pNumFmt = aEdit.GetParaAttribs(0).GetItem(EE_PARA_NUMBULLET); + // Without a fix, it will fail with numbering type: SVX_NUM_CHAR_SPECIAL + CPPUNIT_ASSERT(pNumFmt); + CPPUNIT_ASSERT_EQUAL_MESSAGE("Bullet's numbering type is wrong!", SVX_NUM_NUMBER_NONE, + pNumFmt->GetNumRule().GetLevel(0).GetNumberingType()); + } +} + +CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest5, testOLEObjectAnimationTarget) +{ + createSdImpressDoc("pptx/tdf169088.pptx"); + save(TestFilter::PPTX); + + xmlDocUniquePtr pXmlDoc = parseExport(u"ppt/slides/slide1.xml"_ustr); + + const OUString sOleId = getXPath( + pXmlDoc, "/p:sld/p:cSld/p:spTree/p:graphicFrame/p:nvGraphicFramePr/p:cNvPr", "id"); + const OUString sPicId = getXPath(pXmlDoc, + "/p:sld/p:cSld/p:spTree/p:graphicFrame/a:graphic/" + "a:graphicData/p:oleObj/p:pic/p:nvPicPr/p:cNvPr", + "id"); + + // Check OLE id is different from pic id + CPPUNIT_ASSERT_MESSAGE("OLE id is same as pic id", sOleId != sPicId); + + // Check animation target spid matches OLE object id + assertXPath(pXmlDoc, + "/p:sld/p:timing/p:tnLst/p:par/p:cTn/p:childTnLst/p:seq/p:cTn/p:childTnLst/p:par/" + "p:cTn/p:childTnLst/p:par/p:cTn/p:childTnLst/p:par/p:cTn/p:childTnLst/p:set/" + "p:cBhvr/p:tgtEl/p:spTgt", + "spid", sOleId); + + assertXPath(pXmlDoc, + "/p:sld/p:timing/p:tnLst/p:par/p:cTn/p:childTnLst/p:seq/p:cTn/p:childTnLst/p:par/" + "p:cTn/p:childTnLst/p:par/p:cTn/p:childTnLst/p:par/p:cTn/p:childTnLst/p:animEffect/" + "p:cBhvr/p:tgtEl/p:spTgt", + "spid", sOleId); +} + +CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest5, testtdf169496_hidden_graphic) +{ + createSdImpressDoc("pptx/tdf169496_hidden_graphic.pptx"); + save(TestFilter::PPTX); + + xmlDocUniquePtr pXmlDoc = parseExport(u"ppt/slides/slide1.xml"_ustr); + + // Graphic 5 is hidden and Graphic 4 is visible, but their order might change in the XML + // Without the fix the hidden attribute wasn't exported + OUString sName1 + = getXPath(pXmlDoc, "/p:sld/p:cSld/p:spTree/p:pic[1]/p:nvPicPr/p:cNvPr", "name"); + OUString sName2 + = getXPath(pXmlDoc, "/p:sld/p:cSld/p:spTree/p:pic[2]/p:nvPicPr/p:cNvPr", "name"); + if (sName1 == "Graphic 5" && sName2 == "Graphic 4") + { + OUString aHidden + = getXPath(pXmlDoc, "/p:sld/p:cSld/p:spTree/p:pic[1]/p:nvPicPr/p:cNvPr", "hidden"); + bool bHidden = aHidden == u"true"_ustr || aHidden == u"1"; + CPPUNIT_ASSERT_EQUAL_MESSAGE("Graphic 3 is supposed to be hidden", true, bHidden); + + assertXPathNoAttribute(pXmlDoc, "/p:sld/p:cSld/p:spTree/p:pic[2]/p:nvPicPr/p:cNvPr", + "hidden"); + } + else if (sName1 == "Graphic 4" && sName2 == "Graphic 5") + { + assertXPathNoAttribute(pXmlDoc, "/p:sld/p:cSld/p:spTree/p:pic[1]/p:nvPicPr/p:cNvPr", + "hidden"); + + OUString aHidden + = getXPath(pXmlDoc, "/p:sld/p:cSld/p:spTree/p:pic[2]/p:nvPicPr/p:cNvPr", "hidden"); + bool bHidden = aHidden == u"true"_ustr || aHidden == u"1"; + CPPUNIT_ASSERT_EQUAL_MESSAGE("Graphic 4 is supposed to be hidden", true, bHidden); + } + else + CPPUNIT_FAIL("Names of graphics is incorrect"); +} + +CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest5, testHiddenGroupShape) +{ + createSdImpressDoc("pptx/hidden_group_shape.pptx"); + save(TestFilter::PPTX); + + xmlDocUniquePtr pXmlDoc = parseExport(u"ppt/slides/slide1.xml"_ustr); + assertXPath(pXmlDoc, "/p:sld/p:cSld/p:spTree/p:grpSp/p:nvGrpSpPr/p:cNvPr", "hidden", u"1"); +} + +CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest5, testtdf169825_vertical_layouts) +{ + createSdImpressDoc("pptx/tdf169825_vertical_layouts.pptx"); + save(TestFilter::PPTX); + + xmlDocUniquePtr pXmlDocRels = parseExport(u"ppt/slides/_rels/slide1.xml.rels"_ustr); + CPPUNIT_ASSERT(pXmlDocRels); + // find layout XML for the slide from the relationship file + OUString sLayoutRelRelative + = getXPath(pXmlDocRels, "/rels:Relationships/rels:Relationship", "Target"); + OUString sLayoutRelAbs = sLayoutRelRelative.replaceFirst("..", "ppt"); + xmlDocUniquePtr pXmlDocLayout = parseExport(sLayoutRelAbs); + CPPUNIT_ASSERT(pXmlDocLayout); + + // without the SlidePersist::getLayoutFromValueToken() part of the patch, + // this and the next layout types would both be exported as blank + assertXPath(pXmlDocLayout, "/p:sldLayout", "type", u"vertTitleAndTx"); + + pXmlDocRels = parseExport(u"ppt/slides/_rels/slide2.xml.rels"_ustr); + CPPUNIT_ASSERT(pXmlDocRels); + sLayoutRelRelative = getXPath(pXmlDocRels, "/rels:Relationships/rels:Relationship", "Target"); + sLayoutRelAbs = sLayoutRelRelative.replaceFirst("..", "ppt"); + pXmlDocLayout = parseExport(sLayoutRelAbs); + CPPUNIT_ASSERT(pXmlDocLayout); + + assertXPath(pXmlDocLayout, "/p:sldLayout", "type", u"vertTx"); +} + +CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest5, testtdf169825_vertical_layouts_from_scratch) +{ + createSdImpressDoc(); + + uno::Reference xDoc(mxComponent, uno::UNO_QUERY_THROW); + uno::Reference xPages = xDoc->getDrawPages(); + uno::Reference xPage(xPages->getByIndex(0), uno::UNO_QUERY); + uno::Reference xPageSet(xPage, uno::UNO_QUERY_THROW); + xPageSet->setPropertyValue( + "Layout", + uno::Any(static_cast(AutoLayout::AUTOLAYOUT_VTITLE_VCONTENT_OVER_VCONTENT))); + + uno::Reference xPage2(xPages->insertNewByIndex(1), uno::UNO_SET_THROW); + uno::Reference xPageSet2(xPage2, uno::UNO_QUERY_THROW); + xPageSet2->setPropertyValue( + "Layout", uno::Any(static_cast(AutoLayout::AUTOLAYOUT_VTITLE_VCONTENT))); + save(TestFilter::PPTX); + + xmlDocUniquePtr pXmlDocRels = parseExport(u"ppt/slides/_rels/slide1.xml.rels"_ustr); + CPPUNIT_ASSERT(pXmlDocRels); + // find layout XML for the slide from the relationship file + OUString sLayoutRelRelative + = getXPath(pXmlDocRels, "/rels:Relationships/rels:Relationship", "Target"); + OUString sLayoutRelAbs = sLayoutRelRelative.replaceFirst("..", "ppt"); + xmlDocUniquePtr pXmlDocLayout = parseExport(sLayoutRelAbs); + CPPUNIT_ASSERT(pXmlDocLayout); + + // without the fix in place this would be exported as "objTx" + assertXPath(pXmlDocLayout, "/p:sldLayout", "type", u"vertTitleAndTxOverChart"); + + pXmlDocRels = parseExport(u"ppt/slides/_rels/slide2.xml.rels"_ustr); + CPPUNIT_ASSERT(pXmlDocRels); + sLayoutRelRelative = getXPath(pXmlDocRels, "/rels:Relationships/rels:Relationship", "Target"); + sLayoutRelAbs = sLayoutRelRelative.replaceFirst("..", "ppt"); + pXmlDocLayout = parseExport(sLayoutRelAbs); + CPPUNIT_ASSERT(pXmlDocLayout); + + // without the fix in place this would be exported as "picTx" + assertXPath(pXmlDocLayout, "/p:sldLayout", "type", u"vertTitleAndTx"); +} + +CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest5, testtdf169825_layout_type) +{ + createSdImpressDoc("odp/tdf169825_layout_type.odp"); + save(TestFilter::PPTX); + + xmlDocUniquePtr pXmlDocRels = parseExport(u"ppt/slides/_rels/slide1.xml.rels"_ustr); + CPPUNIT_ASSERT(pXmlDocRels); + // find layout XML for the slide from the relationship file + OUString sLayoutRelRelative + = getXPath(pXmlDocRels, "/rels:Relationships/rels:Relationship", "Target"); + OUString sLayoutRelAbs = sLayoutRelRelative.replaceFirst("..", "ppt"); + xmlDocUniquePtr pXmlDocLayout = parseExport(sLayoutRelAbs); + CPPUNIT_ASSERT(pXmlDocLayout); + + // without the fix in place this would be exported as "vertTitleAndTxOverChart" + // while in the original ODP this was - still possibly bogus - notes layout + assertXPath(pXmlDocLayout, "/p:sldLayout", "type", u"blank"); +} + +CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest5, testtdf170102_layout_type) +{ + createSdImpressDoc("odp/tdf170102_layout_type.odp"); + saveAndReload(TestFilter::PPTX); + + uno::Reference xDoc(mxComponent, uno::UNO_QUERY); + CPPUNIT_ASSERT(xDoc.is()); + sal_Int32 nMPCount = xDoc->getMasterPages()->getCount(); + // test roughly the same thing in document and in XML: no drawing object in master page/layout + for (sal_Int32 i = 0; i < nMPCount; i++) + { + uno::Reference xPage(xDoc->getMasterPages()->getByIndex(i), + uno::UNO_QUERY_THROW); + sal_Int32 nObjCount = xPage->getCount(); + for (sal_Int32 j = 0; j < nObjCount; j++) + { + uno::Reference xShapeInfo(xPage->getByIndex(j), + uno::UNO_QUERY_THROW); + // without the fix in place there would be a graphic shape placeholder + CPPUNIT_ASSERT_MESSAGE( + "Unexpected graphic object shape in exported master page", + !xShapeInfo->supportsService(u"com.sun.star.drawing.GraphicObjectShape"_ustr)); + } + + xmlDocUniquePtr pXmlDocLayout = parseExport(u"ppt/slideLayouts/slideLayout"_ustr + + OUString::number(i + 1) + u".xml"_ustr); + CPPUNIT_ASSERT(pXmlDocLayout); + // without the fix in place there would be a pic layout element for the placeholder + CPPUNIT_ASSERT_EQUAL_MESSAGE( + "Unexpected \"pic\" element in exported PPTX slide layout", 0, + countXPathNodes(pXmlDocLayout, "/p:sldLayout/p:cSld/p:spTree/p:pic")); + } +} + +CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest5, testFooterIdxConsistency) +{ + createSdImpressDoc("pptx/multiplelayoutfooter.pptx"); + save(TestFilter::PPTX); + + // slide1 points to slideLayout2 + xmlDocUniquePtr pRelsDoc = parseExport(u"ppt/slides/_rels/slide1.xml.rels"_ustr); + assertXPath(pRelsDoc, + "/rels:Relationships/rels:Relationship[@Type='http://" + "schemas.openxmlformats.org/officeDocument/2006/" + "relationships/slideLayout']", + "Target", u"../slideLayouts/slideLayout2.xml"); + + // And they agree on the idx of the footer: + xmlDocUniquePtr pSlide = parseExport(u"ppt/slides/slide1.xml"_ustr); + OUString aFtrIdx = getXPath(pSlide, "//p:sp/p:nvSpPr/p:nvPr/p:ph", "idx"); + xmlDocUniquePtr pLayout = parseExport(u"ppt/slideLayouts/slideLayout2.xml"_ustr); + assertXPath(pLayout, "//p:sp/p:nvSpPr/p:nvPr/p:ph", "idx", aFtrIdx); + // Without the fix it fails with: + // - Expected: 1 + // - Actual : 2 + // - In <>, attribute 'idx' of '//p:sp/p:nvSpPr/p:nvPr/p:ph' incorrect value. +} + +CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest5, testOmitCanvasSlideExport) +{ + createSdImpressDoc("odp/canvas-slide.odp"); + + SdXImpressDocument* pXImpressDocument = dynamic_cast(mxComponent.get()); + CPPUNIT_ASSERT(pXImpressDocument); + SdDrawDocument* pDoc = pXImpressDocument->GetDoc(); + CPPUNIT_ASSERT_MESSAGE("no document", pDoc != nullptr); + + // the document has 2 pages - one canvas page, and one normal page + CPPUNIT_ASSERT_EQUAL(sal_uInt16(2), pDoc->GetSdPageCount(PageKind::Standard)); + CPPUNIT_ASSERT(pDoc->HasCanvasPage()); + + save(TestFilter::PPTX); + + // Verify that the canvas slide was omitted from the export + // It should have one master slide, and one slide + xmlDocUniquePtr pXmlDocContent = parseExport(u"ppt/presentation.xml"_ustr); + assertXPath(pXmlDocContent, "/p:presentation/p:sldMasterIdLst/p:sldMasterId", 1); + assertXPath(pXmlDocContent, "/p:presentation/p:sldIdLst/p:sldId", 1); +} + +CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest5, testParaAlignStartEnd) +{ + createSdImpressDoc("odp/para-align-start-end.fodp"); + save(TestFilter::PPTX); + + xmlDocUniquePtr pDoc = parseExport(u"ppt/slides/slide1.xml"_ustr); + + // PresentationML doesn't support start and end paragraph alignment. + // Paragraphs should be exported as left/right alignment, depending on para direction. + assertXPath(pDoc, "/p:sld/p:cSld/p:spTree/p:sp[2]/p:txBody/a:p[1]/a:pPr[@algn='l']", 1); + assertXPath(pDoc, "/p:sld/p:cSld/p:spTree/p:sp[2]/p:txBody/a:p[2]/a:pPr[@algn='r']", 1); + assertXPath(pDoc, "/p:sld/p:cSld/p:spTree/p:sp[2]/p:txBody/a:p[3]/a:pPr[@algn='r']", 1); + assertXPath(pDoc, "/p:sld/p:cSld/p:spTree/p:sp[2]/p:txBody/a:p[4]/a:pPr[@algn='l']", 1); +} + +CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest5, testTdf169559) +{ + createSdImpressDoc("pptx/tdf169524.pptx"); + save(TestFilter::PPTX); + + xmlDocUniquePtr pXmlDoc = parseExport(u"ppt/slideMasters/slideMaster1.xml"_ustr); + assertXPath( + pXmlDoc, + "/p:sldMaster/p:cSld/p:spTree/p:sp[2]/p:txBody/a:lstStyle/a:lvl1pPr/a:spcAft/a:spcPts", + "val", u"1701"); +} + +CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest5, testTdf114443_PPSX) +{ + createSdImpressDoc("ppsx/tdf114443-6.ppsx"); + save(TestFilter::PPSX); + + xmlDocUniquePtr pXmlDoc = parseExport(u"[Content_Types].xml"_ustr); + + // Without the fix, this would have been: + // application/vnd.openxmlformats-officedocument.presentationml.presentation.main+xml + // which means the file loses its slideshow/autoplay nature and PowerPoint rejects it. + assertXPath(pXmlDoc, + "/ContentType:Types/ContentType:Override[@PartName='/ppt/presentation.xml']", + "ContentType", + u"application/vnd.openxmlformats-officedocument.presentationml.slideshow.main+xml"); +} + +CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest5, testConnectorShapeAnimationTarget) +{ + createSdImpressDoc("pptx/connector-shape-animations.pptx"); + save(TestFilter::PPTX); + + xmlDocUniquePtr pXmlDoc = parseExport(u"ppt/slides/slide1.xml"_ustr); + + const OUString sConnectorId = getXPath( + pXmlDoc, "/p:sld/p:cSld/p:spTree/p:cxnSp/p:nvCxnSpPr/p:cNvCxnSpPr/a:stCxn", "id"); + + const OUString sShapeId = getXPath( + pXmlDoc, "/p:sld/p:cSld/p:spTree/p:graphicFrame/p:nvGraphicFramePr/p:cNvPr", "id"); + + // Check connector and shape both have the same ID + CPPUNIT_ASSERT_EQUAL_MESSAGE("Connector and the shape doesn't have the same ID", sConnectorId, + sShapeId); + + // Check animation spid matches ShapeId + assertXPath(pXmlDoc, + "/p:sld/p:timing/p:tnLst/p:par/p:cTn/p:childTnLst/p:seq/p:cTn/p:childTnLst/p:par/" + "p:cTn/p:childTnLst/p:par/p:cTn/p:childTnLst/p:par[2]/p:cTn/p:childTnLst/p:set/" + "p:cBhvr/p:tgtEl/p:spTgt", + "spid", sShapeId); +} + +CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest5, testChartExExport) +{ + createSdImpressDoc("pptx/forum-mso-de-138303.pptx"); + save(TestFilter::PPTX); + + xmlDocUniquePtr pDoc = parseExport(u"ppt/slides/slide1.xml"_ustr); + CPPUNIT_ASSERT(pDoc); + + const OString sPath1 = "/p:sld/p:cSld/p:spTree/mc:AlternateContent/mc:Fallback"_ostr; + assertXPath(pDoc, sPath1 + "/xdr:sp"_ostr, 0); + assertXPath(pDoc, sPath1 + "/p:sp"_ostr, 1); + assertXPath(pDoc, sPath1 + "/p:sp/p:nvSpPr/p:nvPr"_ostr, 1); + + pDoc = parseExport(u"ppt/charts/chartEx1.xml"_ustr); + CPPUNIT_ASSERT(pDoc); + + assertXPath(pDoc, "/cx:chartSpace/c:date1904", 0); +} + +// 1. Open PPTX with sections, re-export to PPTX, verify sections preserved +CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest5, testSlideSectionsPPTXImport) +{ + createSdImpressDoc("pptx/slide-section-test.pptx"); + save(TestFilter::PPTX); + + xmlDocUniquePtr pXmlDoc = parseExport(u"ppt/presentation.xml"_ustr); + + static constexpr OString sPath = "/p:presentation/p:extLst/p:ext/p14:sectionLst"_ostr; + assertXPath(pXmlDoc, sPath + "/p14:section", 3); + assertXPath(pXmlDoc, sPath + "/p14:section[1]", "name", u"Section-1"); + assertXPath(pXmlDoc, sPath + "/p14:section[2]", "name", u"Section-2"); + assertXPath(pXmlDoc, sPath + "/p14:section[3]", "name", u"Section-3"); + assertXPath(pXmlDoc, sPath + "/p14:section[1]/p14:sldIdLst/p14:sldId", 4); + assertXPath(pXmlDoc, sPath + "/p14:section[2]/p14:sldIdLst/p14:sldId", 7); + assertXPath(pXmlDoc, sPath + "/p14:section[3]/p14:sldIdLst/p14:sldId", 2); + + // GUIDs preserved + for (sal_Int32 i = 1; i <= 3; ++i) + { + OUString sId = getXPath(pXmlDoc, sPath + "/p14:section[" + OString::number(i) + "]", "id"); + CPPUNIT_ASSERT(!sId.isEmpty()); + CPPUNIT_ASSERT(sId.startsWith("{")); + } + + // Slide IDs non-zero + OUString sSldId = getXPath(pXmlDoc, sPath + "/p14:section[1]/p14:sldIdLst/p14:sldId[1]", "id"); + CPPUNIT_ASSERT(sSldId.toInt32() > 0); +} + +// 2. Export PPTX with sections to ODP +CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest5, testSlideSectionsPPTXToODP) +{ + createSdImpressDoc("pptx/slide-section-test.pptx"); + skipValidation(); + save(TestFilter::ODP); + + xmlDocUniquePtr pXmlDoc = parseExport(u"content.xml"_ustr); + + static constexpr OString sPath + = "/office:document-content/office:body/office:presentation/loext:section-list"_ostr; + assertXPath(pXmlDoc, sPath + "/loext:section", 3); + assertXPath(pXmlDoc, sPath + "/loext:section[1]", "name", u"Section-1"); + assertXPath(pXmlDoc, sPath + "/loext:section[2]", "name", u"Section-2"); + assertXPath(pXmlDoc, sPath + "/loext:section[3]", "name", u"Section-3"); + assertXPath(pXmlDoc, sPath + "/loext:section[1]/loext:section-slide", 4); + assertXPath(pXmlDoc, sPath + "/loext:section[2]/loext:section-slide", 7); + assertXPath(pXmlDoc, sPath + "/loext:section[3]/loext:section-slide", 2); +} + +// 3. Open ODP with sections (PPTX -> ODP -> reload ODP) +CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest5, testSlideSectionsODPImport) +{ + createSdImpressDoc("pptx/slide-section-test.pptx"); + skipValidation(); + saveAndReload(TestFilter::ODP); + + // Verify the in-memory model loaded from ODP + auto* pXImpressDocument = dynamic_cast(mxComponent.get()); + CPPUNIT_ASSERT(pXImpressDocument); + SdDrawDocument* pDoc = pXImpressDocument->GetDoc(); + CPPUNIT_ASSERT(pDoc); + + sd::SlideSectionManager& rMgr = pDoc->GetSectionManager(); + CPPUNIT_ASSERT_EQUAL(sal_Int32(3), rMgr.GetSectionCount()); + CPPUNIT_ASSERT_EQUAL(u"Section-1"_ustr, rMgr.GetSection(0).maName); + CPPUNIT_ASSERT_EQUAL(u"Section-2"_ustr, rMgr.GetSection(1).maName); + CPPUNIT_ASSERT_EQUAL(u"Section-3"_ustr, rMgr.GetSection(2).maName); +} + +// 4. Export ODP with sections to PPTX +CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest5, testSlideSectionsODPToPPTX) +{ + createSdImpressDoc("pptx/slide-section-test.pptx"); + skipValidation(); + saveAndReload(TestFilter::ODP); + save(TestFilter::PPTX); + + xmlDocUniquePtr pXmlDoc = parseExport(u"ppt/presentation.xml"_ustr); + + static constexpr OString sPath = "/p:presentation/p:extLst/p:ext/p14:sectionLst"_ostr; + assertXPath(pXmlDoc, sPath + "/p14:section", 3); + assertXPath(pXmlDoc, sPath + "/p14:section[1]", "name", u"Section-1"); + assertXPath(pXmlDoc, sPath + "/p14:section[2]", "name", u"Section-2"); + assertXPath(pXmlDoc, sPath + "/p14:section[3]", "name", u"Section-3"); + assertXPath(pXmlDoc, sPath + "/p14:section[1]/p14:sldIdLst/p14:sldId", 4); + assertXPath(pXmlDoc, sPath + "/p14:section[2]/p14:sldIdLst/p14:sldId", 7); + assertXPath(pXmlDoc, sPath + "/p14:section[3]/p14:sldIdLst/p14:sldId", 2); + + // Slide IDs non-zero after ODP round-trip + OUString sSldId = getXPath(pXmlDoc, sPath + "/p14:section[1]/p14:sldIdLst/p14:sldId[1]", "id"); + CPPUNIT_ASSERT(sSldId.toInt32() > 0); + + // GUIDs survive ODP round-trip (generated if missing) + for (sal_Int32 i = 1; i <= 3; ++i) + { + OUString sId = getXPath(pXmlDoc, sPath + "/p14:section[" + OString::number(i) + "]", "id"); + CPPUNIT_ASSERT(!sId.isEmpty()); + } +} + +CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest5, testCool16078_placeholderKeepsItsOutline) +{ + // Given a layout whose picture placeholder is clipped to an outline of two elements: + // a frame with two holes, one of them round, and a second path holding a triangle that crosses + // the round one: + createSdImpressDoc("pptx/custgeom-placeholder.pptx"); + save(TestFilter::PPTX); + + // The outline is written back as the placeholder's own geometry. Without it the placeholder + // saved as a plain rectangle, and its fill then hid both holes and what showed through. + xmlDocUniquePtr pLayout = parseExportedLayoutNamed(u"Picture placeholder, clipped outline"); + OString aPath + = "//p:sp[p:nvSpPr/p:nvPr/p:ph/@type='pic']/p:spPr/a:custGeom/a:pathLst/a:path"_ostr; + assertXPath(pLayout, aPath, 1); + // Three contours in one path, which is what subtracts the holes from the frame - the same three + // the ODF side writes. The second path is not one of them: it is filled rather than cut out, so + // the triangle it holds took a piece of the round hole back instead of adding a contour. + assertXPath(pLayout, aPath + "/a:moveTo", 3); + assertXPath(pLayout, aPath + "/a:close", 3); + // Four sides each for the two rectangles, the closing one included. + assertXPath(pLayout, aPath + "/a:lnTo", 8); + // What is left of the round hole is still curves, not a polygon flattened out of them. + assertXPath(pLayout, aPath + "/a:cubicBezTo", 6); + assertXPath(pLayout, aPath + "/a:cubicBezTo[1]/a:pt", 3); + // The frame's own corner, in the path's coordinates. + assertXPath(pLayout, aPath + "/a:moveTo[1]/a:pt", "x", u"0"); + assertXPath(pLayout, aPath + "/a:moveTo[1]/a:pt", "y", u"0"); + + // The preset rectangle it used to write would have claimed the whole frame. + assertXPath(pLayout, "//p:sp[p:nvSpPr/p:nvPr/p:ph/@type='pic']/p:spPr/a:prstGeom", 0); +} + +CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest5, testCool16080_masterKeepsItsPlaceholders) +{ + // Given a deck of one master and eleven layouts, so one Impress master page stands for the + // whole group: + createSdImpressDoc("pptx/master-and-eleven-layouts.pptx"); + save(TestFilter::PPTX); + + // The master part carries its own placeholders. Without the fix it held a shape tree with + // nothing in it, so PowerPoint offered an empty slide master: nothing to inherit from, and + // an edit meant for every layout had to be repeated on each of them. + xmlDocUniquePtr pMaster = parseExport(u"ppt/slideMasters/slideMaster1.xml"_ustr); + static constexpr OString aTree("/p:sldMaster/p:cSld/p:spTree"_ostr); + assertXPath(pMaster, aTree + "/p:sp/p:nvSpPr/p:nvPr/p:ph[@type='title']", 1); + assertXPath(pMaster, aTree + "/p:sp/p:nvSpPr/p:nvPr/p:ph[@type='dt']", 1); + assertXPath(pMaster, aTree + "/p:sp/p:nvSpPr/p:nvPr/p:ph[@type='ftr']", 1); + assertXPath(pMaster, aTree + "/p:sp/p:nvSpPr/p:nvPr/p:ph[@type='sldNum']", 1); + + // The body comes from the first layout that has one, since the page standing for the group is + // the Title Slide layout and has none. That layout inherits the master's geometry, so the + // placeholder lands where the master put it rather than where a layout would. + assertXPath(pMaster, aTree + "/p:sp/p:nvSpPr/p:nvPr/p:ph[@type='body']", 1); + assertXPath(pMaster, aTree + "/p:sp[p:nvSpPr/p:nvPr/p:ph/@type='body']/p:spPr/a:xfrm/a:off", + "y", u"1825560"); +} + +CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest5, testCool16080_layoutShapesStayOnTheirLayout) +{ + // Given a deck whose first layout paints the whole slide blue, and a slide on another layout, + // which is therefore white: + createSdImpressDoc("pptx/layout-own-background.pptx"); + saveAndReload(TestFilter::PPTX); + + utl::TempFileNamed aPng; + aPng.EnableKillingFile(); + uno::Sequence aFilterData{ + comphelper::makePropertyValue(u"PixelWidth"_ustr, sal_Int32(64)), + comphelper::makePropertyValue(u"PixelHeight"_ustr, sal_Int32(36)) + }; + uno::Sequence aDescriptor{ + comphelper::makePropertyValue(u"URL"_ustr, aPng.GetURL()), + comphelper::makePropertyValue(u"FilterName"_ustr, u"PNG"_ustr), + comphelper::makePropertyValue(u"FilterData"_ustr, aFilterData) + }; + auto xExporter = drawing::GraphicExportFilter::create(getComponentContext()); + xExporter->setSourceDocument(getPage(0).queryThrow()); + xExporter->filter(aDescriptor); + + SvFileStream aStream(aPng.GetURL(), StreamMode::READ); + Bitmap aSlide = vcl::PngImageReader(aStream).read(); + CPPUNIT_ASSERT_EQUAL(Size(64, 36), aSlide.GetSizePixel()); + + // The slide is still white. An imported master and layout collapse onto one Impress master + // page, so the page standing for the group holds the first layout's rectangle - and writing + // that page's shapes into the master part painted it under every slide of the deck. Sample + // the side margins, which no placeholder of this layout reaches. + // Without the fix in place, this test would have failed with + // - Expected: rgba[ffffffff] + // - Actual : rgba[0000ffff] + CPPUNIT_ASSERT_EQUAL(COL_WHITE, aSlide.GetPixelColor(2, 18)); + CPPUNIT_ASSERT_EQUAL(COL_WHITE, aSlide.GetPixelColor(61, 18)); + + // The layout it belongs to still paints it, which is what a slide of that layout inherits. + xmlDocUniquePtr pLayout = parseExportedLayoutNamed(u"Title Slide"); + assertXPath(pLayout, + "/p:sldLayout/p:cSld/p:spTree/p:sp[p:nvSpPr/p:cNvPr/@name='Blue background']" + "/p:spPr/a:solidFill/a:srgbClr", + "val", u"0000FF"); +} + +CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest5, testCool16080_masterKeepsWhatItsLayoutsShare) +{ + // Given a deck of one master that draws a rule of its own across the top of the slide, in + // segments of colour, and seven layouts that draw nothing: + createSdImpressDoc("pptx/tdf157740.pptx"); + saveAndReload(TestFilter::PPTX); + + // The rule is on the slide master, so PowerPoint edits it once for every layout. The import + // gives each of the seven Impress master pages a copy, and the master used to get none. + // Without the fix in place, this test would have failed with + // - Expected: 1 + // - Actual : 0 + xmlDocUniquePtr pMaster = parseExport(u"ppt/slideMasters/slideMaster1.xml"_ustr); + assertXPath(pMaster, + "/p:sldMaster/p:cSld/p:spTree/p:grpSp[p:nvGrpSpPr/p:cNvPr/@name='Group 1']", 1); + + // It moved there rather than being written seven more times: a layout holds the three + // placeholders it inherits and nothing else. + xmlDocUniquePtr pLayout = parseExportedLayoutNamed(u"Title, Content over Content"); + static constexpr OString aLayoutTree("/p:sldLayout/p:cSld/p:spTree"_ostr); + assertXPath(pLayout, aLayoutTree + "/*[not(self::p:nvGrpSpPr) and not(self::p:grpSpPr)]", 3); + assertXPath(pLayout, aLayoutTree + "/p:sp/p:nvSpPr/p:nvPr/p:ph", 3); + + // And the slide still shows the rule, wherever it is written + utl::TempFileNamed aPng; + aPng.EnableKillingFile(); + uno::Sequence aFilterData{ + comphelper::makePropertyValue(u"PixelWidth"_ustr, sal_Int32(1920)), + comphelper::makePropertyValue(u"PixelHeight"_ustr, sal_Int32(1080)) + }; + uno::Sequence aDescriptor{ + comphelper::makePropertyValue(u"URL"_ustr, aPng.GetURL()), + comphelper::makePropertyValue(u"FilterName"_ustr, u"PNG"_ustr), + comphelper::makePropertyValue(u"FilterData"_ustr, aFilterData) + }; + auto xExporter = drawing::GraphicExportFilter::create(getComponentContext()); + xExporter->setSourceDocument(getPage(0).queryThrow()); + xExporter->filter(aDescriptor); + + SvFileStream aStream(aPng.GetURL(), StreamMode::READ); + Bitmap aSlide = vcl::PngImageReader(aStream).read(); + CPPUNIT_ASSERT_EQUAL(Size(1920, 1080), aSlide.GetSizePixel()); + // 90EBCD is accent5 of the deck's theme, the fill of the rule's second segment + CPPUNIT_ASSERT_EQUAL(Color(0x90EBCD), aSlide.GetPixelColor(200, 5)); +} + +CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest5, testCool16082_layoutKeepsSubtitle) +{ + // Given a deck whose Title Slide layout carries a subtitle placeholder: + createSdImpressDoc("pptx/master-and-eleven-layouts.pptx"); + save(TestFilter::PPTX); + + // The layout keeps it. Without the fix every layout of a master holding more than one lost its + // subtitle, so a slide made from the layout afterwards had nowhere to put one. + xmlDocUniquePtr pLayout = parseExportedLayoutNamed(u"Title Slide"); + assertXPath(pLayout, "/p:sldLayout/p:cSld/p:spTree/p:sp/p:nvSpPr/p:nvPr/p:ph[@type='subTitle']", + 1); + + // The slide master still gets none, which is what PowerPoint refuses the file over. + xmlDocUniquePtr pMaster = parseExport(u"ppt/slideMasters/slideMaster1.xml"_ustr); + assertXPath(pMaster, "/p:sldMaster/p:cSld/p:spTree/p:sp/p:nvSpPr/p:nvPr/p:ph[@type='subTitle']", + 0); +} + +CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest5, testCool16079_dateTimeField) +{ + // Given a deck whose date placeholders hold an automatically updated date: + createSdImpressDoc("pptx/master-and-eleven-layouts.pptx"); + save(TestFilter::PPTX); + + // The placeholder keeps a field. Without the fix it held our own display string as literal + // text, so PowerPoint showed "" where the original showed a date. The type is the + // one that leaves the format to the reader, which is what a field holding none asks for - the + // alias PowerPoint writes here stands for a fixed MM/DD/YYYY. + xmlDocUniquePtr pLayout = parseExportedLayoutNamed(u"Title Slide"); + assertXPath(pLayout, "//p:sp[p:nvSpPr/p:nvPr/p:ph/@type='dt']/p:txBody/a:p/a:fld", "type", + u"datetime"); +} + +CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest5, testThemeKeepColorTransforms) +{ + createSdImpressDoc("pptx/empty-title-placeholder.pptx"); + save(TestFilter::PPTX); + + xmlDocUniquePtr pXmlDoc = parseExport(u"ppt/theme/theme1.xml"_ustr); + const OString sBasePath = "/a:theme/a:themeElements/a:fmtScheme/a:bgFillStyleLst/a:gradFill[1]" + "/a:gsLst/a:gs[@pos='40000']/a:schemeClr"_ostr; + + // Without the fix satMod would end up negative + assertXPath(pXmlDoc, sBasePath, "val", u"phClr"); + assertXPathChildren(pXmlDoc, sBasePath, 3); + assertXPath(pXmlDoc, sBasePath + "/a:tint", "val", u"45000"); + assertXPath(pXmlDoc, sBasePath + "/a:shade", "val", u"99000"); + assertXPath(pXmlDoc, sBasePath + "/a:satMod", "val", u"350000"); +} + +CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest5, testTdf166401_textGivenToAPicturePlaceholder) +{ + // Given a slide whose picture placeholder is given text without any editing, which is what a + // script does and what leaves the placeholder standing for itself rather than for the text: + createSdImpressDoc("pptx/picture-placeholder-custom-prompt.pptx"); + getShapeFromPage(0, 0).queryThrow()->setString( + u"Given to a picture placeholder"_ustr); + save(TestFilter::PPTX); + + // The placeholder is written with its text. It holds no image, so writing it as a picture wrote + // nothing at all and the text went with the shape. + xmlDocUniquePtr pSlide = parseExport(u"ppt/slides/slide1.xml"_ustr); + static constexpr OString aPlaceholder( + "/p:sld/p:cSld/p:spTree/p:sp[p:nvSpPr/p:nvPr/p:ph/@type='pic']"_ostr); + assertXPath(pSlide, aPlaceholder, 1); + assertXPathContent(pSlide, aPlaceholder + "/p:txBody/a:p/a:r/a:t", + u"Given to a picture placeholder"); +} + +CPPUNIT_PLUGIN_IMPLEMENT(); + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ From 19ed84a1d598206ab454dc96beffd26d6b5d4e83 Mon Sep 17 00:00:00 2001 From: Xisco Fauli Date: Mon, 5 Oct 2026 16:59:30 +0200 Subject: [PATCH 182/289] CppunitTest_dbaccess_CRMDatabase_test: remove duplicated code Change-Id: Id2c3504130413e4511980ebabca866465a981a86 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211838 Tested-by: Jenkins Reviewed-by: Xisco Fauli --- dbaccess/qa/unit/CRMDatabase_test.cxx | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/dbaccess/qa/unit/CRMDatabase_test.cxx b/dbaccess/qa/unit/CRMDatabase_test.cxx index 0c445450e27c..75dbc72f2fd4 100644 --- a/dbaccess/qa/unit/CRMDatabase_test.cxx +++ b/dbaccess/qa/unit/CRMDatabase_test.cxx @@ -109,11 +109,10 @@ void CRMDBTest::testRegistrationName() // 2. register a newly created data source, and verify it has the proper name // Setup the CRMDatabase - createDBDocument(u"sdbc:embedded:hsqldb"_ustr); - uno::Reference xDocument(mxComponent, UNO_QUERY_THROW); - uno::Reference xConnection = getConnectionForDocument(xDocument); + uno::Reference xConnection = setUpDBConnection(); createTables(xConnection); + uno::Reference xDocument(mxComponent, UNO_QUERY_THROW); uno::Reference xDataSource = xDocument->getDataSource(); CPPUNIT_ASSERT(xDataSource.is()); @@ -142,15 +141,7 @@ void CRMDBTest::testQueryColumns() // Ported from dbaccess/Query.java // Test prepared queries return the expected column names - createDBDocument(u"sdbc:embedded:hsqldb"_ustr); - uno::Reference xDocument(mxComponent, UNO_QUERY_THROW); - uno::Reference xDataSource = xDocument->getDataSource(); - CPPUNIT_ASSERT(xDataSource.is()); - - // Create queries before establishing connection to database - createQueries(xDataSource); - - uno::Reference xConnection = getConnectionForDocument(xDocument); + uno::Reference xConnection = setUpDBConnection(); createTables(xConnection); uno::Reference xQuerySupplier(xConnection, UNO_QUERY_THROW); From 9a61140c32583a977a4fde62ed0c426db2a20424 Mon Sep 17 00:00:00 2001 From: Michael Weghorn Date: Fri, 2 Oct 2026 12:36:17 +0200 Subject: [PATCH 183/289] svx: Switch to weld::TreeView in LineWidthPopup Instead of using a custom ValueSet subclass to draw images and text next to them for selection in the line width popup, use a weld::TreeView with two columns: one for the image, and one for the text. This is similar to what commit b185d346422a26b1ad252f7ec590c07034332ad0 Author: Michael Weghorn Date: Fri Nov 28 14:12:04 2025 +0100 tdf#168120 sc: Switch to weld::TreeView in CellLineStyleControl did elswhere. Adjust indices used to account for the fact that weld::TreeView indices are 0-based while the ValueSet ones are 1-based. The special "Last custom value" entry so far was using two separate images, depending on whether or not it was enabled/sensitive or not: If it is disabled, a greyed out variant of the image was used. With the switch to weld::TreeView, leave that up to the TreeView by simply enabling/disabling the corresponding row using weld::TreeView::set_sensitive for the corresponding row. Drop the now unused LineWidthValueSet. This switch to weld::TreeView reduces custom widget logic and custom drawing and makes this more consistent with other widgets used elsewhere (e.g. like for the one mentioned in the commit above, the usual font is used now as well, and it also aligns the behavior more with that one.) The popup for configuring the line thickness that uses this code can be triggered like this: * start Writer * insert a chart using "Insert" -> "Chart..." * select the chart wall in the chart * open the "Properties" sidebar deck * in the "Line" section of that sidebar deck, click on the "Thickness" button/combobox Change-Id: I423e80bba9e81a98e80652f6486970d40286362e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211735 Tested-by: Jenkins Reviewed-by: Michael Weghorn --- compilerplugins/clang/moveparam.cxx | 6 - include/svx/sidebar/LineWidthPopup.hxx | 14 +- solenv/clang-format/excludelist | 2 - svx/Library_svx.mk | 1 - svx/inc/bitmaps.hlst | 1 - svx/source/sidebar/line/LineWidthPopup.cxx | 137 +++++++++------- svx/source/sidebar/line/LineWidthValueSet.cxx | 150 ------------------ svx/source/sidebar/line/LineWidthValueSet.hxx | 53 ------- svx/uiconfig/ui/floatinglineproperty.ui | 53 +++++-- 9 files changed, 122 insertions(+), 295 deletions(-) delete mode 100644 svx/source/sidebar/line/LineWidthValueSet.cxx delete mode 100644 svx/source/sidebar/line/LineWidthValueSet.hxx diff --git a/compilerplugins/clang/moveparam.cxx b/compilerplugins/clang/moveparam.cxx index dc7a84b4d64d..93484ef60b5f 100644 --- a/compilerplugins/clang/moveparam.cxx +++ b/compilerplugins/clang/moveparam.cxx @@ -90,12 +90,6 @@ bool MoveParam::VisitCXXOperatorCallExpr(const CXXOperatorCallExpr* callExpr) if (!loplugin::TypeCheck(parmVarDecl->getType()).LvalueReference().Const()) return true; - StringRef aFileName = getFilenameOfLocation( - compiler.getSourceManager().getSpellingLoc(parmVarDecl->getBeginLoc())); - if (loplugin::hasPathnamePrefix(aFileName, - SRCDIR "/svx/source/sidebar/line/LineWidthValueSet.cxx")) - return true; - report(DiagnosticsEngine::Warning, "rather use move && param1", callExpr->getBeginLoc()); return true; diff --git a/include/svx/sidebar/LineWidthPopup.hxx b/include/svx/sidebar/LineWidthPopup.hxx index e796a73922c5..524790ed2780 100644 --- a/include/svx/sidebar/LineWidthPopup.hxx +++ b/include/svx/sidebar/LineWidthPopup.hxx @@ -22,7 +22,7 @@ #include #include #include -#include +#include #include #include @@ -31,7 +31,6 @@ class ValueSet; namespace svx::sidebar { class LinePropertyPanelBase; -class LineWidthValueSet; class LineWidthPopup final : public WeldToolbarPopup { @@ -50,17 +49,18 @@ private: std::array maStrUnits; OUString m_sPt; MapUnit m_eMapUnit; - bool m_bVSFocus; + bool m_bTreeViewFocus; bool m_bCustom; tools::Long m_nCustomWidth; Image m_aIMGCus; - Image m_aIMGCusGray; std::unique_ptr m_xMFWidth; - std::unique_ptr m_xVSWidth; - std::unique_ptr m_xVSWidthWin; + std::unique_ptr m_xWidthTreeView; - DECL_LINK(VSSelectHdl, ValueSet*, void); + ScopedVclPtr CreateImage(int nIndex); + void UnselectTreeViewItems(); + + DECL_LINK(TreeViewItemActivatedHdl, const weld::TreeIter&, bool); DECL_LINK(MFModifyHdl, weld::MetricSpinButton&, void); }; diff --git a/solenv/clang-format/excludelist b/solenv/clang-format/excludelist index 9eac9332dfc0..1d2a91dbe74e 100644 --- a/solenv/clang-format/excludelist +++ b/solenv/clang-format/excludelist @@ -11357,8 +11357,6 @@ svx/source/sidebar/graphic/GraphicPropertyPanel.hxx svx/source/sidebar/line/LinePropertyPanel.cxx svx/source/sidebar/line/LinePropertyPanel.hxx svx/source/sidebar/line/LinePropertyPanelBase.cxx -svx/source/sidebar/line/LineWidthValueSet.cxx -svx/source/sidebar/line/LineWidthValueSet.hxx svx/source/sidebar/media/MediaPlaybackPanel.cxx svx/source/sidebar/media/MediaPlaybackPanel.hxx svx/source/sidebar/nbdtmg.cxx diff --git a/svx/Library_svx.mk b/svx/Library_svx.mk index a9aff82c5eec..3fa0eb484410 100644 --- a/svx/Library_svx.mk +++ b/svx/Library_svx.mk @@ -244,7 +244,6 @@ $(eval $(call gb_Library_add_exception_objects,svx,\ svx/source/sidebar/graphic/GraphicPropertyPanel \ svx/source/sidebar/line/LinePropertyPanel \ svx/source/sidebar/line/LinePropertyPanelBase \ - svx/source/sidebar/line/LineWidthValueSet \ svx/source/sidebar/line/LineWidthPopup \ $(call gb_Helper_optional,AVMEDIA,svx/source/sidebar/media/MediaPlaybackPanel) \ svx/source/sidebar/possize/PosSizePropertyPanel \ diff --git a/svx/inc/bitmaps.hlst b/svx/inc/bitmaps.hlst index 178b22c0419e..aa73670c5771 100644 --- a/svx/inc/bitmaps.hlst +++ b/svx/inc/bitmaps.hlst @@ -126,7 +126,6 @@ inline constexpr OUString RID_SVXBMP_GALLERY_SOUND_7 = u"svx/res/galsnd7.png"_us inline constexpr OUString BMP_NONE_ICON = u"svx/res/symphony/blank.png"_ustr; inline constexpr OUString RID_SVXBMP_WIDTH_CUSTOM = u"svx/res/symphony/last_custom_common.png"_ustr; -inline constexpr OUString RID_SVXBMP_WIDTH_CUSTOM_GRAY = u"svx/res/symphony/last_custom_common_grey.png"_ustr; inline constexpr OUString BMP_AXIAL = u"svx/res/symphony/axial.png"_ustr; inline constexpr OUString BMP_ELLI = u"svx/res/symphony/ellipsoid.png"_ustr; diff --git a/svx/source/sidebar/line/LineWidthPopup.cxx b/svx/source/sidebar/line/LineWidthPopup.cxx index d9930790cfc5..c92180933035 100644 --- a/svx/source/sidebar/line/LineWidthPopup.cxx +++ b/svx/source/sidebar/line/LineWidthPopup.cxx @@ -27,8 +27,9 @@ #include #include #include +#include #include -#include "LineWidthValueSet.hxx" +#include #include namespace svx::sidebar @@ -39,17 +40,13 @@ LineWidthPopup::LineWidthPopup(weld::Widget* pParent, LinePropertyPanelBase& rPa , m_rParent(rParent) , m_sPt(SvxResId(RID_SVXSTR_PT)) , m_eMapUnit(MapUnit::MapTwip) - , m_bVSFocus(true) + , m_bTreeViewFocus(true) , m_bCustom(false) , m_nCustomWidth(0) , m_aIMGCus(StockImage::Yes, RID_SVXBMP_WIDTH_CUSTOM) - , m_aIMGCusGray(StockImage::Yes, RID_SVXBMP_WIDTH_CUSTOM_GRAY) , m_xMFWidth(m_xBuilder->weld_metric_spin_button(u"spin"_ustr, FieldUnit::POINT)) - , m_xVSWidth(new LineWidthValueSet()) - , m_xVSWidthWin(new weld::CustomWeld(*m_xBuilder, u"lineset"_ustr, *m_xVSWidth)) + , m_xWidthTreeView(m_xBuilder->weld_tree_view("linetreeview")) { - m_xVSWidth->SetStyle(m_xVSWidth->GetStyle() | WB_3DLOOK | WB_NO_DIRECTSELECT); - maStrUnits = { u"0.5"_ustr, u"0.8"_ustr, u"1.0"_ustr, u"1.5"_ustr, u"2.3"_ustr, u"3.0"_ustr, u"4.5"_ustr, u"6.0"_ustr, SvxResId(RID_SVXSTR_WIDTH_LAST_CUSTOM) }; @@ -64,46 +61,78 @@ LineWidthPopup::LineWidthPopup(weld::Widget* pParent, LinePropertyPanelBase& rPa maStrUnits[i] += m_sPt; } - for (sal_uInt16 i = 1; i <= 9; ++i) + for (int i = 0; i < 9; ++i) { - m_xVSWidth->InsertItem(i); - m_xVSWidth->SetItemText(i, maStrUnits[i - 1]); + m_xWidthTreeView->insert(i); + ScopedVclPtr pImage = CreateImage(i); + m_xWidthTreeView->set_image(i, *pImage, 0); + m_xWidthTreeView->set_text(i, maStrUnits.at(i), 1); + m_xWidthTreeView->set_sensitive(i, true); } + m_xWidthTreeView->columns_autosize(); - m_xVSWidth->SetUnit(maStrUnits); - m_xVSWidth->SetItemData(1, reinterpret_cast(5)); - m_xVSWidth->SetItemData(2, reinterpret_cast(8)); - m_xVSWidth->SetItemData(3, reinterpret_cast(10)); - m_xVSWidth->SetItemData(4, reinterpret_cast(15)); - m_xVSWidth->SetItemData(5, reinterpret_cast(23)); - m_xVSWidth->SetItemData(6, reinterpret_cast(30)); - m_xVSWidth->SetItemData(7, reinterpret_cast(45)); - m_xVSWidth->SetItemData(8, reinterpret_cast(60)); - m_xVSWidth->SetImage(m_aIMGCusGray); + m_xWidthTreeView->set_id(0, OUString::number(5)); + m_xWidthTreeView->set_id(1, OUString::number(8)); + m_xWidthTreeView->set_id(2, OUString::number(10)); + m_xWidthTreeView->set_id(3, OUString::number(15)); + m_xWidthTreeView->set_id(4, OUString::number(23)); + m_xWidthTreeView->set_id(5, OUString::number(30)); + m_xWidthTreeView->set_id(6, OUString::number(45)); + m_xWidthTreeView->set_id(7, OUString::number(60)); - m_xVSWidth->UnselectItems(); + UnselectTreeViewItems(); - m_xVSWidth->SetSelectHdl(LINK(this, LineWidthPopup, VSSelectHdl)); + m_xWidthTreeView->connect_item_activated(LINK(this, LineWidthPopup, TreeViewItemActivatedHdl)); m_xMFWidth->connect_value_changed(LINK(this, LineWidthPopup, MFModifyHdl)); } LineWidthPopup::~LineWidthPopup() {} -IMPL_LINK_NOARG(LineWidthPopup, VSSelectHdl, ValueSet*, void) +ScopedVclPtr LineWidthPopup::CreateImage(int nIndex) { - sal_uInt16 iPos = m_xVSWidth->GetSelectedItemId(); - if (iPos >= 1 && iPos <= 8) + ScopedVclPtr pDev = m_xWidthTreeView->create_virtual_device(); + const StyleSettings& rStyleSettings = Application::GetSettings().GetStyleSettings(); + pDev->SetBackground(rStyleSettings.GetFieldColor()); + pDev->SetLineColor(rStyleSettings.GetFieldTextColor()); + pDev->SetFillColor(pDev->GetLineColor()); + pDev->SetOutputSizePixel(Size(50, 26)); + + if (nIndex >= 0 && nIndex <= 7) { - sal_IntPtr nVal = OutputDevice::LogicToLogic( - reinterpret_cast(m_xVSWidth->GetItemData(iPos)), MapUnit::MapPoint, - m_eMapUnit); + pDev->DrawRect(tools::Rectangle(5, 10, 40, 11 + nIndex)); + } + else + { + assert(nIndex == 8 && "Invalid index"); + const Point aStartPoint( + (pDev->GetOutputWidthPixel() - m_aIMGCus.GetSizePixel().getWidth()) / 2, + (pDev->GetOutputHeightPixel() - m_aIMGCus.GetSizePixel().getHeight()) / 2); + pDev->DrawImage(aStartPoint, m_aIMGCus); + } + + return pDev; +} + +void LineWidthPopup::UnselectTreeViewItems() +{ + m_xWidthTreeView->unselect_all(); + m_xWidthTreeView->set_cursor(-1); +} + +IMPL_LINK(LineWidthPopup, TreeViewItemActivatedHdl, const weld::TreeIter&, rIter, bool) +{ + const int nPos = m_xWidthTreeView->get_iter_index_in_parent(rIter); + if (nPos >= 0 && nPos <= 7) + { + sal_Int64 nVal = OutputDevice::LogicToLogic(m_xWidthTreeView->get_id(rIter).toInt64(), + MapUnit::MapPoint, m_eMapUnit); nVal = m_xMFWidth->denormalize(nVal); XLineWidthItem aWidthItem(nVal); m_rParent.setLineWidth(aWidthItem); - m_rParent.SetWidthIcon(iPos); + m_rParent.SetWidthIcon(nPos + 1); m_rParent.SetWidth(nVal); } - else if (iPos == 9) + else if (nPos == 8) { //last custom //modified if (m_bCustom) @@ -117,27 +146,23 @@ IMPL_LINK_NOARG(LineWidthPopup, VSSelectHdl, ValueSet*, void) } else { - m_xVSWidth->SetNoSelection(); // add: set no selection and keep the last selected item - m_xVSWidth->SetFormat(); - m_xVSWidth->Invalidate(); + // add: set no selection and keep the last selected item + m_xWidthTreeView->unselect_all(); } //modify end } - if ((iPos >= 1 && iPos <= 8) || (iPos == 9 && m_bCustom)) //add + if ((nPos >= 0 && nPos <= 7) || (nPos == 8 && m_bCustom)) //add { m_rParent.EndLineWidthPopup(); } + + return true; } IMPL_LINK_NOARG(LineWidthPopup, MFModifyHdl, weld::MetricSpinButton&, void) { - if (!m_xVSWidth->IsNoSelection() && m_xVSWidth->GetSelectedItemId() != 0) - { - m_xVSWidth->UnselectItems(); - m_xVSWidth->SetFormat(); - m_xVSWidth->Invalidate(); - } + UnselectTreeViewItems(); tools::Long nTmp = static_cast(m_xMFWidth->get_value(FieldUnit::NONE)); tools::Long nVal = OutputDevice::LogicToLogic(nTmp, MapUnit::MapPoint, m_eMapUnit); sal_Int32 nNewWidth = static_cast(m_xMFWidth->denormalize(nVal)); @@ -147,8 +172,8 @@ IMPL_LINK_NOARG(LineWidthPopup, MFModifyHdl, weld::MetricSpinButton&, void) void LineWidthPopup::SetWidthSelect(tools::Long lValue, bool bValuable, MapUnit eMapUnit) { - m_bVSFocus = true; - m_xVSWidth->UnselectItems(); + m_bTreeViewFocus = true; + UnselectTreeViewItems(); m_eMapUnit = eMapUnit; SvtViewOptions aWinOpt(EViewType::Window, u"PopupPanel_LineWidth"_ustr); if (aWinOpt.Exists()) @@ -161,18 +186,16 @@ void LineWidthPopup::SetWidthSelect(tools::Long lValue, bool bValuable, MapUnit OUString aWinData(aTmp); m_nCustomWidth = aWinData.toInt32(); m_bCustom = true; - m_xVSWidth->SetImage(m_aIMGCus); - m_xVSWidth->SetCusEnable(true); + m_xWidthTreeView->set_sensitive(8, true); OUString aStrTip = OUString::number(static_cast(m_nCustomWidth) / 10) + m_sPt; - m_xVSWidth->SetItemText(9, aStrTip); + m_xWidthTreeView->set_text(8, aStrTip); } else { m_bCustom = false; - m_xVSWidth->SetImage(m_aIMGCusGray); - m_xVSWidth->SetCusEnable(false); - m_xVSWidth->SetItemText(9, maStrUnits[8]); + m_xWidthTreeView->set_sensitive(8, false); + m_xWidthTreeView->set_text(8, maStrUnits.at(8)); } if (bValuable) @@ -187,32 +210,28 @@ void LineWidthPopup::SetWidthSelect(tools::Long lValue, bool bValuable, MapUnit } OUString strCurrValue = m_xMFWidth->get_text(); - sal_uInt16 i = 0; + int i = 0; for (; i < 8; i++) { if (strCurrValue == maStrUnits[i]) { - m_xVSWidth->SelectItem(i + 1); - m_xVSWidth->GrabFocus(); - + m_xWidthTreeView->select(i); + m_xWidthTreeView->grab_focus(); break; } } if (i >= 8) { - m_bVSFocus = false; - m_xVSWidth->UnselectItems(); + m_bTreeViewFocus = false; + UnselectTreeViewItems(); } - - m_xVSWidth->SetFormat(); - m_xVSWidth->Invalidate(); } void LineWidthPopup::GrabFocus() { - if (m_bVSFocus) - m_xVSWidth->GrabFocus(); + if (m_bTreeViewFocus) + m_xWidthTreeView->grab_focus(); else m_xMFWidth->grab_focus(); } diff --git a/svx/source/sidebar/line/LineWidthValueSet.cxx b/svx/source/sidebar/line/LineWidthValueSet.cxx deleted file mode 100644 index 2686df9a07e2..000000000000 --- a/svx/source/sidebar/line/LineWidthValueSet.cxx +++ /dev/null @@ -1,150 +0,0 @@ -/* -*- 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 . - */ -#include "LineWidthValueSet.hxx" - -#include -#include -#include -#include -#include -#include -#include -#include - -namespace svx::sidebar { - -LineWidthValueSet::LineWidthValueSet() - : ValueSet(nullptr) - , bCusEnable(false) -{ -} - -void LineWidthValueSet::Resize() -{ - SetColCount(); - SetLineCount(9); - ValueSet::Resize(); -} - -LineWidthValueSet::~LineWidthValueSet() -{ -} - -void LineWidthValueSet::SetUnit(std::array const & strUnits) -{ - maStrUnits = strUnits; -} - -void LineWidthValueSet::UnselectItems() -{ - SelectItem(1); // ,false); // 'false' nut supported by AOO - SetNoSelection(); -} - -void LineWidthValueSet::SetImage(const Image& img) -{ - imgCus = img; -} - -void LineWidthValueSet::SetCusEnable(bool bEnable) -{ - bCusEnable = bEnable; -} - -void LineWidthValueSet::UserDraw( const UserDrawEvent& rUDEvt ) -{ - tools::Rectangle aRect = rUDEvt.GetRect(); - vcl::RenderContext* pDev = rUDEvt.GetRenderContext(); - sal_uInt16 nItemId = rUDEvt.GetItemId(); - - tools::Long nRectHeight = aRect.GetHeight(); - const tools::Long nRectWidth = aRect.GetWidth(); - Point aBLPos = aRect.TopLeft(); - - auto popIt = pDev->ScopedPush(vcl::PushFlags::FONT | vcl::PushFlags::LINECOLOR | vcl::PushFlags::FILLCOLOR); - - vcl::Font aFont(OutputDevice::GetDefaultFont(DefaultFontType::UI_SANS, MsLangId::getConfiguredSystemLanguage(), GetDefaultFontFlags::OnlyOne)); - Size aSize = aFont.GetFontSize(); - aSize.setHeight( nRectHeight*3/5 ); - aFont.SetFontSize( aSize ); - - Point aLineStart(aBLPos.X() + 5, aBLPos.Y() + ( nRectHeight - nItemId )/2); - if (nItemId == 9) - { - Point aImgStart(aBLPos.X() + 5, aBLPos.Y() + ( nRectHeight - 23 ) / 2); - pDev->DrawImage(aImgStart, imgCus); - - tools::Rectangle aStrRect = aRect; - aStrRect.AdjustTop(nRectHeight/6 ); - aStrRect.AdjustBottom( -(nRectHeight/6) ); - aStrRect.AdjustLeft(imgCus.GetSizePixel().Width() + 20 ); - if(bCusEnable) - aFont.SetColor(Application::GetSettings().GetStyleSettings().GetFieldTextColor()); - else - aFont.SetColor(Application::GetSettings().GetStyleSettings().GetDisableColor()); - - pDev->SetFont(aFont); - pDev->DrawText(aStrRect, maStrUnits[ nItemId - 1 ], DrawTextFlags::EndEllipsis); - } - else - { - if (IsItemSelected(nItemId)) - { - tools::Rectangle aBackRect = aRect; - aBackRect.AdjustTop(3 ); - aBackRect.AdjustBottom( -2 ); - pDev->SetFillColor(Color(50,107,197)); - pDev->DrawRect(aBackRect); - } - - //draw text - if (IsItemSelected(nItemId)) - aFont.SetColor(COL_WHITE); - else - aFont.SetColor(Application::GetSettings().GetStyleSettings().GetFieldTextColor()); - pDev->SetFont(aFont); - Point aStart(aBLPos.X() + nRectWidth * 7 / 9 , aBLPos.Y() + nRectHeight/6); - pDev->DrawText(aStart, maStrUnits[ nItemId - 1 ]); //can't set DrawTextFlags::EndEllipsis here ,or the text will disappear - - //draw line - const Color aLineColor - = IsItemSelected(nItemId) - ? COL_WHITE - : Application::GetSettings().GetStyleSettings().GetFieldTextColor(); - pDev->SetLineColor(aLineColor); - pDev->SetFillColor(aLineColor); - const sal_Int32 nLineWidth = nRectWidth * 7 / 9 - 15; - pDev->DrawRect(tools::Rectangle(aLineStart, Size(nLineWidth, nItemId))); - } - - Invalidate( aRect ); -} - -void LineWidthValueSet::SetDrawingArea(weld::DrawingArea* pDrawingArea) -{ - ValueSet::SetDrawingArea(pDrawingArea); - Size aSize(pDrawingArea->get_ref_device().LogicToPixel(Size(80, 12 * 9), MapMode(MapUnit::MapAppFont))); - pDrawingArea->set_size_request(aSize.Width(), aSize.Height()); - SetOutputSizePixel(aSize); - SetColor(Application::GetSettings().GetStyleSettings().GetListBoxWindowBackgroundColor()); -} - -} // end of namespace svx::sidebar - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/sidebar/line/LineWidthValueSet.hxx b/svx/source/sidebar/line/LineWidthValueSet.hxx deleted file mode 100644 index 6bc611105210..000000000000 --- a/svx/source/sidebar/line/LineWidthValueSet.hxx +++ /dev/null @@ -1,53 +0,0 @@ -/* -*- 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_SVX_SOURCE_SIDEBAR_LINE_LINEWIDTHVALUESET_HXX -#define INCLUDED_SVX_SOURCE_SIDEBAR_LINE_LINEWIDTHVALUESET_HXX - -#include -#include -#include - -namespace svx::sidebar { - -class LineWidthValueSet final : public ValueSet -{ -public: - explicit LineWidthValueSet(); - virtual ~LineWidthValueSet() override; - - void SetUnit(std::array const & strUnits); - void UnselectItems(); - void SetImage(const Image& img); - void SetCusEnable(bool bEnable); - - virtual void UserDraw( const UserDrawEvent& rUDEvt ) override; - virtual void Resize() override; - virtual void SetDrawingArea(weld::DrawingArea* pDrawingArea) override; - -private: - std::array maStrUnits; - Image imgCus; - bool bCusEnable; -}; - -} // end of namespace svx::sidebar - -#endif // INCLUDED_SVX_SOURCE_SIDEBAR_LINE_LINEWIDTHVALUESET_HXX - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/uiconfig/ui/floatinglineproperty.ui b/svx/uiconfig/ui/floatinglineproperty.ui index 2fd7770216e2..2130dc4c6754 100644 --- a/svx/uiconfig/ui/floatinglineproperty.ui +++ b/svx/uiconfig/ui/floatinglineproperty.ui @@ -7,6 +7,20 @@ 1 10 + + + + + + + + + + + + + + False True @@ -21,26 +35,33 @@ True 6 - + True True - True - True - never - never - in + linetreeview_model + False + False + False + True - - True - False + - - True - True - GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_KEY_PRESS_MASK | GDK_KEY_RELEASE_MASK | GDK_STRUCTURE_MASK - True - True - + + + 4 + 0 + + + + + + + + + + 4 + 1 + From e6dba937317c5f27a3f2f27c594c46dceb11de05 Mon Sep 17 00:00:00 2001 From: Michael Weghorn Date: Fri, 2 Oct 2026 12:43:31 +0200 Subject: [PATCH 184/289] svtools: Drop now unused logic for custom ValueSetItem data The last caller of ValueSet::SetItemData and ValueSet::GetItemData was ported away from using ValueSet in Change-Id: I423e80bba9e81a98e80652f6486970d40286362e Author: Michael Weghorn Date: Fri Oct 2 12:36:17 2026 +0200 svx: Switch to weld::TreeView in LineWidthPopup . Drop the now unused methods and the corresponding ValueSetItem::mpData member that could previously be used to store custom data in an item. Similar logic still exists in weld::IconView and weld::TreeView, which should generally be preferred over using the custom ValueSet widget. Change-Id: I7d58ff933cb78a1157d3628096a17f68ddf2034d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211737 Tested-by: Jenkins Reviewed-by: Michael Weghorn --- include/svtools/valueset.hxx | 2 -- svtools/source/control/valueacc.cxx | 1 - svtools/source/control/valueimp.hxx | 1 - svtools/source/control/valueset.cxx | 32 ----------------------------- 4 files changed, 36 deletions(-) diff --git a/include/svtools/valueset.hxx b/include/svtools/valueset.hxx index 9081fab3ae6a..c8242963a490 100644 --- a/include/svtools/valueset.hxx +++ b/include/svtools/valueset.hxx @@ -340,8 +340,6 @@ public: Image GetItemImage( sal_uInt16 nItemId ) const; void SetItemColor( sal_uInt16 nItemId, const Color& rColor ); Color GetItemColor( sal_uInt16 nItemId ) const; - void SetItemData( sal_uInt16 nItemId, void* pData ); - void* GetItemData( sal_uInt16 nItemId ) const; void SetItemText( sal_uInt16 nItemId, const OUString& rStr ); const OUString & GetItemText( sal_uInt16 nItemId ) const; void SetColor( const Color& rColor ); diff --git a/svtools/source/control/valueacc.cxx b/svtools/source/control/valueacc.cxx index 399887e17c19..710cd4248c7c 100644 --- a/svtools/source/control/valueacc.cxx +++ b/svtools/source/control/valueacc.cxx @@ -37,7 +37,6 @@ using namespace ::com::sun::star; ValueSetItem::ValueSetItem( ValueSet& rParent ) : mrParent(rParent) - , mpData(nullptr) , mxAcc() , mnId(0) , meType(ValueSetItemType::None) diff --git a/svtools/source/control/valueimp.hxx b/svtools/source/control/valueimp.hxx index 293c94e86f32..921c83d2ba53 100644 --- a/svtools/source/control/valueimp.hxx +++ b/svtools/source/control/valueimp.hxx @@ -44,7 +44,6 @@ struct ValueSetItem { ValueSet& mrParent; OUString maText; - void* mpData; rtl::Reference< ValueItemAcc > mxAcc; Image maImage; Color maColor; diff --git a/svtools/source/control/valueset.cxx b/svtools/source/control/valueset.cxx index 60cfc1fe2246..d2e3f09d8184 100644 --- a/svtools/source/control/valueset.cxx +++ b/svtools/source/control/valueset.cxx @@ -1723,38 +1723,6 @@ void ValueSet::SetFormat() mbFormat = true; } -void ValueSet::SetItemData( sal_uInt16 nItemId, void* pData ) -{ - size_t nPos = GetItemPos( nItemId ); - - if ( nPos == VALUESET_ITEM_NOTFOUND ) - return; - - ValueSetItem* pItem = mItemList[nPos].get(); - pItem->mpData = pData; - - if (pItem->meType == ValueSetItemType::UserDraw) - { - if (!mbFormat && IsReallyVisible()) - { - const tools::Rectangle aRect = ImplGetItemRect(nPos); - Invalidate(aRect); - } - else - mbFormat = true; - } -} - -void* ValueSet::GetItemData( sal_uInt16 nItemId ) const -{ - size_t nPos = GetItemPos( nItemId ); - - if ( nPos != VALUESET_ITEM_NOTFOUND ) - return mItemList[nPos]->mpData; - else - return nullptr; -} - void ValueSet::SetItemText(sal_uInt16 nItemId, const OUString& rText) { size_t nPos = GetItemPos( nItemId ); From 7f03b3cf68b7bab6e9a82d207cbac5dcf735e83c Mon Sep 17 00:00:00 2001 From: Andrea Gelmini Date: Mon, 5 Oct 2026 12:45:21 +0200 Subject: [PATCH 185/289] Remove duplicated include Change-Id: I713d9f077a83eb9a64fc1a732caddf9c42bd7bef Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211815 Reviewed-by: Julien Nabet Tested-by: Julien Nabet --- svx/source/svdraw/svdobj.cxx | 1 - 1 file changed, 1 deletion(-) diff --git a/svx/source/svdraw/svdobj.cxx b/svx/source/svdraw/svdobj.cxx index f47485bc983f..00b5fb1009cf 100644 --- a/svx/source/svdraw/svdobj.cxx +++ b/svx/source/svdraw/svdobj.cxx @@ -113,7 +113,6 @@ #include #include #include -#include #include #include From 65bbb1691f022226390e15b7ea65567970bbc12e Mon Sep 17 00:00:00 2001 From: Olivier Hallot Date: Mon, 5 Oct 2026 21:33:05 -0300 Subject: [PATCH 186/289] Update git submodules * Update helpcontent2 from branch 'master' to 157b77431ac6fa9afa795eb96098d8c36cd6dd4a - tdf#173450 Add dynamic arrays to Help pages + Update dynamic array functions Change-Id: I1caafc7a924d93afc71991482f5bdfb9ada6bec1 Reviewed-on: https://gerrit.libreoffice.org/c/help/+/211849 Reviewed-by: Olivier Hallot Tested-by: Jenkins --- helpcontent2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/helpcontent2 b/helpcontent2 index c081e947a6b2..157b77431ac6 160000 --- a/helpcontent2 +++ b/helpcontent2 @@ -1 +1 @@ -Subproject commit c081e947a6b2e424325c60058a40042510e1807a +Subproject commit 157b77431ac6fa9afa795eb96098d8c36cd6dd4a From ee7d5db2ba76713908799648a8c61c2e47306fc2 Mon Sep 17 00:00:00 2001 From: Heiko Tietze Date: Mon, 5 Oct 2026 13:51:30 +0200 Subject: [PATCH 187/289] Resolves tdf#173108 - Improvements to Calc's View tab + rename "Freeze" to "Panes" + split Options into "View" for and "Options" for the last four commands + Remove "Function List" and replace it by "Styles" Change-Id: Id662c3f09454f4a15a2593bff86b523c8d235997 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211823 Tested-by: Jenkins Reviewed-by: Heiko Tietze --- sc/uiconfig/scalc/ui/notebookbar.ui | 543 +++++++++++++---------- solenv/sanitizers/ui/modules/scalc.suppr | 2 +- 2 files changed, 304 insertions(+), 241 deletions(-) diff --git a/sc/uiconfig/scalc/ui/notebookbar.ui b/sc/uiconfig/scalc/ui/notebookbar.ui index 57aec5fd2db0..6c9351fcd2aa 100644 --- a/sc/uiconfig/scalc/ui/notebookbar.ui +++ b/sc/uiconfig/scalc/ui/notebookbar.ui @@ -7939,7 +7939,7 @@ True - + True False 6 @@ -7949,16 +7949,16 @@ 3 3 - + True False - Freeze + Panes - + @@ -8016,7 +8016,7 @@ - + @@ -8174,7 +8174,232 @@ - + + + True + False + 3 + 3 + 6 + 6 + 3 + 3 + + + True + False + View + + + + + + + + + + 0 + 2 + 4 + + + + + True + False + vertical + + + 4 + 0 + 3 + + + + + True + True + center + True + both-horiz + False + + + True + False + .uno:ViewRowColumnHeaders + + + False + False + + + + + 1 + 0 + + + + + True + True + center + True + both-horiz + False + + + True + False + .uno:ToggleSheetGrid + + + False + False + + + + + 1 + 1 + + + + + True + True + center + True + both-horiz + False + + + True + False + .uno:Menubar + + + False + True + + + + + 2 + 0 + + + + + True + True + center + True + both-horiz + False + + + True + False + .uno:InputLineVisible + + + False + True + + + + + 2 + 1 + + + + + True + True + both-horiz + False + + + True + False + .uno:ViewValueHighlighting + + + False + True + + + + + 3 + 0 + + + + + True + True + both-horiz + False + + + True + False + .uno:ToggleFormula + + + False + True + + + + + 3 + 1 + + + + + True + True + center + True + both + False + 3 + + + True + False + .uno:ChangeTheme + + + False + True + + + + + 0 + 0 + 2 + + + + + + + + False + True + 2 + + + + True False @@ -8200,7 +8425,7 @@ 0 2 - 6 + 2 @@ -8210,11 +8435,80 @@ vertical - 6 + 2 0 3 + + + True + False + both-horiz + False + + + True + False + .uno:ViewColumnRowHighlighting + + + False + True + + + + + 1 + 0 + + + + + True + False + both-horiz + False + + + True + False + .uno:ViewHiddenColRow + + + False + True + + + + + 1 + 1 + + + + + True + False + both-horiz + False + + + True + False + .uno:DesignerDialog + + + False + True + + + + + 0 + 1 + + True @@ -8226,6 +8520,7 @@ True + False .uno:Sidebar @@ -8234,241 +8529,9 @@ - - 1 - 0 - - - - - True - True - center - True - both-horiz - False - - - True - .uno:ViewRowColumnHeaders - - - False - False - - - - - 2 - 0 - - - - - True - True - center - True - both-horiz - False - - - True - .uno:ToggleSheetGrid - - - False - False - - - - - 2 - 1 - - - - - True - True - center - True - both-horiz - False - - - True - .uno:Menubar - - - False - True - - - - - 3 - 0 - - - - - True - True - center - True - both-horiz - False - - - True - .uno:InputLineVisible - - - False - True - - - - - 3 - 1 - - - - - True - True - both-horiz - False - - - True - .uno:ViewValueHighlighting - - - False - True - - - - - 4 - 0 - - - - - True - True - both-horiz - False - - - True - .uno:ToggleFormula - - - False - True - - - - - 4 - 1 - - - - - True - False - both-horiz - False - - - True - .uno:ViewColumnRowHighlighting - - - False - True - - - - - 5 - 0 - - - - - True - False - both-horiz - False - - - True - .uno:ViewHiddenColRow - - - False - True - - - - - 5 - 1 - - - - - True - False - both-horiz - False - - - True - .uno:FunctionBox - - - False - True - - - - - 1 - 1 - - - - - True - True - center - True - both - False - 3 - - - True - .uno:ChangeTheme - - - False - True - - - 0 0 - 2 diff --git a/solenv/sanitizers/ui/modules/scalc.suppr b/solenv/sanitizers/ui/modules/scalc.suppr index e8d96743e968..7e1e5efaf612 100644 --- a/solenv/sanitizers/ui/modules/scalc.suppr +++ b/solenv/sanitizers/ui/modules/scalc.suppr @@ -542,7 +542,7 @@ sc/uiconfig/scalc/ui/notebookbar.ui://GtkToolButton[@id='btnReviewRedactDoc'] bu sc/uiconfig/scalc/ui/notebookbar.ui://GtkToolButton[@id='btnReviewAcceptChanges'] button-no-label sc/uiconfig/scalc/ui/notebookbar.ui://GtkToolButton[@id='btnViewViewColumnRowHighlighting'] button-no-label sc/uiconfig/scalc/ui/notebookbar.ui://GtkToolButton[@id='btnViewViewHiddenColRow'] button-no-label -sc/uiconfig/scalc/ui/notebookbar.ui://GtkToolButton[@id='btnInsertFunctionBox1'] button-no-label +sc/uiconfig/scalc/ui/notebookbar.ui://GtkToolButton[@id='btnInsertDesignerDialog'] button-no-label sc/uiconfig/scalc/ui/notebookbar.ui://GtkToolButton[@id='btnViewViewValueHighlighting'] button-no-label sc/uiconfig/scalc/ui/notebookbar.ui://GtkToolButton[@id='btnViewToggleFormula'] button-no-label sc/uiconfig/scalc/ui/notebookbar.ui://GtkToolButton[@id='btnViewChangeTheme'] button-no-label From c3dad394281c8914eb3f235a9cb9c616f60d8094 Mon Sep 17 00:00:00 2001 From: Xisco Fauli Date: Mon, 5 Oct 2026 10:54:23 +0200 Subject: [PATCH 188/289] hunspell: upgrade to 1.7.5 Downloaded from https://github.com/hunspell/hunspell/releases/download/v1.7.5/hunspell-1.7.5.tar.gz Change-Id: I5b88276a1ebc58f870fb15deceab81de3a412edd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211806 Tested-by: Jenkins Reviewed-by: Xisco Fauli --- download.lst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/download.lst b/download.lst index d59b78070171..0844cd86494e 100644 --- a/download.lst +++ b/download.lst @@ -302,8 +302,8 @@ HSQLDB_TARBALL := 17410483b5b5f267aa18b7e00b65e6e0-hsqldb_1_8_0.zip # three static lines # so that git cherry-pick # will not run into conflicts -HUNSPELL_SHA256SUM := 66ec82a577395fe9d471504267e6dd04615c76517c61af7c6b9c19e5e34e73c8 -HUNSPELL_TARBALL := hunspell-1.7.4.tar.gz +HUNSPELL_SHA256SUM := 2e559f0c2a592ba48e421477f58e9bf7e01062277a4a7821afb52fc9401010ae +HUNSPELL_TARBALL := hunspell-1.7.5.tar.gz # three static lines # so that git cherry-pick # will not run into conflicts From e7bbe1600d8eacf2cf265e68094f14769c4ca7a1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Szymon=20K=C5=82os?= Date: Wed, 23 Sep 2026 10:59:07 +0000 Subject: [PATCH 189/289] undo: group crop operations to revert in one step MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - in Writer when crop was done on an image, to revert it the user needed click many times Undo - group undo operations for crop (size, position, etc) Signed-off-by: Szymon Kłos Change-Id: I29d80e0b1abec67f2b48419e681908bfbcd648b8 Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/13363 Tested-by: Jenkins CPCI Reviewed-by: Tomaž Vajngerl (cherry picked from commit 3e57770dc8780abc60f16111cbf6f8b0c0aadb89) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211534 Reviewed-by: Xisco Fauli Tested-by: Jenkins --- sw/CppunitTest_sw_core_undo.mk | 1 + sw/qa/core/undo/undo.cxx | 73 +++++++++++++++++++++++++++++++++ sw/source/core/draw/dflyobj.cxx | 5 ++- 3 files changed, 77 insertions(+), 2 deletions(-) diff --git a/sw/CppunitTest_sw_core_undo.mk b/sw/CppunitTest_sw_core_undo.mk index ea7f0becf02f..967324d9e9c3 100644 --- a/sw/CppunitTest_sw_core_undo.mk +++ b/sw/CppunitTest_sw_core_undo.mk @@ -21,6 +21,7 @@ $(eval $(call gb_CppunitTest_use_libraries,sw_core_undo, \ comphelper \ cppu \ cppuhelper \ + editeng \ sal \ sfx \ subsequenttest \ diff --git a/sw/qa/core/undo/undo.cxx b/sw/qa/core/undo/undo.cxx index 5355eb4e9249..951a89a09c97 100644 --- a/sw/qa/core/undo/undo.cxx +++ b/sw/qa/core/undo/undo.cxx @@ -37,6 +37,17 @@ #include #include +#include +#include + +#include + +#include +#include + +#include +#include + /// Covers sw/source/core/undo/ fixes. class SwCoreUndoTest : public SwModelTestBase { @@ -332,6 +343,68 @@ CPPUNIT_TEST_FIXTURE(SwCoreUndoTest, testImagePropsCreateUndoAndModifyDoc) CPPUNIT_ASSERT(!pWrtShell->GetLastUndoInfo(nullptr, nullptr, nullptr)); } +CPPUNIT_TEST_FIXTURE(SwCoreUndoTest, testCropImageSingleUndo) +{ + // Cropping an image by dragging a handle is a single undo step. + createSwDoc("image-as-character.odt"); + SwXTextDocument* pTextDoc = getSwTextDoc(); + uno::Any aImage = pTextDoc->getGraphicObjects()->getByName(u"Image1"_ustr); + uno::Reference xImage(aImage, uno::UNO_QUERY_THROW); + + auto getCrop = [&xImage] { + css::text::GraphicCrop aCrop; + xImage->getPropertyValue(u"GraphicCrop"_ustr) >>= aCrop; + return aCrop; + }; + + const auto& rFormats = *getSwDoc()->GetSpzFrameFormats(); + CPPUNIT_ASSERT_EQUAL(static_cast(1), rFormats.size()); + const Size aOldSize = rFormats[0]->GetFrameSize().GetSize(); + CPPUNIT_ASSERT_EQUAL(sal_Int32(0), getCrop().Left); + CPPUNIT_ASSERT_EQUAL(sal_Int32(0), getCrop().Top); + + // Select the image and enter crop mode. + uno::Reference xSelectionSupplier( + pTextDoc->getCurrentController(), uno::UNO_QUERY_THROW); + xSelectionSupplier->select(aImage); + getSwDocShell()->GetView()->StopShellTimer(); + dispatchCommand(mxComponent, u".uno:Crop"_ustr, {}); + + SwWrtShell* pWrtShell = getSwDocShell()->GetWrtShell(); + const SdrHdlList& rHdlList = pWrtShell->GetDrawView()->GetHdlList(); + const SdrHdl* pTopLeft = rHdlList.GetHdl(0); + const SdrHdl* pBottomRight = rHdlList.GetHdl(7); + CPPUNIT_ASSERT(pTopLeft); + CPPUNIT_ASSERT(pBottomRight); + CPPUNIT_ASSERT_EQUAL(SdrHdlKind::UpperLeft, pTopLeft->GetKind()); + CPPUNIT_ASSERT_EQUAL(SdrHdlKind::LowerRight, pBottomRight->GetKind()); + + // Drag the upper left handle a quarter of the way towards the lower right one. + const Point aNewPos( + pTopLeft->GetPos().X() + (pBottomRight->GetPos().X() - pTopLeft->GetPos().X()) / 4, + pTopLeft->GetPos().Y() + (pBottomRight->GetPos().Y() - pTopLeft->GetPos().Y()) / 4); + uno::Sequence aArgs(comphelper::InitPropertySequence({ + { u"HandleNum"_ustr, uno::Any(sal_Int32(0)) }, + { u"NewPosX"_ustr, uno::Any(static_cast(aNewPos.X())) }, + { u"NewPosY"_ustr, uno::Any(static_cast(aNewPos.Y())) }, + })); + dispatchCommand(mxComponent, u".uno:MoveShapeHandle"_ustr, aArgs); + + CPPUNIT_ASSERT_GREATER(sal_Int32(0), getCrop().Left); + CPPUNIT_ASSERT_GREATER(sal_Int32(0), getCrop().Top); + CPPUNIT_ASSERT_LESS(aOldSize.Width(), rFormats[0]->GetFrameSize().GetWidth()); + + dispatchCommand(mxComponent, u".uno:Undo"_ustr, {}); + + // Without the fix, the crop was left for a second undo, so this failed with: + // - Expected: 0 + // - Actual : 1270 + // i.e. the frame had its original size back while the graphic stayed cropped. + CPPUNIT_ASSERT_EQUAL(sal_Int32(0), getCrop().Left); + CPPUNIT_ASSERT_EQUAL(sal_Int32(0), getCrop().Top); + CPPUNIT_ASSERT_EQUAL(aOldSize, rFormats[0]->GetFrameSize().GetSize()); +} + CPPUNIT_TEST_FIXTURE(SwCoreUndoTest, testAnchorTypeChangePosition) { // Given a document with a textbox (draw + fly format pair) + an inner image: diff --git a/sw/source/core/draw/dflyobj.cxx b/sw/source/core/draw/dflyobj.cxx index 36397d3fab20..4beee5d9f35a 100644 --- a/sw/source/core/draw/dflyobj.cxx +++ b/sw/source/core/draw/dflyobj.cxx @@ -913,7 +913,8 @@ void SwVirtFlyDrawObj::NbcCrop(const basegfx::B2DPoint& rRef, double fxFact, dou // Apply values pSh->StartAllAction(); - // pSh->StartUndo(SwUndoId::START); + // Group: crop changes the crop item, the frame size and possibly the position. + pSh->StartUndo(SwUndoId::START); // Set new crop values in twips aCrop.SetLeft (o3tl::toTwips(nLeftCrop, o3tl::Length::mm100)); @@ -978,7 +979,7 @@ void SwVirtFlyDrawObj::NbcCrop(const basegfx::B2DPoint& rRef, double fxFact, dou NbcMove(aDeltaMove); } - // pSh->EndUndo(SwUndoId::END); + pSh->EndUndo(SwUndoId::END); pSh->EndAllAction(); } From 63301fc8d2285aa44346305a1f4f05a7ff3a8ae1 Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Sun, 3 May 2026 19:49:26 +0200 Subject: [PATCH 190/289] Prevent assertion in loplugin:cppunitassertequals > clang++: /home/sberg/github.com/llvm/llvm-project/clang/lib/AST/ExprConstant.cpp:22171: bool clang::Expr::isCXX11ConstantExpr(const ASTContext &, APValue *) const: Assertion `!isValueDependent() && "Expression evaluator can't be called on a dependent expression."' failed. as seen at engine/sc/qa/unit/ucalc_pivottable.cxx:269 > CPPUNIT_ASSERT_EQUAL_MESSAGE("Unexpected data range.", > static_cast(FieldCount - 1), nCol2); since 94299df72efeddb3d5af31396f5008300d66a90d "sc: Use #SPILL! error if the pivot table output is blocked" Signed-off-by: Stephan Bergmann Change-Id: I83f7949a7458ce030c13e94e2d9682ae080cc763 Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/1895 Tested-by: Jenkins CPCI Reviewed-by: Michael Stahl (cherry picked from commit c3dec06e55716011a69d7b47163747007e05d905) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211834 Tested-by: Xisco Fauli Reviewed-by: Xisco Fauli --- compilerplugins/clang/cppunitassertequals.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compilerplugins/clang/cppunitassertequals.cxx b/compilerplugins/clang/cppunitassertequals.cxx index df50f57537bc..640d8de81ccf 100644 --- a/compilerplugins/clang/cppunitassertequals.cxx +++ b/compilerplugins/clang/cppunitassertequals.cxx @@ -232,7 +232,7 @@ Expr const * stripConstructor(Expr const * expr) { bool CppunitAssertEquals::isCompileTimeConstant(Expr const * expr) { - if (expr->isCXX11ConstantExpr(compiler.getASTContext())) + if (!expr->isValueDependent() && expr->isCXX11ConstantExpr(compiler.getASTContext())) return true; // is string literal ? expr = expr->IgnoreParenImpCasts(); From ddb73f15387fb002d007e3b7656cb3850d13b9d8 Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Sun, 4 Oct 2026 21:01:32 +0200 Subject: [PATCH 191/289] Adapt compilerplugins to isCXX11ConstantExpr signature change ...in "[clang][AST] Make Result parameter of `isCXX11ConstantExpr` mandatory (#226493)" towards LLVM 24 Signed-off-by: Stephan Bergmann Change-Id: I1f7d859559d095ab79e28a86a441c9c756b3fef7 Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/14253 Tested-by: Jenkins CPCI Reviewed-by: Noel Grandin (cherry picked from commit 361d0cf87c1ed06f5437ec03c33f317bf8d9b864) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211835 Reviewed-by: Xisco Fauli Tested-by: Jenkins --- compilerplugins/clang/buriedassign.cxx | 9 +++++++-- compilerplugins/clang/colorcheck.cxx | 4 +++- compilerplugins/clang/compat.hxx | 10 ++++++++++ compilerplugins/clang/conststringvar.cxx | 3 ++- compilerplugins/clang/consttobool.cxx | 3 ++- compilerplugins/clang/cppunitassertequals.cxx | 6 +++++- compilerplugins/clang/fieldcanbelocal.cxx | 3 ++- compilerplugins/clang/getimplementationname.cxx | 3 ++- compilerplugins/clang/stringconstant.cxx | 2 +- 9 files changed, 34 insertions(+), 9 deletions(-) diff --git a/compilerplugins/clang/buriedassign.cxx b/compilerplugins/clang/buriedassign.cxx index 2974f84be998..1ee5f65ce8d6 100644 --- a/compilerplugins/clang/buriedassign.cxx +++ b/compilerplugins/clang/buriedassign.cxx @@ -14,6 +14,7 @@ #include "plugin.hxx" #include "check.hxx" +#include "compat.hxx" #include "config_clang.h" #include "clang/AST/CXXInheritance.h" #include "clang/AST/StmtVisitor.h" @@ -441,8 +442,10 @@ bool BuriedAssign::VisitIfStmt(IfStmt const* ifStmt) if (auto binaryOp2 = dyn_cast(binaryOp->getLHS()->IgnoreParenImpCasts())) { + APValue res; if (!binaryOp->getRHS()->isValueDependent() - && binaryOp->getRHS()->isCXX11ConstantExpr(compiler.getASTContext()) + && compat::isCXX11ConstantExpr(binaryOp->getRHS(), compiler.getASTContext(), + res) && isAssignmentOp(binaryOp2->getOpcode())) report(DiagnosticsEngine::Warning, "buried assignment, rather put on own line", expr->getBeginLoc()) @@ -451,8 +454,10 @@ bool BuriedAssign::VisitIfStmt(IfStmt const* ifStmt) if (auto binaryOp2 = dyn_cast(binaryOp->getRHS()->IgnoreParenImpCasts())) { + APValue res; if (!binaryOp->getLHS()->isValueDependent() - && binaryOp->getLHS()->isCXX11ConstantExpr(compiler.getASTContext()) + && compat::isCXX11ConstantExpr(binaryOp->getLHS(), compiler.getASTContext(), + res) && isAssignmentOp(binaryOp2->getOpcode())) report(DiagnosticsEngine::Warning, "buried assignment, rather put on own line", expr->getBeginLoc()) diff --git a/compilerplugins/clang/colorcheck.cxx b/compilerplugins/clang/colorcheck.cxx index 7480222900d2..38f644c6f4e3 100644 --- a/compilerplugins/clang/colorcheck.cxx +++ b/compilerplugins/clang/colorcheck.cxx @@ -19,6 +19,7 @@ #include "config_clang.h" #include "check.hxx" +#include "compat.hxx" #include "plugin.hxx" /** @@ -69,7 +70,8 @@ bool ColorCheck::VisitCXXConstructExpr(const CXXConstructExpr* constructExpr) return true; auto arg0 = constructExpr->getArg(0); - if (arg0->isCXX11ConstantExpr(compiler.getASTContext())) + APValue res; + if (compat::isCXX11ConstantExpr(arg0, compiler.getASTContext(), res)) { if (!arg0->isValueDependent()) { diff --git a/compilerplugins/clang/compat.hxx b/compilerplugins/clang/compat.hxx index 03d6c3c6ac74..727233a8c936 100644 --- a/compilerplugins/clang/compat.hxx +++ b/compilerplugins/clang/compat.hxx @@ -120,6 +120,16 @@ inline const clang::Expr *getSubExprAsWritten(const clang::CastExpr *This) { return getSubExprAsWritten(const_cast(This)); } +inline bool isCXX11ConstantExpr( + clang::Expr const * expr, clang::ASTContext const & Ctx, clang::APValue & Result) +{ +#if CLANG_VERSION >= 240000 + return expr->isCXX11ConstantExpr(Ctx, Result); +#else + return expr->isCXX11ConstantExpr(Ctx, &Result); +#endif +} + inline bool isUnnamedBitField(clang::FieldDecl const * decl) { #if CLANG_VERSION >= 190000 return decl->isUnnamedBitField(); diff --git a/compilerplugins/clang/conststringvar.cxx b/compilerplugins/clang/conststringvar.cxx index 99cfb01c06f7..86b8be50bf77 100644 --- a/compilerplugins/clang/conststringvar.cxx +++ b/compilerplugins/clang/conststringvar.cxx @@ -12,6 +12,7 @@ #include #include "check.hxx" +#include "compat.hxx" #include "plugin.hxx" // Find non-const vars of 'char const *' type initialized with a const expr, @@ -122,7 +123,7 @@ public: return true; } APValue v; - if (!init->isCXX11ConstantExpr(compiler.getASTContext(), &v)) { + if (!compat::isCXX11ConstantExpr(init, compiler.getASTContext(), v)) { return true; } vars_.insert(decl); diff --git a/compilerplugins/clang/consttobool.cxx b/compilerplugins/clang/consttobool.cxx index 831ef6d300ac..5e4e59d698c0 100644 --- a/compilerplugins/clang/consttobool.cxx +++ b/compilerplugins/clang/consttobool.cxx @@ -16,6 +16,7 @@ #include "clang/Basic/Builtins.h" #include "check.hxx" +#include "compat.hxx" #include "plugin.hxx" // Find implicit conversions from non-'bool' constants (e.g., 'sal_False') to 'bool'. @@ -156,7 +157,7 @@ public: return true; } APValue res; - if (!sub->isCXX11ConstantExpr(compiler.getASTContext(), &res)) + if (!compat::isCXX11ConstantExpr(sub, compiler.getASTContext(), res)) { return true; } diff --git a/compilerplugins/clang/cppunitassertequals.cxx b/compilerplugins/clang/cppunitassertequals.cxx index 640d8de81ccf..5b5b054957ea 100644 --- a/compilerplugins/clang/cppunitassertequals.cxx +++ b/compilerplugins/clang/cppunitassertequals.cxx @@ -232,8 +232,12 @@ Expr const * stripConstructor(Expr const * expr) { bool CppunitAssertEquals::isCompileTimeConstant(Expr const * expr) { - if (!expr->isValueDependent() && expr->isCXX11ConstantExpr(compiler.getASTContext())) + APValue res; + if (!expr->isValueDependent() + && compat::isCXX11ConstantExpr(expr, compiler.getASTContext(), res)) + { return true; + } // is string literal ? expr = expr->IgnoreParenImpCasts(); expr = stripConstructor(expr); diff --git a/compilerplugins/clang/fieldcanbelocal.cxx b/compilerplugins/clang/fieldcanbelocal.cxx index 4a50ca81b799..52388e3ca297 100644 --- a/compilerplugins/clang/fieldcanbelocal.cxx +++ b/compilerplugins/clang/fieldcanbelocal.cxx @@ -453,7 +453,8 @@ bool FieldCanBeLocal::isSomeKindOfConstant(const Expr* arg) assert(arg); if (arg->isValueDependent()) return false; - return arg->isCXX11ConstantExpr(compiler.getASTContext()); + APValue res; + return compat::isCXX11ConstantExpr(arg, compiler.getASTContext(), res); } loplugin::Plugin::Registration X("fieldcanbelocal", false); diff --git a/compilerplugins/clang/getimplementationname.cxx b/compilerplugins/clang/getimplementationname.cxx index 9c91a62310c2..034d73f49084 100644 --- a/compilerplugins/clang/getimplementationname.cxx +++ b/compilerplugins/clang/getimplementationname.cxx @@ -20,6 +20,7 @@ #include #include #include "check.hxx" +#include "compat.hxx" #include "plugin.hxx" #include "clang/Frontend/CompilerInstance.h" @@ -177,7 +178,7 @@ bool GetImplementationName::isStringConstant( return true; } APValue v; - if (!expr->isCXX11ConstantExpr(compiler.getASTContext(), &v)) { + if (!compat::isCXX11ConstantExpr(expr, compiler.getASTContext(), v)) { return false; } switch (v.getKind()) { diff --git a/compilerplugins/clang/stringconstant.cxx b/compilerplugins/clang/stringconstant.cxx index c3d4d538f02d..791b3707cb00 100644 --- a/compilerplugins/clang/stringconstant.cxx +++ b/compilerplugins/clang/stringconstant.cxx @@ -1557,7 +1557,7 @@ bool StringConstant::isStringConstant( return true; } APValue v; - if (!expr->isCXX11ConstantExpr(compiler.getASTContext(), &v)) { + if (!compat::isCXX11ConstantExpr(expr, compiler.getASTContext(), v)) { return false; } switch (v.getKind()) { From 0cc2e2cbc789e0f97b3baeba786b989910b4ed99 Mon Sep 17 00:00:00 2001 From: Xisco Fauli Date: Mon, 5 Oct 2026 11:01:27 +0200 Subject: [PATCH 192/289] poppler: upgrade to 26.10 Downloaded from https://poppler.freedesktop.org/poppler-26.10.0.tar.xz Change-Id: I2124d5792fcf13c9d4667b80606e4aaa07e30067 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211808 Tested-by: Jenkins Reviewed-by: Xisco Fauli --- download.lst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/download.lst b/download.lst index 0844cd86494e..3b5ed6deceaa 100644 --- a/download.lst +++ b/download.lst @@ -569,8 +569,8 @@ LIBTIFF_TARBALL := tiff-4.7.2.tar.xz # three static lines # so that git cherry-pick # will not run into conflicts -POPPLER_SHA256SUM := dc906e68cea698109706ac6aa3d2c9d4512fcfcac42d90b8afcda486d1b9abd0 -POPPLER_TARBALL := poppler-26.08.0.tar.xz +POPPLER_SHA256SUM := 6792cb7c69205007ad87d2e936cecc5b3a31fac29ab54ffc3175fdb6b2a6ce35 +POPPLER_TARBALL := poppler-26.10.0.tar.xz POPPLER_DATA_SHA256SUM := c835b640a40ce357e1b83666aabd95edffa24ddddd49b8daff63adb851cdab74 POPPLER_DATA_TARBALL := poppler-data-0.4.12.tar.gz # three static lines From 59caa00abaec7b9df546f2f66dbfb55986464c8f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= Date: Wed, 30 Sep 2026 22:08:33 +0000 Subject: [PATCH 193/289] put refreshing database range imports under the link update control MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit like area links, sheet links, DDE and data mappings, so the refresh timer waits until link updates are allowed, and a database range that re-imports on a refresh delay counts as an external link so the update links infobar is offered for it Signed-off-by: Caolán McNamara Change-Id: I470e80249cdbf5c4c65c7888e9873515b238d1a6 Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/13975 Reviewed-by: Miklos Vajna Tested-by: Jenkins CPCI (cherry picked from commit 783c4ec2b092231fce5e87cb1a7451773cea7018) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211797 Reviewed-by: Xisco Fauli Tested-by: Jenkins --- sc/inc/document.hxx | 4 +++ sc/inc/table.hxx | 1 + .../data/dataprovider/dbimportrefresh.fods | 18 ++++++++++ sc/qa/unit/dataproviders_test.cxx | 29 +++++++++++++++ sc/source/core/data/document10.cxx | 36 ++++++++++++++++++- sc/source/ui/docshell/docsh5.cxx | 5 +++ 6 files changed, 92 insertions(+), 1 deletion(-) create mode 100644 sc/qa/unit/data/dataprovider/dbimportrefresh.fods diff --git a/sc/inc/document.hxx b/sc/inc/document.hxx index ff0e457a6043..2e88cc312df0 100644 --- a/sc/inc/document.hxx +++ b/sc/inc/document.hxx @@ -962,6 +962,10 @@ public: none. */ SC_DLLPUBLIC bool HasDataProviderMappings() const; + /** True when the document holds a database range that imports from a data source again each + time its refresh delay runs out. */ + bool HasRefreshingDBImport() const; + /** True when a pivot table takes its data from a database document named by URL rather than from a registered data source. */ bool HasDataPilotDatabaseLink() const; diff --git a/sc/inc/table.hxx b/sc/inc/table.hxx index 5aa29ae03e68..9fa40f5d1df6 100644 --- a/sc/inc/table.hxx +++ b/sc/inc/table.hxx @@ -398,6 +398,7 @@ public: void SetAnonymousDBData(std::unique_ptr pDBData); ScDBData* GetAnonymousDBData() { return pDBDataNoName.get();} + const ScDBData* GetAnonymousDBData() const { return pDBDataNoName.get(); } const OUString& GetCodeName() const { return aCodeName; } void SetCodeName( const OUString& rNewName ) { aCodeName = rNewName; } diff --git a/sc/qa/unit/data/dataprovider/dbimportrefresh.fods b/sc/qa/unit/data/dataprovider/dbimportrefresh.fods new file mode 100644 index 000000000000..5582abaee625 --- /dev/null +++ b/sc/qa/unit/data/dataprovider/dbimportrefresh.fods @@ -0,0 +1,18 @@ + + + + + + + + unchanged + + + + + + + + + + diff --git a/sc/qa/unit/dataproviders_test.cxx b/sc/qa/unit/dataproviders_test.cxx index e72531b0b6ef..64c735120cf3 100644 --- a/sc/qa/unit/dataproviders_test.cxx +++ b/sc/qa/unit/dataproviders_test.cxx @@ -38,6 +38,7 @@ public: void testTdf169541_TwoDataMapping(); void testTdf169610_SortTransform(); void testLinkUpdateGate(); + void testDBImportRefreshDeferred(); CPPUNIT_TEST_SUITE(ScDataProvidersTest); CPPUNIT_TEST(testCSVImport); @@ -48,6 +49,7 @@ public: CPPUNIT_TEST(testTdf169541_TwoDataMapping); CPPUNIT_TEST(testTdf169610_SortTransform); CPPUNIT_TEST(testLinkUpdateGate); + CPPUNIT_TEST(testDBImportRefreshDeferred); CPPUNIT_TEST_SUITE_END(); }; @@ -345,6 +347,33 @@ void ScDataProvidersTest::testLinkUpdateGate() CPPUNIT_ASSERT_EQUAL(u"changed"_ustr, pDoc->GetString(0, 0, 0)); } +void ScDataProvidersTest::testDBImportRefreshDeferred() +{ + // A database range that imports from a data source on a refresh delay is an external link. + // Its refresh must not fetch the data until the user allows link updating. + createScDoc("dbimportrefresh.fods"); + ScDocument* pDoc = getScDoc(); + CPPUNIT_ASSERT(pDoc); + ScDocShell* pDocShell = getScDocShell(); + CPPUNIT_ASSERT(pDocShell); + + // The document counts as having external links, so the user is asked about updating. + CPPUNIT_ASSERT(pDoc->HasExternalLinks()); + + ScDBData* pDBData = pDoc->GetDBCollection()->getNamedDBs().findByUpperName(u"MYIMPORT"_ustr); + CPPUNIT_ASSERT(pDBData); + + // With updating not allowed, the refresh leaves the saved value. + pDocShell->GetEmbeddedObjectContainer().setUserAllowsLinkUpdate(false); + pDBData->Timer::Invoke(); + CPPUNIT_ASSERT_EQUAL(u"unchanged"_ustr, pDoc->GetString(0, 0, 0)); + + // Once the user allows updating, the next refresh imports the data source. + pDocShell->GetEmbeddedObjectContainer().setUserAllowsLinkUpdate(true); + pDBData->Timer::Invoke(); + CPPUNIT_ASSERT_EQUAL(u"Identifier"_ustr, pDoc->GetString(0, 0, 0)); +} + ScDataProvidersTest::ScDataProvidersTest() : ScModelTestBase(u"sc/qa/unit/data/dataprovider"_ustr) { diff --git a/sc/source/core/data/document10.cxx b/sc/source/core/data/document10.cxx index 714164aae387..97c19be79be9 100644 --- a/sc/source/core/data/document10.cxx +++ b/sc/source/core/data/document10.cxx @@ -1049,6 +1049,40 @@ bool ScDocument::HasDataProviderMappings() const return mpDataMapper && !mpDataMapper->getDataSources().empty(); } +namespace +{ +bool isRefreshingImport(const ScDBData* pData) +{ + return pData && pData->HasImportParam() && pData->GetRefreshDelaySeconds() > 0; +} +} + +bool ScDocument::HasRefreshingDBImport() const +{ + if (isRefreshingImport(mpAnonymousDBData.get())) + return true; + + if (pDBCollection) + { + for (const auto& rxData : pDBCollection->getNamedDBs()) + if (isRefreshingImport(rxData.get())) + return true; + for (const auto& rxData : pDBCollection->getAnonDBs()) + if (isRefreshingImport(rxData.get())) + return true; + } + + SCTAB nTabCount = GetTableCount(); + for (SCTAB nTab = 0; nTab < nTabCount; ++nTab) + { + const ScTable* pTable = FetchTable(nTab); + if (pTable && isRefreshingImport(pTable->GetAnonymousDBData())) + return true; + } + + return false; +} + bool ScDocument::HasDataPilotDatabaseLink() const { if (!pDPCollection) @@ -1074,7 +1108,7 @@ bool ScDocument::HasExternalLinks() const if (IsLinked(nTab)) return true; - if (HasLinkFormulaNeedingCheck() || HasDataProviderMappings() + if (HasLinkFormulaNeedingCheck() || HasDataProviderMappings() || HasRefreshingDBImport() || HasDataPilotDatabaseLink() || GetDocLinkManager().hasUpdatableLinks()) return true; diff --git a/sc/source/ui/docshell/docsh5.cxx b/sc/source/ui/docshell/docsh5.cxx index 5d912c423a33..2be1114274ee 100644 --- a/sc/source/ui/docshell/docsh5.cxx +++ b/sc/source/ui/docshell/docsh5.cxx @@ -1163,6 +1163,11 @@ bool ScDocShell::MoveTable( SCTAB nSrcTab, SCTAB nDestTab, bool bCopy, bool bRec IMPL_LINK( ScDocShell, RefreshDBDataHdl, Timer*, pRefreshTimer, void ) { + // The timer keeps running, so the import starts at the first refresh after the user allows + // link updates. + if (!GetEmbeddedObjectContainer().getUserAllowsLinkUpdate()) + return; + ScDBDocFunc aFunc(*this); ScDBData* pDBData = static_cast(pRefreshTimer); From 24e58dc2c2721fb096e6d60e431695cdda565c42 Mon Sep 17 00:00:00 2001 From: Neil Roberts Date: Fri, 2 Oct 2026 16:16:33 +0200 Subject: [PATCH 194/289] SwXTextPortionEnumeration: Use UnoCursorPointer::get() instead of &* MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Using &* can be problematic if the pointer is null. In this case I don’t think it matters, but using UnoCursorPointer::get() is probably easier to understand anyway. This also paves the way for a later compiler plugin to check for this. Change-Id: Ic825149a64e945ad623d1a23ee8ca24655182b3e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211754 Tested-by: Jenkins Reviewed-by: Neil Roberts --- sw/source/core/unocore/unoportenum.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sw/source/core/unocore/unoportenum.cxx b/sw/source/core/unocore/unoportenum.cxx index 55a30b145ea1..527340d777dc 100644 --- a/sw/source/core/unocore/unoportenum.cxx +++ b/sw/source/core/unocore/unoportenum.cxx @@ -326,7 +326,7 @@ SwXTextPortionEnumeration::SwXTextPortionEnumeration( // find all frames, graphics and OLEs that are bound AT character in para FrameClientSortList_t frames; ::CollectFrameAtNode(m_pUnoCursor->GetPoint()->GetNode(), frames, true); - lcl_CreatePortions(m_Portions, xParentText, &*m_pUnoCursor, frames, nStart, nEnd, bOnlyTextFields); + lcl_CreatePortions(m_Portions, xParentText, m_pUnoCursor.get(), frames, nStart, nEnd, bOnlyTextFields); } SwXTextPortionEnumeration::SwXTextPortionEnumeration( From c8f0fd8d1174cb3bb42a5eb2393dc3728a37e673 Mon Sep 17 00:00:00 2001 From: Xisco Fauli Date: Mon, 5 Oct 2026 13:41:40 +0200 Subject: [PATCH 195/289] fast_float: upgrade to 8.3.1 Downloaded from https://github.com/fastfloat/fast_float/archive/refs/tags/v8.3.1.tar.gz Change-Id: I6ab88acea962c1cc1ec6f0af4df991eebf99c2e5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211820 Tested-by: Jenkins Reviewed-by: Xisco Fauli --- download.lst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/download.lst b/download.lst index 3b5ed6deceaa..0eae61a3bc63 100644 --- a/download.lst +++ b/download.lst @@ -65,8 +65,8 @@ DRAGONBOX_TARBALL := dragonbox-1.1.3.tar.gz # three static lines # so that git cherry-pick # will not run into conflicts -FAST_FLOAT_SHA256SUM := 90485994d0fed61d0693e8dba32c464b0e8adf7f2e7c2efbf5bff0df5ef5b13f -FAST_FLOAT_TARBALL := fast_float-8.3.0.tar.gz +FAST_FLOAT_SHA256SUM := 7ff47ad261068517561beb0a7c1d57131f71b8be19bdbac2857c6a517a2eb53c +FAST_FLOAT_TARBALL := fast_float-8.3.1.tar.gz # three static lines # so that git cherry-pick # will not run into conflicts From e9263897ecce93a8ed5802932fab68bbe48ede64 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= Date: Fri, 2 Oct 2026 20:54:04 +0000 Subject: [PATCH 196/289] ofz#568590554 Integer-overflow MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit writerfilter::dmapper::BorderHandler::lcl_attribute writerfilter::rtftok::RTFReferenceProperties::resolve writerfilter::dmapper::DomainMapper::sprmWithProps \brdrw2147483647 now reaches BorderHandler as 858993458 eighths of a point, and converting that back to twips overflowed int regression since: commit 68c853c46592d3ac4c79d8dede0dd88b5a080b3e Date: Wed Sep 23 20:01:06 2026 +0000 ofz#563849779 Integer-overflow Signed-off-by: Caolán McNamara Change-Id: I5c65ffbcb3cd04a48392f1bbf67509a43914adf3 Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/14216 Reviewed-by: Noel Grandin Tested-by: Jenkins CPCI (cherry picked from commit 24c0fe4de7334a8ccfed18929078fcb48642cba4) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211810 Reviewed-by: Xisco Fauli Tested-by: Jenkins --- sw/source/writerfilter/dmapper/BorderHandler.cxx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sw/source/writerfilter/dmapper/BorderHandler.cxx b/sw/source/writerfilter/dmapper/BorderHandler.cxx index 371f4ae4ed8a..f9d8eae9c0b2 100644 --- a/sw/source/writerfilter/dmapper/BorderHandler.cxx +++ b/sw/source/writerfilter/dmapper/BorderHandler.cxx @@ -21,6 +21,7 @@ #include "PropertyMap.hxx" #include "ConversionHelper.hxx" #include +#include #include #include #include @@ -57,7 +58,8 @@ void BorderHandler::lcl_attribute(Id rName, const Value & rVal) { case NS_ooxml::LN_CT_Border_sz: // width of a single line in 1/8 pt, max of 32 pt -> twip * 5 / 2. - m_nLineWidth = nIntValue * 5 / 2; + m_nLineWidth = std::clamp(sal_Int64(nIntValue) * 5 / 2, SAL_MIN_INT32, + SAL_MAX_INT32); appendGrabBag(u"sz"_ustr, OUString::number(nIntValue)); break; case NS_ooxml::LN_CT_Border_val: From 6804c10b45d52787c1e865e3ad192d7dfc7d4862 Mon Sep 17 00:00:00 2001 From: Neil Roberts Date: Fri, 2 Oct 2026 16:16:33 +0200 Subject: [PATCH 197/289] SwXCellRange: Use UnoCursorPointer::get() instead of &* MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Using &* can be problematic if the pointer is null. In this case I don’t think it matters, but using UnoCursorPointer::get() is probably easier to understand anyway. This also paves the way for a later compiler plugin to check for this. Change-Id: I01f77acc36cd1f96c6b438b9d6db005d0b08416a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211755 Tested-by: Jenkins Reviewed-by: Neil Roberts --- sw/source/core/unocore/unotbl.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sw/source/core/unocore/unotbl.cxx b/sw/source/core/unocore/unotbl.cxx index f7866b8272e3..2164c929315d 100644 --- a/sw/source/core/unocore/unotbl.cxx +++ b/sw/source/core/unocore/unotbl.cxx @@ -3777,7 +3777,7 @@ sal_Int32 SwXCellRange::Impl::GetRowCount() const const SwUnoCursor* SwXCellRange::GetTableCursor() const { SwFrameFormat *const pFormat = m_pImpl->GetFrameFormat(); - return pFormat ? &(*m_pImpl->m_pTableCursor) : nullptr; + return pFormat ? m_pImpl->m_pTableCursor.get() : nullptr; } void SwXCellRange::Impl::Notify( const SfxHint& rHint ) From 958f1409e5985dc070054e772fbe02109f3d150a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= Date: Sun, 27 Sep 2026 23:24:50 +0000 Subject: [PATCH 198/289] note a document event from HTML import like the other HTML events MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Caolán McNamara Change-Id: I73da657a72b0ac7cb6f58d2cd766a3ab292bf8b1 Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/13667 Reviewed-by: Noel Grandin Tested-by: Jenkins CPCI Reviewed-on: https://gerrit.collaboraoffice.com/c/core/+/14076 (cherry picked from commit d5ed5aeaa64aa89329b6350ad254d88c101a8fdc) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211799 Reviewed-by: Xisco Fauli Tested-by: Jenkins --- sw/source/filter/html/htmlbas.cxx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sw/source/filter/html/htmlbas.cxx b/sw/source/filter/html/htmlbas.cxx index 0a7960b95f55..5ac123dc51e7 100644 --- a/sw/source/filter/html/htmlbas.cxx +++ b/sw/source/filter/html/htmlbas.cxx @@ -238,6 +238,8 @@ void SwHTMLParser::InsertBasicDocEvent( const OUString& aEvent, const OUString& if( !pDocSh ) return; + NotifyMacroEventRead(); + OUString sEvent(convertLineEnd(rName, GetSystemLineEnd())); OUString sScriptType; if( EXTENDED_STYPE == eScrType ) From 5044a9a5719bba9402184438e5d66586de01d20f Mon Sep 17 00:00:00 2001 From: Regina Henschel Date: Thu, 17 Sep 2026 01:52:36 +0200 Subject: [PATCH 199/289] tdf#149918 fix pie in presetShapeDefinitions.xml The preset definition pie has exchanged values for top and right of text area rectangle. This will be fixed at ISO, see https://github.com/sc34wg4/OOXMLSchemas/commit/48a982f78a37e18f4e76791d4f25eeb4877f3300 It is not known yet, when the next version of the standard will be released. However, I see no reason why we not already use the correct values. The scripts in oox/source/drawingml/customshapes/ do not work for me. Thus I have changed the values manually. Signed-off-by: Regina Henschel Change-Id: I01297f18ec61133626d8a53042049788cac0e451 Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/12814 Tested-by: Jenkins CPCI Reviewed-by: Mike Kaganski (cherry picked from commit 2ac8858b10699c897dd530c8b1434bd9604a4aff) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211861 Tested-by: Jenkins Reviewed-by: Xisco Fauli --- oox/qa/unit/data/tdf149918_pie_textarea.pptx | Bin 0 -> 15683 bytes oox/qa/unit/shape.cxx | 23 ++++++++++++++++++ .../customshapes/oox-drawingml-cs-presets | 2 +- .../customshapes/presetShapeDefinitions.xml | 2 +- oox/source/drawingml/transform2dcontext.cxx | 3 +-- 5 files changed, 26 insertions(+), 4 deletions(-) create mode 100644 oox/qa/unit/data/tdf149918_pie_textarea.pptx diff --git a/oox/qa/unit/data/tdf149918_pie_textarea.pptx b/oox/qa/unit/data/tdf149918_pie_textarea.pptx new file mode 100644 index 0000000000000000000000000000000000000000..5f60e7c01cc8f9825558c70867412257686058c2 GIT binary patch literal 15683 zcmeHubyQr-((l0F?(QDk-CcqQx8Uv&+?^nS0Kp+R1b4Tff#B{MEVx5}H#z6zCMWlN z?|tw6_15}sGd+6^dsnTh>Z-2l-M?0n143W`pa3uc0Du(GnZS_{0tNthLjeHj02pu` zF?%}~Q#%)f7ak6#&U%dQwl*X=5a2Y~0C3Rr|7rh&El`^{XxGh*5_+6?hZI+#X0-dh zgcdxEv5-+ZA9;=H?b=M5jo9F#TeZImL@=CF1bfQu)9qKs^l=kPiAsorMs*fkNg$fP ztji}gqPMa0s_t^&J1Md$V{k?){^V~@w|gzraU8%(5?>E4c{xiJ%Y7k9d0h(@lJZ<< zkUx~OFqCqY9@dN<#N?Oy6JX}X`@K-K0Z1?!=&0I?gL#i+Z!*?1~Rgrj` z#Z_xc8q<k2eIZHw|j9NU?CR zKRCFcCZrZm_g%7NeQJFDa&Wy6J22W2JD}elXMbl;tjLC!uUZl8xE;meO0A(Zme*&r zbPRqqy^D8uhhk@oCcIBNY#}aE_Sz48 zeH|djdwK!_l>QdI7B?>MfuQK!00k#JD0&T?Ol_Q*7{7o2Cu;u(hw3k?m&Py30$D&& z3%N=^LZ+pLHXvh%QHasjuyh@>Ee`SYpoKTIZ z-&I{A@@BS6bCu5Bju@+fgf*9o8%hxlDZy}3SHCpNLYz^|qmt#d=&4p$C&6*vuqR1a z6I`74o(n0@mecd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+1T^XkIh5FQ%MKpSZJPa?t1NQ43E+% z`J0YeWoG$~gx7qj-3lP|vXK-x9%=|@bx?LP4@7Gk6%YMl5c}E$1s$bEo6Jy0g-EXc z1z`XKX8@hM_~-M7Kb+^s^&d_nD#`tw!QYQS{UH2)Z3opgf9~@Cv8(?(;qT`_ev+Pn zcFcbivcH}R`JKb>==q-<9$|lh2mXqs|DDC(A-X>q002v%9hUDx{Heh|0(O6A_B%ZD zCp!j|zsd6p_Tdi*z(3mOcevwEZgikZ|GQ{^pgsR9@Z;~o{f3-4pcPPy7oPS4-{Ny}`^9$!6g8st!7jgg5qQ9dt zesW&H{gd(g(esW+U`7bx)epm4KHQP@nLX3Zk@!i}0wF>y1{P$(UPx5O$1mi6 ZWpgDtNYG^Pz4Al_RDkyUe7V2>`d@++wd()? literal 0 HcmV?d00001 diff --git a/oox/qa/unit/shape.cxx b/oox/qa/unit/shape.cxx index e1bd0654923a..d21ab1363670 100644 --- a/oox/qa/unit/shape.cxx +++ b/oox/qa/unit/shape.cxx @@ -1145,6 +1145,29 @@ CPPUNIT_TEST_FIXTURE(OoxShapeTest, testTdf170095SoftEdge3D) // - Actual : 882 CPPUNIT_ASSERT_EQUAL(static_cast(0), nSoftEdgeRad); } + +CPPUNIT_TEST_FIXTURE(OoxShapeTest, testPieTextArea) +{ + // OOXMl presetShapeDefinitions.xml has an error in text area of shape "Pie" (as of Sept 2026). + // To be compatible with PowerPoint, we immediately use a corrected version of that file without + // waiting for a fix by ISO. + loadFromFile(u"tdf149918_pie_textarea.pptx"); + uno::Reference xDrawPagesSupplier(mxComponent, uno::UNO_QUERY); + uno::Reference xDrawPage(xDrawPagesSupplier->getDrawPages()->getByIndex(0), + uno::UNO_QUERY); + uno::Reference xShapeProps(xDrawPage->getByIndex(0), uno::UNO_QUERY); + css::awt::Rectangle aBoundRect; + xShapeProps->getPropertyValue(u"BoundRect"_ustr) >>= aBoundRect; + // Without fix, size was 12009 x 7844, and position was 2008|2172. + // The text began in the upper-left corner of the logical rectangle. However it should be inside + // the underlaying ellipse of the pie. + // A BoundRect can vary depending on the system and font and therefore requires a wide tolerance. + CPPUNIT_ASSERT_DOUBLES_EQUAL(sal_Int32(10247), aBoundRect.Width, 10); + CPPUNIT_ASSERT_DOUBLES_EQUAL(sal_Int32(6673), aBoundRect.Height, 10); + CPPUNIT_ASSERT_DOUBLES_EQUAL(sal_Int32(3770), aBoundRect.X, 10); + CPPUNIT_ASSERT_DOUBLES_EQUAL(sal_Int32(3343), aBoundRect.Y, 10); +} + CPPUNIT_PLUGIN_IMPLEMENT(); /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/oox/source/drawingml/customshapes/oox-drawingml-cs-presets b/oox/source/drawingml/customshapes/oox-drawingml-cs-presets index 8c6fedab2490..402e60573c70 100644 --- a/oox/source/drawingml/customshapes/oox-drawingml-cs-presets +++ b/oox/source/drawingml/customshapes/oox-drawingml-cs-presets @@ -2305,7 +2305,7 @@ false MirroredY false Path -([]com.sun.star.beans.PropertyValue) { { Name = "Coordinates", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeParameterPair) { { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 12 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 14 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 5 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 7 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 29 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 30 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 11 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 13 }, Type = (short) 1 } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "GluePoints", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeParameterPair) { { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 12 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 13 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 11 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 12 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 13 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 11 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "GluePointLeavingDirections", Handle = (long) 0, Value = (any) { ([]long) { { Dir = (long) 2 }, { Dir = (long) 4 }, { Dir = (long) 1 }, { Dir = (long) 3 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "Segments", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeSegment) { { Command = (short) 1, Count = (short) 1 }, { Command = (short) 17, Count = (short) 1 }, { Command = (short) 2, Count = (short) 1 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "TextFrames", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeTextFrame) { { TopLeft = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 23 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 24 }, Type = (short) 1 } }, BottomRight = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 25 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 26 }, Type = (short) 1 } } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } } +([]com.sun.star.beans.PropertyValue) { { Name = "Coordinates", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeParameterPair) { { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 12 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 14 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 5 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 7 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 29 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 30 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 11 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 13 }, Type = (short) 1 } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "GluePoints", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeParameterPair) { { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 12 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 13 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 11 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 12 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 13 }, Type = (short) 1 } }, { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 11 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0 }, Type = (short) 0 } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "GluePointLeavingDirections", Handle = (long) 0, Value = (any) { ([]long) { { Dir = (long) 2 }, { Dir = (long) 4 }, { Dir = (long) 1 }, { Dir = (long) 3 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "Segments", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeSegment) { { Command = (short) 1, Count = (short) 1 }, { Command = (short) 17, Count = (short) 1 }, { Command = (short) 2, Count = (short) 1 }, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 5, Count = (short) 0 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, { Name = "TextFrames", Handle = (long) 0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeTextFrame) { { TopLeft = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 23 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 25 }, Type = (short) 1 } }, BottomRight = (com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 24 }, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 26 }, Type = (short) 1 } } } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE } } Type "ooxml-non-primitive" ViewBox diff --git a/oox/source/drawingml/customshapes/presetShapeDefinitions.xml b/oox/source/drawingml/customshapes/presetShapeDefinitions.xml index 7123e27ccdd6..cbd2da090861 100644 --- a/oox/source/drawingml/customshapes/presetShapeDefinitions.xml +++ b/oox/source/drawingml/customshapes/presetShapeDefinitions.xml @@ -14201,7 +14201,7 @@ - + diff --git a/oox/source/drawingml/transform2dcontext.cxx b/oox/source/drawingml/transform2dcontext.cxx index 25b3129c8d79..b8070a4dead6 100644 --- a/oox/source/drawingml/transform2dcontext.cxx +++ b/oox/source/drawingml/transform2dcontext.cxx @@ -70,6 +70,7 @@ bool ConstructPresetTextRectangle(Shape& rShape, awt::Rectangle& rRect) switch (nType) { case XML_ellipse: + case XML_pie: // The preset text rectangle touches the perimeter of the ellipse at 45deg. rRect.X = rShape.getPosition().X + rShape.getSize().Width * ((1.0 - M_SQRT1_2) / 2.0); rRect.Y = rShape.getPosition().Y + rShape.getSize().Height * ((1.0 - M_SQRT1_2) / 2.0); @@ -124,11 +125,9 @@ bool ConstructPresetTextRectangle(Shape& rShape, awt::Rectangle& rRect) rRect.Height = rShape.getSize().Height; return true; } - case XML_pie: case XML_rect: case XML_wedgeRectCallout: { - // When tdf#149918 is fixed, pie will need its own case rRect.X = rShape.getPosition().X; rRect.Y = rShape.getPosition().Y; rRect.Width = rShape.getSize().Width; From 9609c61799b2565e4f718a82147569a2bec0ba23 Mon Sep 17 00:00:00 2001 From: Olivier Hallot Date: Tue, 6 Oct 2026 09:56:01 -0300 Subject: [PATCH 200/289] Update git submodules * Update helpcontent2 from branch 'master' to ce0d999b0d1163a3cb4acbb58cfe50ab7555342d - tdf#152689 Add Like operator to Contents in Basic Change-Id: I79c70d405054099eb072f6c288757af142e15569 Reviewed-on: https://gerrit.libreoffice.org/c/help/+/211890 Reviewed-by: Olivier Hallot Tested-by: Jenkins --- helpcontent2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/helpcontent2 b/helpcontent2 index 157b77431ac6..ce0d999b0d11 160000 --- a/helpcontent2 +++ b/helpcontent2 @@ -1 +1 @@ -Subproject commit 157b77431ac6fa9afa795eb96098d8c36cd6dd4a +Subproject commit ce0d999b0d1163a3cb4acbb58cfe50ab7555342d From a60d879f8188f110df9825507f19fb47e033b990 Mon Sep 17 00:00:00 2001 From: Olivier Hallot Date: Tue, 6 Oct 2026 11:03:54 -0300 Subject: [PATCH 201/289] Update git submodules * Update helpcontent2 from branch 'master' to 5cb7c905920ce835f1a171c73e42b510eae6d63d - tdf#152689 Set Like operator as a VBA operator + Some refactor + Added "VBA" for StrConv + The Like operator works even without "Option VBASupport 1". However, the implementation was carried to match VBA, and restricted the patterns to VBA compatible. Change-Id: I1cbe5d9a67a27da561eb8a64b5dc6103bd036fe3 Reviewed-on: https://gerrit.libreoffice.org/c/help/+/211892 Reviewed-by: Olivier Hallot Tested-by: Jenkins --- helpcontent2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/helpcontent2 b/helpcontent2 index ce0d999b0d11..5cb7c905920c 160000 --- a/helpcontent2 +++ b/helpcontent2 @@ -1 +1 @@ -Subproject commit ce0d999b0d1163a3cb4acbb58cfe50ab7555342d +Subproject commit 5cb7c905920ce835f1a171c73e42b510eae6d63d From a6c7e2510562876ffd8ba2b5c890312708290655 Mon Sep 17 00:00:00 2001 From: Andreas Heinisch Date: Tue, 6 Oct 2026 10:45:17 +0200 Subject: [PATCH 202/289] tdf#125846 - Avoid deleting fly formats one by one Avoid deleting fly formats one by one while the document is destroyed since DeleteAndDestroyAll removes all fly formats at once in SwDoc::~SwDoc afterwards. Change-Id: Ie62ead75a3ba1cdfa47d072c329e8d9fec9387ac Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211864 Reviewed-by: Andreas Heinisch Tested-by: Jenkins --- sw/source/core/txtnode/thints.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sw/source/core/txtnode/thints.cxx b/sw/source/core/txtnode/thints.cxx index e05b17c06689..bb7e2872633e 100644 --- a/sw/source/core/txtnode/thints.cxx +++ b/sw/source/core/txtnode/thints.cxx @@ -1259,7 +1259,8 @@ void SwTextNode::DestroyAttr( SwTextAttr* pAttr ) case RES_TXTATR_FLYCNT: { SwFrameFormat* pFormat = pAttr->GetFlyCnt().GetFrameFormat(); - if( pFormat ) // set to 0 by Undo? + // tdf#125846 - avoid deleting fly formats one by one while the document is destroyed + if (pFormat && !rDoc.IsInDtor()) // set to 0 by Undo? rDoc.getIDocumentLayoutAccess().DelLayoutFormat( pFormat ); } break; From 52277daba8160db1f640e70c4f261613e9b1e87f Mon Sep 17 00:00:00 2001 From: Aron Budea Date: Mon, 5 Oct 2026 05:31:12 +1030 Subject: [PATCH 203/289] cool#16279 sd: inherited autofit in PPTX lost on import When an empty PPTX presentation was opened and saved, its Title and Content layout/master slide lost its autofit setting. Original slide master had element in its placeholders, which turned into . This happened, because on import the inherited property got overwritten by the default no autofit. Change-Id: If9842d4c53eb283b9497b46198aaea4911413bc9 Signed-off-by: Aron Budea Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/14276 Reviewed-by: Noel Grandin Tested-by: Jenkins CPCI (cherry picked from commit afe4932986453513ea1a50b1143de3827f39c0ed) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211865 Reviewed-by: Xisco Fauli Tested-by: Jenkins --- .../drawingml/textbodypropertiescontext.cxx | 7 +++- sd/qa/unit/import-tests2.cxx | 33 +++++++++++++++++++ 2 files changed, 39 insertions(+), 1 deletion(-) diff --git a/oox/source/drawingml/textbodypropertiescontext.cxx b/oox/source/drawingml/textbodypropertiescontext.cxx index a20d97debb89..c6d58d759c13 100644 --- a/oox/source/drawingml/textbodypropertiescontext.cxx +++ b/oox/source/drawingml/textbodypropertiescontext.cxx @@ -204,7 +204,8 @@ TextBodyPropertiesContext::TextBodyPropertiesContext( ContextHandler2Helper cons // Push defaults mrTextBodyProp.maPropertyMap.setProperty( PROP_TextAutoGrowHeight, false); - mrTextBodyProp.maPropertyMap.setProperty( PROP_TextFitToSize, drawing::TextFitToSizeType_NONE); + if (!mrTextBodyProp.maPropertyMap.hasProperty(PROP_TextFitToSize)) + mrTextBodyProp.maPropertyMap.setProperty(PROP_TextFitToSize, TextFitToSizeType_NONE); } ContextHandlerRef TextBodyPropertiesContext::onCreateContext( sal_Int32 aElementToken, const AttributeList& rAttribs ) @@ -232,6 +233,8 @@ ContextHandlerRef TextBodyPropertiesContext::onCreateContext( sal_Int32 aElement // EG_TextAutofit case A_TOKEN( noAutofit ): mrTextBodyProp.maPropertyMap.setProperty( PROP_TextAutoGrowHeight, false); // CT_TextNoAutofit + mrTextBodyProp.maPropertyMap.setProperty(PROP_TextFitToSize, + TextFitToSizeType_NONE); break; case A_TOKEN( normAutofit ): // CT_TextNormalAutofit { @@ -249,6 +252,8 @@ ContextHandlerRef TextBodyPropertiesContext::onCreateContext( sal_Int32 aElement const sal_Int32 tVert = mrTextBodyProp.moVert.value_or( XML_horz ); if( tVert != XML_vert && tVert != XML_eaVert && tVert != XML_vert270 && tVert != XML_mongolianVert ) mrTextBodyProp.maPropertyMap.setProperty( PROP_TextAutoGrowHeight, true); + mrTextBodyProp.maPropertyMap.setProperty(PROP_TextFitToSize, + TextFitToSizeType_NONE); } break; diff --git a/sd/qa/unit/import-tests2.cxx b/sd/qa/unit/import-tests2.cxx index bd44d3b41be3..d6012c0cbc9d 100644 --- a/sd/qa/unit/import-tests2.cxx +++ b/sd/qa/unit/import-tests2.cxx @@ -1881,6 +1881,39 @@ CPPUNIT_TEST_FIXTURE(SdImportTest2, testCool16083_contentPlaceholderStaysEmpty) } } +CPPUNIT_TEST_FIXTURE(SdImportTest2, testCool16279_LayoutPlaceholderKeepsMasterAutofit) +{ + // The slide master autofits the text of its title and body, and the Title and Content + // layout's placeholders have an empty bodyPr, so they inherit that + createSdImpressDoc("pptx/master-and-eleven-layouts.pptx"); + + uno::Reference xDoc(mxComponent, uno::UNO_QUERY); + CPPUNIT_ASSERT(xDoc.is()); + uno::Reference xLayout(xDoc->getMasterPages()->getByIndex(1), + uno::UNO_QUERY_THROW); + CPPUNIT_ASSERT_EQUAL(u"Title and Content"_ustr, + xLayout.queryThrow()->getName()); + + static constexpr std::u16string_view aPlaceholders[] = { u"Title 1", u"Content Placeholder 2" }; + for (const std::u16string_view& aName : aPlaceholders) + { + uno::Reference xShape; + for (sal_Int32 i = 0; i < xLayout->getCount() && !xShape; i++) + { + if (xLayout->getByIndex(i).queryThrow()->getName() == aName) + xShape.set(xLayout->getByIndex(i), uno::UNO_QUERY_THROW); + } + CPPUNIT_ASSERT(xShape); + + // Without the fix in place, this test would have failed with: + // - Expected: 3 (TextFitToSizeType_AUTOFIT) + // - Actual : 0 (TextFitToSizeType_NONE) + CPPUNIT_ASSERT_EQUAL_MESSAGE( + OUString(aName).toUtf8().getStr(), drawing::TextFitToSizeType_AUTOFIT, + xShape->getPropertyValue(u"TextFitToSize"_ustr).get()); + } +} + CPPUNIT_PLUGIN_IMPLEMENT(); /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ From 1caec31b97a29eaac99864c5d7db74902b51c81b Mon Sep 17 00:00:00 2001 From: Michael Weghorn Date: Fri, 2 Oct 2026 16:26:46 +0200 Subject: [PATCH 204/289] qt: Move QtFrame* member down to QtGraphicsBase base class All of the 3 QtGraphicsBase subclasses (QtGraphicsBackend, QtGraphics, QtSvpGraphics) have their own QtFrame* member. Deduplicate by moving it to the shared QtGraphicsBase base class and adding a protected getter. This will also allow having more QtFrame-related logic directly in the base class in the future. (An upcoming commit will get rid of the need to pass the frame to QtGraphicsBase::ImplGetResolution and it might e.g. also help to centralize new logic for QtGraphics and QtSvpGraphics suggested to be added in pending Gerrit changes [1] and [2].) [1] https://gerrit.libreoffice.org/c/core/+/210650/6 [2] https://gerrit.libreoffice.org/c/core/+/210651/8 Change-Id: Ie6775b7dae0f1c8a68169ddbd746d3244b01e200 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211745 Tested-by: Jenkins Reviewed-by: Dan Williams --- vcl/inc/qt5/QtGraphics.hxx | 3 --- vcl/inc/qt5/QtGraphicsBase.hxx | 7 +++++-- vcl/inc/qt5/QtPainter.hxx | 14 +++++++------- vcl/inc/qt5/QtSvpGraphics.hxx | 2 -- vcl/qt5/QtGraphics.cxx | 12 ++++++------ vcl/qt5/QtGraphics_GDI.cxx | 2 +- vcl/qt5/QtPainter.cxx | 4 ++-- vcl/qt5/QtSvpGraphics.cxx | 13 +++++++------ 8 files changed, 28 insertions(+), 29 deletions(-) diff --git a/vcl/inc/qt5/QtGraphics.hxx b/vcl/inc/qt5/QtGraphics.hxx index c728701322b6..0690b214801d 100644 --- a/vcl/inc/qt5/QtGraphics.hxx +++ b/vcl/inc/qt5/QtGraphics.hxx @@ -47,7 +47,6 @@ class QtGraphicsBackend final : public SalGraphicsImpl, public QtGraphicsBase { friend class QtPainter; - QtFrame* m_pFrame; QImage* m_pQImage; QRegion m_aClipRegion; QPainterPath m_aClipPath; @@ -153,8 +152,6 @@ class QtGraphics final : public SalGraphicsAutoDelegateToImpl, public QtGraphics std::unique_ptr m_pBackend; - QtFrame* m_pFrame; - rtl::Reference m_pTextStyle[MAX_FALLBACK]; Color m_aTextColor; diff --git a/vcl/inc/qt5/QtGraphicsBase.hxx b/vcl/inc/qt5/QtGraphicsBase.hxx index 393644d45af0..1039dc8bea7d 100644 --- a/vcl/inc/qt5/QtGraphicsBase.hxx +++ b/vcl/inc/qt5/QtGraphicsBase.hxx @@ -20,11 +20,13 @@ class QtGraphicsBase { + QtFrame* const m_pFrame; qreal m_fDPR; public: - QtGraphicsBase() - : m_fDPR(qApp ? GetQtInstance().EmscriptenLightweightRunInMainThread( + QtGraphicsBase(QtFrame* pFrame) + : m_pFrame(pFrame) + , m_fDPR(qApp ? GetQtInstance().EmscriptenLightweightRunInMainThread( [] { return qApp->devicePixelRatio(); }) : 1.0) { @@ -35,6 +37,7 @@ public: qreal devicePixelRatioF() const { return m_fDPR; } protected: + QtFrame* GetFrame() const { return m_pFrame; } static void ImplGetResolution(const QtFrame* pFrame, sal_Int32& rDPIX, sal_Int32& rDPIY); }; diff --git a/vcl/inc/qt5/QtPainter.hxx b/vcl/inc/qt5/QtPainter.hxx index 51a251d06875..518a7d69c2dd 100644 --- a/vcl/inc/qt5/QtPainter.hxx +++ b/vcl/inc/qt5/QtPainter.hxx @@ -39,32 +39,32 @@ public: sal_uInt8 nTransparency = 255); ~QtPainter() { - if (m_rGraphics.m_pFrame && !m_aRegion.isEmpty()) - m_rGraphics.m_pFrame->GetQWidget().update(m_aRegion); + if (m_rGraphics.GetFrame() && !m_aRegion.isEmpty()) + m_rGraphics.GetFrame()->GetQWidget().update(m_aRegion); } void update(int nx, int ny, int nw, int nh) { - if (m_rGraphics.m_pFrame) + if (m_rGraphics.GetFrame()) m_aRegion += scaledQRect({ nx, ny, nw, nh }, 1 / m_rGraphics.devicePixelRatioF()); } void update(const QRect& rRect) { - if (m_rGraphics.m_pFrame) + if (m_rGraphics.GetFrame()) m_aRegion += scaledQRect(rRect, 1 / m_rGraphics.devicePixelRatioF()); } void update(const QRectF& rRectF) { - if (m_rGraphics.m_pFrame) + if (m_rGraphics.GetFrame()) update(scaledQRect(rRectF.toAlignedRect(), 1 / m_rGraphics.devicePixelRatioF())); } void update() { - if (m_rGraphics.m_pFrame) - m_aRegion += m_rGraphics.m_pFrame->GetQWidget().rect(); + if (m_rGraphics.GetFrame()) + m_aRegion += m_rGraphics.GetFrame()->GetQWidget().rect(); } }; diff --git a/vcl/inc/qt5/QtSvpGraphics.hxx b/vcl/inc/qt5/QtSvpGraphics.hxx index 0e4455d2dfc6..e2455f805505 100644 --- a/vcl/inc/qt5/QtSvpGraphics.hxx +++ b/vcl/inc/qt5/QtSvpGraphics.hxx @@ -30,8 +30,6 @@ class QtFrame; class VCLPLUG_QT_PUBLIC QtSvpGraphics final : public SvpSalGraphics, public QtGraphicsBase { - QtFrame* const m_pFrame; - void handleDamage(const tools::Rectangle&) override; public: diff --git a/vcl/qt5/QtGraphics.cxx b/vcl/qt5/QtGraphics.cxx index 803c4dd35128..3134159f7e61 100644 --- a/vcl/qt5/QtGraphics.cxx +++ b/vcl/qt5/QtGraphics.cxx @@ -44,20 +44,20 @@ #include #include -QtGraphics::QtGraphics( QtFrame *pFrame, QImage *pQImage ) - : m_pFrame( pFrame ) +QtGraphics::QtGraphics(QtFrame* pFrame, QImage* pQImage) + : QtGraphicsBase(pFrame) , m_pTextStyle{ nullptr, } , m_aTextColor( 0x00, 0x00, 0x00 ) { - m_pBackend = std::make_unique(m_pFrame, pQImage); + m_pBackend = std::make_unique(pFrame, pQImage); if (!initWidgetDrawBackends(false)) { if (!QtInstance::noNativeControls()) m_pWidgetDraw.reset(new QtGraphics_Controls(*this)); } - if (m_pFrame) - setDevicePixelRatioF(m_pFrame->devicePixelRatioF()); + if (pFrame) + setDevicePixelRatioF(pFrame->devicePixelRatioF()); } QtGraphics::~QtGraphics() { ReleaseFonts(); } @@ -88,7 +88,7 @@ void QtGraphics::handleDamage(const tools::Rectangle& rDamagedRegion) void QtGraphics::GetResolution(sal_Int32& rDPIX, sal_Int32& rDPIY) { - QtGraphicsBase::ImplGetResolution(m_pFrame, rDPIX, rDPIY); + QtGraphicsBase::ImplGetResolution(GetFrame(), rDPIX, rDPIY); } void QtGraphics::SetTextColor(Color nColor) { m_aTextColor = nColor; } diff --git a/vcl/qt5/QtGraphics_GDI.cxx b/vcl/qt5/QtGraphics_GDI.cxx index 4cd9961ac4c6..9905dad56d02 100644 --- a/vcl/qt5/QtGraphics_GDI.cxx +++ b/vcl/qt5/QtGraphics_GDI.cxx @@ -31,7 +31,7 @@ #include QtGraphicsBackend::QtGraphicsBackend(QtFrame* pFrame, QImage* pQImage) - : m_pFrame(pFrame) + : QtGraphicsBase(pFrame) , m_pQImage(pQImage) , m_oLineColor(std::in_place, 0x00, 0x00, 0x00) , m_oFillColor(std::in_place, 0xFF, 0xFF, 0XFF) diff --git a/vcl/qt5/QtPainter.cxx b/vcl/qt5/QtPainter.cxx index aecf6a262caf..d66441724ec2 100644 --- a/vcl/qt5/QtPainter.cxx +++ b/vcl/qt5/QtPainter.cxx @@ -33,8 +33,8 @@ QtPainter::QtPainter(QtGraphicsBackend& rGraphics, bool bPrepareBrush, sal_uInt8 } else { - assert(rGraphics.m_pFrame); - if (!begin(&rGraphics.m_pFrame->GetQWidget())) + assert(rGraphics.GetFrame()); + if (!begin(&rGraphics.GetFrame()->GetQWidget())) std::abort(); } if (!rGraphics.m_aClipPath.isEmpty()) diff --git a/vcl/qt5/QtSvpGraphics.cxx b/vcl/qt5/QtSvpGraphics.cxx index 897fd9d89371..9bf7975ecb58 100644 --- a/vcl/qt5/QtSvpGraphics.cxx +++ b/vcl/qt5/QtSvpGraphics.cxx @@ -20,21 +20,22 @@ #include QtSvpGraphics::QtSvpGraphics(QtFrame* pFrame) - : m_pFrame(pFrame) + : QtGraphicsBase(pFrame) { if (!QtInstance::noNativeControls()) m_pWidgetDraw.reset(new QtGraphics_Controls(*this)); - if (m_pFrame) - setDevicePixelRatioF(m_pFrame->devicePixelRatioF()); + if (pFrame) + setDevicePixelRatioF(pFrame->devicePixelRatioF()); } QtSvpGraphics::~QtSvpGraphics() {} void QtSvpGraphics::updateQWidget() const { - if (!m_pFrame) + QtFrame* pFrame = GetFrame(); + if (!pFrame) return; - QWidget& rQWidget = m_pFrame->GetQWidget(); + QWidget& rQWidget = pFrame->GetQWidget(); rQWidget.update(rQWidget.rect()); } @@ -89,7 +90,7 @@ void QtSvpGraphics::handleDamage(const tools::Rectangle& rDamagedRegion) void QtSvpGraphics::GetResolution(sal_Int32& rDPIX, sal_Int32& rDPIY) { - QtGraphicsBase::ImplGetResolution(m_pFrame, rDPIX, rDPIY); + QtGraphicsBase::ImplGetResolution(GetFrame(), rDPIX, rDPIY); } /* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */ From 016b2c1135963095074c37128c5e18d8980df8ba Mon Sep 17 00:00:00 2001 From: Michael Weghorn Date: Fri, 2 Oct 2026 16:35:20 +0200 Subject: [PATCH 205/289] qt: Don't require to pass QtFrame to QtGraphicsBase::ImplGetResolution Both callers in subclasses pass the own frame. Use it directly instead of requiring that callers pass it explicitly. Change-Id: I5e40e86a0f6b4e76838234aacc32de71aad8ef22 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211746 Tested-by: Jenkins Reviewed-by: Dan Williams --- vcl/inc/qt5/QtGraphicsBase.hxx | 2 +- vcl/qt5/QtGraphics.cxx | 2 +- vcl/qt5/QtGraphicsBase.cxx | 6 +++--- vcl/qt5/QtSvpGraphics.cxx | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/vcl/inc/qt5/QtGraphicsBase.hxx b/vcl/inc/qt5/QtGraphicsBase.hxx index 1039dc8bea7d..e6b1904f618c 100644 --- a/vcl/inc/qt5/QtGraphicsBase.hxx +++ b/vcl/inc/qt5/QtGraphicsBase.hxx @@ -38,7 +38,7 @@ public: protected: QtFrame* GetFrame() const { return m_pFrame; } - static void ImplGetResolution(const QtFrame* pFrame, sal_Int32& rDPIX, sal_Int32& rDPIY); + void ImplGetResolution(sal_Int32& rDPIX, sal_Int32& rDPIY); }; /* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */ diff --git a/vcl/qt5/QtGraphics.cxx b/vcl/qt5/QtGraphics.cxx index 3134159f7e61..541b7a1928b8 100644 --- a/vcl/qt5/QtGraphics.cxx +++ b/vcl/qt5/QtGraphics.cxx @@ -88,7 +88,7 @@ void QtGraphics::handleDamage(const tools::Rectangle& rDamagedRegion) void QtGraphics::GetResolution(sal_Int32& rDPIX, sal_Int32& rDPIY) { - QtGraphicsBase::ImplGetResolution(GetFrame(), rDPIX, rDPIY); + ImplGetResolution(rDPIX, rDPIY); } void QtGraphics::SetTextColor(Color nColor) { m_aTextColor = nColor; } diff --git a/vcl/qt5/QtGraphicsBase.cxx b/vcl/qt5/QtGraphicsBase.cxx index a6b99eb39640..29f35dcf725f 100644 --- a/vcl/qt5/QtGraphicsBase.cxx +++ b/vcl/qt5/QtGraphicsBase.cxx @@ -16,7 +16,7 @@ #include -void QtGraphicsBase::ImplGetResolution(const QtFrame* pFrame, sal_Int32& rDPIX, sal_Int32& rDPIY) +void QtGraphicsBase::ImplGetResolution(sal_Int32& rDPIX, sal_Int32& rDPIY) { char* pForceDpi; if ((pForceDpi = getenv("SAL_FORCEDPI"))) @@ -25,10 +25,10 @@ void QtGraphicsBase::ImplGetResolution(const QtFrame* pFrame, sal_Int32& rDPIX, return; } - if (!pFrame) + if (!m_pFrame) return; - QScreen* pScreen = pFrame->GetQWidget().screen(); + QScreen* pScreen = m_pFrame->GetQWidget().screen(); qreal devicePixelRatio = GetQtInstance().EmscriptenLightweightRunInMainThread( [pScreen] { return pScreen->devicePixelRatio(); }); rDPIX = pScreen->logicalDotsPerInchX() * devicePixelRatio + 0.5; diff --git a/vcl/qt5/QtSvpGraphics.cxx b/vcl/qt5/QtSvpGraphics.cxx index 9bf7975ecb58..3d1aa838871e 100644 --- a/vcl/qt5/QtSvpGraphics.cxx +++ b/vcl/qt5/QtSvpGraphics.cxx @@ -90,7 +90,7 @@ void QtSvpGraphics::handleDamage(const tools::Rectangle& rDamagedRegion) void QtSvpGraphics::GetResolution(sal_Int32& rDPIX, sal_Int32& rDPIY) { - QtGraphicsBase::ImplGetResolution(GetFrame(), rDPIX, rDPIY); + ImplGetResolution(rDPIX, rDPIY); } /* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */ From 7922a1233c24ce4bc4b737eab595d4a1114f32a3 Mon Sep 17 00:00:00 2001 From: Christian Lohmaier Date: Tue, 6 Oct 2026 19:36:49 +0200 Subject: [PATCH 206/289] Update git submodules * Update translations from branch 'master' to eb0ac524bb996151fdbc4e78ec1f28effbc0c5b9 - update translations for master and force-fix errors using pocheck Change-Id: If8145fd30a2efc5506f32661c464cbd1603c154a --- translations | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/translations b/translations index 697f5e715f08..eb0ac524bb99 160000 --- a/translations +++ b/translations @@ -1 +1 @@ -Subproject commit 697f5e715f0801edfe8a333b0d01c2ea064711a2 +Subproject commit eb0ac524bb996151fdbc4e78ec1f28effbc0c5b9 From a36c7459d1ce74414a19c75eca7b8f658cafb832 Mon Sep 17 00:00:00 2001 From: Mike Kaganski Date: Tue, 6 Oct 2026 12:39:54 +0500 Subject: [PATCH 207/289] Fix unit test testPieTextArea CppunitTest_oox_shape failed in the gerrit_linux_gcc_main and gerrit_linux_clang_dbgutil_main builds like oox/qa/unit/shape.cxx:1170:testPieTextArea::TestBody double equality assertion failed - Expected: 6673 - Actual : 6691 - Delta : 10 The test from 2ac8858b10699c897dd530c8b1434bd9604a4aff (tdf#149918 fix pie in presetShapeDefinitions.xml, 2026-10-06) checked the BoundRect of the shape, which includes the ink of its text; text layout changes merged meanwhile probably moved that ink. Check the text frame that the preset defines instead; it does not depend on fonts or line metrics. Signed-off-by: Mike Kaganski Change-Id: Ica16e4457cc150e9115dfc9994abd3f801778621 Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/14447 Reviewed-by: Andras Timar Tested-by: Jenkins CPCI (cherry picked from commit 0bcc06cdc592bf7c9828b694b00acb7fed07eccf) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211889 Tested-by: Jenkins Reviewed-by: Xisco Fauli --- oox/qa/unit/shape.cxx | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/oox/qa/unit/shape.cxx b/oox/qa/unit/shape.cxx index d21ab1363670..add7583d9ebc 100644 --- a/oox/qa/unit/shape.cxx +++ b/oox/qa/unit/shape.cxx @@ -1155,17 +1155,14 @@ CPPUNIT_TEST_FIXTURE(OoxShapeTest, testPieTextArea) uno::Reference xDrawPagesSupplier(mxComponent, uno::UNO_QUERY); uno::Reference xDrawPage(xDrawPagesSupplier->getDrawPages()->getByIndex(0), uno::UNO_QUERY); - uno::Reference xShapeProps(xDrawPage->getByIndex(0), uno::UNO_QUERY); - css::awt::Rectangle aBoundRect; - xShapeProps->getPropertyValue(u"BoundRect"_ustr) >>= aBoundRect; - // Without fix, size was 12009 x 7844, and position was 2008|2172. - // The text began in the upper-left corner of the logical rectangle. However it should be inside - // the underlaying ellipse of the pie. - // A BoundRect can vary depending on the system and font and therefore requires a wide tolerance. - CPPUNIT_ASSERT_DOUBLES_EQUAL(sal_Int32(10247), aBoundRect.Width, 10); - CPPUNIT_ASSERT_DOUBLES_EQUAL(sal_Int32(6673), aBoundRect.Height, 10); - CPPUNIT_ASSERT_DOUBLES_EQUAL(sal_Int32(3770), aBoundRect.X, 10); - CPPUNIT_ASSERT_DOUBLES_EQUAL(sal_Int32(3343), aBoundRect.Y, 10); + auto xShape = xDrawPage->getByIndex(0).query(); + auto& rSdrCustomShape( + static_cast(*SdrObject::getSdrObjectFromXShape(xShape))); + tools::Rectangle aTextBound; + CPPUNIT_ASSERT(rSdrCustomShape.GetTextBounds(aTextBound)); + // The text frame is inscribed in the ellipse at 45deg. Without the fix in place, it was the + // whole shape, 12000x8000@(1999,1998). + CPPUNIT_ASSERT_EQUAL(tools::Rectangle(3756, 3169, 12241, 8826), aTextBound); } CPPUNIT_PLUGIN_IMPLEMENT(); From 4b870e7fcf2665274141611b28bbcba28c89da5d Mon Sep 17 00:00:00 2001 From: Xisco Fauli Date: Tue, 6 Oct 2026 16:21:29 +0200 Subject: [PATCH 208/289] dbaccess: port test from java to c++ I would like to turn this into an easyhack but first I want to revert commit 42190cd153d4061a8401acdb2c2f8edf9154a978 Author: Noel Grandin Date: Mon Mar 31 12:38:35 2025 +0200 Revert "Move SingleSelectQueryComposer.java tests to C++" This reverts commit d1ec7e90772421331bef31eb934180c7f992e42f. To avoid deadlocks on jenkins. and see where CI deadlocks Change-Id: I99a4b0ac035421cd255c51f69946b52d6ae6635f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211888 Tested-by: Jenkins Reviewed-by: Xisco Fauli --- dbaccess/CppunitTest_dbaccess_rowset_test.mk | 58 +++++++ dbaccess/Module_dbaccess.mk | 1 + dbaccess/qa/complex/dbaccess/RowSet.java | 126 -------------- dbaccess/qa/unit/CRMDatabase_test.cxx | 19 --- dbaccess/qa/unit/dbtest_base.cxx | 21 ++- dbaccess/qa/unit/rowset_test.cxx | 167 +++++++++++++++++++ 6 files changed, 245 insertions(+), 147 deletions(-) create mode 100644 dbaccess/CppunitTest_dbaccess_rowset_test.mk create mode 100644 dbaccess/qa/unit/rowset_test.cxx diff --git a/dbaccess/CppunitTest_dbaccess_rowset_test.mk b/dbaccess/CppunitTest_dbaccess_rowset_test.mk new file mode 100644 index 000000000000..6a70d07ed461 --- /dev/null +++ b/dbaccess/CppunitTest_dbaccess_rowset_test.mk @@ -0,0 +1,58 @@ +# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*- +# +# This file is part of the LibreOffice project. +# +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. +# + +$(eval $(call gb_CppunitTest_CppunitTest,dbaccess_rowset_test)) + +$(eval $(call gb_CppunitTest_use_externals,dbaccess_rowset_test, \ + boost_headers \ + libxml2 \ +)) + +$(eval $(call gb_CppunitTest_add_exception_objects,dbaccess_rowset_test, \ + dbaccess/qa/unit/rowset_test \ +)) + +$(eval $(call gb_CppunitTest_use_libraries,dbaccess_rowset_test, \ + comphelper \ + cppu \ + cppuhelper \ + dbaxml \ + dbtools \ + sal \ + subsequenttest \ + utl \ + test \ + tk \ + tl \ + unotest \ + xo \ +)) + +$(eval $(call gb_CppunitTest_use_api,dbaccess_rowset_test,\ + offapi \ + oovbaapi \ + udkapi \ +)) + +$(eval $(call gb_CppunitTest_use_ure,dbaccess_rowset_test)) +$(eval $(call gb_CppunitTest_use_vcl,dbaccess_rowset_test)) + +$(eval $(call gb_CppunitTest_use_rdb,dbaccess_rowset_test,services)) + +$(eval $(call gb_CppunitTest_use_configuration,dbaccess_rowset_test)) + +$(eval $(call gb_CppunitTest_use_uiconfigs,dbaccess_rowset_test, \ + dbaccess \ +)) + +$(eval $(call gb_CppunitTest_use_jars,dbaccess_rowset_test, \ + sdbc_hsqldb \ +)) + +# vim: set noet sw=4 ts=4: diff --git a/dbaccess/Module_dbaccess.mk b/dbaccess/Module_dbaccess.mk index 8072063fb6ab..04c8cd9b9851 100644 --- a/dbaccess/Module_dbaccess.mk +++ b/dbaccess/Module_dbaccess.mk @@ -63,6 +63,7 @@ $(eval $(call gb_Module_add_check_targets,dbaccess,\ CppunitTest_dbaccess_hsqldb_test \ CppunitTest_dbaccess_RowSetClones \ CppunitTest_dbaccess_CRMDatabase_test \ + CppunitTest_dbaccess_rowset_test \ )) endif diff --git a/dbaccess/qa/complex/dbaccess/RowSet.java b/dbaccess/qa/complex/dbaccess/RowSet.java index ed42a271b46f..87a97e00d0de 100644 --- a/dbaccess/qa/complex/dbaccess/RowSet.java +++ b/dbaccess/qa/complex/dbaccess/RowSet.java @@ -812,131 +812,5 @@ public class RowSet extends TestCase testPosition(clone, cloneRow, 1, "mixed clone/rowset move/insertion: clone check"); testPosition(m_resultSet, m_row, 100, "mixed clone/rowset move/insertion: rowset check"); } - - - private void testTableParameters() throws com.sun.star.uno.Exception - { - // for a row set simply based on a table, there should be not parameters at all - createRowSet("products", CommandType.TABLE, false); - verifyParameters(new String[] - { - }, "testTableParameters"); - } - - - private void testParametersAfterNormalExecute() throws com.sun.star.uno.Exception - { - createRowSet("SELECT * FROM \"customers\"", CommandType.COMMAND, true); - m_rowSetProperties.setPropertyValue("Command", "SELECT * FROM \"customers\" WHERE \"City\" = :city"); - final XParameters rowsetParams = UnoRuntime.queryInterface( XParameters.class, m_rowSet ); - rowsetParams.setString(1, "London"); - m_rowSet.execute(); - } - - - private void verifyParameters(String[] _paramNames, String _context) throws com.sun.star.uno.Exception - { - final XIndexAccess params = m_paramsSupplier.getParameters(); - final int expected = _paramNames.length; - final int found = params != null ? params.getCount() : 0; - - assertTrue("wrong number of parameters (expected: " + expected + ", found: " + found + ") in " + _context, - found == expected); - - if (found == 0) - { - return; - } - - for (int i = 0; i < expected; ++i) - { - final XPropertySet parameter = UnoRuntime.queryInterface( XPropertySet.class, params.getByIndex( i ) ); - - final String expectedName = _paramNames[i]; - final String foundName = (String) parameter.getPropertyValue("Name"); - assertTrue("wrong parameter name (expected: " + expectedName + ", found: " + foundName + ") in" + _context, - expectedName.equals(foundName)); - } - } - - - private void testParametrizedQuery() throws com.sun.star.uno.Exception - { - // for a row set based on a parametrized query, those parameters should be properly - // recognized - m_dataSource.createQuery("products like", "SELECT * FROM \"products\" WHERE \"Name\" LIKE :product_name"); - createRowSet("products like", CommandType.QUERY, false); - verifyParameters(new String[] - { - "product_name" - }, "testParametrizedQuery"); - } - - - private void testParametersInteraction() throws com.sun.star.uno.Exception - { - createRowSet("products like", CommandType.QUERY, false); - - // let's fill in a parameter value via XParameters, and see whether it is respected by the parameters container - final XParameters rowsetParams = UnoRuntime.queryInterface(XParameters.class, m_rowSet); - rowsetParams.setString(1, "Apples"); - - XIndexAccess params = m_paramsSupplier.getParameters(); - XPropertySet firstParam = UnoRuntime.queryInterface( XPropertySet.class, params.getByIndex( 0 ) ); - Object firstParamValue = firstParam.getPropertyValue("Value"); - - assertTrue("XParameters and the parameters container do not properly interact", - "Apples".equals(firstParamValue)); - - // let's see whether this also survives an execute of the row set - rowsetParams.setString(1, "Oranges"); - m_rowSet.execute(); - { - // TODO: the following would not be necessary if the parameters container would *survive* - // the execution of the row set. It currently doesn't (though the values it represents do). - // It would be nice, but not strictly necessary, if it would. - params = m_paramsSupplier.getParameters(); - firstParam = UnoRuntime.queryInterface( XPropertySet.class, params.getByIndex( 0 ) ); - } - firstParamValue = firstParam.getPropertyValue("Value"); - assertTrue("XParameters and the parameters container do not properly interact, after the row set has been executed", - "Oranges".equals(firstParamValue)); - } - - - private void testParametersInFilter() throws com.sun.star.uno.Exception - { - createRowSet("SELECT * FROM \"customers\"", CommandType.COMMAND, false); - m_rowSetProperties.setPropertyValue("Filter", "\"City\" = :city"); - - m_rowSetProperties.setPropertyValue("ApplyFilter", Boolean.TRUE); - verifyParameters(new String[] - { - "city" - }, "testParametersInFilter"); - - m_rowSetProperties.setPropertyValue("ApplyFilter", Boolean.FALSE); - verifyParameters(new String[] - { - }, "testParametersInFilter"); - } - - - /** checks the XParametersSupplier functionality of a RowSet - */ - @Test - public void testParameters() throws Exception - { - createTestCase(false); - // use an own RowSet instance, not the one which is also used for the other cases - - testTableParameters(); - testParametrizedQuery(); - testParametersInFilter(); - - testParametersAfterNormalExecute(); - - testParametersInteraction(); - } } diff --git a/dbaccess/qa/unit/CRMDatabase_test.cxx b/dbaccess/qa/unit/CRMDatabase_test.cxx index 75dbc72f2fd4..995dc7d572aa 100644 --- a/dbaccess/qa/unit/CRMDatabase_test.cxx +++ b/dbaccess/qa/unit/CRMDatabase_test.cxx @@ -30,7 +30,6 @@ class CRMDBTest : public DBTestBase public: void testCRMDatabase(); void testRegistrationName(); - uno::Reference setUpDBConnection(); void testQueryColumns(); void testODBCEscapeQuery(); @@ -42,24 +41,9 @@ public: CPPUNIT_TEST_SUITE_END(); }; -uno::Reference CRMDBTest::setUpDBConnection() -{ - createDBDocument(u"sdbc:embedded:hsqldb"_ustr); - uno::Reference xDocument(mxComponent, UNO_QUERY_THROW); - uno::Reference xDataSource = xDocument->getDataSource(); - CPPUNIT_ASSERT(xDataSource.is()); - - // create queries before establishing connection to database - createQueries(xDataSource); - - uno::Reference xConnection = getConnectionForDocument(xDocument); - return xConnection; -} - void CRMDBTest::testCRMDatabase() { uno::Reference xConnection = setUpDBConnection(); - createTables(xConnection); // test selection Reference xStatement = xConnection->createStatement(); @@ -110,7 +94,6 @@ void CRMDBTest::testRegistrationName() // 2. register a newly created data source, and verify it has the proper name // Setup the CRMDatabase uno::Reference xConnection = setUpDBConnection(); - createTables(xConnection); uno::Reference xDocument(mxComponent, UNO_QUERY_THROW); uno::Reference xDataSource = xDocument->getDataSource(); @@ -142,7 +125,6 @@ void CRMDBTest::testQueryColumns() // Test prepared queries return the expected column names uno::Reference xConnection = setUpDBConnection(); - createTables(xConnection); uno::Reference xQuerySupplier(xConnection, UNO_QUERY_THROW); uno::Reference xQueryAccess = xQuerySupplier->getQueries(); @@ -175,7 +157,6 @@ void CRMDBTest::testQueryColumns() void CRMDBTest::testODBCEscapeQuery() { uno::Reference xConnection = setUpDBConnection(); - createTables(xConnection); uno::Reference xFactory(xConnection, UNO_QUERY); CPPUNIT_ASSERT(xFactory.is()); diff --git a/dbaccess/qa/unit/dbtest_base.cxx b/dbaccess/qa/unit/dbtest_base.cxx index bec6e6817ca1..dae7c3d5f74f 100644 --- a/dbaccess/qa/unit/dbtest_base.cxx +++ b/dbaccess/qa/unit/dbtest_base.cxx @@ -9,8 +9,6 @@ #include -#include - #include #include #include @@ -47,6 +45,8 @@ public: void createQuery(const OUString& sQuery, bool bEscapeProcessing, const OUString& sQueryName, const Reference & xDataSource); + uno::Reference setUpDBConnection(); + virtual void tearDown() override; }; @@ -182,6 +182,23 @@ void DBTestBase::createQuery(const OUString& sQuery, bool bEscapeProcessing, con xNameContainer->insertByName(sQueryName, Any(xQueryProp)); } +uno::Reference DBTestBase::setUpDBConnection() +{ + createDBDocument(u"sdbc:embedded:hsqldb"_ustr); + uno::Reference xDocument(mxComponent, UNO_QUERY_THROW); + uno::Reference xDataSource = xDocument->getDataSource(); + CPPUNIT_ASSERT(xDataSource.is()); + + // create queries before establishing connection to database + createQueries(xDataSource); + + uno::Reference xConnection = getConnectionForDocument(xDocument); + + createTables(xConnection); + + return xConnection; +} + void DBTestBase::tearDown() { if (mxComponent) diff --git a/dbaccess/qa/unit/rowset_test.cxx b/dbaccess/qa/unit/rowset_test.cxx new file mode 100644 index 000000000000..2f2dad4284f3 --- /dev/null +++ b/dbaccess/qa/unit/rowset_test.cxx @@ -0,0 +1,167 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + */ + +#include "dbtest_base.cxx" + +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +using namespace ::com::sun::star; +using namespace ::com::sun::star::uno; + +class RowSetTest : public DBTestBase +{ +}; + +CPPUNIT_TEST_FIXTURE(RowSetTest, testParameters) +{ + uno::Reference xConnection = setUpDBConnection(); + + Reference xStatement = xConnection->createStatement(); + CPPUNIT_ASSERT(xStatement.is()); + xStatement->execute(u"DROP TABLE \"TEST1\" IF EXISTS"_ustr); + xStatement->execute( + u"CREATE TABLE \"TEST1\" (\"ID\" INTEGER NOT NULL PRIMARY KEY, \"col2\" VARCHAR(50))"_ustr); + + xConnection->prepareStatement(u"INSERT INTO \"TEST1\" VALUES (?,?)"_ustr); + + Reference xPrepared + = xConnection->prepareStatement(u"INSERT INTO \"TEST1\" VALUES (?,?)"_ustr); + Reference xParams(xPrepared, UNO_QUERY); + constexpr int MAX_TABLE_ROWS = 100; + for (int i = 0; i < MAX_TABLE_ROWS; ++i) + { + xParams->setInt(1, i); + xParams->setString(2, u"Test"_ustr + OUString::number(i)); + xPrepared->executeUpdate(); + } + + uno::Reference xTablesSupplier(xConnection, UNO_QUERY_THROW); + uno::Reference xTablesRefresh(xTablesSupplier->getTables(), + UNO_QUERY_THROW); + xTablesRefresh->refresh(); + + uno::Reference xRowSet( + getMultiServiceFactory()->createInstance(u"com.sun.star.sdb.RowSet"_ustr), UNO_QUERY); + CPPUNIT_ASSERT(xRowSet.is()); + uno::Reference xRowSetProperties(xRowSet, UNO_QUERY); + CPPUNIT_ASSERT(xRowSetProperties.is()); + + // testTableParameters + // for a row set simply based on a table, there should be not parameters at all + xRowSetProperties->setPropertyValue(u"Command"_ustr, Any(u"PRODUCTS"_ustr)); + xRowSetProperties->setPropertyValue(u"CommandType"_ustr, Any(CommandType::TABLE)); + xRowSetProperties->setPropertyValue(u"ActiveConnection"_ustr, Any(xConnection)); + + uno::Reference xParametersSupplier(xRowSet, UNO_QUERY); + uno::Reference xIndex = xParametersSupplier->getParameters(); + + CPPUNIT_ASSERT_EQUAL(sal_Int32(0), xIndex->getCount()); + + // testParametrizedQuery + // for a row set based on a parametrized query, those parameters should be properly recognized + uno::Reference xDocument(mxComponent, UNO_QUERY_THROW); + createQuery(u"SELECT * FROM \"PRODUCTS\" WHERE \"NAME\" LIKE :product_name"_ustr, true, + u"products like"_ustr, xDocument->getDataSource()); + + xRowSetProperties->setPropertyValue(u"Command"_ustr, Any(u"products like"_ustr)); + xRowSetProperties->setPropertyValue(u"CommandType"_ustr, Any(CommandType::QUERY)); + xRowSetProperties->setPropertyValue(u"ActiveConnection"_ustr, Any(xConnection)); + + xIndex.set(xParametersSupplier->getParameters()); + CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xIndex->getCount()); + uno::Reference xPropertySet(xIndex->getByIndex(0), UNO_QUERY_THROW); + + CPPUNIT_ASSERT_EQUAL(u"product_name"_ustr, + xPropertySet->getPropertyValue(u"Name"_ustr).get()); + + // testParametersInFilter + xRowSetProperties->setPropertyValue(u"Command"_ustr, Any(u"SELECT * FROM \"CUSTOMERS\""_ustr)); + xRowSetProperties->setPropertyValue(u"CommandType"_ustr, Any(CommandType::COMMAND)); + xRowSetProperties->setPropertyValue(u"ActiveConnection"_ustr, Any(xConnection)); + + xRowSetProperties->setPropertyValue(u"Filter"_ustr, Any(u"\"CITY\" = :city"_ustr)); + xRowSetProperties->setPropertyValue(u"ApplyFilter"_ustr, Any(true)); + + xIndex.set(xParametersSupplier->getParameters()); + CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xIndex->getCount()); + xPropertySet.set(xIndex->getByIndex(0), UNO_QUERY_THROW); + + CPPUNIT_ASSERT_EQUAL(u"city"_ustr, + xPropertySet->getPropertyValue(u"Name"_ustr).get()); + + xRowSetProperties->setPropertyValue(u"ApplyFilter"_ustr, Any(false)); + + xIndex.set(xParametersSupplier->getParameters()); + CPPUNIT_ASSERT_EQUAL(sal_Int32(0), xIndex->getCount()); + + // testParametersAfterNormalExecute + xRowSetProperties->setPropertyValue(u"Command"_ustr, Any(u"SELECT * FROM \"CUSTOMERS\""_ustr)); + xRowSetProperties->setPropertyValue(u"CommandType"_ustr, Any(CommandType::COMMAND)); + xRowSetProperties->setPropertyValue(u"ActiveConnection"_ustr, Any(xConnection)); + + xRowSet->execute(); + + xIndex.set(xParametersSupplier->getParameters()); + CPPUNIT_ASSERT_EQUAL(sal_Int32(0), xIndex->getCount()); + + xRowSetProperties->setPropertyValue( + u"Command"_ustr, Any(u"SELECT * FROM \"CUSTOMERS\" WHERE \"CITY\" = :city"_ustr)); + xParams.set(xRowSet, UNO_QUERY); + xParams->setString(1, u"London"_ustr); + + xRowSet->execute(); + + xIndex.set(xParametersSupplier->getParameters()); + CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xIndex->getCount()); + xPropertySet.set(xIndex->getByIndex(0), UNO_QUERY_THROW); + + CPPUNIT_ASSERT_EQUAL(u"city"_ustr, + xPropertySet->getPropertyValue(u"Name"_ustr).get()); + CPPUNIT_ASSERT_EQUAL(u"London"_ustr, + xPropertySet->getPropertyValue(u"Value"_ustr).get()); + + //testParametersInteraction + xRowSetProperties->setPropertyValue(u"Command"_ustr, Any(u"products like"_ustr)); + xRowSetProperties->setPropertyValue(u"CommandType"_ustr, Any(CommandType::QUERY)); + xRowSetProperties->setPropertyValue(u"ActiveConnection"_ustr, Any(xConnection)); + + // let's fill in a parameter value via XParameters, and see whether it is respected by the parameters container + xParams->setString(1, u"Apples"_ustr); + + xIndex.set(xParametersSupplier->getParameters()); + CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xIndex->getCount()); + xPropertySet.set(xIndex->getByIndex(0), UNO_QUERY_THROW); + + CPPUNIT_ASSERT_EQUAL(u"product_name"_ustr, + xPropertySet->getPropertyValue(u"Name"_ustr).get()); + CPPUNIT_ASSERT_EQUAL(u"Apples"_ustr, + xPropertySet->getPropertyValue(u"Value"_ustr).get()); + + // let's fill in a parameter value via XParameters, and see whether it is respected by the parameters container + xParams->setString(1, u"Oranges"_ustr); + xRowSet->execute(); + + CPPUNIT_ASSERT_EQUAL(u"product_name"_ustr, + xPropertySet->getPropertyValue(u"Name"_ustr).get()); + CPPUNIT_ASSERT_EQUAL(u"Oranges"_ustr, + xPropertySet->getPropertyValue(u"Value"_ustr).get()); +} + +CPPUNIT_PLUGIN_IMPLEMENT(); + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ From 4257ff73826561ff1f087d7bf9fb85a64838df9a Mon Sep 17 00:00:00 2001 From: Xisco Fauli Date: Tue, 6 Oct 2026 16:57:30 +0200 Subject: [PATCH 209/289] harfbuzz: upgrade to 14.6.0 Downloaded from https://github.com/harfbuzz/harfbuzz/releases/download/14.6.0/harfbuzz-14.6.0.tar.xz Change-Id: Ifc87857cd35503e432326869cae6b1c2b7a9d3b8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211896 Tested-by: Jenkins Reviewed-by: Xisco Fauli --- download.lst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/download.lst b/download.lst index 0eae61a3bc63..2d6303869042 100644 --- a/download.lst +++ b/download.lst @@ -287,8 +287,8 @@ GRAPHITE_TARBALL := graphite2-minimal-1.3.15.tgz # three static lines # so that git cherry-pick # will not run into conflicts -HARFBUZZ_SHA256SUM := 7e2fa4e8c7c98e8d8140671f5772542afaaa6acccfbd746506886b6d85f7f8d6 -HARFBUZZ_TARBALL := harfbuzz-14.5.1.tar.xz +HARFBUZZ_SHA256SUM := d07a007327277708a2a73ae437887cdbaf282937f6d03ca5467723e9099af586 +HARFBUZZ_TARBALL := harfbuzz-14.6.0.tar.xz # three static lines # so that git cherry-pick # will not run into conflicts From c64f9804ac78c82f59cc732a5d3789fdc116f033 Mon Sep 17 00:00:00 2001 From: Xisco Fauli Date: Tue, 6 Oct 2026 11:22:53 +0200 Subject: [PATCH 210/289] expat: upgrade to 2.9.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit With this new version, the build started to fail with error: ‘XML_Size XML_GetCurrentColumnNumber(XML_Parser)’ is deprecated: please use XML_GetCurrentColumnNumber64 instead [-Werror=deprecated-declarations] so we need to check the expat version in case the system expat is older than 2.9 Also add 0001-fix-XML_GE-is-not-defined-evaluates-to-0-Werror-unde.patch to fix error: "XML_GE" is not defined, evaluates to 0 [-Werror=undef] 1087 | # if XML_GE == 1 | ^~~~~~ cc1plus: all warnings being treated as errors Change-Id: If4f1d652941b7766ed94b65a6eaa018f37c89387 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211867 Tested-by: Jenkins Tested-by: René Engelhard Reviewed-by: Xisco Fauli --- download.lst | 4 +-- ...t-defined-evaluates-to-0-Werror-unde.patch | 25 +++++++++++++++++++ external/expat/StaticLibrary_expat.mk | 1 + external/expat/UnpackedTarball_expat.mk | 1 + external/expat/expat-winapi.patch | 4 +-- l10ntools/source/xmlparse.cxx | 5 ++++ sax/source/expatwrap/sax_expat.cxx | 12 +++++++++ 7 files changed, 48 insertions(+), 4 deletions(-) create mode 100644 external/expat/0001-fix-XML_GE-is-not-defined-evaluates-to-0-Werror-unde.patch diff --git a/download.lst b/download.lst index 2d6303869042..a2ce4979764d 100644 --- a/download.lst +++ b/download.lst @@ -116,8 +116,8 @@ ETONYEK_TARBALL := libetonyek-0.1.$(ETONYEK_VERSION_MICRO).tar.xz # three static lines # so that git cherry-pick # will not run into conflicts -EXPAT_SHA256SUM := 1e727b8933ec51a77a9a9d9afcf8e688bce45d907c13e36ab7393fe36e703182 -EXPAT_TARBALL := expat-2.8.5.tar.xz +EXPAT_SHA256SUM := 1e6371862cc31999b368c3b89b49994f0677e1bab5f1b2b85ae3741f5d803051 +EXPAT_TARBALL := expat-2.9.0.tar.xz # three static lines # so that git cherry-pick # will not run into conflicts diff --git a/external/expat/0001-fix-XML_GE-is-not-defined-evaluates-to-0-Werror-unde.patch b/external/expat/0001-fix-XML_GE-is-not-defined-evaluates-to-0-Werror-unde.patch new file mode 100644 index 000000000000..5ac374aec5b6 --- /dev/null +++ b/external/expat/0001-fix-XML_GE-is-not-defined-evaluates-to-0-Werror-unde.patch @@ -0,0 +1,25 @@ +From 3e3d9091bc3db29901a1507466bf0479ff38de9a Mon Sep 17 00:00:00 2001 +From: Xisco Fauli +Date: Tue, 6 Oct 2026 10:50:50 +0200 +Subject: [PATCH] fix XML_GE is not defined, evaluates to 0 [-Werror=undef] + +--- + expat/lib/expat.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/expat/lib/expat.h b/expat/lib/expat.h +index 1b2852dd..fea2fd99 100644 +--- a/expat/lib/expat.h ++++ b/expat/lib/expat.h +@@ -1084,7 +1084,7 @@ enum XML_Parser_Property { + # if defined(XML_TESTING) + XML_PROP_INVALID = 0, + # endif +-# if XML_GE == 1 ++# if defined(XML_GE) && XML_GE == 1 + XML_PROP_ALLOC_TRACKER_ACTIVATION_THRESHOLD = 1, // of type `uint64_t` + XML_PROP_ALLOC_TRACKER_MAXIMUM_AMPLIFICATION = 2, // of type `double` + XML_PROP_BILLION_LAUGHS_ACTIVATION_THRESHOLD = 3, // of type `uint64_t` +-- +2.47.3 + diff --git a/external/expat/StaticLibrary_expat.mk b/external/expat/StaticLibrary_expat.mk index 6ca4fc84bf7f..b3b8fbb5d1ed 100644 --- a/external/expat/StaticLibrary_expat.mk +++ b/external/expat/StaticLibrary_expat.mk @@ -57,6 +57,7 @@ $(eval $(call gb_StaticLibrary_add_generated_cobjects,expat,\ endif $(eval $(call gb_StaticLibrary_add_generated_cobjects,expat,\ + UnpackedTarball/expat/lib/xcs \ UnpackedTarball/expat/lib/xmlparse \ UnpackedTarball/expat/lib/xmlrole \ UnpackedTarball/expat/lib/xmltok \ diff --git a/external/expat/UnpackedTarball_expat.mk b/external/expat/UnpackedTarball_expat.mk index e9e4f75046f2..721b9ac6e031 100644 --- a/external/expat/UnpackedTarball_expat.mk +++ b/external/expat/UnpackedTarball_expat.mk @@ -17,6 +17,7 @@ $(eval $(call gb_UnpackedTarball_set_patchlevel,expat,2)) $(eval $(call gb_UnpackedTarball_add_patches,expat,\ external/expat/expat-winapi.patch \ + external/expat/0001-fix-XML_GE-is-not-defined-evaluates-to-0-Werror-unde.patch \ )) # vim: set noet sw=4 ts=4: diff --git a/external/expat/expat-winapi.patch b/external/expat/expat-winapi.patch index ea664c3db76c..a789c7057c50 100644 --- a/external/expat/expat-winapi.patch +++ b/external/expat/expat-winapi.patch @@ -13,8 +13,8 @@ --- misc/expat-2.5.0/lib/xmlparse.c 2022-10-26 00:09:08.000000000 +0900 +++ misc/build/expat-2.5.0/lib/xmlparse.c 2022-10-30 23:09:01.843006341 +0900 -@@ -98,6 +98,10 @@ - #include +@@ -112,6 +112,10 @@ + #include /* wcsncmp */ #ifdef _WIN32 +# undef HAVE_ARC4RANDOM diff --git a/l10ntools/source/xmlparse.cxx b/l10ntools/source/xmlparse.cxx index 875bdd308a27..be670f0bd27f 100644 --- a/l10ntools/source/xmlparse.cxx +++ b/l10ntools/source/xmlparse.cxx @@ -888,8 +888,13 @@ bool SimpleXMLParser::Execute( const OString &rFileName, XMLFile* pXMLFile ) if (!result) { m_aErrorInformation.m_eCode = XML_GetErrorCode( m_aParser ); +#if (XML_MAJOR_VERSION > 2 || (XML_MAJOR_VERSION == 2 && XML_MINOR_VERSION >= 9)) + m_aErrorInformation.m_nLine = XML_GetCurrentLineNumber64( m_aParser ); + m_aErrorInformation.m_nColumn = XML_GetCurrentColumnNumber64( m_aParser ); +#else m_aErrorInformation.m_nLine = XML_GetErrorLineNumber( m_aParser ); m_aErrorInformation.m_nColumn = XML_GetErrorColumnNumber( m_aParser ); +#endif m_aErrorInformation.m_sMessage = "ERROR: "_ostr; if ( !pXMLFile->GetName().isEmpty()) diff --git a/sax/source/expatwrap/sax_expat.cxx b/sax/source/expatwrap/sax_expat.cxx index f6e6cdb90f55..d4cd6fa8b0e0 100644 --- a/sax/source/expatwrap/sax_expat.cxx +++ b/sax/source/expatwrap/sax_expat.cxx @@ -315,11 +315,19 @@ public: public: //XLocator virtual sal_Int32 SAL_CALL getColumnNumber() override { +#if (XML_MAJOR_VERSION > 2 || (XML_MAJOR_VERSION == 2 && XML_MINOR_VERSION >= 9)) + return XML_GetCurrentColumnNumber64( m_pParser->getEntity().pParser ); +#else return XML_GetCurrentColumnNumber( m_pParser->getEntity().pParser ); +#endif } virtual sal_Int32 SAL_CALL getLineNumber() override { +#if (XML_MAJOR_VERSION > 2 || (XML_MAJOR_VERSION == 2 && XML_MINOR_VERSION >= 9)) + return XML_GetCurrentLineNumber64( m_pParser->getEntity().pParser ); +#else return XML_GetCurrentLineNumber( m_pParser->getEntity().pParser ); +#endif } virtual OUString SAL_CALL getPublicId() override { @@ -337,7 +345,11 @@ public: //XLocator } virtual sal_Int64 SAL_CALL getPosition() override { +#if (XML_MAJOR_VERSION > 2 || (XML_MAJOR_VERSION == 2 && XML_MINOR_VERSION >= 9)) + return XML_GetCurrentByteIndex64( m_pParser->getEntity().pParser ); +#else return XML_GetCurrentByteIndex( m_pParser->getEntity().pParser ); +#endif } virtual ::sal_Int64 SAL_CALL getLength() override { From 9329964052b7b1e78c1e7d342fad704b08466ad6 Mon Sep 17 00:00:00 2001 From: Andreas Heinisch Date: Tue, 6 Oct 2026 16:19:34 +0200 Subject: [PATCH 211/289] tdf#108295 - Set the initial focus explicitly to the first input field Change-Id: Icc16abfb305c457ac08323d8b56366c376e80e41 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211893 Tested-by: Jenkins Reviewed-by: Andreas Heinisch --- vcl/source/window/colorpicker.cxx | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/vcl/source/window/colorpicker.cxx b/vcl/source/window/colorpicker.cxx index d7ef32922567..3cb023ad576e 100644 --- a/vcl/source/window/colorpicker.cxx +++ b/vcl/source/window/colorpicker.cxx @@ -648,6 +648,9 @@ ColorPickerDialog::ColorPickerDialog(weld::Window* pParent, const Color& rColor, m_xRBSaturation->connect_toggled( aLink2 ); m_xRBBrightness->connect_toggled( aLink2 ); + // tdf#108295 - set the initial focus explicitly to the first input field + m_xMFRed->grab_focus(); + if (eDialogMode == vcl::ColorPickerMode::Modify) m_xColorPrevious->show(); @@ -677,6 +680,9 @@ void ColorPickerDialog::SetColor(const Color& rColor) RGBtoCMYK(mdRed, mdGreen, mdBlue, mdCyan, mdMagenta, mdYellow, mdKey); update_color(); + + // tdf#108295 - select the first field content so a new value can be typed directly + m_xMFRed->select_region(0, -1); } void ColorPickerDialog::update_color( UpdateFlags n ) From 7390c517c7eb2664ddd44e7448e87b17bdf2a43c Mon Sep 17 00:00:00 2001 From: Justin Luth Date: Tue, 6 Oct 2026 15:09:38 -0400 Subject: [PATCH 212/289] tdf#173510 sw: prevent crash when table style deselected This fixes a 26.8 regression that can cause LO to crash, from commit 2f16debb36b6f92e9be8749bbfc466cd779aa162. A -1 is possible! Hold down the Ctrl key to deselect the selected table style. Since GetData requires a valid index, the -1 crashes the lookup. The assert was added by Caolan just to silence warnings. It OUGHT to be possible to have a -1, so we desperately need to handle it. One side effect of the -1 is that the preview window needs to be updated. So that change is included in this patch. It basically ends up being a partial revert of 2f16debb36b6f92e9be. P.S. I don't know how m_xTAutoFormat would already have a value, but that has been like that since introduction, so I decided not to fiddle with it. But surely you cannot run the OKHdl more than once... Change-Id: Ieae175072c17b20e79a139b434eae2fed09ca655 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211917 Tested-by: Jenkins Reviewed-by: Justin Luth --- sw/source/ui/table/instable.cxx | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/sw/source/ui/table/instable.cxx b/sw/source/ui/table/instable.cxx index 4615b22dc9df..0dcfdaa046dd 100644 --- a/sw/source/ui/table/instable.cxx +++ b/sw/source/ui/table/instable.cxx @@ -150,19 +150,27 @@ IMPL_LINK_NOARG(SwInsTableDlg, SelFormatHdl, weld::ItemView&, void) { // Get index of selected item from the listbox int styleIdx = m_xLbFormat->get_selected_index(); - assert(styleIdx != -1 && "nothing selected"); - m_aWndPreview.NotifyChange(m_xTableTable->GetResolvedStyle(m_xTableTable->GetData(styleIdx))); + if (styleIdx == -1) + { + SwTableAutoFormat aNone(TableStyleName(SwViewShell::GetShellRes()->aStrNone)); + aNone.DisableAll(); + m_aWndPreview.NotifyChange(&aNone); + } + else + m_aWndPreview.NotifyChange(m_xTableTable->GetResolvedStyle( + m_xTableTable->GetData(styleIdx))); } IMPL_LINK_NOARG(SwInsTableDlg, OKHdl, weld::Button&, void) { int styleIdx = m_xLbFormat->get_selected_index(); - assert(styleIdx != -1 && "nothing selected"); - - if( m_xTAutoFormat ) - *m_xTAutoFormat = (*m_xTableTable)[styleIdx]; - else - m_xTAutoFormat.reset(new SwTableAutoFormat((*m_xTableTable)[styleIdx])); + if (styleIdx != -1) + { + if (m_xTAutoFormat) + *m_xTAutoFormat = (*m_xTableTable)[styleIdx]; + else + m_xTAutoFormat.reset(new SwTableAutoFormat((*m_xTableTable)[styleIdx])); + } m_xDialog->response(RET_OK); } From 90a6b78435275ad9e99708fa1e7b131af4870797 Mon Sep 17 00:00:00 2001 From: Justin Luth Date: Tue, 6 Oct 2026 15:48:41 -0400 Subject: [PATCH 213/289] tdf#173510 sw: do not default to a table style when inserting one This fixes a 26.8 regression from commit 4fb31ea85f94c0cffba2282a119811833e584570. Over the years we keep battling people who want to add borders to tables by default. This last time was even worse since it applies an entire table style, and table styles simply have never worked well. So do NOT default to infuriating results. Note that this depends on the prior patch to prevent LO from crashing... Change-Id: I639286ac1f66883f3dd3f41a3d027a75e9ac1d97 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211918 Tested-by: Jenkins Reviewed-by: Justin Luth --- sw/source/ui/table/instable.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sw/source/ui/table/instable.cxx b/sw/source/ui/table/instable.cxx index 0dcfdaa046dd..2c94eef5070a 100644 --- a/sw/source/ui/table/instable.cxx +++ b/sw/source/ui/table/instable.cxx @@ -141,7 +141,7 @@ void SwInsTableDlg::InitAutoTableFormat() m_xLbFormat->append_text((*m_xTableTable)[i].GetName().toString()); } - m_xLbFormat->select(0); + m_xLbFormat->select(-1); // Do NOT select a table style by default. They just don't work well. SelFormatHdl( *m_xLbFormat ); } From dc7f772380028e2e6dddd050b26019ebc5630b32 Mon Sep 17 00:00:00 2001 From: Justin Luth Date: Tue, 6 Oct 2026 16:23:09 -0400 Subject: [PATCH 214/289] tdf#173510 svx: prevent crash when table style deselected This fixes a 26.8 regression from commit 4fb31ea85f94c0cffba2282a119811833e584570. When Table - AutoFormat styles has the style de-selected (via a Ctrl-click), then SelFormatHdl would call UpdateChecks and crash when GetData tried to access an index of -1. Change-Id: I2302436d19ef99584cdb7c4e41738894756e9e8a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211921 Reviewed-by: Justin Luth Tested-by: Jenkins --- svx/source/dialog/TableAutoFmtDlg.cxx | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/svx/source/dialog/TableAutoFmtDlg.cxx b/svx/source/dialog/TableAutoFmtDlg.cxx index 6171b7244e94..219ad28f0390 100644 --- a/svx/source/dialog/TableAutoFmtDlg.cxx +++ b/svx/source/dialog/TableAutoFmtDlg.cxx @@ -55,6 +55,14 @@ public: OUString GetInputString() const { return mxEdInput->get_text(); } }; + +SvxAutoFormatData* lcl_GetTableAutoFormat(size_t nIndex, SvxAutoFormat& rFormat) +{ + if (nIndex > rFormat.size() - 1) + return nullptr; + + return rFormat.GetData(nIndex); +} } // AutoFormat-Dialog: @@ -157,7 +165,7 @@ void SvxTableAutoFmtDlg::UpdateUIState() void SvxTableAutoFmtDlg::UpdateChecks() { - if (const SvxAutoFormatData* pData = mpFormat.GetData(mnIndex)) + if (const SvxAutoFormatData* pData = lcl_GetTableAutoFormat(mnIndex, mpFormat)) { mxBtnNumFormat->set_active(pData->IsValueFormat()); mxBtnBorder->set_active(pData->IsFrame()); @@ -185,7 +193,7 @@ OUString SvxTableAutoFmtDlg::GenerateUniqueStyleName() // Event Handlers IMPL_LINK(SvxTableAutoFmtDlg, CheckHdl, weld::Toggleable&, rBtn, void) { - SvxAutoFormatData* rData = mpFormat.GetData(mnIndex); + SvxAutoFormatData* rData = lcl_GetTableAutoFormat(mnIndex, mpFormat); if (!rData) return; @@ -269,7 +277,7 @@ IMPL_LINK_NOARG(SvxTableAutoFmtDlg, SelFormatHdl, weld::ItemView&, void) UpdateChecks(); UpdateUIState(); - if (const SvxAutoFormatData* pData = mpFormat.GetData(mnIndex)) + if (const SvxAutoFormatData* pData = lcl_GetTableAutoFormat(mnIndex, mpFormat)) maWndPreview.NotifyChange(mpFormat.GetResolvedStyle(pData)); } From c08511c560acb4fb22157eeb4798ccac51ffdfdf Mon Sep 17 00:00:00 2001 From: Justin Luth Date: Tue, 6 Oct 2026 15:55:06 -0400 Subject: [PATCH 215/289] tdf#173510 svx: prevent another crash when table style deselected This fixes a regression from commit 4fb31ea85f94c0cffba2282a119811833e584570 When you de-select a table style in Table - AutoFormat Styles, then the checkboxes below were left enabled despite a -1 index, so the rename and renew buttons would crash. Change-Id: I3c9601476f874116e43387ee40e934932a44b311 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211922 Tested-by: Jenkins Reviewed-by: Justin Luth --- svx/source/dialog/TableAutoFmtDlg.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/svx/source/dialog/TableAutoFmtDlg.cxx b/svx/source/dialog/TableAutoFmtDlg.cxx index 219ad28f0390..ce339f71986f 100644 --- a/svx/source/dialog/TableAutoFmtDlg.cxx +++ b/svx/source/dialog/TableAutoFmtDlg.cxx @@ -158,7 +158,7 @@ void SvxTableAutoFmtDlg::PopulateFormatList() void SvxTableAutoFmtDlg::UpdateUIState() { - const bool bCanModify = mnIndex != DEFAULT_STYLE; + const bool bCanModify = mnIndex != DEFAULT_STYLE && mnIndex < mpFormat.size(); mxBtnRename->set_sensitive(bCanModify); mxBtnRemove->set_sensitive(bCanModify); } From f74731de659e8a0d70eb19c25f661a3add0d0e7e Mon Sep 17 00:00:00 2001 From: Justin Luth Date: Tue, 6 Oct 2026 16:40:51 -0400 Subject: [PATCH 216/289] tdf#173510 svx: prevent a third crash when table style deselected This fixes a 26.8 regression from commit 4fb31ea85f94c0cffba2282a119811833e584570. It looks like it was a mistake to not include it here in the first place, but doubly so when a table style is deselected (via Ctrl-click). In that case, if the user pressed the edit button, LibreOffice would crash because of an attempted -1 index access. Change-Id: I98038dad3693fba26d17022bec75bd201340c1cb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211923 Tested-by: Jenkins Reviewed-by: Justin Luth --- svx/source/dialog/TableAutoFmtDlg.cxx | 1 + 1 file changed, 1 insertion(+) diff --git a/svx/source/dialog/TableAutoFmtDlg.cxx b/svx/source/dialog/TableAutoFmtDlg.cxx index ce339f71986f..294b6ff90683 100644 --- a/svx/source/dialog/TableAutoFmtDlg.cxx +++ b/svx/source/dialog/TableAutoFmtDlg.cxx @@ -161,6 +161,7 @@ void SvxTableAutoFmtDlg::UpdateUIState() const bool bCanModify = mnIndex != DEFAULT_STYLE && mnIndex < mpFormat.size(); mxBtnRename->set_sensitive(bCanModify); mxBtnRemove->set_sensitive(bCanModify); + mxBtnEdit->set_sensitive(bCanModify); } void SvxTableAutoFmtDlg::UpdateChecks() From a3be6f8c435e49537443e2b74ee65846883db4b1 Mon Sep 17 00:00:00 2001 From: Justin Luth Date: Tue, 6 Oct 2026 18:57:41 -0400 Subject: [PATCH 217/289] tdf#173510 sw: prevent another crash when table style deselected This fixes a 26.8 regression from commit 513bfbd476113f648090a8275cece4dc04ba0463 With the table style deselected (via Ctrl-click), pressing the OK button caused LibreOffice to crash. Change-Id: If79d0c0bbd8c1b3f269ebb0b712f39a00b1f4fab Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211924 Tested-by: Jenkins Reviewed-by: Justin Luth --- sw/source/uibase/shells/tabsh.cxx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/sw/source/uibase/shells/tabsh.cxx b/sw/source/uibase/shells/tabsh.cxx index 80493ebef0f2..5caa0f95c54b 100644 --- a/sw/source/uibase/shells/tabsh.cxx +++ b/sw/source/uibase/shells/tabsh.cxx @@ -887,7 +887,11 @@ void SwTableShell::Execute(SfxRequest &rReq) SwTableAutoFormatTable& rFormats = rSh.GetDoc()->GetTableStyles(); SvxTableAutoFmtDlg aDlg(rFormats, sFormatName, GetView().GetFrameWeld(), true, bRTL); if (aDlg.run() == RET_OK) - rSh.SetTableStyle(*rFormats.GetData(aDlg.GetIndex())); + { + size_t nIndex = aDlg.GetIndex(); + if (nIndex < rFormats.size()) + rSh.SetTableStyle(*rFormats.GetData(nIndex)); + } break; } From 197863f377470b4c6efa636ec40389b3a10aa808 Mon Sep 17 00:00:00 2001 From: Justin Luth Date: Tue, 6 Oct 2026 19:16:10 -0400 Subject: [PATCH 218/289] tdf#173510 sw: allow AutoFormat styles to remove table style You can remove a table style by Ctrl-clicking on the selected one. (Probably nobody will find this - it probably needs a help tip.) This was kind-of working before 26.8 (when chosing 'None') but not as 'nice'. Then at least it STOPPED applying the style when new changes are made. I assume that a lot of the work that when into table styles in 26.8 made it so that with this patch's change, the existing format is cleared to nothing as the style is removed. Clearing the existing seems like a good thing to me. Change-Id: I174b3e8a408995500598937bbb548250c80bc40f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211925 Tested-by: Jenkins Reviewed-by: Justin Luth --- sw/source/uibase/shells/tabsh.cxx | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/sw/source/uibase/shells/tabsh.cxx b/sw/source/uibase/shells/tabsh.cxx index 5caa0f95c54b..679f7efb5ae2 100644 --- a/sw/source/uibase/shells/tabsh.cxx +++ b/sw/source/uibase/shells/tabsh.cxx @@ -891,6 +891,11 @@ void SwTableShell::Execute(SfxRequest &rReq) size_t nIndex = aDlg.GetIndex(); if (nIndex < rFormats.size()) rSh.SetTableStyle(*rFormats.GetData(nIndex)); + else + { + TableStyleName aNone; + rSh.UpdateTableStyleFormatting(nullptr, false, &aNone); + } } break; From 327a555d56032b211b383b81717b5ee0c02401f7 Mon Sep 17 00:00:00 2001 From: Justin Luth Date: Tue, 6 Oct 2026 19:44:10 -0400 Subject: [PATCH 219/289] tdf#173510 svx: update preview when table style is de-selected This fixes a 26.8 regression from commit 4fb31ea85f94c0cffba2282a119811833e584570 Change-Id: Ifbd749eccbf6a5bb5f292100d0d16c6eb9246109 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211926 Tested-by: Jenkins Reviewed-by: Justin Luth --- svx/source/dialog/TableAutoFmtDlg.cxx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/svx/source/dialog/TableAutoFmtDlg.cxx b/svx/source/dialog/TableAutoFmtDlg.cxx index 294b6ff90683..f0cfa3675371 100644 --- a/svx/source/dialog/TableAutoFmtDlg.cxx +++ b/svx/source/dialog/TableAutoFmtDlg.cxx @@ -280,6 +280,8 @@ IMPL_LINK_NOARG(SvxTableAutoFmtDlg, SelFormatHdl, weld::ItemView&, void) if (const SvxAutoFormatData* pData = lcl_GetTableAutoFormat(mnIndex, mpFormat)) maWndPreview.NotifyChange(mpFormat.GetResolvedStyle(pData)); + else + maWndPreview.NotifyChange(mpFormat.GetDefaultData()); } OUString SvxTableAutoFmtDlg::GetCurrFormatName() From 8ebbdee2d222f24169001c575627a22c4dbebd3e Mon Sep 17 00:00:00 2001 From: Justin Luth Date: Tue, 6 Oct 2026 20:09:33 -0400 Subject: [PATCH 220/289] tdf#173510 sw: do not default to a table style when converting to table This fixes a 26.8 regression from commit 4fb31ea85f94c0cffba2282a119811833e584570. Over the years we keep battling people who want to add borders to tables by default. This last time was even worse since it applies an entire table style, and table styles simply have never worked well. So do NOT default to infuriating results. Change-Id: I804ddbf14b8d4b609793bbb4bd1fa7be3f905358 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211927 Reviewed-by: Justin Luth Tested-by: Jenkins --- sw/source/ui/table/convert.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sw/source/ui/table/convert.cxx b/sw/source/ui/table/convert.cxx index 3ad49d9c52f8..3b54959bbe70 100644 --- a/sw/source/ui/table/convert.cxx +++ b/sw/source/ui/table/convert.cxx @@ -204,7 +204,7 @@ void SwConvertTableDlg::Init() m_xLbFormat->connect_selection_changed(LINK(this, SwConvertTableDlg, SelFormatHdl)); size_t nCount = m_xTableTable->size(); - m_nIndex = nCount ? 0 : -1; + m_nIndex = -1; // Do NOT select a table style by default. They just don't work well. for (size_t i = 0; i < nCount; ++i) { From 78e93a21ec21a2ed29ca97c192f0a6ac975c59c8 Mon Sep 17 00:00:00 2001 From: Justin Luth Date: Tue, 6 Oct 2026 20:12:27 -0400 Subject: [PATCH 221/289] tdf#173510 sw: update preview when convert table style is de-selected This fixes a 26.8 regression from commit 4fb31ea85f94c0cffba2282a119811833e584570. Change-Id: I947edd9ecc1f5c0e23e864dbf904b5652f79af50 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211928 Tested-by: Jenkins Reviewed-by: Justin Luth --- sw/source/ui/table/convert.cxx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/sw/source/ui/table/convert.cxx b/sw/source/ui/table/convert.cxx index 3b54959bbe70..eacca6c13fb7 100644 --- a/sw/source/ui/table/convert.cxx +++ b/sw/source/ui/table/convert.cxx @@ -284,7 +284,11 @@ IMPL_LINK_NOARG(SwConvertTableDlg, SelFormatHdl, weld::ItemView&, void) m_nIndex = m_xLbFormat->get_selected_index(); if (m_nIndex == -1) { - SAL_WARN("sw.ui", "No entry selected"); + SwTableAutoFormat aNone(TableStyleName(SwViewShell::GetShellRes()->aStrNone)); + aNone.DisableAll(); + m_aWndPreview.NotifyChange(&aNone); + mxTAutoFormat.reset(); + return; } m_aWndPreview.NotifyChange(m_xTableTable->GetResolvedStyle(m_xTableTable->GetData(m_nIndex))); From f666a74220233c8d85a182416016794da8c57a10 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= Date: Fri, 2 Oct 2026 22:29:21 +0000 Subject: [PATCH 222/289] ofz#500542909 svl: don't broadcast an unchanged SetHidden or SetFollow MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit During import, hidden is set on every page style. Each time, every sheet using that style is repaginated, which lays out the header and footer again. In the fuzzed document those 44 repaginations took 48.75s of its 49s, and now 1.8s. SetFollow gets the same check for consistency. Signed-off-by: Caolán McNamara Change-Id: Ibdacc93203873d2c6498bf4444d5cc64e929aa83 Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/14217 Tested-by: Jenkins CPCI Reviewed-by: Noel Grandin (cherry picked from commit d84523bd599f0fabc46ce4f82a6907f938aef55e) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211811 Reviewed-by: Xisco Fauli Tested-by: Jenkins --- svl/source/items/style.cxx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/svl/source/items/style.cxx b/svl/source/items/style.cxx index 1749eb0f4759..2762c38f51b3 100644 --- a/svl/source/items/style.cxx +++ b/svl/source/items/style.cxx @@ -226,6 +226,8 @@ bool SfxStyleSheetBase::SetParent( const OUString& rName ) void SfxStyleSheetBase::SetHidden( bool hidden ) { + if (bHidden == hidden) + return; bHidden = hidden; m_pPool->Broadcast( SfxStyleSheetHint( SfxHintId::StyleSheetModified, *this ) ); } @@ -248,8 +250,8 @@ bool SfxStyleSheetBase::SetFollow( const OUString& rName ) return false; } aFollow = rName; + m_pPool->Broadcast( SfxStyleSheetHint( SfxHintId::StyleSheetModified, *this ) ); } - m_pPool->Broadcast( SfxStyleSheetHint( SfxHintId::StyleSheetModified, *this ) ); return true; } From 0ac807366dc72f8f51bf62ab1e0a95334c2b971b Mon Sep 17 00:00:00 2001 From: Neil Roberts Date: Fri, 2 Oct 2026 13:57:21 +0200 Subject: [PATCH 223/289] redlndlg: Use unique_ptr::get() instead of &*ptr MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Using &* to get the pointer out of a unique_ptr can be problematic if the pointer is null. In this case that probably can’t happen, but either way using get() makes the code easier to understand. This also paves the way for a compiler plugin to detect this in a later patch. Change-Id: Ib5291002581565e227dd6ca30570ecee63ef7cba Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211748 Reviewed-by: Neil Roberts Tested-by: Jenkins --- sw/source/uibase/misc/redlndlg.cxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sw/source/uibase/misc/redlndlg.cxx b/sw/source/uibase/misc/redlndlg.cxx index cd4674127279..344a8a2628d6 100644 --- a/sw/source/uibase/misc/redlndlg.cxx +++ b/sw/source/uibase/misc/redlndlg.cxx @@ -1147,7 +1147,7 @@ void SwRedlineAcceptDlg::CallAcceptReject( bool bSelect, bool bAccept ) // on the same text range, stored only in OOXML) if ( bMoreRedlines && aRedlines.size() == 1 ) { - std::unique_ptr xChild(rTreeView.make_iterator( &*aRedlines[0] )); + std::unique_ptr xChild(rTreeView.make_iterator( aRedlines[0].get() )); RedlineData* pData = weld::fromId(rTreeView.get_id(*xChild)); if ( pData->bDisabled ) bMoreRedlines = false; @@ -1188,7 +1188,7 @@ void SwRedlineAcceptDlg::CallAcceptReject( bool bSelect, bool bAccept ) // handle redlines of table rows, stored as children of the item associated // to the deleted/inserted table row(s) - std::unique_ptr xChild(rTreeView.make_iterator( &*rRedLine )); + std::unique_ptr xChild(rTreeView.make_iterator( rRedLine.get() )); if ( rTreeView.iter_children(*xChild) ) { RedlineData* pData = weld::fromId(rTreeView.get_id(*xChild)); @@ -1353,7 +1353,7 @@ IMPL_LINK_NOARG(SwRedlineAcceptDlg, GotoHdl, Timer *, void) } // select all redlines of tracked table rows - std::unique_ptr xChild(rTreeView.make_iterator( &*xActEntry )); + std::unique_ptr xChild(rTreeView.make_iterator( xActEntry.get() )); if ( rTreeView.iter_children(*xChild) ) { RedlineData *pData = reinterpret_cast(rTreeView.get_id(*xChild).toInt64()); From d926f623382b53c351c2a890352d5e16525df2f3 Mon Sep 17 00:00:00 2001 From: Neil Roberts Date: Fri, 2 Oct 2026 14:55:35 +0200 Subject: [PATCH 224/289] lokdocview: Use m_pTileBuffer.get instead of &*m_pTileBuffer on unique_ptr MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Using &* can be problematic if the pointer is null. In this case it probably doesn’t matter, but using unique_ptr::get() is probably easier to understand anyway. This also paves the way for a later compiler plugin to check for this. Change-Id: If0ece4548b44080acf6db7f8c0ac37922d1a197c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211749 Tested-by: Jenkins Reviewed-by: Neil Roberts --- libreofficekit/source/gtk/lokdocview.cxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libreofficekit/source/gtk/lokdocview.cxx b/libreofficekit/source/gtk/lokdocview.cxx index b9c8e3cf7704..24b6826495e0 100644 --- a/libreofficekit/source/gtk/lokdocview.cxx +++ b/libreofficekit/source/gtk/lokdocview.cxx @@ -1720,7 +1720,7 @@ renderDocument(LOKDocView* pDocView, cairo_t* pCairo) pLOEvent->m_nPaintTileX = nRow; pLOEvent->m_nPaintTileY = nColumn; pLOEvent->m_fPaintTileZoom = priv->m_fZoom; - pLOEvent->m_pTileBuffer = &*priv->m_pTileBuffer; + pLOEvent->m_pTileBuffer = priv->m_pTileBuffer.get(); GTask* task = g_task_new(pDocView, nullptr, paintTileCallback, pLOEvent); g_task_set_task_data(task, pLOEvent, LOEvent::destroy); @@ -2482,7 +2482,7 @@ paintTileInThread (gpointer data) gint nTileSizePixelsScaled = nTileSizePixels * nScaleFactor; // check if "source" tile buffer is different from "current" tile buffer - if (pLOEvent->m_pTileBuffer != &*priv->m_pTileBuffer) + if (pLOEvent->m_pTileBuffer != priv->m_pTileBuffer.get()) { pLOEvent->m_pTileBuffer = nullptr; g_task_return_new_error(task, @@ -2533,7 +2533,7 @@ paintTileInThread (gpointer data) // requests has passed the previous check at start of this function, and has // rendered the tile already. We want to stop such rendered tiles from being // stored in new tile buffer. - if (pLOEvent->m_pTileBuffer != &*priv->m_pTileBuffer) + if (pLOEvent->m_pTileBuffer != priv->m_pTileBuffer.get()) { pLOEvent->m_pTileBuffer = nullptr; g_task_return_new_error(task, From 711c6c0c5bf61f31e1ad3fae416b50561a92b76a Mon Sep 17 00:00:00 2001 From: Neil Roberts Date: Fri, 2 Oct 2026 15:24:28 +0200 Subject: [PATCH 225/289] ScDPSaveDimension: Use unique_ptr::get() instead of &*iter MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Using &* can be problematic if the pointer is null. In this case I don’t think it matters, but using unique_ptr::get() is probably easier to understand anyway. This also paves the way for a later compiler plugin to check for this. Change-Id: I064def383ccf4b1ff263a70cd0c7775ff6fbbc8d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211750 Reviewed-by: Neil Roberts Tested-by: Jenkins --- sc/source/core/data/dpsave.cxx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sc/source/core/data/dpsave.cxx b/sc/source/core/data/dpsave.cxx index 9d177f043bfa..fc0b9f0fd874 100644 --- a/sc/source/core/data/dpsave.cxx +++ b/sc/source/core/data/dpsave.cxx @@ -905,7 +905,7 @@ ScDPSaveDimension* ScDPSaveData::GetDimensionByName(const OUString& rName) for (auto const& iter : m_DimList) { if (iter->GetName() == rName && !iter->IsDataLayout() ) - return &(*iter); + return iter.get(); } return AppendNewDimension(rName, false); @@ -916,7 +916,7 @@ ScDPSaveDimension* ScDPSaveData::GetExistingDimensionByName(std::u16string_view for (auto const& iter : m_DimList) { if (iter->GetName() == rName && !iter->IsDataLayout() ) - return &(*iter); + return iter.get(); } return nullptr; // don't create new } @@ -946,7 +946,7 @@ ScDPSaveDimension* ScDPSaveData::GetExistingDataLayoutDimension() const for (auto const& iter : m_DimList) { if ( iter->IsDataLayout() ) - return &(*iter); + return iter.get(); } return nullptr; } @@ -1003,7 +1003,7 @@ ScDPSaveDimension* ScDPSaveData::GetFirstDimension(sheet::DataPilotFieldOrientat for (auto const& iter : m_DimList) { if (iter->GetOrientation() == eOrientation && !iter->IsDataLayout()) - return &(*iter); + return iter.get(); } return nullptr; } From 13fb6e87c73a9c1cd1710ac50b25daf6a1304e1d Mon Sep 17 00:00:00 2001 From: Neil Roberts Date: Fri, 2 Oct 2026 15:29:18 +0200 Subject: [PATCH 226/289] ScAutoFormatData: Use unique_ptr::get() instead of &*iter MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Using &* can be problematic if the pointer is null. In this case I don’t think it matters, but using unique_ptr::get() is probably easier to understand anyway. This also paves the way for a later compiler plugin to check for this. Change-Id: I6b399d57cdf580d40721789bf3d6e7607c56fd6e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211751 Tested-by: Jenkins Reviewed-by: Neil Roberts --- sc/source/core/tool/autoform.cxx | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/sc/source/core/tool/autoform.cxx b/sc/source/core/tool/autoform.cxx index eac1dfb55ada..39b705680d99 100644 --- a/sc/source/core/tool/autoform.cxx +++ b/sc/source/core/tool/autoform.cxx @@ -367,10 +367,13 @@ ScAutoFormat::~ScAutoFormat() = default; const ScAutoFormatData* ScAutoFormat::GetData(size_t nIndex) const { - return &*mpImpl->maAutoFormats[nIndex]; + return mpImpl->maAutoFormats[nIndex].get(); } -ScAutoFormatData* ScAutoFormat::GetData(size_t nIndex) { return &*mpImpl->maAutoFormats[nIndex]; } +ScAutoFormatData* ScAutoFormat::GetData(size_t nIndex) +{ + return mpImpl->maAutoFormats[nIndex].get(); +} bool ScAutoFormat::InsertAutoFormat(SvxAutoFormatData* pFormat) { From 95218dded0c43e36665253485b67541e484818d3 Mon Sep 17 00:00:00 2001 From: Neil Roberts Date: Fri, 2 Oct 2026 16:10:34 +0200 Subject: [PATCH 227/289] TableProperties: Use shared_ptr::get() instead of &*mpTableStyle MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Using &* can be problematic if the pointer is null. In this case the pointer is explicitly checked for null first so it doesn’t matter, but using shared_ptr::get() is probably easier to understand anyway. This also paves the way for a later compiler plugin to check for this. Change-Id: If087962548c6a7e06311eab9175f5108b50ca549 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211752 Tested-by: Jenkins Reviewed-by: Neil Roberts --- oox/source/drawingml/table/tableproperties.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/oox/source/drawingml/table/tableproperties.cxx b/oox/source/drawingml/table/tableproperties.cxx index ab4f4d69e1df..ca0c77d9d4cc 100644 --- a/oox/source/drawingml/table/tableproperties.cxx +++ b/oox/source/drawingml/table/tableproperties.cxx @@ -92,7 +92,7 @@ const TableStyle& TableProperties::getUsedTableStyle( const ::oox::core::XmlFilt TableStyle* pTableStyle = nullptr; if ( mpTableStyle ) - pTableStyle = &*mpTableStyle; + pTableStyle = mpTableStyle.get(); else if ( !getStyleId().isEmpty() && rBase.getTableStyles() ) { const std::vector< TableStyle >& rTableStyles( rBase.getTableStyles()->getTableStyles() ); From 1b6f6d39e387112b52196831b8a93789b94e316f Mon Sep 17 00:00:00 2001 From: Neil Roberts Date: Fri, 2 Oct 2026 15:29:18 +0200 Subject: [PATCH 228/289] SWTableAutoFormat: Use unique_ptr::get() instead of &* MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Using &* can be problematic if the pointer is null. In this case I don’t think it matters, but using unique_ptr::get() is probably easier to understand anyway. This also paves the way for a later compiler plugin to check for this. Change-Id: If4626be07c6adcc14c595360748470ffb67b9e6b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211753 Tested-by: Jenkins Reviewed-by: Neil Roberts --- sw/source/core/doc/tblafmt.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sw/source/core/doc/tblafmt.cxx b/sw/source/core/doc/tblafmt.cxx index da66abe207da..29cec9c2eb38 100644 --- a/sw/source/core/doc/tblafmt.cxx +++ b/sw/source/core/doc/tblafmt.cxx @@ -692,12 +692,12 @@ SwTableAutoFormat& SwTableAutoFormatTable::operator[](size_t const i) const SwTableAutoFormat* SwTableAutoFormatTable::GetData(size_t nIndex) const { - return &*m_pImpl->m_AutoFormats[nIndex]; + return m_pImpl->m_AutoFormats[nIndex].get(); } SwTableAutoFormat* SwTableAutoFormatTable::GetData(size_t nIndex) { - return &*m_pImpl->m_AutoFormats[nIndex]; + return m_pImpl->m_AutoFormats[nIndex].get(); } void SwTableAutoFormatTable::AddAutoFormat(const SwTableAutoFormat& rTableStyle) From 48535514d4e7324458fc3ba2b8dda2b5039a44c3 Mon Sep 17 00:00:00 2001 From: Neil Roberts Date: Fri, 2 Oct 2026 12:42:09 +0200 Subject: [PATCH 229/289] Add a compiler plugin to detect &*smart_pointer Adds a compiler plugin to detect cases of dereferencing a smart pointer (such as unique_ptr or UnoCursorPointer) and then immediately taking the address of the reference. In that case it is better to just call get() on the pointer. This is particularly important if the pointer can be null because in that case the initial dereference results in undefined behaviour. Change-Id: Ib1cca00c9180572f446721b90f83aa7fddb88c7d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211756 Reviewed-by: Neil Roberts Tested-by: Jenkins --- .../clang/smartpointerderefaddress.cxx | 91 +++++++++++++++++++ .../clang/test/smartpointerderefaddress.cxx | 42 +++++++++ solenv/CompilerTest_compilerplugins_clang.mk | 1 + 3 files changed, 134 insertions(+) create mode 100644 compilerplugins/clang/smartpointerderefaddress.cxx create mode 100644 compilerplugins/clang/test/smartpointerderefaddress.cxx diff --git a/compilerplugins/clang/smartpointerderefaddress.cxx b/compilerplugins/clang/smartpointerderefaddress.cxx new file mode 100644 index 000000000000..653bd66635fa --- /dev/null +++ b/compilerplugins/clang/smartpointerderefaddress.cxx @@ -0,0 +1,91 @@ +/* -*- 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 LO_CLANG_SHARED_PLUGINS + +#include +#include +#include +#include +#include + +#include + +#include "check.hxx" +#include "plugin.hxx" + +/** + * Look for: + * &(*x) + * when x is a smart pointer like unique_ptr. That can be transformed to: + * x.get() + * + * This is important when x is null, because in that case *x is undefined behavior. This can lead to + * difficult bugs because the compiler will often let you get away with it, but some compilers might + * also take advantage of that to assume that x is never null and then optimise away chunks of code. + * See tdf#173585 for an example. + * + * Either way x.get() is easier to understand. + */ + +namespace +{ +class SmartPointerDerefAddress : public loplugin::FilteringPlugin +{ +public: + explicit SmartPointerDerefAddress(loplugin::InstantiationData const& data) + : FilteringPlugin(data) + { + } + + virtual void run() override + { + if (preRun()) + TraverseDecl(compiler.getASTContext().getTranslationUnitDecl()); + } + + bool VisitUnaryOperator(UnaryOperator const*); +}; + +bool SmartPointerDerefAddress::VisitUnaryOperator(UnaryOperator const* unaryOperator) +{ + if (ignoreLocation(unaryOperator)) + return true; + if (unaryOperator->getBeginLoc().isMacroID()) + return true; + if (unaryOperator->getOpcode() != UO_AddrOf) + return true; + auto subExpr = unaryOperator->getSubExpr()->IgnoreParenImpCasts(); + auto innerOp = dyn_cast(subExpr); + if (!innerOp || innerOp->getOperator() != OO_Star) + return true; + + auto const tc = loplugin::TypeCheck(innerOp->getArg(0)->getType()); + + if (tc.ClassOrStruct("shared_ptr").StdNamespace() + || tc.ClassOrStruct("__shared_ptr_access").StdNamespace() + || tc.ClassOrStruct("unique_ptr").StdNamespace() + || tc.ClassOrStruct("UnoCursorPointer").Namespace("sw").GlobalNamespace()) + { + report(DiagnosticsEngine::Warning, + "'*' followed by '&' operating on %0, rather use '.get()'", + unaryOperator->getBeginLoc()) + << innerOp->getArg(0)->getType() << unaryOperator->getSourceRange(); + } + + return true; +} + +loplugin::Plugin::Registration + smartpointerderefaddress("smartpointerderefaddress"); + +} // namespace + +#endif // LO_CLANG_SHARED_PLUGINS + +/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */ diff --git a/compilerplugins/clang/test/smartpointerderefaddress.cxx b/compilerplugins/clang/test/smartpointerderefaddress.cxx new file mode 100644 index 000000000000..6dae64d22e1f --- /dev/null +++ b/compilerplugins/clang/test/smartpointerderefaddress.cxx @@ -0,0 +1,42 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + */ + +#include + +#include + +namespace sw +{ +// Mockup of UnoCursorPointer because it’s probably difficult to include the header +class UnoCursorPointer +{ +public: + int& operator*() { return *m_pInteger; }; + +private: + int* m_pInteger; +}; +} + +int* function1(std::unique_ptr& x) +{ + return &*x; // expected-error-re {{'*' followed by '&' operating on '{{.*}}unique_ptr{{.*}}', rather use '.get()' [loplugin:smartpointerderefaddress]}} +} + +int* function2(std::shared_ptr& x) +{ + return &*x; // expected-error-re {{'*' followed by '&' operating on '{{.*}}shared_ptr{{.*}}', rather use '.get()' [loplugin:smartpointerderefaddress]}} +} + +int* function3(sw::UnoCursorPointer& x) +{ + return &*x; // expected-error-re {{'*' followed by '&' operating on '{{.*}}UnoCursorPointer{{.*}}', rather use '.get()' [loplugin:smartpointerderefaddress]}} +} + +/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */ diff --git a/solenv/CompilerTest_compilerplugins_clang.mk b/solenv/CompilerTest_compilerplugins_clang.mk index 9a1dacbc5789..4a3ff84e2a89 100644 --- a/solenv/CompilerTest_compilerplugins_clang.mk +++ b/solenv/CompilerTest_compilerplugins_clang.mk @@ -84,6 +84,7 @@ $(eval $(call gb_CompilerTest_add_exception_objects,compilerplugins_clang, \ compilerplugins/clang/test/simplifydynamiccast \ compilerplugins/clang/test/simplifypointertobool \ compilerplugins/clang/test/singlevalfields \ + compilerplugins/clang/test/smartpointerderefaddress \ compilerplugins/clang/test/staticconstexpr \ compilerplugins/clang/test/staticconstfield \ compilerplugins/clang/test/staticdynamic \ From 80fa879dec57b98eb80b74f6eaf9fc6ffe3273e6 Mon Sep 17 00:00:00 2001 From: Aron Budea Date: Tue, 29 Sep 2026 20:40:36 +0930 Subject: [PATCH 230/289] oox: omit default attributes/elements in theme XMLs in OOXML For fonts: charset, pitchFamily. Various rectangles: fillRect, fillToRect, srcRect, tileRect Change-Id: I6dbd914ca8d9f8a2760bfecc6e294d465d52c32f Signed-off-by: Aron Budea Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/13779 Tested-by: Jenkins CPCI Reviewed-by: Mike Kaganski (cherry picked from commit 2b4ed81074195c85d4fc179e22ca7d2e2e6da8f1) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211692 Reviewed-by: Xisco Fauli Tested-by: Jenkins --- include/docmodel/theme/FormatScheme.hxx | 2 + oox/source/export/ThemeExport.cxx | 52 +++++++++++++++++++------ 2 files changed, 43 insertions(+), 11 deletions(-) diff --git a/include/docmodel/theme/FormatScheme.hxx b/include/docmodel/theme/FormatScheme.hxx index eb1eea3fbdca..4c72311de929 100644 --- a/include/docmodel/theme/FormatScheme.hxx +++ b/include/docmodel/theme/FormatScheme.hxx @@ -84,6 +84,8 @@ struct DOCMODEL_DLLPUBLIC RelativeRectangle sal_Int32 mnTop = 0; sal_Int32 mnRight = 0; sal_Int32 mnBottom = 0; + + bool isZero() const { return mnLeft == 0 && mnTop == 0 && mnRight == 0 && mnBottom == 0; } }; class DOCMODEL_DLLPUBLIC GradientFill : public Fill diff --git a/oox/source/export/ThemeExport.cxx b/oox/source/export/ThemeExport.cxx index e22d6c9f2caf..6a96eee51b24 100644 --- a/oox/source/export/ThemeExport.cxx +++ b/oox/source/export/ThemeExport.cxx @@ -13,6 +13,7 @@ #include #include #include +#include #include #include #include @@ -30,10 +31,19 @@ namespace void writeRelativeRectangle(sax_fastparser::FSHelperPtr pFS, sal_Int32 nToken, model::RelativeRectangle const& rRelativeRectangle) { - pFS->singleElementNS(XML_a, nToken, XML_l, OString::number(rRelativeRectangle.mnLeft), XML_t, - OString::number(rRelativeRectangle.mnTop), XML_r, - OString::number(rRelativeRectangle.mnRight), XML_b, - OString::number(rRelativeRectangle.mnBottom)); + // Only write non-0 offsets, 0 is the default in CT_RelativeRect + pFS->singleElementNS(XML_a, nToken, XML_l, + sax_fastparser::UseIf(OString::number(rRelativeRectangle.mnLeft), + rRelativeRectangle.mnLeft != 0), + XML_t, + sax_fastparser::UseIf(OString::number(rRelativeRectangle.mnTop), + rRelativeRectangle.mnTop != 0), + XML_r, + sax_fastparser::UseIf(OString::number(rRelativeRectangle.mnRight), + rRelativeRectangle.mnRight != 0), + XML_b, + sax_fastparser::UseIf(OString::number(rRelativeRectangle.mnBottom), + rRelativeRectangle.mnBottom != 0)); } } // end anonymous namespace @@ -98,8 +108,12 @@ void fillAttrList(rtl::Reference const& pAttr if (!rThemeFont.maPanose.isEmpty()) pAttrList->add(XML_panose, rThemeFont.maPanose); - pAttrList->add(XML_pitchFamily, OString::number(rThemeFont.getPitchFamily())); - pAttrList->add(XML_charset, OString::number(rThemeFont.maCharset)); + // CT_TextFont gives pitchFamily a default of 0 and + // charset a default of 1 (=WINDOWS_CHARSET_DEFAULT), skip writing the defaults + if (rThemeFont.getPitchFamily() != 0) + pAttrList->add(XML_pitchFamily, OString::number(rThemeFont.getPitchFamily())); + if (rThemeFont.maCharset != WINDOWS_CHARSET_DEFAULT) + pAttrList->add(XML_charset, OString::number(rThemeFont.maCharset)); } } // end anonymous ns @@ -387,11 +401,16 @@ void ThemeExport::writeGradientFill(model::GradientFill const& rGradientFill) if (!sPathType.isEmpty()) { mpFS->startElementNS(XML_a, XML_path, XML_path, sPathType); + // The fillToRect element is always written, because a missing one defaults to offsets + // of 50%, not 0 ([MS-OI29500] Part 1 Section 20.1.8) writeRelativeRectangle(mpFS, XML_fillToRect, rGradientFill.maFillToRectangle); mpFS->endElementNS(XML_a, XML_path); } } - writeRelativeRectangle(mpFS, XML_tileRect, rGradientFill.maTileRectangle); + // A missing tileRect means offsets of 0 ([MS-OI29500] Part 1 Section 20.1.8), + // so an all-zero one can be omitted + if (!rGradientFill.maTileRectangle.isZero()) + writeRelativeRectangle(mpFS, XML_tileRect, rGradientFill.maTileRectangle); mpFS->endElementNS(XML_a, XML_gradFill); } @@ -646,7 +665,9 @@ void ThemeExport::writeBlipFill(model::BlipFill const& rBlipFill) writeBlip(rBlipFill); - writeRelativeRectangle(mpFS, XML_srcRect, rBlipFill.maClipRectangle); + // A missing srcRect means no cropping, so an all-zero one can be omitted + if (!rBlipFill.maClipRectangle.isZero()) + writeRelativeRectangle(mpFS, XML_srcRect, rBlipFill.maClipRectangle); if (rBlipFill.meMode == model::BitmapMode::Tile) { @@ -662,9 +683,18 @@ void ThemeExport::writeBlipFill(model::BlipFill const& rBlipFill) } else if (rBlipFill.meMode == model::BitmapMode::Stretch) { - mpFS->startElementNS(XML_a, XML_stretch); - writeRelativeRectangle(mpFS, XML_fillRect, rBlipFill.maFillRectangle); - mpFS->endElementNS(XML_a, XML_stretch); + // A missing fillRect means offsets of 0 ([MS-OI29500] Part 1 Section 20.1.8), + // so an all-zero one can be omitted + if (rBlipFill.maFillRectangle.isZero()) + { + mpFS->singleElementNS(XML_a, XML_stretch); + } + else + { + mpFS->startElementNS(XML_a, XML_stretch); + writeRelativeRectangle(mpFS, XML_fillRect, rBlipFill.maFillRectangle); + mpFS->endElementNS(XML_a, XML_stretch); + } } mpFS->endElementNS(XML_a, XML_blipFill); From 8ceb3ebcc6c173379d5755415a03d22eee70c80f Mon Sep 17 00:00:00 2001 From: ApurvR20 Date: Tue, 6 Oct 2026 20:19:55 +0530 Subject: [PATCH 231/289] tdf#74702 Replace instance of OUTDEV_WINDOW in ndole Change-Id: I9d4a9ebf886614be3e446678b08aa915caa75d86 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211895 Reviewed-by: Ilmari Lauhakangas Tested-by: Jenkins --- sw/source/core/ole/ndole.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sw/source/core/ole/ndole.cxx b/sw/source/core/ole/ndole.cxx index 4afbbe3e3f31..b1751e6a3fd6 100644 --- a/sw/source/core/ole/ndole.cxx +++ b/sw/source/core/ole/ndole.cxx @@ -815,7 +815,7 @@ void SwOLENode::SetChanged() { CurrShell aCurr(&rShell); - if(rShell.VisArea().Overlaps(aFrameArea) && OUTDEV_WINDOW == rShell.GetOut()->GetOutDevType()) + if(rShell.VisArea().Overlaps(aFrameArea) && rShell.GetWin()) { // invalidate instead of painting rShell.GetWin()->Invalidate(aFrameArea.SVRect()); From e1b35f0bb104763aaf74ac36cac0dafa935a9cd5 Mon Sep 17 00:00:00 2001 From: Michael Meeks Date: Tue, 15 Sep 2026 10:03:21 +0000 Subject: [PATCH 232/289] sc: forward declare ScDrawView in tabview.hxx. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit tabview.hxx included drawview.hxx for a std::unique_ptr member and an accessor that returns the raw pointer. Neither needs the complete type, and the destructor of ScTabView is already out of line. The include dragged svx/fmview.hxx, svx/view3d.hxx, svx/svdview.hxx and the rest of the svx view class chain into the 200 translation units that include the view shell headers. tabvwsh.hxx and tabview.hxx now include the small headers they used through that chain, and the files that call into the draw view include drawview.hxx themselves. clang -ftime-trace says around 2% of the module build time saved here. Signed-off-by: Michael Meeks Change-Id: I198b19e74f6ad56090b987880a063dc9ee677cda Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/12683 Tested-by: Jenkins CPCI Reviewed-by: Caolán McNamara (cherry picked from commit a7fd69666ea5fb4d26dfad0d286f6c1f3bcd3144) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211884 Tested-by: Jenkins Reviewed-by: Xisco Fauli --- sc/inc/scmod.hxx | 1 + sc/qa/unit/anchor.cxx | 1 + sc/qa/unit/helper/qahelper.cxx | 1 + sc/qa/unit/scshapetest.cxx | 1 + sc/qa/unit/tiledrendering/tiledrendering.cxx | 1 + sc/qa/unit/tiledrendering/tiledrendering2.cxx | 1 + sc/qa/unit/uicalc/uicalc.cxx | 1 + sc/source/ui/app/inputwin.cxx | 1 + sc/source/ui/attrdlg/scdlgfact.cxx | 1 + sc/source/ui/docshell/docfunc.cxx | 1 + sc/source/ui/docshell/docsh4.cxx | 2 ++ sc/source/ui/drawfunc/fuconarc.cxx | 1 + sc/source/ui/drawfunc/fuconcustomshape.cxx | 1 + sc/source/ui/drawfunc/fuconpol.cxx | 1 + sc/source/ui/drawfunc/fuconrec.cxx | 1 + sc/source/ui/drawfunc/fuconstr.cxx | 1 + sc/source/ui/drawfunc/fuconuno.cxx | 1 + sc/source/ui/drawfunc/fudraw.cxx | 1 + sc/source/ui/drawfunc/futext.cxx | 1 + sc/source/ui/inc/tabview.hxx | 3 ++- sc/source/ui/inc/tabvwsh.hxx | 5 +++++ sc/source/ui/navipi/navipi.cxx | 2 ++ sc/source/ui/pagedlg/tphfedit.cxx | 1 + sc/source/ui/theme/ThemeColorChanger.cxx | 1 + sc/source/ui/uitest/uiobject.cxx | 1 + sc/source/ui/undo/undocell.cxx | 1 + sc/source/ui/unoobj/docuno.cxx | 1 + sc/source/ui/vba/vbatextboxshape.cxx | 2 ++ sc/source/ui/view/cliputil.cxx | 1 + sc/source/ui/view/colrowba.cxx | 1 + sc/source/ui/view/gridwin3.cxx | 1 + sc/source/ui/view/gridwin4.cxx | 1 + sc/source/ui/view/hdrcont.cxx | 1 + sc/source/ui/view/output3.cxx | 1 + sc/source/ui/view/preview.cxx | 1 + sc/source/ui/view/prevwsh.cxx | 1 + sc/source/ui/view/tabsplit.cxx | 1 + sc/source/ui/view/tabview3.cxx | 1 + sc/source/ui/view/tabvwsh3.cxx | 1 + sc/source/ui/view/tabvwsh9.cxx | 1 + sc/source/ui/view/tabvwsha.cxx | 1 + sc/source/ui/view/tabvwshc.cxx | 2 ++ sc/source/ui/view/tabvwshf.cxx | 1 + sc/source/ui/view/tabvwshh.cxx | 1 + sc/source/ui/view/viewdata.cxx | 1 + sc/source/ui/view/viewfun2.cxx | 1 + sc/source/ui/view/viewfun4.cxx | 1 + 47 files changed, 56 insertions(+), 1 deletion(-) diff --git a/sc/inc/scmod.hxx b/sc/inc/scmod.hxx index 75fcd6cae08f..aac6af83688b 100644 --- a/sc/inc/scmod.hxx +++ b/sc/inc/scmod.hxx @@ -25,6 +25,7 @@ #include #include #include +#include #include "global.hxx" #include "shellids.hxx" #include diff --git a/sc/qa/unit/anchor.cxx b/sc/qa/unit/anchor.cxx index 4432e928bcc6..661fd667f25f 100644 --- a/sc/qa/unit/anchor.cxx +++ b/sc/qa/unit/anchor.cxx @@ -8,6 +8,7 @@ */ #include +#include #include #include #include diff --git a/sc/qa/unit/helper/qahelper.cxx b/sc/qa/unit/helper/qahelper.cxx index 5530dea72f0d..9a7d88035703 100644 --- a/sc/qa/unit/helper/qahelper.cxx +++ b/sc/qa/unit/helper/qahelper.cxx @@ -11,6 +11,7 @@ #include "qahelper.hxx" #include +#include #include #include "csv_handler.hxx" #include "debughelper.hxx" diff --git a/sc/qa/unit/scshapetest.cxx b/sc/qa/unit/scshapetest.cxx index 44eb5599794e..e8d73ca5a2bf 100644 --- a/sc/qa/unit/scshapetest.cxx +++ b/sc/qa/unit/scshapetest.cxx @@ -10,6 +10,7 @@ #include #include "helper/qahelper.hxx" +#include #include #include diff --git a/sc/qa/unit/tiledrendering/tiledrendering.cxx b/sc/qa/unit/tiledrendering/tiledrendering.cxx index a3070b5c5f77..74ae048d61df 100644 --- a/sc/qa/unit/tiledrendering/tiledrendering.cxx +++ b/sc/qa/unit/tiledrendering/tiledrendering.cxx @@ -39,6 +39,7 @@ #include #include +#include #include #include #include diff --git a/sc/qa/unit/tiledrendering/tiledrendering2.cxx b/sc/qa/unit/tiledrendering/tiledrendering2.cxx index 8e9f7a39113f..056e01041e27 100644 --- a/sc/qa/unit/tiledrendering/tiledrendering2.cxx +++ b/sc/qa/unit/tiledrendering/tiledrendering2.cxx @@ -24,6 +24,7 @@ #include #include #include +#include #include using namespace com::sun::star; diff --git a/sc/qa/unit/uicalc/uicalc.cxx b/sc/qa/unit/uicalc/uicalc.cxx index 7c7f2628c03f..1b051f11a9d6 100644 --- a/sc/qa/unit/uicalc/uicalc.cxx +++ b/sc/qa/unit/uicalc/uicalc.cxx @@ -9,6 +9,7 @@ #include "../helper/qahelper.hxx" #include +#include #include #include #include diff --git a/sc/source/ui/app/inputwin.cxx b/sc/source/ui/app/inputwin.cxx index b08c545c7fda..54c2548ba9d1 100644 --- a/sc/source/ui/app/inputwin.cxx +++ b/sc/source/ui/app/inputwin.cxx @@ -23,6 +23,7 @@ #include #include +#include #include #include diff --git a/sc/source/ui/attrdlg/scdlgfact.cxx b/sc/source/ui/attrdlg/scdlgfact.cxx index 70deffec5e9f..a7219ab00fec 100644 --- a/sc/source/ui/attrdlg/scdlgfact.cxx +++ b/sc/source/ui/attrdlg/scdlgfact.cxx @@ -20,6 +20,7 @@ #undef SC_DLLIMPLEMENTATION #include "scdlgfact.hxx" +#include #include #include diff --git a/sc/source/ui/docshell/docfunc.cxx b/sc/source/ui/docshell/docfunc.cxx index d3d5892cb490..2821597fe80f 100644 --- a/sc/source/ui/docshell/docfunc.cxx +++ b/sc/source/ui/docshell/docfunc.cxx @@ -17,6 +17,7 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ +#include #include #include diff --git a/sc/source/ui/docshell/docsh4.cxx b/sc/source/ui/docshell/docsh4.cxx index 38e638d19a3c..baa9292ff89c 100644 --- a/sc/source/ui/docshell/docsh4.cxx +++ b/sc/source/ui/docshell/docsh4.cxx @@ -22,6 +22,8 @@ #include #include +#include +#include #include #include #include diff --git a/sc/source/ui/drawfunc/fuconarc.cxx b/sc/source/ui/drawfunc/fuconarc.cxx index a6ceb6bd5b42..67bd610d75b4 100644 --- a/sc/source/ui/drawfunc/fuconarc.cxx +++ b/sc/source/ui/drawfunc/fuconarc.cxx @@ -18,6 +18,7 @@ */ #include +#include #include #include diff --git a/sc/source/ui/drawfunc/fuconcustomshape.cxx b/sc/source/ui/drawfunc/fuconcustomshape.cxx index c72accf9429d..d376cfdfdcac 100644 --- a/sc/source/ui/drawfunc/fuconcustomshape.cxx +++ b/sc/source/ui/drawfunc/fuconcustomshape.cxx @@ -18,6 +18,7 @@ */ #include +#include #include #include #include diff --git a/sc/source/ui/drawfunc/fuconpol.cxx b/sc/source/ui/drawfunc/fuconpol.cxx index 49a2e4ca055e..ea13c181abfe 100644 --- a/sc/source/ui/drawfunc/fuconpol.cxx +++ b/sc/source/ui/drawfunc/fuconpol.cxx @@ -18,6 +18,7 @@ */ #include +#include #include #include diff --git a/sc/source/ui/drawfunc/fuconrec.cxx b/sc/source/ui/drawfunc/fuconrec.cxx index 2a69e202d273..085ed441f7f3 100644 --- a/sc/source/ui/drawfunc/fuconrec.cxx +++ b/sc/source/ui/drawfunc/fuconrec.cxx @@ -18,6 +18,7 @@ */ #include +#include #include #include diff --git a/sc/source/ui/drawfunc/fuconstr.cxx b/sc/source/ui/drawfunc/fuconstr.cxx index cf41533747e7..f48326e182ea 100644 --- a/sc/source/ui/drawfunc/fuconstr.cxx +++ b/sc/source/ui/drawfunc/fuconstr.cxx @@ -18,6 +18,7 @@ */ #include +#include #include #include #include diff --git a/sc/source/ui/drawfunc/fuconuno.cxx b/sc/source/ui/drawfunc/fuconuno.cxx index 01fc06a257bc..1110864b5597 100644 --- a/sc/source/ui/drawfunc/fuconuno.cxx +++ b/sc/source/ui/drawfunc/fuconuno.cxx @@ -18,6 +18,7 @@ */ #include +#include #include #include diff --git a/sc/source/ui/drawfunc/fudraw.cxx b/sc/source/ui/drawfunc/fudraw.cxx index 49fa6c8a4b60..3801ca506395 100644 --- a/sc/source/ui/drawfunc/fudraw.cxx +++ b/sc/source/ui/drawfunc/fudraw.cxx @@ -18,6 +18,7 @@ */ #include +#include #include #include #include diff --git a/sc/source/ui/drawfunc/futext.cxx b/sc/source/ui/drawfunc/futext.cxx index 1f18d7dc0661..a1684eec5fe2 100644 --- a/sc/source/ui/drawfunc/futext.cxx +++ b/sc/source/ui/drawfunc/futext.cxx @@ -18,6 +18,7 @@ */ #include +#include #include #include #include diff --git a/sc/source/ui/inc/tabview.hxx b/sc/source/ui/inc/tabview.hxx index 7b7248032ac7..8eb2cbc140a2 100644 --- a/sc/source/ui/inc/tabview.hxx +++ b/sc/source/ui/inc/tabview.hxx @@ -23,14 +23,15 @@ #include #include #include +#include #include #include "hiranges.hxx" #include "viewutil.hxx" #include "select.hxx" #include "gridwin.hxx" -#include "drawview.hxx" +class ScDrawView; class ScEditEngineDefaulter; class ScOutlineWindow; class ScRowBar; diff --git a/sc/source/ui/inc/tabvwsh.hxx b/sc/source/ui/inc/tabvwsh.hxx index c1fe4e40495c..3aef67717902 100644 --- a/sc/source/ui/inc/tabvwsh.hxx +++ b/sc/source/ui/inc/tabvwsh.hxx @@ -22,6 +22,8 @@ #include #include #include +#include +#include #include #include #include @@ -38,6 +40,9 @@ #include class SdrOle2Obj; +namespace com::sun::star::drawing { class XShapes; } +namespace com::sun::star::table { struct CellRangeAddress; } +class ScTableSheetObj; class SfxAbstractTabDialog; class SfxBindings; class SfxChildWindow; diff --git a/sc/source/ui/navipi/navipi.cxx b/sc/source/ui/navipi/navipi.cxx index 9a5480406f17..e8c81402e123 100644 --- a/sc/source/ui/navipi/navipi.cxx +++ b/sc/source/ui/navipi/navipi.cxx @@ -18,6 +18,8 @@ */ #include +#include +#include #include #include #include diff --git a/sc/source/ui/pagedlg/tphfedit.cxx b/sc/source/ui/pagedlg/tphfedit.cxx index b86f937ffafd..3a4fa120ec9b 100644 --- a/sc/source/ui/pagedlg/tphfedit.cxx +++ b/sc/source/ui/pagedlg/tphfedit.cxx @@ -27,6 +27,7 @@ #include #include #include +#include #include #include diff --git a/sc/source/ui/theme/ThemeColorChanger.cxx b/sc/source/ui/theme/ThemeColorChanger.cxx index d79277d48264..fce94fd11248 100644 --- a/sc/source/ui/theme/ThemeColorChanger.cxx +++ b/sc/source/ui/theme/ThemeColorChanger.cxx @@ -9,6 +9,7 @@ */ #include +#include #include #include diff --git a/sc/source/ui/uitest/uiobject.cxx b/sc/source/ui/uitest/uiobject.cxx index 3c70015b9939..f5f94e10013e 100644 --- a/sc/source/ui/uitest/uiobject.cxx +++ b/sc/source/ui/uitest/uiobject.cxx @@ -9,6 +9,7 @@ #include #include +#include #include #include diff --git a/sc/source/ui/undo/undocell.cxx b/sc/source/ui/undo/undocell.cxx index 91d63dcad362..31bae93e466e 100644 --- a/sc/source/ui/undo/undocell.cxx +++ b/sc/source/ui/undo/undocell.cxx @@ -18,6 +18,7 @@ */ #include +#include #include #include diff --git a/sc/source/ui/unoobj/docuno.cxx b/sc/source/ui/unoobj/docuno.cxx index 6f5d2ea239b3..134e9438631a 100644 --- a/sc/source/ui/unoobj/docuno.cxx +++ b/sc/source/ui/unoobj/docuno.cxx @@ -20,6 +20,7 @@ #include #include +#include #include #include diff --git a/sc/source/ui/vba/vbatextboxshape.cxx b/sc/source/ui/vba/vbatextboxshape.cxx index d7d02112177f..39e038497fe9 100644 --- a/sc/source/ui/vba/vbatextboxshape.cxx +++ b/sc/source/ui/vba/vbatextboxshape.cxx @@ -18,6 +18,8 @@ */ #include "excelvbahelper.hxx" +#include +#include #include "vbatextboxshape.hxx" #include "vbacharacters.hxx" #include diff --git a/sc/source/ui/view/cliputil.cxx b/sc/source/ui/view/cliputil.cxx index b9e40a7283b0..b12516319d80 100644 --- a/sc/source/ui/view/cliputil.cxx +++ b/sc/source/ui/view/cliputil.cxx @@ -8,6 +8,7 @@ */ #include +#include #include #include #include diff --git a/sc/source/ui/view/colrowba.cxx b/sc/source/ui/view/colrowba.cxx index b6653cdb86e5..780bf0ee6c44 100644 --- a/sc/source/ui/view/colrowba.cxx +++ b/sc/source/ui/view/colrowba.cxx @@ -22,6 +22,7 @@ #include #include +#include #include #include diff --git a/sc/source/ui/view/gridwin3.cxx b/sc/source/ui/view/gridwin3.cxx index 5645f5a47ae8..55fe84701c41 100644 --- a/sc/source/ui/view/gridwin3.cxx +++ b/sc/source/ui/view/gridwin3.cxx @@ -18,6 +18,7 @@ */ #include +#include #include #include #include diff --git a/sc/source/ui/view/gridwin4.cxx b/sc/source/ui/view/gridwin4.cxx index 70caf85056b7..f738ab661b3a 100644 --- a/sc/source/ui/view/gridwin4.cxx +++ b/sc/source/ui/view/gridwin4.cxx @@ -19,6 +19,7 @@ #include #include +#include #include #include diff --git a/sc/source/ui/view/hdrcont.cxx b/sc/source/ui/view/hdrcont.cxx index 3748bf71c0fe..8ddfeb036c0c 100644 --- a/sc/source/ui/view/hdrcont.cxx +++ b/sc/source/ui/view/hdrcont.cxx @@ -18,6 +18,7 @@ */ #include +#include #include #include #include diff --git a/sc/source/ui/view/output3.cxx b/sc/source/ui/view/output3.cxx index 61fcfbfc731d..3d1bfbe3148b 100644 --- a/sc/source/ui/view/output3.cxx +++ b/sc/source/ui/view/output3.cxx @@ -20,6 +20,7 @@ #include #include +#include #include #include #include diff --git a/sc/source/ui/view/preview.cxx b/sc/source/ui/view/preview.cxx index df84d38eab7e..0d793d15d784 100644 --- a/sc/source/ui/view/preview.cxx +++ b/sc/source/ui/view/preview.cxx @@ -18,6 +18,7 @@ */ #include +#include #include #include diff --git a/sc/source/ui/view/prevwsh.cxx b/sc/source/ui/view/prevwsh.cxx index 5eb25ba65650..dfb079a7d242 100644 --- a/sc/source/ui/view/prevwsh.cxx +++ b/sc/source/ui/view/prevwsh.cxx @@ -20,6 +20,7 @@ #include #include +#include #include #include diff --git a/sc/source/ui/view/tabsplit.cxx b/sc/source/ui/view/tabsplit.cxx index 14118c26392a..26c74c77a1c6 100644 --- a/sc/source/ui/view/tabsplit.cxx +++ b/sc/source/ui/view/tabsplit.cxx @@ -18,6 +18,7 @@ */ #include +#include #include #include diff --git a/sc/source/ui/view/tabview3.cxx b/sc/source/ui/view/tabview3.cxx index 3f4661b0af58..e3bfb03fd9f2 100644 --- a/sc/source/ui/view/tabview3.cxx +++ b/sc/source/ui/view/tabview3.cxx @@ -18,6 +18,7 @@ */ #include +#include #include #include diff --git a/sc/source/ui/view/tabvwsh3.cxx b/sc/source/ui/view/tabvwsh3.cxx index b7fd6ac965f8..660aa6bc6eb9 100644 --- a/sc/source/ui/view/tabvwsh3.cxx +++ b/sc/source/ui/view/tabvwsh3.cxx @@ -17,6 +17,7 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ #include +#include #include #include #include diff --git a/sc/source/ui/view/tabvwsh9.cxx b/sc/source/ui/view/tabvwsh9.cxx index 86d5c0cdcb8c..ae10048bc850 100644 --- a/sc/source/ui/view/tabvwsh9.cxx +++ b/sc/source/ui/view/tabvwsh9.cxx @@ -18,6 +18,7 @@ */ #include +#include #include #include #include diff --git a/sc/source/ui/view/tabvwsha.cxx b/sc/source/ui/view/tabvwsha.cxx index 315c4f11fde1..eceeeb81e08e 100644 --- a/sc/source/ui/view/tabvwsha.cxx +++ b/sc/source/ui/view/tabvwsha.cxx @@ -19,6 +19,7 @@ #include #include +#include #include #include diff --git a/sc/source/ui/view/tabvwshc.cxx b/sc/source/ui/view/tabvwshc.cxx index 5f166a9cd78c..471357c46a8d 100644 --- a/sc/source/ui/view/tabvwshc.cxx +++ b/sc/source/ui/view/tabvwshc.cxx @@ -18,6 +18,8 @@ */ #include +#include +#include #include #include #include diff --git a/sc/source/ui/view/tabvwshf.cxx b/sc/source/ui/view/tabvwshf.cxx index d5808897527c..a35aaa6c4d97 100644 --- a/sc/source/ui/view/tabvwshf.cxx +++ b/sc/source/ui/view/tabvwshf.cxx @@ -33,6 +33,7 @@ #include #include #include +#include #include #include diff --git a/sc/source/ui/view/tabvwshh.cxx b/sc/source/ui/view/tabvwshh.cxx index f7532e6f0016..3507675c5715 100644 --- a/sc/source/ui/view/tabvwshh.cxx +++ b/sc/source/ui/view/tabvwshh.cxx @@ -20,6 +20,7 @@ #include #include +#include #include #include #include diff --git a/sc/source/ui/view/viewdata.cxx b/sc/source/ui/view/viewdata.cxx index e1e78cd88a8a..316d4099543e 100644 --- a/sc/source/ui/view/viewdata.cxx +++ b/sc/source/ui/view/viewdata.cxx @@ -17,6 +17,7 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ +#include #include #include #include diff --git a/sc/source/ui/view/viewfun2.cxx b/sc/source/ui/view/viewfun2.cxx index cc8392dd4797..689018d9ab71 100644 --- a/sc/source/ui/view/viewfun2.cxx +++ b/sc/source/ui/view/viewfun2.cxx @@ -18,6 +18,7 @@ */ #include +#include #include diff --git a/sc/source/ui/view/viewfun4.cxx b/sc/source/ui/view/viewfun4.cxx index 9cce9a688bea..20866c9f82a1 100644 --- a/sc/source/ui/view/viewfun4.cxx +++ b/sc/source/ui/view/viewfun4.cxx @@ -37,6 +37,7 @@ #include #include #include +#include #include #include #include From b1df3b5b7a8d0aa316b866faa422884e4591e8f7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= Date: Tue, 6 Oct 2026 13:26:32 +0000 Subject: [PATCH 233/289] crashtesting: hold the same document BasicManager only once MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit crash on converting forums/ods/forum-en-39357.ods to xls, and on recalculating INDIRECT cells in 14 other documents, a debug build asserts: soffice.bin: svl/source/notify/lstner.cxx:83: void SfxListener::StartListening(SfxBroadcaster&, DuplicateHandling): Assertion `!(bListeningAlready && eDuplicateHanding == DuplicateHandling::Unexpected) && "duplicate listener, try building with DBG_UTIL to find the other insert site."' failed. #21 SfxListener::StartListening(SfxBroadcaster&, DuplicateHandling) at svl/source/notify/lstner.cxx:83 #22 SfxBasicManagerHolder::reset(BasicManager*) at sfx2/source/appl/appbaslib.cxx:70 #23 SfxObjectShell::InitBasicManager_Impl() at sfx2/source/doc/objxtor.cxx:845 #24 lcl_getBasicManagerForDocument(SfxObjectShell const&) at sfx2/source/doc/objxtor.cxx:656 #25 SfxObjectShell::GetBasicManager() const at sfx2/source/doc/objxtor.cxx:690 #26 SfxObjectShell::GetBasic() const at sfx2/source/doc/objxtor.cxx:799 #27 ScCompiler::ParseMacro(rtl::OUString const&, bool) at sc/source/core/tool/compiler.cxx:3830 #28 ScCompiler::NextNewToken(bool) at sc/source/core/tool/compiler.cxx:5137 #29 ScCompiler::CompileString(rtl::OUString const&) at sc/source/core/tool/compiler.cxx:5293 #30 XclExpChSourceLink::ConvertDataSequence(...) at sc/source/filter/excel/xechart.cxx:901 and the first StartListening of the pair was: SfxBasicManagerHolder::reset(BasicManager*) at sfx2/source/appl/appbaslib.cxx:71 SfxObjectShell::InitBasicManager_Impl() at sfx2/source/doc/objxtor.cxx:845 lcl_getBasicManagerForDocument(SfxObjectShell const&) at sfx2/source/doc/objxtor.cxx:657 SfxObjectShell::GetBasicManager() const at sfx2/source/doc/objxtor.cxx:690 ScServiceProvider::MakeInstance(ScServiceProvider::Type, ScDocShell*) at sc/source/ui/unoobj/servuno.cxx:590 ScModelObj::createInstance(rtl::OUString const&) at sc/source/ui/unoobj/docuno.cxx:4085 basic::SfxScriptLibraryContainer::importLibraryElement(...) Creating the BasicManager of a VBA mode document loads its VBA document modules, and they create the VBA globals, which asks for the document's BasicManager again. That nested InitBasicManager_Impl gets the BasicManager under construction from the repository and passes it to the holder, then the outer one passes the same one again, so the holder starts listening to it twice. That recursion is old, but crashtesting only reaches it since: commit c8da2d3a99b3a318545f1947f57c929ac9b9a82d Date: Sat Sep 26 20:23:11 2026 +0000 load the Basic project of a VBA mode Calc document after import Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/13614 Previously the import loaded the Basic project at once and the first request for the BasicManager came from inside that load. Now with macros not allowed the project stays unloaded, so the first request comes later, from a formula, and the load runs inside it. so make SfxBasicManagerHolder::reset do nothing when it is given the BasicManager it already holds Signed-off-by: Caolán McNamara Change-Id: I5db2184ae0124879e47310d90b5371e1e2fb0235 Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/14516 Reviewed-by: Noel Grandin Tested-by: Jenkins CPCI (cherry picked from commit a095496e0d649882531fd8e211ec4179333adee0) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211941 Reviewed-by: Xisco Fauli Tested-by: Jenkins --- sc/qa/unit/data/ods/vba-document-module.ods | Bin 0 -> 2312 bytes sc/qa/unit/subsequent_filters_test.cxx | 20 ++++++++++++++++++++ sfx2/source/appl/appbaslib.cxx | 5 +++++ 3 files changed, 25 insertions(+) create mode 100644 sc/qa/unit/data/ods/vba-document-module.ods diff --git a/sc/qa/unit/data/ods/vba-document-module.ods b/sc/qa/unit/data/ods/vba-document-module.ods new file mode 100644 index 0000000000000000000000000000000000000000..59397a648b9bde816fd4097f4a729dbfc96e3cd5 GIT binary patch literal 2312 zcmZ{l3piWnAIB4yxRg<2rI@<>7ylt7R;9E^Nmc67xK!sFNwmpwBXMbv21ARK(W)Y- zVyo+@OBET9p*6RvQFn8zF;%zfqGiXrXV$EH&+|U-d7txqzvnrh^LxKPXSAr8BIw=F z1jUlg5@5h)Z%P7_LZlFwm+1s7olYj=uuLM2Y8XPr!)RCrkpZL82~<1{7fc~gnJ@-D zh=9d2E)fV!=f6B9LFXta?`6S2q#+mtIwT4L9RNIWG%9mX5Jn+$Q(GKcjb!3h!V@|r z#NuJ&Qyk<|bUwzUYf8tAxn!?KK@x`2?+Ux>7wYn;sj;3kX zJIlHg=hs~-QdWb$Ld`%|IqieVah02q=^J4~5hlFQY^{>SaSxO4wjmy`K~V)3c?W*+tc$k^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qa/unit/subsequent_filters_test.cxx b/sc/qa/unit/subsequent_filters_test.cxx index d9280d1f1ea6..2e777e92aa80 100644 --- a/sc/qa/unit/subsequent_filters_test.cxx +++ b/sc/qa/unit/subsequent_filters_test.cxx @@ -7,6 +7,7 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ +#include #include #include #include @@ -160,6 +161,25 @@ CPPUNIT_TEST_FIXTURE(ScFiltersTest, testDrawImageRemoteNotFetched) CPPUNIT_ASSERT(pDoc); } +CPPUNIT_TEST_FIXTURE(ScFiltersTest, testVBADocumentBasicAfterLoad) +{ + // A document in VBA compatibility mode with a VBA document module, loaded with macros not + // allowed, gets its Basic only when something first asks for it. Here that is the INDIRECT + // in A1 compiling "FOO" during a recalculation. Loading the document module asks for the + // document Basic again while the first request is still creating it. + uno::Sequence aParams = { + comphelper::makePropertyValue(u"MacroExecutionMode"_ustr, + css::document::MacroExecMode::NEVER_EXECUTE), + }; + loadFromFile(u"ods/vba-document-module.ods", aParams); + + ScDocShell* pDocSh = getScDocShell(); + pDocSh->DoHardRecalc(); + + CPPUNIT_ASSERT_EQUAL(u"#REF!"_ustr, getScDoc()->GetString(ScAddress(0, 0, 0))); + CPPUNIT_ASSERT(pDocSh->GetBasic()); +} + CPPUNIT_TEST_FIXTURE(ScFiltersTest, testContentODS) { createScDoc("ods/universal-content.ods"); diff --git a/sfx2/source/appl/appbaslib.cxx b/sfx2/source/appl/appbaslib.cxx index 1f8c96bbfe4a..c02066ea6f23 100644 --- a/sfx2/source/appl/appbaslib.cxx +++ b/sfx2/source/appl/appbaslib.cxx @@ -51,6 +51,11 @@ void SfxBasicManagerHolder::Notify(SfxBroadcaster& rBC, SfxHint const& rHint) void SfxBasicManagerHolder::reset( BasicManager* _pBasicManager ) { + // A document's Basic manager can be handed over a second time while it is still being + // created. The holder already listens to it and holds its containers, so it stays as it is. + if ( _pBasicManager == mpBasicManager ) + return; + impl_releaseContainers(); #if !HAVE_FEATURE_SCRIPTING From 72d2a706a352d36467cab57fe78252ab9073138f Mon Sep 17 00:00:00 2001 From: Justin Luth Date: Tue, 6 Oct 2026 20:33:15 -0400 Subject: [PATCH 234/289] tdf#173510 sc: prevent crash when table style deselected This fixes a 26.8 regression from commit 4fb31ea85f94c0cffba2282a119811833e584570. Format - AutoFormat Styles and Ctrl-click to de-select the style. Change-Id: I94961ec11932d76fc945fbb11031f22174111459 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211929 Tested-by: Jenkins Reviewed-by: Justin Luth --- svx/source/dialog/TableAutoFmtDlg.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/svx/source/dialog/TableAutoFmtDlg.cxx b/svx/source/dialog/TableAutoFmtDlg.cxx index f0cfa3675371..cff293782556 100644 --- a/svx/source/dialog/TableAutoFmtDlg.cxx +++ b/svx/source/dialog/TableAutoFmtDlg.cxx @@ -286,7 +286,7 @@ IMPL_LINK_NOARG(SvxTableAutoFmtDlg, SelFormatHdl, weld::ItemView&, void) OUString SvxTableAutoFmtDlg::GetCurrFormatName() { - const SvxAutoFormatData* pData = mpFormat.GetData(mnIndex); + const SvxAutoFormatData* pData = lcl_GetTableAutoFormat(mnIndex, mpFormat); return pData ? pData->GetName() : OUString(); } From 2821d29a87b28785d74fa64d975465e4c99d4416 Mon Sep 17 00:00:00 2001 From: Jean-Pierre Ledure Date: Tue, 6 Oct 2026 14:52:50 +0200 Subject: [PATCH 235/289] ScriptForge (FileSystem) Manage ZIP archives The FileSystem service provides simple methods to manage compressed zip archives. As an example, .odf and .oxt files being formatted as such archives, massive or punctual changes of file contents with smart scripts can be facilitated. New methods: - IsZipFile(filename) returns True when filename is a valid zip file - FilesInZip(filename, pattern) returns a list of archive members, optionally filtered with a Like pattern, stored in filename - ExtractFromZip(filename, destination, source) stores the source file(s) found in the given ZIP file into a destination folder - CompressToZip(filename, foldername, rootfolder) stores the content of folder, including its subfolders, into a zip archive, optionally under a root folder The implementation is based on the python zipfile standard library. The methods area available both for Basic and Python user scripts. For Python scripts, the user is also free to use the native zipfile library instead. The user documentation shouid be updated according to this commit. Change-Id: I506a8583dc3fa38c7e05094562ade33f84a24747 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211891 Tested-by: Jenkins Reviewed-by: Jean-Pierre Ledure --- wizards/source/scriptforge/SF_FileSystem.xba | 301 ++++++++++++++++++ .../scriptforge/python/ScriptForgeHelper.py | 158 ++++++--- .../source/scriptforge/python/scriptforge.py | 17 + .../source/scriptforge/python/scriptforge.pyi | 66 ++++ 4 files changed, 499 insertions(+), 43 deletions(-) diff --git a/wizards/source/scriptforge/SF_FileSystem.xba b/wizards/source/scriptforge/SF_FileSystem.xba index fd166ed524dc..1d7eda971a25 100644 --- a/wizards/source/scriptforge/SF_FileSystem.xba +++ b/wizards/source/scriptforge/SF_FileSystem.xba @@ -54,6 +54,14 @@ Option Explicit ''' The file manifest.xml is managed automatically. ''' The FileNaming setting is ignored. ''' +''' The FileSystem service provides also simple methods to extract files from or load files +''' into archive (zip) files. +''' .odf and .oxt files being compressed files, direct vreation or update of such files (with care !) is made easy. +''' Note that multipart and encrypted zip files are not supported. +''' +''' The service provides symbolic names for a number of system folders (home, LibreOffice install, ...) +''' that contribute to improving the portability of user scripts. +''' ''' Service invocation example: ''' Dim FSO As Variant ''' Set FSO = CreateScriptService("FileSystem") @@ -377,6 +385,96 @@ CatchNotSupported: GoTo Finally End Function ' ScriptForge.SF_FileSystem.CompareFiles +REM ----------------------------------------------------------------------------- +Public Function CompressToZip(Optional ByVal FileName As Variant _ + , Optional ByVal FolderName As Variant _ + , Optional ByVal RootFolder As Variant _ + ) As Variant +''' Stores the content of Folder, including its subfolders, into a zip archive. +''' Encrypted archives are not supported. +''' The compressed files are stored optionally under a RootFolder. +''' Files existing already in the archive are not overwritten. +''' The method is not supported for document's internal file systems. +''' Args: +''' FileName: A string representing the zip file. +''' If it does not exist, the archive is created, oncluding its parent folders. +''' All files present in the archive are kept untouched. +''' FolderName: The folder to compress, as a string. +''' All files and subfolders are included. The Folder itself is not. +''' RootFolder: When absent, files and folders are loaded in the archive from the root ("/"). +''' When a RootFolder is given, as a string without path separator, they are stored below that folder. +''' Returns: +''' True when successful. +''' When False, an error message might be found in the console. +''' Exceptions: +''' UNKNOWNFOLDERERROR Source folder does not exist +''' NOTAFOLDERERROR The folder is a file, not a folder +''' FILESYSTEMERROR The method is not applicable on document's file systems +''' Example: +''' a = SF_FileSystem.CompressToZip("C:\archive.zip", Folder := "C:\Downloads") + +Dim bCompress As Boolean ' Return value +Dim vCompress As Variant ' Returned from Python (True/False, error message) +Dim sFile As String ' Alias of FileName +Dim sMode As String ' a = append, file exists - x = exclusive read/write +Dim sParentFolder As String ' Parent folder of FileName +Dim vRootFolder As Variant ' Alias of RootFolder +Const cstPyHelper = "$" & "_SF_FileSystem__CompressToZip" +Const cstThisSub = "FileSystem.CompressToZip" +Const cstSubArgs = "FileName, FolderName, [RootFolder=""""]" + + If SF_Utils._ErrorHandling() Then On Local Error GoTo Catch + bCompress = False + +Check: + If IsMissing(RootFolder) Or IsEmpty(RootFolder) Then RootFolder = "" + If SF_Utils._EnterFunction(cstThisSub, cstSubArgs) Then + If Not SF_Utils._ValidateFile(FileName, "FileName") Then GoTo Finally + If Not SF_Utils._ValidateFile(FolderName, "FolderName") Then GoTo Finally + If Not SF_Utils._Validate(RootFolder, "RootFolder", V_STRING) Then GoTo Finally + End If + If SF_FileSystem._IsDocFileSystem(FileName) Then GoTo CatchNotSupported + + If SF_FileSystem.FileExists(FolderName) Then GoTo CatchFileNotFolder + If Not SF_FileSystem.FolderExists(FolderName) Then GoTo CatchFolderNotExists + +Try: + With ScriptForge.SF_FileSystem + ' Append (a) or exclusive create (x) mode ? Eventually, create parent folder + If .FileExists(FileName) Then + sMode = "a" + Else + sParentFolder = .GetParentFolderName(FileName) + If Not .FolderExists(sParentFolder) Then .CreateFolder(sParentFolder) + sMode = "x" + End If + If Len(RootFolder) > 0 Then vRootFolder = RootFolder Else vRootFolder = Null + With ScriptForge.SF_Session + ' Python requires OS notation for files and folders + vCompress = .ExecutePythonScript(.SCRIPTISSHARED, _SF_.PythonHelper & cstPyHelper _ + , _ConvertFromUrl(FileName), sMode, ConvertFromUrl(FolderName), vRootFolder) + End With + bCompress = vCompress(0) + If Not bCompress Then SF_Exception.DebugPrint("CompressToZip", vCompress(1)) + End With + +Finally: + CompressToZip = bCompress + SF_Utils._ExitFunction(cstThisSub) + Exit Function +Catch: + GoTo Finally +CatchFolderNotExists: + SF_Exception.RaiseFatal(UNKNOWNFOLDERERROR, "FolderName", FolderName) + GoTo Finally +CatchFileNotFolder: + SF_Exception.RaiseFatal(NOTAFOLDERERROR, "FolderName", FolderName) + GoTo Finally +CatchNotSupported: + SF_Exception.RaiseFatal(FILESYSTEMERROR, "FileName", Split(cstThisSub, ".")(1), FileName) + GoTo Finally +End Function ' ScriptForge.SF_FileSystem.CompressToZip + REM ----------------------------------------------------------------------------- Public Function CopyFile(Optional ByVal Source As Variant _ , Optional ByVal Destination As Variant _ @@ -725,6 +823,85 @@ Catch: GoTo Finally End Function ' ScriptForge.SF_FileSystem.ExtensionFolder +REM ----------------------------------------------------------------------------- +Public Function ExtractFromZip(Optional ByVal FileName As Variant _ + , Optional ByVal Destination As Variant _ + , Optional ByVal Source As Variant _ + ) As Variant +''' Extracts a list of files contained in a zip container and stores them in a folder. +''' The process ends at the first error. Existing files are overwritten without warning. +''' The method is not supported for document's internal file systems. +''' Args: +''' FileName: A string representing a zip file +''' Destination: The folder where to extract the compressed files to. +''' Existing files with the same names are overwritten. Other files stay untouched. +''' When the folder does not exist, it is created, as are subfolders. +''' Source: A single string or an array of strings with valid names of files contained in the zip file +''' When Source is omitted, is an empty array or an empty string, all the files and folders are extracted. +''' Returns: +''' True when successful. +''' When False, an error message might be found in the console. +''' Exceptions: +''' UNKNOWNFILEERROR The file does not exist or is a folder +''' FILESYSTEMERROR The method is not applicable on document's file systems +''' Example: +''' a = SF_FileSystem.ExtractFromZip("C:\writerdoc.odt", Source := Array("content.xml", "meta.xml"), Desctination := "C:\TEMP") + +Dim bExtract As Boolean ' Return value +Dim vExtract As Variant ' Returned from Python (True/False, error message) +Dim vSource As Variant ' Alias of Source +Const cstPyHelper = "$" & "_SF_FileSystem__ExtractFromZip" +Const cstThisSub = "FileSystem.ExtractFromZip" +Const cstSubArgs = "FileName, Destination, [Source=""""]" + + If SF_Utils._ErrorHandling() Then On Local Error GoTo Catch + bExtract = False + +Check: + If IsMissing(Source) Or IsEmpty(Source) Then Source = "" + If SF_Utils._EnterFunction(cstThisSub, cstSubArgs) Then + If Not SF_Utils._ValidateFile(FileName, "FileName") Then GoTo Finally + If Not SF_Utils._ValidateFile(Destination, "Destination") Then GoTo Finally + If IsArray(Source) Then + If Not SF_Utils._ValidateArray(Source, "Source", 1, V_STRING) Then GoTo Finally + Else + If Not SF_Utils._Validate(Source, "Source", V_STRING) Then GoTo Finally + End If + End If + If SF_FileSystem._IsDocFileSystem(FileName) Then GoTo CatchNotSupported + +Try: + If SF_FileSystem.FileExists(FileName) Then + With ScriptForge.SF_Session + ' Be sure to pass an array to the Python script + If Not IsArray(Source) Then + If Len(Source) = 0 Then vSource = Array() Else vSource = Array(Source) + Else + vSource = Source + End If + vExtract = .ExecutePythonScript(.SCRIPTISSHARED, _SF_.PythonHelper & cstPyHelper _ + , _ConvertFromUrl(FileName), Destination, vSource) + bExtract = vExtract(0) + If Not bExtract Then SF_Exception.DebugPrint("ExtractFromZip", vExtract(1)) + End With + Else + GoTo CatchNotExists + End If + +Finally: + ExtractFromZip = bExtract + SF_Utils._ExitFunction(cstThisSub) + Exit Function +Catch: + GoTo Finally +CatchNotExists: + SF_Exception.RaiseFatal(UNKNOWNFILEERROR, "FileName", FileName) + GoTo Finally +CatchNotSupported: + SF_Exception.RaiseFatal(FILESYSTEMERROR, "FileName", Split(cstThisSub, ".")(1), FileName) + GoTo Finally +End Function ' ScriptForge.SF_FileSystem.ExtractFromZip + REM ----------------------------------------------------------------------------- Public Function FileExists(Optional ByVal FileName As Variant) As Boolean ''' Return True if the given file exists @@ -829,6 +1006,74 @@ CatchFolder: GoTo Finally End Function ' ScriptForge.SF_FileSystem.Files +REM ----------------------------------------------------------------------------- +Public Function FilesInZip(Optional ByVal FileName As Variant _ + , Optional ByVal Pattern As Variant _ + ) As Variant +''' Returns The list of the files contained in a zip container. +''' The list of names may optionally be filtered. +''' The method is not supported for document's internal file systems. +''' Args: +''' FileName: A string representing a zip file +''' Pattern: A pattern as a not case-sensitive string containing 0 or more wildcards +''' Admitted wildcard are: the "?" represents any single character +''' the "*" represents zero, one, or multiple characters +''' Returns: +''' An unordered array of file names without a heading slash. +''' The path separator is always the slash ("/"), also on Windows. +''' The list may be filtered with a name pattern. Without pattern, all files are returned. +''' The resulting array may be empty. +''' An empty array is returned when the file is not a valid zip file. +''' Exceptions: +''' UNKNOWNFILEERROR The file does not exist or is a folder +''' FILESYSTEMERROR The method is not applicable on document's file systems +''' Example: +''' a = SF_FileSystem.FilesInZip("C:\writerdoc.odt", Pattern := "*.xml") + +Dim vFiles As Variant ' Return value +Const cstPyHelper = "$" & "_SF_FileSystem__FilesInZip" +Const cstThisSub = "FileSystem.FilesInZip" +Const cstSubArgs = "FileName, [Pattern=""""]" + + If SF_Utils._ErrorHandling() Then On Local Error GoTo Catch + vFiles = Array() + +Check: + If IsMissing(Pattern) Or IsEmpty(Pattern) Then Pattern = "" + If SF_Utils._EnterFunction(cstThisSub, cstSubArgs) Then + If Not SF_Utils._ValidateFile(FileName, "FileName") Then GoTo Finally + If Not SF_Utils._Validate(Pattern, "Pattern", V_STRING) Then GoTo Finally + End If + If SF_FileSystem._IsDocFileSystem(FileName) Then GoTo CatchNotSupported + +Try: + If SF_FileSystem.FileExists(FileName) Then + With ScriptForge.SF_Session + vFiles = .ExecutePythonScript(.SCRIPTISSHARED, _SF_.PythonHelper & cstPyHelper _ + , _ConvertFromUrl(FileName)) + End With + ' Filter files based on pattern + If Len(Pattern) > 0 And UBound(vFiles) > -1 Then + vFiles = ScriptForge.SF_Array.Filter(ScriptForge.SF_String, "IsLike", vFiles, Pattern, False) + End If + Else + GoTo CatchNotExists + End If + +Finally: + FilesInZip = vFiles + SF_Utils._ExitFunction(cstThisSub) + Exit Function +Catch: + GoTo Finally +CatchNotExists: + SF_Exception.RaiseFatal(UNKNOWNFILEERROR, "FileName", FileName) + GoTo Finally +CatchNotSupported: + SF_Exception.RaiseFatal(FILESYSTEMERROR, "FileName", Split(cstThisSub, ".")(1), FileName) + GoTo Finally +End Function ' ScriptForge.SF_FileSystem.FilesInZip + REM ----------------------------------------------------------------------------- Public Function FolderExists(Optional ByVal FolderName As Variant) As Boolean ''' Return True if the given folder name exists @@ -1293,12 +1538,65 @@ CatchNotSupported: GoTo Finally End Function ' ScriptForge.SF_FileSystem.HashFile +REM ----------------------------------------------------------------------------- +Public Function IsZipFile(Optional ByVal FileName As Variant) As Boolean +''' Returns True if filename is a valid ZIP file based on its magic number. +''' The method is not supported for document's internal file systems. +''' Args: +''' FileName: a string representing a file +''' Returns: +''' True when FileName is a valid zip file. Otherwise False. +''' Exceptions: +''' UNKNOWNFILEERROR The file does not exist or is a folder +''' FILESYSTEMERROR The method is not applicable on document's file systems +''' Example: +''' MsgBox SF_FileSystem.IsZipFile("C:\writerdoc.odt") + +Dim bIsZip As Boolean ' Return value +Const cstPyHelper = "$" & "_SF_FileSystem__IsZipFile" +Const cstThisSub = "FileSystem.IsZipFile" +Const cstSubArgs = "FileName" + + If SF_Utils._ErrorHandling() Then On Local Error GoTo Catch + bIsZip = False + +Check: + If SF_Utils._EnterFunction(cstThisSub, cstSubArgs) Then + If Not SF_Utils._ValidateFile(FileName, "FileName") Then GoTo Finally + End If + If SF_FileSystem._IsDocFileSystem(FileName) Then GoTo CatchNotSupported + +Try: + If SF_FileSystem.FileExists(FileName) Then + With ScriptForge.SF_Session + bIsZip = .ExecutePythonScript(.SCRIPTISSHARED, _SF_.PythonHelper & cstPyHelper _ + , _ConvertFromUrl(FileName)) + End With + Else + GoTo CatchNotExists + End If + +Finally: + IsZipFile = bIsZip + SF_Utils._ExitFunction(cstThisSub) + Exit Function +Catch: + GoTo Finally +CatchNotExists: + SF_Exception.RaiseFatal(UNKNOWNFILEERROR, "FileName", FileName) + GoTo Finally +CatchNotSupported: + SF_Exception.RaiseFatal(FILESYSTEMERROR, "FileName", Split(cstThisSub, ".")(1), FileName) + GoTo Finally +End Function ' ScriptForge.SF_FileSystem.IsZipFile + REM ----------------------------------------------------------------------------- Public Function Methods() As Variant ''' Return the list or methods of the FileSystem service as an array Methods = Array("BuildPath" _ , "CompareFiles" _ + , "CompressToZip" _ , "CopyFile" _ , "CopyFolder" _ , "CreateFolder" _ @@ -1306,8 +1604,10 @@ Public Function Methods() As Variant , "DeleteFile" _ , "DeleteFolder" _ , "ExtensionFolder" _ + , "ExtractFromZip" _ , "FileExists" _ , "Files" _ + , "FilesInZip" _ , "FolderExists" _ , "GetBaseName" _ , "GetExtension" _ @@ -1317,6 +1617,7 @@ Public Function Methods() As Variant , "GetParentFolderName" _ , "GetTempName" _ , "HashFile" _ + , "IsZipFile" _ , "MoveFile" _ , "MoveFolder" _ , "Normalize" _ diff --git a/wizards/source/scriptforge/python/ScriptForgeHelper.py b/wizards/source/scriptforge/python/ScriptForgeHelper.py index f2fe8db8aebc..5604df51bf5f 100644 --- a/wizards/source/scriptforge/python/ScriptForgeHelper.py +++ b/wizards/source/scriptforge/python/ScriptForgeHelper.py @@ -22,26 +22,28 @@ # distributed with this file, see http://www.gnu.org/licenses/ . """ -Collection of Python helper functions called from the ScriptForge Basic libraries -to execute specific services that are not or not easily available from Basic directly. -When relevant, the methods present in the ScriptForge Python module (scriptforge.py) might call the -functions below for compatibility reasons. -""" + Collection of Python helper functions called from the ScriptForge Basic libraries + to execute specific services that are not or not easily available from Basic directly. + When relevant, the methods present in the ScriptForge Python module (scriptforge.py) may call the + functions below directly to bypass the Python-Basic bridge. + """ import getpass import os import platform import hashlib import filecmp +import pathlib +import zipfile import webbrowser import json class _Singleton(type): """ - A Singleton design pattern - Credits: « Python in a Nutshell » by Alex Martelli, O'Reilly - """ + A Singleton design pattern + Credits: « Python in a Nutshell » by Alex Martelli, O'Reilly + """ instances = {} def __call__(cls, *args, **kwargs): @@ -57,8 +59,8 @@ class _Singleton(type): def _SF_Dictionary__ConvertToJson(propval, indent = None) -> str: # used by Dictionary.ConvertToJson() Basic method """ - Given an array of PropertyValues as argument, convert it to a JSON string - """ + Given an array of PropertyValues as argument, convert it to a JSON string + """ # Array of property values => Dict(ionary) => JSON pvDict = {} for pv in propval: @@ -66,11 +68,12 @@ def _SF_Dictionary__ConvertToJson(propval, indent = None) -> str: return json.dumps(pvDict, indent=indent, skipkeys=True) -def _SF_Dictionary__ImportFromJson(jsonstr: str): # used by Dictionary.ImportFromJson() Basic method - """ - Given a JSON string as argument, convert it to a list of tuples (name, value) - The value must not be a (sub)dict. This doesn't pass the python-basic bridge. +def _SF_Dictionary__ImportFromJson(jsonstr: str) -> list: + # used by Dictionary.ImportFromJson() Basic method """ + Given a JSON string as argument, convert it to a list of tuples (name, value) + The value must not be a (sub)dict. This doesn't pass the python-basic bridge. + """ # JSON => Dictionary => Array of tuples/lists dico = json.loads(jsonstr) result = [] @@ -94,9 +97,9 @@ def _SF_Dictionary__ImportFromJson(jsonstr: str): # used by Dictionary.ImportFr def _SF_Exception__PythonPrint(string: str) -> bool: # used by SF_Exception.PythonPrint() Basic method """ - Write the argument to stdout. - If the APSO shell console is active, the argument will be displayed in the console window - """ + Write the argument to stdout. + If the APSO shell console is active, the argument will be displayed in the console window + """ print(string) return True @@ -108,27 +111,84 @@ def _SF_Exception__PythonPrint(string: str) -> bool: def _SF_FileSystem__CompareFiles(filename1: str, filename2: str, comparecontents=True) -> bool: # used by SF_FileSystem.CompareFiles() Basic method """ - Compare the 2 files, returning True if they seem equal, False otherwise. - By default, only their signatures (modification time, ...) are compared. - When comparecontents == True, their contents are compared. - """ + Compare the 2 files, returning True if they seem equal, False otherwise. + By default, only their signatures (modification time, ...) are compared. + When comparecontents == True, their contents are compared. + """ try: return filecmp.cmp(filename1, filename2, not comparecontents) except Exception: return False -def _SF_FileSystem__GetFilelen(systemfilepath: str) -> str: # used by SF_FileSystem.GetFilelen() Basic method +def _SF_FileSystem__CompressToZip(filename: str, mode: str, folder: str, rootfolder: str = None) -> tuple[bool, str]: + # used by SF_FileSystem.CompressToZip() Basic method + """ + Stores the content of folder, including its subfolders, into a zip archive. + The mode argument determines if the zip file is created (e'x'clusive create) or not ('a'ppend). + The compressed files are stored optionally under a root folder. + """ + try: + if mode == 'a': # existence of filename is checked in the calling routine + if not zipfile.is_zipfile(filename): + return False, "File is not a zip archive: '%s'" % filename + directory = pathlib.Path(folder) + # Write compressed files under root or under the given root folder. Normal slashes are required, also in Windows.. + topfolder = (None if rootfolder is None else pathlib.PurePosixPath(rootfolder + '/')) + with zipfile.ZipFile(filename, mode, strict_timestamps = False) as archive: + for filepath in directory.rglob('*'): + name = (filepath.relative_to(directory) if topfolder is None + else topfolder.joinpath(filepath.relative_to(directory))) + archive.write(filepath, arcname = name, compress_type = zipfile.ZIP_DEFLATED) + return True, '' + except Exception as e: + return False, str(e) + + +def _SF_FileSystem__ExtractFromZip(filename: str, destination: str, source: tuple = ()) -> tuple[bool, str]: + # used by SF_FileSystem.ExtractFromZip() Basic method + """ + Stores the source file(s) found in the given ZIP file into a destination folder. + """ + try: + if not zipfile.is_zipfile(filename): + return False, "File is not a zip archive: '%s'" % filename + with zipfile.ZipFile(filename, mode = 'r') as archive: + archive.extractall(destination, members = (None if len(source) == 0 else source)) + return True, '' + except Exception as e: + return False, str(e) + + +def _SF_FileSystem__FilesInZip(filename: str) -> list: + # used by SF_FileSystem.FilesInZip() Basic method + """ + Returns a list of archive members by name. The objects are in the same order as their entries + in the given ZIP file. + """ + try: + if not zipfile.is_zipfile(filename): + return [] + with zipfile.ZipFile(filename, mode = 'r') as archive: + namelist = archive.namelist() + return namelist + except Exception: + return [] + + +def _SF_FileSystem__GetFilelen(systemfilepath: str) -> str: + # used by SF_FileSystem.GetFilelen() Basic method return str(os.path.getsize(systemfilepath)) -def _SF_FileSystem__HashFile(filename: str, algorithm: str) -> str: # used by SF_FileSystem.HashFile() Basic method - """ - Hash a given file with the given hashing algorithm - cfr. https://www.pythoncentral.io/hashing-files-with-python/ - Example - hash = _SF_FileSystem__HashFile('myfile.txt','MD5') +def _SF_FileSystem__HashFile(filename: str, algorithm: str) -> str: + # used by SF_FileSystem.HashFile() Basic method """ + Hash a given file with the given hashing algorithm + cfr. https://www.pythoncentral.io/hashing-files-with-python/ + Example + hash = _SF_FileSystem__HashFile('myfile.txt','MD5') + """ algo = algorithm.lower() try: if algo in hashlib.algorithms_guaranteed: @@ -159,13 +219,21 @@ def _SF_FileSystem__HashFile(filename: str, algorithm: str) -> str: # used by S return '' +def _SF_FileSystem__IsZipFile(filename: str) -> bool: + # used by SF_FileSystem.IsZipFile() Basic method + """ + Returns True if filename is a valid ZIP file based on its magic number, otherwise returns False. + """ + return zipfile.is_zipfile(filename) + + def _SF_FileSystem__Normalize(systemfilepath: str) -> str: # used by SF_FileSystem.Normalize() Basic method """ - Normalize a pathname by collapsing redundant separators and up-level references so that - A//B, A/B/, A/./B and A/foo/../B all become A/B. - On Windows, it converts forward slashes to backward slashes. - """ + Normalize a pathname by collapsing redundant separators and up-level references so that + A//B, A/B/, A/./B and A/foo/../B all become A/B. + On Windows, it converts forward slashes to backward slashes. + """ return os.path.normpath(systemfilepath) @@ -175,8 +243,8 @@ def _SF_FileSystem__Normalize(systemfilepath: str) -> str: def _SF_Platform(propertyname: str): # used by SF_Platform Basic module """ - Switch between SF_Platform properties (read the documentation about the ScriptForge.Platform service) - """ + Switch between SF_Platform properties (read the documentation about the ScriptForge.Platform service) + """ pf = Platform() if propertyname == 'Architecture': return pf.Architecture @@ -249,8 +317,8 @@ class Platform(object, metaclass = _Singleton): def _SF_Session__OpenURLInBrowser(url: str): # Used by SF_Session.OpenURLInBrowser() Basic method """ - Display url using the default browser - """ + Display url using the default browser + """ try: webbrowser.open(url, new = 2) except Exception: # whatever happened, continue the execution ... @@ -264,10 +332,10 @@ def _SF_Session__OpenURLInBrowser(url: str): # Used by SF_Session.OpenURLInBr def _SF_String__HashStr(string: str, algorithm: str) -> str: # used by SF_String.HashStr() Basic method """ - Hash a given UTF-8 string with the given hashing algorithm - Example - hash = _SF_String__HashStr('This is a UTF-8 encoded string.','MD5') - """ + Hash a given UTF-8 string with the given hashing algorithm + Example + hash = _SF_String__HashStr('This is a UTF-8 encoded string.','MD5') + """ algo = algorithm.lower() try: if algo in hashlib.algorithms_guaranteed: @@ -301,6 +369,7 @@ def _SF_String__HashStr(string: str, algorithm: str) -> str: # used by SF_Strin g_exportedScripts = () if __name__ == "__main__": + """ print(_SF_Platform('Architecture')) print(_SF_Platform('ComputerName')) print(_SF_Platform('CPUCount')) @@ -323,10 +392,13 @@ if __name__ == "__main__": # _SF_Session__OpenURLInBrowser('https://docs.python.org/3/library/webbrowser.html') # js = """ - {"firstName": "John","lastName": "Smith","isAlive": true,"age": 27, + """{"firstName": "John","lastName": "Smith","isAlive": true,"age": 27, "address": {"streetAddress": "21 2nd Street","city": "New York","state": "NY","postalCode": "10021-3100"}, "phoneNumbers": [{"type": "home","number": "212 555-1234"},{"type": "office","number": "646 555-4567"}], "children": ["Q", "M", "G", "T"],"spouse": null} """ - arr = _SF_Dictionary__ImportFromJson(js) - print(arr) + """arr = _SF_Dictionary__ImportFromJson(js) + print(arr)""" + a = "/tmp/SF_YYY/zipped.odt" + b = _SF_FileSystem__CompressToZip(a, "a", "/tmp/SF_XXX", "New") + print(b) \ No newline at end of file diff --git a/wizards/source/scriptforge/python/scriptforge.py b/wizards/source/scriptforge/python/scriptforge.py index 2f54e5462f0a..cf86a1ca2e09 100644 --- a/wizards/source/scriptforge/python/scriptforge.py +++ b/wizards/source/scriptforge/python/scriptforge.py @@ -1220,6 +1220,9 @@ class SFScriptForge: else: return False + def CompressToZip(self, filename, foldername, rootfolder = ''): + return self.ExecMethod(self.vbMethod, 'CompressToZip', filename, foldername, rootfolder) + def CopyFile(self, source, destination, overwrite = True): return self.ExecMethod(self.vbMethod, 'CopyFile', source, destination, overwrite) @@ -1241,12 +1244,18 @@ class SFScriptForge: def ExtensionFolder(self, extension): return self.ExecMethod(self.vbMethod, 'ExtensionFolder', extension) + def ExtractFromZip(self, filename, destination, source = ''): + return self.ExecMethod(self.vbMethod, 'ExtractFromZip', filename, destination, source) + def FileExists(self, filename): return self.ExecMethod(self.vbMethod, 'FileExists', filename) def Files(self, foldername, filter = '', includesubfolders = False): return self.ExecMethod(self.vbMethod, 'Files', foldername, filter, includesubfolders) + def FilesInZip(self, filename, pattern = ''): + return self.ExecMethod(self.vbMethod, 'FilesInZip', filename, pattern) + def FolderExists(self, foldername): return self.ExecMethod(self.vbMethod, 'FolderExists', foldername) @@ -1284,6 +1293,14 @@ class SFScriptForge: else: return '' + def IsZipFile(self, filename): + py = ScriptForge.pythonhelpermodule + '$' + '_SF_FileSystem__IsZipFile' + if self.FileExists(filename): + file = self._ConvertFromUrl(filename) + return self.SIMPLEEXEC(py, file) + else: + return False + def MoveFile(self, source, destination): return self.ExecMethod(self.vbMethod, 'MoveFile', source, destination) diff --git a/wizards/source/scriptforge/python/scriptforge.pyi b/wizards/source/scriptforge/python/scriptforge.pyi index 444863a5da55..ed29d33944e9 100644 --- a/wizards/source/scriptforge/python/scriptforge.pyi +++ b/wizards/source/scriptforge/python/scriptforge.pyi @@ -975,6 +975,26 @@ class SFScriptForge: """ ... + def CompressToZip(self, filename: FILE, foldername: FILE, rootfolder: str = ...) -> bool: + """ + Stores the content of Folder, including its subfolders, into a zip archive. + Encrypted files are not supported. The compressed files are stored optionally under a root folder. + Files existing already in the archive are not overwritten. + Args + ``filename``: a string representing the zip file. + If it does not exist, the archive is created, oncluding its parent folders. + All files present in the archive are kept untouched. + + ``foldername``: the folder to compress, as a string. All files and subfolders are included. + The folder itself is not. + + ``rootfolder``: when absent, files and folders are loaded in the archive from the root ("/"). + When present, given as a string without path separator, they are stored below that folder. + Returns + ``True`` when successful. When ``False``, the reason might be found in the console. + """ + ... + def CopyFile(self, source: FILE, destination: FILE, overwrite: bool = ...) -> bool: """ Copies one or more files from one location to another. @@ -1092,6 +1112,24 @@ class SFScriptForge: """ ... + def ExtractFromZip(self, filename: FILE, destination: FILE, source: str | tuple[str, ...] = ...) -> bool: + """ + Extracts a list of files contained in a zip archive and stores them in a folder. + Args + ``filename``: a string representing the zip archive. + + ``destination``: the folder where to extract the compressed files to. + Existing files with the same names are overwritten without warning. Other files stay untouched. + When the folder or a subfolder does not exist, it is created. + + ``source``: a single string or a tuple of strings with valid names of files contained in + the zip file. When Source is omitted, is an empty tuple or an empty string, + all the files and folders are extracted. + Returns + ``True`` when successful. When ``False``, the reason might be found in the console. + """ + ... + def FileExists(self, filename: FILE) -> bool: """ Return ``True`` if the given file exists. @@ -1121,6 +1159,24 @@ class SFScriptForge: """ ... + def FilesInZip(self, filename: FILE, pattern: str = ...) -> tuple[str, ...]: + """ + Returns The list of the files contained in a zip container. The list of names may optionally + be filtered. + Args + ``filename``: a string representing the zip archive. + + ``pattern``: a pattern as a not case-sensitive string containing 0 or more wildcards. + Admitted wildcard are: the "?" represents any single character, + the "*" represents zero, one, or multiple characters. + Returns + An unordered tuple of file names without a heading slash. The path separator is always + the slash ("/"), also on Windows. The list may be filtered with a name pattern. + Without pattern, all files are returned. The resulting tuple may be empty. An empty tuple + is returned when the file is not a valid zip file. + """ + ... + def FolderExists(self, foldername: FILE) -> bool: """ Returns ``True`` if the given folder name exists. @@ -1235,6 +1291,16 @@ class SFScriptForge: """ ... + def IsZipFile(self, filename: FILE) -> bool: + """ + Returns ``True`` if filename is a valid ZIP file based on its magic number. + Args + ``filename``: a string representing the zip archive. + Returns + ``True`` when ``filename`` is a valid zip file. Otherwise ``False``. + """ + ... + def MoveFile(self, source: FILE, destination: FILE) -> bool: """ Moves one or more files from one location to another. From 28cc8883eb79217b586eb24ed1155f4cd1a6c75c Mon Sep 17 00:00:00 2001 From: Michael Weghorn Date: Tue, 6 Oct 2026 07:36:36 +0200 Subject: [PATCH 236/289] chart2, sc: Enforce UI rules Commit the results of running for a in `git ls-files "*.ui"`; do bin/ui-rules-enforcer.py $a; done Change-Id: I7a97f75773b9e5750dcce848d730960a8561916b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211850 Tested-by: Jenkins Reviewed-by: Michael Weghorn --- chart2/uiconfig/ui/sidebaraxis.ui | 15 +++++---------- chart2/uiconfig/ui/tp_Scale.ui | 15 +++++---------- sc/uiconfig/scalc/ui/notebookbar.ui | 11 ----------- 3 files changed, 10 insertions(+), 31 deletions(-) diff --git a/chart2/uiconfig/ui/sidebaraxis.ui b/chart2/uiconfig/ui/sidebaraxis.ui index ec67b5534ad2..3b7f5faa0923 100644 --- a/chart2/uiconfig/ui/sidebaraxis.ui +++ b/chart2/uiconfig/ui/sidebaraxis.ui @@ -159,7 +159,6 @@ 6 6 12 - _Automatic @@ -167,13 +166,13 @@ True True True + True 0 0 - Bin _width @@ -188,7 +187,6 @@ 1 - True @@ -196,6 +194,7 @@ 10 adjustmentHISTOGRAM_BIN_WIDTH 2 + True Bin width @@ -208,7 +207,6 @@ 1 - _Number of bins @@ -223,7 +221,6 @@ 2 - True @@ -231,6 +228,7 @@ 10 adjustmentHISTOGRAM_BIN_COUNT True + True Number of bins @@ -243,7 +241,6 @@ 2 - _Overflow bin @@ -257,7 +254,6 @@ 3 - True @@ -265,6 +261,7 @@ 10 adjustmentHISTOGRAM_OVERFLOW 2 + True Overflow bin value @@ -277,7 +274,6 @@ 3 - _Underflow bin @@ -291,7 +287,6 @@ 4 - True @@ -299,6 +294,7 @@ 10 adjustmentHISTOGRAM_UNDERFLOW 2 + True Underflow bin value @@ -313,7 +309,6 @@ - True diff --git a/chart2/uiconfig/ui/tp_Scale.ui b/chart2/uiconfig/ui/tp_Scale.ui index 5c6e8366d86a..bdbfa8cd17d4 100644 --- a/chart2/uiconfig/ui/tp_Scale.ui +++ b/chart2/uiconfig/ui/tp_Scale.ui @@ -582,7 +582,6 @@ 6 6 12 - Auto_matic @@ -590,13 +589,13 @@ True True True + True 0 0 - Bin _width @@ -611,7 +610,6 @@ 1 - True @@ -619,6 +617,7 @@ 10 adjustmentHISTOGRAM_BIN_WIDTH 2 + True Bin width @@ -631,7 +630,6 @@ 1 - _Number of bins @@ -646,7 +644,6 @@ 2 - True @@ -654,6 +651,7 @@ 10 adjustmentHISTOGRAM_BIN_COUNT True + True Number of bins @@ -666,7 +664,6 @@ 2 - _Overflow bin @@ -680,7 +677,6 @@ 3 - True @@ -688,6 +684,7 @@ 10 adjustmentHISTOGRAM_OVERFLOW 2 + True Overflow bin value @@ -700,7 +697,6 @@ 3 - _Underflow bin @@ -714,7 +710,6 @@ 4 - True @@ -722,6 +717,7 @@ 10 adjustmentHISTOGRAM_UNDERFLOW 2 + True Underflow bin value @@ -736,7 +732,6 @@ - True diff --git a/sc/uiconfig/scalc/ui/notebookbar.ui b/sc/uiconfig/scalc/ui/notebookbar.ui index 6c9351fcd2aa..9de4fa6379cc 100644 --- a/sc/uiconfig/scalc/ui/notebookbar.ui +++ b/sc/uiconfig/scalc/ui/notebookbar.ui @@ -8226,7 +8226,6 @@ True - False .uno:ViewRowColumnHeaders @@ -8251,7 +8250,6 @@ True - False .uno:ToggleSheetGrid @@ -8276,7 +8274,6 @@ True - False .uno:Menubar @@ -8301,7 +8298,6 @@ True - False .uno:InputLineVisible @@ -8324,7 +8320,6 @@ True - False .uno:ViewValueHighlighting @@ -8347,7 +8342,6 @@ True - False .uno:ToggleFormula @@ -8373,7 +8367,6 @@ True - False .uno:ChangeTheme @@ -8449,7 +8442,6 @@ True - False .uno:ViewColumnRowHighlighting @@ -8472,7 +8464,6 @@ True - False .uno:ViewHiddenColRow @@ -8495,7 +8486,6 @@ True - False .uno:DesignerDialog @@ -8520,7 +8510,6 @@ True - False .uno:Sidebar From 153b3d0aa3b45884c866ff3348e1d2d360f82d02 Mon Sep 17 00:00:00 2001 From: Michael Weghorn Date: Tue, 6 Oct 2026 08:05:33 +0200 Subject: [PATCH 237/289] svx: Use '#pragma once in DefaultShapesPanel.hxx Change-Id: Idaff017b86c9a095f14b00df38febe1e2024cc01 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211852 Tested-by: Jenkins Reviewed-by: Michael Weghorn --- svx/source/inc/DefaultShapesPanel.hxx | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/svx/source/inc/DefaultShapesPanel.hxx b/svx/source/inc/DefaultShapesPanel.hxx index 3d929fcef8dd..e6e81a152c2b 100644 --- a/svx/source/inc/DefaultShapesPanel.hxx +++ b/svx/source/inc/DefaultShapesPanel.hxx @@ -16,8 +16,8 @@ * 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_SVX_SOURCE_INC_DEFAULTSHAPESPANEL_HXX -#define INCLUDED_SVX_SOURCE_INC_DEFAULTSHAPESPANEL_HXX + +#pragma once #include #include @@ -77,6 +77,4 @@ private: } // end of namespace sd::sidebar -#endif - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ From 2bfea7889c98db7d405093a7e489c0c42b9d12eb Mon Sep 17 00:00:00 2001 From: Michael Weghorn Date: Tue, 6 Oct 2026 08:25:28 +0200 Subject: [PATCH 238/289] svx: Merge DefaultShapesPanel::{Initialize,populateShapes} Merge DefaultShapesPanel::populateShapes into its only caller, DefaultShapesPanel::Initialize. This will also allow to merge the two for loops into one in an upcoming commit. Change-Id: I404d056424cc80bda76332543deee6ff287094ba Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211853 Reviewed-by: Michael Weghorn Tested-by: Jenkins --- svx/source/inc/DefaultShapesPanel.hxx | 1 - .../sidebar/shapes/DefaultShapesPanel.cxx | 39 +++++++++---------- 2 files changed, 18 insertions(+), 22 deletions(-) diff --git a/svx/source/inc/DefaultShapesPanel.hxx b/svx/source/inc/DefaultShapesPanel.hxx index e6e81a152c2b..b58cfeb50f56 100644 --- a/svx/source/inc/DefaultShapesPanel.hxx +++ b/svx/source/inc/DefaultShapesPanel.hxx @@ -70,7 +70,6 @@ private: Reference< XFrame > mxFrame; std::map> m_aShapesSetMap; - void populateShapes(); void Initialize(); DECL_LINK( ShapeSelectHdl, ValueSet*, void ); }; diff --git a/svx/source/sidebar/shapes/DefaultShapesPanel.cxx b/svx/source/sidebar/shapes/DefaultShapesPanel.cxx index d1eba4a44122..eb6682fbf90d 100644 --- a/svx/source/sidebar/shapes/DefaultShapesPanel.cxx +++ b/svx/source/sidebar/shapes/DefaultShapesPanel.cxx @@ -86,7 +86,24 @@ void DefaultShapesPanel::Initialize() { mxStarSet.get(), m_aStarShapes }, { mx3DObjectSet.get(), m_a3DShapes } }; - populateShapes(); + + OUString sSlotStr, sLabel; + Image aSlotImage; + for (auto& aSet : m_aShapesSetMap) + { + aSet.first->SetColCount(6); + for (size_t i = 0; i < aSet.second.size(); i++) + { + sSlotStr = aSet.second.at(i); + aSlotImage = vcl::CommandInfoProvider::GetImageForCommand(sSlotStr, mxFrame); + auto aProperties = vcl::CommandInfoProvider::GetCommandProperties( + sSlotStr, vcl::CommandInfoProvider::GetModuleIdentifier(mxFrame)); + sLabel = vcl::CommandInfoProvider::GetTooltipForCommand(sSlotStr, aProperties, mxFrame); + sal_uInt16 nSelectionId = i + 1; // tdf#142767 id 0 is reserved for nothing-selected + aSet.first->InsertItem(nSelectionId, aSlotImage, sLabel); + } + } + for (auto& aSetMap : m_aShapesSetMap) { aSetMap.first->SetColor(Application::GetSettings().GetStyleSettings().GetDialogColor()); @@ -134,26 +151,6 @@ IMPL_LINK(DefaultShapesPanel, ShapeSelectHdl, ValueSet*, rValueSet, void) } } -void DefaultShapesPanel::populateShapes() -{ - OUString sSlotStr, sLabel; - Image aSlotImage; - for (auto& aSet : m_aShapesSetMap) - { - aSet.first->SetColCount(6); - for (size_t i = 0; i < aSet.second.size(); i++) - { - sSlotStr = aSet.second.at(i); - aSlotImage = vcl::CommandInfoProvider::GetImageForCommand(sSlotStr, mxFrame); - auto aProperties = vcl::CommandInfoProvider::GetCommandProperties(sSlotStr, - vcl::CommandInfoProvider::GetModuleIdentifier(mxFrame)); - sLabel = vcl::CommandInfoProvider::GetTooltipForCommand(sSlotStr, aProperties, mxFrame); - sal_uInt16 nSelectionId = i + 1; // tdf#142767 id 0 is reserved for nothing-selected - aSet.first->InsertItem(nSelectionId, aSlotImage, sLabel); - } - } -} - } // end of namespace svx::sidebar /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ From f8055586e7495d780d626fa206cccbab28aa1972 Mon Sep 17 00:00:00 2001 From: Michael Weghorn Date: Tue, 6 Oct 2026 08:27:24 +0200 Subject: [PATCH 239/289] svx: Iterate over map elements once instead of twice Instead of iterating over the DefaultShapesPanel::m_aShapesSetMap elements twice, do so only once and just do everything that needs to be done for each of the elements right away. Change-Id: I0b774ccbed7e5110f57d0ce6cc6cf2382a6b923e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211854 Tested-by: Jenkins Reviewed-by: Michael Weghorn --- svx/source/sidebar/shapes/DefaultShapesPanel.cxx | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/svx/source/sidebar/shapes/DefaultShapesPanel.cxx b/svx/source/sidebar/shapes/DefaultShapesPanel.cxx index eb6682fbf90d..c0f3ef73c892 100644 --- a/svx/source/sidebar/shapes/DefaultShapesPanel.cxx +++ b/svx/source/sidebar/shapes/DefaultShapesPanel.cxx @@ -102,12 +102,9 @@ void DefaultShapesPanel::Initialize() sal_uInt16 nSelectionId = i + 1; // tdf#142767 id 0 is reserved for nothing-selected aSet.first->InsertItem(nSelectionId, aSlotImage, sLabel); } - } - for (auto& aSetMap : m_aShapesSetMap) - { - aSetMap.first->SetColor(Application::GetSettings().GetStyleSettings().GetDialogColor()); - aSetMap.first->SetSelectHdl(LINK(this, DefaultShapesPanel, ShapeSelectHdl)); + aSet.first->SetColor(Application::GetSettings().GetStyleSettings().GetDialogColor()); + aSet.first->SetSelectHdl(LINK(this, DefaultShapesPanel, ShapeSelectHdl)); } } From 30e7c4110b7e4c4f6a995d086e5eb3eab81e098f Mon Sep 17 00:00:00 2001 From: Michael Weghorn Date: Tue, 6 Oct 2026 08:29:22 +0200 Subject: [PATCH 240/289] svx: Reduce scope of local variables Change-Id: I5252cb01439e071211567e7c8e5cfc5ef1e67e5b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211855 Tested-by: Jenkins Reviewed-by: Michael Weghorn --- svx/source/sidebar/shapes/DefaultShapesPanel.cxx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/svx/source/sidebar/shapes/DefaultShapesPanel.cxx b/svx/source/sidebar/shapes/DefaultShapesPanel.cxx index c0f3ef73c892..723f5a94989d 100644 --- a/svx/source/sidebar/shapes/DefaultShapesPanel.cxx +++ b/svx/source/sidebar/shapes/DefaultShapesPanel.cxx @@ -87,18 +87,18 @@ void DefaultShapesPanel::Initialize() { mx3DObjectSet.get(), m_a3DShapes } }; - OUString sSlotStr, sLabel; - Image aSlotImage; for (auto& aSet : m_aShapesSetMap) { aSet.first->SetColCount(6); for (size_t i = 0; i < aSet.second.size(); i++) { - sSlotStr = aSet.second.at(i); - aSlotImage = vcl::CommandInfoProvider::GetImageForCommand(sSlotStr, mxFrame); + const OUString sSlotStr = aSet.second.at(i); + const Image aSlotImage + = vcl::CommandInfoProvider::GetImageForCommand(sSlotStr, mxFrame); auto aProperties = vcl::CommandInfoProvider::GetCommandProperties( sSlotStr, vcl::CommandInfoProvider::GetModuleIdentifier(mxFrame)); - sLabel = vcl::CommandInfoProvider::GetTooltipForCommand(sSlotStr, aProperties, mxFrame); + const OUString sLabel + = vcl::CommandInfoProvider::GetTooltipForCommand(sSlotStr, aProperties, mxFrame); sal_uInt16 nSelectionId = i + 1; // tdf#142767 id 0 is reserved for nothing-selected aSet.first->InsertItem(nSelectionId, aSlotImage, sLabel); } From 969a6481a4a376d6b58143d58973c9adf7c998cc Mon Sep 17 00:00:00 2001 From: Michael Weghorn Date: Tue, 6 Oct 2026 09:33:08 +0200 Subject: [PATCH 241/289] svx: Port shapes panel from ValueSet to weld::IconView Port the widgets to select shapes to insert in the Draw/Impress "Shapes" sidebar panel from using a ValueSet widget to using weld::IconView. This helps to be more consistent with other platform/toolkit widgets and reduces custom widget logic. Adjust indices used to account for the fact that weld::IconView indices are 0-based while the ValueSet ones are 1-based. The UI can be triggered like this: * start Impress * open the sidebar * switch to the "Shapes" sidebar deck Change-Id: I3cdb85a966693514521637f672255ba086b9eb19 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211856 Tested-by: Jenkins Reviewed-by: Michael Weghorn --- svx/source/inc/DefaultShapesPanel.hxx | 36 ++- .../sidebar/shapes/DefaultShapesPanel.cxx | 122 ++++------ svx/uiconfig/ui/defaultshapespanel.ui | 210 ++++++++++++++---- 3 files changed, 231 insertions(+), 137 deletions(-) diff --git a/svx/source/inc/DefaultShapesPanel.hxx b/svx/source/inc/DefaultShapesPanel.hxx index b58cfeb50f56..948b33dfa6f6 100644 --- a/svx/source/inc/DefaultShapesPanel.hxx +++ b/svx/source/inc/DefaultShapesPanel.hxx @@ -21,7 +21,7 @@ #include #include -#include +#include #include #include "ShapesUtil.hxx" @@ -46,32 +46,22 @@ public: virtual ~DefaultShapesPanel() override; private: - std::unique_ptr mxLineArrowSet; - std::unique_ptr mxLineArrowSetWin; - std::unique_ptr mxCurveSet; - std::unique_ptr mxCurveSetWin; - std::unique_ptr mxConnectorSet; - std::unique_ptr mxConnectorSetWin; - std::unique_ptr mxBasicShapeSet; - std::unique_ptr mxBasicShapeSetWin; - std::unique_ptr mxSymbolShapeSet; - std::unique_ptr mxSymbolShapeSetWin; - std::unique_ptr mxBlockArrowSet; - std::unique_ptr mxBlockArrowSetWin; - std::unique_ptr mxFlowchartSet; - std::unique_ptr mxFlowchartSetWin; - std::unique_ptr mxCalloutSet; - std::unique_ptr mxCalloutSetWin; - std::unique_ptr mxStarSet; - std::unique_ptr mxStarSetWin; - std::unique_ptr mx3DObjectSet; - std::unique_ptr mx3DObjectSetWin; + std::unique_ptr m_pLineArrowIconView; + std::unique_ptr m_pCurveIconView; + std::unique_ptr m_pConnectorIconView; + std::unique_ptr m_pBasicShapeIconView; + std::unique_ptr m_pSymbolShapeIconView; + std::unique_ptr m_pBlockArrowIconView; + std::unique_ptr m_pFlowchartIconView; + std::unique_ptr m_pCalloutIconView; + std::unique_ptr m_pStarIconView; + std::unique_ptr m_p3DObjectIconView; Reference< XFrame > mxFrame; - std::map> m_aShapesSetMap; + std::map> m_aShapesViewsMap; void Initialize(); - DECL_LINK( ShapeSelectHdl, ValueSet*, void ); + DECL_LINK(ShapeActivatedHdl, const weld::TreeIter&, bool); }; } // end of namespace sd::sidebar diff --git a/svx/source/sidebar/shapes/DefaultShapesPanel.cxx b/svx/source/sidebar/shapes/DefaultShapesPanel.cxx index 723f5a94989d..fcc3c0960696 100644 --- a/svx/source/sidebar/shapes/DefaultShapesPanel.cxx +++ b/svx/source/sidebar/shapes/DefaultShapesPanel.cxx @@ -21,38 +21,28 @@ #include #include #include +#include #include #include #include #include -#include +#include namespace svx::sidebar { -DefaultShapesPanel::DefaultShapesPanel ( - weld::Widget* pParent, - css::uno::Reference xFrame) +DefaultShapesPanel::DefaultShapesPanel(weld::Widget* pParent, + css::uno::Reference xFrame) : PanelLayout(pParent, u"DefaultShapesPanel"_ustr, u"svx/ui/defaultshapespanel.ui"_ustr) - , mxLineArrowSet(new ValueSet(nullptr)) - , mxLineArrowSetWin(new weld::CustomWeld(*m_xBuilder, u"LinesArrows"_ustr, *mxLineArrowSet)) - , mxCurveSet(new ValueSet(nullptr)) - , mxCurveSetWin(new weld::CustomWeld(*m_xBuilder, u"Curves"_ustr, *mxCurveSet)) - , mxConnectorSet(new ValueSet(nullptr)) - , mxConnectorSetWin(new weld::CustomWeld(*m_xBuilder, u"Connectors"_ustr, *mxConnectorSet)) - , mxBasicShapeSet(new ValueSet(nullptr)) - , mxBasicShapeSetWin(new weld::CustomWeld(*m_xBuilder, u"BasicShapes"_ustr, *mxBasicShapeSet)) - , mxSymbolShapeSet(new ValueSet(nullptr)) - , mxSymbolShapeSetWin(new weld::CustomWeld(*m_xBuilder, u"SymbolShapes"_ustr, *mxSymbolShapeSet)) - , mxBlockArrowSet(new ValueSet(nullptr)) - , mxBlockArrowSetWin(new weld::CustomWeld(*m_xBuilder, u"BlockArrows"_ustr, *mxBlockArrowSet)) - , mxFlowchartSet(new ValueSet(nullptr)) - , mxFlowchartSetWin(new weld::CustomWeld(*m_xBuilder, u"Flowcharts"_ustr, *mxFlowchartSet)) - , mxCalloutSet(new ValueSet(nullptr)) - , mxCalloutSetWin(new weld::CustomWeld(*m_xBuilder, u"Callouts"_ustr, *mxCalloutSet)) - , mxStarSet(new ValueSet(nullptr)) - , mxStarSetWin(new weld::CustomWeld(*m_xBuilder, u"Stars"_ustr, *mxStarSet)) - , mx3DObjectSet(new ValueSet(nullptr)) - , mx3DObjectSetWin(new weld::CustomWeld(*m_xBuilder, u"3DObjects"_ustr, *mx3DObjectSet)) + , m_pLineArrowIconView(m_xBuilder->weld_icon_view(u"LinesArrows"_ustr)) + , m_pCurveIconView(m_xBuilder->weld_icon_view(u"Curves"_ustr)) + , m_pConnectorIconView(m_xBuilder->weld_icon_view(u"Connectors"_ustr)) + , m_pBasicShapeIconView(m_xBuilder->weld_icon_view(u"BasicShapes"_ustr)) + , m_pSymbolShapeIconView(m_xBuilder->weld_icon_view(u"SymbolShapes"_ustr)) + , m_pBlockArrowIconView(m_xBuilder->weld_icon_view(u"BlockArrows"_ustr)) + , m_pFlowchartIconView(m_xBuilder->weld_icon_view(u"Flowcharts"_ustr)) + , m_pCalloutIconView(m_xBuilder->weld_icon_view(u"Callouts"_ustr)) + , m_pStarIconView(m_xBuilder->weld_icon_view(u"Stars"_ustr)) + , m_p3DObjectIconView(m_xBuilder->weld_icon_view(u"3DObjects"_ustr)) , mxFrame(std::move(xFrame)) { Initialize(); @@ -74,78 +64,62 @@ std::unique_ptr DefaultShapesPanel::Create( void DefaultShapesPanel::Initialize() { - m_aShapesSetMap = decltype(m_aShapesSetMap){ - { mxLineArrowSet.get(), m_aLineShapes }, - { mxCurveSet.get(), m_aCurveShapes }, - { mxConnectorSet.get(), m_aConnectorShapes }, - { mxBasicShapeSet.get(), m_aBasicShapes }, - { mxSymbolShapeSet.get(), m_aSymbolShapes }, - { mxBlockArrowSet.get(), m_aBlockArrowShapes }, - { mxFlowchartSet.get(), m_aFlowchartShapes }, - { mxCalloutSet.get(), m_aCalloutShapes }, - { mxStarSet.get(), m_aStarShapes }, - { mx3DObjectSet.get(), m_a3DShapes } - }; + m_aShapesViewsMap = { { m_pLineArrowIconView.get(), m_aLineShapes }, + { m_pCurveIconView.get(), m_aCurveShapes }, + { m_pConnectorIconView.get(), m_aConnectorShapes }, + { m_pBasicShapeIconView.get(), m_aBasicShapes }, + { m_pSymbolShapeIconView.get(), m_aSymbolShapes }, + { m_pBlockArrowIconView.get(), m_aBlockArrowShapes }, + { m_pFlowchartIconView.get(), m_aFlowchartShapes }, + { m_pCalloutIconView.get(), m_aCalloutShapes }, + { m_pStarIconView.get(), m_aStarShapes }, + { m_p3DObjectIconView.get(), m_a3DShapes } }; - for (auto& aSet : m_aShapesSetMap) + for (auto& rEntry : m_aShapesViewsMap) { - aSet.first->SetColCount(6); - for (size_t i = 0; i < aSet.second.size(); i++) + for (size_t i = 0; i < rEntry.second.size(); i++) { - const OUString sSlotStr = aSet.second.at(i); - const Image aSlotImage - = vcl::CommandInfoProvider::GetImageForCommand(sSlotStr, mxFrame); + const OUString sSlotStr = rEntry.second.at(i); + const Bitmap aSlotImage + = vcl::CommandInfoProvider::GetImageForCommand(sSlotStr, mxFrame).GetBitmap(); auto aProperties = vcl::CommandInfoProvider::GetCommandProperties( sSlotStr, vcl::CommandInfoProvider::GetModuleIdentifier(mxFrame)); const OUString sLabel = vcl::CommandInfoProvider::GetTooltipForCommand(sSlotStr, aProperties, mxFrame); - sal_uInt16 nSelectionId = i + 1; // tdf#142767 id 0 is reserved for nothing-selected - aSet.first->InsertItem(nSelectionId, aSlotImage, sLabel); + rEntry.first->insert(i, nullptr, nullptr, &aSlotImage, nullptr); + rEntry.first->set_item_accessible_name(i, sLabel); + rEntry.first->set_item_tooltip_text(i, sLabel); } - aSet.first->SetColor(Application::GetSettings().GetStyleSettings().GetDialogColor()); - aSet.first->SetSelectHdl(LINK(this, DefaultShapesPanel, ShapeSelectHdl)); + rEntry.first->connect_item_activated(LINK(this, DefaultShapesPanel, ShapeActivatedHdl)); } } DefaultShapesPanel::~DefaultShapesPanel() { - m_aShapesSetMap.clear(); - mxLineArrowSetWin.reset(); - mxLineArrowSet.reset(); - mxCurveSetWin.reset(); - mxCurveSet.reset(); - mxConnectorSetWin.reset(); - mxConnectorSet.reset(); - mxBasicShapeSetWin.reset(); - mxBasicShapeSet.reset(); - mxSymbolShapeSetWin.reset(); - mxSymbolShapeSet.reset(); - mxBlockArrowSetWin.reset(); - mxBlockArrowSet.reset(); - mxFlowchartSetWin.reset(); - mxFlowchartSet.reset(); - mxCalloutSetWin.reset(); - mxCalloutSet.reset(); - mxStarSetWin.reset(); - mxStarSet.reset(); - mx3DObjectSetWin.reset(); - mx3DObjectSet.reset(); + m_aShapesViewsMap.clear(); } -IMPL_LINK(DefaultShapesPanel, ShapeSelectHdl, ValueSet*, rValueSet, void) +IMPL_LINK(DefaultShapesPanel, ShapeActivatedHdl, const weld::TreeIter&, rIter, bool) { - for (auto& aSetMap : m_aShapesSetMap) + const weld::ItemView& rActiveItemView = rIter.getItemView(); + for (const auto& rEntry : m_aShapesViewsMap) { - if(rValueSet == aSetMap.first) + if (&rActiveItemView == rEntry.first) { - sal_uInt16 nSelectionId = aSetMap.first->GetSelectedItemId(); - if (nSelectionId > 0 && nSelectionId <= aSetMap.second.size()) - comphelper::dispatchCommand(aSetMap.second.at(nSelectionId - 1), {}); + const int nActivatedIndex = rActiveItemView.get_iter_index_in_parent(rIter); + assert(nActivatedIndex >= 0 + && o3tl::make_unsigned(nActivatedIndex) < rEntry.second.size() + && "Invalid index"); + comphelper::dispatchCommand(rEntry.second.at(nActivatedIndex), {}); } else - aSetMap.first->SetNoSelection(); + { + rEntry.first->unselect_all(); + } } + + return true; } } // end of namespace svx::sidebar diff --git a/svx/uiconfig/ui/defaultshapespanel.ui b/svx/uiconfig/ui/defaultshapespanel.ui index 190945a3ab70..c84f997b64d7 100644 --- a/svx/uiconfig/ui/defaultshapespanel.ui +++ b/svx/uiconfig/ui/defaultshapespanel.ui @@ -2,6 +2,106 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + True @@ -28,12 +128,15 @@ 0 none - - 50 + True True - GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_KEY_PRESS_MASK | GDK_KEY_RELEASE_MASK | GDK_STRUCTURE_MASK - 12 + 6 + LinesArrows_model + 6 + 0 + 2 + True @@ -60,12 +163,15 @@ 0 none - - 50 + True True - GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_KEY_PRESS_MASK | GDK_KEY_RELEASE_MASK | GDK_STRUCTURE_MASK - 12 + 6 + Curves_model + 6 + 0 + 2 + True @@ -92,12 +198,15 @@ 0 none - - 50 + True True - GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_KEY_PRESS_MASK | GDK_KEY_RELEASE_MASK | GDK_STRUCTURE_MASK - 12 + 6 + Connectors_model + 6 + 0 + 2 + True @@ -124,12 +233,15 @@ 0 none - - 100 + True True - GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_KEY_PRESS_MASK | GDK_KEY_RELEASE_MASK | GDK_STRUCTURE_MASK - 12 + 6 + BasicShapes_model + 6 + 0 + 2 + True @@ -156,12 +268,15 @@ 0 none - - 75 + True True - GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_KEY_PRESS_MASK | GDK_KEY_RELEASE_MASK | GDK_STRUCTURE_MASK - 12 + 6 + SymbolShapes_model + 6 + 0 + 2 + True @@ -188,12 +303,15 @@ 0 none - - 125 + True True - GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_KEY_PRESS_MASK | GDK_KEY_RELEASE_MASK | GDK_STRUCTURE_MASK - 12 + 6 + BlockArrows_model + 6 + 0 + 2 + True @@ -220,12 +338,15 @@ 0 none - - 125 + True True - GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_KEY_PRESS_MASK | GDK_KEY_RELEASE_MASK | GDK_STRUCTURE_MASK - 12 + 6 + Flowcharts_model + 6 + 0 + 2 + True @@ -252,12 +373,15 @@ 0 none - - 50 + True True - GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_KEY_PRESS_MASK | GDK_KEY_RELEASE_MASK | GDK_STRUCTURE_MASK - 12 + 6 + Callouts_model + 6 + 0 + 2 + True @@ -284,12 +408,15 @@ 0 none - - 50 + True True - GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_KEY_PRESS_MASK | GDK_KEY_RELEASE_MASK | GDK_STRUCTURE_MASK - 12 + 6 + Stars_model + 6 + 0 + 2 + True @@ -316,12 +443,15 @@ 0 none - - 50 + True True - GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_KEY_PRESS_MASK | GDK_KEY_RELEASE_MASK | GDK_STRUCTURE_MASK - 12 + 6 + 3DObjects_model + 6 + 0 + 2 + True From 0cda587b29ec841bdd7e8508d1af1ce85eb6774c Mon Sep 17 00:00:00 2001 From: Michael Weghorn Date: Tue, 6 Oct 2026 09:43:17 +0200 Subject: [PATCH 242/289] svx: Set slot ID for DefaultShapesPanel IconView item ID Following Change-Id: I3cdb85a966693514521637f672255ba086b9eb19 Author: Michael Weghorn Date: Tue Oct 6 09:33:08 2026 +0200 svx: Port shapes panel from ValueSet to weld::IconView , stop storing the slot IDs/UNO commands corresponding to the items in the icon views in DefaultShapesPanel in a map and instead store them as the ID of the items directly in the weld::IconView, which simplifies the logic a bit. Change-Id: I97643abd64436cf106b88f835edf6e5c8fb5f7c3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211857 Tested-by: Jenkins Reviewed-by: Michael Weghorn --- svx/source/inc/DefaultShapesPanel.hxx | 2 +- .../sidebar/shapes/DefaultShapesPanel.cxx | 47 ++++++++----------- 2 files changed, 20 insertions(+), 29 deletions(-) diff --git a/svx/source/inc/DefaultShapesPanel.hxx b/svx/source/inc/DefaultShapesPanel.hxx index 948b33dfa6f6..0bbbdbbf1a87 100644 --- a/svx/source/inc/DefaultShapesPanel.hxx +++ b/svx/source/inc/DefaultShapesPanel.hxx @@ -58,7 +58,7 @@ private: std::unique_ptr m_p3DObjectIconView; Reference< XFrame > mxFrame; - std::map> m_aShapesViewsMap; + std::vector m_aShapesViews; void Initialize(); DECL_LINK(ShapeActivatedHdl, const weld::TreeIter&, bool); diff --git a/svx/source/sidebar/shapes/DefaultShapesPanel.cxx b/svx/source/sidebar/shapes/DefaultShapesPanel.cxx index fcc3c0960696..48238caf54f7 100644 --- a/svx/source/sidebar/shapes/DefaultShapesPanel.cxx +++ b/svx/source/sidebar/shapes/DefaultShapesPanel.cxx @@ -64,18 +64,19 @@ std::unique_ptr DefaultShapesPanel::Create( void DefaultShapesPanel::Initialize() { - m_aShapesViewsMap = { { m_pLineArrowIconView.get(), m_aLineShapes }, - { m_pCurveIconView.get(), m_aCurveShapes }, - { m_pConnectorIconView.get(), m_aConnectorShapes }, - { m_pBasicShapeIconView.get(), m_aBasicShapes }, - { m_pSymbolShapeIconView.get(), m_aSymbolShapes }, - { m_pBlockArrowIconView.get(), m_aBlockArrowShapes }, - { m_pFlowchartIconView.get(), m_aFlowchartShapes }, - { m_pCalloutIconView.get(), m_aCalloutShapes }, - { m_pStarIconView.get(), m_aStarShapes }, - { m_p3DObjectIconView.get(), m_a3DShapes } }; + const std::map> aShapesViewsMap + = { { m_pLineArrowIconView.get(), m_aLineShapes }, + { m_pCurveIconView.get(), m_aCurveShapes }, + { m_pConnectorIconView.get(), m_aConnectorShapes }, + { m_pBasicShapeIconView.get(), m_aBasicShapes }, + { m_pSymbolShapeIconView.get(), m_aSymbolShapes }, + { m_pBlockArrowIconView.get(), m_aBlockArrowShapes }, + { m_pFlowchartIconView.get(), m_aFlowchartShapes }, + { m_pCalloutIconView.get(), m_aCalloutShapes }, + { m_pStarIconView.get(), m_aStarShapes }, + { m_p3DObjectIconView.get(), m_a3DShapes } }; - for (auto& rEntry : m_aShapesViewsMap) + for (auto& rEntry : aShapesViewsMap) { for (size_t i = 0; i < rEntry.second.size(); i++) { @@ -86,37 +87,27 @@ void DefaultShapesPanel::Initialize() sSlotStr, vcl::CommandInfoProvider::GetModuleIdentifier(mxFrame)); const OUString sLabel = vcl::CommandInfoProvider::GetTooltipForCommand(sSlotStr, aProperties, mxFrame); - rEntry.first->insert(i, nullptr, nullptr, &aSlotImage, nullptr); + rEntry.first->insert(i, nullptr, &sSlotStr, &aSlotImage, nullptr); rEntry.first->set_item_accessible_name(i, sLabel); rEntry.first->set_item_tooltip_text(i, sLabel); } rEntry.first->connect_item_activated(LINK(this, DefaultShapesPanel, ShapeActivatedHdl)); + m_aShapesViews.push_back(rEntry.first); } } -DefaultShapesPanel::~DefaultShapesPanel() -{ - m_aShapesViewsMap.clear(); -} +DefaultShapesPanel::~DefaultShapesPanel() { m_aShapesViews.clear(); } IMPL_LINK(DefaultShapesPanel, ShapeActivatedHdl, const weld::TreeIter&, rIter, bool) { const weld::ItemView& rActiveItemView = rIter.getItemView(); - for (const auto& rEntry : m_aShapesViewsMap) + for (weld::IconView* pView : m_aShapesViews) { - if (&rActiveItemView == rEntry.first) - { - const int nActivatedIndex = rActiveItemView.get_iter_index_in_parent(rIter); - assert(nActivatedIndex >= 0 - && o3tl::make_unsigned(nActivatedIndex) < rEntry.second.size() - && "Invalid index"); - comphelper::dispatchCommand(rEntry.second.at(nActivatedIndex), {}); - } + if (&rActiveItemView == pView) + comphelper::dispatchCommand(rActiveItemView.get_id(rIter), {}); else - { - rEntry.first->unselect_all(); - } + pView->unselect_all(); } return true; From 4893aa3f227875f575b22f8418031bf9d3f3a04f Mon Sep 17 00:00:00 2001 From: Michael Weghorn Date: Tue, 6 Oct 2026 09:53:21 +0200 Subject: [PATCH 243/289] cui: Merge SvxCaptionTabPage::FillValueSet into ctor Merge the logic into the only caller, the SvxCaptionTabPage ctor, which already directly inserts items into the ValueSet as well. Change-Id: Iab3264c8f4679eea9e6d3538e64c81704fbcb026 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211874 Tested-by: Jenkins Reviewed-by: Michael Weghorn --- cui/source/inc/labdlg.hxx | 2 -- cui/source/tabpages/labdlg.cxx | 11 +++-------- 2 files changed, 3 insertions(+), 10 deletions(-) diff --git a/cui/source/inc/labdlg.hxx b/cui/source/inc/labdlg.hxx index ca70d48dc082..0a6c23c632af 100644 --- a/cui/source/inc/labdlg.hxx +++ b/cui/source/inc/labdlg.hxx @@ -92,8 +92,6 @@ public: void Construct(); void SetView( const SdrView* pSdrView ) { pView = pSdrView; } - - void FillValueSet(); }; // class SvxCaptionTabDialog --------------------------------------------- diff --git a/cui/source/tabpages/labdlg.cxx b/cui/source/tabpages/labdlg.cxx index 6786183dd78c..4cb0d31bad1d 100644 --- a/cui/source/tabpages/labdlg.cxx +++ b/cui/source/tabpages/labdlg.cxx @@ -123,7 +123,9 @@ SvxCaptionTabPage::SvxCaptionTabPage(weld::Container* pPage, weld::DialogControl m_xCT_CAPTTYPE->InsertItem(BMP_CAPTTYPE_2, aImage, aLineTypes[1]); m_xCT_CAPTTYPE->InsertItem(BMP_CAPTTYPE_3, aImage, aLineTypes[2]); - FillValueSet(); + m_xCT_CAPTTYPE->SetItemImage(BMP_CAPTTYPE_1, m_aBmpCapTypes[0]); + m_xCT_CAPTTYPE->SetItemImage(BMP_CAPTTYPE_2, m_aBmpCapTypes[1]); + m_xCT_CAPTTYPE->SetItemImage(BMP_CAPTTYPE_3, m_aBmpCapTypes[2]); m_xLB_EXTENSION->connect_changed(LINK(this, SvxCaptionTabPage, ExtensionSelectHdl_Impl)); m_xLB_POSITION->connect_changed(LINK(this, SvxCaptionTabPage, PositionSelectHdl_Impl)); @@ -449,13 +451,6 @@ void SvxCaptionTabPage::SetupType_Impl( SdrCaptionType nType ) } } -void SvxCaptionTabPage::FillValueSet() -{ - m_xCT_CAPTTYPE->SetItemImage(BMP_CAPTTYPE_1, m_aBmpCapTypes[0] ); - m_xCT_CAPTTYPE->SetItemImage(BMP_CAPTTYPE_2, m_aBmpCapTypes[1] ); - m_xCT_CAPTTYPE->SetItemImage(BMP_CAPTTYPE_3, m_aBmpCapTypes[2] ); -} - SvxCaptionTabDialog::SvxCaptionTabDialog(weld::Window* pParent, const SdrView* pSdrView, SvxAnchorIds nAnchorTypes) : SfxTabDialogController(pParent, u"cui/ui/calloutdialog.ui"_ustr, u"CalloutDialog"_ustr) From 0b69ad05834949eb06578f83c62bb5eb06397757 Mon Sep 17 00:00:00 2001 From: Michael Weghorn Date: Tue, 6 Oct 2026 09:58:08 +0200 Subject: [PATCH 244/289] cui: Drop SvxCaptionTabPage::m_aBmpCapTypes only used in ctor There's no need to store the images in an array. Just create the images when inserting them into the ValueSet instead. Change-Id: I44506a80e461c7e3abfa2b8e059bd71757f1a731 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211875 Tested-by: Jenkins Reviewed-by: Michael Weghorn --- cui/source/inc/labdlg.hxx | 4 ---- cui/source/tabpages/labdlg.cxx | 11 +++-------- 2 files changed, 3 insertions(+), 12 deletions(-) diff --git a/cui/source/inc/labdlg.hxx b/cui/source/inc/labdlg.hxx index 0a6c23c632af..a67f2a45264a 100644 --- a/cui/source/inc/labdlg.hxx +++ b/cui/source/inc/labdlg.hxx @@ -33,15 +33,11 @@ class SdrView; // class SvxCaptionTabPage ----------------------------------------------- -const sal_uInt16 CAPTYPE_BITMAPS_COUNT = 3; - class SvxCaptionTabPage : public SfxTabPage { private: static const WhichRangesContainer pCaptionRanges; - Image m_aBmpCapTypes[CAPTYPE_BITMAPS_COUNT]; - std::vector m_aStrHorzList; std::vector m_aStrVertList; diff --git a/cui/source/tabpages/labdlg.cxx b/cui/source/tabpages/labdlg.cxx index 4cb0d31bad1d..df7c06a98231 100644 --- a/cui/source/tabpages/labdlg.cxx +++ b/cui/source/tabpages/labdlg.cxx @@ -107,11 +107,6 @@ SvxCaptionTabPage::SvxCaptionTabPage(weld::Container* pPage, weld::DialogControl for (int i = 0; i < 3; ++i) aLineTypes.push_back(m_xLineTypes->get_text(i)); - static_assert(CAPTYPE_BITMAPS_COUNT == 3, "unexpected"); - m_aBmpCapTypes[0] = Image(StockImage::Yes, RID_SVXBMP_LEGTYP1); - m_aBmpCapTypes[1] = Image(StockImage::Yes, RID_SVXBMP_LEGTYP2); - m_aBmpCapTypes[2] = Image(StockImage::Yes, RID_SVXBMP_LEGTYP3); - //------------install ValueSet-------------------------- m_xCT_CAPTTYPE->SetStyle( m_xCT_CAPTTYPE->GetStyle() | WB_ITEMBORDER | WB_DOUBLEBORDER | WB_NAMEFIELD ); m_xCT_CAPTTYPE->SetColCount(5);//XXX @@ -123,9 +118,9 @@ SvxCaptionTabPage::SvxCaptionTabPage(weld::Container* pPage, weld::DialogControl m_xCT_CAPTTYPE->InsertItem(BMP_CAPTTYPE_2, aImage, aLineTypes[1]); m_xCT_CAPTTYPE->InsertItem(BMP_CAPTTYPE_3, aImage, aLineTypes[2]); - m_xCT_CAPTTYPE->SetItemImage(BMP_CAPTTYPE_1, m_aBmpCapTypes[0]); - m_xCT_CAPTTYPE->SetItemImage(BMP_CAPTTYPE_2, m_aBmpCapTypes[1]); - m_xCT_CAPTTYPE->SetItemImage(BMP_CAPTTYPE_3, m_aBmpCapTypes[2]); + m_xCT_CAPTTYPE->SetItemImage(BMP_CAPTTYPE_1, Image(StockImage::Yes, RID_SVXBMP_LEGTYP1)); + m_xCT_CAPTTYPE->SetItemImage(BMP_CAPTTYPE_2, Image(StockImage::Yes, RID_SVXBMP_LEGTYP2)); + m_xCT_CAPTTYPE->SetItemImage(BMP_CAPTTYPE_3, Image(StockImage::Yes, RID_SVXBMP_LEGTYP3)); m_xLB_EXTENSION->connect_changed(LINK(this, SvxCaptionTabPage, ExtensionSelectHdl_Impl)); m_xLB_POSITION->connect_changed(LINK(this, SvxCaptionTabPage, PositionSelectHdl_Impl)); From a6aede6c5f59e680581ce54d02758c8235befa71 Mon Sep 17 00:00:00 2001 From: Michael Weghorn Date: Tue, 6 Oct 2026 10:12:01 +0200 Subject: [PATCH 245/289] cui: Add missing weld::ComboBox include in labdlg.hxx Without this, Qt Creator shows this error: labdlg.hxx:60:27: No member named 'ComboBox' in namespace 'weld' (fix available) Change-Id: Ica26b748976c0f034c490c92a16b1d393191529e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211876 Tested-by: Jenkins Reviewed-by: Michael Weghorn --- cui/source/inc/labdlg.hxx | 1 + 1 file changed, 1 insertion(+) diff --git a/cui/source/inc/labdlg.hxx b/cui/source/inc/labdlg.hxx index a67f2a45264a..55cb3d5b600d 100644 --- a/cui/source/inc/labdlg.hxx +++ b/cui/source/inc/labdlg.hxx @@ -25,6 +25,7 @@ #include #include #include +#include #include #include #include From 3281774c958d20fc51d58662033a0f4c069d64c0 Mon Sep 17 00:00:00 2001 From: Michael Weghorn Date: Tue, 6 Oct 2026 10:19:43 +0200 Subject: [PATCH 246/289] cui: Resave calloutpage.ui with glade 3.40 This UI file is used for the "Callout" tab page that can be triggered like this: * start Draw * make sure the "Text" toolbar is enabled in "View" -> "Toolbars" -> "Text" * in that "Text" toolbar, select the "Callouts" shape and insert it into the document * right-click on the newly inserted shape to open the context menu * activate the "Position and Size" menu entry * switch to the "Callout" tab Change-Id: I93118b94d5e7f63322df88ff1e6057cdc9b10ecc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211877 Tested-by: Jenkins Reviewed-by: Michael Weghorn --- cui/uiconfig/ui/calloutpage.ui | 192 ++++++++++++++++----------------- 1 file changed, 96 insertions(+), 96 deletions(-) diff --git a/cui/uiconfig/ui/calloutpage.ui b/cui/uiconfig/ui/calloutpage.ui index f0f82114a97b..b34015771d29 100644 --- a/cui/uiconfig/ui/calloutpage.ui +++ b/cui/uiconfig/ui/calloutpage.ui @@ -1,44 +1,44 @@ - + 2400 - 0.5 - 10 + 0.5 + 10 2400 - 0.5 - 10 + 0.5 + 10 2400 - 0.5 - 10 + 0.5 + 10 True - False - 6 + False + 6 vertical 12 True - True + True start - never - never - in + never + never + in True - False + False True - True + True GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_KEY_PRESS_MASK | GDK_KEY_RELEASE_MASK | GDK_STRUCTURE_MASK @@ -57,36 +57,36 @@ - + True - False - 6 - 18 + False + 6 + 18 - + True - False - 12 + False + 12 True - False + False _Extension: - True - extension + True + extension 0 - 0 - 0 + 0 + 0 True - False + False Optimal From top @@ -101,31 +101,31 @@ - 1 - 0 + 1 + 0 - 0 - 1 + 0 + 1 - + True - False - 12 + False + 12 True - True - True + True + True 0.00 + True adjustment1 2 - True Enter the length of the callout line segment that extends from the callout box to the inflection point of the line. @@ -133,38 +133,38 @@ - 1 - 0 + 1 + 0 True - False + False _Length: - True - length + True + length 0 - 0 - 0 + 0 + 0 - 0 - 2 + 0 + 2 _Optimal True - True - False - True - True + True + False + True + True Click here to display a single-angled line in an optimal way. @@ -172,49 +172,49 @@ - 1 - 2 + 1 + 2 - + True - False - 6 - 12 + False + 6 + 12 True - False + False _Position: - True - position + True + position 0 - 0 - 0 + 0 + 0 True - False + False _By: - True - by + True + by 0 - 0 - 1 + 0 + 1 True - False + False Top Middle @@ -230,19 +230,19 @@ - 1 - 0 + 1 + 0 True - True - True + True + True 0.00 + True adjustment2 2 - True Select where you want to extend the callout line from, in relation to the callout box. @@ -250,45 +250,45 @@ - 1 - 1 + 1 + 1 - 1 - 1 + 1 + 1 - + True - False - 12 + False + 12 True - False + False _Spacing: - True - spacing + True + spacing 0 - 0 - 0 + 0 + 0 True - True - True + True + True 0.00 + True adjustment3 2 - True Enter the amount of space that you want to leave between the end of the callout line, and the callout box. @@ -296,20 +296,20 @@ - 1 - 0 + 1 + 0 - 0 - 0 + 0 + 0 - False - True + False + True Straight Line Angled Line @@ -317,8 +317,8 @@ - 1 - 0 + 1 + 0 From e2c6a76dfe46598b4598e7633c12e8317a8347c4 Mon Sep 17 00:00:00 2001 From: Michael Weghorn Date: Tue, 6 Oct 2026 10:26:21 +0200 Subject: [PATCH 247/289] tdf#130857 qt weld: Support Callout dialog This means that native Qt widgets are used for this dialog now when using the qt5 or qt6 VCL plugin and starting LO with environment variable SAL_VCL_QT_USE_WELDED_WIDGETS=1 set. The dialog can be triggered like this: * start Draw * make sure the "Text" toolbar is enabled in "View" -> "Toolbars" -> "Text" * in that "Text" toolbar, select the "Callouts" shape and insert it into the document * right-click on the newly inserted shape to open the context menu * activate the "Position and Size" menu entry Closing the dialog currently triggers an assert, but this is unrelated to this change and e.g. also seen when using the gen vcl plugin and will be addressed separately in an upcoming commit: soffice.bin: /home/michi/development/git/libreoffice/include/vcl/vclptr.hxx:134: VclPtr::~VclPtr() [reference_type = SfxAbstractTabDialog]: Assertion `(!m_rInnerRef.get() || m_rInnerRef->isDisposed() || m_rInnerRef->getRefCount() > 1) && "someone forgot to call dispose()"' failed. Change-Id: I7ba1020dc045d95098ee45b1551f3e641141130b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211878 Reviewed-by: Michael Weghorn Tested-by: Jenkins --- vcl/qt5/QtInstanceBuilder.cxx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/vcl/qt5/QtInstanceBuilder.cxx b/vcl/qt5/QtInstanceBuilder.cxx index 7f3e92f85ce4..668dd49a1e09 100644 --- a/vcl/qt5/QtInstanceBuilder.cxx +++ b/vcl/qt5/QtInstanceBuilder.cxx @@ -70,6 +70,7 @@ constexpr auto SUPPORTED_UI_FILES = frozen::make_unordered_set Date: Tue, 6 Oct 2026 10:36:41 +0200 Subject: [PATCH 248/289] sd: Dispose AbstractSvxCaptionDialog Without this in place, the following assert would be triggered when closing the dialog: soffice.bin: /home/michi/development/git/libreoffice/include/vcl/vclptr.hxx:134: VclPtr::~VclPtr() [reference_type = SfxAbstractTabDialog]: Assertion `(!m_rInnerRef.get() || m_rInnerRef->isDisposed() || m_rInnerRef->getRefCount() > 1) && "someone forgot to call dispose()"' failed. Steps to reproduce: * start Draw * make sure the "Text" toolbar is enabled in "View" -> "Toolbars" -> "Text" * in that "Text" toolbar, select the "Callouts" shape and insert it into the document * right-click on the newly inserted shape to open the context menu * activate the "Position and Size" menu entry to open the dialog * press the "OK" button to close the dialog again Change-Id: I2ddf9b6b0997db091ff8bc320ae04fbbfee19415 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211879 Tested-by: Jenkins Reviewed-by: Michael Weghorn --- sd/source/ui/func/futransf.cxx | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/sd/source/ui/func/futransf.cxx b/sd/source/ui/func/futransf.cxx index 0cacbe32c0b2..a3c41f9692bc 100644 --- a/sd/source/ui/func/futransf.cxx +++ b/sd/source/ui/func/futransf.cxx @@ -83,7 +83,6 @@ void FuTransform::DoExecute( SfxRequest& rReq ) SfxItemSet aSet( mpView->GetGeoAttrFromMarked() ); VclPtr pDlg; - bool bWelded = false; SdrObject* pObj = rMarkList.GetMark(0)->GetMarkedSdrObj(); if( rMarkList.GetMarkCount() == 1 && pObj->GetObjInventor() == SdrInventor::Default && @@ -105,7 +104,6 @@ void FuTransform::DoExecute( SfxRequest& rReq ) { SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); pDlg.reset(pFact->CreateSvxTransformTabDialog(mrViewShell.GetFrameWeld(), &aSet, mpView)); - bWelded = true; } assert(pDlg && "there must be a dialog at this point"); @@ -113,7 +111,7 @@ void FuTransform::DoExecute( SfxRequest& rReq ) auto xRequest = std::make_shared(rReq); rReq.Ignore(); // the 'old' request is not relevant any more - pDlg->StartExecuteAsync([bWelded, pDlg, xRequest=std::move(xRequest), this](sal_Int32 nResult){ + pDlg->StartExecuteAsync([pDlg, xRequest=std::move(xRequest), this](sal_Int32 nResult){ if (nResult == RET_OK) { xRequest->Done(*(pDlg->GetOutputItemSet())); @@ -124,8 +122,7 @@ void FuTransform::DoExecute( SfxRequest& rReq ) // deferred until the dialog ends mrViewShell.Invalidate(SID_RULER_OBJECT); mrViewShell.Cancel(); - if (bWelded) - pDlg->disposeOnce(); + pDlg->disposeOnce(); }); } From 5bf5c6e453d11719582fd6b6d253e870a68acb4a Mon Sep 17 00:00:00 2001 From: Michael Weghorn Date: Tue, 6 Oct 2026 10:44:29 +0200 Subject: [PATCH 249/289] cui: Insert actual images right away in SvxCaptionTabPage ctor Instead of first inserting entries with a dummy image and then setting the actual images using ValueSet::SetItemImage, just insert the actual images when inserting the entries right away. Change-Id: I24b3e2a3a1e86a72eb99755c31602ac96845c9e8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211880 Reviewed-by: Michael Weghorn Tested-by: Jenkins --- cui/source/tabpages/labdlg.cxx | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/cui/source/tabpages/labdlg.cxx b/cui/source/tabpages/labdlg.cxx index df7c06a98231..eaf27041648f 100644 --- a/cui/source/tabpages/labdlg.cxx +++ b/cui/source/tabpages/labdlg.cxx @@ -113,14 +113,9 @@ SvxCaptionTabPage::SvxCaptionTabPage(weld::Container* pPage, weld::DialogControl m_xCT_CAPTTYPE->SetLineCount(1); m_xCT_CAPTTYPE->SetSelectHdl(LINK( this, SvxCaptionTabPage, SelectCaptTypeHdl_Impl)); - Image aImage; - m_xCT_CAPTTYPE->InsertItem(BMP_CAPTTYPE_1, aImage, aLineTypes[0]); - m_xCT_CAPTTYPE->InsertItem(BMP_CAPTTYPE_2, aImage, aLineTypes[1]); - m_xCT_CAPTTYPE->InsertItem(BMP_CAPTTYPE_3, aImage, aLineTypes[2]); - - m_xCT_CAPTTYPE->SetItemImage(BMP_CAPTTYPE_1, Image(StockImage::Yes, RID_SVXBMP_LEGTYP1)); - m_xCT_CAPTTYPE->SetItemImage(BMP_CAPTTYPE_2, Image(StockImage::Yes, RID_SVXBMP_LEGTYP2)); - m_xCT_CAPTTYPE->SetItemImage(BMP_CAPTTYPE_3, Image(StockImage::Yes, RID_SVXBMP_LEGTYP3)); + m_xCT_CAPTTYPE->InsertItem(BMP_CAPTTYPE_1, Image(StockImage::Yes, RID_SVXBMP_LEGTYP1), aLineTypes[0]); + m_xCT_CAPTTYPE->InsertItem(BMP_CAPTTYPE_2, Image(StockImage::Yes, RID_SVXBMP_LEGTYP2), aLineTypes[1]); + m_xCT_CAPTTYPE->InsertItem(BMP_CAPTTYPE_3, Image(StockImage::Yes, RID_SVXBMP_LEGTYP3), aLineTypes[2]); m_xLB_EXTENSION->connect_changed(LINK(this, SvxCaptionTabPage, ExtensionSelectHdl_Impl)); m_xLB_POSITION->connect_changed(LINK(this, SvxCaptionTabPage, PositionSelectHdl_Impl)); From e68422786ab4dc02f380cbda431bc305e0432809 Mon Sep 17 00:00:00 2001 From: Michael Weghorn Date: Tue, 6 Oct 2026 11:40:43 +0200 Subject: [PATCH 250/289] Drop unused ValueSet forward declarations Drop ValueSet forward declarations from headers not actually using the class. Forward-declare the class in cui/source/inc/numpages.hxx which actually uses it, but didn't forward-declare it or include the header yet, but previously got the forward-declaration from an included header. Change-Id: I8876ad47eb362f581aa41ee4a61a85c4093a1dd0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211881 Reviewed-by: Michael Weghorn Tested-by: Jenkins --- chart2/source/controller/dialogs/tp_ChartType.hxx | 2 -- cui/source/inc/numpages.hxx | 1 + include/svtools/ctrlbox.hxx | 2 -- include/svx/sidebar/LineWidthPopup.hxx | 2 -- 4 files changed, 1 insertion(+), 6 deletions(-) diff --git a/chart2/source/controller/dialogs/tp_ChartType.hxx b/chart2/source/controller/dialogs/tp_ChartType.hxx index 1d90c3a89b18..8a6e95b6b203 100644 --- a/chart2/source/controller/dialogs/tp_ChartType.hxx +++ b/chart2/source/controller/dialogs/tp_ChartType.hxx @@ -35,8 +35,6 @@ class ItemView; class TreeIter; } -class ValueSet; - namespace chart { diff --git a/cui/source/inc/numpages.hxx b/cui/source/inc/numpages.hxx index a2af733f6d23..ee504be855b4 100644 --- a/cui/source/inc/numpages.hxx +++ b/cui/source/inc/numpages.hxx @@ -46,6 +46,7 @@ class ColorListBox; class SvxNumValueSet; class SvxNumRule; class SvxBmpNumValueSet; +class ValueSet; struct ImplSVEvent; struct SvxNumSettings_Impl diff --git a/include/svtools/ctrlbox.hxx b/include/svtools/ctrlbox.hxx index 651817568b10..a629d79a954d 100644 --- a/include/svtools/ctrlbox.hxx +++ b/include/svtools/ctrlbox.hxx @@ -209,8 +209,6 @@ inline Color sameDistColor( Color /*rMain*/, Color rDefault ) return rDefault; } -class ValueSet; - class SVT_DLLPUBLIC SvtLineListBox final : public WeldToolbarPopup { public: diff --git a/include/svx/sidebar/LineWidthPopup.hxx b/include/svx/sidebar/LineWidthPopup.hxx index 524790ed2780..32be0a9be081 100644 --- a/include/svx/sidebar/LineWidthPopup.hxx +++ b/include/svx/sidebar/LineWidthPopup.hxx @@ -26,8 +26,6 @@ #include #include -class ValueSet; - namespace svx::sidebar { class LinePropertyPanelBase; From 373ff268bbd4bc6adce0ccee2b2306a96eadca88 Mon Sep 17 00:00:00 2001 From: Michael Weghorn Date: Tue, 6 Oct 2026 11:48:21 +0200 Subject: [PATCH 251/289] cui: Port Callout tab page from ValueSet to weld::IconView Port the widget to select the connector type using a ValueSet widget to using weld::IconView. This helps to be more consistent with other platform/toolkit widgets and reduces custom widget logic. Adjust indices used to account for the fact that weld::IconView indices are 0-based while the ValueSet ones are 1-based. Increase the item padding in the .ui file to 18 to use more space for the individual items, to be more similar to the previous ValueSet implementation. The tab page can be triggered like this: * start Draw * make sure the "Text" toolbar is enabled in "View" -> "Toolbars" -> "Text" * in that "Text" toolbar, select the "Callouts" shape and insert it into the document * right-click on the newly inserted shape to open the context menu * activate the "Position and Size" menu entry * switch to the "Callout" tab Change-Id: I1c23a305322105608d0152bcd0b0fa195be14eff Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211882 Tested-by: Jenkins Reviewed-by: Michael Weghorn --- cui/source/inc/labdlg.hxx | 7 ++--- cui/source/tabpages/labdlg.cxx | 50 ++++++++++++++++------------------ cui/uiconfig/ui/calloutpage.ui | 42 +++++++++++++--------------- 3 files changed, 46 insertions(+), 53 deletions(-) diff --git a/cui/source/inc/labdlg.hxx b/cui/source/inc/labdlg.hxx index 55cb3d5b600d..6d4d13883c89 100644 --- a/cui/source/inc/labdlg.hxx +++ b/cui/source/inc/labdlg.hxx @@ -18,7 +18,6 @@ */ #pragma once -#include #include #include #include @@ -26,6 +25,7 @@ #include #include #include +#include #include #include #include @@ -67,15 +67,14 @@ private: std::unique_ptr m_xFT_LENGTHFT; std::unique_ptr m_xMF_LENGTH; std::unique_ptr m_xCB_OPTIMAL; - std::unique_ptr m_xCT_CAPTTYPE; - std::unique_ptr m_xCT_CAPTTYPEWin; + std::unique_ptr m_xCT_CAPTTYPE; void SetupExtension_Impl( sal_uInt16 nType ); void SetupType_Impl( SdrCaptionType nType ); DECL_LINK(ExtensionSelectHdl_Impl, weld::ComboBox&, void); DECL_LINK(PositionSelectHdl_Impl, weld::ComboBox&, void); DECL_LINK(LineOptHdl_Impl, weld::Toggleable&, void); - DECL_LINK(SelectCaptTypeHdl_Impl, ValueSet*, void); + DECL_LINK(CaptionTypeActivatedHdl, const weld::TreeIter&, bool); public: SvxCaptionTabPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rInAttrs); diff --git a/cui/source/tabpages/labdlg.cxx b/cui/source/tabpages/labdlg.cxx index eaf27041648f..1a9bc9a182d0 100644 --- a/cui/source/tabpages/labdlg.cxx +++ b/cui/source/tabpages/labdlg.cxx @@ -36,7 +36,6 @@ #include #include -#include // define ---------------------------------------------------------------- @@ -50,9 +49,9 @@ #define POS_MIDDLE 1 #define POS_BOTTOM 2 -#define BMP_CAPTTYPE_1 1 -#define BMP_CAPTTYPE_2 2 -#define BMP_CAPTTYPE_3 3 +#define BMP_CAPTTYPE_1 0 +#define BMP_CAPTTYPE_2 1 +#define BMP_CAPTTYPE_3 2 // static ---------------------------------------------------------------- @@ -88,12 +87,8 @@ SvxCaptionTabPage::SvxCaptionTabPage(weld::Container* pPage, weld::DialogControl , m_xFT_LENGTHFT(m_xBuilder->weld_label(u"lengthft"_ustr)) , m_xMF_LENGTH(m_xBuilder->weld_metric_spin_button(u"length"_ustr, FieldUnit::MM)) , m_xCB_OPTIMAL(m_xBuilder->weld_check_button(u"optimal"_ustr)) - , m_xCT_CAPTTYPE(new ValueSet(m_xBuilder->weld_scrolled_window(u"valuesetwin"_ustr, true))) - , m_xCT_CAPTTYPEWin(new weld::CustomWeld(*m_xBuilder, u"valueset"_ustr, *m_xCT_CAPTTYPE)) + , m_xCT_CAPTTYPE(m_xBuilder->weld_icon_view("iconview")) { - Size aSize(m_xCT_CAPTTYPE->GetDrawingArea()->get_ref_device().LogicToPixel(Size(187, 38), MapMode(MapUnit::MapAppFont))); - m_xCT_CAPTTYPEWin->set_size_request(aSize.Width(), aSize.Height()); - assert(m_xLB_POSITION->get_count() == 6); for (int i = 0; i < 3; ++i) m_aStrHorzList.push_back(m_xLB_POSITION->get_text(i)); @@ -107,26 +102,27 @@ SvxCaptionTabPage::SvxCaptionTabPage(weld::Container* pPage, weld::DialogControl for (int i = 0; i < 3; ++i) aLineTypes.push_back(m_xLineTypes->get_text(i)); - //------------install ValueSet-------------------------- - m_xCT_CAPTTYPE->SetStyle( m_xCT_CAPTTYPE->GetStyle() | WB_ITEMBORDER | WB_DOUBLEBORDER | WB_NAMEFIELD ); - m_xCT_CAPTTYPE->SetColCount(5);//XXX - m_xCT_CAPTTYPE->SetLineCount(1); - m_xCT_CAPTTYPE->SetSelectHdl(LINK( this, SvxCaptionTabPage, SelectCaptTypeHdl_Impl)); + m_xCT_CAPTTYPE->connect_item_activated(LINK(this, SvxCaptionTabPage, CaptionTypeActivatedHdl)); - m_xCT_CAPTTYPE->InsertItem(BMP_CAPTTYPE_1, Image(StockImage::Yes, RID_SVXBMP_LEGTYP1), aLineTypes[0]); - m_xCT_CAPTTYPE->InsertItem(BMP_CAPTTYPE_2, Image(StockImage::Yes, RID_SVXBMP_LEGTYP2), aLineTypes[1]); - m_xCT_CAPTTYPE->InsertItem(BMP_CAPTTYPE_3, Image(StockImage::Yes, RID_SVXBMP_LEGTYP3), aLineTypes[2]); + const Bitmap aBitmapCaptionType1 = Image(StockImage::Yes, RID_SVXBMP_LEGTYP1).GetBitmap(); + m_xCT_CAPTTYPE->insert(BMP_CAPTTYPE_1, nullptr, nullptr, &aBitmapCaptionType1, nullptr); + m_xCT_CAPTTYPE->set_item_accessible_name(BMP_CAPTTYPE_1, aLineTypes[0]); + m_xCT_CAPTTYPE->set_item_tooltip_text(BMP_CAPTTYPE_1, aLineTypes[0]); + const Bitmap aBitmapCaptionType2 = Image(StockImage::Yes, RID_SVXBMP_LEGTYP2).GetBitmap(); + m_xCT_CAPTTYPE->insert(BMP_CAPTTYPE_2, nullptr, nullptr, &aBitmapCaptionType2, nullptr); + m_xCT_CAPTTYPE->set_item_accessible_name(BMP_CAPTTYPE_2, aLineTypes[1]); + m_xCT_CAPTTYPE->set_item_tooltip_text(BMP_CAPTTYPE_2, aLineTypes[1]); + const Bitmap aBitmapCaptionType3 = Image(StockImage::Yes, RID_SVXBMP_LEGTYP3).GetBitmap(); + m_xCT_CAPTTYPE->insert(BMP_CAPTTYPE_3, nullptr, nullptr, &aBitmapCaptionType3, nullptr); + m_xCT_CAPTTYPE->set_item_accessible_name(BMP_CAPTTYPE_3, aLineTypes[2]); + m_xCT_CAPTTYPE->set_item_tooltip_text(BMP_CAPTTYPE_3, aLineTypes[2]); m_xLB_EXTENSION->connect_changed(LINK(this, SvxCaptionTabPage, ExtensionSelectHdl_Impl)); m_xLB_POSITION->connect_changed(LINK(this, SvxCaptionTabPage, PositionSelectHdl_Impl)); m_xCB_OPTIMAL->connect_toggled(LINK(this, SvxCaptionTabPage, LineOptHdl_Impl)); } -SvxCaptionTabPage::~SvxCaptionTabPage() -{ - m_xCT_CAPTTYPEWin.reset(); - m_xCT_CAPTTYPE.reset(); -} +SvxCaptionTabPage::~SvxCaptionTabPage() { m_xCT_CAPTTYPE.reset(); } void SvxCaptionTabPage::Construct() { @@ -141,7 +137,7 @@ bool SvxCaptionTabPage::FillItemSet( SfxItemSet* _rOutAttrs) MapUnit eUnit; - nCaptionType = static_cast(m_xCT_CAPTTYPE->GetSelectedItemId()-1); + nCaptionType = static_cast(m_xCT_CAPTTYPE->get_selected_index()); _rOutAttrs->Put( SdrCaptionTypeItem( nCaptionType ) ); @@ -318,7 +314,7 @@ void SvxCaptionTabPage::Reset( const SfxItemSet* ) m_xLB_EXTENSION->set_active(nExtension); SetupExtension_Impl( nExtension ); - m_xCT_CAPTTYPE->SelectItem( static_cast(nCaptionType)+1 ); // Enum starts at 0! + m_xCT_CAPTTYPE->select(static_cast(nCaptionType)); SetupType_Impl( nCaptionType ); } @@ -417,9 +413,11 @@ IMPL_LINK( SvxCaptionTabPage, LineOptHdl_Impl, weld::Toggleable&, rButton, void } } -IMPL_LINK_NOARG(SvxCaptionTabPage, SelectCaptTypeHdl_Impl, ValueSet*, void) +IMPL_LINK(SvxCaptionTabPage, CaptionTypeActivatedHdl, const weld::TreeIter&, rIter, bool) { - SetupType_Impl( static_cast(m_xCT_CAPTTYPE->GetSelectedItemId()) ); + SetupType_Impl( + static_cast(m_xCT_CAPTTYPE->get_iter_index_in_parent(rIter) + 1)); + return true; } void SvxCaptionTabPage::SetupType_Impl( SdrCaptionType nType ) diff --git a/cui/uiconfig/ui/calloutpage.ui b/cui/uiconfig/ui/calloutpage.ui index b34015771d29..acda83de8d7f 100644 --- a/cui/uiconfig/ui/calloutpage.ui +++ b/cui/uiconfig/ui/calloutpage.ui @@ -17,6 +17,16 @@ 0.5 10 + + + + + + + + + + True False @@ -24,31 +34,17 @@ vertical 12 - + True True - start - never - never - in - - - True - False - - - True - True - GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_KEY_PRESS_MASK | GDK_KEY_RELEASE_MASK | GDK_STRUCTURE_MASK - - - Click the Callout style that you want to apply to the selected callout. - - - - - - + 6 + iconview_model + 3 + 0 + 0 + 0 + 2 + 18 False From a0e94744f05943fa298c77f6e9d441ec290d8c5a Mon Sep 17 00:00:00 2001 From: Michael Weghorn Date: Tue, 6 Oct 2026 11:59:12 +0200 Subject: [PATCH 252/289] tdf#130857 Define widgets in "Callout" tab page in order Switch the order in which the widgets in the .ui file are defined so that the order better matches the visual appearance and logical order, which makes sure that tab focus order with the Qt-based VCL plugins is correct as well when using native Qt widgets (SAL_VCL_QT_USE_WELDED_WIDGETS=1), where focus order is (by default) based on widget creation order. See commit 02692566ad9fc7c3484f8581ffa0004cd4e43987 Author: Michael Weghorn Date: Thu Oct 24 17:43:35 2024 +0200 tdf#130857 optnewdictionarydialog.ui: Define focusable widgets in order for more background. The tab page can be triggered like this: * start Draw * make sure the "Text" toolbar is enabled in "View" -> "Toolbars" -> "Text" * in that "Text" toolbar, select the "Callouts" shape and insert it into the document * right-click on the newly inserted shape to open the context menu * activate the "Position and Size" menu entry * switch to the "Callout" tab The Python script mentioned in the commit message of commit 327679b2fb96b70797a61ff07ddd8d8b3f3a2606 Author: Michael Weghorn Date: Wed Jul 8 15:50:59 2026 +0200 tdf#130857 Define widgets in Calc "General" options page in order was used to reorder the GtkGrid children automatically. Change-Id: Ice8f6b318f57411bea553311faf45b40cb098b44 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211883 Tested-by: Jenkins Reviewed-by: Michael Weghorn --- cui/uiconfig/ui/calloutpage.ui | 394 ++++++++++++++++----------------- 1 file changed, 197 insertions(+), 197 deletions(-) diff --git a/cui/uiconfig/ui/calloutpage.ui b/cui/uiconfig/ui/calloutpage.ui index acda83de8d7f..919bb1198b3b 100644 --- a/cui/uiconfig/ui/calloutpage.ui +++ b/cui/uiconfig/ui/calloutpage.ui @@ -59,203 +59,6 @@ False 6 18 - - - - True - False - 12 - - - True - False - _Extension: - True - extension - 0 - - - 0 - 0 - - - - - True - False - - Optimal - From top - From left - Horizontal - Vertical - - - - Select where you want to extend the callout line from, in relation to the callout box. - - - - - 1 - 0 - - - - - 0 - 1 - - - - - - True - False - 12 - - - True - True - True - 0.00 - True - adjustment1 - 2 - - - Enter the length of the callout line segment that extends from the callout box to the inflection point of the line. - - - - - 1 - 0 - - - - - True - False - _Length: - True - length - 0 - - - 0 - 0 - - - - - 0 - 2 - - - - - _Optimal - True - True - False - True - True - - - Click here to display a single-angled line in an optimal way. - - - - - 1 - 2 - - - - - - True - False - 6 - 12 - - - True - False - _Position: - True - position - 0 - - - 0 - 0 - - - - - True - False - _By: - True - by - 0 - - - 0 - 1 - - - - - True - False - - Top - Middle - Bottom - Left - Center - Right - - - - Select where you want to extend the callout line from, in relation to the callout box. - - - - - 1 - 0 - - - - - True - True - True - 0.00 - True - adjustment2 - 2 - - - Select where you want to extend the callout line from, in relation to the callout box. - - - - - 1 - 1 - - - - - 1 - 1 - - @@ -317,6 +120,203 @@ 0 + + + + True + False + 12 + + + True + False + _Extension: + True + extension + 0 + + + 0 + 0 + + + + + True + False + + Optimal + From top + From left + Horizontal + Vertical + + + + Select where you want to extend the callout line from, in relation to the callout box. + + + + + 1 + 0 + + + + + 0 + 1 + + + + + + True + False + 6 + 12 + + + True + False + _Position: + True + position + 0 + + + 0 + 0 + + + + + True + False + + Top + Middle + Bottom + Left + Center + Right + + + + Select where you want to extend the callout line from, in relation to the callout box. + + + + + 1 + 0 + + + + + True + False + _By: + True + by + 0 + + + 0 + 1 + + + + + True + True + True + 0.00 + True + adjustment2 + 2 + + + Select where you want to extend the callout line from, in relation to the callout box. + + + + + 1 + 1 + + + + + 1 + 1 + + + + + + True + False + 12 + + + True + False + _Length: + True + length + 0 + + + 0 + 0 + + + + + True + True + True + 0.00 + True + adjustment1 + 2 + + + Enter the length of the callout line segment that extends from the callout box to the inflection point of the line. + + + + + 1 + 0 + + + + + 0 + 2 + + + + + _Optimal + True + True + False + True + True + + + Click here to display a single-angled line in an optimal way. + + + + + 1 + 2 + + False From e0d0f4ca38e305ae2b3090aa95f3fbb02da713e7 Mon Sep 17 00:00:00 2001 From: Michael Weghorn Date: Tue, 6 Oct 2026 12:11:50 +0200 Subject: [PATCH 253/289] svtools: Drop unnecessary write to local var The value of `n` is only used in the first branch. Reduce the variable scope to that one. Addresses this warning shown in Qt Creator: /home/michi/development/git/libreoffice/svtools/source/control/valueset.cxx:1522:8: Value stored to 'n' is never read [clang-analyzer-deadcode.DeadStores] Change-Id: Ib6e74fb35152c1d6098274e1fd5a9a60253b4900 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211897 Tested-by: Jenkins Reviewed-by: Michael Weghorn --- svtools/source/control/valueset.cxx | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/svtools/source/control/valueset.cxx b/svtools/source/control/valueset.cxx index d2e3f09d8184..abe8375deb10 100644 --- a/svtools/source/control/valueset.cxx +++ b/svtools/source/control/valueset.cxx @@ -1506,10 +1506,10 @@ Size ValueSet::CalcWindowSizePixel( const Size& rItemSize, sal_uInt16 nDesireCol Size aSize( rItemSize.Width() * nCalcCols, rItemSize.Height() * nCalcLines ); WinBits nStyle = GetStyle(); tools::Long nTxtHeight = GetTextHeight(); - tools::Long n; if ( nStyle & WB_ITEMBORDER ) { + tools::Long n; if ( nStyle & WB_DOUBLEBORDER ) n = ITEM_OFFSET_DOUBLE; else @@ -1518,8 +1518,6 @@ Size ValueSet::CalcWindowSizePixel( const Size& rItemSize, sal_uInt16 nDesireCol aSize.AdjustWidth(n * nCalcCols ); aSize.AdjustHeight(n * nCalcLines ); } - else - n = 0; if ( mnSpacing ) { From 0e206454b13efa8248dd3338a6eb0b0fe70bfffb Mon Sep 17 00:00:00 2001 From: Michael Weghorn Date: Tue, 6 Oct 2026 12:15:49 +0200 Subject: [PATCH 254/289] svtools: Drop now unused WB_NAMEFIELD logic from ValueSet The last case where that style flag was set was ported away from ValueSet to use weld::IconView instead in earlier commit Change-Id: I1c23a305322105608d0152bcd0b0fa195be14eff Author: Michael Weghorn Date: Tue Oct 6 11:48:21 2026 +0200 cui: Port Callout tab page from ValueSet to weld::IconView Therefore, drop the logic in ValueSet handling that flag, to simplify the code. This also means that the `pItem` param for ValueSet::ImplDrawSelect is now unused, so drop that one, too. Change-Id: I0150e699602a625874e5a09b8df38110f52c0c03 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211898 Tested-by: Jenkins Reviewed-by: Michael Weghorn --- include/svtools/valueset.hxx | 12 ++-- svtools/source/control/valueset.cxx | 83 ++---------------------- svx/source/tbxctrls/SvxColorValueSet.cxx | 2 +- 3 files changed, 11 insertions(+), 86 deletions(-) diff --git a/include/svtools/valueset.hxx b/include/svtools/valueset.hxx index c8242963a490..a4480bb99cfb 100644 --- a/include/svtools/valueset.hxx +++ b/include/svtools/valueset.hxx @@ -74,8 +74,6 @@ WB_DOUBLEBORDER Items will be bordered twice. Additionally WB_ITEMBORDER effect. It is needed if there are items with a white background, since otherwise the 3D effect wouldn't be recognizable. -WB_NAMEFIELD There is a namefield, where the name of an item will be - shown. WB_VSCROLL A scrollbar will be always shown. The visible number of lines have to be specified with SetLineCount() if this flag is set. @@ -164,7 +162,6 @@ to be set (before Show) with SetStyle(). #define WB_ITEMBORDER (WinBits(0x00010000)) #define WB_DOUBLEBORDER (WinBits(0x00020000)) -#define WB_NAMEFIELD (WinBits(0x00040000)) #define WB_FLATVALUESET (WinBits(0x02000000)) #define WB_NO_DIRECTSELECT (WinBits(0x04000000)) #define WB_MENUSTYLEVALUESET (WinBits(0x08000000)) @@ -218,14 +215,13 @@ private: SVT_DLLPRIVATE void ImplDeleteItems(); SVT_DLLPRIVATE void ImplFormatItem(vcl::RenderContext const& rRenderContext, ValueSetItem& rItem, tools::Rectangle aRect); - SVT_DLLPRIVATE void ImplDrawItemText(vcl::RenderContext& rRenderContext, const OUString& rStr); // nItemId is the item to draw selected, but if nothing is selected something else may be drawn as selected instead, the item to draw // selected is returned SVT_DLLPRIVATE ValueSetItem* ImplGetDrawSelectItem(sal_uInt16 nItemId, const bool bFocus, tools::Rectangle& rRect); - SVT_DLLPRIVATE void ImplDrawSelect(vcl::RenderContext& rRenderContext, - const tools::Rectangle& rRect, const ValueSetItem* pItem, - const bool bFocus, const bool bDrawSel, - const bool bSelected, const bool bHover); + SVT_DLLPRIVATE void ImplDrawSelect(vcl::RenderContext& rRenderContext, + const tools::Rectangle& rRect, const bool bFocus, + const bool bDrawSel, const bool bSelected, + const bool bHover); SVT_DLLPRIVATE void ImplDrawSelect(vcl::RenderContext& rRenderContext); SVT_DLLPRIVATE void ImplHighlightItem(sal_uInt16 nItemId); SVT_DLLPRIVATE void ImplDraw(vcl::RenderContext& rRenderContext); diff --git a/svtools/source/control/valueset.cxx b/svtools/source/control/valueset.cxx index abe8375deb10..649fcb626c4f 100644 --- a/svtools/source/control/valueset.cxx +++ b/svtools/source/control/valueset.cxx @@ -635,29 +635,6 @@ void ValueSet::ImplDraw(vcl::RenderContext& rRenderContext) rRenderContext.DrawOutDev(aDefPos, aSize, aDefPos, aSize, *maVirDev); - // draw parting line to the Namefield - if (GetStyle() & WB_NAMEFIELD) - { - if (!(GetStyle() & WB_FLATVALUESET)) - { - const StyleSettings& rStyleSettings = Application::GetSettings().GetStyleSettings(); - Size aWinSize(GetOutputSizePixel()); - Point aPos1(NAME_LINE_OFF_X, mnTextOffset + NAME_LINE_OFF_Y); - Point aPos2(aWinSize.Width() - (NAME_LINE_OFF_X * 2), mnTextOffset + NAME_LINE_OFF_Y); - if (!(rStyleSettings.GetOptions() & StyleSettingsOptions::Mono)) - { - rRenderContext.SetLineColor(rStyleSettings.GetShadowColor()); - rRenderContext.DrawLine(aPos1, aPos2); - aPos1.AdjustY( 1 ); - aPos2.AdjustY( 1 ); - rRenderContext.SetLineColor(rStyleSettings.GetLightColor()); - } - else - rRenderContext.SetLineColor(rStyleSettings.GetWindowTextColor()); - rRenderContext.DrawLine(aPos1, aPos2); - } - } - ImplDrawSelect(rRenderContext); } @@ -803,7 +780,6 @@ void ValueSet::Format(vcl::RenderContext const & rRenderContext) Size aWinSize(GetOutputSizePixel()); size_t nItemCount = mItemList.size(); WinBits nStyle = GetStyle(); - tools::Long nTxtHeight = rRenderContext.GetTextHeight(); if (mxScrolledWindow && !(nStyle & WB_VSCROLL) && mxScrolledWindow->get_vpolicy() != VclPolicyType::NEVER) TurnOffScrollBar(); @@ -814,20 +790,7 @@ void ValueSet::Format(vcl::RenderContext const & rRenderContext) aWinSize.AdjustHeight(-mnMargin * 2); } - // consider size, if NameField does exist - if (nStyle & WB_NAMEFIELD) - { - mnTextOffset = aWinSize.Height() - nTxtHeight - NAME_OFFSET; - aWinSize.AdjustHeight( -(nTxtHeight + NAME_OFFSET) ); - - if (!(nStyle & WB_FLATVALUESET)) - { - mnTextOffset -= NAME_LINE_HEIGHT + NAME_LINE_OFF_Y; - aWinSize.AdjustHeight( -(NAME_LINE_HEIGHT + NAME_LINE_OFF_Y) ); - } - } - else - mnTextOffset = 0; + mnTextOffset = 0; mnTextOffset += mnMargin; @@ -1079,7 +1042,7 @@ void ValueSet::ImplDrawSelect(vcl::RenderContext& rRenderContext) if (pSelectedItem) { const bool bHover = pSelectedItem == pHighlightItem; - ImplDrawSelect(rRenderContext, aSelectedRect, pSelectedItem, bFocus, !mbNoSelection, true, bHover); + ImplDrawSelect(rRenderContext, aSelectedRect, bFocus, !mbNoSelection, true, bHover); } if (pHighlightItem && (pSelectedItem != pHighlightItem || mbNoSelection)) { @@ -1097,7 +1060,7 @@ void ValueSet::ImplDrawSelect(vcl::RenderContext& rRenderContext) else bDrawFocus = pSelectedItem == pHighlightItem && mbNoSelection; - ImplDrawSelect(rRenderContext, aHoverRect, pHighlightItem, bDrawFocus, mbHighlight, false, true); + ImplDrawSelect(rRenderContext, aHoverRect, bDrawFocus, mbHighlight, false, true); } } @@ -1117,10 +1080,9 @@ ValueSetItem* ValueSet::ImplGetDrawSelectItem(sal_uInt16 nItemId, const bool bFo return pItem; } -void ValueSet::ImplDrawSelect(vcl::RenderContext& rRenderContext, - const tools::Rectangle& rRect, const ValueSetItem* pItem, - const bool bFocus, const bool bDrawSel, - const bool bSelected, const bool bHover) +void ValueSet::ImplDrawSelect(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect, + const bool bFocus, const bool bDrawSel, const bool bSelected, + const bool bHover) { tools::Rectangle aRect(rRect); @@ -1259,8 +1221,6 @@ void ValueSet::ImplDrawSelect(vcl::RenderContext& rRenderContext, if (bFocus) InvertFocusRect(rRenderContext, aFocusRect); } - - ImplDrawItemText(rRenderContext, pItem->maText); } void ValueSet::ImplFormatItem(vcl::RenderContext const& rRenderContext, ValueSetItem& rItem, @@ -1378,29 +1338,6 @@ void ValueSet::ImplFormatItem(vcl::RenderContext const& rRenderContext, ValueSet } } -void ValueSet::ImplDrawItemText(vcl::RenderContext& rRenderContext, const OUString& rText) -{ - if (!(GetStyle() & WB_NAMEFIELD)) - return; - - Size aWinSize(GetOutputSizePixel()); - tools::Long nTxtWidth = rRenderContext.GetTextWidth(rText); - tools::Long nTxtOffset = mnTextOffset; - - auto popIt = rRenderContext.ScopedPush(vcl::PushFlags::TEXTCOLOR); - - // delete rectangle and show text - const bool bFlat(GetStyle() & WB_FLATVALUESET); - if (!bFlat) - nTxtOffset += NAME_LINE_HEIGHT+NAME_LINE_OFF_Y; - - rRenderContext.SetTextColor(Application::GetSettings().GetStyleSettings().GetButtonTextColor()); - // tdf#153787 highlighted entry text is drawn in the same Paint as the selected text, so can - // overwrite already rendered text - rRenderContext.Erase(tools::Rectangle(Point(0, nTxtOffset), Point(aWinSize.Width(), aWinSize.Height()))); - rRenderContext.DrawText(Point((aWinSize.Width() - nTxtWidth) / 2, nTxtOffset + (NAME_OFFSET / 2)), rText); -} - void ValueSet::StyleUpdated() { mbFormat = true; @@ -1505,7 +1442,6 @@ Size ValueSet::CalcWindowSizePixel( const Size& rItemSize, sal_uInt16 nDesireCol Size aSize( rItemSize.Width() * nCalcCols, rItemSize.Height() * nCalcLines ); WinBits nStyle = GetStyle(); - tools::Long nTxtHeight = GetTextHeight(); if ( nStyle & WB_ITEMBORDER ) { @@ -1525,13 +1461,6 @@ Size ValueSet::CalcWindowSizePixel( const Size& rItemSize, sal_uInt16 nDesireCol aSize.AdjustHeight(mnSpacing * (nCalcLines - 1) ); } - if ( nStyle & WB_NAMEFIELD ) - { - aSize.AdjustHeight(nTxtHeight + NAME_OFFSET ); - if ( !(nStyle & WB_FLATVALUESET) ) - aSize.AdjustHeight(NAME_LINE_HEIGHT + NAME_LINE_OFF_Y ); - } - if ( mnMargin ) { aSize.AdjustWidth(mnMargin * 2); diff --git a/svx/source/tbxctrls/SvxColorValueSet.cxx b/svx/source/tbxctrls/SvxColorValueSet.cxx index c15d73262789..848041947877 100644 --- a/svx/source/tbxctrls/SvxColorValueSet.cxx +++ b/svx/source/tbxctrls/SvxColorValueSet.cxx @@ -62,7 +62,7 @@ void SvxColorValueSet::layoutToGivenHeight(sal_uInt32 nHeight, sal_uInt32 nEntry const WinBits aWinBits(GetStyle() & ~WB_VSCROLL); // get size with all fields disabled - const WinBits aWinBitsNoScrollNoFields(GetStyle() & ~(WB_VSCROLL | WB_NAMEFIELD)); + const WinBits aWinBitsNoScrollNoFields(GetStyle() & ~WB_VSCROLL); SetStyle(aWinBitsNoScrollNoFields); const Size aSizeNoScrollNoFields(CalcWindowSizePixel(aItemSize, SvxColorValueSet::getColumnCount())); From a91d44317af45314044a6dec65468f682fa276b6 Mon Sep 17 00:00:00 2001 From: Michael Weghorn Date: Tue, 6 Oct 2026 12:22:07 +0200 Subject: [PATCH 255/289] svtools: Drop ValueSetItem::mnTextOffset After Change-Id: I0150e699602a625874e5a09b8df38110f52c0c03 Author: Michael Weghorn Date: Tue Oct 6 12:15:49 2026 +0200 svtools: Drop now unused WB_NAMEFIELD logic from ValueSet , that member is only written to, but never read, so drop it completely. Change-Id: I974183e725e3c530162152debd29bbf207b21b6b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211899 Tested-by: Jenkins Reviewed-by: Michael Weghorn --- include/svtools/valueset.hxx | 1 - svtools/source/control/valueset.cxx | 5 ----- 2 files changed, 6 deletions(-) diff --git a/include/svtools/valueset.hxx b/include/svtools/valueset.hxx index a4480bb99cfb..df28168c88a7 100644 --- a/include/svtools/valueset.hxx +++ b/include/svtools/valueset.hxx @@ -179,7 +179,6 @@ private: tools::Rectangle maItemListRect; tools::Long mnItemWidth; tools::Long mnItemHeight; - tools::Long mnTextOffset; tools::Long mnVisLines; tools::Long mnLines; tools::Long mnUserItemWidth; diff --git a/svtools/source/control/valueset.cxx b/svtools/source/control/valueset.cxx index 649fcb626c4f..091b57fd1518 100644 --- a/svtools/source/control/valueset.cxx +++ b/svtools/source/control/valueset.cxx @@ -85,7 +85,6 @@ ValueSet::ValueSet(std::unique_ptr pScrolledWindow) { mnItemWidth = 0; mnItemHeight = 0; - mnTextOffset = 0; mnVisLines = 0; mnLines = 0; mnUserItemWidth = 0; @@ -790,10 +789,6 @@ void ValueSet::Format(vcl::RenderContext const & rRenderContext) aWinSize.AdjustHeight(-mnMargin * 2); } - mnTextOffset = 0; - - mnTextOffset += mnMargin; - // calculate number of columns if (!mnUserCols) { From f3df5034a919eb878d1977d17ed1a8c06b293b96 Mon Sep 17 00:00:00 2001 From: Michael Weghorn Date: Tue, 6 Oct 2026 13:05:07 +0200 Subject: [PATCH 256/289] svx: Resave extrustiondepthdialog.ui with glade 3.40 The dialog can be triggered like this: * open attachment 175894 from tdf#145296 * make sure the "3D-Settings" toolbar is enabled in "View" -> "Toolbars" -> "3D-Settings" * select the extruded shape * press the "Depth" button in the "3D-Settings" toolbar and select "Custom" Change-Id: Ia7da2d663569f733451a692a0a6201cc19b5fe9f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211900 Tested-by: Jenkins Reviewed-by: Michael Weghorn --- svx/uiconfig/ui/extrustiondepthdialog.ui | 81 ++++++++++++------------ 1 file changed, 39 insertions(+), 42 deletions(-) diff --git a/svx/uiconfig/ui/extrustiondepthdialog.ui b/svx/uiconfig/ui/extrustiondepthdialog.ui index 084c98c74a09..90681dd5f9da 100644 --- a/svx/uiconfig/ui/extrustiondepthdialog.ui +++ b/svx/uiconfig/ui/extrustiondepthdialog.ui @@ -1,37 +1,37 @@ - + 338.666 - 0.1 - 1 + 0.10 + 1 - False - 6 + False + 6 Extrusion Depth True - 0 - 0 - dialog + 0 + 0 + dialog - False + False vertical 12 - False - end + False + end _OK True - True - True - True - True + True + True + True + True True @@ -44,8 +44,8 @@ _Cancel True - True - True + True + True True @@ -58,8 +58,8 @@ _Help True - True - True + True + True True @@ -73,53 +73,53 @@ False True - end + end 0 True - False + False True True - 0 - none + 0 + none - + True - False - True - True - 12 + False 12 6 + True + True + 12 True - True - True - adjustment1 + True + True True + adjustment1 2 - 1 - 0 + 1 + 0 True - False + False _Value - True - depth + True + depth - 0 - 0 + 0 + 0 @@ -127,7 +127,7 @@ True - False + False Depth @@ -148,9 +148,6 @@ cancel help - - - Enter an extrusion depth. From 8fc8feaae776daba7098fcfdde21c0a06d9cfe93 Mon Sep 17 00:00:00 2001 From: Michael Weghorn Date: Tue, 6 Oct 2026 13:11:53 +0200 Subject: [PATCH 257/289] tdf#130857 qt weld: Support "Extrusion Depth" dialog This means that native Qt widgets are used for this dialog now when using the qt5 or qt6 VCL plugin and starting LO with environment variable SAL_VCL_QT_USE_WELDED_WIDGETS=1 set. The dialog can be triggered like this: * open attachment 175894 from tdf#145296 * make sure the "3D-Settings" toolbar is enabled in "View" -> "Toolbars" -> "3D-Settings" * select the extruded shape * press the "Depth" button in the "3D-Settings" toolbar and select "Custom" Change-Id: I4f1e43e20bac5525d3c24fdaa85c83f978460b0b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211901 Reviewed-by: Michael Weghorn Tested-by: Jenkins --- vcl/qt5/QtInstanceBuilder.cxx | 1 + 1 file changed, 1 insertion(+) diff --git a/vcl/qt5/QtInstanceBuilder.cxx b/vcl/qt5/QtInstanceBuilder.cxx index 668dd49a1e09..e9fe00b224e3 100644 --- a/vcl/qt5/QtInstanceBuilder.cxx +++ b/vcl/qt5/QtInstanceBuilder.cxx @@ -392,6 +392,7 @@ constexpr auto SUPPORTED_UI_FILES = frozen::make_unordered_set Date: Tue, 6 Oct 2026 13:56:47 +0200 Subject: [PATCH 258/289] svx: Resave lightingwindow.ui with glade 3.40 The popup can be triggered like this: * open attachment 175894 from tdf#145296 * make sure the "3D-Settings" toolbar is enabled in "View" -> "Toolbars" -> "3D-Settings" * select the extruded shape * press the "Lighting" button in the "3D-Settings" toolbar Change-Id: I195d1d7973b12541c7296433324b67a19dcd8021 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211902 Tested-by: Jenkins Reviewed-by: Michael Weghorn --- svx/uiconfig/ui/lightingwindow.ui | 70 +++++++++++++++---------------- 1 file changed, 35 insertions(+), 35 deletions(-) diff --git a/svx/uiconfig/ui/lightingwindow.ui b/svx/uiconfig/ui/lightingwindow.ui index f53e5979b64c..5daa97319d0e 100644 --- a/svx/uiconfig/ui/lightingwindow.ui +++ b/svx/uiconfig/ui/lightingwindow.ui @@ -1,45 +1,50 @@ - + True - False - svx/res/brightlit_16.png + False + svx/res/brightlit_16.png True - False - svx/res/normallit_16.png + False + svx/res/normallit_16.png + + + True + False + svx/res/dimlit_16.png - False - True - 4 + False + True + 4 none True - False + False vertical 6 True - True + True True True - never - never - in + never + never + in True - False + False True - True + True GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_KEY_PRESS_MASK | GDK_KEY_RELEASE_MASK | GDK_STRUCTURE_MASK True True @@ -58,13 +63,13 @@ _Bright True - True - False + True + False image1 - True - True + True + True True - True + True False @@ -76,12 +81,12 @@ _Normal True - True - False + True + False image2 - True - True - True + True + True + True bright @@ -94,12 +99,12 @@ _Dim True - True - False + True + False image3 - True - True - True + True + True + True bright @@ -111,9 +116,4 @@ - - True - False - svx/res/dimlit_16.png - From 0bf31b7f4cd7909c87f84909f34137d406ac5e76 Mon Sep 17 00:00:00 2001 From: Michael Weghorn Date: Tue, 6 Oct 2026 15:01:52 +0200 Subject: [PATCH 259/289] svx: Port ExtrusionLightingWindow from ValueSet to weld::IconView Port the widget to select the lighting from using a ValueSet widget to using weld::IconView. This helps to be more consistent with other platform/toolkit widgets and reduces custom widget logic. Adjust indices used to account for the fact that weld::IconView indices are 0-based while the ValueSet ones are 1-based. The popup can be triggered like this: * open attachment 175894 from tdf#145296 * make sure the "3D-Settings" toolbar is enabled in "View" -> "Toolbars" -> "3D-Settings" * select the extruded shape * press the "Lighting" button in the "3D-Settings" toolbar Change-Id: I28d86251b70149574535dc7b583660dbe42e9a0d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211903 Tested-by: Jenkins Reviewed-by: Michael Weghorn --- svx/source/tbxctrls/extrusioncontrols.cxx | 76 ++++++++++------------- svx/source/tbxctrls/extrusioncontrols.hxx | 13 ++-- svx/uiconfig/ui/lightingwindow.ui | 41 ++++++------ 3 files changed, 61 insertions(+), 69 deletions(-) diff --git a/svx/source/tbxctrls/extrusioncontrols.cxx b/svx/source/tbxctrls/extrusioncontrols.cxx index c3845119d7ae..1d7cbc64f994 100644 --- a/svx/source/tbxctrls/extrusioncontrols.cxx +++ b/svx/source/tbxctrls/extrusioncontrols.cxx @@ -22,6 +22,7 @@ #include #include #include +#include #include #include #include @@ -594,44 +595,38 @@ ExtrusionLightingWindow::ExtrusionLightingWindow(svt::PopupWindowController* pCo weld::Widget* pParent) : WeldToolbarPopup(pControl->getFrameInterface(), pParent, u"svx/ui/lightingwindow.ui"_ustr, u"LightingWindow"_ustr) , mxControl(pControl) - , mxLightingSet(new ValueSet(nullptr)) - , mxLightingSetWin(new weld::CustomWeld(*m_xBuilder, u"valueset"_ustr, *mxLightingSet)) + , mxLightingIconView(m_xBuilder->weld_icon_view(u"iconview"_ustr)) , mxBright(m_xBuilder->weld_radio_button(u"bright"_ustr)) , mxNormal(m_xBuilder->weld_radio_button(u"normal"_ustr)) , mxDim(m_xBuilder->weld_radio_button(u"dim"_ustr)) { - mxLightingSet->SetStyle(WB_TABSTOP | WB_MENUSTYLEVALUESET | WB_FLATVALUESET | WB_NOBORDER | WB_NO_DIRECTSELECT); - for (sal_uInt16 i = FROM_TOP_LEFT; i <= FROM_BOTTOM_RIGHT; ++i) { if( i != FROM_FRONT ) { - maImgLightingOff[i] = Image(StockImage::Yes, aLightOffBmps[i]); - maImgLightingOn[i] = Image(StockImage::Yes, aLightOnBmps[i]); + maImgLightingOff[i] = Image(StockImage::Yes, aLightOffBmps[i]).GetBitmap(); + maImgLightingOn[i] = Image(StockImage::Yes, aLightOnBmps[i]).GetBitmap(); } - maImgLightingPreview[i] = Image(StockImage::Yes, aLightPreviewBmps[i]); + maImgLightingPreview[i] = Image(StockImage::Yes, aLightPreviewBmps[i]).GetBitmap(); } - mxLightingSet->SetHelpId( HID_VALUESET_EXTRUSION_LIGHTING ); + mxLightingIconView->set_help_id(HID_VALUESET_EXTRUSION_LIGHTING); - mxLightingSet->SetSelectHdl( LINK( this, ExtrusionLightingWindow, SelectValueSetHdl ) ); - mxLightingSet->SetColCount( 3 ); - mxLightingSet->EnableFullItemMode( false ); + mxLightingIconView->connect_item_activated( + LINK(this, ExtrusionLightingWindow, IconViewItemActivatedHdl)); - for (sal_uInt16 i = FROM_TOP_LEFT; i <= FROM_BOTTOM_RIGHT; ++i) + for (int i = FROM_TOP_LEFT; i <= FROM_BOTTOM_RIGHT; ++i) { if( i != FROM_FRONT ) { - mxLightingSet->InsertItem( i+1, maImgLightingOff[i] ); + mxLightingIconView->insert(i, nullptr, nullptr, &maImgLightingOff[i], nullptr); } else { - mxLightingSet->InsertItem( 5, maImgLightingPreview[FROM_FRONT] ); + mxLightingIconView->insert(4, nullptr, nullptr, &maImgLightingPreview[FROM_FRONT], + nullptr); } } - Size aSize(72, 72); - mxLightingSet->GetDrawingArea()->set_size_request(aSize.Width(), aSize.Height()); - mxLightingSet->SetOutputSizePixel(aSize); mxBright->connect_toggled(LINK(this, ExtrusionLightingWindow, SelectToolbarMenuHdl)); mxNormal->connect_toggled(LINK(this, ExtrusionLightingWindow, SelectToolbarMenuHdl)); @@ -641,10 +636,7 @@ ExtrusionLightingWindow::ExtrusionLightingWindow(svt::PopupWindowController* pCo AddStatusListener( g_sExtrusionLightingIntensity ); } -void ExtrusionLightingWindow::GrabFocus() -{ - mxLightingSet->GrabFocus(); -} +void ExtrusionLightingWindow::GrabFocus() { mxLightingIconView->grab_focus(); } ExtrusionLightingWindow::~ExtrusionLightingWindow() { @@ -665,26 +657,28 @@ void ExtrusionLightingWindow::implSetDirection( int nDirection, bool bEnabled ) if( !bEnabled ) nDirection = FROM_FRONT; - sal_uInt16 nItemId; - for( nItemId = FROM_TOP_LEFT; nItemId <= FROM_BOTTOM_RIGHT; nItemId++ ) + for (int nItemIndex = FROM_TOP_LEFT; nItemIndex <= FROM_BOTTOM_RIGHT; nItemIndex++) { - if( nItemId == FROM_FRONT ) + ScopedVclPtr pDev = VclPtr::Create(); + if (nItemIndex == FROM_FRONT) { - mxLightingSet->SetItemImage( nItemId + 1, maImgLightingPreview[ nDirection ] ); + pDev->SetOutputSizePixel(maImgLightingPreview[nDirection].GetSizePixel()); + pDev->DrawBitmap(Point(), maImgLightingPreview[nDirection]); } else { - mxLightingSet->SetItemImage( - nItemId + 1, - static_cast(nDirection) == nItemId ? maImgLightingOn[nItemId] : maImgLightingOff[nItemId] - ); + const Bitmap& rBitmap = nDirection == nItemIndex ? maImgLightingOn[nItemIndex] + : maImgLightingOff[nItemIndex]; + pDev->SetOutputSizePixel(rBitmap.GetSizePixel()); + pDev->DrawBitmap(Point(), rBitmap); } + mxLightingIconView->set_image(nItemIndex, *pDev); } if (bEnabled) - mxLightingSet->Enable(); + mxLightingIconView->set_sensitive(true); else - mxLightingSet->Disable(); + mxLightingIconView->set_sensitive(false); } void ExtrusionLightingWindow::statusChanged( @@ -719,23 +713,21 @@ void ExtrusionLightingWindow::statusChanged( } } -IMPL_LINK_NOARG(ExtrusionLightingWindow, SelectValueSetHdl, ValueSet*, void) +IMPL_LINK(ExtrusionLightingWindow, IconViewItemActivatedHdl, const weld::TreeIter&, rIter, bool) { - sal_Int32 nDirection = mxLightingSet->GetSelectedItemId(); + sal_Int32 nDirection = mxLightingIconView->get_iter_index_in_parent(rIter); + assert(nDirection >= 0 && nDirection < 9 && "Invalid index"); - if( (nDirection > 0) && (nDirection < 10) ) - { - nDirection--; + Sequence aArgs{ comphelper::makePropertyValue( + g_sExtrusionLightingDirection.copy(5), nDirection) }; - Sequence< PropertyValue > aArgs{ comphelper::makePropertyValue( - g_sExtrusionLightingDirection.copy(5), nDirection) }; + mxControl->dispatchCommand(g_sExtrusionLightingDirection, aArgs); - mxControl->dispatchCommand( g_sExtrusionLightingDirection, aArgs ); - - implSetDirection( nDirection, true ); - } + implSetDirection(nDirection, true); mxControl->EndPopupMode(); + + return true; } IMPL_LINK(ExtrusionLightingWindow, SelectToolbarMenuHdl, weld::Toggleable&, rButton, void) diff --git a/svx/source/tbxctrls/extrusioncontrols.hxx b/svx/source/tbxctrls/extrusioncontrols.hxx index 60cfc0663b97..760469bab569 100644 --- a/svx/source/tbxctrls/extrusioncontrols.hxx +++ b/svx/source/tbxctrls/extrusioncontrols.hxx @@ -23,6 +23,7 @@ #include #include #include +#include #include #include @@ -143,21 +144,21 @@ class ExtrusionLightingWindow final : public WeldToolbarPopup { private: rtl::Reference mxControl; - std::unique_ptr mxLightingSet; - std::unique_ptr mxLightingSetWin; + std::unique_ptr mxLightingIconView; std::unique_ptr mxBright; std::unique_ptr mxNormal; std::unique_ptr mxDim; - Image maImgLightingOff[9]; - Image maImgLightingOn[9]; - Image maImgLightingPreview[9]; + Bitmap maImgLightingOff[9]; + Bitmap maImgLightingOn[9]; + Bitmap maImgLightingPreview[9]; void implSetIntensity( int nLevel, bool bEnabled ); void implSetDirection( int nDirection, bool bEnabled ); DECL_LINK( SelectToolbarMenuHdl, weld::Toggleable&, void ); - DECL_LINK( SelectValueSetHdl, ValueSet*, void ); + DECL_LINK(IconViewItemActivatedHdl, const weld::TreeIter&, bool); + public: ExtrusionLightingWindow(svt::PopupWindowController* pControl, weld::Widget* pParentWindow); virtual void GrabFocus() override; diff --git a/svx/uiconfig/ui/lightingwindow.ui b/svx/uiconfig/ui/lightingwindow.ui index 5daa97319d0e..20e46eb11ab3 100644 --- a/svx/uiconfig/ui/lightingwindow.ui +++ b/svx/uiconfig/ui/lightingwindow.ui @@ -2,6 +2,16 @@ + + + + + + + + + + True False @@ -29,29 +39,18 @@ vertical 6 - + True True - True - True - never - never - in - - - True - False - - - True - True - GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_KEY_PRESS_MASK | GDK_KEY_RELEASE_MASK | GDK_STRUCTURE_MASK - True - True - - - - + 6 + iconview_model + 3 + 0 + 0 + 0 + 2 + 3 + True False From 9ad54fe80e7a029e969730b44193307e8ee94614 Mon Sep 17 00:00:00 2001 From: Michael Weghorn Date: Tue, 6 Oct 2026 15:04:00 +0200 Subject: [PATCH 260/289] svtools: Drop now unused ValueSet::SetItemImage The last caller of that method was ported from ValueSet to weld::IconView in previous commit Change-Id: I28d86251b70149574535dc7b583660dbe42e9a0d Author: Michael Weghorn Date: Tue Oct 6 15:01:52 2026 +0200 svx: Port ExtrusionLightingWindow from ValueSet to weld::IconView Change-Id: I232f3767268a4fde206515f2a6d92e35c664ccd1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211904 Reviewed-by: Michael Weghorn Tested-by: Jenkins --- include/svtools/valueset.hxx | 1 - svtools/source/control/valueset.cxx | 20 -------------------- 2 files changed, 21 deletions(-) diff --git a/include/svtools/valueset.hxx b/include/svtools/valueset.hxx index df28168c88a7..41709da40644 100644 --- a/include/svtools/valueset.hxx +++ b/include/svtools/valueset.hxx @@ -331,7 +331,6 @@ public: return mbNoSelection; } - void SetItemImage( sal_uInt16 nItemId, const Image& rImage ); Image GetItemImage( sal_uInt16 nItemId ) const; void SetItemColor( sal_uInt16 nItemId, const Color& rColor ); Color GetItemColor( sal_uInt16 nItemId ) const; diff --git a/svtools/source/control/valueset.cxx b/svtools/source/control/valueset.cxx index 091b57fd1518..1fa3899e9134 100644 --- a/svtools/source/control/valueset.cxx +++ b/svtools/source/control/valueset.cxx @@ -1353,26 +1353,6 @@ void ValueSet::SetColCount( sal_uInt16 nNewCols ) } } -void ValueSet::SetItemImage( sal_uInt16 nItemId, const Image& rImage ) -{ - size_t nPos = GetItemPos( nItemId ); - - if ( nPos == VALUESET_ITEM_NOTFOUND ) - return; - - ValueSetItem* pItem = mItemList[nPos].get(); - pItem->meType = ValueSetItemType::Image; - pItem->maImage = rImage; - - if (!mbFormat && IsReallyVisible()) - { - const tools::Rectangle aRect = ImplGetItemRect(nPos); - Invalidate(aRect); - } - else - mbFormat = true; -} - void ValueSet::SetItemColor( sal_uInt16 nItemId, const Color& rColor ) { size_t nPos = GetItemPos( nItemId ); From b08518a14a58adbbce3f02fd5898ba59bf5f049a Mon Sep 17 00:00:00 2001 From: Michael Weghorn Date: Tue, 6 Oct 2026 15:15:19 +0200 Subject: [PATCH 261/289] svx: Drop ExtrusionDirectionWindow::maImgDirection only used in ctor No need to store the images in a class member as they're only used once in the ctor when inserting items into the ValueSet. Just use a local variable and create the images in the existing loop that inserts the items. Change-Id: Ifa6722a88f97aac35e1b3c17ee9db7606c1ef001 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211905 Reviewed-by: Michael Weghorn Tested-by: Jenkins --- svx/source/tbxctrls/extrusioncontrols.cxx | 8 ++------ svx/source/tbxctrls/extrusioncontrols.hxx | 2 -- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/svx/source/tbxctrls/extrusioncontrols.cxx b/svx/source/tbxctrls/extrusioncontrols.cxx index 1d7cbc64f994..e391e6df9237 100644 --- a/svx/source/tbxctrls/extrusioncontrols.cxx +++ b/svx/source/tbxctrls/extrusioncontrols.cxx @@ -127,18 +127,14 @@ ExtrusionDirectionWindow::ExtrusionDirectionWindow( { mxDirectionSet->SetStyle(WB_TABSTOP | WB_MENUSTYLEVALUESET | WB_FLATVALUESET | WB_NOBORDER | WB_NO_DIRECTSELECT); - for (sal_uInt16 i = DIRECTION_NW; i <= DIRECTION_SE; ++i) - { - maImgDirection[i] = Image(StockImage::Yes, aDirectionBmps[i]); - } - mxDirectionSet->SetSelectHdl( LINK( this, ExtrusionDirectionWindow, SelectValueSetHdl ) ); mxDirectionSet->SetColCount( 3 ); mxDirectionSet->EnableFullItemMode( false ); for (sal_uInt16 i = DIRECTION_NW; i <= DIRECTION_SE; ++i) { - mxDirectionSet->InsertItem(i + 1, maImgDirection[i], SvxResId(aDirectionStrs[i])); + const Image aImgDirection(StockImage::Yes, aDirectionBmps[i]); + mxDirectionSet->InsertItem(i + 1, aImgDirection, SvxResId(aDirectionStrs[i])); } Size aSize(72, 72); diff --git a/svx/source/tbxctrls/extrusioncontrols.hxx b/svx/source/tbxctrls/extrusioncontrols.hxx index 760469bab569..a2c04833f755 100644 --- a/svx/source/tbxctrls/extrusioncontrols.hxx +++ b/svx/source/tbxctrls/extrusioncontrols.hxx @@ -66,8 +66,6 @@ private: std::unique_ptr mxPerspective; std::unique_ptr mxParallel; - Image maImgDirection[9]; - DECL_LINK( SelectToolbarMenuHdl, weld::Toggleable&, void ); DECL_LINK( SelectValueSetHdl, ValueSet*, void ); From 8e1c047cf7a630dfb030bff4348aa6fd770391f3 Mon Sep 17 00:00:00 2001 From: Michael Weghorn Date: Tue, 6 Oct 2026 15:25:26 +0200 Subject: [PATCH 262/289] svx: Resave directionwindow.ui with glade 3.40 The popup can be triggered like this: * open attachment 175894 from tdf#145296 * make sure the "3D-Settings" toolbar is enabled in "View" -> "Toolbars" -> "3D-Settings" * select the extruded shape * press the "Direction" button in the "3D-Settings" toolbar Change-Id: If9c59a5d2e1d5232a909a4ad8a9e9e6086149ec5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211906 Reviewed-by: Michael Weghorn Tested-by: Jenkins --- svx/uiconfig/ui/directionwindow.ui | 50 +++++++++++++++--------------- 1 file changed, 25 insertions(+), 25 deletions(-) diff --git a/svx/uiconfig/ui/directionwindow.ui b/svx/uiconfig/ui/directionwindow.ui index c8ce767ba67e..da31e75acbf0 100644 --- a/svx/uiconfig/ui/directionwindow.ui +++ b/svx/uiconfig/ui/directionwindow.ui @@ -1,45 +1,45 @@ - + True - False - svx/res/perspective_16.png + False + svx/res/perspective_16.png True - False - svx/res/parallel_16.png + False + svx/res/parallel_16.png - False - True - 4 + False + True + 4 none True - False + False vertical 6 True - True + True True True - never - never - in + never + never + in True - False + False True - True + True GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_KEY_PRESS_MASK | GDK_KEY_RELEASE_MASK | GDK_STRUCTURE_MASK True True @@ -58,13 +58,13 @@ _Perspective True - True - False + True + False image1 - True - True + True + True True - True + True False @@ -76,12 +76,12 @@ P_arallel True - True - False + True + False image2 - True - True - True + True + True + True perspective From b25df6df3f38b16e5e74f1784c53e553bd396b29 Mon Sep 17 00:00:00 2001 From: Michael Weghorn Date: Tue, 6 Oct 2026 15:34:40 +0200 Subject: [PATCH 263/289] svx: Port ExtrusionDirectionWindow from ValueSet to weld::IconView Port the widget to select the extrusion direction from using a ValueSet widget to using weld::IconView. This helps to be more consistent with other platform/toolkit widgets and reduces custom widget logic. Adjust indices used to account for the fact that weld::IconView indices are 0-based while the ValueSet ones are 1-based. The popup can be triggered like this: * open attachment 175894 from tdf#145296 * make sure the "3D-Settings" toolbar is enabled in "View" -> "Toolbars" -> "3D-Settings" * select the extruded shape * press the "Direction" button in the "3D-Settings" toolbar Change-Id: I045bd1d605b0f5bb5c4ad7eeb3247e50356b39b6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211907 Reviewed-by: Michael Weghorn Tested-by: Jenkins --- svx/source/tbxctrls/extrusioncontrols.cxx | 41 +++++++++-------------- svx/source/tbxctrls/extrusioncontrols.hxx | 8 ++--- svx/uiconfig/ui/directionwindow.ui | 41 +++++++++++------------ 3 files changed, 39 insertions(+), 51 deletions(-) diff --git a/svx/source/tbxctrls/extrusioncontrols.cxx b/svx/source/tbxctrls/extrusioncontrols.cxx index e391e6df9237..2641059f18e9 100644 --- a/svx/source/tbxctrls/extrusioncontrols.cxx +++ b/svx/source/tbxctrls/extrusioncontrols.cxx @@ -120,37 +120,29 @@ ExtrusionDirectionWindow::ExtrusionDirectionWindow( weld::Widget* pParent) : WeldToolbarPopup(pControl->getFrameInterface(), pParent, u"svx/ui/directionwindow.ui"_ustr, u"DirectionWindow"_ustr) , mxControl(pControl) - , mxDirectionSet(new ValueSet(nullptr)) - , mxDirectionSetWin(new weld::CustomWeld(*m_xBuilder, u"valueset"_ustr, *mxDirectionSet)) + , mxDirectionIconView(m_xBuilder->weld_icon_view(u"iconview"_ustr)) , mxPerspective(m_xBuilder->weld_radio_button(u"perspective"_ustr)) , mxParallel(m_xBuilder->weld_radio_button(u"parallel"_ustr)) { - mxDirectionSet->SetStyle(WB_TABSTOP | WB_MENUSTYLEVALUESET | WB_FLATVALUESET | WB_NOBORDER | WB_NO_DIRECTSELECT); - - mxDirectionSet->SetSelectHdl( LINK( this, ExtrusionDirectionWindow, SelectValueSetHdl ) ); - mxDirectionSet->SetColCount( 3 ); - mxDirectionSet->EnableFullItemMode( false ); + mxDirectionIconView->connect_item_activated( + LINK(this, ExtrusionDirectionWindow, IconViewItemActivatedHdl)); for (sal_uInt16 i = DIRECTION_NW; i <= DIRECTION_SE; ++i) { - const Image aImgDirection(StockImage::Yes, aDirectionBmps[i]); - mxDirectionSet->InsertItem(i + 1, aImgDirection, SvxResId(aDirectionStrs[i])); + const Bitmap aImgDirection = Image(StockImage::Yes, aDirectionBmps[i]).GetBitmap(); + mxDirectionIconView->insert(i, nullptr, nullptr, &aImgDirection, nullptr); + const OUString sName = SvxResId(aDirectionStrs[i]); + mxDirectionIconView->set_item_accessible_name(i, sName); + mxDirectionIconView->set_item_tooltip_text(i, sName); } - Size aSize(72, 72); - mxDirectionSet->GetDrawingArea()->set_size_request(aSize.Width(), aSize.Height()); - mxDirectionSet->SetOutputSizePixel(aSize); - mxPerspective->connect_toggled(LINK(this, ExtrusionDirectionWindow, SelectToolbarMenuHdl)); AddStatusListener( g_sExtrusionDirection ); AddStatusListener( g_sExtrusionProjection ); } -void ExtrusionDirectionWindow::GrabFocus() -{ - mxDirectionSet->GrabFocus(); -} +void ExtrusionDirectionWindow::GrabFocus() { mxDirectionIconView->grab_focus(); } ExtrusionDirectionWindow::~ExtrusionDirectionWindow() { @@ -167,17 +159,14 @@ void ExtrusionDirectionWindow::implSetDirection( sal_Int32 nSkew, bool bEnabled if( nItemId <= DIRECTION_SE ) { - mxDirectionSet->SelectItem( nItemId+1 ); + mxDirectionIconView->select(nItemId); } else { - mxDirectionSet->SetNoSelection(); + mxDirectionIconView->unselect_all(); } - if (bEnabled) - mxDirectionSet->Enable(); - else - mxDirectionSet->Disable(); + mxDirectionIconView->set_sensitive(bEnabled); } void ExtrusionDirectionWindow::implSetProjection( sal_Int32 nProjection, bool bEnabled ) @@ -220,15 +209,17 @@ void ExtrusionDirectionWindow::statusChanged( } } -IMPL_LINK_NOARG(ExtrusionDirectionWindow, SelectValueSetHdl, ValueSet*, void) +IMPL_LINK(ExtrusionDirectionWindow, IconViewItemActivatedHdl, const weld::TreeIter&, rIter, bool) { Sequence< PropertyValue > aArgs{ comphelper::makePropertyValue( g_sExtrusionDirection.copy(5), - gSkewList[mxDirectionSet->GetSelectedItemId()-1]) }; + gSkewList[mxDirectionIconView->get_iter_index_in_parent(rIter)]) }; mxControl->dispatchCommand( g_sExtrusionDirection, aArgs ); mxControl->EndPopupMode(); + + return true; } IMPL_LINK_NOARG(ExtrusionDirectionWindow, SelectToolbarMenuHdl, weld::Toggleable&, void) diff --git a/svx/source/tbxctrls/extrusioncontrols.hxx b/svx/source/tbxctrls/extrusioncontrols.hxx index a2c04833f755..a38d1360c35a 100644 --- a/svx/source/tbxctrls/extrusioncontrols.hxx +++ b/svx/source/tbxctrls/extrusioncontrols.hxx @@ -21,11 +21,10 @@ #include #include -#include +#include #include #include #include -#include // enum to index light images #define FROM_TOP_LEFT 0 @@ -61,13 +60,12 @@ public: private: rtl::Reference mxControl; - std::unique_ptr mxDirectionSet; - std::unique_ptr mxDirectionSetWin; + std::unique_ptr mxDirectionIconView; std::unique_ptr mxPerspective; std::unique_ptr mxParallel; DECL_LINK( SelectToolbarMenuHdl, weld::Toggleable&, void ); - DECL_LINK( SelectValueSetHdl, ValueSet*, void ); + DECL_LINK(IconViewItemActivatedHdl, const weld::TreeIter&, bool); void implSetDirection( sal_Int32 nSkew, bool bEnabled ); void implSetProjection( sal_Int32 nProjection, bool bEnabled ); diff --git a/svx/uiconfig/ui/directionwindow.ui b/svx/uiconfig/ui/directionwindow.ui index da31e75acbf0..c9fafc63541a 100644 --- a/svx/uiconfig/ui/directionwindow.ui +++ b/svx/uiconfig/ui/directionwindow.ui @@ -2,6 +2,16 @@ + + + + + + + + + + True False @@ -24,29 +34,18 @@ vertical 6 - + True True - True - True - never - never - in - - - True - False - - - True - True - GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_KEY_PRESS_MASK | GDK_KEY_RELEASE_MASK | GDK_STRUCTURE_MASK - True - True - - - - + 6 + iconview_model + 3 + 0 + 0 + 0 + 2 + 3 + True False From f504ea8b34a5a2a63df6befe80b128af3f877ee1 Mon Sep 17 00:00:00 2001 From: Michael Weghorn Date: Tue, 6 Oct 2026 16:42:27 +0200 Subject: [PATCH 264/289] sd: Port LayoutToolbarMenu from ValueSet to weld::IconView Port the toolbar popup to select the slide layout to use from using two ValueSet widgets to using weld::IconView instead. This helps to be more consistent with other platform/toolkit widgets and reduces custom widget logic. Adjust indices used to account for the fact that weld::IconView indices are 0-based while the ValueSet ones are 1-based. For the particular case here, custom non-continguous item IDs were used for the ValueSet items that correspond to the AutoLayout enum values. Store those custom IDs as the IDs of the weld::IconView items and retrieve the ID again in LayoutToolbarMenu::IconViewItemActivatedHdl. The popup can be triggered like this: * start Impress * in the toolbar, click on the "Slide Layout" button Change-Id: Ib4bf1c611663e8001a6ffcff6bc5ecf393c22277 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211908 Tested-by: Jenkins Reviewed-by: Michael Weghorn --- .../ui/controller/slidelayoutcontroller.cxx | 70 +++++++---------- sd/uiconfig/simpress/ui/layoutwindow.ui | 78 +++++++++---------- 2 files changed, 61 insertions(+), 87 deletions(-) diff --git a/sd/source/ui/controller/slidelayoutcontroller.cxx b/sd/source/ui/controller/slidelayoutcontroller.cxx index f46f53c20c35..845d7d0bfc4f 100644 --- a/sd/source/ui/controller/slidelayoutcontroller.cxx +++ b/sd/source/ui/controller/slidelayoutcontroller.cxx @@ -29,6 +29,7 @@ #include #include #include +#include #include #include #include @@ -36,7 +37,6 @@ #include #include -#include #include @@ -61,24 +61,19 @@ class LayoutToolbarMenu : public WeldToolbarPopup { public: LayoutToolbarMenu(SlideLayoutController* pController, weld::Widget* pParent, const bool bInsertPage, const OUString& rCommand); - virtual void GrabFocus() override - { - mxLayoutSet1->GrabFocus(); - } + virtual void GrabFocus() override { mxLayoutIconView1->grab_focus(); } protected: DECL_LINK(SelectToolbarMenuHdl, weld::Button&, void); - DECL_LINK(SelectValueSetHdl, ValueSet*, void); + DECL_LINK(IconViewItemActivatedHdl, const weld::TreeIter&, bool); void SelectHdl(AutoLayout eLayout); private: rtl::Reference mxControl; bool const mbInsertPage; std::unique_ptr mxFrame1; - std::unique_ptr mxLayoutSet1; - std::unique_ptr mxLayoutSetWin1; + std::unique_ptr mxLayoutIconView1; std::unique_ptr mxFrame2; - std::unique_ptr mxLayoutSet2; - std::unique_ptr mxLayoutSetWin2; + std::unique_ptr mxLayoutIconView2; std::unique_ptr mxMoreButton; }; @@ -137,28 +132,21 @@ constexpr snew_slide_value_info_layout v_standard[] = {EMPTY, {}, AUTOLAYOUT_NONE} }; -static void fillLayoutValueSet( ValueSet* pValue, const snew_slide_value_info_layout* pInfo ) +static void fillLayoutIconView(weld::IconView& rView, const snew_slide_value_info_layout* pInfo) { Size aLayoutItemSize; for( ; pInfo->mpStrResId; pInfo++ ) { OUString aText(SdResId(pInfo->mpStrResId)); - Image aImg(StockImage::Yes, pInfo->msBmpResId); - pValue->InsertItem(static_cast(pInfo->maAutoLayout)+1, aImg, aText); + Bitmap aImg = Image(StockImage::Yes, pInfo->msBmpResId).GetBitmap(); + const int nIndex = rView.n_children(); + const OUString sId = OUString::number(pInfo->maAutoLayout); + rView.insert(nIndex, nullptr, &sId, &aImg, nullptr); + rView.set_item_accessible_name(nIndex, aText); + rView.set_item_tooltip_text(nIndex, aText); aLayoutItemSize.setWidth( std::max( aLayoutItemSize.Width(), aImg.GetSizePixel().Width() ) ); aLayoutItemSize.setHeight( std::max( aLayoutItemSize.Height(), aImg.GetSizePixel().Height() ) ); } - - aLayoutItemSize = pValue->CalcItemSizePixel( aLayoutItemSize ); - Size aSize(pValue->CalcWindowSizePixel(aLayoutItemSize)); - - const sal_Int32 LAYOUT_BORDER_PIX = 7; - - aSize.AdjustWidth((pValue->GetColCount() + 1) * LAYOUT_BORDER_PIX); - aSize.AdjustHeight((pValue->GetLineCount() +1) * LAYOUT_BORDER_PIX); - - pValue->GetDrawingArea()->set_size_request(aSize.Width(), aSize.Height()); - pValue->SetOutputSizePixel(aSize); } LayoutToolbarMenu::LayoutToolbarMenu(SlideLayoutController* pControl, weld::Widget* pParent, const bool bInsertPage, const OUString& rCommand) @@ -166,16 +154,11 @@ LayoutToolbarMenu::LayoutToolbarMenu(SlideLayoutController* pControl, weld::Widg , mxControl(pControl) , mbInsertPage(bInsertPage) , mxFrame1(m_xBuilder->weld_frame(u"horiframe"_ustr)) - , mxLayoutSet1(new ValueSet(nullptr)) - , mxLayoutSetWin1(new weld::CustomWeld(*m_xBuilder, u"valueset1"_ustr, *mxLayoutSet1)) + , mxLayoutIconView1(m_xBuilder->weld_icon_view(u"iconview1"_ustr)) , mxFrame2(m_xBuilder->weld_frame(u"vertframe"_ustr)) - , mxLayoutSet2(new ValueSet(nullptr)) - , mxLayoutSetWin2(new weld::CustomWeld(*m_xBuilder, u"valueset2"_ustr, *mxLayoutSet2)) + , mxLayoutIconView2(m_xBuilder->weld_icon_view(u"iconview2"_ustr)) , mxMoreButton(m_xBuilder->weld_button(u"more"_ustr)) { - mxLayoutSet1->SetStyle(WB_TABSTOP | WB_MENUSTYLEVALUESET | WB_FLATVALUESET | WB_NOBORDER | WB_NO_DIRECTSELECT); - mxLayoutSet2->SetStyle(WB_TABSTOP | WB_MENUSTYLEVALUESET | WB_FLATVALUESET | WB_NOBORDER | WB_NO_DIRECTSELECT); - DrawViewMode eMode = DrawViewMode_DRAW; // find out which view is running @@ -191,21 +174,19 @@ LayoutToolbarMenu::LayoutToolbarMenu(SlideLayoutController* pControl, weld::Widg const bool bVerticalEnabled = SvtCJKOptions::IsVerticalTextEnabled(); - mxLayoutSet1->SetSelectHdl( LINK( this, LayoutToolbarMenu, SelectValueSetHdl ) ); + mxLayoutIconView1->connect_item_activated( + LINK(this, LayoutToolbarMenu, IconViewItemActivatedHdl)); const snew_slide_value_info_layout* pInfo = nullptr; - sal_Int16 nColCount = 4; switch( eMode ) { case DrawViewMode_DRAW: pInfo = &standard[0]; break; - case DrawViewMode_HANDOUT: pInfo = &handout[0]; nColCount = 2; break; - case DrawViewMode_NOTES: pInfo = ¬es[0]; nColCount = 1; break; + case DrawViewMode_HANDOUT: pInfo = &handout[0]; break; + case DrawViewMode_NOTES: pInfo = ¬es[0]; break; default: assert(false); // can't happen, will crash later otherwise } - mxLayoutSet1->SetColCount( nColCount ); - - fillLayoutValueSet( mxLayoutSet1.get(), pInfo ); + fillLayoutIconView(*mxLayoutIconView1, pInfo); bool bUseUILabel = (bVerticalEnabled && eMode == DrawViewMode_DRAW); if (!bUseUILabel) @@ -216,11 +197,10 @@ LayoutToolbarMenu::LayoutToolbarMenu(SlideLayoutController* pControl, weld::Widg if (bVerticalEnabled && eMode == DrawViewMode_DRAW) { - mxLayoutSet2->SetSelectHdl( LINK( this, LayoutToolbarMenu, SelectValueSetHdl ) ); - mxLayoutSet2->SetColCount( 4 ); - mxLayoutSet2->EnableFullItemMode( false ); + mxLayoutIconView2->connect_item_activated( + LINK(this, LayoutToolbarMenu, IconViewItemActivatedHdl)); - fillLayoutValueSet( mxLayoutSet2.get(), &v_standard[0] ); + fillLayoutIconView(*mxLayoutIconView2, &v_standard[0]); mxFrame2->show(); } @@ -255,9 +235,11 @@ LayoutToolbarMenu::LayoutToolbarMenu(SlideLayoutController* pControl, weld::Widg mxMoreButton->show(); } -IMPL_LINK(LayoutToolbarMenu, SelectValueSetHdl, ValueSet*, pLayoutSet, void) +IMPL_LINK(LayoutToolbarMenu, IconViewItemActivatedHdl, const weld::TreeIter&, rIter, bool) { - SelectHdl(static_cast(pLayoutSet->GetSelectedItemId()-1)); + SelectHdl(static_cast(rIter.getItemView().get_id(rIter).toInt32())); + + return true; } IMPL_LINK_NOARG(LayoutToolbarMenu, SelectToolbarMenuHdl, weld::Button&, void) diff --git a/sd/uiconfig/simpress/ui/layoutwindow.ui b/sd/uiconfig/simpress/ui/layoutwindow.ui index 108cf7c92b25..c8324a8bfd34 100644 --- a/sd/uiconfig/simpress/ui/layoutwindow.ui +++ b/sd/uiconfig/simpress/ui/layoutwindow.ui @@ -1,7 +1,27 @@ - + + + + + + + + + + + + + + + + + + + + + True False @@ -27,30 +47,16 @@ 0 none - + True True - 6 - True + 6 True - never - never - in - - - True - False - - - True - True - GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_KEY_PRESS_MASK | GDK_KEY_RELEASE_MASK | GDK_STRUCTURE_MASK - True - True - - - - + iconview1_model + 4 + 0 + 2 + True @@ -79,30 +85,16 @@ 0 none - + True True - 6 - True + 6 True - never - never - in - - - True - False - - - True - True - GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_KEY_PRESS_MASK | GDK_KEY_RELEASE_MASK | GDK_STRUCTURE_MASK - True - True - - - - + iconview2_model1 + 4 + 0 + 2 + True From cd6d8538d09bd043b8d6432c76d83eb395c0a87a Mon Sep 17 00:00:00 2001 From: Michael Weghorn Date: Tue, 6 Oct 2026 17:22:54 +0200 Subject: [PATCH 265/289] svtools: Drop always false ValueSet::InsertItem bLegend param No single caller passes any explicit value for that param, so the default of `false` is always used. Drop the param and simplify the implementation a bit. This will also allow for further cleanup in an upcoming commit. Change-Id: I0d2f691eecfac013bc8ad3e506484d958d18ce0a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211909 Tested-by: Jenkins Reviewed-by: Michael Weghorn --- include/svtools/valueset.hxx | 4 ++-- svtools/source/control/valueset.cxx | 5 ++--- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/include/svtools/valueset.hxx b/include/svtools/valueset.hxx index 41709da40644..9d4272745ed9 100644 --- a/include/svtools/valueset.hxx +++ b/include/svtools/valueset.hxx @@ -278,9 +278,9 @@ public: /// Insert @rImage item. void InsertItem(sal_uInt16 nItemId, const Image& rImage); - /// Insert @rImage item with @rStr as either a legend or tooltip depending on @bShowLegend. + /// Insert @rImage item with @rStr as tooltip. void InsertItem(sal_uInt16 nItemId, const Image& rImage, - const OUString& rStr, size_t nPos = VALUESET_APPEND, bool bShowLegend = false); + const OUString& rStr, size_t nPos = VALUESET_APPEND); /// Insert an @rColor item with @rStr tooltip. void InsertItem(sal_uInt16 nItemId, const Color& rColor, const OUString& rStr); diff --git a/svtools/source/control/valueset.cxx b/svtools/source/control/valueset.cxx index 1fa3899e9134..0ce64a382b3e 100644 --- a/svtools/source/control/valueset.cxx +++ b/svtools/source/control/valueset.cxx @@ -1455,12 +1455,11 @@ void ValueSet::InsertItem( sal_uInt16 nItemId, const Image& rImage ) } void ValueSet::InsertItem( sal_uInt16 nItemId, const Image& rImage, - const OUString& rText, size_t nPos, - bool bShowLegend ) + const OUString& rText, size_t nPos) { std::unique_ptr pItem(new ValueSetItem( *this )); pItem->mnId = nItemId; - pItem->meType = bShowLegend ? ValueSetItemType::ImageAndText : ValueSetItemType::Image; + pItem->meType = ValueSetItemType::Image; pItem->maImage = rImage; pItem->maText = rText; ImplInsertItem( std::move(pItem), nPos ); From 4909fb2b4c52c31b34d4ebe25ae8b86130cbc061 Mon Sep 17 00:00:00 2001 From: Michael Weghorn Date: Tue, 6 Oct 2026 17:30:24 +0200 Subject: [PATCH 266/289] svtools: Drop ValueSetItemType::ImageAndText and related logic Prio to Change-Id: I0d2f691eecfac013bc8ad3e506484d958d18ce0a Author: Michael Weghorn Date: Tue Oct 6 17:22:54 2026 +0200 svtools: Drop always false ValueSet::InsertItem bLegend param , the only place where the type would have been set was in ValueSet::InsertItem, but the method was never called in a way that caused that code path being used. Now that that was dropped from ValueSet::InsertItem, also drop the remaining logic from the ValueSet implementation. This also means that the `rRenderContext` param for ValueSet::ImplFormatItem becomes unused. Dropping it and related cleanup will be done in an upcoming commit. Change-Id: I3593630b4758d0547264c0ed63fec7ac111ccfd7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211910 Reviewed-by: Michael Weghorn Tested-by: Jenkins --- svtools/source/control/valueimp.hxx | 1 - svtools/source/control/valueset.cxx | 36 +++-------------------------- 2 files changed, 3 insertions(+), 34 deletions(-) diff --git a/svtools/source/control/valueimp.hxx b/svtools/source/control/valueimp.hxx index 921c83d2ba53..e0104d69ad77 100644 --- a/svtools/source/control/valueimp.hxx +++ b/svtools/source/control/valueimp.hxx @@ -32,7 +32,6 @@ enum class ValueSetItemType { None, Image, - ImageAndText, Color, UserDraw }; diff --git a/svtools/source/control/valueset.cxx b/svtools/source/control/valueset.cxx index 0ce64a382b3e..a0b406e97ac7 100644 --- a/svtools/source/control/valueset.cxx +++ b/svtools/source/control/valueset.cxx @@ -1218,7 +1218,7 @@ void ValueSet::ImplDrawSelect(vcl::RenderContext& rRenderContext, const tools::R } } -void ValueSet::ImplFormatItem(vcl::RenderContext const& rRenderContext, ValueSetItem& rItem, +void ValueSet::ImplFormatItem(vcl::RenderContext const&, ValueSetItem& rItem, tools::Rectangle aRect) { WinBits nStyle = GetStyle(); @@ -1278,9 +1278,7 @@ void ValueSet::ImplFormatItem(vcl::RenderContext const& rRenderContext, ValueSet Size aRectSize = aRect.GetSize(); Point aPos(aRect.Left(), aRect.Top()); aPos.AdjustX((aRectSize.Width() - aImageSize.Width()) / 2 ); - - if (rItem.meType != ValueSetItemType::ImageAndText) - aPos.AdjustY((aRectSize.Height() - aImageSize.Height()) / 2 ); + aPos.AdjustY((aRectSize.Height() - aImageSize.Height()) / 2); DrawImageFlags nImageStyle = DrawImageFlags::NONE; if (!IsEnabled()) @@ -1295,25 +1293,6 @@ void ValueSet::ImplFormatItem(vcl::RenderContext const& rRenderContext, ValueSet } else maVirDev->DrawImage(aPos, rItem.maImage, nImageStyle); - - if (rItem.meType == ValueSetItemType::ImageAndText) - { - maVirDev->SetFont(rRenderContext.GetFont()); - maVirDev->SetTextColor((nStyle & WB_MENUSTYLEVALUESET) ? rStyleSettings.GetMenuTextColor() : rStyleSettings.GetWindowTextColor()); - maVirDev->SetTextFillColor(); - - tools::Long nTxtWidth = maVirDev->GetTextWidth(rItem.maText); - - if (nTxtWidth > aRect.GetWidth()) - maVirDev->SetClipRegion(vcl::Region(aRect)); - - maVirDev->DrawText(Point(aRect.Left() + (aRect.GetWidth() - nTxtWidth) / 2, - aRect.Bottom() - maVirDev->GetTextHeight()), - rItem.maText); - - if (nTxtWidth > aRect.GetWidth()) - maVirDev->SetClipRegion(); - } } } @@ -1670,22 +1649,13 @@ Size ValueSet::GetLargestItemSize() if (!pItem->mbVisible) continue; - if (pItem->meType != ValueSetItemType::Image && - pItem->meType != ValueSetItemType::ImageAndText) + if (pItem->meType != ValueSetItemType::Image) { // handle determining an optimal size for this case continue; } Size aSize = pItem->maImage.GetSizePixel(); - if (pItem->meType == ValueSetItemType::ImageAndText) - { - aSize.AdjustHeight(3 * NAME_LINE_HEIGHT + - maVirDev->GetTextHeight() ); - aSize.setWidth( std::max(aSize.Width(), - maVirDev->GetTextWidth(pItem->maText) + NAME_OFFSET) ); - } - aLargestItem.setWidth( std::max(aLargestItem.Width(), aSize.Width()) ); aLargestItem.setHeight( std::max(aLargestItem.Height(), aSize.Height()) ); } From 7f1231cfec28605ab6a1d7bd77c03d7fb5accc32 Mon Sep 17 00:00:00 2001 From: Andreas Heinisch Date: Wed, 7 Oct 2026 10:23:50 +0200 Subject: [PATCH 267/289] tdf#171416 - Put Link field before Text again in the Hyperlink dialog Change-Id: I86cabe93386f0c0eafd1821fa4d2d988ccf8a0af Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211954 Tested-by: Jenkins Reviewed-by: Andreas Heinisch --- cui/uiconfig/ui/hyperlinkinternetpage.ui | 64 ++++++++++++------------ 1 file changed, 32 insertions(+), 32 deletions(-) diff --git a/cui/uiconfig/ui/hyperlinkinternetpage.ui b/cui/uiconfig/ui/hyperlinkinternetpage.ui index c4fc71796faf..b886a1f3ebb8 100644 --- a/cui/uiconfig/ui/hyperlinkinternetpage.ui +++ b/cui/uiconfig/ui/hyperlinkinternetpage.ui @@ -25,37 +25,6 @@ True 6 12 - - - True - False - Te_xt: - True - indication - 0 - - - 0 - 0 - - - - - True - True - True - True - - - Specifies the visible text or button caption for the hyperlink. - - - - - 1 - 0 - - True @@ -68,7 +37,7 @@ 0 - 1 + 0 @@ -90,6 +59,37 @@ + + 1 + 0 + + + + + True + False + Te_xt: + True + indication + 0 + + + 0 + 1 + + + + + True + True + True + True + + + Specifies the visible text or button caption for the hyperlink. + + + 1 1 From 216d39140d20bc87c2eb29014c489866991c99ee Mon Sep 17 00:00:00 2001 From: Andreas Heinisch Date: Tue, 6 Oct 2026 10:19:47 +0200 Subject: [PATCH 268/289] tdf#47890 - Remember last used position and size of the mail merge dialog Change-Id: Ibc6ba048d9f330f499d873c220f750964438c52e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211862 Tested-by: Jenkins Reviewed-by: Andreas Heinisch --- sw/source/ui/envelp/mailmrge.cxx | 10 ++++++++++ sw/uiconfig/swriter/ui/mailmerge.ui | 4 ++-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/sw/source/ui/envelp/mailmrge.cxx b/sw/source/ui/envelp/mailmrge.cxx index 1e417539b455..174101bc7700 100644 --- a/sw/source/ui/envelp/mailmrge.cxx +++ b/sw/source/ui/envelp/mailmrge.cxx @@ -26,6 +26,7 @@ #include #include #include +#include #include #include #include @@ -203,6 +204,11 @@ SwMailMergeDlg::SwMailMergeDlg(weld::Window* pParent, SwWrtShell& rShell, }; xD->dispatch(aURL, aProperties); m_xBeamerWin->show(); + + // tdf#47890 - remember last used position and size of the mail merge dialog + SvtViewOptions aDlgOpt(EViewType::Dialog, m_xDialog->get_help_id()); + if (aDlgOpt.Exists()) + m_xDialog->set_window_state(aDlgOpt.GetWindowState()); } uno::Reference xController = m_xFrame->getController(); m_pImpl->xFController.set(xController, UNO_QUERY); @@ -352,6 +358,10 @@ SwMailMergeDlg::SwMailMergeDlg(weld::Window* pParent, SwWrtShell& rShell, SwMailMergeDlg::~SwMailMergeDlg() { if(m_xFrame.is()) { + // tdf#47890 - remember last used position and size of the mail merge dialog + SvtViewOptions aDlgOpt(EViewType::Dialog, m_xDialog->get_help_id()); + aDlgOpt.SetWindowState(m_xDialog->get_window_state(vcl::WindowDataMask::PosSize)); + m_xFrame->setComponent(nullptr, nullptr); m_xFrame->dispose(); } diff --git a/sw/uiconfig/swriter/ui/mailmerge.ui b/sw/uiconfig/swriter/ui/mailmerge.ui index 3f0869decb3c..10683a638d30 100644 --- a/sw/uiconfig/swriter/ui/mailmerge.ui +++ b/sw/uiconfig/swriter/ui/mailmerge.ui @@ -107,7 +107,7 @@ True False True - True + False 12 @@ -826,7 +826,7 @@ - True + False True 1 From 987449e0b44fef05df4110b4f4d654deb0217a3c Mon Sep 17 00:00:00 2001 From: Neil Roberts Date: Mon, 5 Oct 2026 15:33:41 +0200 Subject: [PATCH 269/289] storbase: Use rtl::Reference::get() instead of &* MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Using &* can be problematic if the pointer is null. In this case it doesn’t matter, but using Reference::get() is probably easier to understand anyway. This also paves the way for a later compiler plugin to check for this. Change-Id: I67bd637fef17a505cf49e3332ceebc61c3280c1f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211839 Tested-by: Jenkins Reviewed-by: Neil Roberts --- store/source/storbase.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/store/source/storbase.cxx b/store/source/storbase.cxx index 013862e681d3..c0b67835d0a3 100644 --- a/store/source/storbase.cxx +++ b/store/source/storbase.cxx @@ -110,7 +110,7 @@ storeError PageData::Allocator::createInstance (rtl::Reference< PageData::Allocator > & rxAllocator, sal_uInt16 nPageSize) { rtl::Reference< PageData::Allocator_Impl > xAllocator (new PageData::Allocator_Impl()); - rxAllocator = &*xAllocator; + rxAllocator = xAllocator.get(); return xAllocator->initialize (nPageSize); } From 0ef39cbc0b2ff1fae29831e11a564776e0ed7cd5 Mon Sep 17 00:00:00 2001 From: Neil Roberts Date: Mon, 5 Oct 2026 15:40:54 +0200 Subject: [PATCH 270/289] store: Use rtl::Reference::get() instead of &* MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Using &* can be problematic if the pointer is null. In this case it doesn’t matter, but using Reference::get() is probably easier to understand anyway. This also paves the way for a later compiler plugin to check for this. Change-Id: I52837f7c972a87229ecbc4f72ee4c2f352a04dc8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211840 Reviewed-by: Neil Roberts Tested-by: Jenkins --- store/source/store.cxx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/store/source/store.cxx b/store/source/store.cxx index 24439a4e2a81..8bf5de2a875f 100644 --- a/store/source/store.cxx +++ b/store/source/store.cxx @@ -105,7 +105,7 @@ storeError store_createMemoryFile ( Reference xManager (new OStorePageManager()); eErrCode = xManager->initialize ( - &*xLockBytes, storeAccessMode::Create, nPageSize); + xLockBytes.get(), storeAccessMode::Create, nPageSize); if (eErrCode != store_E_None) return eErrCode; @@ -137,7 +137,7 @@ storeError store_openFile ( Reference xManager (new OStorePageManager()); eErrCode = xManager->initialize ( - &*xLockBytes, eAccessMode, nPageSize); + xLockBytes.get(), eAccessMode, nPageSize); if (eErrCode != store_E_None) return eErrCode; @@ -201,7 +201,7 @@ storeError store_openDirectory ( OString aPath (pPath->buffer, pPath->length, RTL_TEXTENCODING_UTF8); OString aName (pName->buffer, pName->length, RTL_TEXTENCODING_UTF8); - eErrCode = xDirectory->create (&*xManager, aPath.pData, aName.pData, eAccessMode); + eErrCode = xDirectory->create (xManager.get(), aPath.pData, aName.pData, eAccessMode); if (eErrCode != store_E_None) return eErrCode; @@ -279,7 +279,7 @@ storeError store_openStream ( OString aPath (pPath->buffer, pPath->length, RTL_TEXTENCODING_UTF8); OString aName (pName->buffer, pName->length, RTL_TEXTENCODING_UTF8); - eErrCode = xLockBytes->create (&*xManager, aPath.pData, aName.pData, eAccessMode); + eErrCode = xLockBytes->create (xManager.get(), aPath.pData, aName.pData, eAccessMode); if (eErrCode != store_E_None) return eErrCode; From bd60b650feaeb65ae73d93513f8de8203f168dc5 Mon Sep 17 00:00:00 2001 From: Neil Roberts Date: Mon, 5 Oct 2026 15:40:54 +0200 Subject: [PATCH 271/289] basmgr: Use SvRef::get() instead of &* MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Using &* can be problematic if the pointer is null. In this case it probably doesn’t matter, but using SvRef::get() is probably easier to understand anyway. This also paves the way for a later compiler plugin to check for this. Change-Id: Id539b0e2630013c4f07debf22eaeca1b45403fcd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211841 Reviewed-by: Neil Roberts Tested-by: Jenkins --- basic/source/basmgr/basmgr.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/basic/source/basmgr/basmgr.cxx b/basic/source/basmgr/basmgr.cxx index a98e22979417..509ef1e8e210 100644 --- a/basic/source/basmgr/basmgr.cxx +++ b/basic/source/basmgr/basmgr.cxx @@ -1047,7 +1047,7 @@ StarBASIC* BasicManager::AddLib( SotStorage& rStorage, const OUString& rLibName, pLibInfo = nullptr; } - return pLibInfo ? &*pLibInfo->GetLib() : nullptr; + return pLibInfo ? pLibInfo->GetLib().get() : nullptr; } From e6176fc4f051850ae36ea3958764fa2ad2e8959d Mon Sep 17 00:00:00 2001 From: Neil Roberts Date: Mon, 5 Oct 2026 15:40:54 +0200 Subject: [PATCH 272/289] sqliterator: Use rtl::Reference::get() instead of &* MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Using &* can be problematic if the pointer is null. In this case it doesn’t matter, but using Reference::get() is probably easier to understand anyway. This also paves the way for a later compiler plugin to check for this. Change-Id: I2361761496648eaaa1e245912ac19aa130b38863 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211842 Tested-by: Jenkins Reviewed-by: Neil Roberts --- connectivity/source/parse/sqliterator.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/connectivity/source/parse/sqliterator.cxx b/connectivity/source/parse/sqliterator.cxx index 6166c981934a..b510c06e6bab 100644 --- a/connectivity/source/parse/sqliterator.cxx +++ b/connectivity/source/parse/sqliterator.cxx @@ -769,7 +769,7 @@ void OSQLParseTreeIterator::getColumnRange( const OSQLParseNode* _pColumnRef, OUString& _rTableRange, OUString& _out_rColumnAliasIfPresent ) const { - lcl_getColumnRange( _pColumnRef, m_pImpl->m_xConnection, _rColumnName, _rTableRange, &*m_aSelectColumns, _out_rColumnAliasIfPresent ); + lcl_getColumnRange( _pColumnRef, m_pImpl->m_xConnection, _rColumnName, _rTableRange, m_aSelectColumns.get(), _out_rColumnAliasIfPresent ); } From 05baa27681a15da96e716a67be4f2010b76b3021 Mon Sep 17 00:00:00 2001 From: Neil Roberts Date: Mon, 5 Oct 2026 15:40:54 +0200 Subject: [PATCH 273/289] domimplementation: Use rtl::Reference::get() instead of &* MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Using &* can be problematic if the pointer is null. In this case it doesn’t matter, but using Reference::get() is probably easier to understand anyway. This also paves the way for a later compiler plugin to check for this. Change-Id: I9c055228f21639ad4005d71a768b335b40eff7e8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211843 Tested-by: Jenkins Reviewed-by: Neil Roberts --- unoxml/source/dom/domimplementation.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/unoxml/source/dom/domimplementation.cxx b/unoxml/source/dom/domimplementation.cxx index 0bd7e5940ac6..c9e5cade0338 100644 --- a/unoxml/source/dom/domimplementation.cxx +++ b/unoxml/source/dom/domimplementation.cxx @@ -33,7 +33,7 @@ namespace DOM // perhaps it would be helpful to know what the implementation should // do to answer this question... static rtl::Reference xDOMImplementation = new CDOMImplementation; - return &*xDOMImplementation; + return xDOMImplementation.get(); } // there is just 1 static instance, so these must not delete it! From d886defd9b99015f61feb8be98da664e2a1d0d6c Mon Sep 17 00:00:00 2001 From: Neil Roberts Date: Mon, 5 Oct 2026 15:40:54 +0200 Subject: [PATCH 274/289] FormulaCompiler: Use boost::intrusive_ptr::get() instead of &* MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Using &* can be problematic if the pointer is null. In this case it probably doesn’t matter, but using get() is probably easier to understand anyway. This also paves the way for a later compiler plugin to check for this. Change-Id: I0ba29f530c648782d7d6af8225a2eb6d5c28b5b9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211844 Tested-by: Jenkins Reviewed-by: Neil Roberts --- formula/source/core/api/FormulaCompiler.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/formula/source/core/api/FormulaCompiler.cxx b/formula/source/core/api/FormulaCompiler.cxx index 5ab0b2304429..e249924768e7 100644 --- a/formula/source/core/api/FormulaCompiler.cxx +++ b/formula/source/core/api/FormulaCompiler.cxx @@ -2535,7 +2535,7 @@ void FormulaCompiler::CallLine() pArgArray[nArgCount - 1] = mpCode - 1; // Add rest of the arguments } if (bDoIICompute) - HandleIIOpCode(&*pOpToken, pArgArray, + HandleIIOpCode(pOpToken.get(), pArgArray, std::min(nArgCount, static_cast(FORMULA_MAXPARAMSII))); } bool bDone = false; @@ -2554,7 +2554,7 @@ void FormulaCompiler::CallLine() nArgCount++; // Jumps are just normal functions for the FunctionAutoPilot tree view if (!mbJumpCommandReorder && pOpToken->GetType() == svJump) - pOpToken = new FormulaFAPToken( pOpToken->GetOpCode(), nArgCount, &*pOpToken ); + pOpToken = new FormulaFAPToken( pOpToken->GetOpCode(), nArgCount, pOpToken.get() ); else { // instead of using ocCall, built-in functions use their own OpCodes, if they are called directly From 6e11c6cf8227524e50fb59babf48cb41f6f6cd36 Mon Sep 17 00:00:00 2001 From: Neil Roberts Date: Mon, 5 Oct 2026 15:40:54 +0200 Subject: [PATCH 275/289] swref: Use SvRef::get() instead of &* MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Using &* can be problematic if the pointer is null. In this case it doesn’t matter, but using SvRef::get() is probably easier to understand anyway. This also paves the way for a later compiler plugin to check for this. Change-Id: I802417762ed323128a07d4f8ccbcf8bb8553a8c0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211845 Reviewed-by: Neil Roberts Tested-by: Jenkins --- sw/source/core/doc/swserv.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sw/source/core/doc/swserv.cxx b/sw/source/core/doc/swserv.cxx index 5db0be65abe8..9c57537842bd 100644 --- a/sw/source/core/doc/swserv.cxx +++ b/sw/source/core/doc/swserv.cxx @@ -224,7 +224,7 @@ bool SwServerObject::IsLinkInServer( const SwBaseLink* pChkLnk ) const const_cast(this)->m_eType = NONE_SERVER; for( size_t n = rLnks.size(); n; ) { - const ::sfx2::SvBaseLink* pLnk = &(*rLnks[ --n ]); + const ::sfx2::SvBaseLink* pLnk = rLnks[ --n ].get(); if (sfx2::SvBaseLinkObjectType::ClientGraphic != pLnk->GetObjType() && dynamic_cast( pLnk) != nullptr && !static_cast(pLnk)->IsNoDataFlag() && From 7c361df0481cb442a97d0d801e2b32652cc89eba Mon Sep 17 00:00:00 2001 From: Neil Roberts Date: Mon, 5 Oct 2026 15:40:54 +0200 Subject: [PATCH 276/289] docnode/section: Use SvRef::get() instead of &* MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Using &* can be problematic if the pointer is null. In this case it probably doesn’t matter, but using SvRef::get() is probably easier to understand anyway. This also paves the way for a later compiler plugin to check for this. Change-Id: I4de3949f3cac3a6cea448f878ca761a67750efc3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211846 Reviewed-by: Neil Roberts Tested-by: Jenkins --- sw/source/core/docnode/section.cxx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sw/source/core/docnode/section.cxx b/sw/source/core/docnode/section.cxx index a394b8a3121c..d4df38af7e2b 100644 --- a/sw/source/core/docnode/section.cxx +++ b/sw/source/core/docnode/section.cxx @@ -1037,7 +1037,7 @@ static void lcl_BreakSectionLinksInSect( const SwSectionNode& rSectNd ) const ::sfx2::SvBaseLinks& rLnks = rSectNd.GetDoc().getIDocumentLinksAdministration().GetLinkManager().GetLinks(); for ( auto n = rLnks.size(); n > 0; ) { - SwIntrnlSectRefLink* pSectLnk = dynamic_cast(&(*rLnks[ --n ])); + SwIntrnlSectRefLink* pSectLnk = dynamic_cast(rLnks[ --n ].get()); if ( pSectLnk && pSectLnk != pOwnLink && pSectLnk->IsInRange( rSectNd.GetIndex(), rSectNd.EndOfSectionIndex() ) ) { @@ -1071,7 +1071,7 @@ static void lcl_UpdateLinksInSect( const SwBaseLink& rUpdLnk, SwSectionNode& rSe const ::sfx2::SvBaseLinks& rLnks = rDoc.getIDocumentLinksAdministration().GetLinkManager().GetLinks(); for( auto n = rLnks.size(); n; ) { - ::sfx2::SvBaseLink* pLnk = &(*rLnks[ --n ]); + ::sfx2::SvBaseLink* pLnk = rLnks[ --n ].get(); if( pLnk == &rUpdLnk ) continue; if( sfx2::SvBaseLinkObjectType::ClientFile != pLnk->GetObjType() ) @@ -1091,11 +1091,11 @@ static void lcl_UpdateLinksInSect( const SwBaseLink& rUpdLnk, SwSectionNode& rSe if( n >= rLnks.size() && 0 != ( n = rLnks.size() )) --n; - if( n && pLnk != &(*rLnks[ n ]) ) + if( n && pLnk != rLnks[ n ].get() ) { // Find - it can only precede it! while( n ) - if( pLnk == &(*rLnks[ --n ] ) ) + if( pLnk == rLnks[ --n ].get() ) break; } } From 99f157a04f8c1121ce1d8cbd9028d5b19ecdc0b0 Mon Sep 17 00:00:00 2001 From: Neil Roberts Date: Mon, 5 Oct 2026 15:40:54 +0200 Subject: [PATCH 277/289] linkdlg: Use SvRef::get() instead of &* MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Using &* can be problematic if the pointer is null. In this case it probably doesn’t matter, but using SvRef::get() is probably easier to understand anyway. This also paves the way for a later compiler plugin to check for this. Change-Id: I26aa62d78454d11c9912bdd3e9ab9db2d93293a7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211847 Reviewed-by: Neil Roberts Tested-by: Jenkins --- cui/source/dialogs/linkdlg.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cui/source/dialogs/linkdlg.cxx b/cui/source/dialogs/linkdlg.cxx index 8bbec8a6eccf..70dbec1e1678 100644 --- a/cui/source/dialogs/linkdlg.cxx +++ b/cui/source/dialogs/linkdlg.cxx @@ -481,7 +481,7 @@ IMPL_LINK( SvBaseLinksDlg, EndEditHdl, sfx2::SvBaseLink&, _rLink, void ) // edited link needs to be refreshed. bool bLinkFnd = false; for( size_t n = pLinkMgr->GetLinks().size(); n; ) - if( &_rLink == &(*pLinkMgr->GetLinks()[ --n ]) ) + if( &_rLink == pLinkMgr->GetLinks()[ --n ].get() ) { bLinkFnd = true; break; From 32e937ae2d23c731f44843da6f7e735db979598d Mon Sep 17 00:00:00 2001 From: Neil Roberts Date: Mon, 5 Oct 2026 12:53:02 +0200 Subject: [PATCH 278/289] Expand the smartpointerderefaddress compiler plugin to more ptr types MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Instead of having a hard-coded list of smart pointer types, the plugin now checks if the called type has a method called “get” which returns a pointer with the same type as the overall expression. The intention is that this should be general enough to catch all smart pointers. Change-Id: I8c6f21f34a9debb81765155c544d0564c0f8ec58 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211848 Reviewed-by: Neil Roberts Tested-by: Jenkins --- .../clang/smartpointerderefaddress.cxx | 55 +++++++++++++++++-- .../clang/test/smartpointerderefaddress.cxx | 1 + 2 files changed, 51 insertions(+), 5 deletions(-) diff --git a/compilerplugins/clang/smartpointerderefaddress.cxx b/compilerplugins/clang/smartpointerderefaddress.cxx index 653bd66635fa..28b22566dce5 100644 --- a/compilerplugins/clang/smartpointerderefaddress.cxx +++ b/compilerplugins/clang/smartpointerderefaddress.cxx @@ -31,6 +31,9 @@ * See tdf#173585 for an example. * * Either way x.get() is easier to understand. + * + * Whether the object is a smart pointer or not is determined by whether it has a get() method which + * returns the same type as the original expression. */ namespace @@ -52,6 +55,37 @@ public: bool VisitUnaryOperator(UnaryOperator const*); }; +bool cxxRecordHasGetMethod(const CXXRecordDecl* recordDecl, const QualType& expressionType) +{ + for (auto method : recordDecl->methods()) + { + if (!method->isInstance() || method->param_size() != 0 + || !loplugin::DeclCheck(method).Function("get")) + { + continue; + } + + QualType returnType = method->getReturnType().getUnqualifiedType().getCanonicalType(); + + if (returnType == expressionType) + return true; + } + + return false; +} + +bool cxxRecordOrBaseHasGetMethod(const CXXRecordDecl* recordDecl, const QualType& expressionType) +{ + if (cxxRecordHasGetMethod(recordDecl, expressionType)) + return true; + + auto baseCallback = [&](const CXXRecordDecl* baseRecordDecl) { + return !cxxRecordHasGetMethod(baseRecordDecl, expressionType); + }; + + return !recordDecl->forallBases(baseCallback); +} + bool SmartPointerDerefAddress::VisitUnaryOperator(UnaryOperator const* unaryOperator) { if (ignoreLocation(unaryOperator)) @@ -65,12 +99,23 @@ bool SmartPointerDerefAddress::VisitUnaryOperator(UnaryOperator const* unaryOper if (!innerOp || innerOp->getOperator() != OO_Star) return true; - auto const tc = loplugin::TypeCheck(innerOp->getArg(0)->getType()); + const Expr* derefedExpr = innerOp->getArg(0); - if (tc.ClassOrStruct("shared_ptr").StdNamespace() - || tc.ClassOrStruct("__shared_ptr_access").StdNamespace() - || tc.ClassOrStruct("unique_ptr").StdNamespace() - || tc.ClassOrStruct("UnoCursorPointer").Namespace("sw").GlobalNamespace()) + // Remove any implicit casts so we can get the type of the original expression, not the one + // where operator* is defined + while (const ImplicitCastExpr* castExpr = dyn_cast(derefedExpr)) + derefedExpr = castExpr->getSubExpr(); + + // Check if the dereferenced type is a struct or a class that also has a get method that returns + // the same type as the whole expression + const CXXRecordDecl* recordDecl = derefedExpr->getType()->getAsCXXRecordDecl(); + + if (!recordDecl) + return true; + + QualType expressionType = unaryOperator->getType().getUnqualifiedType().getCanonicalType(); + + if (cxxRecordOrBaseHasGetMethod(recordDecl, expressionType)) { report(DiagnosticsEngine::Warning, "'*' followed by '&' operating on %0, rather use '.get()'", diff --git a/compilerplugins/clang/test/smartpointerderefaddress.cxx b/compilerplugins/clang/test/smartpointerderefaddress.cxx index 6dae64d22e1f..bf378e36348c 100644 --- a/compilerplugins/clang/test/smartpointerderefaddress.cxx +++ b/compilerplugins/clang/test/smartpointerderefaddress.cxx @@ -18,6 +18,7 @@ class UnoCursorPointer { public: int& operator*() { return *m_pInteger; }; + int* get() { return m_pInteger; }; private: int* m_pInteger; From f01db975cdaa0d6fe34162b7220eb596a575f737 Mon Sep 17 00:00:00 2001 From: Olivier Hallot Date: Wed, 7 Oct 2026 15:01:07 -0300 Subject: [PATCH 279/289] Update git submodules * Update helpcontent2 from branch 'master' to b2429f8c0fffdef7bd37b8c750bfce3909838701 - Fix bookmark for content alignment Change-Id: If97bada9c4efe19757000966493510217af85288 Reviewed-on: https://gerrit.libreoffice.org/c/help/+/211980 Tested-by: Jenkins Reviewed-by: Olivier Hallot --- helpcontent2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/helpcontent2 b/helpcontent2 index 5cb7c905920c..b2429f8c0fff 160000 --- a/helpcontent2 +++ b/helpcontent2 @@ -1 +1 @@ -Subproject commit 5cb7c905920ce835f1a171c73e42b510eae6d63d +Subproject commit b2429f8c0fffdef7bd37b8c750bfce3909838701 From dc79823c7e9bc43472e6e4a02b19a7132e48619f Mon Sep 17 00:00:00 2001 From: Michael Weghorn Date: Tue, 6 Oct 2026 17:39:23 +0200 Subject: [PATCH 280/289] svtools: Drop unused ValueSet::{Format,ImpFormatItem} param Now after Change-Id: I3593630b4758d0547264c0ed63fec7ac111ccfd7 Author: Michael Weghorn Date: Tue Oct 6 17:30:24 2026 +0200 svtools: Drop ValueSetItemType::ImageAndText and related logic , the `rRendercontext` param for ValueSet::ImplFormatItem is unused, so drop it, and also the then unused corresponding ValueSet::Format param. Change-Id: Ibc8afabf147974da1ed67ef903abc13c054c4c12 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211911 Reviewed-by: Michael Weghorn Tested-by: Jenkins --- include/svtools/valueset.hxx | 5 ++--- svtools/source/control/valueset.cxx | 13 ++++++------- 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/include/svtools/valueset.hxx b/include/svtools/valueset.hxx index 9d4272745ed9..4d209ea41fc1 100644 --- a/include/svtools/valueset.hxx +++ b/include/svtools/valueset.hxx @@ -212,8 +212,7 @@ private: friend class ValueSetAcc; SVT_DLLPRIVATE void ImplDeleteItems(); - SVT_DLLPRIVATE void ImplFormatItem(vcl::RenderContext const& rRenderContext, - ValueSetItem& rItem, tools::Rectangle aRect); + SVT_DLLPRIVATE void ImplFormatItem(ValueSetItem& rItem, tools::Rectangle aRect); // nItemId is the item to draw selected, but if nothing is selected something else may be drawn as selected instead, the item to draw // selected is returned SVT_DLLPRIVATE ValueSetItem* ImplGetDrawSelectItem(sal_uInt16 nItemId, const bool bFocus, tools::Rectangle& rRect); @@ -349,7 +348,7 @@ public: void SetExtraSpacing( sal_uInt16 nNewSpacing ); void SetMargin( sal_uInt16 nNewMargin ); - void Format(vcl::RenderContext const & rRenderContext); + void Format(); void SetFormat(); Size CalcWindowSizePixel(const Size& rItemSize, diff --git a/svtools/source/control/valueset.cxx b/svtools/source/control/valueset.cxx index a0b406e97ac7..c20a50492346 100644 --- a/svtools/source/control/valueset.cxx +++ b/svtools/source/control/valueset.cxx @@ -627,7 +627,7 @@ void ValueSet::ImplHighlightItem(sal_uInt16 nItemId) void ValueSet::ImplDraw(vcl::RenderContext& rRenderContext) { if (mbFormat) - Format(rRenderContext); + Format(); Point aDefPos; Size aSize = maVirDev->GetOutputSizePixel(); @@ -668,9 +668,9 @@ void ValueSet::SelectItem( sal_uInt16 nItemId ) bool bNewOut = !mbFormat && IsReallyVisible(); bool bNewLine = false; - if (weld::DrawingArea* pNeedsFormatToScroll = !mnCols ? GetDrawingArea() : nullptr) + if (!mnCols && GetDrawingArea()) { - Format(pNeedsFormatToScroll->get_ref_device()); + Format(); // reset scrollbar so it's set to the later calculated mnFirstLine on // the next Format RecalcScrollBar(); @@ -774,7 +774,7 @@ void ValueSet::SetStyle(WinBits nStyle) } } -void ValueSet::Format(vcl::RenderContext const & rRenderContext) +void ValueSet::Format() { Size aWinSize(GetOutputSizePixel()); size_t nItemCount = mItemList.size(); @@ -972,7 +972,7 @@ void ValueSet::Format(vcl::RenderContext const & rRenderContext) } pItem->mbVisible = true; - ImplFormatItem(rRenderContext, *pItem, + ImplFormatItem(*pItem, tools::Rectangle(Point(x, y), Size(mnItemWidth, mnItemHeight))); if (!((i + 1) % mnCols)) @@ -1218,8 +1218,7 @@ void ValueSet::ImplDrawSelect(vcl::RenderContext& rRenderContext, const tools::R } } -void ValueSet::ImplFormatItem(vcl::RenderContext const&, ValueSetItem& rItem, - tools::Rectangle aRect) +void ValueSet::ImplFormatItem(ValueSetItem& rItem, tools::Rectangle aRect) { WinBits nStyle = GetStyle(); if (nStyle & WB_ITEMBORDER) From 294f8720193263dda9a9850fe19f7673cce3c303 Mon Sep 17 00:00:00 2001 From: Michael Weghorn Date: Tue, 6 Oct 2026 17:54:11 +0200 Subject: [PATCH 281/289] sd: Drop redundant TableDesignWidget::setModal call TableDesignWidget::m_bModal has a default value of false, so there is no need to explicitly call TableDesignWidget::setModal with the same value. An upcoming commit will drop TableDesignWidget::m_bModal altogether. Change-Id: Iedfcc446b1c6f8d77d82d0478ff447590648765a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211912 Tested-by: Jenkins Reviewed-by: Michael Weghorn --- sd/source/ui/inc/TableDesignPane.hxx | 1 - sd/source/ui/table/TableDesignPane.cxx | 1 - 2 files changed, 2 deletions(-) diff --git a/sd/source/ui/inc/TableDesignPane.hxx b/sd/source/ui/inc/TableDesignPane.hxx index 27e7971b5c62..a1280563fddf 100644 --- a/sd/source/ui/inc/TableDesignPane.hxx +++ b/sd/source/ui/inc/TableDesignPane.hxx @@ -62,7 +62,6 @@ public: virtual void Resize() override; virtual void StyleUpdated() override; void updateSettings(); - void setModal(bool bModal) { m_bModal = bModal; } void SetContextMenuHandler(const Link& rLink) { maContextMenuHandler = rLink; } static constexpr int getMaxRowCount() { return 3; } }; diff --git a/sd/source/ui/table/TableDesignPane.cxx b/sd/source/ui/table/TableDesignPane.cxx index 9183885bf78f..ee9711253d69 100644 --- a/sd/source/ui/table/TableDesignPane.cxx +++ b/sd/source/ui/table/TableDesignPane.cxx @@ -110,7 +110,6 @@ TableDesignWidget::TableDesignWidget(weld::Builder& rBuilder, ViewShellBase& rBa { m_xValueSet->SetStyle(m_xValueSet->GetStyle() | WB_NO_DIRECTSELECT | WB_FLATVALUESET | WB_ITEMBORDER); m_xValueSet->SetExtraSpacing(8); - m_xValueSet->setModal(false); m_xValueSet->SetColor(); m_xValueSet->SetSelectHdl(LINK(this, TableDesignWidget, implValueSetHdl)); m_xValueSet->SetContextMenuHandler(LINK(this, TableDesignWidget, implContextMenuHandler)); From 09d3cc2c1456e4f337877fe90da2b821f59ab05e Mon Sep 17 00:00:00 2001 From: Michael Weghorn Date: Tue, 6 Oct 2026 17:56:09 +0200 Subject: [PATCH 282/289] sd: Drop always false TableDesignWidget::m_bModal The member is initialized to false in the ctor and that value is never changed afterwards. Drop it altogether and simplify code accordingly. Change-Id: I0213e9f74b353a214af3ad163a934bfa7e868412 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211913 Reviewed-by: Michael Weghorn Tested-by: Jenkins --- sd/source/ui/inc/TableDesignPane.hxx | 1 - sd/source/ui/table/TableDesignPane.cxx | 21 +++++++-------------- 2 files changed, 7 insertions(+), 15 deletions(-) diff --git a/sd/source/ui/inc/TableDesignPane.hxx b/sd/source/ui/inc/TableDesignPane.hxx index a1280563fddf..c067e78fe5e2 100644 --- a/sd/source/ui/inc/TableDesignPane.hxx +++ b/sd/source/ui/inc/TableDesignPane.hxx @@ -54,7 +54,6 @@ enum TableCheckBox : sal_uInt16 class TableValueSet final : public ValueSet { private: - bool m_bModal; Link maContextMenuHandler; public: TableValueSet(std::unique_ptr pScrolledWindow); diff --git a/sd/source/ui/table/TableDesignPane.cxx b/sd/source/ui/table/TableDesignPane.cxx index ee9711253d69..1f6f962c3e11 100644 --- a/sd/source/ui/table/TableDesignPane.cxx +++ b/sd/source/ui/table/TableDesignPane.cxx @@ -621,20 +621,16 @@ void TableValueSet::Resize() SetColCount (static_cast(nColumnCount)); SetLineCount (static_cast(nVisibleRowCount)); - if( !m_bModal ) + WinBits nStyle = GetStyle() & ~WB_VSCROLL; + if (nRowCount > nVisibleRowCount) { - WinBits nStyle = GetStyle() & ~WB_VSCROLL; - if( nRowCount > nVisibleRowCount ) - { - nStyle |= WB_VSCROLL; - } - SetStyle( nStyle ); + nStyle |= WB_VSCROLL; } + SetStyle(nStyle); } TableValueSet::TableValueSet(std::unique_ptr pScrolledWindow) : ValueSet(std::move(pScrolledWindow)) - , m_bModal(false) { } @@ -645,12 +641,9 @@ void TableValueSet::StyleUpdated() void TableValueSet::updateSettings() { - if( !m_bModal ) - { - Color aColor = Application::GetSettings().GetStyleSettings().GetWindowColor(); - SetColor(aColor); - SetExtraSpacing(8); - } + Color aColor = Application::GetSettings().GetStyleSettings().GetWindowColor(); + SetColor(aColor); + SetExtraSpacing(8); } void TableDesignWidget::updateControls() From 1886cb2ee3d5a637922064b83c45883dc0a08cd8 Mon Sep 17 00:00:00 2001 From: Miklos Vajna Date: Tue, 6 Oct 2026 08:26:22 +0200 Subject: [PATCH 283/289] cool#16219 engine sd, RTF export: fix lost bullets of paragraphs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add a few bulleted lines to a text frame in an Impress document, copy them, paste in Writer: the paragraphs are imported with no bullet marks. ImpEditEngine::WriteRTF() emits a bare \level for the paragraph's outline level, which editeng's own RTF importer reads back as a bulleted item, but sw's RTF import ignores. The PowerPoint RTF clipboard markup for the same thing is the RTF 1.0 old-style numbering pair: a {\pntext \tab} fallback and a {\*\pn\pnlvlblt{\pntxtb }} destination that contains the bullet character. Fix the problem by emitting that pair alongside \level, from the paragraph loop in WriteRTF(), when the paragraph's EE_PARA_NUMBULLET at that outline level is of type SVX_NUM_CHAR_SPECIAL. Signed-off-by: Miklos Vajna Change-Id: I18a022ac28d50a8b7557ee2282cd3fd8e7c37299 Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/14439 Tested-by: Jenkins CPCI Reviewed-by: Caolán McNamara (cherry picked from commit b7002f07f475ce4eb5cf7309dfe8e59ba21ecd7a) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211942 Tested-by: Jenkins Reviewed-by: Xisco Fauli --- editeng/qa/editeng/editeng.cxx | 31 +++++++++++++++++++++++++++++ editeng/source/editeng/impedit4.cxx | 27 +++++++++++++++++++++++++ 2 files changed, 58 insertions(+) diff --git a/editeng/qa/editeng/editeng.cxx b/editeng/qa/editeng/editeng.cxx index d2348d986c16..19fadcb9bbca 100644 --- a/editeng/qa/editeng/editeng.cxx +++ b/editeng/qa/editeng/editeng.cxx @@ -11,8 +11,10 @@ #include #include +#include #include #include +#include #include #include @@ -213,6 +215,35 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf119192RTFFontAttributesInParagraphScope) bool bContains = (aCnt.find("{mytest}") != std::string::npos); CPPUNIT_ASSERT(bContains); } + +CPPUNIT_TEST_FIXTURE(Test, testRTFBullet) +{ + // Given a document with a paragraph that is a bulleted item: + EditEngine aEditEngine(mpItemPool.get()); + OUString aText = u"mytest"_ustr; + aEditEngine.SetText(aText); + SfxItemSet aItems(aEditEngine.GetParaAttribs(0)); + aItems.Put(SfxInt16Item(EE_PARA_OUTLLEVEL, 0)); + SvxNumRule aRule(SvxNumRuleFlags::BULLET_REL_SIZE, 10, false); + SvxNumberFormat aFmt(SVX_NUM_CHAR_SPECIAL); + aFmt.SetBulletChar(0x2022); // bullet + aRule.SetLevel(0, aFmt); + aItems.Put(SvxNumBulletItem(std::move(aRule), EE_PARA_NUMBULLET)); + aEditEngine.SetParaAttribs(0, aItems); + + // When copying to the clipboard as RTF: + uno::Reference xData + = aEditEngine.CreateTransferable(ESelection(0, 0, 0, aText.getLength())); + + // Then make sure the RTF carries the bullet so a non-editeng reader sees it: + auto pData = dynamic_cast(xData.get()); + SvMemoryStream& rStream = pData->GetRTFStream(); + std::string aCnt{ static_cast(rStream.GetData()), + static_cast(rStream.GetSize()) }; + // Without the accompanying fix in place, this failed, the export wrote + // only editeng's own \level0 and \pnlvlblt. + CPPUNIT_ASSERT(aCnt.find("\\pnlvlblt") != std::string::npos); +} } CPPUNIT_PLUGIN_IMPLEMENT(); diff --git a/editeng/source/editeng/impedit4.cxx b/editeng/source/editeng/impedit4.cxx index f1450560c27a..bba1ae42b34c 100644 --- a/editeng/source/editeng/impedit4.cxx +++ b/editeng/source/editeng/impedit4.cxx @@ -22,6 +22,7 @@ #include #include #include +#include #include #include "eertfpar.hxx" @@ -644,6 +645,32 @@ ErrCode ImpEditEngine::WriteRTF( SvStream& rOutput, EditSelection aSel, bool bCl if ( bAttr ) rOutput.WriteChar( ' ' ); // Separator + const SfxInt16Item& rOutlLevelItem = GetParaAttrib(nNode, EE_PARA_OUTLLEVEL); + sal_Int16 nOutlLevel = rOutlLevelItem.GetValue(); + if (nOutlLevel >= 0) + { + // The paragraph has an outline level, check if that is a bullet. + const SvxNumBulletItem& rNumBullet = GetParaAttrib(nNode, EE_PARA_NUMBULLET); + const SvxNumberFormat* pFmt = rNumBullet.GetNumRule().Get(nOutlLevel); + if (pFmt && pFmt->GetNumberingType() == SVX_NUM_CHAR_SPECIAL) + { + sal_Unicode cBullet = static_cast(pFmt->GetBulletChar()); + OUString aBullet(&cBullet, 1); + rOutput.WriteChar('{').WriteOString(OOO_STRING_SVTOOLS_RTF_PNTEXT).WriteChar(' '); + RTFOutFuncs::Out_String(rOutput, aBullet, eDestEnc); + rOutput.WriteOString("\\tab}"); + rOutput.WriteChar('{') + .WriteOString(OOO_STRING_SVTOOLS_RTF_IGNORE) + .WriteOString(OOO_STRING_SVTOOLS_RTF_PN) + .WriteOString(OOO_STRING_SVTOOLS_RTF_PNLVLBLT) + .WriteChar('{') + .WriteOString(OOO_STRING_SVTOOLS_RTF_PNTXTB) + .WriteChar(' '); + RTFOutFuncs::Out_String(rOutput, aBullet, eDestEnc); + rOutput.WriteOString("}}"); + } + } + ItemList aAttribItems; ParaPortion* pParaPortion = FindParaPortion( pNode ); DBG_ASSERT( pParaPortion, "Portion not found: WriteRTF" ); From 720a6d856e8d2d132e7482afe30fb81535727a2e Mon Sep 17 00:00:00 2001 From: Andreas Heinisch Date: Wed, 7 Oct 2026 13:36:47 +0200 Subject: [PATCH 284/289] tdf#171730 - Keep slider markers in sync in the Pick a Color dialog The markers of the vertical color slider were only updated when the hex field was changed. Switching the color component via the radio buttons left the markers at their current position. In addition, markers did not match the start color when the dialog was opened. The level will now be calculated on every color update and once the slider is shown. Change-Id: Ie31a6e93e2a6bbf10f0cdf3307b81b735662a3c0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211962 Tested-by: Jenkins Reviewed-by: Andreas Heinisch --- vcl/inc/colorpicker.hxx | 9 +++++++-- vcl/source/window/colorpicker.cxx | 20 +++++++++++++------- 2 files changed, 20 insertions(+), 9 deletions(-) diff --git a/vcl/inc/colorpicker.hxx b/vcl/inc/colorpicker.hxx index 8f9cdb40cfdb..a7a7b0b53d69 100644 --- a/vcl/inc/colorpicker.hxx +++ b/vcl/inc/colorpicker.hxx @@ -152,15 +152,19 @@ public: double GetValue() const { return mdValue; } void SetModifyHdl(const Link& rLink) { maModifyHdl = rLink; } + void SetResizeHdl(const Link& rLink) { maResizeHdl = rLink; } - sal_Int16 GetLevel() const { return mnLevel; } + sal_Int16 GetLevel() const + { + return static_cast((1.0 - mdValue) * GetOutputSizePixel().Height()); + } private: Link maModifyHdl; + Link maResizeHdl; Color maColor; ColorMode meMode; VclPtr mxBitmap; - sal_Int16 mnLevel; double mdValue; }; @@ -221,6 +225,7 @@ private: DECL_LINK(ColorFieldControlModifydl, ColorFieldControl&, void); DECL_LINK(ColorSliderControlModifyHdl, ColorSliderControl&, void); + DECL_LINK(ColorSliderResizeHdl, ColorSliderControl&, void); DECL_LINK(ColorModifyMetricHdl, weld::MetricSpinButton&, void); DECL_LINK(ColorModifySpinHdl, weld::SpinButton&, void); DECL_LINK(ColorModifyEditHdl, weld::Entry&, void); diff --git a/vcl/source/window/colorpicker.cxx b/vcl/source/window/colorpicker.cxx index 3cb023ad576e..f31ca8c578b4 100644 --- a/vcl/source/window/colorpicker.cxx +++ b/vcl/source/window/colorpicker.cxx @@ -417,7 +417,6 @@ void ColorFieldControl::UpdatePosition() ColorSliderControl::ColorSliderControl() : meMode( DefaultMode ) - , mnLevel( 0 ) , mdValue( -1.0 ) { } @@ -519,7 +518,6 @@ void ColorSliderControl::ChangePosition(tools::Long nY) else if (nY > nHeight) nY = nHeight; - mnLevel = nY; mdValue = double(nHeight - nY) / double(nHeight); } @@ -567,6 +565,7 @@ void ColorSliderControl::Resize() { CustomWidgetController::Resize(); UpdateBitmap(); + maResizeHdl.Call(*this); } void ColorSliderControl::Modify() @@ -581,7 +580,6 @@ void ColorSliderControl::SetValue(const Color& rColor, ColorMode eMode, double d { maColor = rColor; mdValue = dValue; - mnLevel = static_cast((1.0-dValue) * GetOutputSizePixel().Height()); meMode = eMode; if (bUpdateBitmap) UpdateBitmap(); @@ -618,6 +616,7 @@ ColorPickerDialog::ColorPickerDialog(weld::Window* pParent, const Color& rColor, { m_aColorField.SetModifyHdl( LINK( this, ColorPickerDialog, ColorFieldControlModifydl ) ); m_aColorSlider.SetModifyHdl( LINK( this, ColorPickerDialog, ColorSliderControlModifyHdl ) ); + m_aColorSlider.SetResizeHdl(LINK(this, ColorPickerDialog, ColorSliderResizeHdl)); int nMargin = (m_xFISliderLeft->get_preferred_size().Height() + 1) / 2; m_xColorSlider->set_margin_top(nMargin); @@ -769,12 +768,12 @@ void ColorPickerDialog::update_color( UpdateFlags n ) } } + // tdf#171730 - always sync slider markers with current slider level + m_xFISliderLeft->set_margin_top(m_aColorSlider.GetLevel()); + m_xFISliderRight->set_margin_top(m_aColorSlider.GetLevel()); + if (n & UpdateFlags::Hex) // update hex - { - m_xFISliderLeft->set_margin_top(m_aColorSlider.GetLevel()); - m_xFISliderRight->set_margin_top(m_aColorSlider.GetLevel()); m_xEDHex->SetColor(aColor); - } m_aColorPreview.SetColor(aColor); } @@ -842,6 +841,13 @@ IMPL_LINK_NOARG(ColorPickerDialog, ColorSliderControlModifyHdl, ColorSliderContr update_color(UpdateFlags::All & ~UpdateFlags::ColorSlider); } +IMPL_LINK_NOARG(ColorPickerDialog, ColorSliderResizeHdl, ColorSliderControl&, void) +{ + // tdf#171730 - sync slider markers with current slider level + m_xFISliderLeft->set_margin_top(m_aColorSlider.GetLevel()); + m_xFISliderRight->set_margin_top(m_aColorSlider.GetLevel()); +} + IMPL_LINK(ColorPickerDialog, ColorModifyMetricHdl, weld::MetricSpinButton&, rEdit, void) { UpdateFlags n = UpdateFlags::NONE; From f2531aab9b2f152a8e0d41b800fac297fbd094e8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bayram=20=C3=87i=C3=A7ek?= Date: Wed, 30 Sep 2026 16:47:20 +0000 Subject: [PATCH 285/289] tdf#145726: Calc: print empty rows that carry a border MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - a form with a header row and a hundred empty bordered rows below it printed only the header row. Calc drops a run of 84 or more equally formatted rows below the last cell with content, and everything under it, so the print range ended at the last row with data. The borders were on screen all along, so only printing, the print preview and the PDF export showed it. - the run is measured from the last row with data, so typing changed the result. On a form whose borders end at row 100, text in row 16 left 84 rows below it and the borders stayed away, text in row 17 left 83 and the whole form printed. - ScDocument::IsPrintEmpty prints a page that carries a border and no content, and suppresses one carrying only a colour. A bordered run is therefore kept now, unless it is wider than SC_VISATTR_BORDER_STOP in its own length or in its distance below the data, which is the whole column case i30830 is about. The length stays the same as the sheet is filled in, the distance stops a chain of shorter bordered ranges reaching the sheet end. Neither measure applies to a run under SC_VISATTR_STOP rows, because a run that short was never dropped. - the print range also sets where Ctrl+End lands, how far the desktop scrolls and what range is written out on save, so all three grow with it. In the browser the scroll extent comes from the cell area, so it stays where it was. - a run has to meet one more condition than before to be dropped, so no document prints less than it did, and the ones hitting this bug print more. - the tests say a bordered form is printed, a colour under the content does not pull the print area down, a border too wide or too far down does not either, a frame round a whole column leaves the printout ending at the last row with content, and a form is printed wherever the content ends, including when a font change splits it in two. Signed-off-by: Bayram Çiçek Change-Id: I44d041cdbbcde7bfa69b53035f5bebc8d59f9bdd Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/14112 Tested-by: Jenkins CPCI Reviewed-by: Michael Stahl (cherry picked from commit 00e5de0a8bd89e5f5c9f7b19fef85331354c4458) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211943 Tested-by: Jenkins Reviewed-by: Xisco Fauli --- sc/qa/unit/ucalc.cxx | 208 +++++++++++++++++++++++++++++++ sc/source/core/data/attarray.cxx | 33 ++++- 2 files changed, 239 insertions(+), 2 deletions(-) diff --git a/sc/qa/unit/ucalc.cxx b/sc/qa/unit/ucalc.cxx index c57ff746722f..74f1e873c4fc 100644 --- a/sc/qa/unit/ucalc.cxx +++ b/sc/qa/unit/ucalc.cxx @@ -5943,6 +5943,214 @@ CPPUNIT_TEST_FIXTURE(Test, testAreasWithNotes) m_pDoc->DeleteTab(0); } +namespace +{ +// A header row, then empty rows that carry a border on every side, down to nLastBorderedRow. +// This is the shape of a pre-printed form, where the bordered rows are filled in later. +void lcl_makeBorderedForm(ScDocument* pDoc, SCROW nLastBorderedRow) +{ + pDoc->SetString(0, 0, 0, u"Header"_ustr); + + ::editeng::SvxBorderLine aLine(nullptr, 50, SvxBorderLineStyle::SOLID); + SvxBoxItem aBorderItem(ATTR_BORDER); + aBorderItem.SetLine(&aLine, SvxBoxItemLine::LEFT); + aBorderItem.SetLine(&aLine, SvxBoxItemLine::RIGHT); + aBorderItem.SetLine(&aLine, SvxBoxItemLine::TOP); + aBorderItem.SetLine(&aLine, SvxBoxItemLine::BOTTOM); + ScPatternAttr aBordered(pDoc->getCellAttributeHelper()); + aBordered.ItemSetPut(aBorderItem); + pDoc->ApplyPatternAreaTab(0, 1, 2, nLastBorderedRow, 0, aBordered); +} + +// The pattern of a single border line, for marking one cell or one row. +ScPatternAttr lcl_oneLine(ScDocument* pDoc, SvxBoxItemLine eSide) +{ + ::editeng::SvxBorderLine aLine(nullptr, 50, SvxBorderLineStyle::SOLID); + SvxBoxItem aBorderItem(ATTR_BORDER); + aBorderItem.SetLine(&aLine, eSide); + ScPatternAttr aPattern(pDoc->getCellAttributeHelper()); + aPattern.ItemSetPut(aBorderItem); + return aPattern; +} + +ScPatternAttr lcl_colour(ScDocument* pDoc, const Color& rColor) +{ + ScPatternAttr aPattern(pDoc->getCellAttributeHelper()); + aPattern.ItemSetPut(SvxBrushItem(rColor, ATTR_BACKGROUND)); + return aPattern; +} + +SCROW lcl_printAreaEndRow(ScDocument* pDoc) +{ + SCCOL nEndCol; + SCROW nEndRow; + CPPUNIT_ASSERT(pDoc->GetPrintArea(0, nEndCol, nEndRow, false)); + return nEndRow; +} +} + +CPPUNIT_TEST_FIXTURE(Test, testPrintAreaCoversABorderedForm) +{ + // Empty rows carrying a border are printed, so they belong to the print area even though + // no cell in them holds anything. + m_pDoc->InsertTab(0, u"Form"_ustr); + lcl_makeBorderedForm(m_pDoc, 99); + + SCCOL nEndCol; + SCROW nEndRow; + CPPUNIT_ASSERT(m_pDoc->GetPrintArea(0, nEndCol, nEndRow, false)); + CPPUNIT_ASSERT_EQUAL_MESSAGE("the printout reaches the last bordered row", + static_cast(99), nEndRow); + CPPUNIT_ASSERT_EQUAL_MESSAGE("the printout reaches the last bordered column", + static_cast(2), nEndCol); + m_pDoc->DeleteTab(0); + + // A form of over a thousand rows is still a form. + m_pDoc->InsertTab(0, u"LongForm"_ustr); + lcl_makeBorderedForm(m_pDoc, 1499); + CPPUNIT_ASSERT_EQUAL_MESSAGE("the printout reaches the last bordered row", + static_cast(1499), lcl_printAreaEndRow(m_pDoc)); + m_pDoc->DeleteTab(0); +} + +CPPUNIT_TEST_FIXTURE(Test, testPrintAreaIgnoresAColourBelowTheContent) +{ + // A colour below the last cell with content stays out of the print area, wherever it sits + // and however far it runs. + const SCROW nLast = m_pDoc->MaxRow(); + + const std::pair aRanges[] = { + { 0, nLast }, // the whole column + { 1, nLast }, // from under the header to the last row + { 10, nLast }, // from below the content to the last row + { 10, nLast - 1 }, // stopping one row short of the last row + { 49999, 49999 }, // one cell far below the content + }; + + sal_Int32 nSheet = 0; + for (const auto& rRange : aRanges) + { + m_pDoc->InsertTab(0, "Colour" + OUString::number(nSheet++)); + m_pDoc->SetString(0, 0, 0, u"Header"_ustr); + m_pDoc->ApplyPatternAreaTab(0, rRange.first, 0, rRange.second, 0, + lcl_colour(m_pDoc, COL_BLUE)); + + OString aMessage = "a colour over rows " + OString::number(rRange.first) + " to " + + OString::number(rRange.second); + CPPUNIT_ASSERT_EQUAL_MESSAGE(aMessage.getStr(), static_cast(0), + lcl_printAreaEndRow(m_pDoc)); + m_pDoc->DeleteTab(0); + } +} + +CPPUNIT_TEST_FIXTURE(Test, testPrintAreaIgnoresABorderTooWideForAForm) +{ + // A border far below the content, or one many times wider than a form, stays out of the + // print area. The printout ends at the last row with content. + const SCROW nLast = m_pDoc->MaxRow(); + + const std::pair aRanges[] = { + { nLast, nLast }, // the last row of the sheet + { 10, 50000 }, // reaching far below the content + }; + + sal_Int32 nSheet = 0; + for (const auto& rRange : aRanges) + { + m_pDoc->InsertTab(0, "Border" + OUString::number(nSheet++)); + m_pDoc->SetString(0, 0, 0, u"Header"_ustr); + m_pDoc->ApplyPatternAreaTab(0, rRange.first, 0, rRange.second, 0, + lcl_oneLine(m_pDoc, SvxBoxItemLine::BOTTOM)); + + OString aMessage = "a border over rows " + OString::number(rRange.first) + " to " + + OString::number(rRange.second); + CPPUNIT_ASSERT_EQUAL_MESSAGE(aMessage.getStr(), static_cast(0), + lcl_printAreaEndRow(m_pDoc)); + m_pDoc->DeleteTab(0); + } +} + +CPPUNIT_TEST_FIXTURE(Test, testPrintAreaIgnoresAFrameRoundAWholeColumn) +{ + // A frame round a whole column keeps the side lines on every row, the top line on the + // first row and the bottom line on the last, so it arrives as three ranges and the middle + // one covers nearly the sheet. The printout ends at the last row with content. + m_pDoc->InsertTab(0, u"Frame"_ustr); + m_pDoc->SetString(0, 0, 0, u"Header"_ustr); + const SCROW nLast = m_pDoc->MaxRow(); + + ::editeng::SvxBorderLine aLine(nullptr, 50, SvxBorderLineStyle::SOLID); + SvxBoxItem aSides(ATTR_BORDER); + aSides.SetLine(&aLine, SvxBoxItemLine::LEFT); + aSides.SetLine(&aLine, SvxBoxItemLine::RIGHT); + ScPatternAttr aSidesOnly(m_pDoc->getCellAttributeHelper()); + aSidesOnly.ItemSetPut(aSides); + m_pDoc->ApplyPatternAreaTab(0, 0, 0, nLast, 0, aSidesOnly); + + SvxBoxItem aTop(aSides); + aTop.SetLine(&aLine, SvxBoxItemLine::TOP); + ScPatternAttr aTopRow(m_pDoc->getCellAttributeHelper()); + aTopRow.ItemSetPut(aTop); + m_pDoc->ApplyPatternAreaTab(0, 0, 0, 0, 0, aTopRow); + + SvxBoxItem aBottom(aSides); + aBottom.SetLine(&aLine, SvxBoxItemLine::BOTTOM); + ScPatternAttr aBottomRow(m_pDoc->getCellAttributeHelper()); + aBottomRow.ItemSetPut(aBottom); + m_pDoc->ApplyPatternAreaTab(0, nLast, 0, nLast, 0, aBottomRow); + + CPPUNIT_ASSERT_EQUAL_MESSAGE("the printout stops at the last row with content", + static_cast(0), lcl_printAreaEndRow(m_pDoc)); + m_pDoc->DeleteTab(0); +} + +CPPUNIT_TEST_FIXTURE(Test, testPrintAreaDoesNotMoveAsTheSheetIsFilledIn) +{ + // A form is printed in full wherever the last cell with content sits, so filling the form + // in row by row leaves the printout the same. + for (SCROW nContentRow : { SCROW(1), SCROW(13), SCROW(15), SCROW(16), SCROW(17), SCROW(50) }) + { + m_pDoc->InsertTab(0, "Form" + OUString::number(nContentRow)); + lcl_makeBorderedForm(m_pDoc, 99); + m_pDoc->SetString(0, nContentRow, 0, u"filled in"_ustr); + + OString aMessage = "a form, content in row " + OString::number(nContentRow); + CPPUNIT_ASSERT_EQUAL_MESSAGE(aMessage.getStr(), static_cast(99), + lcl_printAreaEndRow(m_pDoc)); + m_pDoc->DeleteTab(0); + } + + // A block too wide to be a form stays out of the printout while the content ends well + // above it. + for (SCROW nContentRow : { SCROW(0), SCROW(600), SCROW(3000) }) + { + m_pDoc->InsertTab(0, "Wide" + OUString::number(nContentRow)); + m_pDoc->SetString(0, 0, 0, u"Header"_ustr); + if (nContentRow > 0) + m_pDoc->SetString(0, nContentRow, 0, u"filled in"_ustr); + lcl_makeBorderedForm(m_pDoc, 10499); + + OString aMessage = "a wide block, content in row " + OString::number(nContentRow); + CPPUNIT_ASSERT_EQUAL_MESSAGE(aMessage.getStr(), nContentRow, + lcl_printAreaEndRow(m_pDoc)); + m_pDoc->DeleteTab(0); + } + + // A form too wide for the printout stays out of it wherever the content sits inside it. + // Bold over the upper part splits the form into two ranges that still look the same, and + // the lower one is short enough on its own to pass for a form. + m_pDoc->InsertTab(0, u"Split"_ustr); + lcl_makeBorderedForm(m_pDoc, 3000); + ScPatternAttr aBold(m_pDoc->getCellAttributeHelper()); + aBold.ItemSetPut(SvxWeightItem(WEIGHT_BOLD, ATTR_FONT_WEIGHT)); + m_pDoc->ApplyPatternAreaTab(0, 1, 2, 2500, 0, aBold); + m_pDoc->SetString(0, 2600, 0, u"filled in"_ustr); + + CPPUNIT_ASSERT_EQUAL_MESSAGE("a wide form, content in its lower range", + static_cast(2600), lcl_printAreaEndRow(m_pDoc)); + m_pDoc->DeleteTab(0); +} + CPPUNIT_TEST_FIXTURE(Test, testAnchoredRotatedShape) { m_pDoc->InsertTab(0, u"TestTab"_ustr); diff --git a/sc/source/core/data/attarray.cxx b/sc/source/core/data/attarray.cxx index db79f3d67a06..907d3cc2bde8 100644 --- a/sc/source/core/data/attarray.cxx +++ b/sc/source/core/data/attarray.cxx @@ -1919,6 +1919,12 @@ bool ScAttrArray::GetFirstVisibleAttr( SCROW& rFirstRow ) const const SCROW SC_VISATTR_STOP = 84; +// how far a bordered block reaches into the print area, in its whole length and in its +// distance below the last cell with content. The length counts the rows that already hold +// content, so it stays the same as the form is filled in. 2000 rows is some forty pages here. + +const SCROW SC_VISATTR_BORDER_STOP = 2000; + bool ScAttrArray::GetLastVisibleAttr( SCROW& rLastRow, SCROW nLastData, bool bSkipEmpty ) const { if ( mvData.empty() ) @@ -1928,8 +1934,8 @@ bool ScAttrArray::GetLastVisibleAttr( SCROW& rLastRow, SCROW nLastData, bool bSk } // #i30830# changed behavior: - // ignore all attributes starting with the first run of SC_VISATTR_STOP equal rows - // below the last content cell + // ignore a long run of equally formatted rows below the last content cell, and everything + // below it. A bordered run of the size and position a form has is kept instead. if ( nLastData == rDocument.MaxRow() ) { @@ -1965,7 +1971,30 @@ bool ScAttrArray::GetLastVisibleAttr( SCROW& rLastRow, SCROW nLastData, bool bSk if ( nAttrStartRow <= nLastData ) nAttrStartRow = nLastData + 1; SCROW nAttrSize = mvData[nEndPos].nEndRow + 1 - nAttrStartRow; + bool bStop = false; if ( nAttrSize >= SC_VISATTR_STOP ) + { + // The length is measured over the whole block, so it holds steady as the + // sheet is filled in. The distance keeps the search within + // SC_VISATTR_BORDER_STOP rows of the last cell with content. + const SvxBoxItem& rBox + = mvData[nEndPos].getScPatternAttr()->GetItem( ATTR_BORDER ); + const bool bBordered = rBox.GetLeft() || rBox.GetRight() + || rBox.GetTop() || rBox.GetBottom(); + // walk back to the first range of this block, so the length is the same + // whichever of its ranges holds the last cell with content + SCSIZE nStartPos = nPos; + while ( nStartPos > 0 + && mvData[nStartPos-1].getScPatternAttr()->IsVisibleEqual( + *mvData[nStartPos].getScPatternAttr() ) ) + --nStartPos; + const SCROW nRangeStartRow + = ( nStartPos > 0 ) ? ( mvData[nStartPos-1].nEndRow + 1 ) : 0; + bStop = !bBordered + || mvData[nEndPos].nEndRow + 1 - nRangeStartRow >= SC_VISATTR_BORDER_STOP + || mvData[nEndPos].nEndRow - nLastData >= SC_VISATTR_BORDER_STOP; + } + if ( bStop ) break; // while, ignore this range and below else if ( mvData[nEndPos].getScPatternAttr()->IsVisible() ) { From 23b745e20d23c1eae555fdad5bec5f494a30c88c Mon Sep 17 00:00:00 2001 From: Dmitry Kulikov Date: Thu, 9 Jul 2026 15:50:08 +0300 Subject: [PATCH 286/289] tdf#170236 sw: import comment anchored inside a math formula A Word comment whose w:commentReference sits inside was lost on DOCX import: OOXMLFastContextHandlerLinear/Math buffers every child of the formula and never routes commentReference to handleComment, so comments.xml was never resolved and no annotation was created. Intercept w:commentReference in OOXMLFastContextHandlerLinear: collect its id and resolve it via the existing resolveComment() path once the formula object has been emitted (in OOXMLFastContextHandlerMath::process). The tag is never buffered into the formula, so the Starmath buffer stays balanced and formula import is unaffected. Signed-off-by: Dmitry Kulikov Change-Id: I9b0dccc79d5a7da9294b18f0cb58776a2bd8b553 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/207888 Tested-by: Jenkins Reviewed-by: Dan Williams --- sw/qa/extras/ooxmlimport/data/tdf170236.docx | Bin 0 -> 19465 bytes sw/qa/extras/ooxmlimport/ooxmlimport.cxx | 25 ++++++++++++++++++ .../ooxml/OOXMLFastContextHandler.cxx | 17 ++++++++++-- .../ooxml/OOXMLFastContextHandler.hxx | 4 +++ 4 files changed, 44 insertions(+), 2 deletions(-) create mode 100644 sw/qa/extras/ooxmlimport/data/tdf170236.docx diff --git a/sw/qa/extras/ooxmlimport/data/tdf170236.docx b/sw/qa/extras/ooxmlimport/data/tdf170236.docx new file mode 100644 index 0000000000000000000000000000000000000000..1d6fdd1e88d2b7db9e828999a4e87238eea6136e GIT binary patch literal 19465 zcmeHvWpo_L(xsSXFS6Ju z`13q{E#+21`Wufarn*co%MdALz#3XZ_r}ILOi82m51;C&^IYwC**J}Njrs|vW=gcG z6>eMILaNpG-kXuYUnZ~nS zsAg~g<aJa*A*t%;IK72So*A2Q?Ff;^A7Y z-l|T8x(V^~EE65{VOoVSE!U?m2e&o!t!TOFueYn9glGXkW{Dn1yn6S@5j*K_bmAs( z7XAdCgR-p{AoVc)QxtcE;)*ITz=)jtJy17iRs4ZMhi~0u7v7;ZUtCCFZ-0D=kH1&d zWEX#pJm-G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VdFH>=y8n*;y(s!` zH2&Lvp#SyEf3Kze8%>J$C;HdQ+TXwY_o~Ui;U4e)g#TVc`Fj_?SIGR`#SH16UHp|) z{gF)l9sYa4!{2a0ia+7MmOuOs|9uYgZ+I2WpYY#iG=J~mpEGuU{yLrE6q<`<`_gv@S-9)hd*^LR{NnHQQeEyFA lJ+1XOew+QTAK^bqE_o?%z;yDDDqA!lPJlIS5&iM${{UsEQ|tf$ literal 0 HcmV?d00001 diff --git a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx index 7442fdb86677..54349c0896a5 100644 --- a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx +++ b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx @@ -1960,6 +1960,31 @@ CPPUNIT_TEST_FIXTURE(Test, testInlineFormulaTextMode) testFitsOnOnePage(); } +CPPUNIT_TEST_FIXTURE(Test, testTdf170236CommentInFormula) +{ + // tdf#170236: a w:commentReference inside an m:oMath formula was dropped on import + createSwDoc("tdf170236.docx"); + uno::Reference xTextFieldsSupplier(mxComponent, uno::UNO_QUERY); + uno::Reference xFieldsAccess(xTextFieldsSupplier->getTextFields()); + uno::Reference xFields(xFieldsAccess->createEnumeration()); + + bool bFoundAnnotation = false; + while (xFields->hasMoreElements()) + { + uno::Reference xServiceInfo(xFields->nextElement(), uno::UNO_QUERY); + if (xServiceInfo->supportsService(u"com.sun.star.text.textfield.Annotation"_ustr)) + { + bFoundAnnotation = true; + uno::Reference xPropertySet(xServiceInfo, uno::UNO_QUERY); + OUString aContent; + xPropertySet->getPropertyValue(u"Content"_ustr) >>= aContent; + CPPUNIT_ASSERT_EQUAL(u"Hello World!"_ustr, aContent); + break; + } + } + CPPUNIT_ASSERT_MESSAGE("No annotation found in document", bFoundAnnotation); +} + // tests should only be added to ooxmlIMPORT *if* they fail round-tripping in ooxmlEXPORT } // end of anonymous namespace diff --git a/sw/source/writerfilter/ooxml/OOXMLFastContextHandler.cxx b/sw/source/writerfilter/ooxml/OOXMLFastContextHandler.cxx index a61fcaa2caa5..6c18c4b867e3 100644 --- a/sw/source/writerfilter/ooxml/OOXMLFastContextHandler.cxx +++ b/sw/source/writerfilter/ooxml/OOXMLFastContextHandler.cxx @@ -2492,9 +2492,18 @@ void OOXMLFastContextHandlerLinear::lcl_endFastElement(Token_t Element) } uno::Reference< xml::sax::XFastContextHandler > -OOXMLFastContextHandlerLinear::lcl_createFastChildContext(Token_t, - const uno::Reference< xml::sax::XFastAttributeList >&) +OOXMLFastContextHandlerLinear::lcl_createFastChildContext(Token_t Element, + const uno::Reference< xml::sax::XFastAttributeList >& Attribs) { + // tdf#170236: buffering a w:commentReference would feed it to Starmath, which + // drops it; capture the id instead and resolve it after the formula (process()). + if (Element == W_TOKEN(commentReference)) + { + if (Attribs && Attribs->hasAttribute(W_TOKEN(id))) + m_aCommentIds.push_back(Attribs->getValue(W_TOKEN(id)).toInt32()); + return nullptr; + } + uno::Reference< xml::sax::XFastContextHandler > xContextHandler; xContextHandler.set( this ); return xContextHandler; @@ -2556,6 +2565,10 @@ void OOXMLFastContextHandlerMath::process() else pProps->add(NS_ooxml::LN_starmath, pVal, OOXMLProperty::ATTRIBUTE); mpStream->props( pProps.get() ); + + // tdf#170236: resolve now, so the anchor lands right after the emitted formula + for (sal_Int32 nCommentId : m_aCommentIds) + resolveComment(nCommentId); } OOXMLFastContextHandlerCommentEx::OOXMLFastContextHandlerCommentEx( diff --git a/sw/source/writerfilter/ooxml/OOXMLFastContextHandler.hxx b/sw/source/writerfilter/ooxml/OOXMLFastContextHandler.hxx index 34bd89693c91..7f1976c82ce8 100644 --- a/sw/source/writerfilter/ooxml/OOXMLFastContextHandler.hxx +++ b/sw/source/writerfilter/ooxml/OOXMLFastContextHandler.hxx @@ -20,6 +20,7 @@ #pragma once #include +#include #include #include #include @@ -596,6 +597,9 @@ protected: // should be private, but not much point in making deep copies of it oox::formulaimport::XmlStreamBuilder m_buffer; + // tdf#170236: comment ids referenced inside the formula, resolved in Math::process() + std::vector m_aCommentIds; + private: int m_depthCount; }; From bc7260827a5170bd55f799b273895630bfdce4dc Mon Sep 17 00:00:00 2001 From: JebediahKermanIII Date: Sun, 13 Sep 2026 21:37:58 -0700 Subject: [PATCH 287/289] tdf#173555 make function in _xpoly/b2dpolygontools a real warp. The old implementation did a standard bilinear/"quad" warp on... the Bezier control points. That's not correct. A much better approximation of warping the points on the curve itself can be achieved by first subdividing the curve into smaller segments over which the bilinear warp is closer to affine. So, the error is lower. Why did I do this? Because the grid pattern indicates it's a bilinear warp and I was very confused when it wasn't. Change-Id: I9478007c8662455ddbb56fa9d7e6dff425c8e718 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/210921 Reviewed-by: Regina Henschel Tested-by: Jenkins Reviewed-by: Ilmari Lauhakangas --- svx/source/xoutdev/_xpoly.cxx | 149 ++++++++++++++++++++++++++-------- 1 file changed, 117 insertions(+), 32 deletions(-) diff --git a/svx/source/xoutdev/_xpoly.cxx b/svx/source/xoutdev/_xpoly.cxx index 6bad43eaa784..010cd33fa135 100644 --- a/svx/source/xoutdev/_xpoly.cxx +++ b/svx/source/xoutdev/_xpoly.cxx @@ -20,6 +20,7 @@ #include #include +#include #include #include @@ -773,52 +774,136 @@ void XPolygon::Scale(double fSx, double fSy) * 2: bottom right 3----2 * 3: bottom left */ +// Subdivide before distorting for more accuracy. void XPolygon::Distort(const tools::Rectangle& rRefRect, const XPolygon& rDistortedRect) { std::as_const(m_pImpXPolygon)->CheckPointDelete(); + if (GetPointCount() < 2) + return; + DBG_ASSERT(rDistortedRect.m_pImpXPolygon->nPoints >= 4, + "Distort: rectangle too small"); - tools::Long Xr, Wr; - tools::Long Yr, Hr; - - Xr = rRefRect.Left(); - Yr = rRefRect.Top(); - Wr = rRefRect.GetWidth(); - Hr = rRefRect.GetHeight(); - - if ( !Wr || !Hr ) + tools::Long Xr = rRefRect.Left(); + tools::Long Yr = rRefRect.Top(); + tools::Long Wr = rRefRect.GetWidth(); + tools::Long Hr = rRefRect.GetHeight(); + if (!Wr || !Hr) return; - tools::Long X1, X2, X3, X4; - tools::Long Y1, Y2, Y3, Y4; - DBG_ASSERT(rDistortedRect.m_pImpXPolygon->nPoints >= 4, - "Distort: rectangle too small"); + XPolygon aOriginal(*this); + sal_uInt16 nOldCnt = aOriginal.GetPointCount(); + bool canSubdivide = !(nOldCnt < 4 || (nOldCnt - 1) % 3 != 0); - X1 = rDistortedRect[0].X(); - Y1 = rDistortedRect[0].Y(); - X2 = rDistortedRect[1].X(); - Y2 = rDistortedRect[1].Y(); - X3 = rDistortedRect[3].X(); - Y3 = rDistortedRect[3].Y(); - X4 = rDistortedRect[2].X(); - Y4 = rDistortedRect[2].Y(); + constexpr sal_uInt16 nMaxSegments = 512; + sal_uInt16 nSegments = canSubdivide ? (nOldCnt - 1) / 3 : 0; + sal_uInt16 nNewCnt = nOldCnt; - sal_uInt16 nPntCnt = m_pImpXPolygon->nPoints; + if (nSegments > 0 && nSegments <= nMaxSegments) + { + constexpr double fSubdivideThreshold = 0.02; + double aSegLen[nMaxSegments]; + bool aSubdivideSeg[nMaxSegments]; + double fTotalLen = 0.0; - for (sal_uInt16 i = 0; i < nPntCnt; i++) + auto dist = [](const Point& a, const Point& b) + { + double dx = a.X() - b.X(), dy = a.Y() - b.Y(); + return std::sqrt(dx*dx + dy*dy); + }; + + for (sal_uInt16 nSeg = 0; nSeg < nSegments; ++nSeg) + { + sal_uInt16 nPos = 3 * nSeg; + const Point& p0 = aOriginal.m_pImpXPolygon->pPointAry[nPos]; + const Point& p1 = aOriginal.m_pImpXPolygon->pPointAry[nPos + 1]; + const Point& p2 = aOriginal.m_pImpXPolygon->pPointAry[nPos + 2]; + const Point& p3 = aOriginal.m_pImpXPolygon->pPointAry[nPos + 3]; + + aSegLen[nSeg] = dist(p0, p1) + dist(p1, p2) + dist(p2, p3); + fTotalLen += aSegLen[nSeg]; + } + + sal_uInt32 nNewCnt32 = 0; + + for (sal_uInt16 nSeg = 0; nSeg < nSegments; ++nSeg) + { + bool bSub = aSegLen[nSeg] > fTotalLen * fSubdivideThreshold; + aSubdivideSeg[nSeg] = bSub; + nNewCnt32 += (bSub ? 24 : 3) + (nSeg == 0 ? 1 : 0); + } + + // If subdivision would overflow the point count, + // fall back on old behavior. + if (nNewCnt32 <= std::numeric_limits::max()) + { + nNewCnt = static_cast(nNewCnt32); + SetPointCount(nNewCnt); + sal_uInt16 nOut = 0; + + for (sal_uInt16 nSeg = 0; nSeg < nSegments; ++nSeg) + { + sal_uInt16 nPos = 3 * nSeg; + if (aSubdivideSeg[nSeg]) + { + for (sal_uInt16 nPiece = 0; nPiece < 8; ++nPiece) + { + XPolygon aPiece(aOriginal); + double fA = static_cast(nPiece) / 8.0; + double fB = static_cast(nPiece + 1) / 8.0; + if (fA != 0.0) + aPiece.SubdivideBezier(nPos, false, fA); + aPiece.SubdivideBezier( + nPos, true, + (fB - fA) / (1.0 - fA)); + sal_uInt16 nFirstPoint = + (nSeg == 0 && nPiece == 0) ? 0 : 1; + for (sal_uInt16 j = nFirstPoint; j < 4; ++j) + { + m_pImpXPolygon->pPointAry[nOut] = + aPiece.m_pImpXPolygon->pPointAry[nPos + j]; + m_pImpXPolygon->pFlagAry[nOut] = + aPiece.m_pImpXPolygon->pFlagAry[nPos + j]; + ++nOut; + } + } + } + else + { + sal_uInt16 nFirstPoint = (nSeg == 0) ? 0 : 1; + for (sal_uInt16 j = nFirstPoint; j < 4; ++j) + { + m_pImpXPolygon->pPointAry[nOut] = + aOriginal.m_pImpXPolygon->pPointAry[nPos + j]; + m_pImpXPolygon->pFlagAry[nOut] = + aOriginal.m_pImpXPolygon->pFlagAry[nPos + j]; + ++nOut; + } + } + } + } + } + + tools::Long X1 = rDistortedRect[0].X(); + tools::Long Y1 = rDistortedRect[0].Y(); + tools::Long X2 = rDistortedRect[1].X(); + tools::Long Y2 = rDistortedRect[1].Y(); + tools::Long X3 = rDistortedRect[3].X(); + tools::Long Y3 = rDistortedRect[3].Y(); + tools::Long X4 = rDistortedRect[2].X(); + tools::Long Y4 = rDistortedRect[2].Y(); + + for (sal_uInt16 i = 0; i < nNewCnt; i++) { - double fTx, fTy, fUx, fUy; Point& rPnt = m_pImpXPolygon->pPointAry[i]; - fTx = static_cast(rPnt.X() - Xr) / Wr; - fTy = static_cast(rPnt.Y() - Yr) / Hr; - fUx = 1.0 - fTx; - fUy = 1.0 - fTy; + double fTx = static_cast(rPnt.X() - Xr) / Wr; + double fTy = static_cast(rPnt.Y() - Yr) / Hr; + double fUx = 1.0 - fTx; + double fUy = 1.0 - fTy; - rPnt.setX( static_cast( fUy * (fUx * X1 + fTx * X2) + - fTy * (fUx * X3 + fTx * X4) ) ); - rPnt.setY( static_cast( fUx * (fUy * Y1 + fTy * Y3) + - fTx * (fUy * Y2 + fTy * Y4) ) ); + rPnt.setX(static_cast(fUy * (fUx * X1 + fTx * X2) + fTy * (fUx * X3 + fTx * X4))); + rPnt.setY(static_cast(fUx * (fUy * Y1 + fTy * Y3) + fTx * (fUy * Y2 + fTy * Y4))); } } From 4bc8d8e4ddb353bab142ae30ad2a31f9a272b4c1 Mon Sep 17 00:00:00 2001 From: Julien Nabet Date: Wed, 7 Oct 2026 12:44:21 +0200 Subject: [PATCH 288/289] tdf#173869: Compound File Binary version 4 rejected - PPT/DOC fail to load Bugtracker submitted but also analyzed and with suggestion of a fix by Florian Stascheck (florian.stascheck@gmail.com) (see bugtracker for the whole analysis) Thank you to him! Edit: m_nPageSize is in fact the sector shift (see https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-cfb/05060311-bfce-4b12-874d-71fd4ce63aea) so name the constants accordingly. Change-Id: Iccbad515c0cda243e1ed9eec12caf7b614215484 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211958 Tested-by: Jenkins Reviewed-by: Julien Nabet --- sot/source/sdstor/stgelem.cxx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sot/source/sdstor/stgelem.cxx b/sot/source/sdstor/stgelem.cxx index a4d06eb55d5a..23f133c70e9b 100644 --- a/sot/source/sdstor/stgelem.cxx +++ b/sot/source/sdstor/stgelem.cxx @@ -193,9 +193,11 @@ static bool isKnownSpecial(sal_Int32 nLocation) // Perform thorough checks also on unknown variables bool StgHeader::Check() { + constexpr sal_Int16 SECTOR_SHIFT_V3 = 9; // 2^9 = 512 bytes per sector + constexpr sal_Int16 SECTOR_SHIFT_V4 = 12; // 2^12 = 4096 bytes per sector + short version = static_cast( m_nVersion >> 16 ); return memcmp( m_cSignature, cStgSignature, 8 ) == 0 - && static_cast( m_nVersion >> 16 ) == 3 - && m_nPageSize == 9 + && ((version == 3 && m_nPageSize == SECTOR_SHIFT_V3) || (version == 4 && m_nPageSize == SECTOR_SHIFT_V4)) && lcl_wontoverflow(m_nPageSize) && lcl_wontoverflow(m_nDataPageSize) && m_nFATSize > 0 From 760394bbadd6077379f9eef116e5ba87bb5cb31c Mon Sep 17 00:00:00 2001 From: "Armin Le Grand (collabora)" Date: Mon, 13 Jul 2026 19:40:36 +0200 Subject: [PATCH 289/289] Remove XFillAttrSetItem and XLineAttrSetItem Both are derived from SfxSetItem which means they contain a SfxItemSet themselves. That leads to problems since at their construction time a SfxItemPool has to be known and it *should* not be different to the one of the ItemSet that Item gets added later - that leads to the 2nd class of problems. In the long therm we should get rid of all SfxSetItems. This change simplifies already some stuff, including that the standard Items for DrawObjects reduces by two (and more due to containing a whole ItemSet) and e.g. the problem that these Items had to be converted to hard attributes in the done fixes for copy/pasting Slides. Signed-off-by: Armin Le Grand (collabora) Change-Id: I8b1c6cabdaa43ed6062811b5508ab3dece47a755 Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/6795 Reviewed-by: Armin Le Grand Tested-by: Jenkins CPCI (cherry picked from commit e67458a9b769fe7a3a7ee0739ed6d5c46dbc0692) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211734 Tested-by: Jenkins Reviewed-by: Xisco Fauli --- cui/source/inc/cuitabarea.hxx | 25 ++++------ cui/source/inc/cuitabline.hxx | 11 ++--- cui/source/tabpages/tparea.cxx | 61 ++++++++++++----------- cui/source/tabpages/tpbitmap.cxx | 51 ++++++++++---------- cui/source/tabpages/tpcolor.cxx | 39 ++++++++------- cui/source/tabpages/tpgradnt.cxx | 21 ++++---- cui/source/tabpages/tphatch.cxx | 37 +++++++------- cui/source/tabpages/tpline.cxx | 59 +++++++++++------------ cui/source/tabpages/tplnedef.cxx | 21 ++++---- cui/source/tabpages/tplneend.cxx | 27 +++++------ cui/source/tabpages/tppattern.cxx | 27 +++++------ cui/source/tabpages/tpshadow.cxx | 27 +++++------ cui/source/tabpages/tptrans.cxx | 39 ++++++++------- include/svl/itemset.hxx | 6 +++ include/svl/poolitem.hxx | 2 - include/svx/strings.hrc | 2 - include/svx/svddef.hxx | 4 -- include/svx/xdef.hxx | 80 +++++++++++++++---------------- solenv/clang-format/excludelist | 2 - svl/source/items/itemset.cxx | 7 +++ svx/sdi/xoitems.sdi | 3 -- svx/source/svdraw/svdattr.cxx | 15 +----- svx/source/svdraw/svdedxv.cxx | 2 +- svx/source/svdraw/svdobj.cxx | 8 ---- svx/source/xoutdev/xattr.cxx | 61 ----------------------- 25 files changed, 264 insertions(+), 373 deletions(-) diff --git a/cui/source/inc/cuitabarea.hxx b/cui/source/inc/cuitabarea.hxx index 20cb242cc2d1..ea309f2f0cee 100644 --- a/cui/source/inc/cuitabarea.hxx +++ b/cui/source/inc/cuitabarea.hxx @@ -22,7 +22,6 @@ #include #include -#include #include #include #include @@ -158,8 +157,7 @@ class SvxTransparenceTabPage : public SfxTabPage bool bBitmap; - XFillAttrSetItem aXFillAttr; - SfxItemSet& rXFSet; + SfxItemSet m_aFillAttributeSet; SvxXRectPreview m_aCtlBitmapPreview; SvxXRectPreview m_aCtlXRectPreview; @@ -253,8 +251,7 @@ private: ChangeType* m_pnColorListState; - XFillAttrSetItem m_aXFillAttr; - SfxItemSet& m_rXFSet; + SfxItemSet m_aFillAttributeSet; bool m_bBtnClicked = false; @@ -328,8 +325,7 @@ private: PageType m_nPageType; sal_uInt16 m_nDlgType; - XFillAttrSetItem m_aXFillAttr; - SfxItemSet& m_rXFSet; + SfxItemSet m_aFillAttributeSet; MapUnit m_ePoolUnit; SvxRectCtl m_aCtlPosition; @@ -380,8 +376,7 @@ private: ChangeType m_nGradientListState; ChangeType* m_pnColorListState; - XFillAttrSetItem m_aXFillAttr; - SfxItemSet& m_rXFSet; + SfxItemSet m_aFillAttributeSet; // MCGR: Preserve ColorStops until we have a UI to edit these basegfx::BColorStops m_aColorStops; @@ -461,8 +456,7 @@ private: ChangeType m_nHatchingListState; ChangeType* m_pnColorListState; - XFillAttrSetItem m_aXFillAttr; - SfxItemSet& m_rXFSet; + SfxItemSet m_aFillAttributeSet; MapUnit m_ePoolUnit; @@ -532,8 +526,7 @@ class SvxBitmapTabPage : public SfxTabPage double m_fObjectHeight; bool m_bLogicalSize; - XFillAttrSetItem m_aXFillAttr; - SfxItemSet& m_rXFSet; + SfxItemSet m_aFillAttributeSet; const SdrView* mpView; MapUnit mePoolUnit; FieldUnit meFieldUnit; @@ -607,8 +600,7 @@ private: ChangeType m_nPatternListState; ChangeType* m_pnColorListState; - XFillAttrSetItem m_aXFillAttr; - SfxItemSet& m_rXFSet; + SfxItemSet m_aFillAttributeSet; SvxXRectPreview m_aCtlPreview; std::unique_ptr m_xCtlPixel; @@ -671,8 +663,7 @@ private: ChangeType* m_pnColorListState; - XFillAttrSetItem m_aXFillAttr; - SfxItemSet& m_rXFSet; + SfxItemSet m_aFillAttributeSet; ColorModel m_eCM; diff --git a/cui/source/inc/cuitabline.hxx b/cui/source/inc/cuitabline.hxx index 63d555d08be1..b9cff3ce0612 100644 --- a/cui/source/inc/cuitabline.hxx +++ b/cui/source/inc/cuitabline.hxx @@ -25,7 +25,7 @@ #include #include #include -#include +// #include #include #include #include @@ -122,8 +122,7 @@ private: const SfxItemSet& m_rOutAttrs; bool m_bObjSelected; - XLineAttrSetItem m_aXLineAttr; - SfxItemSet& m_rXLSet; + SfxItemSet m_aLineAttributeSet; XDashListRef m_pDashList; XLineEndListRef m_pLineEndList; @@ -250,8 +249,7 @@ private: const SfxItemSet& rOutAttrs; XDash aDash; - XLineAttrSetItem aXLineAttr; - SfxItemSet& rXLSet; + SfxItemSet m_aLineAttributeSet; XDashListRef pDashList; @@ -330,8 +328,7 @@ private: const SfxItemSet& rOutAttrs; const SdrObject* pPolyObj; - XLineAttrSetItem aXLineAttr; - SfxItemSet& rXLSet; + SfxItemSet m_aLineAttributeSet; XLineEndListRef pLineEndList; diff --git a/cui/source/tabpages/tparea.cxx b/cui/source/tabpages/tparea.cxx index b137aff0e73b..739b72dc8e18 100644 --- a/cui/source/tabpages/tparea.cxx +++ b/cui/source/tabpages/tparea.cxx @@ -79,8 +79,7 @@ SvxAreaTabPage::SvxAreaTabPage(weld::Container* pPage, weld::DialogController* p , maFixed_ChangeType(ChangeType::NONE) // init with pointers to fixed ChangeType , m_pnColorListState(&maFixed_ChangeType) - , m_aXFillAttr(rInAttrs.GetPool()) - , m_rXFSet(m_aXFillAttr.GetItemSet()) + , m_aFillAttributeSet(rInAttrs.getPool(), WhichRangesContainer(XATTR_FILL_FIRST, XATTR_FILL_LAST)) , m_xFillTab(m_xBuilder->weld_container(u"fillstylebox"_ustr)) , m_xBtnNone(m_xBuilder->weld_toggle_button(u"btnnone"_ustr)) , m_xBtnColor(m_xBuilder->weld_toggle_button(u"btncolor"_ustr)) @@ -120,30 +119,30 @@ void SvxAreaTabPage::SetOptimalSize(weld::DialogController* pController) m_xFillTab->set_size_request(-1, -1); // Calculate optimal size of all pages... - m_xFillTabPage = SvxColorTabPage::Create(m_xFillTab.get(), pController, m_rXFSet); + m_xFillTabPage = SvxColorTabPage::Create(m_xFillTab.get(), pController, m_aFillAttributeSet); Size aSize(m_xFillTab->get_preferred_size()); if (m_xBtnGradient->get_visible()) { - m_xFillTabPage = SvxGradientTabPage::Create(m_xFillTab.get(), pController, m_rXFSet); + m_xFillTabPage = SvxGradientTabPage::Create(m_xFillTab.get(), pController, m_aFillAttributeSet); Size aGradientSize = m_xFillTab->get_preferred_size(); lclExtendSize(aSize, aGradientSize); } if (m_xBtnBitmap->get_visible()) { - m_xFillTabPage = SvxBitmapTabPage::Create(m_xFillTab.get(), pController, m_rXFSet); + m_xFillTabPage = SvxBitmapTabPage::Create(m_xFillTab.get(), pController, m_aFillAttributeSet); Size aBitmapSize = m_xFillTab->get_preferred_size(); lclExtendSize(aSize, aBitmapSize); } if (m_xBtnHatch->get_visible()) { - m_xFillTabPage = SvxHatchTabPage::Create(m_xFillTab.get(), pController, m_rXFSet); + m_xFillTabPage = SvxHatchTabPage::Create(m_xFillTab.get(), pController, m_aFillAttributeSet); Size aHatchSize = m_xFillTab->get_preferred_size(); lclExtendSize(aSize, aHatchSize); } if (m_xBtnPattern->get_visible()) { - m_xFillTabPage = SvxPatternTabPage::Create(m_xFillTab.get(), pController, m_rXFSet); + m_xFillTabPage = SvxPatternTabPage::Create(m_xFillTab.get(), pController, m_aFillAttributeSet); Size aPatternSize = m_xFillTab->get_preferred_size(); lclExtendSize(aSize, aPatternSize); } @@ -166,7 +165,7 @@ void SvxAreaTabPage::ActivatePage( const SfxItemSet& rSet ) { const XFillStyleItem& aFillStyleItem( rSet.Get( GetWhich( XATTR_FILLSTYLE ) ) ); eXFS = aFillStyleItem.GetValue(); - m_rXFSet.Put( aFillStyleItem ); + m_aFillAttributeSet.Put( aFillStyleItem ); } switch(eXFS) @@ -183,22 +182,22 @@ void SvxAreaTabPage::ActivatePage( const SfxItemSet& rSet ) } case drawing::FillStyle_SOLID: { - m_rXFSet.Put( rSet.Get( GetWhich( XATTR_FILLCOLOR ) ) ); + m_aFillAttributeSet.Put( rSet.Get( GetWhich( XATTR_FILLCOLOR ) ) ); SelectFillType(*m_xBtnColor); break; } case drawing::FillStyle_GRADIENT: { - m_rXFSet.Put( rSet.Get( GetWhich( XATTR_FILLGRADIENT ) ) ); - m_rXFSet.Put(rSet.Get(GetWhich(XATTR_GRADIENTSTEPCOUNT))); + m_aFillAttributeSet.Put( rSet.Get( GetWhich( XATTR_FILLGRADIENT ) ) ); + m_aFillAttributeSet.Put(rSet.Get(GetWhich(XATTR_GRADIENTSTEPCOUNT))); SelectFillType(*m_xBtnGradient); break; } case drawing::FillStyle_HATCH: { - m_rXFSet.Put( rSet.Get(XATTR_FILLHATCH) ); - m_rXFSet.Put( rSet.Get(XATTR_FILLUSESLIDEBACKGROUND) ); - m_rXFSet.Put( rSet.Get(XATTR_FILLCOLOR) ); + m_aFillAttributeSet.Put( rSet.Get(XATTR_FILLHATCH) ); + m_aFillAttributeSet.Put( rSet.Get(XATTR_FILLUSESLIDEBACKGROUND) ); + m_aFillAttributeSet.Put( rSet.Get(XATTR_FILLCOLOR) ); SelectFillType(*m_xBtnHatch); break; } @@ -206,7 +205,7 @@ void SvxAreaTabPage::ActivatePage( const SfxItemSet& rSet ) { const bool bPattern = rSet.Get(GetWhich(XATTR_FILLBITMAP)).isPattern(); // pass full item set here, bitmap fill has many attributes (tiling, size, offset etc.) - m_rXFSet.Put( rSet ); + m_aFillAttributeSet.Put( rSet ); if (!bPattern) SelectFillType(*m_xBtnBitmap); else @@ -404,7 +403,7 @@ IMPL_LINK(SvxAreaTabPage, SelectFillTypeHdl_Impl, weld::Toggleable&, rButton, vo void SvxAreaTabPage::SelectFillType(weld::Toggleable& rButton, const SfxItemSet* _pSet) { if (_pSet) - m_rXFSet.Set(*_pSet); + m_aFillAttributeSet.Set(*_pSet); if (_pSet || maBox.GetFillType(rButton) != maBox.GetCurrentFillType()) { @@ -442,62 +441,62 @@ std::unique_ptr SvxAreaTabPage::CreatePage(FillType eFillType) case FillType::SOLID: { std::unique_ptr pColorTabPage - = SvxColorTabPage::Create(m_xFillTab.get(), pController, m_rXFSet); + = SvxColorTabPage::Create(m_xFillTab.get(), pController, m_aFillAttributeSet); pColorTabPage->SetColorList(m_pColorList); pColorTabPage->SetColorChgd(m_pnColorListState); pColorTabPage->Construct(); - pColorTabPage->ActivatePage(m_rXFSet); - pColorTabPage->Reset(&m_rXFSet); + pColorTabPage->ActivatePage(m_aFillAttributeSet); + pColorTabPage->Reset(&m_aFillAttributeSet); pColorTabPage->set_visible(true); return pColorTabPage; } case FillType::GRADIENT: { std::unique_ptr pGradientTabPage - = SvxGradientTabPage::Create(m_xFillTab.get(), pController, m_rXFSet); + = SvxGradientTabPage::Create(m_xFillTab.get(), pController, m_aFillAttributeSet); pGradientTabPage->SetColorList(m_pColorList); pGradientTabPage->SetGradientList(m_pGradientList); pGradientTabPage->SetColorChgd(m_pnColorListState); pGradientTabPage->Construct(); - pGradientTabPage->ActivatePage(m_rXFSet); - pGradientTabPage->Reset(&m_rXFSet); + pGradientTabPage->ActivatePage(m_aFillAttributeSet); + pGradientTabPage->Reset(&m_aFillAttributeSet); pGradientTabPage->set_visible(true); return pGradientTabPage; } case FillType::HATCH: { std::unique_ptr pHatchTabPage - = SvxHatchTabPage::Create(m_xFillTab.get(), pController, m_rXFSet); + = SvxHatchTabPage::Create(m_xFillTab.get(), pController, m_aFillAttributeSet); pHatchTabPage->SetColorList(m_pColorList); pHatchTabPage->SetHatchingList(m_pHatchingList); pHatchTabPage->SetColorChgd(m_pnColorListState); pHatchTabPage->Construct(); - pHatchTabPage->ActivatePage(m_rXFSet); - pHatchTabPage->Reset(&m_rXFSet); + pHatchTabPage->ActivatePage(m_aFillAttributeSet); + pHatchTabPage->Reset(&m_aFillAttributeSet); pHatchTabPage->set_visible(true); return pHatchTabPage; } case FillType::BITMAP: { std::unique_ptr pBitmapTabPage - = SvxBitmapTabPage::Create(m_xFillTab.get(), pController, m_rXFSet); + = SvxBitmapTabPage::Create(m_xFillTab.get(), pController, m_aFillAttributeSet); pBitmapTabPage->SetBitmapList(m_pBitmapList); pBitmapTabPage->Construct(); - pBitmapTabPage->ActivatePage(m_rXFSet); - pBitmapTabPage->Reset(&m_rXFSet); + pBitmapTabPage->ActivatePage(m_aFillAttributeSet); + pBitmapTabPage->Reset(&m_aFillAttributeSet); pBitmapTabPage->set_visible(true); return pBitmapTabPage; } case FillType::PATTERN: { std::unique_ptr pPatternTabPage - = SvxPatternTabPage::Create(m_xFillTab.get(), pController, m_rXFSet); + = SvxPatternTabPage::Create(m_xFillTab.get(), pController, m_aFillAttributeSet); pPatternTabPage->SetColorList(m_pColorList); pPatternTabPage->SetPatternList(m_pPatternList); pPatternTabPage->SetColorChgd(m_pnColorListState); pPatternTabPage->Construct(); - pPatternTabPage->ActivatePage(m_rXFSet); - pPatternTabPage->Reset(&m_rXFSet); + pPatternTabPage->ActivatePage(m_aFillAttributeSet); + pPatternTabPage->Reset(&m_aFillAttributeSet); pPatternTabPage->set_visible(true); return pPatternTabPage; } diff --git a/cui/source/tabpages/tpbitmap.cxx b/cui/source/tabpages/tpbitmap.cxx index 85757aac849f..0a048aab132d 100644 --- a/cui/source/tabpages/tpbitmap.cxx +++ b/cui/source/tabpages/tpbitmap.cxx @@ -82,8 +82,7 @@ SvxBitmapTabPage::SvxBitmapTabPage(weld::Container* pPage, weld::DialogControlle , m_fObjectWidth(0.0) , m_fObjectHeight(0.0) , m_bLogicalSize(false) - , m_aXFillAttr(rInAttrs.GetPool()) - , m_rXFSet(m_aXFillAttr.GetItemSet()) + , m_aFillAttributeSet(rInAttrs.getPool(), WhichRangesContainer(XATTR_FILL_FIRST, XATTR_FILL_LAST)) , mpView(nullptr) , m_xBitmapsPresets(m_xBuilder->weld_icon_view(u"images"_ustr)) , m_xBitmapLB(new SvxPresetListBox(*m_xBitmapsPresets)) @@ -104,9 +103,9 @@ SvxBitmapTabPage::SvxBitmapTabPage(weld::Container* pPage, weld::DialogControlle , m_xCtlBitmapPreview(new weld::CustomWeld(*m_xBuilder, u"CTL_IMAGE_PREVIEW"_ustr, m_aCtlBitmapPreview)) { // setting the output device - m_rXFSet.Put( XFillStyleItem(drawing::FillStyle_BITMAP) ); - m_rXFSet.Put( XFillBitmapItem(OUString(), Graphic()) ); - m_aCtlBitmapPreview.SetAttributes( m_aXFillAttr.GetItemSet() ); + m_aFillAttributeSet.Put( XFillStyleItem(drawing::FillStyle_BITMAP) ); + m_aFillAttributeSet.Put( XFillBitmapItem(OUString(), Graphic()) ); + m_aCtlBitmapPreview.SetAttributes(m_aFillAttributeSet); m_xBitmapsPresets->connect_item_activated(LINK(this, SvxBitmapTabPage, ModifyBitmapHdl)); m_xBitmapLB->SetRenameHdl( LINK(this, SvxBitmapTabPage, ClickRenameHdl) ); @@ -129,7 +128,7 @@ SvxBitmapTabPage::SvxBitmapTabPage(weld::Container* pPage, weld::DialogControlle Size aSize = getDrawPreviewOptimalSize(m_aCtlBitmapPreview.GetDrawingArea()->get_ref_device()); m_xCtlBitmapPreview->set_size_request(aSize.Width(), aSize.Height()); - SfxItemPool* pPool = m_rXFSet.GetPool(); + SfxItemPool* pPool = m_aFillAttributeSet.GetPool(); mePoolUnit = pPool->GetMetric( XATTR_FILLBMP_SIZEX ); meFieldUnit = GetModuleFieldUnit( rInAttrs ); SetFieldUnit( *m_xBitmapWidth, meFieldUnit, true ); @@ -304,8 +303,8 @@ void SvxBitmapTabPage::Reset( const SfxItemSet* rAttrs ) if(!aItem.isPattern()) { - m_rXFSet.Put( aItem ); - m_aCtlBitmapPreview.SetAttributes( m_aXFillAttr.GetItemSet() ); + m_aFillAttributeSet.Put( aItem ); + m_aCtlBitmapPreview.SetAttributes(m_aFillAttributeSet); m_aCtlBitmapPreview.Invalidate(); } else @@ -517,11 +516,11 @@ void SvxBitmapTabPage::UpdateBitmap() ModifyBitmapStyleHdl( *m_xBitmapStyleLB ); ModifyBitmapPositionHdl( *m_xPositionLB ); - m_rXFSet.ClearItem(XATTR_FILLBITMAP); - m_rXFSet.Put(XFillStyleItem(drawing::FillStyle_BITMAP)); - m_rXFSet.Put(XFillBitmapItem(OUString(), *pGraphicObject)); + m_aFillAttributeSet.ClearItem(XATTR_FILLBITMAP); + m_aFillAttributeSet.Put(XFillStyleItem(drawing::FillStyle_BITMAP)); + m_aFillAttributeSet.Put(XFillBitmapItem(OUString(), *pGraphicObject)); - m_aCtlBitmapPreview.SetAttributes( m_aXFillAttr.GetItemSet() ); + m_aCtlBitmapPreview.SetAttributes(m_aFillAttributeSet); m_aCtlBitmapPreview.Invalidate(); } else @@ -612,7 +611,7 @@ IMPL_LINK_NOARG( SvxBitmapTabPage, ModifyBitmapSizeHdl, weld::MetricSpinButton&, } ModifyBitmapStyleHdl(*m_xBitmapStyleLB); - m_aCtlBitmapPreview.SetAttributes( m_aXFillAttr.GetItemSet() ); + m_aCtlBitmapPreview.SetAttributes(m_aFillAttributeSet); m_aCtlBitmapPreview.Invalidate(); } @@ -657,8 +656,8 @@ IMPL_LINK_NOARG( SvxBitmapTabPage, ModifyBitmapStyleHdl, weld::ComboBox&, void ) m_xPositionOffBox->set_sensitive( bIsTiled ); m_xTileOffBox->set_sensitive( bIsTiled ); - m_rXFSet.Put( XFillBmpTileItem( bIsTiled ) ); - m_rXFSet.Put( XFillBmpStretchItem( bIsStretched ) ); + m_aFillAttributeSet.Put( XFillBmpTileItem( bIsTiled ) ); + m_aFillAttributeSet.Put( XFillBmpStretchItem( bIsStretched ) ); if(!bIsStretched) { @@ -684,32 +683,32 @@ IMPL_LINK_NOARG( SvxBitmapTabPage, ModifyBitmapStyleHdl, weld::ComboBox&, void ) break; } - m_rXFSet.Put( XFillBmpSizeXItem( aSetBitmapSize.Width() ) ); - m_rXFSet.Put( XFillBmpSizeYItem( aSetBitmapSize.Height() ) ); + m_aFillAttributeSet.Put( XFillBmpSizeXItem( aSetBitmapSize.Width() ) ); + m_aFillAttributeSet.Put( XFillBmpSizeYItem( aSetBitmapSize.Height() ) ); } - m_aCtlBitmapPreview.SetAttributes( m_aXFillAttr.GetItemSet() ); + m_aCtlBitmapPreview.SetAttributes(m_aFillAttributeSet); m_aCtlBitmapPreview.Invalidate(); } IMPL_LINK_NOARG(SvxBitmapTabPage, ModifyBitmapPositionHdl, weld::ComboBox&, void) { if (m_xPositionLB->get_sensitive()) - m_rXFSet.Put( XFillBmpPosItem( static_cast< RectPoint >( m_xPositionLB->get_active() ) ) ); + m_aFillAttributeSet.Put( XFillBmpPosItem( static_cast< RectPoint >( m_xPositionLB->get_active() ) ) ); - m_aCtlBitmapPreview.SetAttributes( m_aXFillAttr.GetItemSet() ); + m_aCtlBitmapPreview.SetAttributes(m_aFillAttributeSet); m_aCtlBitmapPreview.Invalidate(); } IMPL_LINK_NOARG(SvxBitmapTabPage, ModifyPositionOffsetHdl, weld::MetricSpinButton&, void) { if (m_xPositionOffX->get_sensitive()) - m_rXFSet.Put( XFillBmpPosOffsetXItem( m_xPositionOffX->get_value(FieldUnit::PERCENT) ) ); + m_aFillAttributeSet.Put( XFillBmpPosOffsetXItem( m_xPositionOffX->get_value(FieldUnit::PERCENT) ) ); if (m_xPositionOffY->get_sensitive()) - m_rXFSet.Put( XFillBmpPosOffsetYItem( m_xPositionOffY->get_value(FieldUnit::PERCENT) ) ); + m_aFillAttributeSet.Put( XFillBmpPosOffsetYItem( m_xPositionOffY->get_value(FieldUnit::PERCENT) ) ); - m_aCtlBitmapPreview.SetAttributes( m_aXFillAttr.GetItemSet() ); + m_aCtlBitmapPreview.SetAttributes(m_aFillAttributeSet); m_aCtlBitmapPreview.Invalidate(); } @@ -724,10 +723,10 @@ IMPL_LINK_NOARG(SvxBitmapTabPage, ModifyTileOffsetHdl, weld::MetricSpinButton&, if(m_xTileOffLB->get_active() == static_cast(COLUMN)) nTileYOff = o3tl::sanitizing_cast(m_xTileOffset->get_value(FieldUnit::PERCENT)); - m_rXFSet.Put( XFillBmpTileOffsetXItem(nTileXOff) ); - m_rXFSet.Put( XFillBmpTileOffsetYItem(nTileYOff) ); + m_aFillAttributeSet.Put( XFillBmpTileOffsetXItem(nTileXOff) ); + m_aFillAttributeSet.Put( XFillBmpTileOffsetYItem(nTileYOff) ); - m_aCtlBitmapPreview.SetAttributes( m_aXFillAttr.GetItemSet() ); + m_aCtlBitmapPreview.SetAttributes(m_aFillAttributeSet); m_aCtlBitmapPreview.Invalidate(); } diff --git a/cui/source/tabpages/tpcolor.cxx b/cui/source/tabpages/tpcolor.cxx index 4d35e7c4a86e..4ced78ab9583 100644 --- a/cui/source/tabpages/tpcolor.cxx +++ b/cui/source/tabpages/tpcolor.cxx @@ -51,8 +51,7 @@ SvxColorTabPage::SvxColorTabPage(weld::Container* pPage, weld::DialogController* , m_rOutAttrs(rInAttrs) // All the horrific pointers we store and should not , m_pnColorListState( nullptr ) - , m_aXFillAttr( rInAttrs.GetPool() ) - , m_rXFSet( m_aXFillAttr.GetItemSet() ) + , m_aFillAttributeSet(rInAttrs.getPool(), WhichRangesContainer(XATTR_FILL_FIRST, XATTR_FILL_LAST)) , m_eCM( ColorModel::RGB ) , m_aColorIconView(m_xBuilder->weld_icon_view(u"coloriconview"_ustr)) , m_aRecentIconView(m_xBuilder->weld_icon_view(u"recentcoloriconview"_ustr)) @@ -96,10 +95,10 @@ SvxColorTabPage::SvxColorTabPage(weld::Container* pPage, weld::DialogController* SetExchangeSupport(); // setting the output device - m_rXFSet.Put(XFillStyleItem(drawing::FillStyle_SOLID)); - m_rXFSet.Put(XFillColorItem(OUString(), COL_BLACK)); - m_aCtlPreviewOld.SetAttributes(m_aXFillAttr.GetItemSet()); - m_aCtlPreviewNew.SetAttributes(m_aXFillAttr.GetItemSet()); + m_aFillAttributeSet.Put(XFillStyleItem(drawing::FillStyle_SOLID)); + m_aFillAttributeSet.Put(XFillColorItem(OUString(), COL_BLACK)); + m_aCtlPreviewOld.SetAttributes(m_aFillAttributeSet); + m_aCtlPreviewNew.SetAttributes(m_aFillAttributeSet); // set handler m_xSelectPalette->connect_changed(LINK(this, SvxColorTabPage, SelectPaletteLBHdl)); @@ -178,7 +177,7 @@ void SvxColorTabPage::ActivatePage( const SfxItemSet& ) SelectPaletteLBHdl(*m_xSelectPalette); - m_aCtlPreviewOld.SetAttributes(m_aXFillAttr.GetItemSet()); + m_aCtlPreviewOld.SetAttributes(m_aFillAttributeSet); m_aCtlPreviewOld.Invalidate(); const int nSelectedIndex = m_aColorIconView.get_selected_index(); @@ -253,8 +252,8 @@ IMPL_LINK_NOARG(SvxColorTabPage, SpinValueHdl_Impl, weld::SpinButton&, void) static_cast(PercentToColor_Impl(m_xBcustom->get_value()))); UpdateColorValues(); - m_rXFSet.Put(XFillColorItem(OUString(), m_aCurrentColor.m_aColor)); - m_aCtlPreviewNew.SetAttributes(m_aXFillAttr.GetItemSet()); + m_aFillAttributeSet.Put(XFillColorItem(OUString(), m_aCurrentColor.m_aColor)); + m_aCtlPreviewNew.SetAttributes(m_aFillAttributeSet); m_aCtlPreviewNew.Invalidate(); } @@ -268,8 +267,8 @@ IMPL_LINK_NOARG(SvxColorTabPage, MetricSpinValueHdl_Impl, weld::MetricSpinButton static_cast(PercentToColor_Impl(m_xMcustom->get_value(FieldUnit::NONE)))); ConvertColorValues (m_aCurrentColor.m_aColor, ColorModel::RGB); - m_rXFSet.Put(XFillColorItem(OUString(), m_aCurrentColor.m_aColor)); - m_aCtlPreviewNew.SetAttributes(m_aXFillAttr.GetItemSet()); + m_aFillAttributeSet.Put(XFillColorItem(OUString(), m_aCurrentColor.m_aColor)); + m_aCtlPreviewNew.SetAttributes(m_aFillAttributeSet); m_aCtlPreviewNew.Invalidate(); } @@ -279,8 +278,8 @@ IMPL_LINK_NOARG(SvxColorTabPage, ModifiedHdl_Impl, weld::Entry&, void) m_aCurrentColor.m_aColor = m_xHexcustom->GetColor(); UpdateColorValues(); - m_rXFSet.Put(XFillColorItem(OUString(), m_aCurrentColor.m_aColor)); - m_aCtlPreviewNew.SetAttributes(m_aXFillAttr.GetItemSet()); + m_aFillAttributeSet.Put(XFillColorItem(OUString(), m_aCurrentColor.m_aColor)); + m_aCtlPreviewNew.SetAttributes(m_aFillAttributeSet); m_aCtlPreviewNew.Invalidate(); } @@ -354,9 +353,9 @@ IMPL_LINK_NOARG(SvxColorTabPage, ClickWorkOnHdl_Impl, weld::Button&, void) m_aCurrentColor.m_aColor = aPreviewColor; UpdateColorValues( false ); // fill ItemSet and pass it on to XOut - m_rXFSet.Put(XFillColorItem(OUString(), aPreviewColor)); - //m_aCtlPreviewOld.SetAttributes(m_aXFillAttr); - m_aCtlPreviewNew.SetAttributes(m_aXFillAttr.GetItemSet()); + m_aFillAttributeSet.Put(XFillColorItem(OUString(), aPreviewColor)); + //m_aCtlPreviewOld.SetAttributes(m_aFillAttributeSet); + m_aCtlPreviewNew.SetAttributes(m_aFillAttributeSet); m_aCtlPreviewNew.Invalidate(); } @@ -474,8 +473,8 @@ IMPL_LINK_NOARG(SvxColorTabPage, SelectPaletteLBHdl, weld::ComboBox&, void) void SvxColorTabPage::UpdateToSelectedColor(const NamedColor& rNamedColor) { - m_rXFSet.Put(XFillColorItem(OUString(), rNamedColor.m_aColor)); - m_aCtlPreviewNew.SetAttributes(m_aXFillAttr.GetItemSet()); + m_aFillAttributeSet.Put(XFillColorItem(OUString(), rNamedColor.m_aColor)); + m_aCtlPreviewNew.SetAttributes(m_aFillAttributeSet); m_aCtlPreviewNew.Invalidate(); ChangeColor(rNamedColor, false); @@ -569,9 +568,9 @@ void SvxColorTabPage::ChangeColor(const NamedColor &rNewColor, bool bUpdatePrese // fill ItemSet and pass it on to XOut XFillColorItem aItem(OUString(), m_aCurrentColor.m_aColor); aItem.setComplexColor(m_aCurrentColor.getComplexColor()); - m_rXFSet.Put(aItem); + m_aFillAttributeSet.Put(aItem); - m_aCtlPreviewNew.SetAttributes(m_aXFillAttr.GetItemSet()); + m_aCtlPreviewNew.SetAttributes(m_aFillAttributeSet); m_aCtlPreviewNew.Invalidate(); } diff --git a/cui/source/tabpages/tpgradnt.cxx b/cui/source/tabpages/tpgradnt.cxx index 2cb05cad2860..1da10b92b8b8 100644 --- a/cui/source/tabpages/tpgradnt.cxx +++ b/cui/source/tabpages/tpgradnt.cxx @@ -50,8 +50,7 @@ SvxGradientTabPage::SvxGradientTabPage(weld::Container* pPage, weld::DialogContr , m_rOutAttrs(rInAttrs) , m_nGradientListState(ChangeType::NONE) , m_pnColorListState(nullptr) - , m_aXFillAttr(rInAttrs.GetPool()) - , m_rXFSet(m_aXFillAttr.GetItemSet()) + , m_aFillAttributeSet(rInAttrs.getPool(), WhichRangesContainer(XATTR_FILL_FIRST, XATTR_FILL_LAST)) , m_xLbGradientType(m_xBuilder->weld_combo_box(u"gradienttypelb"_ustr)) , m_xFtCenter(m_xBuilder->weld_label(u"centerft"_ustr)) , m_xMtrCenterX(m_xBuilder->weld_metric_spin_button(u"centerxmtr"_ustr, FieldUnit::PERCENT)) @@ -86,9 +85,9 @@ SvxGradientTabPage::SvxGradientTabPage(weld::Container* pPage, weld::DialogContr m_xMtrColorFrom->set_value(100, FieldUnit::PERCENT); // setting the output device - m_rXFSet.Put( XFillStyleItem(drawing::FillStyle_GRADIENT) ); - m_rXFSet.Put( XFillGradientItem(OUString(), basegfx::BGradient())); - m_aCtlPreview.SetAttributes(m_aXFillAttr.GetItemSet()); + m_aFillAttributeSet.Put( XFillStyleItem(drawing::FillStyle_GRADIENT) ); + m_aFillAttributeSet.Put( XFillGradientItem(OUString(), basegfx::BGradient())); + m_aCtlPreview.SetAttributes(m_aFillAttributeSet); // set handler m_xGradientPresets->connect_item_activated(LINK(this, SvxGradientTabPage, ChangeGradientHdl)); @@ -324,11 +323,11 @@ void SvxGradientTabPage::ModifiedHdl_Impl( void const * pControl ) if (pControl == m_xLbGradientType.get() || pControl == this) SetControlState_Impl( eXGS ); - m_rXFSet.Put( XGradientStepCountItem( nValue ) ); + m_aFillAttributeSet.Put( XGradientStepCountItem( nValue ) ); // displaying in XOutDev - m_rXFSet.Put( XFillGradientItem( OUString(), aBGradient ) ); - m_aCtlPreview.SetAttributes(m_aXFillAttr.GetItemSet()); + m_aFillAttributeSet.Put( XFillGradientItem( OUString(), aBGradient ) ); + m_aCtlPreview.SetAttributes(m_aFillAttributeSet); m_aCtlPreview.Invalidate(); } @@ -584,9 +583,9 @@ void SvxGradientTabPage::ChangeGradientHdl_Impl() SetControlState_Impl( eXGS ); // fill ItemSet and pass it on to aCtlPreview - m_rXFSet.Put( XFillGradientItem( OUString(), *pGradient ) ); - m_rXFSet.Put( XGradientStepCountItem( nValue ) ); - m_aCtlPreview.SetAttributes(m_aXFillAttr.GetItemSet()); + m_aFillAttributeSet.Put( XFillGradientItem( OUString(), *pGradient ) ); + m_aFillAttributeSet.Put( XGradientStepCountItem( nValue ) ); + m_aCtlPreview.SetAttributes(m_aFillAttributeSet); m_aCtlPreview.Invalidate(); } diff --git a/cui/source/tabpages/tphatch.cxx b/cui/source/tabpages/tphatch.cxx index 3a3a35a782d6..62bc571d7a49 100644 --- a/cui/source/tabpages/tphatch.cxx +++ b/cui/source/tabpages/tphatch.cxx @@ -53,8 +53,7 @@ SvxHatchTabPage::SvxHatchTabPage(weld::Container* pPage, weld::DialogController* , m_rOutAttrs(rInAttrs) , m_nHatchingListState(ChangeType::NONE) , m_pnColorListState(nullptr) - , m_aXFillAttr(rInAttrs.GetPool()) - , m_rXFSet(m_aXFillAttr.GetItemSet()) + , m_aFillAttributeSet(rInAttrs.getPool(), WhichRangesContainer(XATTR_FILL_FIRST, XATTR_FILL_LAST)) //m_aXFillAttr.GetItemSet()) , m_xMtrDistance(m_xBuilder->weld_metric_spin_button(u"distancemtr"_ustr, FieldUnit::MM)) , m_xMtrAngle(m_xBuilder->weld_metric_spin_button(u"anglemtr"_ustr, FieldUnit::DEGREE)) , m_xSliderAngle(m_xBuilder->weld_scale(u"angleslider"_ustr)) @@ -95,9 +94,9 @@ SvxHatchTabPage::SvxHatchTabPage(weld::Container* pPage, weld::DialogController* m_ePoolUnit = pPool->GetMetric( SID_ATTR_FILL_HATCH ); // setting the output device - m_rXFSet.Put( XFillStyleItem(drawing::FillStyle_HATCH) ); - m_rXFSet.Put( XFillHatchItem(OUString(), XHatch()) ); - m_aCtlPreview.SetAttributes( m_aXFillAttr.GetItemSet() ); + m_aFillAttributeSet.Put( XFillStyleItem(drawing::FillStyle_HATCH) ); + m_aFillAttributeSet.Put( XFillHatchItem(OUString(), XHatch()) ); + m_aCtlPreview.SetAttributes(m_aFillAttributeSet); m_xHatchPresets->connect_item_activated(LINK(this, SvxHatchTabPage, ChangeHatchHdl)); m_xHatchLB->SetRenameHdl( LINK( this, SvxHatchTabPage, ClickRenameHdl_Impl ) ); m_xHatchLB->SetDeleteHdl( LINK( this, SvxHatchTabPage, ClickDeleteHdl_Impl ) ); @@ -183,7 +182,7 @@ void SvxHatchTabPage::ActivatePage( const SfxItemSet& rSet ) } const XFillBackgroundItem& aBckItem( rSet.Get(XATTR_FILLBACKGROUND)); - m_rXFSet.Put( aBckItem ); + m_aFillAttributeSet.Put( aBckItem ); if (aBckItem.GetValue()) { @@ -192,7 +191,7 @@ void SvxHatchTabPage::ActivatePage( const SfxItemSet& rSet ) Color aColor(aColorItem.GetColorValue()); m_xLbBackgroundColor->SelectEntry(aColor); m_xLbBackgroundColor->set_sensitive(true); - m_rXFSet.Put( aColorItem ); + m_aFillAttributeSet.Put( aColorItem ); } else { @@ -201,7 +200,7 @@ void SvxHatchTabPage::ActivatePage( const SfxItemSet& rSet ) m_xLbBackgroundColor->set_sensitive(false); } - m_aCtlPreview.SetAttributes( m_aXFillAttr.GetItemSet() ); + m_aCtlPreview.SetAttributes(m_aFillAttributeSet); m_aCtlPreview.Invalidate(); } @@ -266,16 +265,16 @@ void SvxHatchTabPage::Reset( const SfxItemSet* rSet ) const XFillColorItem& aColItem( rSet->Get(XATTR_FILLCOLOR) ); m_xLbBackgroundColor->SelectEntry(aColItem.GetColorValue()); - m_rXFSet.Put( aColItem ); + m_aFillAttributeSet.Put( aColItem ); const XFillBackgroundItem& aBckItem( rSet->Get(XATTR_FILLBACKGROUND) ); if(aBckItem.GetValue()) m_xCbBackgroundColor->set_state(TRISTATE_TRUE); else m_xCbBackgroundColor->set_state(TRISTATE_FALSE); - m_rXFSet.Put( aBckItem ); + m_aFillAttributeSet.Put( aBckItem ); - m_aCtlPreview.SetAttributes( m_aXFillAttr.GetItemSet() ); + m_aCtlPreview.SetAttributes(m_aFillAttributeSet); m_aCtlPreview.Invalidate(); } @@ -305,7 +304,7 @@ IMPL_LINK_NOARG( SvxHatchTabPage, ToggleHatchBackgroundColor_Impl, weld::Togglea m_xLbBackgroundColor->set_sensitive(true); else m_xLbBackgroundColor->set_sensitive(false); - m_rXFSet.Put( XFillBackgroundItem( m_xCbBackgroundColor->get_active() ) ); + m_aFillAttributeSet.Put( XFillBackgroundItem( m_xCbBackgroundColor->get_active() ) ); ModifiedBackgroundHdl_Impl(*m_xLbBackgroundColor); } @@ -315,12 +314,12 @@ IMPL_LINK_NOARG( SvxHatchTabPage, ModifiedBackgroundHdl_Impl, ColorListBox&, voi if (m_xCbBackgroundColor->get_active()) { aColor = m_xLbBackgroundColor->GetSelectEntryColor(); - m_aCtlPreview.SetAttributes( m_aXFillAttr.GetItemSet() ); + m_aCtlPreview.SetAttributes(m_aFillAttributeSet); m_aCtlPreview.Invalidate(); } - m_rXFSet.Put(XFillColorItem( OUString(), aColor )); + m_aFillAttributeSet.Put(XFillColorItem( OUString(), aColor )); - m_aCtlPreview.SetAttributes( m_aXFillAttr.GetItemSet() ); + m_aCtlPreview.SetAttributes(m_aFillAttributeSet); m_aCtlPreview.Invalidate(); } @@ -349,9 +348,9 @@ void SvxHatchTabPage::ModifiedHdl_Impl( void const * p ) GetCoreValue( *m_xMtrDistance, m_ePoolUnit ), Degree10(static_cast((m_xMtrAngle->get_value(FieldUnit::NONE) % 360) * 10)) ); - m_rXFSet.Put( XFillHatchItem( OUString(), aXHatch ) ); + m_aFillAttributeSet.Put( XFillHatchItem( OUString(), aXHatch ) ); - m_aCtlPreview.SetAttributes( m_aXFillAttr.GetItemSet() ); + m_aCtlPreview.SetAttributes(m_aFillAttributeSet); m_aCtlPreview.Invalidate(); } @@ -397,8 +396,8 @@ void SvxHatchTabPage::ChangeHatchHdl_Impl() m_xSliderAngle->set_value(nHatchAngle); // fill ItemSet and pass it on to m_aCtlPreview - m_rXFSet.Put( XFillHatchItem( OUString(), *pHatch ) ); - m_aCtlPreview.SetAttributes( m_aXFillAttr.GetItemSet() ); + m_aFillAttributeSet.Put( XFillHatchItem( OUString(), *pHatch ) ); + m_aCtlPreview.SetAttributes(m_aFillAttributeSet); m_aCtlPreview.Invalidate(); pHatch.reset(); diff --git a/cui/source/tabpages/tpline.cxx b/cui/source/tabpages/tpline.cxx index 51a0e8721e2c..3c230085170c 100644 --- a/cui/source/tabpages/tpline.cxx +++ b/cui/source/tabpages/tpline.cxx @@ -92,8 +92,7 @@ SvxLineTabPage::SvxLineTabPage(weld::Container* pPage, weld::DialogController* p , m_bSymbols(false) , m_rOutAttrs(rInAttrs) , m_bObjSelected(false) - , m_aXLineAttr(rInAttrs.GetPool()) - , m_rXLSet(m_aXLineAttr.GetItemSet()) + , m_aLineAttributeSet(rInAttrs.getPool(), WhichRangesContainer(XATTR_LINE_FIRST, XATTR_LINE_LAST)) , m_pnLineEndListState(nullptr) , m_pnDashListState(nullptr) , m_pnColorListState(nullptr) @@ -664,20 +663,20 @@ void SvxLineTabPage::FillXLSet_Impl() if (m_xLbLineStyle->get_active() == -1) { - m_rXLSet.Put( XLineStyleItem( drawing::LineStyle_NONE ) ); + m_aLineAttributeSet.Put( XLineStyleItem( drawing::LineStyle_NONE ) ); } else if (m_xLbLineStyle->get_active() == 0) - m_rXLSet.Put( XLineStyleItem( drawing::LineStyle_NONE ) ); + m_aLineAttributeSet.Put( XLineStyleItem( drawing::LineStyle_NONE ) ); else if (m_xLbLineStyle->get_active() == 1) - m_rXLSet.Put( XLineStyleItem( drawing::LineStyle_SOLID ) ); + m_aLineAttributeSet.Put( XLineStyleItem( drawing::LineStyle_SOLID ) ); else { - m_rXLSet.Put( XLineStyleItem( drawing::LineStyle_DASH ) ); + m_aLineAttributeSet.Put( XLineStyleItem( drawing::LineStyle_DASH ) ); nPos = m_xLbLineStyle->get_active(); if (nPos != -1) { - m_rXLSet.Put( XLineDashItem( m_xLbLineStyle->get_active_text(), + m_aLineAttributeSet.Put( XLineDashItem( m_xLbLineStyle->get_active_text(), m_pDashList->GetDash( nPos - 2 )->GetDash() ) ); } } @@ -686,18 +685,18 @@ void SvxLineTabPage::FillXLSet_Impl() if (nPos != -1) { if( nPos == 0 ) - m_rXLSet.Put( XLineStartItem() ); + m_aLineAttributeSet.Put( XLineStartItem() ); else - m_rXLSet.Put( XLineStartItem( m_xLbStartStyle->get_active_text(), + m_aLineAttributeSet.Put( XLineStartItem( m_xLbStartStyle->get_active_text(), m_pLineEndList->GetLineEnd( nPos - 1 )->GetLineEnd() ) ); } nPos = m_xLbEndStyle->get_active(); if (nPos != -1) { if( nPos == 0 ) - m_rXLSet.Put( XLineEndItem() ); + m_aLineAttributeSet.Put( XLineEndItem() ); else - m_rXLSet.Put( XLineEndItem( m_xLbEndStyle->get_active_text(), + m_aLineAttributeSet.Put( XLineEndItem( m_xLbEndStyle->get_active_text(), m_pLineEndList->GetLineEnd( nPos - 1 )->GetLineEnd() ) ); } @@ -708,22 +707,22 @@ void SvxLineTabPage::FillXLSet_Impl() { case 0: // Rounded, default { - m_rXLSet.Put(XLineJointItem(css::drawing::LineJoint_ROUND)); + m_aLineAttributeSet.Put(XLineJointItem(css::drawing::LineJoint_ROUND)); break; } case 1: // - none - { - m_rXLSet.Put(XLineJointItem(css::drawing::LineJoint_NONE)); + m_aLineAttributeSet.Put(XLineJointItem(css::drawing::LineJoint_NONE)); break; } case 2: // Miter { - m_rXLSet.Put(XLineJointItem(css::drawing::LineJoint_MITER)); + m_aLineAttributeSet.Put(XLineJointItem(css::drawing::LineJoint_MITER)); break; } case 3: // Bevel { - m_rXLSet.Put(XLineJointItem(css::drawing::LineJoint_BEVEL)); + m_aLineAttributeSet.Put(XLineJointItem(css::drawing::LineJoint_BEVEL)); break; } } @@ -737,47 +736,47 @@ void SvxLineTabPage::FillXLSet_Impl() { case 0: // Butt (=Flat), default { - m_rXLSet.Put(XLineCapItem(css::drawing::LineCap_BUTT)); + m_aLineAttributeSet.Put(XLineCapItem(css::drawing::LineCap_BUTT)); break; } case 1: // Round { - m_rXLSet.Put(XLineCapItem(css::drawing::LineCap_ROUND)); + m_aLineAttributeSet.Put(XLineCapItem(css::drawing::LineCap_ROUND)); break; } case 2: // Square { - m_rXLSet.Put(XLineCapItem(css::drawing::LineCap_SQUARE)); + m_aLineAttributeSet.Put(XLineCapItem(css::drawing::LineCap_SQUARE)); break; } } } - m_rXLSet.Put( XLineStartWidthItem( GetCoreValue( *m_xMtrStartWidth, m_ePoolUnit ) ) ); - m_rXLSet.Put( XLineEndWidthItem( GetCoreValue( *m_xMtrEndWidth, m_ePoolUnit ) ) ); + m_aLineAttributeSet.Put( XLineStartWidthItem( GetCoreValue( *m_xMtrStartWidth, m_ePoolUnit ) ) ); + m_aLineAttributeSet.Put( XLineEndWidthItem( GetCoreValue( *m_xMtrEndWidth, m_ePoolUnit ) ) ); - m_rXLSet.Put( XLineWidthItem( GetCoreValue( *m_xMtrLineWidth, m_ePoolUnit ) ) ); + m_aLineAttributeSet.Put( XLineWidthItem( GetCoreValue( *m_xMtrLineWidth, m_ePoolUnit ) ) ); NamedColor aNamedColor = m_xLbColor->GetSelectedEntry(); XLineColorItem aLineColor(aNamedColor.m_aName, aNamedColor.m_aColor); aLineColor.setComplexColor(aNamedColor.getComplexColor()); - m_rXLSet.Put(aLineColor); + m_aLineAttributeSet.Put(aLineColor); // Centered line end if( m_xTsbCenterStart->get_state() == TRISTATE_TRUE ) - m_rXLSet.Put( XLineStartCenterItem( true ) ); + m_aLineAttributeSet.Put( XLineStartCenterItem( true ) ); else if( m_xTsbCenterStart->get_state() == TRISTATE_FALSE ) - m_rXLSet.Put( XLineStartCenterItem( false ) ); + m_aLineAttributeSet.Put( XLineStartCenterItem( false ) ); if( m_xTsbCenterEnd->get_state() == TRISTATE_TRUE ) - m_rXLSet.Put( XLineEndCenterItem( true ) ); + m_aLineAttributeSet.Put( XLineEndCenterItem( true ) ); else if( m_xTsbCenterEnd->get_state() == TRISTATE_FALSE ) - m_rXLSet.Put( XLineEndCenterItem( false ) ); + m_aLineAttributeSet.Put( XLineEndCenterItem( false ) ); // Transparency sal_uInt16 nVal = o3tl::sanitizing_cast(m_xMtrTransparent->get_value(FieldUnit::PERCENT)); - m_rXLSet.Put( XLineTransparenceItem( nVal ) ); + m_aLineAttributeSet.Put( XLineTransparenceItem( nVal ) ); - m_aCtlPreview.SetLineAttributes(m_aXLineAttr.GetItemSet()); + m_aCtlPreview.SetLineAttributes(m_aLineAttributeSet); } @@ -1228,7 +1227,7 @@ void SvxLineTabPage::ChangePreviewHdl_Impl(const weld::MetricSpinButton* pCntrl) if(m_nActLineWidth == -1) { // Don't initialize yet, get the start value - const SfxPoolItem* pOld = GetOldItem( m_rXLSet, XATTR_LINEWIDTH ); + const SfxPoolItem* pOld = GetOldItem( m_aLineAttributeSet, XATTR_LINEWIDTH ); sal_Int32 nStartLineWidth = 0; if(pOld) nStartLineWidth = static_cast(pOld)->GetValue(); @@ -1387,7 +1386,7 @@ IMPL_LINK_NOARG(SvxLineTabPage, ChangeTransparentHdl_Impl, weld::MetricSpinButto { sal_uInt16 nVal = o3tl::sanitizing_cast(m_xMtrTransparent->get_value(FieldUnit::PERCENT)); - m_rXLSet.Put(XLineTransparenceItem(nVal)); + m_aLineAttributeSet.Put(XLineTransparenceItem(nVal)); FillXLSet_Impl(); diff --git a/cui/source/tabpages/tplnedef.cxx b/cui/source/tabpages/tplnedef.cxx index 19b5e41cccc0..dea9b63328bc 100644 --- a/cui/source/tabpages/tplnedef.cxx +++ b/cui/source/tabpages/tplnedef.cxx @@ -54,8 +54,7 @@ constexpr int RET_BTN_2 = 101; SvxLineDefTabPage::SvxLineDefTabPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rInAttrs) : SfxTabPage(pPage, pController, u"cui/ui/linestyletabpage.ui"_ustr, u"LineStylePage"_ustr, &rInAttrs) , rOutAttrs(rInAttrs) - , aXLineAttr(rInAttrs.GetPool()) - , rXLSet(aXLineAttr.GetItemSet()) + , m_aLineAttributeSet(rInAttrs.getPool(), WhichRangesContainer(XATTR_LINE_FIRST, XATTR_LINE_LAST)) , pnDashListState(nullptr) , pPageType(nullptr) , nDlgType(0) @@ -99,13 +98,13 @@ SvxLineDefTabPage::SvxLineDefTabPage(weld::Container* pPage, weld::DialogControl assert(pPool && "Where is the pool?"); ePoolUnit = pPool->GetMetric( SID_ATTR_LINE_WIDTH ); - rXLSet.Put( XLineStyleItem(drawing::LineStyle_DASH) ); - rXLSet.Put( XLineWidthItem(XOUT_WIDTH) ); - rXLSet.Put( XLineDashItem( OUString(), XDash( css::drawing::DashStyle_RECT, 3, 7, 2, 40, 15 ) ) ); - rXLSet.Put( XLineColorItem(OUString(), COL_BLACK) ); + m_aLineAttributeSet.Put( XLineStyleItem(drawing::LineStyle_DASH) ); + m_aLineAttributeSet.Put( XLineWidthItem(XOUT_WIDTH) ); + m_aLineAttributeSet.Put( XLineDashItem( OUString(), XDash( css::drawing::DashStyle_RECT, 3, 7, 2, 40, 15 ) ) ); + m_aLineAttributeSet.Put( XLineColorItem(OUString(), COL_BLACK) ); // #i34740# - m_aCtlPreview.SetLineAttributes(aXLineAttr.GetItemSet()); + m_aCtlPreview.SetLineAttributes(m_aLineAttributeSet); m_xBtnAdd->connect_clicked(LINK(this, SvxLineDefTabPage, ClickAddHdl_Impl)); m_xBtnModify->connect_clicked(LINK(this, SvxLineDefTabPage, ClickModifyHdl_Impl)); @@ -323,10 +322,10 @@ void SvxLineDefTabPage::SelectLinestyleHdl_Impl(const weld::ComboBox* p) FillDialog_Impl(); - rXLSet.Put( XLineDashItem( OUString(), aDash ) ); + m_aLineAttributeSet.Put( XLineDashItem( OUString(), aDash ) ); // #i34740# - m_aCtlPreview.SetLineAttributes(aXLineAttr.GetItemSet()); + m_aCtlPreview.SetLineAttributes(m_aLineAttributeSet); m_aCtlPreview.Invalidate(); // Is not set before, in order to take the new style @@ -780,10 +779,10 @@ void SvxLineDefTabPage::FillDash_Impl() aDash.SetDashLen( m_xLbType2->get_active() == 0 ? 0 : GetCoreValue( *m_xMtrLength2, ePoolUnit ) ); aDash.SetDistance( GetCoreValue( *m_xMtrDistance, ePoolUnit ) ); - rXLSet.Put( XLineDashItem( OUString(), aDash ) ); + m_aLineAttributeSet.Put( XLineDashItem( OUString(), aDash ) ); // #i34740# - m_aCtlPreview.SetLineAttributes(aXLineAttr.GetItemSet()); + m_aCtlPreview.SetLineAttributes(m_aLineAttributeSet); } void SvxLineDefTabPage::FillDialog_Impl() diff --git a/cui/source/tabpages/tplneend.cxx b/cui/source/tabpages/tplneend.cxx index 0cb457c0a531..2db5f899bf3a 100644 --- a/cui/source/tabpages/tplneend.cxx +++ b/cui/source/tabpages/tplneend.cxx @@ -52,8 +52,7 @@ SvxLineEndDefTabPage::SvxLineEndDefTabPage(weld::Container* pPage, weld::DialogC : SfxTabPage(pPage, pController, u"cui/ui/lineendstabpage.ui"_ustr, u"LineEndPage"_ustr, &rInAttrs) , rOutAttrs(rInAttrs) , pPolyObj(nullptr) - , aXLineAttr(rInAttrs.GetPool()) - , rXLSet(aXLineAttr.GetItemSet()) + , m_aLineAttributeSet(rInAttrs.getPool(), WhichRangesContainer(XATTR_LINE_FIRST, XATTR_LINE_LAST)) , pnLineEndListState(nullptr) , pPageType(nullptr) , nDlgType(0) @@ -70,14 +69,14 @@ SvxLineEndDefTabPage::SvxLineEndDefTabPage(weld::Container* pPage, weld::DialogC // this page needs ExchangeSupport SetExchangeSupport(); - rXLSet.Put( XLineStyleItem(css::drawing::LineStyle_SOLID) ); - rXLSet.Put( XLineWidthItem(XOUT_WIDTH) ); - rXLSet.Put( XLineColorItem( OUString(), COL_BLACK ) ); - rXLSet.Put( XLineStartWidthItem( m_aCtlPreview.GetOutputSize().Height() / 2 ) ); - rXLSet.Put( XLineEndWidthItem( m_aCtlPreview.GetOutputSize().Height() / 2 ) ); + m_aLineAttributeSet.Put( XLineStyleItem(css::drawing::LineStyle_SOLID) ); + m_aLineAttributeSet.Put( XLineWidthItem(XOUT_WIDTH) ); + m_aLineAttributeSet.Put( XLineColorItem( OUString(), COL_BLACK ) ); + m_aLineAttributeSet.Put( XLineStartWidthItem( m_aCtlPreview.GetOutputSize().Height() / 2 ) ); + m_aLineAttributeSet.Put( XLineEndWidthItem( m_aCtlPreview.GetOutputSize().Height() / 2 ) ); // #i34740# - m_aCtlPreview.SetLineAttributes(aXLineAttr.GetItemSet()); + m_aCtlPreview.SetLineAttributes(m_aLineAttributeSet); m_xBtnAdd->connect_clicked(LINK(this, SvxLineEndDefTabPage, ClickAddHdl_Impl)); m_xBtnModify->connect_clicked(LINK( this, SvxLineEndDefTabPage, ClickModifyHdl_Impl)); @@ -207,11 +206,11 @@ void SvxLineEndDefTabPage::Reset( const SfxItemSet* ) m_xEdtName->set_text(m_xLbLineEnds->get_active_text()); - rXLSet.Put( XLineStartItem( OUString(), pEntry->GetLineEnd() ) ); - rXLSet.Put( XLineEndItem( OUString(), pEntry->GetLineEnd() ) ); + m_aLineAttributeSet.Put( XLineStartItem( OUString(), pEntry->GetLineEnd() ) ); + m_aLineAttributeSet.Put( XLineEndItem( OUString(), pEntry->GetLineEnd() ) ); // #i34740# - m_aCtlPreview.SetLineAttributes(aXLineAttr.GetItemSet()); + m_aCtlPreview.SetLineAttributes(m_aLineAttributeSet); m_aCtlPreview.Invalidate(); } @@ -246,11 +245,11 @@ void SvxLineEndDefTabPage::SelectLineEndHdl_Impl() m_xEdtName->set_text(m_xLbLineEnds->get_active_text()); - rXLSet.Put( XLineStartItem( OUString(), pEntry->GetLineEnd() ) ); - rXLSet.Put( XLineEndItem( OUString(), pEntry->GetLineEnd() ) ); + m_aLineAttributeSet.Put( XLineStartItem( OUString(), pEntry->GetLineEnd() ) ); + m_aLineAttributeSet.Put( XLineEndItem( OUString(), pEntry->GetLineEnd() ) ); // #i34740# - m_aCtlPreview.SetLineAttributes(aXLineAttr.GetItemSet()); + m_aCtlPreview.SetLineAttributes(m_aLineAttributeSet); m_aCtlPreview.Invalidate(); // Is not set before, in order to only take the new style, diff --git a/cui/source/tabpages/tppattern.cxx b/cui/source/tabpages/tppattern.cxx index 5ed3751e7047..67fd8d1614ee 100644 --- a/cui/source/tabpages/tppattern.cxx +++ b/cui/source/tabpages/tppattern.cxx @@ -80,8 +80,7 @@ SvxPatternTabPage::SvxPatternTabPage(weld::Container* pPage, weld::DialogControl , m_rOutAttrs(rInAttrs) , m_nPatternListState(ChangeType::NONE) , m_pnColorListState(nullptr) - , m_aXFillAttr(rInAttrs.GetPool()) - , m_rXFSet(m_aXFillAttr.GetItemSet()) + , m_aFillAttributeSet(rInAttrs.getPool(), WhichRangesContainer(XATTR_FILL_FIRST, XATTR_FILL_LAST)) , m_xCtlPixel(new SvxPixelCtl(this)) , m_xLbColor(new ColorListBox(m_xBuilder->weld_menu_button(u"LB_COLOR"_ustr), [this]{ return GetDialogController()->getDialog(); })) @@ -104,8 +103,8 @@ SvxPatternTabPage::SvxPatternTabPage(weld::Container* pPage, weld::DialogControl SetExchangeSupport(); // setting the output device - m_rXFSet.Put( XFillStyleItem(drawing::FillStyle_BITMAP) ); - m_rXFSet.Put( XFillBitmapItem(OUString(), Graphic()) ); + m_aFillAttributeSet.Put( XFillStyleItem(drawing::FillStyle_BITMAP) ); + m_aFillAttributeSet.Put( XFillBitmapItem(OUString(), Graphic()) ); m_xBtnAdd->connect_clicked( LINK( this, SvxPatternTabPage, ClickAddHdl_Impl ) ); m_xBtnModify->connect_clicked( LINK( this, SvxPatternTabPage, ClickModifyHdl_Impl ) ); @@ -227,8 +226,8 @@ void SvxPatternTabPage::Reset( const SfxItemSet* ) const XFillBitmapItem aBmpItem(OUString(), Graphic(m_xBitmapCtl->GetBitmap())); if(aBmpItem.isPattern()) { - m_rXFSet.Put( aBmpItem ); - m_aCtlPreview.SetAttributes( m_aXFillAttr.GetItemSet() ); + m_aFillAttributeSet.Put( aBmpItem ); + m_aCtlPreview.SetAttributes(m_aFillAttributeSet); m_aCtlPreview.Invalidate(); } @@ -315,10 +314,10 @@ void SvxPatternTabPage::UpdatePattern() // update m_xBitmapCtl, rXFSet and m_aCtlPreview m_xBitmapCtl->SetPixelColor( aPixelColor ); m_xBitmapCtl->SetBackgroundColor( aBackColor ); - m_rXFSet.ClearItem(); - m_rXFSet.Put(XFillStyleItem(drawing::FillStyle_BITMAP)); - m_rXFSet.Put(XFillBitmapItem(OUString(), Graphic(m_xBitmapCtl->GetBitmap()))); - m_aCtlPreview.SetAttributes( m_aXFillAttr.GetItemSet() ); + m_aFillAttributeSet.ClearItem(); + m_aFillAttributeSet.Put(XFillStyleItem(drawing::FillStyle_BITMAP)); + m_aFillAttributeSet.Put(XFillBitmapItem(OUString(), Graphic(m_xBitmapCtl->GetBitmap()))); + m_aCtlPreview.SetAttributes(m_aFillAttributeSet); m_aCtlPreview.Invalidate(); } else @@ -516,8 +515,8 @@ void SvxPatternTabPage::ChangeColor_Impl() m_xBitmapCtl->SetBackgroundColor( m_xLbBackgroundColor->GetSelectEntryColor() ); // get bitmap and display it - m_rXFSet.Put(XFillBitmapItem(OUString(), Graphic(m_xBitmapCtl->GetBitmap()))); - m_aCtlPreview.SetAttributes( m_aXFillAttr.GetItemSet() ); + m_aFillAttributeSet.Put(XFillBitmapItem(OUString(), Graphic(m_xBitmapCtl->GetBitmap()))); + m_aCtlPreview.SetAttributes(m_aFillAttributeSet); m_aCtlPreview.Invalidate(); } @@ -528,8 +527,8 @@ void SvxPatternTabPage::PointChanged(weld::DrawingArea* pDrawingArea, RectPoint) m_xBitmapCtl->SetBmpArray(m_xCtlPixel->GetBitmapPixelPtr()); // get bitmap and display it - m_rXFSet.Put(XFillBitmapItem(OUString(), Graphic(m_xBitmapCtl->GetBitmap()))); - m_aCtlPreview.SetAttributes( m_aXFillAttr.GetItemSet() ); + m_aFillAttributeSet.Put(XFillBitmapItem(OUString(), Graphic(m_xBitmapCtl->GetBitmap()))); + m_aCtlPreview.SetAttributes(m_aFillAttributeSet); m_aCtlPreview.Invalidate(); } diff --git a/cui/source/tabpages/tpshadow.cxx b/cui/source/tabpages/tpshadow.cxx index bd9b66f3c0fd..d984db540f45 100644 --- a/cui/source/tabpages/tpshadow.cxx +++ b/cui/source/tabpages/tpshadow.cxx @@ -57,8 +57,7 @@ SvxShadowTabPage::SvxShadowTabPage(weld::Container* pPage, weld::DialogControlle , m_pnColorListState(nullptr) , m_nPageType(PageType::Area) , m_nDlgType(0) - , m_aXFillAttr(rInAttrs.GetPool()) - , m_rXFSet(m_aXFillAttr.GetItemSet()) + , m_aFillAttributeSet(rInAttrs.getPool(), WhichRangesContainer(XATTR_FILL_FIRST, XATTR_FILL_LAST)) , m_aCtlPosition(this) , m_xTsbShowShadow(m_xBuilder->weld_check_button(u"TSB_SHOW_SHADOW"_ustr)) , m_xGridShadow(m_xBuilder->weld_widget(u"gridSHADOW"_ustr)) @@ -101,21 +100,21 @@ SvxShadowTabPage::SvxShadowTabPage(weld::Container* pPage, weld::DialogControlle case drawing::FillStyle_SOLID: if( SfxItemState::INVALID != m_rOutAttrs.GetItemState( XATTR_FILLCOLOR ) ) { - m_rXFSet.Put( m_rOutAttrs.Get( XATTR_FILLCOLOR ) ); + m_aFillAttributeSet.Put( m_rOutAttrs.Get( XATTR_FILLCOLOR ) ); } break; case drawing::FillStyle_GRADIENT: if( SfxItemState::INVALID != m_rOutAttrs.GetItemState( XATTR_FILLGRADIENT ) ) { - m_rXFSet.Put( m_rOutAttrs.Get( XATTR_FILLGRADIENT ) ); + m_aFillAttributeSet.Put( m_rOutAttrs.Get( XATTR_FILLGRADIENT ) ); } break; case drawing::FillStyle_HATCH: if( SfxItemState::INVALID != m_rOutAttrs.GetItemState( XATTR_FILLHATCH ) ) { - m_rXFSet.Put( m_rOutAttrs.Get( XATTR_FILLHATCH ) ); + m_aFillAttributeSet.Put( m_rOutAttrs.Get( XATTR_FILLHATCH ) ); } break; @@ -123,7 +122,7 @@ SvxShadowTabPage::SvxShadowTabPage(weld::Container* pPage, weld::DialogControlle { if( SfxItemState::INVALID != m_rOutAttrs.GetItemState( XATTR_FILLBITMAP ) ) { - m_rXFSet.Put( m_rOutAttrs.Get( XATTR_FILLBITMAP ) ); + m_aFillAttributeSet.Put( m_rOutAttrs.Get( XATTR_FILLBITMAP ) ); } } break; @@ -133,7 +132,7 @@ SvxShadowTabPage::SvxShadowTabPage(weld::Container* pPage, weld::DialogControlle } else { - m_rXFSet.Put( XFillColorItem( OUString(), COL_LIGHTRED ) ); + m_aFillAttributeSet.Put( XFillColorItem( OUString(), COL_LIGHTRED ) ); } if(drawing::FillStyle_NONE == eXFS) @@ -145,8 +144,8 @@ SvxShadowTabPage::SvxShadowTabPage(weld::Container* pPage, weld::DialogControlle eXFS = drawing::FillStyle_SOLID; } - m_rXFSet.Put( XFillStyleItem( eXFS ) ); - m_aCtlXRectPreview.SetRectangleAttributes(m_aXFillAttr.GetItemSet()); + m_aFillAttributeSet.Put( XFillStyleItem( eXFS ) ); + m_aCtlXRectPreview.SetRectangleAttributes(m_aFillAttributeSet); m_xTsbShowShadow->connect_toggled(LINK( this, SvxShadowTabPage, ClickShadowHdl_Impl)); m_xLbShadowColor->SetSelectHdl( LINK( this, SvxShadowTabPage, SelectShadowHdl_Impl ) ); @@ -465,13 +464,13 @@ IMPL_LINK_NOARG(SvxShadowTabPage, SelectShadowHdl_Impl, ColorListBox&, void) IMPL_LINK_NOARG(SvxShadowTabPage, ModifyShadowHdl_Impl, weld::MetricSpinButton&, void) { if (m_xTsbShowShadow->get_state() == TRISTATE_TRUE) - m_rXFSet.Put( XFillStyleItem( drawing::FillStyle_SOLID ) ); + m_aFillAttributeSet.Put( XFillStyleItem( drawing::FillStyle_SOLID ) ); else - m_rXFSet.Put( XFillStyleItem( drawing::FillStyle_NONE ) ); + m_aFillAttributeSet.Put( XFillStyleItem( drawing::FillStyle_NONE ) ); - m_rXFSet.Put( XFillColorItem( OUString(), m_xLbShadowColor->GetSelectEntryColor() ) ); + m_aFillAttributeSet.Put( XFillColorItem( OUString(), m_xLbShadowColor->GetSelectEntryColor() ) ); sal_uInt16 nVal = static_cast(m_xMtrTransparent->get_value(FieldUnit::PERCENT)); - m_rXFSet.Put( XFillTransparenceItem( nVal ) ); + m_aFillAttributeSet.Put( XFillTransparenceItem( nVal ) ); // shadow removal sal_Int32 nX = 0, nY = 0; @@ -491,7 +490,7 @@ IMPL_LINK_NOARG(SvxShadowTabPage, ModifyShadowHdl_Impl, weld::MetricSpinButton&, m_aCtlXRectPreview.SetShadowPosition(Point(nX, nY)); - m_aCtlXRectPreview.SetShadowAttributes(m_aXFillAttr.GetItemSet()); + m_aCtlXRectPreview.SetShadowAttributes(m_aFillAttributeSet); m_aCtlXRectPreview.Invalidate(); } diff --git a/cui/source/tabpages/tptrans.cxx b/cui/source/tabpages/tptrans.cxx index e9e159c6713d..579f2c7fe162 100644 --- a/cui/source/tabpages/tptrans.cxx +++ b/cui/source/tabpages/tptrans.cxx @@ -54,10 +54,10 @@ IMPL_LINK_NOARG(SvxTransparenceTabPage, ClickTransOffHdl_Impl, weld::Toggleable& ActivateGradient(false); // Preview - rXFSet.ClearItem(XATTR_FILLTRANSPARENCE); - rXFSet.ClearItem(XATTR_FILLFLOATTRANSPARENCE); - m_aCtlXRectPreview.SetAttributes( aXFillAttr.GetItemSet() ); - m_aCtlBitmapPreview.SetAttributes( aXFillAttr.GetItemSet() ); + m_aFillAttributeSet.ClearItem(XATTR_FILLTRANSPARENCE); + m_aFillAttributeSet.ClearItem(XATTR_FILLFLOATTRANSPARENCE); + m_aCtlXRectPreview.SetAttributes(m_aFillAttributeSet); + m_aCtlBitmapPreview.SetAttributes(m_aFillAttributeSet); InvalidatePreview(false); } @@ -69,7 +69,7 @@ IMPL_LINK_NOARG(SvxTransparenceTabPage, ClickTransLinearHdl_Impl, weld::Toggleab ActivateGradient(false); // preview - rXFSet.ClearItem (XATTR_FILLFLOATTRANSPARENCE); + m_aFillAttributeSet.ClearItem (XATTR_FILLFLOATTRANSPARENCE); ModifyTransparentHdl_Impl(*m_xMtrTransparent); } @@ -80,7 +80,7 @@ IMPL_LINK_NOARG(SvxTransparenceTabPage, ClickTransGradientHdl_Impl, weld::Toggle ActivateGradient(true); // preview - rXFSet.ClearItem (XATTR_FILLTRANSPARENCE); + m_aFillAttributeSet.ClearItem (XATTR_FILLTRANSPARENCE); ModifiedTrgrHdl_Impl(nullptr); } @@ -96,7 +96,7 @@ void SvxTransparenceTabPage::ActivateLinear(bool bActivate) IMPL_LINK_NOARG(SvxTransparenceTabPage, ModifyTransparentHdl_Impl, weld::MetricSpinButton&, void) { sal_uInt16 nPos = o3tl::sanitizing_cast(m_xMtrTransparent->get_value(FieldUnit::PERCENT)); - rXFSet.Put(XFillTransparenceItem(nPos)); + m_aFillAttributeSet.Put(XFillTransparenceItem(nPos)); // preview InvalidatePreview(); @@ -131,7 +131,7 @@ void SvxTransparenceTabPage::ModifiedTrgrHdl_Impl(const weld::ComboBox* pControl 100, 100); XFillFloatTransparenceItem aItem( aTmpGradient); - rXFSet.Put ( aItem ); + m_aFillAttributeSet.Put ( aItem ); InvalidatePreview(); } @@ -191,8 +191,7 @@ SvxTransparenceTabPage::SvxTransparenceTabPage(weld::Container* pPage, weld::Dia , nPageType(PageType::Area) , nDlgType(0) , bBitmap(false) - , aXFillAttr(rInAttrs.GetPool()) - , rXFSet(aXFillAttr.GetItemSet()) + , m_aFillAttributeSet(rInAttrs.getPool(), WhichRangesContainer(XATTR_FILL_FIRST, XATTR_FILL_LAST)) , m_xRbtTransOff(m_xBuilder->weld_radio_button(u"RBT_TRANS_OFF"_ustr)) , m_xRbtTransLinear(m_xBuilder->weld_radio_button(u"RBT_TRANS_LINEAR"_ustr)) , m_xRbtTransGradient(m_xBuilder->weld_radio_button(u"RBT_TRANS_GRADIENT"_ustr)) @@ -459,15 +458,15 @@ bool SvxTransparenceTabPage::InitPreview(const SfxItemSet& rSet) // Get fillstyle for preview rSet.SetAccessTrackerIgnore(true); - rXFSet.Put ( rSet.Get(XATTR_FILLSTYLE) ); - rXFSet.Put ( rSet.Get(XATTR_FILLCOLOR) ); - rXFSet.Put ( rSet.Get(XATTR_FILLGRADIENT) ); - rXFSet.Put ( rSet.Get(XATTR_FILLHATCH) ); - rXFSet.Put ( rSet.Get(XATTR_FILLBACKGROUND) ); - rXFSet.Put ( rSet.Get(XATTR_FILLBITMAP) ); + m_aFillAttributeSet.Put ( rSet.Get(XATTR_FILLSTYLE) ); + m_aFillAttributeSet.Put ( rSet.Get(XATTR_FILLCOLOR) ); + m_aFillAttributeSet.Put ( rSet.Get(XATTR_FILLGRADIENT) ); + m_aFillAttributeSet.Put ( rSet.Get(XATTR_FILLHATCH) ); + m_aFillAttributeSet.Put ( rSet.Get(XATTR_FILLBACKGROUND) ); + m_aFillAttributeSet.Put ( rSet.Get(XATTR_FILLBITMAP) ); - m_aCtlXRectPreview.SetAttributes( aXFillAttr.GetItemSet() ); - m_aCtlBitmapPreview.SetAttributes( aXFillAttr.GetItemSet() ); + m_aCtlXRectPreview.SetAttributes(m_aFillAttributeSet); + m_aCtlBitmapPreview.SetAttributes(m_aFillAttributeSet); bBitmap = rSet.Get(XATTR_FILLSTYLE).GetValue() == drawing::FillStyle_BITMAP; rSet.SetAccessTrackerIgnore(false); @@ -494,7 +493,7 @@ void SvxTransparenceTabPage::InvalidatePreview (bool bEnable) if ( bEnable ) { m_xCtlBitmapPreview->set_sensitive(true); - m_aCtlBitmapPreview.SetAttributes( aXFillAttr.GetItemSet() ); + m_aCtlBitmapPreview.SetAttributes(m_aFillAttributeSet); } else m_xCtlBitmapPreview->set_sensitive(false); @@ -505,7 +504,7 @@ void SvxTransparenceTabPage::InvalidatePreview (bool bEnable) if ( bEnable ) { m_xCtlXRectPreview->set_sensitive(true); - m_aCtlXRectPreview.SetAttributes( aXFillAttr.GetItemSet() ); + m_aCtlXRectPreview.SetAttributes(m_aFillAttributeSet); } else m_xCtlXRectPreview->set_sensitive(false); diff --git a/include/svl/itemset.hxx b/include/svl/itemset.hxx index 3cf68d03a4d9..e90d109142fe 100644 --- a/include/svl/itemset.hxx +++ b/include/svl/itemset.hxx @@ -96,6 +96,7 @@ class SAL_WARN_UNUSED SVL_DLLPUBLIC SfxItemSet #ifdef DBG_UTIL sal_uInt16 m_nRegisteredSfxItemIter; + bool m_bDeleted; #endif WhichRangesContainer m_aWhichRanges; ///< array of Which Ranges @@ -126,6 +127,10 @@ public: SfxItemSet( SfxItemPool& rPool, sal_uInt16 nWhichStart, sal_uInt16 nWhichEnd ) : SfxItemSet(rPool, WhichRangesContainer(nWhichStart, nWhichEnd)) {} +#ifndef NDEBUG + bool isDeleted() const { return m_bDeleted; } +#endif + template static SfxItemSet makeFixedSfxItemSet(SfxItemPool& pool) { @@ -242,6 +247,7 @@ public: void MergeValue( const SfxPoolItem& rItem); SfxItemPool* GetPool() const { return m_pPool; } + SfxItemPool& getPool() const { assert(!isDeleted() && "Destructed instance used (!)"); return *m_pPool; } const WhichRangesContainer & GetRanges() const { return m_aWhichRanges; } void SetRanges( const WhichRangesContainer& ); void SetRanges( WhichRangesContainer&& ); diff --git a/include/svl/poolitem.hxx b/include/svl/poolitem.hxx index 871285a4b6a3..be34b0b06b2b 100644 --- a/include/svl/poolitem.hxx +++ b/include/svl/poolitem.hxx @@ -507,7 +507,6 @@ enum class SfxItemType : sal_uInt16 SwUINumRuleItemType, SwWrtShellItemType, XColorItemType, - XFillAttrSetItemType, XFillBackgroundItemType, XFillBitmapItemType, XFillBmpPosItemType, @@ -540,7 +539,6 @@ enum class SfxItemType : sal_uInt16 XFormTextStartItemType, XFormTextStyleItemType, XGradientStepCountItemType, - XLineAttrSetItemType, XLineCapItemType, XLineColorItemType, XLineDashItemType, diff --git a/include/svx/strings.hrc b/include/svx/strings.hrc index 48f084c79954..f2dc29bfe11a 100644 --- a/include/svx/strings.hrc +++ b/include/svx/strings.hrc @@ -324,7 +324,6 @@ #define SIP_XA_LINEENDCENTER NC_("SIP_XA_LINEENDCENTER", "Center arrowend") #define SIP_XA_LINETRANSPARENCE NC_("SIP_XA_LINETRANSPARENCE", "Line transparency") #define SIP_XA_LINEJOINT NC_("SIP_XA_LINEJOINT", "Line joint") -#define SIP_XATTRSET_LINE NC_("SIP_XATTRSET_LINE", "Line attributes") #define SIP_XA_FILLSTYLE NC_("SIP_XA_FILLSTYLE", "Fill style") #define SIP_XA_FILLCOLOR NC_("SIP_XA_FILLCOLOR", "Fillcolor") #define SIP_XA_FILLGRADIENT NC_("SIP_XA_FILLGRADIENT", "Gradient") @@ -346,7 +345,6 @@ #define SIP_XA_FILLBMP_POSOFFSETY NC_("SIP_XA_FILLBMP_POSOFFSETY", "Tile position Y in %") #define SIP_XA_FILLBACKGROUND NC_("SIP_XA_FILLBACKGROUND", "Background fill") #define SIP_XA_FILLUSESLIDEBACKGROUND NC_("SIP_XA_FILLUSESLIDEBACKGROUND", "Use slide background fill") -#define SIP_XATTRSET_FILL NC_("SIP_XATTRSET_FILL", "Area attributes") #define SIP_XA_FORMTXTSTYLE NC_("SIP_XA_FORMTXTSTYLE", "Fontwork style") #define SIP_XA_FORMTXTADJUST NC_("SIP_XA_FORMTXTADJUST", "Fontwork alignment") #define SIP_XA_FORMTXTDISTANCE NC_("SIP_XA_FORMTXTDISTANCE", "Fontwork spacing") diff --git a/include/svx/svddef.hxx b/include/svx/svddef.hxx index 775d69a48a2d..ad934f229938 100644 --- a/include/svx/svddef.hxx +++ b/include/svx/svddef.hxx @@ -25,14 +25,10 @@ /*************************************************************************/ // SdrItemPool V2, 09-11-1995: -// 7 new Items for XLineAttrSetItem -// 7 new Items for XFillAttrSetItem // 8 new Items for SdrShadowSetItem // 5 new Items for SdrCaptionSetItem // 25 new Items for SdrMiscSetItem // 6 new Items for SdrNotPersist -// SdrItemPool V3, 29-02-1996 -// 17 new Items for XFillAttrSetItem (Bitmapfill) // SdrItemPool V4, 10-08-1996 // 45 new Items for Edge and Measure (Connector and Measuring object) // SdrItemPool V4+, 18-10-1996 diff --git a/include/svx/xdef.hxx b/include/svx/xdef.hxx index 5cfdde78eab8..de89bb7322a3 100644 --- a/include/svx/xdef.hxx +++ b/include/svx/xdef.hxx @@ -31,7 +31,6 @@ \************************************************************************/ class SfxMetricItem; -class XFillAttrSetItem; class XFillBackgroundItem; class XFillBitmapItem; class XFillBmpPosItem; @@ -63,7 +62,6 @@ class XFormTextShadowYValItem; class XFormTextStartItem; class XFormTextStyleItem; class XGradientStepCountItem; -class XLineAttrSetItem; class XLineCapItem; class XLineColorItem; class XLineDashItem; @@ -102,49 +100,47 @@ inline constexpr TypedWhichId XATTR_LINETRANSPARENCE (XAT inline constexpr TypedWhichId XATTR_LINEJOINT (XATTR_LINE_FIRST + 11); // 1011 inline constexpr TypedWhichId XATTR_LINECAP (XATTR_LINE_FIRST + 12); // 1012 inline constexpr sal_uInt16 XATTR_LINE_LAST (XATTR_LINECAP); // 1012 -inline constexpr TypedWhichId XATTRSET_LINE (XATTR_LINE_LAST + 1); // 1013 -inline constexpr sal_uInt16 XATTR_FILL_FIRST (XATTRSET_LINE + 1); // 1014 -inline constexpr TypedWhichId XATTR_FILLSTYLE (XATTR_FILL_FIRST); // 1014 -inline constexpr TypedWhichId XATTR_FILLCOLOR (XATTR_FILL_FIRST + 1); // 1015 -inline constexpr TypedWhichId XATTR_FILLGRADIENT (XATTR_FILL_FIRST + 2); // 1016 -inline constexpr TypedWhichId XATTR_FILLHATCH (XATTR_FILL_FIRST + 3); // 1017 -inline constexpr TypedWhichId XATTR_FILLBITMAP (XATTR_FILL_FIRST + 4); // 1018 -inline constexpr TypedWhichId XATTR_FILLTRANSPARENCE (XATTR_FILL_FIRST + 5); // 1019 -inline constexpr TypedWhichId XATTR_GRADIENTSTEPCOUNT (XATTR_FILL_FIRST + 6); // 1020 -inline constexpr TypedWhichId XATTR_FILLBMP_TILE (XATTR_FILL_FIRST + 7); // 1021 -inline constexpr TypedWhichId XATTR_FILLBMP_POS (XATTR_FILL_FIRST + 8); // 1022 -inline constexpr TypedWhichId XATTR_FILLBMP_SIZEX (XATTR_FILL_FIRST + 9); // 1023 -inline constexpr TypedWhichId XATTR_FILLBMP_SIZEY (XATTR_FILL_FIRST + 10); // 1024 -inline constexpr TypedWhichId XATTR_FILLFLOATTRANSPARENCE (XATTR_FILL_FIRST + 11); // 1025 -inline constexpr TypedWhichId XATTR_SECONDARYFILLCOLOR (XATTR_FILL_FIRST + 12); // 1026 -inline constexpr TypedWhichId XATTR_FILLBMP_SIZELOG (XATTR_FILL_FIRST + 13); // 1027 -inline constexpr TypedWhichId XATTR_FILLBMP_TILEOFFSETX (XATTR_FILL_FIRST + 14); // 1028 -inline constexpr TypedWhichId XATTR_FILLBMP_TILEOFFSETY (XATTR_FILL_FIRST + 15); // 1029 -inline constexpr TypedWhichId XATTR_FILLBMP_STRETCH (XATTR_FILL_FIRST + 16); // 1030 -inline constexpr TypedWhichId XATTR_FILLBMP_POSOFFSETX (XATTR_FILL_FIRST + 17); // 1031 -inline constexpr TypedWhichId XATTR_FILLBMP_POSOFFSETY (XATTR_FILL_FIRST + 18); // 1032 -inline constexpr TypedWhichId XATTR_FILLBACKGROUND (XATTR_FILL_FIRST + 19); // 1033 -inline constexpr TypedWhichId XATTR_FILLUSESLIDEBACKGROUND (XATTR_FILL_FIRST + 20);// 1034 -inline constexpr sal_uInt16 XATTR_FILL_LAST (XATTR_FILLUSESLIDEBACKGROUND); // 1034 -inline constexpr TypedWhichId XATTRSET_FILL (XATTR_FILL_LAST + 1); // 1035 +inline constexpr sal_uInt16 XATTR_FILL_FIRST (XATTR_LINE_LAST + 1); // 1013 +inline constexpr TypedWhichId XATTR_FILLSTYLE (XATTR_FILL_FIRST); // 1013 +inline constexpr TypedWhichId XATTR_FILLCOLOR (XATTR_FILL_FIRST + 1); // 1014 +inline constexpr TypedWhichId XATTR_FILLGRADIENT (XATTR_FILL_FIRST + 2); // 1015 +inline constexpr TypedWhichId XATTR_FILLHATCH (XATTR_FILL_FIRST + 3); // 1016 +inline constexpr TypedWhichId XATTR_FILLBITMAP (XATTR_FILL_FIRST + 4); // 1017 +inline constexpr TypedWhichId XATTR_FILLTRANSPARENCE (XATTR_FILL_FIRST + 5); // 1018 +inline constexpr TypedWhichId XATTR_GRADIENTSTEPCOUNT (XATTR_FILL_FIRST + 6); // 1019 +inline constexpr TypedWhichId XATTR_FILLBMP_TILE (XATTR_FILL_FIRST + 7); // 1020 +inline constexpr TypedWhichId XATTR_FILLBMP_POS (XATTR_FILL_FIRST + 8); // 1021 +inline constexpr TypedWhichId XATTR_FILLBMP_SIZEX (XATTR_FILL_FIRST + 9); // 1022 +inline constexpr TypedWhichId XATTR_FILLBMP_SIZEY (XATTR_FILL_FIRST + 10); // 1023 +inline constexpr TypedWhichId XATTR_FILLFLOATTRANSPARENCE (XATTR_FILL_FIRST + 11); // 1024 +inline constexpr TypedWhichId XATTR_SECONDARYFILLCOLOR (XATTR_FILL_FIRST + 12); // 1025 +inline constexpr TypedWhichId XATTR_FILLBMP_SIZELOG (XATTR_FILL_FIRST + 13); // 1026 +inline constexpr TypedWhichId XATTR_FILLBMP_TILEOFFSETX (XATTR_FILL_FIRST + 14); // 1027 +inline constexpr TypedWhichId XATTR_FILLBMP_TILEOFFSETY (XATTR_FILL_FIRST + 15); // 1028 +inline constexpr TypedWhichId XATTR_FILLBMP_STRETCH (XATTR_FILL_FIRST + 16); // 1029 +inline constexpr TypedWhichId XATTR_FILLBMP_POSOFFSETX (XATTR_FILL_FIRST + 17); // 1030 +inline constexpr TypedWhichId XATTR_FILLBMP_POSOFFSETY (XATTR_FILL_FIRST + 18); // 1031 +inline constexpr TypedWhichId XATTR_FILLBACKGROUND (XATTR_FILL_FIRST + 19); // 1032 +inline constexpr TypedWhichId XATTR_FILLUSESLIDEBACKGROUND (XATTR_FILL_FIRST + 20);// 1033 +inline constexpr sal_uInt16 XATTR_FILL_LAST (XATTR_FILLUSESLIDEBACKGROUND); // 1033 -inline constexpr sal_uInt16 XATTR_TEXT_FIRST (XATTRSET_FILL + 1); // 1036 -inline constexpr TypedWhichId XATTR_FORMTXTSTYLE (XATTR_TEXT_FIRST); // 1036 -inline constexpr TypedWhichId XATTR_FORMTXTADJUST (XATTR_TEXT_FIRST + 1); // 1037 -inline constexpr TypedWhichId XATTR_FORMTXTDISTANCE (XATTR_TEXT_FIRST + 2); // 1038 -inline constexpr TypedWhichId XATTR_FORMTXTSTART (XATTR_TEXT_FIRST + 3); // 1039 -inline constexpr TypedWhichId XATTR_FORMTXTMIRROR (XATTR_TEXT_FIRST + 4); // 1040 -inline constexpr TypedWhichId XATTR_FORMTXTOUTLINE (XATTR_TEXT_FIRST + 5); // 1041 -inline constexpr TypedWhichId XATTR_FORMTXTSHADOW (XATTR_TEXT_FIRST + 6); // 1042 -inline constexpr TypedWhichId XATTR_FORMTXTSHDWCOLOR (XATTR_TEXT_FIRST + 7); // 1043 -inline constexpr TypedWhichId XATTR_FORMTXTSHDWXVAL (XATTR_TEXT_FIRST + 8); // 1044 -inline constexpr TypedWhichId XATTR_FORMTXTSHDWYVAL (XATTR_TEXT_FIRST + 9); // 1045 -inline constexpr TypedWhichId XATTR_FORMTXTHIDEFORM (XATTR_TEXT_FIRST + 10); // 1046 -inline constexpr TypedWhichId XATTR_FORMTXTSHDWTRANSP (XATTR_TEXT_FIRST + 11); // 1047 -inline constexpr sal_uInt16 XATTR_TEXT_LAST (XATTR_FORMTXTSHDWTRANSP);// 1047 +inline constexpr sal_uInt16 XATTR_TEXT_FIRST (XATTR_FILL_LAST + 1); // 1034 +inline constexpr TypedWhichId XATTR_FORMTXTSTYLE (XATTR_TEXT_FIRST); // 1034 +inline constexpr TypedWhichId XATTR_FORMTXTADJUST (XATTR_TEXT_FIRST + 1); // 1035 +inline constexpr TypedWhichId XATTR_FORMTXTDISTANCE (XATTR_TEXT_FIRST + 2); // 1036 +inline constexpr TypedWhichId XATTR_FORMTXTSTART (XATTR_TEXT_FIRST + 3); // 1037 +inline constexpr TypedWhichId XATTR_FORMTXTMIRROR (XATTR_TEXT_FIRST + 4); // 1038 +inline constexpr TypedWhichId XATTR_FORMTXTOUTLINE (XATTR_TEXT_FIRST + 5); // 1039 +inline constexpr TypedWhichId XATTR_FORMTXTSHADOW (XATTR_TEXT_FIRST + 6); // 1040 +inline constexpr TypedWhichId XATTR_FORMTXTSHDWCOLOR (XATTR_TEXT_FIRST + 7); // 1041 +inline constexpr TypedWhichId XATTR_FORMTXTSHDWXVAL (XATTR_TEXT_FIRST + 8); // 1042 +inline constexpr TypedWhichId XATTR_FORMTXTSHDWYVAL (XATTR_TEXT_FIRST + 9); // 1043 +inline constexpr TypedWhichId XATTR_FORMTXTHIDEFORM (XATTR_TEXT_FIRST + 10); // 1044 +inline constexpr TypedWhichId XATTR_FORMTXTSHDWTRANSP (XATTR_TEXT_FIRST + 11); // 1045 +inline constexpr sal_uInt16 XATTR_TEXT_LAST (XATTR_FORMTXTSHDWTRANSP);// 1045 -inline constexpr sal_uInt16 XATTR_END = XATTR_TEXT_LAST; // 1047 +inline constexpr sal_uInt16 XATTR_END = XATTR_TEXT_LAST; // 1045 #endif diff --git a/solenv/clang-format/excludelist b/solenv/clang-format/excludelist index 1d2a91dbe74e..f63a20146753 100644 --- a/solenv/clang-format/excludelist +++ b/solenv/clang-format/excludelist @@ -5765,7 +5765,6 @@ include/svx/xdash.hxx include/svx/xdef.hxx include/svx/xenum.hxx include/svx/xfillit0.hxx -include/svx/xflasit.hxx include/svx/xflbckit.hxx include/svx/xflbmpit.hxx include/svx/xflbmsli.hxx @@ -5791,7 +5790,6 @@ include/svx/xhatch.hxx include/svx/xit.hxx include/svx/xlineit0.hxx include/svx/xlinjoit.hxx -include/svx/xlnasit.hxx include/svx/xlncapit.hxx include/svx/xlnclit.hxx include/svx/xlndsit.hxx diff --git a/svl/source/items/itemset.cxx b/svl/source/items/itemset.cxx index b2a8ad0e6f24..6798bcbdeed5 100644 --- a/svl/source/items/itemset.cxx +++ b/svl/source/items/itemset.cxx @@ -218,6 +218,7 @@ SfxItemSet::SfxItemSet(SfxItemPool& rPool) , m_nRegister(0) #ifdef DBG_UTIL , m_nRegisteredSfxItemIter(0) +, m_bDeleted(false) #endif , m_aWhichRanges(rPool.GetMergedIdRanges()) , m_aPoolItemMap() @@ -235,6 +236,7 @@ SfxItemSet::SfxItemSet(SfxItemPool& pool, WhichRangesContainer wids) , m_nRegister(0) #ifdef DBG_UTIL , m_nRegisteredSfxItemIter(0) +, m_bDeleted(false) #endif , m_aWhichRanges(std::move(wids)) , m_aPoolItemMap() @@ -253,6 +255,7 @@ SfxItemSet::SfxItemSet( const SfxItemSet& rASet ) , m_nRegister( 0 ) #ifdef DBG_UTIL , m_nRegisteredSfxItemIter(0) +, m_bDeleted(false) #endif , m_aWhichRanges( rASet.m_aWhichRanges ) , m_aPoolItemMap() @@ -281,6 +284,7 @@ SfxItemSet::SfxItemSet(SfxItemSet&& rASet) noexcept , m_nRegister( rASet.m_nRegister ) #ifdef DBG_UTIL , m_nRegisteredSfxItemIter(0) +, m_bDeleted(false) #endif , m_aWhichRanges( std::move(rASet.m_aWhichRanges) ) , m_aPoolItemMap( std::move(rASet.m_aPoolItemMap) ) @@ -319,6 +323,9 @@ SfxItemSet::~SfxItemSet() // for invariant-testing m_aWhichRanges.reset(); +#ifdef DBG_UTIL + m_bDeleted = true; +#endif } diff --git a/svx/sdi/xoitems.sdi b/svx/sdi/xoitems.sdi index 3d8def73aebb..c144d6394664 100644 --- a/svx/sdi/xoitems.sdi +++ b/svx/sdi/xoitems.sdi @@ -16,7 +16,6 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -//item String XFillAttrSetItem; SfxSetItem! struct XFillBitmap { String Name MID_NAME; @@ -88,8 +87,6 @@ enum SvxFillStyle item SvxFillStyle XFillStyleItem; -//item String XLineAttrSetItem; SfxSetItem! - struct XLineColor { INT32 Color MID_COLOR_RGB; diff --git a/svx/source/svdraw/svdattr.cxx b/svx/source/svdraw/svdattr.cxx index 0babec0b46d9..69b8e1d3fa24 100644 --- a/svx/source/svdraw/svdattr.cxx +++ b/svx/source/svdraw/svdattr.cxx @@ -63,7 +63,6 @@ #include #include #include -#include #include #include #include @@ -75,7 +74,6 @@ #include #include #include -#include #include #include #include @@ -187,7 +185,6 @@ static ItemInfoPackage& getItemInfoPackageSdr() { XATTR_LINETRANSPARENCE, new XLineTransparenceItem, SID_ATTR_LINE_TRANSPARENCE, SFX_ITEMINFOFLAG_NONE }, { XATTR_LINEJOINT, new XLineJointItem, SID_ATTR_LINE_JOINT, SFX_ITEMINFOFLAG_NONE }, { XATTR_LINECAP, new XLineCapItem, SID_ATTR_LINE_CAP, SFX_ITEMINFOFLAG_NONE }, - { XATTRSET_LINE, nullptr, 0, SFX_ITEMINFOFLAG_NONE }, { XATTR_FILLSTYLE, new XFillStyleItem, SID_ATTR_FILL_STYLE, SFX_ITEMINFOFLAG_NONE }, { XATTR_FILLCOLOR, new XFillColorItem (OUString(), COL_DEFAULT_SHAPE_FILLING), SID_ATTR_FILL_COLOR, SFX_ITEMINFOFLAG_SUPPORT_SURROGATE }, { XATTR_FILLGRADIENT, new XFillGradientItem(basegfx::BGradient()), SID_ATTR_FILL_GRADIENT, SFX_ITEMINFOFLAG_SUPPORT_SURROGATE }, @@ -209,7 +206,6 @@ static ItemInfoPackage& getItemInfoPackageSdr() { XATTR_FILLBMP_POSOFFSETY, new XFillBmpPosOffsetYItem, 0, SFX_ITEMINFOFLAG_NONE }, { XATTR_FILLBACKGROUND, new XFillBackgroundItem, 0, SFX_ITEMINFOFLAG_NONE }, { XATTR_FILLUSESLIDEBACKGROUND, new XFillUseSlideBackgroundItem, SID_ATTR_FILL_USE_SLIDE_BACKGROUND, SFX_ITEMINFOFLAG_NONE }, - { XATTRSET_FILL, nullptr, 0, SFX_ITEMINFOFLAG_NONE }, { XATTR_FORMTXTSTYLE, new XFormTextStyleItem, SID_FORMTEXT_STYLE, SFX_ITEMINFOFLAG_NONE }, { XATTR_FORMTXTADJUST, new XFormTextAdjustItem, SID_FORMTEXT_ADJUST, SFX_ITEMINFOFLAG_NONE }, { XATTR_FORMTXTDISTANCE, new XFormTextDistanceItem, SID_FORMTEXT_DISTANCE, SFX_ITEMINFOFLAG_NONE }, @@ -467,7 +463,7 @@ static ItemInfoPackage& getItemInfoPackageSdr() } virtual size_t size() const override { return maItemInfos.size(); } - virtual const ItemInfo& getItemInfo(size_t nIndex, SfxItemPool& rPool) override + virtual const ItemInfo& getItemInfo(size_t nIndex, SfxItemPool& /*rPool*/) override { const ItemInfo& rRetval(maItemInfos[nIndex]); @@ -475,12 +471,6 @@ static ItemInfoPackage& getItemInfoPackageSdr() if (nullptr != rRetval.getItem()) return rRetval; - if (XATTRSET_LINE == rRetval.getWhich()) - return *new ItemInfoDynamic(rRetval, new XLineAttrSetItem(SfxItemSet(rPool, WhichRangesContainer(svl::Items)))); - - if (XATTRSET_FILL == rRetval.getWhich()) - return *new ItemInfoDynamic(rRetval, new XFillAttrSetItem(SfxItemSet(rPool, WhichRangesContainer(svl::Items)))); - if (XATTR_FILLBITMAP == rRetval.getWhich()) return *new ItemInfoDynamic(rRetval, new XFillBitmapItem(Graphic())); @@ -563,7 +553,6 @@ OUString SdrItemPool::GetItemName(sal_uInt16 nWhich) case XATTR_LINEENDCENTER : pResId = SIP_XA_LINEENDCENTER;break; case XATTR_LINETRANSPARENCE : pResId = SIP_XA_LINETRANSPARENCE;break; case XATTR_LINEJOINT : pResId = SIP_XA_LINEJOINT;break; - case XATTRSET_LINE : pResId = SIP_XATTRSET_LINE;break; case XATTR_FILLSTYLE : pResId = SIP_XA_FILLSTYLE;break; case XATTR_FILLCOLOR : pResId = SIP_XA_FILLCOLOR;break; @@ -587,8 +576,6 @@ OUString SdrItemPool::GetItemName(sal_uInt16 nWhich) case XATTR_FILLBACKGROUND : pResId = SIP_XA_FILLBACKGROUND;break; case XATTR_FILLUSESLIDEBACKGROUND: pResId = SIP_XA_FILLUSESLIDEBACKGROUND;break; - case XATTRSET_FILL : pResId = SIP_XATTRSET_FILL;break; - case XATTR_FORMTXTSTYLE : pResId = SIP_XA_FORMTXTSTYLE;break; case XATTR_FORMTXTADJUST : pResId = SIP_XA_FORMTXTADJUST;break; case XATTR_FORMTXTDISTANCE : pResId = SIP_XA_FORMTXTDISTANCE;break; diff --git a/svx/source/svdraw/svdedxv.cxx b/svx/source/svdraw/svdedxv.cxx index 5b3b437b3185..8d0bb3c709b5 100644 --- a/svx/source/svdraw/svdedxv.cxx +++ b/svx/source/svdraw/svdedxv.cxx @@ -2878,7 +2878,7 @@ bool SdrObjEditView::SupportsFormatPaintbrush(SdrInventor nObjectInventor, static const WhichRangesContainer& GetFormatRangeImpl(bool bTextOnly, bool withParagraphAttr = true) { static const WhichRangesContainer gFull( - svl::Items #include #include -#include #include -#include #include #include #include @@ -2832,63 +2830,4 @@ XFormTextHideFormItem* XFormTextHideFormItem::Clone(SfxItemPool* /*pPool*/) cons return new XFormTextHideFormItem(*this); } -// --- SetItems --- - - -/// a line attribute set item -XLineAttrSetItem::XLineAttrSetItem( SfxItemSet&& pItemSet ) : - SfxSetItem( XATTRSET_LINE, std::move(pItemSet)) -{ -} - -XLineAttrSetItem::XLineAttrSetItem( SfxItemPool* pItemPool ) : - SfxSetItem(XATTRSET_LINE, - SfxItemSet::makeFixedSfxItemSet(*pItemPool)) -{ -} - -XLineAttrSetItem::XLineAttrSetItem( const XLineAttrSetItem& rLineAttr ) : - SfxSetItem( rLineAttr ) -{ -} - -XLineAttrSetItem::XLineAttrSetItem( const XLineAttrSetItem& rLineAttr, - SfxItemPool* pItemPool) : - SfxSetItem( rLineAttr, pItemPool ) -{ -} - -XLineAttrSetItem* XLineAttrSetItem::Clone( SfxItemPool* pPool ) const -{ - return new XLineAttrSetItem( *this, pPool ); -} - -/// fill attribute set item -XFillAttrSetItem::XFillAttrSetItem( SfxItemSet&& pItemSet ) : - SfxSetItem( XATTRSET_FILL, std::move(pItemSet)) -{ -} - -XFillAttrSetItem::XFillAttrSetItem( SfxItemPool* pItemPool ) : - SfxSetItem(XATTRSET_FILL, - SfxItemSet::makeFixedSfxItemSet(*pItemPool)) -{ -} - -XFillAttrSetItem::XFillAttrSetItem( const XFillAttrSetItem& rFillAttr ) : - SfxSetItem( rFillAttr ) -{ -} - -XFillAttrSetItem::XFillAttrSetItem( const XFillAttrSetItem& rFillAttr, - SfxItemPool* pItemPool ) : - SfxSetItem( rFillAttr, pItemPool ) -{ -} - -XFillAttrSetItem* XFillAttrSetItem::Clone( SfxItemPool* pPool ) const -{ - return new XFillAttrSetItem( *this, pPool ); -} - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */