[Libreoffice-commits] core.git: desktop/source
desktop/source/lib/init.cxx |7 +++ 1 file changed, 7 insertions(+) New commits: commit e9dc82b761a71369c4c49ae6d5fd8892f999c77a Author: Tor Lillqvist AuthorDate: Tue Jun 29 15:04:58 2021 +0300 Commit: Tor Lillqvist CommitDate: Wed Jun 30 09:19:58 2021 +0200 Avoid accumulating a huge number of Trace Events before calling the callback Don't use only the five second timer to flush the buffer. Set a limit on the number of accumulated events, too. Change-Id: I075028ce653d89cf099d91ce0d4d97c1361a3bb4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118089 Tested-by: Jenkins Reviewed-by: Tor Lillqvist diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx index 25206944d90d..7d3fc9f078ab 100644 --- a/desktop/source/lib/init.cxx +++ b/desktop/source/lib/init.cxx @@ -210,7 +210,13 @@ public: SetTimeout(dumpTimeoutMS); Start(); } + virtual void Invoke() override +{ +flushRecordings(); +} + +static void flushRecordings() { const css::uno::Sequence aEvents = comphelper::TraceEvent::getRecordingAndClear(); @@ -3905,6 +3911,7 @@ static void lo_setOption(LibreOfficeKit* /*pThis*/, const char *pOption, const c { if (strcmp(pValue, "start") == 0) { +comphelper::TraceEvent::setBufferSizeAndCallback(100, TraceEventDumper::flushRecordings); comphelper::TraceEvent::startRecording(); if (traceEventDumper == nullptr) traceEventDumper = new TraceEventDumper(); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.4' - include/oox oox/source sd/qa
include/oox/ppt/pptshape.hxx |2 + oox/source/ppt/pptshape.cxx | 34 ++ sd/qa/unit/data/pptx/pass/ofz35597-1.pptx |binary 3 files changed, 23 insertions(+), 13 deletions(-) New commits: commit ac8909a033bab9edd424c6f95c87cb71c0e2ff2c Author: Caolán McNamara AuthorDate: Sat Jun 26 19:26:40 2021 +0100 Commit: Jan Holesovsky CommitDate: Wed Jun 30 09:52:52 2021 +0200 ofz#35597 Null-dereference READ add a check for null getTextBody() return unfold it a bit while I'm at it Change-Id: Ib0286048536ad576b520e1adb08fa9b36da9243f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117938 Tested-by: Jenkins Reviewed-by: Caolán McNamara (cherry picked from commit 00a658ff104623d4e7fc984b5fc82d1a7e2607f2) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117870 Tested-by: Jenkins CollaboraOffice Reviewed-by: Jan Holesovsky diff --git a/include/oox/ppt/pptshape.hxx b/include/oox/ppt/pptshape.hxx index e1cc9965fd57..71af3a08e291 100644 --- a/include/oox/ppt/pptshape.hxx +++ b/include/oox/ppt/pptshape.hxx @@ -54,6 +54,8 @@ class PPTShape final : public oox::drawingml::Shape /// Set if spPr tag is non empty for the shape bool mbHasNoninheritedShapeProperties; +bool IsPlaceHolderCandidate(const SlidePersist& rSlidePersist) const; + public: PPTShape( const oox::ppt::ShapeLocation eShapeLocation, diff --git a/oox/source/ppt/pptshape.cxx b/oox/source/ppt/pptshape.cxx index 6620476d986c..533b49ac8b6f 100644 --- a/oox/source/ppt/pptshape.cxx +++ b/oox/source/ppt/pptshape.cxx @@ -92,7 +92,7 @@ static const char* lclDebugSubType( sal_Int32 nType ) namespace { -bool ShapeHasNoVisualPropertiesOnImport(oox::ppt::PPTShape& rPPTShape) +bool ShapeHasNoVisualPropertiesOnImport(const oox::ppt::PPTShape& rPPTShape) { return !rPPTShape.hasNonInheritedShapeProperties() && !rPPTShape.hasShapeStyleRefs() @@ -128,6 +128,23 @@ oox::drawingml::TextListStylePtr PPTShape::getSubTypeTextListStyle( const SlideP return pTextListStyle; } +bool PPTShape::IsPlaceHolderCandidate(const SlidePersist& rSlidePersist) const +{ +if (meShapeLocation != Slide) +return false; +if (rSlidePersist.isNotesPage()) +return false; +auto pTextBody = getTextBody(); +if (!pTextBody) +return false; +auto rParagraphs = pTextBody->getParagraphs(); +if (rParagraphs.size() != 1) +return false; +if (rParagraphs.front()->getRuns().size() != 1) +return false; +return ShapeHasNoVisualPropertiesOnImport(*this); +} + void PPTShape::addShape( oox::core::XmlFilterBase& rFilterBase, const SlidePersist& rSlidePersist, @@ -196,10 +213,7 @@ void PPTShape::addShape( } break; case XML_dt : -if ( meShapeLocation == Slide && !rSlidePersist.isNotesPage() - && getTextBody()->getParagraphs().size() == 1 - && getTextBody()->getParagraphs().front()->getRuns().size() == 1 - && ShapeHasNoVisualPropertiesOnImport(*this) ) +if (IsPlaceHolderCandidate(rSlidePersist)) { TextRunPtr& pTextRun = getTextBody()->getParagraphs().front()->getRuns().front(); oox::drawingml::TextField* pTextField = dynamic_cast(pTextRun.get()); @@ -235,10 +249,7 @@ void PPTShape::addShape( bClearText = true; break; case XML_ftr : -if ( meShapeLocation == Slide && !rSlidePersist.isNotesPage() - && getTextBody()->getParagraphs().size() == 1 - && getTextBody()->getParagraphs().front()->getRuns().size() == 1 - && ShapeHasNoVisualPropertiesOnImport(*this) ) +if (IsPlaceHolderCandidate(rSlidePersist)) { const OUString& rFooterText = getTextBody()->toString(); @@ -256,10 +267,7 @@ void PPTShape::addShape( bClearText = true; break; case XML_sldNum : -if (meShapeLocation == Slide && !rSlidePersist.isNotesPage() -&& getTextBody()->getParagraphs().size() == 1 -&& getTextBody()->getParagraphs().front()->getRuns().size() == 1 -&& ShapeHasNoVisualPropertiesOnImport(*this)) +if (IsPlaceHolderCandidate(rSlidePersist)) { TextRunPtr& pTextRun = getTextBody()->getParagraphs().front()->getRuns().front(); diff --git a/sd/qa/unit/data/pptx/pass/ofz35597-1.pptx b/sd/qa/unit/data/pptx/pass/ofz35597-1.pptx new file mode 100644 index ..e7fcacc25482 Binary files /dev/null
[Libreoffice-commits] core.git: chart2/qa chart2/source dbaccess/source include/formula oox/source sc/inc sc/qa sc/source svtools/source sw/source vcl/source xmloff/source
chart2/qa/extras/charttest.hxx |5 - chart2/source/controller/chartapiwrapper/ChartDataWrapper.cxx |5 - chart2/source/controller/dialogs/DataBrowser.cxx | 13 -- chart2/source/controller/dialogs/DataBrowserModel.cxx | 10 -- chart2/source/inc/CommonFunctors.hxx | 10 +- chart2/source/tools/CommonConverters.cxx |5 - chart2/source/tools/DiagramHelper.cxx |6 - chart2/source/tools/ExplicitCategoriesProvider.cxx |7 - chart2/source/tools/ExponentialRegressionCurveCalculator.cxx | 20 +--- chart2/source/tools/InternalData.cxx | 26 + chart2/source/tools/InternalDataProvider.cxx | 12 -- chart2/source/tools/LogarithmicRegressionCurveCalculator.cxx | 19 +-- chart2/source/tools/MeanValueRegressionCurveCalculator.cxx |9 + chart2/source/tools/MovingAverageRegressionCurveCalculator.cxx |8 - chart2/source/tools/PolynomialRegressionCurveCalculator.cxx| 12 -- chart2/source/tools/PotentialRegressionCurveCalculator.cxx | 20 +--- chart2/source/tools/RegressionCurveCalculator.cxx |6 - chart2/source/tools/Scaling.cxx| 32 ++ chart2/source/tools/StatisticsHelper.cxx | 35 ++- chart2/source/view/axes/DateScaling.cxx|6 - chart2/source/view/axes/MinimumAndMaximumSupplier.cxx | 14 +- chart2/source/view/axes/ScaleAutomatism.cxx|4 chart2/source/view/axes/VCartesianAxis.cxx |8 - chart2/source/view/charttypes/AreaChart.cxx| 10 +- chart2/source/view/charttypes/BarChart.cxx |8 - chart2/source/view/charttypes/BubbleChart.cxx | 10 +- chart2/source/view/charttypes/NetChart.cxx | 11 +- chart2/source/view/charttypes/PieChart.cxx |7 - chart2/source/view/charttypes/VSeriesPlotter.cxx | 46 - chart2/source/view/main/VDataSeries.cxx| 49 +++--- dbaccess/source/core/misc/DatabaseDataProvider.cxx |6 - include/formula/errorcodes.hxx |4 oox/source/export/chartexport.cxx |6 - sc/inc/PivotTableDataSequence.hxx |9 - sc/qa/unit/ucalc.cxx |4 sc/source/core/data/column2.cxx| 19 +-- sc/source/core/data/dociter.cxx|7 - sc/source/core/data/dpobject.cxx | 12 +- sc/source/core/data/dpoutput.cxx |5 - sc/source/core/data/dpresfilter.cxx|9 - sc/source/core/data/dptabres.cxx |6 - sc/source/core/opencl/formulagroupcl.cxx |5 - sc/source/core/tool/formulagroup.cxx |7 - sc/source/core/tool/interpr4.cxx |4 sc/source/filter/oox/biffhelper.cxx|4 sc/source/filter/orcus/interface.cxx |7 - sc/source/filter/xml/xmlcelli.cxx |5 - sc/source/ui/miscdlgs/solveroptions.cxx|2 sc/source/ui/unoobj/PivotTableDataProvider.cxx |7 - sc/source/ui/unoobj/chart2uno.cxx | 13 +- svtools/source/table/cellvalueconversion.cxx | 14 +- sw/source/core/unocore/unotbl.cxx | 11 -- vcl/source/control/fmtfield.cxx| 10 -- xmloff/source/chart/SchXMLExport.cxx |7 - xmloff/source/chart/SchXMLTableContext.cxx | 13 -- 55 files changed, 252 insertions(+), 377 deletions(-) New commits: commit 7838efe4b703945ccde963f8506c8c7744e04e6e Author: BaiXiaochun AuthorDate: Tue Jun 29 17:38:29 2021 +0200 Commit: Mike Kaganski CommitDate: Wed Jun 30 09:52:45 2021 +0200 Purge out rtl::math::setNan Change-Id: If8794c105e279afd4437517d3e61f2f900eb6490 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118123 Tested-by: Jenkins Reviewed-by: Mike Kaganski diff --git a/chart2/qa/extras/charttest.hxx b/chart2/qa/extras/charttest.hxx index 0a7b00cc884e..9b162acc06e8 100644 --- a/chart2/qa/extras/charttest.hxx +++ b/chart2/qa/extras/charttest.hxx @@ -442,9 +442,6 @@ std::vector > getDataSeriesYValuesFromChartType( const Refer CPPUNIT_ASSERT(xDSCont.is()); const Sequence > aDataSeriesSeq = xDSCont->getDataSeries(); -double fNan; -rtl::math::setNan(&fNan); - std::vector > aRet; for (
[Libreoffice-commits] core.git: Branch 'distro/collabora/co-2021' - include/oox oox/source sd/qa
include/oox/ppt/pptshape.hxx |2 + oox/source/ppt/pptshape.cxx | 34 ++ sd/qa/unit/data/pptx/pass/ofz35597-1.pptx |binary 3 files changed, 23 insertions(+), 13 deletions(-) New commits: commit efdc0f7eebec5effa06475282b98f56d56f97537 Author: Caolán McNamara AuthorDate: Sat Jun 26 19:26:40 2021 +0100 Commit: Jan Holesovsky CommitDate: Wed Jun 30 09:53:16 2021 +0200 ofz#35597 Null-dereference READ add a check for null getTextBody() return unfold it a bit while I'm at it Change-Id: Ib0286048536ad576b520e1adb08fa9b36da9243f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117938 Tested-by: Jenkins Reviewed-by: Caolán McNamara (cherry picked from commit 00a658ff104623d4e7fc984b5fc82d1a7e2607f2) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117871 Tested-by: Jenkins CollaboraOffice Reviewed-by: Jan Holesovsky diff --git a/include/oox/ppt/pptshape.hxx b/include/oox/ppt/pptshape.hxx index d27a116e2783..ead382b52685 100644 --- a/include/oox/ppt/pptshape.hxx +++ b/include/oox/ppt/pptshape.hxx @@ -54,6 +54,8 @@ class PPTShape final : public oox::drawingml::Shape /// Set if spPr tag is non empty for the shape bool mbHasNoninheritedShapeProperties; +bool IsPlaceHolderCandidate(const SlidePersist& rSlidePersist) const; + public: PPTShape( const oox::ppt::ShapeLocation eShapeLocation, diff --git a/oox/source/ppt/pptshape.cxx b/oox/source/ppt/pptshape.cxx index 5f21f7c459c9..7e294f197fe1 100644 --- a/oox/source/ppt/pptshape.cxx +++ b/oox/source/ppt/pptshape.cxx @@ -90,7 +90,7 @@ static const char* lclDebugSubType( sal_Int32 nType ) namespace { -bool ShapeHasNoVisualPropertiesOnImport(oox::ppt::PPTShape& rPPTShape) +bool ShapeHasNoVisualPropertiesOnImport(const oox::ppt::PPTShape& rPPTShape) { return !rPPTShape.hasNonInheritedShapeProperties() && !rPPTShape.hasShapeStyleRefs() @@ -126,6 +126,23 @@ oox::drawingml::TextListStylePtr PPTShape::getSubTypeTextListStyle( const SlideP return pTextListStyle; } +bool PPTShape::IsPlaceHolderCandidate(const SlidePersist& rSlidePersist) const +{ +if (meShapeLocation != Slide) +return false; +if (rSlidePersist.isNotesPage()) +return false; +auto pTextBody = getTextBody(); +if (!pTextBody) +return false; +auto rParagraphs = pTextBody->getParagraphs(); +if (rParagraphs.size() != 1) +return false; +if (rParagraphs.front()->getRuns().size() != 1) +return false; +return ShapeHasNoVisualPropertiesOnImport(*this); +} + void PPTShape::addShape( oox::core::XmlFilterBase& rFilterBase, const SlidePersist& rSlidePersist, @@ -193,10 +210,7 @@ void PPTShape::addShape( } break; case XML_dt : -if ( meShapeLocation == Slide && !rSlidePersist.isNotesPage() - && getTextBody()->getParagraphs().size() == 1 - && getTextBody()->getParagraphs().front()->getRuns().size() == 1 - && ShapeHasNoVisualPropertiesOnImport(*this) ) +if (IsPlaceHolderCandidate(rSlidePersist)) { TextRunPtr& pTextRun = getTextBody()->getParagraphs().front()->getRuns().front(); oox::drawingml::TextField* pTextField = dynamic_cast(pTextRun.get()); @@ -232,10 +246,7 @@ void PPTShape::addShape( bClearText = true; break; case XML_ftr : -if ( meShapeLocation == Slide && !rSlidePersist.isNotesPage() - && getTextBody()->getParagraphs().size() == 1 - && getTextBody()->getParagraphs().front()->getRuns().size() == 1 - && ShapeHasNoVisualPropertiesOnImport(*this) ) +if (IsPlaceHolderCandidate(rSlidePersist)) { const OUString& rFooterText = getTextBody()->toString(); @@ -253,10 +264,7 @@ void PPTShape::addShape( bClearText = true; break; case XML_sldNum : -if (meShapeLocation == Slide && !rSlidePersist.isNotesPage() -&& getTextBody()->getParagraphs().size() == 1 -&& getTextBody()->getParagraphs().front()->getRuns().size() == 1 -&& ShapeHasNoVisualPropertiesOnImport(*this)) +if (IsPlaceHolderCandidate(rSlidePersist)) { TextRunPtr& pTextRun = getTextBody()->getParagraphs().front()->getRuns().front(); diff --git a/sd/qa/unit/data/pptx/pass/ofz35597-1.pptx b/sd/qa/unit/data/pptx/pass/ofz35597-1.pptx new file mode 100644 index ..e7fcacc25482 Binary files /dev/null
[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.4' - sd/source
sd/source/filter/eppt/pptx-epptooxml.cxx | 16 ++-- 1 file changed, 10 insertions(+), 6 deletions(-) New commits: commit d5348dd66209697138529e41dd63ee17eff71b3c Author: Sarper Akdemir AuthorDate: Mon Jun 28 13:29:23 2021 +0300 Commit: Jan Holesovsky CommitDate: Wed Jun 30 09:53:57 2021 +0200 tdf#59323 tdf#142228 pptx export: fix datetime footers backwards compatibility Versions before 166671f4aa19deec47c10a220ae1d29fa57faa93 do not import the datetime field as expected if there's no text in the datetime field. To compensate that, added placeholder text "Date" inside them. Fixes regression from: 25ae0de974befb9c279936046056a850d77e0dca tdf#59323: pptx export: add support for slide footers Change-Id: I8e35102bc0bb9a2e540cfdd59fb0dc2a0b23f185 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118009 Reviewed-by: Jan Holesovsky Tested-by: Jenkins CollaboraOffice diff --git a/sd/source/filter/eppt/pptx-epptooxml.cxx b/sd/source/filter/eppt/pptx-epptooxml.cxx index e3619e8ce96b..5e93fbb446bf 100644 --- a/sd/source/filter/eppt/pptx-epptooxml.cxx +++ b/sd/source/filter/eppt/pptx-epptooxml.cxx @@ -1613,6 +1613,10 @@ ShapeExport& PowerPointShapeExport::WritePlaceholderReferenceTextBody( bool bIsDateTimeFixed = false; xPagePropSet->getPropertyValue("IsDateTimeFixed") >>= bIsDateTimeFixed; +// Ideally "Date" should be replaced with the formatted date text +// but since variable datetime overrides the text, this seems fine for now. +OUString aDateTimeText = "Date"; + if(ePageType != LAYOUT && !bIsDateTimeFixed) { sal_Int32 nDateTimeFormat = 0; @@ -1632,18 +1636,18 @@ ShapeExport& PowerPointShapeExport::WritePlaceholderReferenceTextBody( { OString aUUID(comphelper::xml::generateGUIDString()); mpFS->startElementNS(XML_a, XML_fld, XML_id, aUUID.getStr(), XML_type, aDateTimeType.toUtf8()); -mpFS->endElementNS(XML_a, XML_fld); } else { -OUString aDateTimeText; xPagePropSet->getPropertyValue("DateTimeText") >>= aDateTimeText; mpFS->startElementNS(XML_a, XML_r); -mpFS->startElementNS(XML_a, XML_t); -mpFS->writeEscaped(aDateTimeText); -mpFS->endElementNS(XML_a, XML_t); -mpFS->endElementNS(XML_a, XML_r); } + +mpFS->startElementNS(XML_a, XML_t); +mpFS->writeEscaped(aDateTimeText); +mpFS->endElementNS(XML_a, XML_t); + +mpFS->endElementNS(XML_a, bIsDateTimeFixed ? XML_r : XML_fld); break; } default: ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.4' - sd/qa
sd/qa/unit/export-tests-ooxml2.cxx |4 1 file changed, 4 insertions(+) New commits: commit 815d4bbb75e4124532790ead5c3ef29073aad2b7 Author: Sarper Akdemir AuthorDate: Mon Jun 28 17:13:42 2021 +0300 Commit: Jan Holesovsky CommitDate: Wed Jun 30 09:54:42 2021 +0200 tdf#59323 pptx export: test for datetime footer backwards compatibility Extends the existing pptx export slide footers test to make sure exported datetime footers will be importable by previous versions of Impress. Change-Id: I0026860adb9bebdacc5b2b10fe5d0bf9d7ab419f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117985 Tested-by: Jenkins CollaboraOffice Reviewed-by: Jan Holesovsky diff --git a/sd/qa/unit/export-tests-ooxml2.cxx b/sd/qa/unit/export-tests-ooxml2.cxx index f9ad89a6272f..747168ba6940 100644 --- a/sd/qa/unit/export-tests-ooxml2.cxx +++ b/sd/qa/unit/export-tests-ooxml2.cxx @@ -2822,6 +2822,10 @@ void SdOOXMLExportTest2::testTdf59323_slideFooters() assertXPath(pXmlDocSlide1, "//p:ph [@type='ftr']", "idx", "2"); assertXPath(pXmlDocSlide1, "//p:ph [@type='sldNum']", "idx", "3"); +// Test if datetime fields have text in them +// This is needed for backwards compatibility +assertXPath(pXmlDocSlide1, "//a:fld [@type='datetime1']/a:t"); + xDocShRef->DoClose(); } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.4' - oox/source sd/qa
oox/source/drawingml/textfield.cxx | 23 --- oox/source/export/drawingml.cxx|4 +++- sd/qa/unit/data/odp/numfmt.odp |binary sd/qa/unit/data/pptx/numfmt.pptx |binary sd/qa/unit/export-tests-ooxml2.cxx | 32 5 files changed, 35 insertions(+), 24 deletions(-) New commits: commit cfec09ebd15a301555a7c3d01bc0ed25aafc2dcc Author: Sarper Akdemir AuthorDate: Tue Jun 29 13:33:52 2021 +0300 Commit: Jan Holesovsky CommitDate: Wed Jun 30 10:09:22 2021 +0200 tdf#59323 tdf#142221: fix pptx datetime import export format fixed some problems from the original implementation of pptx datetime field formatting (2b0669eec0d86e973a7d8def8744c522bbf8af8b) also the comments on tests seemed to be based on en-IN which seems to differ a lot for SvxDateFormat::StdBig. So converted them to en-US's StdBig. expanded the tests, so it covers previously poorly imported types. Also made them use the SvxDateFormat and SvxTimeFormat Change-Id: I675c482d3095b5373975abb2e6e7eca2d353243d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118104 Tested-by: Jenkins CollaboraOffice Reviewed-by: Jan Holesovsky diff --git a/oox/source/drawingml/textfield.cxx b/oox/source/drawingml/textfield.cxx index d3fb06f94fc8..a8e058603f7a 100644 --- a/oox/source/drawingml/textfield.cxx +++ b/oox/source/drawingml/textfield.cxx @@ -220,21 +220,22 @@ SvxDateFormat TextField::getLODateFormat(std::u16string_view rDateTimeType) switch( nDateTimeNum ) { case 1: // Date dd/mm/ -case 2: // Date Day, Month dd, -case 5: // Date dd-Mon-yy -case 6: // Date Month yy -case 7: // Date Mon-yy case 8: // DateTime dd/mm/ H:MM PM case 9: // DateTime dd/mm/ H:MM:SS PM return SvxDateFormat::B; -case 3: // Date dd Month +case 2: // Date Day, Month dd, return SvxDateFormat::StdBig; -case 4: // Date Month dd, -return SvxDateFormat::StdSmall; -case 10: // Time H:MM -case 11: // Time H:MM:SS -case 12: // Time H:MM PM -case 13: // Time H:MM:SS PM +case 3: // Date dd Month +case 4: // Date Month dd, - no exact map +case 6: // Date Month yy - no exact map +return SvxDateFormat::D; +case 5: // Date dd-Mon-yy - no exact map +case 7: // Date Mon-yy - no exact map +return SvxDateFormat::C; +case 10: // Time H:MM - not a date format +case 11: // Time H:MM:SS - not a date format +case 12: // Time H:MM PM - not a date format +case 13: // Time H:MM:SS PM - not a date format default: return SvxDateFormat::AppDefault; } diff --git a/oox/source/export/drawingml.cxx b/oox/source/export/drawingml.cxx index 87898bb7d9d2..dacfe516585c 100644 --- a/oox/source/export/drawingml.cxx +++ b/oox/source/export/drawingml.cxx @@ -2193,11 +2193,13 @@ OUString DrawingML::GetDatetimeTypeFromDateTime(SvxDateFormat eDate, SvxTimeForm case SvxDateFormat::B: aDateField = "datetime1"; // 13/02/1996 break; -case SvxDateFormat::StdBig: case SvxDateFormat::C: +aDateField = "datetime5"; +break; case SvxDateFormat::D: aDateField = "datetime3"; // 13 February 1996 break; +case SvxDateFormat::StdBig: case SvxDateFormat::E: case SvxDateFormat::F: aDateField = "datetime2"; diff --git a/sd/qa/unit/data/odp/numfmt.odp b/sd/qa/unit/data/odp/numfmt.odp index 6fd32ce0a66d..51227ea091d9 100644 Binary files a/sd/qa/unit/data/odp/numfmt.odp and b/sd/qa/unit/data/odp/numfmt.odp differ diff --git a/sd/qa/unit/data/pptx/numfmt.pptx b/sd/qa/unit/data/pptx/numfmt.pptx index e5f0f5cf151a..f855fbbeb12c 100644 Binary files a/sd/qa/unit/data/pptx/numfmt.pptx and b/sd/qa/unit/data/pptx/numfmt.pptx differ diff --git a/sd/qa/unit/export-tests-ooxml2.cxx b/sd/qa/unit/export-tests-ooxml2.cxx index 747168ba6940..f005e4800e8e 100644 --- a/sd/qa/unit/export-tests-ooxml2.cxx +++ b/sd/qa/unit/export-tests-ooxml2.cxx @@ -12,6 +12,7 @@ #include #include #include +#include #include #include #include @@ -751,26 +752,33 @@ void matchNumberFormat( int nPage, uno::Reference< text::XTextField > const & xF xPropSet->getPropertyValue("NumberFormat") >>= nNumFmt; switch( nPage ) { -case 0: // 13/02/96 -CPPUNIT_ASSERT_EQUAL_MESSAGE("Number formats of Date fields don't match", sal_Int32(2), nNumFmt); +case 0: // 13/02/96 (StdSmall) +CPPUNIT_ASSERT_EQUAL_MESSAGE("Number formats of Date fields don't match", sal_Int32(SvxDateFormat::StdSmall), nNumFmt); break; case 1: // 13/02/1996 -CPPUNIT_ASSERT_EQUAL_MESSAGE("Number formats of Date fields don't match", sal_Int32(5), nNumFmt); +CPPUNIT_ASS
[Libreoffice-commits] core.git: Branch 'distro/collabora/co-2021' - oox/source sd/qa
oox/source/drawingml/textfield.cxx | 23 --- oox/source/export/drawingml.cxx|4 +++- sd/qa/unit/data/odp/numfmt.odp |binary sd/qa/unit/data/pptx/numfmt.pptx |binary sd/qa/unit/export-tests-ooxml2.cxx | 32 5 files changed, 35 insertions(+), 24 deletions(-) New commits: commit 95ac4476f85123b23b4058749501948b367ff233 Author: Sarper Akdemir AuthorDate: Tue Jun 29 13:33:52 2021 +0300 Commit: Jan Holesovsky CommitDate: Wed Jun 30 10:09:13 2021 +0200 tdf#59323 tdf#142221: fix pptx datetime import export format fixed some problems from the original implementation of pptx datetime field formatting (2b0669eec0d86e973a7d8def8744c522bbf8af8b) also the comments on tests seemed to be based on en-IN which seems to differ a lot for SvxDateFormat::StdBig. So converted them to en-US's StdBig. expanded the tests, so it covers previously poorly imported types. Also made them use the SvxDateFormat and SvxTimeFormat Change-Id: I675c482d3095b5373975abb2e6e7eca2d353243d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118105 Tested-by: Jenkins CollaboraOffice Reviewed-by: Jan Holesovsky diff --git a/oox/source/drawingml/textfield.cxx b/oox/source/drawingml/textfield.cxx index e590c5c7a2cb..0d33da71266d 100644 --- a/oox/source/drawingml/textfield.cxx +++ b/oox/source/drawingml/textfield.cxx @@ -218,21 +218,22 @@ SvxDateFormat TextField::getLODateFormat(std::u16string_view rDateTimeType) switch( nDateTimeNum ) { case 1: // Date dd/mm/ -case 2: // Date Day, Month dd, -case 5: // Date dd-Mon-yy -case 6: // Date Month yy -case 7: // Date Mon-yy case 8: // DateTime dd/mm/ H:MM PM case 9: // DateTime dd/mm/ H:MM:SS PM return SvxDateFormat::B; -case 3: // Date dd Month +case 2: // Date Day, Month dd, return SvxDateFormat::StdBig; -case 4: // Date Month dd, -return SvxDateFormat::StdSmall; -case 10: // Time H:MM -case 11: // Time H:MM:SS -case 12: // Time H:MM PM -case 13: // Time H:MM:SS PM +case 3: // Date dd Month +case 4: // Date Month dd, - no exact map +case 6: // Date Month yy - no exact map +return SvxDateFormat::D; +case 5: // Date dd-Mon-yy - no exact map +case 7: // Date Mon-yy - no exact map +return SvxDateFormat::C; +case 10: // Time H:MM - not a date format +case 11: // Time H:MM:SS - not a date format +case 12: // Time H:MM PM - not a date format +case 13: // Time H:MM:SS PM - not a date format default: return SvxDateFormat::AppDefault; } diff --git a/oox/source/export/drawingml.cxx b/oox/source/export/drawingml.cxx index 2c6928f6f1cb..960583c37380 100644 --- a/oox/source/export/drawingml.cxx +++ b/oox/source/export/drawingml.cxx @@ -2268,11 +2268,13 @@ OUString DrawingML::GetDatetimeTypeFromDateTime(SvxDateFormat eDate, SvxTimeForm case SvxDateFormat::B: aDateField = "datetime1"; // 13/02/1996 break; -case SvxDateFormat::StdBig: case SvxDateFormat::C: +aDateField = "datetime5"; +break; case SvxDateFormat::D: aDateField = "datetime3"; // 13 February 1996 break; +case SvxDateFormat::StdBig: case SvxDateFormat::E: case SvxDateFormat::F: aDateField = "datetime2"; diff --git a/sd/qa/unit/data/odp/numfmt.odp b/sd/qa/unit/data/odp/numfmt.odp index 6fd32ce0a66d..51227ea091d9 100644 Binary files a/sd/qa/unit/data/odp/numfmt.odp and b/sd/qa/unit/data/odp/numfmt.odp differ diff --git a/sd/qa/unit/data/pptx/numfmt.pptx b/sd/qa/unit/data/pptx/numfmt.pptx index e5f0f5cf151a..f855fbbeb12c 100644 Binary files a/sd/qa/unit/data/pptx/numfmt.pptx and b/sd/qa/unit/data/pptx/numfmt.pptx differ diff --git a/sd/qa/unit/export-tests-ooxml2.cxx b/sd/qa/unit/export-tests-ooxml2.cxx index ec756b19d7bb..503badcf3dde 100644 --- a/sd/qa/unit/export-tests-ooxml2.cxx +++ b/sd/qa/unit/export-tests-ooxml2.cxx @@ -12,6 +12,7 @@ #include #include #include +#include #include #include #include @@ -911,26 +912,33 @@ void matchNumberFormat( int nPage, uno::Reference< text::XTextField > const & xF xPropSet->getPropertyValue("NumberFormat") >>= nNumFmt; switch( nPage ) { -case 0: // 13/02/96 -CPPUNIT_ASSERT_EQUAL_MESSAGE("Number formats of Date fields don't match", sal_Int32(2), nNumFmt); +case 0: // 13/02/96 (StdSmall) +CPPUNIT_ASSERT_EQUAL_MESSAGE("Number formats of Date fields don't match", sal_Int32(SvxDateFormat::StdSmall), nNumFmt); break; case 1: // 13/02/1996 -CPPUNIT_ASSERT_EQUAL_MESSAGE("Number formats of Date fields don't match", sal_Int32(5), nNumFmt); +CPPUNIT_ASS
[Libreoffice-commits] core.git: Branch 'libreoffice-7-2' - vcl/unx
vcl/unx/gtk3/gtkinst.cxx | 31 ++- 1 file changed, 26 insertions(+), 5 deletions(-) New commits: commit a75915366490a562afeacb7fc1475d9fe874ee86 Author: Caolán McNamara AuthorDate: Tue Jun 29 17:14:13 2021 +0100 Commit: Caolán McNamara CommitDate: Wed Jun 30 10:10:15 2021 +0200 gtk[3|4] AnyInput wasn't doing anything useful under wayland which is going to be the case for all backends under gtk4 at least detect if there is evidence that the VCL_INPUT_ANY condition is true to curtail the idle spellchecking (etc) writer loop in favor of user interaction Change-Id: Id1cefd720a921e3a0d1d403769c544c15c6360e6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118126 Tested-by: Jenkins Reviewed-by: Caolán McNamara (cherry picked from commit 0f340ed4e814b445dbdd37b154015585769df589) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118102 diff --git a/vcl/unx/gtk3/gtkinst.cxx b/vcl/unx/gtk3/gtkinst.cxx index 65427f880bed..4a6001146f8b 100644 --- a/vcl/unx/gtk3/gtkinst.cxx +++ b/vcl/unx/gtk3/gtkinst.cxx @@ -438,17 +438,37 @@ bool GtkInstance::AnyInput( VclInputFlags nType ) static constexpr VclInputFlags ANY_INPUT_EXCLUDING_TIMER = VCL_INPUT_ANY & ~VclInputFlags::TIMER; +const bool bCheckForAnyInput = nType == ANY_INPUT_EXCLUDING_TIMER; + +bool bRet = false; + +#if defined(GDK_WINDOWING_WAYLAND) +if (bCheckForAnyInput) +{ +GdkDisplay* pDisplay = gdk_display_get_default(); +if (DLSYM_GDK_IS_WAYLAND_DISPLAY(pDisplay)) +{ +wl_display* pWLDisplay = gdk_wayland_display_get_wl_display(pDisplay); +static auto wayland_display_get_fd = reinterpret_cast(dlsym(nullptr, "wl_display_get_fd")); +if (wayland_display_get_fd) +{ +GPollFD aPollFD; +aPollFD.fd = wayland_display_get_fd(pWLDisplay); +aPollFD.events = G_IO_IN | G_IO_ERR | G_IO_HUP; +bRet = g_poll(&aPollFD, 1, 0) > 0; +} +} +} +#endif + #if !GTK_CHECK_VERSION(4, 0, 0) GdkDisplay* pDisplay = gdk_display_get_default(); if (!gdk_display_has_pending(pDisplay)) -return false; -#endif +return bRet; -if (nType == ANY_INPUT_EXCLUDING_TIMER) +if (bCheckForAnyInput) return true; -bool bRet = false; -#if !GTK_CHECK_VERSION(4, 0, 0) std::deque aEvents; GdkEvent *pEvent = nullptr; while ((pEvent = gdk_display_get_event(pDisplay))) @@ -469,6 +489,7 @@ bool GtkInstance::AnyInput( VclInputFlags nType ) aEvents.pop_front(); } #endif + return bRet; } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: vcl/source
vcl/source/window/window2.cxx | 13 + 1 file changed, 5 insertions(+), 8 deletions(-) New commits: commit 0aea0cee58fe77a9058217dfdfc3d6a02b29ee2a Author: Caolán McNamara AuthorDate: Tue Jun 29 20:50:04 2021 +0100 Commit: Caolán McNamara CommitDate: Wed Jun 30 10:10:53 2021 +0200 WinFloatRound has the same content as FRound Change-Id: Iaf1565d937ded7ab675ab216aef0100dd7af92e4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118136 Tested-by: Jenkins Reviewed-by: Caolán McNamara diff --git a/vcl/source/window/window2.cxx b/vcl/source/window/window2.cxx index 3975629e5838..db6f493cc342 100644 --- a/vcl/source/window/window2.cxx +++ b/vcl/source/window/window2.cxx @@ -22,6 +22,8 @@ #include #include +#include + #include #include #include @@ -369,11 +371,6 @@ void Window::SetZoom( const Fraction& rZoom ) } } -static tools::Long WinFloatRound( double fVal ) -{ -return( fVal > 0.0 ? static_cast( fVal + 0.5 ) : -static_cast( -fVal + 0.5 ) ); -} - void Window::SetZoomedPointFont(vcl::RenderContext& rRenderContext, const vcl::Font& rFont) { const Fraction& rZoom = GetZoom(); @@ -381,8 +378,8 @@ void Window::SetZoomedPointFont(vcl::RenderContext& rRenderContext, const vcl::F { vcl::Font aFont(rFont); Size aSize = aFont.GetFontSize(); -aSize.setWidth( WinFloatRound(double(aSize.Width() * rZoom)) ); -aSize.setHeight( WinFloatRound(double(aSize.Height() * rZoom)) ); +aSize.setWidth( FRound(double(aSize.Width() * rZoom)) ); +aSize.setHeight( FRound(double(aSize.Height() * rZoom)) ); aFont.SetFontSize(aSize); SetPointFont(rRenderContext, aFont); } @@ -399,7 +396,7 @@ tools::Long Window::CalcZoom( tools::Long nCalc ) const if ( rZoom.GetNumerator() != rZoom.GetDenominator() ) { double n = double(nCalc * rZoom); -nCalc = WinFloatRound( n ); +nCalc = FRound( n ); } return nCalc; } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.4' - sc/source
sc/source/core/data/global.cxx |3 ++- sc/source/ui/drawfunc/fusel.cxx |3 ++- sc/source/ui/view/gridwin5.cxx |4 +++- 3 files changed, 7 insertions(+), 3 deletions(-) New commits: commit 5e5628c2acb3ce02adb091f56aa6b7b89427c621 Author: Miklos Vajna AuthorDate: Tue Jun 29 13:54:00 2021 +0200 Commit: Michael Meeks CommitDate: Wed Jun 30 10:11:50 2021 +0200 sc: don't require ctrl-click when clicking on internal links of shapes Excel doesn't require such additional actions, and Writer doesn't require ctrl-click for internal links (e.g. cross-references), either. Also suppress the tooltip hinting ctrl-click in this case. (cherry picked from commit 1b7fc505bdd6c3c44986221c6bbe33af1a0e3ac6) Change-Id: If2fbec533f5c2a57268a22cf96464e724922ff7f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118120 Tested-by: Michael Meeks Reviewed-by: Michael Meeks diff --git a/sc/source/core/data/global.cxx b/sc/source/core/data/global.cxx index 050fd823b4ee..ec9cebf3e66d 100644 --- a/sc/source/core/data/global.cxx +++ b/sc/source/core/data/global.cxx @@ -780,7 +780,8 @@ void ScGlobal::OpenURL(const OUString& rURL, const OUString& rTarget, bool bIgno // OpenURL is always called in the GridWindow by mouse clicks in some way or another. // That's why pScActiveViewShell and nScClickMouseModifier are correct. -if (!bIgnoreSettings && !ShouldOpenURL()) +// Fragments pointing into the current document should be always opened. +if (!bIgnoreSettings && !(ShouldOpenURL() || rURL.startsWith("#"))) return; SfxViewFrame* pViewFrm = SfxViewFrame::Current(); diff --git a/sc/source/ui/drawfunc/fusel.cxx b/sc/source/ui/drawfunc/fusel.cxx index e3c306574a73..8f4badd28ecb 100644 --- a/sc/source/ui/drawfunc/fusel.cxx +++ b/sc/source/ui/drawfunc/fusel.cxx @@ -222,7 +222,8 @@ bool FuSelection::MouseButtonDown(const MouseEvent& rMEvt) } // open hyperlink, if found at object or in object's text -if ( !sURL.isEmpty() && ScGlobal::ShouldOpenURL() ) +// Fragments pointing into the current document should be always opened. +if ( !sURL.isEmpty() && (ScGlobal::ShouldOpenURL() || sURL.startsWith("#")) ) { ScGlobal::OpenURL( sURL, sTarget ); rViewShell.FakeButtonUp( rViewShell.GetViewData().GetActivePart() ); diff --git a/sc/source/ui/view/gridwin5.cxx b/sc/source/ui/view/gridwin5.cxx index b940ffe200b1..40746907fafc 100644 --- a/sc/source/ui/view/gridwin5.cxx +++ b/sc/source/ui/view/gridwin5.cxx @@ -292,7 +292,9 @@ void ScGridWindow::RequestHelp(const HelpEvent& rHEvt) pObj = pHit; } ScMacroInfo* pInfo = ScDrawLayer::GetMacroInfo( pObj ); -if ( pInfo && (pInfo->GetHlink().getLength() > 0) ) +// Fragments pointing into the current document need no tooltip +// describing the ctrl-click functionality. +if ( pInfo && (pInfo->GetHlink().getLength() > 0) && !pInfo->GetHlink().startsWith("#") ) { aPixRect = LogicToPixel(aVEvt.pObj->GetLogicRect()); aHelpText = SfxHelp::GetURLHelpText(pInfo->GetHlink()); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: wizards/Package_scriptforge.mk wizards/source
wizards/Package_scriptforge.mk |1 wizards/source/scriptforge/po/pt.po | 1141 2 files changed, 1142 insertions(+) New commits: commit 1b7d564ee8c75d35dc2b8cb99afcad499c9e6fb7 Author: Rafael Lima AuthorDate: Tue Jun 29 13:15:01 2021 +0200 Commit: Jean-Pierre Ledure CommitDate: Wed Jun 30 10:44:21 2021 +0200 Add Portuguese support to ScriptForge library (l10n) Change-Id: I04341059becb36467795a2aa1d5c2f573fe1bc6f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118092 Tested-by: Jenkins Reviewed-by: Jean-Pierre Ledure diff --git a/wizards/Package_scriptforge.mk b/wizards/Package_scriptforge.mk index 13742b29b250..f9494e7d9c2d 100644 --- a/wizards/Package_scriptforge.mk +++ b/wizards/Package_scriptforge.mk @@ -51,6 +51,7 @@ $(eval $(call gb_Package_add_files,wizards_basicsrvscriptforge,$(LIBO_SHARE_FOLD $(eval $(call gb_Package_add_files,wizards_basicsrvscriptforge,$(LIBO_SHARE_FOLDER)/basic/ScriptForge/po,\ po/ScriptForge.pot \ po/en.po \ + po/pt.po \ )) $(eval $(call gb_Package_add_files,wizards_basicsrvscriptforge,$(LIBO_LIB_PYUNO_FOLDER),\ diff --git a/wizards/source/scriptforge/po/pt.po b/wizards/source/scriptforge/po/pt.po new file mode 100644 index ..a40aafd4c1fa --- /dev/null +++ b/wizards/source/scriptforge/po/pt.po @@ -0,0 +1,1141 @@ +# +# This pristine POT file has been generated by LibreOffice/ScriptForge +# Full documentation is available on https://help.libreoffice.org/ +# +# * +# *** The ScriptForge library and its associated libraries *** +# *** are part of the LibreOffice project. *** +# * +# +# ScriptForge Release 7.3 +# --- +# +msgid "" +msgstr "" +"Project-Id-Version: \n" +"Report-Msgid-Bugs-To: https://bugs.libreoffice.org/enter_bug.cgi?"; +"product=LibreOffice&bug_status=UNCONFIRMED&component=UI\n" +"POT-Creation-Date: 2021-06-19 16:57:15\n" +"PO-Revision-Date: 2021-06-28 18:30-0300\n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=(n > 1);\n" +"X-Generator: Poedit 3.0\n" +"X-Accelerator-Marker: ~\n" +"Last-Translator: \n" +"Language: pt_BR\n" + +#. Text in close buttons of progress and console dialog boxes +msgctxt "CLOSEBUTTON" +msgid "Close" +msgstr "Fechar" + +#. Title in error message box +#. %1: an error number +#, kde-format +msgctxt "ERRORNUMBER" +msgid "Error %1" +msgstr "Erro %1" + +#. Error message box +#. %1: a line number +#, kde-format +msgctxt "ERRORLOCATION" +msgid "Location : %1" +msgstr "Localização : %1" + +#. Logfile record +#, kde-format +msgctxt "LONGERRORDESC" +msgid "Error %1 - Location = %2 - Description = %3" +msgstr "Erro %1 - Localização = %2 - Descrição = %3" + +#. SF_Utils._Validate error message +msgctxt "STOPEXECUTION" +msgid "THE EXECUTION IS CANCELLED." +msgstr "A EXECUÇÃO FOI CANCELADA." + +#. SF_Exception.RaiseAbort error message +msgctxt "INTERNALERROR" +msgid "" +"The ScriptForge library has crashed. The reason is unknown.\n" +"Maybe a bug that could be reported on\n" +"https://bugs.documentfoundation.org/\n"; +"\n" +"More details : \n" +"\n" +msgstr "" +"A biblioteca ScriptForge encontrou um erro grave. A razão é desconhecida.\n" +"Talvez seja um bug que pode ser relatado em\n" +"https://bugs.documentfoundation.org/\n"; +"\n" +"Mais detalhes: \n" +"\n" + +#. SF_Utils._Validate error message +#. %1: probably ScriptForge +#. %2: service or module name +#. %3: property or method name where the error occurred +#, kde-format +msgctxt "VALIDATESOURCE" +msgid "" +"Library : %1\n" +"Service : %2\n" +"Method :%3" +msgstr "" +"Biblioteca : %1\n" +"Serviço : %2\n" +"Método : %3" + +#. SF_Utils._Validate error message +#. %1: list of arguments of the method +#, kde-format +msgctxt "VALIDATEARGS" +msgid "Arguments: %1" +msgstr "Argumentos: %1" + +#. SF_Utils._Validate error message +#. %1: Wrong argument name +#, kde-format +msgctxt "VALIDATEERROR" +msgid "A serious error has been detected in your code on argument : « %1 »." +msgstr "Um erro grave foi detectado em seu código no argumento : « %1»." + +#. SF_Utils.Validate error message +msgctxt "VALIDATIONRULES" +msgid "Validation rules :" +msgstr "Regras de validação:" + +#. SF_Utils._Validate error message +#. %1: Wrong argument name +#. %2: Comma separated list of allowed types +#, kde-format +msgctxt "VALIDATETYPES" +msgid "« %1 » must have next type (or one of next types) : %2" +msgstr "" +"« %1 » deve ter o seguinte tipo (ou um dos tipos a seguir) : %2" + +#. SF_Utils._Validate error message +#. %1: Wrong argument name +#. %2: Comma separated list of allowed values +#, kde-format +msgctxt "VALIDATEVALUES" +msgid "
Re: Where are my files?
You sent this request to the wrong mailing list. It should have been to us...@global.libreoffice.org. where general questions like yours are sent. You sent it to the mailing list for developers, the people who work on the code for LibreOffice. I have done so for you. How have you searched for these files, and do you know the names of them? Also, were you doing something in LibreOffice when it restarted? Have you used your operating system to search for the files, or did you just use LibreOffice? If you use windows, the files should be in your Document folder which is the default setting. For others on the mailing list: any replies you make to this question should include a CC to zhangyviv...@gmail.com as he is not likely yet subscribed to it. Dan On 6/29/21 5:27 PM, Vivian Zhang wrote: Hello. LibreOffice restarted and now I can't find the files I have been working on for months now. Very upsetting. Not pleased. Will be happy if you help me find my irreplaceable files. Thank you. ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice
[Libreoffice-commits] core.git: include/svx svx/inc svx/source
include/svx/strings.hrc| 16 +--- svx/inc/strings.hxx| 16 +--- svx/source/unodraw/unoprov.cxx | 23 +-- 3 files changed, 47 insertions(+), 8 deletions(-) New commits: commit 8b3ff370ab0fe2e7593a69513c8ff3df35810c4e Author: Gabor Kelemen AuthorDate: Thu Jun 10 23:10:34 2021 +0200 Commit: László Németh CommitDate: Wed Jun 30 11:03:39 2021 +0200 tdf#139301 tdf#141933 (related) Translate new preset dash names Change-Id: I9cd7ad0eca1a6fb471a284fb2828a7ad12816337 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117024 Tested-by: Jenkins Tested-by: László Németh Reviewed-by: László Németh diff --git a/include/svx/strings.hrc b/include/svx/strings.hrc index 4ac04ffb2fea..c1bbf42205f8 100644 --- a/include/svx/strings.hrc +++ b/include/svx/strings.hrc @@ -910,7 +910,7 @@ #define RID_SVXSTR_BMP78 NC_("RID_SVXSTR_BMP78", "Solid Dotted") #define RID_SVXSTR_DASH0 NC_("RID_SVXSTR_DASH0", "Dot") #define RID_SVXSTR_DASH1 NC_("RID_SVXSTR_DASH1", "Long Dot") -#define RID_SVXSTR_DASH2 NC_("RID_SVXSTR_DASH2", "Double Dot") +#define RID_SVXSTR_DASH2 NC_("RID_SVXSTR_DASH2", "Dot (Rounded)") #define RID_SVXSTR_DASH3 NC_("RID_SVXSTR_DASH3", "Dash") #define RID_SVXSTR_DASH4 NC_("RID_SVXSTR_DASH4", "Long Dash") #define RID_SVXSTR_DASH5 NC_("RID_SVXSTR_DASH5", "Double Dash") @@ -928,8 +928,18 @@ #define RID_SVXSTR_DASH17 NC_("RID_SVXSTR_DASH17", "Ultrafine 2 Dots 3 Dashes") #define RID_SVXSTR_DASH18 NC_("RID_SVXSTR_DASH18", "2 Dots 1 Dash") #define RID_SVXSTR_DASH19 NC_("RID_SVXSTR_DASH19", "Line with Fine Dots") -#define RID_SVXSTR_DASH20 NC_("RID_SVXSTR_DASH20", "Dashed") -#define RID_SVXSTR_DASH21 NC_("RID_SVXSTR_DASH21", "Line Style") +#define RID_SVXSTR_DASH20 NC_("RID_SVXSTR_DASH20", "Dash Dot") +#define RID_SVXSTR_DASH21 NC_("RID_SVXSTR_DASH21", "Long Dot (Rounded)") +#define RID_SVXSTR_DASH22 NC_("RID_SVXSTR_DASH22", "Dash Dot Dot") +#define RID_SVXSTR_DASH23 NC_("RID_SVXSTR_DASH23", "Dash (Rounded)") +#define RID_SVXSTR_DASH24 NC_("RID_SVXSTR_DASH24", "Long Dash (Rounded)") +#define RID_SVXSTR_DASH25 NC_("RID_SVXSTR_DASH25", "Double Dash (Rounded)") +#define RID_SVXSTR_DASH26 NC_("RID_SVXSTR_DASH26", "Dash Dot (Rounded)") +#define RID_SVXSTR_DASH27 NC_("RID_SVXSTR_DASH27", "Long Dash Dot (Rounded)") +#define RID_SVXSTR_DASH28 NC_("RID_SVXSTR_DASH28", "Double Dash Dot (Rounded)") +#define RID_SVXSTR_DASH29 NC_("RID_SVXSTR_DASH29", "Dash Dot Dot (Rounded)") +#define RID_SVXSTR_DASH30 NC_("RID_SVXSTR_DASH30", "Double Dash Dot Dot (Rounded)") + #define RID_SVXSTR_IMAP_ALL_FILTER NC_("RID_SVXSTR_IMAP_ALL_FILTER", "All formats") // To translators: this is an arrow head style #define RID_SVXSTR_LEND0 NC_("RID_SVXSTR_LEND0", "Concave short") diff --git a/svx/inc/strings.hxx b/svx/inc/strings.hxx index dddaf3126ae0..876ee86314d5 100644 --- a/svx/inc/strings.hxx +++ b/svx/inc/strings.hxx @@ -318,7 +318,7 @@ // Reference-strings for standard-dash-table #define RID_SVXSTR_DASH0_DEF"Dot" #define RID_SVXSTR_DASH1_DEF"Long Dot" -#define RID_SVXSTR_DASH2_DEF"Double Dot" +#define RID_SVXSTR_DASH2_DEF"Dot (Rounded)" #define RID_SVXSTR_DASH3_DEF"Dash" #define RID_SVXSTR_DASH4_DEF"Long Dash" #define RID_SVXSTR_DASH5_DEF"Double Dash" @@ -336,8 +336,18 @@ #define RID_SVXSTR_DASH17_DEF "Ultrafine 2 Dots 3 Dashes" #define RID_SVXSTR_DASH18_DEF "2 Dots 1 Dash" #define RID_SVXSTR_DASH19_DEF "Line with Fine Dots" -#define RID_SVXSTR_DASH20_DEF "Dash" -#define RID_SVXSTR_DASH21_DEF "Line Style" +#define RID_SVXSTR_DASH20_DEF "Dash Dot" +#define RID_SVXSTR_DASH21_DEF "Long Dot (Rounded)" +#define RID_SVXSTR_DASH22_DEF "Dash Dot Dot" +#define RID_SVXSTR_DASH23_DEF
Re: Is ScAreaLink::RefreshHdl run too often?
On 29/06/2021 18.51, Noel Grandin wrote: I have seen the same problem in another application I maintain. My solution is that the repeat-delay time specified in my timers is always the time between the end of one invocation of a timer, and the start of the next invocation of that timer. guess that works in many cases, but perhaps we have timers that need to run at e.g. 60hz like for example animations in slideshows? (i don't actually know if that's the case) ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice
[Libreoffice-commits] core.git: unotools/qa unotools/source
unotools/qa/complex/tempfile/Test01.java |2 ++ unotools/qa/complex/tempfile/TestHelper.java |1 + unotools/source/ucbhelper/xtempfile.cxx |7 ++- 3 files changed, 9 insertions(+), 1 deletion(-) New commits: commit ecea9c42d5f1a5e63493fcd92944bd49fb91b338 Author: Noel Grandin AuthorDate: Wed Jun 30 10:30:25 2021 +0200 Commit: Noel Grandin CommitDate: Wed Jun 30 11:30:49 2021 +0200 fix failure in JunitTest_unotools_complex Temp files created from OTempFileService are always opened with StreamMode::SHARE_DENYALL. So normally you can't open them twice. But the JunitTest_unotools_complex unit test used to work because it exploited a pessimisation in OTempFileService, where that code would close the file when we read to the end. Which meant that the unit test could open it again and read it. However, in commit 218f36dd614cf828e949f605faaf6a6fd615da26 Date: Sun Jun 20 18:51:12 2021 +0200 tdf#135316 remove OTempFileService pessimisation I removed that pessimisation. So make the share mode a little more permissive. Change-Id: I297a5c9c0505816b399fad29414077d03231ec72 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118146 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/unotools/qa/complex/tempfile/Test01.java b/unotools/qa/complex/tempfile/Test01.java index f93b02186e8d..ca81e1801bef 100644 --- a/unotools/qa/complex/tempfile/Test01.java +++ b/unotools/qa/complex/tempfile/Test01.java @@ -51,6 +51,8 @@ public class Test01 { //compare the file name with the name in the URL. sFileURL = m_aTestHelper.GetTempFileURL( xTempFile ); sFileName = m_aTestHelper.GetTempFileName( xTempFile ); +m_aTestHelper.Message( "Tempfile URL: " + sFileURL ); +m_aTestHelper.Message( "Tempfile name: " + sFileName ); m_aTestHelper.CompareFileNameAndURL( sFileName, sFileURL ); //write to the stream using the service. diff --git a/unotools/qa/complex/tempfile/TestHelper.java b/unotools/qa/complex/tempfile/TestHelper.java index 821c33da054b..9ea42b102673 100644 --- a/unotools/qa/complex/tempfile/TestHelper.java +++ b/unotools/qa/complex/tempfile/TestHelper.java @@ -78,6 +78,7 @@ public class TestHelper { public void ReadDirectlyFromTempFile( byte [][] pBytes, int nBytes, XSimpleFileAccess xSFA, String sTempFileURL ) throws java.lang.Exception { +Message ( "Attempting to read directly from " + sTempFileURL ); XInputStream xInTemp = xSFA.openFileRead( sTempFileURL ); if ( xInTemp == null ) throw new java.lang.Exception("Cannot create input stream from URL."); diff --git a/unotools/source/ucbhelper/xtempfile.cxx b/unotools/source/ucbhelper/xtempfile.cxx index 0cc0d8904bac..d0f566c9e26c 100644 --- a/unotools/source/ucbhelper/xtempfile.cxx +++ b/unotools/source/ucbhelper/xtempfile.cxx @@ -234,7 +234,12 @@ void OTempFileService::checkError () const void OTempFileService::checkConnected () { if (!mpStream && mpTempFile) -mpStream = mpTempFile->GetStream( StreamMode::STD_READWRITE ); +{ +// Ideally we should open this SHARE_DENYALL, but the JunitTest_unotools_complex test wants to open +// this file directly and read from it. +mpStream = mpTempFile->GetStream(StreamMode::READ | StreamMode::WRITE + | StreamMode::SHARE_DENYWRITE); +} if (!mpStream) throw css::io::NotConnectedException ( OUString(), static_cast < css::uno::XWeak * > (this ) ); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: sc/source
sc/source/ui/unoobj/filtuno.cxx |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) New commits: commit 6e8c9047f4bf6194bd1423422bd2dc9f92c50725 Author: Andreas Heinisch AuthorDate: Wed Jun 30 10:37:08 2021 +0200 Commit: Andreas Heinisch CommitDate: Wed Jun 30 12:05:03 2021 +0200 tdf#132421 - don't URL encode filename for the import ASCII dialog title Change-Id: Ia2cb7b6b355f640a525c41606da25ba35771499b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118148 Tested-by: Jenkins Reviewed-by: Andreas Heinisch diff --git a/sc/source/ui/unoobj/filtuno.cxx b/sc/source/ui/unoobj/filtuno.cxx index 1e6119ecb36d..fbea6e78aa19 100644 --- a/sc/source/ui/unoobj/filtuno.cxx +++ b/sc/source/ui/unoobj/filtuno.cxx @@ -182,7 +182,8 @@ sal_Int16 SAL_CALL ScFilterOptionsObj::execute() // ascii import is special... INetURLObject aURL( aFileName ); -OUString aPrivDatName(aURL.getName()); +// tdf#132421 - don't URL encode filename for the import ASCII dialog title +OUString aPrivDatName(aURL.GetLastName(INetURLObject::DecodeMechanism::Unambiguous)); std::unique_ptr pInStream; if ( xInputStream.is() ) pInStream = utl::UcbStreamHelper::CreateStream( xInputStream ); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'distro/collabora/co-2021' - sw/source
sw/source/ui/frmdlg/column.cxx |7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) New commits: commit 9f3367a92c65fd9612e3dc73675e52593bfac0ce Author: Mike Kaganski AuthorDate: Mon Jun 28 23:12:24 2021 +0200 Commit: Mike Kaganski CommitDate: Wed Jun 30 12:21:28 2021 +0200 tdf#143107 related: ensure correct order of which ids ... discovered after 8aaa28ed43978a9a4a20d62368410a57ec05c23f Change-Id: I1a14d227414210393c00c395486ede6daa438218 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118053 Tested-by: Jenkins Reviewed-by: Mike Kaganski (cherry picked from commit 7c95c16deba975b0b282ccea1fbfcfadd7aa28b3) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118106 Tested-by: Jenkins CollaboraOffice diff --git a/sw/source/ui/frmdlg/column.cxx b/sw/source/ui/frmdlg/column.cxx index 4adf7cb34447..97db736aeee6 100644 --- a/sw/source/ui/frmdlg/column.cxx +++ b/sw/source/ui/frmdlg/column.cxx @@ -98,10 +98,9 @@ SwColumnDlg::SwColumnDlg(weld::Window* pParent, SwWrtShell& rSh) m_nSelectionWidth = aRect.Width(); SfxItemSet* pColPgSet = nullptr; -static sal_uInt16 const aSectIds[] = { RES_COL, RES_COL, -RES_FRM_SIZE, RES_FRM_SIZE, -RES_COLUMNBALANCE, RES_FRAMEDIR, -0 }; +static svl::Items const aSectIds; const SwSection* pCurrSection = m_rWrtShell.GetCurrSection(); const sal_uInt16 nFullSectCnt = m_rWrtShell.GetFullSelectedSectionCount(); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: sc/qa sd/qa uitest/uitest
sc/qa/uitest/calc_tests8/tdf126248.py|3 sd/qa/uitest/impress_tests/autocorrectOptions.py | 164 +++ sd/qa/uitest/impress_tests/customSlideShow.py| 81 +-- sd/qa/uitest/impress_tests/insertSlide.py| 60 +++- sd/qa/uitest/impress_tests/masterElements.py | 40 ++--- sd/qa/uitest/impress_tests/masterSlides.py | 35 ++-- sd/qa/uitest/impress_tests/renameSlide.py| 37 ++--- sd/qa/uitest/impress_tests/slideShowSettings.py | 79 +-- sd/qa/uitest/impress_tests/tdf106612.py | 39 ++--- sd/qa/uitest/impress_tests/tdf125449.py | 82 +-- sd/qa/uitest/impress_tests/tdf126605.py | 21 +- sd/qa/uitest/impress_tests/tdf130440.py | 64 sd/qa/uitest/impress_tests/tdf134734.py | 154 ++--- sd/qa/uitest/impress_tests/tdf137729.py | 48 +++--- sd/qa/uitest/impress_tests/tdf139511.py | 45 ++ sd/qa/uitest/impress_tests/tdf141297.py | 91 ++-- sd/qa/uitest/impress_tests/tdf141708.py | 23 +-- sd/qa/uitest/impress_tests/tdf82616.py | 68 - sd/qa/uitest/impress_tests/tdf91762.py | 44 ++ sd/qa/uitest/impress_tests/textColumnsDialog.py |3 uitest/uitest/test.py| 10 + uitest/uitest/uihelper/guarded.py| 22 --- 22 files changed, 584 insertions(+), 629 deletions(-) New commits: commit f7300b2f07f308118967c797206dbc4a1e9a61a4 Author: Xisco Fauli AuthorDate: Tue Jun 29 22:35:46 2021 +0200 Commit: Xisco Fauli CommitDate: Wed Jun 30 13:17:07 2021 +0200 uitest: guard create_doc_in_start_center in sd Mostly done by a script for motivation, see 89aaa17a0a4413f07da2bc5084b0164f15dc01ac < UITest: introduce guarded context managers > Change-Id: I314f3e2245bf57538073499f60528a455cba1a91 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118138 Tested-by: Jenkins Reviewed-by: Xisco Fauli diff --git a/sc/qa/uitest/calc_tests8/tdf126248.py b/sc/qa/uitest/calc_tests8/tdf126248.py index 773518c6e35b..f314e1a7d64c 100644 --- a/sc/qa/uitest/calc_tests8/tdf126248.py +++ b/sc/qa/uitest/calc_tests8/tdf126248.py @@ -11,7 +11,6 @@ from libreoffice.uno.propertyvalue import mkPropertyValues from uitest.uihelper.calc import enter_text_to_cell from uitest.uihelper.common import select_pos from uitest.uihelper.common import select_by_text -from uitest.uihelper import guarded class tdf126248(UITestCase): @@ -49,7 +48,7 @@ class tdf126248(UITestCase): def test_tdf126248(self): -with guarded.create_doc_in_start_center(self, "calc"): +with self.ui_test.create_doc_in_start_center_guarded("calc"): self.changeLocalSetting("Chinese (traditional)") diff --git a/sd/qa/uitest/impress_tests/autocorrectOptions.py b/sd/qa/uitest/impress_tests/autocorrectOptions.py index a8135bca4831..c91ba95b0fa2 100644 --- a/sd/qa/uitest/impress_tests/autocorrectOptions.py +++ b/sd/qa/uitest/impress_tests/autocorrectOptions.py @@ -14,88 +14,86 @@ from uitest.uihelper.common import select_pos class autocorrectOptions(UITestCase): def test_autocorrect_options_impress(self): -self.ui_test.create_doc_in_start_center("impress") -xTemplateDlg = self.xUITest.getTopFocusWindow() -xCancelBtn = xTemplateDlg.getChild("close") -self.ui_test.close_dialog_through_button(xCancelBtn) -document = self.ui_test.get_component() - -with self.ui_test.execute_dialog_through_command(".uno:AutoCorrectDlg", close_button="cancel") as xDialog: -xTabs = xDialog.getChild("tabcontrol") -select_pos(xTabs, "0") #tab replace -origtext = xDialog.getChild("origtext") -newtext = xDialog.getChild("newtext") -xnew = xDialog.getChild("new") -xdelete = xDialog.getChild("delete") -xtabview = xDialog.getChild("tabview") -xreset = xDialog.getChild("reset") -nrRows = get_state_as_dict(xtabview)["VisibleCount"] - -self.assertTrue(int(nrRows) > 0) - -#add new rule -origtext.executeAction("TYPE", mkPropertyValues({"KEYCODE":"CTRL+A"})) -origtext.executeAction("TYPE", mkPropertyValues({"KEYCODE":"BACKSPACE"})) -origtext.executeAction("TYPE", mkPropertyValues({"TEXT":""})) -newtext.executeAction("TYPE", mkPropertyValues({"KEYCODE":"CTRL+A"})) -newtext.executeAction("TYPE", mkPropertyValues({"KEYCODE":"BACKSPACE"})) -newtext.executeAction("TYPE", mkPropertyValues({"TEXT":"dvojtecky"})) -xnew.executeAction("CLICK", tuple()) -nrRowsNew = get_state_as_dict(xtabview)["VisibleCount"] -nrRowsDiff = int(nrRowsNew) - int(nrRows) -self.assertEqual(nrRowsDiff, 1) #we have +1 rule -#d
[Libreoffice-commits] core.git: sw/qa
sw/qa/uitest/chapterNumbering/chapterNumbering.py | 114 -- sw/qa/uitest/chapterNumbering/tdf140528.py | 42 sw/qa/uitest/chart/tdf138556.py | 55 sw/qa/uitest/classification/classification.py | 216 +-- sw/qa/uitest/findBar/findbar.py | 79 - sw/qa/uitest/findBar/tdf136941.py | 65 - sw/qa/uitest/findBar/tdf138232.py | 45 sw/qa/uitest/findBar/tdf88608.py| 51 sw/qa/uitest/findReplace/findReplace.py | 78 - sw/qa/uitest/findReplace/tdf106099.py | 46 sw/qa/uitest/findReplace/tdf119462.py | 44 sw/qa/uitest/librelogo/run.py | 80 - sw/qa/uitest/macro_tests/tdf124413.py | 55 sw/qa/uitest/macro_tests/tdf64690.py| 73 - sw/qa/uitest/navigator/tdf137274.py | 61 - sw/qa/uitest/navigator/tdf140257.py | 114 -- sw/qa/uitest/options/optionsDialog.py | 50 sw/qa/uitest/options/tdf131581.py | 27 sw/qa/uitest/options/tdf78133.py| 48 sw/qa/uitest/sidebar/stylesSidebar.py | 77 - sw/qa/uitest/sidebar/tdf133189.py | 119 +- sw/qa/uitest/sidebar/tdf135590.py | 77 - sw/qa/uitest/styleInspector/tdf137105.py| 48 sw/qa/uitest/styleInspector/tdf137513.py| 65 - sw/qa/uitest/table/insertTableDialog.py | 66 - sw/qa/uitest/table/sheetToTable.py | 20 sw/qa/uitest/table/tdf115026.py | 21 sw/qa/uitest/table/tdf116737.py | 42 sw/qa/uitest/table/tdf128593.py | 33 sw/qa/uitest/table/textToTable.py | 38 sw/qa/uitest/ui/fmtui/fmtui.py | 28 sw/qa/uitest/ui/index/index.py | 70 - sw/qa/uitest/writer_tests/comments.py | 240 ++-- sw/qa/uitest/writer_tests/insertCaption.py | 58 - sw/qa/uitest/writer_tests/tdf134734.py | 114 -- sw/qa/uitest/writer_tests/tdf137459_editeng_ctrl-DEL.py | 23 sw/qa/uitest/writer_tests/tdf53460.py | 102 - sw/qa/uitest/writer_tests/tdf78068.py | 22 sw/qa/uitest/writer_tests/tdf93068.py | 46 sw/qa/uitest/writer_tests/trackedChanges.py | 191 +-- sw/qa/uitest/writer_tests/watermark.py | 48 sw/qa/uitest/writer_tests/wordCount.py | 304 ++--- sw/qa/uitest/writer_tests2/asianPhoneticGuide.py| 40 sw/qa/uitest/writer_tests2/bookmark.py | 105 - sw/qa/uitest/writer_tests2/deleteAllComments.py | 42 sw/qa/uitest/writer_tests2/documentProperties.py| 139 +- sw/qa/uitest/writer_tests2/exchangeDatabase.py | 36 sw/qa/uitest/writer_tests2/fontworks.py | 35 sw/qa/uitest/writer_tests2/formatBulletsNumbering.py| 452 +++- sw/qa/uitest/writer_tests2/formatCharacter.py | 400 +++ sw/qa/uitest/writer_tests2/formatParagraph.py | 902 +++- sw/qa/uitest/writer_tests2/horizontalLine.py| 27 sw/qa/uitest/writer_tests2/insertFootnote.py| 34 sw/qa/uitest/writer_tests2/pasteSpecial.py | 28 sw/qa/uitest/writer_tests2/tdf116474.py | 58 - sw/qa/uitest/writer_tests3/autoredactDialog.py | 186 +-- sw/qa/uitest/writer_tests3/customizeDialog.py | 123 +- sw/qa/uitest/writer_tests3/hyperlinkdialog.py | 93 - sw/qa/uitest/writer_tests3/insertEndnote.py | 34 sw/qa/uitest/writer_tests3/insertEnvelope.py| 42 sw/qa/uitest/writer_tests3/insertFootEndnote.py | 68 - sw/qa/uitest/writer_tests3/insertPageFooter.py | 27 sw/qa/uitest/writer_tests3/insertQrCodeGen.py | 76 - sw/qa/uitest/writer_tests3/insertSignatureLine.py | 136 +- sw/qa/uitest/writer_tests3/lineNumbering.py | 126 +- sw/qa/uitest/writer_tests3/pageDialog.py| 113 -- sw/qa/uitest/writer_tests3/sort.py | 86 - sw/qa/uitest/writer_tests3/specialCharacter.py | 92 - sw/qa/uitest/writer_tests3/tdf79236.py | 134 +- sw/qa/uitest/writer_tests4/insertBreakDialog.py | 50 sw/qa/uitest/writer_tests4/insertPageHeader.py | 27 sw/qa/uitest/writer_tests4/spellDialog.py | 74 - sw/qa/uitest/writer_tests4/start.py | 30 sw/qa/uitest/writer_tests4/tdf113252.py | 30 sw/qa/uitest/writer_tests4/tdf115572.py | 86 - sw/qa/uitest/writer_tests4/tdf11
[Libreoffice-commits] core.git: sc/qa
sc/qa/uitest/autofilter/autofilter.py | 211 +-- sc/qa/uitest/autofilter/autofilterBugs.py | 48 sc/qa/uitest/autofilter/tdf117276_autofilter_reset.py | 230 +-- sc/qa/uitest/autofilter/tdf126306.py | 223 +-- sc/qa/uitest/autofilter/tdf141559.py | 145 +- sc/qa/uitest/autofilter/tdf141946.py | 91 - sc/qa/uitest/autofilter/tdf36383.py| 63 - sc/qa/uitest/autofilter/tdf46062.py| 45 sc/qa/uitest/autofilter/tdf48025.py| 85 - sc/qa/uitest/autofilter/tdf68113.py| 101 - sc/qa/uitest/calc_tests/CalcPasteOnly.py | 48 sc/qa/uitest/calc_tests/CellDropDownItems.py | 130 +- sc/qa/uitest/calc_tests/Comments.py| 50 sc/qa/uitest/calc_tests/autofill.py| 26 sc/qa/uitest/calc_tests/calcSheetDelete.py | 180 +- sc/qa/uitest/calc_tests/cellBackgroundColorSelector.py | 350 ++--- sc/qa/uitest/calc_tests/columns.py | 412 +++--- sc/qa/uitest/calc_tests/fillRandomNumber.py| 78 - sc/qa/uitest/calc_tests/formatCells.py | 736 +-- sc/qa/uitest/calc_tests/mergedRowsColumns.py | 25 sc/qa/uitest/calc_tests/printRange.py | 176 +- sc/qa/uitest/calc_tests/rows.py| 338 ++--- sc/qa/uitest/calc_tests/sheetRename.py | 56 sc/qa/uitest/calc_tests/zoom.py| 83 - sc/qa/uitest/calc_tests2/dataform.py | 13 sc/qa/uitest/calc_tests2/standardFilter.py | 1048 - sc/qa/uitest/calc_tests2/tdf104117.py | 58 sc/qa/uitest/calc_tests2/tdf117367.py | 64 - sc/qa/uitest/calc_tests2/tdf120174.py | 28 sc/qa/uitest/calc_tests2/tdf126577.py | 36 sc/qa/uitest/calc_tests2/tdf46138.py | 30 sc/qa/uitest/calc_tests2/tdf51700.py | 60 sc/qa/uitest/calc_tests3/clearCells.py | 490 +++ sc/qa/uitest/calc_tests3/insertQrCodeGen.py| 80 - sc/qa/uitest/calc_tests3/tdf69450.py | 72 - sc/qa/uitest/calc_tests3/tdf73006.py | 36 sc/qa/uitest/calc_tests3/tdf79983.py | 80 - sc/qa/uitest/calc_tests3/tdf80693.py | 64 - sc/qa/uitest/calc_tests3/tdf82398.py | 74 - sc/qa/uitest/calc_tests4/tdf88999.py | 50 sc/qa/uitest/calc_tests4/tdf89907.py | 78 - sc/qa/uitest/calc_tests4/tdf92423.py | 90 - sc/qa/uitest/calc_tests4/tdf94208.py | 54 sc/qa/uitest/calc_tests4/trackedChanges.py | 456 +++ sc/qa/uitest/calc_tests6/autoFormat.py | 92 - sc/qa/uitest/calc_tests6/autocorrectOptions.py | 162 +- sc/qa/uitest/calc_tests6/hideShowSheet.py | 56 sc/qa/uitest/calc_tests6/moveCopySheet.py | 88 - sc/qa/uitest/calc_tests6/multipleOperations.py | 194 +-- sc/qa/uitest/calc_tests6/scenarios.py | 54 sc/qa/uitest/calc_tests6/shareSpreadsheet.py | 20 sc/qa/uitest/calc_tests6/tdf104378.py | 24 sc/qa/uitest/calc_tests6/tdf116996.py | 70 - sc/qa/uitest/calc_tests6/tdf121263.py | 34 sc/qa/uitest/calc_tests6/tdf91726.py | 56 sc/qa/uitest/calc_tests7/tdf106667.py | 22 sc/qa/uitest/calc_tests7/tdf117987.py | 20 sc/qa/uitest/calc_tests7/tdf123122.py | 76 - sc/qa/uitest/calc_tests7/tdf125030.py | 30 sc/qa/uitest/calc_tests7/tdf45020.py | 40 sc/qa/uitest/calc_tests8/navigator.py | 49 sc/qa/uitest/calc_tests8/tdf118308.py | 47 sc/qa/uitest/calc_tests8/tdf125051.py | 34 sc/qa/uitest/calc_tests8/tdf137726.py | 23 sc/qa/uitest/calc_tests9/tdf117879.py | 35 sc/qa/uitest/calc_tests9/tdf121949.py | 21 sc/qa/uitest/calc_tests9/tdf133629.py | 64 - sc/qa/uitest/calc_tests9/tdf141244.py | 27 sc/qa/uitest/chart/create_chart.py | 94 - sc/qa/uitest/chart/edit_chart.py | 33 sc/qa/uitest/chart/tdf124295.py| 19 sc/qa/uitest/chart/tdf131715.py| 15 sc/qa/uitest/chart/tdf46885.py | 46 sc/qa/uitest/conditional_format/tdf105351.py | 78 - sc/qa/uitest/conditional_format/tdf105411.py | 23 sc/qa/uitest/conditional_format/tdf105466.py | 21 sc/qa/uitest/csv_dialog/tdf142395
[Libreoffice-commits] core.git: cui/qa svx/qa uitest/demo_ui uitest/impress_tests uitest/math_tests uitest/uitest
cui/qa/uitest/dialogs/chardlg.py | 125 ++--- cui/qa/uitest/dialogs/pastedlg.py | 51 cui/qa/uitest/dialogs/shortcuts.py| 27 ++-- svx/qa/uitest/table/tablecontroller.py| 101 - uitest/demo_ui/char_dialog.py |9 - uitest/demo_ui/checkbox.py|9 - uitest/demo_ui/combobox.py| 15 +- uitest/demo_ui/command_with_parameters.py | 11 - uitest/demo_ui/edit.py| 40 +++--- uitest/demo_ui/gridwin.py | 37 ++ uitest/demo_ui/hierarchy.py | 15 +- uitest/demo_ui/listbox.py | 14 +- uitest/demo_ui/radiobutton.py |9 - uitest/demo_ui/spinfield.py | 47 +++- uitest/demo_ui/tabcontrol.py | 23 +-- uitest/demo_ui/tabdialog.py | 14 +- uitest/demo_ui/treelist.py| 31 ++--- uitest/impress_tests/backgrounds.py | 41 +++ uitest/impress_tests/drawinglayer.py | 174 ++ uitest/impress_tests/layouts.py | 41 +++ uitest/impress_tests/start.py | 40 +++--- uitest/math_tests/start.py| 73 +--- uitest/uitest/uihelper/testDialog.py | 29 ++--- 23 files changed, 465 insertions(+), 511 deletions(-) New commits: commit 3874e092da4acbaa076d885444f26f014fd781b5 Author: Xisco Fauli AuthorDate: Wed Jun 30 11:57:03 2021 +0200 Commit: Xisco Fauli CommitDate: Wed Jun 30 13:18:38 2021 +0200 uitest: guard the remaining create_doc_in_start_center Mostly done by a script for motivation, see 89aaa17a0a4413f07da2bc5084b0164f15dc01ac < UITest: introduce guarded context managers > Change-Id: I2a6149b318d1fdaa36efe5d65af4c238827eaaf5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118154 Tested-by: Jenkins Reviewed-by: Xisco Fauli diff --git a/cui/qa/uitest/dialogs/chardlg.py b/cui/qa/uitest/dialogs/chardlg.py index 878f9e2a8ae7..276f7c9a8c53 100644 --- a/cui/qa/uitest/dialogs/chardlg.py +++ b/cui/qa/uitest/dialogs/chardlg.py @@ -14,84 +14,79 @@ class Test(UITestCase): def testSvxCharEffectsPage(self): # Start Impress. -self.ui_test.create_doc_in_start_center("impress") -template = self.xUITest.getTopFocusWindow() -self.ui_test.close_dialog_through_button(template.getChild("close")) -doc = self.xUITest.getTopFocusWindow() -editWin = doc.getChild("impress_win") -# Select the title shape. -editWin.executeAction("TYPE", mkPropertyValues({"KEYCODE": "TAB"})) -editWin.executeAction("TYPE", mkPropertyValues({"TEXT": "t"})) -self.xUITest.executeCommand(".uno:SelectAll") +with self.ui_test.create_doc_in_start_center_guarded("impress") as component: +template = self.xUITest.getTopFocusWindow() + self.ui_test.close_dialog_through_button(template.getChild("close")) +doc = self.xUITest.getTopFocusWindow() +editWin = doc.getChild("impress_win") +# Select the title shape. +editWin.executeAction("TYPE", mkPropertyValues({"KEYCODE": "TAB"})) +editWin.executeAction("TYPE", mkPropertyValues({"TEXT": "t"})) +self.xUITest.executeCommand(".uno:SelectAll") -# Now use Format -> Character. -with self.ui_test.execute_dialog_through_command(".uno:FontDialog") as xDialog: -xTabs = xDialog.getChild("tabcontrol") -# Select RID_SVXPAGE_CHAR_EFFECTS. -select_pos(xTabs, "1") -xFontTransparency = xDialog.getChild("fonttransparencymtr") -for _ in range(5): -xFontTransparency.executeAction("UP", tuple()) +# Now use Format -> Character. +with self.ui_test.execute_dialog_through_command(".uno:FontDialog") as xDialog: +xTabs = xDialog.getChild("tabcontrol") +# Select RID_SVXPAGE_CHAR_EFFECTS. +select_pos(xTabs, "1") +xFontTransparency = xDialog.getChild("fonttransparencymtr") +for _ in range(5): +xFontTransparency.executeAction("UP", tuple()) -# Verify the result. -component = self.ui_test.get_component() -drawPage = component.getDrawPages().getByIndex(0) -shape = drawPage.getByIndex(0) +# Verify the result. +drawPage = component.getDrawPages().getByIndex(0) +shape = drawPage.getByIndex(0) -# Without the accompanying fix in place, this test would have failed with: -# AssertionError: 100 != 5 -# i.e. the dialog did not set transparency to 5%, instead it left the character color at -# COL_AUTO. -self.assertEqual(shape.CharTransparence, 5) -self.ui_test.close_doc() +# Without the accompanying fix in pla
[Libreoffice-commits] core.git: leak-suppress.txt
leak-suppress.txt |5 - 1 file changed, 4 insertions(+), 1 deletion(-) New commits: commit c34ab8e41610c4bf13b9e6cbe1a3a5f6b3505044 Author: Noel Grandin AuthorDate: Mon Jun 14 11:19:16 2021 +0200 Commit: Noel Grandin CommitDate: Wed Jun 30 13:22:32 2021 +0200 exclude more UNO type and crypto leaks that I don't want to try fixing just yet Change-Id: I18fc427ef7d2ed652bb7ffb911fc892833cbefd1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118153 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/leak-suppress.txt b/leak-suppress.txt index 1626e5d1573b..6adbb70650a8 100644 --- a/leak-suppress.txt +++ b/leak-suppress.txt @@ -10,6 +10,7 @@ # uno typelib leak:cppu/source/typelib/typelib.cxx +leak:cppuhelper/source/typemanager.cxx # uno component context leak:cppu::defaultBootstrap_InitialComponentContext @@ -77,6 +78,8 @@ leak:CoinMessages::operator=(CoinMessages const&) # ignore the in-process Java VM leak:libjvm -# TODO The code in Signing::Verify is clearly leaking this structure, but naively destroying it instead +# TODO The code in Signing::Verify is clearly leaking this structure, but naively destroying it inside # that method results in heap-use-after-free errors leak:NSS_CMSMessage_CreateFromDER +leak:PK11_FindPrivateKeyFromCert +leak:PK11_ImportDERPrivateKeyInfoAndReturnKey ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: sc/qa sc/source
sc/qa/unit/data/xlsx/129969-min.xlsx |binary sc/qa/unit/subsequent_export-test2.cxx | 19 +++ sc/source/filter/excel/xecontent.cxx |4 ++-- 3 files changed, 21 insertions(+), 2 deletions(-) New commits: commit 67e2cc17bad3fd7aacb94da47f9024b731434a84 Author: Tünde Tóth AuthorDate: Tue Jun 29 13:58:59 2021 +0200 Commit: László Németh CommitDate: Wed Jun 30 13:36:18 2021 +0200 tdf#140431 XLSX export: fix double file:// prefix Regression from commit: fc58d7d65b9683db7b7632137126680b8483f6c5 (tdf#129969 XLSX export: file URLs need IURI encoding) Change-Id: I5bfb0ef9ba7fe82cd3f4d0e0b3fdcf8f705cba64 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118090 Tested-by: Jenkins Tested-by: László Németh Reviewed-by: László Németh diff --git a/sc/qa/unit/data/xlsx/129969-min.xlsx b/sc/qa/unit/data/xlsx/129969-min.xlsx new file mode 100644 index ..b6fd8e9e2069 Binary files /dev/null and b/sc/qa/unit/data/xlsx/129969-min.xlsx differ diff --git a/sc/qa/unit/subsequent_export-test2.cxx b/sc/qa/unit/subsequent_export-test2.cxx index 8e4f77ebbd79..1c088c813f21 100644 --- a/sc/qa/unit/subsequent_export-test2.cxx +++ b/sc/qa/unit/subsequent_export-test2.cxx @@ -186,6 +186,7 @@ public: void testTdf136721_paper_size(); void testTdf139258_rotated_image(); void testTdf126541_SheetVisibilityImportXlsx(); +void testTdf140431(); CPPUNIT_TEST_SUITE(ScExportTest2); @@ -280,6 +281,7 @@ public: CPPUNIT_TEST(testTdf136721_paper_size); CPPUNIT_TEST(testTdf139258_rotated_image); CPPUNIT_TEST(testTdf126541_SheetVisibilityImportXlsx); +CPPUNIT_TEST(testTdf140431); CPPUNIT_TEST_SUITE_END(); @@ -2282,6 +2284,23 @@ void ScExportTest2::testTdf126541_SheetVisibilityImportXlsx() CPPUNIT_ASSERT(xShell->GetDocument().GetViewOptions().GetOption(VOPT_GRID)); } +void ScExportTest2::testTdf140431() +{ +ScDocShellRef xShell = loadDoc(u"129969-min.", FORMAT_XLSX); +CPPUNIT_ASSERT(xShell.is()); + +ScDocShellRef xDocSh = saveAndReload(&(*xShell), FORMAT_XLSX); +CPPUNIT_ASSERT(xDocSh.is()); +ScDocument& rDoc = xDocSh->GetDocument(); +ScAddress aPos(0, 2, 0); +const EditTextObject* pEditText = rDoc.GetEditText(aPos); +const SvxFieldData* pData = pEditText->GetFieldData(0, 0, text::textfield::Type::URL); +const SvxURLField* pURLData = static_cast(pData); +CPPUNIT_ASSERT(pURLData->GetURL().startsWith("file://ndhlis")); + +xDocSh->DoClose(); +} + CPPUNIT_TEST_SUITE_REGISTRATION(ScExportTest2); CPPUNIT_PLUGIN_IMPLEMENT(); diff --git a/sc/source/filter/excel/xecontent.cxx b/sc/source/filter/excel/xecontent.cxx index cf0c3777f39f..0848745b8d4a 100644 --- a/sc/source/filter/excel/xecontent.cxx +++ b/sc/source/filter/excel/xecontent.cxx @@ -394,9 +394,9 @@ XclExpHyperlink::XclExpHyperlink( const XclExpRoot& rRoot, const SvxURLField& rU for( int i = 0; i < nLevel; ++i ) msTarget = "../" + msTarget; } -else +else if (rRoot.GetOutput() != EXC_OUTPUT_XML_2007) { -// ooxml expects the file:/// part appended ( or at least +// xls expects the file:/// part appended ( or at least // ms2007 does, ms2010 is more tolerant ) msTarget = "file:///" + msTarget; } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
Re: Is ScAreaLink::RefreshHdl run too often?
Michael Stahl wrote: > but perhaps we have timers that need to run at e.g. 60hz like for > example animations in slideshows? > Since we never got woken up at the right time anyway, this is not needed for slideshow. One would rather render everything, wait for the vblank, rinse and repeat... Cheers, -- Thorsten signature.asc Description: PGP signature ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice
Re: Is ScAreaLink::RefreshHdl run too often?
On 29/06/2021 18:51, Noel Grandin wrote: I have seen the same problem in another application I maintain. My solution is that the repeat-delay time specified in my timers is always the time between the end of one invocation of a timer, and the start of the next invocation of that timer. Yes, but I fail to understand how that ScAreaLink -> ScRefreshTimer -> AutoTimer -> Timer -> Task inheritance chain schedules invocation. ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice
[Libreoffice-commits] core.git: Branch 'libreoffice-7-2' - unotools/qa unotools/source
unotools/qa/complex/tempfile/Test01.java |2 ++ unotools/qa/complex/tempfile/TestHelper.java |1 + unotools/source/ucbhelper/xtempfile.cxx |7 ++- 3 files changed, 9 insertions(+), 1 deletion(-) New commits: commit f647083220df5547fcf2ba5d2ccf6a5e4aee8ad6 Author: Noel Grandin AuthorDate: Wed Jun 30 10:30:25 2021 +0200 Commit: Noel Grandin CommitDate: Wed Jun 30 14:33:30 2021 +0200 fix failure in JunitTest_unotools_complex Temp files created from OTempFileService are always opened with StreamMode::SHARE_DENYALL. So normally you can't open them twice. But the JunitTest_unotools_complex unit test used to work because it exploited a pessimisation in OTempFileService, where that code would close the file when we read to the end. Which meant that the unit test could open it again and read it. However, in commit 218f36dd614cf828e949f605faaf6a6fd615da26 Date: Sun Jun 20 18:51:12 2021 +0200 tdf#135316 remove OTempFileService pessimisation I removed that pessimisation. So make the share mode a little more permissive. Change-Id: I297a5c9c0505816b399fad29414077d03231ec72 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118146 Tested-by: Jenkins Reviewed-by: Noel Grandin (cherry picked from commit ecea9c42d5f1a5e63493fcd92944bd49fb91b338) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118108 diff --git a/unotools/qa/complex/tempfile/Test01.java b/unotools/qa/complex/tempfile/Test01.java index f93b02186e8d..ca81e1801bef 100644 --- a/unotools/qa/complex/tempfile/Test01.java +++ b/unotools/qa/complex/tempfile/Test01.java @@ -51,6 +51,8 @@ public class Test01 { //compare the file name with the name in the URL. sFileURL = m_aTestHelper.GetTempFileURL( xTempFile ); sFileName = m_aTestHelper.GetTempFileName( xTempFile ); +m_aTestHelper.Message( "Tempfile URL: " + sFileURL ); +m_aTestHelper.Message( "Tempfile name: " + sFileName ); m_aTestHelper.CompareFileNameAndURL( sFileName, sFileURL ); //write to the stream using the service. diff --git a/unotools/qa/complex/tempfile/TestHelper.java b/unotools/qa/complex/tempfile/TestHelper.java index 821c33da054b..9ea42b102673 100644 --- a/unotools/qa/complex/tempfile/TestHelper.java +++ b/unotools/qa/complex/tempfile/TestHelper.java @@ -78,6 +78,7 @@ public class TestHelper { public void ReadDirectlyFromTempFile( byte [][] pBytes, int nBytes, XSimpleFileAccess xSFA, String sTempFileURL ) throws java.lang.Exception { +Message ( "Attempting to read directly from " + sTempFileURL ); XInputStream xInTemp = xSFA.openFileRead( sTempFileURL ); if ( xInTemp == null ) throw new java.lang.Exception("Cannot create input stream from URL."); diff --git a/unotools/source/ucbhelper/xtempfile.cxx b/unotools/source/ucbhelper/xtempfile.cxx index ae8140526441..4982520abfeb 100644 --- a/unotools/source/ucbhelper/xtempfile.cxx +++ b/unotools/source/ucbhelper/xtempfile.cxx @@ -234,7 +234,12 @@ void OTempFileService::checkError () const void OTempFileService::checkConnected () { if (!mpStream && mpTempFile) -mpStream = mpTempFile->GetStream( StreamMode::STD_READWRITE ); +{ +// Ideally we should open this SHARE_DENYALL, but the JunitTest_unotools_complex test wants to open +// this file directly and read from it. +mpStream = mpTempFile->GetStream(StreamMode::READ | StreamMode::WRITE + | StreamMode::SHARE_DENYWRITE); +} if (!mpStream) throw css::io::NotConnectedException ( OUString(), static_cast < css::uno::XWeak * > (this ) ); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: writerfilter/source
writerfilter/source/dmapper/NumberingManager.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 5ba64bba76ca1d23191300d1b5080cc091d432de Author: Noel Grandin AuthorDate: Tue Jun 29 11:28:53 2021 +0200 Commit: Noel Grandin CommitDate: Wed Jun 30 14:33:18 2021 +0200 tdf#135316 make regex object static const so we only compile it once, shaves 1% off load time Change-Id: I8e6e20205659582901ffb8d4496ce44906146204 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118157 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/writerfilter/source/dmapper/NumberingManager.cxx b/writerfilter/source/dmapper/NumberingManager.cxx index 62706d1a5614..764aace41808 100644 --- a/writerfilter/source/dmapper/NumberingManager.cxx +++ b/writerfilter/source/dmapper/NumberingManager.cxx @@ -687,7 +687,7 @@ void ListsManager::lcl_attribute( Id nName, Value& rVal ) // DOCX level-text contains levels definition in format "%1.%2.%3" // we need to convert it to LO internal representation: "%1%.%2%.%3%" -std::regex aTokenRegex("(%\\d)"); +static const std::regex aTokenRegex("(%\\d)"); sLevelText = std::regex_replace(sLevelText, aTokenRegex, "$1%"); pCurrentLvl->SetBulletChar( OUString::fromUtf8(sLevelText) ); } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: sw/inc sw/source
sw/inc/unodraw.hxx |1 + sw/source/core/unocore/unodraw.cxx | 29 - 2 files changed, 17 insertions(+), 13 deletions(-) New commits: commit 05992ce5d03aeb2db8d4fc7a68053ebd9a9aa511 Author: Noel Grandin AuthorDate: Tue Jun 29 11:29:18 2021 +0200 Commit: Noel Grandin CommitDate: Wed Jun 30 14:34:11 2021 +0200 tdf#135316 cache propertysetinfo in SwXShape shaves 3% off loaad time Change-Id: I6541f94553d862787566672d91e2a87902835664 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118158 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/sw/inc/unodraw.hxx b/sw/inc/unodraw.hxx index 28a4dc612357..b6404abae7af 100644 --- a/sw/inc/unodraw.hxx +++ b/sw/inc/unodraw.hxx @@ -144,6 +144,7 @@ class SwXShape : public SwXShapeBaseClass, public SvtListener const SfxItemPropertySet* m_pPropSet; const SfxItemPropertyMapEntry* m_pPropertyMapEntries; +css::uno::Reference< css::beans::XPropertySetInfo > mxPropertySetInfo; std::unique_ptr m_pImpl; diff --git a/sw/source/core/unocore/unodraw.cxx b/sw/source/core/unocore/unodraw.cxx index cd8e799fee00..6faa27465851 100644 --- a/sw/source/core/unocore/unodraw.cxx +++ b/sw/source/core/unocore/unodraw.cxx @@ -1016,23 +1016,26 @@ uno::Sequence< sal_Int8 > SwXShape::getImplementationId( ) uno::Reference< beans::XPropertySetInfo > SwXShape::getPropertySetInfo() { SolarMutexGuard aGuard; -uno::Reference< beans::XPropertySetInfo > aRet; -if(m_xShapeAgg.is()) +if (!mxPropertySetInfo) { -const uno::Type& rPropSetType = cppu::UnoType::get(); -uno::Any aPSet = m_xShapeAgg->queryAggregation( rPropSetType ); -if(auto xPrSet = o3tl::tryAccess>( - aPSet)) +uno::Reference< beans::XPropertySetInfo > aRet; +if(m_xShapeAgg.is()) { -uno::Reference< beans::XPropertySetInfo > xInfo = (*xPrSet)->getPropertySetInfo(); -// Expand PropertySetInfo! -const uno::Sequence aPropSeq = xInfo->getProperties(); -aRet = new SfxExtItemPropertySetInfo( m_pPropertyMapEntries, aPropSeq ); +const uno::Type& rPropSetType = cppu::UnoType::get(); +uno::Any aPSet = m_xShapeAgg->queryAggregation( rPropSetType ); +if(auto xPrSet = o3tl::tryAccess>( + aPSet)) +{ +uno::Reference< beans::XPropertySetInfo > xInfo = (*xPrSet)->getPropertySetInfo(); +// Expand PropertySetInfo! +const uno::Sequence aPropSeq = xInfo->getProperties(); +mxPropertySetInfo = new SfxExtItemPropertySetInfo( m_pPropertyMapEntries, aPropSeq ); +} } +if(!mxPropertySetInfo) +mxPropertySetInfo = m_pPropSet->getPropertySetInfo(); } -if(!aRet.is()) -aRet = m_pPropSet->getPropertySetInfo(); -return aRet; +return mxPropertySetInfo; } void SwXShape::setPropertyValue(const OUString& rPropertyName, const uno::Any& aValue) ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
Re: Is ScAreaLink::RefreshHdl run too often?
Am 30.06.21 um 14:29 schrieb Stephan Bergmann: On 29/06/2021 18:51, Noel Grandin wrote: I have seen the same problem in another application I maintain. My solution is that the repeat-delay time specified in my timers is always the time between the end of one invocation of a timer, and the start of the next invocation of that timer. Yes, but I fail to understand how that ScAreaLink -> ScRefreshTimer -> AutoTimer -> Timer -> Task inheritance chain schedules invocation. Timer:: / Task::SetDeletionFlags() It deactivates the Task before processing it. For Auto* that is skipped, so the task remains active, its ImplSchedulerData::mnUpdateTime is updated and it will be re-scheduled. HTH ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice
[Libreoffice-commits] core.git: xmloff/source
xmloff/source/transform/TransformerBase.cxx |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) New commits: commit a876055b6f56e838114cce041d4c49aed43693f9 Author: Jan-Marek Glogowski AuthorDate: Wed Jun 30 11:01:06 2021 + Commit: Jan-Marek Glogowski CommitDate: Wed Jun 30 14:37:02 2021 +0200 Fix potential (but unlikely) overflow warning: assuming signed overflow does not occur when assuming that (X + c) >= X is always true [-Wstrict-overflow] while( nPos < nLen ) ~^~ Change-Id: I95e3bb4a131eaf4e82fbc74cc0bea92930b6afe9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118159 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski diff --git a/xmloff/source/transform/TransformerBase.cxx b/xmloff/source/transform/TransformerBase.cxx index c937e00ca2c4..8814d19f26af 100644 --- a/xmloff/source/transform/TransformerBase.cxx +++ b/xmloff/source/transform/TransformerBase.cxx @@ -1315,12 +1315,12 @@ bool XMLTransformerBase::ConvertURIToOOo( OUString& rURI, { case '/': // a relative path segment within the package -nPos = nLen;// leave loop +nPos = nLen - 1;// leave loop break; case ':': // a schema bPackage = false; -nPos = nLen;// leave loop +nPos = nLen - 1;// leave loop break; default: // we don't care about any other characters ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
Re: Is ScAreaLink::RefreshHdl run too often?
On 30/06/2021 14:36, Jan-Marek Glogowski wrote: Am 30.06.21 um 14:29 schrieb Stephan Bergmann: On 29/06/2021 18:51, Noel Grandin wrote: I have seen the same problem in another application I maintain. My solution is that the repeat-delay time specified in my timers is always the time between the end of one invocation of a timer, and the start of the next invocation of that timer. Yes, but I fail to understand how that ScAreaLink -> ScRefreshTimer -> AutoTimer -> Timer -> Task inheritance chain schedules invocation. Timer:: / Task::SetDeletionFlags() It deactivates the Task before processing it. For Auto* that is skipped, so the task remains active, its ImplSchedulerData::mnUpdateTime is updated and it will be re-scheduled. HTH No, that unfortunately doesn't help me at all :) Is my naive understanding correct that AutoTimer will call Invoke() about every GetTimeout() milliseconds? (Rather than doing the next call to Invoke() at about GetTimeout() milliseconds after the previous call to Invoke() finished, as we would want here?) Then what would be the common idiom, using Timer or AutoTimer, to implement the behavior that we want here (assuming that this is behavior that we want in various places, so there should be prior art to look at when tackling this case)? ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice
[Libreoffice-commits] core.git: filter/Configuration_filter.mk filter/source sw/Library_sw.mk sw/source sw/util
filter/Configuration_filter.mk |2 filter/source/config/cache/typedetection.cxx|1 filter/source/config/fragments/filters/writer_indexing_export.xcu | 22 +++ filter/source/config/fragments/types/writer_indexing_export_xml.xcu | 21 +++ sw/Library_sw.mk|1 sw/source/filter/inc/IndexingExportFilter.hxx | 68 ++ sw/source/filter/indexing/IndexingExportFilter.cxx | 63 + sw/util/sw.component|4 8 files changed, 182 insertions(+) New commits: commit 95b06d3aa514ce83f82fd538d1731fc6363e4b8a Author: Tomaž Vajngerl AuthorDate: Wed Jun 30 16:33:48 2021 +0900 Commit: Tomaž Vajngerl CommitDate: Wed Jun 30 14:58:20 2021 +0200 indexing: add indexing export as an export filter for Writer Change-Id: I26157a8ffeee80b03866569d3d3cec2a34fe377d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118144 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl diff --git a/filter/Configuration_filter.mk b/filter/Configuration_filter.mk index d53afa704fc9..dfeacc6a542c 100644 --- a/filter/Configuration_filter.mk +++ b/filter/Configuration_filter.mk @@ -358,6 +358,7 @@ $(eval $(call filter_Configuration_add_types,fcfg_langpack,fcfg_writer_types.xcu writer_OOXML \ writer_OOXML_Template \ writer_layout_dump_xml \ + writer_indexing_export_xml \ writer_BroadBand_eBook \ writer_FictionBook_2 \ writer_PalmDoc \ @@ -407,6 +408,7 @@ $(eval $(call filter_Configuration_add_filters,fcfg_langpack,fcfg_writer_filters OOXML_Text \ OOXML_Text_Template \ writer_layout_dump \ + writer_indexing_export \ BroadBand_eBook \ FictionBook_2 \ PalmDoc \ diff --git a/filter/source/config/cache/typedetection.cxx b/filter/source/config/cache/typedetection.cxx index 6679a5c8973d..34d0d49d5af9 100644 --- a/filter/source/config/cache/typedetection.cxx +++ b/filter/source/config/cache/typedetection.cxx @@ -273,6 +273,7 @@ int getFlatTypeRank(const OUString& rType) // Export only "writer_layout_dump_xml", +"writer_indexing_export", "graphic_HTML", // Internal use only diff --git a/filter/source/config/fragments/filters/writer_indexing_export.xcu b/filter/source/config/fragments/filters/writer_indexing_export.xcu new file mode 100644 index ..28cbe5b5b055 --- /dev/null +++ b/filter/source/config/fragments/filters/writer_indexing_export.xcu @@ -0,0 +1,22 @@ + + + +EXPORT ALIEN 3RDPARTYFILTER + +com.sun.star.comp.Writer.IndexingExportFilter + + +Writer Indexing Export XML + +0 +writer_indexing_export_xml + +com.sun.star.text.TextDocument + diff --git a/filter/source/config/fragments/types/writer_indexing_export_xml.xcu b/filter/source/config/fragments/types/writer_indexing_export_xml.xcu new file mode 100644 index ..4cda6e597461 --- /dev/null +++ b/filter/source/config/fragments/types/writer_indexing_export_xml.xcu @@ -0,0 +1,21 @@ + + + + + +xml + +false + + +Writer Indexing Export XML + + + diff --git a/sw/Library_sw.mk b/sw/Library_sw.mk index d85a2f563ba7..02d12d171295 100644 --- a/sw/Library_sw.mk +++ b/sw/Library_sw.mk @@ -571,6 +571,7 @@ $(eval $(call gb_Library_add_exception_objects,sw,\ sw/source/filter/xml/xmltexte \ sw/source/filter/xml/xmltexti \ sw/source/filter/indexing/IndexingExport \ +sw/source/filter/indexing/IndexingExportFilter \ sw/source/uibase/app/appenv \ sw/source/uibase/app/apphdl \ sw/source/uibase/app/applab \ diff --git a/sw/source/filter/inc/IndexingExportFilter.hxx b/sw/source/filter/inc/IndexingExportFilter.hxx new file mode 100644 index ..82c56dfa9a61 --- /dev/null +++ b/sw/source/filter/inc/IndexingExportFilter.hxx @@ -0,0 +1,68 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + */ + +#pragma once + +#include +#include +#include +#include +#include +#include + +namespace sw +{ +class IndexingExportFilter final +: public cppu::WeakImplHelper +{ +private: +css::uno::Reference m_xSourceDocument; + +public: +IndexingExportFilter() {} + +// XFilter +virtual sal_Bool SAL_CALL +filter(const css::uno::Sequence& aDescriptor) override; + +virtual void SAL_CALL cancel() override {} + +// XExporter +virtual void SAL_CALL +setSourceDocument(const css::uno::Reference& xDocument) override +{ +m_xSource
[Libreoffice-commits] core.git: Branch 'feature/cib_contract57d' - sw/source
sw/source/core/layout/wsfrm.cxx | 17 + 1 file changed, 13 insertions(+), 4 deletions(-) New commits: commit 798c41960be08155f4f9734c6307615ab45c134e Author: Michael Stahl AuthorDate: Fri Jun 25 10:25:59 2021 +0200 Commit: Michael Stahl CommitDate: Wed Jun 30 14:53:35 2021 +0200 sw: layout: fix table split loop caused by RemoveFollowFlowLinePending In no_view.odt, the table 1340 does RemoveFollowFlowLine(), then splits again, and by the time Split() returns, its flag m_bRemoveFollowFlowLinePending is set and so in the next SwTabFrame::MakeAll() it will do the same thing again, until eventually it hits layact.cxx:544: LoopControl_1 in SwLayAction::InternalAction The flag is set during lcl_RecalcSplitLine(), in SwContentFrame::Cut(), which operates under the assumption that there are no other cells in the follow flow line that may contain content frames. This only happens if "Verdana" and "Arial" fonts are available and not substituted with "DejaVu Sans" etc. (regression from c4af8b0f106f31b6e79a145bc4ab83bb6a55c808) Unfortunately this uncovers another pagination bug in testTdf88496 which was hidden by this flag being set from text frames that shouldn't exist anyway. Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117851 Tested-by: Jenkins Reviewed-by: Michael Stahl (cherry picked from commit a0cd270a99f43049fc099ddd463e57aa243d5b0e) Change-Id: I3cc82c13bfc06960b827aefc64f5b5b12520955a (cherry picked from commit d5c9e1b939d76748f30002e73982475856b68a16) diff --git a/sw/source/core/layout/wsfrm.cxx b/sw/source/core/layout/wsfrm.cxx index 95af7d95dda2..1e496df41395 100644 --- a/sw/source/core/layout/wsfrm.cxx +++ b/sw/source/core/layout/wsfrm.cxx @@ -45,6 +45,7 @@ #include #include #include +#include #include #include #include @@ -1154,6 +1155,7 @@ void SwContentFrame::Cut() } } +SwTabFrame* pMasterTab(nullptr); if( nullptr != (pFrame = GetIndNext()) ) { // The old follow may have calculated a gap to the predecessor which @@ -1217,11 +1219,9 @@ void SwContentFrame::Cut() if ( IsInTab() ) { SwTabFrame* pThisTab = FindTabFrame(); -SwTabFrame* pMasterTab = pThisTab && pThisTab->IsFollow() ? pThisTab->FindMaster() : nullptr; -if ( pMasterTab ) +if (pThisTab && pThisTab->IsFollow()) { -pMasterTab->InvalidatePos_(); -pMasterTab->SetRemoveFollowFlowLinePending( true ); +pMasterTab = pThisTab->FindMaster(); } } } @@ -1229,8 +1229,17 @@ void SwContentFrame::Cut() //Remove first, then shrink the upper. SwLayoutFrame *pUp = GetUpper(); RemoveFromLayout(); +assert(pUp || !pMasterTab); if ( pUp ) { +if (pMasterTab +&& !pMasterTab->GetFollow()->GetFirstNonHeadlineRow()->ContainsContent()) +{ // only do this if there's no content in other cells of the row! +pMasterTab->InvalidatePos_(); +pMasterTab->SetRemoveFollowFlowLinePending(true); +} + + SwSectionFrame *pSct = nullptr; if ( !pUp->Lower() && ( ( pUp->IsFootnoteFrame() && !pUp->IsColLocked() ) || ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
Re: Is ScAreaLink::RefreshHdl run too often?
Am 30.06.21 um 14:53 schrieb Stephan Bergmann: On 30/06/2021 14:36, Jan-Marek Glogowski wrote: Am 30.06.21 um 14:29 schrieb Stephan Bergmann: On 29/06/2021 18:51, Noel Grandin wrote: I have seen the same problem in another application I maintain. My solution is that the repeat-delay time specified in my timers is always the time between the end of one invocation of a timer, and the start of the next invocation of that timer. Yes, but I fail to understand how that ScAreaLink -> ScRefreshTimer -> AutoTimer -> Timer -> Task inheritance chain schedules invocation. Timer:: / Task::SetDeletionFlags() It deactivates the Task before processing it. For Auto* that is skipped, so the task remains active, its ImplSchedulerData::mnUpdateTime is updated and it will be re-scheduled. HTH No, that unfortunately doesn't help me at all :) Is my naive understanding correct that AutoTimer will call Invoke() about every GetTimeout() milliseconds? (Rather than doing the next call to Invoke() at about GetTimeout() milliseconds after the previous call to Invoke() finished, as we would want here?) The Scheduler invokes the Task. If the Task is still active after Invoke, it asks the Task, when it will be ready again, based on the time before the Invoke and eventually updates the system timer to wakeup the Scheduler again at the correct time. And as seen, if the Timer takes more time then its interval, it'll turn into an Idle. Then what would be the common idiom, using Timer or AutoTimer, to implement the behavior that we want here (assuming that this is behavior that we want in various places, so there should be prior art to look at when tackling this case)? The easiest "fix" would be to call Start() at the end of the timer function. Then you could also replace the AutoTimer with a Timer. You could override the Invoke function of the AutoTimer to do that for all. Or... HTH now ;-) ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice
[Libreoffice-commits] core.git: cui/qa sc/qa sd/qa svx/qa sw/qa uitest/demo_ui uitest/impress_tests uitest/math_tests uitest/uitest
cui/qa/uitest/dialogs/chardlg.py|6 ++-- cui/qa/uitest/dialogs/pastedlg.py |2 - cui/qa/uitest/dialogs/shortcuts.py |2 - sc/qa/uitest/autofilter/autofilter.py |6 ++-- sc/qa/uitest/autofilter/autofilterBugs.py |2 - sc/qa/uitest/autofilter/tdf117276_autofilter_reset.py |2 - sc/qa/uitest/autofilter/tdf126306.py|2 - sc/qa/uitest/autofilter/tdf141559.py|2 - sc/qa/uitest/autofilter/tdf141946.py|2 - sc/qa/uitest/autofilter/tdf36383.py |2 - sc/qa/uitest/autofilter/tdf46062.py |2 - sc/qa/uitest/autofilter/tdf48025.py |2 - sc/qa/uitest/autofilter/tdf68113.py |2 - sc/qa/uitest/calc_tests/CalcPasteOnly.py|2 - sc/qa/uitest/calc_tests/CellDropDownItems.py|2 - sc/qa/uitest/calc_tests/Comments.py |2 - sc/qa/uitest/calc_tests/autofill.py |2 - sc/qa/uitest/calc_tests/calcSheetDelete.py |8 +++--- sc/qa/uitest/calc_tests/cellBackgroundColorSelector.py |4 +-- sc/qa/uitest/calc_tests/columns.py | 12 - sc/qa/uitest/calc_tests/fillRandomNumber.py |2 - sc/qa/uitest/calc_tests/formatCells.py | 18 +++--- sc/qa/uitest/calc_tests/mergedRowsColumns.py|2 - sc/qa/uitest/calc_tests/printRange.py |4 +-- sc/qa/uitest/calc_tests/rows.py | 12 - sc/qa/uitest/calc_tests/sheetRename.py |4 +-- sc/qa/uitest/calc_tests/zoom.py |2 - sc/qa/uitest/calc_tests2/dataform.py|2 - sc/qa/uitest/calc_tests2/standardFilter.py | 18 +++--- sc/qa/uitest/calc_tests2/tdf104117.py |2 - sc/qa/uitest/calc_tests2/tdf117367.py |2 - sc/qa/uitest/calc_tests2/tdf120174.py |2 - sc/qa/uitest/calc_tests2/tdf126577.py |2 - sc/qa/uitest/calc_tests2/tdf46138.py|2 - sc/qa/uitest/calc_tests2/tdf51700.py|2 - sc/qa/uitest/calc_tests3/clearCells.py | 14 +-- sc/qa/uitest/calc_tests3/insertQrCodeGen.py |4 +-- sc/qa/uitest/calc_tests3/tdf69450.py|2 - sc/qa/uitest/calc_tests3/tdf73006.py|2 - sc/qa/uitest/calc_tests3/tdf79983.py|2 - sc/qa/uitest/calc_tests3/tdf80693.py|2 - sc/qa/uitest/calc_tests3/tdf82398.py|2 - sc/qa/uitest/calc_tests4/tdf88999.py|2 - sc/qa/uitest/calc_tests4/tdf89907.py|2 - sc/qa/uitest/calc_tests4/tdf92423.py|2 - sc/qa/uitest/calc_tests4/tdf94208.py|2 - sc/qa/uitest/calc_tests4/trackedChanges.py | 10 sc/qa/uitest/calc_tests6/autoFormat.py |2 - sc/qa/uitest/calc_tests6/autocorrectOptions.py |2 - sc/qa/uitest/calc_tests6/hideShowSheet.py |2 - sc/qa/uitest/calc_tests6/moveCopySheet.py |2 - sc/qa/uitest/calc_tests6/multipleOperations.py |4 +-- sc/qa/uitest/calc_tests6/scenarios.py |2 - sc/qa/uitest/calc_tests6/shareSpreadsheet.py|2 - sc/qa/uitest/calc_tests6/tdf104378.py |2 - sc/qa/uitest/calc_tests6/tdf116996.py |2 - sc/qa/uitest/calc_tests6/tdf121263.py |2 - sc/qa/uitest/calc_tests6/tdf91726.py|2 - sc/qa/uitest/calc_tests7/tdf106667.py |2 - sc/qa/uitest/calc_tests7/tdf117987.py |2 - sc/qa/uitest/calc_tests7/tdf123122.py |2 - sc/qa/uitest/calc_tests7/tdf125030.py |2 - sc/qa/uitest/calc_tests7/tdf45020.py|2 - sc/qa/uitest/calc_tests8/navigator.py |2 - sc/qa/uitest/calc_tests8/tdf118308.py |2 - sc/qa/uitest/calc_tests8/tdf125051.py |2 - sc/qa/uitest/calc_tests8/tdf126248.py |2 - sc/qa/uitest/calc_tests8/tdf137726.py |2 - sc/qa/uitest/calc_tests9/tdf117879.py |2 - sc/qa/uitest/calc_tests9/tdf121949.py |2 - sc/qa/uitest/calc_tests9/tdf133629.py |2 - sc/qa/uitest/calc_tests9/tdf141244.py |2 - sc/qa/uitest/chart/create_chart.py | 12 - sc/qa/uitest/chart/edit_chart.py|2 - sc/qa/uitest/chart/tdf1242
Re: Is ScAreaLink::RefreshHdl run too often?
Am 30.06.21 um 15:14 schrieb Jan-Marek Glogowski: You could override the Invoke function of the AutoTimer to do that for all. Or... Or so I assumed; the code from: else if (bTaskAlive) { pMostUrgent->mnUpdateTime = nTime; will override the mnUpdateTime set by Start() to the one from before Invoke... ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice
[Libreoffice-commits] core.git: svx/source
svx/source/styles/ColorSets.cxx | 32 1 file changed, 16 insertions(+), 16 deletions(-) New commits: commit 4a68396d3fe055cde57d7122d6f2618b87a81e9e Author: Tomaž Vajngerl AuthorDate: Wed Sep 23 13:33:59 2015 +0200 Commit: Tomaž Vajngerl CommitDate: Wed Jun 30 16:22:57 2021 +0200 swap text and background colors in colorsets Change-Id: I1e1da85d6c58e3ed5ab4c44c2ab0ae7c3b080251 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118149 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl diff --git a/svx/source/styles/ColorSets.cxx b/svx/source/styles/ColorSets.cxx index 0c68d726a017..7a04eb4e6314 100644 --- a/svx/source/styles/ColorSets.cxx +++ b/svx/source/styles/ColorSets.cxx @@ -28,10 +28,10 @@ void ColorSets::init() { { ColorSet aColorSet("Breeze"); -aColorSet.add(0, 0x232629); -aColorSet.add(1, 0xFCFCFC); -aColorSet.add(2, 0x31363B); -aColorSet.add(3, 0xEFF0F1); +aColorSet.add(0, 0xFCFCFC); +aColorSet.add(1, 0x232629); +aColorSet.add(2, 0xEFF0F1); +aColorSet.add(3, 0x31363B); aColorSet.add(4, 0xDA4453); aColorSet.add(5, 0xF47750); aColorSet.add(6, 0xFDBC4B); @@ -44,10 +44,10 @@ void ColorSets::init() } { ColorSet aColorSet("Material Blue"); -aColorSet.add(0, 0x212121); -aColorSet.add(1, 0xFF); -aColorSet.add(2, 0x37474F); -aColorSet.add(3, 0xECEFF1); +aColorSet.add(0, 0xFF); +aColorSet.add(1, 0x212121); +aColorSet.add(2, 0xECEFF1); +aColorSet.add(3, 0x37474F); aColorSet.add(4, 0x7986CB); aColorSet.add(5, 0x303F9F); aColorSet.add(6, 0x64B5F6); @@ -60,10 +60,10 @@ void ColorSets::init() } { ColorSet aColorSet("Material Red"); -aColorSet.add(0, 0x212121); -aColorSet.add(1, 0xFF); -aColorSet.add(2, 0x424242); -aColorSet.add(3, 0xF5F5F5); +aColorSet.add(0, 0xFF); +aColorSet.add(1, 0x212121); +aColorSet.add(2, 0xF5F5F5); +aColorSet.add(3, 0x424242); aColorSet.add(4, 0xFF9800); aColorSet.add(5, 0xFF6D00); aColorSet.add(6, 0xFF5722); @@ -76,10 +76,10 @@ void ColorSets::init() } { ColorSet aColorSet("Material Green"); -aColorSet.add(0, 0x212121); -aColorSet.add(1, 0xFF); -aColorSet.add(2, 0x424242); -aColorSet.add(3, 0xF5F5F5); +aColorSet.add(0, 0xFF); +aColorSet.add(1, 0x212121); +aColorSet.add(2, 0xF5F5F5); +aColorSet.add(3, 0x424242); aColorSet.add(4, 0x009688); aColorSet.add(5, 0x00bfa5); aColorSet.add(6, 0x4caf50); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: sw/source
sw/source/uibase/sidebar/StylePresetsPanel.cxx |4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) New commits: commit d2cbf5d1aba6a2a74b0e6ca99cb27242f9582a94 Author: Tomaž Vajngerl AuthorDate: Thu Sep 24 12:30:10 2015 +0200 Commit: Tomaž Vajngerl CommitDate: Wed Jun 30 16:23:25 2021 +0200 StylePresets: set bacground color for ValueSet Change-Id: Ifbaab139235dbe2fdcebf278bce2c91c2b744aa6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118150 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl diff --git a/sw/source/uibase/sidebar/StylePresetsPanel.cxx b/sw/source/uibase/sidebar/StylePresetsPanel.cxx index 79b1b93ed34c..981f26b3e839 100644 --- a/sw/source/uibase/sidebar/StylePresetsPanel.cxx +++ b/sw/source/uibase/sidebar/StylePresetsPanel.cxx @@ -13,8 +13,9 @@ #include "StylePresetsPanel.hxx" #include -#include +#include #include +#include #include #include @@ -145,6 +146,7 @@ StylePresetsPanel::StylePresetsPanel(weld::Widget* pParent) { mxValueSet->SetColCount(2); + mxValueSet->SetColor(Application::GetSettings().GetStyleSettings().GetFaceColor()); mxValueSet->SetDoubleClickHdl(LINK(this, StylePresetsPanel, DoubleClickHdl)); RefreshList(); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'distro/collabora/co-2021' - sc/source sc/uiconfig
sc/source/ui/dbgui/scuiasciiopt.cxx | 24 ++-- sc/source/ui/inc/scuiasciiopt.hxx |4 -- sc/uiconfig/scalc/ui/textimportcsv.ui | 50 +++--- 3 files changed, 16 insertions(+), 62 deletions(-) New commits: commit dba4f1031ef5b308f60f354c160187321cba6bbe Author: Pedro Pinto Silva AuthorDate: Thu May 27 16:01:49 2021 +0200 Commit: Pedro Silva CommitDate: Wed Jun 30 16:47:12 2021 +0200 Dialog: Import CSV: Improve layout Remove extra padding from headers, they are already in bold no need to add extra padding to emphasis hierarchy. Do not use the first header to repeat what the dialog title already says "Import", use instead "Character encoding" as the first header of the first group (advantage: 1st dropdown does not need extra labeling) The 2 radio buttons for Use/not use separators appear to be grouping the elements underneath them. This is wrong, all those options are actually related only to the user chooses to use separators. - Convert those two radio buttons in one check button labeled "Use separators" - Fixes the confusion above mentioned - Reduced the amount of items - It does force the user to do trial and error in order to understand what is what Change-Id: Iee63a6dd336d7c5a4e6f5ce8c845b32902e49a73 Signed-off-by: Pedro Pinto Silva Signed-off-by: Mert Tumer Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116265 Tested-by: Jenkins CollaboraOffice Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118091 diff --git a/sc/source/ui/dbgui/scuiasciiopt.cxx b/sc/source/ui/dbgui/scuiasciiopt.cxx index 2d8efaefa3f3..af0c601c6010 100644 --- a/sc/source/ui/dbgui/scuiasciiopt.cxx +++ b/sc/source/ui/dbgui/scuiasciiopt.cxx @@ -295,14 +295,12 @@ ScImportAsciiDlg::ScImportAsciiDlg(weld::Window* pParent, const OUString& aDatNa , mcTextSep(ScAsciiOptions::cDefaultTextSep) , meCall(eCall) , mbDetectSpaceSep(eCall != SC_TEXTTOCOLUMNS) -, mxFtCharSet(m_xBuilder->weld_label("textcharset")) , mxLbCharSet(new SvxTextEncodingBox(m_xBuilder->weld_combo_box("charset"))) , mxFtCustomLang(m_xBuilder->weld_label("textlanguage")) , mxLbCustomLang(new SvxLanguageBox(m_xBuilder->weld_combo_box("language"))) , mxFtRow(m_xBuilder->weld_label("textfromrow")) , mxNfRow(m_xBuilder->weld_spin_button("fromrow")) -, mxRbFixed(m_xBuilder->weld_radio_button("tofixedwidth")) -, mxRbSeparated(m_xBuilder->weld_radio_button("toseparatedby")) +, mxRbSeparated(m_xBuilder->weld_check_button("toseparatedby")) , mxCkbTab(m_xBuilder->weld_check_button("tab")) , mxCkbSemicolon(m_xBuilder->weld_check_button("semicolon")) , mxCkbComma(m_xBuilder->weld_check_button("comma")) @@ -370,7 +368,7 @@ ScImportAsciiDlg::ScImportAsciiDlg(weld::Window* pParent, const OUString& aDatNa if (bSkipEmptyCells) mxCkbSkipEmptyCells->set_active(true); if (bFixedWidth && !bIsTSV) -mxRbFixed->set_active(true); +mxRbSeparated->set_active(false); if (nFromRow != 1) mxNfRow->set_value(nFromRow); @@ -500,10 +498,9 @@ ScImportAsciiDlg::ScImportAsciiDlg(weld::Window* pParent, const OUString& aDatNa mxTableBox->SetColTypeHdl( LINK( this, ScImportAsciiDlg, ColTypeHdl ) ); mxRbSeparated->connect_clicked( LINK( this, ScImportAsciiDlg, RbSepFixHdl ) ); -mxRbFixed->connect_clicked( LINK( this, ScImportAsciiDlg, RbSepFixHdl ) ); SetupSeparatorCtrls(); -RbSepFixHdl(*mxRbFixed); +RbSepFixHdl( *mxRbSeparated ); UpdateVertical(); @@ -511,7 +508,6 @@ ScImportAsciiDlg::ScImportAsciiDlg(weld::Window* pParent, const OUString& aDatNa if (meCall == SC_TEXTTOCOLUMNS) { -mxFtCharSet->set_sensitive(false); mxLbCharSet->set_sensitive(false); mxFtCustomLang->set_sensitive(false); mxLbCustomLang->set_active_id(LANGUAGE_SYSTEM); @@ -551,7 +547,7 @@ bool ScImportAsciiDlg::GetLine( sal_uLong nLine, OUString &rText, sal_Unicode& r return false; bool bRet = true; -bool bFixed = mxRbFixed->get_active(); +bool bFixed = !mxRbSeparated->get_active(); if (!mpRowPosArray) mpRowPosArray.reset( new sal_uLong[ASCIIDLG_MAXROWS + 2] ); @@ -614,7 +610,7 @@ void ScImportAsciiDlg::GetOptions( ScAsciiOptions& rOpt ) rOpt.SetCharSet( meCharSet ); rOpt.SetCharSetSystem( mbCharSetSystem ); rOpt.SetLanguage(mxLbCustomLang->get_active_id()); -rOpt.SetFixedLen( mxRbFixed->get_active() ); +rOpt.SetFixedLen( !mxRbSeparated->get_active() ); rOpt.SetStartRow( mxNfRow->get_value() ); mxTableBox->FillColumnData( rOpt ); if( mxRbSeparated->get_active() ) @@ -634,7 +630,7 @@ void ScImportAsciiDlg::SaveParameters() { lcl_SaveSeparators( maFieldSeparators, mxCbTextSep->get_active_text(), mxCkbAsOnce->get_active(), mxCkb
[Libreoffice-commits] core.git: Branch 'feature/cib_contract57d' - external/libgpg-error
external/libgpg-error/ExternalProject_libgpg-error.mk |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 6825c3bab0392a4cbdb149b9c3ae0e7a9d7d0200 Author: Christian Lohmaier AuthorDate: Sat May 1 10:40:58 2021 +0200 Commit: Michael Stahl CommitDate: Wed Jun 30 17:35:19 2021 +0200 avoid windres preprocessor quoting-messups with current cygwin apparently fresh installs of cygwin behave differently with the windres command's quoting and treats --preprocessor='cpp foo bar' as a single file "cpp foo bar" to run instead of running "cpp" with the arguments "foo" and "bar". (-D and -I options are passed to the preprocessor automatically, so no need to prefix those with --preprocessor-arg) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114965 Tested-by: Jenkins Reviewed-by: Georgy Litvinov Reviewed-by: Christian Lohmaier (cherry picked from commit 07f1ec0af02a9ab6c1bf6e6478092ee50495afa7) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114971 Reviewed-by: Michael Stahl (cherry picked from commit 3589180bfa67bc2ef411a56c9e8bb161f6c59902) Change-Id: I711e968206f0769ff07152ebb9572e8b71c30cec diff --git a/external/libgpg-error/ExternalProject_libgpg-error.mk b/external/libgpg-error/ExternalProject_libgpg-error.mk index 1fcd63180e20..ed9b6f716525 100644 --- a/external/libgpg-error/ExternalProject_libgpg-error.mk +++ b/external/libgpg-error/ExternalProject_libgpg-error.mk @@ -28,7 +28,7 @@ $(call gb_ExternalProject_get_state_target,libgpg-error,build): $(call gb_Execut --disable-doc \ --disable-tests \ --host=$(gb_ExternalProject_libgpg-error_host) \ - RC='windres -O COFF --target=$(gb_ExternalProject_libgpg-error_target) --preprocessor='\''$(call gb_Executable_get_target,cpp) -+ -DRC_INVOKED -DWINAPI_FAMILY=0 $(SOLARINC)'\' \ + RC='windres -O COFF --target=$(gb_ExternalProject_libgpg-error_target) --preprocessor=$(call gb_Executable_get_target_for_build,cpp) --preprocessor-arg=-+ -DRC_INVOKED -DWINAPI_FAMILY=0 $(SOLARINC)'\' \ && $(MAKE) \ ) else ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'feature/cib_contract57d' - external/libgpg-error
Rebased ref, commits from common ancestor: commit 35e7eaff44da47278eae41d6fec6507c5911dee2 Author: Christian Lohmaier AuthorDate: Sat May 1 10:40:58 2021 +0200 Commit: Michael Stahl CommitDate: Wed Jun 30 17:44:45 2021 +0200 avoid windres preprocessor quoting-messups with current cygwin apparently fresh installs of cygwin behave differently with the windres command's quoting and treats --preprocessor='cpp foo bar' as a single file "cpp foo bar" to run instead of running "cpp" with the arguments "foo" and "bar". (-D and -I options are passed to the preprocessor automatically, so no need to prefix those with --preprocessor-arg) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114965 Tested-by: Jenkins Reviewed-by: Georgy Litvinov Reviewed-by: Christian Lohmaier (cherry picked from commit 07f1ec0af02a9ab6c1bf6e6478092ee50495afa7) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114971 Reviewed-by: Michael Stahl (cherry picked from commit 3589180bfa67bc2ef411a56c9e8bb161f6c59902) Change-Id: I711e968206f0769ff07152ebb9572e8b71c30cec diff --git a/external/libgpg-error/ExternalProject_libgpg-error.mk b/external/libgpg-error/ExternalProject_libgpg-error.mk index 1fcd63180e20..6b7b0ac8e6a2 100644 --- a/external/libgpg-error/ExternalProject_libgpg-error.mk +++ b/external/libgpg-error/ExternalProject_libgpg-error.mk @@ -28,7 +28,7 @@ $(call gb_ExternalProject_get_state_target,libgpg-error,build): $(call gb_Execut --disable-doc \ --disable-tests \ --host=$(gb_ExternalProject_libgpg-error_host) \ - RC='windres -O COFF --target=$(gb_ExternalProject_libgpg-error_target) --preprocessor='\''$(call gb_Executable_get_target,cpp) -+ -DRC_INVOKED -DWINAPI_FAMILY=0 $(SOLARINC)'\' \ + RC='windres -O COFF --target=$(gb_ExternalProject_libgpg-error_target) --preprocessor=$(call gb_Executable_get_target_for_build,cpp) --preprocessor-arg=-+ -DRC_INVOKED -DWINAPI_FAMILY=0 $(SOLARINC)' \ && $(MAKE) \ ) else ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: sw/inc sw/source
sw/inc/charformats.hxx | 114 sw/inc/doc.hxx |1 sw/inc/docary.hxx |6 - sw/source/core/doc/docfmt.cxx |8 +- sw/source/core/doc/docnew.cxx |9 +- sw/source/core/doc/number.cxx |2 sw/source/core/txtnode/chrfmt.cxx | 77 sw/source/core/undo/rolbck.cxx |2 sw/source/core/unocore/unosett.cxx | 13 sw/source/core/unocore/unostyle.cxx |2 10 files changed, 206 insertions(+), 28 deletions(-) New commits: commit cf15c4dad74e31a035c0d1ca899dfbef4da90ad2 Author: Noel Grandin AuthorDate: Wed Jun 23 08:51:05 2021 +0200 Commit: Noel Grandin CommitDate: Wed Jun 30 17:53:36 2021 +0200 tdf#135316 optimise SwCharFormats::FindFormatByName reduces load time by 10% Change-Id: Ic5c90588825592245d09f8ebe03b13e34676496a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117699 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/sw/inc/charformats.hxx b/sw/inc/charformats.hxx new file mode 100644 index ..f72958298ea8 --- /dev/null +++ b/sw/inc/charformats.hxx @@ -0,0 +1,114 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ +#pragma once + +#include "docary.hxx" +#include +#include +#include +#include +#include +#include + +// Like o3tl::find_partialorder_ptrequals +// We don't allow duplicated object entries! +struct char_formats_name_key +: boost::multi_index::composite_key< + SwCharFormat*, + boost::multi_index::const_mem_fun, + boost::multi_index::identity // the actual object pointer + > +{ +}; + +typedef boost::multi_index_container< +SwCharFormat*, +boost::multi_index::indexed_by, + boost::multi_index::ordered_unique>> +SwCharFormatsBase; + +class SW_DLLPUBLIC SwCharFormats final : public SwFormatsBase +{ +// function updating ByName index via modify +friend void SwFormat::SetName(const OUString&, bool); + +public: +typedef SwCharFormatsBase::nth_index<0>::type ByPos; +typedef SwCharFormatsBase::nth_index<1>::type ByName; +typedef ByPos::iterator iterator; + +private: +SwCharFormatsBase m_Array; +ByPos& m_PosIndex; +ByName& m_NameIndex; + +public: +typedef ByPos::const_iterator const_iterator; +typedef SwCharFormatsBase::size_type size_type; +typedef SwCharFormatsBase::value_type value_type; + +SwCharFormats(); +// frees all SwCharFormat! +virtual ~SwCharFormats() override; + +bool empty() const { return m_Array.empty(); } +size_t size() const { return m_Array.size(); } + +// Only fails, if you try to insert the same object twice +void insert(SwCharFormat* x); + +// This will try to remove the exact object! +void erase(const_iterator const& position); + +// Get the iterator of the exact object (includes pointer!), +// e.g for position with std::distance. +// There is also ContainsFormat, if you don't need the position. +const_iterator find(const SwCharFormat* x) const; +size_t GetPos(const SwCharFormat* p) const; + +// search for formats by name +ByName::const_iterator findByName(const OUString& name) const; +// So we can actually check for end() +ByName::const_iterator byNameEnd() const { return m_NameIndex.end(); } + +SwCharFormat* operator[](size_t index_) const { return m_PosIndex.operator[](index_); } +const_iterator begin() const { return m_PosIndex.begin(); } +const_iterator end() const { return m_PosIndex.end(); } + +void dumpAsXml(xmlTextWriterPtr pWriter) const; + +virtual size_t GetFormatCount() const override { return m_Array.size(); } +virtual SwCharFormat* GetFormat(size_t idx) const override { return operator[](idx); } + +/// fast check if given format is contained here +/// @precond pFormat must not have been deleted +bool ContainsFormat(SwCharFormat* pFormat) const; +/// not so fast check that given format is still alive (i.e. contained here) +bool IsAlive
[Libreoffice-commits] core.git: Branch 'feature/cib_contract57d' - external/gpgmepp external/libassuan external/libgpg-error
Rebased ref, commits from common ancestor: commit 731010a3124c92458be5c7c4839e8804d1c32463 Author: Christian Lohmaier AuthorDate: Sat May 1 10:40:58 2021 +0200 Commit: Michael Stahl CommitDate: Wed Jun 30 17:52:46 2021 +0200 avoid windres preprocessor quoting-messups with current cygwin apparently fresh installs of cygwin behave differently with the windres command's quoting and treats --preprocessor='cpp foo bar' as a single file "cpp foo bar" to run instead of running "cpp" with the arguments "foo" and "bar". (-D and -I options are passed to the preprocessor automatically, so no need to prefix those with --preprocessor-arg) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114965 Tested-by: Jenkins Reviewed-by: Georgy Litvinov Reviewed-by: Christian Lohmaier (cherry picked from commit 07f1ec0af02a9ab6c1bf6e6478092ee50495afa7) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114971 Reviewed-by: Michael Stahl (cherry picked from commit 3589180bfa67bc2ef411a56c9e8bb161f6c59902) Change-Id: I711e968206f0769ff07152ebb9572e8b71c30cec diff --git a/external/gpgmepp/ExternalProject_gpgmepp.mk b/external/gpgmepp/ExternalProject_gpgmepp.mk index 8ecdf60e6f87..e190f44eda63 100644 --- a/external/gpgmepp/ExternalProject_gpgmepp.mk +++ b/external/gpgmepp/ExternalProject_gpgmepp.mk @@ -39,7 +39,7 @@ $(call gb_ExternalProject_get_state_target,gpgmepp,build): $(call gb_Executable_ $(gb_COMPILEROPTFLAGS),$(gb_COMPILERNOOPTFLAGS)) \ $(if $(call gb_Module__symbols_enabled,gpgmepp),$(gb_DEBUGINFO_FLAGS))' \ --host=$(gb_ExternalProject_gpgmepp_host) \ - RC='windres -O COFF --target=$(gb_ExternalProject_gpgmepp_target) --preprocessor='\''$(call gb_Executable_get_target,cpp) -+ -DRC_INVOKED -DWINAPI_FAMILY=0 $(SOLARINC)'\' \ + RC='windres -O COFF --target=$(gb_ExternalProject_gpgmepp_target) --preprocessor=$(call gb_Executable_get_target_for_build,cpp) --preprocessor-arg=-+ -DRC_INVOKED -DWINAPI_FAMILY=0 $(SOLARINC)' \ MAKE=$(MAKE) \ && $(MAKE) \ ) diff --git a/external/libassuan/ExternalProject_libassuan.mk b/external/libassuan/ExternalProject_libassuan.mk index 83d79a520988..381632cc3215 100644 --- a/external/libassuan/ExternalProject_libassuan.mk +++ b/external/libassuan/ExternalProject_libassuan.mk @@ -34,7 +34,7 @@ $(call gb_ExternalProject_get_state_target,libassuan,build): $(call gb_Executabl GPG_ERROR_CFLAGS="$(GPG_ERROR_CFLAGS)" \ GPG_ERROR_LIBS="$(GPG_ERROR_LIBS)" \ --host=$(gb_ExternalProject_libassuan_host) \ - RC='windres -O COFF --target=$(gb_ExternalProject_libassuan_target) --preprocessor='\''$(call gb_Executable_get_target,cpp) -+ -DRC_INVOKED -DWINAPI_FAMILY=0 $(SOLARINC)'\' \ + RC='windres -O COFF --target=$(gb_ExternalProject_libassuan_target) --preprocessor=$(call gb_Executable_get_target_for_build,cpp) --preprocessor-arg=-+ -DRC_INVOKED -DWINAPI_FAMILY=0 $(SOLARINC)' \ MAKE=$(MAKE) \ && $(MAKE) \ ) diff --git a/external/libgpg-error/ExternalProject_libgpg-error.mk b/external/libgpg-error/ExternalProject_libgpg-error.mk index 1fcd63180e20..6b7b0ac8e6a2 100644 --- a/external/libgpg-error/ExternalProject_libgpg-error.mk +++ b/external/libgpg-error/ExternalProject_libgpg-error.mk @@ -28,7 +28,7 @@ $(call gb_ExternalProject_get_state_target,libgpg-error,build): $(call gb_Execut --disable-doc \ --disable-tests \ --host=$(gb_ExternalProject_libgpg-error_host) \ - RC='windres -O COFF --target=$(gb_ExternalProject_libgpg-error_target) --preprocessor='\''$(call gb_Executable_get_target,cpp) -+ -DRC_INVOKED -DWINAPI_FAMILY=0 $(SOLARINC)'\' \ + RC='windres -O COFF --target=$(gb_ExternalProject_libgpg-error_target) --preprocessor=$(call gb_Executable_get_target_for_build,cpp) --preprocessor-arg=-+ -DRC_INVOKED -DWINAPI_FAMILY=0 $(SOLARINC)' \ && $(MAKE) \ ) else ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: editeng/source filter/source include/editeng sd/source sw/source
editeng/source/items/numitem.cxx | 12 editeng/source/outliner/outlvw.cxx |4 ++-- filter/source/msfilter/svdfppt.cxx |2 +- include/editeng/numitem.hxx|2 ++ sd/source/core/drawdoc4.cxx|2 +- sd/source/core/stlpool.cxx |6 +++--- sd/source/ui/dlg/dlgolbul.cxx |2 +- sd/source/ui/func/fuolbull.cxx |2 +- sd/source/ui/view/drtxtob1.cxx |2 +- sd/source/ui/view/drviews2.cxx |2 +- sd/source/ui/view/viewshel.cxx |2 +- sw/source/uibase/app/docstyle.cxx |2 +- sw/source/uibase/shells/txtnum.cxx |2 +- 13 files changed, 28 insertions(+), 14 deletions(-) New commits: commit 738f7a8cb971a884f74766da0cbf7e59ef8b90e7 Author: Noel Grandin AuthorDate: Wed Jun 30 15:10:44 2021 +0200 Commit: Noel Grandin CommitDate: Wed Jun 30 18:03:06 2021 +0200 reduce cost of allocating and copying SvxNumRule by using std::move to avoid copying unnecessarily Change-Id: I940b57c9a05c8d75b9a16291fc4f05756fdeea12 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118164 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/editeng/source/items/numitem.cxx b/editeng/source/items/numitem.cxx index 54bec9d892ea..41ee6e4cf952 100644 --- a/editeng/source/items/numitem.cxx +++ b/editeng/source/items/numitem.cxx @@ -1013,12 +1013,24 @@ SvxNumBulletItem::SvxNumBulletItem(SvxNumRule const & rRule) : { } +SvxNumBulletItem::SvxNumBulletItem(SvxNumRule && rRule) : +SfxPoolItem(SID_ATTR_NUMBERING_RULE), +maNumRule(std::move(rRule)) +{ +} + SvxNumBulletItem::SvxNumBulletItem(SvxNumRule const & rRule, sal_uInt16 _nWhich ) : SfxPoolItem(_nWhich), maNumRule(rRule) { } +SvxNumBulletItem::SvxNumBulletItem(SvxNumRule && rRule, sal_uInt16 _nWhich ) : +SfxPoolItem(_nWhich), +maNumRule(std::move(rRule)) +{ +} + SvxNumBulletItem::SvxNumBulletItem(const SvxNumBulletItem& rCopy) : SfxPoolItem(rCopy), maNumRule(rCopy.maNumRule) diff --git a/editeng/source/outliner/outlvw.cxx b/editeng/source/outliner/outlvw.cxx index aabe51c9efd8..6cd2f6d7515e 100644 --- a/editeng/source/outliner/outlvw.cxx +++ b/editeng/source/outliner/outlvw.cxx @@ -878,7 +878,7 @@ void OutlinerView::ToggleBullets() { SfxItemSet aAttrs( pOwner->GetParaAttribs( nPara ) ); SvxNumRule aNewNumRule( *pDefaultBulletNumRule ); -aAttrs.Put( SvxNumBulletItem( aNewNumRule, EE_PARA_NUMBULLET ) ); +aAttrs.Put( SvxNumBulletItem( std::move(aNewNumRule), EE_PARA_NUMBULLET ) ); pOwner->SetParaAttribs( nPara, aAttrs ); } } @@ -1050,7 +1050,7 @@ void OutlinerView::ApplyBulletsNumbering( } } -aAttrs.Put(SvxNumBulletItem(aNewRule, EE_PARA_NUMBULLET)); +aAttrs.Put(SvxNumBulletItem(std::move(aNewRule), EE_PARA_NUMBULLET)); } } pOwner->SetParaAttribs(nPara, aAttrs); diff --git a/filter/source/msfilter/svdfppt.cxx b/filter/source/msfilter/svdfppt.cxx index 1b5a30110a94..f7ef3675a03d 100644 --- a/filter/source/msfilter/svdfppt.cxx +++ b/filter/source/msfilter/svdfppt.cxx @@ -4411,7 +4411,7 @@ PPTStyleSheet::PPTStyleSheet( const DffRecordHeader& rSlideHd, SvStream& rIn, Sd aRule.SetLevel( nDepth, aNumberFormat ); } } -mpNumBulletItem[ i ] = std::make_unique( aRule, EE_PARA_NUMBULLET ); +mpNumBulletItem[ i ] = std::make_unique( std::move(aRule), EE_PARA_NUMBULLET ); } } diff --git a/include/editeng/numitem.hxx b/include/editeng/numitem.hxx index 2e2e660267e8..bbcbecdf4c79 100644 --- a/include/editeng/numitem.hxx +++ b/include/editeng/numitem.hxx @@ -308,7 +308,9 @@ class EDITENG_DLLPUBLIC SvxNumBulletItem final : public SfxPoolItem SvxNumRule maNumRule; public: explicit SvxNumBulletItem(SvxNumRule const & rRule); +explicit SvxNumBulletItem(SvxNumRule && rRule); SvxNumBulletItem(SvxNumRule const & rRule, sal_uInt16 nWhich ); +SvxNumBulletItem(SvxNumRule && rRule, sal_uInt16 nWhich ); SvxNumBulletItem(const SvxNumBulletItem& rCopy); virtual ~SvxNumBulletItem() override; diff --git a/sd/source/core/drawdoc4.cxx b/sd/source/core/drawdoc4.cxx index e3d7080f953b..e078afc58b54 100644 --- a/sd/source/core/drawdoc4.cxx +++ b/sd/source/core/drawdoc4.cxx @@ -1268,7 +1268,7 @@ void SdDrawDocument::SetTextDefaults() const aNumRule.SetLevel( i, aNumberFormat ); } -SvxNumBulletItem aNumBulletItem( aNumRule, EE_PARA_NUMBULLET ); +SvxNumBulletItem aNumBulletItem( std::move(aNumRule), EE_PARA_NUMBULLET ); m_pItemPool->SetPoolDefaultItem( aNumBulletItem ); } diff --git a/sd/source/core/stlpool.cxx b/sd/source/core/stlpool.cxx index d6256bd6f9ae..d15aaf632b04 100644 --- a/sd/source/
[Libreoffice-commits] core.git: framework/qa sfx2/inc sfx2/source
framework/qa/cppunit/data/empty.fodp |2 ++ framework/qa/cppunit/dispatchtest.cxx | 32 sfx2/inc/unoctitm.hxx |7 ++- sfx2/source/control/unoctitm.cxx | 21 + 4 files changed, 61 insertions(+), 1 deletion(-) New commits: commit 7cbd6d768d282077053c354254315f3dc89bf254 Author: Michael Stahl AuthorDate: Wed Jun 30 13:26:59 2021 +0200 Commit: Michael Stahl CommitDate: Wed Jun 30 18:40:27 2021 +0200 sfx2: try to fix lifecycle of SfxOfficeDispatch This can be created either from the global SfxApplication, or from a SfxViewFrame. Particularly in the latter case, the SfxDispatcher and SfxBindings members are owned by SfxViewFrame, so in case that is destroyed, the SfxOfficeDispatch must clear its pointers. It looks like the member pointers are checked before access already everywhere, so just listen at the SfxViewFrame. Change-Id: If08825734e94dd54e32cb77546684fd583c336ec Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118162 Tested-by: Michael Stahl Reviewed-by: Michael Stahl diff --git a/framework/qa/cppunit/data/empty.fodp b/framework/qa/cppunit/data/empty.fodp new file mode 100644 index ..3c2a4cf2cda5 --- /dev/null +++ b/framework/qa/cppunit/data/empty.fodp @@ -0,0 +1,2 @@ + + diff --git a/framework/qa/cppunit/dispatchtest.cxx b/framework/qa/cppunit/dispatchtest.cxx index 586c4af3b9b0..2f21a71b005e 100644 --- a/framework/qa/cppunit/dispatchtest.cxx +++ b/framework/qa/cppunit/dispatchtest.cxx @@ -15,6 +15,7 @@ #include #include #include +#include #include #include @@ -199,6 +200,37 @@ CPPUNIT_TEST_FIXTURE(DispatchTest, testInterception) // This was 1: MyInterceptor::queryDispatch() was called for .uno:Italic. CPPUNIT_ASSERT_EQUAL(0, pInterceptor->getUnexpected()); } + +constexpr OUStringLiteral DATA_DIRECTORY = u"/framework/qa/cppunit/data/"; + +CPPUNIT_TEST_FIXTURE(DispatchTest, testSfxOfficeDispatchDispose) +{ +// this test doesn't work with a new document because of aURL.Main check in SfxBaseController::dispatch() +mxComponent = loadFromDesktop(m_directories.getURLFromSrc(DATA_DIRECTORY) + "empty.fodp", + "com.sun.star.presentation.PresentationDocument"); +uno::Reference xModel(mxComponent, uno::UNO_QUERY); +CPPUNIT_ASSERT(xModel.is()); +uno::Reference xController(xModel->getCurrentController()); +CPPUNIT_ASSERT(xController.is()); +uno::Reference xFrame(xController->getFrame(), uno::UNO_QUERY); +CPPUNIT_ASSERT(xFrame.is()); + +uno::Reference xParser(util::URLTransformer::create(mxComponentContext)); +util::URL url; +url.Complete = xModel->getURL() + "#dummy"; +xParser->parseStrict(url); + +uno::Reference xDisp(xFrame->queryDispatch(url, "", 0)); +CPPUNIT_ASSERT(xDisp.is()); + +mxComponent->dispose(); + +util::URL urlSlot; +urlSlot.Complete = "slot:5598"; +xParser->parseStrict(urlSlot); +// crashed with UAF +xDisp->dispatch(urlSlot, {}); +} } CPPUNIT_PLUGIN_IMPLEMENT(); diff --git a/sfx2/inc/unoctitm.hxx b/sfx2/inc/unoctitm.hxx index 805ff22b3124..9e6bc19da488 100644 --- a/sfx2/inc/unoctitm.hxx +++ b/sfx2/inc/unoctitm.hxx @@ -25,6 +25,7 @@ #include #include +#include #include #include @@ -101,7 +102,9 @@ public: SfxDispatcher* GetDispatcher_Impl(); }; -class SfxDispatchController_Impl final : public SfxControllerItem +class SfxDispatchController_Impl final +: public SfxControllerItem +, public SfxListener { css::util::URL aDispatchURL; SfxDispatcher* pDispatcher; @@ -126,6 +129,8 @@ public: const css::util::URL& rURL ); virtual ~SfxDispatchController_Impl() override; +virtual void Notify(SfxBroadcaster& rBC, const SfxHint& rHint) override; + static OUString getSlaveCommand( const css::util::URL& rURL ); voidStateChanged( sal_uInt16 nSID, SfxItemState eState, const SfxPoolItem* pState, SfxSlotServer const * pServ ); diff --git a/sfx2/source/control/unoctitm.cxx b/sfx2/source/control/unoctitm.cxx index 50034333bcd5..58bdc6179008 100644 --- a/sfx2/source/control/unoctitm.cxx +++ b/sfx2/source/control/unoctitm.cxx @@ -323,6 +323,27 @@ SfxDispatchController_Impl::SfxDispatchController_Impl( BindInternal_Impl( nSlot, pBindings ); pBindings->LEAVEREGISTRATIONS(); } +assert(pDispatcher); +assert(SfxApplication::Get()->GetAppDispatcher_Impl() == pDispatcher +|| pDispatcher->GetFrame() != nullptr); +if (pDispatcher->GetFrame()) +{ +StartListening(*pDispatcher->GetFrame()); +} +else +{ +StartListening(*SfxApplication::Get()); +} +} + +void SfxDispatchController_Impl::Notify(SfxBroadcaster& rBC, SfxHint const& rHint) +{ +
[Libreoffice-commits] core.git: Branch 'libreoffice-7-2' - include/svx officecfg/registry sc/sdi sc/source sd/sdi sd/source svx/Library_svx.mk svx/sdi svx/source svx/uiconfig svx/UIConfig_svx.mk sw/sd
include/svx/svxids.hrc |3 officecfg/registry/data/org/openoffice/Office/UI/Sidebar.xcu | 33 +++ sc/sdi/drawsh.sdi|2 sc/source/ui/drawfunc/drawsh.cxx |2 sc/source/ui/drawfunc/drawsh2.cxx| 15 + sd/sdi/_drvwsh.sdi | 11 + sd/source/ui/view/drviews2.cxx |2 sd/source/ui/view/drviewsf.cxx | 12 + svx/Library_svx.mk |1 svx/UIConfig_svx.mk |1 svx/sdi/svx.sdi | 34 +++ svx/source/sidebar/PanelFactory.cxx |5 svx/source/sidebar/textcolumns/TextColumnsPropertyPanel.cxx | 119 +++ svx/source/sidebar/textcolumns/TextColumnsPropertyPanel.hxx | 48 svx/uiconfig/ui/sidebartextcolumnspanel.ui | 107 + sw/sdi/drawsh.sdi| 14 + sw/source/uibase/shells/drawdlg.cxx | 19 + 17 files changed, 426 insertions(+), 2 deletions(-) New commits: commit f03f66498d218996af358cd4ad764248410a2a1f Author: Mike Kaganski AuthorDate: Mon Jun 14 09:51:44 2021 +0300 Commit: Mike Kaganski CommitDate: Wed Jun 30 18:53:21 2021 +0200 editengine-columns: add sidebar property panel Change-Id: I90aefc10f9eb64a65799480777bc4287abae Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117107 Tested-by: Jenkins Reviewed-by: Mike Kaganski (cherry picked from commit dd5bf12193471f064bf7f581dd1b21783390e735) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117217 diff --git a/include/svx/svxids.hrc b/include/svx/svxids.hrc index 0627c29e1500..6b23b3176f17 100644 --- a/include/svx/svxids.hrc +++ b/include/svx/svxids.hrc @@ -438,6 +438,9 @@ class SdrAngleItem; //#define SID_SIDEBAR ( SID_SVX_START + 336 ) -> sfxsids.hrc +#define SID_ATTR_TEXTCOLUMNS_NUMBER ( SID_SVX_START + 337 ) +#define SID_ATTR_TEXTCOLUMNS_SPACING( SID_SVX_START + 338 ) + #define SID_SB_CONNECTIONPOOLING( SID_SVX_START + 348 ) #define SID_SB_DBREGISTEROPTIONS( SID_SVX_START + 349 ) #define SID_BMPMASK ( SID_SVX_START + 350 ) diff --git a/officecfg/registry/data/org/openoffice/Office/UI/Sidebar.xcu b/officecfg/registry/data/org/openoffice/Office/UI/Sidebar.xcu index daeecf5bbaed..6876d922072d 100644 --- a/officecfg/registry/data/org/openoffice/Office/UI/Sidebar.xcu +++ b/officecfg/registry/data/org/openoffice/Office/UI/Sidebar.xcu @@ -1843,6 +1843,39 @@ + + + Columns + + + TextColumnsPropertyPanel + + + PropertyDeck + + + +Calc, Draw, hidden ; +Calc, Graphic,hidden ; +Calc, Media, hidden ; +DrawImpress,Draw, hidden ; +DrawImpress,Graphic,hidden ; +DrawImpress,TextObject, hidden ; +WriterVariants, Draw, hidden ; +WriterVariants, Graphic,hidden ; + + + + private:resource/toolpanel/SvxPanelFactory/TextColumnsPropertyPanel + + + 800 + + + false + + + diff --git a/sc/sdi/drawsh.sdi b/sc/sdi/drawsh.sdi index b1d5ecec44a8..e097df04036a 100644 --- a/sc/sdi/drawsh.sdi +++ b/sc/sdi/drawsh.sdi @@ -231,6 +231,8 @@ interface TableDraw SID_ATTR_SOFTEDGE_RADIUS[ ExecMethod = ExecDrawAttr; StateMethod = GetDrawAttrState; ] SID_MOVE_SHAPE_HANDLE [ ExecMethod = ExecDrawAttr; ] +SID_ATTR_TEXTCOLUMNS_NUMBER [ ExecMethod = ExecDrawAttr; StateMethod = GetDrawAttrState; ] +SID_ATTR_TEXTCOLUMNS_SPACING[ ExecMethod = ExecDrawAttr; StateMethod = GetDrawAttrState; ] } diff --git a/sc/source/ui/drawfunc/drawsh.cxx b/sc/source/ui/drawfunc/drawsh.cxx index f60fba27b4d2..2be55f8100ab 100644 --- a/sc/source/ui/drawfunc/drawsh.cxx +++ b/sc/source/ui/drawfunc/drawsh.cxx @@ -417,6 +417,8 @@ void ScDrawShell::ExecDrawAttr( SfxRequest& rReq ) case SID_ATTR_GLOW_RADIUS: case SID_ATTR_GLOW_TRANSPARENCY: case SID_ATTR_SOFTEDGE_RADIUS: +case SID_ATTR_TEXTCOLUMNS_NUMBER: +case SID_ATTR_TEXTCOLUMNS_SPACING: if (const SfxItemSet* pNewArgs = rReq.GetArgs()) pView->SetAttrToMarked(*pNewArgs, false); rReq.Done(); diff --git a/sc/source/ui/drawfunc/drawsh2.cxx b/sc/source/ui/drawfunc/drawsh2.cxx index 22f28e52efe8..82609b657959 1
[Libreoffice-commits] core.git: sc/qa sc/source
sc/qa/unit/data/xlsx/checkbox-form-control.xlsx |binary sc/qa/unit/subsequent_export-test2.cxx | 20 sc/source/filter/excel/xeescher.cxx | 98 +++- sc/source/filter/inc/xeescher.hxx |3 sc/source/filter/xcl97/xcl97rec.cxx | 12 ++ 5 files changed, 131 insertions(+), 2 deletions(-) New commits: commit 94678a7b9c6b7e577c15adacc885e03551bcf17b Author: Miklos Vajna AuthorDate: Wed Jun 30 16:22:42 2021 +0200 Commit: Miklos Vajna CommitDate: Wed Jun 30 20:33:39 2021 +0200 XLSX export: improve handling of checkbox (form controls) This builds on top of commit fd238380ae7820f12ac1f7c52d0f7180a93f3ba3 (tdf#106181 XLSX export: output form controls, 2020-05-13) and adds the missing VML version which seems to be mandated by Excel 2019. It is not perfect (e.g. there is still an unwanted border around the checkbox), but the checkbox has a correct position and its label is readable, while it was just lost previously. Change-Id: I08198d068a0eb85061d138719cfc60d73c46398e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118168 Reviewed-by: Miklos Vajna Tested-by: Jenkins diff --git a/sc/qa/unit/data/xlsx/checkbox-form-control.xlsx b/sc/qa/unit/data/xlsx/checkbox-form-control.xlsx new file mode 100644 index ..ad761a573aae Binary files /dev/null and b/sc/qa/unit/data/xlsx/checkbox-form-control.xlsx differ diff --git a/sc/qa/unit/subsequent_export-test2.cxx b/sc/qa/unit/subsequent_export-test2.cxx index 1c088c813f21..eb6db21167d3 100644 --- a/sc/qa/unit/subsequent_export-test2.cxx +++ b/sc/qa/unit/subsequent_export-test2.cxx @@ -187,6 +187,7 @@ public: void testTdf139258_rotated_image(); void testTdf126541_SheetVisibilityImportXlsx(); void testTdf140431(); +void testCheckboxFormControlXlsxExport(); CPPUNIT_TEST_SUITE(ScExportTest2); @@ -282,6 +283,7 @@ public: CPPUNIT_TEST(testTdf139258_rotated_image); CPPUNIT_TEST(testTdf126541_SheetVisibilityImportXlsx); CPPUNIT_TEST(testTdf140431); +CPPUNIT_TEST(testCheckboxFormControlXlsxExport); CPPUNIT_TEST_SUITE_END(); @@ -2301,6 +2303,24 @@ void ScExportTest2::testTdf140431() xDocSh->DoClose(); } +void ScExportTest2::testCheckboxFormControlXlsxExport() +{ +// Given a document that has a checkbox form control: +ScDocShellRef xShell = loadDoc(u"checkbox-form-control.", FORMAT_XLSX); +CPPUNIT_ASSERT(xShell.is()); + +// When exporting to XLSX: +std::shared_ptr pXPathFile += ScBootstrapFixture::exportTo(&(*xShell), FORMAT_XLSX); + +// Then make sure its VML markup is written and it has a correct position + size: +xmlDocUniquePtr pDoc += XPathHelper::parseExport(pXPathFile, m_xSFactory, "xl/drawings/vmlDrawing1.vml"); +// Without the fix in place, this test would have failed as there was no such stream. +CPPUNIT_ASSERT(pDoc); +assertXPathContent(pDoc, "/xml/v:shape/xx:ClientData/xx:Anchor", "1, 22, 3, 3, 3, 30, 6, 1"); +} + CPPUNIT_TEST_SUITE_REGISTRATION(ScExportTest2); CPPUNIT_PLUGIN_IMPLEMENT(); diff --git a/sc/source/filter/excel/xeescher.cxx b/sc/source/filter/excel/xeescher.cxx index 1bc1a753acad..2f1253c0a16e 100644 --- a/sc/source/filter/excel/xeescher.cxx +++ b/sc/source/filter/excel/xeescher.cxx @@ -70,6 +70,7 @@ #include #include #include +#include #include using namespace com::sun::star; @@ -651,7 +652,8 @@ XclExpTbxControlObj::XclExpTbxControlObj( XclExpObjectManager& rRoot, Reference< mbScrollHor( false ), mbPrint( false ), mbVisible( false ), -mnShapeId( 0 ) +mnShapeId( 0 ), +mrRoot(rRoot) { namespace FormCompType = css::form::FormComponentType; namespace AwtVisualEffect = css::awt::VisualEffect; @@ -1084,6 +1086,100 @@ void XclExpTbxControlObj::setShapeId(sal_Int32 aShapeId) mnShapeId = aShapeId; } +namespace +{ +/// Handles the VML export of form controls (e.g. checkboxes). +class VmlFormControlExporter : public oox::vml::VMLExport +{ +sal_uInt16 m_nObjType; +tools::Rectangle m_aAreaFrom; +tools::Rectangle m_aAreaTo; +OUString m_aLabel; + +public: +VmlFormControlExporter(const sax_fastparser::FSHelperPtr& p, sal_uInt16 nObjType, + const tools::Rectangle& rAreaFrom, const tools::Rectangle& rAreaTo, + const OUString& rLabel); + +protected: +using VMLExport::StartShape; +sal_Int32 StartShape() override; +using VMLExport::EndShape; +void EndShape(sal_Int32 nShapeElement) override; +}; + +VmlFormControlExporter::VmlFormControlExporter(const sax_fastparser::FSHelperPtr& p, + sal_uInt16 nObjType, + const tools::Rectangle& rAreaFrom, + const tools::Rectangle& rAreaTo, +
[Libreoffice-commits] core.git: Branch 'libreoffice-7-2' - sc/qa sc/source
sc/qa/unit/data/xlsx/129969-min.xlsx |binary sc/qa/unit/subsequent_export-test2.cxx | 19 +++ sc/source/filter/excel/xecontent.cxx |4 ++-- 3 files changed, 21 insertions(+), 2 deletions(-) New commits: commit 900ec0ac2b5fa0eb3bf42220077dc391e1aa4522 Author: Tünde Tóth AuthorDate: Tue Jun 29 13:58:59 2021 +0200 Commit: Xisco Fauli CommitDate: Wed Jun 30 20:56:40 2021 +0200 tdf#140431 XLSX export: fix double file:// prefix Regression from commit: fc58d7d65b9683db7b7632137126680b8483f6c5 (tdf#129969 XLSX export: file URLs need IURI encoding) Change-Id: I5bfb0ef9ba7fe82cd3f4d0e0b3fdcf8f705cba64 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118090 Tested-by: Jenkins Tested-by: László Németh Reviewed-by: László Németh (cherry picked from commit 67e2cc17bad3fd7aacb94da47f9024b731434a84) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118173 Reviewed-by: Xisco Fauli diff --git a/sc/qa/unit/data/xlsx/129969-min.xlsx b/sc/qa/unit/data/xlsx/129969-min.xlsx new file mode 100644 index ..b6fd8e9e2069 Binary files /dev/null and b/sc/qa/unit/data/xlsx/129969-min.xlsx differ diff --git a/sc/qa/unit/subsequent_export-test2.cxx b/sc/qa/unit/subsequent_export-test2.cxx index 8e4f77ebbd79..1c088c813f21 100644 --- a/sc/qa/unit/subsequent_export-test2.cxx +++ b/sc/qa/unit/subsequent_export-test2.cxx @@ -186,6 +186,7 @@ public: void testTdf136721_paper_size(); void testTdf139258_rotated_image(); void testTdf126541_SheetVisibilityImportXlsx(); +void testTdf140431(); CPPUNIT_TEST_SUITE(ScExportTest2); @@ -280,6 +281,7 @@ public: CPPUNIT_TEST(testTdf136721_paper_size); CPPUNIT_TEST(testTdf139258_rotated_image); CPPUNIT_TEST(testTdf126541_SheetVisibilityImportXlsx); +CPPUNIT_TEST(testTdf140431); CPPUNIT_TEST_SUITE_END(); @@ -2282,6 +2284,23 @@ void ScExportTest2::testTdf126541_SheetVisibilityImportXlsx() CPPUNIT_ASSERT(xShell->GetDocument().GetViewOptions().GetOption(VOPT_GRID)); } +void ScExportTest2::testTdf140431() +{ +ScDocShellRef xShell = loadDoc(u"129969-min.", FORMAT_XLSX); +CPPUNIT_ASSERT(xShell.is()); + +ScDocShellRef xDocSh = saveAndReload(&(*xShell), FORMAT_XLSX); +CPPUNIT_ASSERT(xDocSh.is()); +ScDocument& rDoc = xDocSh->GetDocument(); +ScAddress aPos(0, 2, 0); +const EditTextObject* pEditText = rDoc.GetEditText(aPos); +const SvxFieldData* pData = pEditText->GetFieldData(0, 0, text::textfield::Type::URL); +const SvxURLField* pURLData = static_cast(pData); +CPPUNIT_ASSERT(pURLData->GetURL().startsWith("file://ndhlis")); + +xDocSh->DoClose(); +} + CPPUNIT_TEST_SUITE_REGISTRATION(ScExportTest2); CPPUNIT_PLUGIN_IMPLEMENT(); diff --git a/sc/source/filter/excel/xecontent.cxx b/sc/source/filter/excel/xecontent.cxx index cf0c3777f39f..0848745b8d4a 100644 --- a/sc/source/filter/excel/xecontent.cxx +++ b/sc/source/filter/excel/xecontent.cxx @@ -394,9 +394,9 @@ XclExpHyperlink::XclExpHyperlink( const XclExpRoot& rRoot, const SvxURLField& rU for( int i = 0; i < nLevel; ++i ) msTarget = "../" + msTarget; } -else +else if (rRoot.GetOutput() != EXC_OUTPUT_XML_2007) { -// ooxml expects the file:/// part appended ( or at least +// xls expects the file:/// part appended ( or at least // ms2007 does, ms2010 is more tolerant ) msTarget = "file:///" + msTarget; } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: svx/source sw/source
svx/source/sidebar/nbdtmg.cxx |2 +- sw/source/filter/html/htmlflywriter.cxx |4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) New commits: commit 8ed2142789b3db66c5ab28087040dee7c0ca6341 Author: Luboš Luňák AuthorDate: Tue Jun 15 15:24:15 2021 +0200 Commit: Noel Grandin CommitDate: Wed Jun 30 20:56:39 2021 +0200 fix a size warning d7855213ae60d79f converted this incorrectly, the code right above may set the size as (0,0), and before the commit the invalid size was only negative. Change-Id: I198d025f5c02780ae509f97782bc41ac77fa3407 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117376 Tested-by: Jenkins Reviewed-by: Noel Grandin Reviewed-by: Luboš Luňák diff --git a/svx/source/sidebar/nbdtmg.cxx b/svx/source/sidebar/nbdtmg.cxx index 76d1004e61dc..3c744fbf97b4 100644 --- a/svx/source/sidebar/nbdtmg.cxx +++ b/svx/source/sidebar/nbdtmg.cxx @@ -852,7 +852,7 @@ void OutlineTypeMgr::ApplyNumRule(SvxNumRule& aNum, sal_uInt16 nIndex, sal_uInt1 const Graphic* pGrf = pLevelSettings->pBrushItem->GetGraphic(); Size aSize = pLevelSettings->aSize; sal_Int16 eOrient = text::VertOrientation::LINE_CENTER; -if (!isResetSize && aFmt.GetGraphicSize()!=Size(0,0))\ +if (!isResetSize && aFmt.GetGraphicSize()!=Size(0,0)) aSize = aFmt.GetGraphicSize(); else if (aSize.IsEmpty() && pGrf) aSize = SvxNumberFormat::GetGraphicSizeMM100( pGrf ); diff --git a/sw/source/filter/html/htmlflywriter.cxx b/sw/source/filter/html/htmlflywriter.cxx index 472f406c28c6..bc065a7d64c0 100644 --- a/sw/source/filter/html/htmlflywriter.cxx +++ b/sw/source/filter/html/htmlflywriter.cxx @@ -685,7 +685,7 @@ OString SwHTMLWriter::OutFrameFormatOptions( const SwFrameFormat &rFrameFormat, (nPercentHeight ? 0 : pFSItem->GetHeight()-aTwipSpc.Height()) ); -OSL_ENSURE( !aTwipSz.IsEmpty(), "Frame size minus spacing < 0!!!???" ); +OSL_ENSURE( aTwipSz.Width() >= 0 && aTwipSz.Height() >= 0, "Frame size minus spacing < 0!!!???" ); if( aTwipSz.Width() < 0 ) aTwipSz.setWidth( 0 ); if( aTwipSz.Height() < 0 ) @@ -964,7 +964,7 @@ void SwHTMLWriter::writeFrameFormatOptions(HtmlWriter& aHtml, const SwFrameForma (nPercentHeight ? 0 : pFSItem->GetHeight()-aTwipSpc.Height()) ); -OSL_ENSURE( !aTwipSz.IsEmpty(), "Frame size minus spacing < 0!!!???" ); +OSL_ENSURE( aTwipSz.Width() >= 0 && aTwipSz.Height() >= 0, "Frame size minus spacing < 0!!!???" ); if( aTwipSz.Width() < 0 ) aTwipSz.setWidth( 0 ); if( aTwipSz.Height() < 0 ) ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-7-2' - 2 commits - sw/inc sw/source writerfilter/source
sw/inc/unodraw.hxx |1 sw/source/core/unocore/unodraw.cxx | 29 --- writerfilter/source/dmapper/NumberingManager.cxx |2 - 3 files changed, 18 insertions(+), 14 deletions(-) New commits: commit 2577db3d6b1e59e14441704dc408200d7ce3e256 Author: Noel Grandin AuthorDate: Tue Jun 29 11:28:53 2021 +0200 Commit: Noel Grandin CommitDate: Wed Jun 30 20:57:07 2021 +0200 tdf#135316 make regex object static const so we only compile it once, shaves 1% off load time Change-Id: I8e6e20205659582901ffb8d4496ce44906146204 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118157 Tested-by: Jenkins Reviewed-by: Noel Grandin (cherry picked from commit 5ba64bba76ca1d23191300d1b5080cc091d432de) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118174 diff --git a/writerfilter/source/dmapper/NumberingManager.cxx b/writerfilter/source/dmapper/NumberingManager.cxx index 62706d1a5614..764aace41808 100644 --- a/writerfilter/source/dmapper/NumberingManager.cxx +++ b/writerfilter/source/dmapper/NumberingManager.cxx @@ -687,7 +687,7 @@ void ListsManager::lcl_attribute( Id nName, Value& rVal ) // DOCX level-text contains levels definition in format "%1.%2.%3" // we need to convert it to LO internal representation: "%1%.%2%.%3%" -std::regex aTokenRegex("(%\\d)"); +static const std::regex aTokenRegex("(%\\d)"); sLevelText = std::regex_replace(sLevelText, aTokenRegex, "$1%"); pCurrentLvl->SetBulletChar( OUString::fromUtf8(sLevelText) ); } commit e2173d675b55b14081e9ae3d5b188cde65ad1fae Author: Noel Grandin AuthorDate: Tue Jun 29 11:29:18 2021 +0200 Commit: Noel Grandin CommitDate: Wed Jun 30 20:56:56 2021 +0200 tdf#135316 cache propertysetinfo in SwXShape shaves 3% off loaad time Change-Id: I6541f94553d862787566672d91e2a87902835664 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118158 Tested-by: Jenkins Reviewed-by: Noel Grandin (cherry picked from commit 05992ce5d03aeb2db8d4fc7a68053ebd9a9aa511) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118175 diff --git a/sw/inc/unodraw.hxx b/sw/inc/unodraw.hxx index e4e5f3a40272..f68e90fe4bbe 100644 --- a/sw/inc/unodraw.hxx +++ b/sw/inc/unodraw.hxx @@ -144,6 +144,7 @@ class SwXShape : public SwXShapeBaseClass, public SvtListener const SfxItemPropertySet* m_pPropSet; const SfxItemPropertyMapEntry* m_pPropertyMapEntries; +css::uno::Reference< css::beans::XPropertySetInfo > mxPropertySetInfo; std::unique_ptr m_pImpl; diff --git a/sw/source/core/unocore/unodraw.cxx b/sw/source/core/unocore/unodraw.cxx index 3348abee8fe1..8c5bf6c890bd 100644 --- a/sw/source/core/unocore/unodraw.cxx +++ b/sw/source/core/unocore/unodraw.cxx @@ -1016,23 +1016,26 @@ uno::Sequence< sal_Int8 > SwXShape::getImplementationId( ) uno::Reference< beans::XPropertySetInfo > SwXShape::getPropertySetInfo() { SolarMutexGuard aGuard; -uno::Reference< beans::XPropertySetInfo > aRet; -if(m_xShapeAgg.is()) +if (!mxPropertySetInfo) { -const uno::Type& rPropSetType = cppu::UnoType::get(); -uno::Any aPSet = m_xShapeAgg->queryAggregation( rPropSetType ); -if(auto xPrSet = o3tl::tryAccess>( - aPSet)) +uno::Reference< beans::XPropertySetInfo > aRet; +if(m_xShapeAgg.is()) { -uno::Reference< beans::XPropertySetInfo > xInfo = (*xPrSet)->getPropertySetInfo(); -// Expand PropertySetInfo! -const uno::Sequence aPropSeq = xInfo->getProperties(); -aRet = new SfxExtItemPropertySetInfo( m_pPropertyMapEntries, aPropSeq ); +const uno::Type& rPropSetType = cppu::UnoType::get(); +uno::Any aPSet = m_xShapeAgg->queryAggregation( rPropSetType ); +if(auto xPrSet = o3tl::tryAccess>( + aPSet)) +{ +uno::Reference< beans::XPropertySetInfo > xInfo = (*xPrSet)->getPropertySetInfo(); +// Expand PropertySetInfo! +const uno::Sequence aPropSeq = xInfo->getProperties(); +mxPropertySetInfo = new SfxExtItemPropertySetInfo( m_pPropertyMapEntries, aPropSeq ); +} } +if(!mxPropertySetInfo) +mxPropertySetInfo = m_pPropSet->getPropertySetInfo(); } -if(!aRet.is()) -aRet = m_pPropSet->getPropertySetInfo(); -return aRet; +return mxPropertySetInfo; } void SwXShape::setPropertyValue(const OUString& rPropertyName, const uno::Any& aValue) ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-7-2' - writerfilter/source
writerfilter/source/dmapper/StyleSheetTable.cxx | 43 +--- writerfilter/source/dmapper/StyleSheetTable.hxx |2 - 2 files changed, 18 insertions(+), 27 deletions(-) New commits: commit a9920e1fb8e7a1eb8158c8c699c2bf973d95bb32 Author: Noel Grandin AuthorDate: Thu Jun 24 15:01:02 2021 +0200 Commit: Noel Grandin CommitDate: Wed Jun 30 20:57:16 2021 +0200 tdf#135316 store stylesheets in a map for faster lookup. Shaves 3% off my loading time Change-Id: I075b42db52914988be4adef303825c211b02353f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117848 Tested-by: Jenkins Reviewed-by: Noel Grandin (cherry picked from commit ab5ac64bdd3205ba2ba9ac038719826f703a09a3) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118110 diff --git a/writerfilter/source/dmapper/StyleSheetTable.cxx b/writerfilter/source/dmapper/StyleSheetTable.cxx index 361914a60aea..af4eefc0d54f 100644 --- a/writerfilter/source/dmapper/StyleSheetTable.cxx +++ b/writerfilter/source/dmapper/StyleSheetTable.cxx @@ -270,6 +270,7 @@ struct StyleSheetTable_Impl uno::Reference< text::XTextDocument>m_xTextDocument; uno::Reference< beans::XPropertySet>m_xTextDefaults; std::vector< StyleSheetEntryPtr > m_aStyleSheetEntries; +std::map< OUString, StyleSheetEntryPtr > m_aStyleSheetEntriesMap; StyleSheetEntryPtr m_pCurrentEntry; PropertyMapPtr m_pDefaultParaProps, m_pDefaultCharProps; OUStringm_sDefaultParaStyleName; //WW8 name @@ -809,6 +810,7 @@ void StyleSheetTable::lcl_entry(writerfilter::Reference::Pointer_t r { m_pImpl->m_pCurrentEntry->sConvertedStyleName = ConvertStyleName( m_pImpl->m_pCurrentEntry->sStyleName ); m_pImpl->m_aStyleSheetEntries.push_back( m_pImpl->m_pCurrentEntry ); +m_pImpl->m_aStyleSheetEntriesMap.emplace( m_pImpl->m_pCurrentEntry->sStyleIdentifierD, m_pImpl->m_pCurrentEntry ); } else { @@ -,16 +1113,14 @@ void StyleSheetTable::ApplyStyleSheets( const FontTablePtr& rFontTable ) if (rVal.Name == "customStyle" && rVal.Value == true) { OUString sBaseId = pEntry->sBaseStyleIdentifier; -for (const auto& aSheetProps : m_pImpl->m_aStyleSheetEntries) +auto findIt = m_pImpl->m_aStyleSheetEntriesMap.find(sBaseId); +if (findIt != m_pImpl->m_aStyleSheetEntriesMap.end()) { -if (aSheetProps->sStyleIdentifierD == sBaseId) -{ -StyleSheetPropertyMap& rStyleSheetProps -= dynamic_cast(*aSheetProps->pProperties); - pStyleSheetProperties->SetListLevel(rStyleSheetProps.GetListLevel()); - pStyleSheetProperties->SetOutlineLevel(rStyleSheetProps.GetOutlineLevel()); -break; -} +const auto& aSheetProps = findIt->second; +StyleSheetPropertyMap& rStyleSheetProps += dynamic_cast(*aSheetProps->pProperties); + pStyleSheetProperties->SetListLevel(rStyleSheetProps.GetListLevel()); + pStyleSheetProperties->SetOutlineLevel(rStyleSheetProps.GetOutlineLevel()); } } } @@ -1300,18 +1300,12 @@ void StyleSheetTable::ApplyStyleSheets( const FontTablePtr& rFontTable ) } -StyleSheetEntryPtr StyleSheetTable::FindStyleSheetByISTD(std::u16string_view sIndex) +StyleSheetEntryPtr StyleSheetTable::FindStyleSheetByISTD(const OUString& sIndex) { -StyleSheetEntryPtr pRet; -for(const StyleSheetEntryPtr & rpEntry : m_pImpl->m_aStyleSheetEntries) -{ -if( rpEntry->sStyleIdentifierD == sIndex) -{ -pRet = rpEntry; -break; -} -} -return pRet; +auto findIt = m_pImpl->m_aStyleSheetEntriesMap.find(sIndex); +if (findIt != m_pImpl->m_aStyleSheetEntriesMap.end()) +return findIt->second; +return StyleSheetEntryPtr(); } @@ -1346,12 +1340,9 @@ OUString StyleSheetTable::ConvertStyleName( const OUString& rWWName, bool bExten if( bExtendedSearch ) { //search for the rWWName in the IdentifierD of the existing styles and convert the sSty
[Libreoffice-commits] core.git: Branch 'libreoffice-7-2' - sc/source
sc/source/ui/unoobj/filtuno.cxx |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) New commits: commit 8b496beb74255d619a8de72a07860d1a77c4f79a Author: Andreas Heinisch AuthorDate: Wed Jun 30 10:37:08 2021 +0200 Commit: Xisco Fauli CommitDate: Wed Jun 30 20:58:42 2021 +0200 tdf#132421 - don't URL encode filename for the import ASCII dialog title Change-Id: Ia2cb7b6b355f640a525c41606da25ba35771499b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118148 Tested-by: Jenkins Reviewed-by: Andreas Heinisch (cherry picked from commit 6e8c9047f4bf6194bd1423422bd2dc9f92c50725) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118109 Reviewed-by: Xisco Fauli diff --git a/sc/source/ui/unoobj/filtuno.cxx b/sc/source/ui/unoobj/filtuno.cxx index 1e6119ecb36d..fbea6e78aa19 100644 --- a/sc/source/ui/unoobj/filtuno.cxx +++ b/sc/source/ui/unoobj/filtuno.cxx @@ -182,7 +182,8 @@ sal_Int16 SAL_CALL ScFilterOptionsObj::execute() // ascii import is special... INetURLObject aURL( aFileName ); -OUString aPrivDatName(aURL.getName()); +// tdf#132421 - don't URL encode filename for the import ASCII dialog title +OUString aPrivDatName(aURL.GetLastName(INetURLObject::DecodeMechanism::Unambiguous)); std::unique_ptr pInStream; if ( xInputStream.is() ) pInStream = utl::UcbStreamHelper::CreateStream( xInputStream ); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: filter/source sd/qa
filter/source/graphicfilter/icgm/class4.cxx |7 ++- sd/qa/unit/data/cgm/fail/ofz35504-ubsan-1.cgm |binary 2 files changed, 6 insertions(+), 1 deletion(-) New commits: commit 5e865370530a71eb966d2fbfc2fdfffc34d2e1b9 Author: Caolán McNamara AuthorDate: Tue Jun 29 21:27:18 2021 +0100 Commit: Caolán McNamara CommitDate: Wed Jun 30 21:45:35 2021 +0200 ofz#35504 clamp input values in cgm filter Change-Id: I96712b8dc8f8eaad3fb8fa6710d0f07fff61b592 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118137 Tested-by: Jenkins Reviewed-by: Caolán McNamara diff --git a/filter/source/graphicfilter/icgm/class4.cxx b/filter/source/graphicfilter/icgm/class4.cxx index 0a498426b3bc..697a466793bc 100644 --- a/filter/source/graphicfilter/icgm/class4.cxx +++ b/filter/source/graphicfilter/icgm/class4.cxx @@ -109,7 +109,12 @@ bool CGM::ImplGetEllipse( FloatPoint& rCenter, FloatPoint& rRadius, double& rAng static bool useless(double value) { -return std::isnan(value) || std::isinf(value); +if (!std::isfinite(value)) +return true; +int exp; +std::frexp(value, &exp); +const int maxbits = sizeof(tools::Long) * 8; +return exp > maxbits; } void CGM::ImplDoClass4() diff --git a/sd/qa/unit/data/cgm/fail/ofz35504-ubsan-1.cgm b/sd/qa/unit/data/cgm/fail/ofz35504-ubsan-1.cgm new file mode 100644 index ..07aa3db00776 Binary files /dev/null and b/sd/qa/unit/data/cgm/fail/ofz35504-ubsan-1.cgm differ ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: vcl/inc vcl/unx
vcl/inc/unx/gtk/gtkinst.hxx |2 +- vcl/unx/gtk3/gtkframe.cxx | 16 +--- vcl/unx/gtk3/gtkinst.cxx|4 ++-- 3 files changed, 12 insertions(+), 10 deletions(-) New commits: commit 86372bf5f62aea48cb3b68d30e81597a0dac9cc2 Author: Caolán McNamara AuthorDate: Wed Jun 30 14:28:21 2021 +0100 Commit: Caolán McNamara CommitDate: Wed Jun 30 21:46:02 2021 +0200 tdf#143113 fix crash in dnd Change-Id: Ifab741494e4cc6e51ca4cd89b57c3600d80dca44 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118163 Tested-by: Jenkins Reviewed-by: Caolán McNamara diff --git a/vcl/inc/unx/gtk/gtkinst.hxx b/vcl/inc/unx/gtk/gtkinst.hxx index a293662791ae..5fb0b67b2b8f 100644 --- a/vcl/inc/unx/gtk/gtkinst.hxx +++ b/vcl/inc/unx/gtk/gtkinst.hxx @@ -176,7 +176,7 @@ public: gboolean signalDragDrop(GtkDropTargetAsync *context, GdkDrop *drop, double x, double y); #endif -void signalDragLeave(); +void signalDragLeave(GtkWidget* pWidget); #if !GTK_CHECK_VERSION(4, 0, 0) void signalDragDropReceived(GtkWidget* pWidget, GdkDragContext* context, gint x, gint y, GtkSelectionData* data, guint ttype, guint time); diff --git a/vcl/unx/gtk3/gtkframe.cxx b/vcl/unx/gtk3/gtkframe.cxx index 2b133e0868e3..b3647b6a8296 100644 --- a/vcl/unx/gtk3/gtkframe.cxx +++ b/vcl/unx/gtk3/gtkframe.cxx @@ -4643,10 +4643,12 @@ GdkDragAction GtkInstDropTarget::signalDragMotion(GtkDropTargetAsync *context, G { if (!m_bInDrag) { -GtkWidget* pHighlightWidget = GTK_WIDGET(m_pFrame->getFixedContainer()); #if !GTK_CHECK_VERSION(4,0,0) +GtkWidget* pHighlightWidget = m_pFrame ? GTK_WIDGET(m_pFrame->getFixedContainer()) : pWidget; gtk_drag_highlight(pHighlightWidget); #else +GtkWidget* pHighlightWidget = m_pFrame ? GTK_WIDGET(m_pFrame->getFixedContainer()) : +gtk_event_controller_get_widget(GTK_EVENT_CONTROLLER(context)); gtk_widget_set_state_flags(pHighlightWidget, GTK_STATE_FLAG_DROP_ACTIVE, false); #endif } @@ -4744,20 +4746,20 @@ GdkDragAction GtkInstDropTarget::signalDragMotion(GtkDropTargetAsync *context, G } #if GTK_CHECK_VERSION(4,0,0) -void GtkSalFrame::signalDragLeave(GtkDropTargetAsync* /*dest*/, GdkDrop* /*drop*/, gpointer frame) +void GtkSalFrame::signalDragLeave(GtkDropTargetAsync* pDest, GdkDrop* /*drop*/, gpointer frame) { GtkSalFrame* pThis = static_cast(frame); if (!pThis->m_pDropTarget) return; -pThis->m_pDropTarget->signalDragLeave(); + pThis->m_pDropTarget->signalDragLeave(gtk_event_controller_get_widget(GTK_EVENT_CONTROLLER(pDest))); } #else -void GtkSalFrame::signalDragLeave(GtkWidget*, GdkDragContext* /*context*/, guint /*time*/, gpointer frame) +void GtkSalFrame::signalDragLeave(GtkWidget* pWidget, GdkDragContext* /*context*/, guint /*time*/, gpointer frame) { GtkSalFrame* pThis = static_cast(frame); if (!pThis->m_pDropTarget) return; -pThis->m_pDropTarget->signalDragLeave(); +pThis->m_pDropTarget->signalDragLeave(pWidget); } #endif @@ -4770,11 +4772,11 @@ static gboolean lcl_deferred_dragExit(gpointer user_data) return false; } -void GtkInstDropTarget::signalDragLeave() +void GtkInstDropTarget::signalDragLeave(GtkWidget *pWidget) { m_bInDrag = false; -GtkWidget* pHighlightWidget = GTK_WIDGET(m_pFrame->getFixedContainer()); +GtkWidget* pHighlightWidget = m_pFrame ? GTK_WIDGET(m_pFrame->getFixedContainer()) : pWidget; #if !GTK_CHECK_VERSION(4,0,0) gtk_drag_unhighlight(pHighlightWidget); #else diff --git a/vcl/unx/gtk3/gtkinst.cxx b/vcl/unx/gtk3/gtkinst.cxx index 0a0cb24724d7..80e2fc7983a5 100644 --- a/vcl/unx/gtk3/gtkinst.cxx +++ b/vcl/unx/gtk3/gtkinst.cxx @@ -3077,10 +3077,10 @@ private: } #if !GTK_CHECK_VERSION(4, 0, 0) -static void signalDragLeave(GtkWidget*, GdkDragContext*, guint /*time*/, gpointer widget) +static void signalDragLeave(GtkWidget* pWidget, GdkDragContext*, guint /*time*/, gpointer widget) { GtkInstanceWidget* pThis = static_cast(widget); -pThis->m_xDropTarget->signalDragLeave(); +pThis->m_xDropTarget->signalDragLeave(pWidget); if (pThis->m_bDraggedOver) { pThis->m_bDraggedOver = false; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: vcl/win
vcl/win/window/salframe.cxx | 21 +++-- 1 file changed, 15 insertions(+), 6 deletions(-) New commits: commit ce9e6972148c657994beb74f671e51bec5be6689 Author: Caolán McNamara AuthorDate: Wed Jun 30 15:58:57 2021 +0100 Commit: Caolán McNamara CommitDate: Wed Jun 30 21:48:05 2021 +0200 tdf#70633 unset Alt if detected as AltGr in both KeyInput branches we are unsetting Alt if the modifier is AltGr in one SalEvent::KeyInput case but not in another. If I replicate the unset of Alt if AlrGr in the other place then both UTF-16 parts of the codepoint get accepted and the described input case works Change-Id: Ifa8a5afbb1853ef3d5f388fd5e7bd3bbc048e260 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118170 Tested-by: Jenkins Reviewed-by: Caolán McNamara diff --git a/vcl/win/window/salframe.cxx b/vcl/win/window/salframe.cxx index 8e4abcdbd66e..45361d8baef0 100644 --- a/vcl/win/window/salframe.cxx +++ b/vcl/win/window/salframe.cxx @@ -3353,6 +3353,16 @@ bool WinSalFrame::MapUnicodeToKeyCode( sal_Unicode aUnicode, LanguageType aLangT return bRet; } +static void UnsetAltIfAltGr(SalKeyEvent& rKeyEvt, sal_uInt16 nModCode) +{ +if ((nModCode & (KEY_MOD1 | KEY_MOD2)) == (KEY_MOD1 | KEY_MOD2) && +rKeyEvt.mnCharCode) +{ +// this is actually AltGr and should not be handled as Alt +rKeyEvt.mnCode &= ~(KEY_MOD1 | KEY_MOD2); +} +} + static bool ImplHandleKeyMsg( HWND hWnd, UINT nMsg, WPARAM wParam, LPARAM lParam, LRESULT& rResult ) { @@ -3441,8 +3451,12 @@ static bool ImplHandleKeyMsg( HWND hWnd, UINT nMsg, aKeyEvt.mnCode |= nModCode; aKeyEvt.mnCharCode = ImplGetCharCode( pFrame, wParam ); aKeyEvt.mnRepeat= nRepeat; + +UnsetAltIfAltGr(aKeyEvt, nModCode); + nLastChar = 0; nLastVKChar = 0; + bool nRet = pFrame->CallCallback( SalEvent::KeyInput, &aKeyEvt ); pFrame->CallCallback( SalEvent::KeyUp, &aKeyEvt ); return nRet; @@ -3593,12 +3607,7 @@ static bool ImplHandleKeyMsg( HWND hWnd, UINT nMsg, aKeyEvt.mnCode |= nModCode; aKeyEvt.mnRepeat= nRepeat; -if ((nModCode & (KEY_MOD1 | KEY_MOD2)) == (KEY_MOD1 | KEY_MOD2) && -aKeyEvt.mnCharCode) -{ -// this is actually AltGr and should not be handled as Alt -aKeyEvt.mnCode &= ~(KEY_MOD1 | KEY_MOD2); -} +UnsetAltIfAltGr(aKeyEvt, nModCode); bIgnoreCharMsg = bCharPeek; bool nRet = pFrame->CallCallback( nEvent, &aKeyEvt ); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: vcl/headless vcl/inc
vcl/headless/svpframe.cxx |3 ++- vcl/inc/headless/svpframe.hxx | 20 2 files changed, 22 insertions(+), 1 deletion(-) New commits: commit 54d7fc9ea9d56ec16ec4f641a3dbf01f64233297 Author: Jan-Marek Glogowski AuthorDate: Tue Jun 29 16:13:42 2021 + Commit: Jan-Marek Glogowski CommitDate: Wed Jun 30 22:34:41 2021 +0200 svp: add ostream<< for SvpSalFrame ... and also store the window title. Change-Id: I20d8b30f6e8e5c48740fe569d9689a117db11e6d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118129 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski diff --git a/vcl/headless/svpframe.cxx b/vcl/headless/svpframe.cxx index ab82a90a4faa..c7a1d8f50845 100644 --- a/vcl/headless/svpframe.cxx +++ b/vcl/headless/svpframe.cxx @@ -187,8 +187,9 @@ void SvpSalFrame::PostPaint() const } } -void SvpSalFrame::SetTitle( const OUString& ) +void SvpSalFrame::SetTitle(const OUString& sTitle) { +m_sTitle = sTitle; } void SvpSalFrame::SetIcon( sal_uInt16 ) diff --git a/vcl/inc/headless/svpframe.hxx b/vcl/inc/headless/svpframe.hxx index 145ccf5b3655..4c6dd98e2ca9 100644 --- a/vcl/inc/headless/svpframe.hxx +++ b/vcl/inc/headless/svpframe.hxx @@ -54,6 +54,8 @@ class SvpSalFrame : public SalFrame std::vector< SvpSalGraphics* > m_aGraphics; static SvpSalFrame* s_pFocusFrame; +OUString m_sTitle; + public: SvpSalFrame( SvpSalInstance* pInstance, SalFrame* pParent, @@ -64,6 +66,11 @@ public: void LoseFocus(); void PostPaint() const; +OUString title() const { return m_sTitle; } +SalFrameStyleFlags style() const { return m_nStyle; } +bool isVisible() const { return m_bVisible; } +bool hasFocus() const { return s_pFocusFrame == this; } + // SalFrame virtual SalGraphics*AcquireGraphics() override; virtual voidReleaseGraphics( SalGraphics* pGraphics ) override; @@ -120,6 +127,19 @@ private: basegfx::B2IVector GetSurfaceFrameSize() const; }; +template +inline std::basic_ostream& operator<<(std::basic_ostream& stream, + const SvpSalFrame& frame) +{ +stream << &frame << " (vis " << frame.isVisible() << " focus " << frame.hasFocus(); +stream << " style " << std::hex << std::setfill('0') << std::setw(8) << static_cast(frame.style()); +OUString sTitle = frame.title(); +if (!sTitle.isEmpty()) +stream << " '" << sTitle << "'"; +stream << ")"; +return stream; +} + #endif // INCLUDED_VCL_INC_HEADLESS_SVPFRAME_HXX /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: basic/qa chart2/source sc/inc sc/source
basic/qa/cppunit/test_scanner.cxx |6 +-- chart2/source/view/axes/MinimumAndMaximumSupplier.cxx | 21 +++ chart2/source/view/axes/VCoordinateSystem.cxx |9 ++-- chart2/source/view/charttypes/Splines.cxx | 15 +++- chart2/source/view/charttypes/VSeriesPlotter.cxx | 33 -- chart2/source/view/main/VDataSeries.cxx |7 +-- sc/inc/math.hxx | 12 +- sc/source/core/data/dpitemdata.cxx|4 +- sc/source/core/data/dputil.cxx| 10 + 9 files changed, 43 insertions(+), 74 deletions(-) New commits: commit 3964e0854507b2696ae0fbe48a4fb005c779947e Author: BaiXiaochun AuthorDate: Tue Jun 29 20:31:30 2021 +0200 Commit: Mike Kaganski CommitDate: Thu Jul 1 00:39:17 2021 +0200 Purge out rtl::math::setInf Change-Id: I71af8273c672a4cbcbfefafffd0003ab266dcce6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118132 Tested-by: Mike Kaganski Reviewed-by: Mike Kaganski diff --git a/basic/qa/cppunit/test_scanner.cxx b/basic/qa/cppunit/test_scanner.cxx index 5663c44d027e..6459ab45f6b1 100644 --- a/basic/qa/cppunit/test_scanner.cxx +++ b/basic/qa/cppunit/test_scanner.cxx @@ -13,7 +13,7 @@ #include #include -#include +#include #include @@ -654,11 +654,9 @@ void ScannerTest::testNumbers() // the buffer is artificially constrained by the scanner. CPPUNIT_ASSERT_EQUAL(1u, static_cast(errors)); // HACK -double fInf = 0.0; -rtl::math::setInf(&fInf, false); symbols = getSymbols("10e308", errors); CPPUNIT_ASSERT_EQUAL(size_t(2), symbols.size()); -CPPUNIT_ASSERT_EQUAL(fInf, symbols[0].number); +CPPUNIT_ASSERT_EQUAL(std::numeric_limits::infinity(), symbols[0].number); CPPUNIT_ASSERT_EQUAL(SbxDOUBLE, symbols[0].type); CPPUNIT_ASSERT_EQUAL(cr, symbols[1].text); CPPUNIT_ASSERT_EQUAL(1u, static_cast(errors)); // math error, overflow diff --git a/chart2/source/view/axes/MinimumAndMaximumSupplier.cxx b/chart2/source/view/axes/MinimumAndMaximumSupplier.cxx index 422d08e64029..eaf5c4347379 100644 --- a/chart2/source/view/axes/MinimumAndMaximumSupplier.cxx +++ b/chart2/source/view/axes/MinimumAndMaximumSupplier.cxx @@ -21,8 +21,7 @@ #include -#include - +#include #include namespace chart @@ -49,8 +48,7 @@ bool MergedMinimumAndMaximumSupplier::hasMinimumAndMaximumSupplier( MinimumAndMa double MergedMinimumAndMaximumSupplier::getMinimumX() { -double fGlobalExtremum; -::rtl::math::setInf(&fGlobalExtremum, false); +double fGlobalExtremum = std::numeric_limits::infinity(); for (auto const& elem : m_aMinimumAndMaximumSupplierList) { double fLocalExtremum = elem->getMinimumX(); @@ -64,8 +62,7 @@ double MergedMinimumAndMaximumSupplier::getMinimumX() double MergedMinimumAndMaximumSupplier::getMaximumX() { -double fGlobalExtremum; -::rtl::math::setInf(&fGlobalExtremum, true); +double fGlobalExtremum = -std::numeric_limits::infinity(); for (auto const& elem : m_aMinimumAndMaximumSupplierList) { double fLocalExtremum = elem->getMaximumX(); @@ -79,8 +76,7 @@ double MergedMinimumAndMaximumSupplier::getMaximumX() double MergedMinimumAndMaximumSupplier::getMinimumYInRange( double fMinimumX, double fMaximumX, sal_Int32 nAxisIndex ) { -double fGlobalExtremum; -::rtl::math::setInf(&fGlobalExtremum, false); +double fGlobalExtremum = std::numeric_limits::infinity(); for (auto const& elem : m_aMinimumAndMaximumSupplierList) { double fLocalExtremum = elem->getMinimumYInRange( fMinimumX, fMaximumX, nAxisIndex ); @@ -94,8 +90,7 @@ double MergedMinimumAndMaximumSupplier::getMinimumYInRange( double fMinimumX, do double MergedMinimumAndMaximumSupplier::getMaximumYInRange( double fMinimumX, double fMaximumX, sal_Int32 nAxisIndex ) { -double fGlobalExtremum; -::rtl::math::setInf(&fGlobalExtremum, true); +double fGlobalExtremum = -std::numeric_limits::infinity(); for (auto const& elem : m_aMinimumAndMaximumSupplierList) { double fLocalExtremum = elem->getMaximumYInRange( fMinimumX, fMaximumX, nAxisIndex ); @@ -109,8 +104,7 @@ double MergedMinimumAndMaximumSupplier::getMaximumYInRange( double fMinimumX, do double MergedMinimumAndMaximumSupplier::getMinimumZ() { -double fGlobalExtremum; -::rtl::math::setInf(&fGlobalExtremum, false); +double fGlobalExtremum = std::numeric_limits::infinity(); for (auto const& elem : m_aMinimumAndMaximumSupplierList) { double fLocalExtremum = elem->getMinimumZ(); @@ -124,8 +118,7 @@ double MergedMinimumAndMaximumSupplier::getMinimumZ() double MergedMinimumAndMaximumSupplier::getMaximumZ() { -double fGlobalExtremum; -::rtl::math::setInf(&fGlobalExtremum, true); +double fGlobalExtremum = -std::numeric_limits::infinity(); for (auto const
[Libreoffice-commits] core.git: sw/source
sw/source/uibase/sidebar/ThemePanel.cxx | 34 1 file changed, 30 insertions(+), 4 deletions(-) New commits: commit 4f42bcc9dc825cf50a40a00bb992137b6b8906b6 Author: Tomaž Vajngerl AuthorDate: Thu Sep 24 12:32:14 2015 +0200 Commit: Tomaž Vajngerl CommitDate: Thu Jul 1 02:50:48 2021 +0200 Improve preview of theme color sets - add color set name Change-Id: I1f7b3668ba9dfbab1da283741e99754de2d6be47 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118151 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl diff --git a/sw/source/uibase/sidebar/ThemePanel.cxx b/sw/source/uibase/sidebar/ThemePanel.cxx index 3ff74fcdb016..68c24eb08571 100644 --- a/sw/source/uibase/sidebar/ThemePanel.cxx +++ b/sw/source/uibase/sidebar/ThemePanel.cxx @@ -19,6 +19,7 @@ #include #include #include +#include #include #include #include @@ -367,17 +368,39 @@ BitmapEx GenerateColorPreview(const svx::ColorSet& rColorSet) { ScopedVclPtrInstance pVirtualDev(*Application::GetDefaultDevice()); float fScaleFactor = pVirtualDev->GetDPIScaleFactor(); -tools::Long BORDER = 2 * fScaleFactor; -tools::Long SIZE = 12 * fScaleFactor; +tools::Long BORDER = 3 * fScaleFactor; +tools::Long SIZE = 14 * fScaleFactor; +tools::Long LABEL_HEIGHT = 16 * fScaleFactor; +tools::Long LABEL_TEXT_HEIGHT = 14 * fScaleFactor; -Size aSize(BORDER * 7 + SIZE * 6, BORDER * 3 + SIZE * 2); +Size aSize(BORDER * 7 + SIZE * 6 + BORDER * 2, BORDER * 3 + SIZE * 2 + LABEL_HEIGHT); pVirtualDev->SetOutputSizePixel(aSize); + pVirtualDev->SetBackground(Wallpaper(Application::GetSettings().GetStyleSettings().GetFaceColor())); +pVirtualDev->Erase(); tools::Long x = BORDER; -tools::Long y1 = BORDER; +tools::Long y1 = BORDER + LABEL_HEIGHT; tools::Long y2 = y1 + SIZE + BORDER; pVirtualDev->SetLineColor(COL_LIGHTGRAY); +pVirtualDev->SetFillColor(COL_LIGHTGRAY); +tools::Rectangle aNameRect(Point(0, 0), Size(aSize.Width(), LABEL_HEIGHT)); +pVirtualDev->DrawRect(aNameRect); + +vcl::Font aFont; +OUString aName = rColorSet.getName(); +aFont.SetFontHeight(LABEL_TEXT_HEIGHT); +pVirtualDev->SetFont(aFont); + +Size aTextSize(pVirtualDev->GetTextWidth(aName), pVirtualDev->GetTextHeight()); + +Point aPoint((aNameRect.GetWidth() / 2.0) - (aTextSize.Width() / 2.0), + (aNameRect.GetHeight() / 2.0) - (aTextSize.Height() / 2.0)); + +pVirtualDev->DrawText(aPoint, aName); + +pVirtualDev->SetLineColor(COL_LIGHTGRAY); +pVirtualDev->SetFillColor(); for (sal_uInt32 i = 0; i < 12; i += 2) { @@ -388,6 +411,8 @@ BitmapEx GenerateColorPreview(const svx::ColorSet& rColorSet) pVirtualDev->DrawRect(tools::Rectangle(x, y2, x + SIZE, y2 + SIZE)); x += SIZE + BORDER; +if (i == 2 || i == 8) +x += BORDER; } return pVirtualDev->GetBitmapEx(Point(), aSize); @@ -415,6 +440,7 @@ ThemePanel::ThemePanel(weld::Widget* pParent) { mxValueSetColors->SetColCount(2); mxValueSetColors->SetLineCount(3); + mxValueSetColors->SetColor(Application::GetSettings().GetStyleSettings().GetFaceColor()); mxApplyButton->connect_clicked(LINK(this, ThemePanel, ClickHdl)); mxListBoxFonts->connect_row_activated(LINK(this, ThemePanel, DoubleClickHdl)); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'feature/themesupport2' - 504 commits - accessibility/inc accessibility/source avmedia/source basctl/source basegfx/CppunitTest_basegfx.mk basegfx/source basegfx
Rebased ref, commits from common ancestor: commit 6546856703cf1cec4493e8c357fa89fa7f53f8ca Author: Jan Holesovsky AuthorDate: Fri Apr 2 00:21:34 2021 +0200 Commit: Tomaž Vajngerl CommitDate: Thu Jul 1 09:53:47 2021 +0900 Unit test (with the content disabled so far) for the theming. Change-Id: Ie9e003df38e1bc766fb5323936138d3e0e664321 diff --git a/sw/qa/extras/ooxmlexport/data/themeOrange.docx b/sw/qa/extras/ooxmlexport/data/themeOrange.docx new file mode 100644 index ..e350c2676d41 Binary files /dev/null and b/sw/qa/extras/ooxmlexport/data/themeOrange.docx differ diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport16.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport16.cxx index bafe3b511730..f29b156d171e 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport16.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport16.cxx @@ -587,6 +587,12 @@ DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(Test_ShadowDirection, "tdf142361ShadowDirect "rotWithShape", "0"); } +DECLARE_OOXMLEXPORT_TEST(testThemeOrange, "themeOrange.docx") +{ +// Assert that the theme color of the 1st paragraph is "accent1" +//CPPUNIT_ASSERT_EQUAL(getProperty(getParagraph(1), "CharColorTheme"), static_cast(4)); +} + CPPUNIT_PLUGIN_IMPLEMENT(); /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ commit f02d56dca274961ad9ecc6b1eaeb2acc4dea25b3 Author: Tomaž Vajngerl AuthorDate: Wed Sep 23 13:38:38 2015 +0200 Commit: Tomaž Vajngerl CommitDate: Thu Jul 1 09:53:30 2021 +0900 adjust the conversion from theme color type to the color set index Change-Id: I8c54c8935de8acc3e2b302e10327aa2488f9ac85 diff --git a/writerfilter/source/dmapper/TDefTableHandler.cxx b/writerfilter/source/dmapper/TDefTableHandler.cxx index 42ab0d61bd83..4bc8faf7e3d5 100644 --- a/writerfilter/source/dmapper/TDefTableHandler.cxx +++ b/writerfilter/source/dmapper/TDefTableHandler.cxx @@ -298,15 +298,15 @@ sal_Int16 TDefTableHandler::getThemeColorTypeIndex(sal_Int32 nType) case NS_ooxml::LN_Value_St_ThemeColor_followedHyperlink: return 11; case NS_ooxml::LN_Value_St_ThemeColor_none: -return 12; +return -1; case NS_ooxml::LN_Value_St_ThemeColor_background1: -return 13; +return 0; case NS_ooxml::LN_Value_St_ThemeColor_text1: -return 14; +return 1; case NS_ooxml::LN_Value_St_ThemeColor_background2: -return 15; +return 2; case NS_ooxml::LN_Value_St_ThemeColor_text2: -return 16; +return 3; default: break; } commit d480eea0e754d0849ff59b391bd37abf043d47cc Author: Tomaž Vajngerl AuthorDate: Wed Sep 23 13:37:43 2015 +0200 Commit: Tomaž Vajngerl CommitDate: Thu Jul 1 09:53:29 2021 +0900 convert tint value from ooxml to the value we support Change-Id: I5a79ca434be16f9dccc5aa6118a7efbf4544f0b1 diff --git a/writerfilter/source/dmapper/DomainMapper.cxx b/writerfilter/source/dmapper/DomainMapper.cxx index a28e3dae2838..8ba4881c4e13 100644 --- a/writerfilter/source/dmapper/DomainMapper.cxx +++ b/writerfilter/source/dmapper/DomainMapper.cxx @@ -999,7 +999,7 @@ void DomainMapper::lcl_attribute(Id nName, Value & val) case NS_ooxml::LN_CT_Color_themeTint: if (m_pImpl->GetTopContext()) { - m_pImpl->GetTopContext()->Insert(PROP_CHAR_COLOR_TINT_OR_SHADE, uno::makeAny(sal_Int16(nIntValue * 1 / 256))); + m_pImpl->GetTopContext()->Insert(PROP_CHAR_COLOR_TINT_OR_SHADE, uno::makeAny(sal_Int16((256 - nIntValue) * 1 / 256))); } m_pImpl->appendGrabBag(m_pImpl->m_aSubInteropGrabBag, "themeTint", OUString::number(nIntValue, 16)); break; commit 4e553ab0e53feb30e17048da065921ad9cb78054 Author: Tomaž Vajngerl AuthorDate: Wed Sep 23 13:35:56 2015 +0200 Commit: Tomaž Vajngerl CommitDate: Thu Jul 1 09:53:29 2021 +0900 check that the color index is valid Change-Id: Id5c7c83f50e1611af12f3b25e6c9a335a8353ba0 diff --git a/sw/source/uibase/sidebar/ThemePanel.cxx b/sw/source/uibase/sidebar/ThemePanel.cxx index 9117f20a7013..ce42983879ce 100644 --- a/sw/source/uibase/sidebar/ThemePanel.cxx +++ b/sw/source/uibase/sidebar/ThemePanel.cxx @@ -232,9 +232,9 @@ void changeFont(SwFormat* pFormat, SwDocStyleSheet const * pStyle, FontSet const void changeColor(SwTextFormatColl* pCollection, svx::ColorSet const& rColorSet, StyleRedefinition* /*pRedefinition*/) { SvxColorItem aColorItem(pCollection->GetColor()); -if (aColorItem.GetThemeIndex() >= 0) +sal_Int16 nIndex = aColorItem.GetThemeIndex(); +if (nIndex >= 0 && nIndex < 12) { -sal_Int16 nIndex = aColorItem.GetThemeIndex(); Color aColor = Color(rColorSet.getColor(nIndex)); aColor.ApplyTintOrShade(aColorItem.GetTintOrShade()); aColorItem.SetVal
[Libreoffice-commits] core.git: Branch 'distro/collabora/co-2021' - sc/source
sc/source/core/data/global.cxx |3 ++- sc/source/ui/drawfunc/fusel.cxx |3 ++- sc/source/ui/view/gridwin5.cxx |4 +++- 3 files changed, 7 insertions(+), 3 deletions(-) New commits: commit 8d762c21571118f64a966a631cfe8dca152ac202 Author: Miklos Vajna AuthorDate: Tue Jun 29 13:54:00 2021 +0200 Commit: Miklos Vajna CommitDate: Thu Jul 1 08:29:10 2021 +0200 sc: don't require ctrl-click when clicking on internal links of shapes Excel doesn't require such additional actions, and Writer doesn't require ctrl-click for internal links (e.g. cross-references), either. Also suppress the tooltip hinting ctrl-click in this case. Change-Id: If2fbec533f5c2a57268a22cf96464e724922ff7f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118113 Tested-by: Jenkins CollaboraOffice Reviewed-by: Luboš Luňák diff --git a/sc/source/core/data/global.cxx b/sc/source/core/data/global.cxx index 221e1d31eb50..c7b34d27b7a5 100644 --- a/sc/source/core/data/global.cxx +++ b/sc/source/core/data/global.cxx @@ -763,7 +763,8 @@ void ScGlobal::OpenURL(const OUString& rURL, const OUString& rTarget, bool bIgno // OpenURL is always called in the GridWindow by mouse clicks in some way or another. // That's why pScActiveViewShell and nScClickMouseModifier are correct. -if (!bIgnoreSettings && !ShouldOpenURL()) +// Fragments pointing into the current document should be always opened. +if (!bIgnoreSettings && !(ShouldOpenURL() || rURL.startsWith("#"))) return; SfxViewFrame* pViewFrm = SfxViewFrame::Current(); diff --git a/sc/source/ui/drawfunc/fusel.cxx b/sc/source/ui/drawfunc/fusel.cxx index dca0beaa1ef1..164332f060d6 100644 --- a/sc/source/ui/drawfunc/fusel.cxx +++ b/sc/source/ui/drawfunc/fusel.cxx @@ -222,7 +222,8 @@ bool FuSelection::MouseButtonDown(const MouseEvent& rMEvt) } // open hyperlink, if found at object or in object's text -if ( !sURL.isEmpty() && ScGlobal::ShouldOpenURL() ) +// Fragments pointing into the current document should be always opened. +if ( !sURL.isEmpty() && (ScGlobal::ShouldOpenURL() || sURL.startsWith("#")) ) { ScGlobal::OpenURL( sURL, sTarget ); rViewShell.FakeButtonUp( rViewShell.GetViewData().GetActivePart() ); diff --git a/sc/source/ui/view/gridwin5.cxx b/sc/source/ui/view/gridwin5.cxx index b0f1e92ca679..3a3d73cc067b 100644 --- a/sc/source/ui/view/gridwin5.cxx +++ b/sc/source/ui/view/gridwin5.cxx @@ -292,7 +292,9 @@ void ScGridWindow::RequestHelp(const HelpEvent& rHEvt) pObj = pHit; } ScMacroInfo* pInfo = ScDrawLayer::GetMacroInfo( pObj ); -if ( pInfo && (pInfo->GetHlink().getLength() > 0) ) +// Fragments pointing into the current document need no tooltip +// describing the ctrl-click functionality. +if ( pInfo && (pInfo->GetHlink().getLength() > 0) && !pInfo->GetHlink().startsWith("#") ) { aPixRect = LogicToPixel(aVEvt.pObj->GetLogicRect()); aHelpText = SfxHelp::GetURLHelpText(pInfo->GetHlink()); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: xmlsecurity/Library_xmlsecurity.mk
xmlsecurity/Library_xmlsecurity.mk |1 - 1 file changed, 1 deletion(-) New commits: commit f249addd8914ffaa7e94b58419b72b290b739343 Author: Miklos Vajna AuthorDate: Wed Jun 30 20:25:27 2021 +0200 Commit: Miklos Vajna CommitDate: Thu Jul 1 08:29:25 2021 +0200 xmlsecurity: remove last not needed direct pdfium dependency This module only calls pdfium indirectly via vcl. This was the last makefile which had such a not needed pdfium dependency. Change-Id: I25ff0be285a52480d3ac60344235af520f262c16 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118199 Tested-by: Jenkins Reviewed-by: Miklos Vajna diff --git a/xmlsecurity/Library_xmlsecurity.mk b/xmlsecurity/Library_xmlsecurity.mk index be879e655c9b..3e9bac3b5b9f 100644 --- a/xmlsecurity/Library_xmlsecurity.mk +++ b/xmlsecurity/Library_xmlsecurity.mk @@ -22,7 +22,6 @@ $(eval $(call gb_Library_add_defs,xmlsecurity,\ $(eval $(call gb_Library_use_externals,xmlsecurity,\ boost_headers \ - $(if $(filter PDFIUM,$(BUILD_TYPE)),pdfium) \ )) $(eval $(call gb_Library_set_precompiled_header,xmlsecurity,xmlsecurity/inc/pch/precompiled_xmlsecurity)) ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: basic/source
basic/source/runtime/methods.cxx | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) New commits: commit 4a0b40f1be9f6773c8ebc5331c257911a76a5cee Author: Julien Nabet AuthorDate: Wed Jun 30 22:55:46 2021 +0200 Commit: Noel Grandin CommitDate: Thu Jul 1 08:37:49 2021 +0200 tdf#143081: fix Basic Replace() function crashes LO 0x7f19c0aa6e57 in rtl::OUStringBuffer::append(char16_t const*, int) (this=0x7fff100d0748, str=0x6f6f46a u"晦饖香©", len=-1) at include/rtl/ustrbuf.hxx:659 0x7f19c0c3c8a8 in SbRtl_Replace(StarBASIC*, SbxArray&, bool) (rPar=...) at basic/source/runtime/methods.cxx:1321 see bt here: https://bugs.documentfoundation.org/attachment.cgi?id=173298 Calling xCharClass->toUpper may change words, eg: "Straße" becomes "Strasse" so the length of the word increases. In brief, we want to use the length of aSrcStr not aExpStr Change-Id: Ia291d47a2021efc7dd9162ca5cc72b7940fdd71e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118202 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/basic/source/runtime/methods.cxx b/basic/source/runtime/methods.cxx index fb0e3e81aaa7..41f0d38ec1b0 100644 --- a/basic/source/runtime/methods.cxx +++ b/basic/source/runtime/methods.cxx @@ -1285,8 +1285,6 @@ void SbRtl_Replace(StarBASIC *, SbxArray & rPar, bool) const OUString aExpStr = rPar.Get(1)->GetOUString(); OUString aFindStr = rPar.Get(2)->GetOUString(); const OUString aReplaceStr = rPar.Get(3)->GetOUString(); -const sal_Int32 nExpStrLen = aExpStr.getLength(); -const sal_Int32 nFindStrLen = aFindStr.getLength(); OUString aSrcStr(aExpStr); if (bCaseInsensitive) @@ -1298,10 +1296,12 @@ void SbRtl_Replace(StarBASIC *, SbxArray & rPar, bool) aSrcStr = xCharClass->toUpper(aSrcStr, 0, aSrcStr.getLength(), rLocale); aFindStr = xCharClass->toUpper(aFindStr, 0, aFindStr.getLength(), rLocale); } +const sal_Int32 nSrcStrLen = aSrcStr.getLength(); +const sal_Int32 nFindStrLen = aFindStr.getLength(); // Note: the result starts from lStartPos, removing everything to the left. See i#94895. -sal_Int32 nPrevPos = std::min(lStartPos - 1, nExpStrLen); -OUStringBuffer sResult(nExpStrLen - nPrevPos); +sal_Int32 nPrevPos = std::min(lStartPos - 1, nSrcStrLen); +OUStringBuffer sResult(nSrcStrLen - nPrevPos); sal_Int32 nCounts = 0; while (lCount == -1 || lCount > nCounts) { @@ -1318,7 +1318,7 @@ void SbRtl_Replace(StarBASIC *, SbxArray & rPar, bool) break; } } -sResult.append(aExpStr.getStr() + nPrevPos, nExpStrLen - nPrevPos); +sResult.append(aExpStr.getStr() + nPrevPos, nSrcStrLen - nPrevPos); rPar.Get(0)->PutString(sResult.makeStringAndClear()); } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits