core.git: 2 commits - chart2/source sw/source
chart2/source/view/charttypes/VSeriesPlotter.cxx |6 +++--- sw/source/ui/dialog/swdlgfact.cxx|2 +- 2 files changed, 4 insertions(+), 4 deletions(-) New commits: commit d68d45102948ac6d54584f60ba5e493036438d0d Author: Caolán McNamara AuthorDate: Sat Jan 13 19:11:14 2024 + Commit: Caolán McNamara CommitDate: Sat Jan 13 22:09:11 2024 +0100 cid#1546488 COPY_INSTEAD_OF_MOVE Change-Id: I80b843351641e38af6b9f9d6001b89206e37991c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162024 Tested-by: Caolán McNamara Reviewed-by: Caolán McNamara diff --git a/sw/source/ui/dialog/swdlgfact.cxx b/sw/source/ui/dialog/swdlgfact.cxx index daf0dd6ff3f1..66ac1ec21a25 100644 --- a/sw/source/ui/dialog/swdlgfact.cxx +++ b/sw/source/ui/dialog/swdlgfact.cxx @@ -599,7 +599,7 @@ void AbstractSwFieldDlg_Impl::SetText( const OUString& rStr ) bool AbstractSwFieldDlg_Impl::StartExecuteAsync(AsyncContext &rCtx) { auto xDlg = m_xDlg; -return SfxTabDialogController::runAsync(m_xDlg, [=](sal_Int32 nResult){ +return SfxTabDialogController::runAsync(m_xDlg, [rCtx, xDlg=std::move(xDlg)](sal_Int32 nResult){ xDlg->Close(); if (rCtx.isSet()) rCtx.maEndDialogFn(nResult); commit 26c375988a913684320ef32ec85afb829913e687 Author: Caolán McNamara AuthorDate: Sat Jan 13 19:04:24 2024 + Commit: Caolán McNamara CommitDate: Sat Jan 13 22:09:00 2024 +0100 cid#1585307 Out-of-bounds read sizeof should probably have been std::size, but just replace with range iteration anyway Change-Id: I60d9d7d74a5c039ad49387b114d1142ca27b032a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162023 Tested-by: Caolán McNamara Reviewed-by: Caolán McNamara diff --git a/chart2/source/view/charttypes/VSeriesPlotter.cxx b/chart2/source/view/charttypes/VSeriesPlotter.cxx index 34a702d7b696..948d5ef33f1f 100644 --- a/chart2/source/view/charttypes/VSeriesPlotter.cxx +++ b/chart2/source/view/charttypes/VSeriesPlotter.cxx @@ -2340,9 +2340,9 @@ const ROrderPair pairList[] = { sal_Int32 VSeriesPlotter::getRenderOrder() const { OUString aChartType = m_xChartTypeModel->getChartType(); -for (size_t n = 0; n < sizeof(pairList); ++n) { -if (aChartType.equalsIgnoreAsciiCase(pairList[n].chartName)) { -return pairList[n].renderOrder; +for (const auto& elem : pairList) { +if (aChartType.equalsIgnoreAsciiCase(elem.chartName)) { +return elem.renderOrder; } } SAL_WARN("chart2", "Unsupported chart type in getRenderOrder()");
[Libreoffice-commits] core.git: 2 commits - chart2/source sw/source
chart2/source/controller/sidebar/ChartColorWrapper.cxx |3 +++ sw/source/core/text/inftxt.cxx |5 +++-- 2 files changed, 6 insertions(+), 2 deletions(-) New commits: commit 260bc16e1923016d0628a8779e219b290d4c9011 Author: Caolán McNamara AuthorDate: Thu Jun 8 15:23:04 2023 +0100 Commit: Caolán McNamara CommitDate: Thu Jun 8 20:42:55 2023 +0200 check for empty model like ObjectIdentifier::getObjectPropertySet a speculative fix for: https://crashreport.libreoffice.org/stats/crash_details/5b3c8597-9ffa-49b8-8cc2-132e69456249 Change-Id: I4f45cf4c7ed51c814d4cb01b8f55709586d7a981 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152745 Tested-by: Jenkins Reviewed-by: Caolán McNamara diff --git a/chart2/source/controller/sidebar/ChartColorWrapper.cxx b/chart2/source/controller/sidebar/ChartColorWrapper.cxx index e1011a684787..aee8483cadf4 100644 --- a/chart2/source/controller/sidebar/ChartColorWrapper.cxx +++ b/chart2/source/controller/sidebar/ChartColorWrapper.cxx @@ -39,6 +39,9 @@ namespace { OUString getCID(const css::uno::Reference& xModel) { +if (!xModel.is()) +return OUString(); + css::uno::Reference xController(xModel->getCurrentController()); css::uno::Reference xSelectionSupplier(xController, css::uno::UNO_QUERY); if (!xSelectionSupplier.is()) commit 3fe8d0e47418c4ce47a6ae6802ccbb0dd496f853 Author: Caolán McNamara AuthorDate: Thu Jun 8 12:50:46 2023 +0100 Commit: Caolán McNamara CommitDate: Thu Jun 8 20:42:44 2023 +0200 ofz#59696 Abrt Change-Id: I8ef148ab96e2fedd6b464bff87b43d9736300f6f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152738 Tested-by: Jenkins Reviewed-by: Caolán McNamara diff --git a/sw/source/core/text/inftxt.cxx b/sw/source/core/text/inftxt.cxx index 32b8b2609df0..32676958c914 100644 --- a/sw/source/core/text/inftxt.cxx +++ b/sw/source/core/text/inftxt.cxx @@ -19,6 +19,7 @@ #include +#include #include #include #include @@ -1631,8 +1632,8 @@ void SwTextFormatInfo::CtorInitTextFormatInfo( OutputDevice* pRenderContext, SwT m_nLineNetHeight = 0; SetLineStart(TextFrameIndex(0)); -SvtCTLOptions::TextNumerals const nTextNumerals( -SvtCTLOptions::GetCTLTextNumerals()); +SvtCTLOptions::TextNumerals const nTextNumerals = !utl::ConfigManager::IsFuzzing() ? +SvtCTLOptions::GetCTLTextNumerals() : SvtCTLOptions::NUMERALS_ARABIC; // cannot cache for NUMERALS_CONTEXT because we need to know the string // for the whole paragraph now if (nTextNumerals != SvtCTLOptions::NUMERALS_CONTEXT)
[Libreoffice-commits] core.git: 2 commits - chart2/source sw/source
chart2/source/inc/LabeledDataSequence.hxx |2 - sw/source/core/swg/SwXMLTextBlocks1.cxx | 37 -- 2 files changed, 25 insertions(+), 14 deletions(-) New commits: commit 4d020dfe1439e963f0b2367ba984c2eb6eb153a5 Author: Noel Grandin AuthorDate: Tue Feb 21 16:14:36 2023 +0200 Commit: Noel Grandin CommitDate: Tue Feb 21 18:48:12 2023 + tdf#153728 Can't assign macro to autotext regression from commit b8f932e1df1efb230230ab1f1b9c8cfc822a0f4c Author: Noel Grandin Date: Thu Jan 9 12:01:55 2020 +0200 convert XMLAutoTextEventImport to FastParser APIs Change-Id: I924c2c95a258917b0003171b71c23a65a6b623d3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147399 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/sw/source/core/swg/SwXMLTextBlocks1.cxx b/sw/source/core/swg/SwXMLTextBlocks1.cxx index 3517d3670316..e8a2b088e67c 100644 --- a/sw/source/core/swg/SwXMLTextBlocks1.cxx +++ b/sw/source/core/swg/SwXMLTextBlocks1.cxx @@ -195,9 +195,6 @@ ErrCode SwXMLTextBlocks::GetMacroTable( sal_uInt16 nIdx, uno::Reference< uno::XComponentContext > xContext = comphelper::getProcessComponentContext(); -// get parser -uno::Reference< xml::sax::XParser > xParser = xml::sax::Parser::create( xContext ); - // create descriptor and reference to it. Either // both or neither must be kept because of the // reference counting! @@ -209,21 +206,37 @@ ErrCode SwXMLTextBlocks::GetMacroTable( sal_uInt16 nIdx, OUString sFilterComponent = bOasis ? OUString("com.sun.star.comp.Writer.XMLOasisAutotextEventsImporter") : OUString("com.sun.star.comp.Writer.XMLAutotextEventsImporter"); -uno::Reference< xml::sax::XDocumentHandler > xFilter( +uno::Reference< XInterface > xFilterInt = xContext->getServiceManager()->createInstanceWithArgumentsAndContext( -sFilterComponent, aFilterArguments, xContext), -UNO_QUERY ); -OSL_ENSURE( xFilter.is(), "can't instantiate autotext-events filter"); -if ( !xFilter.is() ) -return ERR_SWG_READ_ERROR; +sFilterComponent, aFilterArguments, xContext); -// connect parser and filter -xParser->setDocumentHandler( xFilter ); // parse the stream try { -xParser->parseStream( aParserInput ); +Reference xFastParser(xFilterInt, UNO_QUERY); +Reference xFastDocHandler(xFilterInt, UNO_QUERY); +if (xFastParser) +{ +xFastParser->parseStream(aParserInput); +} +else if (xFastDocHandler) +{ +Reference xParser += css::xml::sax::FastParser::create(xContext); +xParser->setFastDocumentHandler(xFastDocHandler); +xParser->parseStream(aParserInput); +} +else +{ +Reference xDocHandler(xFilterInt, UNO_QUERY); +OSL_ENSURE( xDocHandler.is(), "can't instantiate autotext-events filter"); +if ( !xDocHandler.is() ) +return ERR_SWG_READ_ERROR; +Reference xParser = css::xml::sax::Parser::create(xContext); +xParser->setDocumentHandler(xDocHandler); +xParser->parseStream(aParserInput); +} } catch( xml::sax::SAXParseException& ) { commit 0f158508a4bea01ff47dacbcdd21ad1bca026721 Author: Noel Grandin AuthorDate: Tue Feb 21 14:02:01 2023 +0200 Commit: Noel Grandin CommitDate: Tue Feb 21 18:48:01 2023 + BaseMutex is unused in LabeledDataSequence Change-Id: If6f5a6e2954e28008c8c690557f15124452c05d3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147404 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/chart2/source/inc/LabeledDataSequence.hxx b/chart2/source/inc/LabeledDataSequence.hxx index 7c9593bd0dc5..ab5338420be3 100644 --- a/chart2/source/inc/LabeledDataSequence.hxx +++ b/chart2/source/inc/LabeledDataSequence.hxx @@ -18,7 +18,6 @@ */ #pragma once -#include #include #include @@ -42,7 +41,6 @@ typedef cppu::WeakImplHelper< } class OOO_DLLPUBLIC_CHARTTOOLS LabeledDataSequence final : -public cppu::BaseMutex, public impl::LabeledDataSequence_Base { public:
[Libreoffice-commits] core.git: 2 commits - chart2/source sw/source
chart2/source/controller/main/ChartController_EditData.cxx |3 - sw/source/core/crsr/BlockCursor.cxx| 36 - sw/source/core/crsr/BlockCursor.hxx| 17 +++--- 3 files changed, 11 insertions(+), 45 deletions(-) New commits: commit 0a8af607ba0936d8802fca96ec3259c7eedcd571 Author: Noel Grandin Date: Thu Mar 15 17:05:46 2018 +0200 loplugin:useuniqueptr in SwBlockCursor Change-Id: I3c3b9969ea26bd378a25a3c58e4710a5538889fb Reviewed-on: https://gerrit.libreoffice.org/51373 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/sw/source/core/crsr/BlockCursor.cxx b/sw/source/core/crsr/BlockCursor.cxx index 89c8d8f745fe..9f2c399a7393 100644 --- a/sw/source/core/crsr/BlockCursor.cxx +++ b/sw/source/core/crsr/BlockCursor.cxx @@ -22,8 +22,6 @@ SwBlockCursor::~SwBlockCursor() { -delete pStartPt; -delete pEndPt; } SwShellCursor& SwBlockCursor::getShellCursor() @@ -31,38 +29,4 @@ SwShellCursor& SwBlockCursor::getShellCursor() return aCursor; } -void SwBlockCursor::setStartPoint( const Point &rPt ) -{ -if( pStartPt ) -*pStartPt = rPt; -else -pStartPt = new Point( rPt ); -} - -void SwBlockCursor::setEndPoint( const Point &rPt ) -{ -if( pEndPt ) -*pEndPt = rPt; -else -pEndPt = new Point( rPt ); -} - -const Point* SwBlockCursor::getStartPoint() const -{ -return pStartPt; -} - -const Point* SwBlockCursor::getEndPoint() const -{ -return pEndPt; -} - -void SwBlockCursor::clearPoints() -{ -delete pStartPt; -delete pEndPt; -pStartPt = nullptr; -pEndPt = nullptr; -} - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/core/crsr/BlockCursor.hxx b/sw/source/core/crsr/BlockCursor.hxx index 3238993c87cd..c0b764662f15 100644 --- a/sw/source/core/crsr/BlockCursor.hxx +++ b/sw/source/core/crsr/BlockCursor.hxx @@ -20,6 +20,7 @@ #define INCLUDED_SW_SOURCE_CORE_CRSR_BLOCKCURSOR_HXX #include +#include class SwCursorShell; struct SwPosition; @@ -37,12 +38,12 @@ class Point; class SwBlockCursor { SwShellCursor aCursor; -Point *pStartPt; -Point *pEndPt; +boost::optional maStartPt; +boost::optional maEndPt; public: SwBlockCursor( const SwCursorShell& rCursorSh, const SwPosition &rPos ) : -aCursor( rCursorSh, rPos ), pStartPt(nullptr), pEndPt(nullptr) {} +aCursor( rCursorSh, rPos ) {} /** Access to the shell cursor @return SwShellCursor& which represents the start and end position of the @@ -55,31 +56,31 @@ public: rPt should contain the document coordinates of the mouse cursor when the block selection starts (MouseButtonDown) */ -void setStartPoint( const Point &rPt ); +void setStartPoint( const Point &rPt ) { maStartPt = rPt; } /** Defines the ending vertex of the block selection @param rPt rPt should contain the document coordinates of the mouse cursor when the block selection has started and the mouse has been moved (MouseMove) */ -void setEndPoint( const Point &rPt ); +void setEndPoint( const Point &rPt ) { maEndPt = rPt; } /** The document coordinates where the block selection has been started @return 0, if no start point has been set */ -const Point* getStartPoint() const; +boost::optional const & getStartPoint() const { return maStartPt; } /** The document coordinates where the block selection ends (at the moment) @return 0, if no end point has been set */ -const Point* getEndPoint() const; +boost::optional const & getEndPoint() const { return maEndPt; } /** Deletion of the mouse created rectangle When start and end points exist, the block cursor depends on this. If the cursor is moved by cursor keys (e.g. up/down, home/end) the mouse rectangle is obsolete and has to be deleted. */ -void clearPoints(); +void clearPoints() { maStartPt.reset(); maEndPt.reset(); } ~SwBlockCursor(); }; commit a7e98725901412aa334a1abe87194e682c1ae836 Author: Pranav Kant Date: Thu Mar 15 16:48:54 2018 +0530 chart2 lok: give parent to data table dialog to tunnel it Change-Id: Ie82a9a6d9b499e5da34e04f0c2f5fc7c164b098e Reviewed-on: https://gerrit.libreoffice.org/51346 Tested-by: Jenkins Reviewed-by: pranavk diff --git a/chart2/source/controller/main/ChartController_EditData.cxx b/chart2/source/controller/main/ChartController_EditData.cxx index a274a1e402df..c3296edf4d1c 100644 --- a/chart2/source/controller/main/ChartController_EditData.cxx +++ b/chart2/source/controller/main/ChartController_EditData.cxx @@ -17,6 +17,7 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ +#include #include #include @@ -46,7 +47,7 @@ void ChartController::executeDispatch_EditData() UndoLiveUpdateGuardWithData aUndoGuard(
[Libreoffice-commits] core.git: 2 commits - chart2/source sw/source
chart2/source/controller/chartapiwrapper/DataSeriesPointWrapper.hxx |4 ++-- chart2/source/view/axes/VCartesianAxis.cxx |2 +- sw/source/filter/xml/xmltbli.cxx|2 +- 3 files changed, 4 insertions(+), 4 deletions(-) New commits: commit 332fffe3b8cd51576c42762e5e9751464777f2ca Author: Julien Nabet Date: Sun Feb 9 10:05:33 2014 +0100 Typo: prefere -> prefer Change-Id: Ifad9097f933b2821c1168fc317889e66d6419545 diff --git a/chart2/source/view/axes/VCartesianAxis.cxx b/chart2/source/view/axes/VCartesianAxis.cxx index 70269b4..5e8c829 100644 --- a/chart2/source/view/axes/VCartesianAxis.cxx +++ b/chart2/source/view/axes/VCartesianAxis.cxx @@ -1173,7 +1173,7 @@ void VCartesianAxis::get2DAxisMainLine( B2DVector& rStart, B2DVector& rEnd, doub ScreenPosAndLogicPos aNotSoGoodPos( aPosList[1] ); //choose most bottom positions -if( !::rtl::math::approxEqual( fDeltaX, 0.0 ) ) // prefere left-right alignments +if( !::rtl::math::approxEqual( fDeltaX, 0.0 ) ) // prefer left-right alignments { if( aBestPos.aScreenPos.getX() > aNotSoGoodPos.aScreenPos.getX() ) m_aAxisProperties.m_aLabelAlignment = LABEL_ALIGN_RIGHT; diff --git a/sw/source/filter/xml/xmltbli.cxx b/sw/source/filter/xml/xmltbli.cxx index 6ebfa5c..4d06449 100644 --- a/sw/source/filter/xml/xmltbli.cxx +++ b/sw/source/filter/xml/xmltbli.cxx @@ -2757,7 +2757,7 @@ void SwXMLTableContext::MakeTable() { case text::HoriOrientation::FULL: case text::HoriOrientation::NONE: -// For text::HoriOrientation::NONE we would prefere to use the sum +// For text::HoriOrientation::NONE we would prefer to use the sum // of the relative column widths as reference width. // Unfortunately this works only if this sum interpreted as // twip value is larger than the space that is available. commit 95141bfd304ca1c33145c85b383ccb5ddbb98938 Author: Julien Nabet Date: Sun Feb 9 10:02:51 2014 +0100 Typos Change-Id: I8316213889280b8f8622fb5196b6a36e81d8e6f1 diff --git a/chart2/source/controller/chartapiwrapper/DataSeriesPointWrapper.hxx b/chart2/source/controller/chartapiwrapper/DataSeriesPointWrapper.hxx index 0559a18..1c8acea 100644 --- a/chart2/source/controller/chartapiwrapper/DataSeriesPointWrapper.hxx +++ b/chart2/source/controller/chartapiwrapper/DataSeriesPointWrapper.hxx @@ -137,8 +137,8 @@ private: sal_Boolm_bLinesAllowed; //this should only be used, if the DataSeriesPointWrapper is initialized via the XInitialize interface -//because a big change in the chartmodel may leed to an dataseriespointer thats not connected to the model anymore -//with the indices instead we are can always get the new dataseries +//because a big change in the chartmodel may lead to an dataseriespointer that is not connected to the model anymore +//with the indices instead we can always get the new dataseries ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XDataSeries > m_xDataSeries; }; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits