[Libreoffice-commits] core.git: Branch 'distro/collabora/co-22.05' - sc/qa sc/source
sc/qa/unit/ucalc_condformat.cxx |3 ++- sc/source/core/data/conditio.cxx | 23 --- 2 files changed, 22 insertions(+), 4 deletions(-) New commits: commit 62d4d51f9244ac45802ca7a1735bca552503a349 Author: Justin Luth AuthorDate: Fri Sep 23 07:41:23 2022 -0400 Commit: Miklos Vajna CommitDate: Thu Oct 13 08:58:21 2022 +0200 tdf#123990 sc condformat: case insensitive begins/ends/contains squashed commit This is how Excel handles these. At first I was afraid that this would upset LibreOffice users, but then I realized that equals already is case insensitive, so this change ought to be more consistent, and thus there should be fewer outcrys. Change-Id: Ia3de78d5888672ba8b774866d41ecd65293397c1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140484 Tested-by: Jenkins Reviewed-by: Justin Luth (cherry picked from commit 3bfed17b047422a8c4e98ab80001f3158afb227e) Change-Id: I44a07c482d2d67a76a939ba2d593a003398d52c0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140633 Tested-by: Justin Luth Reviewed-by: Justin Luth Reviewed-by: Eike Rathke Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140685 Tested-by: Jenkins Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140914 Tested-by: Miklos Vajna Reviewed-by: Miklos Vajna diff --git a/sc/qa/unit/ucalc_condformat.cxx b/sc/qa/unit/ucalc_condformat.cxx index 6ba9079c0d79..1c3e810fb838 100644 --- a/sc/qa/unit/ucalc_condformat.cxx +++ b/sc/qa/unit/ucalc_condformat.cxx @@ -822,7 +822,8 @@ void TestCondformat::testCondFormatEndsWithStr() { m_pDoc->InsertTab(0, "Test"); -ScConditionEntry aEntry(ScConditionMode::EndsWith, "\"TestString\"", "", *m_pDoc, ScAddress(), +// case insnsitive matching +ScConditionEntry aEntry(ScConditionMode::EndsWith, "\"teststring\"", "", *m_pDoc, ScAddress(), "", "", formula::FormulaGrammar::GRAM_DEFAULT, formula::FormulaGrammar::GRAM_DEFAULT); svl::SharedStringPool& rStringPool = m_pDoc->GetSharedStringPool(); diff --git a/sc/source/core/data/conditio.cxx b/sc/source/core/data/conditio.cxx index bf78d7987b12..3634a5b07c0a 100644 --- a/sc/source/core/data/conditio.cxx +++ b/sc/source/core/data/conditio.cxx @@ -1177,16 +1177,33 @@ bool ScConditionEntry::IsValidStr( const OUString& rArg, const ScAddress& rPos ) bValid = !bValid; break; case ScConditionMode::BeginsWith: -bValid = rArg.startsWith(aUpVal1); +bValid = ScGlobal::GetTransliteration().isMatch(aUpVal1, rArg); break; case ScConditionMode::EndsWith: -bValid = rArg.endsWith(aUpVal1); +{ +sal_Int32 nStart = rArg.getLength(); +const sal_Int32 nLen = aUpVal1.getLength(); +if (nLen > nStart) +bValid = false; +else +{ +nStart = nStart - nLen; +sal_Int32 nMatch1(0), nMatch2(0); +bValid = ScGlobal::GetTransliteration().equals(rArg, nStart, nLen, nMatch1, + aUpVal1, 0, nLen, nMatch2); +} +} break; case ScConditionMode::ContainsText: case ScConditionMode::NotContainsText: -bValid = rArg.indexOf(aUpVal1) != -1; +{ +const OUString aArgStr(ScGlobal::getCharClass().lowercase(rArg)); +const OUString aValStr(ScGlobal::getCharClass().lowercase(aUpVal1)); +bValid = aArgStr.indexOf(aValStr) != -1; + if(eOp == ScConditionMode::NotContainsText) bValid = !bValid; +} break; default: {
[Libreoffice-commits] core.git: include/oox oox/source writerfilter/qa writerfilter/source
include/oox/shape/ShapeContextHandler.hxx | 2 oox/source/shape/ShapeContextHandler.cxx| 6 + writerfilter/qa/cppunittests/dmapper/GraphicImport.cxx | 52 ++ writerfilter/qa/cppunittests/dmapper/data/tdf149840_SmartArtBackground.docx |binary writerfilter/source/dmapper/GraphicHelpers.cxx | 47 + writerfilter/source/dmapper/GraphicHelpers.hxx | 14 ++ writerfilter/source/ooxml/OOXMLFastContextHandler.cxx | 38 +++ 7 files changed, 158 insertions(+), 1 deletion(-) New commits: commit e4515c1305e4b7bf6e7f105636e9cf6eb50b382d Author: Regina Henschel AuthorDate: Tue Oct 11 14:46:37 2022 +0200 Commit: Miklos Vajna CommitDate: Thu Oct 13 08:56:22 2022 +0200 tdf#149840 Use actual outer size for SmartArt in Writer SmartArt import needs the outer size of the diagram for to define a background shape in the correct size and calculate the size of the diagram shapes relative to the outer size. The patch passes the values read from wp:extent in writerfilter to DiagramGraphicDataContext in oox. Change-Id: Ib39227bc645ac353336bab2c558d041974188f6f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141223 Tested-by: Jenkins Reviewed-by: Regina Henschel Reviewed-by: Miklos Vajna diff --git a/include/oox/shape/ShapeContextHandler.hxx b/include/oox/shape/ShapeContextHandler.hxx index 1b024c6013e1..239ff8ec63b8 100644 --- a/include/oox/shape/ShapeContextHandler.hxx +++ b/include/oox/shape/ShapeContextHandler.hxx @@ -95,6 +95,7 @@ public: void pushStartToken( sal_Int32 _starttoken ); void setPosition(const css::awt::Point& rPosition); +void setSize(const css::awt::Size& rSize); const bool& getFullWPGSupport() { return m_bFullWPGSUpport; } void setFullWPGSupport(bool bUse) { m_bFullWPGSUpport = bUse; } @@ -118,6 +119,7 @@ private: std::stack mnStartTokenStack; css::awt::Point maPosition; +css::awt::Size maSize; // from cx and cy, in EMU bool m_bFullWPGSUpport; // Is this DrawingML shape supposed to be processed as WPG? drawingml::ShapePtr mpShape; diff --git a/oox/source/shape/ShapeContextHandler.cxx b/oox/source/shape/ShapeContextHandler.cxx index 2e4018e4703c..54a455452365 100644 --- a/oox/source/shape/ShapeContextHandler.cxx +++ b/oox/source/shape/ShapeContextHandler.cxx @@ -215,6 +215,7 @@ ShapeContextHandler::getDiagramShapeContext() { auto pFragmentHandler = std::make_shared(*mxShapeFilterBase, msRelationFragmentPath); mpShape = std::make_shared(); +mpShape->setSize(maSize); mxDiagramShapeContext.set(new DiagramGraphicDataContext(*pFragmentHandler, mpShape)); } @@ -564,6 +565,11 @@ void ShapeContextHandler::setPosition(const awt::Point& rPosition) maPosition = rPosition; } +void ShapeContextHandler::setSize(const awt::Size& rSize) +{ +maSize = rSize; +} + void ShapeContextHandler::setDocumentProperties(const uno::Reference& xDocProps) { mxDocumentProperties = xDocProps; diff --git a/writerfilter/qa/cppunittests/dmapper/GraphicImport.cxx b/writerfilter/qa/cppunittests/dmapper/GraphicImport.cxx index a20c8490501b..6d77ece16d9d 100644 --- a/writerfilter/qa/cppunittests/dmapper/GraphicImport.cxx +++ b/writerfilter/qa/cppunittests/dmapper/GraphicImport.cxx @@ -23,6 +23,7 @@ #include #include +#include using namespace ::com::sun::star; @@ -406,6 +407,57 @@ CPPUNIT_TEST_FIXTURE(Test, testLayoutInCellOfHraphics) CPPUNIT_ASSERT(xShape->getPropertyValue("IsFollowingTextFlow") >>= bFollowingTextFlow); CPPUNIT_ASSERT(bFollowingTextFlow); } + +CPPUNIT_TEST_FIXTURE(Test, testTdf149840SmartArtBackground) +{ +// Make sure SmartArt is loaded as group shape +bool bUseGroup = officecfg::Office::Common::Filter::Microsoft::Import::SmartArtToShapes::get(); +if (!bUseGroup) +{ +std::shared_ptr pChange( +comphelper::ConfigurationChanges::create()); + officecfg::Office::Common::Filter::Microsoft::Import::SmartArtToShapes::set(true, pChange); +pChange->commit(); +} + +OUString aURL += m_directories.getURLFromSrc(DATA_DIRECTORY) + "tdf149840_SmartArtBackground.docx"; +getComponent() = loadFromDesktop(aURL); +uno::Reference xDrawPageSupplier(getComponent(), uno::UNO_QUERY); +uno::Reference xDrawPage = xDrawPageSupplier->getDrawPage(); +uno::Reference xGroup(xDrawPage->getByIndex(0), uno::UNO_QUERY); +CPPUNIT_ASSERT_EQUAL(static_cast(3), xGroup->getCount()); + +// The first shape in the group, which represents the SmartArt, corresponds to the background of +// the diagram. Without fix in place it has widht and height zero, which does not only result in +// not visible background but in wrong sizes of the diagram shap
[Libreoffice-commits] core.git: vcl/source
vcl/source/window/dlgctrl.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 9e0dcfbaf0039d07609ed4e4a9ef9f1e2e1e6b55 Author: Samuel Mehrbrodt AuthorDate: Thu Oct 6 16:22:41 2022 +0200 Commit: Samuel Mehrbrodt CommitDate: Thu Oct 13 08:32:32 2022 +0200 tdf#151385 Only trigger mnemonics in dialogs when alt key is pressed Change-Id: I884afad38c64bd53fe4917418ed627f9c0674554 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141022 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt diff --git a/vcl/source/window/dlgctrl.cxx b/vcl/source/window/dlgctrl.cxx index 161e4ff7863c..8db4402d9ef8 100644 --- a/vcl/source/window/dlgctrl.cxx +++ b/vcl/source/window/dlgctrl.cxx @@ -941,7 +941,7 @@ bool Window::ImplDlgCtrl( const KeyEvent& rKEvt, bool bKeyInput ) } } } -else +else if (aKeyCode.IsMod2()) // tdf#151385 { sal_Unicode c = rKEvt.GetCharCode(); if ( c )
[Libreoffice-commits] core.git: compilerplugins/clang include/rtl
compilerplugins/clang/stringadd.cxx |1 compilerplugins/clang/stringconcatauto.cxx |8 compilerplugins/clang/stringview.cxx|7 compilerplugins/clang/test/stringconcatauto.cxx | 12 compilerplugins/clang/test/stringview.cxx |4 include/rtl/strbuf.hxx | 19 - include/rtl/string.hxx | 34 -- include/rtl/stringconcat.hxx| 396 include/rtl/ustrbuf.hxx | 17 - include/rtl/ustring.hxx | 38 -- 10 files changed, 210 insertions(+), 326 deletions(-) New commits: commit af2879e434fa0dc6b2a626617ed865e4f66eb5ad Author: Mike Kaganski AuthorDate: Wed Oct 12 16:23:33 2022 +0300 Commit: Mike Kaganski CommitDate: Thu Oct 13 07:18:41 2022 +0200 Deduplicate stringconcat more In the process, drop ToStringHelper::allowO(U)StringConcat, because we can deduce this information from ToStringHelper's addData itself. To do that, addData was converted to ToStringHelper::operator(), which allows to use std::is_invocable_v on the helper class. Change-Id: Ic77878ca0ff65ada8c0a942191bc11de15b9ad2a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141254 Tested-by: Jenkins Reviewed-by: Mike Kaganski diff --git a/compilerplugins/clang/stringadd.cxx b/compilerplugins/clang/stringadd.cxx index 339192a78687..9254e9190ed5 100644 --- a/compilerplugins/clang/stringadd.cxx +++ b/compilerplugins/clang/stringadd.cxx @@ -233,6 +233,7 @@ bool StringAdd::VisitCXXOperatorCallExpr(CXXOperatorCallExpr const* operatorCall auto tc = loplugin::TypeCheck(operatorCall->getType()->getUnqualifiedDesugaredType()); if (!tc.Struct("OUStringConcat").Namespace("rtl").GlobalNamespace() && !tc.Struct("OStringConcat").Namespace("rtl").GlobalNamespace() +&& !tc.Struct("StringConcat").Namespace("rtl").GlobalNamespace() && !tc.Class("OUString").Namespace("rtl").GlobalNamespace() && !tc.Class("OString").Namespace("rtl").GlobalNamespace()) return true; diff --git a/compilerplugins/clang/stringconcatauto.cxx b/compilerplugins/clang/stringconcatauto.cxx index 561aedec8070..02517a4db0ba 100644 --- a/compilerplugins/clang/stringconcatauto.cxx +++ b/compilerplugins/clang/stringconcatauto.cxx @@ -83,10 +83,10 @@ bool StringConcatAuto::checkDecl( const DeclaratorDecl* decl, QualType type, con return true; auto const tc = loplugin::TypeCheck( type.getNonReferenceType().getCanonicalType()); const char* typeString = nullptr; -if( tc.Struct("OUStringConcat").Namespace("rtl").GlobalNamespace()) -typeString = "OUString"; -else if( tc.Struct("OStringConcat").Namespace("rtl").GlobalNamespace()) -typeString = "OString"; +if( tc.Struct("StringConcat").Namespace("rtl").GlobalNamespace()) +typeString = "O(U)String"; +else if( tc.Struct("StringNumber").Namespace("rtl").GlobalNamespace()) +typeString = "O(U)String"; else if( tc.Struct("OUStringNumber").Namespace("rtl").GlobalNamespace()) typeString = "OUString"; else if( tc.Struct("OStringNumber").Namespace("rtl").GlobalNamespace()) diff --git a/compilerplugins/clang/stringview.cxx b/compilerplugins/clang/stringview.cxx index c1606908dbc7..16e53b1c12e9 100644 --- a/compilerplugins/clang/stringview.cxx +++ b/compilerplugins/clang/stringview.cxx @@ -206,6 +206,10 @@ void StringView::handleCXXConstructExpr(CXXConstructExpr const* expr) .Class("OUStringLiteral") .Namespace("rtl") .GlobalNamespace() +|| tc.RvalueReference() + .Struct("StringNumberBase") + .Namespace("rtl") + .GlobalNamespace() || tc.RvalueReference().Struct("OStringNumber").Namespace("rtl").GlobalNamespace() || tc.RvalueReference().Struct("OUStringNumber").Namespace("rtl").GlobalNamespace() || tc.ClassOrStruct("basic_string_view").StdNamespace()) @@ -214,7 +218,8 @@ void StringView::handleCXXConstructExpr(CXXConstructExpr const* expr) break; } if (tc.RvalueReference().Struct("OStringConcat").Namespace("rtl").GlobalNamespace() -|| tc.RvalueReference().Struct("OUStringConcat").Namespace("rtl").GlobalNamespace()) +|| tc.RvalueReference().Struct("OUStringConcat").Namespace("rtl").GlobalNamespace() +|| tc.RvalueReference().Struct("StringConcat").Namespace("rtl").GlobalNamespace()) { argType = expr->getArg(0)->IgnoreImplicit()->getType(); extra = ViaConcatenation; diff --git a/compilerplugins/clang/test/stringconcatauto.cxx b/compilerplugins/clang/test/stringconcatauto.cxx index dc450503d25e..72044f80b150 100644 --- a/compilerplug
[Libreoffice-commits] core.git: Branch 'libreoffice-7-4' - icon-themes/breeze icon-themes/breeze_dark icon-themes/breeze_dark_svg icon-themes/breeze_svg icon-themes/colibre icon-themes/colibre_dark ic
icon-themes/breeze/sc/res/ou01.png|binary icon-themes/breeze/sc/res/ou010.png |binary icon-themes/breeze/sc/res/ou011.png |binary icon-themes/breeze/sc/res/ou012.png |binary icon-themes/breeze/sc/res/ou02.png|binary icon-themes/breeze/sc/res/ou03.png|binary icon-themes/breeze/sc/res/ou04.png|binary icon-themes/breeze/sc/res/ou05.png|binary icon-themes/breeze/sc/res/ou06.png|binary icon-themes/breeze/sc/res/ou07.png|binary icon-themes/breeze/sc/res/ou08.png|binary icon-themes/breeze/sc/res/ou09.png|binary icon-themes/breeze_dark/sc/res/ou01.png |binary icon-themes/breeze_dark/sc/res/ou010.png |binary icon-themes/breeze_dark/sc/res/ou011.png |binary icon-themes/breeze_dark/sc/res/ou012.png |binary icon-themes/breeze_dark/sc/res/ou02.png |binary icon-themes/breeze_dark/sc/res/ou03.png |binary icon-themes/breeze_dark/sc/res/ou04.png |binary icon-themes/breeze_dark/sc/res/ou05.png |binary icon-themes/breeze_dark/sc/res/ou06.png |binary icon-themes/breeze_dark/sc/res/ou07.png |binary icon-themes/breeze_dark/sc/res/ou08.png |binary icon-themes/breeze_dark/sc/res/ou09.png |binary icon-themes/breeze_dark_svg/sc/res/ou01.svg |1 + icon-themes/breeze_dark_svg/sc/res/ou010.svg |1 + icon-themes/breeze_dark_svg/sc/res/ou011.svg |1 + icon-themes/breeze_dark_svg/sc/res/ou012.svg |1 + icon-themes/breeze_dark_svg/sc/res/ou02.svg |1 + icon-themes/breeze_dark_svg/sc/res/ou03.svg |1 + icon-themes/breeze_dark_svg/sc/res/ou04.svg |1 + icon-themes/breeze_dark_svg/sc/res/ou05.svg |1 + icon-themes/breeze_dark_svg/sc/res/ou06.svg |1 + icon-themes/breeze_dark_svg/sc/res/ou07.svg |1 + icon-themes/breeze_dark_svg/sc/res/ou08.svg |1 + icon-themes/breeze_dark_svg/sc/res/ou09.svg |1 + icon-themes/breeze_svg/sc/res/ou01.svg|1 + icon-themes/breeze_svg/sc/res/ou010.svg |1 + icon-themes/breeze_svg/sc/res/ou011.svg |1 + icon-themes/breeze_svg/sc/res/ou012.svg |1 + icon-themes/breeze_svg/sc/res/ou02.svg|1 + icon-themes/breeze_svg/sc/res/ou03.svg|1 + icon-themes/breeze_svg/sc/res/ou04.svg|1 + icon-themes/breeze_svg/sc/res/ou05.svg|1 + icon-themes/breeze_svg/sc/res/ou06.svg|1 + icon-themes/breeze_svg/sc/res/ou07.svg|1 + icon-themes/breeze_svg/sc/res/ou08.svg|1 + icon-themes/breeze_svg/sc/res/ou09.svg|1 + icon-themes/colibre/sc/res/ou01.png |binary icon-themes/colibre/sc/res/ou010.png |binary icon-themes/colibre/sc/res/ou011.png |binary icon-themes/colibre/sc/res/ou012.png |binary icon-themes/colibre/sc/res/ou02.png |binary icon-themes/colibre/sc/res/ou03.png |binary icon-themes/colibre/sc/res/ou04.png |binary icon-themes/colibre/sc/res/ou05.png |binary icon-themes/colibre/sc/res/ou06.png |binary icon-themes/colibre/sc/res/ou07.png |binary icon-themes/colibre/sc/res/ou08.png |binary icon-themes/colibre/sc/res/ou09.png |binary icon-themes/colibre_dark/sc/res/ou01.png |binary icon-themes/colibre_dark/sc/res/ou010.png |binary icon-themes/colibre_dark/sc/res/ou011.png |binary icon-themes/colibre_dark/sc/res/ou012.png |binary icon-themes/colibre_dark/sc/res/ou02.png |binary icon-themes/colibre_dark/sc/res/ou03.png |binary icon-themes/colibre_dark/sc/res/ou04.png |binary icon-themes/colibre_dark/sc/res/ou05.png |binary icon-themes/colibre_dark/sc/res/ou06.png |binary icon-themes/colibre_dark/sc/res/ou07.png |binary icon-themes/colibre_dark/sc/res/ou08.png |binary icon-themes/colibre_dark/sc/res/ou09.png |binary icon-themes/colibre_dark_svg/sc/res/ou01.svg |2 +- icon-themes/colibre_dark_svg/sc/res/ou010.svg |3 ++- icon-themes/colibre_dark_svg/sc/res/ou02.svg |2 +- icon-themes/colibre_dark_svg/sc/res/ou03.svg |2 +- icon-themes/colibre_dark_svg/sc/res/ou04.svg |2 +- icon-themes/colibre_dark_svg/sc/res/ou05.svg |2 +- icon-themes/colibre_dark_svg/sc/res/ou06.svg |2 +- icon-themes/colibre_dark_svg/sc/res/ou07.svg |2 +- icon-themes/colibre_dark_svg/sc/res/ou08.svg |2 +- icon-themes/colibre_dark_svg/sc/res/ou09.svg |3 ++- icon-themes/colibre_svg/sc/res/ou01.svg |2 +- icon-themes/colibre_svg/sc/res/ou010.svg |3 ++- icon-themes/colibre_svg/sc/res/ou02.svg |2 +- icon-themes/colibre_svg/sc/res/ou03.svg |2 +- icon-themes/colibre_svg/sc/res/ou04.svg |2 +- icon-themes/colibre_svg/sc/res/ou05.svg |2 +- icon-themes/colibre_svg/sc/res/ou06.svg |2 +- icon-themes/colibre_svg/sc/res/ou07.svg
[Libreoffice-commits] core.git: icon-themes/elementary icon-themes/elementary_svg
icon-themes/elementary/sc/res/ou01.png |binary icon-themes/elementary/sc/res/ou010.png |binary icon-themes/elementary/sc/res/ou011.png |binary icon-themes/elementary/sc/res/ou012.png |binary icon-themes/elementary/sc/res/ou02.png |binary icon-themes/elementary/sc/res/ou03.png |binary icon-themes/elementary/sc/res/ou04.png |binary icon-themes/elementary/sc/res/ou05.png |binary icon-themes/elementary/sc/res/ou06.png |binary icon-themes/elementary/sc/res/ou07.png |binary icon-themes/elementary/sc/res/ou08.png |binary icon-themes/elementary/sc/res/ou09.png |binary icon-themes/elementary_svg/sc/res/ou01.svg |1 + icon-themes/elementary_svg/sc/res/ou010.svg |1 + icon-themes/elementary_svg/sc/res/ou011.svg |1 + icon-themes/elementary_svg/sc/res/ou012.svg |1 + icon-themes/elementary_svg/sc/res/ou02.svg |1 + icon-themes/elementary_svg/sc/res/ou03.svg |1 + icon-themes/elementary_svg/sc/res/ou04.svg |1 + icon-themes/elementary_svg/sc/res/ou05.svg |1 + icon-themes/elementary_svg/sc/res/ou06.svg |1 + icon-themes/elementary_svg/sc/res/ou07.svg |1 + icon-themes/elementary_svg/sc/res/ou08.svg |1 + icon-themes/elementary_svg/sc/res/ou09.svg |1 + 24 files changed, 12 insertions(+) New commits: commit b3869749719288e6d1951030f07dc3fbccc0c222 Author: Rizal Muttaqin AuthorDate: Thu Oct 13 08:21:32 2022 +0700 Commit: Rizal Muttaqin CommitDate: Thu Oct 13 06:35:18 2022 +0200 tdf#151087 elementary:Grouped n Ungrouped Columns/Rows Change-Id: I25ada781c5308a8ea89ba98d2e021f7b50c13c67 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141190 Tested-by: Rizal Muttaqin Reviewed-by: Rizal Muttaqin diff --git a/icon-themes/elementary/sc/res/ou01.png b/icon-themes/elementary/sc/res/ou01.png new file mode 100644 index ..7b0894977be1 Binary files /dev/null and b/icon-themes/elementary/sc/res/ou01.png differ diff --git a/icon-themes/elementary/sc/res/ou010.png b/icon-themes/elementary/sc/res/ou010.png new file mode 100644 index ..80138cb20c5f Binary files /dev/null and b/icon-themes/elementary/sc/res/ou010.png differ diff --git a/icon-themes/elementary/sc/res/ou011.png b/icon-themes/elementary/sc/res/ou011.png new file mode 100644 index ..d0cb60b413ae Binary files /dev/null and b/icon-themes/elementary/sc/res/ou011.png differ diff --git a/icon-themes/elementary/sc/res/ou012.png b/icon-themes/elementary/sc/res/ou012.png new file mode 100644 index ..97161aaa4dce Binary files /dev/null and b/icon-themes/elementary/sc/res/ou012.png differ diff --git a/icon-themes/elementary/sc/res/ou02.png b/icon-themes/elementary/sc/res/ou02.png new file mode 100644 index ..c83a24290016 Binary files /dev/null and b/icon-themes/elementary/sc/res/ou02.png differ diff --git a/icon-themes/elementary/sc/res/ou03.png b/icon-themes/elementary/sc/res/ou03.png new file mode 100644 index ..b6b6b0e9ff46 Binary files /dev/null and b/icon-themes/elementary/sc/res/ou03.png differ diff --git a/icon-themes/elementary/sc/res/ou04.png b/icon-themes/elementary/sc/res/ou04.png new file mode 100644 index ..8a0d0918972e Binary files /dev/null and b/icon-themes/elementary/sc/res/ou04.png differ diff --git a/icon-themes/elementary/sc/res/ou05.png b/icon-themes/elementary/sc/res/ou05.png new file mode 100644 index ..5f8fc76e0d84 Binary files /dev/null and b/icon-themes/elementary/sc/res/ou05.png differ diff --git a/icon-themes/elementary/sc/res/ou06.png b/icon-themes/elementary/sc/res/ou06.png new file mode 100644 index ..069851c1ed42 Binary files /dev/null and b/icon-themes/elementary/sc/res/ou06.png differ diff --git a/icon-themes/elementary/sc/res/ou07.png b/icon-themes/elementary/sc/res/ou07.png new file mode 100644 index ..b6295b421615 Binary files /dev/null and b/icon-themes/elementary/sc/res/ou07.png differ diff --git a/icon-themes/elementary/sc/res/ou08.png b/icon-themes/elementary/sc/res/ou08.png new file mode 100644 index ..2c1966439ae0 Binary files /dev/null and b/icon-themes/elementary/sc/res/ou08.png differ diff --git a/icon-themes/elementary/sc/res/ou09.png b/icon-themes/elementary/sc/res/ou09.png new file mode 100644 index ..216c0159f52f Binary files /dev/null and b/icon-themes/elementary/sc/res/ou09.png differ diff --git a/icon-themes/elementary_svg/sc/res/ou01.svg b/icon-themes/elementary_svg/sc/res/ou01.svg new file mode 100644 index ..de9e5b4340e6 --- /dev/null +++ b/icon-themes/elementary_svg/sc/res/ou01.svg @@ -0,0 +1 @@ +http://www.w3.org/2000/svg"; xmlns:xlink="http://www.w3.org/1999/xlink";>/> \ No newline at end of file diff --git a/icon-themes/elementary_svg/sc/res/ou010.svg b/icon-themes/elementary_svg/sc/res/ou010.svg new file mode 100644 index ..7c54b3a1112f --- /dev/null +++ b/icon-themes/element
[Libreoffice-commits] core.git: Branch 'libreoffice-7-4' - icon-themes/elementary icon-themes/elementary_svg
icon-themes/elementary/sc/res/ou01.png |binary icon-themes/elementary/sc/res/ou010.png |binary icon-themes/elementary/sc/res/ou011.png |binary icon-themes/elementary/sc/res/ou012.png |binary icon-themes/elementary/sc/res/ou02.png |binary icon-themes/elementary/sc/res/ou03.png |binary icon-themes/elementary/sc/res/ou04.png |binary icon-themes/elementary/sc/res/ou05.png |binary icon-themes/elementary/sc/res/ou06.png |binary icon-themes/elementary/sc/res/ou07.png |binary icon-themes/elementary/sc/res/ou08.png |binary icon-themes/elementary/sc/res/ou09.png |binary icon-themes/elementary_svg/sc/res/ou01.svg |1 + icon-themes/elementary_svg/sc/res/ou010.svg |1 + icon-themes/elementary_svg/sc/res/ou011.svg |1 + icon-themes/elementary_svg/sc/res/ou012.svg |1 + icon-themes/elementary_svg/sc/res/ou02.svg |1 + icon-themes/elementary_svg/sc/res/ou03.svg |1 + icon-themes/elementary_svg/sc/res/ou04.svg |1 + icon-themes/elementary_svg/sc/res/ou05.svg |1 + icon-themes/elementary_svg/sc/res/ou06.svg |1 + icon-themes/elementary_svg/sc/res/ou07.svg |1 + icon-themes/elementary_svg/sc/res/ou08.svg |1 + icon-themes/elementary_svg/sc/res/ou09.svg |1 + 24 files changed, 12 insertions(+) New commits: commit 81bda80a11bb3d6753fdc27629032886aa73a784 Author: Rizal Muttaqin AuthorDate: Thu Oct 13 08:21:32 2022 +0700 Commit: Rizal Muttaqin CommitDate: Thu Oct 13 06:34:13 2022 +0200 tdf#151087 elementary:Grouped n Ungrouped Columns/Rows Change-Id: I25ada781c5308a8ea89ba98d2e021f7b50c13c67 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141278 Tested-by: Jenkins Reviewed-by: Rizal Muttaqin diff --git a/icon-themes/elementary/sc/res/ou01.png b/icon-themes/elementary/sc/res/ou01.png new file mode 100644 index ..7b0894977be1 Binary files /dev/null and b/icon-themes/elementary/sc/res/ou01.png differ diff --git a/icon-themes/elementary/sc/res/ou010.png b/icon-themes/elementary/sc/res/ou010.png new file mode 100644 index ..80138cb20c5f Binary files /dev/null and b/icon-themes/elementary/sc/res/ou010.png differ diff --git a/icon-themes/elementary/sc/res/ou011.png b/icon-themes/elementary/sc/res/ou011.png new file mode 100644 index ..d0cb60b413ae Binary files /dev/null and b/icon-themes/elementary/sc/res/ou011.png differ diff --git a/icon-themes/elementary/sc/res/ou012.png b/icon-themes/elementary/sc/res/ou012.png new file mode 100644 index ..97161aaa4dce Binary files /dev/null and b/icon-themes/elementary/sc/res/ou012.png differ diff --git a/icon-themes/elementary/sc/res/ou02.png b/icon-themes/elementary/sc/res/ou02.png new file mode 100644 index ..c83a24290016 Binary files /dev/null and b/icon-themes/elementary/sc/res/ou02.png differ diff --git a/icon-themes/elementary/sc/res/ou03.png b/icon-themes/elementary/sc/res/ou03.png new file mode 100644 index ..b6b6b0e9ff46 Binary files /dev/null and b/icon-themes/elementary/sc/res/ou03.png differ diff --git a/icon-themes/elementary/sc/res/ou04.png b/icon-themes/elementary/sc/res/ou04.png new file mode 100644 index ..8a0d0918972e Binary files /dev/null and b/icon-themes/elementary/sc/res/ou04.png differ diff --git a/icon-themes/elementary/sc/res/ou05.png b/icon-themes/elementary/sc/res/ou05.png new file mode 100644 index ..5f8fc76e0d84 Binary files /dev/null and b/icon-themes/elementary/sc/res/ou05.png differ diff --git a/icon-themes/elementary/sc/res/ou06.png b/icon-themes/elementary/sc/res/ou06.png new file mode 100644 index ..069851c1ed42 Binary files /dev/null and b/icon-themes/elementary/sc/res/ou06.png differ diff --git a/icon-themes/elementary/sc/res/ou07.png b/icon-themes/elementary/sc/res/ou07.png new file mode 100644 index ..b6295b421615 Binary files /dev/null and b/icon-themes/elementary/sc/res/ou07.png differ diff --git a/icon-themes/elementary/sc/res/ou08.png b/icon-themes/elementary/sc/res/ou08.png new file mode 100644 index ..2c1966439ae0 Binary files /dev/null and b/icon-themes/elementary/sc/res/ou08.png differ diff --git a/icon-themes/elementary/sc/res/ou09.png b/icon-themes/elementary/sc/res/ou09.png new file mode 100644 index ..216c0159f52f Binary files /dev/null and b/icon-themes/elementary/sc/res/ou09.png differ diff --git a/icon-themes/elementary_svg/sc/res/ou01.svg b/icon-themes/elementary_svg/sc/res/ou01.svg new file mode 100644 index ..de9e5b4340e6 --- /dev/null +++ b/icon-themes/elementary_svg/sc/res/ou01.svg @@ -0,0 +1 @@ +http://www.w3.org/2000/svg"; xmlns:xlink="http://www.w3.org/1999/xlink";>/> \ No newline at end of file diff --git a/icon-themes/elementary_svg/sc/res/ou010.svg b/icon-themes/elementary_svg/sc/res/ou010.svg new file mode 100644 index ..7c54b3a1112f --- /dev/null +++ b/icon-themes/elementary_svg/
[Libreoffice-commits] core.git: icon-themes/breeze icon-themes/breeze_dark icon-themes/breeze_dark_svg icon-themes/breeze_svg icon-themes/sifr icon-themes/sifr_dark icon-themes/sifr_dark_svg icon-them
icon-themes/breeze/sc/res/ou011.png |binary icon-themes/breeze/sc/res/ou012.png |binary icon-themes/breeze_dark/sc/res/ou011.png |binary icon-themes/breeze_dark/sc/res/ou012.png |binary icon-themes/breeze_dark_svg/sc/res/ou011.svg |2 +- icon-themes/breeze_dark_svg/sc/res/ou012.svg |2 +- icon-themes/breeze_svg/sc/res/ou011.svg |2 +- icon-themes/breeze_svg/sc/res/ou012.svg |2 +- icon-themes/sifr/sc/res/ou01.png |binary icon-themes/sifr/sc/res/ou010.png|binary icon-themes/sifr/sc/res/ou011.png|binary icon-themes/sifr/sc/res/ou012.png|binary icon-themes/sifr/sc/res/ou02.png |binary icon-themes/sifr/sc/res/ou03.png |binary icon-themes/sifr/sc/res/ou04.png |binary icon-themes/sifr/sc/res/ou05.png |binary icon-themes/sifr/sc/res/ou06.png |binary icon-themes/sifr/sc/res/ou07.png |binary icon-themes/sifr/sc/res/ou08.png |binary icon-themes/sifr/sc/res/ou09.png |binary icon-themes/sifr_dark/sc/res/ou01.png|binary icon-themes/sifr_dark/sc/res/ou010.png |binary icon-themes/sifr_dark/sc/res/ou011.png |binary icon-themes/sifr_dark/sc/res/ou012.png |binary icon-themes/sifr_dark/sc/res/ou02.png|binary icon-themes/sifr_dark/sc/res/ou03.png|binary icon-themes/sifr_dark/sc/res/ou04.png|binary icon-themes/sifr_dark/sc/res/ou05.png|binary icon-themes/sifr_dark/sc/res/ou06.png|binary icon-themes/sifr_dark/sc/res/ou07.png|binary icon-themes/sifr_dark/sc/res/ou08.png|binary icon-themes/sifr_dark/sc/res/ou09.png|binary icon-themes/sifr_dark_svg/sc/res/ou01.svg|1 + icon-themes/sifr_dark_svg/sc/res/ou010.svg |1 + icon-themes/sifr_dark_svg/sc/res/ou011.svg |1 + icon-themes/sifr_dark_svg/sc/res/ou012.svg |1 + icon-themes/sifr_dark_svg/sc/res/ou02.svg|1 + icon-themes/sifr_dark_svg/sc/res/ou03.svg|1 + icon-themes/sifr_dark_svg/sc/res/ou04.svg|1 + icon-themes/sifr_dark_svg/sc/res/ou05.svg|1 + icon-themes/sifr_dark_svg/sc/res/ou06.svg|1 + icon-themes/sifr_dark_svg/sc/res/ou07.svg|1 + icon-themes/sifr_dark_svg/sc/res/ou08.svg|1 + icon-themes/sifr_dark_svg/sc/res/ou09.svg|1 + icon-themes/sifr_svg/sc/res/ou01.svg |1 + icon-themes/sifr_svg/sc/res/ou010.svg|1 + icon-themes/sifr_svg/sc/res/ou011.svg|1 + icon-themes/sifr_svg/sc/res/ou012.svg|1 + icon-themes/sifr_svg/sc/res/ou02.svg |1 + icon-themes/sifr_svg/sc/res/ou03.svg |1 + icon-themes/sifr_svg/sc/res/ou04.svg |1 + icon-themes/sifr_svg/sc/res/ou05.svg |1 + icon-themes/sifr_svg/sc/res/ou06.svg |1 + icon-themes/sifr_svg/sc/res/ou07.svg |1 + icon-themes/sifr_svg/sc/res/ou08.svg |1 + icon-themes/sifr_svg/sc/res/ou09.svg |1 + 56 files changed, 28 insertions(+), 4 deletions(-) New commits: commit aca7edb4ca7fd58c50a6b64b472e80f2eb053fd5 Author: Rizal Muttaqin AuthorDate: Thu Oct 13 06:00:40 2022 +0700 Commit: Rizal Muttaqin CommitDate: Thu Oct 13 01:56:45 2022 +0200 tdf#151087 Sifr:+Grouped n Ungrouped Columns/Rows, Breeze: Revise it Change-Id: I6f1e72ec38414961cf5e3d41baf6b1448ab0aa95 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141276 Tested-by: Jenkins Reviewed-by: Rizal Muttaqin diff --git a/icon-themes/breeze/sc/res/ou011.png b/icon-themes/breeze/sc/res/ou011.png index 52b8017fa48e..0f2a1f39908d 100644 Binary files a/icon-themes/breeze/sc/res/ou011.png and b/icon-themes/breeze/sc/res/ou011.png differ diff --git a/icon-themes/breeze/sc/res/ou012.png b/icon-themes/breeze/sc/res/ou012.png index a9bbb3b24a7e..135565142992 100644 Binary files a/icon-themes/breeze/sc/res/ou012.png and b/icon-themes/breeze/sc/res/ou012.png differ diff --git a/icon-themes/breeze_dark/sc/res/ou011.png b/icon-themes/breeze_dark/sc/res/ou011.png index ac1c1b27e258..79279b8765c8 100644 Binary files a/icon-themes/breeze_dark/sc/res/ou011.png and b/icon-themes/breeze_dark/sc/res/ou011.png differ diff --git a/icon-themes/breeze_dark/sc/res/ou012.png b/icon-themes/breeze_dark/sc/res/ou012.png index 08edb8f5806d..bcd33e269d88 100644 Binary files a/icon-themes/breeze_dark/sc/res/ou012.png and b/icon-themes/breeze_dark/sc/res/ou012.png differ diff --git a/icon-themes/breeze_dark_svg/sc/res/ou011.svg b/icon-themes/breeze_dark_svg/sc/res/ou011.svg index 064a4e432b6d..9191d99a7768 100644 --- a/icon-themes/breeze_dark_svg/sc/res/ou011.svg +++ b/icon-themes/breeze_dark_svg/sc/res/ou011.svg @@ -1 +1 @@ -http://www.w3.org/2000/svg"; xmlns:xlink="http://www.w3.org/1999/xlink";> \ No newline at end of file +http://www.w3.org/2000/svg"; xmlns:xlink="http://www.w3.org/1999/xlink";> \ No newline at end of file diff -
[Libreoffice-commits] core.git: sc/qa
dev/null|binary sc/qa/uitest/calc_tests/autofill.py | 141 2 files changed, 141 deletions(-) New commits: commit fa39cf137ded385b463b071f6e785f2cf3093a22 Author: Xisco Fauli AuthorDate: Wed Oct 12 20:47:49 2022 +0200 Commit: Xisco Fauli CommitDate: Wed Oct 12 22:54:00 2022 +0200 sc: remove duplicated test This is already well covered by Test::testAutoFill in sc/qa/unit/ucalc.cxx Change-Id: I5d539de101e1b4dcd19191ac40d2bc0734475889 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141272 Tested-by: Jenkins Reviewed-by: Xisco Fauli diff --git a/sc/qa/uitest/calc_tests/autofill.py b/sc/qa/uitest/calc_tests/autofill.py deleted file mode 100644 index 3600d42c07eb.. --- a/sc/qa/uitest/calc_tests/autofill.py +++ /dev/null @@ -1,141 +0,0 @@ -# -*- tab-width: 4; indent-tabs-mode: nil; py-indent-offset: 4 -*- -# -# This file is part of the LibreOffice project. -# -# This Source Code Form is subject to the terms of the Mozilla Public -# License, v. 2.0. If a copy of the MPL was not distributed with this -# file, You can obtain one at http://mozilla.org/MPL/2.0/. -# -from uitest.framework import UITestCase -from uitest.uihelper.common import get_url_for_data_file -from uitest.uihelper.calc import enter_text_to_cell -from libreoffice.calc.document import get_cell_by_position -from libreoffice.uno.propertyvalue import mkPropertyValues -#Test for the AutoFill feature - auto-fill can't increment last octet of ip addresses - -class CalcAutofill(UITestCase): - -def test_autofill(self): -with self.ui_test.load_file(get_url_for_data_file("autofill.ods")) as calc_doc: -xCalcDoc = self.xUITest.getTopFocusWindow() -gridwin = xCalcDoc.getChild("grid_window") -#Select cell A12 and drag the fill handle in the bottom right corner of the cell down to A18 -gridwin.executeAction("SELECT", mkPropertyValues({"RANGE": "A12:A18"})) -with self.ui_test.execute_dialog_through_command(".uno:FillSeries"): -pass -#Compare with the content in the right next column -self.assertEqual(get_cell_by_position(calc_doc, 0, 0, 11).getValue(), 18.34) -self.assertEqual(get_cell_by_position(calc_doc, 0, 0, 12).getValue(), 19.34) -self.assertEqual(get_cell_by_position(calc_doc, 0, 0, 13).getValue(), 20.34) -self.assertEqual(get_cell_by_position(calc_doc, 0, 0, 14).getValue(), 21.34) -self.assertEqual(get_cell_by_position(calc_doc, 0, 0, 15).getValue(), 22.34) -self.assertEqual(get_cell_by_position(calc_doc, 0, 0, 16).getValue(), 23.34) -self.assertEqual(get_cell_by_position(calc_doc, 0, 0, 17).getValue(), 24.34) -#Select cell A12 and drag the fill handle in the bottom right corner of the cell up to A6 -gridwin.executeAction("SELECT", mkPropertyValues({"RANGE": "A6:A12"})) -with self.ui_test.execute_dialog_through_command(".uno:FillSeries") as xDialog: -xup = xDialog.getChild("up") -xincrement = xDialog.getChild("increment") -xup.executeAction("CLICK", tuple()) -xincrement.executeAction("TYPE", mkPropertyValues({"KEYCODE":"CTRL+A"})) -xincrement.executeAction("TYPE", mkPropertyValues({"KEYCODE":"BACKSPACE"})) -xincrement.executeAction("TYPE", mkPropertyValues({"TEXT":"-1"})) -#Compare with the content in the right next column -self.assertEqual(get_cell_by_position(calc_doc, 0, 0, 5).getValue(), 12.34) -self.assertEqual(get_cell_by_position(calc_doc, 0, 0, 6).getValue(), 13.34) -self.assertEqual(get_cell_by_position(calc_doc, 0, 0, 7).getValue(), 14.34) -self.assertEqual(get_cell_by_position(calc_doc, 0, 0, 8).getValue(), 15.34) -self.assertEqual(get_cell_by_position(calc_doc, 0, 0, 9).getValue(), 16.34) -self.assertEqual(get_cell_by_position(calc_doc, 0, 0, 10).getValue(), 17.34) -self.assertEqual(get_cell_by_position(calc_doc, 0, 0, 11).getValue(), 18.34) - -#Test that hidden cells are not affected / skipped in the increment process. -#Simulate selecting cell A26 and dragging the fill handle in the bottom right corner of the cell down to A32 -gridwin.executeAction("SELECT", mkPropertyValues({"RANGE": "A26:A32"})) -with self.ui_test.execute_dialog_through_command(".uno:FillSeries"): -pass -self.assertEqual(get_cell_by_position(calc_doc, 0, 0, 25).getValue(), 18.34) -self.assertEqual(get_cell_by_position(calc_doc, 0, 0, 26).getValue(), 19.34) -self.assertEqual(get_cell_by_position(calc_doc, 0, 0, 27).getValue(), 5.0) #hidden -self.assertEqual(get_cell_by_position(calc_doc, 0, 0, 28
Commands ".uno:RegenerateDiagram" and ".uno:EditDiagram" do not work
Hi all, it is about bug tdf#151499. Are the ".uno:RegenerateDiagram" and ".uno:EditDiagram" commands supposed to work? Or is someone still working on it? Kind regards, Regina
[Libreoffice-commits] core.git: sc/qa
sc/qa/uitest/calc_tests/autofill.py | 14 -- sc/qa/unit/ucalc.cxx| 12 2 files changed, 12 insertions(+), 14 deletions(-) New commits: commit be1a43651fb1da5872d4501b409d2811f142c525 Author: Xisco Fauli AuthorDate: Wed Oct 12 20:20:48 2022 +0200 Commit: Xisco Fauli CommitDate: Wed Oct 12 22:04:11 2022 +0200 sc: move UItest to CppUnittest Change-Id: I6543994abe337041de5a1aab16a5a49105aacfbb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141271 Tested-by: Jenkins Reviewed-by: Xisco Fauli diff --git a/sc/qa/uitest/calc_tests/autofill.py b/sc/qa/uitest/calc_tests/autofill.py index 294d60fd7102..3600d42c07eb 100644 --- a/sc/qa/uitest/calc_tests/autofill.py +++ b/sc/qa/uitest/calc_tests/autofill.py @@ -138,18 +138,4 @@ class CalcAutofill(UITestCase): self.assertEqual(get_cell_by_position(calc_doc, 0, 15, 10).getString(), "10.64.127.6") self.assertEqual(get_cell_by_position(calc_doc, 0, 15, 11).getString(), "10.64.127.7") -def test_autofill_with_suffix(self): -with self.ui_test.create_doc_in_start_center("calc") as document: -xCalcDoc = self.xUITest.getTopFocusWindow() -gridwin = xCalcDoc.getChild("grid_window") -enter_text_to_cell(gridwin, "A1", "1st") -gridwin.executeAction("SELECT", mkPropertyValues({"CELL": "B2"})) -gridwin.executeAction("SELECT", mkPropertyValues({"RANGE": "A1:A3"})) -with self.ui_test.execute_dialog_through_command(".uno:FillSeries") as xDialog: -xautofill = xDialog.getChild("autofill") -xautofill.executeAction("CLICK", tuple()) -self.assertEqual(get_cell_by_position(document, 0, 0, 0).getString(), "1st") -self.assertEqual(get_cell_by_position(document, 0, 0, 1).getString(), "2nd") -self.assertEqual(get_cell_by_position(document, 0, 0, 2).getString(), "3rd") - # vim: set shiftwidth=4 softtabstop=4 expandtab: diff --git a/sc/qa/unit/ucalc.cxx b/sc/qa/unit/ucalc.cxx index 7726a56f561d..271ddc83ee5a 100644 --- a/sc/qa/unit/ucalc.cxx +++ b/sc/qa/unit/ucalc.cxx @@ -4730,6 +4730,18 @@ void Test::testAutoFill() // - Actual : 2022-10-01 19:59:59.999 CPPUNIT_ASSERT_EQUAL( OUString("2022-10-01 20:00:00.000"), m_pDoc->GetString( 0, 20, 0 ) ); +// Clear column A for a new test. +clearRange(m_pDoc, ScRange(0,0,0,0,m_pDoc->MaxRow(),0)); +m_pDoc->SetRowHidden(0, m_pDoc->MaxRow(), 0, false); // Show all rows. + +m_pDoc->SetString( 0, 0, 0, "1st" ); + +m_pDoc->Fill( 0, 0, 0, 0, nullptr, aMarkData, 5, FILL_TO_BOTTOM, FILL_AUTO ); + +CPPUNIT_ASSERT_EQUAL( OUString("1st"), m_pDoc->GetString( 0, 0, 0 ) ); +CPPUNIT_ASSERT_EQUAL( OUString("2nd"), m_pDoc->GetString( 0, 1, 0 ) ); +CPPUNIT_ASSERT_EQUAL( OUString("3rd"), m_pDoc->GetString( 0, 2, 0 ) ); + m_pDoc->DeleteTab(0); }
Minutes from the UX/design meeting 2022-Oct-12
Present: John, Cor, Heiko Comments: Regina, Stuart, Eyal, Rafael, Roman Tickets/Topics * GALLERY: Option to add files to a "Favourites" theme in gallery + https://bugs.documentfoundation.org/show_bug.cgi?id=151222 + current workflow is to create a special category "Favorites" and copy the interesting items into it (Regina) + Gallery management is clunky and Favorites is widely used (Cor, John) + having another route to Gallery items would be orthogonal to the existing path and confusing (Heiko) + adding the Favorite tagging mechanism wont block improvements to the Gallery (Cor) + could be shown in the list likewise the categories but on top and separated with a ruler; creating a category with the same name would end up in "Favorite 1"; renaming and deletion needs to be blocked (Heiko) => comment * Size submenu of table selection context menu not clear enough + https://bugs.documentfoundation.org/show_bug.cgi?id=151284 + command labels usually start with an action like "Insert *" (Eyal) + "Optimize Size" (Rafael) + "Height and Width" (Cor) + just "Size" is reasonable (John, Cor) + "Resize Row/Column" (Eyal) + works but is lengthy + just "Resize" (John) + hard to translate in German, Dutch.. (Heiko) => better stick with the existing term, WF * Consider adding "Move to Top" and "Move to Bottom" buttons under effects list + https://bugs.documentfoundation.org/show_bug.cgi?id=151345 + Move To Top/Button a not a requirement (Stuart) + tend to agree with WF but if the commands "move up/down" (as existing) and "to top/bottom" (as requested) could be added to the context menu (Heiko) + seldom use case, cluttering the UI, dragging is possible (Cor) + planning to change the UI anyway (Effects go into an expander) (Heiko) + competitor don't have it either, so prolly no big need (John) => WF * Need mechanism for re-centering "Slides pane" onto current slide with edit focus + https://bugs.documentfoundation.org/show_bug.cgi?id=151170 + statusbar shows the number of the current slide and the sorter has a clear indicator but not when the focus changes eg after clicking the white space at the slide sorter + UNO action to scroll the pane would be very helpful (Stuart) + sounds like feature creep to me and extends the UNO API unnecessarily; having a "toolbar" (some button next to close) would be acceptable but ideally a more natural interaction like automatically refocus when items are edited, which is the fact today (Heiko) + alternatively we could just avoid loosing the focus; ie. no white space in the slide sorter (Heiko) + always show the currently active slide at the status bar (John) => recommend to modify the ticket goal * New Paste Special Operations: Maximum, Minimum + https://bugs.documentfoundation.org/show_bug.cgi?id=151205 + afraid of a bottomless pit (Rafael), no use case (Roman) + plenty of space, do it (Eyal) + in case we have even more options it could go into a dropdown (Rafael) + strongly disagree; we should keep it as simple as needed (Heiko) + use case: Tracking a set of measurements where there is no need to keep the history of measurements, only the last value and the "best" value to date + don't get the use case, but seems to be completely different to what we have (Cor) + seems to be very advanced; too niche = WF (John) => recommend to realize per extension OpenPGP_signature Description: OpenPGP digital signature
[Libreoffice-commits] core.git: sc/qa
sc/qa/unit/ucalc.cxx | 13 + 1 file changed, 13 insertions(+) New commits: commit 1b7356e57fbf28a62f10476cebbd45ee369fde17 Author: Xisco Fauli AuthorDate: Wed Oct 12 20:04:48 2022 +0200 Commit: Xisco Fauli CommitDate: Wed Oct 12 21:05:34 2022 +0200 tdf#151460: sc_ucalc: Add unittest Change-Id: Ib0c8d09da50a09b2715a946a1955eb5a09d83d62 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141269 Tested-by: Jenkins Reviewed-by: Xisco Fauli diff --git a/sc/qa/unit/ucalc.cxx b/sc/qa/unit/ucalc.cxx index 18a7be1af068..7726a56f561d 100644 --- a/sc/qa/unit/ucalc.cxx +++ b/sc/qa/unit/ucalc.cxx @@ -4717,6 +4717,19 @@ void Test::testAutoFill() // - Actual : 6.01 CPPUNIT_ASSERT_EQUAL( OUString("6"), m_pDoc->GetString( 0, 50, 0 ) ); +// Clear column A for a new test. +clearRange(m_pDoc, ScRange(0,0,0,0,m_pDoc->MaxRow(),0)); +m_pDoc->SetRowHidden(0, m_pDoc->MaxRow(), 0, false); // Show all rows. + +m_pDoc->SetString( 0, 0, 0, "2022-10-01 00:00:00.000" ); +m_pDoc->SetString( 0, 1, 0, "2022-10-01 01:00:00.000" ); +m_pDoc->Fill( 0, 0, 0, 1, nullptr, aMarkData, 25, FILL_TO_BOTTOM, FILL_AUTO ); + +// tdf#151460: Without the fix in place, this test would have failed with +// - Expected: 2022-10-01 20:00:00.000 +// - Actual : 2022-10-01 19:59:59.999 +CPPUNIT_ASSERT_EQUAL( OUString("2022-10-01 20:00:00.000"), m_pDoc->GetString( 0, 20, 0 ) ); + m_pDoc->DeleteTab(0); }
[Libreoffice-commits] core.git: sc/qa
sc/qa/unit/subsequent_export_test2.cxx |9 ++--- sc/qa/unit/subsequent_filters_test2.cxx |3 +-- sc/qa/unit/ucalc.cxx|4 ++-- 3 files changed, 5 insertions(+), 11 deletions(-) New commits: commit 2a1ea77eebed14c86b170c0845f0eb5330fd6a0c Author: Xisco Fauli AuthorDate: Wed Oct 12 18:18:57 2022 +0200 Commit: Xisco Fauli CommitDate: Wed Oct 12 20:22:43 2022 +0200 sc: qa: avoid OUStringChar for better readability Change-Id: Idf730e05d2ebec9003a2a4700b43b8658d858b03 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141265 Tested-by: Jenkins Reviewed-by: Xisco Fauli diff --git a/sc/qa/unit/subsequent_export_test2.cxx b/sc/qa/unit/subsequent_export_test2.cxx index 17e5da80eabb..71466d7ee720 100644 --- a/sc/qa/unit/subsequent_export_test2.cxx +++ b/sc/qa/unit/subsequent_export_test2.cxx @@ -909,20 +909,15 @@ void ScExportTest2::testEscapeCharInNumberFormatXLSX() = XPathHelper::parseExport2(*this, *xDocSh, m_xSFactory, "xl/styles.xml", FORMAT_XLSX); CPPUNIT_ASSERT(pDoc); -const sal_Unicode cEuro(8364); // € symbol assertXPath(pDoc, "/x:styleSheet/x:numFmts/x:numFmt[2]", "formatCode", "00\\ 00\\ 00\\ 00\\ 00"); assertXPath(pDoc, "/x:styleSheet/x:numFmts/x:numFmt[3]", "formatCode", "00\\.00\\.00\\.000\\.0"); // tdf#81939 // "_-* #,##0\ _€_-;\-* #,##0\ _€_-;_-* "- "_€_-;_-@_-" // tdf#81222 -OUString rFormatStrExpected("_-* #,##0\\ _" + OUStringChar(cEuro) + "_-;\\-* #,##0\\ _" -+ OUStringChar(cEuro) + "_-;_-* \"- \"_" + OUStringChar(cEuro) -+ "_-;_-@_-"); +OUString rFormatStrExpected(u"_-* #,##0\\ _€_-;\\-* #,##0\\ _€_-;_-* \"- \"_€_-;_-@_-"); assertXPath(pDoc, "/x:styleSheet/x:numFmts/x:numFmt[4]", "formatCode", rFormatStrExpected); // "_-* #,##0" €"_-;\-* #,##0" €"_-;_-* "- €"_-;_-@_-"); -rFormatStrExpected = "_-* #,##0\" " + OUStringChar(cEuro) + "\"_-;\\-* #,##0\" " - + OUStringChar(cEuro) + "\"_-;_-* \"- " + OUStringChar(cEuro) - + "\"_-;_-@_-"; +rFormatStrExpected = u"_-* #,##0\" €\"_-;\\-* #,##0\" €\"_-;_-* \"- €\"_-;_-@_-"; assertXPath(pDoc, "/x:styleSheet/x:numFmts/x:numFmt[5]", "formatCode", rFormatStrExpected); // remove escape char in fraction assertXPath(pDoc, "/x:styleSheet/x:numFmts/x:numFmt[6]", "formatCode", diff --git a/sc/qa/unit/subsequent_filters_test2.cxx b/sc/qa/unit/subsequent_filters_test2.cxx index 8c77721cc790..2a7bdb65f843 100644 --- a/sc/qa/unit/subsequent_filters_test2.cxx +++ b/sc/qa/unit/subsequent_filters_test2.cxx @@ -2323,8 +2323,7 @@ void ScFiltersTest2::testTdf70455() // Without the fix in place, this test would have failed with // - Expected: €780.00 // - Actual : Err:509 -CPPUNIT_ASSERT_EQUAL(OUString(OUStringChar(u'\x20AC') + "780.00"), - rDoc.GetString(ScAddress(7, 7, 0))); +CPPUNIT_ASSERT_EQUAL(OUString(u"€780.00"), rDoc.GetString(ScAddress(7, 7, 0))); xDocSh->DoClose(); } diff --git a/sc/qa/unit/ucalc.cxx b/sc/qa/unit/ucalc.cxx index d821a146eef8..18a7be1af068 100644 --- a/sc/qa/unit/ucalc.cxx +++ b/sc/qa/unit/ucalc.cxx @@ -693,14 +693,14 @@ void Test::testTdf114406() void Test::testTdf93951() { CPPUNIT_ASSERT(m_pDoc->InsertTab (0, "Test")); -m_pDoc->SetString(ScAddress(0,0,0), "=2*" + OUStringChar(u'\x00A7') + "*2"); +m_pDoc->SetString(ScAddress(0,0,0), u"=2*§*2"); OUString aFormula = m_pDoc->GetFormula(0,0,0); // Without the fix in place, this test would have failed with // - Expected: =2*§*2 // - Actual : =2* -CPPUNIT_ASSERT_EQUAL(OUString("=2*" + OUStringChar(u'\x00A7') + "*2"), aFormula); +CPPUNIT_ASSERT_EQUAL(OUString(u"=2*§*2"), aFormula); m_pDoc->DeleteTab(0); }
[Libreoffice-commits] core.git: compilerplugins/clang
compilerplugins/clang/test/constvars.cxx |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) New commits: commit b26793b907ce823e5cce38f6fe93b420ebe38579 Author: jsala AuthorDate: Wed Oct 12 16:17:22 2022 +0200 Commit: Stephan Bergmann CommitDate: Wed Oct 12 19:43:08 2022 +0200 tdf#147021 REVERT Use std::size() instead of SAL_N_ELEMENTS() macro Reverting this changes made by error. See https://gerrit.libreoffice.org/c/core/+/136263/6/compilerplugins/clang/test/constvars.cxx#25 Change-Id: Ica49759682adf55a1f0cef2a842acab603c62dac Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141259 Reviewed-by: Stephan Bergmann Tested-by: Jenkins diff --git a/compilerplugins/clang/test/constvars.cxx b/compilerplugins/clang/test/constvars.cxx index 80acdb67528d..88df50f8e199 100644 --- a/compilerplugins/clang/test/constvars.cxx +++ b/compilerplugins/clang/test/constvars.cxx @@ -22,8 +22,8 @@ namespace test1 { int const aFormalArgs[] = { 1, 2 }; // expected-error@+1 {{var can be const [loplugin:constvars]}} -static std::size_t const nMediaArgsCount = std::size(aFormalArgs); -std::size_t foo() +static sal_uInt16 nMediaArgsCount = SAL_N_ELEMENTS(aFormalArgs); +sal_uInt16 foo() { (void)aFormalArgs; return nMediaArgsCount;
[Libreoffice-commits] core.git: sc/qa
sc/qa/unit/data/xlsx/tdf60673.xlsx |binary sc/qa/unit/subsequent_filters_test2.cxx | 26 ++ 2 files changed, 26 insertions(+) New commits: commit 369c7d2dc4b941d5b7699b03a3cfc03ad0e3b430 Author: Xisco Fauli AuthorDate: Wed Oct 12 17:45:13 2022 +0200 Commit: Xisco Fauli CommitDate: Wed Oct 12 18:53:28 2022 +0200 tdf#60673: sc_subsequent_filters_test2: Add unittest Change-Id: Ia36507483e5dc325431b17e9374882ae8102bfb5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141263 Tested-by: Jenkins Reviewed-by: Xisco Fauli diff --git a/sc/qa/unit/data/xlsx/tdf60673.xlsx b/sc/qa/unit/data/xlsx/tdf60673.xlsx new file mode 100644 index ..adfc45f14388 Binary files /dev/null and b/sc/qa/unit/data/xlsx/tdf60673.xlsx differ diff --git a/sc/qa/unit/subsequent_filters_test2.cxx b/sc/qa/unit/subsequent_filters_test2.cxx index 37f177d48297..8c77721cc790 100644 --- a/sc/qa/unit/subsequent_filters_test2.cxx +++ b/sc/qa/unit/subsequent_filters_test2.cxx @@ -136,6 +136,7 @@ public: void testCondFormatXLSB(); void testPageScalingXLSX(); void testActiveXCheckboxXLSX(); +void testTdf60673(); void testtdf120301_xmlSpaceParsingXLSX(); void testUnicodeFileNameGnumeric(); void testCondFormatFormulaListenerXLSX(); @@ -252,6 +253,7 @@ public: CPPUNIT_TEST(testCondFormatXLSB); CPPUNIT_TEST(testPageScalingXLSX); CPPUNIT_TEST(testActiveXCheckboxXLSX); +CPPUNIT_TEST(testTdf60673); CPPUNIT_TEST(testtdf120301_xmlSpaceParsingXLSX); CPPUNIT_TEST(testUnicodeFileNameGnumeric); CPPUNIT_TEST(testMergedCellsXLSXML); @@ -2183,6 +2185,30 @@ void ScFiltersTest2::testActiveXCheckboxXLSX() xDocSh->DoClose(); } +void ScFiltersTest2::testTdf60673() +{ +ScDocShellRef xDocSh = loadDoc(u"tdf60673.", FORMAT_XLSX); +uno::Reference xModel = xDocSh->GetModel(); +uno::Reference xDoc(xModel, UNO_QUERY_THROW); +uno::Reference xIA(xDoc->getSheets(), UNO_QUERY_THROW); +uno::Reference xDrawPageSupplier(xIA->getByIndex(0), + UNO_QUERY_THROW); +uno::Reference xIA_DrawPage(xDrawPageSupplier->getDrawPage(), + UNO_QUERY_THROW); +uno::Reference xControlShape(xIA_DrawPage->getByIndex(0), + UNO_QUERY_THROW); + +uno::Reference xPropertySet(xControlShape->getControl(), uno::UNO_QUERY); + +OUString sLabel; +xPropertySet->getPropertyValue("Label") >>= sLabel; + +// Without the fix in place, this test would have failed with +// - Expected: PL: ĄŚŻŹĆŃŁÓĘ +// - Actual : PL: +CPPUNIT_ASSERT_EQUAL(OUString(u"PL: ĄŚŻŹĆŃŁÓĘ"), sLabel); +} + void ScFiltersTest2::testtdf120301_xmlSpaceParsingXLSX() { ScDocShellRef xDocSh = loadDoc(u"tdf120301_xmlSpaceParsing.", FORMAT_XLSX);
[Libreoffice-commits] core.git: Branch 'distro/collabora/co-22.05' - sw/qa sw/source
sw/qa/core/crsr/crsr.cxx| 23 +++ sw/source/core/crsr/pam.cxx |7 +++ 2 files changed, 30 insertions(+) New commits: commit fc8b066ab832e1166da3b9dd76e11b4e266314cc Author: Miklos Vajna AuthorDate: Wed Oct 12 11:44:49 2022 +0200 Commit: Andras Timar CommitDate: Wed Oct 12 18:17:04 2022 +0200 tdf#151190 sw content controls: make them read-write in protected sections When the user picked a date in the date picker inside a protected section, then we blocked the deletion of the placeholder, but allowed insertion to the content control, which is inconsistent. The trouble was that SwPaM::HasReadonlySel() detected that the cursor is in a protected section, so deletion failed, leading to an ever growing value of the content control. Fix the problem by handling content controls similar to legacy form fields: if the cursor is inside a content control, then that value is editable, even if we're inside a protected section. This is meant to fix all content control types, not just date pickers. (cherry picked from commit b138d6c12aaeb0b87dce15ea52dd134cf1abf6ac) Change-Id: I9eca4c4f71dcfaa61d84414f7727adcd4496735c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141255 Tested-by: Jenkins CollaboraOffice Reviewed-by: Andras Timar diff --git a/sw/qa/core/crsr/crsr.cxx b/sw/qa/core/crsr/crsr.cxx index 5f06658b528e..7b42d4df3716 100644 --- a/sw/qa/core/crsr/crsr.cxx +++ b/sw/qa/core/crsr/crsr.cxx @@ -183,6 +183,29 @@ CPPUNIT_TEST_FIXTURE(SwCoreCrsrTest, testDropdownContentControl) CPPUNIT_ASSERT(pWrtShell->HasReadonlySel()); } +CPPUNIT_TEST_FIXTURE(SwCoreCrsrTest, testContentControlProtectedSection) +{ +// Given a document with a date content control in a protected section: +SwDoc* pDoc = createSwDoc(); +SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell(); +pWrtShell->InsertContentControl(SwContentControlType::DATE); +pWrtShell->SelAll(); +OUString aSectionName = pWrtShell->GetUniqueSectionName(); +SwSectionData aSection(SectionType::Content, aSectionName); +aSection.SetProtectFlag(true); +pWrtShell->InsertSection(aSection); + +// When entering the content control: +pWrtShell->SttEndDoc(/*bStt=*/true); +pWrtShell->Right(CRSR_SKIP_CHARS, /*bSelect=*/false, 1, /*bBasicCall=*/false); + +// Then make sure that the cursor is read-only: +// Without the accompanying fix in place, this test would have failed, it was not possible to +// pick a date in a protected section (the new value was inserted, but the placeholder was not +// removed). +CPPUNIT_ASSERT(!pWrtShell->HasReadonlySel()); +} + CPPUNIT_PLUGIN_IMPLEMENT(); /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/core/crsr/pam.cxx b/sw/source/core/crsr/pam.cxx index 277af8905a07..b2b51958c6cb 100644 --- a/sw/source/core/crsr/pam.cxx +++ b/sw/source/core/crsr/pam.cxx @@ -763,6 +763,13 @@ bool SwPaM::HasReadonlySel( bool bFormView ) const { // Allow editing when the cursor/selection is fully inside of a legacy form field. bRet = !( pA != nullptr && !bAtStartA && !bAtStartB && pA == pB ); + +if (bRet && rDoc.GetEditShell()->CursorInsideContentControl()) +{ +// Also allow editing inside content controls in general, similar to form fields. +// Specific types will be disabled below. +bRet = false; +} } if (!bRet)
[Libreoffice-commits] core.git: wizards/source
wizards/source/scriptforge/SF_Exception.xba |4 wizards/source/scriptforge/SF_Root.xba | 14 wizards/source/scriptforge/po/ScriptForge.pot| 19 + wizards/source/scriptforge/po/en.po | 19 + wizards/source/scriptforge/python/scriptforge.py |4 wizards/source/sfdialogs/SF_Dialog.xba | 381 ++- wizards/source/sfdialogs/SF_DialogListener.xba | 92 + 7 files changed, 523 insertions(+), 10 deletions(-) New commits: commit 55477bf4fd3baa99f8b5d5686091d7613a1022c3 Author: Jean-Pierre Ledure AuthorDate: Wed Oct 12 16:09:11 2022 +0200 Commit: Jean-Pierre Ledure CommitDate: Wed Oct 12 17:52:59 2022 +0200 ScriptForge - (SF_Dialog) new SetPageManager method The SetPageManager() method Define how the dialog displays pages. The page manager is an alternative to the direct use of the Page property of the dialog and dialogcontrol objects. The arguments define which controls are involved in the orchestration of the displayed pages. Possible options: - select a value in a list- or combobox - select an item in a group of radio buttons - select a button linked to a page placed side-by-side the buttons can simulate a tabbed interface - press a NEXT or BACK button like in many wizards Those options may be combined. The control updates will be synchronized. The method will set the actual page number to 1. Afterwards the Page property may be used to display any other page The SetPageManager() method is to be run only once and before the Execute() statement. If invoked several times, subsequent calls will be ignored. The method will define new listeners on the concerned controls, addressing generic routines. The corresponding events will be fired during the dialog execution. Preset events (in the Basic IDE) will be preserved and executed immediately AFTER the page change. The listeners will be removed at dialog termination. The implementation has next parts: 1. Store the arguments in the Dialog instance 2. Set appropriate listeners on involved controls 3. Page change synchronizes the values in the involved controls (be it by user code or by page manager) 4. Events triggered by listeners change page number The method is available both in Basic and Python contexts. This commit require the Dialog help page to be updated. Change-Id: I00a0212414f283102c73de4ceb488aa1aeddf746 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141257 Tested-by: Jean-Pierre Ledure Reviewed-by: Jean-Pierre Ledure Tested-by: Jenkins diff --git a/wizards/source/scriptforge/SF_Exception.xba b/wizards/source/scriptforge/SF_Exception.xba index 572b0fb950a6..f752e054f2b5 100644 --- a/wizards/source/scriptforge/SF_Exception.xba +++ b/wizards/source/scriptforge/SF_Exception.xba @@ -125,6 +125,7 @@ Const DIALOGNOTFOUNDERROR = "DIALOGNOTFOUNDERROR" Const DIALOGDEADERROR = "DIALOGDEADERROR" Const CONTROLTYPEERROR = "CONTROLTYPEERROR" Const TEXTFIELDERROR = "TEXTFIELDERROR" +Const PAGEMANAGERERROR = "PAGEMANAGERERROR" ' SF_Database Const DBREADONLYERROR = "DBREADONLYERROR" @@ -1020,6 +1021,9 @@ Try: Case TEXTFIELDERROR ' SF_DialogControl.WriteLine(ControlName, DialogName) sMessage = sLocation _ & "\n" & "\n" & .GetText("TEXTFIELD", pvArgs(0), pvArgs(1)) + Case PAGEMANAGERERROR ' SF_Dialog.SetPageManager(PilotsList, TabsList, WizardsList) + sMessage = sLocation _ + & "\n" & "\n" & .GetText("PAGEMANAGER", pvArgs(0), pvArgs(1), pvArgs(2), pvArgs(3), pvArgs(4), pvArgs(5)) Case DBREADONLYERROR' SF_Database.RunSql() sMessage = sLocation _ & "\n" & "\n" & .GetText("DBREADONLY", vLocation(2)) diff --git a/wizards/source/scriptforge/SF_Root.xba b/wizards/source/scriptforge/SF_Root.xba index 4db0efb42c1d..8c9a0dbcf6be 100644 --- a/wizards/source/scriptforge/SF_Root.xba +++ b/wizards/source/scriptforge/SF_Root.xba @@ -991,6 +991,20 @@ Try: & "%1: An identifier\n" _ & "%2: An identifier" _ ) + ' SF_Dialog.SetPageManager + .AddText( Context := "PAGEMANAGER" _ + , MsgId := "The Page Manager could not be setup due to inconsistent arguments.\n\n" _ +
[Libreoffice-commits] core.git: Branch 'distro/collabora/co-22.05' - external/freetype
external/freetype/ExternalPackage_freetype.mk| 16 external/freetype/ExternalProject_freetype.mk|5 + external/freetype/Module_freetype.mk |1 - external/freetype/UnpackedTarball_freetype.mk|1 - external/freetype/libfreetype-bundled-soname.patch.0 | 11 --- 5 files changed, 1 insertion(+), 33 deletions(-) New commits: commit dd522fc58e37b149c7e31bad931e82b72c9f4db5 Author: Tor Lillqvist AuthorDate: Wed Oct 12 17:22:30 2022 +0300 Commit: Tor Lillqvist CommitDate: Wed Oct 12 17:34:54 2022 +0200 No need to build bundled freetype as shared even with the fd hack Change-Id: I1aea8ecf55aafbcb68d2cd99f57756d18bc2c4d1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141258 Tested-by: Jenkins CollaboraOffice Reviewed-by: Tor Lillqvist diff --git a/external/freetype/ExternalPackage_freetype.mk b/external/freetype/ExternalPackage_freetype.mk deleted file mode 100644 index 4709c60415c0.. --- a/external/freetype/ExternalPackage_freetype.mk +++ /dev/null @@ -1,16 +0,0 @@ -# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*- -# -# This file is part of the LibreOffice project. -# -# This Source Code Form is subject to the terms of the Mozilla Public -# License, v. 2.0. If a copy of the MPL was not distributed with this -# file, You can obtain one at http://mozilla.org/MPL/2.0/. -# - -$(eval $(call gb_ExternalPackage_ExternalPackage,freetype,freetype)) - -$(eval $(call gb_ExternalPackage_use_external_project,freetype,freetype)) - -$(eval $(call gb_ExternalPackage_add_file,freetype,$(LIBO_LIB_FOLDER)/libfreetype-lo.so.6.18.0,instdir/lib/libfreetype-lo.so.6.18.0)) - -# vim: set noet sw=4 ts=4: diff --git a/external/freetype/ExternalProject_freetype.mk b/external/freetype/ExternalProject_freetype.mk index 8cf533d8dfb4..4cb2920ae923 100644 --- a/external/freetype/ExternalProject_freetype.mk +++ b/external/freetype/ExternalProject_freetype.mk @@ -17,10 +17,7 @@ $(call gb_ExternalProject_get_state_target,freetype,build) : $(call gb_Trace_StartRange,freetype,EXTERNAL) $(call gb_ExternalProject_run,build,\ $(gb_RUN_CONFIGURE) ./configure \ - $(if $(filter LINUX,$(OS)), \ - --disable-static, \ - --disable-shared \ - ) \ + --disable-shared \ --with-pic \ --without-zlib \ --without-brotli \ diff --git a/external/freetype/Module_freetype.mk b/external/freetype/Module_freetype.mk index 8552511e1674..290014c47dfd 100644 --- a/external/freetype/Module_freetype.mk +++ b/external/freetype/Module_freetype.mk @@ -12,7 +12,6 @@ $(eval $(call gb_Module_Module,freetype)) $(eval $(call gb_Module_add_targets,freetype,\ ExternalProject_freetype \ UnpackedTarball_freetype \ - $(if $(filter LINUX,$(OS)),ExternalPackage_freetype) \ )) # vim: set noet sw=4 ts=4: diff --git a/external/freetype/UnpackedTarball_freetype.mk b/external/freetype/UnpackedTarball_freetype.mk index c4c2da5a28fa..0b521cb934d0 100644 --- a/external/freetype/UnpackedTarball_freetype.mk +++ b/external/freetype/UnpackedTarball_freetype.mk @@ -14,7 +14,6 @@ $(eval $(call gb_UnpackedTarball_set_tarball,freetype,$(FREETYPE_TARBALL),,freet $(eval $(call gb_UnpackedTarball_add_patches,freetype,\ external/freetype/freetype-2.6.5.patch.1 \ external/freetype/freetype-fd-hack.patch.0 \ - external/freetype/libfreetype-bundled-soname.patch.0 \ )) # vim: set noet sw=4 ts=4: diff --git a/external/freetype/libfreetype-bundled-soname.patch.0 b/external/freetype/libfreetype-bundled-soname.patch.0 deleted file mode 100644 index 5b864be562b8.. --- a/external/freetype/libfreetype-bundled-soname.patch.0 +++ /dev/null @@ -1,11 +0,0 @@ -# -*- Mode: Diff -*- builds/unix/unix-cc.in -+++ builds/unix/unix-cc.in -@@ -123,6 +123,7 @@ - LINK_LIBRARY = $(LIBTOOL) --mode=link $(CCraw) -o $@ $(OBJECTS_LIST) \ - -rpath $(libdir) -version-info $(version_info) \ - $(LDFLAGS) -no-undefined \ -+ -release lo -Wl,-soname -Wl,libfreetype-lo.so.6.18.0 \ - -export-symbols $(EXPORTS_LIST) - - # EOF
[Libreoffice-commits] core.git: vcl/source
vcl/source/rendercontext/drawmode.cxx |8 1 file changed, 4 insertions(+), 4 deletions(-) New commits: commit d6a5431b5ef369823e4438a34767bf6c234eb231 Author: Caolán McNamara AuthorDate: Wed Oct 12 10:21:13 2022 +0100 Commit: Caolán McNamara CommitDate: Wed Oct 12 17:02:58 2022 +0200 use WindowTextColor as the fg for high contrast No platform sets TextColor away from its default of black and we're using WindowColor as the bg for high contrast, so we need to use something suitable for use on WindowColor. MSDN docs state COLOR_WINDOWTEXT for HighContrast if using COLOR_WINDOW. Change-Id: Icdd3cf6d76da7eb544f08619717689b44ab1fd38 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141247 Tested-by: Jenkins Reviewed-by: Caolán McNamara diff --git a/vcl/source/rendercontext/drawmode.cxx b/vcl/source/rendercontext/drawmode.cxx index b1b85d33f52f..fe0a1660acd5 100644 --- a/vcl/source/rendercontext/drawmode.cxx +++ b/vcl/source/rendercontext/drawmode.cxx @@ -53,7 +53,7 @@ Color GetLineColor(Color const& rColor, DrawModeFlags nDrawMode, } else if (nDrawMode & DrawModeFlags::SettingsLine) { -aColor = rStyleSettings.GetFontColor(); +aColor = rStyleSettings.GetWindowTextColor(); } } } @@ -119,7 +119,7 @@ Color GetHatchColor(Color const& rColor, DrawModeFlags nDrawMode, } else if (nDrawMode & DrawModeFlags::SettingsLine) { -aColor = rStyleSettings.GetFontColor(); +aColor = rStyleSettings.GetWindowTextColor(); } return aColor; @@ -149,7 +149,7 @@ Color GetTextColor(Color const& rColor, DrawModeFlags nDrawMode, } else if (nDrawMode & DrawModeFlags::SettingsText) { -aColor = rStyleSettings.GetFontColor(); +aColor = rStyleSettings.GetWindowTextColor(); } } @@ -183,7 +183,7 @@ vcl::Font GetFont(vcl::Font const& rFont, DrawModeFlags nDrawMode, } else if (nDrawMode & DrawModeFlags::SettingsText) { -aTextColor = rStyleSettings.GetFontColor(); +aTextColor = rStyleSettings.GetWindowTextColor(); } aFont.SetColor(aTextColor);
[Libreoffice-commits] core.git: cui/inc cui/Library_cui.mk cui/source cui/uiconfig cui/UIConfig_cui.mk desktop/source include/linguistic include/sfx2 include/svtools include/svx include/vcl linguistic
cui/Library_cui.mk |1 cui/UIConfig_cui.mk |1 cui/inc/treeopt.hrc |3 cui/source/options/optdeepl.cxx | 53 ++ cui/source/options/optdeepl.hxx | 37 + cui/source/options/treeopt.cxx |2 cui/uiconfig/ui/deepltabpage.ui | 124 + desktop/source/lib/init.cxx | 24 + include/linguistic/translate.hxx|9 include/sfx2/pageids.hxx|1 include/sfx2/sfxsids.hrc|1 include/svtools/deeplcfg.hxx| 50 ++ include/svx/svxids.hrc |2 include/vcl/htmltransferable.hxx| 51 ++ linguistic/Library_lng.mk |2 linguistic/source/translate.cxx | 71 +++ officecfg/registry/data/org/openoffice/Office/UI/WriterCommands.xcu |8 officecfg/registry/schema/org/openoffice/Office/Linguistic.xcs | 22 + svtools/Library_svt.mk |1 svtools/source/config/deeplcfg.cxx | 124 + svx/sdi/svx.sdi | 17 sw/Library_sw.mk|1 sw/Library_swui.mk |2 sw/UIConfig_swriter.mk |1 sw/inc/strings.hrc |1 sw/inc/swabstdlg.hxx| 13 sw/sdi/_textsh.sdi |6 sw/source/ui/dialog/swdlgfact.cxx | 12 sw/source/ui/dialog/swdlgfact.hxx | 14 sw/source/ui/misc/translatelangselect.cxx | 153 +++ sw/source/uibase/inc/translatehelper.hxx| 42 ++ sw/source/uibase/inc/translatelangselect.hxx| 69 +++ sw/source/uibase/shells/textsh1.cxx | 29 + sw/source/uibase/shells/translatehelper.cxx | 208 ++ sw/uiconfig/sglobal/menubar/menubar.xml |2 sw/uiconfig/swriter/menubar/menubar.xml |2 sw/uiconfig/swriter/ui/translationdialog.ui | 104 + vcl/Library_vcl.mk |1 vcl/jsdialog/enabled.cxx|1 vcl/source/app/htmltransferable.cxx | 78 +++ 40 files changed, 1341 insertions(+), 2 deletions(-) New commits: commit e20d2de7836da52dbf9e528d1043b1e188097bfd Author: Mert Tumer AuthorDate: Tue Jul 5 12:03:27 2022 +0300 Commit: Miklos Vajna CommitDate: Wed Oct 12 16:52:03 2022 +0200 new uno command uno:Translate with deepl api New Uno command added for translation right now it is only using deepl translation api There's a section in the options > language settings for setting up the api url and auth key uno:Translate is a menu button under Format tab which will bring up Language Selection dialog for translation. DeepL can accept html as the input for translation, this new feature leverages that by exporting paragraphs/selections to html and paste them back without losing the formatting (in theory) This works good in general but we may lose formatting in very complex styled sentences. Translation works in two ways; 1) Whole document when there is no selection, it assumes that we want to translate whole document. Each paragraphs is sent one by one so that the output timeout can be minimum for each paragraph. 2) Selection Change-Id: Ia2d3ab2f6757faf565b939e1d670a7dedac33390 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140624 Tested-by: Jenkins Reviewed-by: Miklos Vajna diff --git a/cui/Library_cui.mk b/cui/Library_cui.mk index cb26653b395d..5918be60972c 100644 --- a/cui/Library_cui.mk +++ b/cui/Library_cui.mk @@ -188,6 +188,7 @@ $(eval $(call gb_Library_add_exception_objects,cui,\ cui/source/options/optgenrl \ cui/source/options/opthtml \ cui/source/options/optlanguagetool \ +cui/source/options/optdeepl \ cui/source/options/optinet2 \ cui/source/options/optjava \ cui/source/options/optjsearch \ diff --git
[Libreoffice-commits] core.git: Branch 'libreoffice-7-3' - oox/source
oox/source/vml/vmlinputstream.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 93ed0bc5ffbf48367923b42ecf9d4913f20d9460 Author: Caolán McNamara AuthorDate: Tue Oct 11 15:10:43 2022 +0100 Commit: Xisco Fauli CommitDate: Wed Oct 12 15:58:46 2022 +0200 vml whitespace-check mangled Částečně to ste n Change-Id: Ib77ca39a5e17c7fb27c8d5204120fb261b885f16 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141185 Tested-by: Jenkins Reviewed-by: Xisco Fauli (cherry picked from commit eac884bc84327621498ca2fb9a2a3d67d49d5c91) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141189 diff --git a/oox/source/vml/vmlinputstream.cxx b/oox/source/vml/vmlinputstream.cxx index 93204ac50710..4f94207619f2 100644 --- a/oox/source/vml/vmlinputstream.cxx +++ b/oox/source/vml/vmlinputstream.cxx @@ -42,7 +42,7 @@ const char* lclFindCharacter( const char* pcBeg, const char* pcEnd, char cChar ) bool lclIsWhiteSpace( char cChar ) { -return cChar <= 32; +return cChar >= 0 && cChar <= 32; } const char* lclFindWhiteSpace( const char* pcBeg, const char* pcEnd )
[Libreoffice-commits] core.git: sw/qa
sw/qa/extras/ww8export/ww8export.cxx | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) New commits: commit d75f27fd738eeb2c7dc6d22f198d55d3a877aa0b Author: Stephan Bergmann AuthorDate: Wed Oct 12 14:47:06 2022 +0200 Commit: Stephan Bergmann CommitDate: Wed Oct 12 15:52:42 2022 +0200 Fix apparently-dangling pointer After 001de7e21d29fccff904fe23de05afd68922fe2e, CppunitTest_sw_ww8export CPPUNIT_TEST_NAME=testTdf94386::TestBody started to fail with > svl/source/items/itemset.cxx:176:42: runtime error: member call on address 0x60400083cbd0 which does not point to an object of type 'SfxItemPool' > 0x60400083cbd0: note: object has invalid vptr > 00 00 00 00 b0 6e 02 00 00 00 00 00 00 00 00 00 be be be be 40 44 b1 05 e1 7f 00 00 00 00 00 00 > ^~~ > invalid vptr > #0 in SfxItemSet::~SfxItemSet() at svl/source/items/itemset.cxx:176:42 > #1 in testTdf94386::TestBody() at sw/qa/extras/ww8export/ww8export.cxx:1555:1 Change-Id: I6dff915866a4e7d1250b253e53061e5646aebf15 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141253 Reviewed-by: Miklos Vajna Tested-by: Jenkins diff --git a/sw/qa/extras/ww8export/ww8export.cxx b/sw/qa/extras/ww8export/ww8export.cxx index 22b71281d1f1..d7b86e0d0d14 100644 --- a/sw/qa/extras/ww8export/ww8export.cxx +++ b/sw/qa/extras/ww8export/ww8export.cxx @@ -1523,10 +1523,12 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf94386) // emulate the behavior from tdf#94386 - insert an envelope to the // document -SfxItemSet aSet(pWrtShell->GetView().GetCurShell()->GetPool(), svl::Items); -aSet.Put(SwEnvItem()); -SfxRequest aRequest(FN_ENVELOP, SfxCallMode::SYNCHRON, aSet); -SW_MOD()->ExecOther(aRequest); +{ +SfxItemSet aSet(pWrtShell->GetView().GetCurShell()->GetPool(), svl::Items); +aSet.Put(SwEnvItem()); +SfxRequest aRequest(FN_ENVELOP, SfxCallMode::SYNCHRON, aSet); +SW_MOD()->ExecOther(aRequest); +} reload(mpFilter, "tdf94386.odt"); // check that the first and next page use different page styles
[Libreoffice-commits] core.git: sw/source
sw/source/core/undo/undel.cxx |3 --- 1 file changed, 3 deletions(-) New commits: commit 1d76a3dfea5d842d99447e094a3c1c1f9249335b Author: Noel Grandin AuthorDate: Wed Oct 12 13:14:47 2022 +0200 Commit: Noel Grandin CommitDate: Wed Oct 12 15:32:55 2022 +0200 this adjust not necessary rPaM's nNode and nContent is already kept in sync here Change-Id: Ic79bcf8f950767885e117848475ccbebc4f6537e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141251 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/sw/source/core/undo/undel.cxx b/sw/source/core/undo/undel.cxx index 15088959db00..b3026c1c375f 100644 --- a/sw/source/core/undo/undel.cxx +++ b/sw/source/core/undo/undel.cxx @@ -432,9 +432,6 @@ SwUndoDelete::SwUndoDelete( m_nNdDiff -= rPam.GetPoint()->GetNodeIndex(); } -if( !rPam.GetPointNode().IsContentNode() ) -rPam.GetPoint()->nContent.Assign( nullptr, 0 ); - // is a history necessary here at all? if( m_pHistory && !m_pHistory->Count() ) m_pHistory.reset();
[Libreoffice-commits] core.git: filter/source
filter/source/msfilter/msvbahelper.cxx | 17 +++-- 1 file changed, 15 insertions(+), 2 deletions(-) New commits: commit 1e0306be6c3a3bc50f11e7c7814aa8a029f8928d Author: Justin Luth AuthorDate: Tue Oct 11 21:42:21 2022 -0400 Commit: Justin Luth CommitDate: Wed Oct 12 15:24:28 2022 +0200 tdf#148806 vba: IsCompiled is required for SbxFlagBits::Private Two step approach: -putting this here where I need it - fairly targeted. -put it in FindMethod before returning, so that everything gets it in a valid state. Of course the second will probably cause consternations, but then when it gets reverted at least this will still work. Change-Id: I8772f85c9b9ae6ed9a25ba7966b50519afe0d6ef Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141243 Tested-by: Jenkins Reviewed-by: Justin Luth diff --git a/filter/source/msfilter/msvbahelper.cxx b/filter/source/msfilter/msvbahelper.cxx index c7e84138f8dd..923aecb9c3dd 100644 --- a/filter/source/msfilter/msvbahelper.cxx +++ b/filter/source/msfilter/msvbahelper.cxx @@ -205,6 +205,11 @@ static bool hasMacro(SfxObjectShell const* pShell, const OUString& sLibrary, OUS if (!pModule) return false; SbMethod* pMeth = pModule->FindMethod(sMacro, SbxClassType::Method); + +// Must be compiled before we can trust SbxFlagBits::Private +if (pMeth && bOnlyPublic && !pModule->IsCompiled()) +pModule->Compile(); + return pMeth && (!bOnlyPublic || !pMeth->IsSet(SbxFlagBits::Private)); } @@ -213,9 +218,17 @@ static bool hasMacro(SfxObjectShell const* pShell, const OUString& sLibrary, OUS SbMethod* pMeth = rModuleRef->FindMethod(sMacro, SbxClassType::Method); if (pMeth) { -if ((bOnlyPublic && pMeth->IsSet(SbxFlagBits::Private)) -|| rModuleRef->GetName() == sSkipModule) +if (rModuleRef->GetName() == sSkipModule) continue; + +if (bOnlyPublic) +{ +if (!rModuleRef->IsCompiled()) +rModuleRef->Compile(); + +if (pMeth->IsSet(SbxFlagBits::Private)) +continue; +} sMod = rModuleRef->GetName(); return true; }
[Libreoffice-commits] core.git: Branch 'distro/collabora/co-22.05' - configure.ac desktop/source distro-configs/CPLinux-LOKit.conf external/cairo external/fontconfig external/freetype external/harfbuz
configure.ac | 53 desktop/source/lib/init.cxx | 20 +++ distro-configs/CPLinux-LOKit.conf|4 external/cairo/ExternalPackage_cairo.mk |3 external/cairo/UnpackedTarball_cairo.mk |2 external/cairo/cairo/cairo-fd-hack.patch.0 | 15 ++ external/cairo/cairo/libcairo-bundled-soname.patch.0 | 12 ++ external/fontconfig/ExternalPackage_fontconfig.mk| 16 ++ external/fontconfig/ExternalProject_fontconfig.mk| 15 ++ external/fontconfig/Module_fontconfig.mk |1 external/fontconfig/UnpackedTarball_fontconfig.mk|1 external/fontconfig/libfontconfig-bundled-soname.patch.0 | 11 + external/freetype/ExternalPackage_freetype.mk| 16 ++ external/freetype/ExternalProject_freetype.mk|5 external/freetype/Module_freetype.mk |1 external/freetype/UnpackedTarball_freetype.mk|2 external/freetype/freetype-fd-hack.patch.0 | 53 external/freetype/libfreetype-bundled-soname.patch.0 | 11 + external/harfbuzz/UnpackedTarball_harfbuzz.mk|3 external/harfbuzz/harfbuzz-fd-hack.patch.0 | 24 vcl/source/fontsubset/sft.cxx| 23 +++ vcl/unx/generic/fontmanager/fontmanager.cxx | 90 --- vcl/unx/generic/glyphs/freetype_glyphcache.cxx | 13 ++ 23 files changed, 345 insertions(+), 49 deletions(-) New commits: commit 2def5485aa57d7c407a84ecc73b22083579e9a98 Author: Tor Lillqvist AuthorDate: Tue Sep 20 16:07:14 2022 +0300 Commit: Tor Lillqvist CommitDate: Wed Oct 12 14:21:18 2022 +0200 Enable opening of downloaded fonts only in ForKit in Online (This is the second attempt at this, I had to revert the first one as it broke desktop Collabora Office.) We want that only the ForKit process needs to have access to new font files added to a Collabora Online instance dynamically by downloading from a server. There are however many locations in the Kit process, in core and in external libraries like harfbuzz, where the code wants to open a font file. Handle this so that the ForKit process opens such a downloaded font file and doesn't close it. The file descriptor is thus inherited by Kit processes. The font file pathname passed on to other code is a fake on in the format "/:FD:/%d" where the %d is the file descriptor of the opened font file. Add checks in all places where font files are opened, look for this special pathname format, and modify the code to just dup() the already open file descriptor in that case. All this is relevant for Linux only, as Collabora Online runs on Linux. Do the above for harfbuzz, cairo, fontconfig, and freetype. In addition make sure that these libraries (except harfbuzz which needs to be a static library) when bundled, on Linux, are built as shared libraries, and won't be confused with the corresponding system libraries by making sure their sonames are different. Change-Id: Ib059cb27e1637d07bb709249abd0d984f948caa9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140714 Tested-by: Jenkins CollaboraOffice Reviewed-by: Tor Lillqvist diff --git a/configure.ac b/configure.ac index 65126c1caee5..5d650956063d 100644 --- a/configure.ac +++ b/configure.ac @@ -4478,6 +4478,18 @@ if test -n "$enable_dbgutil" -a "$enable_dbgutil" != "no"; then AC_MSG_ERROR([--with-system-graphite conflicts with --enable-dbgutil]) else with_system_graphite=no +if test -z "$with_system_harfbuzz"; then +with_system_harfbuzz=no +fi +if test -z "$with_system_cairo"; then +with_system_cairo=no +fi +if test -z "$with_system_fontconfig"; then +with_system_fontconfig=no +fi +if test -z "$with_system_freetype"; then +with_system_freetype=no +fi fi if test "$with_system_orcus" = "yes"; then AC_MSG_ERROR([--with-system-orcus conflicts with --enable-dbgutil]) @@ -10775,13 +10787,27 @@ AC_SUBST(SYSTEM_LIBORCUS) dnl === dnl HarfBuzz dnl === -libo_CHECK_SYSTEM_MODULE([graphite],[GRAPHITE],[graphite2 >= 0.9.3], +case "$_os" in +Linux) +libo_CHECK_SYSTEM_MODULE([graphite],[GRAPHITE],[graphite2 >= 0.9.3], + ["-I${WORKDIR}/UnpackedTarball/graphite/include -DGRAPHITE2_STATIC"], + ["-L${WORKDIR}/LinkTarget/StaticLibrary -lgraphite"], + TRUE) +libo_CHECK_SYSTEM_MODULE([harfbuzz],[HARFBUZZ],[harfbuzz-icu >=
[Libreoffice-commits] core.git: sw/qa sw/source
sw/qa/core/crsr/crsr.cxx| 23 +++ sw/source/core/crsr/pam.cxx |7 +++ 2 files changed, 30 insertions(+) New commits: commit b138d6c12aaeb0b87dce15ea52dd134cf1abf6ac Author: Miklos Vajna AuthorDate: Wed Oct 12 11:44:49 2022 +0200 Commit: Miklos Vajna CommitDate: Wed Oct 12 13:55:45 2022 +0200 tdf#151190 sw content controls: make them read-write in protected sections When the user picked a date in the date picker inside a protected section, then we blocked the deletion of the placeholder, but allowed insertion to the content control, which is inconsistent. The trouble was that SwPaM::HasReadonlySel() detected that the cursor is in a protected section, so deletion failed, leading to an ever growing value of the content control. Fix the problem by handling content controls similar to legacy form fields: if the cursor is inside a content control, then that value is editable, even if we're inside a protected section. This is meant to fix all content control types, not just date pickers. Change-Id: I9eca4c4f71dcfaa61d84414f7727adcd4496735c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141249 Reviewed-by: Miklos Vajna Tested-by: Jenkins diff --git a/sw/qa/core/crsr/crsr.cxx b/sw/qa/core/crsr/crsr.cxx index 243abd0e20d1..eba0ac114b47 100644 --- a/sw/qa/core/crsr/crsr.cxx +++ b/sw/qa/core/crsr/crsr.cxx @@ -202,6 +202,29 @@ CPPUNIT_TEST_FIXTURE(SwCoreCrsrTest, testDropdownContentControl) CPPUNIT_ASSERT(pWrtShell->HasReadonlySel()); } +CPPUNIT_TEST_FIXTURE(SwCoreCrsrTest, testContentControlProtectedSection) +{ +// Given a document with a date content control in a protected section: +SwDoc* pDoc = createSwDoc(); +SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell(); +pWrtShell->InsertContentControl(SwContentControlType::DATE); +pWrtShell->SelAll(); +OUString aSectionName = pWrtShell->GetUniqueSectionName(); +SwSectionData aSection(SectionType::Content, aSectionName); +aSection.SetProtectFlag(true); +pWrtShell->InsertSection(aSection); + +// When entering the content control: +pWrtShell->SttEndDoc(/*bStt=*/true); +pWrtShell->Right(SwCursorSkipMode::Chars, /*bSelect=*/false, 1, /*bBasicCall=*/false); + +// Then make sure that the cursor is read-only: +// Without the accompanying fix in place, this test would have failed, it was not possible to +// pick a date in a protected section (the new value was inserted, but the placeholder was not +// removed). +CPPUNIT_ASSERT(!pWrtShell->HasReadonlySel()); +} + CPPUNIT_PLUGIN_IMPLEMENT(); /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/core/crsr/pam.cxx b/sw/source/core/crsr/pam.cxx index 9e1e33d8a2b4..9295b09a7480 100644 --- a/sw/source/core/crsr/pam.cxx +++ b/sw/source/core/crsr/pam.cxx @@ -917,6 +917,13 @@ bool SwPaM::HasReadonlySel(bool bFormView, bool const isReplace) const { // Allow editing when the cursor/selection is fully inside of a legacy form field. bRet = !( pA != nullptr && !bAtStartA && !bAtStartB && pA == pB ); + +if (bRet && rDoc.GetEditShell()->CursorInsideContentControl()) +{ +// Also allow editing inside content controls in general, similar to form fields. +// Specific types will be disabled below. +bRet = false; +} } if (!bRet)
[Libreoffice-commits] core.git: sw/source
sw/source/filter/ww8/docxattributeoutput.cxx |3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) New commits: commit cd79fbd624679f68662177fa25ebdfeaf7b2d3be Author: Caolán McNamara AuthorDate: Wed Oct 12 11:15:58 2022 +0100 Commit: Caolán McNamara CommitDate: Wed Oct 12 13:34:23 2022 +0200 cid#1515941 Dereference null return value Change-Id: Id6b191482c70a95d861ba771925570bc5992f534 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141250 Tested-by: Jenkins Reviewed-by: Caolán McNamara diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx index 73af98b6fac3..f2489186e9c5 100644 --- a/sw/source/filter/ww8/docxattributeoutput.cxx +++ b/sw/source/filter/ww8/docxattributeoutput.cxx @@ -2465,11 +2465,10 @@ void DocxAttributeOutput::WriteContentControlStart() const OUString& rPrefixMapping = m_pContentControl->GetDataBindingPrefixMappings(); const OUString& rXpath = m_pContentControl->GetDataBindingXpath(); -if (!rXpath.isEmpty()) +if (SwTextNode* pTextNode = !rXpath.isEmpty() ? m_pContentControl->GetTextNode() : nullptr) { // This content control has a data binding, update the data source. SwTextContentControl* pTextAttr = m_pContentControl->GetTextAttr(); -SwTextNode* pTextNode = m_pContentControl->GetTextNode(); SwPosition aPoint(*pTextNode, pTextAttr->GetStart()); SwPosition aMark(*pTextNode, *pTextAttr->GetEnd()); SwPaM aPam(aMark, aPoint);
[Libreoffice-commits] core.git: Branch 'distro/cib/libreoffice-6-4' - ucb/source
ucb/source/ucp/webdav-curl/CurlSession.cxx | 60 +++-- 1 file changed, 40 insertions(+), 20 deletions(-) New commits: commit c6df10ce7f91b3084255bfbbac95e865bbb3ce7b Author: Michael Stahl AuthorDate: Mon Oct 10 15:40:41 2022 +0200 Commit: Michael Stahl CommitDate: Wed Oct 12 11:25:40 2022 +0200 ucb: webdav-curl: try fallback authentication on 403 error Sharepoint reports lack of authentication with 403 status and additional X-MSDAVEXT_ERROR header value 0x000E0098. Try to fallback to NTLM auth in this case, if a first attempt with imported cookie didn't work. Note that the build config of libcurl on Linux is such that adding CURLAUTH_NEGOTIATE has no effect, but on WNT it causes the AuthMask to be ambiguous and prevents curl from trying NTLM. diff --git a/ucb/source/ucp/webdav-curl/CurlSession.cxx b/ucb/source/ucp/webdav-curl/CurlSession.cxx index cc0a2368784f..b698026d16b6 100644 --- a/ucb/source/ucp/webdav-curl/CurlSession.cxx +++ b/ucb/source/ucp/webdav-curl/CurlSession.cxx @@ -1380,29 +1380,38 @@ auto CurlProcessor::ProcessRequest( ProcessHeaders(headers.HeaderFields.back().first)); // X-MSDAVEXT_Error see [MS-WEBDAVE] 2.2.3.1.9 auto const it(headerMap.find("x-msdavext_error")); +if (it == headerMap.end() || !it->second.startsWith("917656;")) +{ +break; +} if (cookies.isEmpty() // retry only once - could be expired... -&& rSession.m_URI.GetScheme() == "https" // only encrypted -&& it != headerMap.end() -&& it->second.startsWith("917656;")) +&& rSession.m_URI.GetScheme() == "https") // only encrypted { -cookies = TryImportCookies(rSession.m_xContext, rSession.m_URI.GetHost()); +cookies += TryImportCookies(rSession.m_xContext, rSession.m_URI.GetHost()); if (!cookies.isEmpty()) { -CURLcode rc = curl_easy_setopt(rSession.m_pCurl.get(), CURLOPT_COOKIEFILE, ""); +CURLcode rc = curl_easy_setopt(rSession.m_pCurl.get(), + CURLOPT_COOKIEFILE, ""); assert(rc == CURLE_OK); -rc = curl_easy_setopt(rSession.m_pCurl.get(), CURLOPT_COOKIE, cookies.getStr()); +rc = curl_easy_setopt(rSession.m_pCurl.get(), CURLOPT_COOKIE, + cookies.getStr()); assert(rc == CURLE_OK); (void)rc; isRetry = true; +SAL_INFO("ucb.ucp.webdav.curl", "FedAuth cookie set"); +break; // try cookie once } } -break; +SAL_INFO("ucb.ucp.webdav.curl", "403 fallback authentication hack"); } +[[fallthrough]]; // SP, no cookie, or cookie failed: try NTLM case SC_UNAUTHORIZED: case SC_PROXY_AUTHENTICATION_REQUIRED: { -auto& rnAuthRequests(statusCode == SC_UNAUTHORIZED ? nAuthRequests - : nAuthRequestsProxy); +auto& rnAuthRequests(statusCode != SC_PROXY_AUTHENTICATION_REQUIRED + ? nAuthRequests + : nAuthRequestsProxy); if (rnAuthRequests == 10) { SAL_INFO("ucb.ucp.webdav.curl", "aborting authentication after " @@ -1410,22 +1419,32 @@ auto CurlProcessor::ProcessRequest( } else if (pEnv && pEnv->m_xAuthListener) { -::std::optional const oRealm(ExtractRealm( -headers, statusCode == SC_UNAUTHORIZED ? "WWW-Authenticate" - : "Proxy-Authenticate")); +::std::optional const oRealm( +ExtractRealm(headers, statusCode != SC_PROXY_AUTHENTICATION_REQUIRED + ? "WWW-Authenticate" + : "Proxy
[Libreoffice-commits] core.git: vcl/inc vcl/osx vcl/quartz vcl/skia
vcl/inc/osx/saldata.hxx|3 ++- vcl/inc/quartz/ctfonts.hxx |2 +- vcl/inc/quartz/salgdi.h|8 +--- vcl/osx/saldata.cxx|2 +- vcl/quartz/ctfonts.cxx | 12 +--- vcl/quartz/salgdi.cxx | 11 ++- vcl/skia/osx/gdiimpl.cxx |2 +- 7 files changed, 21 insertions(+), 19 deletions(-) New commits: commit 2e78c92dfeefc301b1cc69130433917c3e77bfdc Author: Noel Grandin AuthorDate: Mon Oct 3 16:00:11 2022 +0200 Commit: Noel Grandin CommitDate: Wed Oct 12 13:09:24 2022 +0200 use unique_ptr for SystemFontList, fix leak Using unique_ptr here fixes a leak, which in turn was hiding the fact that we don't manage the lifecycle of CTFontDescriptor in CoreTextFontFace properly Change-Id: I2ade5fae9a40ad0ebb10538488018941f3f285c0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140916 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/vcl/inc/osx/saldata.hxx b/vcl/inc/osx/saldata.hxx index e201f45715c2..ba4d6e8c856b 100644 --- a/vcl/inc/osx/saldata.hxx +++ b/vcl/inc/osx/saldata.hxx @@ -36,6 +36,7 @@ #include #include #include +#include #include #include #include @@ -68,7 +69,7 @@ public: SalObject*mpFirstObject;// pointer of first object window SalVirtualDevice *mpFirstVD;// first VirDev SalPrinter *mpFirstPrinter; // first printing printer -SystemFontList *mpFontList; +std::unique_ptr mpFontList; NSStatusItem* mpStatusItem; // one status item that draws all our statuses // at the moment this is only one add menu button CGColorSpaceRef mxRGBSpace; diff --git a/vcl/inc/quartz/ctfonts.hxx b/vcl/inc/quartz/ctfonts.hxx index 431385aeeda6..be68dea71c9a 100644 --- a/vcl/inc/quartz/ctfonts.hxx +++ b/vcl/inc/quartz/ctfonts.hxx @@ -23,7 +23,7 @@ #include #include -SystemFontList* GetCoretextFontList(); +std::unique_ptr GetCoretextFontList(); FontAttributes DevFontFromCTFontDescriptor(CTFontDescriptorRef, bool*); #endif // INCLUDED_VCL_INC_QUARTZ_CTFONTS_HXX diff --git a/vcl/inc/quartz/salgdi.h b/vcl/inc/quartz/salgdi.h index 0bf004033c52..5d2611f5b06e 100644 --- a/vcl/inc/quartz/salgdi.h +++ b/vcl/inc/quartz/salgdi.h @@ -61,11 +61,13 @@ class XorEmulation; class CoreTextFontFace : public vcl::font::PhysicalFontFace { public: -CoreTextFontFace( const FontAttributes&, sal_IntPtr nFontID ); +CoreTextFontFace( const FontAttributes&, CTFontDescriptorRef xRef ); virtual ~CoreTextFontFace() override; sal_IntPtr GetFontId() const override; +CTFontDescriptorRef GetFontDescriptorRef() const { return mxFontDescriptor; } + int GetFontTable( uint32_t nTagCode, unsigned char* ) const; rtl::Reference CreateFontInstance(const vcl::font::FontSelectPattern&) const override; @@ -73,7 +75,7 @@ public: virtual hb_blob_t* GetHbTable(hb_tag_t nTag) const override; private: -const sal_IntPtrmnFontId; +CTFontDescriptorRef mxFontDescriptor; }; class CoreTextStyle final : public LogicalFontInstance @@ -96,7 +98,7 @@ public: bool mbFauxBold; private: -explicit CoreTextStyle(const vcl::font::PhysicalFontFace&, const vcl::font::FontSelectPattern&); +explicit CoreTextStyle(const CoreTextFontFace&, const vcl::font::FontSelectPattern&); virtual void ImplInitHbFont(hb_font_t*) override; bool ImplGetGlyphBoundRect(sal_GlyphId, tools::Rectangle&, bool) const override; diff --git a/vcl/osx/saldata.cxx b/vcl/osx/saldata.cxx index d49df78d2ccf..e3b6703d0878 100644 --- a/vcl/osx/saldata.cxx +++ b/vcl/osx/saldata.cxx @@ -31,6 +31,7 @@ #include #include #include +#include #import "apple_remote/RemoteMainController.h" @@ -49,7 +50,6 @@ SalData::SalData() mpFirstObject( nullptr ), mpFirstVD( nullptr ), mpFirstPrinter( nullptr ), -mpFontList( nullptr ), mpStatusItem( nil ), mxRGBSpace( CGColorSpaceCreateWithName(kCGColorSpaceSRGB) ), mxGraySpace( CGColorSpaceCreateWithName(kCGColorSpaceGenericGrayGamma2_2) ), diff --git a/vcl/quartz/ctfonts.cxx b/vcl/quartz/ctfonts.cxx index 887abe4f2f35..298a5274aa1f 100644 --- a/vcl/quartz/ctfonts.cxx +++ b/vcl/quartz/ctfonts.cxx @@ -41,7 +41,7 @@ #include #include -CoreTextStyle::CoreTextStyle(const vcl::font::PhysicalFontFace& rPFF, const vcl::font::FontSelectPattern& rFSP) +CoreTextStyle::CoreTextStyle(const CoreTextFontFace& rPFF, const vcl::font::FontSelectPattern& rFSP) : LogicalFontInstance(rPFF, rFSP) , mfFontStretch(
[Libreoffice-commits] core.git: sw/source
sw/source/filter/html/swhtml.cxx |6 -- sw/source/filter/xml/xmlimp.cxx | 15 ++- 2 files changed, 14 insertions(+), 7 deletions(-) New commits: commit 7aa0d01818e6934d1bbb361b750a91204251b465 Author: Noel Grandin AuthorDate: Tue Oct 11 18:53:16 2022 +0200 Commit: Noel Grandin CommitDate: Wed Oct 12 12:39:15 2022 +0200 rearrange node logic here so we don't have to touch SwPosition.nContent. Part of the process of hiding the internals of SwPosition Change-Id: I797eec2b4ccb01360602f2f19ae4a7a51fe712fd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141235 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/sw/source/filter/html/swhtml.cxx b/sw/source/filter/html/swhtml.cxx index 364fa0a096c1..438f19829935 100644 --- a/sw/source/filter/html/swhtml.cxx +++ b/sw/source/filter/html/swhtml.cxx @@ -842,9 +842,11 @@ void SwHTMLParser::Continue( HtmlTokenId nToken ) } else if (pCurrentNd->GetText().isEmpty()) { -pPos->nContent.Assign( nullptr, 0 ); m_pPam->SetMark(); m_pPam->DeleteMark(); -m_xDoc->GetNodes().Delete( pPos->GetNode() ); +SwNode& rDelNode = pPos->GetNode(); +// move so we don't have a dangling SwContentIndex to the deleted node +m_pPam->GetPoint()->Adjust(SwNodeOffset(+1)); +m_xDoc->GetNodes().Delete( rDelNode ); m_pPam->Move( fnMoveBackward ); } } diff --git a/sw/source/filter/xml/xmlimp.cxx b/sw/source/filter/xml/xmlimp.cxx index f2bd52292b01..62263ce2737f 100644 --- a/sw/source/filter/xml/xmlimp.cxx +++ b/sw/source/filter/xml/xmlimp.cxx @@ -731,9 +731,12 @@ void SwXMLImport::endDocument() if( pCNd && pCNd->StartOfSectionIndex()+2 < pCNd->EndOfSectionIndex() ) { -pPaM->GetBound().nContent.Assign( nullptr, 0 ); -pPaM->GetBound(false).nContent.Assign( nullptr, 0 ); -pDoc->GetNodes().Delete( pPaM->GetPoint()->GetNode() ); +SwNode& rDelNode = pPaM->GetPoint()->GetNode(); +// move so we don't have a dangling SwContentIndex to the deleted node +pPaM->GetPoint()->Adjust(SwNodeOffset(+1)); +if (pPaM->HasMark()) +pPaM->GetMark()->Adjust(SwNodeOffset(+1)); +pDoc->GetNodes().Delete( rDelNode ); } } } @@ -768,9 +771,11 @@ void SwXMLImport::endDocument() } else if (pCurrNd->GetText().isEmpty()) { -pPos->nContent.Assign( nullptr, 0 ); pPaM->SetMark(); pPaM->DeleteMark(); -pDoc->GetNodes().Delete( pPos->GetNode() ); +SwNode& rDelNode = pPos->GetNode(); +// move so we don't have a dangling SwContentIndex to the deleted node +pPaM->GetPoint()->Adjust(SwNodeOffset(+1)); +pDoc->GetNodes().Delete( rDelNode ); pPaM->Move( fnMoveBackward ); } }
[Libreoffice-commits] core.git: svx/source
svx/source/sdr/overlay/overlaytools.cxx | 109 1 file changed, 55 insertions(+), 54 deletions(-) New commits: commit 950b2712e78e4c5015aff3762d78558be8a642bd Author: Caolán McNamara AuthorDate: Tue Oct 11 19:36:20 2022 +0100 Commit: Caolán McNamara CommitDate: Wed Oct 12 12:30:53 2022 +0200 tdf#150622 use a solid border instead of a hatch for high contrast to do less work for smoother scrolling, etc. Change-Id: I6584bbb18247420d9926bfa90acfbd6afe536c6a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141237 Tested-by: Jenkins Reviewed-by: Caolán McNamara diff --git a/svx/source/sdr/overlay/overlaytools.cxx b/svx/source/sdr/overlay/overlaytools.cxx index f36d6dacfca1..1ffaff464ce3 100644 --- a/svx/source/sdr/overlay/overlaytools.cxx +++ b/svx/source/sdr/overlay/overlaytools.cxx @@ -28,6 +28,7 @@ #include #include #include +#include #include #include #include @@ -297,65 +298,42 @@ sal_uInt32 OverlayStaticRectanglePrimitive::getPrimitive2DID() const if(!aInnerRange.isEmpty() && basegfx::fTools::more(getDiscreteUnit(), 0.0) && getTransparence() <= 1.0) { -basegfx::B2DRange aOuterRange(getObjectRange()); - -// grow/shrink inner/outer polygons -aOuterRange.grow(getDiscreteUnit() * getDiscreteGrow()); -aInnerRange.grow(getDiscreteUnit() * -getDiscreteShrink()); - -// convert to polygons -const double fFullGrow(getDiscreteGrow() + getDiscreteShrink()); -const double fRelativeRadiusX(fFullGrow / aOuterRange.getWidth()); -const double fRelativeRadiusY(fFullGrow / aOuterRange.getHeight()); -basegfx::B2DPolygon aOuterPolygon( -basegfx::utils::createPolygonFromRect( -aOuterRange, -fRelativeRadiusX, -fRelativeRadiusY)); -basegfx::B2DPolygon aInnerPolygon( -basegfx::utils::createPolygonFromRect( -aInnerRange)); - -// apply evtl. existing rotation -if(!basegfx::fTools::equalZero(getRotation())) +if (!Application::GetSettings().GetStyleSettings().GetHighContrastMode()) { -const basegfx::B2DHomMatrix aTransform(basegfx::utils::createRotateAroundPoint( -getObjectRange().getMinX(), getObjectRange().getMinY(), getRotation())); +basegfx::B2DRange aOuterRange(aInnerRange); +// grow/shrink inner/outer polygons +aOuterRange.grow(getDiscreteUnit() * getDiscreteGrow()); +aInnerRange.grow(getDiscreteUnit() * -getDiscreteShrink()); + +// convert to polygons +const double fFullGrow(getDiscreteGrow() + getDiscreteShrink()); +const double fRelativeRadiusX(fFullGrow / aOuterRange.getWidth()); +const double fRelativeRadiusY(fFullGrow / aOuterRange.getHeight()); +basegfx::B2DPolygon aOuterPolygon( +basegfx::utils::createPolygonFromRect( +aOuterRange, +fRelativeRadiusX, +fRelativeRadiusY)); +basegfx::B2DPolygon aInnerPolygon( +basegfx::utils::createPolygonFromRect( +aInnerRange)); + +// apply evtl. existing rotation +if(!basegfx::fTools::equalZero(getRotation())) +{ +const basegfx::B2DHomMatrix aTransform(basegfx::utils::createRotateAroundPoint( +getObjectRange().getMinX(), getObjectRange().getMinY(), getRotation())); -aOuterPolygon.transform(aTransform); -aInnerPolygon.transform(aTransform); -} +aOuterPolygon.transform(aTransform); +aInnerPolygon.transform(aTransform); +} -// create filled primitive -basegfx::B2DPolyPolygon aPolyPolygon; +// create filled primitive +basegfx::B2DPolyPolygon aPolyPolygon; -aPolyPolygon.append(aOuterPolygon); -aPolyPolygon.append(aInnerPolygon); +aPolyPolygon.append(aOuterPolygon); +aPolyPolygon.append(aInnerPolygon); - if(Application::GetSettings().GetStyleSettings().GetHighContrastMode()) -{ -// for high contrast, use hatch -const basegfx::BColor aHighContrastLineColor(Application::GetSettings().GetStyleSettings().GetFontColor().getBColor()); -con
[Libreoffice-commits] core.git: Branch 'distro/vector/vector-7.0' - svtools/source
svtools/source/misc/embedhlp.cxx | 35 ++- 1 file changed, 34 insertions(+), 1 deletion(-) New commits: commit e6bd705cd40bca59e3580354c4fc8f424674e697 Author: Miklos Vajna AuthorDate: Tue Oct 11 16:56:24 2022 +0200 Commit: Miklos Vajna CommitDate: Wed Oct 12 12:09:48 2022 +0200 tdf#151470 svtools: prevent storing broken graphic of embedded objects Updating the preview of the embedded PDF object in the bugdoc leads to Acrobat generating a new preview, we throw away the old one, write the new one to the document, and next time the document is opened, we can't parse it, so the preview is lost for the user. The reason for this seems to be that sometimes Acrobat generates a broken WMF: the first 4 bytes is 0x0002 (DISKMETAFILE from the MetafileType enum), but the next 4 bytes is 0x6f43, which means that the header size is 56966 bytes long, but the whole preview is 29291, so this WMF looks broken. Fix the problem by adding error handling before we insert the WMF we get from Acrobat as a graphic stream to the document storage: don't update the graphic stream if the data is something that can't be handled by VCL's graphic filters. svt::EmbeddedObjectRef::GetReplacement() has a similar error handling, which is why the preview only gets broken on document reload. No testcase, this only happens on Windows and only in case a problematic handler for PDF is installed, which is hard to test from 'make check'. (cherry picked from commit 0bd83ba4c40bd7c3ebd3f098421c23bc9ced7b9e) Change-Id: I9e1ce979e58a155fa5e72e31cd9ea38258bb8b6a diff --git a/svtools/source/misc/embedhlp.cxx b/svtools/source/misc/embedhlp.cxx index e329ccd9d14b..398c639a1125 100644 --- a/svtools/source/misc/embedhlp.cxx +++ b/svtools/source/misc/embedhlp.cxx @@ -647,7 +647,40 @@ std::unique_ptr EmbeddedObjectRef::GetGraphicStream( bool bUpdate ) co if(xStream.is()) { if (mpImpl->pContainer) - mpImpl->pContainer->InsertGraphicStream(xStream,mpImpl->aPersistName,mpImpl->aMediaType); +{ +bool bInsertGraphicStream = true; +uno::Reference xSeekable(xStream, uno::UNO_QUERY); +std::optional oPosition; +if (xSeekable.is()) +{ +oPosition = xSeekable->getPosition(); +} +if (bUpdate) +{ +std::unique_ptr pResult = utl::UcbStreamHelper::CreateStream(xStream); +if (pResult) +{ +GraphicFilter& rGF = GraphicFilter::GetGraphicFilter(); +Graphic aGraphic; +rGF.ImportGraphic(aGraphic, u"", *pResult); +if (aGraphic.IsNone()) +{ +// The graphic is not something we can understand, don't overwrite a +// potentially working previous graphic. +SAL_WARN("svtools.misc", "EmbeddedObjectRef::GetGraphicStream: failed to parse xStream"); +bInsertGraphicStream = false; +} +} +} +if (xSeekable.is() && oPosition.has_value()) +{ +xSeekable->seek(*oPosition); +} +if (bInsertGraphicStream) +{ + mpImpl->pContainer->InsertGraphicStream(xStream,mpImpl->aPersistName,mpImpl->aMediaType); +} +} std::unique_ptr pResult = ::utl::UcbStreamHelper::CreateStream( xStream ); if (pResult && bUpdate)
New Defects reported by Coverity Scan for LibreOffice
Hi, Please find the latest report on new defect(s) introduced to LibreOffice found with Coverity Scan. 1 new defect(s) introduced to LibreOffice found with Coverity Scan. New defect(s) Reported-by: Coverity Scan Showing 1 of 1 defect(s) ** CID 1515941: Null pointer dereferences (NULL_RETURNS) *** CID 1515941: Null pointer dereferences (NULL_RETURNS) /sw/source/filter/ww8/docxattributeoutput.cxx: 2473 in DocxAttributeOutput::WriteContentControlStart()() 2467 const OUString& rXpath = m_pContentControl->GetDataBindingXpath(); 2468 if (!rXpath.isEmpty()) 2469 { 2470 // This content control has a data binding, update the data source. 2471 SwTextContentControl* pTextAttr = m_pContentControl->GetTextAttr(); 2472 SwTextNode* pTextNode = m_pContentControl->GetTextNode(); >>> CID 1515941: Null pointer dereferences (NULL_RETURNS) >>> Dereferencing a pointer that might be "nullptr" "pTextAttr" when >>> calling "GetStart". 2473 SwPosition aPoint(*pTextNode, pTextAttr->GetStart()); 2474 SwPosition aMark(*pTextNode, *pTextAttr->GetEnd()); 2475 SwPaM aPam(aMark, aPoint); 2476 OUString aSnippet = aPam.GetText(); 2477 static sal_Unicode const aForbidden[] = { 2478 CH_TXTATR_BREAKWORD, To view the defects in Coverity Scan visit, https://u15810271.ct.sendgrid.net/ls/click?upn=HRESupC-2F2Czv4BOaCWWCy7my0P0qcxCbhZ31OYv50ypSs1kiFPuCn2xFdlMIFBirii0zZ9j2-2F9F2XPBcBm2BNgi9duPy3v-2FzgFDd2LJ-2BDKI-3DC9cT_OTq2XUZbbipYjyLSo6GRo-2FpVxQ9OzkDINu9UTS-2FQhSdO0F0jQniitrGlNxDIzPJitcZVeRuYkDfE0Zx0b2QLFdTyGUeB95ZYGU2apYdWN7i6yYkgwtwE7tq7yrRzK60SWFfLJ1ZjL-2Fp7fz9AsqjHKqLrfFS5L4YzNAtE-2B-2BfrPPqSbF-2F3Ep7DR9hD6lyofHBGSjs-2B1KMdAhUwcIfkXZ-2BPrIFFN2v-2Foc8WPjg63uPLyRs-3D
Re: high contrast accessibility application guidelines?
On Tue, 2022-10-11 at 15:20 +, Michael Weghorn wrote: > On 10/10/2022 22.02, Caolán McNamara wrote: > > > As far as I can see in impress/draw/shapes we ignore/force- > > highcontrast text color, line color and fill colors, and there's a > > certain logic to that. > > On the other hand in writer we do show the real text color and fill > > color in the normal document content, but do the opposite for > > shapes and for the content of frames. > > Is that with any explicit high-contrast settings either in the > desktop environment or OS (like a specific theme) or LibreOffice > explicitly applied? Yeah, this is with High Contrast applied. In GNOME from the desktop High Contrast selected from the a11y dropdown (which for me is black text on white background). Windows is similar. In impress, we seem to at least be attempting something like the reference Stuart mentioned: https://learn.microsoft.com/en-us/windows/win32/winauto/high-contrast-parameter "applications should do the following: Map all colors to a single pair of foreground and background colors. Use the GetSysColor function to determine the appropriate foreground and background colors, using either a combination of COLOR_WINDOWTEXT and COLOR_WINDOW or a combination of COLOR_BTNTEXT and COLOR_BTNFACE Omit any bitmapped images that would typically be displayed behind text. Such images are visually distracting to a user who needs high contrast. Images that would typically be drawn in multiple colors should be drawn using the foreground and background colors selected for text." If I assume that impress is basically on the right track, then this does reasonably describe what happens in impress in High Contrast, while things seem a bit more chaotic in writer (and calc) so I could assume that they're currently incorrect in showing text colors and custom bg colors. On the other hand, in Word (2013) table bg colors are shown even in High Contrast mode, but maybe that's a bug of its own. Unless there is some logic to excluding tables from the mono-color scheme. > In a quick test on Windows 10 (with an older LO master as of commit > 349e3af0c5dd5ed495ed61aab526f63c16f0e215), enabling "Use high > contrast" in the Windows settings results in unreadable text in > Impress in a new presentation (both, font and background use the same > dark color). That's with "High Contrast Black", will be fixed by https://gerrit.libreoffice.org/c/core/+/141247 things look a little more reasonable with "High Contrast White"
[Libreoffice-commits] core.git: Branch 'libreoffice-7-4' - icon-themes/sukapura icon-themes/sukapura_svg
icon-themes/sukapura/sfx2/res/menu.png |binary icon-themes/sukapura_svg/sfx2/res/menu.svg |2 +- 2 files changed, 1 insertion(+), 1 deletion(-) New commits: commit a0892b1e404bc6b691fb7f6ad3b7520925786734 Author: Rizal Muttaqin AuthorDate: Tue Oct 11 16:07:31 2022 +0700 Commit: Rizal Muttaqin CommitDate: Wed Oct 12 11:04:17 2022 +0200 tdf#151016 Fix paint hamburger icons in Start Center (Sukapura) Change-Id: Ibe49b50f23a560ad2635d835d4e204a5efd06439 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141209 Tested-by: Jenkins Reviewed-by: Rizal Muttaqin (cherry picked from commit 4b4160cb1aab3ab1ff8eec6b2736bf459afed408) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141188 Reviewed-by: Adolfo Jayme Barrientos diff --git a/icon-themes/sukapura/sfx2/res/menu.png b/icon-themes/sukapura/sfx2/res/menu.png index 5157a13b841f..f6601ccb68da 100644 Binary files a/icon-themes/sukapura/sfx2/res/menu.png and b/icon-themes/sukapura/sfx2/res/menu.png differ diff --git a/icon-themes/sukapura_svg/sfx2/res/menu.svg b/icon-themes/sukapura_svg/sfx2/res/menu.svg index 84d620a84095..85cac97ab5e5 100644 --- a/icon-themes/sukapura_svg/sfx2/res/menu.svg +++ b/icon-themes/sukapura_svg/sfx2/res/menu.svg @@ -1 +1 @@ -http://www.w3.org/2000/svg";>/> \ No newline at end of file +http://www.w3.org/2000/svg";>/> \ No newline at end of file
[Libreoffice-commits] core.git: embeddedobj/qa
embeddedobj/qa/cppunit/msole.cxx |9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) New commits: commit 7ad22252171f1e8c0ad65f0b9f8e38024f1e1bde Author: Noel Grandin AuthorDate: Tue Oct 11 20:57:35 2022 +0200 Commit: Noel Grandin CommitDate: Wed Oct 12 10:29:17 2022 +0200 try to make CppunitTest_embeddedobj_msole more reliable It sometimes crashes on windows. Switch to using the same tearDown() logic as UnoApiTest::closeDocument, which seems to be the most reliable variant of this kind of code. Change-Id: I1493d6d265763b2aec4ee94f4ee66378dbe280b6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141238 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/embeddedobj/qa/cppunit/msole.cxx b/embeddedobj/qa/cppunit/msole.cxx index c7ec2476f8a1..778186f01b55 100644 --- a/embeddedobj/qa/cppunit/msole.cxx +++ b/embeddedobj/qa/cppunit/msole.cxx @@ -15,6 +15,7 @@ #include #include #include +#include #include #include @@ -55,8 +56,12 @@ void Test::setUp() void Test::tearDown() { -if (mxComponent.is()) -mxComponent->dispose(); +if (mxComponent) +{ +uno::Reference xCloseable(mxComponent, css::uno::UNO_QUERY_THROW); +xCloseable->close(false); +mxComponent.clear(); +} test::BootstrapFixture::tearDown(); }
[Libreoffice-commits] core.git: sw/qa sw/source
sw/qa/extras/uiwriter/data/select-row.fodt | 33 + sw/qa/extras/uiwriter/uiwriter5.cxx| 27 +++ sw/source/core/crsr/trvltbl.cxx|4 +-- 3 files changed, 62 insertions(+), 2 deletions(-) New commits: commit 0140fd6501c2322cffddaaa14b49137009ffcae4 Author: László Németh AuthorDate: Tue Oct 11 14:10:37 2022 +0200 Commit: László Németh CommitDate: Wed Oct 12 10:16:49 2022 +0200 tdf#151478 sw: fix row/column selection at nested table Table->Select->Row (.uno:EntireRow) and Table->Select->Column (.uno:EntireColumn) didn't work, when the last cell of the row or column starts with a nested table. Change-Id: I31e2fdebb226911921fb727f58c03101c01a07b6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141224 Tested-by: László Németh Reviewed-by: László Németh diff --git a/sw/qa/extras/uiwriter/data/select-row.fodt b/sw/qa/extras/uiwriter/data/select-row.fodt new file mode 100644 index ..1493a4f54a3a --- /dev/null +++ b/sw/qa/extras/uiwriter/data/select-row.fodt @@ -0,0 +1,33 @@ + + +http://openoffice.org/2004/writer"; office:version="1.2" office:mimetype="application/vnd.oasis.opendocument.text"> + + + + + + + + a1 + + + + + + + + nested-a1 + + + nested-b1 + + + + + + + + + + + diff --git a/sw/qa/extras/uiwriter/uiwriter5.cxx b/sw/qa/extras/uiwriter/uiwriter5.cxx index 1ea8b51bb80e..0d191cb1f069 100644 --- a/sw/qa/extras/uiwriter/uiwriter5.cxx +++ b/sw/qa/extras/uiwriter/uiwriter5.cxx @@ -1853,6 +1853,33 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest5, testRedlineTableRowDeletion) assertXPath(pXmlDoc, "//page[1]//body/tab", 0); } +CPPUNIT_TEST_FIXTURE(SwUiWriterTest5, testSelectRowWithNestedTable) +{ +// load a 1-row table, and select the row +createSwDoc(DATA_DIRECTORY, "select-row.fodt"); + +// check table +xmlDocUniquePtr pXmlDoc = parseLayoutDump(); +assertXPath(pXmlDoc, "//page[1]//body/tab"); +// nested table in the last cell +assertXPath(pXmlDoc, "//page[1]//body/tab/row/cell[2]/tab"); + +// select table row +dispatchCommand(mxComponent, ".uno:EntireRow", {}); +Scheduler::ProcessEventsToIdle(); +// convert selected text content to uppercase +dispatchCommand(mxComponent, ".uno:ChangeCaseToUpper", {}); +Scheduler::ProcessEventsToIdle(); + +discardDumpedLayout(); +pXmlDoc = parseLayoutDump(); +assertXPathContent(pXmlDoc, "//page[1]//body/tab/row/cell[2]/tab/row/cell[1]/txt", "NESTED-A1"); +// This was "a1" (bad selection of the table row) +assertXPathContent(pXmlDoc, "//page[1]//body/tab/row/cell[1]/txt[1]", "A1"); +// This was "nested-b1" (bad selection of the table row) +assertXPathContent(pXmlDoc, "//page[1]//body/tab/row/cell[2]/tab/row/cell[2]/txt", "NESTED-B1"); +} + CPPUNIT_TEST_FIXTURE(SwUiWriterTest5, testRedlineTableRowDeletionWithExport) { // load a 1-row table, and delete the row with enabled change tracking: diff --git a/sw/source/core/crsr/trvltbl.cxx b/sw/source/core/crsr/trvltbl.cxx index e212553c5844..0aaa899b5a46 100644 --- a/sw/source/core/crsr/trvltbl.cxx +++ b/sw/source/core/crsr/trvltbl.cxx @@ -233,8 +233,8 @@ bool SwCursorShell::SelTableRowOrCol( bool bRow, bool bRowSimple ) m_pTableCursor->DeleteMark(); // set start and end of a column -m_pTableCursor->GetPoint()->Assign( *pEnd->GetSttNd() ); -m_pTableCursor->Move( fnMoveForward, GoInContent ); +m_pTableCursor->GetPoint()->Assign( *pEnd->GetSttNd()->EndOfSectionNode() ); +m_pTableCursor->Move( fnMoveBackward, GoInContent ); m_pTableCursor->SetMark(); m_pTableCursor->GetPoint()->Assign( *pStt->GetSttNd()->EndOfSectionNode() ); m_pTableCursor->Move( fnMoveBackward, GoInContent );
[Libreoffice-commits] core.git: Branch 'libreoffice-7-4' - sw/source
sw/source/uibase/shells/drwtxtex.cxx |4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) New commits: commit 9cab1cc8d37b0116eec36d09738186f291af3766 Author: Caolán McNamara AuthorDate: Mon Oct 10 20:37:59 2022 +0100 Commit: Noel Grandin CommitDate: Wed Oct 12 10:12:39 2022 +0200 assert from SfxItemSet::CloneAsValue with SfxAllItemSet in writer with insert, shape, add some text, change its text color. so like: commit fe2ec505786bacc6f3baca3292367903644ac99b Date: Fri Feb 18 10:56:56 2022 +0200 improve the SfxItemSet::CloneAsValue check to prevent object slicing. revert the asserting hunk. Change-Id: Iea2b118a9072eccf930c61eb85c1684149aa9e02 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141187 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/sw/source/uibase/shells/drwtxtex.cxx b/sw/source/uibase/shells/drwtxtex.cxx index 1a5f3a8665d4..9f23ed7e6b7d 100644 --- a/sw/source/uibase/shells/drwtxtex.cxx +++ b/sw/source/uibase/shells/drwtxtex.cxx @@ -128,9 +128,7 @@ void SwDrawTextShell::Execute( SfxRequest &rReq ) const sal_uInt16 nSlot = rReq.GetSlot(); const sal_uInt16 nWhich = GetPool().GetWhich(nSlot); -std::optional pNewAttrs; -if (rReq.GetArgs()) -pNewAttrs.emplace(rReq.GetArgs()->CloneAsValue()); +std::unique_ptr pNewAttrs(rReq.GetArgs() ? rReq.GetArgs()->Clone() : nullptr); bool bRestoreSelection = false; ESelection aOldSelection;
[Libreoffice-commits] core.git: include/vcl vcl/source
include/vcl/animate/Animation.hxx |2 ++ vcl/source/animate/Animation.cxx | 15 +-- 2 files changed, 15 insertions(+), 2 deletions(-) New commits: commit 5f88c66b835718c5cc5f07d21825a5ac6880e458 Author: Chris Sherlock AuthorDate: Sat Jun 25 09:31:46 2022 +1000 Commit: Tomaž Vajngerl CommitDate: Wed Oct 12 10:11:25 2022 +0200 vcl: extract function CreateAnimationDataItems Change-Id: Ifc245b570d82d2fcbcd2cbb83cbd43664b228bf2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/76409 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl diff --git a/include/vcl/animate/Animation.hxx b/include/vcl/animate/Animation.hxx index 6c592ba753c1..2f13052d084b 100644 --- a/include/vcl/animate/Animation.hxx +++ b/include/vcl/animate/Animation.hxx @@ -28,6 +28,7 @@ #define ANIMATION_TIMEOUT_ON_CLICK 2147483647L class AnimationRenderer; +struct AnimationData; class VCL_DLLPUBLIC Animation { @@ -109,6 +110,7 @@ private: bool mbIsInAnimation; bool mbLoopTerminated; +SAL_DLLPRIVATE std::vector> CreateAnimationDataItems(); SAL_DLLPRIVATE void ImplRestartTimer(sal_uLong nTimeout); DECL_DLLPRIVATE_LINK(ImplTimeoutHdl, Timer*, void); }; diff --git a/vcl/source/animate/Animation.cxx b/vcl/source/animate/Animation.cxx index fb47e9698a3f..5582c3b9a848 100644 --- a/vcl/source/animate/Animation.cxx +++ b/vcl/source/animate/Animation.cxx @@ -282,6 +282,18 @@ void Animation::ImplRestartTimer(sal_uLong nTimeout) maTimer.Start(); } +std::vector> Animation::CreateAnimationDataItems() +{ +std::vector> aDataItems; + +for (auto const& rItem : maRenderers) +{ +aDataItems.emplace_back(rItem->createAnimationData()); +} + +return aDataItems; +} + IMPL_LINK_NOARG(Animation, ImplTimeoutHdl, Timer*, void) { const size_t nAnimCount = maFrames.size(); @@ -293,14 +305,13 @@ IMPL_LINK_NOARG(Animation, ImplTimeoutHdl, Timer*, void) if (maNotifyLink.IsSet()) { std::vector> aDataItems; -// create AnimationData-List for (auto const& i : maRenderers) aDataItems.emplace_back(i->createAnimationData()); maNotifyLink.Call(this); // set view state from AnimationData structure -for (auto& pDataItem : aDataItems) +for (auto& pDataItem : CreateAnimationDataItems()) { AnimationRenderer* pRenderer = nullptr; if (!pDataItem->mpRendererData)
[Libreoffice-commits] core.git: vcl/inc
vcl/inc/animate/AnimationRenderer.hxx |3 --- 1 file changed, 3 deletions(-) New commits: commit ff7dd118bdc5d017d2dec28a4e37c3e3a6b97660 Author: Chris Sherlock AuthorDate: Wed Jul 20 19:56:51 2022 +1000 Commit: Tomaž Vajngerl CommitDate: Wed Oct 12 10:10:24 2022 +0200 vcl: Animation does not need to be friend of AnimationRenderer Change-Id: I76441d55d62b63d380417554cd236e7e3cf882e1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/76408 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl diff --git a/vcl/inc/animate/AnimationRenderer.hxx b/vcl/inc/animate/AnimationRenderer.hxx index 0466518dfb1d..f75b88e29541 100644 --- a/vcl/inc/animate/AnimationRenderer.hxx +++ b/vcl/inc/animate/AnimationRenderer.hxx @@ -44,9 +44,6 @@ struct AnimationData class VCL_DLLPUBLIC AnimationRenderer { private: - -friend class Animation; - Animation* mpParent; VclPtr mpRenderContext; tools::Long mnRendererId;
[Libreoffice-commits] core.git: include/sax oox/source sax/source sc/source sd/source sw/source
include/sax/fshelper.hxx |3 +++ oox/source/core/xmlfilterbase.cxx|6 ++ oox/source/export/chartexport.cxx|3 +++ sax/source/tools/fshelper.cxx| 20 ++-- sc/source/filter/excel/xestream.cxx |6 ++ sd/source/filter/eppt/pptx-epptooxml.cxx | 23 +++ sw/source/filter/ww8/docxexport.cxx | 20 7 files changed, 79 insertions(+), 2 deletions(-) New commits: commit 06423ddc61a378894c91a6a23fb31afb1701d8f2 Author: Caolán McNamara AuthorDate: Tue Oct 11 10:45:40 2022 +0100 Commit: Caolán McNamara CommitDate: Wed Oct 12 09:52:15 2022 +0200 crashtesting: exception during dtor Change-Id: I9874778ba79540cfde32bf59c3a63ebb72889dc7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141215 Tested-by: Caolán McNamara Reviewed-by: Caolán McNamara diff --git a/include/sax/fshelper.hxx b/include/sax/fshelper.hxx index 115a3f912ca5..2d01066a1453 100644 --- a/include/sax/fshelper.hxx +++ b/include/sax/fshelper.hxx @@ -50,6 +50,9 @@ public: ~FastSerializerHelper(); +void startDocument(); +void endDocument(); + /// Start an element. After the first argument there can be a number of (attribute, value) pairs. template void startElement(sal_Int32 elementTokenId, sal_Int32 attribute, const char* value, Args &&... args) diff --git a/oox/source/core/xmlfilterbase.cxx b/oox/source/core/xmlfilterbase.cxx index e0e8b099ea5e..c2911a756047 100644 --- a/oox/source/core/xmlfilterbase.cxx +++ b/oox/source/core/xmlfilterbase.cxx @@ -697,6 +697,8 @@ writeCoreProperties( XmlFilterBase& rSelf, const Reference< XDocumentProperties } pCoreProps->endElementNS( XML_cp, XML_coreProperties ); + +pCoreProps->endDocument(); } static void @@ -819,6 +821,8 @@ writeAppProperties( XmlFilterBase& rSelf, const Reference< XDocumentProperties > } pAppProps->endElement( XML_Properties ); + +pAppProps->endDocument(); } static void @@ -937,6 +941,8 @@ writeCustomProperties( XmlFilterBase& rSelf, const Reference< XDocumentPropertie ++nIndex; } pAppProps->endElement( XML_Properties ); + +pAppProps->endDocument(); } void XmlFilterBase::exportDocumentProperties( const Reference< XDocumentProperties >& xProperties, bool bSecurityOptOpenReadOnly ) diff --git a/oox/source/export/chartexport.cxx b/oox/source/export/chartexport.cxx index 6bdede718f05..b60e84590ae9 100644 --- a/oox/source/export/chartexport.cxx +++ b/oox/source/export/chartexport.cxx @@ -874,6 +874,8 @@ void ChartExport::WriteChartObj( const Reference< XShape >& xShape, sal_Int32 nI SetFS( pChart ); ExportContent(); +SetFS( pFS ); +pChart->endDocument(); } void ChartExport::InitRangeSegmentationProperties( const Reference< chart2::XChartDocument > & xChartDoc ) @@ -1115,6 +1117,7 @@ void ChartExport::exportAdditionalShapes( const Reference< css::chart::XChartDoc pDrawing->endElement(FSNS(XML_cdr, XML_relSizeAnchor)); } pDrawing->endElement(FSNS(XML_c, XML_userShapes)); +pDrawing->endDocument(); } } catch (const uno::Exception&) diff --git a/sax/source/tools/fshelper.cxx b/sax/source/tools/fshelper.cxx index 7cbd3c36abc1..fbf7f0672709 100644 --- a/sax/source/tools/fshelper.cxx +++ b/sax/source/tools/fshelper.cxx @@ -17,6 +17,7 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ +#include #include #include "fastserializer.hxx" @@ -29,12 +30,27 @@ FastSerializerHelper::FastSerializerHelper(const Reference< io::XOutputStream >& mpSerializer(new FastSaxSerializer(xOutputStream)) { if( bWriteHeader ) -mpSerializer->startDocument(); +startDocument(); +} + +void FastSerializerHelper::startDocument() +{ +mpSerializer->startDocument(); +} + +void FastSerializerHelper::endDocument() +{ +std::unique_ptr xSerializer(std::move(mpSerializer)); +xSerializer->endDocument(); } FastSerializerHelper::~FastSerializerHelper() { -mpSerializer->endDocument(); +if (mpSerializer) +{ +assert(false && "call endDocument explicitly before dtor to avoid potential exceptions during dtor"); +endDocument(); +} } void FastSerializerHelper::startElement(sal_Int32 elementTokenId) diff --git a/sc/source/filter/excel/xestream.cxx b/sc/source/filter/excel/xestream.cxx index b94959292891..04cb7ad23ec7 100644 --- a/sc/source/filter/excel/xestream.cxx +++ b/sc/source/filter/excel/xestream.cxx @@ -1113,6 +1113,12 @@ bool XclExpXmlStream::exportDocument() PopStream(); // Free all FSHelperPtr, to flush data before committing storage +for (auto& entry : maOpenedStreamMap) +{ +if (!entry.second.second) +continue; +entry.second.second->endDocument(); +} maOpenedStreamMap.clear(); commitStorage(); dif
[Libreoffice-commits] core.git: sw/source
sw/source/uibase/shells/drwtxtex.cxx |4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) New commits: commit 56b8703d6f759326f7ac1a84ca0e6d1c9b40aad7 Author: Caolán McNamara AuthorDate: Mon Oct 10 20:37:59 2022 +0100 Commit: Caolán McNamara CommitDate: Wed Oct 12 09:50:59 2022 +0200 assert from SfxItemSet::CloneAsValue with SfxAllItemSet in writer with insert, shape, add some text, change its text color. so like: commit fe2ec505786bacc6f3baca3292367903644ac99b Date: Fri Feb 18 10:56:56 2022 +0200 improve the SfxItemSet::CloneAsValue check to prevent object slicing. revert the asserting hunk. Change-Id: Iea2b118a9072eccf930c61eb85c1684149aa9e02 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141168 Tested-by: Jenkins Reviewed-by: Caolán McNamara diff --git a/sw/source/uibase/shells/drwtxtex.cxx b/sw/source/uibase/shells/drwtxtex.cxx index 1a5f3a8665d4..9f23ed7e6b7d 100644 --- a/sw/source/uibase/shells/drwtxtex.cxx +++ b/sw/source/uibase/shells/drwtxtex.cxx @@ -128,9 +128,7 @@ void SwDrawTextShell::Execute( SfxRequest &rReq ) const sal_uInt16 nSlot = rReq.GetSlot(); const sal_uInt16 nWhich = GetPool().GetWhich(nSlot); -std::optional pNewAttrs; -if (rReq.GetArgs()) -pNewAttrs.emplace(rReq.GetArgs()->CloneAsValue()); +std::unique_ptr pNewAttrs(rReq.GetArgs() ? rReq.GetArgs()->Clone() : nullptr); bool bRestoreSelection = false; ESelection aOldSelection;
[Libreoffice-commits] core.git: sw/qa
sw/qa/extras/ww8export/ww8export.cxx | 93 ++- 1 file changed, 50 insertions(+), 43 deletions(-) New commits: commit 001de7e21d29fccff904fe23de05afd68922fe2e Author: Miklos Vajna AuthorDate: Tue Oct 11 20:20:13 2022 +0200 Commit: Miklos Vajna CommitDate: Wed Oct 12 09:13:30 2022 +0200 CppunitTest_sw_ww8export: remove not needed mustTestImportOf() Which means postLoad() can go as well. Change-Id: I6c4a25ccd13118156c1bc2d0306db30a18af5b88 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141236 Tested-by: Jenkins Reviewed-by: Miklos Vajna diff --git a/sw/qa/extras/ww8export/ww8export.cxx b/sw/qa/extras/ww8export/ww8export.cxx index 2ccd11c4cd65..22b71281d1f1 100644 --- a/sw/qa/extras/ww8export/ww8export.cxx +++ b/sw/qa/extras/ww8export/ww8export.cxx @@ -67,12 +67,6 @@ class Test : public SwModelTestBase public: Test() : SwModelTestBase("/sw/qa/extras/ww8export/data/", "MS Word 97") {} -bool mustTestImportOf(const char* filename) const override -{ -// If the testcase is stored in some other format, it's pointless to test. -return o3tl::ends_with(filename, ".doc"); -} - /** * Validation handling */ @@ -105,24 +99,6 @@ public: // Don't bother with non-.doc files; weed out denylisted .doc files return (o3tl::ends_with(filename, ".doc") && std::find(aDenylist.begin(), aDenylist.end(), filename) == aDenylist.end()); } -protected: - -virtual void postLoad(const char* pFilename) override -{ -if (pFilename == std::string_view("tdf94386.odt")) -{ -SwXTextDocument* pTextDoc = dynamic_cast(mxComponent.get()); -CPPUNIT_ASSERT(pTextDoc); -SwWrtShell* pWrtShell = pTextDoc->GetDocShell()->GetWrtShell(); - -// emulate the behavior from tdf#94386 - insert an envelope to the -// document -SfxItemSet aSet(pWrtShell->GetView().GetCurShell()->GetPool(), svl::Items); -aSet.Put(SwEnvItem()); -SfxRequest aRequest(FN_ENVELOP, SfxCallMode::SYNCHRON, aSet); -SW_MOD()->ExecOther(aRequest); -} -} }; DECLARE_WW8EXPORT_TEST(testN757910, "n757910.doc") @@ -886,8 +862,9 @@ DECLARE_WW8EXPORT_TEST(testTscp, "tscp.doc") CPPUNIT_ASSERT_EQUAL(false, static_cast(xStatements->hasMoreElements())); } -DECLARE_WW8EXPORT_TEST(testFdo45724, "fdo45724.odt") +CPPUNIT_TEST_FIXTURE(Test, testFdo45724) { +loadAndReload("fdo45724.odt"); CPPUNIT_ASSERT_EQUAL(1, getShapes()); CPPUNIT_ASSERT_EQUAL(1, getPages()); // The text and background color of the control shape was not correct. @@ -897,8 +874,9 @@ DECLARE_WW8EXPORT_TEST(testFdo45724, "fdo45724.odt") CPPUNIT_ASSERT_EQUAL(OUString("xxx"), xComponent->getCurrentValue().get()); } -DECLARE_WW8EXPORT_TEST(testTdf136620, "tdf136620.odt") +CPPUNIT_TEST_FIXTURE(Test, testTdf136620) { +loadAndReload("tdf136620.odt"); CPPUNIT_ASSERT_EQUAL(1, getShapes()); CPPUNIT_ASSERT_EQUAL(1, getPages()); @@ -914,8 +892,9 @@ DECLARE_WW8EXPORT_TEST(testTdf136620, "tdf136620.odt") CPPUNIT_ASSERT_EQUAL(sal_Int32(5853), xShape->getSize().Width); } -DECLARE_WW8EXPORT_TEST(testFdo46020, "fdo46020.odt") +CPPUNIT_TEST_FIXTURE(Test, testFdo46020) { +loadAndReload("fdo46020.odt"); CPPUNIT_ASSERT_EQUAL(1, getPages()); // The footnote in that document wasn't exported, check that it is actually exported uno::Reference xFootnotesSupplier(mxComponent, uno::UNO_QUERY); @@ -977,16 +956,18 @@ DECLARE_WW8EXPORT_TEST(testNewPageStylesTable, "new-page-styles.doc") CPPUNIT_ASSERT_EQUAL(OUString("Sigma Space Performance Goals: Next Year (Page 3)***"), parseDump("/root/page[3]/header/txt/text()")); } -DECLARE_WW8EXPORT_TEST(testFdo42144, "fdo42144.odt") +CPPUNIT_TEST_FIXTURE(Test, testFdo42144) { +loadAndReload("fdo42144.odt"); CPPUNIT_ASSERT_EQUAL(1, getPages()); // Footer wasn't disabled -- instead empty footer was exported. uno::Reference xStyle(getStyles("PageStyles")->getByName("Standard"), uno::UNO_QUERY); CPPUNIT_ASSERT_EQUAL(false, getProperty(xStyle, "FooterIsOn")); } -DECLARE_WW8EXPORT_TEST(testCharacterBorder, "charborder.odt") +CPPUNIT_TEST_FIXTURE(Test, testCharacterBorder) { +loadAndReload("charborder.odt"); CPPUNIT_ASSERT_EQUAL(1, getPages()); uno::Reference xRun(getRun(getParagraph(1),1), uno::UNO_QUERY); // WW8 has just one border attribute (sprmCBrc) for text border so all side has @@ -1022,8 +1003,9 @@ DECLARE_WW8EXPORT_TEST(testCharacterBorder, "charborder.odt") } } -DECLARE_WW8EXPORT_TEST(testTdf41542_imagePadding, "tdf41542_imagePadding.odt") +CPPUNIT_TEST_FIXTURE(Test, testTdf41542_imagePadding) { +loadAndReload("tdf41542_imagePadding.odt"); CPPUNIT_ASSERT_EQUAL(3, getShapes()); CPPUNIT_ASSERT_EQUAL(1, getPages()); // borderlessImage - image WITHOU