[Libreoffice-commits] core.git: Branch 'distro/collabora/co-2021' - 4 commits - emfio/qa sfx2/classification svtools/source sw/qa xmloff/source
emfio/qa/cppunit/emf/EmfImportTest.cxx |8 emfio/qa/cppunit/wmf/data/TestPalette.wmf |binary sfx2/classification/example_sl-SI.xml |2 +- svtools/source/control/valueset.cxx|4 +++- sw/qa/extras/odfexport/data/tdf137199.docx |binary sw/qa/extras/odfexport/odfexport.cxx | 11 +++ xmloff/source/style/xmlnume.cxx| 19 ++- 7 files changed, 37 insertions(+), 7 deletions(-) New commits: commit a253c5823bf8b8de13a091eac315f4cb0d9c4dd2 Author: Vasily Melenchuk AuthorDate: Fri May 28 09:10:35 2021 +0300 Commit: Andras Timar CommitDate: Sun May 30 08:20:17 2021 +0200 tdf#137199: sw: convert list format string to prefix/suffix for ODF Since internally LO is able right now to use list level format strings and prefixes/suffixes only for backward compatibility, there is a need for conversion from format string (like "%1.") to prefix ("") and suffix (".") still used by ODT. Change-Id: If4b459e1b25b7f0ce511e6ac2de0824bb2c43d05 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116288 Tested-by: Jenkins Reviewed-by: Thorsten Behrens Signed-off-by: Xisco Fauli Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116316 diff --git a/sw/qa/extras/odfexport/data/tdf137199.docx b/sw/qa/extras/odfexport/data/tdf137199.docx new file mode 100644 index ..25b52977beca Binary files /dev/null and b/sw/qa/extras/odfexport/data/tdf137199.docx differ diff --git a/sw/qa/extras/odfexport/odfexport.cxx b/sw/qa/extras/odfexport/odfexport.cxx index 615cbed57fe5..5651a2c3d954 100644 --- a/sw/qa/extras/odfexport/odfexport.cxx +++ b/sw/qa/extras/odfexport/odfexport.cxx @@ -131,6 +131,17 @@ DECLARE_ODFEXPORT_TEST(testMathObjectFlatExport, "2_MathType3.docx") CPPUNIT_ASSERT_EQUAL(OUString(" size 12{2+2=4} {}"), formula2); } +DECLARE_ODFEXPORT_TEST(testTdf137199, "tdf137199.docx") +{ +CPPUNIT_ASSERT_EQUAL(OUString(">1<"), getProperty(getParagraph(1), "ListLabelString")); + +CPPUNIT_ASSERT_EQUAL(OUString("1)"), getProperty(getParagraph(2), "ListLabelString")); + +CPPUNIT_ASSERT_EQUAL(OUString("HELLO1WORLD!"), getProperty(getParagraph(3), "ListLabelString")); + +CPPUNIT_ASSERT_EQUAL(OUString("HELLO2WORLD!"), getProperty(getParagraph(4), "ListLabelString")); +} + static void testTdf43569_CheckIfFieldParse() { { diff --git a/xmloff/source/style/xmlnume.cxx b/xmloff/source/style/xmlnume.cxx index 2aac21253218..8c5ac4dc52c9 100644 --- a/xmloff/source/style/xmlnume.cxx +++ b/xmloff/source/style/xmlnume.cxx @@ -121,7 +121,24 @@ void SvxXMLNumRuleExport::exportLevelStyle( sal_Int32 nLevel, { rProp.Value >>= sSuffix; } -else if( rProp.Name == "BulletChar" ) +else if (rProp.Name == "ListFormat") +{ +OUString sListFormat; +rProp.Value >>= sListFormat; + +// Since we have no support for entire format string it should be converted +// to prefix and suffix. Of course, it is not so flexible as format string, +// but it is the only option +sal_Int32 nFirstReplacement = sListFormat.indexOf('%'); +sal_Int32 nLastReplacement = sListFormat.lastIndexOf('%') + 1; +if (nFirstReplacement > 0) +// Everything before first '%' will be prefix +sPrefix = sListFormat.copy(0, nFirstReplacement); +if (nLastReplacement >= 0 && nLastReplacement < sListFormat.getLength() -1 ) +// Everything beyond last '%' (+1 for follow up id) is a suffix +sSuffix = sListFormat.copy(nLastReplacement + 1); +} +else if (rProp.Name == "BulletChar") { OUString sValue; rProp.Value >>= sValue; commit dd738da44019885b7f22271d6a87b52a108bf342 Author: Bartosz Kosiorek AuthorDate: Thu May 27 19:38:50 2021 +0200 Commit: Andras Timar CommitDate: Sun May 30 08:20:16 2021 +0200 tdf#117957 WMF Replace ellipses with rects to fix tests on arm64 The issue is caused by floating numbers, On x86_64 it is: 338.499728160392-445.269903703769 on arm it is: 338.499728160392-445.26990370377 As in test files, we have two ellipses (which are made from small lines), which points rounds differently on different architectures Change-Id: I44dd5c7b3b13f3b1680d5a3a8348d6f467cb2f7c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116270 Tested-by: Jenkins Tested-by: René Engelhard Reviewed-by: Xisco Fauli Signed-off-by: Xisco Fauli Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116314 Reviewed-by: Bartosz Kosiorek diff --git a/emfio/qa/cppunit/emf/EmfImportTest.cxx b/emfio/qa/cppunit/emf/EmfImportTest.cxx index e74bb9ad3725..5f0567fd313b 100644 --- a/emfio/qa/cppunit/emf/EmfImportTest.cxx +++ b/emfio/qa/cppunit/emf/EmfImportTest.
[Libreoffice-commits] core.git: cui/source
cui/source/dialogs/AdditionsDialog.cxx | 11 ++- 1 file changed, 10 insertions(+), 1 deletion(-) New commits: commit e98b0891d6e0f1d6be4e4a4761bd1ab16bfab85c Author: Muhammet Kara AuthorDate: Sat May 29 18:17:54 2021 +0300 Commit: Muhammet Kara CommitDate: Sun May 30 07:11:05 2021 +0200 tdf#136292: Fix crash on invalid JSON from the extensions API Change-Id: I91ed555f93173dee10e87025b231560693be50b5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116390 Tested-by: Jenkins Reviewed-by: Muhammet Kara diff --git a/cui/source/dialogs/AdditionsDialog.cxx b/cui/source/dialogs/AdditionsDialog.cxx index 344bcf5f9ba3..5ca2d10051ec 100644 --- a/cui/source/dialogs/AdditionsDialog.cxx +++ b/cui/source/dialogs/AdditionsDialog.cxx @@ -52,6 +52,7 @@ #include #include +#include #include #include @@ -131,7 +132,15 @@ void parseResponse(const std::string& rResponse, std::vector& aAdd if (rResponse.empty()) return; -aJsonDoc.load(rResponse, aConfig); +try +{ +aJsonDoc.load(rResponse, aConfig); +} +catch (const orcus::json::parse_error&) +{ +TOOLS_WARN_EXCEPTION("cui.dialogs", "Invalid JSON file from the extensions API"); +return; +} auto aDocumentRoot = aJsonDoc.get_document_root(); if (aDocumentRoot.type() != orcus::json::node_t::object) ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: helpcontent2
helpcontent2 |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 0d4e5630ac638e555a4a3261b3baa6d271cf5a70 Author: Steve Fanning AuthorDate: Sun May 30 00:02:35 2021 +0200 Commit: Gerrit Code Review CommitDate: Sun May 30 00:02:35 2021 +0200 Update git submodules * Update helpcontent2 from branch 'master' to d443ebed5df323aa13c2f5fa505b98366d8a4f9c - Fix help description for Calc's TEXTJOIN function. Change-Id: I91bb809ab41c0299c65236a0091c2da288a47b31 Reviewed-on: https://gerrit.libreoffice.org/c/help/+/116163 Tested-by: Jenkins Reviewed-by: Olivier Hallot diff --git a/helpcontent2 b/helpcontent2 index 96e26682870d..d443ebed5df3 16 --- a/helpcontent2 +++ b/helpcontent2 @@ -1 +1 @@ -Subproject commit 96e26682870d3032dc06ed0a580f22111998 +Subproject commit d443ebed5df323aa13c2f5fa505b98366d8a4f9c ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] help.git: source/text
source/text/scalc/01/func_textjoin.xhp |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit d443ebed5df323aa13c2f5fa505b98366d8a4f9c Author: Steve Fanning AuthorDate: Fri May 28 21:47:18 2021 +0200 Commit: Olivier Hallot CommitDate: Sun May 30 00:02:35 2021 +0200 Fix help description for Calc's TEXTJOIN function. Change-Id: I91bb809ab41c0299c65236a0091c2da288a47b31 Reviewed-on: https://gerrit.libreoffice.org/c/help/+/116163 Tested-by: Jenkins Reviewed-by: Olivier Hallot diff --git a/source/text/scalc/01/func_textjoin.xhp b/source/text/scalc/01/func_textjoin.xhp index ed3e13b67..b7f04904d 100644 --- a/source/text/scalc/01/func_textjoin.xhp +++ b/source/text/scalc/01/func_textjoin.xhp @@ -28,7 +28,7 @@ TEXTJOIN( delimiter, skip_empty, String 1[; String 2][; … ;[String 253]] ) delimiter is a text string and can be a range. -skip_empty is a logical (TRUE or FALSE, 1 or 0) argument. When TRUE, empty strings will be ignored. +skip_empty is a logical argument. When set to FALSE or 0, empty strings will be taken into account and this may lead to adjacent delimiters in the returned string. When set to any other value (e.g. TRUE or 1), empty strings will be ignored. String 1[; String 2][; … ;[String 253]] are strings, references to cells or to cell ranges of strings. Ranges are traversed row by row (from top to bottom). If delimiter is a range, the range need not be of the same size as the number of strings to be joined. ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: sc/source
sc/source/filter/html/htmlimp.cxx | 15 +-- sc/source/filter/html/htmlpars.cxx | 25 +++-- sc/source/filter/inc/htmlpars.hxx |9 + 3 files changed, 41 insertions(+), 8 deletions(-) New commits: commit 9bf4e0d8f538cb0b51d2e803156301a956deaac3 Author: Andreas Heinisch AuthorDate: Tue Apr 27 15:06:48 2021 +0200 Commit: Eike Rathke CommitDate: Sat May 29 23:34:36 2021 +0200 tdf#127484 - Use HTML caption tag to name externally linked tables Change-Id: I0abca8e1966e93337c16609211c146c0ed97c62f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114743 Tested-by: Jenkins Reviewed-by: Eike Rathke diff --git a/sc/source/filter/html/htmlimp.cxx b/sc/source/filter/html/htmlimp.cxx index 4a9a3a93b099..f1004ba0fe73 100644 --- a/sc/source/filter/html/htmlimp.cxx +++ b/sc/source/filter/html/htmlimp.cxx @@ -181,14 +181,17 @@ void ScHTMLImport::WriteToDocument( assert(!"can't move"); } // insert table number as name -InsertRangeName( *mpDoc, ScfTools::GetNameFromHTMLIndex( nTableId ), aNewRange ); +OUStringBuffer aName(ScfTools::GetNameFromHTMLIndex(nTableId)); // insert table id as name if (!pTable->GetTableName().isEmpty()) -{ -OUString aName( ScfTools::GetNameFromHTMLName( pTable->GetTableName() ) ); -if (!mpDoc->GetRangeName()->findByUpperName(ScGlobal::getCharClassPtr()->uppercase(aName))) -InsertRangeName( *mpDoc, aName, aNewRange ); -} +aName.append(" - " + pTable->GetTableName()); +// insert table caption as name +if (!pTable->GetTableCaption().isEmpty()) +aName.append(" - " + pTable->GetTableCaption()); +if (!mpDoc->GetRangeName()->findByUpperName( +ScGlobal::getCharClassPtr()->uppercase(aName.toString( +InsertRangeName(*mpDoc, aName.toString(), aNewRange); + } } diff --git a/sc/source/filter/html/htmlpars.cxx b/sc/source/filter/html/htmlpars.cxx index 394691b70cbe..e320269352ed 100644 --- a/sc/source/filter/html/htmlpars.cxx +++ b/sc/source/filter/html/htmlpars.cxx @@ -1804,7 +1804,8 @@ ScHTMLTable::ScHTMLTable( ScHTMLTable& rParentTable, const HtmlImportInfo& rInfo mbPreFormText( bPreFormText ), mbRowOn( false ), mbDataOn( false ), -mbPushEmptyLine( false ) +mbPushEmptyLine( false ), +mbCaptionOn ( false ) { if( mbPreFormText ) { @@ -1851,7 +1852,8 @@ ScHTMLTable::ScHTMLTable( mbPreFormText( false ), mbRowOn( false ), mbDataOn( false ), -mbPushEmptyLine( false ) +mbPushEmptyLine( false ), +mbCaptionOn ( false ) { // open the first "cell" of the document ImplRowOn(); @@ -1901,6 +1903,9 @@ void ScHTMLTable::PutText( const HtmlImportInfo& rInfo ) mxCurrEntry->AdjustStart( rInfo ); else mxCurrEntry->AdjustEnd( rInfo ); +if (mbCaptionOn) +maCaptionBuffer.append(rInfo.aText); + } } @@ -1950,6 +1955,20 @@ ScHTMLTable* ScHTMLTable::TableOff( const HtmlImportInfo& rInfo ) return mbPreFormText ? this : CloseTable( rInfo ); } +void ScHTMLTable::CaptionOn() +{ +mbCaptionOn = true; +maCaptionBuffer.setLength(0); +} + +void ScHTMLTable::CaptionOff() +{ +if (!mbCaptionOn) +return; +maCaption = maCaptionBuffer.makeStringAndClear().trim(); +mbCaptionOn = false; +} + ScHTMLTable* ScHTMLTable::PreOn( const HtmlImportInfo& rInfo ) { PushEntry( rInfo ); @@ -2823,6 +2842,8 @@ void ScHTMLQueryParser::ProcessToken( const HtmlImportInfo& rInfo ) // --- table handling --- case HtmlTokenId::TABLE_ON: TableOn( rInfo ); break; // case HtmlTokenId::TABLE_OFF:TableOff( rInfo ); break; // +case HtmlTokenId::CAPTION_ON: mpCurrTable->CaptionOn(); break; // +case HtmlTokenId::CAPTION_OFF: mpCurrTable->CaptionOff(); break; // case HtmlTokenId::TABLEROW_ON: mpCurrTable->RowOn( rInfo ); break; // case HtmlTokenId::TABLEROW_OFF: mpCurrTable->RowOff( rInfo ); break; // case HtmlTokenId::TABLEHEADER_ON: // diff --git a/sc/source/filter/inc/htmlpars.hxx b/sc/source/filter/inc/htmlpars.hxx index 1bf8c9b91008..a683a0c984d7 100644 --- a/sc/source/filter/inc/htmlpars.hxx +++ b/sc/source/filter/inc/htmlpars.hxx @@ -338,6 +338,8 @@ public: /** Returns the name of the table, specified in the TABLE tag. */ const OUString& GetTableName() const { return maTableName; } +/** Returns the caption of the table, specified in the tag. */ +const OUString& GetTableCaption() const { return maCaption; } /** Returns the unique identifier of the table. */ ScHTMLTableId GetTableId() const { return maTableId.mnTableId; } /** Returns the cell spanning of the spec
[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.4' - oox/source sd/qa
oox/source/drawingml/textcharacterproperties.cxx |2 + sd/qa/unit/data/pptx/tdf96061.pptx |binary sd/qa/unit/export-tests-ooxml2.cxx | 35 +++ 3 files changed, 37 insertions(+) New commits: commit e61bdbf41cf925147eee7f92142089f8adf0a237 Author: Gülşah Köse AuthorDate: Wed May 19 14:37:36 2021 +0300 Commit: Andras Timar CommitDate: Sat May 29 23:32:40 2021 +0200 tdf#96061 Unset the highlight property When we have highlight property on specific part of the text the following texts were highligthing. To prevent this we unset the highlight property when we have not highlight property anymore. Change-Id: I802cde1c784afe47201a9ba4f41827dd0c705035 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115800 Tested-by: Jenkins Reviewed-by: Gülşah Köse Signed-off-by: Xisco Fauli Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116176 Reviewed-by: Andras Timar Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116333 Tested-by: Jenkins CollaboraOffice diff --git a/oox/source/drawingml/textcharacterproperties.cxx b/oox/source/drawingml/textcharacterproperties.cxx index de47058e60ca..6b55c5326455 100644 --- a/oox/source/drawingml/textcharacterproperties.cxx +++ b/oox/source/drawingml/textcharacterproperties.cxx @@ -178,6 +178,8 @@ void TextCharacterProperties::pushToPropMap( PropertyMap& rPropMap, const XmlFil if( maHighlightColor.isUsed() ) rPropMap.setProperty( PROP_CharBackColor, maHighlightColor.getColor( rFilter.getGraphicHelper() )); +else +rPropMap.setProperty( PROP_CharBackColor, sal_Int32(-1)); } static void pushToGrabBag( PropertySet& rPropSet, const std::vector& aVectorOfProperyValues ) diff --git a/sd/qa/unit/data/pptx/tdf96061.pptx b/sd/qa/unit/data/pptx/tdf96061.pptx new file mode 100644 index ..c6e6aa5ae16f Binary files /dev/null and b/sd/qa/unit/data/pptx/tdf96061.pptx differ diff --git a/sd/qa/unit/export-tests-ooxml2.cxx b/sd/qa/unit/export-tests-ooxml2.cxx index 399bd4657861..27d42132557f 100644 --- a/sd/qa/unit/export-tests-ooxml2.cxx +++ b/sd/qa/unit/export-tests-ooxml2.cxx @@ -188,6 +188,7 @@ public: void testTdf131554(); void testTdf132282(); void testTdf128213ShapeRot(); +void testTdf96061_textHighlight(); CPPUNIT_TEST_SUITE(SdOOXMLExportTest2); @@ -294,6 +295,7 @@ public: CPPUNIT_TEST(testTdf131554); CPPUNIT_TEST(testTdf132282); CPPUNIT_TEST(testTdf128213ShapeRot); +CPPUNIT_TEST(testTdf96061_textHighlight); CPPUNIT_TEST_SUITE_END(); @@ -2752,6 +2754,39 @@ void SdOOXMLExportTest2::testTdf128213ShapeRot() assertXPath(pXmlDocRels, "/p:sld/p:cSld/p:spTree/p:sp/p:txBody/a:bodyPr/a:scene3d/a:camera/a:rot", "rev", "540"); } +void SdOOXMLExportTest2::testTdf96061_textHighlight() +{ +::sd::DrawDocShellRef xDocShRef = loadURL( m_directories.getURLFromSrc(u"/sd/qa/unit/data/pptx/tdf96061.pptx"), PPTX); + +uno::Reference xShape(getShapeFromPage(0, 0, xDocShRef)); +uno::Reference const xParagraph1(getParagraphFromShape(0, xShape)); +uno::Reference xRun1(getRunFromParagraph(0, xParagraph1)); +uno::Reference< beans::XPropertySet> xPropSet1(xRun1, uno::UNO_QUERY_THROW); +sal_Int32 aColor; +xPropSet1->getPropertyValue("CharBackColor") >>= aColor; +CPPUNIT_ASSERT_EQUAL(sal_Int32(16776960), aColor); + +uno::Reference const xParagraph2(getParagraphFromShape(1, xShape)); +uno::Reference xRun2(getRunFromParagraph(0, xParagraph2)); +uno::Reference< beans::XPropertySet> xPropSet2(xRun2, uno::UNO_QUERY_THROW); +xPropSet2->getPropertyValue("CharBackColor") >>= aColor; +CPPUNIT_ASSERT_EQUAL(sal_Int32(-1), aColor); + +xDocShRef = saveAndReload( xDocShRef.get(), PPTX ); + +uno::Reference xShape2(getShapeFromPage(0, 0, xDocShRef)); +uno::Reference const xParagraph3(getParagraphFromShape(0, xShape2)); +uno::Reference xRun3(getRunFromParagraph(0, xParagraph3)); +uno::Reference< beans::XPropertySet> xPropSet3(xRun3, uno::UNO_QUERY_THROW); +xPropSet3->getPropertyValue("CharBackColor") >>= aColor; +CPPUNIT_ASSERT_EQUAL(sal_Int32(16776960), aColor); + +uno::Reference const xParagraph4(getParagraphFromShape(1, xShape2)); +uno::Reference xRun4(getRunFromParagraph(0, xParagraph4)); +uno::Reference< beans::XPropertySet> xPropSet4(xRun4, uno::UNO_QUERY_THROW); +xPropSet4->getPropertyValue("CharBackColor") >>= aColor; +CPPUNIT_ASSERT_EQUAL(sal_Int32(-1), aColor); +} CPPUNIT_TEST_SUITE_REGISTRATION(SdOOXMLExportTest2); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: sc/inc sc/qa sc/source
sc/inc/clipparam.hxx |7 sc/inc/document.hxx |5 sc/inc/refupdatecontext.hxx |5 sc/qa/unit/helper/qahelper.cxx | 44 sc/qa/unit/helper/qahelper.hxx |9 sc/qa/unit/ucalc_copypaste.cxx | 4810 +-- sc/source/core/data/clipparam.cxx|2 sc/source/core/data/document.cxx |2 sc/source/core/data/formulacell.cxx | 15 sc/source/core/data/refupdatecontext.cxx | 15 sc/source/core/tool/rangenam.cxx |2 sc/source/core/tool/refupdat.cxx |6 sc/source/core/tool/token.cxx| 30 13 files changed, 4657 insertions(+), 295 deletions(-) New commits: commit bda9929821de620f1f85528abd1c4bba46d937d6 Author: scito AuthorDate: Wed May 26 21:00:33 2021 +0200 Commit: Eike Rathke CommitDate: Sat May 29 22:46:11 2021 +0200 tdf#142201 tdf#142065 fix cut paste transpose references, incl. undo For cut paste transposed, references are not anymore updated during UpdateReference(), but all these references will be updated during UpdateTranspose(). In previous implementation, some references were moved (i.e. updated). This caused problems in UpdateTranspose(). A transposed flag is added to the clipparam. This flag is checked during UpdateReference(). UpdateTranspose() must only operate on (i.e. transpose) references pointing to the source area. That's why updates must not be made during UpdateReference(). Otherwise references pointing to the destination range will be transposed wrongly during UpdateTranspose(). References in formulas as well as in named ranges are fixed and tested. I've added unit tests for all these cases and I've enhanced my previous copy/paste test framework (6491c205acb3c166d93ef6a41199d344e21d98ac) for cut/paste tests, incl. undo. Before LibreOffice 7.2, adjusting of references in cut paste transposed was completely broken (tdf#71058, tdf#68976, tdf#142065 and tdf#142201). Change-Id: I8a8d295f1cc683572905ae9633e16d010cfb8792 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116073 Tested-by: Jenkins Reviewed-by: Eike Rathke diff --git a/sc/inc/clipparam.hxx b/sc/inc/clipparam.hxx index 55f37fe1d89e..4487e77093ff 100644 --- a/sc/inc/clipparam.hxx +++ b/sc/inc/clipparam.hxx @@ -36,6 +36,8 @@ struct SC_DLLPUBLIC ScClipParam boolmbCutMode; sal_uInt32 mnSourceDocID; ScRangeListVector maProtectedChartRangesVector; +/** Was this clip transposed? */ +bool mbTransposed = false; ScClipParam(); ScClipParam(const ScRange& rRange, bool bCutMode); @@ -69,6 +71,11 @@ struct SC_DLLPUBLIC ScClipParam sal_uInt32 getSourceDocID() const { return mnSourceDocID; } void setSourceDocID( sal_uInt32 nVal ) { mnSourceDocID = nVal; } + +/** + * Was this clip transposed? + */ +bool isTransposed() const { return mbTransposed; } }; /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sc/inc/document.hxx b/sc/inc/document.hxx index e4127d426d25..63aec33a5161 100644 --- a/sc/inc/document.hxx +++ b/sc/inc/document.hxx @@ -1706,7 +1706,10 @@ public: void UpdateReference( sc::RefUpdateContext& rCxt, ScDocument* pUndoDoc = nullptr, bool bIncludeDraw = true, bool bUpdateNoteCaptionPos = true ); - +/** + * @param pClipDoc original clipboard doc, i.e. non-transposed + * This clip doc is used to check references pointing to cut cells. + */ SC_DLLPUBLIC void UpdateTranspose( const ScAddress& rDestPos, ScDocument* pClipDoc, const ScMarkData& rMark, ScDocument* pUndoDoc ); diff --git a/sc/inc/refupdatecontext.hxx b/sc/inc/refupdatecontext.hxx index 7e1a4d9e8dd6..1c50c7a2c0d1 100644 --- a/sc/inc/refupdatecontext.hxx +++ b/sc/inc/refupdatecontext.hxx @@ -68,6 +68,9 @@ struct RefUpdateContext */ ScRange maRange; +/** Are the data transposed? */ +bool mbTransposed; + /** Amount and direction of movement in the column direction. */ SCCOL mnColDelta; /** Amount and direction of movement in the row direction. */ @@ -80,7 +83,7 @@ struct RefUpdateContext ColumnBlockPositionSet* mpBlockPos; // not owning -RefUpdateContext(ScDocument& rDoc); +RefUpdateContext(ScDocument& rDoc, ScDocument* pClipdoc = nullptr); bool isInserted() const; bool isDeleted() const; diff --git a/sc/qa/unit/helper/qahelper.cxx b/sc/qa/unit/helper/qahelper.cxx index 8502cf6caf52..590250847d95 100644 --- a/sc/qa/unit/helper/qahelper.cxx +++ b/sc/qa/unit/helper/qahelper.cxx @@ -1027,7 +1027,38 @@ bool insertRangeNames( return true; } -void printRange(ScDocument* pDoc, const ScRange& rRange, const
GSOC Project - "Write Missing Unit Tests"
Hi everyone! I am Shubham Jain. I am an ungrad student from India. I am very happy to get to work at an esteemed organisation like LibreOffice for the summer. I am selected for the GSOC project - "Write Missing Unit Tests". I'll be working under the mentorship of Mr. Xisco Fauli and Mr. Ilmari Lauhakangas. My main goal will be to extend the test coverage for all the modules present in LO. Looking forward to connecting with all the mentors and other participants. Shubham Jain ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice
[Libreoffice-commits] core.git: xmloff/source
xmloff/source/text/txtimp.cxx |1 + 1 file changed, 1 insertion(+) New commits: commit e0c4cdf9a874bb40f028a26562e6399d39cb2c0f Author: Mike Kaganski AuthorDate: Sat May 29 21:16:00 2021 +0200 Commit: Mike Kaganski CommitDate: Sat May 29 21:58:15 2021 +0200 Missing include Change-Id: I0b818b5bad6e3577b65fe7bccc7a258cbf54 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116165 Tested-by: Jenkins Reviewed-by: Mike Kaganski diff --git a/xmloff/source/text/txtimp.cxx b/xmloff/source/text/txtimp.cxx index 90dc8dcc0c84..813e66ed8083 100644 --- a/xmloff/source/text/txtimp.cxx +++ b/xmloff/source/text/txtimp.cxx @@ -18,6 +18,7 @@ */ #include +#include #include #include ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: vcl/unx
vcl/unx/gtk3/gtkinst.cxx | 17 +++-- 1 file changed, 7 insertions(+), 10 deletions(-) New commits: commit 782b189045b571c841d7124a8d753797a108a6f5 Author: Caolán McNamara AuthorDate: Sat May 29 16:36:38 2021 +0100 Commit: Caolán McNamara CommitDate: Sat May 29 20:48:04 2021 +0200 gtk[3|4] make LocalizeDecimalSeparator take just a keyval as arg Change-Id: Id37a275d56fdbcc0f18f6a322810966f4269f501 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116392 Tested-by: Jenkins Reviewed-by: Caolán McNamara diff --git a/vcl/unx/gtk3/gtkinst.cxx b/vcl/unx/gtk3/gtkinst.cxx index 653a2e0073d8..951468d66c20 100644 --- a/vcl/unx/gtk3/gtkinst.cxx +++ b/vcl/unx/gtk3/gtkinst.cxx @@ -2180,23 +2180,22 @@ GtkWindow* get_active_window() return pFocus; } -#if !GTK_CHECK_VERSION(4, 0, 0) -void LocalizeDecimalSeparator(GdkEventKey* pEvent) +void LocalizeDecimalSeparator(guint& keyval) { // #i1820# use locale specific decimal separator -if (pEvent->keyval == GDK_KEY_KP_Decimal && Application::GetSettings().GetMiscSettings().GetEnableLocalizedDecimalSep()) +if (keyval == GDK_KEY_KP_Decimal && Application::GetSettings().GetMiscSettings().GetEnableLocalizedDecimalSep()) { GtkWindow* pFocusWin = get_active_window(); GtkWidget* pFocus = pFocusWin ? gtk_window_get_focus(pFocusWin) : nullptr; // tdf#138932 except if the target is a GtkEntry used for passwords +// GTK4: TODO is it a GtkEntry or a child GtkText that has the focus in this situation? if (!pFocus || !GTK_IS_ENTRY(pFocus) || gtk_entry_get_visibility(GTK_ENTRY(pFocus))) { OUString aSep(Application::GetSettings().GetLocaleDataWrapper().getNumDecimalSep()); -pEvent->keyval = aSep[0]; +keyval = aSep[0]; } } } -#endif void set_cursor(GtkWidget* pWidget, const char *pName) { @@ -2482,7 +2481,7 @@ private: #if !GTK_CHECK_VERSION(4, 0, 0) static gboolean signalKey(GtkWidget*, GdkEventKey* pEvent, gpointer widget) { -LocalizeDecimalSeparator(pEvent); +LocalizeDecimalSeparator(pEvent->keyval); GtkInstanceWidget* pThis = static_cast(widget); return pThis->signal_key(pEvent); } @@ -16672,9 +16671,7 @@ private: static gboolean signalEntryKeyPress(GtkEventControllerKey*, guint keyval, guint keycode, GdkModifierType state, gpointer widget) { GtkInstanceComboBox* pThis = static_cast(widget); -#if 0 -LocalizeDecimalSeparator(pEvent); -#endif +LocalizeDecimalSeparator(keyval); return pThis->signal_entry_key_press(CreateKeyEvent(keyval, keycode, state, 0)); } @@ -18401,7 +18398,7 @@ private: static gboolean signalEntryKeyPress(GtkWidget*, GdkEventKey* pEvent, gpointer widget) { GtkInstanceComboBox* pThis = static_cast(widget); -LocalizeDecimalSeparator(pEvent); +LocalizeDecimalSeparator(pEvent->keyval); return pThis->signal_entry_key_press(pEvent); } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: vcl/unx
vcl/unx/gtk3/gtkinst.cxx | 53 +-- 1 file changed, 38 insertions(+), 15 deletions(-) New commits: commit b825a7e3068c2983cbb753a4ad43acc3bd363c2b Author: Caolán McNamara AuthorDate: Sat May 29 16:31:02 2021 +0100 Commit: Caolán McNamara CommitDate: Sat May 29 20:47:14 2021 +0200 gtk4: get GtkComboBox menu keyhandler with Entry case working Change-Id: Ibcdd82088bb6969353ad6017bc53f06cf12dd283 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116391 Tested-by: Jenkins Reviewed-by: Caolán McNamara diff --git a/vcl/unx/gtk3/gtkinst.cxx b/vcl/unx/gtk3/gtkinst.cxx index 87f020148ae1..653a2e0073d8 100644 --- a/vcl/unx/gtk3/gtkinst.cxx +++ b/vcl/unx/gtk3/gtkinst.cxx @@ -16250,6 +16250,8 @@ private: GtkEditable* m_pEditable; GtkCellView* m_pCellView; GtkEventController* m_pKeyController; +GtkEventController* m_pEntryKeyController; +GtkEventController* m_pMenuKeyController; //std::unique_ptr m_xCustomMenuButtonHelper; std::unique_ptr m_xFont; std::unique_ptr m_xSorter; @@ -16276,7 +16278,7 @@ private: gulong m_nEntryActivateSignalId; //gulong m_nEntryFocusInSignalId; //gulong m_nEntryFocusOutSignalId; -//gulong m_nEntryKeyPressEventSignalId; +gulong m_nEntryKeyPressEventSignalId; guint m_nAutoCompleteIdleId; gint m_nNonCustomLineHeight; gint m_nPrePopupCursorPos; @@ -16667,14 +16669,14 @@ private: return bDone; } -#if 0 -static gboolean signalEntryKeyPress(GtkWidget*, GdkEventKey* pEvent, gpointer widget) +static gboolean signalEntryKeyPress(GtkEventControllerKey*, guint keyval, guint keycode, GdkModifierType state, gpointer widget) { GtkInstanceComboBox* pThis = static_cast(widget); +#if 0 LocalizeDecimalSeparator(pEvent); -return pThis->signal_entry_key_press(pEvent); -} #endif +return pThis->signal_entry_key_press(CreateKeyEvent(keyval, keycode, state, 0)); +} bool signal_entry_key_press(const KeyEvent& rKEvt) { @@ -16834,8 +16836,19 @@ private: break; } -if (!bDone && !m_pEntry) -bDone = signal_entry_key_press(rKEvt); +if (!bDone) +{ +if (!m_pEntry) +bDone = signal_entry_key_press(rKEvt); +else +{ +// with gtk4-4.2.1 the unconsumed keystrokes don't appear to get to +// the GtkEntry for up/down to move to the next entry without this extra help +// (which means this extra indirection is probably effectively +// the same as if calling signal_entry_key_press directly here) +bDone = gtk_event_controller_key_forward(GTK_EVENT_CONTROLLER_KEY(m_pMenuKeyController), m_pEntry); +} +} return bDone; } @@ -17314,7 +17327,9 @@ public: m_nEntryActivateSignalId = g_signal_connect(m_pEntry, "activate", G_CALLBACK(signalEntryActivate), this); //m_nEntryFocusInSignalId = g_signal_connect(m_pEntry, "focus-in-event", G_CALLBACK(signalEntryFocusIn), this); //m_nEntryFocusOutSignalId = g_signal_connect(m_pEntry, "focus-out-event", G_CALLBACK(signalEntryFocusOut), this); -//m_nEntryKeyPressEventSignalId = g_signal_connect(m_pEntry, "key-press-event", G_CALLBACK(signalEntryKeyPress), this); +m_pEntryKeyController = GTK_EVENT_CONTROLLER(gtk_event_controller_key_new()); +m_nEntryKeyPressEventSignalId = g_signal_connect(m_pEntryKeyController, "key-pressed", G_CALLBACK(signalEntryKeyPress), this); +gtk_widget_add_controller(m_pEntry, m_pEntryKeyController); m_nKeyPressEventSignalId = 0; m_pKeyController = nullptr; } @@ -17324,7 +17339,8 @@ public: m_nEntryActivateSignalId = 0; //m_nEntryFocusInSignalId = 0; //m_nEntryFocusOutSignalId = 0; -//m_nEntryKeyPressEventSignalId = 0; +m_pEntryKeyController = nullptr; +m_nEntryKeyPressEventSignalId = 0; m_pKeyController = GTK_EVENT_CONTROLLER(gtk_event_controller_key_new()); m_nKeyPressEventSignalId = g_signal_connect(m_pKeyController, "key-pressed", G_CALLBACK(signalKeyPress), this); gtk_widget_add_controller(GTK_WIDGET(m_pComboBox), m_pKeyController); @@ -17338,10 +17354,12 @@ public: // select via the vcl selection engine, a matching entry. if (m_pMenuWindow) { -GtkEventController* pMenuKeyController = GTK_EVENT_CONTROLLER(gtk_event_controller_key_new()); -g_signal_connect(pMenuKeyController, "key-pressed", G_CALLBACK(signalKeyPress), this); -gtk_widget_add_controller(m_pMenuWindow, pMenuKeyController); +m_pMenuKeyController = GTK_EVENT_CONTROLLER(gtk_event_controller_key_new()); +g_signa
[Libreoffice-commits] core.git: basctl/source
basctl/source/basicide/ObjectCatalog.cxx |3 +-- basctl/source/basicide/baside2b.cxx |6 ++ 2 files changed, 3 insertions(+), 6 deletions(-) New commits: commit c83615f8c61b14bd842faffabc4c2965ca78571a Author: Noel Grandin AuthorDate: Wed May 26 11:00:15 2021 +0200 Commit: Noel Grandin CommitDate: Sat May 29 19:24:09 2021 +0200 no need to check IsDisposed here the call site does that Change-Id: I8373eb4a6b87e96b211dd6bacea051d43b7ae8b4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116178 Tested-by: Noel Grandin Reviewed-by: Noel Grandin diff --git a/basctl/source/basicide/ObjectCatalog.cxx b/basctl/source/basicide/ObjectCatalog.cxx index 5ad7913ae139..89b3f4e2b824 100644 --- a/basctl/source/basicide/ObjectCatalog.cxx +++ b/basctl/source/basicide/ObjectCatalog.cxx @@ -54,8 +54,7 @@ ObjectCatalog::~ObjectCatalog() { disposeOnce(); } void ObjectCatalog::dispose() { -if (!IsDisposed()) -GetParent()->GetSystemWindow()->GetTaskPaneList()->RemoveWindow(this); +GetParent()->GetSystemWindow()->GetTaskPaneList()->RemoveWindow(this); m_xTitle.reset(); m_xTree.reset(); DockingWindow::dispose(); diff --git a/basctl/source/basicide/baside2b.cxx b/basctl/source/basicide/baside2b.cxx index 7d06e117d072..3335424583a0 100644 --- a/basctl/source/basicide/baside2b.cxx +++ b/basctl/source/basicide/baside2b.cxx @@ -1679,8 +1679,7 @@ void WatchWindow::dispose() m_xRemoveWatchButton.reset(); m_xTitleArea.reset(); m_xTreeListBox.reset(); -if (!IsDisposed()) -GetSystemWindow()->GetTaskPaneList()->RemoveWindow( this ); +GetSystemWindow()->GetTaskPaneList()->RemoveWindow( this ); DockingWindow::dispose(); } @@ -1836,8 +1835,7 @@ StackWindow::~StackWindow() void StackWindow::dispose() { -if (!IsDisposed()) -GetSystemWindow()->GetTaskPaneList()->RemoveWindow( this ); +GetSystemWindow()->GetTaskPaneList()->RemoveWindow( this ); m_xTitle.reset(); m_xTreeListBox.reset(); DockingWindow::dispose(); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: sw/inc sw/source
sw/inc/undobj.hxx |6 - sw/source/core/doc/DocumentContentOperationsManager.cxx |4 - sw/source/core/undo/untblk.cxx |6 - sw/source/core/unocore/unostyle.cxx | 20 ++--- sw/source/filter/html/htmlftn.cxx | 16 ++-- sw/source/filter/html/htmltab.cxx | 54 sw/source/filter/html/wrthtml.cxx |6 - sw/source/filter/html/wrthtml.hxx |2 sw/source/filter/writer/writer.cxx | 12 +-- 9 files changed, 63 insertions(+), 63 deletions(-) New commits: commit 66438a0ad5a3c6d2792f4c6c04c2d2405b5679cb Author: Noel Grandin AuthorDate: Fri May 28 15:35:25 2021 +0200 Commit: Noel Grandin CommitDate: Sat May 29 19:23:44 2021 +0200 std::unique_ptr->std::optional Change-Id: Ie09ede2ce21c206ca158a5a89d50143cdde45e3e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116381 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/sw/inc/undobj.hxx b/sw/inc/undobj.hxx index 4eae5cddaf3f..d48db259c77d 100644 --- a/sw/inc/undobj.hxx +++ b/sw/inc/undobj.hxx @@ -243,7 +243,7 @@ class SwUndoInsLayFormat; namespace sw { -std::unique_ptr> +std::optional> GetFlysAnchoredAt(SwDoc & rDoc, sal_uLong nSttNode); } @@ -252,7 +252,7 @@ GetFlysAnchoredAt(SwDoc & rDoc, sal_uLong nSttNode); class SwUndoInserts : public SwUndo, public SwUndRng, private SwUndoSaveContent { SwTextFormatColl *m_pTextFormatColl, *m_pLastNodeColl; -std::unique_ptr> m_pFrameFormats; +std::optional> m_pFrameFormats; std::vector< std::shared_ptr > m_FlyUndos; std::unique_ptr m_pRedlineData; int m_nDeleteTextNodes; @@ -277,7 +277,7 @@ public: static bool IsCreateUndoForNewFly(SwFormatAnchor const& rAnchor, sal_uLong const nStartNode, sal_uLong const nEndNode); -std::vector * GetFlysAnchoredAt() { return m_pFrameFormats.get(); } +std::vector * GetFlysAnchoredAt() { return m_pFrameFormats ? &*m_pFrameFormats : nullptr; } void dumpAsXml(xmlTextWriterPtr pWriter) const override; }; diff --git a/sw/source/core/doc/DocumentContentOperationsManager.cxx b/sw/source/core/doc/DocumentContentOperationsManager.cxx index 254d0fc00085..c5313a093470 100644 --- a/sw/source/core/doc/DocumentContentOperationsManager.cxx +++ b/sw/source/core/doc/DocumentContentOperationsManager.cxx @@ -4732,7 +4732,7 @@ bool DocumentContentOperationsManager::CopyImplImpl(SwPaM& rPam, SwPosition& rPo std::shared_ptr const pCopyPam(rDoc.CreateUnoCursor(rPos)); SwTableNumFormatMerge aTNFM( m_rDoc, rDoc ); -std::unique_ptr> pFlys; +std::optional> pFlys; std::vector const* pFlysAtInsPos; if (rDoc.GetIDocumentUndoRedo().DoesUndo()) @@ -4743,7 +4743,7 @@ bool DocumentContentOperationsManager::CopyImplImpl(SwPaM& rPam, SwPosition& rPo else { pFlys = sw::GetFlysAnchoredAt(rDoc, rPos.nNode.GetIndex()); -pFlysAtInsPos = pFlys.get(); +pFlysAtInsPos = pFlys ? &*pFlys : nullptr; } RedlineFlags eOld = rDoc.getIDocumentRedlineAccess().GetRedlineFlags(); diff --git a/sw/source/core/undo/untblk.cxx b/sw/source/core/undo/untblk.cxx index 5fd92fe63eca..fc30657333b9 100644 --- a/sw/source/core/undo/untblk.cxx +++ b/sw/source/core/undo/untblk.cxx @@ -36,10 +36,10 @@ namespace sw { -std::unique_ptr> +std::optional> GetFlysAnchoredAt(SwDoc & rDoc, sal_uLong const nSttNode) { -std::unique_ptr> pFrameFormats; +std::optional> pFrameFormats; const size_t nArrLen = rDoc.GetSpzFrameFormats()->size(); for (size_t n = 0; n < nArrLen; ++n) { @@ -52,7 +52,7 @@ GetFlysAnchoredAt(SwDoc & rDoc, sal_uLong const nSttNode) || (pAnchor->GetAnchorId() == RndStdIds::FLY_AT_CHAR))) { if (!pFrameFormats) -pFrameFormats.reset( new std::vector ); +pFrameFormats.emplace(); pFrameFormats->push_back( pFormat ); } } diff --git a/sw/source/core/unocore/unostyle.cxx b/sw/source/core/unocore/unostyle.cxx index 6633906e5346..ac72abefd161 100644 --- a/sw/source/core/unocore/unostyle.cxx +++ b/sw/source/core/unocore/unostyle.cxx @@ -1899,10 +1899,10 @@ void SwXStyle::SetPropertyValue(const SfxItemPropertyMapEntry&, { if(!o_rStyleBase.getNewBase()->IsUserDefined() || !rValue.has()) throw lang::IllegalArgumentException(); -static std::unique_ptr> pUnoToCore; +static std::optional> pUnoToCore; if(!pUnoToCore) { -pUnoToCore.reset(new std::map); +pUnoToCore.emplace(); auto pEntries = lcl_GetParagraphStyleCategoryEntries(); std::transform(pEntries->begin(), pEntries->end(), std::inserter(*pUnoToCore, pUnoToCore->end()), [] (const ParagraphStyleCategoryEntry& rEntry) { return std::pair(rEntry.m_eCategory, rEntry.m_nSwStyleBits); });
[Libreoffice-commits] core.git: xmloff/source
xmloff/source/style/styleexp.cxx | 14 +++--- xmloff/source/text/txtimp.cxx| 22 +++--- 2 files changed, 18 insertions(+), 18 deletions(-) New commits: commit 397ba047c941eb7d77a15a8de72e20ace4744da1 Author: Noel Grandin AuthorDate: Fri May 28 15:19:09 2021 +0200 Commit: Noel Grandin CommitDate: Sat May 29 19:23:31 2021 +0200 std::unique_ptr->std::optional Change-Id: Ie01aec182ad361522f6ebc00e2f2e47d0fc38d33 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116378 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/xmloff/source/style/styleexp.cxx b/xmloff/source/style/styleexp.cxx index 8b4256a3d043..159d5b50e02e 100644 --- a/xmloff/source/style/styleexp.cxx +++ b/xmloff/source/style/styleexp.cxx @@ -440,7 +440,7 @@ void XMLStyleExport::exportStyleFamily( // If next styles are supported and used styles should be exported only, // the next style may be unused but has to be exported, too. In this case // the names of all exported styles are remembered. -std::unique_ptr > pExportedStyles; +std::optional > xExportedStyles; bool bFirstStyle = true; const uno::Sequence< OUString> aSeq = xStyleCont->getElementNames(); @@ -478,14 +478,14 @@ void XMLStyleExport::exportStyleFamily( xPropSet->getPropertySetInfo(); if (xPropSetInfo->hasPropertyByName( gsFollowStyle )) -pExportedStyles.reset(new std::set); +xExportedStyles.emplace(); bFirstStyle = false; } -if (pExportedStyles && bExported) +if (xExportedStyles && bExported) { // If next styles are supported, remember this style's name. -pExportedStyles->insert( xStyle->getName() ); +xExportedStyles->insert( xStyle->getName() ); } } @@ -495,7 +495,7 @@ void XMLStyleExport::exportStyleFamily( pAutoStylePool->RegisterName( nFamily, xStyle->getName() ); } -if( !pExportedStyles ) +if( !xExportedStyles ) return; // if next styles are supported, export all next styles that are @@ -532,13 +532,13 @@ void XMLStyleExport::exportStyleFamily( // if the next style hasn't been exported by now, export it now // and remember its name. if (xStyle->getName() != sNextName && -0 == pExportedStyles->count( sTmp )) +0 == xExportedStyles->count( sTmp )) { xStyleCont->getByName( sNextName ) >>= xStyle; assert(xStyle.is()); if (exportStyle(xStyle, rXMLFamily, rPropMapper, xStyleCont, pPrefix)) -pExportedStyles->insert( sTmp ); +xExportedStyles->insert( sTmp ); } } } diff --git a/xmloff/source/text/txtimp.cxx b/xmloff/source/text/txtimp.cxx index 4d521f295b95..90dc8dcc0c84 100644 --- a/xmloff/source/text/txtimp.cxx +++ b/xmloff/source/text/txtimp.cxx @@ -93,8 +93,8 @@ using namespace ::com::sun::star::ucb; struct XMLTextImportHelper::Impl { -std::unique_ptr< std::vector > m_xPrevFrmNames; -std::unique_ptr< std::vector > m_xNextFrmNames; +std::optional< std::vector > m_xPrevFrmNames; +std::optional< std::vector > m_xNextFrmNames; std::unique_ptr m_xTextListsHelper; rtl::Reference m_xAutoStyles; @@ -172,7 +172,7 @@ struct XMLTextImportHelper::Impl OUString m_sCellParaStyleDefault; -std::unique_ptr> m_pCrossRefHeadingBookmarkMap; +std::optional> m_xCrossRefHeadingBookmarkMap; Impl( uno::Reference const& rModel, SvXMLImport & rImport, @@ -2183,8 +2183,8 @@ void XMLTextImportHelper::ConnectFrameChains( { if (!m_xImpl->m_xPrevFrmNames) { -m_xImpl->m_xPrevFrmNames.reset( new std::vector ); -m_xImpl->m_xNextFrmNames.reset( new std::vector ); +m_xImpl->m_xPrevFrmNames.emplace(); +m_xImpl->m_xNextFrmNames.emplace(); } m_xImpl->m_xPrevFrmNames->push_back(rFrmName); m_xImpl->m_xNextFrmNames->push_back(sNextFrmName); @@ -2372,11 +2372,11 @@ OUString const& XMLTextImportHelper::GetCellParaStyleDefault() const void XMLTextImportHelper::AddCrossRefHeadingMapping(OUString const& rFrom, OUString const& rTo) { -if (!m_xImpl->m_pCrossRefHeadingBookmarkMap) +if (!m_xImpl->m_xCrossRefHeadingBookmarkMap) { -m_xImpl->m_pCrossRefHeadingBookmarkMap.reset(new std::map); +m_xImpl->m_xCrossRefHeadingBookmarkMap.emplace(); } -m_xImpl->m_pCrossRefHeadingBookmarkMap->insert(std::make_pair(rFrom, rTo)); +m_xImpl->m_xCrossRefHeadingBookmarkMap->insert(std::make_pair(rFrom, rTo)); } // tdf#94804: hack to map cross reference fields that reference duplicate marks @@ -2384,7 +2384,7 @@ void XMLTextImportHelper::AddCrossRefHeadingMapping(OUS
[Libreoffice-commits] core.git: stoc/source
stoc/source/corereflection/base.hxx|6 +-- stoc/source/corereflection/crcomp.cxx | 13 +++ stoc/source/corereflection/crenum.cxx | 15 - stoc/source/corereflection/criface.cxx | 55 +++-- 4 files changed, 42 insertions(+), 47 deletions(-) New commits: commit d32dfd9e955cdc893aa21ab8e870d217d1628ad3 Author: Noel Grandin AuthorDate: Fri May 28 14:43:02 2021 +0200 Commit: Noel Grandin CommitDate: Sat May 29 19:22:23 2021 +0200 std::unique->std::optional rather than having a pointer to a pointer (which is what Sequence is) Change-Id: Ieb7b9995f6a25022fe2401adc3c38124edb83506 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116376 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/stoc/source/corereflection/base.hxx b/stoc/source/corereflection/base.hxx index e322f87aa62e..16d42213ddcd 100644 --- a/stoc/source/corereflection/base.hxx +++ b/stoc/source/corereflection/base.hxx @@ -231,8 +231,8 @@ class CompoundIdlClassImpl { css::uno::Reference< css::reflection::XIdlClass > _xSuperClass; -std::unique_ptr< css::uno::Sequence< css::uno::Reference< css::reflection::XIdlField > > > -_pFields; +std::optional< css::uno::Sequence< css::uno::Reference< css::reflection::XIdlField > > > +m_xFields; OUString2Field _aName2Field; public: @@ -294,7 +294,7 @@ public: class EnumIdlClassImpl : public IdlClassImpl { -std::unique_ptr< css::uno::Sequence< css::uno::Reference< css::reflection::XIdlField > > > _pFields; +std::optional< css::uno::Sequence< css::uno::Reference< css::reflection::XIdlField > > > m_xFields; OUString2Field _aName2Field; public: diff --git a/stoc/source/corereflection/crcomp.cxx b/stoc/source/corereflection/crcomp.cxx index ae15991ad017..51cf4a6f02e4 100644 --- a/stoc/source/corereflection/crcomp.cxx +++ b/stoc/source/corereflection/crcomp.cxx @@ -302,7 +302,7 @@ Sequence< Reference< XIdlClass > > CompoundIdlClassImpl::getSuperclasses() Reference< XIdlField > CompoundIdlClassImpl::getField( const OUString & rName ) { -if (! _pFields) +if (! m_xFields) getFields(); // init fields const OUString2Field::const_iterator iFind( _aName2Field.find( rName ) ); @@ -315,16 +315,15 @@ Reference< XIdlField > CompoundIdlClassImpl::getField( const OUString & rName ) Sequence< Reference< XIdlField > > CompoundIdlClassImpl::getFields() { ::osl::MutexGuard aGuard( getMutexAccess() ); -if (! _pFields) +if (! m_xFields) { sal_Int32 nAll = 0; typelib_CompoundTypeDescription * pCompTypeDescr = getTypeDescr(); for ( ; pCompTypeDescr; pCompTypeDescr = pCompTypeDescr->pBaseTypeDescription ) nAll += pCompTypeDescr->nMembers; -Sequence< Reference< XIdlField > > * pFields = -new Sequence< Reference< XIdlField > >( nAll ); -Reference< XIdlField > * pSeq = pFields->getArray(); +Sequence< Reference< XIdlField > > aFields( nAll ); +Reference< XIdlField > * pSeq = aFields.getArray(); for ( pCompTypeDescr = getTypeDescr(); pCompTypeDescr; pCompTypeDescr = pCompTypeDescr->pBaseTypeDescription ) @@ -348,9 +347,9 @@ Sequence< Reference< XIdlField > > CompoundIdlClassImpl::getFields() } } -_pFields.reset( pFields ); +m_xFields = std::move( aFields ); } -return *_pFields; +return *m_xFields; } } diff --git a/stoc/source/corereflection/crenum.cxx b/stoc/source/corereflection/crenum.cxx index ea441fc975fd..dae3449d3b2c 100644 --- a/stoc/source/corereflection/crenum.cxx +++ b/stoc/source/corereflection/crenum.cxx @@ -159,7 +159,7 @@ EnumIdlClassImpl::~EnumIdlClassImpl() Reference< XIdlField > EnumIdlClassImpl::getField( const OUString & rName ) { -if (! _pFields) +if (! m_xFields) getFields(); // init members const OUString2Field::const_iterator iFind( _aName2Field.find( rName ) ); @@ -171,15 +171,14 @@ Reference< XIdlField > EnumIdlClassImpl::getField( const OUString & rName ) Sequence< Reference< XIdlField > > EnumIdlClassImpl::getFields() { -if (! _pFields) +if (! m_xFields) { ::osl::MutexGuard aGuard( getMutexAccess() ); -if (! _pFields) +if (! m_xFields) { sal_Int32 nFields = getTypeDescr()->nEnumValues; -Sequence< Reference< XIdlField > > * pFields = -new Sequence< Reference< XIdlField > >( nFields ); -Reference< XIdlField > * pSeq = pFields->getArray(); +Sequence< Reference< XIdlField > > aFields( nFields ); +Reference< XIdlField > * pSeq = aFields.getArray(); while (nFields--) { @@ -188,10 +187,10 @@
[Libreoffice-commits] core.git: sw/source
sw/source/uibase/wrtsh/wrtsh1.cxx |3 +++ 1 file changed, 3 insertions(+) New commits: commit 307ee1357cf2c4acd2f3e5a90285e8cb7c4c14e2 Author: Radhey Parekh AuthorDate: Thu Apr 1 22:03:11 2021 +0530 Commit: Justin Luth CommitDate: Sat May 29 18:02:54 2021 +0200 tdf#120801: The background colour is active when inserting a header In this patch, the active background colour is disabled by passing null value as default to the FillStyleItem. Previous Result: Background colour was still active even after inserting a header. Result after applying this patch: Background is now remain disabled/inactive. Change-Id: I5e8d22af338ef8ec93aa0e93d338ab8129fdc893 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113468 Tested-by: Justin Luth Reviewed-by: Justin Luth diff --git a/sw/source/uibase/wrtsh/wrtsh1.cxx b/sw/source/uibase/wrtsh/wrtsh1.cxx index bb14ad2594ec..b26af831754d 100644 --- a/sw/source/uibase/wrtsh/wrtsh1.cxx +++ b/sw/source/uibase/wrtsh/wrtsh1.cxx @@ -28,6 +28,7 @@ #include #include +#include #include #include #include @@ -1895,6 +1896,8 @@ void SwWrtShell::ChangeHeaderOrFooter( const_cast(rMaster.GetHeader().GetHeaderFormat()) : const_cast(rMaster.GetFooter().GetFooterFormat()); pFormat->SetFormatAttr( aUL ); +XFillStyleItem aFill(drawing::FillStyle_NONE); +pFormat->SetFormatAttr(aFill); } } if( bChgd ) ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: svtools/source
svtools/source/control/tabbar.cxx | 273 ++ 1 file changed, 136 insertions(+), 137 deletions(-) New commits: commit d47ac2ebdb495b025eb26e17cbbe2509797c31f0 Author: Noel Grandin AuthorDate: Fri May 28 14:13:44 2021 +0200 Commit: Noel Grandin CommitDate: Sat May 29 17:51:35 2021 +0200 flatten TabBar item list Change-Id: I75a57ffdd55de61cf6acc0e562e4ae76f0065585 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116373 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/svtools/source/control/tabbar.cxx b/svtools/source/control/tabbar.cxx index c7c777c9085f..bd51bc38c6a6 100644 --- a/svtools/source/control/tabbar.cxx +++ b/svtools/source/control/tabbar.cxx @@ -483,13 +483,13 @@ struct TabBar_Impl ScopedVclPtr mpSizer; ScopedVclPtrmxButtonBox; ScopedVclPtrmxEdit; -std::vector> mpItemList; +std::vector maItemList; vcl::AccessibleFactoryAccess maAccessibleFactory; sal_uInt16 getItemSize() const { -return static_cast(mpItemList.size()); +return static_cast(maItemList.size()); } }; @@ -550,10 +550,10 @@ void TabBar::ImplInit( WinBits nWinStyle ) ImplTabBarItem* TabBar::seek( size_t i ) { -if ( i < mpImpl->mpItemList.size() ) +if ( i < mpImpl->maItemList.size() ) { maCurrentItemList = i; -return mpImpl->mpItemList[maCurrentItemList].get(); +return &mpImpl->maItemList[maCurrentItemList]; } return nullptr; } @@ -562,16 +562,16 @@ ImplTabBarItem* TabBar::prev() { if ( maCurrentItemList > 0 ) { -return mpImpl->mpItemList[--maCurrentItemList].get(); +return &mpImpl->maItemList[--maCurrentItemList]; } return nullptr; } ImplTabBarItem* TabBar::next() { -if ( maCurrentItemList + 1 < mpImpl->mpItemList.size() ) +if ( maCurrentItemList + 1 < mpImpl->maItemList.size() ) { -return mpImpl->mpItemList[++maCurrentItemList].get(); +return &mpImpl->maItemList[++maCurrentItemList]; } return nullptr; } @@ -645,29 +645,29 @@ bool TabBar::ImplCalcWidth() } bool bChanged = false; -for (auto& pItem : mpImpl->mpItemList) +for (auto& rItem : mpImpl->maItemList) { -tools::Long nNewWidth = GetTextWidth(pItem->GetRenderText()); +tools::Long nNewWidth = GetTextWidth(rItem.GetRenderText()); if (mnCurMaxWidth && (nNewWidth > mnCurMaxWidth)) { -pItem->mbShort = true; +rItem.mbShort = true; nNewWidth = mnCurMaxWidth; } else { -pItem->mbShort = false; +rItem.mbShort = false; } // Padding is dependent on font height - bigger font = bigger padding tools::Long nFontWidth = aFont.GetFontHeight(); -if (pItem->mbProtect) +if (rItem.mbProtect) nNewWidth += 24; nNewWidth += nFontWidth * 2; -if (pItem->mnWidth != nNewWidth) +if (rItem.mnWidth != nNewWidth) { -pItem->mnWidth = nNewWidth; -if (!pItem->maRect.IsEmpty()) +rItem.mnWidth = nNewWidth; +if (!rItem.maRect.IsEmpty()) bChanged = true; } } @@ -685,33 +685,33 @@ void TabBar::ImplFormat() sal_uInt16 nItemIndex = 0; tools::Long x = mnOffX; -for (auto & pItem : mpImpl->mpItemList) +for (auto & rItem : mpImpl->maItemList) { // At all non-visible tabs an empty rectangle is set if ((nItemIndex + 1 < mnFirstPos) || (x > mnLastOffX)) -pItem->maRect.SetEmpty(); +rItem.maRect.SetEmpty(); else { // Slightly before the tab before the first visible page // should also be visible if (nItemIndex + 1 == mnFirstPos) { -pItem->maRect.SetLeft(x - pItem->mnWidth); +rItem.maRect.SetLeft(x - rItem.mnWidth); } else { -pItem->maRect.SetLeft(x); -x += pItem->mnWidth; +rItem.maRect.SetLeft(x); +x += rItem.mnWidth; } -pItem->maRect.SetRight(x); -pItem->maRect.SetBottom(maWinSize.Height() - 1); +rItem.maRect.SetRight(x); +rItem.maRect.SetBottom(maWinSize.Height() - 1); if (mbMirrored) { -tools::Long nNewLeft = mnOffX + mnLastOffX - pItem->maRect.Right(); -tools::Long nNewRight = mnOffX + mnLastOffX - pItem->maRect.Left(); -pItem->maRect.SetRight(nNewRight); -pItem->maRect.SetLeft(nNewLeft); +tools::Long nNewLeft = mnOffX + mnLastOffX - rItem.maRect.Right(); +tools::Long nNewRight = mnOffX + mnLastOffX - rItem.maRect.Left(); +rItem.maRect.SetRight(nNewRigh
[Libreoffice-commits] core.git: include/svx scripting/source svx/source
include/svx/svdpage.hxx |3 ++- include/svx/xmleohlp.hxx|5 +++-- scripting/source/provider/BrowseNodeFactoryImpl.cxx |7 --- svx/source/svdraw/svdpage.cxx | 17 - svx/source/xml/xmleohlp.cxx | 20 ++-- 5 files changed, 27 insertions(+), 25 deletions(-) New commits: commit 3823e81c25ba6f0f9b6a67d77e585426905e1b19 Author: Noel Grandin AuthorDate: Fri May 28 14:53:19 2021 +0200 Commit: Noel Grandin CommitDate: Sat May 29 17:51:17 2021 +0200 std::unique_ptr -> std::optional Change-Id: I15779eca607f27a758575f4f095910277aa85eda Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116377 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/include/svx/svdpage.hxx b/include/svx/svdpage.hxx index ff936bd3a0a2..11d49191a017 100644 --- a/include/svx/svdpage.hxx +++ b/include/svx/svdpage.hxx @@ -32,6 +32,7 @@ #include #include #include +#include #include @@ -228,7 +229,7 @@ public: private: /// This list, if it exists, defines the navigation order. If it does /// not exist then maList defines the navigation order. -std::unique_ptr>> mxNavigationOrder; +std::optional>> mxNavigationOrder; /// This flag is when the mpNavigation list has been changed but /// the indices of the referenced SdrObjects still have their old values. diff --git a/include/svx/xmleohlp.hxx b/include/svx/xmleohlp.hxx index ed64bd71522b..d252ee8e2d0f 100644 --- a/include/svx/xmleohlp.hxx +++ b/include/svx/xmleohlp.hxx @@ -31,6 +31,7 @@ #include #include #include +#include enum class SvXMLEmbeddedObjectHelperMode { @@ -57,8 +58,8 @@ class SVXCORE_DLLPUBLIC SvXMLEmbeddedObjectHelper final : css::uno::Reference < css::embed::XStorage > mxTempStorage; // package // objects SvXMLEmbeddedObjectHelperMode meCreateMode; -std::unique_ptr >> - mpStreamMap; +std::optional >> + mxStreamMap; SVX_DLLPRIVATE bool ImplGetStorageNames( const OUString& rURLStr, diff --git a/scripting/source/provider/BrowseNodeFactoryImpl.cxx b/scripting/source/provider/BrowseNodeFactoryImpl.cxx index 854dd312bd86..d3c1c1f0b394 100644 --- a/scripting/source/provider/BrowseNodeFactoryImpl.cxx +++ b/scripting/source/provider/BrowseNodeFactoryImpl.cxx @@ -38,6 +38,7 @@ #include #include #include +#include #include using namespace ::com::sun::star; @@ -151,7 +152,7 @@ class LocationBrowseNode : public ::cppu::WeakImplHelper< browse::XBrowseNode > { private: -std::unique_ptr >> m_hBNA; +std::optional >> m_hBNA; std::vector< OUString > m_vStr; OUString m_sNodeName; Reference< browse::XBrowseNode > m_origNode; @@ -175,7 +176,7 @@ public: virtual Sequence< Reference< browse::XBrowseNode > > SAL_CALL getChildNodes() override { -if ( m_hBNA == nullptr ) +if ( !m_hBNA ) { loadChildNodes(); } @@ -206,7 +207,7 @@ private: void loadChildNodes() { -m_hBNA.reset( new std::unordered_map< OUString, Reference< browse::XBrowseNode > > ); +m_hBNA.emplace(); const Sequence< Reference< browse::XBrowseNode > > langNodes = m_origNode->getChildNodes(); diff --git a/svx/source/svdraw/svdpage.cxx b/svx/source/svdraw/svdpage.cxx index c1d412a7c207..dde75e15c28e 100644 --- a/svx/source/svdraw/svdpage.cxx +++ b/svx/source/svdraw/svdpage.cxx @@ -836,7 +836,7 @@ void SdrObjList::UnGroupObj( size_t nObjNum ) #endif } -bool SdrObjList::HasObjectNavigationOrder() const { return mxNavigationOrder != nullptr; } +bool SdrObjList::HasObjectNavigationOrder() const { return bool(mxNavigationOrder); } void SdrObjList::SetObjectNavigationPosition ( SdrObject& rObject, @@ -845,12 +845,11 @@ void SdrObjList::SetObjectNavigationPosition ( // When the navigation order container has not yet been created then // create one now. It is initialized with the z-order taken from // maList. -if (mxNavigationOrder == nullptr) +if (!mxNavigationOrder) { -mxNavigationOrder.reset(new std::vector>(maList.begin(), -maList.end())); +mxNavigationOrder.emplace(maList.begin(), maList.end()); } -OSL_ASSERT(mxNavigationOrder != nullptr); +OSL_ASSERT(bool(mxNavigationOrder)); OSL_ASSERT( mxNavigationOrder->size() == maList.size()); tools::WeakReference aReference (&rObject); @@ -927,7 +926,7 @@ bool SdrObjList::RecalcNavigationPositions() { if (mbIsNavigationOrderDirty) { -if (mxNavigationOrder != nullptr) +if (mxNavigationOrder) { mbIsNavigationOrderDirty = false; @@ -94
[Libreoffice-commits] core.git: svl/source svtools/source
svl/source/numbers/zforlist.cxx | 84 +++ svtools/source/control/ruler.cxx | 20 - 2 files changed, 52 insertions(+), 52 deletions(-) New commits: commit ee50d4152cc4a06367d66808ceba1e74e62f3ed8 Author: Noel Grandin AuthorDate: Fri May 28 14:42:34 2021 +0200 Commit: Noel Grandin CommitDate: Sat May 29 17:50:52 2021 +0200 no need to allocate these on the heap Change-Id: I58847f8eb2c8dc17ca393a758d122cd3929deeb0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116375 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/svl/source/numbers/zforlist.cxx b/svl/source/numbers/zforlist.cxx index 42fa5660ab18..b1885ad4a94a 100644 --- a/svl/source/numbers/zforlist.cxx +++ b/svl/source/numbers/zforlist.cxx @@ -1728,15 +1728,15 @@ bool SvNumberFormatter::GetPreviewString(const OUString& sFormatString, eLnge = ActLnge; sal_Int32 nCheckPos = -1; OUString sTmpString = sFormatString; -std::unique_ptr p_Entry(new SvNumberformat(sTmpString, - pFormatScanner.get(), - pStringScanner.get(), - nCheckPos, - eLnge)); +SvNumberformat aEntry(sTmpString, + pFormatScanner.get(), + pStringScanner.get(), + nCheckPos, + eLnge); if (nCheckPos == 0) // String ok { sal_uInt32 CLOffset = ImpGenerateCL(eLnge); // create new standard formats if necessary -sal_uInt32 nKey = ImpIsEntry(p_Entry->GetFormatstring(),CLOffset, eLnge); +sal_uInt32 nKey = ImpIsEntry(aEntry.GetFormatstring(),CLOffset, eLnge); if (nKey != NUMBERFORMAT_ENTRY_NOT_FOUND) // already present { GetOutputString(fPreviewNumber, nKey, sOutString, ppColor, bUseStarFormat); @@ -1745,12 +1745,12 @@ bool SvNumberFormatter::GetPreviewString(const OUString& sFormatString, { if ( bUseStarFormat ) { -p_Entry->SetStarFormatSupport( true ); +aEntry.SetStarFormatSupport( true ); } -p_Entry->GetOutputString(fPreviewNumber, sOutString, ppColor); +aEntry.GetOutputString(fPreviewNumber, sOutString, ppColor); if ( bUseStarFormat ) { -p_Entry->SetStarFormatSupport( false ); +aEntry.SetStarFormatSupport( false ); } } return true; @@ -1790,15 +1790,15 @@ bool SvNumberFormatter::GetPreviewStringGuess( const OUString& sFormatString, return true; } -std::unique_ptr pEntry; +std::optional pEntry; sal_Int32 nCheckPos = -1; OUString sTmpString; if ( bEnglish ) { sTmpString = sFormatString; -pEntry.reset(new SvNumberformat( sTmpString, pFormatScanner.get(), - pStringScanner.get(), nCheckPos, eLnge )); +pEntry.emplace( sTmpString, pFormatScanner.get(), +pStringScanner.get(), nCheckPos, eLnge ); } else { @@ -1810,8 +1810,8 @@ bool SvNumberFormatter::GetPreviewStringGuess( const OUString& sFormatString, LanguageType eFormatLang = LANGUAGE_ENGLISH_US; pFormatScanner->SetConvertMode( LANGUAGE_ENGLISH_US, eLnge, false, false); sTmpString = sFormatString; -pEntry.reset(new SvNumberformat( sTmpString, pFormatScanner.get(), - pStringScanner.get(), nCheckPos, eFormatLang )); +pEntry.emplace( sTmpString, pFormatScanner.get(), +pStringScanner.get(), nCheckPos, eFormatLang ); pFormatScanner->SetConvertMode( false ); ChangeIntl( eLnge ); @@ -1824,8 +1824,8 @@ bool SvNumberFormatter::GetPreviewStringGuess( const OUString& sFormatString, // Force locale's keywords. pFormatScanner->ChangeIntl( ImpSvNumberformatScan::KeywordLocalization::LocaleLegacy ); sTmpString = sFormatString; -pEntry.reset(new SvNumberformat( sTmpString, pFormatScanner.get(), - pStringScanner.get(), nCheckPos, eLnge )); +pEntry.emplace( sTmpString, pFormatScanner.get(), +pStringScanner.get(), nCheckPos, eLnge ); } else { @@ -1835,19 +1835,19 @@ bool SvNumberFormatter::GetPreviewStringGuess( const OUString& sFormatString, eFormatLang = eLnge; pFormatScanner->SetConvertMode( eLnge, LANGUAGE_ENGLISH_US, false, false); sTmpString = sFormatString; -std::unique_ptr pEntry2(new SvNumberformat( sTmpString, pFormatScann
[Libreoffice-commits] core.git: vcl/inc vcl/source vcl/unx
vcl/inc/accmgr.hxx|6 ++-- vcl/source/window/accmgr.cxx | 44 +- vcl/unx/generic/printer/ppdparser.cxx | 26 ++-- 3 files changed, 38 insertions(+), 38 deletions(-) New commits: commit f57c2e65a50585ef4a282549c13655d9afc83d86 Author: Noel Grandin AuthorDate: Fri May 28 15:19:20 2021 +0200 Commit: Noel Grandin CommitDate: Sat May 29 17:50:36 2021 +0200 std::unique_ptr->std::optional Change-Id: Ie3e0eb7cb7ca25536e825e30c53e112bf537b325 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116379 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/vcl/inc/accmgr.hxx b/vcl/inc/accmgr.hxx index 1e57ed44dd07..55e028f69a1b 100644 --- a/vcl/inc/accmgr.hxx +++ b/vcl/inc/accmgr.hxx @@ -21,7 +21,7 @@ #define INCLUDED_VCL_INC_ACCMGR_HXX #include -#include +#include #include @@ -30,8 +30,8 @@ class Accelerator; class ImplAccelManager { private: -std::unique_ptr> mpAccelList; -std::unique_ptr> mpSequenceList; +std::optional> mxAccelList; +std::optional> mxSequenceList; public: ImplAccelManager() diff --git a/vcl/source/window/accmgr.cxx b/vcl/source/window/accmgr.cxx index 003e09343bc3..5ab0279b3a10 100644 --- a/vcl/source/window/accmgr.cxx +++ b/vcl/source/window/accmgr.cxx @@ -30,34 +30,34 @@ ImplAccelManager::~ImplAccelManager() bool ImplAccelManager::InsertAccel( Accelerator* pAccel ) { -if ( !mpAccelList ) { -mpAccelList.reset( new std::vector< Accelerator* > ); +if ( !mxAccelList ) { +mxAccelList.emplace(); } else { -for (Accelerator* i : *mpAccelList) { +for (Accelerator* i : *mxAccelList) { if ( i == pAccel ) { return false; } } } -mpAccelList->insert( mpAccelList->begin(), pAccel ); +mxAccelList->insert( mxAccelList->begin(), pAccel ); return true; } void ImplAccelManager::RemoveAccel( Accelerator const * pAccel ) { // do we have a list ? -if ( !mpAccelList ) +if ( !mxAccelList ) return; //e.g. #i90599#. Someone starts typing a sequence in a dialog, but doesn't //end it, and then closes the dialog, deleting the accelerators. So if //we're removing an accelerator that a sub-accelerator which is in the //sequence list, throw away the entire sequence -if ( mpSequenceList ) { +if ( mxSequenceList ) { for (sal_uInt16 i = 0; i < pAccel->GetItemCount(); ++i) { Accelerator* pSubAccel = pAccel->GetAccel( pAccel->GetItemId(i) ); -for (Accelerator* j : *mpSequenceList) { +for (Accelerator* j : *mxSequenceList) { if ( j == pSubAccel ) { EndSequence(); i = pAccel->GetItemCount(); @@ -68,24 +68,24 @@ void ImplAccelManager::RemoveAccel( Accelerator const * pAccel ) } // throw it away -auto it = std::find(mpAccelList->begin(), mpAccelList->end(), pAccel); -if (it != mpAccelList->end()) -mpAccelList->erase( it ); +auto it = std::find(mxAccelList->begin(), mxAccelList->end(), pAccel); +if (it != mxAccelList->end()) +mxAccelList->erase( it ); } void ImplAccelManager::EndSequence() { // are we in a list ? -if ( !mpSequenceList ) +if ( !mxSequenceList ) return; -for (Accelerator* pTempAccel : *mpSequenceList) +for (Accelerator* pTempAccel : *mxSequenceList) { pTempAccel->mpDel = nullptr; } // delete sequence-list -mpSequenceList.reset(); +mxSequenceList.reset(); } bool ImplAccelManager::IsAccelKey( const vcl::KeyCode& rKeyCode ) @@ -93,15 +93,15 @@ bool ImplAccelManager::IsAccelKey( const vcl::KeyCode& rKeyCode ) Accelerator* pAccel; // do we have accelerators ?? -if ( !mpAccelList ) +if ( !mxAccelList ) return false; -if ( mpAccelList->empty() ) +if ( mxAccelList->empty() ) return false; // are we in a sequence ? -if ( mpSequenceList ) +if ( mxSequenceList ) { -pAccel = mpSequenceList->empty() ? nullptr : (*mpSequenceList)[ 0 ]; +pAccel = mxSequenceList->empty() ? nullptr : (*mxSequenceList)[ 0 ]; // not found ? if ( !pAccel ) @@ -121,7 +121,7 @@ bool ImplAccelManager::IsAccelKey( const vcl::KeyCode& rKeyCode ) if ( pNextAccel ) { -mpSequenceList->insert( mpSequenceList->begin(), pNextAccel ); +mxSequenceList->insert( mxSequenceList->begin(), pNextAccel ); // call Activate-Handler of the new one pNextAccel->Activate(); @@ -169,7 +169,7 @@ bool ImplAccelManager::IsAccelKey( const vcl::KeyCode& rKeyCode ) } // step through the list of accelerators -for (Accelerator* i : *mpAccelList) +for (Accelerator* i : *mxAccelList) {
[Libreoffice-commits] core.git: sw/uiconfig
sw/uiconfig/swriter/ui/bibliographyentry.ui | 159 +--- 1 file changed, 78 insertions(+), 81 deletions(-) New commits: commit b3cd042285af08a0bdc5dea608d131424d850f9c Author: Caolán McNamara AuthorDate: Fri May 28 20:05:42 2021 +0100 Commit: Caolán McNamara CommitDate: Sat May 29 17:32:06 2021 +0200 resave with latest glade Change-Id: I1f951aa3a776b624a01526ff4767ea50ffce420e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116387 Tested-by: Jenkins Reviewed-by: Caolán McNamara diff --git a/sw/uiconfig/swriter/ui/bibliographyentry.ui b/sw/uiconfig/swriter/ui/bibliographyentry.ui index 4e25c351255f..d8eb0eb36650 100644 --- a/sw/uiconfig/swriter/ui/bibliographyentry.ui +++ b/sw/uiconfig/swriter/ui/bibliographyentry.ui @@ -1,27 +1,27 @@ - + -False -6 +False +6 Insert Bibliography Entry -dialog +dialog -False +False vertical 12 -False -end +False +end _Help True -True -True +True +True True @@ -34,8 +34,8 @@ _New True -True -True +True +True True @@ -53,8 +53,8 @@ _Edit True -True -True +True +True True @@ -72,8 +72,8 @@ _Close True -True -True +True +True True @@ -90,11 +90,11 @@ Insert -True -True -True -True -True +True +True +True +True +True Inserts the bibliographic reference into the document. If you created a new record, you must also insert it as an entry, otherwise the record is lost when you close the document. @@ -110,11 +110,11 @@ Apply -True -True -True -True -True +True +True +True +True +True False @@ -126,33 +126,33 @@ False True -end +end 2 True -False -0 -none +False +0 +none - + True -False -6 +False 12 6 +6 Bibliography Database True -True -False -True +True +False +True True -True +True Inserts a reference from the bibliography database. @@ -160,18 +160,18 @@ -0 -0 +0 +0 Document Content True -True -False -True -True +True +False +True +True frombibliography @@ -180,8 +180,8 @@ -0 -1 +0 +1 @@ -189,7 +189,7 @@ True -False +False Bibliography Source @@ -206,69 +206,69 @@ True -False -0 -none +False +
[Libreoffice-commits] core.git: bridges/Library_cpp_uno.mk config_host.mk.in configure.ac RepositoryExternal.mk RepositoryFixes.mk solenv/gbuild
RepositoryExternal.mk | 19 ++--- RepositoryFixes.mk|5 ++-- bridges/Library_cpp_uno.mk| 32 +++--- config_host.mk.in |2 + configure.ac | 17 +++ solenv/gbuild/ComponentTarget.mk |2 - solenv/gbuild/CppunitTest.mk |2 - solenv/gbuild/Library.mk | 10 + solenv/gbuild/TargetLocations.mk | 12 +++ solenv/gbuild/platform/WNT_AARCH64_MSC.mk |1 solenv/gbuild/platform/WNT_INTEL_MSC.mk |1 solenv/gbuild/platform/WNT_X86_64_MSC.mk |1 solenv/gbuild/platform/com_GCC_defs.mk|4 --- solenv/gbuild/platform/com_MSC_class.mk |1 solenv/gbuild/platform/com_MSC_defs.mk|2 - solenv/gbuild/platform/macosx.mk |1 solenv/gbuild/platform/unxgcc.mk |2 + 17 files changed, 75 insertions(+), 39 deletions(-) New commits: commit e9301742254b85f4c6fbfd9378b365c76f5ff367 Author: Jan-Marek Glogowski AuthorDate: Sat May 22 02:41:58 2021 +0200 Commit: Jan-Marek Glogowski CommitDate: Sat May 29 17:30:26 2021 +0200 gbuild: implement gb_Library_get_target_for_build I was wondering why removing instdir stuff forced a rebuild of the cross toolset. Turned out some cross-toolset bits were wrongly depending on host build stuff. It even had FIXME... As a consequence, gb_CPPU_ENV was replaced by config_host.mk flags to provide an CPPU_ENV_FOR_BUILD and also uses the correct OS_FOR_BUILD. Change-Id: I50e8e8dca50ab1ad3164948a585a792a52e4a39a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116359 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski diff --git a/RepositoryExternal.mk b/RepositoryExternal.mk index a45ffa35613d..d9a22effc962 100644 --- a/RepositoryExternal.mk +++ b/RepositoryExternal.mk @@ -3857,19 +3857,17 @@ endif # SYSTEM_JFREEREPORT # Executables -# FIXME: the library target should be for build too define gb_Executable__register_bestreversemap $(call gb_Executable_add_runtime_dependencies,bestreversemap,\ - $(if $(filter $(OS),ANDROID),,$(if $(filter TRUE,$(DISABLE_DYNLOADING)),,$(call gb_Library_get_target,sal_textenc))) \ + $(if $(filter $(OS),ANDROID),,$(if $(filter TRUE,$(DISABLE_DYNLOADING)),,$(call gb_Library_get_target_for_build,sal_textenc))) \ ) endef # TODO depending on the whole URE might be overkill, but I do not have a # Windows machine to debug it... -# FIXME: the library target should be for build too define gb_Executable__register_climaker $(call gb_Executable_add_runtime_dependencies,climaker,\ - $(call gb_Library_get_target,$(gb_CPPU_ENV)_uno) \ + $(call gb_Library_get_target_for_build,$(CPPU_ENV_FOR_BUILD)_uno) \ $(INSTROOT_FOR_BUILD)/$(LIBO_URE_MISC_FOLDER)/services.rdb \ $(call gb_UnoApi_get_target,udkapi) \ $(INSTROOT_FOR_BUILD)/$(LIBO_URE_ETC_FOLDER)/$(call gb_Helper_get_rcfile,uno) @@ -3883,12 +3881,11 @@ $(call gb_Executable_add_runtime_dependencies,cppumaker,\ endef # This is used to determine what we need for 'build' platform. -# FIXME: the library target should be for build too define gb_Executable__register_gengal $(call gb_Executable_add_runtime_dependencies,gengal,\ - $(call gb_Library_get_target,$(gb_CPPU_ENV)_uno) \ - $(if $(filter MACOSX,$(OS)),$(call gb_Library_get_target,vclplug_osx)) \ - $(if $(filter WNT,$(OS)),$(call gb_Library_get_target,vclplug_win)) \ + $(call gb_Library_get_target_for_build,$(CPPU_ENV_FOR_BUILD)_uno) \ + $(if $(filter MACOSX,$(OS_FOR_BUILD)),$(call gb_Library_get_target_for_build,vclplug_osx)) \ + $(if $(filter WNT,$(OS_FOR_BUILD)),$(call gb_Library_get_target_for_build,vclplug_win)) \ $(if $(filter host,$(gb_Side)),$(call gb_Package_get_target,postprocess_images)) \ $(call gb_Package_get_target_for_build,postprocess_registry) \ $(INSTROOT_FOR_BUILD)/$(LIBO_URE_ETC_FOLDER)/$(call gb_Helper_get_rcfile,uno) \ @@ -3929,10 +3926,9 @@ endef # FIXME ure/services.rdb needs cleanup # The dependencies on ure/services.rdb and udkapi.rdb are implicitly required # due to the settings for URE_SERVICES and URE_TYPES in cppuhelper/source/unorc: -# FIXME: the library target should be for build too define gb_Executable__register_saxparser $(call gb_Executable_add_runtime_dependencies,saxparser,\ - $(call gb_Library_get_target,$(gb_CPPU_ENV)_uno) \ + $(call gb_Library_get_target_for_build,$(CPPU_ENV_FOR_BUILD)_uno) \ $(call gb_Package_get_target_for_build,instsetoo_native_setup_ure) \ $(call gb_Rdb_get_target_for_build,saxparser) \ $(INSTROOT_FOR_BUILD)/$(LIBO_URE_MISC_FOLDER_FOR_BUILD)/services.rdb \ @@ -3943,10 +3939,9 @@ endef # NOTE: the dependencies on ure/services.rdb and udkapi.rdb are implicitly # required due to
Re: sigma symbol tailoring
Also, the Formula bar's split button implementation uses an opcode to choose the action to apply. They are not GTK .UI button linked UNO commands. However, there is the .uno:AutoSum that does the original action. So, you can customize to assign to Menu, a Toolbar, a Context menu, or a Keyboard short-cut. So unless you are interested in implemnting a new slate of .uno controls for formula bar--give the customization a try. And, note that the .uno:AutoSum is not available to customize the Notebook Bar modes. -- Sent from: http://document-foundation-mail-archive.969070.n3.nabble.com/Dev-f1639786.html ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice
[Libreoffice-commits] core.git: distro-configs/LibreOfficeCoverity.conf
distro-configs/LibreOfficeCoverity.conf |1 + 1 file changed, 1 insertion(+) New commits: commit 8196c0a0a532dc1b8577d1aa530c8f9f47fc3e61 Author: Caolán McNamara AuthorDate: Sat May 29 15:53:11 2021 +0100 Commit: Caolán McNamara CommitDate: Sat May 29 16:58:11 2021 +0200 fix coverity build failure due to --with-privacy-policy-url=... Change-Id: Ic94cd5fd7aa472c58ff3e95e2b1759d4219ede21 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116389 Tested-by: Caolán McNamara Reviewed-by: Caolán McNamara diff --git a/distro-configs/LibreOfficeCoverity.conf b/distro-configs/LibreOfficeCoverity.conf index b97d0a0d4c2d..5fd489727fc9 100644 --- a/distro-configs/LibreOfficeCoverity.conf +++ b/distro-configs/LibreOfficeCoverity.conf @@ -22,6 +22,7 @@ --enable-ext-wiki-publisher --enable-ext-nlpsolver --enable-online-update +--with-privacy-policy-url=https://enable-online-update --with-system-hsqldb --with-hsqldb-jar=/home/coverity/hsqldb.jar --with-system-rhino ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: vcl/workben
vcl/workben/metfuzzer.cxx |4 1 file changed, 4 insertions(+) New commits: commit be6111c0679b9c5249250ada2814b1a00c8d8c0a Author: Caolán McNamara AuthorDate: Sat May 29 15:44:04 2021 +0100 Commit: Caolán McNamara CommitDate: Sat May 29 16:57:51 2021 +0200 ofz#34763 missing components Change-Id: I6a27f7412975694f3b710e66b4eb5358279bc132 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116388 Tested-by: Caolán McNamara Reviewed-by: Caolán McNamara diff --git a/vcl/workben/metfuzzer.cxx b/vcl/workben/metfuzzer.cxx index acaaf9d1b3da..9ca6fd35c932 100644 --- a/vcl/workben/metfuzzer.cxx +++ b/vcl/workben/metfuzzer.cxx @@ -19,6 +19,8 @@ extern "C" { void * com_sun_star_i18n_LocaleDataImpl_get_implementation( void *, void * ); void * com_sun_star_i18n_BreakIterator_Unicode_get_implementation( void *, void * ); void * com_sun_star_i18n_BreakIterator_get_implementation( void *, void * ); +void * com_sun_star_i18n_NativeNumberSupplier_get_implementation( void *, void * ); +void * com_sun_star_i18n_NumberFormatCodeMapper_get_implementation( void *, void * ); } const lib_to_factory_mapping * @@ -38,6 +40,8 @@ lo_get_constructor_map(void) { "com_sun_star_i18n_LocaleDataImpl_get_implementation", com_sun_star_i18n_LocaleDataImpl_get_implementation }, { "com_sun_star_i18n_BreakIterator_Unicode_get_implementation", com_sun_star_i18n_BreakIterator_Unicode_get_implementation }, { "com_sun_star_i18n_BreakIterator_get_implementation", com_sun_star_i18n_BreakIterator_get_implementation }, +{ "com_sun_star_i18n_NativeNumberSupplier_get_implementation", com_sun_star_i18n_NativeNumberSupplier_get_implementation }, +{ "com_sun_star_i18n_NumberFormatCodeMapper_get_implementation", com_sun_star_i18n_NumberFormatCodeMapper_get_implementation }, { 0, 0 } }; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: solenv/gbuild
solenv/gbuild/extensions/pre_BuildTools.mk |1 + 1 file changed, 1 insertion(+) New commits: commit 0e142fa01972ad28182ca54b855d0ecae0d5c83b Author: Jan-Marek Glogowski AuthorDate: Sat May 29 08:22:17 2021 +0200 Commit: Jan-Marek Glogowski CommitDate: Sat May 29 16:34:52 2021 +0200 cross-toolset: gengal now needs localedata_en Looks like some dependency changed, because now gengal aborts with: Fatal com.sun.star.uno.RuntimeException message: \ i18npool/source/localedata/localedata.cxx:1469 Fixes the Windows Arm64 cross build for me. Change-Id: Ie243da90d15fe06527830a31ca1ad519d7caebba Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116386 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski diff --git a/solenv/gbuild/extensions/pre_BuildTools.mk b/solenv/gbuild/extensions/pre_BuildTools.mk index 784f3e916415..f49dbcc02015 100644 --- a/solenv/gbuild/extensions/pre_BuildTools.mk +++ b/solenv/gbuild/extensions/pre_BuildTools.mk @@ -47,6 +47,7 @@ gb_BUILD_TOOLS = \ $(foreach executable,$(gb_BUILD_TOOLS_executables),$(call gb_Executable_get_runtime_dependencies,$(executable))) \ $(foreach executable,$(gb_BUILD_TOOLS_executables_extern),$(call gb_ExternalExecutable_get_dependencies,$(executable))) \ $(INSTROOT)/$(LIBO_URE_ETC_FOLDER)/$(call gb_Helper_get_rcfile,uno) \ +$(if $(WITH_GALLERY_BUILD),$(call gb_Library_get_target,localedata_en)) \ endif ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: config_host/config_vclplug.h.in configure.ac vcl/android vcl/inc vcl/Library_vcl.mk vcl/source vcl/win
config_host/config_vclplug.h.in |5 ++ configure.ac|4 ++ vcl/Library_vcl.mk |1 vcl/android/androidinst.cxx | 45 --- vcl/inc/android/androidinst.hxx |5 ++ vcl/inc/salinst.hxx |6 +++ vcl/inc/win/salinst.h |1 vcl/source/app/salplug.cxx | 77 +++- vcl/win/app/salinst.cxx |5 ++ 9 files changed, 80 insertions(+), 69 deletions(-) New commits: commit b6518bebc5fc82c88a455c6b22023e6392483e14 Author: Jan-Marek Glogowski AuthorDate: Sat May 29 13:35:23 2021 +0200 Commit: Jan-Marek Glogowski CommitDate: Sat May 29 16:32:24 2021 +0200 vcl: Implement static vclplug usage .. and convert Android to it. Will also be used by WASM. It's also kind of a followup on commit f5af2104fc490b90510e36bbf1d2adec8017c594. Change-Id: I3a1b5bc2eae2692e706da10c6352534433c61e57 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116385 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski diff --git a/config_host/config_vclplug.h.in b/config_host/config_vclplug.h.in index 488140b9ee4d..1a44907fb087 100644 --- a/config_host/config_vclplug.h.in +++ b/config_host/config_vclplug.h.in @@ -7,6 +7,11 @@ Settings about which desktops have support enabled. #ifndef CONFIG_VCLPLUG_H #define CONFIG_VCLPLUG_H +/** + * Set, if the platform uses X11 code. + */ +#define USING_X11 0 + #define ENABLE_GTK3 0 #define ENABLE_GTK3_KDE5 0 #define ENABLE_KF5 0 diff --git a/configure.ac b/configure.ac index 670d118c7644..4175aae4aa41 100644 --- a/configure.ac +++ b/configure.ac @@ -5185,6 +5185,10 @@ if test "$enable_gui" = "no"; then fi AC_SUBST(DISABLE_GUI) +if test "$USING_X11" = TRUE; then +AC_DEFINE(USING_X11) +fi + WORKDIR="${BUILDDIR}/workdir" INSTDIR="${BUILDDIR}/instdir" INSTROOTBASE=${INSTDIR}${INSTROOTBASESUFFIX} diff --git a/vcl/Library_vcl.mk b/vcl/Library_vcl.mk index 530df12019a1..45861cf2271c 100644 --- a/vcl/Library_vcl.mk +++ b/vcl/Library_vcl.mk @@ -665,6 +665,7 @@ $(eval $(call gb_Library_add_exception_objects,vcl,\ vcl/unx/generic/printer/ppdparser \ vcl/null/printerinfomanager \ vcl/android/androidinst \ +vcl/source/app/salplug \ $(vcl_headless_code) \ $(vcl_headless_freetype_code) \ )) diff --git a/vcl/android/androidinst.cxx b/vcl/android/androidinst.cxx index dafd43f7aad8..8febcd23a729 100644 --- a/vcl/android/androidinst.cxx +++ b/vcl/android/androidinst.cxx @@ -9,7 +9,6 @@ #include -#include #include #include @@ -24,10 +23,6 @@ #include #include -#define LOGTAG "LibreOffice/androidinst" -#define LOGI(...) ((void)__android_log_print(ANDROID_LOG_INFO, LOGTAG, __VA_ARGS__)) -#define LOGE(...) ((void)__android_log_print(ANDROID_LOG_ERROR, LOGTAG, __VA_ARGS__)) - // Horrible hack static int viewWidth = 1, viewHeight = 1; @@ -169,53 +164,15 @@ SalFrame *AndroidSalInstance::CreateFrame( SalFrame* pParent, SalFrameStyleFlags return new AndroidSalFrame( this, pParent, nStyle ); } -void SalAbort( const OUString& rErrorText, bool bDumpCore ) -{ -OUString aError( rErrorText ); -if( aError.isEmpty() ) -aError = "Unknown application error"; -LOGI("%s", OUStringToOString(rErrorText, osl_getThreadTextEncoding()).getStr() ); - -LOGI("SalAbort: '%s'", - OUStringToOString(aError, RTL_TEXTENCODING_ASCII_US).getStr()); -if( bDumpCore ) -abort(); -else -_exit(1); -} - -const OUString& SalGetDesktopEnvironment() -{ -static OUString aEnv( "android" ); -return aEnv; -} - -SalData::SalData() : -m_pInstance( 0 ), -m_pPIManager(0 ) -{ -} - -SalData::~SalData() -{ -} - // This is our main entry point: -SalInstance *CreateSalInstance() +extern "C" SalInstance *create_SalInstance() { LOGI("Android: CreateSalInstance!"); AndroidSalInstance* pInstance = new AndroidSalInstance( std::make_unique() ); new AndroidSalData( pInstance ); -pInstance->AcquireYieldMutex(); return pInstance; } -void DestroySalInstance( SalInstance *pInst ) -{ -pInst->ReleaseYieldMutexAll(); -delete pInst; -} - int AndroidSalSystem::ShowNativeDialog( const OUString& rTitle, const OUString& rMessage, const std::vector< OUString >& rButtons ) diff --git a/vcl/inc/android/androidinst.hxx b/vcl/inc/android/androidinst.hxx index 46adea903e09..c157b0fd3128 100644 --- a/vcl/inc/android/androidinst.hxx +++ b/vcl/inc/android/androidinst.hxx @@ -12,10 +12,15 @@ #include #include +#include #include #include #include +#define LOGTAG "LibreOffice/androidinst" +#define LOGI(...) ((void)__android_log_print(ANDROID_LOG_INFO, LOGTAG, __VA_ARGS__)) +#define LOGE(...) ((void)__android_log_print(ANDROID_LOG_ERROR, LOGTAG, __VA_ARGS__)) + class AndroidSalFrame; class AndroidSalInstance : public SvpSalIn
[Libreoffice-commits] core.git: vcl/unx
vcl/unx/gtk3/gtkinst.cxx |7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) New commits: commit 1d15f180a6e6a45b74b602402176f0d6e4372cc6 Author: Caolán McNamara AuthorDate: Fri May 28 17:17:37 2021 +0100 Commit: Caolán McNamara CommitDate: Sat May 29 16:22:08 2021 +0200 gtk4: reeable some more newly working dialogs Change-Id: I751b7192a61e2bf5c28559429d89fc219b0efca0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116356 Tested-by: Jenkins Reviewed-by: Caolán McNamara diff --git a/vcl/unx/gtk3/gtkinst.cxx b/vcl/unx/gtk3/gtkinst.cxx index 5dc29911adac..87f020148ae1 100644 --- a/vcl/unx/gtk3/gtkinst.cxx +++ b/vcl/unx/gtk3/gtkinst.cxx @@ -22069,6 +22069,7 @@ weld::Builder* GtkInstance::CreateBuilder(weld::Widget* pParent, const OUString& rUIFile != "modules/scalc/ui/groupdialog.ui" && rUIFile != "modules/scalc/ui/inputstringdialog.ui" && rUIFile != "modules/scalc/ui/insertcells.ui" && +rUIFile != "modules/scalc/ui/insertsheet.ui" && rUIFile != "modules/scalc/ui/optimalcolwidthdialog.ui" && rUIFile != "modules/scalc/ui/optimalrowheightdialog.ui" && rUIFile != "modules/scalc/ui/protectsheetdlg.ui" && @@ -22081,12 +22082,16 @@ weld::Builder* GtkInstance::CreateBuilder(weld::Widget* pParent, const OUString& rUIFile != "modules/smath/ui/catalogdialog.ui" && rUIFile != "modules/smath/ui/fontsizedialog.ui" && rUIFile != "modules/smath/ui/savedefaultsdialog.ui" && -rUIFile != "modules/swriter/ui/gotopagedialog.ui" && +rUIFile != "modules/swriter/ui/endnotepage.ui" && +rUIFile != "modules/swriter/ui/footnotepage.ui" && rUIFile != "modules/swriter/ui/exchangedatabases.ui" && +rUIFile != "modules/swriter/ui/footendnotedialog.ui" && +rUIFile != "modules/swriter/ui/gotopagedialog.ui" && rUIFile != "modules/swriter/ui/insertbookmark.ui" && rUIFile != "modules/swriter/ui/insertbreak.ui" && rUIFile != "modules/swriter/ui/insertfootnote.ui" && rUIFile != "modules/swriter/ui/inserttable.ui" && +rUIFile != "modules/swriter/ui/linenumbering.ui" && rUIFile != "modules/swriter/ui/renameobjectdialog.ui" && rUIFile != "modules/swriter/ui/statisticsinfopage.ui" && rUIFile != "modules/swriter/ui/titlepage.ui" && ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: vcl/source
vcl/source/window/cursor.cxx |2 +- vcl/source/window/dialog.cxx | 16 vcl/source/window/dockwin.cxx|2 +- vcl/source/window/event.cxx | 18 +- vcl/source/window/menu.cxx |4 ++-- vcl/source/window/menufloatingwindow.cxx |4 ++-- vcl/source/window/mouse.cxx | 12 ++-- vcl/source/window/paint.cxx |2 +- vcl/source/window/scrwnd.cxx |2 +- vcl/source/window/syschild.cxx | 10 +- vcl/source/window/syswin.cxx |2 +- vcl/source/window/toolbox.cxx| 10 +- vcl/source/window/toolbox2.cxx |6 +++--- vcl/source/window/window2.cxx|4 ++-- 14 files changed, 47 insertions(+), 47 deletions(-) New commits: commit 8d485ec0cd35ee1ae7684f2b6ca96c0f0c6f9dac Author: Noel Grandin AuthorDate: Sat May 29 08:34:28 2021 +0200 Commit: Noel Grandin CommitDate: Sat May 29 13:37:25 2021 +0200 IsDisposed->isDisposed in vcl/../window Change-Id: Ic1c8bb6bb9a45d4e91c997b752e23aed35767f42 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116364 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/vcl/source/window/cursor.cxx b/vcl/source/window/cursor.cxx index 90ac32298784..bab975a0b602 100644 --- a/vcl/source/window/cursor.cxx +++ b/vcl/source/window/cursor.cxx @@ -115,7 +115,7 @@ static tools::Rectangle ImplCursorInvert(vcl::RenderContext* pRenderContext, Imp static void ImplCursorInvert(vcl::Window* pWindow, ImplCursorData const * pData) { -if (!pWindow || pWindow->IsDisposed()) +if (!pWindow || pWindow->isDisposed()) return; vcl::PaintBufferGuardPtr pGuard; diff --git a/vcl/source/window/dialog.cxx b/vcl/source/window/dialog.cxx index 882d6c0e985b..538ad37b0ede 100644 --- a/vcl/source/window/dialog.cxx +++ b/vcl/source/window/dialog.cxx @@ -843,7 +843,7 @@ bool Dialog::Close() { VclPtr xWindow = this; CallEventListeners( VclEventId::WindowClose ); -if ( xWindow->IsDisposed() ) +if ( xWindow->isDisposed() ) return false; if ( mpWindowImpl->mxWindowPeer.is() && IsCreatedWithToolkit() && !IsInExecute() ) @@ -863,7 +863,7 @@ bool Dialog::Close() if (pCustomCancelButton) { pCustomCancelButton->Click(); -if (xWindow->IsDisposed()) +if (xWindow->isDisposed()) return true; mbInClose = false; return false; @@ -883,7 +883,7 @@ bool Dialog::Close() else bRet = false; } -if ( xWindow->IsDisposed() ) +if ( xWindow->isDisposed() ) return true; return bRet; } @@ -1048,14 +1048,14 @@ short Dialog::Execute() // Yield util EndDialog is called or dialog gets destroyed // (the latter should not happen, but better safe than sorry -while ( !xWindow->IsDisposed() && mbInExecute && !Application::IsQuit() ) +while ( !xWindow->isDisposed() && mbInExecute && !Application::IsQuit() ) Application::Yield(); ImplEndExecuteModal(); #ifdef DBG_UTIL -assert (!mpDialogParent || !mpDialogParent->IsDisposed()); +assert (!mpDialogParent || !mpDialogParent->isDisposed()); #endif -if ( !xWindow->IsDisposed() ) +if ( !xWindow->isDisposed() ) xWindow.clear(); else { @@ -1097,7 +1097,7 @@ void Dialog::RemoveFromDlgList() void Dialog::EndDialog( tools::Long nResult ) { -if (!mbInExecute || IsDisposed()) +if (!mbInExecute || isDisposed()) return; const bool bModal = GetType() != WindowType::MODELESSDIALOG; @@ -1641,7 +1641,7 @@ void TopLevelWindowLocker::decBusy() // unlock locked toplevel windows from being closed now busy is over for (auto& a : m_xImpl->m_aBusyStack.top()) { -if (a->IsDisposed()) +if (a->isDisposed()) continue; a->DecModalCount(); a->ImplGetFrame()->NotifyModalHierarchy(false); diff --git a/vcl/source/window/dockwin.cxx b/vcl/source/window/dockwin.cxx index 68b0ccb9916a..25890e6627a2 100644 --- a/vcl/source/window/dockwin.cxx +++ b/vcl/source/window/dockwin.cxx @@ -622,7 +622,7 @@ bool DockingWindow::Close() { VclPtr xWindow = this; CallEventListeners( VclEventId::WindowClose ); -if ( xWindow->IsDisposed() ) +if ( xWindow->isDisposed() ) return false; if ( mpWindowImpl->mxWindowPeer.is() && IsCreatedWithToolkit() ) diff --git a/vcl/source/window/event.cxx b/vcl/source/window/event.cxx index 4a01c3823110..9fa5b3d4c71e 100644 --- a/vcl/source/window/event.cxx +++ b/vcl/source/window/event.cxx @@ -105,7 +105,7 @@ bool Window::EventNotify( NotifyEvent& rNEvt ) { bool bRet = false; -if (IsDisposed()) +if (isDisposed()) return false; // check for docking window @@ -223,7 +223,7 @@ void Window::CallEventListeners( VclEventId nEve
[Libreoffice-commits] core.git: include/svtools svtools/source
include/svtools/valueset.hxx|8 - svtools/source/control/valueacc.cxx | 26 ++-- svtools/source/control/valueimp.hxx |6 - svtools/source/control/valueset.cxx | 188 +--- 4 files changed, 113 insertions(+), 115 deletions(-) New commits: commit 30aa33e6a6b9fb230af96f619db27fcaf31ef914 Author: Noel Grandin AuthorDate: Fri May 28 14:02:25 2021 +0200 Commit: Noel Grandin CommitDate: Sat May 29 13:37:01 2021 +0200 flatten ValueSet item array and change mrParent to mpParent in ValueSetItem because references preclude copy construction and assignment Change-Id: Iabb0c6ccfa4eed645cf6ee75d7ff83f9c4ec5a1d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116372 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/include/svtools/valueset.hxx b/include/svtools/valueset.hxx index 084008c79e2e..55399b24f711 100644 --- a/include/svtools/valueset.hxx +++ b/include/svtools/valueset.hxx @@ -175,8 +175,6 @@ to be set (before Show) with SetStyle(). */ -typedef std::vector> ValueItemList; - #define WB_ITEMBORDER (WinBits(0x0001)) #define WB_DOUBLEBORDER (WinBits(0x0002)) #define WB_NAMEFIELD(WinBits(0x0004)) @@ -193,7 +191,7 @@ class SVT_DLLPUBLIC ValueSet : public weld::CustomWidgetController private: ScopedVclPtr maVirDev; css::uno::Reference mxAccessible; -ValueItemList mItemList; +std::vector mItemList; std::unique_ptr mpNoneItem; std::unique_ptr mxScrolledWindow; tools::Rectangle maNoneItemRect; @@ -236,7 +234,7 @@ private: friend class ValueSetAcc; SVT_DLLPRIVATE void ImplDeleteItems(); -SVT_DLLPRIVATE void ImplFormatItem(vcl::RenderContext const & rRenderContext, ValueSetItem* pItem, tools::Rectangle aRect); +SVT_DLLPRIVATE void ImplFormatItem(vcl::RenderContext const & rRenderContext, ValueSetItem& rItem, tools::Rectangle aRect); SVT_DLLPRIVATE void ImplDrawItemText(vcl::RenderContext& rRenderContext, const OUString& rStr); SVT_DLLPRIVATE void ImplDrawSelect(vcl::RenderContext& rRenderContext, sal_uInt16 nItemId, const bool bFocus, const bool bDrawSel); SVT_DLLPRIVATE void ImplDrawSelect(vcl::RenderContext& rRenderContext); @@ -246,7 +244,7 @@ private: SVT_DLLPRIVATE ValueSetItem*ImplGetItem( size_t nPos ); SVT_DLLPRIVATE ValueSetItem*ImplGetFirstItem(); SVT_DLLPRIVATE sal_uInt16 ImplGetVisibleItemCount() const; -SVT_DLLPRIVATE void ImplInsertItem( std::unique_ptr pItem, const size_t nPos ); +SVT_DLLPRIVATE void ImplInsertItem( const ValueSetItem& rItem, const size_t nPos ); SVT_DLLPRIVATE tools::RectangleImplGetItemRect( size_t nPos ) const; SVT_DLLPRIVATE void ImplFireAccessibleEvent( short nEventId, const css::uno::Any& rOldValue, const css::uno::Any& rNewValue ); SVT_DLLPRIVATE bool ImplHasAccessibleListeners(); diff --git a/svtools/source/control/valueacc.cxx b/svtools/source/control/valueacc.cxx index a6364d784064..1fe72be58cc8 100644 --- a/svtools/source/control/valueacc.cxx +++ b/svtools/source/control/valueacc.cxx @@ -35,7 +35,7 @@ using namespace ::com::sun::star; ValueSetItem::ValueSetItem( ValueSet& rParent ) -: mrParent(rParent) +: mpParent(&rParent) , mnId(0) , meType(VALUESETITEM_NONE) , mbVisible(true) @@ -122,7 +122,7 @@ uno::Reference< accessibility::XAccessible > SAL_CALL ValueItemAcc::getAccessibl uno::Reference< accessibility::XAccessible >xRet; if( mpParent ) -xRet = mpParent->mrParent.mxAccessible; +xRet = mpParent->mpParent->mxAccessible; return xRet; } @@ -139,7 +139,7 @@ sal_Int32 SAL_CALL ValueItemAcc::getAccessibleIndexInParent() { bool bDone = false; -sal_uInt16 nCount = mpParent->mrParent.ImplGetVisibleItemCount(); +sal_uInt16 nCount = mpParent->mpParent->ImplGetVisibleItemCount(); ValueSetItem* pItem; for (sal_uInt16 i=0; imrParent.ImplGetItem(i); +pItem = mpParent->mpParent->ImplGetItem(i); } catch (const lang::IndexOutOfBoundsException&) { @@ -165,9 +165,9 @@ sal_Int32 SAL_CALL ValueItemAcc::getAccessibleIndexInParent() } //if this valueset contain a none field(common value is default), then we should increase the real index and set the noitem index value equal 0. -if ( mpParent && ( (mpParent->mrParent.GetStyle() & WB_NONEFIELD) != 0 ) ) +if ( mpParent && ( (mpParent->mpParent->GetStyle() & WB_NONEFIELD) != 0 ) ) { -ValueSetItem* pFirstItem = mpParent->mrParent.ImplGetItem (VALUESET_ITEM_NONEITEM); +ValueSetItem* pFirstItem = mpParent->mpParent->ImplGetItem (VALUESET_ITEM_NONEITEM); if( pFirstItem && pFirstItem
Re: sigma symbol tailoring
Hi K., On 29.05.2021 13:36, KKing wrote: Can anyone give me some pointers as to where the code behind the sigma drop down button is located? Great that you are interested in making LibreOffice better! Researching the release notes, you may find the relevant advertisement in 6.3 notes [1], which points to tdf#120697 [2] with the related commit notification. That should be the code pointer; indeed, making it a split button could be a further enhancement - but what is the issue number for it so that you could see UX consensus, and fix it? [1] https://wiki.documentfoundation.org/ReleaseNotes/6.3#Calc [2] https://bugs.documentfoundation.org/show_bug.cgi?id=120697 -- Best regards, Mike Kaganski ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice
[Libreoffice-commits] core.git: 2 commits - sw/inc sw/source
sw/inc/calbck.hxx|4 ++-- sw/source/core/attr/calbck.cxx |9 - sw/source/uibase/docvw/AnnotationWin.cxx |3 --- 3 files changed, 6 insertions(+), 10 deletions(-) New commits: commit e4b5aaade285ecad39332ad8b195738feb51151a Author: Noel Grandin AuthorDate: Fri May 28 12:19:09 2021 +0200 Commit: Noel Grandin CommitDate: Sat May 29 12:41:23 2021 +0200 no need to allocate this hint on the heap Change-Id: I6321d03cb5786aa0c17705cc8c8bcf1f85326f44 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116369 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/sw/inc/calbck.hxx b/sw/inc/calbck.hxx index 11a62033c5cc..0863b2da7f2f 100644 --- a/sw/inc/calbck.hxx +++ b/sw/inc/calbck.hxx @@ -30,6 +30,7 @@ #include #include #include +#include class SwModify; class SwFormat; @@ -76,7 +77,6 @@ namespace sw struct ModifyChangedHint final: SfxHint { ModifyChangedHint(const SwModify* pNew) : m_pNew(pNew) {}; -virtual ~ModifyChangedHint() override; const SwModify* m_pNew; }; // Observer pattern using svl implementation @@ -151,7 +151,7 @@ public: // in case an SwModify object is destroyed that itself is registered in another SwModify, // its SwClient objects can decide to get registered to the latter instead by calling this method -std::unique_ptr CheckRegistration( const SfxPoolItem* pOldValue ); +std::optional CheckRegistration( const SfxPoolItem* pOldValue ); // SwFormat wants to die different than the rest: It wants to reparent every client to its parent // and then send a SwFormatChg hint. void CheckRegistrationFormat(SwFormat& rOld); diff --git a/sw/source/core/attr/calbck.cxx b/sw/source/core/attr/calbck.cxx index a37ee5bef376..3f4253cd2566 100644 --- a/sw/source/core/attr/calbck.cxx +++ b/sw/source/core/attr/calbck.cxx @@ -54,7 +54,6 @@ namespace sw } sw::LegacyModifyHint::~LegacyModifyHint() {} -sw::ModifyChangedHint::~ModifyChangedHint() {} SwClient::SwClient(SwClient&& o) noexcept : m_pRegisteredIn(nullptr) @@ -75,19 +74,19 @@ SwClient::~SwClient() m_pRegisteredIn->Remove( this ); } -std::unique_ptr SwClient::CheckRegistration( const SfxPoolItem* pOld ) +std::optional SwClient::CheckRegistration( const SfxPoolItem* pOld ) { DBG_TESTSOLARMUTEX(); // this method only handles notification about dying SwModify objects if( !pOld || pOld->Which() != RES_OBJECTDYING ) -return nullptr; +return {}; assert(dynamic_cast(pOld)); const SwPtrMsgPoolItem* pDead = static_cast(pOld); if(pDead->pObject != m_pRegisteredIn) { // we should only care received death notes from objects we are following -return nullptr; +return {}; } // I've got a notification from the object I know SwModify* pAbove = m_pRegisteredIn->GetRegisteredIn(); @@ -102,7 +101,7 @@ std::unique_ptr SwClient::CheckRegistration( const SfxPoo // destroy connection EndListeningAll(); } -return std::unique_ptr(new sw::ModifyChangedHint(pAbove)); +return sw::ModifyChangedHint(pAbove); } void SwClient::CheckRegistrationFormat(SwFormat& rOld) commit 1df758fce8ac23b54f96f2c0f3dd608bb1da024a Author: Noel Grandin AuthorDate: Fri May 28 15:59:43 2021 +0200 Commit: Noel Grandin CommitDate: Sat May 29 12:41:05 2021 +0200 remove IsDisposed check in sw already checked by call sites Change-Id: Id03d07b7aebd36e891f831ff4bdab7e63a7c4ff7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116345 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/sw/source/uibase/docvw/AnnotationWin.cxx b/sw/source/uibase/docvw/AnnotationWin.cxx index e354a62204a8..01d12affedad 100644 --- a/sw/source/uibase/docvw/AnnotationWin.cxx +++ b/sw/source/uibase/docvw/AnnotationWin.cxx @@ -138,9 +138,6 @@ SwAnnotationWin::~SwAnnotationWin() void SwAnnotationWin::dispose() { -if (IsDisposed()) -return; - mrMgr.DisconnectSidebarWinFromFrame( *(mrSidebarItem.maLayoutInfo.mpAnchorFrame), *this ); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: svx/source
svx/source/dialog/dlgctrl.cxx |4 ++-- svx/source/tbxctrls/fontworkgallery.cxx |8 svx/source/tbxctrls/tbunocontroller.cxx |6 +++--- svx/source/unodraw/UnoGraphicExporter.cxx | 16 svx/source/xml/xmlgrhlp.cxx | 10 +- 5 files changed, 22 insertions(+), 22 deletions(-) New commits: commit e4c365618fca79aeb6f3c87bb1cd47b1809dfbc6 Author: Noel Grandin AuthorDate: Fri May 28 13:46:22 2021 +0200 Commit: Noel Grandin CommitDate: Sat May 29 12:40:53 2021 +0200 no need to allocate these on the heap Change-Id: Ia839a25cb75782b7b92372d876a41a7fd2e830d1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116370 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/svx/source/dialog/dlgctrl.cxx b/svx/source/dialog/dlgctrl.cxx index 043ce60afbd5..5978430b6ce0 100644 --- a/svx/source/dialog/dlgctrl.cxx +++ b/svx/source/dialog/dlgctrl.cxx @@ -1445,9 +1445,9 @@ void padWidthForSidebar(weld::Toolbar& rToolbar, const css::uno::Reference xBuilder(Application::CreateBuilder(&rToolbar, "svx/ui/measurewidthbar.ui")); std::unique_ptr xToolbar1(xBuilder->weld_toolbar("measurewidth1")); -std::unique_ptr xDispatcher1(new ToolbarUnoDispatcher(*xToolbar1, *xBuilder, rFrame)); +ToolbarUnoDispatcher aDispatcher1(*xToolbar1, *xBuilder, rFrame); std::unique_ptr xToolbar2(xBuilder->weld_toolbar("measurewidth2")); -std::unique_ptr xDispatcher2(new ToolbarUnoDispatcher(*xToolbar2, *xBuilder, rFrame)); +ToolbarUnoDispatcher aDispatcher2(*xToolbar2, *xBuilder, rFrame); nColumnWidth = std::max(xToolbar1->get_preferred_size().Width(), xToolbar2->get_preferred_size().Width()); eSize = rToolbar.get_icon_size(); } diff --git a/svx/source/tbxctrls/fontworkgallery.cxx b/svx/source/tbxctrls/fontworkgallery.cxx index 341ad3957151..a5c812c03b63 100644 --- a/svx/source/tbxctrls/fontworkgallery.cxx +++ b/svx/source/tbxctrls/fontworkgallery.cxx @@ -154,13 +154,13 @@ void FontWorkGalleryDialog::insertSelectedFontwork() if (nItemId == 0) return; -std::unique_ptr pModel(new FmFormModel()); -pModel->GetItemPool().FreezeIdRanges(); +FmFormModel aModel; +aModel.GetItemPool().FreezeIdRanges(); -if( !GalleryExplorer::GetSdrObj( mnThemeId, nItemId-1, pModel.get() ) ) +if( !GalleryExplorer::GetSdrObj( mnThemeId, nItemId-1, &aModel ) ) return; -SdrPage* pPage = pModel->GetPage(0); +SdrPage* pPage = aModel.GetPage(0); if( !(pPage && pPage->GetObjCount()) ) return; diff --git a/svx/source/tbxctrls/tbunocontroller.cxx b/svx/source/tbxctrls/tbunocontroller.cxx index 18916ff9dc2d..ac6c8a71ce7d 100644 --- a/svx/source/tbxctrls/tbunocontroller.cxx +++ b/svx/source/tbxctrls/tbunocontroller.cxx @@ -255,7 +255,7 @@ void SvxFontSizeBox_Base::UpdateFont(const css::awt::FontDescriptor& rCurrentFon { // filling up the sizes list auto nOldVal = m_xWidget->get_value(); // memorize old value -std::unique_ptr xFontList(new FontList(Application::GetDefaultDevice())); +FontList aFontList(Application::GetDefaultDevice()); if (!rCurrentFont.Name.isEmpty()) { @@ -263,11 +263,11 @@ void SvxFontSizeBox_Base::UpdateFont(const css::awt::FontDescriptor& rCurrentFon aFontMetric.SetFamilyName(rCurrentFont.Name); aFontMetric.SetStyleName(rCurrentFont.StyleName); aFontMetric.SetFontHeight(rCurrentFont.Height); -m_xWidget->Fill(&aFontMetric, xFontList.get()); +m_xWidget->Fill(&aFontMetric, &aFontList); } else { -m_xWidget->Fill(nullptr, xFontList.get()); +m_xWidget->Fill(nullptr, &aFontList); } m_xWidget->set_value(nOldVal); // restore old value m_aCurText = m_xWidget->get_active_text(); // memorize to reset at ESC diff --git a/svx/source/unodraw/UnoGraphicExporter.cxx b/svx/source/unodraw/UnoGraphicExporter.cxx index a177b84e214c..8785b910a0e6 100644 --- a/svx/source/unodraw/UnoGraphicExporter.cxx +++ b/svx/source/unodraw/UnoGraphicExporter.cxx @@ -420,20 +420,20 @@ VclPtr GraphicExporter::CreatePageVDev( SdrPage* pPage, tools::Lo if(bSuccess) { -std::unique_ptr pView(new SdrView(*mpDoc, pVDev)); +SdrView aView(*mpDoc, pVDev); -pView->SetPageVisible( false ); -pView->SetBordVisible( false ); -pView->SetGridVisible( false ); -pView->SetHlplVisible( false ); -pView->SetGlueVisible( false ); -pView->ShowSdrPage(pPage); +aView.SetPageVisible( false ); +aView.SetBordVisible( false ); +aView.SetGridVisible( false ); +aView.SetHlplVisible( false ); +aView.SetGlueVisible( false ); +aView.ShowSdrPage(pPage); vcl::Region aRegion (tools::Rectangle( aPoint, aPageSize ) ); ImplExportCheckVisisbilityRedirector aRedirector( mpCurrentPage ); -pView->Comple
sigma symbol tailoring
Hi, Can anyone give me some pointers as to where the code behind the sigma drop down button is located? Using the 7 series has a few frustrations (like traditional old excel shortcut keys missing) but the main irritation is the sigma button that you used to be a simple single click to quickly and easily to get a sum of cells now has a dropdown and you have to select Sum (from a list of Sum, Average, Min, Max, Count). I can see the benefit of this for some sometimes, but not at the detriment of quick and easy summation. Ideally this should be configurable for user choice, and the utopic would be if you click the part of the button with sigma symbol it would act as before just do the summation and if you click on the downward pointing chevron you get the drop down. Obviously that would necessitate two buttons not one, but it would be far more effecient I suspect for a lot of people. K. ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice
Re: Doctor's Report FILE 10212
Hello, My name is Doctor Willarms kevin of St Luke's Hospital here in Australia. I'm contacting you in respect of my patients who died of Corona-virus here in Sydney Australia on June 19, 2020. 3 days before he passed out, He asked me to contact any of his relatives or distant cousins concerning the claim of his property and $2.4 million in the bank and after several attempts of sending you mail by post and no response I decided to try email. Kindly get back to me as soon as you get this mail. Thanks, Best Regards Dr. Willarms kevin Email dr.willarmske...@gmail.com ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice
[Libreoffice-commits] core.git: sw/source
sw/source/core/doc/docbasic.cxx|4 ++-- sw/source/core/doc/doctxm.cxx |4 +++- sw/source/core/layout/paintfrm.cxx | 10 +- 3 files changed, 10 insertions(+), 8 deletions(-) New commits: commit 14e52313e4d350d9960cdd972e87b7f206ee4e2d Author: Noel Grandin AuthorDate: Fri May 28 12:05:09 2021 +0200 Commit: Noel Grandin CommitDate: Sat May 29 10:07:49 2021 +0200 no need to allocate these on the heap Change-Id: Ie4077a86523d623e1913c4f97971ab81d04abd4f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116368 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/sw/source/core/doc/docbasic.cxx b/sw/source/core/doc/docbasic.cxx index 723cd0881f74..6bf54c6b6e5a 100644 --- a/sw/source/core/doc/docbasic.cxx +++ b/sw/source/core/doc/docbasic.cxx @@ -213,7 +213,7 @@ sal_uInt16 SwDoc::CallEvent( SvMacroItemId nEvent, const SwCallMouseEvent& rCall } else if( EXTENDED_STYPE == rMacro.GetScriptType() ) { -std::unique_ptr > pUnoArgs(new Sequence()); +Sequence aUnoArgs; Any aRet; Sequence< sal_Int16 > aOutArgsIndex; @@ -222,7 +222,7 @@ sal_uInt16 SwDoc::CallEvent( SvMacroItemId nEvent, const SwCallMouseEvent& rCall SAL_INFO("sw", "SwDoc::CallEvent URL is " << rMacro.GetMacName() ); nRet += ERRCODE_NONE == mpDocShell->CallXScript( -rMacro.GetMacName(), *pUnoArgs,aRet, aOutArgsIndex, aOutArgs) ? 1 : 0; +rMacro.GetMacName(), aUnoArgs, aRet, aOutArgsIndex, aOutArgs) ? 1 : 0; } // JavaScript calls are ignored } diff --git a/sw/source/core/doc/doctxm.cxx b/sw/source/core/doc/doctxm.cxx index 2c3ed6902f13..a8916a113a05 100644 --- a/sw/source/core/doc/doctxm.cxx +++ b/sw/source/core/doc/doctxm.cxx @@ -1717,7 +1717,9 @@ void SwTOXBaseSection::UpdatePageNum_( SwTextNode* pNd, const SwTOXInternational& rIntl ) { // collect starts end ends of main entry character style -std::unique_ptr< std::vector > xCharStyleIdx(pMainEntryNums ? new std::vector : nullptr); +std::optional< std::vector > xCharStyleIdx; +if (pMainEntryNums) +xCharStyleIdx.emplace(); OUString sSrchStr = OUStringChar(C_NUM_REPL) + SwTOXMark::S_PAGE_DELI + OUStringChar(C_NUM_REPL); diff --git a/sw/source/core/layout/paintfrm.cxx b/sw/source/core/layout/paintfrm.cxx index 646e4fe97995..e74de064a9b6 100644 --- a/sw/source/core/layout/paintfrm.cxx +++ b/sw/source/core/layout/paintfrm.cxx @@ -7560,11 +7560,11 @@ Graphic SwDrawFrameFormat::MakeGraphic( ImageMap* ) if ( pMod ) { SdrObject *pObj = FindSdrObject(); -std::unique_ptr pView( new SdrView( *pMod ) ); -SdrPageView *pPgView = pView->ShowSdrPage(pView->GetModel()->GetPage(0)); -pView->MarkObj( pObj, pPgView ); -aRet = pView->GetMarkedObjBitmapEx(); -pView->HideSdrPage(); +SdrView aView( *pMod ); +SdrPageView *pPgView = aView.ShowSdrPage(aView.GetModel()->GetPage(0)); +aView.MarkObj( pObj, pPgView ); +aRet = aView.GetMarkedObjBitmapEx(); +aView.HideSdrPage(); } return aRet; } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: sw/source
sw/source/core/doc/docsort.cxx | 14 +--- sw/source/core/inc/docsort.hxx |2 sw/source/core/text/inftxt.hxx |3 - sw/source/core/text/itrform2.cxx |2 sw/source/core/text/pormulti.cxx | 108 ++--- sw/source/core/unocore/unodraw.cxx |4 - 6 files changed, 65 insertions(+), 68 deletions(-) New commits: commit ca37f29421927d8f2d2b8fe2208649d6dad13011 Author: Noel Grandin AuthorDate: Fri May 28 11:38:49 2021 +0200 Commit: Noel Grandin CommitDate: Sat May 29 10:07:22 2021 +0200 no need to allocate these on the heap Change-Id: I07a1fd5833bc61eb97649ac5d85b1b0eb3054baa Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116367 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/sw/source/core/doc/docsort.cxx b/sw/source/core/doc/docsort.cxx index 090385d6c419..fbed71be7f1e 100644 --- a/sw/source/core/doc/docsort.cxx +++ b/sw/source/core/doc/docsort.cxx @@ -57,7 +57,7 @@ SwDoc* SwSortElement::pDoc = nullptr; const FlatFndBox* SwSortElement::pBox = nullptr; CollatorWrapper*SwSortElement::pSortCollator = nullptr; lang::Locale* SwSortElement::pLocale = nullptr; -OUString* SwSortElement::pLastAlgorithm = nullptr; +std::optional SwSortElement::xLastAlgorithm; LocaleDataWrapper* SwSortElement::pLclData = nullptr; // List of all sorted elements @@ -87,8 +87,7 @@ void SwSortElement::Finit() pOptions = nullptr; delete pLocale; pLocale = nullptr; -delete pLastAlgorithm; -pLastAlgorithm = nullptr; +xLastAlgorithm.reset(); delete pSortCollator; pSortCollator = nullptr; delete pLclData; @@ -142,13 +141,10 @@ int SwSortElement::keycompare(const SwSortElement& rCmp, sal_uInt16 nKey) const } else { -if( !pLastAlgorithm || *pLastAlgorithm != rSrtKey.sSortType ) +if( !xLastAlgorithm || *xLastAlgorithm != rSrtKey.sSortType ) { -if( pLastAlgorithm ) -*pLastAlgorithm = rSrtKey.sSortType; -else -pLastAlgorithm = new OUString( rSrtKey.sSortType ); -pSortCollator->loadCollatorAlgorithm( *pLastAlgorithm, +xLastAlgorithm = rSrtKey.sSortType; +pSortCollator->loadCollatorAlgorithm( *xLastAlgorithm, *pLocale, pOptions->bIgnoreCase ? SW_COLLATOR_IGNORES : 0 ); } diff --git a/sw/source/core/inc/docsort.hxx b/sw/source/core/inc/docsort.hxx index f18775b3c7a5..a92754db521b 100644 --- a/sw/source/core/inc/docsort.hxx +++ b/sw/source/core/inc/docsort.hxx @@ -63,7 +63,7 @@ struct SwSortElement static const FlatFndBox*pBox; static CollatorWrapper* pSortCollator; static css::lang::Locale* pLocale; -static OUString*pLastAlgorithm; +static std::optional xLastAlgorithm; static LocaleDataWrapper* pLclData; static void Init( SwDoc*, const SwSortOptions& rOpt, FlatFndBox const * = nullptr ); diff --git a/sw/source/core/text/inftxt.hxx b/sw/source/core/text/inftxt.hxx index f11ea65ed918..19d730d02e5c 100644 --- a/sw/source/core/text/inftxt.hxx +++ b/sw/source/core/text/inftxt.hxx @@ -19,6 +19,7 @@ #pragma once #include +#include #include #include @@ -187,7 +188,7 @@ public: // GetMultiAttr returns the text attribute of the multiportion, // if rPos is inside any multi-line part. // rPos will set to the end of the multi-line part. -std::unique_ptr GetMultiCreator(TextFrameIndex &rPos, SwMultiPortion const* pM) const; +std::optional GetMultiCreator(TextFrameIndex &rPos, SwMultiPortion const* pM) const; bool OnWin() const { return m_bOnWin; } void SetOnWin( const bool bNew ) { m_bOnWin = bNew; } diff --git a/sw/source/core/text/itrform2.cxx b/sw/source/core/text/itrform2.cxx index 2eddba6c1c6e..8e5a2b403e42 100644 --- a/sw/source/core/text/itrform2.cxx +++ b/sw/source/core/text/itrform2.cxx @@ -1392,7 +1392,7 @@ SwLinePortion *SwTextFormatter::NewPortion( SwTextFormatInfo &rInf ) // We open a multiportion part, if we enter a multi-line part // of the paragraph. TextFrameIndex nEnd = rInf.GetIdx(); -std::unique_ptr pCreate = rInf.GetMultiCreator( nEnd, m_pMulti ); +std::optional pCreate = rInf.GetMultiCreator( nEnd, m_pMulti ); if( pCreate ) { SwMultiPortion* pTmp = nullptr; diff --git a/sw/source/core/text/pormulti.cxx b/sw/source/core/text/pormulti.cxx index dc83cbde6556..55cb637e34ea 100644 --- a/sw/source/core/text/pormulti.cxx +++ b/sw/source/core/text/pormulti.cxx @@ -351,12 +351,12 @@ void SwDoubleLinePortion::PaintBracket( SwTextPaintInfo &rInf, aBlank.Width( nChWidth ); aBlank.Height( m_pBracket->nHeight ); { -std::unique_ptr pTmpFnt( new SwFont( *rInf.GetFont() ) ); +SwFont aTmpFnt( *rInf.GetFont() ); SwFontScript nAct =
[Libreoffice-commits] core.git: sw/inc sw/source
sw/inc/sortopt.hxx|2 - sw/source/core/doc/docsort.cxx| 18 sw/source/core/doc/sortopt.cxx|5 sw/source/core/unocore/unoobj.cxx | 42 +++--- sw/source/ui/misc/srtdlg.cxx | 12 +- 5 files changed, 38 insertions(+), 41 deletions(-) New commits: commit 0bb2985071780ab3c83e576b1f57841fd037eaba Author: Noel Grandin AuthorDate: Fri May 28 11:23:11 2021 +0200 Commit: Noel Grandin CommitDate: Sat May 29 10:06:50 2021 +0200 no need to store SwSortKey separately on the heap Change-Id: Ib05e02a6c9c239f590508c7e71667d7ecca64f79 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116366 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/sw/inc/sortopt.hxx b/sw/inc/sortopt.hxx index b29460f1f647..41667ce91f77 100644 --- a/sw/inc/sortopt.hxx +++ b/sw/inc/sortopt.hxx @@ -47,7 +47,7 @@ struct SW_DLLPUBLIC SwSortOptions SwSortOptions& operator=( SwSortOptions const & ) = delete; // MSVC2015 workaround -std::vector> aKeys; +std::vector aKeys; SwSortDirection eDirection; sal_Unicode cDeli; LanguageTypenLanguage; diff --git a/sw/source/core/doc/docsort.cxx b/sw/source/core/doc/docsort.cxx index 3c2f8c1f019c..090385d6c419 100644 --- a/sw/source/core/doc/docsort.cxx +++ b/sw/source/core/doc/docsort.cxx @@ -121,8 +121,8 @@ int SwSortElement::keycompare(const SwSortElement& rCmp, sal_uInt16 nKey) const // The actual comparison const SwSortElement *pOrig, *pCmp; -const SwSortKey* pSrtKey = pOptions->aKeys[ nKey ].get(); -if( pSrtKey->eSortOrder == SwSortOrder::Ascending ) +const SwSortKey& rSrtKey = pOptions->aKeys[ nKey ]; +if( rSrtKey.eSortOrder == SwSortOrder::Ascending ) { pOrig = this; pCmp = &rCmp; @@ -133,7 +133,7 @@ int SwSortElement::keycompare(const SwSortElement& rCmp, sal_uInt16 nKey) const pCmp = this; } -if( pSrtKey->bIsNumeric ) +if( rSrtKey.bIsNumeric ) { double n1 = pOrig->GetValue( nKey ); double n2 = pCmp->GetValue( nKey ); @@ -142,12 +142,12 @@ int SwSortElement::keycompare(const SwSortElement& rCmp, sal_uInt16 nKey) const } else { -if( !pLastAlgorithm || *pLastAlgorithm != pSrtKey->sSortType ) +if( !pLastAlgorithm || *pLastAlgorithm != rSrtKey.sSortType ) { if( pLastAlgorithm ) -*pLastAlgorithm = pSrtKey->sSortType; +*pLastAlgorithm = rSrtKey.sSortType; else -pLastAlgorithm = new OUString( pSrtKey->sSortType ); +pLastAlgorithm = new OUString( rSrtKey.sSortType ); pSortCollator->loadCollatorAlgorithm( *pLastAlgorithm, *pLocale, pOptions->bIgnoreCase ? SW_COLLATOR_IGNORES : 0 ); @@ -196,7 +196,7 @@ OUString SwSortTextElement::GetKey(sal_uInt16 nId) const const OUString& rStr = pTextNd->GetText(); sal_Unicode nDeli = pOptions->cDeli; -sal_uInt16 nDCount = pOptions->aKeys[nId]->nColumnId, i = 1; +sal_uInt16 nDCount = pOptions->aKeys[nId].nColumnId, i = 1; sal_Int32 nStart = 0; // Find the delimiter @@ -228,7 +228,7 @@ SwSortBoxElement::SwSortBoxElement( sal_uInt16 nRC ) OUString SwSortBoxElement::GetKey(sal_uInt16 nKey) const { const FndBox_* pFndBox; -sal_uInt16 nCol = pOptions->aKeys[nKey]->nColumnId-1; +sal_uInt16 nCol = pOptions->aKeys[nKey].nColumnId-1; if( SwSortDirection::Rows == pOptions->eDirection ) pFndBox = pBox->GetBox(nCol, nRow); // Sort rows @@ -260,7 +260,7 @@ OUString SwSortBoxElement::GetKey(sal_uInt16 nKey) const double SwSortBoxElement::GetValue( sal_uInt16 nKey ) const { const FndBox_* pFndBox; -sal_uInt16 nCol = pOptions->aKeys[nKey]->nColumnId-1; +sal_uInt16 nCol = pOptions->aKeys[nKey].nColumnId-1; if( SwSortDirection::Rows == pOptions->eDirection ) pFndBox = pBox->GetBox(nCol, nRow); // Sort rows diff --git a/sw/source/core/doc/sortopt.cxx b/sw/source/core/doc/sortopt.cxx index 06ac058568af..b5fc62ba845d 100644 --- a/sw/source/core/doc/sortopt.cxx +++ b/sw/source/core/doc/sortopt.cxx @@ -45,16 +45,13 @@ SwSortOptions::SwSortOptions() } SwSortOptions::SwSortOptions(const SwSortOptions& rOpt) : +aKeys( rOpt.aKeys ), eDirection( rOpt.eDirection ), cDeli( rOpt.cDeli ), nLanguage( rOpt.nLanguage ), bTable( rOpt.bTable ), bIgnoreCase( rOpt.bIgnoreCase ) { -for(auto const & pKey : rOpt.aKeys) -{ -aKeys.push_back( std::make_unique(*pKey) ); -} } SwSortOptions::~SwSortOptions() diff --git a/sw/source/core/unocore/unoobj.cxx b/sw/source/core/unocore/unoobj.cxx index eeff66995bd3..56ad0c297eec 100644 --- a/sw/source/core/unocore/unoobj.cxx +++ b/sw/source/core/unocore/unoobj.cxx @@ -2588,21 +2588,21 @@ bool SwUnoCursorHelper::ConvertSortPr
[Libreoffice-commits] core.git: sw/source
sw/source/core/unocore/unotext.cxx |4 +- sw/source/filter/html/swhtml.cxx | 66 ++--- sw/source/filter/inc/fltini.hxx|2 - 3 files changed, 36 insertions(+), 36 deletions(-) New commits: commit bc86f6d3583965dd369d0ae73a5d647c43ae38e9 Author: Noel Grandin AuthorDate: Fri May 28 10:54:48 2021 +0200 Commit: Noel Grandin CommitDate: Sat May 29 10:06:31 2021 +0200 no need to allocate these on the heap Change-Id: Id82625ec95720d92353804d1b503b8f71e1db91e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116365 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/sw/source/core/unocore/unotext.cxx b/sw/source/core/unocore/unotext.cxx index 32cadcff761b..953b9667fb26 100644 --- a/sw/source/core/unocore/unotext.cxx +++ b/sw/source/core/unocore/unotext.cxx @@ -1538,8 +1538,8 @@ SwXText::convertToTextFrame( throw uno::RuntimeException(); } uno::Reference< text::XTextContent > xRet; -std::unique_ptr pTempStartPam(new SwUnoInternalPaM(*GetDoc())); -std::unique_ptr< SwUnoInternalPaM > pEndPam(new SwUnoInternalPaM(*GetDoc())); +std::optional pTempStartPam(*GetDoc()); +std::optional pEndPam(*GetDoc()); if (!::sw::XTextRangeToSwPaM(*pTempStartPam, xStart) || !::sw::XTextRangeToSwPaM(*pEndPam, xEnd)) { diff --git a/sw/source/filter/html/swhtml.cxx b/sw/source/filter/html/swhtml.cxx index baa98996e308..ff7c32b44005 100644 --- a/sw/source/filter/html/swhtml.cxx +++ b/sw/source/filter/html/swhtml.cxx @@ -2710,7 +2710,7 @@ void SwHTMLFrameFormatListener::Notify(const SfxHint& rHint) void SwHTMLParser::SetAttr_( bool bChkEnd, bool bBeforeTable, std::deque> *pPostIts ) { -std::unique_ptr pAttrPam( new SwPaM( *m_pPam->GetPoint() ) ); +SwPaM aAttrPam( *m_pPam->GetPoint() ); const SwNodeIndex& rEndIdx = m_pPam->GetPoint()->nNode; const sal_Int32 nEndCnt = m_pPam->GetPoint()->nContent.GetIndex(); HTMLAttr* pAttr; @@ -2803,15 +2803,15 @@ void SwHTMLParser::SetAttr_( bool bChkEnd, bool bBeforeTable, continue; } } -pAttrPam->GetPoint()->nNode = pAttr->m_nStartPara; +aAttrPam.GetPoint()->nNode = pAttr->m_nStartPara; // because of the deleting of BRs the start index can also // point behind the end the text if( pAttr->m_nStartContent > pCNd->Len() ) pAttr->m_nStartContent = pCNd->Len(); -pAttrPam->GetPoint()->nContent.Assign( pCNd, pAttr->m_nStartContent ); +aAttrPam.GetPoint()->nContent.Assign( pCNd, pAttr->m_nStartContent ); -pAttrPam->SetMark(); +aAttrPam.SetMark(); if ( (pAttr->GetSttPara() != pAttr->GetEndPara()) && !isTXTATR_NOEND(nWhich) ) { @@ -2824,14 +2824,14 @@ void SwHTMLParser::SetAttr_( bool bChkEnd, bool bBeforeTable, else { OSL_ENSURE( false, "SetAttr: GoPrevious() failed!" ); -pAttrPam->DeleteMark(); +aAttrPam.DeleteMark(); delete pAttr; pAttr = pPrev; continue; } } -pAttrPam->GetPoint()->nNode = pAttr->m_nEndPara; +aAttrPam.GetPoint()->nNode = pAttr->m_nEndPara; } else if( pAttr->IsLikePara() ) { @@ -2843,9 +2843,9 @@ void SwHTMLParser::SetAttr_( bool bChkEnd, bool bBeforeTable, if( pAttr->m_nEndContent > pCNd->Len() ) pAttr->m_nEndContent = pCNd->Len(); -pAttrPam->GetPoint()->nContent.Assign( pCNd, pAttr->m_nEndContent ); +aAttrPam.GetPoint()->nContent.Assign( pCNd, pAttr->m_nEndContent ); if( bBeforeTable && -pAttrPam->GetPoint()->nNode.GetIndex() == +aAttrPam.GetPoint()->nNode.GetIndex() == rEndIdx.GetIndex() ) { // If we're before inserting a table and the attribute ends @@ -2854,16 +2854,16 @@ void SwHTMLParser::SetAttr_( bool bChkEnd, bool bBeforeTable, if( nWhich != RES_BREAK && nWhich != RES_PAGEDESC && !isTXTATR_NOEND(nWhich) ) { -if( pAttrPam->GetMark()->nNode.GetIndex() != +if( aAttrPam.GetMark()->nNode.GetIndex() != rEndIdx.GetIndex() ) { -OSL_ENSURE( !pAttrPam->GetPoint()->nContent.GetIndex(), +OSL_ENSURE( !aAttrPam.GetPoint()->nContent