[Libreoffice-commits] core.git: vcl/headless
vcl/headless/CairoCommon.cxx | 15 +-- 1 file changed, 13 insertions(+), 2 deletions(-) New commits: commit fc5cd82fa5bb85495e34a762fdf1db91b5e93d12 Author: Caolán McNamara AuthorDate: Mon Oct 2 17:23:59 2023 +0100 Commit: Caolán McNamara CommitDate: Tue Oct 3 09:29:42 2023 +0200 optimize DrawRect if we fill but no line color because that's the same as if we had line color the same as fill color Change-Id: I540b31c0dcd07dfddbbd9f8cf396f7df3a4edb4b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157498 Tested-by: Jenkins Reviewed-by: Caolán McNamara diff --git a/vcl/headless/CairoCommon.cxx b/vcl/headless/CairoCommon.cxx index abd024293314..3c57f065da37 100644 --- a/vcl/headless/CairoCommon.cxx +++ b/vcl/headless/CairoCommon.cxx @@ -775,10 +775,21 @@ void CairoCommon::drawLine(tools::Long nX1, tools::Long nY1, tools::Long nX2, to releaseCairoContext(cr, false, extents); } +// true if we have a fill color and the line color is the same or non-existant +static bool onlyFillRect(const std::optional& rFillColor, + const std::optional& rLineColor) +{ +if (!rFillColor) +return false; +if (!rLineColor) +return true; +return *rFillColor == *rLineColor; +} + void CairoCommon::drawRect(double nX, double nY, double nWidth, double nHeight, bool bAntiAlias) { // fast path for the common case of simply creating a solid block of color -if (m_oFillColor && m_oLineColor && m_oFillColor == m_oLineColor) +if (onlyFillRect(m_oFillColor, m_oLineColor)) { double fTransparency = 0; // don't bother trying to draw stuff which is effectively invisible @@ -828,7 +839,7 @@ void CairoCommon::drawRect(double nX, double nY, double nWidth, double nHeight, if (aOrigLineColor) { // need -1 hack to exclude the bottom and right edges to act like wingdi "Rectangle" -// function which is what this was probably the ultimate origin of this behavior +// function which is what was probably the ultimate origin of this behavior basegfx::B2DPolygon aRect = basegfx::utils::createPolygonFromRect( basegfx::B2DRectangle(nX, nY, nX + nWidth - 1, nY + nHeight - 1));
[Libreoffice-commits] core.git: Branch 'distro/collabora/co-23.05' - sw/qa sw/source
sw/qa/core/text/data/floattable-bad-fly-pos.docx |binary sw/qa/core/text/frmform.cxx | 30 +++ sw/source/core/text/frmform.cxx | 14 -- 3 files changed, 41 insertions(+), 3 deletions(-) New commits: commit 8451b04506c88dc748a0a98177483f671625636b Author: Miklos Vajna AuthorDate: Fri Sep 29 09:01:29 2023 +0200 Commit: Caolán McNamara CommitDate: Tue Oct 3 09:30:24 2023 +0200 Related: tdf#126449 sw floattable: fix bad position of in-table follow fly The reduced bugdoc is of 4 pages, an inner floating table should be on pages 2 -> 4 but was only on 2 -> 3. The reason for this seems to be that we correctly split the inner table twice, but the 3rd fly frame in the chain is positioned on page 3, and once the anchor moves to page 4, we never re-position the fly frame. The fly frame is normally only positioned once, since the position of the anchor and the fly frame depend on each other, so the loop has to be broken, and this is normally done by locking the position of the fly after one positioning. Fix the problem by extending the condition when to unlock the position of anchored fly frames in SwTextFrame::MakePos(): similar to not yet positioned fly frames, do one more cycle in case the anchor and the fly frame are not on the same page. This just fixes a simplified DOCX bugdoc, the full document still needs more fixes. (cherry picked from commit 83abd141bf41c1c8a1d4e5a894b235c842da2a07) Conflicts: sw/source/core/text/frmform.cxx Change-Id: I066c64cf4e12bf31f22218f84f0f2425256ba63e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157496 Tested-by: Jenkins CollaboraOffice Reviewed-by: Caolán McNamara diff --git a/sw/qa/core/text/data/floattable-bad-fly-pos.docx b/sw/qa/core/text/data/floattable-bad-fly-pos.docx new file mode 100644 index ..a0a8bb4dbdb9 Binary files /dev/null and b/sw/qa/core/text/data/floattable-bad-fly-pos.docx differ diff --git a/sw/qa/core/text/frmform.cxx b/sw/qa/core/text/frmform.cxx index f2f942bde324..ee791f325729 100644 --- a/sw/qa/core/text/frmform.cxx +++ b/sw/qa/core/text/frmform.cxx @@ -116,6 +116,36 @@ CPPUNIT_TEST_FIXTURE(Test, testFloattableAvoidLastManipOfst) CPPUNIT_ASSERT_EQUAL(static_cast(0), static_cast(pAnchorText->GetOffset())); } + +CPPUNIT_TEST_FIXTURE(Test, testFloattableBadFlyPos) +{ +// Given a document with an inner floating table on page 2 -> 4: +// When laying out that document: +createSwDoc("floattable-bad-fly-pos.docx"); + +// Then make sure that pages 2 -> 4 get the 3 fly frames: +SwDoc* pDoc = getSwDoc(); +SwRootFrame* pLayout = pDoc->getIDocumentLayoutAccess().GetCurrentLayout(); +auto pPage1 = pLayout->Lower()->DynCastPageFrame(); +CPPUNIT_ASSERT(pPage1); +CPPUNIT_ASSERT(!pPage1->GetSortedObjs()); +auto pPage2 = pPage1->GetNext()->DynCastPageFrame(); +CPPUNIT_ASSERT(pPage2); +CPPUNIT_ASSERT(pPage2->GetSortedObjs()); +CPPUNIT_ASSERT_EQUAL(static_cast(1), pPage2->GetSortedObjs()->size()); +auto pPage3 = pPage2->GetNext()->DynCastPageFrame(); +CPPUNIT_ASSERT(pPage3); +CPPUNIT_ASSERT(pPage3->GetSortedObjs()); +// Without the accompanying fix in place, this test would have failed with: +// - Expected: 1 +// - Actual : 2 +// i.e. the fly on page 4 was still on page 3. +CPPUNIT_ASSERT_EQUAL(static_cast(1), pPage3->GetSortedObjs()->size()); +auto pPage4 = pPage3->GetNext()->DynCastPageFrame(); +CPPUNIT_ASSERT(pPage4); +CPPUNIT_ASSERT(pPage4->GetSortedObjs()); +CPPUNIT_ASSERT_EQUAL(static_cast(1), pPage4->GetSortedObjs()->size()); +} } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/core/text/frmform.cxx b/sw/source/core/text/frmform.cxx index 864a1d5c031f..a30a2eee633f 100644 --- a/sw/source/core/text/frmform.cxx +++ b/sw/source/core/text/frmform.cxx @@ -363,10 +363,18 @@ void SwTextFrame::MakePos() // Possibly this fly was positioned relative to us, invalidate its position now that our // position is changed. SwPageFrame* pPageFrame = pFly->FindPageFrame(); -if (pPageFrame && pFly->getFrameArea().Pos() == pPageFrame->getFrameArea().Pos()) +bool bFlyNeedsPositioning = false; +bool bFlyPageMismatch = false; +if (pPageFrame) { -// The position was just adjusted to be be inside the page frame, so not really -// positioned, unlock the position once to allow a recalc. +// Was the position just adjusted to be inside the page frame? +bFlyNeedsPositioning = pFly->getFrameArea().Pos() == pPageFrame->getFrameArea().Pos(); +// Is the fly on a page different than the anchor frame? +bFl
[Libreoffice-commits] core.git: sw/qa
sw/qa/extras/unowriter/unowriter.cxx |6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) New commits: commit 64fc701388d1dcf8ae36ba2cc73eb5416a7c3374 Author: Ankit_Jaipuriar AuthorDate: Sat Sep 23 22:23:51 2023 +0530 Commit: Xisco Fauli CommitDate: Tue Oct 3 10:09:41 2023 +0200 tdf#141908: CppUnittests: replace usage of sal_Int32 with colors Change-Id: I6c7d8d92fe6860cd213a3cbded2451e8788ae2f0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157196 Tested-by: Jenkins Reviewed-by: Xisco Fauli diff --git a/sw/qa/extras/unowriter/unowriter.cxx b/sw/qa/extras/unowriter/unowriter.cxx index 429a8d4e0498..10f861a079c8 100644 --- a/sw/qa/extras/unowriter/unowriter.cxx +++ b/sw/qa/extras/unowriter/unowriter.cxx @@ -965,7 +965,7 @@ CPPUNIT_TEST_FIXTURE(SwUnoWriter, testChapterNumberingCharStyle) uno::Reference xStyle( xDoc->createInstance("com.sun.star.style.CharacterStyle"), uno::UNO_QUERY); uno::Reference xStyleN(xStyle, uno::UNO_QUERY); -xStyle->setPropertyValue("CharColor", uno::Any(sal_Int32(0x00FF))); +xStyle->setPropertyValue("CharColor", uno::Any(COL_LIGHTRED)); uno::Reference xSFS(mxComponent, uno::UNO_QUERY); uno::Reference xStyles( xSFS->getStyleFamilies()->getByName("CharacterStyles"), uno::UNO_QUERY); @@ -1189,13 +1189,13 @@ CPPUNIT_TEST_FIXTURE(SwUnoWriter, testTdf129841) xTableCellRange->getCellRangeByName("A1:A1"), css::uno::UNO_QUERY_THROW); static constexpr OUStringLiteral sBackColor = u"BackColor"; // Apply background color to table cursor, and read background color from cell range -css::uno::Any aRefColor(sal_Int32(0x00FF)); +css::uno::Any aRefColor(COL_LIGHTRED); xTableCursor->setPropertyValue(sBackColor, aRefColor); css::uno::Any aColor = xCellRange->getPropertyValue(sBackColor); // This failed CPPUNIT_ASSERT_EQUAL(aRefColor, aColor); // Now the other way round -aRefColor <<= sal_Int32(0xFF00); +aRefColor <<= COL_LIGHTGREEN; xCellRange->setPropertyValue(sBackColor, aRefColor); aColor = xTableCursor->getPropertyValue(sBackColor); CPPUNIT_ASSERT_EQUAL(aRefColor, aColor);
[Libreoffice-commits] core.git: Branch 'distro/collabora/co-23.05' - vcl/headless
vcl/headless/SvpGraphicsBackend.cxx | 26 +++--- 1 file changed, 15 insertions(+), 11 deletions(-) New commits: commit afab429a60e13c1d1306f3ba2742799ffd5f9236 Author: Caolán McNamara AuthorDate: Mon Oct 2 17:23:59 2023 +0100 Commit: Noel Grandin CommitDate: Tue Oct 3 10:11:38 2023 +0200 optimize DrawRect if we have fill color but not line color because that's the same as if we had line color the same as fill color Change-Id: I540b31c0dcd07dfddbbd9f8cf396f7df3a4edb4b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157499 Tested-by: Jenkins CollaboraOffice Reviewed-by: Noel Grandin diff --git a/vcl/headless/SvpGraphicsBackend.cxx b/vcl/headless/SvpGraphicsBackend.cxx index f979cacd5b49..0094290d47b8 100644 --- a/vcl/headless/SvpGraphicsBackend.cxx +++ b/vcl/headless/SvpGraphicsBackend.cxx @@ -158,14 +158,21 @@ void SvpGraphicsBackend::drawRect(tools::Long nX, tools::Long nY, tools::Long nW implDrawRect(nX, nY, nWidth, nHeight); } +// true if we have a fill color and the line color is the same or non-existant +static bool onlyFillRect(const Color& rFillColor, const Color& rLineColor) +{ +if (rFillColor == SALCOLOR_NONE) +return false; +if (rLineColor == SALCOLOR_NONE) +return true; +return rFillColor == rLineColor; +} + void SvpGraphicsBackend::implDrawRect(double nX, double nY, double nWidth, double nHeight) { // fast path for the common case of simply creating a solid block of color -if (m_rCairoCommon.m_aFillColor != SALCOLOR_NONE && m_rCairoCommon.m_aLineColor != SALCOLOR_NONE -&& m_rCairoCommon.m_aFillColor == m_rCairoCommon.m_aLineColor) +if (onlyFillRect(m_rCairoCommon.m_aFillColor, m_rCairoCommon.m_aLineColor)) { -double fTransparency = 0; - // don't bother trying to draw stuff which is effectively invisible if (nWidth < 0.1 || nHeight < 0.1) return; @@ -173,10 +180,7 @@ void SvpGraphicsBackend::implDrawRect(double nX, double nY, double nWidth, doubl cairo_t* cr = m_rCairoCommon.getCairoContext(true, getAntiAlias()); m_rCairoCommon.clipRegion(cr); -// To make releaseCairoContext work, use empty extents -basegfx::B2DRange extents; - -bool bPixelSnap = !getAntiAlias(); +const bool bPixelSnap = !getAntiAlias(); if (bPixelSnap) { // snap by rounding @@ -188,9 +192,9 @@ void SvpGraphicsBackend::implDrawRect(double nX, double nY, double nWidth, doubl cairo_rectangle(cr, nX, nY, nWidth, nHeight); -m_rCairoCommon.applyColor(cr, m_rCairoCommon.m_aFillColor, fTransparency); -// Get FillDamage (will be extended for LineDamage below) -extents = getClippedFillDamage(cr); +m_rCairoCommon.applyColor(cr, m_rCairoCommon.m_aFillColor, 0.0); + +basegfx::B2DRange extents = getClippedFillDamage(cr); cairo_fill(cr);
[Libreoffice-commits] core.git: basctl/source basic/qa basic/source comphelper/source cui/source editeng/source include/basic include/comphelper include/sfx2 include/svtools include/vcl sc/inc sc/sour
basctl/source/basicide/baside2.cxx |4 basic/qa/cppunit/basictest.cxx |2 basic/qa/cppunit/basictest.hxx |4 basic/qa/cppunit/test_compiler_checks.cxx |4 basic/source/basmgr/basmgr.cxx | 38 ++-- basic/source/classes/sb.cxx | 16 - basic/source/inc/sbintern.hxx |2 comphelper/source/misc/errcode.cxx | 257 ++-- cui/source/options/optdict.cxx |2 editeng/source/misc/splwrap.cxx |4 include/basic/basmgr.hxx|6 include/basic/sbstar.hxx|5 include/comphelper/errcode.hxx | 126 +++-- include/sfx2/app.hxx|2 include/sfx2/docfile.hxx| 12 - include/sfx2/objsh.hxx |8 include/sfx2/sfxbasemodel.hxx |3 include/svtools/ehdl.hxx|4 include/vcl/errinf.hxx | 106 --- sc/inc/xmlwrap.hxx |4 sc/source/filter/xml/xmlwrap.cxx| 18 - sc/source/ui/docshell/docsh.cxx |6 sc/source/ui/docshell/docsh4.cxx|2 sc/source/ui/docshell/docsh8.cxx|8 sc/source/ui/inc/docsh.hxx |2 sc/source/ui/miscdlgs/instbdlg.cxx |2 sc/source/ui/miscdlgs/linkarea.cxx |4 sd/source/filter/xml/sdxmlwrp.cxx | 16 - sd/source/ui/app/sdmod1.cxx |2 sd/source/ui/func/fuinsert.cxx |3 sd/source/ui/view/viewshe2.cxx |2 sfx2/source/appl/app.cxx|4 sfx2/source/appl/appopen.cxx|4 sfx2/source/doc/DocumentMetadataAccess.cxx |4 sfx2/source/doc/SfxDocumentMetaData.cxx |4 sfx2/source/doc/docfile.cxx | 25 +- sfx2/source/doc/new.cxx |2 sfx2/source/doc/objmisc.cxx | 12 - sfx2/source/doc/objserv.cxx | 13 - sfx2/source/doc/objstor.cxx |8 sfx2/source/doc/sfxbasemodel.cxx| 35 +-- sfx2/source/inc/objshimp.hxx|2 sfx2/source/view/viewfrm.cxx|2 svtools/source/misc/ehdl.cxx| 32 +-- sw/inc/docsh.hxx|2 sw/inc/shellio.hxx | 24 +- sw/qa/extras/txtimport/txtimport.cxx|4 sw/qa/extras/uiwriter/uiwriter.cxx |2 sw/source/core/swg/SwXMLTextBlocks.cxx |2 sw/source/core/unocore/unocrsrhelper.cxx|2 sw/source/core/unocore/unostyle.cxx |2 sw/source/filter/ascii/parasc.cxx |2 sw/source/filter/basflt/shellio.cxx |8 sw/source/filter/docx/swdocxreader.cxx |2 sw/source/filter/docx/swdocxreader.hxx |2 sw/source/filter/html/swhtml.cxx|6 sw/source/filter/inc/fltini.hxx |4 sw/source/filter/rtf/swparrtf.cxx |8 sw/source/filter/writer/writer.cxx | 18 - sw/source/filter/ww8/wrtww8.cxx |8 sw/source/filter/ww8/wrtww8.hxx |6 sw/source/filter/ww8/ww8par.cxx |2 sw/source/filter/ww8/ww8par.hxx |2 sw/source/filter/xml/swxml.cxx | 16 - sw/source/filter/xml/wrtxml.cxx | 12 - sw/source/filter/xml/wrtxml.hxx |8 sw/source/uibase/app/docsh.cxx | 12 - sw/source/uibase/app/docsh2.cxx |8 sw/source/uibase/app/docshini.cxx |4 sw/source/uibase/misc/glosdoc.cxx |5 sw/source/uibase/shells/translatehelper.cxx |4 sw/source/uibase/uiview/srcview.cxx |2 sw/source/uibase/uiview/view2.cxx |2 sw/source/uibase/uiview/viewling.cxx|2 uui/source/iahndl.cxx |2 vcl/qa/cppunit/errorhandler.cxx | 15 - vcl/source/window/errinf.cxx| 135 +- 77 files changed, 522 insertions(+), 632 deletions(-) New commits: commit d9e322d60f65ff20631dab87baa5a2c7c71daaa2 Author: Noel Grandin AuthorDate: Sat Sep 30 20:47:46 2023 +0200 Commit: Noel Grandin CommitDate: Tue Oct 3 10:12:41 2023 +0200 replace ErrorInfo with simpler mechanism Instead of returning ErrCode class everywhere, return a new class ErrrCodeMsg, which combines an ErrCode with the other parameters that are used to control the error reporting. I do not change everything that uses ErrCode here, I started from SfxBaseController/SfxMedium and worked outwards. This change serves two purposes (1) Replace the extremely whacky ErrorInfo mechanism we were using to smuggle information into the error handler reporting mechanism with a very st
[Libreoffice-commits] core.git: svtools/source
svtools/source/config/miscopt.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit d95f58a1ebf2ff7fb163cd423df16b4a6167a8fa Author: Noel Grandin AuthorDate: Mon Oct 2 21:12:34 2023 +0200 Commit: Noel Grandin CommitDate: Tue Oct 3 10:53:46 2023 +0200 tdf#156756 Icon sizes for the toolbar wrong (part2) my previous fix commit 715a6ea8cb3aa6c80edbb22909aac3f18b7daec6 Author: Noel Grandin Date: Mon Oct 2 11:31:09 2023 +0200 tdf#156756 Icon sizes for the toolbar wrong had a bug which broke changing themes Change-Id: Icf19fee5034ec2795354641c62979b6284e1a5d3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157506 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/svtools/source/config/miscopt.cxx b/svtools/source/config/miscopt.cxx index 725654602d1d..fe9788eee14b 100644 --- a/svtools/source/config/miscopt.cxx +++ b/svtools/source/config/miscopt.cxx @@ -296,7 +296,7 @@ void SvtMiscOptions_Impl::ImplCommit() else { value = GetIconTheme(); } -seqValuesRange[1] <<= value; +seqValuesRange[0] <<= value; // Set properties in configuration. PutProperties( seqNames, seqValues ); }
[Libreoffice-commits] core.git: vcl/source
vcl/source/bitmap/BitmapEmbossGreyFilter.cxx | 62 --- 1 file changed, 28 insertions(+), 34 deletions(-) New commits: commit 6dd514f633211b3cd6a6096b687c4e51a331ee4b Author: Mike Kaganski AuthorDate: Tue Oct 3 10:45:39 2023 +0300 Commit: Mike Kaganski CommitDate: Tue Oct 3 10:59:15 2023 +0200 Try to use doubles in a saner way This avoids convertion to integers too early, so makes the calculations more consistent (no more "use a truncated double later in a calculation involving doubles"). Also it moves variables into proper scopes. Change-Id: Idc11c30c2c6892db092a04a127eb31266b4b70e7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157510 Tested-by: Jenkins Reviewed-by: Mike Kaganski diff --git a/vcl/source/bitmap/BitmapEmbossGreyFilter.cxx b/vcl/source/bitmap/BitmapEmbossGreyFilter.cxx index c1e96c11709a..06406152d6d6 100644 --- a/vcl/source/bitmap/BitmapEmbossGreyFilter.cxx +++ b/vcl/source/bitmap/BitmapEmbossGreyFilter.cxx @@ -39,25 +39,21 @@ BitmapEx BitmapEmbossGreyFilter::execute(BitmapEx const& rBitmapEx) const BitmapColor aGrey(sal_uInt8(0)); const sal_Int32 nWidth = pWriteAcc->Width(); const sal_Int32 nHeight = pWriteAcc->Height(); -sal_Int32 nGrey11, nGrey12, nGrey13; -sal_Int32 nGrey21, nGrey22, nGrey23; -sal_Int32 nGrey31, nGrey32, nGrey33; -double fAzim = basegfx::deg2rad<100>(mnAzimuthAngle100); -double fElev = basegfx::deg2rad<100>(mnElevationAngle100); -std::unique_ptr pHMap(new sal_Int32[nWidth + 2]); -std::unique_ptr pVMap(new sal_Int32[nHeight + 2]); -sal_Int32 nX, nY, nNx, nNy, nDotL; -const sal_Int32 nLx = FRound(cos(fAzim) * cos(fElev) * 255.0); -const sal_Int32 nLy = FRound(sin(fAzim) * cos(fElev) * 255.0); -const sal_Int32 nLz = FRound(sin(fElev) * 255.0); -const auto nZ2 = (6 * 255) / 4; -const sal_Int32 nNzLz = ((6 * 255) / 4) * nLz; -const sal_uInt8 cLz = static_cast(std::clamp(nLz, sal_Int32(0), sal_Int32(255))); +const double fAzim = basegfx::deg2rad<100>(mnAzimuthAngle100); +const double fElev = basegfx::deg2rad<100>(mnElevationAngle100); +std::vector pHMap(nWidth + 2); +std::vector pVMap(nHeight + 2); +const double nLx = cos(fAzim) * cos(fElev) * 255.0; +const double nLy = sin(fAzim) * cos(fElev) * 255.0; +const double nLz = sin(fElev) * 255.0; +const double nNz = 6 * 255.0 / 4; +const double nNzLz = nNz * nLz; +const sal_uInt8 cLz = FRound(std::clamp(nLz, 0.0, 255.0)); // fill mapping tables pHMap[0] = 0; -for (nX = 1; nX <= nWidth; nX++) +for (sal_Int32 nX = 1; nX <= nWidth; nX++) { pHMap[nX] = nX - 1; } @@ -66,43 +62,43 @@ BitmapEx BitmapEmbossGreyFilter::execute(BitmapEx const& rBitmapEx) const pVMap[0] = 0; -for (nY = 1; nY <= nHeight; nY++) +for (sal_Int32 nY = 1; nY <= nHeight; nY++) { pVMap[nY] = nY - 1; } pVMap[nHeight + 1] = nHeight - 1; -for (nY = 0; nY < nHeight; nY++) +for (sal_Int32 nY = 0; nY < nHeight; nY++) { -nGrey11 = pReadAcc->GetPixel(pVMap[nY], pHMap[0]).GetIndex(); -nGrey12 = pReadAcc->GetPixel(pVMap[nY], pHMap[1]).GetIndex(); -nGrey13 = pReadAcc->GetPixel(pVMap[nY], pHMap[2]).GetIndex(); -nGrey21 = pReadAcc->GetPixel(pVMap[nY + 1], pHMap[0]).GetIndex(); -nGrey22 = pReadAcc->GetPixel(pVMap[nY + 1], pHMap[1]).GetIndex(); -nGrey23 = pReadAcc->GetPixel(pVMap[nY + 1], pHMap[2]).GetIndex(); -nGrey31 = pReadAcc->GetPixel(pVMap[nY + 2], pHMap[0]).GetIndex(); -nGrey32 = pReadAcc->GetPixel(pVMap[nY + 2], pHMap[1]).GetIndex(); -nGrey33 = pReadAcc->GetPixel(pVMap[nY + 2], pHMap[2]).GetIndex(); +sal_Int32 nGrey11 = pReadAcc->GetPixel(pVMap[nY], pHMap[0]).GetIndex(); +sal_Int32 nGrey12 = pReadAcc->GetPixel(pVMap[nY], pHMap[1]).GetIndex(); +sal_Int32 nGrey13 = pReadAcc->GetPixel(pVMap[nY], pHMap[2]).GetIndex(); +sal_Int32 nGrey21 = pReadAcc->GetPixel(pVMap[nY + 1], pHMap[0]).GetIndex(); +sal_Int32 nGrey22 = pReadAcc->GetPixel(pVMap[nY + 1], pHMap[1]).GetIndex(); +sal_Int32 nGrey23 = pReadAcc->GetPixel(pVMap[nY + 1], pHMap[2]).GetIndex(); +sal_Int32 nGrey31 = pReadAcc->GetPixel(pVMap[nY + 2], pHMap[0]).GetIndex(); +sal_Int32 nGrey32 = pReadAcc->GetPixel(pVMap[nY + 2], pHMap[1]).GetIndex(); +sal_Int32 nGrey33 = pReadAcc->GetPixel(pVMap[nY + 2], pHMap[2]).GetIndex(); Scanline pScanline = pWriteAcc->GetScanline(nY); -for (nX = 0; nX < nWidth; nX++) +for (sal_Int32 nX = 0; nX < nWidth; nX++) { -nNx = nGrey11 + nGrey21 + nGrey31 - nGrey13 - nGrey23 - nGrey33; -nNy = nGrey31 + nGrey32 + nGrey33 - nGrey11 - nGrey12 - nGrey13; +const sal_Int32 nNx = nGrey11 + nGrey21 + nGrey31 - nGrey13 - nGrey23 - nGrey33; +const sal_Int32 nNy = nGrey31 + nGrey32
[Libreoffice-commits] core.git: Branch 'distro/collabora/co-23.05' - compilerplugins/clang
compilerplugins/clang/includeform.cxx |4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) New commits: commit 96e29e35b3797e00510736768aa4755424c464b1 Author: Paris Oplopoios AuthorDate: Tue Oct 3 10:47:42 2023 +0300 Commit: Paris Oplopoios CommitDate: Tue Oct 3 11:25:18 2023 +0200 Adapt to clang 16 InclusionDirective change Change-Id: I3e77848aa95238f141d1027223ae1bbc831ce281 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157509 Reviewed-by: Paris Oplopoios Tested-by: Jenkins CollaboraOffice diff --git a/compilerplugins/clang/includeform.cxx b/compilerplugins/clang/includeform.cxx index 7b2c0feb07ea..da955c20d3bb 100644 --- a/compilerplugins/clang/includeform.cxx +++ b/compilerplugins/clang/includeform.cxx @@ -29,7 +29,9 @@ private: void InclusionDirective( SourceLocation HashLoc, Token const & IncludeTok, StringRef, bool IsAngled, CharSourceRange FilenameRange, -#if CLANG_VERSION >= 15 +#if CLANG_VERSION >= 16 +OptionalFileEntryRef File, +#elif CLANG_VERSION >= 15 Optional File, #else FileEntry const * File,
[Libreoffice-commits] core.git: Branch 'distro/collabora/co-23.05' - include/oox oox/source
include/oox/ppt/presentationfragmenthandler.hxx |6 + oox/source/ppt/presentationfragmenthandler.cxx | 137 2 files changed, 80 insertions(+), 63 deletions(-) New commits: commit 84ac58c37fffa0c8b6d55c70009515d013ad65b4 Author: Henry Castro AuthorDate: Thu Sep 28 14:23:55 2023 -0400 Commit: Caolán McNamara CommitDate: Tue Oct 3 11:28:41 2023 +0200 tdf#155512: oox: ppt: abstraction "importMasterSlide" Signed-off-by: Henry Castro Change-Id: Icfe8e3abbada7f728b2ad1f8e300a688f51d8f75 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157386 Tested-by: Jenkins CollaboraOffice Reviewed-by: Caolán McNamara diff --git a/include/oox/ppt/presentationfragmenthandler.hxx b/include/oox/ppt/presentationfragmenthandler.hxx index 7ac929ec555b..4685ea2d8316 100644 --- a/include/oox/ppt/presentationfragmenthandler.hxx +++ b/include/oox/ppt/presentationfragmenthandler.hxx @@ -38,6 +38,8 @@ namespace oox::core { class XmlFilterBase; } namespace oox::ppt { +class PowerPointImport; + class PresentationFragmentHandler final : public ::oox::core::FragmentHandler2 { public: @@ -50,6 +52,10 @@ private: void importSlide( const ::oox::core::FragmentHandlerRef& rSlideFragmentHandler, const oox::ppt::SlidePersistPtr& rPersist ); void importSlide(sal_uInt32 nSlide, bool bFirstSlide, bool bImportNotes); +oox::ppt::SlidePersistPtr importMasterSlide(const ::com::sun::star::uno::Reference<::com::sun::star::frame::XModel>& xModel, +::oox::ppt::PowerPointImport& rFilter, +const OUString& rLayoutFragmentPath, +const OUString& rMasterFragmentPath); void saveThemeToGrabBag(const oox::drawingml::ThemePtr& pThemePtr, sal_Int32 nThemeIdx); void importCustomSlideShow(std::vector& rCustomShowList); static void importSlideNames(::oox::core::XmlFilterBase& rFilter, const std::vector& rSlidePersist); diff --git a/oox/source/ppt/presentationfragmenthandler.cxx b/oox/source/ppt/presentationfragmenthandler.cxx index 5f35dbdfdb1c..a0f13c83ae05 100644 --- a/oox/source/ppt/presentationfragmenthandler.cxx +++ b/oox/source/ppt/presentationfragmenthandler.cxx @@ -199,6 +199,79 @@ void PresentationFragmentHandler::importCustomSlideShow(std::vector& } } +SlidePersistPtr PresentationFragmentHandler::importMasterSlide(const Reference& xModel, + PowerPointImport& rFilter, + const OUString& rLayoutFragmentPath, + const OUString& rMasterFragmentPath) +{ +SlidePersistPtr pMasterPersistPtr; +Reference< drawing::XDrawPage > xMasterPage; +Reference< drawing::XMasterPagesSupplier > xMPS( xModel, uno::UNO_QUERY_THROW ); +Reference< drawing::XDrawPages > xMasterPages( xMPS->getMasterPages(), uno::UNO_SET_THROW ); + +sal_Int32 nIndex; +if( rFilter.getMasterPages().empty() ) +{ +nIndex = 0; +xMasterPages->getByIndex( nIndex ) >>= xMasterPage; +} +else +{ +nIndex = xMasterPages->getCount(); +xMasterPage = xMasterPages->insertNewByIndex( nIndex ); +} + +pMasterPersistPtr = std::make_shared( rFilter, true, false, xMasterPage, + std::make_shared( Master, "com.sun.star.drawing.GroupShape" ), mpTextListStyle ); +pMasterPersistPtr->setLayoutPath( rLayoutFragmentPath ); +rFilter.getMasterPages().push_back( pMasterPersistPtr ); +rFilter.setActualSlidePersist( pMasterPersistPtr ); +FragmentHandlerRef xMasterFragmentHandler( new SlideFragmentHandler( rFilter, rMasterFragmentPath, pMasterPersistPtr, Master ) ); + +// set the correct theme +OUString aThemeFragmentPath = xMasterFragmentHandler->getFragmentPathFromFirstTypeFromOfficeDoc( u"theme" ); +if( !aThemeFragmentPath.isEmpty() ) +{ +std::map< OUString, oox::drawingml::ThemePtr >& rThemes( rFilter.getThemes() ); +std::map< OUString, oox::drawingml::ThemePtr >::iterator aIter2( rThemes.find( aThemeFragmentPath ) ); +if( aIter2 == rThemes.end() ) +{ +oox::drawingml::ThemePtr pThemePtr = std::make_shared(); +pMasterPersistPtr->setTheme( pThemePtr ); +Reference xDoc= +rFilter.importFragment(aThemeFragmentPath); + +auto pTheme = std::make_shared(); +pThemePtr->setTheme(pTheme); + +rFilter.importFragment( +new ThemeFragmentHandler(rFilter, aThemeFragmentPath, *pThemePtr, *pTheme), +Reference( +xDoc, +UNO_QUERY_THROW)); +rThemes[ aThemeFragmentPath ] = pThemePtr; +pThemePtr
[Libreoffice-commits] core.git: Branch 'distro/collabora/co-23.05' - oox/source sd/qa
oox/source/ppt/presentationfragmenthandler.cxx | 116 + sd/qa/unit/export-tests-ooxml2.cxx |4 2 files changed, 66 insertions(+), 54 deletions(-) New commits: commit 08ed103d734ebf65202dc097c7bb0990573f8fd1 Author: Henry Castro AuthorDate: Thu Sep 28 15:01:43 2023 -0400 Commit: Caolán McNamara CommitDate: Tue Oct 3 11:32:22 2023 +0200 tdf#155512: oox: ppt: fix import master slides Import all master slides according to the relationship with slide layouts. Adjust unit test values: SdOOXMLExportTest2::testTdf106867 I do not know why those values change since importing embedded video source code was not touched SdOOXMLExportTest2::testAccentColor The accent6 is a constant value. Signed-off-by: Henry Castro Change-Id: Ic7c70d2c4ce30a7f2d2d1cf22604f1119a66f5f7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157387 Tested-by: Jenkins CollaboraOffice Tested-by: Caolán McNamara Reviewed-by: Caolán McNamara diff --git a/oox/source/ppt/presentationfragmenthandler.cxx b/oox/source/ppt/presentationfragmenthandler.cxx index a0f13c83ae05..0ab32be82a21 100644 --- a/oox/source/ppt/presentationfragmenthandler.cxx +++ b/oox/source/ppt/presentationfragmenthandler.cxx @@ -204,72 +204,84 @@ SlidePersistPtr PresentationFragmentHandler::importMasterSlide(const Reference xMasterPage; Reference< drawing::XMasterPagesSupplier > xMPS( xModel, uno::UNO_QUERY_THROW ); Reference< drawing::XDrawPages > xMasterPages( xMPS->getMasterPages(), uno::UNO_SET_THROW ); +RelationsRef xMasterRelations = rFilter.importRelations( rMasterFragmentPath ); -sal_Int32 nIndex; -if( rFilter.getMasterPages().empty() ) +for (const auto& rEntry : *xMasterRelations) { -nIndex = 0; -xMasterPages->getByIndex( nIndex ) >>= xMasterPage; -} -else -{ -nIndex = xMasterPages->getCount(); -xMasterPage = xMasterPages->insertNewByIndex( nIndex ); -} +aLayoutFragmentPath = xMasterRelations->getFragmentPathFromRelation(rEntry.second); -pMasterPersistPtr = std::make_shared( rFilter, true, false, xMasterPage, - std::make_shared( Master, "com.sun.star.drawing.GroupShape" ), mpTextListStyle ); -pMasterPersistPtr->setLayoutPath( rLayoutFragmentPath ); -rFilter.getMasterPages().push_back( pMasterPersistPtr ); -rFilter.setActualSlidePersist( pMasterPersistPtr ); -FragmentHandlerRef xMasterFragmentHandler( new SlideFragmentHandler( rFilter, rMasterFragmentPath, pMasterPersistPtr, Master ) ); - -// set the correct theme -OUString aThemeFragmentPath = xMasterFragmentHandler->getFragmentPathFromFirstTypeFromOfficeDoc( u"theme" ); -if( !aThemeFragmentPath.isEmpty() ) -{ -std::map< OUString, oox::drawingml::ThemePtr >& rThemes( rFilter.getThemes() ); -std::map< OUString, oox::drawingml::ThemePtr >::iterator aIter2( rThemes.find( aThemeFragmentPath ) ); -if( aIter2 == rThemes.end() ) +sal_Int32 nIndex; +if( rFilter.getMasterPages().empty() ) { -oox::drawingml::ThemePtr pThemePtr = std::make_shared(); -pMasterPersistPtr->setTheme( pThemePtr ); -Reference xDoc= -rFilter.importFragment(aThemeFragmentPath); - -auto pTheme = std::make_shared(); -pThemePtr->setTheme(pTheme); - -rFilter.importFragment( -new ThemeFragmentHandler(rFilter, aThemeFragmentPath, *pThemePtr, *pTheme), -Reference( -xDoc, -UNO_QUERY_THROW)); -rThemes[ aThemeFragmentPath ] = pThemePtr; -pThemePtr->setFragment(xDoc); -saveThemeToGrabBag(pThemePtr, nIndex + 1); +nIndex = 0; +xMasterPages->getByIndex( nIndex ) >>= xMasterPage; } else { -pMasterPersistPtr->setTheme( (*aIter2).second ); +nIndex = xMasterPages->getCount(); +xMasterPage = xMasterPages->insertNewByIndex( nIndex ); } -} -importSlide( xMasterFragmentHandler, pMasterPersistPtr ); -rFilter.importFragment( new LayoutFragmentHandler( rFilter, rLayoutFragmentPath, pMasterPersistPtr ) ); -pMasterPersistPtr->createBackground( rFilter ); -pMasterPersistPtr->createXShapes( rFilter ); -oox::drawingml::ThemePtr pTheme = pMasterPersistPtr->getTheme(); -if (pTheme) -{ -pTheme->addTheme(pMasterPersistPtr->getPage()); +pMasterPersistPtr = std::make_shared( rFilter, true, false, xMasterPage, + std::make_shared( Master, "com.sun.star.drawing.GroupShape" ), mpTextListStyle ); +pMasterPersistPtr->setLayoutPath( aLayoutFragmentPath ); +rFilter.getMasterPages().push_back( pMasterPer
[Libreoffice-commits] core.git: Branch 'libreoffice-7-6' - hwpfilter/source
hwpfilter/source/hbox.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 39454ba46cef98b59b012f791de77d1526ed2d13 Author: Caolán McNamara AuthorDate: Tue Oct 3 09:14:45 2023 +0100 Commit: Xisco Fauli CommitDate: Tue Oct 3 11:52:14 2023 +0200 ofz#62935 avoid negative numbers in olHanglJaso Change-Id: I3898b95e9d2fe60690889ba259859ed9f66636d1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157461 Tested-by: Jenkins Reviewed-by: Xisco Fauli diff --git a/hwpfilter/source/hbox.cxx b/hwpfilter/source/hbox.cxx index b3bbc43c0b12..855b73e25c6c 100644 --- a/hwpfilter/source/hbox.cxx +++ b/hwpfilter/source/hbox.cxx @@ -431,7 +431,7 @@ hchar_string MailMerge::GetString() #define OL_HANGL_JASO 0 #define OL_HANGL_KANATA 1 -static hchar olHanglJaso(int num, int type) +static hchar olHanglJaso(unsigned int num, int type) { static const unsigned char han_init[] = { 0x88, 0x90, 0x94, 0x9c, 0xa0, 0xa4, 0xac, 0xb4, 0xb8, 0xc0, 0xc4, 0xc8, 0xcc, 0xd0 };
[Libreoffice-commits] core.git: Branch 'libreoffice-7-5' - hwpfilter/source
hwpfilter/source/hbox.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 409edd17b403e7ce59c6f89b2b32b4ce8b00aadb Author: Caolán McNamara AuthorDate: Tue Oct 3 09:14:45 2023 +0100 Commit: Xisco Fauli CommitDate: Tue Oct 3 11:52:19 2023 +0200 ofz#62935 avoid negative numbers in olHanglJaso Change-Id: I3898b95e9d2fe60690889ba259859ed9f66636d1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157462 Tested-by: Jenkins Reviewed-by: Xisco Fauli diff --git a/hwpfilter/source/hbox.cxx b/hwpfilter/source/hbox.cxx index 47d18e76fc1e..5246e1a2cb55 100644 --- a/hwpfilter/source/hbox.cxx +++ b/hwpfilter/source/hbox.cxx @@ -431,7 +431,7 @@ hchar_string MailMerge::GetString() #define OL_HANGL_JASO 0 #define OL_HANGL_KANATA 1 -static hchar olHanglJaso(int num, int type) +static hchar olHanglJaso(unsigned int num, int type) { static const unsigned char han_init[] = { 0x88, 0x90, 0x94, 0x9c, 0xa0, 0xa4, 0xac, 0xb4, 0xb8, 0xc0, 0xc4, 0xc8, 0xcc, 0xd0 };
[Libreoffice-commits] core.git: Branch 'libreoffice-7-6' - sc/source
sc/source/ui/view/gridwin.cxx | 15 ++- 1 file changed, 14 insertions(+), 1 deletion(-) New commits: commit d23b589a9c4fd38e714e23ff91e623a33909a739 Author: Justin Luth AuthorDate: Sat Sep 30 07:02:08 2023 -0400 Commit: Xisco Fauli CommitDate: Tue Oct 3 11:52:55 2023 +0200 tdf#157038 sc: avoid spell-check dialog from outside selection Fixes 7.4 regression from cf18038c66075f7a18d89e47f3a2ab1a5bf7c4fd To avoid the HIGHLY LIKELY risk of losing the selection because of the LOW POTENTIAL of the right click being over a misspelling (that overflowed from outside the selection), simply don't even attempt to spell-check in that case. The opposite was already true (and is even worse). If the misspelling originates in the selected cells, but has overflowed into an unselected area, right clicking on the misspelling is deliberately ignored by SelectForContextMenu(). Change-Id: I7dfc5b190036f1705d848cb621e527cbff37e425 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157430 Tested-by: Jenkins Reviewed-by: Justin Luth (cherry picked from commit 4cf4516bac88fb8f58743e6ae68eab0393059d7f) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157328 Reviewed-by: Dennis Francis diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx index 78a8db5e3d25..5ba1cb71dab6 100644 --- a/sc/source/ui/view/gridwin.cxx +++ b/sc/source/ui/view/gridwin.cxx @@ -3246,9 +3246,22 @@ void ScGridWindow::Command( const CommandEvent& rCEvt ) if (aPos.Col() >= 0 && (aSpellCheckCell.getType() == CELLTYPE_STRING || aSpellCheckCell.getType() == CELLTYPE_EDIT)) nColSpellError = aPos.Col(); -// Is there a misspelled word somewhere in the cell? +// Is there possibly a misspelled word somewhere in the cell? // A "yes" does not mean that the word under the mouse pointer is wrong though. bSpellError = (mpSpellCheckCxt->isMisspelled(nColSpellError, nCellY)); +// Avoid situations where selecting the cell-with-wrong-spelling would be bad +if (bSpellError) +{ +// When the mouse is over an empty cell, text with spelling errors +// potentially could have overflowed underneath the mouse pointer +if (nColSpellError != nCellX) +{ +// If the mouse is over a selected cell, only consider spell-checking +// if the cell with the misspelling is also selected. tdf#157038 +if (mrViewData.GetMarkData().IsCellMarked(nCellX, nCellY)) +bSpellError = mrViewData.GetMarkData().IsCellMarked(nColSpellError, nCellY); +} +} } // #i18735# First select the item under the mouse pointer.
[Libreoffice-commits] core.git: Branch 'libreoffice-7-6' - vcl/headless
vcl/headless/CairoCommon.cxx | 15 ++- 1 file changed, 10 insertions(+), 5 deletions(-) New commits: commit 375258bd740f6193b7756c086c7fd08985e22e84 Author: Noel Grandin AuthorDate: Mon Oct 2 10:55:04 2023 +0200 Commit: Xisco Fauli CommitDate: Tue Oct 3 11:53:34 2023 +0200 tdf#157164 Vertical Position preview does not show red line for baseline regression from commit f510ea2d7962a4325055c6380a0032331b4e87cf Author: Noel Grandin Date: Wed Jan 12 11:49:35 2022 +0200 don't bother trying to draw stuff which is effectively invisible Change-Id: Idc947163521ebfb65b27204fb5c65b1f59fe6de3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157481 Tested-by: Jenkins Reviewed-by: Noel Grandin Signed-off-by: Xisco Fauli Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157495 diff --git a/vcl/headless/CairoCommon.cxx b/vcl/headless/CairoCommon.cxx index 9c67fb079566..ffcd50014e48 100644 --- a/vcl/headless/CairoCommon.cxx +++ b/vcl/headless/CairoCommon.cxx @@ -885,11 +885,16 @@ bool CairoCommon::drawPolyPolygon(const basegfx::B2DHomMatrix& rObjectToDevice, return true; } -// don't bother trying to draw stuff which is effectively invisible -basegfx::B2DRange aPolygonRange = rPolyPolygon.getB2DRange(); -aPolygonRange.transform(rObjectToDevice); -if (aPolygonRange.getWidth() < 0.1 || aPolygonRange.getHeight() < 0.1) -return true; +if (!bHasLine) +{ +// don't bother trying to draw stuff which is effectively invisible, speeds up +// drawing some complex drawings. This optimisation is not valid when we do +// the pixel offset thing (i.e. bHasLine) +basegfx::B2DRange aPolygonRange = rPolyPolygon.getB2DRange(); +aPolygonRange.transform(rObjectToDevice); +if (aPolygonRange.getWidth() < 0.1 || aPolygonRange.getHeight() < 0.1) +return true; +} cairo_t* cr = getCairoContext(true, bAntiAlias); if (cairo_status(cr) != CAIRO_STATUS_SUCCESS)
[Libreoffice-commits] core.git: hwpfilter/source
hwpfilter/source/hbox.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit a235da83013bb9fccba29d87154aa93235a1c048 Author: Caolán McNamara AuthorDate: Tue Oct 3 09:14:45 2023 +0100 Commit: Caolán McNamara CommitDate: Tue Oct 3 12:13:16 2023 +0200 ofz#62935 avoid negative numbers in olHanglJaso Change-Id: I3898b95e9d2fe60690889ba259859ed9f66636d1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157512 Tested-by: Jenkins Reviewed-by: Caolán McNamara diff --git a/hwpfilter/source/hbox.cxx b/hwpfilter/source/hbox.cxx index b3bbc43c0b12..855b73e25c6c 100644 --- a/hwpfilter/source/hbox.cxx +++ b/hwpfilter/source/hbox.cxx @@ -431,7 +431,7 @@ hchar_string MailMerge::GetString() #define OL_HANGL_JASO 0 #define OL_HANGL_KANATA 1 -static hchar olHanglJaso(int num, int type) +static hchar olHanglJaso(unsigned int num, int type) { static const unsigned char han_init[] = { 0x88, 0x90, 0x94, 0x9c, 0xa0, 0xa4, 0xac, 0xb4, 0xb8, 0xc0, 0xc4, 0xc8, 0xcc, 0xd0 };
[Libreoffice-commits] core.git: Branch 'distro/collabora/co-23.05' - filter/source
filter/source/svg/presentation_engine.js | 69 ++- 1 file changed, 68 insertions(+), 1 deletion(-) New commits: commit 427e8c0a8d9a534c54e07414cfe66648c9a90d26 Author: Gökay Şatır AuthorDate: Tue Oct 3 10:53:31 2023 +0300 Commit: Gökay ŞATIR CommitDate: Tue Oct 3 12:16:14 2023 +0200 Impress presentation engine (svg): * Add handlers for w and b chars. * These hide the content and set the color of the view to either black or white. * Add handler for p char: * This changes the cursor to pointer and back to default with key presses. Signed-off-by: Gökay Şatır Change-Id: I566f485aa676f0707a31f25a0b71f64970de2a26 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157511 Reviewed-by: Szymon Kłos Tested-by: Jenkins CollaboraOffice diff --git a/filter/source/svg/presentation_engine.js b/filter/source/svg/presentation_engine.js index 08fdb283d60b..2f653ea486f0 100644 --- a/filter/source/svg/presentation_engine.js +++ b/filter/source/svg/presentation_engine.js @@ -2756,6 +2756,56 @@ function getElementsByProperty( node, name ) return elements; } +// User can hide / show the presentation content. +// For that purpose, we change the background color of root node to either black or white. +// To set it back to its original color (for showing the content back), we should have the initial background color saved somewhere to read back. +// There may be no initial color at all, so the initial value of the saved initial is undefined. +var rootNodeInitialBackgroundColor = undefined; + +function changeRootNodeBackgroundTo(color) { + if (rootNodeInitialBackgroundColor === undefined) + rootNodeInitialBackgroundColor = ROOT_NODE.style.backgroundColor; + + if (color === 'initial') + ROOT_NODE.style.backgroundColor = rootNodeInitialBackgroundColor; + else + ROOT_NODE.style.backgroundColor = color; +} + +var isContentHidden = false; +var contentInitialVisibilityValues = null; + +function getInitialVisibilityValues() { + var list = ROOT_NODE.querySelectorAll('g'); + contentInitialVisibilityValues = []; + for (var i = 0; i < list.length; i++) { + var temp = {}; + temp.object = list[i]; + temp.visibility = list[i].style.visibility; + contentInitialVisibilityValues.push(temp); + } +} + +function hideShowContent(color) { + if (contentInitialVisibilityValues === null) + getInitialVisibilityValues(); + + if (isContentHidden) { + for (var i = 0; i < contentInitialVisibilityValues.length; i++) + contentInitialVisibilityValues[i].object.style.visibility = contentInitialVisibilityValues[i].visibility; + + changeRootNodeBackgroundTo('initial'); + isContentHidden = false; + } + else { + for (var i = 0; i < contentInitialVisibilityValues.length; i++) + contentInitialVisibilityValues[i].object.style.visibility = 'hidden'; + + changeRootNodeBackgroundTo(color); + isContentHidden = true; + } +} + /** Event handler for key press. * * @param aEvt the event @@ -2765,7 +2815,7 @@ function onKeyDown( aEvt ) if ( !aEvt ) aEvt = window.event; -var code = aEvt.keyCode || aEvt.charCode; +var code = aEvt.keyCode || aEvt.charCode || aEvt.code; // console.log('===> onKeyDown: ' + code); @@ -2788,6 +2838,20 @@ function onKeyDown( aEvt ) // console.log(' now: ' + code); } + else if (code === P_KEY) { + aEvt.preventDefault(); + if (ROOT_NODE.style.cursor === 'pointer') + ROOT_NODE.style.cursor = 'default'; + else + ROOT_NODE.style.cursor = 'pointer'; + } + else if (code === W_KEY) { + hideShowContent('white'); + } + else if (code === B_KEY) { + hideShowContent('black'); + } + if( !processingEffect && keyCodeDictionary[currentMode] && keyCodeDictionary[currentMode][code] ) { @@ -4505,7 +4569,10 @@ var END_KEY = 35; // end keycode var ENTER_KEY = 13; var SPACE_KEY = 32; var ESCAPE_KEY = 27; +var B_KEY = 66; +var P_KEY = 80; var Q_KEY = 81; +var W_KEY = 87; // Visibility Values var HIDDEN = 0;
[Libreoffice-commits] core.git: download.lst external/openssl
download.lst |4 ++-- external/openssl/configurable-z-option.patch.0 | 14 +++--- 2 files changed, 9 insertions(+), 9 deletions(-) New commits: commit d059aebd99f717d846e7746d5ff5b99d507a3160 Author: Taichi Haradaguchi <20001...@ymail.ne.jp> AuthorDate: Sat Sep 30 23:54:06 2023 +0900 Commit: Taichi Haradaguchi <20001...@ymail.ne.jp> CommitDate: Tue Oct 3 12:32:14 2023 +0200 openssl: upgrade to release 3.0.11 Change-Id: I80c6fde3b6ae526f46b6bc346f09b287cc88b032 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157433 Tested-by: Jenkins Reviewed-by: Taichi Haradaguchi <20001...@ymail.ne.jp> diff --git a/download.lst b/download.lst index c22d6d8b2056..9f79c240847a 100644 --- a/download.lst +++ b/download.lst @@ -493,8 +493,8 @@ OPENLDAP_TARBALL := openldap-2.6.6.tgz # three static lines # so that git cherry-pick # will not run into conflicts -OPENSSL_SHA256SUM := 1761d4f5b13a1028b9b6f3d4b8e17feb0cedc9370f6afe61d7193d2cdce83323 -OPENSSL_TARBALL := openssl-3.0.10.tar.gz +OPENSSL_SHA256SUM := b3425d3bb4a2218d0697eb41f7fc0cdede016ed19ca49d168b78e8d947887f55 +OPENSSL_TARBALL := openssl-3.0.11.tar.gz # three static lines # so that git cherry-pick # will not run into conflicts diff --git a/external/openssl/configurable-z-option.patch.0 b/external/openssl/configurable-z-option.patch.0 index 9a4426edd5d2..d9478b6a9701 100644 --- a/external/openssl/configurable-z-option.patch.0 +++ b/external/openssl/configurable-z-option.patch.0 @@ -1,15 +1,15 @@ Configurations/10-main.conf.sav2021-08-24 13:38:47.0 + -+++ Configurations/10-main.conf2021-11-02 22:20:44.377653700 + -@@ -13,7 +13,7 @@ +--- Configurations/10-main.conf.sav2023-09-19 22:02:31.0 +0900 Configurations/10-main.conf2023-09-30 23:47:49.734377000 +0900 +@@ -14,7 +14,7 @@ } elsif ($disabled{asm}) { # assembler is still used to compile uplink shim $vc_win64a_info = { AS=> "ml64", -ASFLAGS => "/nologo /Zi", +ASFLAGS => "/nologo $$(DEBUG_FLAGS_VALUE)", asflags => "/c /Cp /Cx", - asoutflag => "/Fo" }; - } else { -@@ -41,7 +41,7 @@ + asoutflag => "/Fo", + perlasm_scheme => "masm" }; +@@ -44,7 +44,7 @@ } elsif ($disabled{asm}) { # not actually used, uplink shim is inlined into C code $vc_win32_info = { AS=> "ml", @@ -18,7 +18,7 @@ asflags => "/Cp /coff /c /Cx", asoutflag => "/Fo", perlasm_scheme => "win32" }; -@@ -1323,10 +1323,10 @@ +@@ -1333,10 +1333,10 @@ "UNICODE", "_UNICODE", "_CRT_SECURE_NO_DEPRECATE", "_WINSOCK_DEPRECATED_NO_WARNINGS"),
[Libreoffice-commits] core.git: vcl/source
vcl/source/outdev/textline.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 58d755bfef8a932577b550751cd5cc4bafb1700c Author: Caolán McNamara AuthorDate: Tue Oct 3 09:24:52 2023 +0100 Commit: Caolán McNamara CommitDate: Tue Oct 3 13:05:33 2023 +0200 ofz: Timeout, reduce limit Change-Id: Id14418dc382c0d11554817fc37990e3f3cba3a05 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157514 Tested-by: Jenkins Reviewed-by: Caolán McNamara diff --git a/vcl/source/outdev/textline.cxx b/vcl/source/outdev/textline.cxx index d9c085aa97e3..84965e87b5d6 100644 --- a/vcl/source/outdev/textline.cxx +++ b/vcl/source/outdev/textline.cxx @@ -277,7 +277,7 @@ void OutputDevice::ImplDrawWaveTextLine( tools::Long nBaseX, tools::Long nBaseY, bool bIsAbove ) { static bool bFuzzing = utl::ConfigManager::IsFuzzing(); -if (bFuzzing && nWidth > 2) +if (bFuzzing && nWidth > 1) { SAL_WARN("vcl.gdi", "drawLine, skipping suspicious WaveTextLine of length: " << nWidth << " for fuzzing performance");
[Libreoffice-commits] core.git: Branch 'distro/collabora/co-23.05' - external/libtiff
external/libtiff/ExternalProject_libtiff.mk |8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) New commits: commit f4e2b7c1557279497a0392c8df4ba6cfab318861 Author: Caolán McNamara AuthorDate: Mon Aug 14 15:41:49 2023 +0100 Commit: Paris Oplopoios CommitDate: Tue Oct 3 13:20:10 2023 +0200 set libtiff ac_cv_lib_jpeg_jpeg12_read_scanlines cache val to false to avoid: ... checking for jpeg12_read_scanlines in -ljpeg... yes ... JPEG 8/12 bit dual mode:yes (libjpeg turbo >= 2.2 dual mode) ... tif_jpeg.c:143:25: error: unknown type name ‘J12SAMPARRAY’ 143 | #define TIFF_JSAMPARRAY J12SAMPARRAY where the system jpeg is linked against during configure but the build is against the internal jpeg and the system one happens to support jpeg12_read_scanlines Change-Id: I895d77c59a5bef1af0b1a85d44da1a54e502f8e4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155670 Tested-by: Jenkins Reviewed-by: Caolán McNamara Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157513 Tested-by: Jenkins CollaboraOffice Reviewed-by: Paris Oplopoios diff --git a/external/libtiff/ExternalProject_libtiff.mk b/external/libtiff/ExternalProject_libtiff.mk index e318126dcfe0..f6bcba106669 100644 --- a/external/libtiff/ExternalProject_libtiff.mk +++ b/external/libtiff/ExternalProject_libtiff.mk @@ -23,9 +23,10 @@ $(eval $(call gb_ExternalProject_use_autoconf,libtiff,build)) # using ac_cv_lib_z_inflateEnd=yes to skip test for our # static windows lib where the name is zlib not z -# using ac_cv_lib_jpeg_jpeg_read_scanlines to skip test -# for our static windows lib where the name is libjpeg-turbo.lib -# not libjpeg.lib +# using ac_cv_lib_jpeg_jpeg_read_scanlines and +# ac_cv_lib_jpeg_jpeg12_read_scanlines to skip tests +# for our static jpeg lib where the name is libjpeg-turbo.lib +# or liblibjpeg-turbo.a not libjpeg.lib/libjpeg.a # we're building this statically anyway so the lib isn't # used during the link done here @@ -63,6 +64,7 @@ $(call gb_ExternalProject_get_state_target,libtiff,build) : LDFLAGS="$(call gb_ExternalProject_get_link_flags,libtiff) $(gb_EMSCRIPTEN_LDFLAGS)" \ ac_cv_lib_z_inflateEnd=yes \ ac_cv_lib_jpeg_jpeg_read_scanlines=yes \ + ac_cv_lib_jpeg_jpeg12_read_scanlines=no \ ac_cv_lib_webp_WebPDecode=yes \ $(gb_CONFIGURE_PLATFORMS) \ && cd libtiff && $(MAKE) libtiff.la \
[Libreoffice-commits] core.git: sw/qa
sw/qa/extras/ooxmlexport/data/151384Hyperlink.odt |binary sw/qa/extras/ooxmlexport/ooxmlexport16.cxx|9 + 2 files changed, 9 insertions(+) New commits: commit 11b06806e7b674ee3992e684d8f9dfd6cfc6999a Author: sahil AuthorDate: Tue Sep 26 16:24:14 2023 +0530 Commit: Xisco Fauli CommitDate: Tue Oct 3 13:34:33 2023 +0200 tdf#151384 Character Style internet link.. Test Change-Id: Ia402648b9b3feea64b7a8ba16c72dc439dbd6679 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157281 Tested-by: Jenkins Reviewed-by: Xisco Fauli diff --git a/sw/qa/extras/ooxmlexport/data/151384Hyperlink.odt b/sw/qa/extras/ooxmlexport/data/151384Hyperlink.odt new file mode 100644 index ..223fda16df33 Binary files /dev/null and b/sw/qa/extras/ooxmlexport/data/151384Hyperlink.odt differ diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport16.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport16.cxx index 502a8d9c6797..e4eb392faf16 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport16.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport16.cxx @@ -211,6 +211,15 @@ DECLARE_OOXMLEXPORT_TEST(testTdf142486_LeftMarginShadowLeft, "tdf142486_LeftMarg CPPUNIT_ASSERT_DOUBLES_EQUAL(sal_Int32(953), getProperty(xFrame, "LeftMargin"), 1); } +DECLARE_OOXMLEXPORT_TEST(testTdf151384Hyperlink, "151384Hyperlink.odt") +{ +loadAndSave("151384Hyperlink.odt"); +xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml"); +xmlDocUniquePtr pXmlStyles = parseExport("word/styles.xml"); +assertXPath(pXmlDoc, "/w:document/w:body/w:p/w:hyperlink/w:r/w:rPr/w:rStyle", "val", "Hyperlink"); +assertXPath(pXmlStyles, "/w:styles/w:style[@w:styleId='Hyperlink']/w:name", "val", "Hyperlink"); +} + DECLARE_OOXMLEXPORT_TEST(testTdf66039, "tdf66039.docx") { // This bugdoc has a groupshape (WPG) with a table inside its each member shape.
[Libreoffice-commits] core.git: cui/inc
cui/inc/strings.hrc |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 63a5c6350f8930774c651a9cf41521606ecb6a94 Author: Stéphane Guillou AuthorDate: Tue Sep 26 22:27:03 2023 +0200 Commit: László Németh CommitDate: Tue Oct 3 13:38:22 2023 +0200 tdf#157170: clarify angle quotes autocorrect rule Change-Id: Idb514e0e0487a65e3057328a13d34659d706ab90 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157300 Tested-by: Jenkins Tested-by: László Németh Reviewed-by: László Németh diff --git a/cui/inc/strings.hrc b/cui/inc/strings.hrc index 29126053d968..66a9957b7698 100644 --- a/cui/inc/strings.hrc +++ b/cui/inc/strings.hrc @@ -327,7 +327,7 @@ #define RID_CUISTR_NON_BREAK_SPACE NC_("RID_SVXSTR_NON_BREAK_SPACE", "Add non-breaking space before specific punctuation marks in French text") #define RID_CUISTR_ORDINAL NC_("RID_SVXSTR_ORDINAL", "Format ordinal numbers suffixes (1st -> 1^st)") #define RID_CUISTR_OLD_HUNGARIAN NC_("RID_SVXSTR_OLD_HUNGARIAN", "Transliterate to Old Hungarian if the text direction is from right to left") -#define RID_CUISTR_ANGLE_QUOTES NC_("RID_SVXSTR_ANGLE_QUOTES", "Replace << and >> with angle quotes") +#define RID_CUISTR_ANGLE_QUOTES NC_("RID_SVXSTR_ANGLE_QUOTES", "Replace two inequality signs (<< or >>) with angle quotes") #define RID_CUISTR_DEL_EMPTY_PARA NC_("RID_SVXSTR_DEL_EMPTY_PARA", "Remove blank paragraphs") #define RID_CUISTR_USER_STYLE NC_("RID_SVXSTR_USER_STYLE", "Replace Custom Styles") #define RID_CUISTR_BULLET NC_("RID_SVXSTR_BULLET", "Replace bullets with: %1")
[Libreoffice-commits] core.git: sfx2/source
sfx2/source/appl/workwin.cxx |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) New commits: commit 2ecd4c009293f127ac09e5f4184330c4337cee49 Author: Miklos Vajna AuthorDate: Tue Oct 3 13:21:36 2023 +0200 Commit: Miklos Vajna CommitDate: Tue Oct 3 15:07:40 2023 +0200 sfx2: fix gcc dbgutil -Werror=unused-variable /home/vmiklos/git/libreoffice/master/sfx2/source/appl/workwin.cxx: In member function ‘void SfxWorkWindow::ToggleChildWindow_Impl(sal_uInt16, bool)’: /home/vmiklos/git/libreoffice/master/sfx2/source/appl/workwin.cxx:1861:27: error: unused variable ‘pCW’ [-Werror=unused-variable] 1861 | if (SfxChildWin_Impl* pCW = Get_BySaveId(aChildWins, nId)) | ^~~ /home/vmiklos/git/libreoffice/master/sfx2/source/appl/workwin.cxx: In member function ‘void SfxWorkWindow::ShowChildWindow_Impl(sal_uInt16, bool, bool)’: /home/vmiklos/git/libreoffice/master/sfx2/source/appl/workwin.cxx:1990:27: error: unused variable ‘pCW’ [-Werror=unused-variable] 1990 | if (SfxChildWin_Impl* pCW = Get_BySaveId(aChildWins, nId)) | ^~~ Change-Id: Iecc60032459ca8a6543f3836f17b76b25939cda9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157516 Reviewed-by: Miklos Vajna Tested-by: Jenkins diff --git a/sfx2/source/appl/workwin.cxx b/sfx2/source/appl/workwin.cxx index 9a4de102bb88..aadc401a8ee1 100644 --- a/sfx2/source/appl/workwin.cxx +++ b/sfx2/source/appl/workwin.cxx @@ -1858,7 +1858,7 @@ void SfxWorkWindow::ToggleChildWindow_Impl(sal_uInt16 nId, bool bSetFocus) } #ifdef DBG_UTIL -if (SfxChildWin_Impl* pCW = Get_BySaveId(aChildWins, nId)) +if (Get_BySaveId(aChildWins, nId)) { OSL_FAIL("The ChildWindow is not in context!"); } @@ -1987,7 +1987,7 @@ void SfxWorkWindow::ShowChildWindow_Impl(sal_uInt16 nId, bool bVisible, bool bSe } #ifdef DBG_UTIL -if (SfxChildWin_Impl* pCW = Get_BySaveId(aChildWins, nId)) +if (Get_BySaveId(aChildWins, nId)) { OSL_FAIL("The ChildWindow is not in context!"); }
[Libreoffice-commits] core.git: accessibility/source
accessibility/source/helper/characterattributeshelper.cxx | 26 +++--- 1 file changed, 13 insertions(+), 13 deletions(-) New commits: commit 9b462abdb36ce73ad627a0b603b24d3f35ffc1ee Author: Arnaud Versini AuthorDate: Thu Sep 21 11:25:30 2023 +0200 Commit: Mike Kaganski CommitDate: Tue Oct 3 16:06:42 2023 +0200 accessibility: avoid OUString creation by using unicode OUString literals Change-Id: I0f1f8c4e7601c68af607d6c540527e2979520586 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157136 Reviewed-by: Mike Kaganski Tested-by: Mike Kaganski diff --git a/accessibility/source/helper/characterattributeshelper.cxx b/accessibility/source/helper/characterattributeshelper.cxx index 1d6120ff483c..7e2a2334bf57 100644 --- a/accessibility/source/helper/characterattributeshelper.cxx +++ b/accessibility/source/helper/characterattributeshelper.cxx @@ -28,19 +28,19 @@ using namespace ::com::sun::star::beans; CharacterAttributesHelper::CharacterAttributesHelper( const vcl::Font& rFont, sal_Int32 nBackColor, sal_Int32 nColor ) { -m_aAttributeMap.emplace( OUString( "CharBackColor" ), Any( nBackColor ) ); -m_aAttributeMap.emplace( OUString( "CharColor" ), Any( nColor ) ); -m_aAttributeMap.emplace( OUString( "CharFontCharSet" ), Any( static_cast(rFont.GetCharSet()) ) ); -m_aAttributeMap.emplace( OUString( "CharFontFamily" ),Any( static_cast(rFont.GetFamilyType()) ) ); -m_aAttributeMap.emplace( OUString( "CharFontName" ), Any( rFont.GetFamilyName() ) ); -m_aAttributeMap.emplace( OUString( "CharFontPitch" ), Any( static_cast(rFont.GetPitch()) ) ); -m_aAttributeMap.emplace( OUString( "CharFontStyleName" ), Any( rFont.GetStyleName() ) ); -m_aAttributeMap.emplace( OUString( "CharHeight" ),Any( static_cast(rFont.GetFontSize().Height()) ) ); -m_aAttributeMap.emplace( OUString( "CharScaleWidth" ),Any( static_cast(rFont.GetFontSize().Width()) ) ); -m_aAttributeMap.emplace( OUString( "CharStrikeout" ), Any( static_cast(rFont.GetStrikeout()) ) ); -m_aAttributeMap.emplace( OUString( "CharUnderline" ), Any( static_cast(rFont.GetUnderline()) ) ); -m_aAttributeMap.emplace( OUString( "CharWeight" ),Any( static_cast(rFont.GetWeight()) ) ); -m_aAttributeMap.emplace( OUString( "CharPosture" ), Any( vcl::unohelper::ConvertFontSlant(rFont.GetItalic()) ) ); +m_aAttributeMap.emplace( u"CharBackColor"_ustr, Any( nBackColor ) ); +m_aAttributeMap.emplace( u"CharColor"_ustr, Any( nColor ) ); +m_aAttributeMap.emplace( u"CharFontCharSet"_ustr, Any( static_cast(rFont.GetCharSet()) ) ); +m_aAttributeMap.emplace( u"CharFontFamily"_ustr,Any( static_cast(rFont.GetFamilyType()) ) ); +m_aAttributeMap.emplace( u"CharFontName"_ustr, Any( rFont.GetFamilyName() ) ); +m_aAttributeMap.emplace( u"CharFontPitch"_ustr, Any( static_cast(rFont.GetPitch()) ) ); +m_aAttributeMap.emplace( u"CharFontStyleName"_ustr, Any( rFont.GetStyleName() ) ); +m_aAttributeMap.emplace( u"CharHeight"_ustr,Any( static_cast(rFont.GetFontSize().Height()) ) ); +m_aAttributeMap.emplace( u"CharScaleWidth"_ustr,Any( static_cast(rFont.GetFontSize().Width()) ) ); +m_aAttributeMap.emplace( u"CharStrikeout"_ustr, Any( static_cast(rFont.GetStrikeout()) ) ); +m_aAttributeMap.emplace( u"CharUnderline"_ustr, Any( static_cast(rFont.GetUnderline()) ) ); +m_aAttributeMap.emplace( u"CharWeight"_ustr,Any( static_cast(rFont.GetWeight()) ) ); +m_aAttributeMap.emplace( u"CharPosture"_ustr, Any( vcl::unohelper::ConvertFontSlant(rFont.GetItalic()) ) ); }
[Libreoffice-commits] core.git: Branch 'libreoffice-7-6' - svtools/source
svtools/source/config/miscopt.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit c06ddc21e151dd7bdce0c8155e124dbbb0684050 Author: Noel Grandin AuthorDate: Mon Oct 2 21:12:34 2023 +0200 Commit: Xisco Fauli CommitDate: Tue Oct 3 16:46:21 2023 +0200 tdf#156756 Icon sizes for the toolbar wrong (part2) my previous fix commit 715a6ea8cb3aa6c80edbb22909aac3f18b7daec6 Author: Noel Grandin Date: Mon Oct 2 11:31:09 2023 +0200 tdf#156756 Icon sizes for the toolbar wrong had a bug which broke changing themes Change-Id: Icf19fee5034ec2795354641c62979b6284e1a5d3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157506 Tested-by: Jenkins Reviewed-by: Noel Grandin (cherry picked from commit d95f58a1ebf2ff7fb163cd423df16b4a6167a8fa) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157465 Reviewed-by: Xisco Fauli diff --git a/svtools/source/config/miscopt.cxx b/svtools/source/config/miscopt.cxx index 725654602d1d..fe9788eee14b 100644 --- a/svtools/source/config/miscopt.cxx +++ b/svtools/source/config/miscopt.cxx @@ -296,7 +296,7 @@ void SvtMiscOptions_Impl::ImplCommit() else { value = GetIconTheme(); } -seqValuesRange[1] <<= value; +seqValuesRange[0] <<= value; // Set properties in configuration. PutProperties( seqNames, seqValues ); }
[Libreoffice-commits] core.git: cui/source include/vcl vcl/source vcl/workben
cui/source/dialogs/cuigrfflt.cxx | 20 ++-- include/vcl/BitmapEmbossGreyFilter.hxx | 13 - vcl/source/bitmap/BitmapEmbossGreyFilter.cxx |4 ++-- vcl/workben/vcldemo.cxx |2 +- 4 files changed, 21 insertions(+), 18 deletions(-) New commits: commit 140dc375adfffa59dff2652eb8b9625c23d81c8b Author: Mike Kaganski AuthorDate: Tue Oct 3 15:09:23 2023 +0300 Commit: Mike Kaganski CommitDate: Tue Oct 3 17:03:34 2023 +0200 Use Degree100 Change-Id: I133dbe40d57eda77b64f3e38631da30f296489f4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157517 Tested-by: Jenkins Reviewed-by: Mike Kaganski diff --git a/cui/source/dialogs/cuigrfflt.cxx b/cui/source/dialogs/cuigrfflt.cxx index 48373e7f1968..c29bc4947e00 100644 --- a/cui/source/dialogs/cuigrfflt.cxx +++ b/cui/source/dialogs/cuigrfflt.cxx @@ -431,21 +431,21 @@ GraphicFilterEmboss::~GraphicFilterEmboss() Graphic GraphicFilterEmboss::GetFilteredGraphic( const Graphic& rGraphic, double, double ) { Graphic aRet; -sal_uInt16 nAzim, nElev; +Degree100 nAzim, nElev; switch (maCtlLight.GetActualRP()) { default: OSL_FAIL("svx::GraphicFilterEmboss::GetFilteredGraphic(), unknown Reference Point!" ); [[fallthrough]]; -case RectPoint::LT: nAzim = 4500;nElev = 4500; break; -case RectPoint::MT: nAzim = 9000;nElev = 4500; break; -case RectPoint::RT: nAzim = 13500; nElev = 4500; break; -case RectPoint::LM: nAzim = 0; nElev = 4500; break; -case RectPoint::MM: nAzim = 0; nElev = 9000; break; -case RectPoint::RM: nAzim = 18000; nElev = 4500; break; -case RectPoint::LB: nAzim = 31500; nElev = 4500; break; -case RectPoint::MB: nAzim = 27000; nElev = 4500; break; -case RectPoint::RB: nAzim = 22500; nElev = 4500; break; +case RectPoint::LT: nAzim = 4500_deg100;nElev = 4500_deg100; break; +case RectPoint::MT: nAzim = 9000_deg100;nElev = 4500_deg100; break; +case RectPoint::RT: nAzim = 13500_deg100; nElev = 4500_deg100; break; +case RectPoint::LM: nAzim = 0_deg100; nElev = 4500_deg100; break; +case RectPoint::MM: nAzim = 0_deg100; nElev = 9000_deg100; break; +case RectPoint::RM: nAzim = 18000_deg100; nElev = 4500_deg100; break; +case RectPoint::LB: nAzim = 31500_deg100; nElev = 4500_deg100; break; +case RectPoint::MB: nAzim = 27000_deg100; nElev = 4500_deg100; break; +case RectPoint::RB: nAzim = 22500_deg100; nElev = 4500_deg100; break; } if( rGraphic.IsAnimated() ) diff --git a/include/vcl/BitmapEmbossGreyFilter.hxx b/include/vcl/BitmapEmbossGreyFilter.hxx index 2f1d309e0e59..34d9b5bb8c10 100644 --- a/include/vcl/BitmapEmbossGreyFilter.hxx +++ b/include/vcl/BitmapEmbossGreyFilter.hxx @@ -11,6 +11,9 @@ #ifndef INCLUDED_VCL_BITMAPEMBOSSGREYFILTER_HXX #define INCLUDED_VCL_BITMAPEMBOSSGREYFILTER_HXX +#include + +#include #include class BitmapEx; @@ -18,17 +21,17 @@ class BitmapEx; class VCL_DLLPUBLIC BitmapEmbossGreyFilter final : public BitmapFilter { public: -BitmapEmbossGreyFilter(sal_uInt16 nAzimuthAngle100, sal_uInt16 nElevationAngle100) -: mnAzimuthAngle100(nAzimuthAngle100) -, mnElevationAngle100(nElevationAngle100) +BitmapEmbossGreyFilter(Degree100 nAzimuthAngle, Degree100 nElevationAngle) +: mnAzimuthAngle(nAzimuthAngle) +, mnElevationAngle(nElevationAngle) { } virtual BitmapEx execute(BitmapEx const& rBitmapEx) const override; private: -sal_uInt16 mnAzimuthAngle100; -sal_uInt16 mnElevationAngle100; +Degree100 mnAzimuthAngle; +Degree100 mnElevationAngle; }; #endif diff --git a/vcl/source/bitmap/BitmapEmbossGreyFilter.cxx b/vcl/source/bitmap/BitmapEmbossGreyFilter.cxx index 06406152d6d6..405a9056b954 100644 --- a/vcl/source/bitmap/BitmapEmbossGreyFilter.cxx +++ b/vcl/source/bitmap/BitmapEmbossGreyFilter.cxx @@ -39,8 +39,8 @@ BitmapEx BitmapEmbossGreyFilter::execute(BitmapEx const& rBitmapEx) const BitmapColor aGrey(sal_uInt8(0)); const sal_Int32 nWidth = pWriteAcc->Width(); const sal_Int32 nHeight = pWriteAcc->Height(); -const double fAzim = basegfx::deg2rad<100>(mnAzimuthAngle100); -const double fElev = basegfx::deg2rad<100>(mnElevationAngle100); +const double fAzim = toRadians(mnAzimuthAngle); +const double fElev = toRadians(mnElevationAngle); std::vector pHMap(nWidth + 2); std::vector pVMap(nHeight + 2); const double nLx = cos(fAzim) * cos(fElev) * 255.0; diff --git a/vcl/workben/vcldemo.cxx b/vcl/workben/vcldemo.cxx index 5b9b2b0289e1..346de0b52a09 100644 --- a/vcl/workben/vcldemo.cxx +++ b/vcl/workben/vcldemo.cxx @@ -149,7 +149,7 @@ public: maIntroBW = maIntro.GetBitmap(); BitmapEx aTmpBmpEx(maIntroBW); -BitmapFilter:
[Libreoffice-commits] core.git: sw/qa sw/source
sw/qa/core/text/data/floattable-anchor-height.docx |binary sw/qa/core/text/porrst.cxx | 37 + sw/source/core/text/porrst.cxx | 26 +- 3 files changed, 61 insertions(+), 2 deletions(-) New commits: commit 695390b08799af34b393c81c834d615bea330d89 Author: Miklos Vajna AuthorDate: Tue Oct 3 12:08:36 2023 +0200 Commit: Miklos Vajna CommitDate: Tue Oct 3 17:29:14 2023 +0200 tdf#126449 sw floattable: fix too small height of non-last anchors The bugdoc had an outer inline table, a middle inline table and an inner floating table. The floating table is expected to be on pages 2, 3 and 4; actually it was only on page 2 and 3. This happened because the fly frame that should be on page 4 was on page 3, leading to overlapping text. And that bad fly position seems to happen because the anchor frames just have a 1 line height (~269 twips instead of the fly height). Fix this similar to how "first paragraph only" wrapping works: increase the (anchor) text frame height, even if the contained lines would not require that amount of height. With this, finally the DOCX version of the bugdoc lays out reasonable (all 5 pages). Change-Id: Ib08bf34be61eb2b4d8656887f83ac7fd17e3b252 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157507 Reviewed-by: Miklos Vajna Tested-by: Jenkins diff --git a/sw/qa/core/text/data/floattable-anchor-height.docx b/sw/qa/core/text/data/floattable-anchor-height.docx new file mode 100644 index ..3052f0daef73 Binary files /dev/null and b/sw/qa/core/text/data/floattable-anchor-height.docx differ diff --git a/sw/qa/core/text/porrst.cxx b/sw/qa/core/text/porrst.cxx index 1c343dc0d9f2..f2e14e7f7f31 100644 --- a/sw/qa/core/text/porrst.cxx +++ b/sw/qa/core/text/porrst.cxx @@ -18,6 +18,7 @@ #include #include #include +#include namespace { @@ -52,6 +53,42 @@ CPPUNIT_TEST_FIXTURE(Test, testFloattableLeftoverParaPortion) // also had some (duplicated) anchor text. CPPUNIT_ASSERT(!pPara2->GetPara()); } + +CPPUNIT_TEST_FIXTURE(Test, testFloattableAnchorHeight) +{ +#if !defined(MACOSX) // FIXME fails on macOS +// Given 3 tables, innermost table on pages 2-3-4: +createSwDoc("floattable-anchor-height.docx"); + +// When laying out the document: +calcLayout(); + +// Then make sure the flys are on the expected pages: +SwDoc* pDoc = getSwDoc(); +SwRootFrame* pLayout = pDoc->getIDocumentLayoutAccess().GetCurrentLayout(); +auto pPage1 = pLayout->Lower()->DynCastPageFrame(); +CPPUNIT_ASSERT(pPage1); +CPPUNIT_ASSERT(!pPage1->GetSortedObjs()); +auto pPage2 = pPage1->GetNext()->DynCastPageFrame(); +CPPUNIT_ASSERT(pPage2); +SwSortedObjs* pPage2Objs = pPage2->GetSortedObjs(); +CPPUNIT_ASSERT(pPage2Objs); +CPPUNIT_ASSERT_EQUAL(static_cast(1), pPage2Objs->size()); +auto pPage3 = pPage2->GetNext()->DynCastPageFrame(); +CPPUNIT_ASSERT(pPage3); +SwSortedObjs* pPage3Objs = pPage3->GetSortedObjs(); +CPPUNIT_ASSERT(pPage3Objs); +// Without the accompanying fix in place, this test would have failed with: +// - Expected: 1 +// - Actual : 2 +// i.e. page 3 also had the fly frame of page 4 as well. +CPPUNIT_ASSERT_EQUAL(static_cast(1), pPage3Objs->size()); +auto pPage4 = pPage3->GetNext()->DynCastPageFrame(); +SwSortedObjs* pPage4Objs = pPage4->GetSortedObjs(); +CPPUNIT_ASSERT(pPage4Objs); +CPPUNIT_ASSERT_EQUAL(static_cast(1), pPage4Objs->size()); +#endif +} } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/core/text/porrst.cxx b/sw/source/core/text/porrst.cxx index 5c6ea428c1db..bd3589b25676 100644 --- a/sw/source/core/text/porrst.cxx +++ b/sw/source/core/text/porrst.cxx @@ -51,6 +51,8 @@ #include #include #include +#include +#include SwTmpEndPortion::SwTmpEndPortion( const SwLinePortion &rPortion, const FontLineStyle eUL, @@ -412,7 +414,8 @@ bool SwTextFrame::FormatEmpty() // sw_redlinehide: just disable FormatEmpty optimisation for now // Split fly frames: non-last parts of the anchor want this optimization to clear the old // content. -bool bHasNonLastSplitFlyDrawObj = HasNonLastSplitFlyDrawObj(); +SwFlyAtContentFrame* pNonLastSplitFlyDrawObj = HasNonLastSplitFlyDrawObj(); +bool bHasNonLastSplitFlyDrawObj = pNonLastSplitFlyDrawObj != nullptr; if ((HasFollow() && !bHasNonLastSplitFlyDrawObj) || GetMergedPara() || (GetTextNodeFirst()->GetpSwpHints() && !bHasNonLastSplitFlyDrawObj) || nullptr != GetTextNodeForParaProps()->GetNumRule() || GetTextNodeFirst()->HasHiddenCharAttribute(true) || @@ -468,7 +471,26 @@ bool SwTextFrame::FormatEmpty() } SwRectFnSet aRectFnSet(this); -const SwTwips nChg = nHeight - aRectFnSet.GetHeight(getFramePrintArea()); +SwTwips nChg = nHeight - aRectFnSe
[Libreoffice-commits] core.git: Branch 'distro/collabora/co-23.05' - officecfg/registry
officecfg/registry/data/org/openoffice/Office/Accelerators.xcu | 12 ++ 1 file changed, 12 insertions(+) New commits: commit 6b68b8c4819139c54072d2f28186b1fb6d937d56 Author: Gökay Şatır AuthorDate: Tue Oct 3 17:35:35 2023 +0300 Commit: Gökay ŞATIR CommitDate: Tue Oct 3 18:20:35 2023 +0200 Writer: Added ALT + SHIFT + UP and ALT + SHIFT + DOWN combinations for: * Moving paragraphs up and down in the document. Signed-off-by: Gökay Şatır Change-Id: I5aef03456bce1cfd66349f41cae0ef37889ef0bc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157520 Reviewed-by: Szymon Kłos Tested-by: Jenkins CollaboraOffice diff --git a/officecfg/registry/data/org/openoffice/Office/Accelerators.xcu b/officecfg/registry/data/org/openoffice/Office/Accelerators.xcu index df2a2cd6e2de..e4c21e196946 100644 --- a/officecfg/registry/data/org/openoffice/Office/Accelerators.xcu +++ b/officecfg/registry/data/org/openoffice/Office/Accelerators.xcu @@ -6319,6 +6319,12 @@ Ctrl+Shift+e aka E_SHIFT_MOD1 under GTK/IBUS is for some emoji thing .uno:GoToNextPara + + +I10N SHORTCUTS - NO TRANSLATE +.uno:MoveDown + + I10N SHORTCUTS - NO TRANSLATE @@ -6976,6 +6982,12 @@ Ctrl+Shift+e aka E_SHIFT_MOD1 under GTK/IBUS is for some emoji thing .uno:GoToStartOfPara + + +I10N SHORTCUTS - NO TRANSLATE +.uno:MoveUp + + I10N SHORTCUTS - NO TRANSLATE
[Libreoffice-commits] core.git: filter/source
filter/source/config/cache/filtercache.cxx | 177 ++--- 1 file changed, 41 insertions(+), 136 deletions(-) New commits: commit 3288065782544e7a2571c808f3ff17487018f762 Author: Hannah Meeks AuthorDate: Fri Aug 18 21:41:41 2023 +0100 Commit: Mike Kaganski CommitDate: Tue Oct 3 20:54:46 2023 +0200 Simplify long if statements Change-Id: I379fb5809e5e00788445bcf9cebdcaba563b1af4 Use structured binding, fixup Change-Id: Ibd52ff1313336aa8a082477dee3ea7fce0f1d3f9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157492 Tested-by: Jenkins Reviewed-by: Mike Kaganski diff --git a/filter/source/config/cache/filtercache.cxx b/filter/source/config/cache/filtercache.cxx index aa0eff534cb4..534195893744 100644 --- a/filter/source/config/cache/filtercache.cxx +++ b/filter/source/config/cache/filtercache.cxx @@ -1809,6 +1809,37 @@ void FilterCache::impl_saveItem(const css::uno::Reference< css::container::XName } } +namespace { +constexpr struct { +SfxFilterFlags eFlag; +rtl::OUStringConstExpr aName; +} flagFilterSwitcher[] = { +{ SfxFilterFlags::STARONEFILTER, FLAGNAME_3RDPARTYFILTER }, +{ SfxFilterFlags::ALIEN, FLAGNAME_ALIEN }, +{ SfxFilterFlags::CONSULTSERVICE, FLAGNAME_CONSULTSERVICE }, +{ SfxFilterFlags::DEFAULT, FLAGNAME_DEFAULT }, +{ SfxFilterFlags::ENCRYPTION, FLAGNAME_ENCRYPTION }, +{ SfxFilterFlags::EXPORT, FLAGNAME_EXPORT }, +{ SfxFilterFlags::IMPORT, FLAGNAME_IMPORT }, +{ SfxFilterFlags::INTERNAL, FLAGNAME_INTERNAL }, +{ SfxFilterFlags::NOTINFILEDLG, FLAGNAME_NOTINFILEDIALOG }, +{ SfxFilterFlags::MUSTINSTALL, FLAGNAME_NOTINSTALLED }, +{ SfxFilterFlags::OWN, FLAGNAME_OWN }, +{ SfxFilterFlags::PACKED, FLAGNAME_PACKED }, +{ SfxFilterFlags::PASSWORDTOMODIFY, FLAGNAME_PASSWORDTOMODIFY }, +{ SfxFilterFlags::PREFERED, FLAGNAME_PREFERRED }, +{ SfxFilterFlags::STARTPRESENTATION, FLAGNAME_STARTPRESENTATION }, +{ SfxFilterFlags::OPENREADONLY, FLAGNAME_READONLY }, +{ SfxFilterFlags::SUPPORTSSELECTION, FLAGNAME_SUPPORTSSELECTION }, +{ SfxFilterFlags::TEMPLATE, FLAGNAME_TEMPLATE }, +{ SfxFilterFlags::TEMPLATEPATH, FLAGNAME_TEMPLATEPATH }, +{ SfxFilterFlags::COMBINED, FLAGNAME_COMBINED }, +{ SfxFilterFlags::SUPPORTSSIGNING, FLAGNAME_SUPPORTSSIGNING }, +{ SfxFilterFlags::GPGENCRYPTION, FLAGNAME_GPGENCRYPTION }, +{ SfxFilterFlags::EXOTIC, FLAGNAME_EXOTIC }, +}; +} + /*--- static! => no locks necessary ---*/ @@ -1816,29 +1847,11 @@ css::uno::Sequence< OUString > FilterCache::impl_convertFlagField2FlagNames(SfxF { std::vector lFlagNames; -if (nFlags & SfxFilterFlags::STARONEFILTER) lFlagNames.emplace_back(FLAGNAME_3RDPARTYFILTER ); -if (nFlags & SfxFilterFlags::ALIEN) lFlagNames.emplace_back(FLAGNAME_ALIEN); -if (nFlags & SfxFilterFlags::CONSULTSERVICE ) lFlagNames.emplace_back(FLAGNAME_CONSULTSERVICE ); -if (nFlags & SfxFilterFlags::DEFAULT ) lFlagNames.emplace_back(FLAGNAME_DEFAULT ); -if (nFlags & SfxFilterFlags::ENCRYPTION ) lFlagNames.emplace_back(FLAGNAME_ENCRYPTION ); -if (nFlags & SfxFilterFlags::EXPORT ) lFlagNames.emplace_back(FLAGNAME_EXPORT ); -if (nFlags & SfxFilterFlags::IMPORT ) lFlagNames.emplace_back(FLAGNAME_IMPORT ); -if (nFlags & SfxFilterFlags::INTERNAL ) lFlagNames.emplace_back(FLAGNAME_INTERNAL ); -if (nFlags & SfxFilterFlags::NOTINFILEDLG ) lFlagNames.emplace_back(FLAGNAME_NOTINFILEDIALOG ); -if (nFlags & SfxFilterFlags::MUSTINSTALL ) lFlagNames.emplace_back(FLAGNAME_NOTINSTALLED ); -if (nFlags & SfxFilterFlags::OWN ) lFlagNames.emplace_back(FLAGNAME_OWN ); -if (nFlags & SfxFilterFlags::PACKED ) lFlagNames.emplace_back(FLAGNAME_PACKED ); -if (nFlags & SfxFilterFlags::PASSWORDTOMODIFY ) lFlagNames.emplace_back(FLAGNAME_PASSWORDTOMODIFY ); -if (nFlags & SfxFilterFlags::PREFERED ) lFlagNames.emplace_back(FLAGNAME_PREFERRED); -if (nFlags & SfxFilterFlags::STARTPRESENTATION) lFlagNames.emplace_back(FLAGNAME_STARTPRESENTATION); -if (nFlags & SfxFilterFlags::OPENREADONLY ) lFlagNames.emplace_back(FLAGNAME_READONLY ); -if (nFlags & SfxFilterFlags::SUPPORTSSELECTION) lFlagNames.emplace_back(FLAGNAME_SUPPORTSSELECTION); -if (nFlags & SfxFilterFlags::TEMPLATE ) lFlagNames.emplace_back(FLAGNAME_TEMPLATE ); -if (nFlags & SfxFilterFlags::TEMPLATEPATH ) lFlagNames.emplace_back(FLAGNAME_TEMPLATEPATH ); -if (nFlags & SfxFilterFlags::COMBINED ) lFlagNames.emplace_back(FLAGNAME_COMBINED
[Libreoffice-commits] core.git: svx/source
svx/source/sidebar/possize/PosSizePropertyPanel.cxx | 32 +++- svx/source/sidebar/possize/PosSizePropertyPanel.hxx |7 ++-- 2 files changed, 22 insertions(+), 17 deletions(-) New commits: commit e47c1737d6f1365aa640f1960fb0c9892fde6d77 Author: Caolán McNamara AuthorDate: Tue Oct 3 14:53:17 2023 +0100 Commit: Caolán McNamara CommitDate: Tue Oct 3 21:02:01 2023 +0200 tdf#155756 sidebar properties not displaying height over 100 Change-Id: I5ea2441319e0d7c34ffdcd179d8a82738da4733f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157519 Tested-by: Jenkins Reviewed-by: Caolán McNamara diff --git a/svx/source/sidebar/possize/PosSizePropertyPanel.cxx b/svx/source/sidebar/possize/PosSizePropertyPanel.cxx index c89d1b0b95a6..0024a41458db 100644 --- a/svx/source/sidebar/possize/PosSizePropertyPanel.cxx +++ b/svx/source/sidebar/possize/PosSizePropertyPanel.cxx @@ -94,6 +94,7 @@ PosSizePropertyPanel::PosSizePropertyPanel( mlRotY(0), mePoolUnit(), meDlgUnit(FieldUnit::INCH), // #i124409# init with fallback default +mbFieldMetricOutDated(true), maTransfPosXControl(SID_ATTR_TRANSFORM_POS_X, *pBindings, *this), maTransfPosYControl(SID_ATTR_TRANSFORM_POS_Y, *pBindings, *this), maTransfWidthControl(SID_ATTR_TRANSFORM_WIDTH, *pBindings, *this), @@ -686,10 +687,13 @@ void PosSizePropertyPanel::NotifyItemUpdate( break; case SID_ATTR_METRIC: -MetricState( eState, pState ); -UpdateUIScale(); +{ +const Fraction aUIScale(mpView->GetModel().GetUIScale()); +MetricState(eState, pState, aUIScale); +UpdateUIScale(aUIScale); +mbFieldMetricOutDated = false; break; - +} default: break; } @@ -855,7 +859,7 @@ void PosSizePropertyPanel::DumpAsPropertyTree(tools::JsonWriter& rJsonWriter) PanelLayout::DumpAsPropertyTree(rJsonWriter); } -void PosSizePropertyPanel::MetricState( SfxItemState eState, const SfxPoolItem* pState ) +void PosSizePropertyPanel::MetricState(SfxItemState eState, const SfxPoolItem* pState, const Fraction& rUIScale) { bool bPosXBlank = false; bool bPosYBlank = false; @@ -865,7 +869,8 @@ void PosSizePropertyPanel::MetricState( SfxItemState eState, const SfxPoolItem* // #i124409# use the given Item to get the correct UI unit and initialize it // and the Fields using it FieldUnit eDlgUnit = GetCurrentUnit(eState, pState); -if (eDlgUnit == meDlgUnit) +mbFieldMetricOutDated |= (eDlgUnit != meDlgUnit || maUIScale != rUIScale); +if (!mbFieldMetricOutDated) return; meDlgUnit = eDlgUnit; @@ -880,7 +885,8 @@ void PosSizePropertyPanel::MetricState( SfxItemState eState, const SfxPoolItem* SetFieldUnit( *mxMtrPosY, meDlgUnit, true ); if(bPosYBlank) mxMtrPosY->set_text(OUString()); -SetPosSizeMinMax(); + +SetPosSizeMinMax(rUIScale); if (mxMtrWidth->get_text().isEmpty()) bWidthBlank = true; @@ -1008,7 +1014,7 @@ void PosSizePropertyPanel::DisableControls() } } -void PosSizePropertyPanel::SetPosSizeMinMax() +void PosSizePropertyPanel::SetPosSizeMinMax(const Fraction& rUIScale) { SdrPageView* pPV = mpView->GetSdrPageView(); if (!pPV) @@ -1021,9 +1027,8 @@ void PosSizePropertyPanel::SetPosSizeMinMax() pPV->LogicToPagePos(aTmpRect2); maWorkArea = vcl::unotools::b2DRectangleFromRectangle(aTmpRect2); -const Fraction aUIScale(mpView->GetModel().GetUIScale()); -TransfrmHelper::ScaleRect( maWorkArea, aUIScale ); -TransfrmHelper::ScaleRect( maRect, aUIScale ); +TransfrmHelper::ScaleRect(maWorkArea, rUIScale); +TransfrmHelper::ScaleRect(maRect, rUIScale); const sal_uInt16 nDigits(mxMtrPosX->get_digits()); TransfrmHelper::ConvertRect( maWorkArea, nDigits, mePoolUnit, meDlgUnit ); @@ -1058,16 +1063,15 @@ void PosSizePropertyPanel::SetPosSizeMinMax() limitWidth(*mxMtrHeight); } -void PosSizePropertyPanel::UpdateUIScale() +void PosSizePropertyPanel::UpdateUIScale(const Fraction& rUIScale) { -const Fraction aUIScale (mpView->GetModel().GetUIScale()); -if (maUIScale == aUIScale) +if (maUIScale == rUIScale) return; // UI scale has changed. // Remember the new UI scale. -maUIScale = aUIScale; +maUIScale = rUIScale; // The content of the position and size boxes is only updated when item changes are notified. // Request such notifications without changing the actual item values. diff --git a/svx/source/sidebar/possize/PosSizePropertyPanel.hxx b/svx/source/sidebar/possize/PosSizePropertyPanel.hxx index 42af309883b2..b57d0bcf7dde 100644 --- a/svx/source/sidebar/possize/PosSizePropertyPanel.hxx +++ b/svx/source/sidebar/possize/PosSizePropertyPanel.hxx @@ -128,6 +128,7 @@ private: FractionmaUIScale; MapUnit
[Libreoffice-commits] core.git: Branch 'libreoffice-7-6' - download.lst external/openssl
download.lst |4 ++-- external/openssl/configurable-z-option.patch.0 | 14 +++--- 2 files changed, 9 insertions(+), 9 deletions(-) New commits: commit ba808a28f5ea365eaf8fe5d9c7c91b417633d75f Author: Taichi Haradaguchi <20001...@ymail.ne.jp> AuthorDate: Sat Sep 30 23:54:06 2023 +0900 Commit: Caolán McNamara CommitDate: Tue Oct 3 21:39:02 2023 +0200 openssl: upgrade to release 3.0.11 Change-Id: I80c6fde3b6ae526f46b6bc346f09b287cc88b032 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157433 Tested-by: Jenkins Reviewed-by: Taichi Haradaguchi <20001...@ymail.ne.jp> (cherry picked from commit d059aebd99f717d846e7746d5ff5b99d507a3160) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157466 Reviewed-by: Caolán McNamara diff --git a/download.lst b/download.lst index 3ff258e84901..823d5351c1c4 100644 --- a/download.lst +++ b/download.lst @@ -423,8 +423,8 @@ OPENLDAP_TARBALL := openldap-2.6.6.tgz # three static lines # so that git cherry-pick # will not run into conflicts -OPENSSL_SHA256SUM := 1761d4f5b13a1028b9b6f3d4b8e17feb0cedc9370f6afe61d7193d2cdce83323 -OPENSSL_TARBALL := openssl-3.0.10.tar.gz +OPENSSL_SHA256SUM := b3425d3bb4a2218d0697eb41f7fc0cdede016ed19ca49d168b78e8d947887f55 +OPENSSL_TARBALL := openssl-3.0.11.tar.gz # three static lines # so that git cherry-pick # will not run into conflicts diff --git a/external/openssl/configurable-z-option.patch.0 b/external/openssl/configurable-z-option.patch.0 index 9a4426edd5d2..d9478b6a9701 100644 --- a/external/openssl/configurable-z-option.patch.0 +++ b/external/openssl/configurable-z-option.patch.0 @@ -1,15 +1,15 @@ Configurations/10-main.conf.sav2021-08-24 13:38:47.0 + -+++ Configurations/10-main.conf2021-11-02 22:20:44.377653700 + -@@ -13,7 +13,7 @@ +--- Configurations/10-main.conf.sav2023-09-19 22:02:31.0 +0900 Configurations/10-main.conf2023-09-30 23:47:49.734377000 +0900 +@@ -14,7 +14,7 @@ } elsif ($disabled{asm}) { # assembler is still used to compile uplink shim $vc_win64a_info = { AS=> "ml64", -ASFLAGS => "/nologo /Zi", +ASFLAGS => "/nologo $$(DEBUG_FLAGS_VALUE)", asflags => "/c /Cp /Cx", - asoutflag => "/Fo" }; - } else { -@@ -41,7 +41,7 @@ + asoutflag => "/Fo", + perlasm_scheme => "masm" }; +@@ -44,7 +44,7 @@ } elsif ($disabled{asm}) { # not actually used, uplink shim is inlined into C code $vc_win32_info = { AS=> "ml", @@ -18,7 +18,7 @@ asflags => "/Cp /coff /c /Cx", asoutflag => "/Fo", perlasm_scheme => "win32" }; -@@ -1323,10 +1323,10 @@ +@@ -1333,10 +1333,10 @@ "UNICODE", "_UNICODE", "_CRT_SECURE_NO_DEPRECATE", "_WINSOCK_DEPRECATED_NO_WARNINGS"),
[Libreoffice-commits] core.git: include/oox oox/source
include/oox/ppt/presentationfragmenthandler.hxx |6 + oox/source/ppt/presentationfragmenthandler.cxx | 137 2 files changed, 80 insertions(+), 63 deletions(-) New commits: commit 9fabd7c11989c2a89c5bb238e6cb52b0a6678851 Author: Henry Castro AuthorDate: Thu Sep 28 14:23:55 2023 -0400 Commit: Henry Castro CommitDate: Tue Oct 3 21:48:00 2023 +0200 tdf#155512: oox: ppt: abstraction "importMasterSlide" Signed-off-by: Henry Castro Change-Id: Icfe8e3abbada7f728b2ad1f8e300a688f51d8f75 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157386 Tested-by: Jenkins CollaboraOffice Reviewed-by: Caolán McNamara (cherry picked from commit 84ac58c37fffa0c8b6d55c70009515d013ad65b4) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157468 Tested-by: Jenkins diff --git a/include/oox/ppt/presentationfragmenthandler.hxx b/include/oox/ppt/presentationfragmenthandler.hxx index 7ac929ec555b..4685ea2d8316 100644 --- a/include/oox/ppt/presentationfragmenthandler.hxx +++ b/include/oox/ppt/presentationfragmenthandler.hxx @@ -38,6 +38,8 @@ namespace oox::core { class XmlFilterBase; } namespace oox::ppt { +class PowerPointImport; + class PresentationFragmentHandler final : public ::oox::core::FragmentHandler2 { public: @@ -50,6 +52,10 @@ private: void importSlide( const ::oox::core::FragmentHandlerRef& rSlideFragmentHandler, const oox::ppt::SlidePersistPtr& rPersist ); void importSlide(sal_uInt32 nSlide, bool bFirstSlide, bool bImportNotes); +oox::ppt::SlidePersistPtr importMasterSlide(const ::com::sun::star::uno::Reference<::com::sun::star::frame::XModel>& xModel, +::oox::ppt::PowerPointImport& rFilter, +const OUString& rLayoutFragmentPath, +const OUString& rMasterFragmentPath); void saveThemeToGrabBag(const oox::drawingml::ThemePtr& pThemePtr, sal_Int32 nThemeIdx); void importCustomSlideShow(std::vector& rCustomShowList); static void importSlideNames(::oox::core::XmlFilterBase& rFilter, const std::vector& rSlidePersist); diff --git a/oox/source/ppt/presentationfragmenthandler.cxx b/oox/source/ppt/presentationfragmenthandler.cxx index 9b52b92d97d0..538d79df7f50 100644 --- a/oox/source/ppt/presentationfragmenthandler.cxx +++ b/oox/source/ppt/presentationfragmenthandler.cxx @@ -215,6 +215,79 @@ void PresentationFragmentHandler::importCustomSlideShow(std::vector& } } +SlidePersistPtr PresentationFragmentHandler::importMasterSlide(const Reference& xModel, + PowerPointImport& rFilter, + const OUString& rLayoutFragmentPath, + const OUString& rMasterFragmentPath) +{ +SlidePersistPtr pMasterPersistPtr; +Reference< drawing::XDrawPage > xMasterPage; +Reference< drawing::XMasterPagesSupplier > xMPS( xModel, uno::UNO_QUERY_THROW ); +Reference< drawing::XDrawPages > xMasterPages( xMPS->getMasterPages(), uno::UNO_SET_THROW ); + +sal_Int32 nIndex; +if( rFilter.getMasterPages().empty() ) +{ +nIndex = 0; +xMasterPages->getByIndex( nIndex ) >>= xMasterPage; +} +else +{ +nIndex = xMasterPages->getCount(); +xMasterPage = xMasterPages->insertNewByIndex( nIndex ); +} + +pMasterPersistPtr = std::make_shared( rFilter, true, false, xMasterPage, + std::make_shared( Master, "com.sun.star.drawing.GroupShape" ), mpTextListStyle ); +pMasterPersistPtr->setLayoutPath( rLayoutFragmentPath ); +rFilter.getMasterPages().push_back( pMasterPersistPtr ); +rFilter.setActualSlidePersist( pMasterPersistPtr ); +FragmentHandlerRef xMasterFragmentHandler( new SlideFragmentHandler( rFilter, rMasterFragmentPath, pMasterPersistPtr, Master ) ); + +// set the correct theme +OUString aThemeFragmentPath = xMasterFragmentHandler->getFragmentPathFromFirstTypeFromOfficeDoc( u"theme" ); +if( !aThemeFragmentPath.isEmpty() ) +{ +std::map< OUString, oox::drawingml::ThemePtr >& rThemes( rFilter.getThemes() ); +std::map< OUString, oox::drawingml::ThemePtr >::iterator aIter2( rThemes.find( aThemeFragmentPath ) ); +if( aIter2 == rThemes.end() ) +{ +oox::drawingml::ThemePtr pThemePtr = std::make_shared(); +pMasterPersistPtr->setTheme( pThemePtr ); +Reference xDoc= +rFilter.importFragment(aThemeFragmentPath); + +auto pTheme = std::make_shared(); +pThemePtr->setTheme(pTheme); + +rFilter.importFragment( +new ThemeFragmentHandler(rFilter, aThemeFragmentPath, *pThemePtr, *pTheme), +
[Libreoffice-commits] core.git: idl/inc idl/source
idl/inc/object.hxx|2 +- idl/source/objects/object.cxx | 38 ++ 2 files changed, 15 insertions(+), 25 deletions(-) New commits: commit 67594344631c362d43b9d6a0cfadefbcfa5046d8 Author: Yli875 AuthorDate: Tue Sep 12 11:58:54 2023 -0700 Commit: Ilmari Lauhakangas CommitDate: Tue Oct 3 22:08:54 2023 +0200 tdf#145538 Use range based for loops in idl:object Change-Id: I7c9935254be5bea050a09859cebbc4112894999b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156858 Tested-by: Jenkins Tested-by: Ilmari Lauhakangas Reviewed-by: Ilmari Lauhakangas diff --git a/idl/inc/object.hxx b/idl/inc/object.hxx index b5c30c9e0247..4254a4e1f318 100644 --- a/idl/inc/object.hxx +++ b/idl/inc/object.hxx @@ -80,7 +80,7 @@ public: virtual voidReadContextSvIdl( SvIdlDataBase &, SvTokenStream & rInStm ) override; -voidFillClasses( SvMetaClassList & rList ); +voidFillClasses( SvMetaClassList & rClassList ); virtual voidWriteSfx( SvIdlDataBase & rBase, SvStream & rOutStm ) override; }; diff --git a/idl/source/objects/object.cxx b/idl/source/objects/object.cxx index 8f207ca5ac04..4f3a0836791d 100644 --- a/idl/source/objects/object.cxx +++ b/idl/source/objects/object.cxx @@ -138,9 +138,8 @@ sal_uInt16 SvMetaClass::WriteSlotParamArray( SvIdlDataBase & rBase, SvStream & rOutStm ) { sal_uInt16 nCount = 0; -for ( size_t i = 0, n = rSlotList.size(); i < n; ++i ) +for ( const auto& pAttr : rSlotList ) { -SvMetaSlot *pAttr = rSlotList[ i ]; nCount = nCount + pAttr->WriteSlotParamArray( rBase, rOutStm ); } @@ -169,18 +168,14 @@ void SvMetaClass::InsertSlots( SvSlotElementList& rList, std::vector const OString& rPrefix, SvIdlDataBase& rBase) { // was this class already written? -for ( size_t i = 0, n = rClassList.size(); i < n ; ++i ) -if ( rClassList[ i ] == this ) -return; +if ( std::find( rClassList.begin(), rClassList.end(), this ) != rClassList.end() ) +return; rClassList.push_back( this ); // write all direct attributes -size_t n; -for( n = 0; n < aAttrList.size(); n++ ) +for( const auto& pAttr : aAttrList ) { -SvMetaAttribute * pAttr = aAttrList[n]; - sal_uInt32 nId = pAttr->GetSlotId().GetValue(); std::vector::iterator iter = std::find(rSuperList.begin(), @@ -204,9 +199,8 @@ void SvMetaClass::InsertSlots( SvSlotElementList& rList, std::vector // Write all attributes of the imported classes, as long as they have // not already been imported by the superclass. -for( n = 0; n < aClassElementList.size(); n++ ) +for( auto& rElement : aClassElementList ) { -SvClassElement& rElement = aClassElementList[n]; SvMetaClass * pCl = rElement.GetClass(); OStringBuffer rPre(rPrefix.getLength() + 1 + rElement.GetPrefix().getLength()); rPre.append(rPrefix); @@ -226,26 +220,24 @@ void SvMetaClass::InsertSlots( SvSlotElementList& rList, std::vector } } -void SvMetaClass::FillClasses( SvMetaClassList & rList ) +void SvMetaClass::FillClasses( SvMetaClassList & rClassList ) { // Am I not yet in? -for ( size_t i = 0, n = rList.size(); i < n; ++i ) -if ( rList[ i ] == this ) -return; +if ( std::find( rClassList.begin(), rClassList.end(), this ) != rClassList.end() ) +return; -rList.push_back( this ); +rClassList.push_back( this ); // my imports -for( size_t n = 0; n < aClassElementList.size(); n++ ) +for( auto& rElement : aClassElementList ) { -SvClassElement& rElement = aClassElementList[n]; SvMetaClass * pCl = rElement.GetClass(); -pCl->FillClasses( rList ); +pCl->FillClasses( rClassList ); } // my superclass if( aSuperClass.is() ) -aSuperClass->FillClasses( rList ); +aSuperClass->FillClasses( rClassList ); } @@ -255,9 +247,8 @@ void SvMetaClass::WriteSlotStubs( std::string_view rShellName, SvStream & rOutStm ) { // write all attributes -for ( size_t i = 0, n = rSlotList.size(); i < n; ++i ) +for ( const auto& pAttr : rSlotList ) { -SvMetaSlot *pAttr = rSlotList[ i ]; pAttr->WriteSlotStubs( rShellName, rList, rOutStm ); } } @@ -334,9 +325,8 @@ void SvMetaClass::WriteSfx( SvIdlDataBase & rBase, SvStream & rOutStm ) rOutStm.WriteOString( "};" ) << endl; rOutStm.WriteOString( "#endif" ) << endl << endl; -for( size_t i = 0, n = aSlotList.size(); i < n; ++i ) +for( auto& pAttr : aSlotList ) { -SvMetaSlot* pAttr = aSlotList[ i ]; pAttr->ResetSlotPointer(); }
[Libreoffice-commits] help.git: AllLangHelp_shared.mk source/text
AllLangHelp_shared.mk |3 + source/text/shared/01/search_commands.xhp | 18 +++--- source/text/shared/main0108.xhp | 50 -- 3 files changed, 42 insertions(+), 29 deletions(-) New commits: commit c4ef220076879c2e0061af81c62611068d2182b8 Author: Olivier Hallot AuthorDate: Tue Oct 3 11:55:25 2023 -0300 Commit: Olivier Hallot CommitDate: Tue Oct 3 22:40:36 2023 +0200 tdf#155875 UI cmds Writer/Help in Help(48) + refactoring + Help part. Change-Id: I7ce7c293a283c62040f351816843a2f8f84ca9e4 Reviewed-on: https://gerrit.libreoffice.org/c/help/+/157521 Tested-by: Jenkins Reviewed-by: Olivier Hallot diff --git a/AllLangHelp_shared.mk b/AllLangHelp_shared.mk index a0a5dd7f85..de64b91c49 100644 --- a/AllLangHelp_shared.mk +++ b/AllLangHelp_shared.mk @@ -407,12 +407,14 @@ $(eval $(call gb_AllLangHelp_add_helpfiles,shared,\ helpcontent2/source/text/shared/01/SelectTable \ helpcontent2/source/text/shared/01/SetOptimalColumnWidth \ helpcontent2/source/text/shared/01/SetOptimalRowHeight \ +helpcontent2/source/text/shared/01/search_commands \ helpcontent2/source/text/shared/01/SpellOnline \ helpcontent2/source/text/shared/01/select_template_category \ helpcontent2/source/text/shared/01/signexistingpdf \ helpcontent2/source/text/shared/01/signsignatureline \ helpcontent2/source/text/shared/01/StyleNewByExample \ helpcontent2/source/text/shared/01/StyleUpdateByExample \ +helpcontent2/source/text/shared/01/TipOfTheDay \ helpcontent2/source/text/shared/01/themescolordialog \ helpcontent2/source/text/shared/01/themesdialog \ helpcontent2/source/text/shared/01/timestampauth \ @@ -910,7 +912,6 @@ $(eval $(call gb_AllLangHelp_add_helpfiles,shared,\ helpcontent2/source/text/shared/optionen/mailmerge \ helpcontent2/source/text/shared/optionen/online_update \ helpcontent2/source/text/shared/optionen/opencl \ -helpcontent2/source/text/shared/optionen/search_commands \ helpcontent2/source/text/shared/optionen/serverauthentication \ helpcontent2/source/text/shared/optionen/testaccount \ helpcontent2/source/text/shared/optionen/translatetools \ diff --git a/source/text/shared/optionen/search_commands.xhp b/source/text/shared/01/search_commands.xhp similarity index 75% rename from source/text/shared/optionen/search_commands.xhp rename to source/text/shared/01/search_commands.xhp index e82023f4f4..6077e0b371 100644 --- a/source/text/shared/optionen/search_commands.xhp +++ b/source/text/shared/01/search_commands.xhp @@ -12,7 +12,7 @@ Search Commands -/text/shared/optionen/search_commands.xhp +/text/shared/01/search_commands.xhp @@ -23,11 +23,17 @@ - Search Commands + + +Search Commands Allows to search and execute all commands available in application menus by their names. + + This feature is available in Writer, Calc, Impress and Draw. -Choose Help - Search Commands -Use the shortcut Shift + Esc + +Choose Help - Search Commands. + +Shift + Esc When the Search Commands feature is activated, a head-up display (HUD) is shown and can be used to quickly search commands by their names. As the search string is typed, all matching commands are shown in a list below the search field. To execute a command: @@ -39,6 +45,8 @@ Use the arrow keys in the keyboard to navigate through the items shown in the list and press Enter to run the desired command. - This feature is available in Writer, Calc, Impress and Draw. + + + diff --git a/source/text/shared/main0108.xhp b/source/text/shared/main0108.xhp index e705796546..b0dd5b5318 100644 --- a/source/text/shared/main0108.xhp +++ b/source/text/shared/main0108.xhp @@ -20,7 +20,7 @@ -Help +Help /text/shared/main0108.xhp @@ -29,26 +29,26 @@ - + -Help -The Help menu allows you to start and control the $[officename] Help system. +Help +The Help menu allows you to start and control the $[officename] Help system. $[officename] Help -Opens the main page of the $[officename] Help for the current application. You can scroll through the Help pages and you can search for index terms or any text. +Opens the main page of the $[officename] Help for the current application. You can scroll through the Help pages and you can search for index terms or any text. - Icon Help + Icon Help - %PRODUCTNAME Help + %PRODUCTNAME Help @@ -56,22 +56,26 @@ - + User Guides -Opens the documentation page in the web browser, where users can download, read or purchase %PRODUCTNAME user guides, written by the community. +Opens the documentation page in the web browser, where users can download, read or purchase %PRODUCTNAME user guides, written by the communi
[Libreoffice-commits] core.git: 2 commits - helpcontent2
helpcontent2 |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit f95c3994f0b6a82a3bc2ddfb68822b74479ae185 Author: Olivier Hallot AuthorDate: Tue Oct 3 17:40:53 2023 -0300 Commit: Gerrit Code Review CommitDate: Tue Oct 3 22:40:53 2023 +0200 Update git submodules * Update helpcontent2 from branch 'master' to 330186afbf28123351e97dc7f67583952e0b6ff7 - tdf#155875 UI cmds Writer/Help in Help(49) + refactoring + Help part, search commands. Change-Id: I9f22318164f53107fc1d84bedc1c0ae67e6d6448 Reviewed-on: https://gerrit.libreoffice.org/c/help/+/157522 Tested-by: Jenkins Reviewed-by: Olivier Hallot diff --git a/helpcontent2 b/helpcontent2 index c4ef22007687..330186afbf28 16 --- a/helpcontent2 +++ b/helpcontent2 @@ -1 +1 @@ -Subproject commit c4ef220076879c2e0061af81c62611068d2182b8 +Subproject commit 330186afbf28123351e97dc7f67583952e0b6ff7 commit 206130e95b6b6c228467f91d3deccf5970947616 Author: Olivier Hallot AuthorDate: Tue Oct 3 17:40:37 2023 -0300 Commit: Gerrit Code Review CommitDate: Tue Oct 3 22:40:37 2023 +0200 Update git submodules * Update helpcontent2 from branch 'master' to c4ef220076879c2e0061af81c62611068d2182b8 - tdf#155875 UI cmds Writer/Help in Help(48) + refactoring + Help part. Change-Id: I7ce7c293a283c62040f351816843a2f8f84ca9e4 Reviewed-on: https://gerrit.libreoffice.org/c/help/+/157521 Tested-by: Jenkins Reviewed-by: Olivier Hallot diff --git a/helpcontent2 b/helpcontent2 index e0a3eafc3fab..c4ef22007687 16 --- a/helpcontent2 +++ b/helpcontent2 @@ -1 +1 @@ -Subproject commit e0a3eafc3fabcdceab8324073548a0117908ef51 +Subproject commit c4ef220076879c2e0061af81c62611068d2182b8
[Libreoffice-commits] help.git: source/text
source/text/shared/01/TipOfTheDay.xhp | 43 source/text/shared/01/profile_safe_mode.xhp | 60 +++- 2 files changed, 76 insertions(+), 27 deletions(-) New commits: commit 330186afbf28123351e97dc7f67583952e0b6ff7 Author: Olivier Hallot AuthorDate: Tue Oct 3 12:16:08 2023 -0300 Commit: Olivier Hallot CommitDate: Tue Oct 3 22:40:52 2023 +0200 tdf#155875 UI cmds Writer/Help in Help(49) + refactoring + Help part, search commands. Change-Id: I9f22318164f53107fc1d84bedc1c0ae67e6d6448 Reviewed-on: https://gerrit.libreoffice.org/c/help/+/157522 Tested-by: Jenkins Reviewed-by: Olivier Hallot diff --git a/source/text/shared/01/TipOfTheDay.xhp b/source/text/shared/01/TipOfTheDay.xhp new file mode 100644 index 00..3babbb29f5 --- /dev/null +++ b/source/text/shared/01/TipOfTheDay.xhp @@ -0,0 +1,43 @@ + + + + + + +Tip of the Day +/text/shared/01/TipOfTheDay.xhp + + + + + +tip of the day + + + +Tip of the Day +Display a dialog box with a usage tip. The Tip of the Day contain a collection of tips that helps to better use %PRODUCTNAME resources. + + + +Choose Help - Show Tip of the Day. + +The tips are cycled in a list of hundreds tips. + +Show tips on startup +Display the Tip of the Day box the first time in the day you start %PRODUCTNAME and open one of its modules. +Next Tip +Show the next tip in the Tip of the Day list. + + + + + + diff --git a/source/text/shared/01/profile_safe_mode.xhp b/source/text/shared/01/profile_safe_mode.xhp index 45778b4912..661562ebe9 100644 --- a/source/text/shared/01/profile_safe_mode.xhp +++ b/source/text/shared/01/profile_safe_mode.xhp @@ -10,7 +10,7 @@ -Safe Mode +Safe Mode /text/shared/01/profile_safe_mode.xhp @@ -18,58 +18,64 @@ - - - + + + profile;safe mode Safe Mode - Safe mode is a mode where %PRODUCTNAME temporarily starts with a fresh user profile and disables hardware acceleration. It helps to restore a non-working %PRODUCTNAME instance. + Safe mode is a mode where %PRODUCTNAME temporarily starts with a fresh user profile and disables hardware acceleration. It helps to restore a non-working %PRODUCTNAME instance. - Choose Help - Restart in Safe Mode. - Start %PRODUCTNAME from command line with --safe-mode option - Start %PRODUCTNAME from %PRODUCTNAME (Safe Mode) start menu entry (Windows only) + + Choose Help - Restart in Safe Mode. + From a command line + Start %PRODUCTNAME from command line with --safe-mode option + + + Start %PRODUCTNAME from %PRODUCTNAME (Safe Mode) start menu entry + + What can I do in safe mode? -Once in safe mode, you will be shown a dialog offering three user profile restoration options +Once in safe mode, you will be shown a dialog offering three user profile restoration options - + Continue in Safe Mode -This option will let you work with %PRODUCTNAME as you are used to, but using a temporary user profile. It also means that all configuration changes made to the temporary user profile will be lost after restart. +This option will let you work with %PRODUCTNAME as you are used to, but using a temporary user profile. It also means that all configuration changes made to the temporary user profile will be lost after restart. - + Restart in Normal Mode -Choosing Restart in Normal Mode will discard all changes, terminate safe mode and start %PRODUCTNAME again in normal mode. Use this option if you got here by accident. +Choosing Restart in Normal Mode will discard all changes, terminate safe mode and start %PRODUCTNAME again in normal mode. Use this option if you got here by accident. - + Apply Changes and Restart -The dialog offers multiple changes to the user profile that can be made to help restoring %PRODUCTNAME to working state. They get more radical from top down so you should try them successively one after another. Choosing this option applies selected changes +The dialog offers multiple changes to the user profile that can be made to help restoring %PRODUCTNAME to working state. They get more radical from top down so you should try them successively one after another. Choosing this option applies selected changes - + Restore from backup -%PRODUCTNAME keeps backups of previous configurations and activated extensions. Use this option to return to the previous state if your problems are likely to be caused by recent changes to configuration or extensions. +%PRODUCTNAME keeps backups of previous configurations and activated extensions. Use this option to return to the previous state if your problems are likely to be caused by recent changes to configuration or extensions. - + Configure -You can disable all extensions inst
Re: Orcus 0.19.0, Apache Arrow and CMake
Hi Miklos, On 10/3/23 02:21, Miklos Vajna wrote: Hi Kohei, On Mon, Oct 02, 2023 at 07:06:01PM -0400, Kohei Yoshida wrote: That's good to know. Let me think about this for a bit. The truth is that I'm not 100% sure whether I can commit to working on adding CMake executable as an additional build requirement myself. I can imagine even adding an additional executable to our current buildsystem can be very complex and tedious. Perhaps I miss something, but doxygen is already a built-time dependency, building with cmake. So lode.git has code to install cmake, see install_private_cmake() in bin/utils.sh in lode.git. Thanks for the info. This is very helpful. Does that mean we can consider cmake to be always available during the build, or is it still considered optional? IIRC doxygen is an optional build component. So, in theory one can still build libreoffice without cmake by disabling doxygen? configure doesn't (seem to) check for the availability of cmake executable. Kohei
[Libreoffice-commits] core.git: sw/qa sw/source
sw/qa/uibase/fldui/fldui.cxx | 24 sw/source/uibase/fldui/fldmgr.cxx |7 +-- 2 files changed, 29 insertions(+), 2 deletions(-) New commits: commit 4c5f51a7ac4c0f7043ead2b3b48e71c33e16f992 Author: Miklos Vajna AuthorDate: Tue Oct 3 20:12:09 2023 +0200 Commit: Miklos Vajna CommitDate: Wed Oct 4 08:05:21 2023 +0200 tdf#157394 sw: fix inserting reference mark with existing selection Type "myword" in Writer, select it, Insert -> Cross-reference, set Name to "myname", click Insert. The body text now had "myword" twice, instead of creating a reference mark on the existing "myword" word. This went wrong in commit 16075474819696f920979969474aa8300f4af530 (sw, field insert: handle the Content param for refmarks and accept HTML there, 2022-12-21), because it assumed that in case the uno comand is dispatched with some reference text, then that has to be inserted at the cursor position and only then the refmark can be created on that range. It was not expected that the current Writer selection would show up as refmark text. Fix the problem by taking the refmark text from the uno command parameter only in case we don't have selection, which restores the old behavior on manual insert of a refmark and keeps the new uno command parameter working. Note that contrary to the bug title, inserting cross-references did work, but the trouble was the insert of the duplicated word. Change-Id: I1a8b002c2a6f196975a18e01f0e8c457cfb416bf Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157524 Tested-by: Jenkins Reviewed-by: Miklos Vajna diff --git a/sw/qa/uibase/fldui/fldui.cxx b/sw/qa/uibase/fldui/fldui.cxx index 79a53c842a46..78b2fcedd42a 100644 --- a/sw/qa/uibase/fldui/fldui.cxx +++ b/sw/qa/uibase/fldui/fldui.cxx @@ -120,6 +120,30 @@ CPPUNIT_TEST_FIXTURE(Test, testInsertRefmark) CPPUNIT_ASSERT_EQUAL(static_cast(1), aAttrs.size()); CPPUNIT_ASSERT_EQUAL(OUString("aaabbbccc"), pTextNode->GetText()); } + +CPPUNIT_TEST_FIXTURE(Test, testInsertRefmarkSelection) +{ +// Given a document with a single selected word: +createSwDoc(); +SwDoc* pDoc = getSwDoc(); +SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell(); +pWrtShell->Insert2("myword"); +pWrtShell->SelAll(); + +// When inserting a refmark: +SwFieldMgr aMgr(pWrtShell); +SwInsertField_Data aData(SwFieldTypesEnum::SetRef, /*nSubType=*/0, "myname", "myword", + /*nFormatId=*/0); +aMgr.InsertField(aData); + +// Then make sure the document still just contains that word only once: +SwTextNode* pTextNode = pWrtShell->GetCursor()->GetPointNode().GetTextNode(); +// Without the accompanying fix in place, this test would have failed with: +// - Expected: myword +// - Actual : mywordmyword +// i.e. the content of the selection was duplicated. +CPPUNIT_ASSERT_EQUAL(OUString("myword"), pTextNode->GetText()); +} } CPPUNIT_PLUGIN_IMPLEMENT(); diff --git a/sw/source/uibase/fldui/fldmgr.cxx b/sw/source/uibase/fldui/fldmgr.cxx index b7c3e60e9a84..bf53ae29b0a4 100644 --- a/sw/source/uibase/fldui/fldmgr.cxx +++ b/sw/source/uibase/fldui/fldmgr.cxx @@ -1074,7 +1074,10 @@ bool SwFieldMgr::InsertField( const OUString& rRefmarkText = rData.m_sPar2; SwPaM* pCursorPos = pCurShell->GetCursor(); pCurShell->StartAction(); -if (!rRefmarkText.isEmpty()) +bool bHadMark = pCursorPos->HasMark(); +// If we have no selection and the refmark text is provided, then the text is +// expected to be HTML. +if (!bHadMark && !rRefmarkText.isEmpty()) { // Split node to remember where the start position is. bool bSuccess = pCurShell->GetDoc()->getIDocumentContentOperations().SplitNode( @@ -1100,7 +1103,7 @@ bool SwFieldMgr::InsertField( pCurShell->SetAttrItem( SwFormatRefMark( rData.m_sPar1 ) ); -if (!rRefmarkText.isEmpty()) +if (!bHadMark && !rRefmarkText.isEmpty()) { pCursorPos->DeleteMark(); }
Re: Orcus 0.19.0, Apache Arrow and CMake
Hi Kohei, On Tue, Oct 03, 2023 at 06:05:25PM -0400, Kohei Yoshida wrote: > Thanks for the info. This is very helpful. Does that mean we can consider > cmake to be always available during the build, or is it still considered > optional? IIRC doxygen is an optional build component. So, in theory one > can still build libreoffice without cmake by disabling doxygen? > > configure doesn't (seem to) check for the availability of cmake executable. Yes, you're right, doxygen (and thus cmake) is currently optional. I assume (but this may not be true) that nowadays most people either know how to install doxygen/cmake/other build-time dependencies or just use lode.git, which already installs cmake for you. So it may not be too painful to start hard-depending on cmake, apart from adding a configure check. Regards, Miklos