[Libreoffice-commits] core.git: Branch 'libreoffice-7-2' - sw/source
sw/source/ui/fldui/fldtdlg.cxx |9 - 1 file changed, 8 insertions(+), 1 deletion(-) New commits: commit fc9383e943bdb07e1770af4eef8ffe8859c379f8 Author: Vasily Melenchuk AuthorDate: Mon Oct 4 17:40:31 2021 +0200 Commit: Adolfo Jayme Barrientos CommitDate: Thu Oct 7 08:34:10 2021 +0200 tdf#144907: sw ui: allow closing of "Fields" dialog In some cases (described in task) dialog is not closed. This is happens due to not delivered request to SwTextShell::ExecField(). So we could just close dialog explicitly, if Execute() action did fail. Change-Id: I1c712295a21037bc8bb28e2a97e750299b41250c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123059 Tested-by: Jenkins Reviewed-by: Michael Stahl (cherry picked from commit da5580369bfd15857fb21a1f610e393d07abb805) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122951 Reviewed-by: Adolfo Jayme Barrientos diff --git a/sw/source/ui/fldui/fldtdlg.cxx b/sw/source/ui/fldui/fldtdlg.cxx index 70d69203af14..d78bc66b811a 100644 --- a/sw/source/ui/fldui/fldtdlg.cxx +++ b/sw/source/ui/fldui/fldtdlg.cxx @@ -108,9 +108,16 @@ void SwFieldDlg::Close() { if (m_bClosing) return; -m_pBindings->GetDispatcher()-> +const SfxPoolItem* pResult = m_pBindings->GetDispatcher()-> Execute(m_bDataBaseMode ? FN_INSERT_FIELD_DATA_ONLY : FN_INSERT_FIELD, SfxCallMode::SYNCHRON|SfxCallMode::RECORD); +if (!pResult) +{ +// If Execute action did fail for whatever reason, this means that request +// to close did fail or wasn't delivered to SwTextShell::ExecField(). +// Just explicitly close dialog in this case. +SfxTabDialogController::EndDialog(); +} } void SwFieldDlg::Initialize(SfxChildWinInfo const *pInfo)
[Libreoffice-commits] core.git: basic/qa basic/source
basic/qa/basic_coverage/test_split_method.bas | 45 +++- basic/qa/cppunit/test_vba.cxx |1 basic/qa/vba_tests/split.vb | 57 ++ basic/source/runtime/methods1.cxx |6 ++ 4 files changed, 99 insertions(+), 10 deletions(-) New commits: commit e090afc29bdff4303f1235080fb169011220be4a Author: Andreas Heinisch AuthorDate: Tue Oct 5 21:10:22 2021 +0200 Commit: Andreas Heinisch CommitDate: Thu Oct 7 08:21:58 2021 +0200 tdf#144924 - Change return type of array elements of the split function If VBA is not enabled, allow the assignment of variables with different data types to the individual array elements created by the split function. Change-Id: I7bdd432cdebbfded5f7fb3acc0216474eb6b6821 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123122 Tested-by: Andreas Heinisch Reviewed-by: Andreas Heinisch diff --git a/basic/qa/basic_coverage/test_split_method.bas b/basic/qa/basic_coverage/test_split_method.bas index 2742fcf52301..52ba91fe3a65 100644 --- a/basic/qa/basic_coverage/test_split_method.bas +++ b/basic/qa/basic_coverage/test_split_method.bas @@ -7,28 +7,53 @@ Option Explicit -Function doUnitTest as String +Function doUnitTest() As String +TestUtil.TestInit +verify_testSplit +doUnitTest = TestUtil.GetResult() +End Function -doUnitTest = "FAIL" +Sub verify_testSplit +On Error GoTo errorHandler ' SPLIT -If ( Split( "Hello world" )(1) <> "world" ) Then Exit Function +TestUtil.AssertEqual(Split( "Hello world" )(1), "world", "Split( ""Hello world"" )(1)") ' tdf#123025 - split function sets the datatype of the array to empty, ' preventing any subsequent assignments of values to the array and to the elements itself. Dim arr(1) As String arr = Split("a/b", "/") -If ( arr(0) <> "a" Or arr(1) <> "b" ) Then Exit Function +TestUtil.AssertEqual(arr(0), "a", "Split(""a/b"", ""/"")(0)") +TestUtil.AssertEqual(arr(1), "b", "Split(""a/b"", ""/"")(1)") ReDim Preserve arr(1) -If ( arr(0) <> "a" Or arr(1) <> "b" ) Then Exit Function +TestUtil.AssertEqual(arr(0), "a", "ReDim Preserve arr(1)(0)") +TestUtil.AssertEqual(arr(1), "b", "ReDim Preserve arr(1)(1)") ReDim arr(1) -If ( arr(0) <> "" Or arr(1) <> "" ) Then Exit Function +TestUtil.AssertEqual(arr(0), "", "ReDim arr(1)(0)") +TestUtil.AssertEqual(arr(1), "", "ReDim arr(1)(1)") + arr(0) = "a" arr(1) = "b" -If ( arr(0) <> "a" Or arr(1) <> "b" ) Then Exit Function +TestUtil.AssertEqual(arr(0), "a", "arr(0)") +TestUtil.AssertEqual(arr(1), "b", "arr(1)") ReDim Preserve arr(1) -If ( arr(0) <> "a" Or arr(1) <> "b" ) Then Exit Function +TestUtil.AssertEqual(arr(0), "a", "ReDim Preserve arr(1)(0) after assignment") +TestUtil.AssertEqual(arr(1), "b", "ReDim Preserve arr(1)(1) after assignment") -doUnitTest = "OK" +' tdf#144924 - allow the assignment of different data types to the individual elements +Dim splitArr +splitArr = Split("a/b&&c/d", "&&") +Dim i As Integer +For i = 0 To UBound(splitArr) +' Without the fix in place, this assignment would have failed +splitArr(i) = Split(splitArr(i), "/") +' Without the fix in place, this test would have failed with: +' - Expected: 8200 (8192 for Array and 8 for String) +' - Actual : 8(8 for String) +TestUtil.AssertEqual(VarType(splitArr(i)), 8200, "VarType(splitArr(i))") +Next -End Function +Exit Sub +errorHandler: +TestUtil.ReportErrorHandler("verify_testSplit", Err, Error$, Erl) +End Sub diff --git a/basic/qa/cppunit/test_vba.cxx b/basic/qa/cppunit/test_vba.cxx index 036d3b52cfe4..9ea572201a30 100644 --- a/basic/qa/cppunit/test_vba.cxx +++ b/basic/qa/cppunit/test_vba.cxx @@ -125,6 +125,7 @@ void VBATest::testMiscVBAFunctions() "sgn.vb", "sin.vb", "space.vb", +"split.vb", "sqr.vb", "str.vb", "strcomp.vb", diff --git a/basic/qa/vba_tests/split.vb b/basic/qa/vba_tests/split.vb new file mode 100644 index ..56d4522180b0 --- /dev/null +++ b/basic/qa/vba_tests/split.vb @@ -0,0 +1,57 @@ +' +' 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/. +' + +Option VBASupport 1 +Option Explicit + +Function doUnitTest() As String +TestUtil.TestInit +verify_testSplit +doUnitTest = TestUtil.GetResult() +End Function + +Sub verify_testSplit +On Error GoTo errorHandler + +' SPLIT +TestUtil.AssertEqual(Split( "Hello world" )(1), "world", "Split( ""Hello world"" )(1)") + +' tdf#123025 - split function sets the datatype of the array to empty, +' preventing any subsequent
[Libreoffice-commits] core.git: sw/source
sw/source/core/doc/textboxhelper.cxx | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) New commits: commit f78aebd4c2a2b740559e54906a26653dc89fd610 Author: Miklos Vajna AuthorDate: Wed Oct 6 20:06:19 2021 +0200 Commit: Miklos Vajna CommitDate: Thu Oct 7 08:05:50 2021 +0200 sw: size() -> !empty() in textboxhelper To avoid an implicit integer to boolean conversion. Change-Id: If4f91d4ebfc0c2a66e0c526d3826aed4b7558ec2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123185 Tested-by: Jenkins Reviewed-by: Miklos Vajna diff --git a/sw/source/core/doc/textboxhelper.cxx b/sw/source/core/doc/textboxhelper.cxx index 7c6110e714d2..6d19209c4ad3 100644 --- a/sw/source/core/doc/textboxhelper.cxx +++ b/sw/source/core/doc/textboxhelper.cxx @@ -1388,7 +1388,7 @@ SwTextBoxNode::SwTextBoxNode(SwFrameFormat* pOwnerShape) assert(pOwnerShape->Which() == RES_DRAWFRMFMT); m_pOwnerShapeFormat = pOwnerShape; -if (m_pTextBoxes.size()) +if (!m_pTextBoxes.empty()) m_pTextBoxes.clear(); } @@ -1422,7 +1422,7 @@ void SwTextBoxNode::AddTextBox(SdrObject* pDrawObject, SwFrameFormat* pNewTextBo void SwTextBoxNode::DelTextBox(const SdrObject* pDrawObject) { assert(pDrawObject); -if (m_pTextBoxes.size()) +if (!m_pTextBoxes.empty()) { for (auto it = m_pTextBoxes.begin(); it != m_pTextBoxes.end();) { @@ -1442,7 +1442,7 @@ void SwTextBoxNode::DelTextBox(const SdrObject* pDrawObject) SwFrameFormat* SwTextBoxNode::GetTextBox(const SdrObject* pDrawObject) const { assert(pDrawObject); -if (m_pTextBoxes.size()) +if (!m_pTextBoxes.empty()) { for (auto it = m_pTextBoxes.begin(); it != m_pTextBoxes.end(); it++) { @@ -1459,7 +1459,7 @@ bool SwTextBoxNode::IsTextBoxActive(const SdrObject* pDrawObject) const { assert(pDrawObject); -if (m_pTextBoxes.size()) +if (!m_pTextBoxes.empty()) { for (auto it = m_pTextBoxes.begin(); it != m_pTextBoxes.end(); it++) { @@ -1476,7 +1476,7 @@ void SwTextBoxNode::SetTextBoxActive(const SdrObject* pDrawObject) { assert(pDrawObject); -if (m_pTextBoxes.size()) +if (!m_pTextBoxes.empty()) { for (auto it = m_pTextBoxes.begin(); it != m_pTextBoxes.end(); it++) { @@ -1492,7 +1492,7 @@ void SwTextBoxNode::SetTextBoxInactive(const SdrObject* pDrawObject) { assert(pDrawObject); -if (m_pTextBoxes.size()) +if (!m_pTextBoxes.empty()) { for (auto it = m_pTextBoxes.begin(); it != m_pTextBoxes.end(); it++) {
[Libreoffice-commits] core.git: sw/qa sw/source
sw/qa/extras/ooxmlexport/ooxmlexport10.cxx |4 sw/qa/extras/ww8export/ww8export3.cxx| 11 ++- sw/source/filter/ww8/docxattributeoutput.cxx | 10 ++ sw/source/filter/ww8/wrtww8.cxx |5 + 4 files changed, 29 insertions(+), 1 deletion(-) New commits: commit f629dc8dc8b9620508b5bd8e55ddb298438c447f Author: Justin Luth AuthorDate: Wed Oct 6 07:38:44 2021 +0200 Commit: Justin Luth CommitDate: Thu Oct 7 07:21:17 2021 +0200 tdf#143982 doc/x export: save automatic table as 100% relative Currently, the automatic mode is just being saved as "determine width from cell size" or absolute size. But a better match would be 100% of the available space, so that changing the page or margin size would automatically increase the table size (which is what automatic implies). It doesn't appear that MS formats really have a similar automatic. Their automatic just seems to say that the width isn't specified at the table level. So a percent-size seems to be the best match. RTF currently does not even round-trip relative tables, so I ignored that format. Change-Id: I5bfc066864ab630755046b881e98503491cfb1ee Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123128 Tested-by: Jenkins Reviewed-by: Justin Luth diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport10.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport10.cxx index 31dba7b98385..b364d1314278 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport10.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport10.cxx @@ -1214,6 +1214,10 @@ DECLARE_OOXMLEXPORT_TEST(testTableMarginAdjustment, "table.fodt") assertXPath(pXmlDoc, "//w:tbl[1]/w:tblPr[1]/w:tblInd[1]", "type", "dxa"); assertXPath(pXmlDoc, "//w:tbl[1]/w:tblPr[1]/w:tblInd[1]", "w", "0"); + + +// tdf#143982: automatic tables should export as something better than just left-and-size +CPPUNIT_ASSERT_EQUAL(sal_Int16(100), getProperty(xTable, "RelativeWidth")); } DECLARE_OOXMLEXPORT_TEST(testTdf119760_tableInTablePosition, "tdf119760_tableInTablePosition.docx") diff --git a/sw/qa/extras/ww8export/ww8export3.cxx b/sw/qa/extras/ww8export/ww8export3.cxx index a0df68658947..01ddaf60016e 100644 --- a/sw/qa/extras/ww8export/ww8export3.cxx +++ b/sw/qa/extras/ww8export/ww8export3.cxx @@ -268,11 +268,20 @@ DECLARE_WW8EXPORT_TEST(testdf79553_lineNumbers, "tdf79553_lineNumbers.doc") CPPUNIT_ASSERT_MESSAGE("automatic distance", nValue > 0); } -DECLARE_WW8EXPORT_TEST(tesTdf138302_restartNumbering, "tdf138302_restartNumbering.odt") +DECLARE_WW8EXPORT_TEST(testTdf138302_restartNumbering, "tdf138302_restartNumbering.odt") { CPPUNIT_ASSERT_EQUAL(1, getPages()); uno::Reference xPara(getParagraph(8), uno::UNO_QUERY); CPPUNIT_ASSERT_EQUAL(OUString("1."), getProperty(xPara, "ListLabelString")); + + +// tdf#143982: automatic tables should export as something better than just left-and-size +uno::Reference xTextTablesSupplier(mxComponent, uno::UNO_QUERY); +uno::Reference xTables(xTextTablesSupplier->getTextTables(), uno::UNO_QUERY); +uno::Reference xTable(xTables->getByIndex(0), uno::UNO_QUERY); + +CPPUNIT_ASSERT(getProperty(xTable, "IsWidthRelative")); +CPPUNIT_ASSERT_EQUAL(sal_Int16(100), getProperty(xTable, "RelativeWidth")); } DECLARE_WW8EXPORT_TEST(testTdf122429_header, "tdf122429_header.doc") diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx index 81180f5ec3f9..868196d654e0 100644 --- a/sw/source/filter/ww8/docxattributeoutput.cxx +++ b/sw/source/filter/ww8/docxattributeoutput.cxx @@ -3947,9 +3947,19 @@ void DocxAttributeOutput::TableDefinition( ww8::WW8TableNodeInfoInner::Pointer_t const SwFormatFrameSize &rFrameSize = pFloatingTableFrame->GetFrameFormat().GetFrameSize(); nWidthPercent = rFrameSize.GetWidthPercent(); } + uno::Reference xPropertySet(SwXTextTables::GetObject(*pTable->GetFrameFormat( )),uno::UNO_QUERY); bool isWidthRelative = false; xPropertySet->getPropertyValue("IsWidthRelative") >>= isWidthRelative; +if (!isWidthRelative && !nWidthPercent) +{ +// The best fit for "automatic" table placement is relative 100% +short nHoriOrient = -1; +xPropertySet->getPropertyValue("HoriOrient") >>= nHoriOrient; +isWidthRelative = nHoriOrient == text::HoriOrientation::FULL; +if (isWidthRelative) +nWidthPercent = 100; +} if(isWidthRelative) { diff --git a/sw/source/filter/ww8/wrtww8.cxx b/sw/source/filter/ww8/wrtww8.cxx index 6c5a5a927eda..7db1fb50386e 100644 --- a/sw/source/filter/ww8/wrtww8.cxx +++ b/sw/source/filter/ww8/wrtww8.cxx @@ -2415,6 +2415,11 @@ void WW8AttributeOutput::TableDefinition( ww8::WW8TableNodeInfoInner::Pointer_t } int nWidthPercent = pFormat->GetFrameSize().GetWidthPercent(); + +// The best fit for "automatic" table pla
[Libreoffice-commits] core.git: sw/uiconfig
sw/uiconfig/swriter/ui/asciifilterdialog.ui |5 + 1 file changed, 5 insertions(+) New commits: commit ec76fff198323122bedc63ffdfd896c2543102c6 Author: Olivier Hallot AuthorDate: Wed Oct 6 08:54:41 2021 -0300 Commit: Olivier Hallot CommitDate: Thu Oct 7 00:25:44 2021 +0200 tdf#140781 Update extended tip for ASCII dialog import Change-Id: I9be5573673f888e9932c114dc0018585d75d13d1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123140 Tested-by: Jenkins Reviewed-by: Olivier Hallot diff --git a/sw/uiconfig/swriter/ui/asciifilterdialog.ui b/sw/uiconfig/swriter/ui/asciifilterdialog.ui index 1033cf070f9b..7259573adba5 100644 --- a/sw/uiconfig/swriter/ui/asciifilterdialog.ui +++ b/sw/uiconfig/swriter/ui/asciifilterdialog.ui @@ -286,6 +286,11 @@ False start True + + +For Unicode character set only, a byte order mark (BOM) is a sequence of bytes used to indicate Unicode encoding of a text file. + + 1
[Libreoffice-commits] core.git: sc/source
sc/source/ui/unoobj/chartuno.cxx |6 -- 1 file changed, 4 insertions(+), 2 deletions(-) New commits: commit 34b01c95d4cab81cb614b67c47b004ac86d266f1 Author: Eike Rathke AuthorDate: Wed Oct 6 18:57:36 2021 +0200 Commit: Eike Rathke CommitDate: Wed Oct 6 23:15:21 2021 +0200 Resolves: tdf#144970 Chart CellRangeRepresentation expects UI representation sc/source/ui/unoobj/chart2uno.cxx ScChart2DataProvider::createDataSource() calls ScRefTokenHelper::compileRangeRepresentation() with the CellRangeRepresentation property's string value and the document's grammar (and also other places calling ScRefTokenHelper::compileRangeRepresentation() in Chart context do, like ScChart2DataProvider::detectArguments()), so let ScChartsObj::addNewByName() generate that from the Sequence. Also let ScChartObj::GetData_Impl() parse a CellRangeRepresentation value with the current address convention. This is congruent with offapi/com/sun/star/chart2/data/TabularDataProviderArguments.idl that for CellRangeRepresentation says "The representation string is of a form that may be used in the user interface. Example for OOo Calc: "$Sheet1.$A$1:$D$7"", which is Calc A1 but agnostic about Excel A1 and R1C1 address syntax. TabularDataProviderArguments is mentioned in offapi/com/sun/star/chart2/data/XDataProvider.idl at createDataSource(). Change-Id: Ie89d9aa3d5bc3eda9a65932a445ee8a1b4b266f9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123188 Reviewed-by: Eike Rathke Tested-by: Jenkins diff --git a/sc/source/ui/unoobj/chartuno.cxx b/sc/source/ui/unoobj/chartuno.cxx index d336cdd201b8..5300f91a0d3c 100644 --- a/sc/source/ui/unoobj/chartuno.cxx +++ b/sc/source/ui/unoobj/chartuno.cxx @@ -209,8 +209,9 @@ void SAL_CALL ScChartsObj::addNewByName( const OUString& rName, xReceiver.set( xObj->getComponent(), uno::UNO_QUERY ); if( xReceiver.is()) { +// Range in UI representation. OUString sRangeStr; -xNewRanges->Format(sRangeStr, ScRefFlags::RANGE_ABS_3D, rDoc); +xNewRanges->Format(sRangeStr, ScRefFlags::RANGE_ABS_3D, rDoc, rDoc.GetAddressConvention()); // connect if( !sRangeStr.isEmpty() ) @@ -478,7 +479,8 @@ void ScChartObj::GetData_Impl( ScRangeListRef& rRanges, bool& rColHeaders, bool& rColHeaders=bHasCategories; rRowHeaders=bFirstCellAsLabel; } -rRanges->Parse( aRanges, rDoc); +// Range in UI representation. +rRanges->Parse( aRanges, rDoc, rDoc.GetAddressConvention()); } bFound = true; }
[Libreoffice-commits] core.git: vcl/ios vcl/osx
vcl/ios/iOSTransferable.cxx |1 - vcl/osx/DataFlavorMapping.cxx |1 - vcl/osx/OSXTransferable.cxx |1 - vcl/osx/salframe.cxx |1 - vcl/osx/salinst.cxx |1 - 5 files changed, 5 deletions(-) New commits: commit 490479c9b6f75dd857b8b644f84f65c37c1b460f Author: Julien Nabet AuthorDate: Wed Oct 6 21:20:21 2021 +0200 Commit: Julien Nabet CommitDate: Wed Oct 6 22:55:55 2021 +0200 drop 'using namespace std' in vcl (MacOs/ios), blindly but hopefully there's a Jenkins machine on MacOs Change-Id: If5e87d16e64f010494ca1e5751ea6873f3a21a57 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123190 Tested-by: Julien Nabet Reviewed-by: Julien Nabet diff --git a/vcl/ios/iOSTransferable.cxx b/vcl/ios/iOSTransferable.cxx index 6e1bd00b3a97..ece771e7f60b 100644 --- a/vcl/ios/iOSTransferable.cxx +++ b/vcl/ios/iOSTransferable.cxx @@ -31,7 +31,6 @@ #include "DataFlavorMapping.hxx" -using namespace std; using namespace osl; using namespace cppu; using namespace com::sun::star::uno; diff --git a/vcl/osx/DataFlavorMapping.cxx b/vcl/osx/DataFlavorMapping.cxx index feecca3f663e..1145c77cfa76 100644 --- a/vcl/osx/DataFlavorMapping.cxx +++ b/vcl/osx/DataFlavorMapping.cxx @@ -45,7 +45,6 @@ using namespace ::com::sun::star::datatransfer; using namespace ::com::sun::star::uno; using namespace com::sun::star::lang; using namespace cppu; -using namespace std; namespace { diff --git a/vcl/osx/OSXTransferable.cxx b/vcl/osx/OSXTransferable.cxx index 4857843c34f3..f3ed1ec83fae 100644 --- a/vcl/osx/OSXTransferable.cxx +++ b/vcl/osx/OSXTransferable.cxx @@ -30,7 +30,6 @@ #include "DataFlavorMapping.hxx" -using namespace std; using namespace osl; using namespace cppu; using namespace com::sun::star::uno; diff --git a/vcl/osx/salframe.cxx b/vcl/osx/salframe.cxx index 5b3a7e665ff5..7ef3b7b2c1ce 100644 --- a/vcl/osx/salframe.cxx +++ b/vcl/osx/salframe.cxx @@ -54,7 +54,6 @@ #include #include -using namespace std; AquaSalFrame* AquaSalFrame::s_pCaptureFrame = nullptr; diff --git a/vcl/osx/salinst.cxx b/vcl/osx/salinst.cxx index 9424c4e90909..452821f33e14 100644 --- a/vcl/osx/salinst.cxx +++ b/vcl/osx/salinst.cxx @@ -84,7 +84,6 @@ extern "C" { #include } -using namespace std; using namespace ::com::sun::star; static int* gpnInit = nullptr;
[Libreoffice-commits] core.git: comphelper/source
comphelper/source/misc/xmlsechelper.cxx | 27 +-- 1 file changed, 13 insertions(+), 14 deletions(-) New commits: commit 080547f644017353ff3c1d8cd91076e05d2ee373 Author: Chris Sherlock AuthorDate: Wed Sep 29 22:03:17 2021 +1000 Commit: Julien Nabet CommitDate: Wed Oct 6 22:10:19 2021 +0200 comphelper: remove unnecessary using namespace vcl Change-Id: I7f49f23bcfeceb01ea470287705199fc846d1cb9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122817 Tested-by: Julien Nabet Reviewed-by: Julien Nabet diff --git a/comphelper/source/misc/xmlsechelper.cxx b/comphelper/source/misc/xmlsechelper.cxx index 8f7184d2abee..bc2cb280a710 100644 --- a/comphelper/source/misc/xmlsechelper.cxx +++ b/comphelper/source/misc/xmlsechelper.cxx @@ -17,14 +17,13 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ - #include #include #include -#include -using namespace std; +#include +#include namespace comphelper::xmlsec { @@ -49,9 +48,9 @@ namespace comphelper::xmlsec The second string is for the details view at the bottom. It shows the attribute/value pairs on different lines. All escape characters ('"') are removed. */ -pair< OUString, OUString> GetDNForCertDetailsView( const OUString & rRawString) +std::pair< OUString, OUString> GetDNForCertDetailsView( const OUString & rRawString) { -vector< pair< OUString, OUString > > vecAttrValueOfDN = parseDN(rRawString); +std::vector< std::pair< OUString, OUString > > vecAttrValueOfDN = parseDN(rRawString); OUStringBuffer s1, s2; for (auto i = vecAttrValueOfDN.cbegin(); i < vecAttrValueOfDN.cend(); ++i) { @@ -63,7 +62,7 @@ namespace comphelper::xmlsec s1.append(i->second); s2.append(i->first + " = " + i->second); } -return make_pair(s1.makeStringAndClear(), s2.makeStringAndClear()); +return std::make_pair(s1.makeStringAndClear(), s2.makeStringAndClear()); } /* @@ -73,9 +72,9 @@ namespace comphelper::xmlsec they are escaped with a double quote. This function removes the escape characters. */ #ifdef _WIN32 -vector< pair< OUString, OUString> > parseDN(const OUString& rRawString) +std::vector< std::pair< OUString, OUString> > parseDN(const OUString& rRawString) { -vector< pair > retVal; +std::vector< std::pair > retVal; bool bInEscape = false; bool bInValue = false; bool bInType = true; @@ -130,7 +129,7 @@ vector< pair< OUString, OUString> > parseDN(const OUString& rRawString) if (!bInValue) { OSL_ASSERT(!sType.isEmpty()); -retVal.push_back(make_pair(sType, sbufValue.makeStringAndClear())); +retVal.push_back(std::make_pair(sType, sbufValue.makeStringAndClear())); sType.clear(); //The next char is the start of the new type nTypeNameStart = i + 1; @@ -153,14 +152,14 @@ vector< pair< OUString, OUString> > parseDN(const OUString& rRawString) if (sbufValue.getLength()) { OSL_ASSERT(!sType.isEmpty()); -retVal.push_back(make_pair(sType, sbufValue.makeStringAndClear())); +retVal.push_back(std::make_pair(sType, sbufValue.makeStringAndClear())); } return retVal; } #else -vector< pair< OUString, OUString> > parseDN(const OUString& rRawString) +std::vector< std::pair< OUString, OUString> > parseDN(const OUString& rRawString) { -vector< pair > retVal; +std::vector< std::pair > retVal; //bInEscape == true means that the preceding character is an escape character bool bInEscape = false; bool bInValue = false; @@ -268,12 +267,12 @@ vector< pair< OUString, OUString> > parseDN(const OUString& rRawString) OUString retVal; int i = 0; -vector< pair< OUString, OUString > > vecAttrValueOfDN = parseDN(_rRawString); +std::vector< std::pair< OUString, OUString > > vecAttrValueOfDN = parseDN(_rRawString); while ( aIDs[i] ) { OUString sPartId = OUString::createFromAscii( aIDs[i++] ); auto idn = std::find_if(vecAttrValueOfDN.cbegin(), vecAttrValueOfDN.cend(), -[&sPartId](const pair< OUString, OUString >& dn) { return dn.first == sPartId; }); +[&sPartId](const std::pair< OUString, OUString >& dn) { return dn.first == sPartId; }); if (idn != vecAttrValueOfDN.cend()) retVal = idn->second; if (!retVal.isEmpty())
[Libreoffice-commits] core.git: include/ucbhelper ucbhelper/source ucb/source
include/ucbhelper/resultsetmetadata.hxx |2 +- ucb/source/ucp/file/filrset.cxx |2 +- ucbhelper/source/provider/resultsetmetadata.cxx |8 3 files changed, 6 insertions(+), 6 deletions(-) New commits: commit 6d200d8e739595bd4c6310bede7d66e3c05fbb85 Author: Noel Grandin AuthorDate: Wed Oct 6 19:45:33 2021 +0200 Commit: Noel Grandin CommitDate: Wed Oct 6 21:17:18 2021 +0200 loplugin:moveparam in ucbhelper Change-Id: I1b9cc0366fb8e9b2525a56816ae4f76737a31b73 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123184 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/include/ucbhelper/resultsetmetadata.hxx b/include/ucbhelper/resultsetmetadata.hxx index 9c42dc1b788b..856c28a0a873 100644 --- a/include/ucbhelper/resultsetmetadata.hxx +++ b/include/ucbhelper/resultsetmetadata.hxx @@ -105,7 +105,7 @@ public: ResultSetMetaData( const css::uno::Reference< css::uno::XComponentContext >& rxContext, const css::uno::Sequence< css::beans::Property >& rProps, -const std::vector< ResultSetColumnData >& rColumnData ); +std::vector< ResultSetColumnData >&& rColumnData ); /** * Destructor. diff --git a/ucb/source/ucp/file/filrset.cxx b/ucb/source/ucp/file/filrset.cxx index 716c9bbe4b89..74531e226a23 100644 --- a/ucb/source/ucp/file/filrset.cxx +++ b/ucb/source/ucp/file/filrset.cxx @@ -603,7 +603,7 @@ XResultSet_impl::getMetaData() return new ::ucbhelper::ResultSetMetaData( m_pMyShell->m_xContext, m_sProperty, -aColumnData ); +std::move(aColumnData) ); } return new ::ucbhelper::ResultSetMetaData( m_pMyShell->m_xContext, m_sProperty ); diff --git a/ucbhelper/source/provider/resultsetmetadata.cxx b/ucbhelper/source/provider/resultsetmetadata.cxx index fe3d2b7c1e1f..ef4f678b9f5f 100644 --- a/ucbhelper/source/provider/resultsetmetadata.cxx +++ b/ucbhelper/source/provider/resultsetmetadata.cxx @@ -63,8 +63,8 @@ struct ResultSetMetaData_Impl : m_aColumnData( nSize ), m_bObtainedTypes( false ) {} explicit ResultSetMetaData_Impl( -const std::vector< ::ucbhelper::ResultSetColumnData >& rColumnData ) -: m_aColumnData( rColumnData ), m_bObtainedTypes( false ) {} +std::vector< ::ucbhelper::ResultSetColumnData >&& rColumnData ) +: m_aColumnData( std::move(rColumnData) ), m_bObtainedTypes( false ) {} }; } @@ -90,8 +90,8 @@ ResultSetMetaData::ResultSetMetaData( ResultSetMetaData::ResultSetMetaData( const Reference< XComponentContext >& rxContext, const Sequence< Property >& rProps, -const std::vector< ResultSetColumnData >& rColumnData ) -: m_pImpl( new ResultSetMetaData_Impl( rColumnData ) ), +std::vector< ResultSetColumnData >&& rColumnData ) +: m_pImpl( new ResultSetMetaData_Impl( std::move(rColumnData) ) ), m_xContext( rxContext ), m_aProps( rProps ) {
[Libreoffice-commits] core.git: comphelper/source connectivity/source desktop/source include/comphelper include/connectivity ucb/source
comphelper/source/misc/interaction.cxx |4 +- connectivity/source/commontools/TSortIndex.cxx |8 ++-- connectivity/source/commontools/dbtools.cxx |5 +- connectivity/source/commontools/parameters.cxx |2 - connectivity/source/commontools/paramwrapper.cxx|4 +- connectivity/source/drivers/file/FResultSet.cxx |2 - connectivity/source/drivers/odbc/ODatabaseMetaDataResultSet.cxx |6 +-- connectivity/source/drivers/postgresql/pq_array.cxx |2 - connectivity/source/drivers/postgresql/pq_array.hxx |4 +- connectivity/source/drivers/postgresql/pq_databasemetadata.cxx | 18 +- connectivity/source/drivers/postgresql/pq_sequenceresultset.cxx | 10 ++--- connectivity/source/drivers/postgresql/pq_sequenceresultset.hxx |4 +- connectivity/source/drivers/postgresql/pq_sequenceresultsetmetadata.cxx |4 +- connectivity/source/drivers/postgresql/pq_sequenceresultsetmetadata.hxx |2 - connectivity/source/drivers/postgresql/pq_updateableresultset.cxx |2 - connectivity/source/drivers/postgresql/pq_updateableresultset.hxx | 10 ++--- connectivity/source/drivers/postgresql/pq_xcontainer.cxx|6 +-- connectivity/source/inc/TSortIndex.hxx |4 +- connectivity/source/inc/odbc/OResultSetMetaData.hxx |4 +- connectivity/source/manager/mdrivermanager.cxx |8 ++-- desktop/source/deployment/misc/dp_interact.cxx |2 - include/comphelper/interaction.hxx |2 - include/connectivity/paramwrapper.hxx |2 - ucb/source/ucp/file/filinsreq.cxx |2 - ucb/source/ucp/ftp/ftpintreq.cxx|2 - 25 files changed, 60 insertions(+), 59 deletions(-) New commits: commit 7c3990c38ddc5e69c89d9cb0c1a521f144e852f7 Author: Noel Grandin AuthorDate: Wed Oct 6 19:42:52 2021 +0200 Commit: Noel Grandin CommitDate: Wed Oct 6 21:17:01 2021 +0200 loplugin:moveparam in connectivity Change-Id: Iaf3a64effb69fd82c6303d8fa75723ccc5ced543 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123183 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/comphelper/source/misc/interaction.cxx b/comphelper/source/misc/interaction.cxx index 5a24075504b7..e1fd64d9b04b 100644 --- a/comphelper/source/misc/interaction.cxx +++ b/comphelper/source/misc/interaction.cxx @@ -36,9 +36,9 @@ namespace comphelper } OInteractionRequest::OInteractionRequest(const Any& rRequestDescription, -std::vector> const& rContinuations) +std::vector>&& rContinuations) : m_aRequest(rRequestDescription) -, m_aContinuations(rContinuations) +, m_aContinuations(std::move(rContinuations)) { } diff --git a/connectivity/source/commontools/TSortIndex.cxx b/connectivity/source/commontools/TSortIndex.cxx index 6b94216a3719..44a883dc86c4 100644 --- a/connectivity/source/commontools/TSortIndex.cxx +++ b/connectivity/source/commontools/TSortIndex.cxx @@ -94,10 +94,10 @@ struct TKeyValueFunc return pKeySet; } -OSortIndex::OSortIndex( const std::vector& _aKeyType, -const std::vector& _aAscending) -:m_aKeyType(_aKeyType) -,m_aAscending(_aAscending) +OSortIndex::OSortIndex( std::vector&& _aKeyType, +std::vector&& _aAscending) +:m_aKeyType(std::move(_aKeyType)) +,m_aAscending(std::move(_aAscending)) ,m_bFrozen(false) { } diff --git a/connectivity/source/commontools/dbtools.cxx b/connectivity/source/commontools/dbtools.cxx index e5e5dcdabbb3..40a07679ba96 100644 --- a/connectivity/source/commontools/dbtools.cxx +++ b/connectivity/source/commontools/dbtools.cxx @@ -1633,7 +1633,8 @@ namespace std::vector > m_aSet; Reference m_xSource; public: -OParameterWrapper(const std::vector >& _aSet,const Reference& _xSource) : m_aSet(_aSet),m_xSource(_xSource){} +OParameterWrapper(std::vector >&& _aSet,const Reference& _xSource) +: m_aSet(std::move(_aSet)), m_xSource(_xSource) {} private: // css::container::XElementAccess virtual Type SAL_CALL getElementType() override @@ -1717,7 +1718,7 @@ void askForParameters(const Reference< XSingleSelectQueryComposer >& _xComposer, rtl::Reference pParams = new OParameterContinuation; // the request ParametersRequest aRequest; -Reference xWrappedParameters = new OParameterWrapper(aNewParameterSet,xParamsAsIndicies); +Reference xWrappedParameters = new OParameterWrapper(std:
[Libreoffice-commits] core.git: sw/inc
sw/inc/strings.hrc |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 46a2b36aefde5de7abeaca230973cf0d47b9a505 Author: Andrea Gelmini AuthorDate: Wed Oct 6 17:00:34 2021 +0200 Commit: Julien Nabet CommitDate: Wed Oct 6 20:48:38 2021 +0200 Fix typo Change-Id: I2f229b95c997a6e4f87f3d91fab1bf299cfe9670 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123149 Tested-by: Jenkins Reviewed-by: Julien Nabet diff --git a/sw/inc/strings.hrc b/sw/inc/strings.hrc index baf845d9a150..852e46ec9450 100644 --- a/sw/inc/strings.hrc +++ b/sw/inc/strings.hrc @@ -404,7 +404,7 @@ #define STR_CONTENT_TYPE_SINGLE_FOOTNOTE NC_("STR_CONTENT_TYPE_SINGLE_FOOTNOTE", "Footnote or Endnote") #define STR_CONTENT_FOOTNOTENC_("STR_CONTENT_FOOTNOTE", "Footnote") #define STR_CONTENT_ENDNOTE NC_("STR_CONTENT_ENDNOTE", "Endnote") -#define STR_FOOTNOTE_ENDNOTE_SEPARATOR_TIP NC_("STR_FOOTNOTE_ENDNOTE_SEPARATOR_TIP", "Foonotes are listed above this line and Endnotes are listed below") +#define STR_FOOTNOTE_ENDNOTE_SEPARATOR_TIP NC_("STR_FOOTNOTE_ENDNOTE_SEPARATOR_TIP", "Footnotes are listed above this line and Endnotes are listed below") #define STR_DEFINE_NUMBERFORMAT NC_("STR_DEFINE_NUMBERFORMAT", "Additional formats...") #define RID_STR_SYSTEM NC_("RID_STR_SYSTEM", "[System]") #define STR_MULT_INTERACT_HYPH_WARN NC_("STR_MULT_INTERACT_HYPH_WARN", "The interactive hyphenation is already active\nin a different document")
[Libreoffice-commits] core.git: svx/source
svx/source/dialog/hdft.cxx | 13 ++--- svx/source/engine3d/float3d.cxx |6 +++--- svx/source/svdraw/svdfmtf.cxx|6 +++--- svx/source/svdraw/svdoashp.cxx |7 +++ svx/source/svdraw/svdotext.cxx |7 +++ svx/source/svdraw/svdpdf.cxx | 13 +++-- svx/source/tbxctrls/grafctrl.cxx |7 +++ svx/source/unodraw/unomtabl.cxx |2 +- svx/source/xoutdev/xattr.cxx |4 ++-- svx/source/xoutdev/xpool.cxx |6 ++ 10 files changed, 33 insertions(+), 38 deletions(-) New commits: commit 7c1742761317a4b074a0fba6e9d7720aba5b838b Author: Noel Grandin AuthorDate: Wed Oct 6 16:20:54 2021 +0200 Commit: Noel Grandin CommitDate: Wed Oct 6 19:38:06 2021 +0200 use SfxItemSetFixed in svx Change-Id: I2b31d586ace6720b9bfc223f78874bf347d64521 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123143 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/svx/source/dialog/hdft.cxx b/svx/source/dialog/hdft.cxx index d687d0ba6fa0..b20d60aacc35 100644 --- a/svx/source/dialog/hdft.cxx +++ b/svx/source/dialog/hdft.cxx @@ -529,10 +529,10 @@ IMPL_LINK_NOARG(SvxHFPage, BackgroundHdl, weld::Button&, void) if(mbEnableDrawingLayerFillStyles) { -pBBSet.reset(new SfxItemSet( -*GetItemSet().GetPool(), -svl::Items)); // XPropertyLists for Color, Gradient, Hatch and Graphic fills +pBBSet.reset(new SfxItemSetFixed + // XPropertyLists for Color, Gradient, Hatch and Graphic fills +(*GetItemSet().GetPool())); // Keep it valid pBBSet->MergeRange(nOuter, nOuter); pBBSet->MergeRange(nInner, nInner); @@ -567,9 +567,8 @@ IMPL_LINK_NOARG(SvxHFPage, BackgroundHdl, weld::Button&, void) { const sal_uInt16 nBrush(GetWhich(SID_ATTR_BRUSH)); -pBBSet.reset( new SfxItemSet( -*GetItemSet().GetPool(), -svl::Items) ); +pBBSet.reset( new SfxItemSetFixed +(*GetItemSet().GetPool()) ); // Keep it valid pBBSet->MergeRange(nBrush, nBrush); pBBSet->MergeRange(nOuter, nOuter); diff --git a/svx/source/engine3d/float3d.cxx b/svx/source/engine3d/float3d.cxx index 9cd402fc5c95..266b1e135db1 100644 --- a/svx/source/engine3d/float3d.cxx +++ b/svx/source/engine3d/float3d.cxx @@ -464,9 +464,9 @@ void Svx3DWin::Update( SfxItemSet const & rAttrs ) if(mpRemember2DAttributes) mpRemember2DAttributes->ClearItem(); else -mpRemember2DAttributes = std::make_unique(*rAttrs.GetPool(), -svl::Items); +mpRemember2DAttributes = std::make_unique>(*rAttrs.GetPool()); SfxWhichIter aIter(*mpRemember2DAttributes); sal_uInt16 nWhich(aIter.FirstWhich()); diff --git a/svx/source/svdraw/svdfmtf.cxx b/svx/source/svdraw/svdfmtf.cxx index e62186225370..93c5da9278e1 100644 --- a/svx/source/svdraw/svdfmtf.cxx +++ b/svx/source/svdraw/svdfmtf.cxx @@ -107,9 +107,9 @@ ImpSdrGDIMetaFileImport::ImpSdrGDIMetaFileImport( mpVD->SetLineColor(); mpVD->SetFillColor(); maOldLineColor.SetRed( mpVD->GetLineColor().GetRed() + 1 ); -mpLineAttr = std::make_unique(rModel.GetItemPool(), svl::Items); -mpFillAttr = std::make_unique(rModel.GetItemPool(), svl::Items); -mpTextAttr = std::make_unique(rModel.GetItemPool(), svl::Items); +mpLineAttr = std::make_unique>(rModel.GetItemPool()); +mpFillAttr = std::make_unique>(rModel.GetItemPool()); +mpTextAttr = std::make_unique>(rModel.GetItemPool()); checkClip(); } diff --git a/svx/source/svdraw/svdoashp.cxx b/svx/source/svdraw/svdoashp.cxx index 20a072b912ab..169f1782dd98 100644 --- a/svx/source/svdraw/svdoashp.cxx +++ b/svx/source/svdraw/svdoashp.cxx @@ -1387,10 +1387,9 @@ void SdrObjCustomShape::AdaptTextMinSize() if (!bChanged) return; -SfxItemSet aSet( -*GetObjectItemSet().GetPool(), -svl::Items); // contains SDRATTR_TEXT_MAXFRAMEWIDTH +SfxItemSetFixed // contains SDRATTR_TEXT_MAXFRAMEWIDTH +aSet(*GetObjectItemSet().GetPool()); if(bResizeShapeToFitText) { diff --git a/svx/source/svdraw/svdotext.cxx b/svx/source/svdraw/svdotext.cxx index c21a19db27b5..be570fff6089 100644 --- a/svx/source/svdraw/svdotext.cxx +++ b/svx/source/svdraw/svdotext.cxx @@ -530,10 +530,9 @@ void SdrTextObj::AdaptTextMinSize() // No auto grow requested. Bail out. return; -SfxItemSet aSet( -*GetObjectItemSet().GetPool(), -svl::Items); // contains SDRATTR_TEXT_MAXFRAMEWIDTH +SfxItemSetFixed // contains SDRATTR_TEXT_MAXFRAMEWIDTH +aSet(*GetObjectItemSet().GetPool()); if(bW) { diff --git a/svx/source/svdraw/svdpdf.cxx b/svx/source/svdraw/svdpdf.cxx index ee6a59102c5d..789e5d360477 100644 --- a/svx/source/svdraw/svdpdf.cxx +++ b/svx/source/svdraw
[Libreoffice-commits] core.git: basegfx/source include/basegfx slideshow/source
basegfx/source/tools/keystoplerp.cxx |4 ++-- include/basegfx/utils/keystoplerp.hxx|2 +- slideshow/source/engine/activities/continuouskeytimeactivitybase.cxx |2 +- 3 files changed, 4 insertions(+), 4 deletions(-) New commits: commit e0117eff7f16277e7d6df18be60a6d6138b8611c Author: Noel Grandin AuthorDate: Wed Oct 6 15:53:21 2021 +0200 Commit: Noel Grandin CommitDate: Wed Oct 6 19:37:44 2021 +0200 loplugin:moveparam in basegfx Change-Id: I68d0de099641ae5b2ae92f46e86bdf4a43c468a4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123141 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/basegfx/source/tools/keystoplerp.cxx b/basegfx/source/tools/keystoplerp.cxx index 0610dd19c228..e5d0d76304e2 100644 --- a/basegfx/source/tools/keystoplerp.cxx +++ b/basegfx/source/tools/keystoplerp.cxx @@ -42,8 +42,8 @@ static void validateInput(const std::vector& rKeyStops) namespace basegfx::utils { -KeyStopLerp::KeyStopLerp( const std::vector& rKeyStops ) : -maKeyStops(rKeyStops), +KeyStopLerp::KeyStopLerp( std::vector&& rKeyStops ) : +maKeyStops(std::move(rKeyStops)), mnLastIndex(0) { validateInput(maKeyStops); diff --git a/include/basegfx/utils/keystoplerp.hxx b/include/basegfx/utils/keystoplerp.hxx index 302020ac337e..f8a821e7a58f 100644 --- a/include/basegfx/utils/keystoplerp.hxx +++ b/include/basegfx/utils/keystoplerp.hxx @@ -53,7 +53,7 @@ namespace basegfx::utils need key stop lerping in the first place). All elements must be of monotonically increasing value. */ -explicit KeyStopLerp( const std::vector& rKeyStops ); +explicit KeyStopLerp( std::vector&& rKeyStops ); /** Create lerper with given sequence of stops diff --git a/slideshow/source/engine/activities/continuouskeytimeactivitybase.cxx b/slideshow/source/engine/activities/continuouskeytimeactivitybase.cxx index 38d3590da3b6..db25d2dd4333 100644 --- a/slideshow/source/engine/activities/continuouskeytimeactivitybase.cxx +++ b/slideshow/source/engine/activities/continuouskeytimeactivitybase.cxx @@ -28,7 +28,7 @@ namespace slideshow::internal { ContinuousKeyTimeActivityBase::ContinuousKeyTimeActivityBase( const ActivityParameters& rParms ) : SimpleContinuousActivityBase( rParms ), -maLerper( rParms.maDiscreteTimes ) +maLerper( std::vector(rParms.maDiscreteTimes) ) { ENSURE_OR_THROW( rParms.maDiscreteTimes.size() > 1, "ContinuousKeyTimeActivityBase::ContinuousKeyTimeActivityBase(): key times vector must have two entries or more" );
[Libreoffice-commits] core.git: helpcontent2
helpcontent2 |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit f25d0deaa71f7e48f2f0255150ae62fe76ce6835 Author: Olivier Hallot AuthorDate: Wed Oct 6 13:32:22 2021 -0300 Commit: Gerrit Code Review CommitDate: Wed Oct 6 18:32:22 2021 +0200 Update git submodules * Update helpcontent2 from branch 'master' to e11fca7e6ef36de4e49473b3ff3126678fd41225 - tdf#140781 Improve Help for Text (encoded) filter options -Regenerated convertfilters.xhp -Added examples from start_parameters.xhp -Updated pyhon script -refactor xml Change-Id: I730aa77b87133701c2beb3efc9559f7145ce15bd Reviewed-on: https://gerrit.libreoffice.org/c/help/+/123150 Tested-by: Jenkins Reviewed-by: Olivier Hallot diff --git a/helpcontent2 b/helpcontent2 index 898c44caff86..e11fca7e6ef3 16 --- a/helpcontent2 +++ b/helpcontent2 @@ -1 +1 @@ -Subproject commit 898c44caff86cd05b2e11d977d12296f644c16f2 +Subproject commit e11fca7e6ef36de4e49473b3ff3126678fd41225
[Libreoffice-commits] help.git: helpers/convertfilters.py source/text
helpers/convertfilters.py | 26 +- source/text/shared/00/0215.xhp| 23 -- source/text/shared/guide/convertfilters.xhp | 295 +- source/text/shared/guide/start_parameters.xhp | 66 +++-- 4 files changed, 224 insertions(+), 186 deletions(-) New commits: commit e11fca7e6ef36de4e49473b3ff3126678fd41225 Author: Olivier Hallot AuthorDate: Wed Oct 6 12:01:17 2021 -0300 Commit: Olivier Hallot CommitDate: Wed Oct 6 18:32:21 2021 +0200 tdf#140781 Improve Help for Text (encoded) filter options -Regenerated convertfilters.xhp -Added examples from start_parameters.xhp -Updated pyhon script -refactor xml Change-Id: I730aa77b87133701c2beb3efc9559f7145ce15bd Reviewed-on: https://gerrit.libreoffice.org/c/help/+/123150 Tested-by: Jenkins Reviewed-by: Olivier Hallot diff --git a/helpers/convertfilters.py b/helpers/convertfilters.py index dcb25af00..f3d0e7060 100755 --- a/helpers/convertfilters.py +++ b/helpers/convertfilters.py @@ -11,7 +11,7 @@ # # Run this script followed by the path of instdir/share/registry/ # i.e.: ./convertfilters.py /path/to/source/core/instdir/share/registry -# +# # Requires Python 3.6 or greater. import os @@ -35,9 +35,9 @@ if not os.path.exists(registry_dir): modules = ["writer.xcd","calc.xcd","impress.xcd","draw.xcd","math.xcd","base.xcd","graphicfilter.xcd"] def gen_id(apiname): -'''This function accepts module name and an API Name of the filter, and then generate +'''This function accepts module name and an API Name of the filter, and then generate a unique ID. API Names are used since they are unique within the page. - + Do not use random numbers or sequence-count numbers here since it will cause all words to be "fuzzy" in PO files when the xhp file is regenerated. ''' @@ -45,7 +45,7 @@ def gen_id(apiname): apiname = apiname.replace("(", "_") apiname = apiname.replace(")", "_") apiname = apiname.replace("/", "_") - + return apiname output = ''' @@ -78,10 +78,16 @@ output = ''' -Tables with filter names for command line document conversion. +Tables with filter names for command line document conversion. +Usage +Filter names are used when importing and exporting files in alien formats and converting files formats through the command line. +soffice --convert-to OutputFileExtension[:OutputFilterName[:OutputFilterParams[,param]]] [--outdir output_dir] + +soffice --infilter="InputFilterName[:InputFilterParams[,param]]" +--infilter="Text (encoded):UTF8,LF,Liberation Mono,en-US". ''' output += ''' @@ -107,7 +113,7 @@ for module in modules: for filter_node in filternodes: uiname = str(filter_node.findtext('prop[@oor:name="UIName"]/value', namespaces=namespaces)) apiname = filter_node.attrib['{' + namespaces['oor'] + '}name'] - + filter_type = str(filter_node.findtext('prop[@oor:name="Type"]/value', namespaces=namespaces)) type_node = tree.find( f'oor:component-data[@oor:name="Types"]/node/node[@oor:name="{filter_type}"]', @@ -117,11 +123,11 @@ for module in modules: extensions = str(type_node.findtext('prop[@oor:name="Extensions"]/value', namespaces=namespaces)) except AttributeError: continue - + filter_data = [uiname, apiname, mediatype, extensions] print(filter_data) filters.append(filter_data) - + output += f'\ \n\ \n\ @@ -156,13 +162,13 @@ for module in modules: {item[0]}\n\ \n\ \n\ -{item[1]}\n\ +"{item[1]}"\n\ \n\ \n\ {item[2]} ({item[3]})\n\ \n\ \n' - + output += f'\ \n\ \n' diff --git a/source/text/shared/00/0215.xhp b/source/text/shared/00/0215.xhp index 38446781c..ebfd52b05 100644 --- a/source/text/shared/00/0215.xhp +++ b/source/text/shared/00/0215.xhp @@ -1,6 +1,4 @@ - - - @@ -32,32 +29,34 @@ -ASCII Filter Options +ASCII Filter Options You can specify which options, such as basic font, language, character set, or break, are imported or exported with a text document. The dialog appears when you load an ASCII file with the filter "Text Encoded" or when you save the document the first time, or when you "save as" with another name. -Properties +Properties Defines the settings for importing or exporting your file. When exporting, only the character set and paragraph break can be defined. -Character set +Character set Specifies the character set of the file for export or import. +Include byte-order mark +For Unicode character set only, a byte order mark (BOM) is a sequence of bytes used to indicate Unicode encoding of a text file. The presence of the UTF-8 BOM is
Re: _ssl.cpython-3.8.so does not exist in the tarball
Found my mistake. I should have set the --enable-python flag in autogen to system Apologies for the noise. Alex On 30/09/2021 10:14, mcmurchy1917techy wrote: Hi Michael Thanks for the reply The build.log for python3 contains checking whether compiling and linking against OpenSSL works... yes checking for X509_VERIFY_PARAM_set1_host in libssl... yes checking for --with-ssl-default-suites... python configure: creating ./config.status config.status: creating Makefile.pre config.status: creating Misc/python.pc config.status: creating Misc/python-embed.pc config.status: creating Misc/python-config.sh config.status: creating Modules/ld_so_aix config.status: creating pyconfig.h creating Modules/Setup.local creating Makefile If you want a release build with all stable optimizations active (PGO, etc), please run ./configure --enable-optimizations make[2]: Entering directory '/home/master/master/workdir/UnpackedTarball/python3' after a short while it fails with The following modules found by detect_modules() in setup.py, have been built by the Makefile instead, as configured by the Setup files: _abc atexit pwd time Failed to build these modules: _ssl Could not build the ssl module! Python requires an OpenSSL 1.0.2 or 1.1 compatible libssl with X509_VERIFY_PARAM_set1_host(). LibreSSL 2.6.4 and earlier do not provide the necessary APIs, https://github.com/libressl-portable/portable/issues/381 running build_scripts On my system I ran strings --print-file-name $(locate libssl) | grep X509_VERIFY_PARAM_set1_host which returned /lib/libssl.so.1.1: X509_VERIFY_PARAM_set1_host /lib64/libssl.so.1.1: X509_VERIFY_PARAM_set1_host /usr/lib/libssl.so: X509_VERIFY_PARAM_set1_host /usr/lib/libssl.so.1.1: X509_VERIFY_PARAM_set1_host /usr/lib64/libssl.so: X509_VERIFY_PARAM_set1_host /usr/lib64/libssl.so.1.1: X509_VERIFY_PARAM_set1_host So is it telling me that this python3 build is seeing X509_VERIFY_PARAM_set1_host at the beginning, but not at the end? Alex On 29/09/2021 09:41, Michael Stahl wrote: On 27.09.21 08:52, mcmurchy1917techy wrote: Did a pull over the weekend. Compiled and got this error. [build DEP] LNK:Library/libcuilo.so [build DEP] LNK:Library/libcuilo.so [build LNK] Library/libcuilo.so /home/master/master/external/python3/ExternalPackage_python3.mk:46: *** file /home/master/master/workdir/UnpackedTarball/python3/LO_lib/_ssl.cpython-3.8.so does not exist in the tarball. Stop. make[1]: *** Waiting for unfinished jobs make: *** [Makefile:288: build] Error 2 the problem is that python's configure equivalent is far too magical in nature and will auto-detect what dependencies it can find and then enable the corresponding modules. for some reason the internal python cannot find the OpenSSL library (either on system or internal, depending on --with-system-openssl) and thus it did not build the ssl module and the earliest point where we can detect failure is that the file doesn't exsit when trying to copy it to instdir. My autogen has this flag --enable-python=internal. If I remove the flag --enable-python=internal libreoffice compiles successfully. I'm a bit behind the curve, the last time I compiled was June 12th also with --enable-python=internal, that was successful What do I need to do to resolve? try to figure out from the workdir/UnpackedTarball/python3/build.log why OpenSSL isn't found. My system has the python3 3.9.6 package. Have I got myself ahead of the curve? that should be unrelated.
[Libreoffice-commits] core.git: sw/uiconfig
sw/uiconfig/swriter/ui/mmresultsavedialog.ui | 188 +++ 1 file changed, 108 insertions(+), 80 deletions(-) New commits: commit 6da7e4de06b413a52070ac5414b7e1989eedb322 Author: Gabor Kelemen AuthorDate: Wed Sep 15 23:43:45 2021 +0200 Commit: Gabor Kelemen CommitDate: Wed Oct 6 17:15:25 2021 +0200 (related) tdf#144483 Add Range frame above range selector spinboxes to indicate better this is independent from the Save as options Change-Id: I1855c84dcb11f8db1da458eaa8f8dc4b239e31ec Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122164 Tested-by: Jenkins Reviewed-by: Heiko Tietze diff --git a/sw/uiconfig/swriter/ui/mmresultsavedialog.ui b/sw/uiconfig/swriter/ui/mmresultsavedialog.ui index 41e9896ade33..639c68bfd390 100644 --- a/sw/uiconfig/swriter/ui/mmresultsavedialog.ui +++ b/sw/uiconfig/swriter/ui/mmresultsavedialog.ui @@ -87,7 +87,7 @@ False True end -0 +2 @@ -99,7 +99,7 @@ 0 none - + True False @@ -148,101 +148,129 @@ 1 + + + + +True +False +Save As Options + + + + + + + +False +True +0 + + + + +Rangeframe +True +False +False +False +0 +none + + + +True +False +12 +6 +True +True +12 - - + +_From True -False -12 - - -_From -True -True -False -True -True - - - - - -Selects a range of records starting at the record number in the From box and ending at the record number in the To box. - - - - -0 -0 - - - - -True -False -_To -True -to +True +False +True +True + + + + + +Selects a range of records starting at the record number in the From box and ending at the record number in the To box. - -2 -0 - - - -True -True -True -1 -True -adjustment1 - - - - - -Enter the number of the first record to include in the mail merge. - - + + +0 +0 + + + + +True +False +_To +True +to + + +2 +0 + + + + +True +True +True +1 +True +adjustment1 +1 + + + + + +Enter the number of the first record to include in the mail merge. - -1 -
[Libreoffice-commits] core.git: helpcontent2
helpcontent2 |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit fd0db00ed26b9cfef9280ed8889dc3cde9756c75 Author: Andrea Gelmini AuthorDate: Wed Oct 6 17:03:35 2021 +0200 Commit: Gerrit Code Review CommitDate: Wed Oct 6 17:03:35 2021 +0200 Update git submodules * Update helpcontent2 from branch 'master' to 898c44caff86cd05b2e11d977d12296f644c16f2 - Fix typo Change-Id: I25ba4f1178a02aa4337d1310261a32ed1dbfd3e5 Reviewed-on: https://gerrit.libreoffice.org/c/help/+/123148 Tested-by: Jenkins Reviewed-by: Andrea Gelmini diff --git a/helpcontent2 b/helpcontent2 index 8589981a5f5d..898c44caff86 16 --- a/helpcontent2 +++ b/helpcontent2 @@ -1 +1 @@ -Subproject commit 8589981a5f5dbe83cff6bdc86db01e54779a4255 +Subproject commit 898c44caff86cd05b2e11d977d12296f644c16f2
[Libreoffice-commits] help.git: source/text
source/text/swriter/guide/page_break.xhp |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 898c44caff86cd05b2e11d977d12296f644c16f2 Author: Andrea Gelmini AuthorDate: Wed Oct 6 17:00:15 2021 +0200 Commit: Andrea Gelmini CommitDate: Wed Oct 6 17:03:34 2021 +0200 Fix typo Change-Id: I25ba4f1178a02aa4337d1310261a32ed1dbfd3e5 Reviewed-on: https://gerrit.libreoffice.org/c/help/+/123148 Tested-by: Jenkins Reviewed-by: Andrea Gelmini diff --git a/source/text/swriter/guide/page_break.xhp b/source/text/swriter/guide/page_break.xhp index f96577d01..d9c6b50ed 100644 --- a/source/text/swriter/guide/page_break.xhp +++ b/source/text/swriter/guide/page_break.xhp @@ -67,7 +67,7 @@ To Quickly Switch Between Portrait and Landscape Page Layout - Read the help page Changing Page Orientation to learn more about advanced configutaions that can be defined concerning page orientation. + Read the help page Changing Page Orientation to learn more about advanced configurations that can be defined concerning page orientation.
ESC meeting agenda: 2021-10-07 16:00 Berlin time
Hi, The prototype agenda is below. Extra items are appreciated either in this document or as a reply to this mail: https://nextcloud.documentfoundation.org/apps/files/?dir=/Common2/esc-minutes You can join using Jitsi here: https://jitsi.documentfoundation.org/esc Regards, Miklos * Present: + * Completed Action Items: + None * Pending Action Items: + send a short mail about the openssh update to the dev list (Heiko) * Release Engineering update (Cloph) + 7.2 status: 7.2.2 rc2 + 7.1 status: 7.1.7 rc1 + Remotes: Android, iOS + Android viewer * Documentation (Olivier) * UX Update (Heiko) + Bugzilla (topicUI) statistics 257(257) (topicUI) bugs open, 157(157) (needsUXEval) needs to be evaluated by the UXteam + Updates: BZ changes 1 week 1 month 3 months 12 months added 10(1) 17(-1)42(-1) 92(-1) commented 90(40) 224(10) 751(9) 3302(-43) removed 0(0) 2(-1) 6(-3) 36(-1) resolved 9(7) 27(-2)95(1) 472(-13) + top 10 contributors: Heiko Tietze made 131 changes in 1 month, and 2258 changes in 1 year Foote, V Stuart made 42 changes in 1 month, and 588 changes in 1 year Dieter made 35 changes in 1 month, and 314 changes in 1 year Ross Johnson made 23 changes in 1 month, and 23 changes in 1 year Roman Kuznetsov made 16 changes in 1 month, and 214 changes in 1 year Telesto made 16 changes in 1 month, and 643 changes in 1 year Xisco Fauli made 13 changes in 1 month, and 186 changes in 1 year Nabet, Julien made 11 changes in 1 month, and 51 changes in 1 year Kaganski, Mike made 10 changes in 1 month, and 184 changes in 1 year Adolfo Jayme Barrientos made 9 changes in 1 month, and 52 changes in 1 year * Crash Testing (Caolan) + 6(-1) import failure, 4(+0) export failures + ??? coverity issues + Google / ossfuzz: ?? fuzzers active now * Crash Reporting (Xisco) + 7.2.0.2133(+6) + 7.2.0.372(+0) + 7.2.0.420779(+2973) + 7.2.1.25776(+3378) * Mentoring/EasyHack update (Hossein) committer... 1 week 1 month 3 months12 months open 72(5) 107(-3) 170(-6) 195(0) reviews 386(84)1236(-42)3766(8) 7690(262) merged 260(-47) 1157(-137) 3687(-83)9174(256) abandoned 7(0) 39(-9) 174(-7) 473(7) own commits 194(-64)967(-124) 3028(-16) 12547(-80) review commits 71(26) 310(-28)1019(9) 4271(12) contributor... 1 week 1 month 3 months12 months open 49(13) 78(2) 138(13) 161(14) reviews 766(-38) 2812(-232) 8560(-94) 20298(588) merged 41(15) 143(6) 363(15) 825(40) abandoned 12(-12) 57(7) 131(0) 312(12) own commits 40(31) 135(8) 383(9) 1965(13) review commits 0(0)0(0) 0(0) 0(0) + easyHack statistics: needsDevEval 8(8) needsUXEval 1(1) cleanup_comments 276(276) total 328(328) assigned 27(27) open 274(274) + top 10 contributors: Johnny_M made 80 patches in 1 month, and 759 patches in 1 year Ross Johnson made 20 patches in 1 month, and 20 patches in 1 year Steve Fanning made 4 patches in 1 month, and 60 patches in 1 year Baran Aytas made 4 patches in 1 month, and 5 patches in 1 year Nagy Tibor made 3 patches in 1 month, and 40 patches in 1 year Dániel Arató made 3 patches in 1 month, and 22 patches in 1 year Attila Bakos made 2 patches in 1 month, and 35 patches in 1 year Marco Pinto made 2 patches in 1 month, and 11 patches in 1 year Aleś Bułojčyk made 2 patches in 1 month, and 2 patches in 1 year Ismael Luceno made 2 patches in 1 month, and 2 patches in 1 year + top 10 reviewers: Michael Stahl made 136 review comments in 1 month, and 656 in 1 year Kaganski, Mike made 132 review comments in 1 month, and 512 in 1 year Olivier Hallot made 112 review comments in 1 month, and 736 in 1 year Adolfo Jayme Barrientos made 100 review comments in 1 month, and 554 in 1 year Xisco Fauli made 78 review comments in 1 month, and 540 in 1 year Thorsten Behrens made 62 review comments in 1 month, and 342 in 1 year Németh, László made 56 review comments in 1 month, and 362 in 1 year Vajna, Miklos made 56 review comments in 1 month, and 418 in 1 year Marco Marinello made 46 review comments in 1 month, and 46 in 1 year Grandin, Noel made 42 review comments in 1 month, and 450 in 1 year
[Libreoffice-commits] core.git: svtools/uiconfig vcl/unx
svtools/uiconfig/ui/thineditcontrol.ui |3 +++ vcl/unx/gtk3/gtkdata.cxx |4 +++- vcl/unx/gtk3/gtkinst.cxx | 22 -- 3 files changed, 22 insertions(+), 7 deletions(-) New commits: commit 50a1b6e18ee51aee479495039aba3fdede2711ce Author: Caolán McNamara AuthorDate: Wed Oct 6 14:53:58 2021 +0100 Commit: Caolán McNamara CommitDate: Wed Oct 6 16:55:20 2021 +0200 Related: tdf#141633 similiarly support match spinbutton font size to the desired zoomed font size in the table control Change-Id: I9aafec5b9a236bf5d140fd9b8bfc9000c3f0bf35 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123142 Tested-by: Jenkins Reviewed-by: Caolán McNamara diff --git a/svtools/uiconfig/ui/thineditcontrol.ui b/svtools/uiconfig/ui/thineditcontrol.ui index e2258743f381..e839b02df82c 100644 --- a/svtools/uiconfig/ui/thineditcontrol.ui +++ b/svtools/uiconfig/ui/thineditcontrol.ui @@ -29,6 +29,9 @@ True True False + ++ 0 diff --git a/vcl/unx/gtk3/gtkdata.cxx b/vcl/unx/gtk3/gtkdata.cxx index 26fb4328c6cd..c1381fe89daf 100644 --- a/vcl/unx/gtk3/gtkdata.cxx +++ b/vcl/unx/gtk3/gtkdata.cxx @@ -446,6 +446,7 @@ static GtkStyleProvider* CreateStyleProvider() which would instead be combobox button.small-button if we didn't replace GtkComboBox, see GtkInstanceComboBox for an explanation for why we do that) 1.e) entry in the data browser for tdf#137695 (entry.small-button) + 1.f) spinbutton in the data browser tdf#141633 (spinbutton.small-button) 2) hide the unwanted active tab in an 'overflow' notebook of double-decker notebooks. (tdf#122623) it's nigh impossible to have a GtkNotebook without an active (checked) tab, @@ -454,7 +455,8 @@ static GtkStyleProvider* CreateStyleProvider() GtkCssProvider* pStyleProvider = gtk_css_provider_new(); static const gchar data[] = "button.small-button, toolbar.small-button button, box.small-button button, " - "combobox.small-button *.combo, box#combobox.small-button *.combo, entry.small-button { " + "combobox.small-button *.combo, box#combobox.small-button *.combo, entry.small-button, " + "spinbutton.small-button, spinbutton.small-button entry, spinbutton.small-button button { " "padding: 0; margin-left: 0; margin-right: 0; margin-top: 0; margin-bottom: 0;" "border-width: 0; min-height: 0; min-width: 0; }" "notebook.overflow > header.top > tabs > tab:checked { " diff --git a/vcl/unx/gtk3/gtkinst.cxx b/vcl/unx/gtk3/gtkinst.cxx index 8f116ab36523..762870b912ac 100644 --- a/vcl/unx/gtk3/gtkinst.cxx +++ b/vcl/unx/gtk3/gtkinst.cxx @@ -12263,8 +12263,8 @@ class GtkInstanceEditable : public GtkInstanceWidget, public virtual weld::Entry protected: GtkEditable* m_pEditable; GtkWidget* m_pDelegate; -private: WidgetFont m_aCustomFont; +private: gulong m_nChangedSignalId; gulong m_nInsertTextSignalId; gulong m_nCursorPosSignalId; @@ -12519,11 +12519,6 @@ public: g_signal_handler_unblock(m_pDelegate, m_nActivateSignalId); } -virtual void set_font(const vcl::Font& rFont) override -{ -m_aCustomFont.use_custom_font(&rFont, u"entry"); -} - virtual vcl::Font get_font() override { if (const vcl::Font* pFont = m_aCustomFont.get_custom_font()) @@ -12641,6 +12636,11 @@ public: : GtkInstanceEditable(GTK_WIDGET(pEntry), pBuilder, bTakeOwnership) { } + +virtual void set_font(const vcl::Font& rFont) override +{ +m_aCustomFont.use_custom_font(&rFont, u"entry"); +} }; } @@ -16200,6 +16200,11 @@ public: return gtk_spin_button_get_digits(m_pButton); } +virtual void set_font(const vcl::Font& rFont) override +{ +m_aCustomFont.use_custom_font(&rFont, u"spinbutton"); +} + virtual void disable_notify_events() override { g_signal_handler_block(m_pButton, m_nValueChangedSignalId); @@ -16404,6 +16409,11 @@ public: enable_notify_events(); } +virtual void set_font(const vcl::Font& rFont) override +{ +m_aCustomFont.use_custom_font(&rFont, u"spinbutton"); +} + virtual void disable_notify_events() override { g_signal_handler_block(m_pButton, m_nValueChangedSignalId);
[Libreoffice-commits] core.git: sc/qa sc/source
sc/qa/unit/rangelst_test.cxx | 14 ++ sc/source/core/tool/rangelst.cxx | 10 +- sc/source/ui/unoobj/chart2uno.cxx |8 3 files changed, 27 insertions(+), 5 deletions(-) New commits: commit e7ec79fe36a0f22f10167806da80e3c1f30b36e8 Author: Luboš Luňák AuthorDate: Wed Oct 6 12:57:15 2021 +0200 Commit: Luboš Luňák CommitDate: Wed Oct 6 16:31:35 2021 +0200 ScRangeList::UpdateReference() join all ranges properly (tdf#140901) This is basically a revert of 6eb8634a9f62bfe486ecd2f46, which made this Join() just the last range, probably under the assumption that the function is always called with just one range to update, or to avoid the possibility that Join() removes several items from the list, breaking the next step of the loop. But DeleteArea() may split several ranges, so we need to make sure to Join() all of them. Change-Id: Iea124142335ccdc8fa578344cddce8670c27573d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123135 Tested-by: Jenkins Reviewed-by: Luboš Luňák diff --git a/sc/qa/unit/rangelst_test.cxx b/sc/qa/unit/rangelst_test.cxx index bfd4acd5dae1..4239cc91e8a9 100644 --- a/sc/qa/unit/rangelst_test.cxx +++ b/sc/qa/unit/rangelst_test.cxx @@ -520,6 +520,20 @@ void Test::testUpdateReference_DeleteRow() ScRangeList aList2(ScRange(2,2,0,2,2,0)); aList2.UpdateReference(URM_INSDEL, m_pDoc, ScRange(0,3,0,MAXCOL,MAXROW,0), 0, -1, 0); CPPUNIT_ASSERT(aList2.empty()); + +ScRangeList aList3; +aList3.push_back(ScRange(2,2,0,2,8,0)); +aList3.push_back(ScRange(4,2,0,4,8,0)); +aList3.UpdateReference(URM_INSDEL, m_pDoc, ScRange(2,5,0,MAXCOL,MAXROW,0), 0, -1, 0); +// Verify all ranges in the list have been updated properly. +CPPUNIT_ASSERT_EQUAL(size_t(2), aList3.size()); +CPPUNIT_ASSERT_EQUAL(ScRange(2,2,0,2,7,0), aList3[0]); +CPPUNIT_ASSERT_EQUAL(ScRange(4,2,0,4,7,0), aList3[1]); + +ScRangeList aList4(ScRange(0,0,0,MAXCOL,MAXROW,0)); +ScRangeList aList4Copy = aList4; +aList4.UpdateReference(URM_INSDEL, m_pDoc, ScRange(14,3,0,MAXCOL,7,0), 0, -2, 0); +CPPUNIT_ASSERT_EQUAL(aList4Copy, aList4); } void Test::testUpdateReference_DeleteLastRow() diff --git a/sc/source/core/tool/rangelst.cxx b/sc/source/core/tool/rangelst.cxx index d1b7e598c67e..c1b149d7aee5 100644 --- a/sc/source/core/tool/rangelst.cxx +++ b/sc/source/core/tool/rangelst.cxx @@ -436,7 +436,15 @@ bool ScRangeList::UpdateReference( if( nDx < 0 || nDy < 0 ) { size_t n = maRanges.size(); -Join(maRanges[n-1], true); +for(size_t i = n-1; i > 0;) +{ +Join(maRanges[i], true); +// Join() may merge and remove even more than one item, protect against it. +if(i >= maRanges.size()) +i = maRanges.size()-1; +else +--i; +} } } diff --git a/sc/source/ui/unoobj/chart2uno.cxx b/sc/source/ui/unoobj/chart2uno.cxx index 3ee4f1cde054..5eb7f2cc75e0 100644 --- a/sc/source/ui/unoobj/chart2uno.cxx +++ b/sc/source/ui/unoobj/chart2uno.cxx @@ -2778,7 +2778,7 @@ void ScChart2DataSequence::Notify( SfxBroadcaster& /*rBC*/, const SfxHint& rHint } } -OSL_ENSURE(m_pRangeIndices->size() == aRanges.size(), +assert(m_pRangeIndices->size() == aRanges.size() && "range list and range index list have different sizes."); unique_ptr pUndoRanges; @@ -2791,7 +2791,7 @@ void ScChart2DataSequence::Notify( SfxBroadcaster& /*rBC*/, const SfxHint& rHint if (bChanged) { -OSL_ENSURE(m_pRangeIndices->size() == aRanges.size(), +assert(m_pRangeIndices->size() == aRanges.size() && "range list and range index list have different sizes after the reference update."); // Bring the change back from the range list to the token list. @@ -2813,7 +2813,7 @@ void ScChart2DataSequence::Notify( SfxBroadcaster& /*rBC*/, const SfxHint& rHint if (!m_pRangeIndices || m_pRangeIndices->empty()) { -OSL_FAIL(" faulty range indices"); +assert(false && " faulty range indices"); break; } @@ -2822,7 +2822,7 @@ void ScChart2DataSequence::Notify( SfxBroadcaster& /*rBC*/, const SfxHint& rHint size_t nCount = rRanges.size(); if (nCount != m_pRangeIndices->size()) { -OSL_FAIL("range count and range index count differ."); +assert(false && "range count and range index count differ."); break; }
[Libreoffice-commits] core.git: vcl/unx
vcl/unx/gtk3/gtkinst.cxx | 131 ++- 1 file changed, 73 insertions(+), 58 deletions(-) New commits: commit a693009c28059435ea5bae6d89a76e2243fe7793 Author: Caolán McNamara AuthorDate: Wed Oct 6 12:49:05 2021 +0100 Commit: Caolán McNamara CommitDate: Wed Oct 6 15:56:41 2021 +0200 tdf#141633 use css instead of pango attribs for font size in GtkEntry. Rendering was using the font set via pango attribs, but when measuring the mininum size gtk will use the min size of the widget font so that has to change to allow the GtkEntry to fit the size of the desired font bundle together the setting-font-via-css as "WidgetFont" Change-Id: Ic00d8b84decf528016fe47fc3b142daf3439340d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123138 Tested-by: Jenkins Reviewed-by: Caolán McNamara diff --git a/vcl/unx/gtk3/gtkinst.cxx b/vcl/unx/gtk3/gtkinst.cxx index 95c54ef3f669..8f116ab36523 100644 --- a/vcl/unx/gtk3/gtkinst.cxx +++ b/vcl/unx/gtk3/gtkinst.cxx @@ -9111,6 +9111,55 @@ public: } }; +class WidgetFont +{ +private: +GtkWidget* m_pWidget; +GtkCssProvider* m_pFontCssProvider; +std::unique_ptr m_xFont; +public: +WidgetFont(GtkWidget* pWidget) +: m_pWidget(pWidget) +, m_pFontCssProvider(nullptr) +{ +} + +void use_custom_font(const vcl::Font* pFont, std::u16string_view rCSSSelector) +{ +GtkStyleContext *pWidgetContext = gtk_widget_get_style_context(m_pWidget); +if (m_pFontCssProvider) +{ +gtk_style_context_remove_provider(pWidgetContext, GTK_STYLE_PROVIDER(m_pFontCssProvider)); +m_pFontCssProvider = nullptr; +} + +m_xFont.reset(); + +if (!pFont) +return; + +m_xFont.reset(new vcl::Font(*pFont)); +m_pFontCssProvider = gtk_css_provider_new(); +OUString aBuffer = rCSSSelector + OUString::Concat(" { ") + vcl_font_to_css(*pFont) + OUString::Concat(" }"); +OString aResult = OUStringToOString(aBuffer, RTL_TEXTENCODING_UTF8); +css_provider_load_from_data(m_pFontCssProvider, aResult.getStr(), aResult.getLength()); +gtk_style_context_add_provider(pWidgetContext, GTK_STYLE_PROVIDER(m_pFontCssProvider), + GTK_STYLE_PROVIDER_PRIORITY_APPLICATION); +} + +const vcl::Font* get_custom_font() const +{ +return m_xFont.get(); +} + +~WidgetFont() +{ +if (m_pFontCssProvider) +use_custom_font(nullptr, u""); +assert(!m_pFontCssProvider); +} +}; + class GtkInstanceButton : public GtkInstanceWidget, public virtual weld::Button { private: @@ -12215,7 +12264,7 @@ protected: GtkEditable* m_pEditable; GtkWidget* m_pDelegate; private: -std::optional m_xFont; +WidgetFont m_aCustomFont; gulong m_nChangedSignalId; gulong m_nInsertTextSignalId; gulong m_nCursorPosSignalId; @@ -12311,6 +12360,7 @@ public: #else , m_pDelegate(pWidget) #endif +, m_aCustomFont(m_pWidget) , m_nChangedSignalId(g_signal_connect(m_pEditable, "changed", G_CALLBACK(signalChanged), this)) , m_nInsertTextSignalId(g_signal_connect(m_pEditable, "insert-text", G_CALLBACK(signalInsertText), this)) , m_nCursorPosSignalId(g_signal_connect(m_pEditable, "notify::cursor-position", G_CALLBACK(signalCursorPosition), this)) @@ -12471,18 +12521,13 @@ public: virtual void set_font(const vcl::Font& rFont) override { -m_xFont = rFont; -PangoAttrList* pOrigList = get_attributes(); -PangoAttrList* pAttrList = pOrigList ? pango_attr_list_copy(pOrigList) : pango_attr_list_new(); -update_attr_list(pAttrList, rFont); -set_attributes(pAttrList); -pango_attr_list_unref(pAttrList); +m_aCustomFont.use_custom_font(&rFont, u"entry"); } virtual vcl::Font get_font() override { -if (m_xFont) -return *m_xFont; +if (const vcl::Font* pFont = m_aCustomFont.get_custom_font()) +return *pFont; return GtkInstanceWidget::get_font(); } @@ -16513,8 +16558,7 @@ private: GtkTextBuffer* m_pTextBuffer; GtkAdjustment* m_pVAdjustment; GtkCssProvider* m_pFgCssProvider; -GtkCssProvider* m_pFontCssProvider; -std::optional m_xFont; +WidgetFont m_aCustomFont; int m_nMaxTextLength; gulong m_nChangedSignalId; // we don't disable/enable this one, it's to implement max-length gulong m_nInsertTextSignalId; @@ -16606,7 +16650,7 @@ public: , m_pTextBuffer(gtk_text_view_get_buffer(pTextView)) , m_pVAdjustment(gtk_scrollable_get_vadjustment(GTK_SCROLLABLE(pTextView))) , m_pFgCssProvider(nullptr) -, m_pFontCssProvider(nullptr) +, m_aCustomFont(m_pWidget) , m_nMaxTextLength(0) , m_nChangedSignalId(g_signal_connect(m_pTextB
[Libreoffice-commits] core.git: svgio/source
svgio/source/svgreader/svgcharacternode.cxx | 69 +--- 1 file changed, 43 insertions(+), 26 deletions(-) New commits: commit cb2739767aa1000687beb29d3a5d21ed1ec3ba4e Author: Hossein AuthorDate: Tue Oct 5 14:39:18 2021 +0200 Commit: Miklos Vajna CommitDate: Wed Oct 6 15:43:23 2021 +0200 Cleanup svgcharacternode.cxx * Replacing Ternary conditional operator "?:" with "if" statements * Adding using "namespace drawinglayer::primitive2d;" to avoid long statements Converting this: drawinglayer::primitive2d::TextStrikeout eTextStrikeout = drawinglayer::primitive2d::TEXT_STRIKEOUT_NONE; to this, which is much more readable: TextStrikeout eTextStrikeout = TEXT_STRIKEOUT_NONE; * This is avoided in the header file with only one usage of this namespace Change-Id: I0bbc80a894056806dc03f46df5b62d92c2cd4a0e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123102 Tested-by: Jenkins Reviewed-by: Miklos Vajna diff --git a/svgio/source/svgreader/svgcharacternode.cxx b/svgio/source/svgreader/svgcharacternode.cxx index af03919ccde3..37e41e77bc8e 100644 --- a/svgio/source/svgreader/svgcharacternode.cxx +++ b/svgio/source/svgreader/svgcharacternode.cxx @@ -25,6 +25,8 @@ #include #include +using namespace drawinglayer::primitive2d; + namespace svgio::svgreader { SvgTextPositions::SvgTextPositions() @@ -139,7 +141,7 @@ namespace svgio::svgreader namespace { -class localTextBreakupHelper : public drawinglayer::primitive2d::TextBreakupHelper +class localTextBreakupHelper : public TextBreakupHelper { private: SvgTextPosition&mrSvgTextPosition; @@ -151,9 +153,9 @@ namespace svgio::svgreader public: localTextBreakupHelper( -const drawinglayer::primitive2d::TextSimplePortionPrimitive2D& rSource, +const TextSimplePortionPrimitive2D& rSource, SvgTextPosition& rSvgTextPosition) -: drawinglayer::primitive2d::TextBreakupHelper(rSource), +: TextBreakupHelper(rSource), mrSvgTextPosition(rSvgTextPosition) { } @@ -203,12 +205,12 @@ namespace svgio::svgreader } } - rtl::Reference SvgCharacterNode::createSimpleTextPrimitive( +rtl::Reference SvgCharacterNode::createSimpleTextPrimitive( SvgTextPosition& rSvgTextPosition, const SvgStyleAttributes& rSvgStyleAttributes) const { // prepare retval, index and length - rtl::Reference pRetval; +rtl::Reference pRetval; sal_uInt32 nLength(getText().getLength()); if(nLength) @@ -216,9 +218,9 @@ namespace svgio::svgreader sal_uInt32 nIndex(0); // prepare FontAttribute const SvgStringVector& rFontFamilyVector = rSvgStyleAttributes.getFontFamily(); -OUString aFontFamily = rFontFamilyVector.empty() ? -OUString("Times New Roman") : -rFontFamilyVector[0]; +OUString aFontFamily("Times New Roman"); +if(!rFontFamilyVector.empty()) +aFontFamily=rFontFamilyVector[0]; // #i122324# if the FontFamily name ends on ' embedded' it is probably a re-import // of a SVG export with font embedding. Remove this to make font matching work. This @@ -252,7 +254,7 @@ namespace svgio::svgreader css::lang::Locale aLocale; // prepare TextLayouterDevice -drawinglayer::primitive2d::TextLayouterDevice aTextLayouterDevice; +TextLayouterDevice aTextLayouterDevice; aTextLayouterDevice.setFontAttribute(aFontAttribute, fFontWidth, fFontHeight, aLocale); // prepare TextArray @@ -403,9 +405,9 @@ namespace svgio::svgreader } // get fill color -const basegfx::BColor aFill(rSvgStyleAttributes.getFill() -? *rSvgStyleAttributes.getFill() -: basegfx::BColor(0.0, 0.0, 0.0)); +basegfx::BColor aFill(0, 0, 0); +if(rSvgStyleAttributes.getFill()) +aFill = *rSvgStyleAttributes.getFill(); // prepare TextTransformation basegfx::B2DHomMatrix aTextTransform; @@ -423,10 +425,25 @@ namespace svgio::svgreader // get the fill for decoration as described by SVG. We cannot // have different stroke colors/definitions for those, though const SvgStyleAttributes* pDecoDef = rSvgStyleAttributes.getTextDecorationDefiningSvgStyleAttributes(); -const basegfx::BColor aDecoColor(
[Libreoffice-commits] core.git: sw/uiconfig
sw/uiconfig/swriter/ui/asciifilterdialog.ui | 157 +--- 1 file changed, 77 insertions(+), 80 deletions(-) New commits: commit e467d0e761b0158f9501041ba352d528595e3cdb Author: Olivier Hallot AuthorDate: Wed Oct 6 08:44:34 2021 -0300 Commit: Olivier Hallot CommitDate: Wed Oct 6 15:03:20 2021 +0200 Bump Glade version for asciifilterdialog.ui Change-Id: I80ed80b8f639fc4a53a7ebea3222f3f2e533c913 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123139 Tested-by: Jenkins Reviewed-by: Olivier Hallot diff --git a/sw/uiconfig/swriter/ui/asciifilterdialog.ui b/sw/uiconfig/swriter/ui/asciifilterdialog.ui index 4f6c6e83ff32..1033cf070f9b 100644 --- a/sw/uiconfig/swriter/ui/asciifilterdialog.ui +++ b/sw/uiconfig/swriter/ui/asciifilterdialog.ui @@ -1,32 +1,32 @@ - + -False -6 +False +6 ASCII Filter Options True -0 -0 -dialog +0 +0 +dialog -False +False vertical 12 -False -end +False +end _OK True -True -True -True -True +True +True +True +True True @@ -39,8 +39,8 @@ _Cancel True -True -True +True +True True @@ -53,8 +53,8 @@ _Help True -True -True +True +True True @@ -68,87 +68,87 @@ False True -end +end 0 True -False +False True True -0 -none +0 +none - + True -False +False start -6 -12 12 6 +6 +12 True -False +False end _Character set: -True -charset +True +charset -0 -0 +0 +0 True -False +False end Default fonts: -True -font +True +font -0 -1 +0 +1 True -False +False end Lan_guage: -True -language +True +language -0 -2 +0 +2 True -False +False end _Paragraph break: -True +True -0 -3 +0 +3 True -False +False True @@ -157,14 +157,14 @@ -1 -0 +1 +0 True -False +False True @@ -173,25 +173,25 @@ -1 -1 +1 +
[Libreoffice-commits] core.git: vcl/unx
vcl/unx/gtk3/gtkdata.cxx |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) New commits: commit 10ec02f6fe4cd2c29021b967c255ace3f71424b5 Author: Caolán McNamara AuthorDate: Wed Oct 6 12:02:17 2021 +0100 Commit: Caolán McNamara CommitDate: Wed Oct 6 14:48:45 2021 +0200 Related: tdf#141633 allow "small-button" elements to shrink further so they can go smaller to fit small zoom sizes for the table control Change-Id: I6df47ed57a511e3b00d10075dedfdd9f1edcc477 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123136 Tested-by: Jenkins Reviewed-by: Caolán McNamara diff --git a/vcl/unx/gtk3/gtkdata.cxx b/vcl/unx/gtk3/gtkdata.cxx index d5cc7a5f369b..26fb4328c6cd 100644 --- a/vcl/unx/gtk3/gtkdata.cxx +++ b/vcl/unx/gtk3/gtkdata.cxx @@ -455,8 +455,8 @@ static GtkStyleProvider* CreateStyleProvider() static const gchar data[] = "button.small-button, toolbar.small-button button, box.small-button button, " "combobox.small-button *.combo, box#combobox.small-button *.combo, entry.small-button { " - "padding: 0; margin-left: 0px; margin-right: 0px;" - "min-height: 18px; min-width: 18px; }" + "padding: 0; margin-left: 0; margin-right: 0; margin-top: 0; margin-bottom: 0;" + "border-width: 0; min-height: 0; min-width: 0; }" "notebook.overflow > header.top > tabs > tab:checked { " "box-shadow: none; padding: 0 0 0 0; margin: 0 0 0 0;" "border-image: none; border-image-width: 0 0 0 0;"
[Libreoffice-commits] core.git: 2 commits - sd/source svx/source vcl/jsdialog
sd/source/ui/unoidl/unomodel.cxx|3 ++- svx/source/svdraw/sdrpagewindow.cxx |3 +++ vcl/jsdialog/enabled.cxx|2 ++ 3 files changed, 7 insertions(+), 1 deletion(-) New commits: commit dee282441f3483c49759caff73ed3e1cde13f58d Author: Szymon Kłos AuthorDate: Mon Oct 4 12:25:56 2021 +0200 Commit: Szymon Kłos CommitDate: Wed Oct 6 14:14:36 2021 +0200 lok: fix crash on chart doubleclick in patchPaintWindow backtrace: SdrPageWindow::patchPaintWindow(SdrPaintWindow&) (this=0x0, rPaintWindow=...) at svx/source/svdraw/sdrpagewindow.cxx:168 SdXImpressDocument::paintTile(VirtualDevice&, int, int, int, int, long, long) (this=0x64589d0, rDevice=..., nOutputWidth=180, nOutputHeight=135, nTilePosX=0, nTilePosY=0, nTileWidth=15875, nTileHeight=11906) at sd/source/ui/unoidl/unomodel.cxx:2240 Change-Id: Ie5270c3cc4a40121485d5da756a498ec4fd8bf80 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123044 Tested-by: Jenkins CollaboraOffice Reviewed-by: Szymon Kłos Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123134 Tested-by: Jenkins diff --git a/sd/source/ui/unoidl/unomodel.cxx b/sd/source/ui/unoidl/unomodel.cxx index d064f6434c98..a7d1e8568168 100644 --- a/sd/source/ui/unoidl/unomodel.cxx +++ b/sd/source/ui/unoidl/unomodel.cxx @@ -2223,7 +2223,8 @@ void SdXImpressDocument::paintTile( VirtualDevice& rDevice, { patchedPageWindow = pSdrPageView->FindPageWindow(*getDocWindow()->GetOutDev()); temporaryPaintWindow.reset(new SdrPaintWindow(*pDrawView, rDevice)); -previousPaintWindow = patchedPageWindow->patchPaintWindow(*temporaryPaintWindow); +if (patchedPageWindow) +previousPaintWindow = patchedPageWindow->patchPaintWindow(*temporaryPaintWindow); } } diff --git a/svx/source/svdraw/sdrpagewindow.cxx b/svx/source/svdraw/sdrpagewindow.cxx index 428faa990f39..aeb337d7a8e5 100644 --- a/svx/source/svdraw/sdrpagewindow.cxx +++ b/svx/source/svdraw/sdrpagewindow.cxx @@ -167,6 +167,9 @@ rtl::Reference< sdr::overlay::OverlayManager > const & SdrPageWindow::GetOverlay SdrPaintWindow* SdrPageWindow::patchPaintWindow(SdrPaintWindow& rPaintWindow) { +if (!mpImpl) +return nullptr; + if (!mpImpl->mpOriginalPaintWindow) { // first patch commit 07ed070307e84e9f4f42461b788e5ec62a8f5a4b Author: Szymon Kłos AuthorDate: Mon Oct 4 09:54:36 2021 +0200 Commit: Szymon Kłos CommitDate: Wed Oct 6 14:14:25 2021 +0200 jsdialog: sidebar: fix master page layout value sets fixes: https://github.com/CollaboraOnline/online/issues/3322 Change-Id: Iaed50c19d4a0f45b00ada305fadcb1372aa6ba63 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123037 Tested-by: Jenkins CollaboraOffice Reviewed-by: Szymon Kłos Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123133 Tested-by: Jenkins diff --git a/vcl/jsdialog/enabled.cxx b/vcl/jsdialog/enabled.cxx index 6aa323ed38df..4f490861dbfa 100644 --- a/vcl/jsdialog/enabled.cxx +++ b/vcl/jsdialog/enabled.cxx @@ -95,6 +95,8 @@ bool isBuilderEnabledForSidebar(std::u16string_view rUIFile) || rUIFile == u"modules/simpress/ui/customanimationspanel.ui" || rUIFile == u"modules/simpress/ui/layoutpanel.ui" || rUIFile == u"modules/simpress/ui/masterpagepanel.ui" +|| rUIFile == u"modules/simpress/ui/masterpagepanelall.ui" +|| rUIFile == u"modules/simpress/ui/masterpagepanelrecent.ui" || rUIFile == u"modules/simpress/ui/slidetransitionspanel.ui" || rUIFile == u"modules/simpress/ui/tabledesignpanel.ui" || rUIFile == u"modules/simpress/ui/navigatorpanel.ui"
[Libreoffice-commits] core.git: 2 commits - chart2/source desktop/source
chart2/source/controller/sidebar/ChartElementsPanel.cxx |2 ++ desktop/source/lib/init.cxx |2 ++ 2 files changed, 4 insertions(+) New commits: commit 3b72018b3c3056d422c3474bca30b1a157ae8dc0 Author: Szymon Kłos AuthorDate: Thu Sep 30 10:42:57 2021 +0200 Commit: Szymon Kłos CommitDate: Wed Oct 6 14:14:15 2021 +0200 sidebar: update chart panel on checkbox change This fixes not working checkboxes for "title" and "subtitle" on mobile Change-Id: I126bb020f669c8c4a34687f750a538513cd06eae Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122876 Tested-by: Jenkins CollaboraOffice Reviewed-by: Szymon Kłos Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123132 Tested-by: Jenkins diff --git a/chart2/source/controller/sidebar/ChartElementsPanel.cxx b/chart2/source/controller/sidebar/ChartElementsPanel.cxx index e24cde11ffb1..95f6f09ac00c 100644 --- a/chart2/source/controller/sidebar/ChartElementsPanel.cxx +++ b/chart2/source/controller/sidebar/ChartElementsPanel.cxx @@ -628,6 +628,8 @@ IMPL_LINK(ChartElementsPanel, CheckBoxHdl, weld::Toggleable&, rCheckBox, void) setGridVisible(mxModel, GridType::VERT_MINOR, bChecked); else if (&rCheckBox == mxCBGridHorizontalMinor.get()) setGridVisible(mxModel, GridType::HOR_MINOR, bChecked); + +updateData(); } IMPL_LINK(ChartElementsPanel, EditHdl, weld::Entry&, rEdit, void) commit d25debd3c1a19c52c9d4aa4da4ce8d36de45afdb Author: Szymon Kłos AuthorDate: Fri Apr 23 15:15:00 2021 +0200 Commit: Szymon Kłos CommitDate: Wed Oct 6 14:14:05 2021 +0200 Deduplicate reference marks and cell auto fill messages We use only the last value Change-Id: If3536b5b4bc67755cb7bb73850a590d37675e6a4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114547 Tested-by: Jenkins CollaboraOffice Reviewed-by: Jan Holesovsky Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122106 Reviewed-by: Szymon Kłos Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123131 Tested-by: Jenkins diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx index 15c0eb281a38..d74e253b2298 100644 --- a/desktop/source/lib/init.cxx +++ b/desktop/source/lib/init.cxx @@ -1536,6 +1536,8 @@ void CallbackFlushHandler::queue(const int type, const char* data) case LOK_CALLBACK_WINDOW: case LOK_CALLBACK_CALC_FUNCTION_LIST: case LOK_CALLBACK_INVALIDATE_SHEET_GEOMETRY: +case LOK_CALLBACK_REFERENCE_MARKS: +case LOK_CALLBACK_CELL_AUTO_FILL_AREA: { const auto& pos = std::find(m_queue1.rbegin(), m_queue1.rend(), type); auto pos2 = toQueue2(pos);
[Libreoffice-commits] core.git: vcl/qa
vcl/qa/cppunit/outdev.cxx | 90 -- 1 file changed, 88 insertions(+), 2 deletions(-) New commits: commit 927de6c264d43ae5ad4b32ea38c0d1120ba0ebe1 Author: Chris Sherlock AuthorDate: Wed Sep 29 20:39:38 2021 +1000 Commit: Tomaž Vajngerl CommitDate: Wed Oct 6 14:07:53 2021 +0200 vcl: test OutputDevice::DrawArc(), DrawChord(), DrawPie() and DrawEllipse() Change-Id: Ie1513d75262b4664a3b2620fca27d805d4e780bd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122821 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl diff --git a/vcl/qa/cppunit/outdev.cxx b/vcl/qa/cppunit/outdev.cxx index 93ae28e3a732..ca3b1d0a11be 100644 --- a/vcl/qa/cppunit/outdev.cxx +++ b/vcl/qa/cppunit/outdev.cxx @@ -71,6 +71,10 @@ public: void testDrawPixel(); void testDrawLine(); void testDrawRect(); +void testDrawArc(); +void testDrawEllipse(); +void testDrawPie(); +void testDrawChord(); CPPUNIT_TEST_SUITE(VclOutdevTest); CPPUNIT_TEST(testVirtualDevice); @@ -113,6 +117,10 @@ public: CPPUNIT_TEST(testDrawPixel); CPPUNIT_TEST(testDrawLine); CPPUNIT_TEST(testDrawRect); +CPPUNIT_TEST(testDrawArc); +CPPUNIT_TEST(testDrawEllipse); +CPPUNIT_TEST(testDrawPie); +CPPUNIT_TEST(testDrawChord); CPPUNIT_TEST_SUITE_END(); }; @@ -1160,13 +1168,91 @@ void VclOutdevTest::testDrawRect() MetaRoundRectAction* pRectAction = dynamic_cast(pAction); CPPUNIT_ASSERT_EQUAL_MESSAGE("Rectangle wrong", tools::Rectangle(Point(0, 0), Size(50, 60)), pRectAction->GetRect()); -CPPUNIT_ASSERT_EQUAL_MESSAGE("Rectangle wrong", static_cast(5), +CPPUNIT_ASSERT_EQUAL_MESSAGE("Horizontal round rect wrong", static_cast(5), pRectAction->GetHorzRound()); -CPPUNIT_ASSERT_EQUAL_MESSAGE("Rectangle wrong", static_cast(10), +CPPUNIT_ASSERT_EQUAL_MESSAGE("Vertical round rect wrong", static_cast(10), pRectAction->GetVertRound()); } } +void VclOutdevTest::testDrawEllipse() +{ +ScopedVclPtrInstance pVDev; +GDIMetaFile aMtf; +aMtf.Record(pVDev.get()); + +pVDev->SetOutputSizePixel(Size(1, 100)); +pVDev->DrawEllipse(tools::Rectangle(Point(0, 0), Size(50, 60))); + +MetaAction* pAction = aMtf.GetAction(aMtf.GetActionSize() - 1); +CPPUNIT_ASSERT_EQUAL_MESSAGE("Not a ellipse action", MetaActionType::ELLIPSE, + pAction->GetType()); +MetaEllipseAction* pEllipseAction = dynamic_cast(pAction); +CPPUNIT_ASSERT_EQUAL_MESSAGE("Ellipse rect wrong", tools::Rectangle(Point(0, 0), Size(50, 60)), + pEllipseAction->GetRect()); +} + +void VclOutdevTest::testDrawPie() +{ +ScopedVclPtrInstance pVDev; +GDIMetaFile aMtf; +aMtf.Record(pVDev.get()); + +tools::Rectangle aRect(Point(0, 0), Size(50, 60)); + +pVDev->SetOutputSizePixel(Size(1, 100)); +pVDev->DrawPie(aRect, aRect.TopRight(), aRect.TopCenter()); + +MetaAction* pAction = aMtf.GetAction(aMtf.GetActionSize() - 1); +CPPUNIT_ASSERT_EQUAL_MESSAGE("Not a pie action", MetaActionType::PIE, pAction->GetType()); +MetaPieAction* pPieAction = dynamic_cast(pAction); +CPPUNIT_ASSERT_EQUAL_MESSAGE("Pie rect wrong", aRect, pPieAction->GetRect()); +CPPUNIT_ASSERT_EQUAL_MESSAGE("Pie start point wrong", aRect.TopRight(), + pPieAction->GetStartPoint()); +CPPUNIT_ASSERT_EQUAL_MESSAGE("Pie end point wrong", aRect.TopCenter(), + pPieAction->GetEndPoint()); +} + +void VclOutdevTest::testDrawChord() +{ +ScopedVclPtrInstance pVDev; +GDIMetaFile aMtf; +aMtf.Record(pVDev.get()); + +tools::Rectangle aRect(Point(21, 22), Size(4, 4)); +pVDev->SetOutputSizePixel(Size(1, 100)); +pVDev->DrawChord(aRect, Point(30, 31), Point(32, 33)); + +MetaAction* pAction = aMtf.GetAction(aMtf.GetActionSize() - 1); +CPPUNIT_ASSERT_EQUAL_MESSAGE("Not a chord action", MetaActionType::CHORD, pAction->GetType()); +MetaChordAction* pChordAction = dynamic_cast(pAction); +CPPUNIT_ASSERT_EQUAL_MESSAGE("Chord rect wrong", aRect, pChordAction->GetRect()); +CPPUNIT_ASSERT_EQUAL_MESSAGE("Chord start point wrong", Point(30, 31), + pChordAction->GetStartPoint()); +CPPUNIT_ASSERT_EQUAL_MESSAGE("Chord end point wrong", Point(32, 33), + pChordAction->GetEndPoint()); +} + +void VclOutdevTest::testDrawArc() +{ +ScopedVclPtrInstance pVDev; +GDIMetaFile aMtf; +aMtf.Record(pVDev.get()); + +tools::Rectangle aRect(Point(1, 2), Size(4, 4)); + +pVDev->SetOutputSizePixel(Size(1, 100)); +pVDev->DrawArc(aRect, Point(10, 11), Point(12, 13)); + +MetaAction* pAction = aMtf.GetAction(aMtf.GetActionSize() - 1); +CPPUNIT_ASSERT_EQUAL_MESSAGE("Not a arc
[Libreoffice-commits] core.git: vcl/qa
vcl/qa/cppunit/outdev.cxx | 40 1 file changed, 40 insertions(+) New commits: commit f4d5be05f643e9a483fcbb8441faa4a89c0cb280 Author: Chris Sherlock AuthorDate: Wed Sep 29 17:06:19 2021 +1000 Commit: Tomaž Vajngerl CommitDate: Wed Oct 6 14:07:23 2021 +0200 vcl: test OutputDevice::DrawRect() Change-Id: Ic9ed566d171b3059fbe6de9fcc32ca0af6db7a2d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122820 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl diff --git a/vcl/qa/cppunit/outdev.cxx b/vcl/qa/cppunit/outdev.cxx index 9a93d8402b95..93ae28e3a732 100644 --- a/vcl/qa/cppunit/outdev.cxx +++ b/vcl/qa/cppunit/outdev.cxx @@ -70,6 +70,7 @@ public: void testGetWaveLineSize(); void testDrawPixel(); void testDrawLine(); +void testDrawRect(); CPPUNIT_TEST_SUITE(VclOutdevTest); CPPUNIT_TEST(testVirtualDevice); @@ -111,6 +112,7 @@ public: CPPUNIT_TEST(testGetWaveLineSize); CPPUNIT_TEST(testDrawPixel); CPPUNIT_TEST(testDrawLine); +CPPUNIT_TEST(testDrawRect); CPPUNIT_TEST_SUITE_END(); }; @@ -1127,6 +1129,44 @@ void VclOutdevTest::testDrawLine() } } +void VclOutdevTest::testDrawRect() +{ +{ +ScopedVclPtrInstance pVDev; +GDIMetaFile aMtf; +aMtf.Record(pVDev.get()); + +pVDev->SetOutputSizePixel(Size(1, 100)); +pVDev->DrawRect(tools::Rectangle(Point(0, 0), Size(50, 60))); + +MetaAction* pAction = aMtf.GetAction(aMtf.GetActionSize() - 1); +CPPUNIT_ASSERT_EQUAL_MESSAGE("Not a rect action", MetaActionType::RECT, pAction->GetType()); +MetaRectAction* pRectAction = dynamic_cast(pAction); +CPPUNIT_ASSERT_EQUAL_MESSAGE("Rectangle wrong", tools::Rectangle(Point(0, 0), Size(50, 60)), + pRectAction->GetRect()); +} + +{ +ScopedVclPtrInstance pVDev; +GDIMetaFile aMtf; +aMtf.Record(pVDev.get()); + +pVDev->SetOutputSizePixel(Size(1, 100)); +pVDev->DrawRect(tools::Rectangle(Point(0, 0), Size(50, 60)), 5, 10); + +MetaAction* pAction = aMtf.GetAction(aMtf.GetActionSize() - 1); +CPPUNIT_ASSERT_EQUAL_MESSAGE("Not a rect action", MetaActionType::ROUNDRECT, + pAction->GetType()); +MetaRoundRectAction* pRectAction = dynamic_cast(pAction); +CPPUNIT_ASSERT_EQUAL_MESSAGE("Rectangle wrong", tools::Rectangle(Point(0, 0), Size(50, 60)), + pRectAction->GetRect()); +CPPUNIT_ASSERT_EQUAL_MESSAGE("Rectangle wrong", static_cast(5), + pRectAction->GetHorzRound()); +CPPUNIT_ASSERT_EQUAL_MESSAGE("Rectangle wrong", static_cast(10), + pRectAction->GetVertRound()); +} +} + CPPUNIT_TEST_SUITE_REGISTRATION(VclOutdevTest); CPPUNIT_PLUGIN_IMPLEMENT();
[Libreoffice-commits] core.git: vcl/qa
vcl/qa/cppunit/outdev.cxx | 65 -- 1 file changed, 63 insertions(+), 2 deletions(-) New commits: commit d4b68f063cbb3c490e1ad084c3f9eb30c6a8c93a Author: Chris Sherlock AuthorDate: Wed Sep 29 16:17:40 2021 +1000 Commit: Tomaž Vajngerl CommitDate: Wed Oct 6 14:04:12 2021 +0200 vcl: test OutputDevice::DrawLine() Change-Id: I17691623e28a75080a1a46099796ec24bab3b91d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122819 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl diff --git a/vcl/qa/cppunit/outdev.cxx b/vcl/qa/cppunit/outdev.cxx index 1c5bfe8d98e2..9a93d8402b95 100644 --- a/vcl/qa/cppunit/outdev.cxx +++ b/vcl/qa/cppunit/outdev.cxx @@ -9,6 +9,10 @@ #include +#include +#include + +#include #include #include #include @@ -19,8 +23,6 @@ #include #include -#include - class VclOutdevTest : public test::BootstrapFixture { public: @@ -67,6 +69,7 @@ public: void testShouldDrawWavePixelAsRect(); void testGetWaveLineSize(); void testDrawPixel(); +void testDrawLine(); CPPUNIT_TEST_SUITE(VclOutdevTest); CPPUNIT_TEST(testVirtualDevice); @@ -107,6 +110,7 @@ public: CPPUNIT_TEST(testShouldDrawWavePixelAsRect); CPPUNIT_TEST(testGetWaveLineSize); CPPUNIT_TEST(testDrawPixel); +CPPUNIT_TEST(testDrawLine); CPPUNIT_TEST_SUITE_END(); }; @@ -1066,6 +1070,63 @@ void VclOutdevTest::testDrawPixel() } } +void VclOutdevTest::testDrawLine() +{ +{ +ScopedVclPtrInstance pVDev; +GDIMetaFile aMtf; +aMtf.Record(pVDev.get()); + +pVDev->SetOutputSizePixel(Size(1, 100)); +pVDev->DrawLine(Point(0, 0), Point(0, 50)); + +MetaAction* pAction = aMtf.GetAction(aMtf.GetActionSize() - 1); +CPPUNIT_ASSERT_EQUAL_MESSAGE("Not a line action", MetaActionType::LINE, pAction->GetType()); +MetaLineAction* pLineAction = dynamic_cast(pAction); +CPPUNIT_ASSERT_EQUAL_MESSAGE("Line start has incorrect position", Point(0, 0), + pLineAction->GetStartPoint()); +CPPUNIT_ASSERT_EQUAL_MESSAGE("Line start has incorrect position", Point(0, 50), + pLineAction->GetEndPoint()); +} + +{ +ScopedVclPtrInstance pVDev; +GDIMetaFile aMtf; +aMtf.Record(pVDev.get()); + +LineInfo aLineInfo(LineStyle::Dash, 10); +aLineInfo.SetDashCount(5); +aLineInfo.SetDashLen(10); +aLineInfo.SetDotCount(3); +aLineInfo.SetDotLen(13); +aLineInfo.SetDistance(8); +aLineInfo.SetLineJoin(basegfx::B2DLineJoin::Bevel); + +pVDev->SetOutputSizePixel(Size(1, 100)); +pVDev->DrawLine(Point(0, 0), Point(0, 50), aLineInfo); + +MetaAction* pAction = aMtf.GetAction(aMtf.GetActionSize() - 1); +CPPUNIT_ASSERT_EQUAL_MESSAGE("Not a line action", MetaActionType::LINE, pAction->GetType()); +MetaLineAction* pLineAction = dynamic_cast(pAction); +CPPUNIT_ASSERT_EQUAL_MESSAGE("Line start has incorrect position", Point(0, 0), + pLineAction->GetStartPoint()); +CPPUNIT_ASSERT_EQUAL_MESSAGE("Line start has incorrect position", Point(0, 50), + pLineAction->GetEndPoint()); +CPPUNIT_ASSERT_EQUAL_MESSAGE("Dash count wrong", static_cast(5), + pLineAction->GetLineInfo().GetDashCount()); +CPPUNIT_ASSERT_EQUAL_MESSAGE("Dash len wrong", static_cast(10), + pLineAction->GetLineInfo().GetDashLen()); +CPPUNIT_ASSERT_EQUAL_MESSAGE("Dot count wrong", static_cast(3), + pLineAction->GetLineInfo().GetDotCount()); +CPPUNIT_ASSERT_EQUAL_MESSAGE("Dot len wrong", static_cast(13), + pLineAction->GetLineInfo().GetDotLen()); +CPPUNIT_ASSERT_EQUAL_MESSAGE("Distance wrong", static_cast(8), + pLineAction->GetLineInfo().GetDistance()); +CPPUNIT_ASSERT_EQUAL_MESSAGE("Line join", basegfx::B2DLineJoin::Bevel, + pLineAction->GetLineInfo().GetLineJoin()); +} +} + CPPUNIT_TEST_SUITE_REGISTRATION(VclOutdevTest); CPPUNIT_PLUGIN_IMPLEMENT();
[Libreoffice-commits] core.git: include/vcl vcl/qa
include/vcl/metaact.hxx |2 +- vcl/qa/cppunit/outdev.cxx | 45 + 2 files changed, 46 insertions(+), 1 deletion(-) New commits: commit 4fb0d442316e914d3a75e317d6756d95b920a3e1 Author: Chris Sherlock AuthorDate: Wed Sep 29 12:10:24 2021 +1000 Commit: Tomaž Vajngerl CommitDate: Wed Oct 6 14:03:24 2021 +0200 vcl: test OutputDevice::DrawPixel() Change-Id: I82651c6f41f46bb1097a69f3bcddcac2486a5baa Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122794 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl diff --git a/include/vcl/metaact.hxx b/include/vcl/metaact.hxx index dfdabac2de24..dc14179712e1 100644 --- a/include/vcl/metaact.hxx +++ b/include/vcl/metaact.hxx @@ -130,7 +130,7 @@ public: voidSetColor(Color rColor) { maColor = rColor; } }; -class SAL_DLLPUBLIC_RTTI MetaPointAction final : public MetaAction +class VCL_DLLPUBLIC MetaPointAction final : public MetaAction { private: Point maPt; diff --git a/vcl/qa/cppunit/outdev.cxx b/vcl/qa/cppunit/outdev.cxx index 5bcac7c67f45..1c5bfe8d98e2 100644 --- a/vcl/qa/cppunit/outdev.cxx +++ b/vcl/qa/cppunit/outdev.cxx @@ -66,6 +66,7 @@ public: void testSystemTextColor(); void testShouldDrawWavePixelAsRect(); void testGetWaveLineSize(); +void testDrawPixel(); CPPUNIT_TEST_SUITE(VclOutdevTest); CPPUNIT_TEST(testVirtualDevice); @@ -105,6 +106,7 @@ public: CPPUNIT_TEST(testSystemTextColor); CPPUNIT_TEST(testShouldDrawWavePixelAsRect); CPPUNIT_TEST(testGetWaveLineSize); +CPPUNIT_TEST(testDrawPixel); CPPUNIT_TEST_SUITE_END(); }; @@ -1021,6 +1023,49 @@ void VclOutdevTest::testGetWaveLineSize() } } +void VclOutdevTest::testDrawPixel() +{ +{ +ScopedVclPtrInstance pVDev; +GDIMetaFile aMtf; +aMtf.Record(pVDev.get()); + +pVDev->SetOutputSizePixel(Size(1, 1)); +pVDev->SetLineColor(COL_RED); +pVDev->DrawPixel(Point(0, 0), COL_GREEN); + +CPPUNIT_ASSERT_EQUAL_MESSAGE("Color not green", COL_GREEN, pVDev->GetPixel(Point(0, 0))); + +MetaAction* pAction = aMtf.GetAction(aMtf.GetActionSize() - 1); +CPPUNIT_ASSERT_EQUAL_MESSAGE("Not a pixel action", MetaActionType::PIXEL, + pAction->GetType()); +MetaPixelAction* pPixelAction = dynamic_cast(pAction); +CPPUNIT_ASSERT_EQUAL_MESSAGE("Pixel action has incorrect position", Point(0, 0), + pPixelAction->GetPoint()); +CPPUNIT_ASSERT_EQUAL_MESSAGE("Pixel action is wrong color", COL_GREEN, + pPixelAction->GetColor()); +} + +{ +ScopedVclPtrInstance pVDev; +GDIMetaFile aMtf; +aMtf.Record(pVDev.get()); + +pVDev->SetOutputSizePixel(Size(1, 1)); +pVDev->SetLineColor(COL_RED); +pVDev->DrawPixel(Point(0, 0)); + +CPPUNIT_ASSERT_EQUAL_MESSAGE("Color not red", COL_RED, pVDev->GetPixel(Point(0, 0))); + +MetaAction* pAction = aMtf.GetAction(aMtf.GetActionSize() - 1); +CPPUNIT_ASSERT_EQUAL_MESSAGE("Not a point action", MetaActionType::POINT, + pAction->GetType()); +MetaPointAction* pPointAction = dynamic_cast(pAction); +CPPUNIT_ASSERT_EQUAL_MESSAGE("Pixel action has incorrect position", Point(0, 0), + pPointAction->GetPoint()); +} +} + CPPUNIT_TEST_SUITE_REGISTRATION(VclOutdevTest); CPPUNIT_PLUGIN_IMPLEMENT();
[Libreoffice-commits] core.git: Branch 'distro/lhm/libreoffice-6-4+backports' - sw/source
sw/source/ui/fldui/fldtdlg.cxx |9 - 1 file changed, 8 insertions(+), 1 deletion(-) New commits: commit 53e5bba49f46c6027b104b34c7c807445ee807ff Author: Vasily Melenchuk AuthorDate: Mon Oct 4 17:40:31 2021 +0200 Commit: Thorsten Behrens CommitDate: Wed Oct 6 13:49:10 2021 +0200 tdf#144907: sw ui: allow closing of "Fields" dialog In some cases (described in task) dialog is not closed. This is happens due to not delivered request to SwTextShell::ExecField(). So we could just close dialog explicitly, if Execute() action did fail. Change-Id: I1c712295a21037bc8bb28e2a97e750299b41250c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123059 Tested-by: Jenkins Reviewed-by: Michael Stahl (cherry picked from commit da5580369bfd15857fb21a1f610e393d07abb805) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123152 Tested-by: Thorsten Behrens Reviewed-by: Thorsten Behrens diff --git a/sw/source/ui/fldui/fldtdlg.cxx b/sw/source/ui/fldui/fldtdlg.cxx index 8c1bb998fb85..454e844b0278 100644 --- a/sw/source/ui/fldui/fldtdlg.cxx +++ b/sw/source/ui/fldui/fldtdlg.cxx @@ -110,9 +110,16 @@ void SwFieldDlg::Close() { if (m_bClosing) return; -m_pBindings->GetDispatcher()-> +const SfxPoolItem* pResult = m_pBindings->GetDispatcher()-> Execute(m_bDataBaseMode ? FN_INSERT_FIELD_DATA_ONLY : FN_INSERT_FIELD, SfxCallMode::SYNCHRON|SfxCallMode::RECORD); +if (!pResult) +{ +// If Execute action did fail for whatever reason, this means that request +// to close did fail or wasn't delivered to SwTextShell::ExecField(). +// Just explicitly close dialog in this case. +SfxTabDialogController::EndDialog(); +} } void SwFieldDlg::Initialize(SfxChildWinInfo const *pInfo)
[Libreoffice-commits] core.git: sw/source
sw/source/core/edit/edattr.cxx |6 ++-- sw/source/core/inc/txtfrm.hxx|2 - sw/source/core/text/frmcrsr.cxx |2 - sw/source/core/text/frmform.cxx |8 +++--- sw/source/core/text/frminf.cxx |2 - sw/source/core/text/frmpaint.cxx |4 +-- sw/source/core/text/inftxt.cxx |4 +-- sw/source/core/text/itrcrsr.cxx | 22 sw/source/core/text/itrform2.cxx | 52 +++ sw/source/core/text/itrpaint.cxx | 12 - sw/source/core/text/itrtxt.cxx | 10 +++ sw/source/core/text/itrtxt.hxx |8 +++--- sw/source/core/text/porfld.cxx | 22 sw/source/core/text/porglue.cxx |2 - sw/source/core/text/porlay.cxx | 13 - sw/source/core/text/porlay.hxx | 12 - sw/source/core/text/porlin.cxx |2 - sw/source/core/text/porlin.hxx | 16 ++-- sw/source/core/text/pormulti.cxx | 14 +- sw/source/core/text/pormulti.hxx |2 - sw/source/core/text/porrst.cxx |2 - sw/source/core/text/possiz.hxx | 31 --- sw/source/core/text/txtdrop.cxx | 10 +++ sw/source/core/text/txtfrm.cxx |4 +-- sw/source/core/text/txtftn.cxx |2 - sw/source/core/text/widorp.cxx |4 +-- 26 files changed, 134 insertions(+), 134 deletions(-) New commits: commit 203068319e17377cafb9e298a910f42fde417a21 Author: Aron Budea AuthorDate: Sat Oct 2 06:13:16 2021 +0200 Commit: Miklos Vajna CommitDate: Wed Oct 6 13:42:27 2021 +0200 tdf#144122 Use signed type to avoid stealthy underflow 301278b656e76b6f42af5cf8a6f5c6c02acfffeb and 6fdd0a3f8b3448a9a246496191908c92156cc38b switched some sal_uInt16 types to sal_uInt32. Additional commits related to the change: 9e075acf2bf1ce6c43fdf5b601507ee0663bd691 and 2634bc59092b24217d984a5845365d703bdb08d2. A fallout from this change was tdf#144305, fixed via 0c3e47cc2f0570a7cd8ff4889763991a86b29f26. Instead of adding further casts to force conversion to signed to avoid unsigned types underflowing into large positive numbers, convert these types to signed SwTwips. Change-Id: Icb7fbae79621d452cd03bb01dc620f60a26f1db0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123014 Tested-by: Jenkins Reviewed-by: Miklos Vajna diff --git a/sw/source/core/edit/edattr.cxx b/sw/source/core/edit/edattr.cxx index 2cb6f41b2484..030e9dd9d088 100644 --- a/sw/source/core/edit/edattr.cxx +++ b/sw/source/core/edit/edattr.cxx @@ -536,10 +536,10 @@ bool SwEditShell::IsMoveLeftMargin( bool bRight, bool bModulus ) const SwFrame* pFrame = pCNd->getLayoutFrame( GetLayout() ); if ( pFrame ) { -const sal_uInt32 nFrameWidth = o3tl::narrowing( pFrame->IsVertical() ? +const SwTwips nFrameWidth = pFrame->IsVertical() ? pFrame->getFrameArea().Height() : - pFrame->getFrameArea().Width() ); -bRet = o3tl::narrowing(nFrameWidth) > (nNext + constTwips_5mm); + pFrame->getFrameArea().Width(); +bRet = nFrameWidth > (nNext + constTwips_5mm); } else bRet = false; diff --git a/sw/source/core/inc/txtfrm.hxx b/sw/source/core/inc/txtfrm.hxx index f2c8adadf512..7cbc3a4bfabd 100644 --- a/sw/source/core/inc/txtfrm.hxx +++ b/sw/source/core/inc/txtfrm.hxx @@ -577,7 +577,7 @@ public: virtual void CheckDirection( bool bVert ) override; /// Returns the sum of line height in pLine -sal_uInt32 GetParHeight() const; +SwTwips GetParHeight() const; inline SwTextFrame *GetFollow(); inline const SwTextFrame *GetFollow() const; diff --git a/sw/source/core/text/frmcrsr.cxx b/sw/source/core/text/frmcrsr.cxx index d2d7434b0da2..7a3dd914e28c 100644 --- a/sw/source/core/text/frmcrsr.cxx +++ b/sw/source/core/text/frmcrsr.cxx @@ -590,7 +590,7 @@ bool SwTextFrame::GetModelPositionForViewPoint_(SwPosition* pPos, const Point& r // See comment in AdjustFrame() SwTwips nMaxY = getFrameArea().Top() + getFramePrintArea().Top() + getFramePrintArea().Height(); aLine.TwipsToLine( rPoint.Y() ); -while( aLine.Y() + o3tl::narrowing(aLine.GetLineHeight()) > nMaxY ) +while( aLine.Y() + aLine.GetLineHeight() > nMaxY ) { if( !aLine.Prev() ) break; diff --git a/sw/source/core/text/frmform.cxx b/sw/source/core/text/frmform.cxx index 4731a7d99ebd..93b6e2b272d8 100644 --- a/sw/source/core/text/frmform.cxx +++ b/sw/source/core/text/frmform.cxx @@ -1184,8 +1184,8 @@ bool SwTextFrame::FormatLine( SwTextFormatter &rLine, const bool bPrev ) SwParaPortion *pPara = rLine.GetInfo().GetParaPortion(); co
[Libreoffice-commits] core.git: helpcontent2
helpcontent2 |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 61ecd15cc81a0d14d27e727ea0c9fe6317cc13a9 Author: Olivier Hallot AuthorDate: Wed Oct 6 08:12:26 2021 -0300 Commit: Gerrit Code Review CommitDate: Wed Oct 6 13:12:26 2021 +0200 Update git submodules * Update helpcontent2 from branch 'master' to 8589981a5f5dbe83cff6bdc86db01e54779a4255 - tdf#144957 Help on deleting array formulas Special thanks to Alex Sims for excellent bug report. Change-Id: I15ab6b6b8c86633a779b3f4c55f10665bdb63c62 Reviewed-on: https://gerrit.libreoffice.org/c/help/+/123137 Tested-by: Jenkins Reviewed-by: Olivier Hallot diff --git a/helpcontent2 b/helpcontent2 index 336a1a866e9b..8589981a5f5d 16 --- a/helpcontent2 +++ b/helpcontent2 @@ -1 +1 @@ -Subproject commit 336a1a866e9b84a929e9d4403564e37947a0eba3 +Subproject commit 8589981a5f5dbe83cff6bdc86db01e54779a4255
[Libreoffice-commits] help.git: source/text
source/text/scalc/01/04060107.xhp | 16 ++-- 1 file changed, 14 insertions(+), 2 deletions(-) New commits: commit 8589981a5f5dbe83cff6bdc86db01e54779a4255 Author: Olivier Hallot AuthorDate: Wed Oct 6 08:07:26 2021 -0300 Commit: Olivier Hallot CommitDate: Wed Oct 6 13:12:24 2021 +0200 tdf#144957 Help on deleting array formulas Special thanks to Alex Sims for excellent bug report. Change-Id: I15ab6b6b8c86633a779b3f4c55f10665bdb63c62 Reviewed-on: https://gerrit.libreoffice.org/c/help/+/123137 Tested-by: Jenkins Reviewed-by: Olivier Hallot diff --git a/source/text/scalc/01/04060107.xhp b/source/text/scalc/01/04060107.xhp index 340641696..4a7b7592f 100644 --- a/source/text/scalc/01/04060107.xhp +++ b/source/text/scalc/01/04060107.xhp @@ -34,6 +34,7 @@ functions; array functions editing; array formulas copying; array formulas +deleting; array formulas adjusting array ranges calculating; conditional calculations matrices; calculations @@ -121,7 +122,7 @@ If you enter the array formula directly into the cell, you must use the key combination Shift + CommandCtrl + Enter instead of the Enter key. Only then does the formula become an array formula. Array formulas appear in braces in $[officename] Calc. You cannot create array formulas by manually entering the braces. - The cells in a results array are automatically protected against changes. However, you can edit or copy the array formula by selecting the entire array cell range. + The cells in a results array are automatically protected against changes. However, you can edit, delete or copy the array formula by selecting the entire array cell range. Using Inline Array Constants in Formulas Calc supports inline matrix/array constants in formulas. An inline array is surrounded by curly braces '{' and '}'. Elements can be each a number (including negatives), a logical constant (TRUE, FALSE), or a literal string. Non-constant expressions are not allowed. Arrays can be entered with one or more rows, and one or more columns. All rows must consist of the same number of elements, all columns must consist of the same number of elements. The column separator (separating elements in one row) and the row separator are language and locale dependent. But in this help content, the ';' semicolon and '|' pipe symbol are used to indicate the column and row separators, respectively. For example, in the English locale, the ',' comma is used as the column separator, while the ';' semicolon is used as the row separator. @@ -140,7 +141,7 @@ Editing Array Formulas -Select the cell range or array containing the array formula. To select the whole array, position the cell cursor inside the array range, then press CommandCtrl + /, where / is the Division key on the numeric keypad. +Select the cell range or array containing the array formula. To select the whole array, position the cell cursor inside the array range, then press CommandCtrl + /, where / is the division key on the numeric keypad. Either press F2 or position the cursor in the input line. Both of these actions let you edit the formula. @@ -150,6 +151,17 @@ You can format the separate parts of an array. For example, you can change the font color. Select a cell range and then change the attribute you want. + +Deleting Array Formulae + + +Select the cell range or array containing the array formula. To select the whole array, position the cell cursor inside the array range, then press CommandCtrl + /, where / is the division key on the numeric keypad. + + +Press Delete to delete the array contents, including the array formula, or press Backspace and this brings up the Delete Contents dialog box. Select Formula or Delete All and click OK. + + + Copying Array Formulas
[Libreoffice-commits] core.git: Branch 'libreoffice-7-2' - include/svtools include/vcl svtools/source vcl/inc vcl/source vcl/unx
include/svtools/editbrowsebox.hxx |8 +++ include/vcl/weld.hxx |3 + svtools/source/brwbox/ebbcontrols.cxx | 18 ++-- vcl/inc/salvtables.hxx|4 + vcl/source/app/salvtables.cxx | 17 +++- vcl/unx/gtk3/gtkinst.cxx | 69 ++ 6 files changed, 104 insertions(+), 15 deletions(-) New commits: commit 52ab26ab2ae841d917129a6ea5f31f9c9f7edd2f Author: Caolán McNamara AuthorDate: Mon Oct 4 10:35:34 2021 +0100 Commit: Michael Stahl CommitDate: Wed Oct 6 12:12:37 2021 +0200 Related: tdf#141633 similiarly support match combo/listbox font sizes to the desired zoomed font size in the table control Change-Id: Iaf3b004544fdb0311b6c67baad612ba648e8c546 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123043 Tested-by: Jenkins Reviewed-by: Caolán McNamara Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123052 Reviewed-by: Michael Stahl diff --git a/include/svtools/editbrowsebox.hxx b/include/svtools/editbrowsebox.hxx index a758d1142a88..64787aff043d 100644 --- a/include/svtools/editbrowsebox.hxx +++ b/include/svtools/editbrowsebox.hxx @@ -172,7 +172,7 @@ namespace svt virtual bool ProcessKey(const KeyEvent& rKEvt); -virtual void SetPointFont(const vcl::Font& rFont); +virtual void SetPointFont(const vcl::Font& rFont) = 0; // chain after the FocusInHdl void SetFocusInHdl(const Link& rHdl) @@ -564,6 +564,8 @@ namespace svt virtual ~CheckBoxControl() override; virtual void dispose() override; +virtual void SetPointFont(const vcl::Font& rFont) override; + void SetToggleHdl(const Link& rHdl) {m_aToggleLink = rHdl;} // sets a link to call when the text is changed by the user @@ -629,6 +631,8 @@ namespace svt public: ComboBoxControl(BrowserDataWin* pParent); +virtual void SetPointFont(const vcl::Font& rFont) override; + virtual void SetEditableReadOnly(bool bReadOnly) override { m_xWidget->set_entry_editable(!bReadOnly); @@ -696,6 +700,8 @@ namespace svt public: ListBoxControl(BrowserDataWin* pParent); +virtual void SetPointFont(const vcl::Font& rFont) override; + weld::ComboBox& get_widget() { return *m_xWidget; } // sets a link to call when the selection is changed by the user diff --git a/include/vcl/weld.hxx b/include/vcl/weld.hxx index 9038351c2715..00275b919a84 100644 --- a/include/vcl/weld.hxx +++ b/include/vcl/weld.hxx @@ -786,6 +786,9 @@ public: virtual void copy_entry_clipboard() = 0; virtual void paste_entry_clipboard() = 0; +// font size is in points, not pixels, e.g. see Window::[G]etPointFont +virtual void set_font(const vcl::Font& rFont) = 0; + // font size is in points, not pixels, e.g. see Window::[G]etPointFont virtual void set_entry_font(const vcl::Font& rFont) = 0; virtual vcl::Font get_entry_font() = 0; diff --git a/svtools/source/brwbox/ebbcontrols.cxx b/svtools/source/brwbox/ebbcontrols.cxx index de2cf8ffb021..d35f2c7aa9a7 100644 --- a/svtools/source/brwbox/ebbcontrols.cxx +++ b/svtools/source/brwbox/ebbcontrols.cxx @@ -37,6 +37,11 @@ namespace svt m_xWidget->connect_mouse_move(LINK(this, ControlBase, MouseMoveHdl)); } +void ComboBoxControl::SetPointFont(const vcl::Font& rFont) +{ +m_xWidget->set_entry_font(rFont); +} + void ComboBoxControl::dispose() { m_xWidget.reset(); @@ -127,6 +132,11 @@ namespace svt m_xWidget->connect_mouse_move(LINK(this, ControlBase, MouseMoveHdl)); } +void ListBoxControl::SetPointFont(const vcl::Font& rFont) +{ +m_xWidget->set_font(rFont); +} + void ListBoxControl::dispose() { m_xWidget.reset(); @@ -201,6 +211,10 @@ namespace svt m_xBox->connect_toggled(LINK(this, CheckBoxControl, OnToggle)); } +void CheckBoxControl::SetPointFont(const vcl::Font& /*rFont*/) +{ +} + void CheckBoxControl::EnableTriState( bool bTriState ) { if (m_aModeState.bTriStateEnabled != bTriState) @@ -361,10 +375,6 @@ namespace svt return static_cast(GetParent())->GetParent()->ProcessKey(rKEvt); } -void ControlBase::SetPointFont(const vcl::Font& /*rFont*/) -{ -} - IMPL_LINK(ControlBase, KeyInputHdl, const KeyEvent&, rKEvt, bool) { return ProcessKey(rKEvt); diff --git a/vcl/inc/salvtables.hxx b/vcl/inc/salvtables.hxx index 1574a3a144c6..d3d31afa97cb 100644 --- a/vcl/inc/salvtables.hxx +++ b/vcl/inc/salvtables.hxx @@ -911,6 +911,8 @@ public: virtual void paste_entry_clipboard() override; +virtual void set_font(const vcl::Font& rFont) override; + virtual void set_entry_font(const vcl::Font&) override; virtual vcl::Font get_entry_font() override; @@ -981,6 +983,8 @@ public: virt
[Libreoffice-commits] core.git: sw/source
sw/source/ui/fldui/fldtdlg.cxx |9 - 1 file changed, 8 insertions(+), 1 deletion(-) New commits: commit da5580369bfd15857fb21a1f610e393d07abb805 Author: Vasily Melenchuk AuthorDate: Mon Oct 4 17:40:31 2021 +0200 Commit: Michael Stahl CommitDate: Wed Oct 6 12:08:08 2021 +0200 tdf#144907: sw ui: allow closing of "Fields" dialog In some cases (described in task) dialog is not closed. This is happens due to not delivered request to SwTextShell::ExecField(). So we could just close dialog explicitly, if Execute() action did fail. Change-Id: I1c712295a21037bc8bb28e2a97e750299b41250c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123059 Tested-by: Jenkins Reviewed-by: Michael Stahl diff --git a/sw/source/ui/fldui/fldtdlg.cxx b/sw/source/ui/fldui/fldtdlg.cxx index 946de356075e..f9a0f2241448 100644 --- a/sw/source/ui/fldui/fldtdlg.cxx +++ b/sw/source/ui/fldui/fldtdlg.cxx @@ -109,9 +109,16 @@ void SwFieldDlg::Close() { if (m_bClosing) return; -m_pBindings->GetDispatcher()-> +const SfxPoolItem* pResult = m_pBindings->GetDispatcher()-> Execute(m_bDataBaseMode ? FN_INSERT_FIELD_DATA_ONLY : FN_INSERT_FIELD, SfxCallMode::SYNCHRON|SfxCallMode::RECORD); +if (!pResult) +{ +// If Execute action did fail for whatever reason, this means that request +// to close did fail or wasn't delivered to SwTextShell::ExecField(). +// Just explicitly close dialog in this case. +SfxTabDialogController::EndDialog(); +} } void SwFieldDlg::Initialize(SfxChildWinInfo const *pInfo)
[Libreoffice-commits] core.git: helpcontent2
helpcontent2 |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 727bb5ed6bb53ef00b61ecdebb0b9cca50f167e2 Author: Olivier Hallot AuthorDate: Wed Oct 6 07:05:05 2021 -0300 Commit: Gerrit Code Review CommitDate: Wed Oct 6 12:05:05 2021 +0200 Update git submodules * Update helpcontent2 from branch 'master' to 336a1a866e9b84a929e9d4403564e37947a0eba3 - Refactor and fix merge/unmerge Help after translation round - Remove embedvar'd text from sentence (break translation in some langs) - Refactor formattings - move bookmarks away from lists (breaks list formatting) - update icon size. Change-Id: I2bdd2b026ed167f42894d1cfc61c19a1617d79a0 Reviewed-on: https://gerrit.libreoffice.org/c/help/+/123123 Tested-by: Jenkins Reviewed-by: Olivier Hallot diff --git a/helpcontent2 b/helpcontent2 index ff4b6d982cb2..336a1a866e9b 16 --- a/helpcontent2 +++ b/helpcontent2 @@ -1 +1 @@ -Subproject commit ff4b6d982cb29758b1e81e04f8e404c8ea7324c9 +Subproject commit 336a1a866e9b84a929e9d4403564e37947a0eba3
[Libreoffice-commits] help.git: source/text
source/text/scalc/01/0506.xhp | 24 ++-- source/text/shared/01/05100100.xhp | 17 + source/text/shared/01/05100200.xhp | 35 +-- source/text/swriter/00/0405.xhp | 24 4 files changed, 48 insertions(+), 52 deletions(-) New commits: commit 336a1a866e9b84a929e9d4403564e37947a0eba3 Author: Olivier Hallot AuthorDate: Tue Oct 5 17:58:14 2021 -0300 Commit: Olivier Hallot CommitDate: Wed Oct 6 12:05:03 2021 +0200 Refactor and fix merge/unmerge Help after translation round - Remove embedvar'd text from sentence (break translation in some langs) - Refactor formattings - move bookmarks away from lists (breaks list formatting) - update icon size. Change-Id: I2bdd2b026ed167f42894d1cfc61c19a1617d79a0 Reviewed-on: https://gerrit.libreoffice.org/c/help/+/123123 Tested-by: Jenkins Reviewed-by: Olivier Hallot diff --git a/source/text/scalc/01/0506.xhp b/source/text/scalc/01/0506.xhp index 0d27c0468..246c420f2 100644 --- a/source/text/scalc/01/0506.xhp +++ b/source/text/scalc/01/0506.xhp @@ -1,6 +1,4 @@ - - - @@ -37,23 +34,21 @@ -Merge and Center Cells +Merge and Center Cells This is a toggleable control that joins all cells in a rectangular selection into a single cell, or returns merged cells to the original individual cells. When merging it will format the merged cell as center aligned. The control is shown toggled-on whenever there are merged cells in the selection, indicating that clicking the control will unmerge those cells. -Merging cells can lead to calculation errors in formulas in the table. +Merging cells can lead to calculation errors in formulas in the table. Do one of the following: In the Formatting toolbar, click: - -Icon - +Icon Merge and Center Cells Merge and Center Cells @@ -64,31 +59,32 @@ Cells cannot be merged again without first unmerging them. -Merging a cell selection that partially includes merged cells is generally possible with Unmerge Cells followed by Merge Cells, without altering the initial selection. The result will be largely depend on previous choices when merging cells made with the Merge Cells Dialog options described below. +Merging a cell selection that partially includes merged cells is generally possible with Unmerge Cells followed by Merge Cells, without altering the initial selection. The result will be largely depend on previous choices when merging cells made with the Merge Cells Dialog options described below. Multiple selection is not supported, that is, the selection must be rectangular. The merged cell receives the name and content of the first cell of the selection. If more than one cell to be merged has content the Merge Cells dialog opens. -Merge Cells Dialog Options + + + +Merge Cells Dialog Options Three options are available: - Move the contents of the hidden cells into the first cell: The actual contents of the hidden cells are concatenated to the first cell, and hidden cells are emptied; the results of formulas referring to the hidden cells or the first cell will be updated. - Keep the contents of the hidden cells: The contents of the hidden cells are kept; the results of formulas referring to the hidden cells will not change. - Empty the contents of the hidden cells: The contents of the hidden cells are removed; the results of formulas referring to the hidden cells will be updated. - + + diff --git a/source/text/shared/01/05100100.xhp b/source/text/shared/01/05100100.xhp index 30bdd8517..3c4ffb457 100644 --- a/source/text/shared/01/05100100.xhp +++ b/source/text/shared/01/05100100.xhp @@ -1,6 +1,6 @@ - + - - + + Merge Cells @@ -33,19 +33,19 @@ merge/merging cells -Merge Cells +Merge Cells Combines the contents of the selected cells into a single cell, retaining the formatting of the first cell in the selection.moved from swriter/01/05100100.xhp, see i86644 -Click and drag to select the cells to be merged then do one of the following: +Select the cells to be merged then do one of the following: In the Formatting toolbar, click: -Or, right click the selection to open the context menu and choose Merge Cells.If Unmerge Cells is present instead then the cell selection contains merged cells and cannot be merged further. +Or, right click the selection to open the context menu and choose Merge Cells. If Unmerge Cells is present instead then the cell selection contains merged cells and cannot be merged further. Or, in the Properties sidebar mark the Merge Cells checkbox. -Or, choose Merge Cells. +Or, choose Format - Merge and Unmerge Cells - Merge Cells. @@ -61,7 +61,7 @@ - + @@ -73,5 +73,6 @@ + diff --git a/source/text/shared/01/05100200.xhp b/s
[Libreoffice-commits] core.git: Branch 'libreoffice-7-2' - sc/inc sc/source
sc/inc/formulacell.hxx |3 +++ sc/source/core/data/conditio.cxx|4 sc/source/core/data/formulacell.cxx | 32 ++-- 3 files changed, 37 insertions(+), 2 deletions(-) New commits: commit abc68a66cc19f8f9259cad124f67bfe325d6cb8f Author: Eike Rathke AuthorDate: Tue Oct 5 20:04:19 2021 +0200 Commit: Michael Stahl CommitDate: Wed Oct 6 12:04:10 2021 +0200 Fix crash if conditional format triggers recursion with iterations enabled Could occur if a conditional format is evaluated (for example if row height is to be obtained) while a formula cell it references is still running and iterations are enabled so the conditional format's temporary formula cell is added to the iteration recursion list but iterations are not triggered if there are no circular references. In that case the temporary formula cell's pointer remained in the recursion list and it's dangling instance was accessed in the next round. Mark such formula cell as free-flying and remove from recursion list if it was added. Observed at https://ask.libreoffice.org/t/lo-calc-crashes-when-calling-a-macro/68800 with the original attached file that now got replaced with another version that doesn't have iterations enabled so wouldn't trigger the bug (and apparently even doesn't if enabling iterations). Change-Id: I23a023356f920b8413874cab14acdc8b25580052 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123115 Reviewed-by: Eike Rathke Tested-by: Jenkins (cherry picked from commit ce8a7278e1304f7aaa65bce34aeeda5e83b231f1) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122949 Reviewed-by: Michael Stahl diff --git a/sc/inc/formulacell.hxx b/sc/inc/formulacell.hxx index 002d5e7c2e29..0b5b51921e14 100644 --- a/sc/inc/formulacell.hxx +++ b/sc/inc/formulacell.hxx @@ -124,6 +124,7 @@ private: boolmbPostponedDirty : 1; // if cell needs to be set dirty later boolmbIsExtRef : 1; // has references in ScExternalRefManager; never cleared after set boolmbSeenInPath : 1; // For detecting cycle involving formula groups and singleton formulacells +boolmbFreeFlying : 1; // Cell is out of sheets interpreted, like in conditional format ScMatrixModecMatrixFlag : 8; sal_uInt16 nSeenInIteration : 16; // Iteration cycle in which the cell was last encountered SvNumFormatType nFormatType : 16; @@ -209,6 +210,8 @@ public: ScFormulaCell(const ScFormulaCell& rCell, ScDocument& rDoc, const ScAddress& rPos, ScCloneFlags nCloneFlags = ScCloneFlags::Default); +voidSetFreeFlying( bool b ) { mbFreeFlying = b; } + size_t GetHash() const; voidGetFormula( OUString& rFormula, diff --git a/sc/source/core/data/conditio.cxx b/sc/source/core/data/conditio.cxx index 11e74fa258db..35a6ff99c699 100644 --- a/sc/source/core/data/conditio.cxx +++ b/sc/source/core/data/conditio.cxx @@ -400,6 +400,7 @@ void ScConditionEntry::MakeCells( const ScAddress& rPos ) // pFCell1 will hold a flat-copied ScTokenArray sharing ref-counted // code tokens with pFormula1 pFCell1.reset( new ScFormulaCell(*mpDoc, rPos, *pFormula1) ); +pFCell1->SetFreeFlying(true); pFCell1->StartListeningTo( *mpDoc ); } @@ -408,6 +409,7 @@ void ScConditionEntry::MakeCells( const ScAddress& rPos ) // pFCell2 will hold a flat-copied ScTokenArray sharing ref-counted // code tokens with pFormula2 pFCell2.reset( new ScFormulaCell(*mpDoc, rPos, *pFormula2) ); +pFCell2->SetFreeFlying(true); pFCell2->StartListeningTo( *mpDoc ); } } @@ -652,6 +654,7 @@ void ScConditionEntry::Interpret( const ScAddress& rPos ) { pTemp1.reset(pFormula1 ? new ScFormulaCell(*mpDoc, rPos, *pFormula1) : new ScFormulaCell(*mpDoc, rPos)); pEff1 = pTemp1.get(); +pEff1->SetFreeFlying(true); } if ( pEff1 ) { @@ -682,6 +685,7 @@ void ScConditionEntry::Interpret( const ScAddress& rPos ) { pTemp2.reset(pFormula2 ? new ScFormulaCell(*mpDoc, rPos, *pFormula2) : new ScFormulaCell(*mpDoc, rPos)); pEff2 = pTemp2.get(); +pEff2->SetFreeFlying(true); } if ( pEff2 ) { diff --git a/sc/source/core/data/formulacell.cxx b/sc/source/core/data/formulacell.cxx index 3eef76bf3550..0b8dfd9c6f9d 100644 --- a/sc/source/core/data/formulacell.cxx +++ b/sc/source/core/data/formulacell.cxx @@ -616,6 +616,7 @@ ScFormulaCell::ScFormulaCell( ScDocument& rDoc, const ScAddress& rPos ) : mbPostponedDirty(false), mbIsExtRef(false), mbSeenInPath(false), +mbFreeFlying(false), cMatrixFlag(ScMatrixMode::NONE), nSeenInIteration(0), nFormatType(SvNumFormatType::NUMBER), @@ -648,6 +649,7 @@ ScFormulaCell::ScFormulaCell( ScDocument& rDoc, const
[Libreoffice-commits] core.git: include/svtools svtools/source
include/svtools/editbrowsebox.hxx | 14 -- svtools/source/brwbox/editbrowsebox.cxx | 10 +++--- 2 files changed, 11 insertions(+), 13 deletions(-) New commits: commit 2dfe1726d5262820c910d810b955ea73d3c7ae95 Author: Caolán McNamara AuthorDate: Wed Oct 6 09:19:20 2021 +0100 Commit: Caolán McNamara CommitDate: Wed Oct 6 11:56:12 2021 +0200 CellController always controls something derived from svt::ControlBase Change-Id: I051c2d0cf134502943bda5aa0bad9b04163c221f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123129 Tested-by: Jenkins Reviewed-by: Caolán McNamara diff --git a/include/svtools/editbrowsebox.hxx b/include/svtools/editbrowsebox.hxx index 199173a390cf..99a14fa980a9 100644 --- a/include/svtools/editbrowsebox.hxx +++ b/include/svtools/editbrowsebox.hxx @@ -68,20 +68,22 @@ namespace o3tl namespace svt { +class ControlBase; + class SVT_DLLPUBLIC CellController : public SvRefBase { friend class EditBrowseBox; Link maModifyHdl; -VclPtrpWindow; +VclPtrpWindow; bool bSuspended; // if the window is hidden and disabled public: -CellController(Control* pW); +CellController(ControlBase* pW); virtual ~CellController() override; -Control& GetWindow() const { return *const_cast< CellController* >( this )->pWindow; } +ControlBase& GetWindow() const { return *const_cast(this)->pWindow; } virtual void SaveValue() = 0; virtual bool IsValueChangedFromSaved() const = 0; @@ -112,7 +114,7 @@ namespace svt public: virtual ~IEditImplementation() = 0; -virtual Control&GetControl() = 0; +virtual ControlBase&GetControl() = 0; virtual OUStringGetText( LineEnd aSeparator ) const = 0; virtual voidSetText( const OUString& _rStr ) = 0; @@ -280,7 +282,7 @@ namespace svt m_rEdit.connect_changed(LINK(this, EntryImplementation, ModifyHdl)); } -virtual Control& GetControl() override +virtual ControlBase& GetControl() override { return m_rEdit; } @@ -431,7 +433,7 @@ namespace svt m_rEdit.connect_changed(LINK(this, MultiLineEditImplementation, ModifyHdl)); } -virtual Control& GetControl() override +virtual ControlBase& GetControl() override { return m_rEdit; } diff --git a/svtools/source/brwbox/editbrowsebox.cxx b/svtools/source/brwbox/editbrowsebox.cxx index 90b970615eb7..c9267119ffda 100644 --- a/svtools/source/brwbox/editbrowsebox.cxx +++ b/svtools/source/brwbox/editbrowsebox.cxx @@ -1227,23 +1227,19 @@ namespace svt Controller()->resume(); } - -CellController::CellController(Control* pW) - :pWindow( pW ) - ,bSuspended( true ) +CellController::CellController(ControlBase* pW) +: pWindow(pW) +, bSuspended( true ) { DBG_ASSERT(pWindow, "CellController::CellController: missing the window!"); DBG_ASSERT(!pWindow->IsVisible(), "CellController::CellController: window should not be visible!"); } - CellController::~CellController() { - } - void CellController::suspend( ) { DBG_ASSERT( bSuspended == !GetWindow().IsVisible(), "CellController::suspend: inconsistence!" );
[Libreoffice-commits] core.git: Branch 'distro/collabora/co-2021' - vcl/inc vcl/jsdialog
vcl/inc/jsdialog/jsdialogbuilder.hxx | 10 ++ vcl/jsdialog/jsdialogbuilder.cxx |5 ++--- 2 files changed, 12 insertions(+), 3 deletions(-) New commits: commit 43f4c94c38089ba84256a88d1468e3ced5ef2be7 Author: Szymon Kłos AuthorDate: Tue Oct 5 17:02:56 2021 +0200 Commit: Szymon Kłos CommitDate: Wed Oct 6 11:53:10 2021 +0200 jsdialog: avoid compiler warning for plain vcl window Change-Id: Icfe5a07e74801d59d6bb0988948bdf20f22bc3e5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123109 Tested-by: Jenkins CollaboraOffice Reviewed-by: Szymon Kłos diff --git a/vcl/inc/jsdialog/jsdialogbuilder.hxx b/vcl/inc/jsdialog/jsdialogbuilder.hxx index dfd692e0a026..7dba4b7a3120 100644 --- a/vcl/inc/jsdialog/jsdialogbuilder.hxx +++ b/vcl/inc/jsdialog/jsdialogbuilder.hxx @@ -684,4 +684,14 @@ public: JSBox(JSDialogSender* pSender, VclBox* pBox, SalInstanceBuilder* pBuilder, bool bTakeOwnership); }; +class JSWidgetInstance : public JSWidget +{ +public: +JSWidgetInstance(JSDialogSender* pSender, vcl::Window* pObject, SalInstanceBuilder* pBuilder, + bool bTakeOwnership) +: JSWidget(pSender, pObject, pBuilder, bTakeOwnership) +{ +} +}; + /* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */ diff --git a/vcl/jsdialog/jsdialogbuilder.cxx b/vcl/jsdialog/jsdialogbuilder.cxx index 0a8c39c9cecb..cb95b528af8b 100644 --- a/vcl/jsdialog/jsdialogbuilder.cxx +++ b/vcl/jsdialog/jsdialogbuilder.cxx @@ -1056,9 +1056,8 @@ std::unique_ptr JSInstanceBuilder::weld_box(const OString& id) std::unique_ptr JSInstanceBuilder::weld_widget(const OString& id) { vcl::Window* pWidget = m_xBuilder->get(id); -auto pWeldWidget = pWidget ? std::make_unique>( - this, pWidget, this, false) - : nullptr; +auto pWeldWidget += pWidget ? std::make_unique(this, pWidget, this, false) : nullptr; if (pWeldWidget) RememberWidget(id, pWeldWidget.get());
[Libreoffice-commits] core.git: 2 commits - sc/source
sc/source/ui/unoobj/docuno.cxx |8 ++--- sc/source/ui/view/gridwin4.cxx | 57 +++-- 2 files changed, 54 insertions(+), 11 deletions(-) New commits: commit 0ed940e3eb87c7048a1a8e6cfda14e7cef85d007 Author: Szymon Kłos AuthorDate: Wed Sep 15 14:37:37 2021 +0200 Commit: Szymon Kłos CommitDate: Wed Oct 6 11:11:30 2021 +0200 lok json: write correctly formatted array for comments Change-Id: Ia9a219f867ea00444844f6854f0b6af762d4e0af Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122149 Tested-by: Jenkins CollaboraOffice Reviewed-by: Szymon Kłos Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123107 Tested-by: Jenkins diff --git a/sc/source/ui/unoobj/docuno.cxx b/sc/source/ui/unoobj/docuno.cxx index 7c5eafa81774..d1131d6f967b 100644 --- a/sc/source/ui/unoobj/docuno.cxx +++ b/sc/source/ui/unoobj/docuno.cxx @@ -1112,10 +1112,10 @@ void ScModelObj::getPostIts(tools::JsonWriter& rJsonWriter) std::vector aNotes; rDoc.GetAllNoteEntries(aNotes); -auto commentsNode = rJsonWriter.startNode("comments"); +auto commentsNode = rJsonWriter.startArray("comments"); for (const sc::NoteEntry& aNote : aNotes) { -auto commentNode = rJsonWriter.startNode(""); +auto commentNode = rJsonWriter.startStruct(); rJsonWriter.put("id", aNote.mpNote->GetId()); rJsonWriter.put("tab", aNote.maPos.Tab()); @@ -1154,10 +1154,10 @@ void ScModelObj::getPostItsPos(tools::JsonWriter& rJsonWriter) std::vector aNotes; rDoc.GetAllNoteEntries(aNotes); -auto commentsNode = rJsonWriter.startNode("commentsPos"); +auto commentsNode = rJsonWriter.startArray("commentsPos"); for (const sc::NoteEntry& aNote : aNotes) { -auto commentNode = rJsonWriter.startNode(""); +auto commentNode = rJsonWriter.startStruct(); rJsonWriter.put("id", aNote.mpNote->GetId()); rJsonWriter.put("tab", aNote.maPos.Tab()); commit 57a628d540287c4bfa8251e50279f4879faa184d Author: Szymon Kłos AuthorDate: Tue Aug 17 16:56:22 2021 +0200 Commit: Szymon Kłos CommitDate: Wed Oct 6 11:11:14 2021 +0200 calc: get rects faster for simple selection In LOK when we select the full row using keyboard shortcut Ctrl + Shift + right arrow we need to receive complete selection so we will avoid requesting it by chunks, slowly moving the view to the right. So - don't clip the selection rects to the visible area. It is needed only for simple selections so to avoid performance issues - use simpler algorithm without loops checking every cell size. Change-Id: I6ab975b6c155f3dde3014a52752ffdc79a93844f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120611 Reviewed-by: Henry Castro Tested-by: Jenkins CollaboraOffice Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122107 Reviewed-by: Szymon Kłos Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123099 Tested-by: Jenkins diff --git a/sc/source/ui/view/gridwin4.cxx b/sc/source/ui/view/gridwin4.cxx index f810efbb8c19..e37949f7ef23 100644 --- a/sc/source/ui/view/gridwin4.cxx +++ b/sc/source/ui/view/gridwin4.cxx @@ -2115,14 +2115,60 @@ void ScGridWindow::GetRectsAnyFor(const ScMarkData &rMarkData, ::std::vector< tools::Rectangle >& rRects, bool bInPrintTwips) const { -ScMarkData aMultiMark( rMarkData ); -aMultiMark.SetMarking( false ); -aMultiMark.MarkToMulti(); ScDocument& rDoc = mrViewData.GetDocument(); SCTAB nTab = mrViewData.GetTabNo(); - +double nPPTX = mrViewData.GetPPTX(); +double nPPTY = mrViewData.GetPPTY(); bool bLayoutRTL = rDoc.IsLayoutRTL( nTab ); tools::Long nLayoutSign = bLayoutRTL ? -1 : 1; + +ScMarkData aMultiMark( rMarkData ); +aMultiMark.SetMarking( false ); + +if (!aMultiMark.IsMultiMarked()) +{ +// simple range case - simplify calculation +ScRange aSimpleRange; +aMultiMark.GetMarkArea( aSimpleRange ); + +aMultiMark.MarkToMulti(); +if ( !aMultiMark.IsMultiMarked() ) +return; + +SCCOL nX1 = aSimpleRange.aStart.Col(); +SCROW nY1 = aSimpleRange.aStart.Row(); +SCCOL nX2 = aSimpleRange.aEnd.Col(); +SCROW nY2 = aSimpleRange.aEnd.Row(); + +PutInOrder( nX1, nX2 ); +PutInOrder( nY1, nY2 ); + +Point aScrStartPos = bInPrintTwips ? mrViewData.GetPrintTwipsPos(nX1, nY1) : +mrViewData.GetScrPos(nX1, nY1, eWhich); + +tools::Long nStartX = aScrStartPos.X(); +tools::Long nStartY = aScrStartPos.Y(); + +Point aScrEndPos = bInPrintTwips ? mrViewData.GetPrintTwipsPos(nX2, nY2) : +mrViewData.GetScrPos(nX2, nY2, eWhich); + +tools::Long nWidthTwips = rDoc.GetColWidth(nX2, nTab); +const tools::Long nWidth = bInPrintTwips ? +nWid
[Libreoffice-commits] core.git: sw/source
sw/source/core/doc/extinput.cxx | 11 +-- 1 file changed, 5 insertions(+), 6 deletions(-) New commits: commit 8ede76d9accc8e3b1ea2c8e332cbb373a1b4d9cf Author: Szymon Kłos AuthorDate: Thu Sep 16 16:53:40 2021 +0200 Commit: Szymon Kłos CommitDate: Wed Oct 6 11:10:26 2021 +0200 lok: IME: directly copy formatting for inserted text This is a fix for online where after: lok: IME: preserve formatting when inserting at the end of paragraph https://cgit.freedesktop.org/libreoffice/core/commit/?h=distro/collabora/cp-6.4&id=bf96d1f23e5c12f9263643dfdab94fd1361bb098 text formatting is lost. Change-Id: I3d316f8f4c4d750eac7900228f9f2d99f70d99bd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122199 Tested-by: Jenkins CollaboraOffice Reviewed-by: Andras Timar Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122478 Reviewed-by: Szymon Kłos Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123101 Tested-by: Szymon Kłos diff --git a/sw/source/core/doc/extinput.cxx b/sw/source/core/doc/extinput.cxx index 5790126b1810..09f4dba1e016 100644 --- a/sw/source/core/doc/extinput.cxx +++ b/sw/source/core/doc/extinput.cxx @@ -104,18 +104,17 @@ SwExtTextInput::~SwExtTextInput() { // we need to keep correct formatting // ie. when we erase first, then we will lost information about format -// so: -// 0. initial status: | OLD -// 1. insert new content using Doc interface at the end so we will use the same formatting -//status: | OLD | NEW -// 2. erase old content which is placed at "start" position and before recently inserted text -//status: | NEW sal_Int32 nLenghtOfOldString = nEndCnt - nSttCnt; if( m_bInsText ) { rDoc.getIDocumentContentOperations().InsertString( *this, sText ); + +// Copy formatting to the inserted string +SfxItemSet aSet(pTNd->GetDoc().GetAttrPool(), aCharFormatSetRange); +pTNd->GetParaAttr( aSet, nSttCnt + nLenghtOfOldString, nEndCnt + nLenghtOfOldString ); +pTNd->SetAttr( aSet, nSttCnt, nEndCnt ); } pTNd->EraseText( rIdx, nLenghtOfOldString );
[Libreoffice-commits] core.git: sw/qa sw/source
sw/qa/extras/tiledrendering/tiledrendering.cxx | 109 + sw/source/core/doc/extinput.cxx| 13 ++ 2 files changed, 121 insertions(+), 1 deletion(-) New commits: commit 7df324b4561a6551812bdfa5b72ba1c937148c41 Author: Szymon Kłos AuthorDate: Tue Sep 7 12:54:56 2021 +0200 Commit: Szymon Kłos CommitDate: Wed Oct 6 11:10:04 2021 +0200 lok: IME: preserve formatting when inserting at the end of paragraph There was a problem with inserting characters at the end of paragraph in online. When user set text to bolded, inserted few characters, then switched bold off. When trying to put another non-bolded character - the result was still bolded. It is caused by IME mechanics which gathers all elements for composition and at the end deletes these characters and inserts again but using document interface to keep undo records. During that operation formatting has been lost. This change does the same in reversed order so we first put new string correctly formatted at the end. Then we remove old leftovers. In result formatting is correct. Change-Id: Ieb498afdbe42c0080c30ea3db994cedc98e89847 Signed-off-by: Szymon Kłos Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121774 Tested-by: Jenkins CollaboraOffice Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122477 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123100 Tested-by: Jenkins diff --git a/sw/qa/extras/tiledrendering/tiledrendering.cxx b/sw/qa/extras/tiledrendering/tiledrendering.cxx index ed2ba675644f..e1ebae14d421 100644 --- a/sw/qa/extras/tiledrendering/tiledrendering.cxx +++ b/sw/qa/extras/tiledrendering/tiledrendering.cxx @@ -32,6 +32,7 @@ #include #include #include +#include #include #include #include @@ -132,6 +133,7 @@ public: void testTdf115088(); void testRedlineField(); void testIMESupport(); +void testIMEFormattingAtEndOfParagraph(); void testSplitNodeRedlineCallback(); void testDeleteNodeRedlineCallback(); void testVisCursorInvalidation(); @@ -212,6 +214,7 @@ public: CPPUNIT_TEST(testTdf115088); CPPUNIT_TEST(testRedlineField); CPPUNIT_TEST(testIMESupport); +CPPUNIT_TEST(testIMEFormattingAtEndOfParagraph); CPPUNIT_TEST(testSplitNodeRedlineCallback); CPPUNIT_TEST(testDeleteNodeRedlineCallback); CPPUNIT_TEST(testVisCursorInvalidation); @@ -2219,6 +,112 @@ void SwTiledRenderingTest::testIMESupport() CPPUNIT_ASSERT_EQUAL(OUString(aInputs[aInputs.size() - 1] + "Aaa bbb."), pShellCursor->GetPoint()->nNode.GetNode().GetTextNode()->GetText()); } +void SwTiledRenderingTest::testIMEFormattingAtEndOfParagraph() +{ +comphelper::LibreOfficeKit::setActive(); +SwXTextDocument* pXTextDocument = createDoc("dummy.fodt"); +VclPtr pDocWindow = pXTextDocument->getDocWindow(); + +SwView* pView = dynamic_cast(SfxViewShell::Current()); +assert(pView); +SwWrtShell* pWrtShell = pView->GetWrtShellPtr(); + +// delete all characters + +for (int i = 0; i < 9; i++) +{ +pXTextDocument->postKeyEvent(LOK_KEYEVENT_KEYINPUT, 0, KEY_DELETE); +pXTextDocument->postKeyEvent(LOK_KEYEVENT_KEYUP, 0, KEY_DELETE); +} + +Scheduler::ProcessEventsToIdle(); + +pDocWindow->PostExtTextInputEvent(VclEventId::ExtTextInput, "a"); +pDocWindow->PostExtTextInputEvent(VclEventId::EndExtTextInput, ""); + +// status: "a" + +comphelper::dispatchCommand(".uno:Bold", uno::Sequence()); +Scheduler::ProcessEventsToIdle(); + +pDocWindow->PostExtTextInputEvent(VclEventId::ExtTextInput, "b"); +pDocWindow->PostExtTextInputEvent(VclEventId::EndExtTextInput, ""); + +pXTextDocument->postKeyEvent(LOK_KEYEVENT_KEYINPUT, 0, KEY_RETURN); +pXTextDocument->postKeyEvent(LOK_KEYEVENT_KEYUP, 0, KEY_RETURN); +Scheduler::ProcessEventsToIdle(); + +// status: "ab\n" + +pDocWindow->PostExtTextInputEvent(VclEventId::ExtTextInput, "a"); +pDocWindow->PostExtTextInputEvent(VclEventId::EndExtTextInput, ""); + +std::unique_ptr pItem; +pView->GetViewFrame()->GetBindings().QueryState(SID_ATTR_CHAR_WEIGHT, pItem); +auto pWeightItem = dynamic_cast(pItem.get()); +CPPUNIT_ASSERT(pWeightItem); + +CPPUNIT_ASSERT_EQUAL(FontWeight::WEIGHT_BOLD, pWeightItem->GetWeight()); + +pXTextDocument->postKeyEvent(LOK_KEYEVENT_KEYINPUT, 0, KEY_RETURN); +pXTextDocument->postKeyEvent(LOK_KEYEVENT_KEYUP, 0, KEY_RETURN); +Scheduler::ProcessEventsToIdle(); + +// status: "ab\n +// a\n" + +comphelper::dispatchCommand(".uno:Bold", uno::Sequence()); +Scheduler::ProcessEventsToIdle(); + +pDocWindow->PostExtTextInputEvent(VclEventId::ExtTextInput, "b"); +pDocWindow->PostExtTextInputEvent(VclEventId::EndExtTextInput, ""); + +pView->GetViewFrame()->GetBindings().QueryState(SID_ATTR_CHAR_WEIGHT, pItem); +auto pWeightItem2 = dynamic_
[Libreoffice-commits] core.git: vcl/jsdialog
vcl/jsdialog/jsdialogbuilder.cxx |1 + 1 file changed, 1 insertion(+) New commits: commit d99c7586edf41e1b22f1ef363859a86bf397e35f Author: Szymon Kłos AuthorDate: Thu Sep 23 16:33:27 2021 +0200 Commit: Szymon Kłos CommitDate: Wed Oct 6 11:09:40 2021 +0200 jsdialog: send full update for autofilter Change-Id: I64baa5fea03f96350fe4db86ea0e42e02d41e8be Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122531 Tested-by: Szymon Kłos Reviewed-by: Szymon Kłos Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123105 Tested-by: Jenkins diff --git a/vcl/jsdialog/jsdialogbuilder.cxx b/vcl/jsdialog/jsdialogbuilder.cxx index b38753fb1815..164aa3a4fb0d 100644 --- a/vcl/jsdialog/jsdialogbuilder.cxx +++ b/vcl/jsdialog/jsdialogbuilder.cxx @@ -599,6 +599,7 @@ JSInstanceBuilder::JSInstanceBuilder(vcl::Window* pParent, const OUString& rUIRo } initializeSender(GetNotifierWindow(), GetContentWindow(), GetTypeOfJSON()); +sendFullUpdate(); } JSInstanceBuilder* JSInstanceBuilder::CreateDialogBuilder(weld::Widget* pParent,
[Libreoffice-commits] core.git: 2 commits - vcl/inc vcl/jsdialog
vcl/inc/jsdialog/jsdialogbuilder.hxx | 11 +++ vcl/jsdialog/jsdialogbuilder.cxx | 12 2 files changed, 23 insertions(+) New commits: commit b8e9e1bc7713ac159c3f23f9e4be4ddb656a9d79 Author: Szymon Kłos AuthorDate: Tue Oct 5 17:02:56 2021 +0200 Commit: Szymon Kłos CommitDate: Wed Oct 6 11:09:14 2021 +0200 jsdialog: avoid compiler warning for plain vcl window Change-Id: Icfe5a07e74801d59d6bb0988948bdf20f22bc3e5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123110 Tested-by: Jenkins Reviewed-by: Szymon Kłos diff --git a/vcl/inc/jsdialog/jsdialogbuilder.hxx b/vcl/inc/jsdialog/jsdialogbuilder.hxx index dc30508dba51..282857341cdf 100644 --- a/vcl/inc/jsdialog/jsdialogbuilder.hxx +++ b/vcl/inc/jsdialog/jsdialogbuilder.hxx @@ -686,4 +686,14 @@ public: JSBox(JSDialogSender* pSender, VclBox* pBox, SalInstanceBuilder* pBuilder, bool bTakeOwnership); }; +class JSWidgetInstance : public JSWidget +{ +public: +JSWidgetInstance(JSDialogSender* pSender, vcl::Window* pObject, SalInstanceBuilder* pBuilder, + bool bTakeOwnership) +: JSWidget(pSender, pObject, pBuilder, bTakeOwnership) +{ +} +}; + /* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */ diff --git a/vcl/jsdialog/jsdialogbuilder.cxx b/vcl/jsdialog/jsdialogbuilder.cxx index 64f2b3029212..b38753fb1815 100644 --- a/vcl/jsdialog/jsdialogbuilder.cxx +++ b/vcl/jsdialog/jsdialogbuilder.cxx @@ -1048,9 +1048,8 @@ std::unique_ptr JSInstanceBuilder::weld_box(const OString& id) std::unique_ptr JSInstanceBuilder::weld_widget(const OString& id) { vcl::Window* pWidget = m_xBuilder->get(id); -auto pWeldWidget = pWidget ? std::make_unique>( - this, pWidget, this, false) - : nullptr; +auto pWeldWidget += pWidget ? std::make_unique(this, pWidget, this, false) : nullptr; if (pWeldWidget) RememberWidget(id, pWeldWidget.get()); commit dfff37d1d92074abbd8ad0dc5c79a4e269d09f61 Author: Szymon Kłos AuthorDate: Fri Sep 24 10:08:41 2021 +0200 Commit: Szymon Kłos CommitDate: Wed Oct 6 11:09:02 2021 +0200 jsdialog: weld plain widget Change-Id: I85a23a7ea14ab580d4dc222d80edfaa8423cf952 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122562 Tested-by: Jenkins CollaboraOffice Reviewed-by: Szymon Kłos Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123106 Tested-by: Szymon Kłos diff --git a/vcl/inc/jsdialog/jsdialogbuilder.hxx b/vcl/inc/jsdialog/jsdialogbuilder.hxx index 55aa57d71888..dc30508dba51 100644 --- a/vcl/inc/jsdialog/jsdialogbuilder.hxx +++ b/vcl/inc/jsdialog/jsdialogbuilder.hxx @@ -275,6 +275,7 @@ public: virtual std::unique_ptr weld_menu_button(const OString& id) override; virtual std::unique_ptr weld_popover(const OString& id) override; virtual std::unique_ptr weld_box(const OString& id) override; +virtual std::unique_ptr weld_widget(const OString& id) override; static weld::MessageDialog* CreateMessageDialog(weld::Widget* pParent, VclMessageType eMessageType, diff --git a/vcl/jsdialog/jsdialogbuilder.cxx b/vcl/jsdialog/jsdialogbuilder.cxx index 6b6c12831d73..64f2b3029212 100644 --- a/vcl/jsdialog/jsdialogbuilder.cxx +++ b/vcl/jsdialog/jsdialogbuilder.cxx @@ -1045,6 +1045,19 @@ std::unique_ptr JSInstanceBuilder::weld_box(const OString& id) return pWeldWidget; } +std::unique_ptr JSInstanceBuilder::weld_widget(const OString& id) +{ +vcl::Window* pWidget = m_xBuilder->get(id); +auto pWeldWidget = pWidget ? std::make_unique>( + this, pWidget, this, false) + : nullptr; + +if (pWeldWidget) +RememberWidget(id, pWeldWidget.get()); + +return pWeldWidget; +} + weld::MessageDialog* JSInstanceBuilder::CreateMessageDialog(weld::Widget* pParent, VclMessageType eMessageType, VclButtonsType eButtonType,
[Libreoffice-commits] core.git: sfx2/source
sfx2/source/appl/workwin.cxx |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) New commits: commit e304383b88d271b0e140946af201099c8314dd0a Author: Luboš Luňák AuthorDate: Tue Oct 5 15:11:43 2021 +0200 Commit: Szymon Kłos CommitDate: Wed Oct 6 11:06:46 2021 +0200 avoid repeated calls to SfxNotebookBar::IsActive() The call reads configuration, and so is a bit expensive when called in a loop. Change-Id: I62398bcfdc856f02f6e2d928bac2f144bc47424d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123103 Tested-by: Jenkins Reviewed-by: Szymon Kłos diff --git a/sfx2/source/appl/workwin.cxx b/sfx2/source/appl/workwin.cxx index ce2459d15748..fadeeca7339a 100644 --- a/sfx2/source/appl/workwin.cxx +++ b/sfx2/source/appl/workwin.cxx @@ -1189,6 +1189,7 @@ void SfxWorkWindow::UpdateObjectBars_Impl2() // Iterate over all Toolboxes xLayoutManager->lock(); +const bool isNotebookBarActive = sfx2::SfxNotebookBar::IsActive(); for ( auto const & n: aObjBarList ) { ToolbarId eId = n.eId; @@ -1202,7 +1203,7 @@ void SfxWorkWindow::UpdateObjectBars_Impl2() // Is a ToolBox required in this context ? bool bModesMatching = (nUpdateMode != SfxVisibilityFlags::Invisible) && ((nTbxMode & nUpdateMode) == nUpdateMode); -if ( bDestroy || sfx2::SfxNotebookBar::IsActive()) +if ( bDestroy || isNotebookBarActive) { OUString aTbxId = g_aTbxTypeName + GetResourceURLFromToolbarId(eId); xLayoutManager->destroyElement( aTbxId );
[Libreoffice-commits] core.git: include/vcl vcl/inc vcl/source
include/vcl/outdev.hxx |2 -- vcl/inc/PhysicalFontCollection.hxx |1 - vcl/inc/outdev.h | 13 - vcl/source/gdi/print.cxx |4 vcl/source/gdi/virdev.cxx |1 - vcl/source/outdev/font.cxx |2 -- vcl/source/outdev/outdev.cxx |2 -- 7 files changed, 25 deletions(-) New commits: commit 564e12518632d937cf9e510679f33399851d8a9c Author: Chris Sherlock AuthorDate: Wed Oct 6 16:02:20 2021 +1100 Commit: Mike Kaganski CommitDate: Wed Oct 6 10:11:13 2021 +0200 vcl: remove unused class ImplDeviceFontSizeList mpDeviceFontSizeList is no longer used in OutputDevice, so remove this member variable, and then remove ImplDeviceFontSizeList. Change-Id: I93353909485a9243ae02d44c2adc1c9c4a769cef Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123125 Tested-by: Jenkins Reviewed-by: Mike Kaganski diff --git a/include/vcl/outdev.hxx b/include/vcl/outdev.hxx index eb74ae2f248e..f44a9d5e3b70 100644 --- a/include/vcl/outdev.hxx +++ b/include/vcl/outdev.hxx @@ -70,7 +70,6 @@ class LogicalFontInstance; struct SystemGraphicsData; class ImplFontCache; class PhysicalFontCollection; -class ImplDeviceFontSizeList; class ImplMultiTextLineInfo; class SalGraphics; class Gradient; @@ -184,7 +183,6 @@ private: GDIMetaFile*mpMetaFile; mutable rtl::Reference mpFontInstance; mutable std::unique_ptr mpFontFaceCollection; -mutable std::unique_ptr mpDeviceFontSizeList; std::vectormaOutDevStateStack; std::unique_ptr mpOutDevData; std::vector< VCLXGraphics* >* mpUnoGraphicsList; diff --git a/vcl/inc/PhysicalFontCollection.hxx b/vcl/inc/PhysicalFontCollection.hxx index ee1fdad285c9..b35d3d1c6f99 100644 --- a/vcl/inc/PhysicalFontCollection.hxx +++ b/vcl/inc/PhysicalFontCollection.hxx @@ -29,7 +29,6 @@ #define MAX_GLYPHFALLBACK 16 -class ImplDeviceFontSizeList; class ImplGlyphFallbackFontSubstitution; class ImplPreMatchFontSubstitution; diff --git a/vcl/inc/outdev.h b/vcl/inc/outdev.h index c9185bcc23fb..c6cf81369ee2 100644 --- a/vcl/inc/outdev.h +++ b/vcl/inc/outdev.h @@ -36,19 +36,6 @@ class VirtualDevice; class PhysicalFontCollection; enum class AddFontSubstituteFlags; -class ImplDeviceFontSizeList -{ -private: -std::vectormaSizeList; - -public: -ImplDeviceFontSizeList() -{ maSizeList.reserve( 32 ); } -voidAdd( int nHeight ) { maSizeList.push_back( nHeight ); } -int Count() const { return maSizeList.size(); } -int Get( int nIndex ) const { return maSizeList[ nIndex ]; } -}; - // nowadays these substitutions are needed for backward compatibility and tight platform integration: // - substitutions from configuration entries (Tools->Options->FontReplacement and/or fontconfig) // - device specific substitutions (e.g. for PS printer builtin fonts) diff --git a/vcl/source/gdi/print.cxx b/vcl/source/gdi/print.cxx index a4d020008f30..981dd6ec76b6 100644 --- a/vcl/source/gdi/print.cxx +++ b/vcl/source/gdi/print.cxx @@ -556,7 +556,6 @@ void Printer::ImplReleaseFonts() mpFontInstance.clear(); mpFontFaceCollection.reset(); -mpDeviceFontSizeList.reset(); } void Printer::ImplReleaseGraphics(bool bRelease) @@ -923,7 +922,6 @@ void Printer::dispose() // TODO: consolidate duplicate cleanup by Printer and OutputDevice mpFontInstance.clear(); mpFontFaceCollection.reset(); -mpDeviceFontSizeList.reset(); mxFontCache.reset(); // font list deleted by OutputDevice dtor } @@ -1070,7 +1068,6 @@ bool Printer::SetPrinterProps( const Printer* pPrinter ) pSVData->mpDefInst->DestroyInfoPrinter( mpInfoPrinter ); mpFontInstance.clear(); mpFontFaceCollection.reset(); -mpDeviceFontSizeList.reset(); // clean up font list mxFontCache.reset(); mxFontCollection.reset(); @@ -1099,7 +1096,6 @@ bool Printer::SetPrinterProps( const Printer* pPrinter ) mpFontInstance.clear(); mpFontFaceCollection.reset(); -mpDeviceFontSizeList.reset(); mxFontCache.reset(); mxFontCollection.reset(); mbInitFont = true; diff --git a/vcl/source/gdi/virdev.cxx b/vcl/source/gdi/virdev.cxx index fb4f52625c09..9a40f04e2725 100644 --- a/vcl/source/gdi/virdev.cxx +++ b/vcl/source/gdi/virdev.cxx @@ -472,7 +472,6 @@ void VirtualDevice::ImplSetReferenceDevice( RefDevMode i_eRefDevMode, sal_Int32 // => clean up the original font lists before getting new ones mpFontInstance.clear(); mpFontFaceCollection.reset(); -mpDeviceFontSizeList.reset(); // preserve global font lists ImplSVData* pSVData = ImplGetSVData(); diff --git a/vcl/source/outdev/font.cxx b/vcl/source/outdev/font.cxx