[Libreoffice-commits] core.git: sw/source
sw/source/filter/ww8/ww8toolbar.cxx | 56 ++-- sw/source/filter/ww8/ww8toolbar.hxx | 38 2 files changed, 47 insertions(+), 47 deletions(-) New commits: commit 9c796266470183f673eb58a8637dfe621eefa8b3 Author: Miklos Vajna AuthorDate: Mon Jun 27 08:44:40 2022 +0200 Commit: Miklos Vajna CommitDate: Mon Jun 27 09:23:39 2022 +0200 sw: prefix members of ww8toolbar Kme, MCD, MacroName and MacroNames See tdf#94879 for motivation. Change-Id: Ida3a41b22887f5a21b3be48665fa722d4ff2b027 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136449 Reviewed-by: Miklos Vajna Tested-by: Jenkins diff --git a/sw/source/filter/ww8/ww8toolbar.cxx b/sw/source/filter/ww8/ww8toolbar.cxx index ad558141cda3..fb31b698ecaa 100644 --- a/sw/source/filter/ww8/ww8toolbar.cxx +++ b/sw/source/filter/ww8/ww8toolbar.cxx @@ -886,7 +886,7 @@ bool TcgSttbfCore::Read( SvStream& rS ) } MacroNames::MacroNames() : - iMac( 0 ) + m_iMac( 0 ) { } @@ -899,24 +899,24 @@ bool MacroNames::Read( SvStream &rS) SAL_INFO("sw.ww8","MacroNames::Read() stream pos 0x" << std::hex << rS.Tell() ); nOffSet = rS.Tell(); Tcg255SubStruct::Read( rS ); -rS.ReadUInt16( iMac ); -if ( iMac ) +rS.ReadUInt16( m_iMac ); +if ( m_iMac ) { //even an empty MacroName will take 2 bytes size_t nMaxAvailableRecords = rS.remainingSize()/sizeof(sal_uInt16); -if (iMac > nMaxAvailableRecords) +if (m_iMac > nMaxAvailableRecords) return false; -rgNames.reset( new MacroName[ iMac ] ); -for ( sal_Int32 index = 0; index < iMac; ++index ) +m_rgNames.reset( new MacroName[ m_iMac ] ); +for ( sal_Int32 index = 0; index < m_iMac; ++index ) { -if ( !rgNames[ index ].Read( rS ) ) +if ( !m_rgNames[ index ].Read( rS ) ) return false; } } return rS.good(); } -MacroName::MacroName():ibst(0) +MacroName::MacroName():m_ibst(0) { } @@ -924,8 +924,8 @@ bool MacroName::Read(SvStream &rS) { SAL_INFO("sw.ww8","MacroName::Read() stream pos 0x" << std::hex << rS.Tell() ); nOffSet = rS.Tell(); -rS.ReadUInt16( ibst ); -return xstz.Read( rS ); +rS.ReadUInt16( m_ibst ); +return m_xstz.Read( rS ); } Xstz::Xstz():chTerm(0) @@ -945,12 +945,12 @@ Xstz::Read(SvStream &rS) return rS.good(); } -Kme::Kme() : reserved1(0) -,reserved2(0) -,kcm1(0) -,kcm2(0) -,kt(0) -,param(0) +Kme::Kme() : m_reserved1(0) +,m_reserved2(0) +,m_kcm1(0) +,m_kcm2(0) +,m_kt(0) +,m_param(0) { } @@ -963,7 +963,7 @@ Kme::Read(SvStream &rS) { SAL_INFO("sw.ww8","Kme::Read() stream pos 0x" << std::hex << rS.Tell() ); nOffSet = rS.Tell(); -rS.ReadInt16( reserved1 ).ReadInt16( reserved2 ).ReadUInt16( kcm1 ).ReadUInt16( kcm2 ).ReadUInt16( kt ).ReadUInt32( param ); +rS.ReadInt16( m_reserved1 ).ReadInt16( m_reserved2 ).ReadUInt16( m_kcm1 ).ReadUInt16( m_kcm2 ).ReadUInt16( m_kt ).ReadUInt32( m_param ); return rS.good(); } @@ -980,15 +980,15 @@ bool Acd::Read(SvStream &rS) return rS.good(); } -MCD::MCD() : reserved1(0x56) -,reserved2( 0 ) -,ibst( 0 ) -,ibstName( 0 ) -,reserved3( 0x ) -,reserved4( 0 ) -,reserved5( 0 ) -,reserved6( 0 ) -,reserved7( 0 ) +MCD::MCD() : m_reserved1(0x56) +,m_reserved2( 0 ) +,m_ibst( 0 ) +,m_ibstName( 0 ) +,m_reserved3( 0x ) +,m_reserved4( 0 ) +,m_reserved5( 0 ) +,m_reserved6( 0 ) +,m_reserved7( 0 ) { } @@ -996,8 +996,8 @@ bool MCD::Read(SvStream &rS) { SAL_INFO("sw.ww8","MCD::Read() stream pos 0x" << rS.Tell() ); nOffSet = rS.Tell(); -rS.ReadSChar( reserved1 ).ReadUChar( reserved2 ).ReadUInt16( ibst ).ReadUInt16( ibstName ).ReadUInt16( reserved3 ); -rS.ReadUInt32( reserved4 ).ReadUInt32( reserved5 ).ReadUInt32( reserved6 ).ReadUInt32( reserved7 ); +rS.ReadSChar( m_reserved1 ).ReadUChar( m_reserved2 ).ReadUInt16( m_ibst ).ReadUInt16( m_ibstName ).ReadUInt16( m_reserved3 ); +rS.ReadUInt32( m_reserved4 ).ReadUInt32( m_reserved5 ).ReadUInt32( m_reserved6 ).ReadUInt32( m_reserved7 ); return rS.good(); } diff --git a/sw/source/filter/ww8/ww8toolbar.hxx b/sw/source/filter/ww8/ww8toolbar.hxx index aeef83e63ca5..0e5f63e28a48 100644 --- a/sw/source/filter/ww8/ww8toolbar.hxx +++ b/sw/source/filter/ww8/ww8toolbar.hxx @@ -154,15 +154,15 @@ public: class MCD : public TBBase { -sal_Int8 reserved1; // A signed integer that MUST be 0x56. -sal_uInt8 reserved2; // MUST be 0. -sal_uInt16 ibst; // Unsigned integer that specifies the name of the macro. Macro name is specified by MacroName.xstz of the MacroName entry in the MacroNames such that MacroName.ibst equals ibst. MacroNames MUST contain such an entry. -sal_uInt16 ibstName; // An unsigned integer that specifies the index into the Command String Table (TcgSttbf.sttbf) where the macro's name and arguments are specified. -sal_u
[Libreoffice-commits] core.git: cui/source
cui/source/inc/paragrph.hxx |2 ++ cui/source/tabpages/paragrph.cxx |8 2 files changed, 10 insertions(+) New commits: commit 75e2d313760847110479f00a86a19fba4f508181 Author: László Németh AuthorDate: Fri Jun 24 12:17:17 2022 +0200 Commit: László Németh CommitDate: Mon Jun 27 09:46:20 2022 +0200 tdf#149713 sw para dialog: gray out labels of the new options Labels of the new hyphenation options "Hyphenation zone" and "Minimum word length in characters" were always black, instead of gray, when Hyphenation is disabled. Follow-up to commit 7a1d4b7d1db93ca1f541856a8d00d621d50e7bd6 "tdf#149420 sw offapi xmloff: add hyphenation zone" and commit 29359fc15c435cec17987fd6221ab6833d38746e "tdf#149324 sw offapi xmloff: add option to not hyphenate short words". Change-Id: Ic41c2fa0fa69385013b1e90568084956cc5d791d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136367 Tested-by: László Németh Reviewed-by: László Németh diff --git a/cui/source/inc/paragrph.hxx b/cui/source/inc/paragrph.hxx index 3947c14d10c8..991641e3b06c 100644 --- a/cui/source/inc/paragrph.hxx +++ b/cui/source/inc/paragrph.hxx @@ -232,7 +232,9 @@ private: std::unique_ptr m_xExtHyphenAfterBox; std::unique_ptr m_xMaxHyphenLabel; std::unique_ptr m_xMaxHyphenEdit; +std::unique_ptr m_xMinWordLabel; std::unique_ptr m_xMinWordLength; +std::unique_ptr m_xHyphenZoneLabel; std::unique_ptr m_xHyphenZone; // pagebreak diff --git a/cui/source/tabpages/paragrph.cxx b/cui/source/tabpages/paragrph.cxx index b43c77cbd894..78a1cdd178aa 100644 --- a/cui/source/tabpages/paragrph.cxx +++ b/cui/source/tabpages/paragrph.cxx @@ -1614,7 +1614,9 @@ void SvxExtParagraphTabPage::Reset( const SfxItemSet* rSet ) m_xAfterText->set_sensitive(bEnable); m_xMaxHyphenLabel->set_sensitive(bEnable); m_xMaxHyphenEdit->set_sensitive(bEnable); +m_xMinWordLabel->set_sensitive(bEnable); m_xMinWordLength->set_sensitive(bEnable); +m_xHyphenZoneLabel->set_sensitive(bEnable); m_xHyphenZone->set_sensitive(bEnable); switch (rSet->GetItemState(SID_ATTR_PARA_PAGENUM)) @@ -1931,7 +1933,9 @@ SvxExtParagraphTabPage::SvxExtParagraphTabPage(weld::Container* pPage, weld::Dia , m_xExtHyphenAfterBox(m_xBuilder->weld_spin_button("spinLineBegin")) , m_xMaxHyphenLabel(m_xBuilder->weld_label("labelMaxNum")) , m_xMaxHyphenEdit(m_xBuilder->weld_spin_button("spinMaxNum")) +, m_xMinWordLabel(m_xBuilder->weld_label("labelMinLen")) , m_xMinWordLength(m_xBuilder->weld_spin_button("spinMinLen")) +, m_xHyphenZoneLabel(m_xBuilder->weld_label("labelHyphenZone")) , m_xHyphenZone(new SvxRelativeField(m_xBuilder->weld_metric_spin_button("spinHyphenZone", FieldUnit::CM))) //Page break , m_xPageBreakBox(m_xBuilder->weld_check_button("checkInsert")) @@ -2001,7 +2005,9 @@ SvxExtParagraphTabPage::SvxExtParagraphTabPage(weld::Container* pPage, weld::Dia m_xExtHyphenAfterBox->set_sensitive(false); m_xMaxHyphenLabel->set_sensitive(false); m_xMaxHyphenEdit->set_sensitive(false); +m_xMinWordLabel->set_sensitive(false); m_xMinWordLength->set_sensitive(false); +m_xHyphenZoneLabel->set_sensitive(false); m_xHyphenZone->set_sensitive(false); m_xPageNumBox->set_sensitive(false); m_xPagenumEdit->set_sensitive(false); @@ -2136,7 +2142,9 @@ void SvxExtParagraphTabPage::HyphenClickHdl() m_xExtHyphenAfterBox->set_sensitive(bEnable); m_xMaxHyphenLabel->set_sensitive(bEnable); m_xMaxHyphenEdit->set_sensitive(bEnable); +m_xMinWordLabel->set_sensitive(bEnable); m_xMinWordLength->set_sensitive(bEnable); +m_xHyphenZoneLabel->set_sensitive(bEnable); m_xHyphenZone->set_sensitive(bEnable); m_xHyphenBox->set_state(bEnable ? TRISTATE_TRUE : TRISTATE_FALSE); }
[Libreoffice-commits] core.git: Branch 'libreoffice-7-4' - oox/source sd/qa
oox/source/export/drawingml.cxx|8 +++- sd/qa/unit/data/odp/tdf149311.odp |binary sd/qa/unit/export-tests-ooxml1.cxx | 16 3 files changed, 23 insertions(+), 1 deletion(-) New commits: commit c49d427170752b6e5a559000c5a0766f0e3da81b Author: Tibor Nagy AuthorDate: Wed Jun 1 18:05:03 2022 +0200 Commit: Xisco Fauli CommitDate: Mon Jun 27 09:46:19 2022 +0200 tdf#149311 PPTX export: fix internal hyperlink on texts by converting "Slide [digits]" URLs to slide[digits].xml See also commit 4142d728f003166ebe520bfdaf672505e585b807 "tdf#149314 PPTX import: fix internal hyperlink on texts". Change-Id: I39e095c960b04e728b3e28fa0a657d37d9c71ba1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135250 Tested-by: László Németh Reviewed-by: László Németh (cherry picked from commit e18ef7e14b5f9628f3009c5aadda12bc6b2d7758) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136384 Tested-by: Jenkins Reviewed-by: Xisco Fauli diff --git a/oox/source/export/drawingml.cxx b/oox/source/export/drawingml.cxx index dad1ce7a5c44..77363ab4b201 100644 --- a/oox/source/export/drawingml.cxx +++ b/oox/source/export/drawingml.cxx @@ -1984,7 +1984,7 @@ void DrawingML::WriteShapeTransformation( const Reference< XShape >& rXShape, sa bFlipHWrite, bFlipVWrite, ExportRotateClockwisify(nRotation + nCameraRotation), IsGroupShape( rXShape )); } -static OUString lcl_GetTarget(const css::uno::Reference& xModel, std::u16string_view rURL) +static OUString lcl_GetTarget(const css::uno::Reference& xModel, OUString& rURL) { Reference xDPS(xModel, uno::UNO_QUERY_THROW); Reference xDrawPages(xDPS->getDrawPages(), uno::UNO_SET_THROW); @@ -2005,6 +2005,12 @@ static OUString lcl_GetTarget(const css::uno::Reference& xMo break; } } +if (sTarget.isEmpty()) +{ +sal_Int32 nSplit = rURL.lastIndexOf(' '); +if (nSplit > -1) +sTarget = OUString::Concat("slide") + rURL.subView(nSplit + 1) + ".xml"; +} return sTarget; } diff --git a/sd/qa/unit/data/odp/tdf149311.odp b/sd/qa/unit/data/odp/tdf149311.odp new file mode 100644 index ..2500ed5e7a51 Binary files /dev/null and b/sd/qa/unit/data/odp/tdf149311.odp differ diff --git a/sd/qa/unit/export-tests-ooxml1.cxx b/sd/qa/unit/export-tests-ooxml1.cxx index 01d0e9b3336f..c5a2c2ebc7e8 100644 --- a/sd/qa/unit/export-tests-ooxml1.cxx +++ b/sd/qa/unit/export-tests-ooxml1.cxx @@ -48,6 +48,7 @@ using namespace css; class SdOOXMLExportTest1 : public SdModelTestBaseXML { public: +void testTdf149311(); void testTdf149128(); void testTdf66228(); void testTdf147919(); @@ -120,6 +121,7 @@ public: CPPUNIT_TEST_SUITE(SdOOXMLExportTest1); +CPPUNIT_TEST(testTdf149311); CPPUNIT_TEST(testTdf149128); CPPUNIT_TEST(testTdf66228); CPPUNIT_TEST(testTdf147919); @@ -219,6 +221,20 @@ void checkFontAttributes( const SdrTextObj* pObj, ItemValue nVal, sal_uInt32 nId } +void SdOOXMLExportTest1::testTdf149311() +{ +sd::DrawDocShellRef xDocShRef += loadURL(m_directories.getURLFromSrc(u"/sd/qa/unit/data/odp/tdf149311.odp"), ODP); +utl::TempFile tempFile; +xDocShRef = saveAndReload(xDocShRef.get(), PPTX, &tempFile); +xDocShRef->DoClose(); + +xmlDocUniquePtr pRelsDoc = parseExport(tempFile, "ppt/slides/_rels/slide1.xml.rels"); + +assertXPath(pRelsDoc, "/rels:Relationships/rels:Relationship[@Id='rId1']", "Target", +"slide2.xml"); +} + void SdOOXMLExportTest1::testTdf149128() { sd::DrawDocShellRef xDocShRef
[Libreoffice-commits] core.git: drawinglayer/source emfio/qa
drawinglayer/source/tools/emfpcustomlinecap.cxx| 26 +- drawinglayer/source/tools/emfpcustomlinecap.hxx|2 drawinglayer/source/tools/emfphelperdata.cxx | 113 +- emfio/qa/cppunit/emf/EmfImportTest.cxx | 26 ++ emfio/qa/cppunit/emf/data/TestEmfPlusDrawPathWithCustomCap.emf |binary 5 files changed, 61 insertions(+), 106 deletions(-) New commits: commit 5b21b65572610df88986e700b81f1156aff14f65 Author: Bartosz Kosiorek AuthorDate: Thu Jun 16 02:47:23 2022 +0200 Commit: Bartosz Kosiorek CommitDate: Mon Jun 27 10:24:13 2022 +0200 tdf#142770 tdf#143031 EMF+ Implement CustomLineCap Change-Id: I9fae1d259ecdca37a1babac8a8a0e503b2dc0118 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135960 Tested-by: Jenkins Reviewed-by: Bartosz Kosiorek diff --git a/drawinglayer/source/tools/emfpcustomlinecap.cxx b/drawinglayer/source/tools/emfpcustomlinecap.cxx index 49cc912ed33c..e457a36cc2c4 100644 --- a/drawinglayer/source/tools/emfpcustomlinecap.cxx +++ b/drawinglayer/source/tools/emfpcustomlinecap.cxx @@ -21,6 +21,7 @@ #include "emfpcustomlinecap.hxx" #include "emfppath.hxx" #include "emfppen.hxx" +#include using namespace ::com::sun::star; using namespace ::basegfx; @@ -39,6 +40,7 @@ namespace emfplushelper , strokeEndCap(0) , strokeJoin(0) , miterLimit(0.0) +, widthScale(0.0) , mbIsFilled(false) { } @@ -57,6 +59,8 @@ namespace emfplushelper EMFPPath path(pathPoints); path.Read(s, pathFlags); polygon = path.GetPolygon(rR, false); +// rotate polygon by 180 degrees +polygon.transform(basegfx::utils::createRotateB2DHomMatrix(M_PI)); mbIsFilled = bFill; } @@ -71,7 +75,6 @@ namespace emfplushelper { sal_uInt32 customLineCapDataFlags, baseCap; float baseInset; -float widthScale; float fillHotSpotX, fillHotSpotY, strokeHotSpotX, strokeHotSpotY; s.ReadUInt32(customLineCapDataFlags).ReadUInt32(baseCap).ReadFloat(baseInset) @@ -82,11 +85,6 @@ namespace emfplushelper SAL_INFO("drawinglayer.emf", "EMF+\t\tcustomLineCapDataFlags: 0x" << std::hex << customLineCapDataFlags); SAL_INFO("drawinglayer.emf", "EMF+\t\tbaseCap: 0x" << std::hex << baseCap); SAL_INFO("drawinglayer.emf", "EMF+\t\tbaseInset: " << baseInset); -SAL_INFO("drawinglayer.emf", "EMF+\t\tstrokeStartCap: 0x" << std::hex << strokeStartCap); -SAL_INFO("drawinglayer.emf", "EMF+\t\tstrokeEndCap: 0x" << std::hex << strokeEndCap); -SAL_INFO("drawinglayer.emf", "EMF+\t\tstrokeJoin: 0x" << std::hex << strokeJoin); -SAL_INFO("drawinglayer.emf", "EMF+\t\tmiterLimit: " << miterLimit); -SAL_INFO("drawinglayer.emf", "EMF+\t\twidthScale: " << widthScale); if (customLineCapDataFlags & EmfPlusCustomLineCapDataFillPath) { @@ -103,16 +101,20 @@ namespace emfplushelper // TODO only reads the data, does not use them [I've had // no test document to be able to implement it] -sal_Int32 width, height, middleInset, fillState, lineStartCap; -sal_Int32 lineEndCap, lineJoin, widthScale; -float fillHotSpotX, fillHotSpotY, lineHotSpotX, lineHotSpotY; +sal_Int32 fillState; +float width, height, middleInset, unusedHotSpot; - s.ReadInt32(width).ReadInt32(height).ReadInt32(middleInset).ReadInt32(fillState).ReadInt32(lineStartCap) - .ReadInt32(lineEndCap).ReadInt32(lineJoin).ReadFloat(miterLimit).ReadInt32(widthScale) - .ReadFloat(fillHotSpotX).ReadFloat(fillHotSpotY).ReadFloat(lineHotSpotX).ReadFloat(lineHotSpotY); + s.ReadFloat(width).ReadFloat(height).ReadFloat(middleInset).ReadInt32(fillState).ReadUInt32(strokeStartCap) + .ReadUInt32(strokeEndCap).ReadUInt32(strokeJoin).ReadFloat(miterLimit).ReadFloat(widthScale) + .ReadFloat(unusedHotSpot).ReadFloat(unusedHotSpot).ReadFloat(unusedHotSpot).ReadFloat(unusedHotSpot); SAL_INFO("drawinglayer.emf", "EMF+\t\tTODO - actually read EmfPlusCustomLineCapArrowData object (section 2.2.2.12)"); } +SAL_INFO("drawinglayer.emf", "EMF+\t\tstrokeStartCap: 0x" << std::hex << strokeStartCap); +SAL_INFO("drawinglayer.emf", "EMF+\t\tstrokeEndCap: 0x" << std::hex << strokeEndCap); +SAL_INFO("drawinglayer.emf", "EMF+\t\tstrokeJoin: 0x" << std::hex << strokeJoin); +SAL_INFO("drawinglayer.emf", "EMF+\t\tmiterLimit: " << miterLimit); +SAL_INFO("drawinglayer.emf", "EMF+\t\twidthScale: " << widthScale); } } diff --git a/drawinglayer/source/tools/emfpcustomlinecap.hxx b/drawinglayer/source/tools/emfpcustomlinecap.hxx index e6202ae98179..22ed6be6dd4d 100644 --- a/drawinglayer/
[Libreoffice-commits] core.git: Branch 'libreoffice-7-4' - editeng/source include/editeng sc/qa sc/source
editeng/source/items/frmitems.cxx | 12 +-- include/editeng/brushitem.hxx |5 sc/qa/unit/data/xlsx/tdf148820.xlsx |binary sc/qa/unit/subsequent_export_test2.cxx| 32 ++ sc/source/filter/inc/stylesbuffer.hxx |2 + sc/source/filter/oox/autofilterbuffer.cxx |2 - sc/source/filter/oox/stylesbuffer.cxx | 17 +-- 7 files changed, 64 insertions(+), 6 deletions(-) New commits: commit 8115bbabffa9ca7c012ef5130194c80445648f6e Author: Balazs Varga AuthorDate: Fri Jun 17 16:51:22 2022 +0200 Commit: Xisco Fauli CommitDate: Mon Jun 27 10:31:17 2022 +0200 tdf#148820 sc: fix conditional formatted cell color Store foreground color for color filtering, because in OOXML the foreground color is used for color filtering and we overwrote it with the background color which is used for conditional formatted cells too. Regression from commit: 6f908b48373b71d45c8119b296b0504fb586f6f8 (tdf#143104 Fix xlsx import/export of color filter colors) Change-Id: I737e6f1170851822a2689fa477db59e62f0d47fa Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136055 Tested-by: Jenkins Tested-by: Gabor Kelemen Reviewed-by: Thorsten Behrens (cherry picked from commit 415dc3bb1c03dbdbc3cbca274bc435ac7557ba2d) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136457 Reviewed-by: Xisco Fauli diff --git a/editeng/source/items/frmitems.cxx b/editeng/source/items/frmitems.cxx index 4bbca9a2c0c1..c4c79dc0428b 100644 --- a/editeng/source/items/frmitems.cxx +++ b/editeng/source/items/frmitems.cxx @@ -2832,6 +2832,7 @@ void SvxLineItem::SetLine( const SvxBorderLine* pNew ) SvxBrushItem::SvxBrushItem(sal_uInt16 _nWhich) : SfxPoolItem(_nWhich) , aColor(COL_TRANSPARENT) +, aFilterColor(COL_TRANSPARENT) , nShadingValue(ShadingPattern::CLEAR) , nGraphicTransparency(0) , eGraphicPos(GPOS_NONE) @@ -2842,6 +2843,7 @@ SvxBrushItem::SvxBrushItem(sal_uInt16 _nWhich) SvxBrushItem::SvxBrushItem(const Color& rColor, sal_uInt16 _nWhich) : SfxPoolItem(_nWhich) , aColor(rColor) +, aFilterColor(COL_TRANSPARENT) , nShadingValue(ShadingPattern::CLEAR) , nGraphicTransparency(0) , eGraphicPos(GPOS_NONE) @@ -2852,6 +2854,7 @@ SvxBrushItem::SvxBrushItem(const Color& rColor, sal_uInt16 _nWhich) SvxBrushItem::SvxBrushItem(const Graphic& rGraphic, SvxGraphicPosition ePos, sal_uInt16 _nWhich) : SfxPoolItem(_nWhich) , aColor(COL_TRANSPARENT) +, aFilterColor(COL_TRANSPARENT) , nShadingValue(ShadingPattern::CLEAR) , xGraphicObject(new GraphicObject(rGraphic)) , nGraphicTransparency(0) @@ -2864,6 +2867,7 @@ SvxBrushItem::SvxBrushItem(const Graphic& rGraphic, SvxGraphicPosition ePos, sal SvxBrushItem::SvxBrushItem(const GraphicObject& rGraphicObj, SvxGraphicPosition ePos, sal_uInt16 _nWhich) : SfxPoolItem(_nWhich) , aColor(COL_TRANSPARENT) +, aFilterColor(COL_TRANSPARENT) , nShadingValue(ShadingPattern::CLEAR) , xGraphicObject(new GraphicObject(rGraphicObj)) , nGraphicTransparency(0) @@ -2877,6 +2881,7 @@ SvxBrushItem::SvxBrushItem(OUString aLink, OUString aFilter, SvxGraphicPosition ePos, sal_uInt16 _nWhich) : SfxPoolItem(_nWhich) , aColor(COL_TRANSPARENT) +, aFilterColor(COL_TRANSPARENT) , nShadingValue(ShadingPattern::CLEAR) , nGraphicTransparency(0) , maStrLink(std::move(aLink)) @@ -2890,6 +2895,7 @@ SvxBrushItem::SvxBrushItem(OUString aLink, OUString aFilter, SvxBrushItem::SvxBrushItem(const SvxBrushItem& rItem) : SfxPoolItem(rItem) , aColor(rItem.aColor) +, aFilterColor(rItem.aFilterColor) , nShadingValue(rItem.nShadingValue) , xGraphicObject(rItem.xGraphicObject ? new GraphicObject(*rItem.xGraphicObject) : nullptr) , nGraphicTransparency(rItem.nGraphicTransparency) @@ -2903,6 +2909,7 @@ SvxBrushItem::SvxBrushItem(const SvxBrushItem& rItem) SvxBrushItem::SvxBrushItem(SvxBrushItem&& rItem) : SfxPoolItem(std::move(rItem)) , aColor(std::move(rItem.aColor)) +, aFilterColor(std::move(rItem.aFilterColor)) , nShadingValue(std::move(rItem.nShadingValue)) , xGraphicObject(std::move(rItem.xGraphicObject)) , nGraphicTransparency(std::move(rItem.nGraphicTransparency)) @@ -3157,8 +3164,8 @@ bool SvxBrushItem::operator==( const SfxPoolItem& rAttr ) const assert(SfxPoolItem::operator==(rAttr)); const SvxBrushItem& rCmp = static_cast(rAttr); -bool bEqual = ( aColor == rCmp.aColor && eGraphicPos == rCmp.eGraphicPos && -nGraphicTransparency == rCmp.nGraphicTransparency); +bool bEqual = ( aColor == rCmp.aColor && aFilterColor == rCmp.aFilterColor && +eGraphicPos == rCmp.eGraphicPos && nGraphicTransparency == rCmp.nGraphicTransparency); if ( bEqual ) { @@ -3366,6 +3373,7 @@ void SvxBrushItem::dumpAsXml(xmlTextWrite
[Libreoffice-commits] core.git: Branch 'libreoffice-7-4' - svtools/qa svtools/source
svtools/qa/unit/testHtmlWriter.cxx | 21 + svtools/source/svhtml/HtmlWriter.cxx |3 ++- 2 files changed, 23 insertions(+), 1 deletion(-) New commits: commit b48f87d9823f85820a1cbf2c0baa23695ec66001 Author: Miklos Vajna AuthorDate: Fri Jun 24 16:07:15 2022 +0200 Commit: Xisco Fauli CommitDate: Mon Jun 27 11:11:18 2022 +0200 sw HTML export: fix missing escaping for image links Hyperlink URLs on images are currently written to the HTML output as-is, without any any encoding. Image links are written using HtmlWriter from svtools, which has the advantage of not building the markup manually (similar to sax_fastparser::FastSerializerHelper for XML), but that doesn't do any escaping. Some other parts of the HTML export build the export markup manually, but use HTMLOutFuncs::Out_String() to encode problematic content. Fix the problem by using HTMLOutFuncs::Out_String() in HtmlWriter for attribute values: it seems reasonable to assume that users of HtmlWriter would pass in unencoded strings, similar to how the sax serializer works. This could lead to double-encoding in case some user of HtmlWriter::attribute() would encode its attribute value already, but inspecting existing calls, none of the clients seem to do that at the moment. Change-Id: I5439e829b1b837cb9c51292b118f0b47e84197db Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136399 Tested-by: Jenkins Reviewed-by: Miklos Vajna (cherry picked from commit 167a5ce786b0561028ad42ea3fc92e55d14484a4) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136456 Reviewed-by: Xisco Fauli diff --git a/svtools/qa/unit/testHtmlWriter.cxx b/svtools/qa/unit/testHtmlWriter.cxx index d4c8e24e4390..702bf64464ab 100644 --- a/svtools/qa/unit/testHtmlWriter.cxx +++ b/svtools/qa/unit/testHtmlWriter.cxx @@ -198,6 +198,27 @@ CPPUNIT_TEST_FIXTURE(Test, testExactElementEnd) CPPUNIT_ASSERT_EQUAL(OString(""), aString); } +CPPUNIT_TEST_FIXTURE(Test, testAttributeValueEncode) +{ +// Given a HTML writer: +SvMemoryStream aStream; +HtmlWriter aHtml(aStream); +aHtml.prettyPrint(false); + +// When writing an attribute with a value that needs encoding: +aHtml.start("element"); +aHtml.attribute("attribute", "a&b"); +aHtml.end(); + +// Then make sure that the encoding is performed: +OString aString = extractFromStream(aStream); +// Without the accompanying fix in place, this test would have failed with: +// - Expected: +// - Actual : +// i.e. attribute value was not encoded in HTML, but it was in e.g. XML. +CPPUNIT_ASSERT_EQUAL(OString(""), aString); +} + CPPUNIT_PLUGIN_IMPLEMENT(); /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svtools/source/svhtml/HtmlWriter.cxx b/svtools/source/svhtml/HtmlWriter.cxx index f7c35a644706..b813c7ee50e8 100644 --- a/svtools/source/svhtml/HtmlWriter.cxx +++ b/svtools/source/svhtml/HtmlWriter.cxx @@ -11,6 +11,7 @@ #include #include #include +#include HtmlWriter::HtmlWriter(SvStream& rStream, std::string_view rNamespace) : mrStream(rStream), @@ -127,7 +128,7 @@ void HtmlWriter::writeAttribute(SvStream& rStream, std::string_view aAttribute, rStream.WriteOString(aAttribute); rStream.WriteChar('='); rStream.WriteChar('"'); -rStream.WriteOString(aValue); +HTMLOutFuncs::Out_String(rStream, OStringToOUString(aValue, RTL_TEXTENCODING_UTF8)); rStream.WriteChar('"'); }
[Libreoffice-commits] core.git: include/oox oox/inc oox/source sc/source
include/oox/drawingml/shape.hxx |4 include/oox/helper/attributelist.hxx| 20 ++-- include/oox/helper/helper.hxx | 32 --- include/oox/ppt/pptshape.hxx|3 include/oox/vml/vmlformatting.hxx | 64 +++ include/oox/vml/vmlshape.hxx| 26 +++--- include/oox/vml/vmlshapecontext.hxx |2 include/oox/vml/vmltextbox.hxx | 26 +++--- oox/inc/drawingml/chart/axismodel.hxx | 14 +-- oox/inc/drawingml/chart/plotareamodel.hxx |6 - oox/inc/drawingml/chart/seriesmodel.hxx | 34 oox/inc/drawingml/customshapeproperties.hxx | 16 +-- oox/inc/drawingml/fillproperties.hxx| 48 +-- oox/inc/drawingml/lineproperties.hxx| 16 +-- oox/inc/drawingml/shape3dproperties.hxx | 34 oox/inc/drawingml/textbodyproperties.hxx|4 oox/inc/drawingml/textcharacterproperties.hxx | 26 +++--- oox/source/drawingml/chart/axisconverter.cxx|4 oox/source/drawingml/chart/seriesconverter.cxx |4 oox/source/drawingml/colorchoicecontext.cxx |2 oox/source/drawingml/diagram/datamodelcontext.cxx |2 oox/source/drawingml/diagram/diagramlayoutatoms.cxx | 16 +-- oox/source/drawingml/effectproperties.hxx | 14 +-- oox/source/drawingml/textbodypropertiescontext.cxx |2 oox/source/drawingml/textparagraphpropertiescontext.cxx | 14 +-- oox/source/helper/attributelist.cxx | 66 oox/source/ppt/layoutfragmenthandler.cxx|2 oox/source/ppt/pptshape.cxx |4 oox/source/ppt/pptshapecontext.cxx |2 oox/source/ppt/slidefragmenthandler.cxx |2 oox/source/shape/WpsContext.cxx | 12 +- oox/source/vml/vmlformatting.cxx| 20 ++-- oox/source/vml/vmlshapecontext.cxx | 44 +- oox/source/vml/vmltextboxcontext.cxx|4 sc/source/filter/inc/autofilterbuffer.hxx |2 sc/source/filter/oox/autofilterbuffer.cxx |2 36 files changed, 282 insertions(+), 311 deletions(-) New commits: commit 04073c5fedd33654f242fecb7e39afb07cf0e273 Author: Noel Grandin AuthorDate: Tue Jun 21 13:17:09 2022 +0200 Commit: Noel Grandin CommitDate: Mon Jun 27 11:32:42 2022 +0200 replace oox::OptValue with std::optional Change-Id: I16e7179b2851640b4d73665685dcc1e84042ddaf Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136270 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/include/oox/drawingml/shape.hxx b/include/oox/drawingml/shape.hxx index 5f4173c9de87..246a964fc2a6 100644 --- a/include/oox/drawingml/shape.hxx +++ b/include/oox/drawingml/shape.hxx @@ -179,7 +179,7 @@ public: voidsetSubType( sal_Int32 nSubType ) { mnSubType = nSubType; } sal_Int32 getSubType() const { return mnSubType; } voidsetSubTypeIndex( sal_Int32 nSubTypeIndex ) { moSubTypeIndex = nSubTypeIndex; } -const OptValue< sal_Int32 >&getSubTypeIndex() const { return moSubTypeIndex; } +const std::optional< sal_Int32 >& getSubTypeIndex() const { return moSubTypeIndex; } // setDefaults has to be called if styles are imported (OfficeXML is not storing properties having the default value) voidsetDefaults(bool bHeight); @@ -353,7 +353,7 @@ protected: OUStringmsId; OUStringmsDescription; sal_Int32 mnSubType; // if this type is not zero, then the shape is a placeholder -OptValue< sal_Int32 > moSubTypeIndex; +std::optional< sal_Int32 > moSubTypeIndex; ShapeStyleRefMapmaShapeStyleRefs; diff --git a/include/oox/helper/attributelist.hxx b/include/oox/helper/attributelist.hxx index fb4079714a5c..d58305bffa54 100644 --- a/include/oox/helper/attributelist.hxx +++ b/include/oox/helper/attributelist.hxx @@ -95,41 +95,41 @@ public: // optional return values - /** Returns the token identifier of the value of the specified attribute. */ -OptValue< sal_Int32 > getToken( sal_Int32 nAttrToken ) const; +std::optional< sal_Int32 > getToken( sal_Int32 nAttrToken ) const; /** Returns the Color object of highlight of the text. */ oox::drawingml::Color getHighlightColor(sal_Int32 nAttrToken) const; /** Returns the string value of the specified attribute. */ -OptValue< OUString > getStri
[Libreoffice-commits] core.git: Branch 'libreoffice-7-4' - filter/source
filter/source/svg/presentation_engine.js | 68 +++ 1 file changed, 61 insertions(+), 7 deletions(-) New commits: commit c6ae5acb253c4319f2abc2a4d9735cd7472ee33f Author: Marco Cecchetti AuthorDate: Fri May 20 11:35:57 2022 +0200 Commit: Xisco Fauli CommitDate: Mon Jun 27 12:01:23 2022 +0200 svg filter: support for emphasis spin animation Partial support for transform animations. At present only rotate is supported. Change-Id: If9ba69ec0b74bc3b527a963cb0c0bf3a7bfa5220 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134626 Tested-by: Jenkins Reviewed-by: Aron Budea (cherry picked from commit 32f2f43929e2869bf2e66f5f70795beb03cb39a1) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136459 Reviewed-by: Xisco Fauli diff --git a/filter/source/svg/presentation_engine.js b/filter/source/svg/presentation_engine.js index 370bacc5cd72..c98e93de7b7a 100644 --- a/filter/source/svg/presentation_engine.js +++ b/filter/source/svg/presentation_engine.js @@ -11574,6 +11574,59 @@ PropertyAnimationNode.prototype.createActivity = function() +function isValidTransformation( sType ) +{ +return ( sType === 'translate' || sType === 'scale' || sType === 'rotate' + || sType === 'skewX' || sType === 'skewY' ); +} + +function AnimationTransformNode( aAnimElem, aParentNode, aNodeContext ) +{ +AnimationTransformNode.superclass.constructor.call( this, aAnimElem, aParentNode, aNodeContext ); + +this.sClassName = 'AnimationTransformNode'; +} +extend( AnimationTransformNode, AnimationBaseNode3 ); + + +AnimationTransformNode.prototype.parseElement = function() +{ +var bRet = AnimationTransformNode.superclass.parseElement.call(this); + +var aAnimElem = this.aElement; + +// transformation type +var sTransformType = aAnimElem.getAttribute( 'svg:type' ); +if( !isValidTransformation( sTransformType ) ) +{ +this.eCurrentState = INVALID_NODE; +log( 'AnimationTransformNode.parseElement: transformation type not found: ' + sTransformType ); +} +else +{ +this.sAttributeName = sTransformType; +} + +return bRet; +} + +AnimationTransformNode.prototype.createActivity = function() +{ +var aActivityParamSet = this.fillActivityParams(); +var aAnimation; + +aAnimation = createPropertyAnimation( this.getAttributeName(), + this.getAnimatedElement(), + this.aNodeContext.aSlideWidth, + this.aNodeContext.aSlideHeight ); + +var aInterpolator = null; // createActivity will compute it; +return createActivity( aActivityParamSet, this, aAnimation, aInterpolator ); +}; + + + + function AnimationSetNode( aAnimElem, aParentNode, aNodeContext ) { AnimationSetNode.superclass.constructor.call( this, aAnimElem, aParentNode, aNodeContext ); @@ -11872,10 +11925,8 @@ function createAnimationNode( aElement, aParentNode, aNodeContext ) aCreatedNode = new AnimationColorNode( aElement, aParentNode, aNodeContext ); break; case ANIMATION_NODE_ANIMATETRANSFORM: -//aCreatedNode = new AnimationTransformNode( aElement, aParentNode, aNodeContext ); -//break; -log( 'createAnimationNode: ANIMATETRANSFORM not implemented' ); -return null; +aCreatedNode = new AnimationTransformNode( aElement, aParentNode, aNodeContext ); +break; case ANIMATION_NODE_TRANSITIONFILTER: aCreatedNode = new AnimationTransitionFilterNode( aElement, aParentNode, aNodeContext ); break; @@ -17934,9 +17985,12 @@ function evalValuesAttribute( aValueList, aValueSet, aBBox, nSlideWidth, nSlideH for( var i = 0; i < aValueSet.length; ++i ) { var sValue = aValueSet[i]; -sValue = sValue.replace(reMath, 'Math.$&'); -sValue = sValue.replace(/pi(?!\w)/g, 'Math.PI'); -sValue = sValue.replace(/e(?!\w)/g, 'Math.E'); +if(sValue) +{ +sValue = sValue.replace(reMath, 'Math.$&'); +sValue = sValue.replace(/pi(?!\w)/g, 'Math.PI'); +sValue = sValue.replace(/e(?!\w)/g, 'Math.E'); +} var aValue = eval( sValue ); aValueList.push( aValue ); }
[Libreoffice-commits] core.git: Branch 'libreoffice-7-4' - sc/inc sc/source
sc/inc/document.hxx |3 +-- sc/inc/table.hxx |2 +- sc/source/core/data/document.cxx |4 ++-- sc/source/core/data/table2.cxx | 31 --- sc/source/ui/view/viewdata.cxx | 30 ++ 5 files changed, 26 insertions(+), 44 deletions(-) New commits: commit 6080ba4d308b4b870bbbc5a7b4b960ce3ed2ecba Author: Noel Grandin AuthorDate: Sat Jun 25 15:44:25 2022 +0200 Commit: Xisco Fauli CommitDate: Mon Jun 27 12:03:21 2022 +0200 tdf#149647 LibreOffice Calc cursor not positioned correctly Revert the offending commit commit feec8e3c34e08b621098a17f1011dccd0b4f7f4c reduce iteration in ScViewData::GetScrPos Change-Id: Id1df2bf7f87e6b800b40871c1472ed466b7eb6a0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136442 Tested-by: Jenkins Reviewed-by: Noel Grandin (cherry picked from commit 34c6d02661949fcc9c15bd77d6e837623bbddcdb) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136458 Reviewed-by: Xisco Fauli diff --git a/sc/inc/document.hxx b/sc/inc/document.hxx index f1f12d3fcfa5..959960e15e03 100644 --- a/sc/inc/document.hxx +++ b/sc/inc/document.hxx @@ -1972,8 +1972,7 @@ public: * specified height. */ SCROW GetRowForHeight( SCTAB nTab, tools::Long nHeight ) const; -tools::Long GetScaledRowHeight( SCROW nStartRow, SCROW nEndRow, SCTAB nTab, -double fScale, const tools::Long* pnMaxHeight = nullptr ) const; +tools::Long GetScaledRowHeight( SCROW nStartRow, SCROW nEndRow, SCTAB nTab, double fScale ) const; SC_DLLPUBLIC tools::LongGetColOffset( SCCOL nCol, SCTAB nTab, bool bHiddenAsZero = true ) const; SC_DLLPUBLIC tools::LongGetRowOffset( SCROW nRow, SCTAB nTab, bool bHiddenAsZero = true ) const; diff --git a/sc/inc/table.hxx b/sc/inc/table.hxx index da93ac71c25e..0a3bc6c67956 100644 --- a/sc/inc/table.hxx +++ b/sc/inc/table.hxx @@ -854,7 +854,7 @@ public: tools::Long GetColWidth( SCCOL nStartCol, SCCOL nEndCol ) const; sal_uInt16 GetRowHeight( SCROW nRow, SCROW* pStartRow, SCROW* pEndRow, bool bHiddenAsZero = true ) const; tools::Long GetRowHeight( SCROW nStartRow, SCROW nEndRow, bool bHiddenAsZero = true ) const; -tools::Long GetScaledRowHeight( SCROW nStartRow, SCROW nEndRow, double fScale, const tools::Long* pnMaxHeight = nullptr ) const; +tools::Long GetScaledRowHeight( SCROW nStartRow, SCROW nEndRow, double fScale ) const; tools::Long GetColOffset( SCCOL nCol, bool bHiddenAsZero = true ) const; tools::Long GetRowOffset( SCROW nRow, bool bHiddenAsZero = true ) const; diff --git a/sc/source/core/data/document.cxx b/sc/source/core/data/document.cxx index beb3e049d94c..e0c0a9e6da8a 100644 --- a/sc/source/core/data/document.cxx +++ b/sc/source/core/data/document.cxx @@ -4253,7 +4253,7 @@ SCROW ScDocument::GetRowForHeight( SCTAB nTab, tools::Long nHeight ) const } tools::Long ScDocument::GetScaledRowHeight( SCROW nStartRow, SCROW nEndRow, -SCTAB nTab, double fScale, const tools::Long* pnMaxHeight ) const +SCTAB nTab, double fScale ) const { // faster for a single row if (nStartRow == nEndRow) @@ -4264,7 +4264,7 @@ tools::Long ScDocument::GetScaledRowHeight( SCROW nStartRow, SCROW nEndRow, return 0; if ( ValidTab(nTab) && nTab < static_cast(maTabs.size()) && maTabs[nTab] ) -return maTabs[nTab]->GetScaledRowHeight( nStartRow, nEndRow, fScale, pnMaxHeight ); +return maTabs[nTab]->GetScaledRowHeight( nStartRow, nEndRow, fScale); OSL_FAIL("wrong sheet number"); return 0; diff --git a/sc/source/core/data/table2.cxx b/sc/source/core/data/table2.cxx index ab3532b70236..0cd14623377f 100644 --- a/sc/source/core/data/table2.cxx +++ b/sc/source/core/data/table2.cxx @@ -3605,7 +3605,7 @@ tools::Long ScTable::GetRowHeight( SCROW nStartRow, SCROW nEndRow, bool bHiddenA return (nEndRow - nStartRow + 1) * static_cast(ScGlobal::nStdRowHeight); } -tools::Long ScTable::GetScaledRowHeight( SCROW nStartRow, SCROW nEndRow, double fScale, const tools::Long* pnMaxHeight ) const +tools::Long ScTable::GetScaledRowHeight( SCROW nStartRow, SCROW nEndRow, double fScale ) const { OSL_ENSURE(ValidRow(nStartRow) && ValidRow(nEndRow),"wrong row number"); @@ -3632,21 +3632,8 @@ tools::Long ScTable::GetScaledRowHeight( SCROW nStartRow, SCROW nEndRow, double SCROW nSegmentEnd = std::min( nLastRow, aSegmentIter.getLastPos() ); // round-down a single height value, multiply resulting (pixel) values -const tools::Long nOneHeight = static_cast( nRowVal * fScale ); -// sometimes scaling results in zero height -if (nOneHeight) -{ -SCROW
[Libreoffice-commits] core.git: stoc/source
stoc/source/corereflection/base.hxx |4 +- stoc/source/corereflection/crbase.cxx| 10 +++-- stoc/source/implementationregistration/mergekeys.cxx |7 ++- stoc/source/inspect/introspection.cxx| 15 stoc/source/javaloader/javaloader.cxx|7 ++- stoc/source/javavm/interact.cxx |5 +- stoc/source/javavm/interact.hxx |2 - stoc/source/javavm/javavm.cxx|5 +- stoc/source/javavm/javavm.hxx|2 - stoc/source/proxy_factory/proxyfac.cxx | 27 +++ stoc/source/security/access_controller.cxx |5 +- stoc/source/security/file_policy.cxx |7 ++- stoc/source/security/permissions.h |9 ++--- stoc/source/servicemanager/servicemanager.cxx|5 +- stoc/source/simpleregistry/simpleregistry.cxx|5 +- stoc/source/uriproc/UriReference.cxx |9 ++--- stoc/source/uriproc/UriReference.hxx |4 +- stoc/source/uriproc/UriReferenceFactory.cxx |4 +- stoc/source/uriproc/VndSunStarPkgUrlReferenceFactory.cxx |5 +- 19 files changed, 76 insertions(+), 61 deletions(-) New commits: commit 69485e422c906a3bb290797725a0784f73d94b9f Author: Noel Grandin AuthorDate: Mon Jun 27 09:46:16 2022 +0200 Commit: Noel Grandin CommitDate: Mon Jun 27 12:04:02 2022 +0200 clang-tidy modernize-pass-by-value in stoc Change-Id: Ia628b2af646e576d52b6c72352255710a885c23f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136452 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/stoc/source/corereflection/base.hxx b/stoc/source/corereflection/base.hxx index 16d42213ddcd..d0793c1877aa 100644 --- a/stoc/source/corereflection/base.hxx +++ b/stoc/source/corereflection/base.hxx @@ -153,7 +153,7 @@ public: // Ctor IdlClassImpl( IdlReflectionServiceImpl * pReflection, - const OUString & rName, typelib_TypeClass eTypeClass, + OUString aName, typelib_TypeClass eTypeClass, typelib_TypeDescription * pTypeDescr ); virtual ~IdlClassImpl() override; @@ -338,7 +338,7 @@ public: { return _pDeclTypeDescr; } // ctor/ dtor -IdlMemberImpl( IdlReflectionServiceImpl * pReflection, const OUString & rName, +IdlMemberImpl( IdlReflectionServiceImpl * pReflection, OUString aName, typelib_TypeDescription * pTypeDescr, typelib_TypeDescription * pDeclTypeDescr ); virtual ~IdlMemberImpl() override; diff --git a/stoc/source/corereflection/crbase.cxx b/stoc/source/corereflection/crbase.cxx index 75e802c96045..439ee5b2229f 100644 --- a/stoc/source/corereflection/crbase.cxx +++ b/stoc/source/corereflection/crbase.cxx @@ -19,6 +19,8 @@ #include +#include + #include "base.hxx" using namespace css::reflection; @@ -41,10 +43,10 @@ ClassNameVector g_aClassNames; IdlClassImpl::IdlClassImpl( IdlReflectionServiceImpl * pReflection, -const OUString & rName, typelib_TypeClass eTypeClass, +OUString aName, typelib_TypeClass eTypeClass, typelib_TypeDescription * pTypeDescr ) : m_xReflection( pReflection ) -, _aName( rName ) +, _aName(std::move( aName )) , _eTypeClass( static_cast(eTypeClass) ) , _pTypeDescr( pTypeDescr ) { @@ -201,11 +203,11 @@ Reference< XIdlArray > IdlClassImpl::getArray() } -IdlMemberImpl::IdlMemberImpl( IdlReflectionServiceImpl * pReflection, const OUString & rName, +IdlMemberImpl::IdlMemberImpl( IdlReflectionServiceImpl * pReflection, OUString aName, typelib_TypeDescription * pTypeDescr, typelib_TypeDescription * pDeclTypeDescr ) : m_xReflection( pReflection ) -, _aName( rName ) +, _aName(std::move( aName )) , _pTypeDescr( pTypeDescr ) , _pDeclTypeDescr( pDeclTypeDescr ) { diff --git a/stoc/source/implementationregistration/mergekeys.cxx b/stoc/source/implementationregistration/mergekeys.cxx index da7da509ebce..dde219b9ada7 100644 --- a/stoc/source/implementationregistration/mergekeys.cxx +++ b/stoc/source/implementationregistration/mergekeys.cxx @@ -18,6 +18,7 @@ */ +#include #include #include @@ -40,9 +41,9 @@ struct Link OUString m_name; OUString m_target; -Link( OUString const & name, OUString const & target ) -: m_name( name ) -, m_target( target ) +Link( OUString name, OUString target ) +: m_name(std::move( name )) +, m_target(std::move( target )) {} }; diff --git a/stoc/source/inspect/introspection.cxx b/stoc/source/inspect/introspection.cxx index 1a92d5b4cc34..c219e8030f0c 100644 --- a/stoc/source/ins
[Libreoffice-commits] core.git: sw/qa sw/source
sw/qa/core/unocore/unocore.cxx | 40 sw/source/core/unocore/unoparagraph.cxx | 14 +++ 2 files changed, 44 insertions(+), 10 deletions(-) New commits: commit 5938687e5764ee50759374b54d2bb1cf0e0d59d3 Author: Miklos Vajna AuthorDate: Mon Jun 27 10:18:32 2022 +0200 Commit: Miklos Vajna CommitDate: Mon Jun 27 12:37:34 2022 +0200 tdf#149668 sw: fix DOCX->ODT: Multilevel lists causing list numbering reset The bug document had an outer (ordered) numbering and an inner one, finally the outer numbering was continued. This was fine after DOCX import, but once we saved to ODT and re-opened, the second outer numbering was restarted, not continued the first outer one. This happened because on one hand, lcl_SwXParagraph_getPropertyState() says that the state of the ListId property is "default" if the paragraph's item set doesn't have a RES_PARATR_LIST_ID, but on the other hand xmloff/ will only write the xml:id="..." attribute on a list if the ListId state is not default. This is a problem, because it can happen that xmloff/ refers to a list later by its id, even if the list doesn't have a RES_PARATR_LIST_ID set. Fix the problem by relaxing the condition where lcl_SwXParagraph_getPropertyState() reports FN_UNO_LIST_ID as non-default: just require that that the text node has a numbering rule + the numbering rule has at least one continue list. This fixes the reported DOCX -> ODT case with named list styles and keeps the original ODT import and HTML import use-cases working to not write un-referenced xml:id="..." attributes on export. This was a regression from commit 8f48f91009caa86d896f247059874242ed18bf39 (ODT export: omit unreferenced , 2022-03-10). Change-Id: I300ebe7aa7da71a336c03abe7530074b696417f7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136477 Reviewed-by: Miklos Vajna Tested-by: Jenkins diff --git a/sw/qa/core/unocore/unocore.cxx b/sw/qa/core/unocore/unocore.cxx index 56b9ed4c74de..bd2385d1eb54 100644 --- a/sw/qa/core/unocore/unocore.cxx +++ b/sw/qa/core/unocore/unocore.cxx @@ -639,6 +639,46 @@ CPPUNIT_TEST_FIXTURE(SwCoreUnocoreTest, testContentControlDate) CPPUNIT_ASSERT_EQUAL(OUString("008000"), pContentControl->GetColor()); } +CPPUNIT_TEST_FIXTURE(SwCoreUnocoreTest, testListIdState) +{ +// Given a document with 3 paragraphs: an outer numbering on para 1 & 3, an inner numbering on +// para 2: +SwDoc* pDoc = createSwDoc(); +SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell(); +{ +SfxItemSetFixed aSet(pWrtShell->GetAttrPool()); +SwNumRuleItem aItem("Numbering ABC"); +aSet.Put(aItem); +pWrtShell->SetAttrSet(aSet); +} +pWrtShell->SplitNode(); +{ +SfxItemSetFixed aSet(pWrtShell->GetAttrPool()); +SwNumRuleItem aItem("Numbering 123"); +aSet.Put(aItem); +pWrtShell->SetAttrSet(aSet); +} +pWrtShell->SplitNode(); +{ +SfxItemSetFixed aSet(pWrtShell->GetAttrPool()); +SwNumRuleItem aItem("Numbering ABC"); +aSet.Put(aItem); +pWrtShell->SetAttrSet(aSet); +} + +// When checking if xml:id="..." needs writing for the first paragraph during ODT export: +uno::Reference xPara(getParagraph(1), uno::UNO_QUERY); +beans::PropertyState eState = xPara->getPropertyState("ListId"); + +// Then make sure that xml:id="..." gets written for para 1, as it'll be continued in para 3. +// Without the accompanying fix in place, this test would have failed with: +// - Expected: 0 (DIRECT_VALUE) +// - Actual : 1 (DEFAULT_VALUE) +// i.e. para 1 didn't write an xml:id="..." but para 3 referred to it using continue-list="...", +// which is inconsistent. +CPPUNIT_ASSERT_EQUAL(beans::PropertyState_DIRECT_VALUE, eState); +} + CPPUNIT_PLUGIN_IMPLEMENT(); /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/core/unocore/unoparagraph.cxx b/sw/source/core/unocore/unoparagraph.cxx index d13bd6c65945..7485b98b1580 100644 --- a/sw/source/core/unocore/unoparagraph.cxx +++ b/sw/source/core/unocore/unoparagraph.cxx @@ -922,18 +922,12 @@ static beans::PropertyState lcl_SwXParagraph_getPropertyState( } case FN_UNO_LIST_ID: { -if (*ppSet) +SwNumRule* pNumRule = rTextNode.GetNumRule(); +if (pNumRule && pNumRule->HasContinueList()) { -if ((*ppSet)->GetItemState(RES_PARATR_LIST_ID, false) == SfxItemState::SET) -{ -SwNumRule* pNumRule = rTextNode.GetNumRule(); -if (!pNumRule || pNumRule->HasContinueList()) -{ -eRet = beans::PropertyState_DIRECT_VALUE; -} -} -bDone = true; +eRet
[Libreoffice-commits] core.git: Branch 'libreoffice-7-4' - cui/source
cui/source/inc/paragrph.hxx |2 ++ cui/source/tabpages/paragrph.cxx |8 2 files changed, 10 insertions(+) New commits: commit b78a78fe9c0c5d919dccd88cce557eb22974a9a7 Author: László Németh AuthorDate: Fri Jun 24 12:17:17 2022 +0200 Commit: László Németh CommitDate: Mon Jun 27 13:00:20 2022 +0200 tdf#149713 sw para dialog: gray out labels of the new options Labels of the new hyphenation options "Hyphenation zone" and "Minimum word length in characters" were always black, instead of gray, when Hyphenation is disabled. Follow-up to commit 7a1d4b7d1db93ca1f541856a8d00d621d50e7bd6 "tdf#149420 sw offapi xmloff: add hyphenation zone" and commit 29359fc15c435cec17987fd6221ab6833d38746e "tdf#149324 sw offapi xmloff: add option to not hyphenate short words". Change-Id: Ic41c2fa0fa69385013b1e90568084956cc5d791d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136367 Tested-by: László Németh Reviewed-by: László Németh (cherry picked from commit 4a42999bfa13e580279067d87fe390ce53a664b1) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136461 Reviewed-by: Adolfo Jayme Barrientos Tested-by: Jenkins diff --git a/cui/source/inc/paragrph.hxx b/cui/source/inc/paragrph.hxx index 3947c14d10c8..991641e3b06c 100644 --- a/cui/source/inc/paragrph.hxx +++ b/cui/source/inc/paragrph.hxx @@ -232,7 +232,9 @@ private: std::unique_ptr m_xExtHyphenAfterBox; std::unique_ptr m_xMaxHyphenLabel; std::unique_ptr m_xMaxHyphenEdit; +std::unique_ptr m_xMinWordLabel; std::unique_ptr m_xMinWordLength; +std::unique_ptr m_xHyphenZoneLabel; std::unique_ptr m_xHyphenZone; // pagebreak diff --git a/cui/source/tabpages/paragrph.cxx b/cui/source/tabpages/paragrph.cxx index b43c77cbd894..78a1cdd178aa 100644 --- a/cui/source/tabpages/paragrph.cxx +++ b/cui/source/tabpages/paragrph.cxx @@ -1614,7 +1614,9 @@ void SvxExtParagraphTabPage::Reset( const SfxItemSet* rSet ) m_xAfterText->set_sensitive(bEnable); m_xMaxHyphenLabel->set_sensitive(bEnable); m_xMaxHyphenEdit->set_sensitive(bEnable); +m_xMinWordLabel->set_sensitive(bEnable); m_xMinWordLength->set_sensitive(bEnable); +m_xHyphenZoneLabel->set_sensitive(bEnable); m_xHyphenZone->set_sensitive(bEnable); switch (rSet->GetItemState(SID_ATTR_PARA_PAGENUM)) @@ -1931,7 +1933,9 @@ SvxExtParagraphTabPage::SvxExtParagraphTabPage(weld::Container* pPage, weld::Dia , m_xExtHyphenAfterBox(m_xBuilder->weld_spin_button("spinLineBegin")) , m_xMaxHyphenLabel(m_xBuilder->weld_label("labelMaxNum")) , m_xMaxHyphenEdit(m_xBuilder->weld_spin_button("spinMaxNum")) +, m_xMinWordLabel(m_xBuilder->weld_label("labelMinLen")) , m_xMinWordLength(m_xBuilder->weld_spin_button("spinMinLen")) +, m_xHyphenZoneLabel(m_xBuilder->weld_label("labelHyphenZone")) , m_xHyphenZone(new SvxRelativeField(m_xBuilder->weld_metric_spin_button("spinHyphenZone", FieldUnit::CM))) //Page break , m_xPageBreakBox(m_xBuilder->weld_check_button("checkInsert")) @@ -2001,7 +2005,9 @@ SvxExtParagraphTabPage::SvxExtParagraphTabPage(weld::Container* pPage, weld::Dia m_xExtHyphenAfterBox->set_sensitive(false); m_xMaxHyphenLabel->set_sensitive(false); m_xMaxHyphenEdit->set_sensitive(false); +m_xMinWordLabel->set_sensitive(false); m_xMinWordLength->set_sensitive(false); +m_xHyphenZoneLabel->set_sensitive(false); m_xHyphenZone->set_sensitive(false); m_xPageNumBox->set_sensitive(false); m_xPagenumEdit->set_sensitive(false); @@ -2136,7 +2142,9 @@ void SvxExtParagraphTabPage::HyphenClickHdl() m_xExtHyphenAfterBox->set_sensitive(bEnable); m_xMaxHyphenLabel->set_sensitive(bEnable); m_xMaxHyphenEdit->set_sensitive(bEnable); +m_xMinWordLabel->set_sensitive(bEnable); m_xMinWordLength->set_sensitive(bEnable); +m_xHyphenZoneLabel->set_sensitive(bEnable); m_xHyphenZone->set_sensitive(bEnable); m_xHyphenBox->set_state(bEnable ? TRISTATE_TRUE : TRISTATE_FALSE); }
[Libreoffice-commits] core.git: unoxml/source
unoxml/source/dom/attributesmap.cxx |5 +- unoxml/source/dom/attributesmap.hxx |2 - unoxml/source/dom/childlist.cxx |5 +- unoxml/source/dom/childlist.hxx |2 - unoxml/source/dom/elementlist.cxx |5 +- unoxml/source/dom/elementlist.hxx |2 - unoxml/source/rdf/librdf_repository.cxx | 59 unoxml/source/xpath/nodelist.cxx|6 ++- unoxml/source/xpath/nodelist.hxx|2 - unoxml/source/xpath/xpathobject.cxx |6 ++- unoxml/source/xpath/xpathobject.hxx |2 - 11 files changed, 52 insertions(+), 44 deletions(-) New commits: commit 9de4cafcf0efdc2986c3130658ee9233df392773 Author: Noel Grandin AuthorDate: Mon Jun 27 10:11:58 2022 +0200 Commit: Noel Grandin CommitDate: Mon Jun 27 13:06:01 2022 +0200 clang-tidy modernize-pass-by-value in unoxml Change-Id: Id0df30bed0de7db0564816180497406c55cf9fff Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136476 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/unoxml/source/dom/attributesmap.cxx b/unoxml/source/dom/attributesmap.cxx index 575fa96c2ce0..b11dcc6a1e01 100644 --- a/unoxml/source/dom/attributesmap.cxx +++ b/unoxml/source/dom/attributesmap.cxx @@ -22,6 +22,7 @@ #include #include +#include #include "element.hxx" #include "document.hxx" @@ -31,9 +32,9 @@ using namespace css::xml::dom; namespace DOM { -CAttributesMap::CAttributesMap(::rtl::Reference const& pElement, +CAttributesMap::CAttributesMap(::rtl::Reference pElement, ::osl::Mutex & rMutex) -: m_pElement(pElement) +: m_pElement(std::move(pElement)) , m_rMutex(rMutex) { } diff --git a/unoxml/source/dom/attributesmap.hxx b/unoxml/source/dom/attributesmap.hxx index 55f4c6795194..994cd72b0a1e 100644 --- a/unoxml/source/dom/attributesmap.hxx +++ b/unoxml/source/dom/attributesmap.hxx @@ -42,7 +42,7 @@ namespace DOM ::osl::Mutex & m_rMutex; public: -CAttributesMap(::rtl::Reference const& pElement, +CAttributesMap(::rtl::Reference pElement, ::osl::Mutex & rMutex); /** diff --git a/unoxml/source/dom/childlist.cxx b/unoxml/source/dom/childlist.cxx index 6f62f0144dbb..c147d8622dc4 100644 --- a/unoxml/source/dom/childlist.cxx +++ b/unoxml/source/dom/childlist.cxx @@ -22,6 +22,7 @@ #include #include +#include #include "document.hxx" using namespace css::uno; @@ -29,9 +30,9 @@ using namespace css::xml::dom; namespace DOM { -CChildList::CChildList(::rtl::Reference const& pBase, +CChildList::CChildList(::rtl::Reference pBase, ::osl::Mutex & rMutex) -: m_pNode(pBase) +: m_pNode(std::move(pBase)) , m_rMutex(rMutex) { } diff --git a/unoxml/source/dom/childlist.hxx b/unoxml/source/dom/childlist.hxx index 091a8e450837..89fd0ea9bbda 100644 --- a/unoxml/source/dom/childlist.hxx +++ b/unoxml/source/dom/childlist.hxx @@ -42,7 +42,7 @@ namespace DOM ::osl::Mutex & m_rMutex; public: -CChildList(::rtl::Reference const& pBase, +CChildList(::rtl::Reference pBase, ::osl::Mutex & rMutex); /** diff --git a/unoxml/source/dom/elementlist.cxx b/unoxml/source/dom/elementlist.cxx index c8fc604377de..0f2605afe8c3 100644 --- a/unoxml/source/dom/elementlist.cxx +++ b/unoxml/source/dom/elementlist.cxx @@ -24,6 +24,7 @@ #include #include +#include #include #include "element.hxx" @@ -78,10 +79,10 @@ namespace DOM } } -CElementListImpl::CElementListImpl(::rtl::Reference const& pElement, +CElementListImpl::CElementListImpl(::rtl::Reference pElement, ::osl::Mutex & rMutex, std::u16string_view rName, OUString const*const pURI) -: m_pElement(pElement) +: m_pElement(std::move(pElement)) , m_rMutex(rMutex) , m_pName(lcl_initXmlString(rName)) , m_pURI(pURI ? lcl_initXmlString(*pURI) : nullptr) diff --git a/unoxml/source/dom/elementlist.hxx b/unoxml/source/dom/elementlist.hxx index 66ce3bedac18..092529282148 100644 --- a/unoxml/source/dom/elementlist.hxx +++ b/unoxml/source/dom/elementlist.hxx @@ -60,7 +60,7 @@ namespace DOM void buildlist(xmlNodePtr pNode, bool start=true); public: -CElementListImpl(::rtl::Reference const& pElement, +CElementListImpl(::rtl::Reference pElement, ::osl::Mutex & rMutex, std::u16string_view rName, OUString const*const pURI); diff --git a/unoxml/source/rdf/librdf_repository.cxx b/unoxml/source/rdf/librdf_repository.cxx index 51c8317f369f..ccf4d87ffedd 100644 --- a/unoxml/source/rdf/librdf_repository.cxx +++ b/unoxml/source/rdf/librdf_repository.cxx @@ -65,6 +65,7 @@ #include #include +#include /** Implementation of the service com.sun.star.rdf.Repository. @@ -183,15 +184,15 @@ public: struct URI :
[Libreoffice-commits] core.git: external/libnumbertext
external/libnumbertext/EmptyString.patch1 | 13 + external/libnumbertext/UnpackedTarball_libnumbertext.mk |1 + 2 files changed, 14 insertions(+) New commits: commit 35ca93f7892e8f19b871f7f687a9f7e4933a65ad Author: Caolán McNamara AuthorDate: Mon Jun 27 09:40:22 2022 +0100 Commit: Caolán McNamara CommitDate: Mon Jun 27 13:19:25 2022 +0200 crashtesting: fix assert seen on loading forum-nl-1226.ods Change-Id: If8c08a51b11a459a03b4a0604c1fb9897351e598 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136480 Tested-by: Jenkins Reviewed-by: Caolán McNamara diff --git a/external/libnumbertext/EmptyString.patch1 b/external/libnumbertext/EmptyString.patch1 new file mode 100644 index ..d6570117da09 --- /dev/null +++ b/external/libnumbertext/EmptyString.patch1 @@ -0,0 +1,13 @@ +--- a/src/Soros.cxx2022-06-27 09:36:46.486075920 +0100 b/src/Soros.cxx2022-06-27 09:37:52.594072196 +0100 +@@ -98,8 +98,8 @@ + s = regex_replace(s, quoteEnd, L""); + s = translate(s, c.substr(1), m.substr(1), L""); + replace(s, slash, L""); // -> \\, ", ;, # +-begins.push_back(s[0] == L'^'); +-ends.push_back(s[s.length()-1] == L'$'); ++begins.push_back(!s.empty() && s[0] == L'^'); ++ends.push_back(!s.empty() && s[s.length()-1] == L'$'); + s = L"^" + regex_replace(s, wregex(L"^\\^"), L""); + s = regex_replace(s, wregex(L"\\$$"), L"") + L"$"; + try diff --git a/external/libnumbertext/UnpackedTarball_libnumbertext.mk b/external/libnumbertext/UnpackedTarball_libnumbertext.mk index 48cd2a9a273d..fb88366d5aef 100644 --- a/external/libnumbertext/UnpackedTarball_libnumbertext.mk +++ b/external/libnumbertext/UnpackedTarball_libnumbertext.mk @@ -18,6 +18,7 @@ $(eval $(call gb_UnpackedTarball_set_patchlevel,libnumbertext,1)) $(eval $(call gb_UnpackedTarball_add_patches,libnumbertext, \ external/libnumbertext/MSVCNonBMPBug.patch1 \ external/libnumbertext/WinUnicodePath.patch1 \ +external/libnumbertext/EmptyString.patch1 \ )) # vim: set noet sw=4 ts=4:
[Libreoffice-commits] core.git: Branch 'distro/collabora/co-22.05' - 5 commits - external/liborcus officecfg/registry sdext/source sw/source vcl/inc
external/liborcus/UnpackedTarball_liborcus.mk |1 external/liborcus/overrun.patch.0 | 63 ++ officecfg/registry/data/org/openoffice/Office/UI.xcu |2 sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx |7 +- sw/source/core/layout/trvlfrm.cxx | 24 +- vcl/inc/dndeventdispatcher.hxx|2 6 files changed, 89 insertions(+), 10 deletions(-) New commits: commit cd76005592cf330dc450f48df31d11f8f9f3993c Author: Xisco Fauli AuthorDate: Thu Jun 23 12:27:34 2022 +0200 Commit: Andras Timar CommitDate: Mon Jun 27 13:27:02 2022 +0200 sw: fix crash in SwLayoutFrame::GetContentPos FindPageFrame might return nullptr See https://crashreport.libreoffice.org/stats/signature/SwLayoutFrame::GetContentPos(Point%20&,bool,bool,SwCursorMoveState%20*,bool) Change-Id: Ic69d26de4ab234ebd6283ace640d689f0ebe8eb3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136307 Tested-by: Jenkins Reviewed-by: Xisco Fauli (cherry picked from commit 7500c243fea02acbeaddf91f6b48a53d698c1cab) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136383 Reviewed-by: Caolán McNamara diff --git a/sw/source/core/layout/trvlfrm.cxx b/sw/source/core/layout/trvlfrm.cxx index 6942dab6a2ba..375b9fe34fd6 100644 --- a/sw/source/core/layout/trvlfrm.cxx +++ b/sw/source/core/layout/trvlfrm.cxx @@ -1290,13 +1290,22 @@ const SwContentFrame *SwLayoutFrame::GetContentPos( Point& rPoint, if( !pStart->GetPrev()->IsLayoutFrame() ) return nullptr; pStart = static_cast(pStart->GetPrev()); -pContent = pStart->IsInDocBody() -? pStart->ContainsContent() -: pStart->FindPageFrame()->FindFirstBodyContent(); +if( pStart->IsInDocBody() ) +pContent = pStart->ContainsContent(); +else +{ +const SwPageFrame *pPage = pStart->FindPageFrame(); +if( !pPage ) +return nullptr; +pContent = pPage->FindFirstBodyContent(); +} } if ( !pContent ) // Somewhere down the road we have to start with one! { -pContent = pStart->FindPageFrame()->GetUpper()->ContainsContent(); +const SwPageFrame *pPage = pStart->FindPageFrame(); +if( !pPage ) +return nullptr; +pContent = pPage->GetUpper()->ContainsContent(); while ( pContent && !pContent->IsInDocBody() ) pContent = pContent->GetNextContentFrame(); if ( !pContent ) @@ -1314,7 +1323,12 @@ const SwContentFrame *SwLayoutFrame::GetContentPos( Point& rPoint, pContent = pStart->ContainsContent(); } else // Somewhere down the road we have to start with one! -pContent = pStart->FindPageFrame()->GetUpper()->ContainsContent(); +{ +const SwPageFrame *pPage = pStart->FindPageFrame(); +if( !pPage ) +return nullptr; +pContent = pPage->GetUpper()->ContainsContent(); +} } pActual = pContent; } commit 1cd9a88ddb12db6518424c392df9841f179a048e Author: Stephan Bergmann AuthorDate: Fri Jun 24 18:21:32 2022 +0200 Commit: Andras Timar CommitDate: Mon Jun 27 13:27:01 2022 +0200 external/liborcus: Fix heap-buffer-overflow ...as seen during CppunitTest_vcl_pdfexport: > ==573913==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x62b0001dba0e at pc 0x560576627186 bp 0x7ffeab9fa730 sp 0x7ffeab9f9ef0 > READ of size 26624 at 0x62b0001dba0e thread T0 > #0 in StrtolFixAndCheck(void*, char const*, char**, char*, int) at ~/github.com/llvm/llvm-project/compiler-rt/lib/asan/../sanitizer_common/sanitizer_common_interceptors.inc:3629:3 > #1 in strtol at ~/github.com/llvm/llvm-project/compiler-rt/lib/asan/asan_interceptors.cpp:485:3 > #2 in orcus::sax_token_handler_wrapper_base::attribute(std::basic_string_view>, std::basic_string_view>) at workdir/UnpackedTarball/liborcus/src/parser/sax_token_parser.cpp:344:22 > #3 in orcus::sax_ns_parser::handler_wrapper>::handler_wrapper::attribute(orcus::sax::parser_attribute const&) at workdir/UnpackedTarball/liborcus/src/liborcus/../../include/orcus/sax_ns_parser.hpp:212:27 > #4 in orcus::sax_parser::handler_wrapper>::handler_wrapper, orcus::sax_parser_default_config>::attribute() at workdir/UnpackedTarball/liborcus/src/liborcus/../../include/orcus/sax_parser.hpp:570:15 > #5 in orcus::sa
[Libreoffice-commits] core.git: Branch 'distro/collabora/co-22.05' - 8 commits - include/svl sc/inc sc/source svl/source xmloff/source
include/svl/zformat.hxx |4 + sc/inc/listenercalls.hxx |6 +- sc/source/core/data/documen4.cxx | 23 +++-- sc/source/core/data/table2.cxx| 18 +-- sc/source/ui/app/inputhdl.cxx | 20 ++-- sc/source/ui/inc/inputhdl.hxx |2 sc/source/ui/unoobj/cellsuno.cxx |4 + sc/source/ui/unoobj/listenercalls.cxx |2 sc/source/ui/vba/vbarange.cxx | 81 +- sc/source/ui/vba/vbarange.hxx |3 + svl/source/numbers/zforlist.cxx | 17 +++ svl/source/numbers/zformat.cxx| 28 +++ xmloff/source/style/xmlnumfe.cxx | 31 + xmloff/source/style/xmlnumfi.cxx | 24 +- 14 files changed, 186 insertions(+), 77 deletions(-) New commits: commit c649ad711ec48d08b0761f420f4584768c82eb74 Author: Eike Rathke AuthorDate: Tue Jun 21 09:49:31 2022 +0200 Commit: Luboš Luňák CommitDate: Mon Jun 27 13:30:25 2022 +0200 Resolves: tdf#149589 No "+ or - may start formula" when editing content If it was a formula already it would start with = anyway. Change-Id: Ib3c0ebcaf99231d387f1aace8e1a5642061de3a0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136208 Reviewed-by: Eike Rathke Tested-by: Jenkins (cherry picked from commit 909cdd552199d35f7c10be0a8be370158aea0815) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136173 Tested-by: Eike Rathke Reviewed-by: Caolán McNamara diff --git a/sc/source/ui/app/inputhdl.cxx b/sc/source/ui/app/inputhdl.cxx index d1a2fea3d482..e2343e052cfe 100644 --- a/sc/source/ui/app/inputhdl.cxx +++ b/sc/source/ui/app/inputhdl.cxx @@ -831,6 +831,7 @@ ScInputHandler::ScInputHandler() bLastIsSymbol( false ), mbDocumentDisposing(false), mbPartialPrefix(false), +mbEditingExistingContent(false), nValidation( 0 ), eAttrAdjust( SvxCellHorJustify::Standard ), aScaleX( 1,1 ), @@ -1769,6 +1770,9 @@ void ScInputHandler::LOKPasteFunctionData(const OUString& rFunctionName) if (pEditEngine) { aFormula = pEditEngine->GetText(0); +/* TODO: LOK: are you sure you want '+' and '-' let start formulas with + * function names? That was meant for "data typist" numeric keyboard + * input. */ bEdit = aFormula.getLength() > 1 && (aFormula[0] == '=' || aFormula[0] == '+' || aFormula[0] == '-'); } @@ -2575,6 +2579,7 @@ bool ScInputHandler::StartTable( sal_Unicode cTyped, bool bFromCommand, bool bIn } else aStr = GetEditText(mpEditEngine.get()); +mbEditingExistingContent = !aStr.isEmpty(); if (aStr.startsWith("{=") && aStr.endsWith("}") ) // Matrix formula? { @@ -2589,8 +2594,7 @@ bool ScInputHandler::StartTable( sal_Unicode cTyped, bool bFromCommand, bool bIn if ( bAutoComplete ) GetColData(); -if ( !aStr.isEmpty() && ( aStr[0] == '=' || aStr[0] == '+' || aStr[0] == '-' ) && - !cTyped && !bCreatingFuncView ) +if (!cTyped && !bCreatingFuncView && StartsLikeFormula(aStr)) InitRangeFinder(aStr); // Formula is being edited -> RangeFinder bNewTable = true; // -> PostEditView Call @@ -2792,6 +2796,13 @@ void ScInputHandler::DataChanged( bool bFromTopNotify, bool bSetModified ) bInOwnChange = false; } +bool ScInputHandler::StartsLikeFormula( std::u16string_view rStr ) const +{ +// For new input '+' and '-' may start the dreaded "lazy data typist" +// formula input, editing existing formula content can only start with '='. +return !rStr.empty() && (rStr[0] == '=' || (!mbEditingExistingContent && (rStr[0] == '+' || rStr[0] == '-'))); +} + void ScInputHandler::UpdateFormulaMode() { SfxApplication* pSfxApp = SfxGetpApp(); @@ -2800,8 +2811,7 @@ void ScInputHandler::UpdateFormulaMode() if (bIsFormula) { const OUString& rText = mpEditEngine->GetText(0); -bIsFormula = !rText.isEmpty() && -(rText[0] == '=' || rText[0] == '+' || rText[0] == '-'); +bIsFormula = StartsLikeFormula(rText); } if ( bIsFormula ) @@ -3407,6 +3417,7 @@ void ScInputHandler::EnterHandler( ScEnterMode nBlockMode, bool bBeforeSavingInL nFormSelStart = nFormSelEnd = 0; aFormText.clear(); +mbEditingExistingContent = false; bInOwnChange = false; bInEnterHandler = false; } @@ -3419,6 +3430,7 @@ void ScInputHandler::CancelHandler() bModified = false; mbPartialPrefix = false; +mbEditingExistingContent = false; // Don't rely on ShowRefFrame switching the active view synchronously // execute the function directly on the correct view's bindings instead diff --git a/sc/source/ui/inc/inputhdl.hxx b/sc/source/ui/inc/inputhdl.hxx index 1450f26c8176..56ed3bb95b1f 100644 --- a/sc
[Libreoffice-commits] core.git: Branch 'libreoffice-7-3' - external/libnumbertext
external/libnumbertext/EmptyString.patch1 | 13 + external/libnumbertext/UnpackedTarball_libnumbertext.mk |1 + 2 files changed, 14 insertions(+) New commits: commit a095f58d981569cbe79d724a301ed04f0f92748d Author: Caolán McNamara AuthorDate: Mon Jun 27 09:40:22 2022 +0100 Commit: Caolán McNamara CommitDate: Mon Jun 27 13:36:04 2022 +0200 crashtesting: fix assert seen on loading forum-nl-1226.ods Change-Id: If8c08a51b11a459a03b4a0604c1fb9897351e598 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136467 Reviewed-by: Michael Stahl Tested-by: Jenkins diff --git a/external/libnumbertext/EmptyString.patch1 b/external/libnumbertext/EmptyString.patch1 new file mode 100644 index ..d6570117da09 --- /dev/null +++ b/external/libnumbertext/EmptyString.patch1 @@ -0,0 +1,13 @@ +--- a/src/Soros.cxx2022-06-27 09:36:46.486075920 +0100 b/src/Soros.cxx2022-06-27 09:37:52.594072196 +0100 +@@ -98,8 +98,8 @@ + s = regex_replace(s, quoteEnd, L""); + s = translate(s, c.substr(1), m.substr(1), L""); + replace(s, slash, L""); // -> \\, ", ;, # +-begins.push_back(s[0] == L'^'); +-ends.push_back(s[s.length()-1] == L'$'); ++begins.push_back(!s.empty() && s[0] == L'^'); ++ends.push_back(!s.empty() && s[s.length()-1] == L'$'); + s = L"^" + regex_replace(s, wregex(L"^\\^"), L""); + s = regex_replace(s, wregex(L"\\$$"), L"") + L"$"; + try diff --git a/external/libnumbertext/UnpackedTarball_libnumbertext.mk b/external/libnumbertext/UnpackedTarball_libnumbertext.mk index 48cd2a9a273d..fb88366d5aef 100644 --- a/external/libnumbertext/UnpackedTarball_libnumbertext.mk +++ b/external/libnumbertext/UnpackedTarball_libnumbertext.mk @@ -18,6 +18,7 @@ $(eval $(call gb_UnpackedTarball_set_patchlevel,libnumbertext,1)) $(eval $(call gb_UnpackedTarball_add_patches,libnumbertext, \ external/libnumbertext/MSVCNonBMPBug.patch1 \ external/libnumbertext/WinUnicodePath.patch1 \ +external/libnumbertext/EmptyString.patch1 \ )) # vim: set noet sw=4 ts=4:
[Libreoffice-commits] core.git: include/ucbhelper ucbhelper/source
include/ucbhelper/contenthelper.hxx |6 +++--- include/ucbhelper/providerhelper.hxx |2 +- include/ucbhelper/resultsethelper.hxx|6 +++--- ucbhelper/source/provider/contenthelper.cxx | 15 --- ucbhelper/source/provider/contentinfo.cxx|9 + ucbhelper/source/provider/contentinfo.hxx|4 ++-- ucbhelper/source/provider/interactionrequest.cxx |5 +++-- ucbhelper/source/provider/providerhelper.cxx |5 +++-- ucbhelper/source/provider/resultset.cxx | 19 ++- ucbhelper/source/provider/resultsethelper.cxx|9 + 10 files changed, 43 insertions(+), 37 deletions(-) New commits: commit eea6b27762cdd5f831f4a83b8c5d2979652aab03 Author: Noel Grandin AuthorDate: Mon Jun 27 10:11:20 2022 +0200 Commit: Noel Grandin CommitDate: Mon Jun 27 13:40:26 2022 +0200 clang-tidy modernize-pass-by-value in ucbhelper Change-Id: I9f73760a800bee5a810add9ee0ebed3a778ddd8b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136475 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/include/ucbhelper/contenthelper.hxx b/include/ucbhelper/contenthelper.hxx index 3f269e475d4a..b5906402cc52 100644 --- a/include/ucbhelper/contenthelper.hxx +++ b/include/ucbhelper/contenthelper.hxx @@ -293,9 +293,9 @@ public: * @param Identifier is the content identifier for the content. */ ContentImplHelper( -const css::uno::Reference< css::uno::XComponentContext >& rxContext, -const rtl::Reference< ContentProviderImplHelper >& rxProvider, -const css::uno::Reference< css::ucb::XContentIdentifier >& Identifier ); +css::uno::Reference< css::uno::XComponentContext > xContext, +rtl::Reference< ContentProviderImplHelper > xProvider, +css::uno::Reference< css::ucb::XContentIdentifier > Identifier ); /** * Destructor. diff --git a/include/ucbhelper/providerhelper.hxx b/include/ucbhelper/providerhelper.hxx index 550da6c0ec13..36daec868049 100644 --- a/include/ucbhelper/providerhelper.hxx +++ b/include/ucbhelper/providerhelper.hxx @@ -130,7 +130,7 @@ public: ContentProviderImplHelper( -const css::uno::Reference< css::uno::XComponentContext >& rxContext ); +css::uno::Reference< css::uno::XComponentContext > xContext ); virtual ~ContentProviderImplHelper() override; diff --git a/include/ucbhelper/resultsethelper.hxx b/include/ucbhelper/resultsethelper.hxx index 486d07fe5f89..31f96790581a 100644 --- a/include/ucbhelper/resultsethelper.hxx +++ b/include/ucbhelper/resultsethelper.hxx @@ -118,9 +118,9 @@ public: *this resultset. */ ResultSetImplHelper( -const css::uno::Reference< -css::uno::XComponentContext >& rxContext, -const css::ucb::OpenCommandArgument2& rCommand ); +css::uno::Reference< +css::uno::XComponentContext > xContext, +css::ucb::OpenCommandArgument2 aCommand ); /** * Destructor. diff --git a/ucbhelper/source/provider/contenthelper.cxx b/ucbhelper/source/provider/contenthelper.cxx index 75d0a8479860..3a8b8f19a604 100644 --- a/ucbhelper/source/provider/contenthelper.cxx +++ b/ucbhelper/source/provider/contenthelper.cxx @@ -43,6 +43,7 @@ #include #include +#include using namespace com::sun::star; @@ -124,14 +125,14 @@ using namespace ucbhelper_impl; namespace ucbhelper { ContentImplHelper::ContentImplHelper( -const uno::Reference< uno::XComponentContext >& rxContext, -const rtl::Reference< ContentProviderImplHelper >& rxProvider, -const uno::Reference< -css::ucb::XContentIdentifier >& Identifier ) +uno::Reference< uno::XComponentContext > xContext, +rtl::Reference< ContentProviderImplHelper > xProvider, +uno::Reference< +css::ucb::XContentIdentifier > Identifier ) : m_pImpl( new ContentImplHelper_Impl ), - m_xContext( rxContext ), - m_xIdentifier( Identifier ), - m_xProvider( rxProvider ), + m_xContext(std::move( xContext )), + m_xIdentifier(std::move( Identifier )), + m_xProvider(std::move( xProvider )), m_nCommandId( 0 ) { } diff --git a/ucbhelper/source/provider/contentinfo.cxx b/ucbhelper/source/provider/contentinfo.cxx index b5ca80b79d0b..561a80e77e1c 100644 --- a/ucbhelper/source/provider/contentinfo.cxx +++ b/ucbhelper/source/provider/contentinfo.cxx @@ -28,6 +28,7 @@ #include #include +#include #include "contentinfo.hxx" using namespace com::sun::star; @@ -39,9 +40,9 @@ using namespace com::sun::star; namespace ucbhelper { PropertySetInfo::PropertySetInfo( -const uno::Reference< css::ucb::XCommandEnvironment >& rxEnv, +uno::Reference< css::ucb::XCommandEnvironment > xEnv, ContentImplHelper* pContent ) -: m_xEnv( rxEnv ), +: m_xEnv(std
[Libreoffice-commits] core.git: Branch 'distro/collabora/co-22.05' - 2 commits - sc/source sd/uiconfig
sc/source/ui/app/inputhdl.cxx|4 sd/uiconfig/simpress/ui/customanimationspanel.ui | 979 +++ 2 files changed, 486 insertions(+), 497 deletions(-) New commits: commit 7bb8c3da46544227ca35413738c9a57238fff8a0 Author: Szymon Kłos AuthorDate: Fri Jun 24 14:04:03 2022 +0200 Commit: Szymon Kłos CommitDate: Mon Jun 27 13:43:39 2022 +0200 lok: formulabar: send correct caret position for numbers It fixes the bug: 1. Open spreadsheet and type long numer in some cell (only numbers) 2. Move cell cursor to another cell, then using keyboard go back to the previous cell 3. click in formulabar somewhere in the middle of a number 4. try to type one character result: character was added in correct place but cursor was moved to the start expected: caret will stay at correct place Change-Id: I514d868dce5478e65d57fd2f350da9777b615e0a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136395 Tested-by: Jenkins CollaboraOffice Reviewed-by: Rashesh Padia Reviewed-by: Szymon Kłos diff --git a/sc/source/ui/app/inputhdl.cxx b/sc/source/ui/app/inputhdl.cxx index e2343e052cfe..0fb604520ac2 100644 --- a/sc/source/ui/app/inputhdl.cxx +++ b/sc/source/ui/app/inputhdl.cxx @@ -2786,6 +2786,10 @@ void ScInputHandler::DataChanged( bool bFromTopNotify, bool bSetModified ) if (comphelper::LibreOfficeKit::isActive() && pActiveViewSh && pInputWin) { +UpdateActiveView(); +if (pActiveView) +aSel = pActiveView->GetSelection(); + ScInputHandler::LOKSendFormulabarUpdate(pActiveViewSh, ScEditUtil::GetMultilineString(*mpEditEngine), aSel); commit 26ee145fd829d24c197f723efbb71809170e9e3b Author: Szymon Kłos AuthorDate: Thu Jun 23 16:25:11 2022 +0200 Commit: Szymon Kłos CommitDate: Mon Jun 27 13:43:26 2022 +0200 Remove not necessary container in Animation Panel in Impress Sidebar It was causing layouting issues in LOK. Change-Id: Ic7520f46efa764d2d6b50b021b44e0a5dd07d837 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136343 Tested-by: Jenkins CollaboraOffice Reviewed-by: Rashesh Padia Reviewed-by: Szymon Kłos diff --git a/sd/uiconfig/simpress/ui/customanimationspanel.ui b/sd/uiconfig/simpress/ui/customanimationspanel.ui index 2d8bd06d6118..8625fbe97cf0 100644 --- a/sd/uiconfig/simpress/ui/customanimationspanel.ui +++ b/sd/uiconfig/simpress/ui/customanimationspanel.ui @@ -75,625 +75,610 @@ 6 vertical - + True True -True -True -vertical -True +never - + True -True -never +False - + True False +True +True - -True -False + +True True True +in - + +260 True +True +True True True -in +liststore1 +False +True +1 + + + - -260 -True -True -True -True -True -liststore1 -False -True -1 - - - + +6 - -6 - - - -0 - - - - - -1 - - - + + +0 + -
[Libreoffice-commits] core.git: Branch 'distro/collabora/co-22.05' - vcl/jsdialog
vcl/jsdialog/executor.cxx |5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) New commits: commit 2f423a5feba085bad40ce53f512480507603c28c Author: Szymon Kłos AuthorDate: Thu Jun 9 17:41:15 2022 +0200 Commit: Szymon Kłos CommitDate: Mon Jun 27 13:45:01 2022 +0200 jsdialog: toggle toolbox buttons correctly Change-Id: Ic02f9ceab29257ebc4cb6261aae10c4f1a7ef176 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135562 Tested-by: Andras Timar Reviewed-by: Andras Timar (cherry picked from commit b6b7b3a5a46790baf2266aaeb10976753dfe0fce) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135539 Tested-by: Jenkins CollaboraOffice Reviewed-by: Szymon Kłos diff --git a/vcl/jsdialog/executor.cxx b/vcl/jsdialog/executor.cxx index 2da2ab5b9608..8e570ccbe2e4 100644 --- a/vcl/jsdialog/executor.cxx +++ b/vcl/jsdialog/executor.cxx @@ -325,8 +325,9 @@ bool ExecuteAction(const std::string& nWindowId, const OString& rWidget, StringM } else if (sAction == "togglemenu") { -pToolbar->set_menu_item_active( -OUStringToOString(rData["data"], RTL_TEXTENCODING_ASCII_US), true); +OString sId = OUStringToOString(rData["data"], RTL_TEXTENCODING_ASCII_US); +bool bIsActive = pToolbar->get_menu_item_active(sId); +pToolbar->set_menu_item_active(sId, !bIsActive); return true; } }
[Libreoffice-commits] core.git: 2 commits - shell/source
shell/source/win32/simplemail/senddoc.cxx| 38 +++ shell/source/win32/simplemail/smplmailclient.cxx | 16 +++-- shell/source/win32/simplemail/smplmailclient.hxx |2 - 3 files changed, 40 insertions(+), 16 deletions(-) New commits: commit 2a719774948fc1762e60cf7dd2ee3393c8922bb2 Author: Mike Kaganski AuthorDate: Mon Jun 27 12:02:44 2022 +0300 Commit: Mike Kaganski CommitDate: Mon Jun 27 13:59:47 2022 +0200 tdf#126263: do not try to delete non-temporary files Change-Id: I5df7db7eac6224fce833e6b9d4ea220cade44e4b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136483 Tested-by: Jenkins Reviewed-by: Mike Kaganski diff --git a/shell/source/win32/simplemail/senddoc.cxx b/shell/source/win32/simplemail/senddoc.cxx index 3b57684fe821..e34412cbfae1 100644 --- a/shell/source/win32/simplemail/senddoc.cxx +++ b/shell/source/win32/simplemail/senddoc.cxx @@ -58,8 +58,8 @@ namespace /* private */ std::vector gTo; std::vector gCc; std::vector gBcc; -// Keep temp filepath and displayed name -std::vector> gAttachments; +// Keep temp filepath, displayed name, and "do not delete" flag +std::vector> gAttachments; int gMapiFlags = 0; } @@ -121,11 +121,12 @@ static void initAttachmentList(MapiAttachmentList_t* pMapiAttachmentList) { OSL_ASSERT(pMapiAttachmentList->empty()); -for (const auto& attachment : gAttachments) +for (const auto& [filepath, attachname, nodelete] : gAttachments) { +(void)nodelete; MapiFileDescW mfd; ZeroMemory(&mfd, sizeof(mfd)); -mfd.lpszPathName = const_cast(attachment.first.c_str()); +mfd.lpszPathName = const_cast(filepath.c_str()); // MapiFileDesc documentation (https://msdn.microsoft.com/en-us/library/hh707272) // allows using here either nullptr, or a pointer to empty string. However, // for Outlook 2013, we cannot use nullptr here, and must point to a (possibly @@ -134,7 +135,7 @@ static void initAttachmentList(MapiAttachmentList_t* pMapiAttachmentList) // Since C++11, c_str() must return a pointer to single null character when the // string is empty, so we are OK here in case when there's no explicit file name // passed -mfd.lpszFileName = const_cast(attachment.second.c_str()); +mfd.lpszFileName = const_cast(attachname.c_str()); mfd.nPosition = sal::static_int_cast(-1); pMapiAttachmentList->push_back(mfd); } @@ -239,7 +240,14 @@ static void initParameter(int argc, wchar_t* argv[]) sName = argv[i+3]; i += 2; } -gAttachments.emplace_back(sPath, sName); +// Also there may be --nodelete to keep the attachment on exit +bool nodelete = false; +if ((i + 2) < argc && _wcsicmp(argv[i+2], L"--nodelete") == 0) +{ +nodelete = true; +++i; +} +gAttachments.emplace_back(sPath, sName, nodelete); } else if (_wcsicmp(argv[i], L"--langtag") == 0) gLangTag = o3tl::toU(argv[i+1]); @@ -401,8 +409,12 @@ int wmain(int argc, wchar_t* argv[]) } // Now cleanup the temporary attachment files -for (const auto& rAttachment : gAttachments) -DeleteFileW(rAttachment.first.c_str()); +for (const auto& [filepath, attachname, nodelete] : gAttachments) +{ +(void)attachname; +if (!nodelete) +DeleteFileW(filepath.c_str()); +} // Only show the error message if UI was requested if ((ulRet != SUCCESS_SUCCESS) && (gMapiFlags & (MAPI_DIALOG | MAPI_LOGON_UI))) @@ -434,11 +446,13 @@ int wmain(int argc, wchar_t* argv[]) for (const auto& address : gBcc) oss << "--bcc " << address << std::endl; -for (const auto& attachment : gAttachments) +for (const auto& [filepath, attachname, nodelete] : gAttachments) { -oss << "--attach " << attachment.first << std::endl; -if (!attachment.second.empty()) -oss << "--attach-name " << attachment.second << std::endl; +oss << "--attach " << filepath << std::endl; +if (!attachname.empty()) +oss << "--attach-name " << attachname << std::endl; +if (nodelete) +oss << "--nodelete" << std::endl; } if (gMapiFlags & MAPI_DIALOG) diff --git a/shell/source/win32/simplemail/smplmailclient.cxx b/shell/source/win32/simplemail/smplmailclient.cxx index 4b19880d6cc2..075eaa34579d 100644 --- a/shell/source/win32/simplemail/smplmailclient.cxx +++ b/shell/source/win32/simplemail/smplmailclient.cxx @@ -180,7 +180,8 @@ const OUString& GetBaseTempDirURL() } } -OUString CSmplMailClient::CopyAttachment(const OUString& sOrigAttachURL, OUString& sUserVisibl
[Libreoffice-commits] core.git: Branch 'libreoffice-7-4' - external/libnumbertext
external/libnumbertext/EmptyString.patch1 | 13 + external/libnumbertext/UnpackedTarball_libnumbertext.mk |1 + 2 files changed, 14 insertions(+) New commits: commit d2488687d64c154c49d442b469b8b71d0edb9d77 Author: Caolán McNamara AuthorDate: Mon Jun 27 09:40:22 2022 +0100 Commit: Caolán McNamara CommitDate: Mon Jun 27 14:14:48 2022 +0200 crashtesting: fix assert seen on loading forum-nl-1226.ods Change-Id: If8c08a51b11a459a03b4a0604c1fb9897351e598 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136466 Tested-by: Jenkins Reviewed-by: Caolán McNamara diff --git a/external/libnumbertext/EmptyString.patch1 b/external/libnumbertext/EmptyString.patch1 new file mode 100644 index ..d6570117da09 --- /dev/null +++ b/external/libnumbertext/EmptyString.patch1 @@ -0,0 +1,13 @@ +--- a/src/Soros.cxx2022-06-27 09:36:46.486075920 +0100 b/src/Soros.cxx2022-06-27 09:37:52.594072196 +0100 +@@ -98,8 +98,8 @@ + s = regex_replace(s, quoteEnd, L""); + s = translate(s, c.substr(1), m.substr(1), L""); + replace(s, slash, L""); // -> \\, ", ;, # +-begins.push_back(s[0] == L'^'); +-ends.push_back(s[s.length()-1] == L'$'); ++begins.push_back(!s.empty() && s[0] == L'^'); ++ends.push_back(!s.empty() && s[s.length()-1] == L'$'); + s = L"^" + regex_replace(s, wregex(L"^\\^"), L""); + s = regex_replace(s, wregex(L"\\$$"), L"") + L"$"; + try diff --git a/external/libnumbertext/UnpackedTarball_libnumbertext.mk b/external/libnumbertext/UnpackedTarball_libnumbertext.mk index 48cd2a9a273d..fb88366d5aef 100644 --- a/external/libnumbertext/UnpackedTarball_libnumbertext.mk +++ b/external/libnumbertext/UnpackedTarball_libnumbertext.mk @@ -18,6 +18,7 @@ $(eval $(call gb_UnpackedTarball_set_patchlevel,libnumbertext,1)) $(eval $(call gb_UnpackedTarball_add_patches,libnumbertext, \ external/libnumbertext/MSVCNonBMPBug.patch1 \ external/libnumbertext/WinUnicodePath.patch1 \ +external/libnumbertext/EmptyString.patch1 \ )) # vim: set noet sw=4 ts=4:
[Libreoffice-commits] core.git: Branch 'libreoffice-7-4' - svx/qa svx/source
svx/qa/unit/table.cxx| 38 +++ svx/source/table/tablecontroller.cxx |7 ++ 2 files changed, 45 insertions(+) New commits: commit ee68863baa51e47ae9bb00373fce2f86ba8df1e8 Author: Miklos Vajna AuthorDate: Fri Jun 24 10:46:40 2022 +0200 Commit: Xisco Fauli CommitDate: Mon Jun 27 14:29:44 2022 +0200 tdf#148522 svx: fix undo of cell border changes text alignment in other cells The Impress table properties dialog has multiple purposes: normally it only affects the properties of the currently active cell, but shadow is applied on the whole shape. Regression from commit fdeb04f7c59cf8032fe17072ed779e70505cc6ab (tdf#129961 svx: finish UI for table shadow as direct format, 2020-12-15), we started to apply properties to the current cell, and then to the whole shape as well, unconditionally. This affects undo/redo, as there is a separate undo manager while the text edit of a table cell is active and when the text edit is ended. Fix the problem by only applying properties on the shape when there we actually have some properties: this way the text edit is typically not ended, bringing back the old undo/redo behavior. Note that we still need to end the text edit if the user explicitly sets some shadow properties, that part is unchanged with this commit. Change-Id: I78e28bd326a2c12c3775b33957adca4cd95ac582 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136357 Reviewed-by: Miklos Vajna Tested-by: Jenkins (cherry picked from commit 3edfbc19950610bb2061d29cb58b3811b1a0b1a5) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136460 Reviewed-by: Xisco Fauli diff --git a/svx/qa/unit/table.cxx b/svx/qa/unit/table.cxx index c82f331f2d17..c68abe18beea 100644 --- a/svx/qa/unit/table.cxx +++ b/svx/qa/unit/table.cxx @@ -24,6 +24,11 @@ #include #include #include +#include +#include +#include +#include +#include using namespace ::com::sun::star; @@ -99,6 +104,39 @@ CPPUNIT_TEST_FIXTURE(Test, testTableShadowBlur) // itself and the transparency of the cell fill. assertXPath(pDocument, "//objectinfo/unifiedtransparence[1]", "transparence", "80"); } + +CPPUNIT_TEST_FIXTURE(Test, testSvxTableControllerSetAttrToSelectedShape) +{ +// Given a document with a table shape, editing cell text: +getComponent() = loadFromDesktop("private:factory/simpress", + "com.sun.star.presentation.PresentationDocument"); +uno::Sequence aArgs += { comphelper::makePropertyValue("Rows", sal_Int32(2)), +comphelper::makePropertyValue("Columns", sal_Int32(2)) }; +dispatchCommand(mxComponent, ".uno:InsertTable", aArgs); +uno::Reference xDrawPagesSupplier(getComponent(), uno::UNO_QUERY); +uno::Reference xDrawPage(xDrawPagesSupplier->getDrawPages()->getByIndex(0), + uno::UNO_QUERY); +auto pDrawPage = dynamic_cast(xDrawPage.get()); +CPPUNIT_ASSERT(pDrawPage); +SdrPage* pSdrPage = pDrawPage->GetSdrPage(); +auto pSdrObject += dynamic_cast(pSdrPage->GetObj(pSdrPage->GetObjCount() - 1)); +SfxViewShell* pViewShell = SfxViewShell::Current(); +SdrView* pSdrView = pViewShell->GetDrawView(); +pSdrView->SdrBeginTextEdit(pSdrObject); +CPPUNIT_ASSERT(pSdrView->IsTextEdit()); +const EditTextObject& rEdit = pSdrObject->getText(0)->GetOutlinerParaObject()->GetTextObject(); +SfxItemSet aSet(rEdit.GetParaAttribs(0)); +auto pTableController += dynamic_cast(pSdrView->getSelectionController().get()); + +// When applying attributes which only affect the cell text, not the table shape: +pTableController->SetAttrToSelectedShape(aSet); + +// Then make sure the text edit is not ended: +CPPUNIT_ASSERT(pSdrView->IsTextEdit()); +} } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/table/tablecontroller.cxx b/svx/source/table/tablecontroller.cxx index ef7401489c1d..1ceaa5141245 100644 --- a/svx/source/table/tablecontroller.cxx +++ b/svx/source/table/tablecontroller.cxx @@ -2754,6 +2754,13 @@ void SvxTableController::SetAttrToSelectedShape(const SfxItemSet& rAttr) SfxItemSetFixed aSet(*rAttr.GetPool()); aSet.Put(rAttr); +if (!aSet.Count()) +{ +// If there are no items to be applied on the shape, then don't set anything, it would +// terminate text edit without a good reason, which affects undo/redo. +return; +} + // Set shadow items on the marked shape. mrView.SetAttrToMarked(aSet, /*bReplaceAll=*/false); }
[Libreoffice-commits] core.git: Branch 'libreoffice-7-4' - sw/qa sw/source
sw/qa/core/unocore/unocore.cxx | 40 sw/source/core/unocore/unoparagraph.cxx | 14 +++ 2 files changed, 44 insertions(+), 10 deletions(-) New commits: commit 6e66573f5d589b49865ddf9febda925da5cb1d68 Author: Miklos Vajna AuthorDate: Mon Jun 27 10:18:32 2022 +0200 Commit: Miklos Vajna CommitDate: Mon Jun 27 14:44:40 2022 +0200 tdf#149668 sw: fix DOCX->ODT: Multilevel lists causing list numbering reset The bug document had an outer (ordered) numbering and an inner one, finally the outer numbering was continued. This was fine after DOCX import, but once we saved to ODT and re-opened, the second outer numbering was restarted, not continued the first outer one. This happened because on one hand, lcl_SwXParagraph_getPropertyState() says that the state of the ListId property is "default" if the paragraph's item set doesn't have a RES_PARATR_LIST_ID, but on the other hand xmloff/ will only write the xml:id="..." attribute on a list if the ListId state is not default. This is a problem, because it can happen that xmloff/ refers to a list later by its id, even if the list doesn't have a RES_PARATR_LIST_ID set. Fix the problem by relaxing the condition where lcl_SwXParagraph_getPropertyState() reports FN_UNO_LIST_ID as non-default: just require that that the text node has a numbering rule + the numbering rule has at least one continue list. This fixes the reported DOCX -> ODT case with named list styles and keeps the original ODT import and HTML import use-cases working to not write un-referenced xml:id="..." attributes on export. This was a regression from commit 8f48f91009caa86d896f247059874242ed18bf39 (ODT export: omit unreferenced , 2022-03-10). (cherry picked from commit 5938687e5764ee50759374b54d2bb1cf0e0d59d3) Change-Id: I300ebe7aa7da71a336c03abe7530074b696417f7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136486 Tested-by: Jenkins Reviewed-by: Miklos Vajna diff --git a/sw/qa/core/unocore/unocore.cxx b/sw/qa/core/unocore/unocore.cxx index 56b9ed4c74de..bd2385d1eb54 100644 --- a/sw/qa/core/unocore/unocore.cxx +++ b/sw/qa/core/unocore/unocore.cxx @@ -639,6 +639,46 @@ CPPUNIT_TEST_FIXTURE(SwCoreUnocoreTest, testContentControlDate) CPPUNIT_ASSERT_EQUAL(OUString("008000"), pContentControl->GetColor()); } +CPPUNIT_TEST_FIXTURE(SwCoreUnocoreTest, testListIdState) +{ +// Given a document with 3 paragraphs: an outer numbering on para 1 & 3, an inner numbering on +// para 2: +SwDoc* pDoc = createSwDoc(); +SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell(); +{ +SfxItemSetFixed aSet(pWrtShell->GetAttrPool()); +SwNumRuleItem aItem("Numbering ABC"); +aSet.Put(aItem); +pWrtShell->SetAttrSet(aSet); +} +pWrtShell->SplitNode(); +{ +SfxItemSetFixed aSet(pWrtShell->GetAttrPool()); +SwNumRuleItem aItem("Numbering 123"); +aSet.Put(aItem); +pWrtShell->SetAttrSet(aSet); +} +pWrtShell->SplitNode(); +{ +SfxItemSetFixed aSet(pWrtShell->GetAttrPool()); +SwNumRuleItem aItem("Numbering ABC"); +aSet.Put(aItem); +pWrtShell->SetAttrSet(aSet); +} + +// When checking if xml:id="..." needs writing for the first paragraph during ODT export: +uno::Reference xPara(getParagraph(1), uno::UNO_QUERY); +beans::PropertyState eState = xPara->getPropertyState("ListId"); + +// Then make sure that xml:id="..." gets written for para 1, as it'll be continued in para 3. +// Without the accompanying fix in place, this test would have failed with: +// - Expected: 0 (DIRECT_VALUE) +// - Actual : 1 (DEFAULT_VALUE) +// i.e. para 1 didn't write an xml:id="..." but para 3 referred to it using continue-list="...", +// which is inconsistent. +CPPUNIT_ASSERT_EQUAL(beans::PropertyState_DIRECT_VALUE, eState); +} + CPPUNIT_PLUGIN_IMPLEMENT(); /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/core/unocore/unoparagraph.cxx b/sw/source/core/unocore/unoparagraph.cxx index d13bd6c65945..7485b98b1580 100644 --- a/sw/source/core/unocore/unoparagraph.cxx +++ b/sw/source/core/unocore/unoparagraph.cxx @@ -922,18 +922,12 @@ static beans::PropertyState lcl_SwXParagraph_getPropertyState( } case FN_UNO_LIST_ID: { -if (*ppSet) +SwNumRule* pNumRule = rTextNode.GetNumRule(); +if (pNumRule && pNumRule->HasContinueList()) { -if ((*ppSet)->GetItemState(RES_PARATR_LIST_ID, false) == SfxItemState::SET) -{ -SwNumRule* pNumRule = rTextNode.GetNumRule(); -if (!pNumRule || pNumRule->HasContinueList()) -{ -eRet = beans::PropertyState_DIRECT_VALUE; -
[Libreoffice-commits] core.git: Branch 'distro/vector/vector-7.0' - 2 commits - include/svtools svtools/qa svtools/source
include/svtools/HtmlWriter.hxx |4 +++ svtools/qa/unit/testHtmlWriter.cxx | 38 +++ svtools/source/svhtml/HtmlWriter.cxx | 30 +++ 3 files changed, 67 insertions(+), 5 deletions(-) New commits: commit c4c7d967588b2efbb60f89d80d911c87277a347b Author: Miklos Vajna AuthorDate: Fri Jun 24 16:07:15 2022 +0200 Commit: Miklos Vajna CommitDate: Mon Jun 27 15:04:37 2022 +0200 sw HTML export: fix missing escaping for image links Hyperlink URLs on images are currently written to the HTML output as-is, without any any encoding. Image links are written using HtmlWriter from svtools, which has the advantage of not building the markup manually (similar to sax_fastparser::FastSerializerHelper for XML), but that doesn't do any escaping. Some other parts of the HTML export build the export markup manually, but use HTMLOutFuncs::Out_String() to encode problematic content. Fix the problem by using HTMLOutFuncs::Out_String() in HtmlWriter for attribute values: it seems reasonable to assume that users of HtmlWriter would pass in unencoded strings, similar to how the sax serializer works. This could lead to double-encoding in case some user of HtmlWriter::attribute() would encode its attribute value already, but inspecting existing calls, none of the clients seem to do that at the moment. (cherry picked from commit 167a5ce786b0561028ad42ea3fc92e55d14484a4) Change-Id: I5439e829b1b837cb9c51292b118f0b47e84197db diff --git a/svtools/qa/unit/testHtmlWriter.cxx b/svtools/qa/unit/testHtmlWriter.cxx index 70045ba8a50b..9328347f6ff4 100644 --- a/svtools/qa/unit/testHtmlWriter.cxx +++ b/svtools/qa/unit/testHtmlWriter.cxx @@ -200,6 +200,27 @@ CPPUNIT_TEST_FIXTURE(Test, testExactElementEnd) CPPUNIT_ASSERT_EQUAL(OString(""), aString); } +CPPUNIT_TEST_FIXTURE(Test, testAttributeValueEncode) +{ +// Given a HTML writer: +SvMemoryStream aStream; +HtmlWriter aHtml(aStream); +aHtml.prettyPrint(false); + +// When writing an attribute with a value that needs encoding: +aHtml.start("element"); +aHtml.attribute("attribute", "a&b"); +aHtml.end(); + +// Then make sure that the encoding is performed: +OString aString = extractFromStream(aStream); +// Without the accompanying fix in place, this test would have failed with: +// - Expected: +// - Actual : +// i.e. attribute value was not encoded in HTML, but it was in e.g. XML. +CPPUNIT_ASSERT_EQUAL(OString(""), aString); +} + CPPUNIT_PLUGIN_IMPLEMENT(); /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svtools/source/svhtml/HtmlWriter.cxx b/svtools/source/svhtml/HtmlWriter.cxx index 875da0a724ca..9010564d986f 100644 --- a/svtools/source/svhtml/HtmlWriter.cxx +++ b/svtools/source/svhtml/HtmlWriter.cxx @@ -11,6 +11,7 @@ #include #include #include +#include HtmlWriter::HtmlWriter(SvStream& rStream, const OString& rNamespace) : mrStream(rStream), @@ -127,7 +128,7 @@ void HtmlWriter::writeAttribute(SvStream& rStream, const OString& aAttribute, co rStream.WriteOString(aAttribute); rStream.WriteChar('='); rStream.WriteChar('"'); -rStream.WriteOString(aValue); +HTMLOutFuncs::Out_String(rStream, OStringToOUString(aValue, RTL_TEXTENCODING_UTF8), RTL_TEXTENCODING_UTF8); rStream.WriteChar('"'); } commit 12248c17f2ec0e61a85b1b2fc1715ffb2868eba9 Author: Tomaž Vajngerl AuthorDate: Mon May 31 21:14:41 2021 +0900 Commit: Miklos Vajna CommitDate: Mon Jun 27 14:29:07 2022 +0200 HtmlWriter: add end tag checking and helper for attribute writing Added an input variable to end to enter the name of which variable is ending. This is to check that the expected end tag is actually written. Added writeAttribute, which is independent from HtmlWriter and just writes the HTML attribute format to the stream. (cherry picked from commit 685c8db519b022f879cf575ec763d00de98906a3) Conflicts: include/svtools/HtmlWriter.hxx svtools/source/svhtml/HtmlWriter.cxx Change-Id: Ib00a4a37354cd1cb1781ba729ed4046a966e1eb1 diff --git a/include/svtools/HtmlWriter.hxx b/include/svtools/HtmlWriter.hxx index 49f2aa6c02f2..007668b6018f 100644 --- a/include/svtools/HtmlWriter.hxx +++ b/include/svtools/HtmlWriter.hxx @@ -39,10 +39,14 @@ public: void start(const OString& aElement); +bool end(const OString& aElement); void end(); void flushStack(); +static void writeAttribute(SvStream& rStream, const OString& aAttribute, sal_Int32 aValue); +static void writeAttribute(SvStream& rStream, const OString& aAttribute, const OString& aValue); + void attribute(const OString& aAttribute, const char* aValue); void attribute(const OString& aAttribute, sal_Int32 aValue); void attribute(const OString& aAt
[Libreoffice-commits] core.git: external/liborcus
external/liborcus/UnpackedTarball_liborcus.mk |2 ++ 1 file changed, 2 insertions(+) New commits: commit 4178d7b2212a9e4ec35b3225c28e50f64132efcb Author: Stephan Bergmann AuthorDate: Mon Jun 27 11:37:39 2022 +0200 Commit: Stephan Bergmann CommitDate: Mon Jun 27 15:18:02 2022 +0200 Mark external/liborcus/overrun.patch.0 as upstreamed Change-Id: Ibc77db49c7b584df1f5f3c086ecd479a28eb7797 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136484 Tested-by: Jenkins Reviewed-by: Stephan Bergmann diff --git a/external/liborcus/UnpackedTarball_liborcus.mk b/external/liborcus/UnpackedTarball_liborcus.mk index 12698bab7234..6e78c0ca2c3e 100644 --- a/external/liborcus/UnpackedTarball_liborcus.mk +++ b/external/liborcus/UnpackedTarball_liborcus.mk @@ -25,6 +25,8 @@ $(eval $(call gb_UnpackedTarball_update_autoconf_configs,liborcus)) # https://gitlab.com/orcus/orcus/-/commit/0a99ca6d50af51f1b0a151fdcac5e12ec9b01bf8 # forcepoint-95.patch.1 submitted as # https://gitlab.com/orcus/orcus/-/merge_requests/124 +# overrun.patch.0 submitted as +# https://gitlab.com/orcus/orcus/-/merge_requests/131 $(eval $(call gb_UnpackedTarball_add_patches,liborcus,\ external/liborcus/rpath.patch.0 \
[Libreoffice-commits] core.git: Branch 'libreoffice-7-3' - editeng/source include/editeng sc/qa sc/source
editeng/source/items/frmitems.cxx | 12 +- include/editeng/brushitem.hxx |5 sc/qa/unit/data/xlsx/tdf148820.xlsx |binary sc/qa/unit/subsequent_export_test2.cxx| 33 ++ sc/source/filter/inc/stylesbuffer.hxx |2 + sc/source/filter/oox/autofilterbuffer.cxx |2 - sc/source/filter/oox/stylesbuffer.cxx | 17 --- 7 files changed, 65 insertions(+), 6 deletions(-) New commits: commit 7613fa06e52e10130357898c5205b9ec7fc4e348 Author: Balazs Varga AuthorDate: Fri Jun 17 16:51:22 2022 +0200 Commit: Xisco Fauli CommitDate: Mon Jun 27 15:46:16 2022 +0200 tdf#148820 sc: fix conditional formatted cell color Store foreground color for color filtering, because in OOXML the foreground color is used for color filtering and we overwrote it with the background color which is used for conditional formatted cells too. Regression from commit: 6f908b48373b71d45c8119b296b0504fb586f6f8 (tdf#143104 Fix xlsx import/export of color filter colors) Change-Id: I737e6f1170851822a2689fa477db59e62f0d47fa Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136055 Tested-by: Jenkins Tested-by: Gabor Kelemen Reviewed-by: Thorsten Behrens (cherry picked from commit 415dc3bb1c03dbdbc3cbca274bc435ac7557ba2d) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136457 Reviewed-by: Xisco Fauli Signed-off-by: Xisco Fauli Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136479 diff --git a/editeng/source/items/frmitems.cxx b/editeng/source/items/frmitems.cxx index ba55d734515c..45ac886d5c50 100644 --- a/editeng/source/items/frmitems.cxx +++ b/editeng/source/items/frmitems.cxx @@ -2809,6 +2809,7 @@ void SvxLineItem::SetLine( const SvxBorderLine* pNew ) SvxBrushItem::SvxBrushItem(sal_uInt16 _nWhich) : SfxPoolItem(_nWhich) , aColor(COL_TRANSPARENT) +, aFilterColor(COL_TRANSPARENT) , nShadingValue(ShadingPattern::CLEAR) , nGraphicTransparency(0) , eGraphicPos(GPOS_NONE) @@ -2819,6 +2820,7 @@ SvxBrushItem::SvxBrushItem(sal_uInt16 _nWhich) SvxBrushItem::SvxBrushItem(const Color& rColor, sal_uInt16 _nWhich) : SfxPoolItem(_nWhich) , aColor(rColor) +, aFilterColor(COL_TRANSPARENT) , nShadingValue(ShadingPattern::CLEAR) , nGraphicTransparency(0) , eGraphicPos(GPOS_NONE) @@ -2829,6 +2831,7 @@ SvxBrushItem::SvxBrushItem(const Color& rColor, sal_uInt16 _nWhich) SvxBrushItem::SvxBrushItem(const Graphic& rGraphic, SvxGraphicPosition ePos, sal_uInt16 _nWhich) : SfxPoolItem(_nWhich) , aColor(COL_TRANSPARENT) +, aFilterColor(COL_TRANSPARENT) , nShadingValue(ShadingPattern::CLEAR) , xGraphicObject(new GraphicObject(rGraphic)) , nGraphicTransparency(0) @@ -2841,6 +2844,7 @@ SvxBrushItem::SvxBrushItem(const Graphic& rGraphic, SvxGraphicPosition ePos, sal SvxBrushItem::SvxBrushItem(const GraphicObject& rGraphicObj, SvxGraphicPosition ePos, sal_uInt16 _nWhich) : SfxPoolItem(_nWhich) , aColor(COL_TRANSPARENT) +, aFilterColor(COL_TRANSPARENT) , nShadingValue(ShadingPattern::CLEAR) , xGraphicObject(new GraphicObject(rGraphicObj)) , nGraphicTransparency(0) @@ -2854,6 +2858,7 @@ SvxBrushItem::SvxBrushItem(const OUString& rLink, const OUString& rFilter, SvxGraphicPosition ePos, sal_uInt16 _nWhich) : SfxPoolItem(_nWhich) , aColor(COL_TRANSPARENT) +, aFilterColor(COL_TRANSPARENT) , nShadingValue(ShadingPattern::CLEAR) , nGraphicTransparency(0) , maStrLink(rLink) @@ -2867,6 +2872,7 @@ SvxBrushItem::SvxBrushItem(const OUString& rLink, const OUString& rFilter, SvxBrushItem::SvxBrushItem(const SvxBrushItem& rItem) : SfxPoolItem(rItem) , aColor(rItem.aColor) +, aFilterColor(rItem.aFilterColor) , nShadingValue(rItem.nShadingValue) , xGraphicObject(rItem.xGraphicObject ? new GraphicObject(*rItem.xGraphicObject) : nullptr) , nGraphicTransparency(rItem.nGraphicTransparency) @@ -2880,6 +2886,7 @@ SvxBrushItem::SvxBrushItem(const SvxBrushItem& rItem) SvxBrushItem::SvxBrushItem(SvxBrushItem&& rItem) : SfxPoolItem(std::move(rItem)) , aColor(std::move(rItem.aColor)) +, aFilterColor(std::move(rItem.aFilterColor)) , nShadingValue(std::move(rItem.nShadingValue)) , xGraphicObject(std::move(rItem.xGraphicObject)) , nGraphicTransparency(std::move(rItem.nGraphicTransparency)) @@ -3134,8 +3141,8 @@ bool SvxBrushItem::operator==( const SfxPoolItem& rAttr ) const assert(SfxPoolItem::operator==(rAttr)); const SvxBrushItem& rCmp = static_cast(rAttr); -bool bEqual = ( aColor == rCmp.aColor && eGraphicPos == rCmp.eGraphicPos && -nGraphicTransparency == rCmp.nGraphicTransparency); +bool bEqual = ( aColor == rCmp.aColor && aFilterColor == rCmp.aFilterColor && +eGraphicPos == rCmp.eGraphicPos && nGraphicTransparency == rCmp.nG
[Libreoffice-commits] core.git: Branch 'libreoffice-7-3' - writerfilter/source
writerfilter/source/dmapper/DomainMapper_Impl.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 83923eb10c198ae86e20bf9eb7def400a8c08268 Author: Caolán McNamara AuthorDate: Mon Jun 27 10:00:13 2022 +0100 Commit: Xisco Fauli CommitDate: Mon Jun 27 15:51:45 2022 +0200 crashtesting: fix assert seen with forum-mso-en-8349.docx a string that ends in spaces Change-Id: I808f046be816d0d4a76f801a349e284024a2061c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136465 Tested-by: Jenkins Reviewed-by: Xisco Fauli diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx b/writerfilter/source/dmapper/DomainMapper_Impl.cxx index 773fecdda521..2aa50c5cab92 100644 --- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx +++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx @@ -4296,7 +4296,7 @@ static OUString lcl_ExtractVariableAndHint( const OUString& rCommand, OUString& sal_Int32 nIndex = rCommand.indexOf( ' ', 2); //find last space after 'ASK' if (nIndex == -1) return OUString(); -while(rCommand[nIndex] == ' ') +while (nIndex < rCommand.getLength() && rCommand[nIndex] == ' ') ++nIndex; OUString sShortCommand( rCommand.copy( nIndex ) ); //cut off the " ASK "
[Libreoffice-commits] core.git: svgio/inc svgio/source
svgio/inc/svgcharacternode.hxx |2 +- svgio/inc/svgdocument.hxx |2 +- svgio/source/svgreader/svgcharacternode.cxx |5 +++-- svgio/source/svgreader/svgdocument.cxx |5 +++-- svgio/source/svguno/xsvgparser.cxx |7 --- 5 files changed, 12 insertions(+), 9 deletions(-) New commits: commit 448ca8c2729b5a0194906e9c9dae95504d5212b9 Author: Noel Grandin AuthorDate: Mon Jun 27 09:48:33 2022 +0200 Commit: Noel Grandin CommitDate: Mon Jun 27 16:06:51 2022 +0200 clang-tidy modernize-pass-by-value in svgio Change-Id: I48283b202a0d5b9560a587daa4ebbf86367875ff Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136453 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/svgio/inc/svgcharacternode.hxx b/svgio/inc/svgcharacternode.hxx index e5c520d69e22..b7a0a9a254c9 100644 --- a/svgio/inc/svgcharacternode.hxx +++ b/svgio/inc/svgcharacternode.hxx @@ -135,7 +135,7 @@ namespace svgio::svgreader SvgCharacterNode( SvgDocument& rDocument, SvgNode* pParent, -const OUString& rText); +OUString aText); virtual ~SvgCharacterNode() override; virtual const SvgStyleAttributes* getSvgStyleAttributes() const override; diff --git a/svgio/inc/svgdocument.hxx b/svgio/inc/svgdocument.hxx index ef7817284bee..9f79342c0c55 100644 --- a/svgio/inc/svgdocument.hxx +++ b/svgio/inc/svgdocument.hxx @@ -46,7 +46,7 @@ namespace svgio::svgreader IdStyleTokenMapper maIdStyleTokenMapperList; public: -explicit SvgDocument(const OUString& rAbsolutePath); +explicit SvgDocument(OUString aAbsolutePath); ~SvgDocument(); SvgDocument(const SvgDocument&) = delete; diff --git a/svgio/source/svgreader/svgcharacternode.cxx b/svgio/source/svgreader/svgcharacternode.cxx index bdd0c4f3471b..3efda44ee4a9 100644 --- a/svgio/source/svgreader/svgcharacternode.cxx +++ b/svgio/source/svgreader/svgcharacternode.cxx @@ -24,6 +24,7 @@ #include #include #include +#include #include using namespace drawinglayer::primitive2d; @@ -183,9 +184,9 @@ namespace svgio::svgreader SvgCharacterNode::SvgCharacterNode( SvgDocument& rDocument, SvgNode* pParent, -const OUString& rText) +OUString aText) : SvgNode(SVGToken::Character, rDocument, pParent), -maText(rText) +maText(std::move(aText)) { } diff --git a/svgio/source/svgreader/svgdocument.cxx b/svgio/source/svgreader/svgdocument.cxx index 2b1d534ffd72..69066c96f8b5 100644 --- a/svgio/source/svgreader/svgdocument.cxx +++ b/svgio/source/svgreader/svgdocument.cxx @@ -18,11 +18,12 @@ */ #include +#include namespace svgio::svgreader { -SvgDocument::SvgDocument(const OUString& rAbsolutePath) -: maAbsolutePath(rAbsolutePath) +SvgDocument::SvgDocument(OUString aAbsolutePath) +: maAbsolutePath(std::move(aAbsolutePath)) { } diff --git a/svgio/source/svguno/xsvgparser.cxx b/svgio/source/svguno/xsvgparser.cxx index 32db2bc773f1..b0acf58d0e87 100644 --- a/svgio/source/svguno/xsvgparser.cxx +++ b/svgio/source/svguno/xsvgparser.cxx @@ -32,6 +32,7 @@ #include #include +#include using namespace ::com::sun::star; @@ -49,7 +50,7 @@ namespace svgio::svgreader uno::Reference const & xSvgDocHdl); public: explicit XSvgParser( -uno::Reference< uno::XComponentContext > const & context); +uno::Reference< uno::XComponentContext > context); XSvgParser(const XSvgParser&) = delete; XSvgParser& operator=(const XSvgParser&) = delete; @@ -71,8 +72,8 @@ namespace svgio::svgreader } XSvgParser::XSvgParser( -uno::Reference< uno::XComponentContext > const & context): -context_(context) +uno::Reference< uno::XComponentContext > context): +context_(std::move(context)) { }
[Libreoffice-commits] core.git: Branch 'libreoffice-7-4' - drawinglayer/source emfio/qa
drawinglayer/source/tools/emfpcustomlinecap.cxx| 26 +- drawinglayer/source/tools/emfpcustomlinecap.hxx|2 drawinglayer/source/tools/emfphelperdata.cxx | 113 +- emfio/qa/cppunit/emf/EmfImportTest.cxx | 26 ++ emfio/qa/cppunit/emf/data/TestEmfPlusDrawPathWithCustomCap.emf |binary 5 files changed, 61 insertions(+), 106 deletions(-) New commits: commit ba806269c998b96842bcf0986095f22ab99a686a Author: Bartosz Kosiorek AuthorDate: Thu Jun 16 02:47:23 2022 +0200 Commit: Xisco Fauli CommitDate: Mon Jun 27 16:40:26 2022 +0200 tdf#142770 tdf#143031 EMF+ Implement CustomLineCap Change-Id: I9fae1d259ecdca37a1babac8a8a0e503b2dc0118 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135960 Tested-by: Jenkins Reviewed-by: Bartosz Kosiorek (cherry picked from commit 5b21b65572610df88986e700b81f1156aff14f65) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136463 Reviewed-by: Xisco Fauli diff --git a/drawinglayer/source/tools/emfpcustomlinecap.cxx b/drawinglayer/source/tools/emfpcustomlinecap.cxx index 49cc912ed33c..e457a36cc2c4 100644 --- a/drawinglayer/source/tools/emfpcustomlinecap.cxx +++ b/drawinglayer/source/tools/emfpcustomlinecap.cxx @@ -21,6 +21,7 @@ #include "emfpcustomlinecap.hxx" #include "emfppath.hxx" #include "emfppen.hxx" +#include using namespace ::com::sun::star; using namespace ::basegfx; @@ -39,6 +40,7 @@ namespace emfplushelper , strokeEndCap(0) , strokeJoin(0) , miterLimit(0.0) +, widthScale(0.0) , mbIsFilled(false) { } @@ -57,6 +59,8 @@ namespace emfplushelper EMFPPath path(pathPoints); path.Read(s, pathFlags); polygon = path.GetPolygon(rR, false); +// rotate polygon by 180 degrees +polygon.transform(basegfx::utils::createRotateB2DHomMatrix(M_PI)); mbIsFilled = bFill; } @@ -71,7 +75,6 @@ namespace emfplushelper { sal_uInt32 customLineCapDataFlags, baseCap; float baseInset; -float widthScale; float fillHotSpotX, fillHotSpotY, strokeHotSpotX, strokeHotSpotY; s.ReadUInt32(customLineCapDataFlags).ReadUInt32(baseCap).ReadFloat(baseInset) @@ -82,11 +85,6 @@ namespace emfplushelper SAL_INFO("drawinglayer.emf", "EMF+\t\tcustomLineCapDataFlags: 0x" << std::hex << customLineCapDataFlags); SAL_INFO("drawinglayer.emf", "EMF+\t\tbaseCap: 0x" << std::hex << baseCap); SAL_INFO("drawinglayer.emf", "EMF+\t\tbaseInset: " << baseInset); -SAL_INFO("drawinglayer.emf", "EMF+\t\tstrokeStartCap: 0x" << std::hex << strokeStartCap); -SAL_INFO("drawinglayer.emf", "EMF+\t\tstrokeEndCap: 0x" << std::hex << strokeEndCap); -SAL_INFO("drawinglayer.emf", "EMF+\t\tstrokeJoin: 0x" << std::hex << strokeJoin); -SAL_INFO("drawinglayer.emf", "EMF+\t\tmiterLimit: " << miterLimit); -SAL_INFO("drawinglayer.emf", "EMF+\t\twidthScale: " << widthScale); if (customLineCapDataFlags & EmfPlusCustomLineCapDataFillPath) { @@ -103,16 +101,20 @@ namespace emfplushelper // TODO only reads the data, does not use them [I've had // no test document to be able to implement it] -sal_Int32 width, height, middleInset, fillState, lineStartCap; -sal_Int32 lineEndCap, lineJoin, widthScale; -float fillHotSpotX, fillHotSpotY, lineHotSpotX, lineHotSpotY; +sal_Int32 fillState; +float width, height, middleInset, unusedHotSpot; - s.ReadInt32(width).ReadInt32(height).ReadInt32(middleInset).ReadInt32(fillState).ReadInt32(lineStartCap) - .ReadInt32(lineEndCap).ReadInt32(lineJoin).ReadFloat(miterLimit).ReadInt32(widthScale) - .ReadFloat(fillHotSpotX).ReadFloat(fillHotSpotY).ReadFloat(lineHotSpotX).ReadFloat(lineHotSpotY); + s.ReadFloat(width).ReadFloat(height).ReadFloat(middleInset).ReadInt32(fillState).ReadUInt32(strokeStartCap) + .ReadUInt32(strokeEndCap).ReadUInt32(strokeJoin).ReadFloat(miterLimit).ReadFloat(widthScale) + .ReadFloat(unusedHotSpot).ReadFloat(unusedHotSpot).ReadFloat(unusedHotSpot).ReadFloat(unusedHotSpot); SAL_INFO("drawinglayer.emf", "EMF+\t\tTODO - actually read EmfPlusCustomLineCapArrowData object (section 2.2.2.12)"); } +SAL_INFO("drawinglayer.emf", "EMF+\t\tstrokeStartCap: 0x" << std::hex << strokeStartCap); +SAL_INFO("drawinglayer.emf", "EMF+\t\tstrokeEndCap: 0x" << std::hex << strokeEndCap); +SAL_INFO("drawinglayer.emf", "EMF+\t\tstrokeJoin: 0x" << std::hex << strokeJoin); +SAL_INFO("drawinglayer.emf", "EMF+\t\tmiterLimit: " << miterLimit); +SAL_INFO("drawinglayer.emf", "EMF+\t\twidthScale: " << widthScale); } } diff --gi
[Libreoffice-commits] core.git: Branch 'libreoffice-7-3' - svx/qa svx/source
svx/qa/unit/table.cxx| 38 +++ svx/source/table/tablecontroller.cxx |7 ++ 2 files changed, 45 insertions(+) New commits: commit 965a4583af233114985c14d49b9c476135bcfa45 Author: Miklos Vajna AuthorDate: Fri Jun 24 10:46:40 2022 +0200 Commit: Xisco Fauli CommitDate: Mon Jun 27 16:47:43 2022 +0200 tdf#148522 svx: fix undo of cell border changes text alignment in other cells The Impress table properties dialog has multiple purposes: normally it only affects the properties of the currently active cell, but shadow is applied on the whole shape. Regression from commit fdeb04f7c59cf8032fe17072ed779e70505cc6ab (tdf#129961 svx: finish UI for table shadow as direct format, 2020-12-15), we started to apply properties to the current cell, and then to the whole shape as well, unconditionally. This affects undo/redo, as there is a separate undo manager while the text edit of a table cell is active and when the text edit is ended. Fix the problem by only applying properties on the shape when there we actually have some properties: this way the text edit is typically not ended, bringing back the old undo/redo behavior. Note that we still need to end the text edit if the user explicitly sets some shadow properties, that part is unchanged with this commit. Change-Id: I78e28bd326a2c12c3775b33957adca4cd95ac582 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136357 Reviewed-by: Miklos Vajna Tested-by: Jenkins (cherry picked from commit 3edfbc19950610bb2061d29cb58b3811b1a0b1a5) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136460 Reviewed-by: Xisco Fauli (cherry picked from commit 750568d77812202c9c01fa87945b507a358c6db5) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136468 diff --git a/svx/qa/unit/table.cxx b/svx/qa/unit/table.cxx index c82f331f2d17..c68abe18beea 100644 --- a/svx/qa/unit/table.cxx +++ b/svx/qa/unit/table.cxx @@ -24,6 +24,11 @@ #include #include #include +#include +#include +#include +#include +#include using namespace ::com::sun::star; @@ -99,6 +104,39 @@ CPPUNIT_TEST_FIXTURE(Test, testTableShadowBlur) // itself and the transparency of the cell fill. assertXPath(pDocument, "//objectinfo/unifiedtransparence[1]", "transparence", "80"); } + +CPPUNIT_TEST_FIXTURE(Test, testSvxTableControllerSetAttrToSelectedShape) +{ +// Given a document with a table shape, editing cell text: +getComponent() = loadFromDesktop("private:factory/simpress", + "com.sun.star.presentation.PresentationDocument"); +uno::Sequence aArgs += { comphelper::makePropertyValue("Rows", sal_Int32(2)), +comphelper::makePropertyValue("Columns", sal_Int32(2)) }; +dispatchCommand(mxComponent, ".uno:InsertTable", aArgs); +uno::Reference xDrawPagesSupplier(getComponent(), uno::UNO_QUERY); +uno::Reference xDrawPage(xDrawPagesSupplier->getDrawPages()->getByIndex(0), + uno::UNO_QUERY); +auto pDrawPage = dynamic_cast(xDrawPage.get()); +CPPUNIT_ASSERT(pDrawPage); +SdrPage* pSdrPage = pDrawPage->GetSdrPage(); +auto pSdrObject += dynamic_cast(pSdrPage->GetObj(pSdrPage->GetObjCount() - 1)); +SfxViewShell* pViewShell = SfxViewShell::Current(); +SdrView* pSdrView = pViewShell->GetDrawView(); +pSdrView->SdrBeginTextEdit(pSdrObject); +CPPUNIT_ASSERT(pSdrView->IsTextEdit()); +const EditTextObject& rEdit = pSdrObject->getText(0)->GetOutlinerParaObject()->GetTextObject(); +SfxItemSet aSet(rEdit.GetParaAttribs(0)); +auto pTableController += dynamic_cast(pSdrView->getSelectionController().get()); + +// When applying attributes which only affect the cell text, not the table shape: +pTableController->SetAttrToSelectedShape(aSet); + +// Then make sure the text edit is not ended: +CPPUNIT_ASSERT(pSdrView->IsTextEdit()); +} } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/table/tablecontroller.cxx b/svx/source/table/tablecontroller.cxx index d11b22988148..42712b09296f 100644 --- a/svx/source/table/tablecontroller.cxx +++ b/svx/source/table/tablecontroller.cxx @@ -2752,6 +2752,13 @@ void SvxTableController::SetAttrToSelectedShape(const SfxItemSet& rAttr) SfxItemSetFixed aSet(*rAttr.GetPool()); aSet.Put(rAttr); +if (!aSet.Count()) +{ +// If there are no items to be applied on the shape, then don't set anything, it would +// terminate text edit without a good reason, which affects undo/redo. +return; +} + // Set shadow items on the marked shape. mrView.SetAttrToMarked(aSet, /*bReplaceAll=*/false); }
[Libreoffice-commits] core.git: external/libnumbertext
external/libnumbertext/UnpackedTarball_libnumbertext.mk |3 +++ 1 file changed, 3 insertions(+) New commits: commit 4195b594b91f948a15de58e9426972f6b8c634c9 Author: Caolán McNamara AuthorDate: Mon Jun 27 14:28:58 2022 +0100 Commit: Caolán McNamara CommitDate: Mon Jun 27 16:58:09 2022 +0200 Mark external/libnumbertext/EmptyString.patch1 as upstreamed Change-Id: I8d926046c11f38daf3a8d7fb4d4176b78a995af3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136497 Tested-by: Jenkins Reviewed-by: Caolán McNamara diff --git a/external/libnumbertext/UnpackedTarball_libnumbertext.mk b/external/libnumbertext/UnpackedTarball_libnumbertext.mk index fb88366d5aef..3a7a7ff6d85a 100644 --- a/external/libnumbertext/UnpackedTarball_libnumbertext.mk +++ b/external/libnumbertext/UnpackedTarball_libnumbertext.mk @@ -15,6 +15,9 @@ $(eval $(call gb_UnpackedTarball_update_autoconf_configs,libnumbertext)) $(eval $(call gb_UnpackedTarball_set_patchlevel,libnumbertext,1)) +# EmptyString.patch1 submitted as +# https://github.com/Numbertext/libnumbertext/pull/95 + $(eval $(call gb_UnpackedTarball_add_patches,libnumbertext, \ external/libnumbertext/MSVCNonBMPBug.patch1 \ external/libnumbertext/WinUnicodePath.patch1 \
[Libreoffice-commits] core.git: Branch 'libreoffice-7-4' - sw/source
sw/source/ui/misc/pggrid.cxx | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-) New commits: commit 29713fea57bb5f0a412ee272faf1536b3c8fabdd Author: Caolán McNamara AuthorDate: Mon Jun 27 14:28:58 2022 +0100 Commit: Caolán McNamara CommitDate: Mon Jun 27 17:09:34 2022 +0200 sw: avoid divide by zero in SwTextGridPage::CharorLineChangedHdl See https://crashreport.libreoffice.org/stats/signature/SwTextGridPage::CharorLineChangedHdl(weld::SpinButton%20&) disable the offending widget if the value is zero. crash reproducible under gen with CJK features enabled by: format, page style, text grid, grid (lines and characters), max base text size of 1000 and then click in "characters per line" and then click in "lines per page". Change-Id: Ic0f8131955ab01412dd54bdd5d3bffe518938fb5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136469 Tested-by: Jenkins Reviewed-by: Caolán McNamara diff --git a/sw/source/ui/misc/pggrid.cxx b/sw/source/ui/misc/pggrid.cxx index 6b54d3821bd6..7f9b10cd447a 100644 --- a/sw/source/ui/misc/pggrid.cxx +++ b/sw/source/ui/misc/pggrid.cxx @@ -316,10 +316,13 @@ void SwTextGridPage::UpdatePageSize(const SfxItemSet& rSet) { sal_Int32 nCharsPerLine = m_aPageSize.Width() / nTextSize; m_xCharsPerLineNF->set_max(nCharsPerLine); +m_xCharsPerLineNF->set_sensitive(nCharsPerLine != 0); m_xCharsPerLineNF->set_value(nCharsPerLine); -m_xLinesPerPageNF->set_max(m_aPageSize.Height() / +sal_Int32 nMaxLines = m_aPageSize.Height() / ( m_xTextSizeMF->denormalize(m_xTextSizeMF->get_value(FieldUnit::TWIP)) + - m_xRubySizeMF->denormalize(m_xRubySizeMF->get_value(FieldUnit::TWIP; + m_xRubySizeMF->denormalize(m_xRubySizeMF->get_value(FieldUnit::TWIP))); +m_xLinesPerPageNF->set_max(nMaxLines); +m_xLinesPerPageNF->set_sensitive(nMaxLines != 0); SetLinesOrCharsRanges( *m_xCharsRangeFT , m_xCharsPerLineNF->get_max() ); SetLinesOrCharsRanges( *m_xLinesRangeFT , m_xLinesPerPageNF->get_max() ); } @@ -369,6 +372,7 @@ IMPL_LINK(SwTextGridPage, CharorLineChangedHdl, weld::SpinButton&, rField, void) ( m_xTextSizeMF->denormalize(m_xTextSizeMF->get_value(FieldUnit::TWIP)) + m_xRubySizeMF->denormalize(m_xRubySizeMF->get_value(FieldUnit::TWIP; m_xLinesPerPageNF->set_max(nMaxLines); +m_xLinesPerPageNF->set_sensitive(nMaxLines != 0); } SetLinesOrCharsRanges( *m_xLinesRangeFT , m_xLinesPerPageNF->get_max() ); SetLinesOrCharsRanges( *m_xCharsRangeFT , m_xCharsPerLineNF->get_max() ); @@ -415,6 +419,7 @@ IMPL_LINK(SwTextGridPage, TextSizeChangedHdl, weld::MetricSpinButton&, rField, v sal_Int32 nMaxChars = m_aPageSize.Width() / nTextSize; m_xCharsPerLineNF->set_value(nMaxChars); m_xCharsPerLineNF->set_max(nMaxChars); +m_xCharsPerLineNF->set_sensitive(nMaxChars != 0); SetLinesOrCharsRanges( *m_xCharsRangeFT , m_xCharsPerLineNF->get_max() ); } } @@ -424,6 +429,7 @@ IMPL_LINK(SwTextGridPage, TextSizeChangedHdl, weld::MetricSpinButton&, rField, v ( m_xTextSizeMF->denormalize(m_xTextSizeMF->get_value(FieldUnit::TWIP)) + m_xRubySizeMF->denormalize(m_xRubySizeMF->get_value(FieldUnit::TWIP; m_xLinesPerPageNF->set_max(nMaxLines); +m_xLinesPerPageNF->set_sensitive(nMaxLines != 0); SetLinesOrCharsRanges( *m_xLinesRangeFT , m_xLinesPerPageNF->get_max() ); } }
[Libreoffice-commits] core.git: Branch 'libreoffice-7-3' - svtools/source
svtools/source/control/ctrlbox.cxx |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) New commits: commit 2368f4de682edfff5092b5a4bf68d947706ef1e7 Author: Xisco Fauli AuthorDate: Tue Jun 21 16:58:24 2022 +0200 Commit: Caolán McNamara CommitDate: Mon Jun 27 17:16:33 2022 +0200 svtools: avoid divide by zero in calcCustomItemSize See https://crashreport.libreoffice.org/stats/signature/%60anonymous%20namespace'::calcCustomItemSize Change-Id: I5f1b19b7679c73cf29952629469e5151395b2b12 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136254 Reviewed-by: Caolán McNamara Tested-by: Jenkins Reviewed-by: Xisco Fauli (cherry picked from commit ec03eef9b431048ea21a733c39c79b792b0f653c) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136393 Signed-off-by: Xisco Fauli Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136451 diff --git a/svtools/source/control/ctrlbox.cxx b/svtools/source/control/ctrlbox.cxx index 0b1c67e31980..393eea9e80fd 100644 --- a/svtools/source/control/ctrlbox.cxx +++ b/svtools/source/control/ctrlbox.cxx @@ -343,7 +343,8 @@ namespace gUserItemSz.setHeight(gUserItemSz.Height() / 10); size_t nMaxDeviceHeight = SAL_MAX_INT16 / 2; // see limitXCreatePixmap -gPreviewsPerDevice = nMaxDeviceHeight / gUserItemSz.Height(); +assert(gUserItemSz.Height() != 0); +gPreviewsPerDevice = gUserItemSz.Height() == 0 ? 16 : nMaxDeviceHeight / gUserItemSz.Height(); } }
[Libreoffice-commits] core.git: svx/source
svx/source/sidebar/shapes/DefaultShapesPanel.cxx |2 ++ 1 file changed, 2 insertions(+) New commits: commit 2e9ee1e4828818266d528d349b090cc1675e5a28 Author: xuenhua AuthorDate: Thu Jun 23 23:12:58 2022 +0800 Commit: Caolán McNamara CommitDate: Mon Jun 27 17:17:17 2022 +0200 tdf#149690 fix shapespanel bar width of impress Change-Id: I18afc90943e38bc79f0515d60f06f81b0eb5dd28 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136344 Tested-by: Jenkins Reviewed-by: Caolán McNamara diff --git a/svx/source/sidebar/shapes/DefaultShapesPanel.cxx b/svx/source/sidebar/shapes/DefaultShapesPanel.cxx index 3ef33e52664d..2dc8092a54c8 100644 --- a/svx/source/sidebar/shapes/DefaultShapesPanel.cxx +++ b/svx/source/sidebar/shapes/DefaultShapesPanel.cxx @@ -53,6 +53,8 @@ DefaultShapesPanel::DefaultShapesPanel ( , mxFrame(rxFrame) { Initialize(); +pParent->set_size_request(pParent->get_approximate_digit_width() * 20, -1); +m_xContainer->set_size_request(m_xContainer->get_approximate_digit_width() * 25, -1); } std::unique_ptr DefaultShapesPanel::Create(
[Libreoffice-commits] core.git: svx/source
svx/source/sdr/primitive2d/sdrdecompositiontools.cxx | 239 +++ 1 file changed, 93 insertions(+), 146 deletions(-) New commits: commit b72d264aa2dfa4fba5ccd9f50a97dbc7e8d6cf6e Author: Armin Le Grand (allotropia) AuthorDate: Mon Jun 27 12:46:56 2022 +0200 Commit: Armin Le Grand CommitDate: Mon Jun 27 17:22:47 2022 +0200 tdf#149651 Correct the MasterPageBackgroundFill mode Had to massively adapt to what others do in this issue, moving from ViewContact(s) as main data source to FillStyle directly Change-Id: If48666212e2f0afac4fbfab9af4908a5d2b4c047 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136487 Tested-by: Jenkins Reviewed-by: Armin Le Grand diff --git a/svx/source/sdr/primitive2d/sdrdecompositiontools.cxx b/svx/source/sdr/primitive2d/sdrdecompositiontools.cxx index fba547f92cbb..4c7316b53be0 100644 --- a/svx/source/sdr/primitive2d/sdrdecompositiontools.cxx +++ b/svx/source/sdr/primitive2d/sdrdecompositiontools.cxx @@ -55,12 +55,8 @@ #include #include #include -#include -#include -#include -#include -#include -#include +#include +#include using namespace com::sun::star; @@ -133,30 +129,61 @@ basegfx::B2DRange getTextAnchorRange(const attribute::SdrTextAttribute& rText, return aAnchorRange; } -sdr::contact::ViewContact* getMasterPageViewContact( +drawinglayer::attribute::SdrFillAttribute getMasterPageFillAttribute( const geometry::ViewInformation2D& rViewInformation, basegfx::B2DVector& rPageSize) { +drawinglayer::attribute::SdrFillAttribute aRetval; + // get SdrPage const SdrPage* pVisualizedPage(GetSdrPageFromXDrawPage(rViewInformation.getVisualizedPage())); -if(nullptr == pVisualizedPage) -return nullptr; -// do not use in MasterPage mode, so initial SdrPage shall *not* be a -// MasterPage -if(pVisualizedPage->IsMasterPage()) -return nullptr; +if(nullptr != pVisualizedPage) +{ +// copy needed values for further processing +rPageSize.setX(pVisualizedPage->GetWidth()); +rPageSize.setY(pVisualizedPage->GetHeight()); -// we need that SdrPage to have a MasterPage -if(!pVisualizedPage->TRG_HasMasterPage()) -return nullptr; +if(pVisualizedPage->IsMasterPage()) +{ +// the page is a MasterPage, so we are in MasterPage view +// still need #i110846#, see ViewContactOfMasterPage +if(pVisualizedPage->getSdrPageProperties().GetStyleSheet()) +{ +// create page fill attributes with correct properties +aRetval = drawinglayer::primitive2d::createNewSdrFillAttribute( +pVisualizedPage->getSdrPageProperties().GetItemSet()); +} +} +else +{ +// the page is *no* MasterPage, we are in normal Page view, get the MasterPage +if(pVisualizedPage->TRG_HasMasterPage()) +{ +sdr::contact::ViewContact& rVC(pVisualizedPage->TRG_GetMasterPageDescriptorViewContact()); +sdr::contact::ViewContactOfMasterPageDescriptor* pVCOMPD( + dynamic_cast(&rVC)); -// copy needed values for processing -rPageSize.setX(pVisualizedPage->GetWidth()); -rPageSize.setY(pVisualizedPage->GetHeight()); +if(nullptr != pVCOMPD) +{ +// in this case the still needed #i110846# is part of +// getCorrectSdrPageProperties, that's the main reason to re-use +// that call/functionality here +const SdrPageProperties* pCorrectProperties( + pVCOMPD->GetMasterPageDescriptor().getCorrectSdrPageProperties()); + +if(pCorrectProperties) +{ +// create page fill attributes when correct properties were identified +aRetval = drawinglayer::primitive2d::createNewSdrFillAttribute( +pCorrectProperties->GetItemSet()); +} +} +} +} +} -// return it's ViewContact -return &pVisualizedPage->TRG_GetMasterPageDescriptorViewContact(); +return aRetval; } // provide a Primitive2D for the SlideBackgroundFill-mode. It is capable @@ -164,18 +191,15 @@ sdr::contact::ViewContact* getMasterPageViewContact( // needed preparation of the geometry in an isolated and controllable // space and way. // It is currently simple buffered (due to being derived from -// BufferedDecompositionPrimitive2D) and detects if MasterPage changes +// BufferedDecompositionPrimitive2D) and detects if FillStyle changes class SlideBackgroundFillPrimitive2D final : public BufferedDecompositionPrimitive2D { private: /// the basegfx::B2DPolyPolygon geometry basegfx::B2DPolyPolygon maPolyPolygon; -/// the polygon fill col
[Libreoffice-commits] core.git: Branch 'libreoffice-7-4' - sw/source vcl/unx
sw/source/uibase/utlui/content.cxx | 12 vcl/unx/gtk3/gtkinst.cxx |2 -- 2 files changed, 12 insertions(+), 2 deletions(-) New commits: commit 4d1a9a76a1dbef9d177e55d6fc9b294a6dafe33f Author: Jim Raykowski AuthorDate: Wed Jun 22 17:53:10 2022 -0800 Commit: Xisco Fauli CommitDate: Mon Jun 27 17:51:15 2022 +0200 tdf#149279 SwNavigator enhancement to show at least two headings above tracked heading For gtk3, treeview scroll_to_row to a visible collapsed row makes the row expanded. The sal version does not. To make the behavior consistent, the patch removes the call to gtk_tree_view_expand_to_path which causes a visible collapsed row to expand. Change-Id: I29e67535ab23aa1952b4ff97c1b81276794b8036 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136436 Tested-by: Jenkins Reviewed-by: Jim Raykowski (cherry picked from commit 8e8e0aefc998adba749a93cacc4660d859fba675) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136462 Reviewed-by: Xisco Fauli diff --git a/sw/source/uibase/utlui/content.cxx b/sw/source/uibase/utlui/content.cxx index de9275d3d1b9..d23fbe63b849 100644 --- a/sw/source/uibase/utlui/content.cxx +++ b/sw/source/uibase/utlui/content.cxx @@ -3897,6 +3897,18 @@ void SwContentTree::UpdateTracking() // unselect all entries, make pEntry visible, and select m_xTreeView->set_cursor(rEntry); Select(); + +// tdf#149279 show at least two outline entries before the set cursor entry +std::unique_ptr xIter(m_xTreeView->make_iterator(&rEntry)); +for (int i = 0; i < 2; i++) +{ +if (m_xTreeView->get_iter_depth(*xIter) == 0) +break; +m_xTreeView->iter_previous(*xIter); +while (!weld::IsEntryVisible(*m_xTreeView, *xIter)) +m_xTreeView->iter_parent(*xIter); +} +m_xTreeView->scroll_to_row(*xIter); } bRet = true; } diff --git a/vcl/unx/gtk3/gtkinst.cxx b/vcl/unx/gtk3/gtkinst.cxx index a49e32dc8cfa..ceab7160c86b 100644 --- a/vcl/unx/gtk3/gtkinst.cxx +++ b/vcl/unx/gtk3/gtkinst.cxx @@ -14792,7 +14792,6 @@ public: assert(gtk_tree_view_get_model(m_pTreeView) && "don't select when frozen, select after thaw. Note selection doesn't survive a freeze"); disable_notify_events(); GtkTreePath* path = gtk_tree_path_new_from_indices(pos, -1); -gtk_tree_view_expand_to_path(m_pTreeView, path); gtk_tree_view_scroll_to_cell(m_pTreeView, path, nullptr, false, 0, 0); gtk_tree_path_free(path); enable_notify_events(); @@ -15470,7 +15469,6 @@ public: disable_notify_events(); const GtkInstanceTreeIter& rGtkIter = static_cast(rIter); GtkTreePath* path = gtk_tree_model_get_path(m_pTreeModel, const_cast(&rGtkIter.iter)); -gtk_tree_view_expand_to_path(m_pTreeView, path); gtk_tree_view_scroll_to_cell(m_pTreeView, path, nullptr, false, 0, 0); gtk_tree_path_free(path); enable_notify_events();
[Libreoffice-commits] core.git: Branch 'libreoffice-7-4' - 2 commits - shell/source
shell/source/win32/simplemail/senddoc.cxx| 38 +++ shell/source/win32/simplemail/smplmailclient.cxx | 16 +++-- shell/source/win32/simplemail/smplmailclient.hxx |2 - 3 files changed, 40 insertions(+), 16 deletions(-) New commits: commit 530ebcde212dcedfa3435da088fcd33ff120a650 Author: Mike Kaganski AuthorDate: Mon Jun 27 12:02:44 2022 +0300 Commit: Xisco Fauli CommitDate: Mon Jun 27 17:52:32 2022 +0200 tdf#126263: do not try to delete non-temporary files Change-Id: I5df7db7eac6224fce833e6b9d4ea220cade44e4b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136483 Tested-by: Jenkins Reviewed-by: Mike Kaganski Signed-off-by: Xisco Fauli Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136491 diff --git a/shell/source/win32/simplemail/senddoc.cxx b/shell/source/win32/simplemail/senddoc.cxx index 3b57684fe821..e34412cbfae1 100644 --- a/shell/source/win32/simplemail/senddoc.cxx +++ b/shell/source/win32/simplemail/senddoc.cxx @@ -58,8 +58,8 @@ namespace /* private */ std::vector gTo; std::vector gCc; std::vector gBcc; -// Keep temp filepath and displayed name -std::vector> gAttachments; +// Keep temp filepath, displayed name, and "do not delete" flag +std::vector> gAttachments; int gMapiFlags = 0; } @@ -121,11 +121,12 @@ static void initAttachmentList(MapiAttachmentList_t* pMapiAttachmentList) { OSL_ASSERT(pMapiAttachmentList->empty()); -for (const auto& attachment : gAttachments) +for (const auto& [filepath, attachname, nodelete] : gAttachments) { +(void)nodelete; MapiFileDescW mfd; ZeroMemory(&mfd, sizeof(mfd)); -mfd.lpszPathName = const_cast(attachment.first.c_str()); +mfd.lpszPathName = const_cast(filepath.c_str()); // MapiFileDesc documentation (https://msdn.microsoft.com/en-us/library/hh707272) // allows using here either nullptr, or a pointer to empty string. However, // for Outlook 2013, we cannot use nullptr here, and must point to a (possibly @@ -134,7 +135,7 @@ static void initAttachmentList(MapiAttachmentList_t* pMapiAttachmentList) // Since C++11, c_str() must return a pointer to single null character when the // string is empty, so we are OK here in case when there's no explicit file name // passed -mfd.lpszFileName = const_cast(attachment.second.c_str()); +mfd.lpszFileName = const_cast(attachname.c_str()); mfd.nPosition = sal::static_int_cast(-1); pMapiAttachmentList->push_back(mfd); } @@ -239,7 +240,14 @@ static void initParameter(int argc, wchar_t* argv[]) sName = argv[i+3]; i += 2; } -gAttachments.emplace_back(sPath, sName); +// Also there may be --nodelete to keep the attachment on exit +bool nodelete = false; +if ((i + 2) < argc && _wcsicmp(argv[i+2], L"--nodelete") == 0) +{ +nodelete = true; +++i; +} +gAttachments.emplace_back(sPath, sName, nodelete); } else if (_wcsicmp(argv[i], L"--langtag") == 0) gLangTag = o3tl::toU(argv[i+1]); @@ -401,8 +409,12 @@ int wmain(int argc, wchar_t* argv[]) } // Now cleanup the temporary attachment files -for (const auto& rAttachment : gAttachments) -DeleteFileW(rAttachment.first.c_str()); +for (const auto& [filepath, attachname, nodelete] : gAttachments) +{ +(void)attachname; +if (!nodelete) +DeleteFileW(filepath.c_str()); +} // Only show the error message if UI was requested if ((ulRet != SUCCESS_SUCCESS) && (gMapiFlags & (MAPI_DIALOG | MAPI_LOGON_UI))) @@ -434,11 +446,13 @@ int wmain(int argc, wchar_t* argv[]) for (const auto& address : gBcc) oss << "--bcc " << address << std::endl; -for (const auto& attachment : gAttachments) +for (const auto& [filepath, attachname, nodelete] : gAttachments) { -oss << "--attach " << attachment.first << std::endl; -if (!attachment.second.empty()) -oss << "--attach-name " << attachment.second << std::endl; +oss << "--attach " << filepath << std::endl; +if (!attachname.empty()) +oss << "--attach-name " << attachname << std::endl; +if (nodelete) +oss << "--nodelete" << std::endl; } if (gMapiFlags & MAPI_DIALOG) diff --git a/shell/source/win32/simplemail/smplmailclient.cxx b/shell/source/win32/simplemail/smplmailclient.cxx index 4b19880d6cc2..075eaa34579d 100644 --- a/shell/source/win32/simplemail/smplmailclient.cxx +++ b/shell/source/win32/simplemail/smplmailclient.cxx @@ -180,7 +180,8 @@ const OUString& GetBaseTempDirURL() } } -O
[Libreoffice-commits] core.git: vcl/source
vcl/source/filter/itiff/itiff.cxx | 20 ++-- 1 file changed, 10 insertions(+), 10 deletions(-) New commits: commit 041eef2563198c50470236736fa6949e0b66cda5 Author: Caolán McNamara AuthorDate: Mon Jun 27 15:42:56 2022 +0100 Commit: Caolán McNamara CommitDate: Mon Jun 27 17:56:43 2022 +0200 ofz#48407 OOM Change-Id: I4e0ee34cffd17203b88602caecbd547fa5b58d80 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136501 Tested-by: Jenkins Reviewed-by: Caolán McNamara diff --git a/vcl/source/filter/itiff/itiff.cxx b/vcl/source/filter/itiff/itiff.cxx index d8895b8cff31..c607930e6007 100644 --- a/vcl/source/filter/itiff/itiff.cxx +++ b/vcl/source/filter/itiff/itiff.cxx @@ -147,16 +147,6 @@ bool ImportTiffGraphicImport(SvStream& rTIFF, Graphic& rGraphic) break; } -if (utl::ConfigManager::IsFuzzing()) -{ -const uint64_t MAX_SIZE = 5; -if (TIFFTileSize64(tif) > MAX_SIZE) -{ -SAL_WARN("filter.tiff", "skipping large tiffs"); -break; -} -} - uint32_t nPixelsRequired; constexpr size_t nMaxPixelsAllowed = SAL_MAX_INT32/4; // two buffers currently required, so limit further @@ -167,6 +157,16 @@ bool ImportTiffGraphicImport(SvStream& rTIFF, Graphic& rGraphic) break; } +if (utl::ConfigManager::IsFuzzing()) +{ +const uint64_t MAX_SIZE = 2; +if (TIFFTileSize64(tif) > MAX_SIZE || nPixelsRequired > MAX_SIZE) +{ +SAL_WARN("filter.tiff", "skipping large tiffs"); +break; +} +} + std::vector raster(nPixelsRequired); if (TIFFReadRGBAImageOriented(tif, w, h, raster.data(), ORIENTATION_TOPLEFT, 1)) {
[Libreoffice-commits] core.git: oox/source
oox/source/ole/vbacontrol.cxx |6 +- 1 file changed, 5 insertions(+), 1 deletion(-) New commits: commit a15fe37bf1dc50fcf88cea9c0038b217119671b8 Author: Noel Grandin AuthorDate: Mon Jun 27 16:30:19 2022 +0200 Commit: Noel Grandin CommitDate: Mon Jun 27 18:23:06 2022 +0200 tdf#149692 crash importing document with vba forms This bug appears to date back to commit a43cc9ec8dde4f311bcf8ff96e6a26d56b2abdcf Author: Noel Power Date: Wed Apr 17 17:08:59 2013 +0100 implement MultiPage, Page & TabStrip import for oox Change-Id: Ia4784e4c34189f05e516704fa2e2485e4560fa4b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136500 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/oox/source/ole/vbacontrol.cxx b/oox/source/ole/vbacontrol.cxx index 88d7f28617ef..9c2a301635d9 100644 --- a/oox/source/ole/vbacontrol.cxx +++ b/oox/source/ole/vbacontrol.cxx @@ -446,13 +446,17 @@ void VbaFormControl::importStorage( StorageBase& rStrg, const AxClassTable& rCla if ( xPageSiteRef ) idToPage[ xPageSiteRef->getId() ] = control; } -else +else if (elem->getControlType() == API_CONTROL_TABSTRIP) { AxTabStripModel* pTabStrip = static_cast(elem.get()); sCaptions = pTabStrip->maItems; pMultiPage->mnActiveTab = pTabStrip->mnListIndex; pMultiPage->mnTabStyle = pTabStrip->mnTabStyle; } +else +{ +SAL_WARN("oox", "unexpected control type " << elem->getControlType()); +} } // apply caption/titles to pages
[Libreoffice-commits] core.git: 2 commits - sc/inc sc/source svtools/source
sc/inc/cellvalue.hxx |2 ++ sc/source/core/data/cellvalue.cxx | 19 --- svtools/source/svrtf/parrtf.cxx |2 +- 3 files changed, 15 insertions(+), 8 deletions(-) New commits: commit 1ea097688f27ce1cfbceb2637437b0d60e61bc40 Author: Caolán McNamara AuthorDate: Mon Jun 27 16:02:15 2022 +0100 Commit: Caolán McNamara CommitDate: Mon Jun 27 18:46:23 2022 +0200 ofz#24932 Infinite loop Change-Id: I05770f0209aaee1b9af6b88f85764ec98e7fa5a5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136504 Tested-by: Jenkins Reviewed-by: Caolán McNamara diff --git a/svtools/source/svrtf/parrtf.cxx b/svtools/source/svrtf/parrtf.cxx index c6dcef7a0b69..24272800f49c 100644 --- a/svtools/source/svrtf/parrtf.cxx +++ b/svtools/source/svrtf/parrtf.cxx @@ -168,7 +168,7 @@ int SvRTFParser::GetNextToken_() { nNextToken = GetNextToken_(); } -while (nNextToken != '{' && nNextToken != sal_Unicode(EOF)); +while (nNextToken != '{' && nNextToken != sal_Unicode(EOF) && IsParserWorking()); SkipGroup(); GetNextToken_(); // overread the last bracket commit e7b3c961e95fdf51557702f2e74db796a6bd2c09 Author: Caolán McNamara AuthorDate: Mon Jun 27 15:57:02 2022 +0100 Commit: Caolán McNamara CommitDate: Mon Jun 27 18:46:04 2022 +0200 cid#1506511 silence Uncaught exception and cid#1506512 Uncaught exception cid#1506513 Uncaught exception Change-Id: I964430a69ce4d4beb7f7a551d3ac454c8122a3fa Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136503 Tested-by: Jenkins Reviewed-by: Caolán McNamara diff --git a/sc/inc/cellvalue.hxx b/sc/inc/cellvalue.hxx index 75e144c77252..6db9dee493cf 100644 --- a/sc/inc/cellvalue.hxx +++ b/sc/inc/cellvalue.hxx @@ -33,6 +33,8 @@ struct SC_DLLPUBLIC ScCellValue private: /// std::monostate is there to indicate CellType::NONE std::variant maData; + +void reset_to_empty(); public: ScCellValue(); diff --git a/sc/source/core/data/cellvalue.cxx b/sc/source/core/data/cellvalue.cxx index 44fde8c7ed03..4330ea972992 100644 --- a/sc/source/core/data/cellvalue.cxx +++ b/sc/source/core/data/cellvalue.cxx @@ -277,10 +277,15 @@ ScCellValue::ScCellValue( const ScCellValue& r ) } } +void ScCellValue::reset_to_empty() +{ +suppress_fun_call_w_exception(maData = std::monostate()); // reset to empty; +} + ScCellValue::ScCellValue(ScCellValue&& r) noexcept : maData(std::move(r.maData)) { -r.maData = std::monostate(); // reset to empty; +r.reset_to_empty(); } ScCellValue::~ScCellValue() @@ -308,17 +313,17 @@ void ScCellValue::clear() noexcept switch (getType()) { case CELLTYPE_EDIT: -delete getEditText(); +suppress_fun_call_w_exception(delete getEditText()); break; case CELLTYPE_FORMULA: -delete getFormula(); +suppress_fun_call_w_exception(delete getFormula()); break; default: ; } // Reset to empty value. -maData = std::monostate(); +reset_to_empty(); } void ScCellValue::set( double fValue ) @@ -475,7 +480,7 @@ void ScCellValue::release( ScDocument& rDoc, const ScAddress& rPos ) rDoc.SetEmptyCell(rPos); } -maData = std::monostate(); // reset to empty +reset_to_empty(); // reset to empty } void ScCellValue::release( ScColumn& rColumn, SCROW nRow, sc::StartListeningType eListenType ) @@ -503,7 +508,7 @@ void ScCellValue::release( ScColumn& rColumn, SCROW nRow, sc::StartListeningType rColumn.DeleteContent(nRow); } -maData = std::monostate(); // reset to empty +reset_to_empty(); // reset to empty } OUString ScCellValue::getString( const ScDocument& rDoc ) const @@ -532,7 +537,7 @@ ScCellValue& ScCellValue::operator=(ScCellValue&& rCell) noexcept { clear(); maData = std::move(rCell.maData); -rCell.maData = std::monostate(); // reset to empty; +rCell.reset_to_empty(); // reset to empty; return *this; }
[Libreoffice-commits] core.git: sw/source
sw/source/ui/misc/pggrid.cxx | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-) New commits: commit 6665db99973bd41d07c99a4aaf81f6d145ee4d24 Author: Caolán McNamara AuthorDate: Mon Jun 27 14:28:58 2022 +0100 Commit: Caolán McNamara CommitDate: Mon Jun 27 18:56:08 2022 +0200 sw: avoid divide by zero in SwTextGridPage::CharorLineChangedHdl See https://crashreport.libreoffice.org/stats/signature/SwTextGridPage::CharorLineChangedHdl(weld::SpinButton%20&) disable the offending widget if the value is zero. crash reproducible under gen with CJK features enabled by: format, page style, text grid, grid (lines and characters), max base text size of 1000 and then click in "characters per line" and then click in "lines per page". Change-Id: Ic0f8131955ab01412dd54bdd5d3bffe518938fb5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136489 Tested-by: Jenkins Reviewed-by: Caolán McNamara diff --git a/sw/source/ui/misc/pggrid.cxx b/sw/source/ui/misc/pggrid.cxx index 6b54d3821bd6..7f9b10cd447a 100644 --- a/sw/source/ui/misc/pggrid.cxx +++ b/sw/source/ui/misc/pggrid.cxx @@ -316,10 +316,13 @@ void SwTextGridPage::UpdatePageSize(const SfxItemSet& rSet) { sal_Int32 nCharsPerLine = m_aPageSize.Width() / nTextSize; m_xCharsPerLineNF->set_max(nCharsPerLine); +m_xCharsPerLineNF->set_sensitive(nCharsPerLine != 0); m_xCharsPerLineNF->set_value(nCharsPerLine); -m_xLinesPerPageNF->set_max(m_aPageSize.Height() / +sal_Int32 nMaxLines = m_aPageSize.Height() / ( m_xTextSizeMF->denormalize(m_xTextSizeMF->get_value(FieldUnit::TWIP)) + - m_xRubySizeMF->denormalize(m_xRubySizeMF->get_value(FieldUnit::TWIP; + m_xRubySizeMF->denormalize(m_xRubySizeMF->get_value(FieldUnit::TWIP))); +m_xLinesPerPageNF->set_max(nMaxLines); +m_xLinesPerPageNF->set_sensitive(nMaxLines != 0); SetLinesOrCharsRanges( *m_xCharsRangeFT , m_xCharsPerLineNF->get_max() ); SetLinesOrCharsRanges( *m_xLinesRangeFT , m_xLinesPerPageNF->get_max() ); } @@ -369,6 +372,7 @@ IMPL_LINK(SwTextGridPage, CharorLineChangedHdl, weld::SpinButton&, rField, void) ( m_xTextSizeMF->denormalize(m_xTextSizeMF->get_value(FieldUnit::TWIP)) + m_xRubySizeMF->denormalize(m_xRubySizeMF->get_value(FieldUnit::TWIP; m_xLinesPerPageNF->set_max(nMaxLines); +m_xLinesPerPageNF->set_sensitive(nMaxLines != 0); } SetLinesOrCharsRanges( *m_xLinesRangeFT , m_xLinesPerPageNF->get_max() ); SetLinesOrCharsRanges( *m_xCharsRangeFT , m_xCharsPerLineNF->get_max() ); @@ -415,6 +419,7 @@ IMPL_LINK(SwTextGridPage, TextSizeChangedHdl, weld::MetricSpinButton&, rField, v sal_Int32 nMaxChars = m_aPageSize.Width() / nTextSize; m_xCharsPerLineNF->set_value(nMaxChars); m_xCharsPerLineNF->set_max(nMaxChars); +m_xCharsPerLineNF->set_sensitive(nMaxChars != 0); SetLinesOrCharsRanges( *m_xCharsRangeFT , m_xCharsPerLineNF->get_max() ); } } @@ -424,6 +429,7 @@ IMPL_LINK(SwTextGridPage, TextSizeChangedHdl, weld::MetricSpinButton&, rField, v ( m_xTextSizeMF->denormalize(m_xTextSizeMF->get_value(FieldUnit::TWIP)) + m_xRubySizeMF->denormalize(m_xRubySizeMF->get_value(FieldUnit::TWIP; m_xLinesPerPageNF->set_max(nMaxLines); +m_xLinesPerPageNF->set_sensitive(nMaxLines != 0); SetLinesOrCharsRanges( *m_xLinesRangeFT , m_xLinesPerPageNF->get_max() ); } }
[Libreoffice-commits] core.git: oox/source sd/qa
oox/source/drawingml/fillproperties.cxx | 12 sd/qa/unit/data/pptx/croppedTo0.pptx|binary sd/qa/unit/import-tests2.cxx|1 + 3 files changed, 9 insertions(+), 4 deletions(-) New commits: commit 2d9f3c066a065d6aa98f1e594dcf8a091fec2bde Author: Mike Kaganski AuthorDate: Mon Jun 27 15:29:25 2022 +0300 Commit: Caolán McNamara CommitDate: Mon Jun 27 18:57:23 2022 +0200 Integer division could cancel small values of wrong sign ... as seen at some documents where the values are like -1. There the checks in pushToPropMap may pass (the division result would be 0), but the original small negative values would fail the asserts that were introduced in commit 5772cef244dbee5834efbc693bc714d89ae6301d Author Mike Kaganski Date Wed Jun 15 18:33:38 2022 +0300 tdf#134210: Reimplement cropping from srcRect and fillRect Change-Id: I114588862b5cfd2b2e4491424430cc139bdbaae9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136492 Tested-by: Jenkins Reviewed-by: Caolán McNamara diff --git a/oox/source/drawingml/fillproperties.cxx b/oox/source/drawingml/fillproperties.cxx index 11f42457bc8d..f7dc16bf231b 100644 --- a/oox/source/drawingml/fillproperties.cxx +++ b/oox/source/drawingml/fillproperties.cxx @@ -97,8 +97,10 @@ Quotients getQuotients(geometry::IntegerRectangle2D aRelRect, double hDiv, doubl // ECMA-376 Part 1 20.1.8.55 srcRect (Source Rectangle) std::optional CropQuotientsFromSrcRect(geometry::IntegerRectangle2D aSrcRect) { -// Currently the following precondition is guaranteed in GraphicProperties::pushToPropMap -assert(aSrcRect.X1 >= 0 && aSrcRect.X2 >= 0 && aSrcRect.Y1 >= 0 && aSrcRect.Y2 >= 0); +aSrcRect.X1 = std::max(aSrcRect.X1, sal_Int32(0)); +aSrcRect.X2 = std::max(aSrcRect.X2, sal_Int32(0)); +aSrcRect.Y1 = std::max(aSrcRect.Y1, sal_Int32(0)); +aSrcRect.Y2 = std::max(aSrcRect.Y2, sal_Int32(0)); if (aSrcRect.X1 + aSrcRect.X2 >= 100'000 || aSrcRect.Y1 + aSrcRect.Y2 >= 100'000) return {}; // Cropped everything return getQuotients(aSrcRect, 100'000.0, 100'000.0); @@ -107,8 +109,10 @@ std::optional CropQuotientsFromSrcRect(geometry::IntegerRectangle2D a // ECMA-376 Part 1 20.1.8.30 fillRect (Fill Rectangle) std::optional CropQuotientsFromFillRect(geometry::IntegerRectangle2D aFillRect) { -// Currently the following precondition is guaranteed in FillProperties::pushToPropMap -assert(aFillRect.X1 <= 0 && aFillRect.X2 <= 0 && aFillRect.Y1 <= 0 && aFillRect.Y2 <= 0); +aFillRect.X1 = std::min(aFillRect.X1, sal_Int32(0)); +aFillRect.X2 = std::min(aFillRect.X2, sal_Int32(0)); +aFillRect.Y1 = std::min(aFillRect.Y1, sal_Int32(0)); +aFillRect.Y2 = std::min(aFillRect.Y2, sal_Int32(0)); // Negative divisor and negative relative offset give positive value wanted in lclCropGraphic return getQuotients(aFillRect, -100'000.0 + aFillRect.X1 + aFillRect.X2, -100'000.0 + aFillRect.Y1 + aFillRect.Y2); diff --git a/sd/qa/unit/data/pptx/croppedTo0.pptx b/sd/qa/unit/data/pptx/croppedTo0.pptx index fecf53559b1f..081661f48601 100644 Binary files a/sd/qa/unit/data/pptx/croppedTo0.pptx and b/sd/qa/unit/data/pptx/croppedTo0.pptx differ diff --git a/sd/qa/unit/import-tests2.cxx b/sd/qa/unit/import-tests2.cxx index 7bf052ca0bdc..33bbcca615b7 100644 --- a/sd/qa/unit/import-tests2.cxx +++ b/sd/qa/unit/import-tests2.cxx @@ -2056,6 +2056,7 @@ void SdImportTest2::testDefaultTabStop() void SdImportTest2::testCropToZero() { // Must not crash because of division by zero +// Also must not fail assertions because of passing negative value to CropQuotientsFromSrcRect loadURL(m_directories.getURLFromSrc(u"/sd/qa/unit/data/pptx/croppedTo0.pptx"), PPTX); }
[Libreoffice-commits] core.git: slideshow/source
slideshow/source/engine/opengl/TransitionerImpl.cxx |6 ++ 1 file changed, 6 insertions(+) New commits: commit 398ceced15ee4fdd24b1f8db5e09096c3afa4804 Author: dldld AuthorDate: Thu May 26 22:50:27 2022 +0200 Commit: Caolán McNamara CommitDate: Mon Jun 27 18:56:33 2022 +0200 tdf#91456 OpenGL context rendered without slide on it When an OpenGL transition is initialized the screen might show for a short time a black screen, because the slide was not directly drawn onto the context and therefore a short black flash was visible on the beginning of the silde transition. This issue did on my side only occur, when the slide was changed by going to a specific slide, moving to the next slide was fine, like shown in the recorded video in the bug tracker. It seems that all events which are going over the EventMultiplexer are not having this flickering issue, as the moments when the drawing is happening are different. Change-Id: If57d9518e74d3a2ede166fd7e55ef5b290274109 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135031 Tested-by: Jenkins Reviewed-by: Caolán McNamara diff --git a/slideshow/source/engine/opengl/TransitionerImpl.cxx b/slideshow/source/engine/opengl/TransitionerImpl.cxx index f3cc33abf3f6..faef77988442 100644 --- a/slideshow/source/engine/opengl/TransitionerImpl.cxx +++ b/slideshow/source/engine/opengl/TransitionerImpl.cxx @@ -444,6 +444,12 @@ bool OGLTransitionerImpl::setTransition( const std::shared_ptr
[Libreoffice-commits] core.git: Branch 'distro/collabora/co-22.05' - 6 commits - configure.ac editeng/source external/libnumbertext include/editeng sc/qa sc/source svtools/source svx/qa svx/source wri
configure.ac|2 editeng/source/items/frmitems.cxx | 12 - external/libnumbertext/EmptyString.patch1 | 13 + external/libnumbertext/UnpackedTarball_libnumbertext.mk |1 include/editeng/brushitem.hxx |5 ++ sc/qa/unit/data/xlsx/tdf148820.xlsx |binary sc/qa/unit/subsequent_export_test2.cxx | 32 + sc/source/filter/inc/stylesbuffer.hxx |2 sc/source/filter/oox/autofilterbuffer.cxx |2 sc/source/filter/oox/stylesbuffer.cxx | 17 +-- svtools/source/control/ctrlbox.cxx |3 - svx/qa/unit/table.cxx | 38 svx/source/table/tablecontroller.cxx|7 ++ writerfilter/source/dmapper/DomainMapper_Impl.cxx |2 14 files changed, 127 insertions(+), 9 deletions(-) New commits: commit 10ffe3bf44effec88c0510222b3a66b513b70139 Author: Andras Timar AuthorDate: Mon Jun 27 19:36:13 2022 +0200 Commit: Andras Timar CommitDate: Mon Jun 27 19:36:13 2022 +0200 Bump version to 22.05.3.1 Change-Id: I9f5884ad4a2cacd5f9266616235803c82f5b1920 diff --git a/configure.ac b/configure.ac index 93319018fa4d..f3375595e235 100644 --- a/configure.ac +++ b/configure.ac @@ -9,7 +9,7 @@ dnl in order to create a configure script. # several non-alphanumeric characters, those are split off and used only for the # ABOUTBOXPRODUCTVERSIONSUFFIX in openoffice.lst. Why that is necessary, no idea. -AC_INIT([Collabora Office],[22.05.2.1],[],[],[https://collaboraoffice.com/]) +AC_INIT([Collabora Office],[22.05.3.1],[],[],[https://collaboraoffice.com/]) dnl libnumbertext needs autoconf 2.68, but that can pick up autoconf268 just fine if it is installed dnl whereas aclocal (as run by autogen.sh) insists on using autoconf and fails hard commit b351612821e782d26713c4ab53382bf628bf1bd1 Author: Xisco Fauli AuthorDate: Tue Jun 21 16:58:24 2022 +0200 Commit: Andras Timar CommitDate: Mon Jun 27 19:26:47 2022 +0200 svtools: avoid divide by zero in calcCustomItemSize See https://crashreport.libreoffice.org/stats/signature/%60anonymous%20namespace'::calcCustomItemSize Change-Id: I5f1b19b7679c73cf29952629469e5151395b2b12 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136254 Reviewed-by: Caolán McNamara Tested-by: Jenkins Reviewed-by: Xisco Fauli (cherry picked from commit ec03eef9b431048ea21a733c39c79b792b0f653c) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136393 Signed-off-by: Xisco Fauli Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136451 diff --git a/svtools/source/control/ctrlbox.cxx b/svtools/source/control/ctrlbox.cxx index 0b1c67e31980..393eea9e80fd 100644 --- a/svtools/source/control/ctrlbox.cxx +++ b/svtools/source/control/ctrlbox.cxx @@ -343,7 +343,8 @@ namespace gUserItemSz.setHeight(gUserItemSz.Height() / 10); size_t nMaxDeviceHeight = SAL_MAX_INT16 / 2; // see limitXCreatePixmap -gPreviewsPerDevice = nMaxDeviceHeight / gUserItemSz.Height(); +assert(gUserItemSz.Height() != 0); +gPreviewsPerDevice = gUserItemSz.Height() == 0 ? 16 : nMaxDeviceHeight / gUserItemSz.Height(); } } commit 8db2090059c79599c71493bc19536558c85d2975 Author: Miklos Vajna AuthorDate: Fri Jun 24 10:46:40 2022 +0200 Commit: Andras Timar CommitDate: Mon Jun 27 19:26:47 2022 +0200 tdf#148522 svx: fix undo of cell border changes text alignment in other cells The Impress table properties dialog has multiple purposes: normally it only affects the properties of the currently active cell, but shadow is applied on the whole shape. Regression from commit fdeb04f7c59cf8032fe17072ed779e70505cc6ab (tdf#129961 svx: finish UI for table shadow as direct format, 2020-12-15), we started to apply properties to the current cell, and then to the whole shape as well, unconditionally. This affects undo/redo, as there is a separate undo manager while the text edit of a table cell is active and when the text edit is ended. Fix the problem by only applying properties on the shape when there we actually have some properties: this way the text edit is typically not ended, bringing back the old undo/redo behavior. Note that we still need to end the text edit if the user explicitly sets some shadow properties, that part is unchanged with this commit. Change-Id: I78e28bd326a2c12c3775b33957adca4cd95ac582 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136357 Reviewed-by: Miklos Vajna Tested-by: Jenkins (cherry picked from commit 3edfbc19950610bb2061d29cb58b3811b1a0b1a5) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136460 Reviewed-by: Xisco Fauli (che
[Libreoffice-commits] dictionaries.git: Changes to 'refs/tags/cp-22.05.3-1'
Tag 'cp-22.05.3-1' created by Andras Timar at 2022-06-27 19:04 + cp-22.05.3-1 Changes since co-22.05-branch-point: Eike Rathke (1): There is no EO country, eo-EO is a bad language tag --- eo/dictionaries.xcu |6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) ---
[Libreoffice-commits] help.git: Changes to 'refs/tags/cp-22.05.3-1'
Tag 'cp-22.05.3-1' created by Andras Timar at 2022-06-27 19:04 + cp-22.05.3-1 Changes since co-22.05-branch-point-8: --- 0 files changed ---
[Libreoffice-commits] translations.git: Changes to 'refs/tags/cp-22.05.3-1'
Tag 'cp-22.05.3-1' created by Andras Timar at 2022-06-27 19:04 + cp-22.05.3-1 Changes since co-22.05.2-1-1: --- 0 files changed ---
[Libreoffice-commits] core.git: Changes to 'refs/tags/cp-22.05.3-1'
Tag 'cp-22.05.3-1' created by Andras Timar at 2022-06-27 19:04 + cp-22.05.3-1 Changes since co-22.05.2-1-167: --- 0 files changed ---
[Libreoffice-commits] core.git: Branch 'distro/lhm/libreoffice-6-4+backports' - RepositoryExternal.mk vcl/qa
RepositoryExternal.mk |1 vcl/qa/cppunit/pdfexport/pdfexport.cxx | 55 + 2 files changed, 56 insertions(+) New commits: commit 735d5f21b3cae332f8ea6d9736d2346566cc737f Author: Balazs Varga AuthorDate: Mon Jun 27 15:50:32 2022 +0200 Commit: Thorsten Behrens CommitDate: Mon Jun 27 21:10:55 2022 +0200 Modify unit test for tdf#148706 Related to commit: 5b58b8a4c3d6473deb91ed8cb1a33f87ba4d5de9 (tdf#148706: map value prop in numericfield to text) Change-Id: I50db94a64dd762f5409197d2bab48021064e1418 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136502 Tested-by: Thorsten Behrens Reviewed-by: Thorsten Behrens diff --git a/RepositoryExternal.mk b/RepositoryExternal.mk index 701fc5498a92..5eb997b3ff7f 100644 --- a/RepositoryExternal.mk +++ b/RepositoryExternal.mk @@ -4169,6 +4169,7 @@ endef ifneq ($(ENABLE_PDFIUM),) define gb_LinkTarget__use_pdfium $(call gb_LinkTarget_set_include,$(1),\ + -I$(call gb_UnpackedTarball_get_dir,pdfium) \ -I$(call gb_UnpackedTarball_get_dir,pdfium)/public \ -DCOMPONENT_BUILD \ $$(INCLUDE) \ diff --git a/vcl/qa/cppunit/pdfexport/pdfexport.cxx b/vcl/qa/cppunit/pdfexport/pdfexport.cxx index 344a74f87521..b75d8eaa2c46 100644 --- a/vcl/qa/cppunit/pdfexport/pdfexport.cxx +++ b/vcl/qa/cppunit/pdfexport/pdfexport.cxx @@ -35,6 +35,7 @@ #include #include #include +#include #include #include @@ -111,6 +112,7 @@ public: void testTdf107013(); void testTdf107018(); void testTdf107089(); +void testTdf148706(); void testTdf99680(); void testTdf99680_2(); void testTdf108963(); @@ -156,6 +158,7 @@ public: CPPUNIT_TEST(testTdf107013); CPPUNIT_TEST(testTdf107018); CPPUNIT_TEST(testTdf107089); +CPPUNIT_TEST(testTdf148706); CPPUNIT_TEST(testTdf99680); CPPUNIT_TEST(testTdf99680_2); CPPUNIT_TEST(testTdf108963); @@ -791,6 +794,58 @@ void PdfExportTest::testTdf107089() CPPUNIT_ASSERT(it != pEnd); } +void PdfExportTest::testTdf148706() +{ +// Import the bugdoc and export as PDF. +OUString aURL = m_directories.getURLFromSrc(DATA_DIRECTORY) + "tdf148706.odt"; +mxComponent = loadFromDesktop(aURL); +CPPUNIT_ASSERT(mxComponent.is()); + +uno::Reference xStorable(mxComponent, uno::UNO_QUERY); +utl::MediaDescriptor aMediaDescriptor; +aMediaDescriptor["FilterName"] <<= OUString("writer_pdf_Export"); +xStorable->storeToURL(maTempFile.GetURL(), aMediaDescriptor.getAsConstPropertyValueList()); + +// Parse the export result with pdfium. +SvFileStream aFile(maTempFile.GetURL(), StreamMode::READ); +SvMemoryStream aMemory; +aMemory.WriteStream(aFile); +ScopedFPDFDocument pPdfDocument( +FPDF_LoadMemDocument(aMemory.GetData(), aMemory.GetSize(), /*password=*/nullptr)); +// The document has one page. +CPPUNIT_ASSERT_EQUAL(1, FPDF_GetPageCount(pPdfDocument.get())); +ScopedFPDFPage pPdfPage(FPDF_LoadPage(pPdfDocument.get(), /*page_index=*/0)); +CPPUNIT_ASSERT(pPdfPage); + +// The page has one annotation. +CPPUNIT_ASSERT_EQUAL(1, FPDFPage_GetAnnotCount(pPdfPage.get())); +ScopedFPDFAnnotation pAnnot(FPDFPage_GetAnnot(pPdfPage.get(), 0)); + + Without the fix in place, this test would have failed with + - Expected: 1821.84 + - Actual : +CPPUNIT_ASSERT(FPDFAnnot_HasKey(pAnnot.get(), "V")); +CPPUNIT_ASSERT_EQUAL(FPDF_OBJECT_STRING, FPDFAnnot_GetValueType(pAnnot.get(), "V")); + +size_t nDALength = FPDFAnnot_GetStringValue(pAnnot.get(), "V", nullptr, 0); +CPPUNIT_ASSERT_EQUAL(std::size_t(0), nDALength % 2); +std::vector aDABuf(nDALength / 2); +FPDFAnnot_GetStringValue( +pAnnot.get(), "V", reinterpret_cast(aDABuf.data()), nDALength); + +OUString aDA(reinterpret_cast(aDABuf.data())); +CPPUNIT_ASSERT_EQUAL(OUString("1821.84"), aDA); + +CPPUNIT_ASSERT(FPDFAnnot_HasKey(pAnnot.get(), "DV")); +CPPUNIT_ASSERT_EQUAL(FPDF_OBJECT_STRING, FPDFAnnot_GetValueType(pAnnot.get(), "DV")); + +FPDFAnnot_GetStringValue( +pAnnot.get(), "DV", reinterpret_cast(aDABuf.data()), nDALength); + +aDA = reinterpret_cast(aDABuf.data()); +CPPUNIT_ASSERT_EQUAL(OUString("1821.84"), aDA); +} + void PdfExportTest::testTdf99680() { vcl::filter::PDFDocument aDocument;
[Libreoffice-commits] core.git: Branch 'libreoffice-7-3' - sw/source
sw/source/ui/misc/pggrid.cxx | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-) New commits: commit cff4a8943cd7bfd5b0e77dbc7e614a61de41276e Author: Caolán McNamara AuthorDate: Mon Jun 27 14:28:58 2022 +0100 Commit: Xisco Fauli CommitDate: Mon Jun 27 21:40:26 2022 +0200 sw: avoid divide by zero in SwTextGridPage::CharorLineChangedHdl See https://crashreport.libreoffice.org/stats/signature/SwTextGridPage::CharorLineChangedHdl(weld::SpinButton%20&) disable the offending widget if the value is zero. crash reproducible under gen with CJK features enabled by: format, page style, text grid, grid (lines and characters), max base text size of 1000 and then click in "characters per line" and then click in "lines per page". Change-Id: Ic0f8131955ab01412dd54bdd5d3bffe518938fb5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136470 Tested-by: Jenkins Reviewed-by: Xisco Fauli diff --git a/sw/source/ui/misc/pggrid.cxx b/sw/source/ui/misc/pggrid.cxx index 875bee7ad331..46f78140a927 100644 --- a/sw/source/ui/misc/pggrid.cxx +++ b/sw/source/ui/misc/pggrid.cxx @@ -318,10 +318,13 @@ void SwTextGridPage::UpdatePageSize(const SfxItemSet& rSet) { sal_Int32 nCharsPerLine = m_aPageSize.Width() / nTextSize; m_xCharsPerLineNF->set_max(nCharsPerLine); +m_xCharsPerLineNF->set_sensitive(nCharsPerLine != 0); m_xCharsPerLineNF->set_value(nCharsPerLine); -m_xLinesPerPageNF->set_max(m_aPageSize.Height() / +sal_Int32 nMaxLines = m_aPageSize.Height() / ( m_xTextSizeMF->denormalize(m_xTextSizeMF->get_value(FieldUnit::TWIP)) + - m_xRubySizeMF->denormalize(m_xRubySizeMF->get_value(FieldUnit::TWIP; + m_xRubySizeMF->denormalize(m_xRubySizeMF->get_value(FieldUnit::TWIP))); +m_xLinesPerPageNF->set_max(nMaxLines); +m_xLinesPerPageNF->set_sensitive(nMaxLines != 0); SetLinesOrCharsRanges( *m_xCharsRangeFT , m_xCharsPerLineNF->get_max() ); SetLinesOrCharsRanges( *m_xLinesRangeFT , m_xLinesPerPageNF->get_max() ); } @@ -371,6 +374,7 @@ IMPL_LINK(SwTextGridPage, CharorLineChangedHdl, weld::SpinButton&, rField, void) ( m_xTextSizeMF->denormalize(m_xTextSizeMF->get_value(FieldUnit::TWIP)) + m_xRubySizeMF->denormalize(m_xRubySizeMF->get_value(FieldUnit::TWIP; m_xLinesPerPageNF->set_max(nMaxLines); +m_xLinesPerPageNF->set_sensitive(nMaxLines != 0); } SetLinesOrCharsRanges( *m_xLinesRangeFT , m_xLinesPerPageNF->get_max() ); SetLinesOrCharsRanges( *m_xCharsRangeFT , m_xCharsPerLineNF->get_max() ); @@ -417,6 +421,7 @@ IMPL_LINK(SwTextGridPage, TextSizeChangedHdl, weld::MetricSpinButton&, rField, v sal_Int32 nMaxChars = m_aPageSize.Width() / nTextSize; m_xCharsPerLineNF->set_value(nMaxChars); m_xCharsPerLineNF->set_max(nMaxChars); +m_xCharsPerLineNF->set_sensitive(nMaxChars != 0); SetLinesOrCharsRanges( *m_xCharsRangeFT , m_xCharsPerLineNF->get_max() ); } } @@ -426,6 +431,7 @@ IMPL_LINK(SwTextGridPage, TextSizeChangedHdl, weld::MetricSpinButton&, rField, v ( m_xTextSizeMF->denormalize(m_xTextSizeMF->get_value(FieldUnit::TWIP)) + m_xRubySizeMF->denormalize(m_xRubySizeMF->get_value(FieldUnit::TWIP; m_xLinesPerPageNF->set_max(nMaxLines); +m_xLinesPerPageNF->set_sensitive(nMaxLines != 0); SetLinesOrCharsRanges( *m_xLinesRangeFT , m_xLinesPerPageNF->get_max() ); } }
[Libreoffice-commits] core.git: Branch 'libreoffice-7-3' - sc/inc sc/source
sc/inc/document.hxx |2 +- sc/inc/table.hxx |2 +- sc/source/core/data/document.cxx |4 ++-- sc/source/core/data/table2.cxx | 31 --- sc/source/ui/view/viewdata.cxx | 29 ++--- 5 files changed, 26 insertions(+), 42 deletions(-) New commits: commit f4be84dfd1714c9084ffa772ff62d63d51e6d0de Author: Noel Grandin AuthorDate: Sat Jun 25 15:44:25 2022 +0200 Commit: Xisco Fauli CommitDate: Mon Jun 27 21:40:42 2022 +0200 tdf#149647 LibreOffice Calc cursor not positioned correctly Revert the offending commit commit feec8e3c34e08b621098a17f1011dccd0b4f7f4c reduce iteration in ScViewData::GetScrPos Change-Id: Id1df2bf7f87e6b800b40871c1472ed466b7eb6a0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136442 Tested-by: Jenkins Reviewed-by: Noel Grandin (cherry picked from commit 34c6d02661949fcc9c15bd77d6e837623bbddcdb) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136458 Reviewed-by: Xisco Fauli Signed-off-by: Xisco Fauli Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136488 diff --git a/sc/inc/document.hxx b/sc/inc/document.hxx index 7b1563994bc0..2050eac9595f 100644 --- a/sc/inc/document.hxx +++ b/sc/inc/document.hxx @@ -1912,7 +1912,7 @@ public: * specified height. */ SCROW GetRowForHeight( SCTAB nTab, sal_uLong nHeight ) const; -sal_uLong GetScaledRowHeight( SCROW nStartRow, SCROW nEndRow, SCTAB nTab, double fScale, const sal_uLong* pnMaxHeight = nullptr ) const; +sal_uLong GetScaledRowHeight( SCROW nStartRow, SCROW nEndRow, SCTAB nTab, double fScale ) const; SC_DLLPUBLIC sal_uLong GetColOffset( SCCOL nCol, SCTAB nTab, bool bHiddenAsZero = true ) const; SC_DLLPUBLIC sal_uLong GetRowOffset( SCROW nRow, SCTAB nTab, bool bHiddenAsZero = true ) const; diff --git a/sc/inc/table.hxx b/sc/inc/table.hxx index 27a1fcf67fd8..4026a6b82d01 100644 --- a/sc/inc/table.hxx +++ b/sc/inc/table.hxx @@ -831,7 +831,7 @@ public: sal_uLong GetColWidth( SCCOL nStartCol, SCCOL nEndCol ) const; sal_uInt16 GetRowHeight( SCROW nRow, SCROW* pStartRow, SCROW* pEndRow, bool bHiddenAsZero = true ) const; sal_uLong GetRowHeight( SCROW nStartRow, SCROW nEndRow, bool bHiddenAsZero = true ) const; -sal_uLong GetScaledRowHeight( SCROW nStartRow, SCROW nEndRow, double fScale, const sal_uLong* pnMaxHeight = nullptr ) const; +sal_uLong GetScaledRowHeight( SCROW nStartRow, SCROW nEndRow, double fScale ) const; sal_uLong GetColOffset( SCCOL nCol, bool bHiddenAsZero = true ) const; sal_uLong GetRowOffset( SCROW nRow, bool bHiddenAsZero = true ) const; diff --git a/sc/source/core/data/document.cxx b/sc/source/core/data/document.cxx index dbf6233efa6b..5fe2cfe08d0d 100644 --- a/sc/source/core/data/document.cxx +++ b/sc/source/core/data/document.cxx @@ -4226,7 +4226,7 @@ SCROW ScDocument::GetRowForHeight( SCTAB nTab, sal_uLong nHeight ) const } sal_uLong ScDocument::GetScaledRowHeight( SCROW nStartRow, SCROW nEndRow, -SCTAB nTab, double fScale, const sal_uLong* pnMaxHeight ) const +SCTAB nTab, double fScale ) const { // faster for a single row if (nStartRow == nEndRow) @@ -4237,7 +4237,7 @@ sal_uLong ScDocument::GetScaledRowHeight( SCROW nStartRow, SCROW nEndRow, return 0; if ( ValidTab(nTab) && nTab < static_cast(maTabs.size()) && maTabs[nTab] ) -return maTabs[nTab]->GetScaledRowHeight( nStartRow, nEndRow, fScale, pnMaxHeight ); +return maTabs[nTab]->GetScaledRowHeight( nStartRow, nEndRow, fScale); OSL_FAIL("wrong sheet number"); return 0; diff --git a/sc/source/core/data/table2.cxx b/sc/source/core/data/table2.cxx index 7f3f0d48cee4..b56f07d52a0f 100644 --- a/sc/source/core/data/table2.cxx +++ b/sc/source/core/data/table2.cxx @@ -3456,7 +3456,7 @@ sal_uLong ScTable::GetRowHeight( SCROW nStartRow, SCROW nEndRow, bool bHiddenAsZ return (nEndRow - nStartRow + 1) * static_cast(ScGlobal::nStdRowHeight); } -sal_uLong ScTable::GetScaledRowHeight( SCROW nStartRow, SCROW nEndRow, double fScale, const sal_uLong* pnMaxHeight ) const +sal_uLong ScTable::GetScaledRowHeight( SCROW nStartRow, SCROW nEndRow, double fScale ) const { OSL_ENSURE(ValidRow(nStartRow) && ValidRow(nEndRow),"wrong row number"); @@ -3483,21 +3483,8 @@ sal_uLong ScTable::GetScaledRowHeight( SCROW nStartRow, SCROW nEndRow, double fS SCROW nSegmentEnd = std::min( nLastRow, aSegmentIter.getLastPos() ); // round-down a single height value, multiply resulting (pixel) values -const sal_uLong nOneHeight = static_cast( nRowVal * fScale ); -// sometimes scaling results in zero height -if (nOneHeight) -{
[Libreoffice-commits] core.git: Branch 'libreoffice-7-4' - writerfilter/source
writerfilter/source/dmapper/DomainMapper_Impl.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit dc3428ef8b6e784f7f8785d1574608df928099a7 Author: Caolán McNamara AuthorDate: Mon Jun 27 10:00:13 2022 +0100 Commit: Caolán McNamara CommitDate: Mon Jun 27 21:40:53 2022 +0200 crashtesting: fix assert seen with forum-mso-en-8349.docx a string that ends in spaces Change-Id: I808f046be816d0d4a76f801a349e284024a2061c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136464 Tested-by: Jenkins Reviewed-by: Caolán McNamara diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx b/writerfilter/source/dmapper/DomainMapper_Impl.cxx index af8e2dc5946b..fd1c79f7 100644 --- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx +++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx @@ -4494,7 +4494,7 @@ static OUString lcl_ExtractVariableAndHint( std::u16string_view rCommand, OUStri size_t nIndex = rCommand.find( ' ', 2); //find last space after 'ASK' if (nIndex == std::u16string_view::npos) return OUString(); -while(rCommand[nIndex] == ' ') +while (nIndex < rCommand.size() && rCommand[nIndex] == ' ') ++nIndex; std::u16string_view sShortCommand( rCommand.substr( nIndex ) ); //cut off the " ASK "
[Libreoffice-commits] core.git: sc/source
sc/source/core/data/funcdesc.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit e4a57dcdabc9ae7d381025e008b90635c1b7b10c Author: Olivier Hallot AuthorDate: Mon Jun 27 11:24:34 2022 -0300 Commit: Eike Rathke CommitDate: Mon Jun 27 21:44:39 2022 +0200 tdf#137747 Fix POISSON.DIST required argument Cumulative argument of POISSON.DIST was marked optional and is actually required. Change-Id: Ib3be6fe97f6d2441c6c5d3b9186b04d7b83b7821 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136499 Tested-by: Jenkins Reviewed-by: Eike Rathke diff --git a/sc/source/core/data/funcdesc.cxx b/sc/source/core/data/funcdesc.cxx index 01d8143a16f8..dfbfd9a3a78e 100644 --- a/sc/source/core/data/funcdesc.cxx +++ b/sc/source/core/data/funcdesc.cxx @@ -738,7 +738,7 @@ ScFunctionList::ScFunctionList() { SC_OPCODE_F_TEST_MS, ENTRY(SC_OPCODE_F_TEST_MS_ARY), 0, ID_FUNCTION_GRP_STATISTIC, HID_FUNC_F_TEST_MS, 2, { 0, 0 }, 0 }, { SC_OPCODE_EXP_DIST_MS, ENTRY(SC_OPCODE_EXP_DIST_MS_ARY), 0, ID_FUNCTION_GRP_STATISTIC, HID_FUNC_EXP_DIST_MS, 3, { 0, 0, 0 }, 0 }, { SC_OPCODE_HYP_GEOM_DIST_MS, ENTRY(SC_OPCODE_HYP_GEOM_DIST_MS_ARY), 0, ID_FUNCTION_GRP_STATISTIC, HID_FUNC_HYP_GEOM_DIST_MS, 5, { 0, 0, 0, 0, 0 }, 0 }, -{ SC_OPCODE_POISSON_DIST_MS, ENTRY(SC_OPCODE_POISSON_DIST_MS_ARY), 0, ID_FUNCTION_GRP_STATISTIC, HID_FUNC_POISSON_DIST_MS, 3, { 0, 0, 1 }, 0 }, +{ SC_OPCODE_POISSON_DIST_MS, ENTRY(SC_OPCODE_POISSON_DIST_MS_ARY), 0, ID_FUNCTION_GRP_STATISTIC, HID_FUNC_POISSON_DIST_MS, 3, { 0, 0, 0 }, 0 }, { SC_OPCODE_WEIBULL_MS, ENTRY(SC_OPCODE_WEIBULL_MS_ARY), 0, ID_FUNCTION_GRP_STATISTIC, HID_FUNC_WEIBULL_DIST_MS, 4, { 0, 0, 0, 0 }, 0 }, { SC_OPCODE_GAMMA_DIST_MS, ENTRY(SC_OPCODE_GAMMA_DIST_MS_ARY), 0, ID_FUNCTION_GRP_STATISTIC, HID_FUNC_GAMMADIST_MS, 4, { 0, 0, 0, 0 }, 0 }, { SC_OPCODE_GAMMA_INV_MS, ENTRY(SC_OPCODE_GAMMA_INV_MS_ARY), 0, ID_FUNCTION_GRP_STATISTIC, HID_FUNC_GAMMAINV_MS, 3, { 0, 0, 0 }, 0 },
[Libreoffice-commits] core.git: xmloff/inc
xmloff/inc/xmltabe.hxx |6 +- 1 file changed, 1 insertion(+), 5 deletions(-) New commits: commit 30ef327ff4ad2eb213265596368677db9b4c074a Author: Mahkame Arabgari AuthorDate: Wed Jun 22 19:44:21 2022 +0430 Commit: Hossein CommitDate: Mon Jun 27 23:35:50 2022 +0200 tdf#143148 Use pragma once instead of include guards Change-Id: I20ef1c159e481f0b5ca97ae9c16a0a3b314eafbc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136288 Tested-by: Jenkins Reviewed-by: Hossein diff --git a/xmloff/inc/xmltabe.hxx b/xmloff/inc/xmltabe.hxx index af2873b7656a..ad28e77147e3 100644 --- a/xmloff/inc/xmltabe.hxx +++ b/xmloff/inc/xmltabe.hxx @@ -17,8 +17,7 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#ifndef XMLOFF_INC_XMLTABE_HXX -#define XMLOFF_INC_XMLTABE_HXX +#pragma once // prevent funny things like "#define sun 1" from the compiler #include @@ -45,7 +44,4 @@ public: void Export( const css::uno::Any& rAny ); }; - -#endif // XMLOFF_INC_XMLTABE_HXX - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
[Libreoffice-commits] core.git: Branch 'libreoffice-7-4' - oox/source sd/qa
oox/source/drawingml/fillproperties.cxx | 12 sd/qa/unit/data/pptx/croppedTo0.pptx|binary sd/qa/unit/import-tests2.cxx|1 + 3 files changed, 9 insertions(+), 4 deletions(-) New commits: commit 22f7ec23550d4d7015f5b503fb707b2303f2fc7b Author: Mike Kaganski AuthorDate: Mon Jun 27 15:29:25 2022 +0300 Commit: Xisco Fauli CommitDate: Tue Jun 28 00:27:29 2022 +0200 Integer division could cancel small values of wrong sign ... as seen at some documents where the values are like -1. There the checks in pushToPropMap may pass (the division result would be 0), but the original small negative values would fail the asserts that were introduced in commit 5772cef244dbee5834efbc693bc714d89ae6301d Author Mike Kaganski Date Wed Jun 15 18:33:38 2022 +0300 tdf#134210: Reimplement cropping from srcRect and fillRect Change-Id: I114588862b5cfd2b2e4491424430cc139bdbaae9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136492 Tested-by: Jenkins Reviewed-by: Caolán McNamara (cherry picked from commit 2d9f3c066a065d6aa98f1e594dcf8a091fec2bde) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136471 Reviewed-by: Xisco Fauli diff --git a/oox/source/drawingml/fillproperties.cxx b/oox/source/drawingml/fillproperties.cxx index 2f50d666451c..36f14066a082 100644 --- a/oox/source/drawingml/fillproperties.cxx +++ b/oox/source/drawingml/fillproperties.cxx @@ -97,8 +97,10 @@ Quotients getQuotients(geometry::IntegerRectangle2D aRelRect, double hDiv, doubl // ECMA-376 Part 1 20.1.8.55 srcRect (Source Rectangle) std::optional CropQuotientsFromSrcRect(geometry::IntegerRectangle2D aSrcRect) { -// Currently the following precondition is guaranteed in GraphicProperties::pushToPropMap -assert(aSrcRect.X1 >= 0 && aSrcRect.X2 >= 0 && aSrcRect.Y1 >= 0 && aSrcRect.Y2 >= 0); +aSrcRect.X1 = std::max(aSrcRect.X1, sal_Int32(0)); +aSrcRect.X2 = std::max(aSrcRect.X2, sal_Int32(0)); +aSrcRect.Y1 = std::max(aSrcRect.Y1, sal_Int32(0)); +aSrcRect.Y2 = std::max(aSrcRect.Y2, sal_Int32(0)); if (aSrcRect.X1 + aSrcRect.X2 >= 100'000 || aSrcRect.Y1 + aSrcRect.Y2 >= 100'000) return {}; // Cropped everything return getQuotients(aSrcRect, 100'000.0, 100'000.0); @@ -107,8 +109,10 @@ std::optional CropQuotientsFromSrcRect(geometry::IntegerRectangle2D a // ECMA-376 Part 1 20.1.8.30 fillRect (Fill Rectangle) std::optional CropQuotientsFromFillRect(geometry::IntegerRectangle2D aFillRect) { -// Currently the following precondition is guaranteed in FillProperties::pushToPropMap -assert(aFillRect.X1 <= 0 && aFillRect.X2 <= 0 && aFillRect.Y1 <= 0 && aFillRect.Y2 <= 0); +aFillRect.X1 = std::min(aFillRect.X1, sal_Int32(0)); +aFillRect.X2 = std::min(aFillRect.X2, sal_Int32(0)); +aFillRect.Y1 = std::min(aFillRect.Y1, sal_Int32(0)); +aFillRect.Y2 = std::min(aFillRect.Y2, sal_Int32(0)); // Negative divisor and negative relative offset give positive value wanted in lclCropGraphic return getQuotients(aFillRect, -100'000.0 + aFillRect.X1 + aFillRect.X2, -100'000.0 + aFillRect.Y1 + aFillRect.Y2); diff --git a/sd/qa/unit/data/pptx/croppedTo0.pptx b/sd/qa/unit/data/pptx/croppedTo0.pptx index fecf53559b1f..081661f48601 100644 Binary files a/sd/qa/unit/data/pptx/croppedTo0.pptx and b/sd/qa/unit/data/pptx/croppedTo0.pptx differ diff --git a/sd/qa/unit/import-tests2.cxx b/sd/qa/unit/import-tests2.cxx index 62067a94be28..6c7dfe5a5a64 100644 --- a/sd/qa/unit/import-tests2.cxx +++ b/sd/qa/unit/import-tests2.cxx @@ -2037,6 +2037,7 @@ void SdImportTest2::testDefaultTabStop() void SdImportTest2::testCropToZero() { // Must not crash because of division by zero +// Also must not fail assertions because of passing negative value to CropQuotientsFromSrcRect loadURL(m_directories.getURLFromSrc(u"/sd/qa/unit/data/pptx/croppedTo0.pptx"), PPTX); }
[Libreoffice-commits] core.git: Branch 'libreoffice-7-4' - sc/source
sc/source/core/data/funcdesc.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 6ea86593851c731e2e2b969e458255e4159c80d9 Author: Olivier Hallot AuthorDate: Mon Jun 27 11:24:34 2022 -0300 Commit: Eike Rathke CommitDate: Tue Jun 28 01:10:39 2022 +0200 tdf#137747 Fix POISSON.DIST required argument Cumulative argument of POISSON.DIST was marked optional and is actually required. Change-Id: Ib3be6fe97f6d2441c6c5d3b9186b04d7b83b7821 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136499 Tested-by: Jenkins Reviewed-by: Eike Rathke (cherry picked from commit 2e01d80d272c73c1601428871a85c1863c92084a) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136473 diff --git a/sc/source/core/data/funcdesc.cxx b/sc/source/core/data/funcdesc.cxx index 01d8143a16f8..dfbfd9a3a78e 100644 --- a/sc/source/core/data/funcdesc.cxx +++ b/sc/source/core/data/funcdesc.cxx @@ -738,7 +738,7 @@ ScFunctionList::ScFunctionList() { SC_OPCODE_F_TEST_MS, ENTRY(SC_OPCODE_F_TEST_MS_ARY), 0, ID_FUNCTION_GRP_STATISTIC, HID_FUNC_F_TEST_MS, 2, { 0, 0 }, 0 }, { SC_OPCODE_EXP_DIST_MS, ENTRY(SC_OPCODE_EXP_DIST_MS_ARY), 0, ID_FUNCTION_GRP_STATISTIC, HID_FUNC_EXP_DIST_MS, 3, { 0, 0, 0 }, 0 }, { SC_OPCODE_HYP_GEOM_DIST_MS, ENTRY(SC_OPCODE_HYP_GEOM_DIST_MS_ARY), 0, ID_FUNCTION_GRP_STATISTIC, HID_FUNC_HYP_GEOM_DIST_MS, 5, { 0, 0, 0, 0, 0 }, 0 }, -{ SC_OPCODE_POISSON_DIST_MS, ENTRY(SC_OPCODE_POISSON_DIST_MS_ARY), 0, ID_FUNCTION_GRP_STATISTIC, HID_FUNC_POISSON_DIST_MS, 3, { 0, 0, 1 }, 0 }, +{ SC_OPCODE_POISSON_DIST_MS, ENTRY(SC_OPCODE_POISSON_DIST_MS_ARY), 0, ID_FUNCTION_GRP_STATISTIC, HID_FUNC_POISSON_DIST_MS, 3, { 0, 0, 0 }, 0 }, { SC_OPCODE_WEIBULL_MS, ENTRY(SC_OPCODE_WEIBULL_MS_ARY), 0, ID_FUNCTION_GRP_STATISTIC, HID_FUNC_WEIBULL_DIST_MS, 4, { 0, 0, 0, 0 }, 0 }, { SC_OPCODE_GAMMA_DIST_MS, ENTRY(SC_OPCODE_GAMMA_DIST_MS_ARY), 0, ID_FUNCTION_GRP_STATISTIC, HID_FUNC_GAMMADIST_MS, 4, { 0, 0, 0, 0 }, 0 }, { SC_OPCODE_GAMMA_INV_MS, ENTRY(SC_OPCODE_GAMMA_INV_MS_ARY), 0, ID_FUNCTION_GRP_STATISTIC, HID_FUNC_GAMMAINV_MS, 3, { 0, 0, 0 }, 0 },
[Libreoffice-commits] core.git: svx/source wizards/source
svx/source/sdr/primitive2d/sdrdecompositiontools.cxx |2 +- wizards/source/sfdocuments/SF_Calc.xba |4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) New commits: commit 213db06cbcd6dda8070b3a5f4b198a64f3465bf6 Author: Andrea Gelmini AuthorDate: Tue Jun 28 06:34:25 2022 +0200 Commit: Julien Nabet CommitDate: Tue Jun 28 07:08:40 2022 +0200 Fix typos Change-Id: I05271bd76574c09683740204534ff8a6907fc784 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136522 Tested-by: Julien Nabet Reviewed-by: Julien Nabet diff --git a/svx/source/sdr/primitive2d/sdrdecompositiontools.cxx b/svx/source/sdr/primitive2d/sdrdecompositiontools.cxx index 4c7316b53be0..511f8ee025a2 100644 --- a/svx/source/sdr/primitive2d/sdrdecompositiontools.cxx +++ b/svx/source/sdr/primitive2d/sdrdecompositiontools.cxx @@ -270,7 +270,7 @@ void SlideBackgroundFillPrimitive2D::create2DDecomposition( // create FillPrimitive2D with the geometry (the PolyPolygon) and // the page's definitonRange to: // - on one hand limit to geometry -// - on the other hand allow continutation of fill outside of +// - on the other hand allow continuation of fill outside of // MasterPage's range const attribute::FillGradientAttribute aEmptyFillTransparenceGradient; const Primitive2DReference aCreatedFill( diff --git a/wizards/source/sfdocuments/SF_Calc.xba b/wizards/source/sfdocuments/SF_Calc.xba index 57d3d0fb63cf..fe833f3c838a 100644 --- a/wizards/source/sfdocuments/SF_Calc.xba +++ b/wizards/source/sfdocuments/SF_Calc.xba @@ -4496,7 +4496,7 @@ Private Function _ValidateSheetName(ByRef psSheetName As String _ , ByVal psArgName As String _ ) As Boolean ''' Check the validity of the sheet name: -''' A sheet name- must not be ampty +''' A sheet name- must not be empty ''' - must not contain next characters: []*?:/\ ''' - must not use ' (the apostrophe) as first or last character ''' Args: @@ -4525,4 +4525,4 @@ CatchSheet: End Function ' SFDocuments.SF_Calc._ValidateSheetName REM END OF SFDOCUMENTS.SF_CALC - \ No newline at end of file +
[Libreoffice-commits] core.git: Branch 'feature/chartdatatable' - chart2/inc chart2/Library_chartcontroller.mk chart2/source chart2/uiconfig chart2/UIConfig_chart2.mk
chart2/Library_chartcontroller.mk |2 chart2/UIConfig_chart2.mk |1 chart2/inc/strings.hrc |2 chart2/source/controller/dialogs/ObjectNameProvider.cxx|3 chart2/source/controller/dialogs/dlg_ObjectProperties.cxx |7 chart2/source/controller/dialogs/tp_DataTable.cxx | 113 + chart2/source/controller/dialogs/tp_DataTable.hxx | 43 +++ chart2/source/controller/inc/DataTableItemConverter.hxx| 60 + chart2/source/controller/itemsetwrapper/DataTableItemConverter.cxx | 119 ++ chart2/source/controller/itemsetwrapper/SchWhichPairs.hxx |8 chart2/source/controller/main/ChartController_Properties.cxx | 12 + chart2/source/controller/main/ObjectHierarchy.cxx |8 chart2/source/inc/ObjectIdentifier.hxx |4 chart2/source/inc/chartview/ChartSfxItemIds.hxx|9 chart2/source/tools/ObjectIdentifier.cxx | 23 + chart2/source/view/main/ChartItemPool.cxx |5 chart2/uiconfig/ui/tp_DataTable.ui | 115 + 17 files changed, 533 insertions(+), 1 deletion(-) New commits: commit 720c6dfaed76e350037cca9e437bffcf43cea434 Author: Tomaž Vajngerl AuthorDate: Tue Jun 28 07:48:45 2022 +0200 Commit: Tomaž Vajngerl CommitDate: Tue Jun 28 07:48:45 2022 +0200 chart2: add UI to the data table This adds a new object type "Data Table", with all the object identifiers and converters of properties. The data table is now shown in the drop-down of chart elements. A properties dialog was added, which allows to change properties of a data table. This contains the area, line and font tab pages and a new tab page specific for data tables, to change if the horiz. or vert. borders, key or the outline should be show. Change-Id: I9b4cd58cffbcc952daaa2c0c8f8a5a17e38ac293 diff --git a/chart2/Library_chartcontroller.mk b/chart2/Library_chartcontroller.mk index b7c449cef582..4bc8c7497915 100644 --- a/chart2/Library_chartcontroller.mk +++ b/chart2/Library_chartcontroller.mk @@ -138,6 +138,7 @@ $(eval $(call gb_Library_add_exception_objects,chartcontroller,\ chart2/source/controller/dialogs/tp_DataLabel \ chart2/source/controller/dialogs/tp_DataPointOption \ chart2/source/controller/dialogs/tp_DataSource \ +chart2/source/controller/dialogs/tp_DataTable \ chart2/source/controller/dialogs/tp_ErrorBars \ chart2/source/controller/dialogs/tp_LegendPosition \ chart2/source/controller/dialogs/tp_PointGeometry \ @@ -153,6 +154,7 @@ $(eval $(call gb_Library_add_exception_objects,chartcontroller,\ chart2/source/controller/itemsetwrapper/AxisItemConverter \ chart2/source/controller/itemsetwrapper/CharacterPropertyItemConverter \ chart2/source/controller/itemsetwrapper/DataPointItemConverter \ +chart2/source/controller/itemsetwrapper/DataTableItemConverter \ chart2/source/controller/itemsetwrapper/ErrorBarItemConverter \ chart2/source/controller/itemsetwrapper/GraphicPropertyItemConverter \ chart2/source/controller/itemsetwrapper/ItemConverter \ diff --git a/chart2/UIConfig_chart2.mk b/chart2/UIConfig_chart2.mk index 67d64b18b597..59af510c5845 100644 --- a/chart2/UIConfig_chart2.mk +++ b/chart2/UIConfig_chart2.mk @@ -68,6 +68,7 @@ $(eval $(call gb_UIConfig_add_uifiles,modules/schart,\ chart2/uiconfig/ui/tp_DataLabel \ chart2/uiconfig/ui/tp_DataPointOption \ chart2/uiconfig/ui/tp_DataSource \ + chart2/uiconfig/ui/tp_DataTable \ chart2/uiconfig/ui/tp_ErrorBars \ chart2/uiconfig/ui/tp_LegendPosition \ chart2/uiconfig/ui/tp_PolarOptions \ diff --git a/chart2/inc/strings.hrc b/chart2/inc/strings.hrc index ab6ca48c8376..9a9943df1f3c 100644 --- a/chart2/inc/strings.hrc +++ b/chart2/inc/strings.hrc @@ -48,6 +48,7 @@ #define STR_PAGE_APPEARANCE NC_("STR_PAGE_APPEARANCE", "Appearance") #define STR_PAGE_ILLUMINATION NC_("STR_PAGE_ILLUMINATION", "Illumination") #define STR_PAGE_ASIAN NC_("STR_PAGE_ASIAN", "Asian Typography") +#define STR_PAGE_DATA_TABLE NC_("STR_PAGE_DATA_TABLE", "Data Table") #define STR_OBJECT_AVERAGE_LINE_WITH_PARAMETERS NC_("STR_OBJECT_AVERAGE_LINE_WITH_PARAMETERS", "Mean value line with value %AVERAGE_VALUE and standard deviation %STD_DEVIATION") #define STR_OBJECT_AXIS NC_("STR_OBJECT_AXIS", "Axis") #define STR_OBJECT_AXIS_X NC_("STR_OBJECT_AXIS_X", "X Axis") @@ -97,6 +98,7 @@ #define STR_OBJECT_DIAGRAM_WALL NC_("STR_OBJECT_DIAGRAM_WALL", "Chart Wall") #define STR_
[Libreoffice-commits] core.git: Branch 'feature/chartdatatable' - 292 commits - basctl/source basic/qa basic/source bin/crashreportScraper.py bin/update bridges/source chart2/inc chart2/Library_chartc
Rebased ref, commits from common ancestor: commit 8d8753c38f92d6041fed5e63864822e5b7918291 Author: Tomaž Vajngerl AuthorDate: Tue Jun 28 07:48:45 2022 +0200 Commit: Tomaž Vajngerl CommitDate: Tue Jun 28 08:02:36 2022 +0200 chart2: add UI to the data table This adds a new object type "Data Table", with all the object identifiers and converters of properties. The data table is now shown in the drop-down of chart elements. A properties dialog was added, which allows to change properties of a data table. This contains the area, line and font tab pages and a new tab page specific for data tables, to change if the horiz. or vert. borders, key or the outline should be show. Change-Id: I9b4cd58cffbcc952daaa2c0c8f8a5a17e38ac293 diff --git a/chart2/Library_chartcontroller.mk b/chart2/Library_chartcontroller.mk index b7c449cef582..4bc8c7497915 100644 --- a/chart2/Library_chartcontroller.mk +++ b/chart2/Library_chartcontroller.mk @@ -138,6 +138,7 @@ $(eval $(call gb_Library_add_exception_objects,chartcontroller,\ chart2/source/controller/dialogs/tp_DataLabel \ chart2/source/controller/dialogs/tp_DataPointOption \ chart2/source/controller/dialogs/tp_DataSource \ +chart2/source/controller/dialogs/tp_DataTable \ chart2/source/controller/dialogs/tp_ErrorBars \ chart2/source/controller/dialogs/tp_LegendPosition \ chart2/source/controller/dialogs/tp_PointGeometry \ @@ -153,6 +154,7 @@ $(eval $(call gb_Library_add_exception_objects,chartcontroller,\ chart2/source/controller/itemsetwrapper/AxisItemConverter \ chart2/source/controller/itemsetwrapper/CharacterPropertyItemConverter \ chart2/source/controller/itemsetwrapper/DataPointItemConverter \ +chart2/source/controller/itemsetwrapper/DataTableItemConverter \ chart2/source/controller/itemsetwrapper/ErrorBarItemConverter \ chart2/source/controller/itemsetwrapper/GraphicPropertyItemConverter \ chart2/source/controller/itemsetwrapper/ItemConverter \ diff --git a/chart2/UIConfig_chart2.mk b/chart2/UIConfig_chart2.mk index 67d64b18b597..59af510c5845 100644 --- a/chart2/UIConfig_chart2.mk +++ b/chart2/UIConfig_chart2.mk @@ -68,6 +68,7 @@ $(eval $(call gb_UIConfig_add_uifiles,modules/schart,\ chart2/uiconfig/ui/tp_DataLabel \ chart2/uiconfig/ui/tp_DataPointOption \ chart2/uiconfig/ui/tp_DataSource \ + chart2/uiconfig/ui/tp_DataTable \ chart2/uiconfig/ui/tp_ErrorBars \ chart2/uiconfig/ui/tp_LegendPosition \ chart2/uiconfig/ui/tp_PolarOptions \ diff --git a/chart2/inc/strings.hrc b/chart2/inc/strings.hrc index ab6ca48c8376..9a9943df1f3c 100644 --- a/chart2/inc/strings.hrc +++ b/chart2/inc/strings.hrc @@ -48,6 +48,7 @@ #define STR_PAGE_APPEARANCE NC_("STR_PAGE_APPEARANCE", "Appearance") #define STR_PAGE_ILLUMINATION NC_("STR_PAGE_ILLUMINATION", "Illumination") #define STR_PAGE_ASIAN NC_("STR_PAGE_ASIAN", "Asian Typography") +#define STR_PAGE_DATA_TABLE NC_("STR_PAGE_DATA_TABLE", "Data Table") #define STR_OBJECT_AVERAGE_LINE_WITH_PARAMETERS NC_("STR_OBJECT_AVERAGE_LINE_WITH_PARAMETERS", "Mean value line with value %AVERAGE_VALUE and standard deviation %STD_DEVIATION") #define STR_OBJECT_AXIS NC_("STR_OBJECT_AXIS", "Axis") #define STR_OBJECT_AXIS_X NC_("STR_OBJECT_AXIS_X", "X Axis") @@ -97,6 +98,7 @@ #define STR_OBJECT_DIAGRAM_WALL NC_("STR_OBJECT_DIAGRAM_WALL", "Chart Wall") #define STR_OBJECT_DIAGRAM_FLOOR NC_("STR_OBJECT_DIAGRAM_FLOOR", "Chart Floor") #define STR_OBJECT_SHAPENC_("STR_OBJECT_SHAPE", "Drawing Object") +#define STR_OBJECT_DATA_TABLE NC_("STR_OBJECT_DATA_TABLE", "Data Table") #define STR_TIP_DATASERIES NC_("STR_TIP_DATASERIES", "Data Series '%SERIESNAME'") #define STR_TIP_DATAPOINT_INDEX NC_("STR_TIP_DATAPOINT_INDEX", "Data Point %POINTNUMBER") #define STR_TIP_DATAPOINT_VALUES NC_("STR_TIP_DATAPOINT_VALUES", "Values: %POINTVALUES") diff --git a/chart2/source/controller/dialogs/ObjectNameProvider.cxx b/chart2/source/controller/dialogs/ObjectNameProvider.cxx index 07b7f3503e92..b105ecc61211 100644 --- a/chart2/source/controller/dialogs/ObjectNameProvider.cxx +++ b/chart2/source/controller/dialogs/ObjectNameProvider.cxx @@ -314,6 +314,9 @@ OUString ObjectNameProvider::getName( ObjectType eObjectType, bool bPlural ) case OBJECTTYPE_DATA_CURVE_EQUATION: aRet=SchResId(STR_OBJECT_CURVE_EQUATION); break; +case OBJECTTYPE_DATA_TABLE: +aRet=SchResId(STR_OBJECT_DATA_TABLE); +break; default: //OBJECTTYPE_UNKNOWN ; } diff --git a/chart2/source/controller/dialogs/dl
[Libreoffice-commits] core.git: Branch 'feature/chartdatatable' - 17 commits - chart2/inc chart2/Library_chartcontroller.mk chart2/Library_chartcore.mk chart2/source chart2/uiconfig chart2/UIConfig_ch
Rebased ref, commits from common ancestor: commit 6489f0fbea689118b7d3bd0795549e5de484cfdf Author: Tomaž Vajngerl AuthorDate: Tue Jun 28 07:48:45 2022 +0200 Commit: Tomaž Vajngerl CommitDate: Tue Jun 28 08:06:12 2022 +0200 chart2: add UI to the data table This adds a new object type "Data Table", with all the object identifiers and converters of properties. The data table is now shown in the drop-down of chart elements. A properties dialog was added, which allows to change properties of a data table. This contains the area, line and font tab pages and a new tab page specific for data tables, to change if the horiz. or vert. borders, key or the outline should be show. Change-Id: I9b4cd58cffbcc952daaa2c0c8f8a5a17e38ac293 diff --git a/chart2/Library_chartcontroller.mk b/chart2/Library_chartcontroller.mk index b7c449cef582..4bc8c7497915 100644 --- a/chart2/Library_chartcontroller.mk +++ b/chart2/Library_chartcontroller.mk @@ -138,6 +138,7 @@ $(eval $(call gb_Library_add_exception_objects,chartcontroller,\ chart2/source/controller/dialogs/tp_DataLabel \ chart2/source/controller/dialogs/tp_DataPointOption \ chart2/source/controller/dialogs/tp_DataSource \ +chart2/source/controller/dialogs/tp_DataTable \ chart2/source/controller/dialogs/tp_ErrorBars \ chart2/source/controller/dialogs/tp_LegendPosition \ chart2/source/controller/dialogs/tp_PointGeometry \ @@ -153,6 +154,7 @@ $(eval $(call gb_Library_add_exception_objects,chartcontroller,\ chart2/source/controller/itemsetwrapper/AxisItemConverter \ chart2/source/controller/itemsetwrapper/CharacterPropertyItemConverter \ chart2/source/controller/itemsetwrapper/DataPointItemConverter \ +chart2/source/controller/itemsetwrapper/DataTableItemConverter \ chart2/source/controller/itemsetwrapper/ErrorBarItemConverter \ chart2/source/controller/itemsetwrapper/GraphicPropertyItemConverter \ chart2/source/controller/itemsetwrapper/ItemConverter \ diff --git a/chart2/UIConfig_chart2.mk b/chart2/UIConfig_chart2.mk index 67d64b18b597..59af510c5845 100644 --- a/chart2/UIConfig_chart2.mk +++ b/chart2/UIConfig_chart2.mk @@ -68,6 +68,7 @@ $(eval $(call gb_UIConfig_add_uifiles,modules/schart,\ chart2/uiconfig/ui/tp_DataLabel \ chart2/uiconfig/ui/tp_DataPointOption \ chart2/uiconfig/ui/tp_DataSource \ + chart2/uiconfig/ui/tp_DataTable \ chart2/uiconfig/ui/tp_ErrorBars \ chart2/uiconfig/ui/tp_LegendPosition \ chart2/uiconfig/ui/tp_PolarOptions \ diff --git a/chart2/inc/strings.hrc b/chart2/inc/strings.hrc index ab6ca48c8376..9a9943df1f3c 100644 --- a/chart2/inc/strings.hrc +++ b/chart2/inc/strings.hrc @@ -48,6 +48,7 @@ #define STR_PAGE_APPEARANCE NC_("STR_PAGE_APPEARANCE", "Appearance") #define STR_PAGE_ILLUMINATION NC_("STR_PAGE_ILLUMINATION", "Illumination") #define STR_PAGE_ASIAN NC_("STR_PAGE_ASIAN", "Asian Typography") +#define STR_PAGE_DATA_TABLE NC_("STR_PAGE_DATA_TABLE", "Data Table") #define STR_OBJECT_AVERAGE_LINE_WITH_PARAMETERS NC_("STR_OBJECT_AVERAGE_LINE_WITH_PARAMETERS", "Mean value line with value %AVERAGE_VALUE and standard deviation %STD_DEVIATION") #define STR_OBJECT_AXIS NC_("STR_OBJECT_AXIS", "Axis") #define STR_OBJECT_AXIS_X NC_("STR_OBJECT_AXIS_X", "X Axis") @@ -97,6 +98,7 @@ #define STR_OBJECT_DIAGRAM_WALL NC_("STR_OBJECT_DIAGRAM_WALL", "Chart Wall") #define STR_OBJECT_DIAGRAM_FLOOR NC_("STR_OBJECT_DIAGRAM_FLOOR", "Chart Floor") #define STR_OBJECT_SHAPENC_("STR_OBJECT_SHAPE", "Drawing Object") +#define STR_OBJECT_DATA_TABLE NC_("STR_OBJECT_DATA_TABLE", "Data Table") #define STR_TIP_DATASERIES NC_("STR_TIP_DATASERIES", "Data Series '%SERIESNAME'") #define STR_TIP_DATAPOINT_INDEX NC_("STR_TIP_DATAPOINT_INDEX", "Data Point %POINTNUMBER") #define STR_TIP_DATAPOINT_VALUES NC_("STR_TIP_DATAPOINT_VALUES", "Values: %POINTVALUES") diff --git a/chart2/source/controller/dialogs/ObjectNameProvider.cxx b/chart2/source/controller/dialogs/ObjectNameProvider.cxx index 07b7f3503e92..b105ecc61211 100644 --- a/chart2/source/controller/dialogs/ObjectNameProvider.cxx +++ b/chart2/source/controller/dialogs/ObjectNameProvider.cxx @@ -314,6 +314,9 @@ OUString ObjectNameProvider::getName( ObjectType eObjectType, bool bPlural ) case OBJECTTYPE_DATA_CURVE_EQUATION: aRet=SchResId(STR_OBJECT_CURVE_EQUATION); break; +case OBJECTTYPE_DATA_TABLE: +aRet=SchResId(STR_OBJECT_DATA_TABLE); +break; default: //OBJECTTYPE_UNKNOWN ; } diff --git a/chart2/source/controller/dialogs/dl
[Libreoffice-commits] core.git: sw/source
sw/source/core/inc/UndoManager.hxx |7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) New commits: commit 23f76e2fed8d77c888a5595d96520ec958cccda8 Author: Miklos Vajna AuthorDate: Mon Jun 27 20:36:01 2022 +0200 Commit: Miklos Vajna CommitDate: Tue Jun 28 08:10:04 2022 +0200 sw: document UndoManager Expand on why we store SwNodes in the undo manager if they are not part of a document. Change-Id: Ibfb03c7bbffcf2e4fe90ec62e0523a6afe8250b8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136514 Tested-by: Jenkins Reviewed-by: Miklos Vajna diff --git a/sw/source/core/inc/UndoManager.hxx b/sw/source/core/inc/UndoManager.hxx index 2db896f36db9..aa66acf3ad2d 100644 --- a/sw/source/core/inc/UndoManager.hxx +++ b/sw/source/core/inc/UndoManager.hxx @@ -33,6 +33,11 @@ class SwView; namespace sw { +/** + * Stores the undo/redo information, implementing the IDocumentUndoRedo interface. + * It contains a stack of SwUndo actions, each of which represents one user-visible + * undo / redo step. + */ class SW_DLLPUBLIC UndoManager final : public IDocumentUndoRedo , public SdrUndoManager @@ -109,7 +114,7 @@ private: IDocumentRedlineAccess & m_rRedlineAccess; IDocumentState & m_rState; -/// Undo nodes array: content not currently in document +/// Undo nodes array: content not currently in document, but required for undo/redo. std::shared_ptr m_xUndoNodes; bool m_bGroupUndo : 1;// TRUE: Undo grouping enabled
[Libreoffice-commits] core.git: Branch 'distro/collabora/co-22.05' - svx/qa svx/source
svx/qa/unit/data/theme.pptx |binary svx/qa/unit/styles.cxx | 49 svx/source/styles/ColorSets.cxx | 42 ++ 3 files changed, 63 insertions(+), 28 deletions(-) New commits: commit 121786fd81b3df3160d620bfc4b3916ac81fbc4c Author: Miklos Vajna AuthorDate: Fri Dec 3 08:38:18 2021 +0100 Commit: Miklos Vajna CommitDate: Tue Jun 28 08:11:29 2022 +0200 svx: consider color effects when updating objects for theme changes This builds on top of commit 48f0c5f73f99c919ec24deadc96c3cf5483c9314 (svx: update objects of pages of a master page when the theme changes, 2021-11-30), but now not only plain colors with colors with effects are also considered. The luminance modulation / offset is what PowerPoint uses the generate lighter / darker variants, tinting / shading is what Word uses. (cherry picked from commit 9ebf7034c9cd3a0601542397254ebc97647a862e) Change-Id: Ibfafb9be9986645117015bf3b05491daec8914be Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136493 Tested-by: Miklos Vajna Reviewed-by: Miklos Vajna diff --git a/svx/qa/unit/data/theme.pptx b/svx/qa/unit/data/theme.pptx index 397b6706ffa4..652a9fc29e06 100644 Binary files a/svx/qa/unit/data/theme.pptx and b/svx/qa/unit/data/theme.pptx differ diff --git a/svx/qa/unit/styles.cxx b/svx/qa/unit/styles.cxx index 9cbae8f997ba..1e7151edf359 100644 --- a/svx/qa/unit/styles.cxx +++ b/svx/qa/unit/styles.cxx @@ -49,6 +49,19 @@ void Test::tearDown() constexpr OUStringLiteral DATA_DIRECTORY = u"/svx/qa/unit/data/"; +/// Get the character color of the first text portion in xShape. +sal_Int32 GetShapeTextColor(const uno::Reference& xShape) +{ +uno::Reference xText(xShape->getText(), uno::UNO_QUERY); +uno::Reference xPara(xText->createEnumeration()->nextElement(), +uno::UNO_QUERY); +uno::Reference xPortion(xPara->createEnumeration()->nextElement(), + uno::UNO_QUERY); +sal_Int32 nColor{}; +xPortion->getPropertyValue("CharColor") >>= nColor; +return nColor; +} + CPPUNIT_TEST_FIXTURE(Test, testThemeChange) { // Given a document, with a first slide and blue shape text from theme: @@ -59,17 +72,14 @@ CPPUNIT_TEST_FIXTURE(Test, testThemeChange) xDrawPagesSupplier->getDrawPages()->getByIndex(0), uno::UNO_QUERY); uno::Reference xDrawPageShapes(xDrawPage, uno::UNO_QUERY); uno::Reference xShape(xDrawPageShapes->getByIndex(0), uno::UNO_QUERY); -{ -uno::Reference xText(xShape->getText(), uno::UNO_QUERY); -uno::Reference xPara( -xText->createEnumeration()->nextElement(), uno::UNO_QUERY); -uno::Reference xPortion(xPara->createEnumeration()->nextElement(), - uno::UNO_QUERY); -sal_Int32 nColor{}; -xPortion->getPropertyValue("CharColor") >>= nColor; -// Blue. -CPPUNIT_ASSERT_EQUAL(static_cast(0x4472c4), nColor); -} +// Blue. +CPPUNIT_ASSERT_EQUAL(static_cast(0x4472c4), GetShapeTextColor(xShape)); +uno::Reference xShape2(xDrawPageShapes->getByIndex(1), uno::UNO_QUERY); +// Blue, lighter. +CPPUNIT_ASSERT_EQUAL(static_cast(0xb4c7e7), GetShapeTextColor(xShape2)); +uno::Reference xShape3(xDrawPageShapes->getByIndex(2), uno::UNO_QUERY); +// Blue, darker. +CPPUNIT_ASSERT_EQUAL(static_cast(0x2f5597), GetShapeTextColor(xShape3)); // When changing the master slide of slide 1 to use the theme of the second master slide: uno::Reference xDrawPage2( @@ -80,18 +90,19 @@ CPPUNIT_TEST_FIXTURE(Test, testThemeChange) xMasterPage->setPropertyValue("Theme", aTheme); // Then make sure the shape text color is now green: -uno::Reference xText(xShape->getText(), uno::UNO_QUERY); -uno::Reference xPara(xText->createEnumeration()->nextElement(), -uno::UNO_QUERY); -uno::Reference xPortion(xPara->createEnumeration()->nextElement(), - uno::UNO_QUERY); -sal_Int32 nColor{}; -xPortion->getPropertyValue("CharColor") >>= nColor; // Without the accompanying fix in place, this test would have failed with: // - Expected: 9486886 (#90c226, green) // - Actual : 4485828 (#4472c4, blue) // i.e. shape text was not updated on theme change. -CPPUNIT_ASSERT_EQUAL(static_cast(0x90c226), nColor); +CPPUNIT_ASSERT_EQUAL(static_cast(0x90c226), GetShapeTextColor(xShape)); +// Green, lighter: +// Without the accompanying fix in place, this test would have failed with: +// - Expected: 14020002 (#d5eda2, light green) +// - Actual : 9486886 (#90c226, stock green) +// i.e. the "light" effect on green was not applied. +CPPUNIT_ASSERT_EQUAL(static_cast(0xd5e
[Libreoffice-commits] core.git: Branch 'distro/collabora/co-22.05' - oox/qa oox/source
oox/qa/unit/data/refer-to-theme.pptx |binary oox/qa/unit/export.cxx | 25 - oox/source/export/drawingml.cxx | 24 ++-- 3 files changed, 42 insertions(+), 7 deletions(-) New commits: commit f67b10f2a34b4180c4e7fd9191ed5abf45f7b29a Author: Miklos Vajna AuthorDate: Mon Dec 6 08:53:50 2021 +0100 Commit: Miklos Vajna CommitDate: Tue Jun 28 08:14:37 2022 +0200 PPTX export: handle theme color of shape text with effects Handle luminance modulation and offset (lighter and darker colors in PowerPoint); not handling tinting/shading for now, as that seems to be not used in DrawingML (only in WordprocessingML), and this code is for shape text only at the moment. (cherry picked from commit 51c3d8d7f6a2a3b95e97b9a151df0e63ff09cb74) Change-Id: I5e97f890d3072c7ef282ed4fb971362b3ddaaa4d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136494 Tested-by: Jenkins CollaboraOffice Reviewed-by: Miklos Vajna diff --git a/oox/qa/unit/data/refer-to-theme.pptx b/oox/qa/unit/data/refer-to-theme.pptx index 9a45799ab977..9f05bf7b07e5 100644 Binary files a/oox/qa/unit/data/refer-to-theme.pptx and b/oox/qa/unit/data/refer-to-theme.pptx differ diff --git a/oox/qa/unit/export.cxx b/oox/qa/unit/export.cxx index 58169c558e48..960df6dd43e7 100644 --- a/oox/qa/unit/export.cxx +++ b/oox/qa/unit/export.cxx @@ -587,7 +587,30 @@ CPPUNIT_TEST_FIXTURE(Test, testReferToTheme) // - Actual : 0 // - XPath '//p:sp/p:txBody/a:p/a:r/a:rPr/a:solidFill/a:schemeClr' number of nodes is incorrect // i.e. the element was not written. -assertXPath(pXmlDoc, "//p:sp/p:txBody/a:p/a:r/a:rPr/a:solidFill/a:schemeClr", "val", "accent1"); +assertXPath(pXmlDoc, "//p:sp[1]/p:txBody/a:p/a:r/a:rPr/a:solidFill/a:schemeClr", "val", +"accent1"); +assertXPath(pXmlDoc, "//p:sp[1]/p:txBody/a:p/a:r/a:rPr/a:solidFill/a:schemeClr/a:lumMod", 0); +assertXPath(pXmlDoc, "//p:sp[1]/p:txBody/a:p/a:r/a:rPr/a:solidFill/a:schemeClr/a:lumOff", 0); + +// Second shape: lighter color: +// Without the accompanying fix in place, this test would have failed with: +// - Expected: 1 +// - Actual : 0 +// - XPath '//p:sp[2]/p:txBody/a:p/a:r/a:rPr/a:solidFill/a:schemeClr' number of nodes is incorrect +// i.e. the effects case did not write scheme colors. +assertXPath(pXmlDoc, "//p:sp[2]/p:txBody/a:p/a:r/a:rPr/a:solidFill/a:schemeClr", "val", +"accent1"); +assertXPath(pXmlDoc, "//p:sp[2]/p:txBody/a:p/a:r/a:rPr/a:solidFill/a:schemeClr/a:lumMod", "val", +"4"); +assertXPath(pXmlDoc, "//p:sp[2]/p:txBody/a:p/a:r/a:rPr/a:solidFill/a:schemeClr/a:lumOff", "val", +"6"); + +// Third shape, darker color: +assertXPath(pXmlDoc, "//p:sp[3]/p:txBody/a:p/a:r/a:rPr/a:solidFill/a:schemeClr", "val", +"accent1"); +assertXPath(pXmlDoc, "//p:sp[3]/p:txBody/a:p/a:r/a:rPr/a:solidFill/a:schemeClr/a:lumMod", "val", +"75000"); +assertXPath(pXmlDoc, "//p:sp[3]/p:txBody/a:p/a:r/a:rPr/a:solidFill/a:schemeClr/a:lumOff", 0); } } diff --git a/oox/source/export/drawingml.cxx b/oox/source/export/drawingml.cxx index 45274efa9315..46098e9d04a3 100644 --- a/oox/source/export/drawingml.cxx +++ b/oox/source/export/drawingml.cxx @@ -433,19 +433,31 @@ bool DrawingML::WriteCharColor(const css::uno::ReferencegetPropertyValue("CharColorLumMod") >>= nCharColorLumMod; -sal_Int32 nCharColorLumOff{}; -xPropertySet->getPropertyValue("CharColorLumOff") >>= nCharColorLumOff; sal_Int32 nCharColorTintOrShade{}; xPropertySet->getPropertyValue("CharColorTintOrShade") >>= nCharColorTintOrShade; -if (nCharColorLumMod != 1 || nCharColorLumOff != 0 || nCharColorTintOrShade != 0) +if (nCharColorTintOrShade != 0) { return false; } mpFS->startElementNS(XML_a, XML_solidFill); -mpFS->singleElementNS(XML_a, XML_schemeClr, XML_val, pColorName); +mpFS->startElementNS(XML_a, XML_schemeClr, XML_val, pColorName); + +sal_Int32 nCharColorLumMod{}; +xPropertySet->getPropertyValue("CharColorLumMod") >>= nCharColorLumMod; +if (nCharColorLumMod != 1) +{ +mpFS->singleElementNS(XML_a, XML_lumMod, XML_val, OString::number(nCharColorLumMod * 10)); +} + +sal_Int32 nCharColorLumOff{}; +xPropertySet->getPropertyValue("CharColorLumOff") >>= nCharColorLumOff; +if (nCharColorLumOff != 0) +{ +mpFS->singleElementNS(XML_a, XML_lumOff, XML_val, OString::number(nCharColorLumOff * 10)); +} + +mpFS->endElementNS(XML_a, XML_schemeClr); mpFS->endElementNS(XML_a, XML_solidFill); return true;
[Libreoffice-commits] core.git: Branch 'distro/collabora/co-22.05' - include/xmloff schema/libreoffice xmloff/qa xmloff/source
include/xmloff/xmltoken.hxx |1 schema/libreoffice/OpenDocument-v1.3+libreoffice-schema.rng | 96 xmloff/qa/unit/draw.cxx | 66 +--- xmloff/source/core/xmltoken.cxx |2 xmloff/source/draw/sdxmlexp.cxx | 85 ++ xmloff/source/draw/sdxmlexp_impl.hxx|1 xmloff/source/token/tokens.txt |1 7 files changed, 229 insertions(+), 23 deletions(-) New commits: commit e207983a09cbb0139bcc693d63f3ea0980699b26 Author: Miklos Vajna AuthorDate: Tue Dec 7 08:32:30 2021 +0100 Commit: Miklos Vajna CommitDate: Tue Jun 28 08:15:14 2022 +0200 ODP export: write the theme of a master page Which requires describing the schema, which is really just a new element, the rest reuses the color-table markup, which wasn't used in ODF so far (but was used in our .soc files). Also make sure that we only do this in ODF extended mode (which is the default). (cherry picked from commit c95288aec4eb4d92a5ccfb9d8fc02a0185d8e8d0) Conflicts: include/xmloff/xmltoken.hxx xmloff/qa/unit/draw.cxx xmloff/source/core/xmltoken.cxx xmloff/source/token/tokens.txt Change-Id: I90eaad30f63946c441fe0c53caf6a47caf1714d5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136495 Tested-by: Jenkins CollaboraOffice Reviewed-by: Miklos Vajna diff --git a/include/xmloff/xmltoken.hxx b/include/xmloff/xmltoken.hxx index b0e9003b0261..f26c4871ec35 100644 --- a/include/xmloff/xmltoken.hxx +++ b/include/xmloff/xmltoken.hxx @@ -3467,6 +3467,7 @@ namespace xmloff::token { XML_LINKED_STYLE_NAME, +XML_THEME, XML_CONTENT_CONTROL, XML_SHOWING_PLACE_HOLDER, diff --git a/schema/libreoffice/OpenDocument-v1.3+libreoffice-schema.rng b/schema/libreoffice/OpenDocument-v1.3+libreoffice-schema.rng index 55bedf37b1bb..19a1edb7f3c0 100644 --- a/schema/libreoffice/OpenDocument-v1.3+libreoffice-schema.rng +++ b/schema/libreoffice/OpenDocument-v1.3+libreoffice-schema.rng @@ -2999,4 +2999,100 @@ xmlns:loext="urn:org:documentfoundation:names:experimental:office:xmlns:loext:1. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/xmloff/qa/unit/draw.cxx b/xmloff/qa/unit/draw.cxx index 9a753d184f34..fd32c59d90b8 100644 --- a/xmloff/qa/unit/draw.cxx +++ b/xmloff/qa/unit/draw.cxx @@ -18,6 +18,9 @@ #include #include #include +#include +#include +#include #include #include @@ -40,6 +43,7 @@ public: void tearDown() override; void registerNamespaces(xmlXPathContextPtr& pXmlXpathCtx) override; uno::Reference& getComponent() { return mxComponent; } +void save(const OUString& rFilterName, utl::TempFile& rTempFile); }; void XmloffDrawTest::setUp() @@ -62,6 +66,16 @@ void XmloffDrawTest::registerNamespaces(xmlXPathContextPtr& pXmlXpathCtx) XmlTestTools::registerODFNamespaces(pXmlXpathCtx); } +void XmloffDrawTest::save(const OUString& rFilterName, utl::TempFile& rTempFile) +{ +uno::Reference xStorable(mxComponent, uno::UNO_QUERY); +utl::MediaDescriptor aMediaDescriptor; +aMediaDescriptor["FilterName"] <<= rFilterName; +rTempFile.EnableKillingFile(); +xStorable->storeToURL(rTempFile.GetURL(), aMediaDescriptor.getAsConstPropertyValueList()); +validate(rTempFile.GetFileName(), test::ODF); +} + CPPUNIT_TEST_FIXTURE(XmloffDrawTest, testTextBoxLoss) { // Load a document that has a shape with a textbox in it. Save it to ODF and reload. @@ -95,12 +109,8 @@ CPPUNIT_TEST_FIXTURE(XmloffDrawTest, testTdf141301_Extrusion_Angle) getComponent() = loadFromDesktop(aURL, "com.sun.star.comp.drawing.DrawingDocument"); // Prepare use of XPath -uno::Reference xStorable(getComponent(), uno::UNO_QUERY); utl::TempFile aTempFile; -aTempFile.EnableKillingFile(); -utl::MediaDescriptor aMediaDescriptor; -aMediaDescriptor["FilterName"] <<= OUString("draw8"); -xStorable->storeAsURL(aTempFile.GetURL(), aMediaDescriptor.getAsConstPropertyValueList()); +save("draw8", aTempFile); uno::
[Libreoffice-commits] core.git: Branch 'distro/collabora/co-22.05' - xmloff/qa xmloff/source
xmloff/qa/unit/data/theme.odp |binary xmloff/qa/unit/draw.cxx | 24 ++ xmloff/source/draw/ximpstyl.cxx | 146 3 files changed, 170 insertions(+) New commits: commit 3d210f998928cb00e6989d9c2ad64ef1fa699175 Author: Miklos Vajna AuthorDate: Wed Dec 8 08:42:18 2021 +0100 Commit: Miklos Vajna CommitDate: Tue Jun 28 08:24:38 2022 +0200 ODP import: handle theme of master pages This is just the theme itself, we don't refer to this theme from e.g. shape text color yet. (cherry picked from commit 26c8e266e1ae267fd15878057a92340078136140) Change-Id: I0d8f4b06217fb491e47d775628fde742d8ff104d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136496 Tested-by: Jenkins CollaboraOffice Reviewed-by: Miklos Vajna diff --git a/xmloff/qa/unit/data/theme.odp b/xmloff/qa/unit/data/theme.odp new file mode 100644 index ..da8d189753f0 Binary files /dev/null and b/xmloff/qa/unit/data/theme.odp differ diff --git a/xmloff/qa/unit/draw.cxx b/xmloff/qa/unit/draw.cxx index fd32c59d90b8..f3bab2a69996 100644 --- a/xmloff/qa/unit/draw.cxx +++ b/xmloff/qa/unit/draw.cxx @@ -155,6 +155,30 @@ CPPUNIT_TEST_FIXTURE(XmloffDrawTest, testThemeExport) assertXPath(pXmlDoc, "//style:master-page/loext:theme/loext:color-table/loext:color", 12); } +CPPUNIT_TEST_FIXTURE(XmloffDrawTest, testThemeImport) +{ +// Given a document that has a master page with a theme associated: +OUString aURL = m_directories.getURLFromSrc(DATA_DIRECTORY) + "theme.odp"; + +// When loading that document: +getComponent() = loadFromDesktop(aURL); + +// Then make sure the doc model has a master page with a theme: +uno::Reference xDrawPagesSupplier(getComponent(), uno::UNO_QUERY); +uno::Reference xDrawPage( +xDrawPagesSupplier->getDrawPages()->getByIndex(0), uno::UNO_QUERY); +uno::Reference xMasterpage(xDrawPage->getMasterPage(), uno::UNO_QUERY); +comphelper::SequenceAsHashMap aMap(xMasterpage->getPropertyValue("Theme")); +// Without the accompanying fix in place, this test would have failed with: +// Cannot extract an Any(void) to string! +// i.e. the master page had no theme. +CPPUNIT_ASSERT_EQUAL(OUString("Office Theme"), aMap["Name"].get()); +CPPUNIT_ASSERT_EQUAL(OUString("Office"), aMap["ColorSchemeName"].get()); +auto aColorScheme = aMap["ColorScheme"].get>(); +CPPUNIT_ASSERT_EQUAL(static_cast(12), aColorScheme.getLength()); +CPPUNIT_ASSERT_EQUAL(static_cast(0x954F72), aColorScheme[11]); +} + CPPUNIT_PLUGIN_IMPLEMENT(); /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/draw/ximpstyl.cxx b/xmloff/source/draw/ximpstyl.cxx index 4f3805e39ddd..e6d41e3cf003 100644 --- a/xmloff/source/draw/ximpstyl.cxx +++ b/xmloff/source/draw/ximpstyl.cxx @@ -40,6 +40,7 @@ #include #include #include +#include #include #include #include @@ -53,6 +54,9 @@ #include #include #include +#include +#include +#include using namespace ::com::sun::star; using namespace ::com::sun::star::uno; @@ -78,6 +82,46 @@ public: const XMLPropertyState& rProp ) override; }; +/// Imports . +class XMLThemeContext : public SvXMLImportContext +{ +uno::Reference m_xMasterPage; +comphelper::SequenceAsHashMap m_aTheme; + +public: +XMLThemeContext(SvXMLImport& rImport, +const uno::Reference& xAttrList, +const uno::Reference& xMasterPage); +~XMLThemeContext(); + +uno::Reference SAL_CALL createFastChildContext( +sal_Int32 nElement, const uno::Reference& xAttribs) override; +}; + +/// Imports inside . +class XMLColorTableContext : public SvXMLImportContext +{ +comphelper::SequenceAsHashMap& m_rTheme; +std::vector m_aColorScheme; + +public: +XMLColorTableContext(SvXMLImport& rImport, + const uno::Reference& xAttrList, + comphelper::SequenceAsHashMap& rTheme); +~XMLColorTableContext(); + +uno::Reference SAL_CALL createFastChildContext( +sal_Int32 nElement, const uno::Reference& xAttribs) override; +}; + +/// Imports inside . +class XMLColorContext : public SvXMLImportContext +{ +public: +XMLColorContext(SvXMLImport& rImport, +const uno::Reference& xAttrList, +std::vector& rColorScheme); +}; } SdXMLDrawingPagePropertySetContext::SdXMLDrawingPagePropertySetContext( @@ -827,6 +871,17 @@ css::uno::Reference< css::xml::sax::XFastContextHandler > SdXMLMasterPageContext } } } +break; +} +case XML_ELEMENT(LO_EXT, XML_THEME): +{ +if (GetSdImport().IsImpress()) +{ +uno::Reference xMasterPage(GetLocalShapesContext(), + uno::UNO_QUERY); +return new XM
[Libreoffice-commits] core.git: Branch 'feature/chartdatatable' - 16 commits - chart2/inc chart2/Library_chartcontroller.mk chart2/Library_chartcore.mk chart2/source chart2/uiconfig chart2/UIConfig_ch
Rebased ref, commits from common ancestor: commit ff6d9841095b16973867bbebc6eaa03541ec2b4f Author: Tomaž Vajngerl AuthorDate: Tue Jun 28 07:48:45 2022 +0200 Commit: Tomaž Vajngerl CommitDate: Tue Jun 28 08:25:26 2022 +0200 chart2: add UI to the data table This adds a new object type "Data Table", with all the object identifiers and converters of properties. The data table is now shown in the drop-down of chart elements. A properties dialog was added, which allows to change properties of a data table. This contains the area, line and font tab pages and a new tab page specific for data tables, to change if the horiz. or vert. borders, key or the outline should be show. Change-Id: I9b4cd58cffbcc952daaa2c0c8f8a5a17e38ac293 diff --git a/chart2/Library_chartcontroller.mk b/chart2/Library_chartcontroller.mk index b7c449cef582..4bc8c7497915 100644 --- a/chart2/Library_chartcontroller.mk +++ b/chart2/Library_chartcontroller.mk @@ -138,6 +138,7 @@ $(eval $(call gb_Library_add_exception_objects,chartcontroller,\ chart2/source/controller/dialogs/tp_DataLabel \ chart2/source/controller/dialogs/tp_DataPointOption \ chart2/source/controller/dialogs/tp_DataSource \ +chart2/source/controller/dialogs/tp_DataTable \ chart2/source/controller/dialogs/tp_ErrorBars \ chart2/source/controller/dialogs/tp_LegendPosition \ chart2/source/controller/dialogs/tp_PointGeometry \ @@ -153,6 +154,7 @@ $(eval $(call gb_Library_add_exception_objects,chartcontroller,\ chart2/source/controller/itemsetwrapper/AxisItemConverter \ chart2/source/controller/itemsetwrapper/CharacterPropertyItemConverter \ chart2/source/controller/itemsetwrapper/DataPointItemConverter \ +chart2/source/controller/itemsetwrapper/DataTableItemConverter \ chart2/source/controller/itemsetwrapper/ErrorBarItemConverter \ chart2/source/controller/itemsetwrapper/GraphicPropertyItemConverter \ chart2/source/controller/itemsetwrapper/ItemConverter \ diff --git a/chart2/UIConfig_chart2.mk b/chart2/UIConfig_chart2.mk index 67d64b18b597..59af510c5845 100644 --- a/chart2/UIConfig_chart2.mk +++ b/chart2/UIConfig_chart2.mk @@ -68,6 +68,7 @@ $(eval $(call gb_UIConfig_add_uifiles,modules/schart,\ chart2/uiconfig/ui/tp_DataLabel \ chart2/uiconfig/ui/tp_DataPointOption \ chart2/uiconfig/ui/tp_DataSource \ + chart2/uiconfig/ui/tp_DataTable \ chart2/uiconfig/ui/tp_ErrorBars \ chart2/uiconfig/ui/tp_LegendPosition \ chart2/uiconfig/ui/tp_PolarOptions \ diff --git a/chart2/inc/strings.hrc b/chart2/inc/strings.hrc index ab6ca48c8376..9a9943df1f3c 100644 --- a/chart2/inc/strings.hrc +++ b/chart2/inc/strings.hrc @@ -48,6 +48,7 @@ #define STR_PAGE_APPEARANCE NC_("STR_PAGE_APPEARANCE", "Appearance") #define STR_PAGE_ILLUMINATION NC_("STR_PAGE_ILLUMINATION", "Illumination") #define STR_PAGE_ASIAN NC_("STR_PAGE_ASIAN", "Asian Typography") +#define STR_PAGE_DATA_TABLE NC_("STR_PAGE_DATA_TABLE", "Data Table") #define STR_OBJECT_AVERAGE_LINE_WITH_PARAMETERS NC_("STR_OBJECT_AVERAGE_LINE_WITH_PARAMETERS", "Mean value line with value %AVERAGE_VALUE and standard deviation %STD_DEVIATION") #define STR_OBJECT_AXIS NC_("STR_OBJECT_AXIS", "Axis") #define STR_OBJECT_AXIS_X NC_("STR_OBJECT_AXIS_X", "X Axis") @@ -97,6 +98,7 @@ #define STR_OBJECT_DIAGRAM_WALL NC_("STR_OBJECT_DIAGRAM_WALL", "Chart Wall") #define STR_OBJECT_DIAGRAM_FLOOR NC_("STR_OBJECT_DIAGRAM_FLOOR", "Chart Floor") #define STR_OBJECT_SHAPENC_("STR_OBJECT_SHAPE", "Drawing Object") +#define STR_OBJECT_DATA_TABLE NC_("STR_OBJECT_DATA_TABLE", "Data Table") #define STR_TIP_DATASERIES NC_("STR_TIP_DATASERIES", "Data Series '%SERIESNAME'") #define STR_TIP_DATAPOINT_INDEX NC_("STR_TIP_DATAPOINT_INDEX", "Data Point %POINTNUMBER") #define STR_TIP_DATAPOINT_VALUES NC_("STR_TIP_DATAPOINT_VALUES", "Values: %POINTVALUES") diff --git a/chart2/source/controller/dialogs/ObjectNameProvider.cxx b/chart2/source/controller/dialogs/ObjectNameProvider.cxx index 07b7f3503e92..b105ecc61211 100644 --- a/chart2/source/controller/dialogs/ObjectNameProvider.cxx +++ b/chart2/source/controller/dialogs/ObjectNameProvider.cxx @@ -314,6 +314,9 @@ OUString ObjectNameProvider::getName( ObjectType eObjectType, bool bPlural ) case OBJECTTYPE_DATA_CURVE_EQUATION: aRet=SchResId(STR_OBJECT_CURVE_EQUATION); break; +case OBJECTTYPE_DATA_TABLE: +aRet=SchResId(STR_OBJECT_DATA_TABLE); +break; default: //OBJECTTYPE_UNKNOWN ; } diff --git a/chart2/source/controller/dialogs/dl