core.git: editeng/source sw/source
editeng/source/editeng/eehtml.cxx| 30 -- editeng/source/editeng/eehtml.hxx|2 ++ sw/source/uibase/docvw/AnnotationWin.cxx |7 ++- 3 files changed, 36 insertions(+), 3 deletions(-) New commits: commit f61cc4f12249bf4905355cee35bfc44e88d9fc39 Author: Caolán McNamara AuthorDate: Wed Oct 2 14:18:45 2024 +0100 Commit: Caolán McNamara CommitDate: Fri Oct 4 15:28:47 2024 +0200 allow editeng html import to treat divs as inserting a newline optional, currently cowardly defaulted off, except for the specific use-case. Change-Id: I8a6176ee356fa4d2b665d5325d9b7aba2a6579f6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174472 Reviewed-by: Caolán McNamara Tested-by: Jenkins diff --git a/editeng/source/editeng/eehtml.cxx b/editeng/source/editeng/eehtml.cxx index 24fd670ad9ba..11cf8811bf9d 100644 --- a/editeng/source/editeng/eehtml.cxx +++ b/editeng/source/editeng/eehtml.cxx @@ -41,6 +41,7 @@ EditHTMLParser::EditHTMLParser( SvStream& rIn, OUString _aBaseURL, SvKeyValueIte mpEditEngine(nullptr), bInPara(false), bWasInPara(false), +mbBreakForDivs(false), bFieldsInserted(false), bInTitle(false), nInTable(0), @@ -57,7 +58,25 @@ EditHTMLParser::EditHTMLParser( SvStream& rIn, OUString _aBaseURL, SvKeyValueIte SetSwitchToUCS2( true ); if ( pHTTPHeaderAttrs ) +{ SetEncodingByHTTPHeader( pHTTPHeaderAttrs ); +SetBreakForDivs(*pHTTPHeaderAttrs); +} +} + +void EditHTMLParser::SetBreakForDivs(SvKeyValueIterator& rHTTPOptions) +{ +SvKeyValue aKV; +bool bCont = rHTTPOptions.GetFirst(aKV); +while (bCont) +{ +if (aKV.GetKey() == "newline-on-div") +{ +mbBreakForDivs = aKV.GetValue() == "true"; +break; +} +bCont = rHTTPOptions.GetNext(aKV); +} } EditHTMLParser::~EditHTMLParser() @@ -290,6 +309,15 @@ void EditHTMLParser::NextToken( HtmlTokenId nToken ) nInCell++; Newline(); break; + +case HtmlTokenId::DIVISION_ON: +case HtmlTokenId::DIVISION_OFF: +{ +if (mbBreakForDivs) +Newline(); +break; +} + case HtmlTokenId::BLOCKQUOTE_ON: case HtmlTokenId::BLOCKQUOTE_OFF: case HtmlTokenId::BLOCKQUOTE30_ON: @@ -356,8 +384,6 @@ void EditHTMLParser::NextToken( HtmlTokenId nToken ) // HTML 3.0 case HtmlTokenId::BANNER_ON: case HtmlTokenId::BANNER_OFF: -case HtmlTokenId::DIVISION_ON: -case HtmlTokenId::DIVISION_OFF: // case HtmlTokenId::LISTHEADER_ON://! special handling // case HtmlTokenId::LISTHEADER_OFF: case HtmlTokenId::NOTE_ON: diff --git a/editeng/source/editeng/eehtml.hxx b/editeng/source/editeng/eehtml.hxx index 9f8009c715c8..7b6591e2ccf4 100644 --- a/editeng/source/editeng/eehtml.hxx +++ b/editeng/source/editeng/eehtml.hxx @@ -45,6 +45,7 @@ private: boolbInPara:1; boolbWasInPara:1; // Remember bInPara before HeadingStart, because afterwards it will be gone. +boolmbBreakForDivs:1; // Create newlines on encountering divs boolbFieldsInserted:1; boolbInTitle:1; @@ -68,6 +69,7 @@ private: voidImpSetAttribs( const SfxItemSet& rItems ); voidImpSetStyleSheet( sal_uInt16 nHeadingLevel ); +voidSetBreakForDivs(SvKeyValueIterator& rHTTPOptions); protected: virtual voidNextToken( HtmlTokenId nToken ) override; diff --git a/sw/source/uibase/docvw/AnnotationWin.cxx b/sw/source/uibase/docvw/AnnotationWin.cxx index 670425779212..1ad47437caa7 100644 --- a/sw/source/uibase/docvw/AnnotationWin.cxx +++ b/sw/source/uibase/docvw/AnnotationWin.cxx @@ -32,6 +32,7 @@ #include #include +#include #include #include #include @@ -490,7 +491,11 @@ void SwAnnotationWin::UpdateHTML(const OUString& rHtml) OString sHtmlContent(rHtml.toUtf8()); SvMemoryStream aHTMLStream(const_cast(sHtmlContent.getStr()), sHtmlContent.getLength(), StreamMode::READ); -GetOutlinerView()->Read(aHTMLStream, EETextFormat::Html, nullptr); +SvKeyValueIteratorRef xValues(new SvKeyValueIterator); +// Insert newlines for divs, not normally done, so to keep things simple +// only enable tthat for this case. +xValues->Append(SvKeyValue("newline-on-div", "true")); +GetOutlinerView()->Read(aHTMLStream, EETextFormat::Html, xValues.get()); UpdateData(); }
core.git: include/svx svx/sdi sw/inc sw/sdi sw/source
include/svx/svxids.hrc |4 +++- svx/sdi/svx.sdi | 10 -- sw/inc/AnnotationWin.hxx |3 ++- sw/sdi/swriter.sdi |9 +++-- sw/source/uibase/docvw/AnnotationWin.cxx | 10 ++ sw/source/uibase/shells/textfld.cxx | 16 ++-- 6 files changed, 40 insertions(+), 12 deletions(-) New commits: commit 6d94b7988f2fa90d7ca4790183cefea8950da834 Author: Caolán McNamara AuthorDate: Tue Oct 1 20:27:19 2024 +0100 Commit: Caolán McNamara CommitDate: Fri Oct 4 15:28:21 2024 +0200 support setting writer comment contents from simple-html Change-Id: I42002c1b1ade940603ca6d2ca0f6072f1672cce8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174471 Tested-by: Jenkins Reviewed-by: Caolán McNamara diff --git a/include/svx/svxids.hrc b/include/svx/svxids.hrc index 895507c4696b..ebfc2d1582cf 100644 --- a/include/svx/svxids.hrc +++ b/include/svx/svxids.hrc @@ -1070,8 +1070,10 @@ class XFillGradientItem; #define SID_ATTR_BULLET_FONT TypedWhichId(SID_SVX_START + 1213) #define SID_ATTR_BULLET_INDEX TypedWhichId(SID_SVX_START + 1214) +#define SID_ATTR_POSTIT_HTML TypedWhichId( SID_SVX_START + 1215 ) + // IMPORTANT NOTE: adjust SID_SVX_FIRSTFREE, when adding new slot id -#define SID_SVX_FIRSTFREE ( SID_SVX_START + 1214 + 1 ) +#define SID_SVX_FIRSTFREE ( SID_SVX_START + 1215 + 1 ) // Overflow check for slot IDs diff --git a/svx/sdi/svx.sdi b/svx/sdi/svx.sdi index ef8c9e32fd98..53f531866276 100644 --- a/svx/sdi/svx.sdi +++ b/svx/sdi/svx.sdi @@ -4684,7 +4684,10 @@ SfxVoidItem InPlaceObjectResize SID_OBJECTRESIZE SfxVoidItem InsertAnnotation SID_INSERT_POSTIT -(SvxPostItAuthorItem Author SID_ATTR_POSTIT_AUTHOR,SvxPostItDateItem Date SID_ATTR_POSTIT_DATE,SvxPostItTextItem Text SID_ATTR_POSTIT_TEXT) +(SvxPostItAuthorItem Author SID_ATTR_POSTIT_AUTHOR, + SvxPostItDateItem Date SID_ATTR_POSTIT_DATE, + SvxPostItTextItem Text SID_ATTR_POSTIT_TEXT, + SvxPostItTextItem Html SID_ATTR_POSTIT_HTML) [ AutoUpdate = FALSE, FastCall = FALSE, @@ -4705,6 +4708,7 @@ SfxVoidItem EditAnnotation SID_EDIT_POSTIT SvxPostItAuthorItem Author SID_ATTR_POSTIT_AUTHOR, SvxPostItDateItem Date SID_ATTR_POSTIT_DATE, SvxPostItTextItem Text SID_ATTR_POSTIT_TEXT, + SvxPostItTextItem Html SID_ATTR_POSTIT_HTML, SfxInt32Item PositionX SID_ATTR_POSTIT_POSITION_X SfxInt32Item PositionY SID_ATTR_POSTIT_POSITION_Y) [ @@ -4758,7 +4762,9 @@ SfxVoidItem ShowResolvedAnnotations SID_TOGGLE_RESOLVED_NOTES SfxVoidItem ReplyToAnnotation SID_REPLYTO_POSTIT -(SvxPostItIdItem Id SID_ATTR_POSTIT_ID,SvxPostItTextItem Text SID_ATTR_POSTIT_TEXT) +(SvxPostItIdItem Id SID_ATTR_POSTIT_ID, + SvxPostItTextItem Text SID_ATTR_POSTIT_TEXT, + SvxPostItTextItem Html SID_ATTR_POSTIT_HTML) [ AutoUpdate = FALSE, FastCall = FALSE, diff --git a/sw/inc/AnnotationWin.hxx b/sw/inc/AnnotationWin.hxx index ec6a09cd8775..291978eee471 100644 --- a/sw/inc/AnnotationWin.hxx +++ b/sw/inc/AnnotationWin.hxx @@ -72,7 +72,8 @@ class SAL_DLLPUBLIC_RTTI SwAnnotationWin final : public InterimItemWindow voidGotoPos(); const SwPostItField* GetPostItField() const { return mpField; } SwFormatField* GetFormatField() const { return mpFormatField; } -void UpdateText(const OUString& aText); +void UpdateText(const OUString& rText); +void UpdateHTML(const OUString& rHtml); OUString GetAuthor() const; Date GetDate() const; diff --git a/sw/sdi/swriter.sdi b/sw/sdi/swriter.sdi index 7ece653275d0..20a23b745338 100644 --- a/sw/sdi/swriter.sdi +++ b/sw/sdi/swriter.sdi @@ -2519,7 +2519,10 @@ SfxVoidItem IndexMarkToIndex FN_IDX_MARK_TO_IDX ] SfxVoidItem InsertAnnotation FN_POSTIT -(SvxPostItTextItem Text SID_ATTR_POSTIT_TEXT,SvxPostItAuthorItem Author SID_ATTR_POSTIT_AUTHOR,SvxPostItDateItem Date SID_ATTR_POSTIT_DATE) +(SvxPostItTextItem Text SID_ATTR_POSTIT_TEXT, + SvxPostItTextItem Html SID_ATTR_POSTIT_HTML, + SvxPostItAuthorItem Author SID_ATTR_POSTIT_AUTHOR, + SvxPostItDateItem Date SID_ATTR_POSTIT_DATE) [ AutoUpdate = FALSE, FastCall = FALSE, @@ -7684,7 +7687,9 @@ SfxBoolItem SelectionModeDefault FN_SELECTION_MODE_DEFAULT ] SfxVoidItem ReplyComment FN_REPLY -(SvxPostItIdItem Id SID_ATTR_POSTIT_ID,SvxPostItTextItem Text SID_ATTR_POSTIT_TEXT) +(SvxPostItIdItem Id SID_ATTR_POSTIT_ID, + SvxPostItTextItem Text SID_ATTR_POSTIT_TEXT, + SvxPostItTextItem Html SID_ATTR_POSTIT_HTML) [ AutoUpdate = FALSE, FastCall = FALSE, diff --git a/sw/source/uibase/docvw/AnnotationWin.cxx b/sw/source/uibase/docvw/AnnotationWin.cxx index 46628b098527..670425779212 100644 --- a/sw/source/uibase/docvw/AnnotationWin.cxx +++ b/sw/source/uibase/docvw/AnnotationWin.cxx @@ -484,6 +484,16 @@ void S
core.git: Branch 'distro/collabora/co-24.04' - editeng/source include/editeng sw/inc sw/source
editeng/source/editeng/editview.cxx |5 ++ editeng/source/editeng/impedit.hxx |1 editeng/source/editeng/impedit4.cxx | 55 +++ include/editeng/editview.hxx |1 sw/inc/AnnotationWin.hxx |2 + sw/source/uibase/docvw/AnnotationWin.cxx |5 ++ sw/source/uibase/docvw/PostItMgr.cxx |1 sw/source/uibase/uno/unotxdoc.cxx|1 8 files changed, 71 insertions(+) New commits: commit ac5d2b5bad52179f2930f9baac8f78ec90d7ee11 Author: Caolán McNamara AuthorDate: Wed Oct 2 14:20:55 2024 +0100 Commit: Miklos Vajna CommitDate: Fri Oct 4 13:30:32 2024 +0200 add a 'simple-html' export to editeng currently justs supports hyperlinks and nothing else over plain text. puts each paragraph in a separate div Change-Id: I645d28e0bb6ed13e930e1555753846d10ecf5dd9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174388 Reviewed-by: Miklos Vajna Tested-by: Jenkins CollaboraOffice diff --git a/editeng/source/editeng/editview.cxx b/editeng/source/editeng/editview.cxx index d4b60fecf415..0be3f1d1cb96 100644 --- a/editeng/source/editeng/editview.cxx +++ b/editeng/source/editeng/editview.cxx @@ -666,6 +666,11 @@ ErrCode EditView::Read( SvStream& rInput, EETextFormat eFormat, SvKeyValueIterat return rInput.GetError(); } +OString EditView::GetSimpleHtml() const +{ +return pImpEditView->pEditEngine->pImpEditEngine->GetSimpleHtml(); +} + void EditView::Cut() { Reference aClipBoard(GetClipboard()); diff --git a/editeng/source/editeng/impedit.hxx b/editeng/source/editeng/impedit.hxx index 6c6ddf43f135..58a72816d8fb 100644 --- a/editeng/source/editeng/impedit.hxx +++ b/editeng/source/editeng/impedit.hxx @@ -929,6 +929,7 @@ public: EditPaM Read(SvStream& rInput, const OUString& rBaseURL, EETextFormat eFormat, const EditSelection& rSel, SvKeyValueIterator* pHTTPHeaderAttrs = nullptr); voidWrite(SvStream& rOutput, EETextFormat eFormat, const EditSelection& rSel); +OString GetSimpleHtml() const; std::unique_ptr CreateTextObject(); std::unique_ptr CreateTextObject(const EditSelection& rSel); diff --git a/editeng/source/editeng/impedit4.cxx b/editeng/source/editeng/impedit4.cxx index d3dc29892d6a..adbdf2ccee62 100644 --- a/editeng/source/editeng/impedit4.cxx +++ b/editeng/source/editeng/impedit4.cxx @@ -58,6 +58,7 @@ #include #include "textconv.hxx" #include +#include #include #include #include @@ -1039,6 +1040,60 @@ void ImpEditEngine::WriteItemAsRTF( const SfxPoolItem& rItem, SvStream& rOutput, } } +// Currently not good enough to be used for a ::Write of EETextFormat::Html, it +// only supports hyperlinks over plain text +OString ImpEditEngine::GetSimpleHtml() const +{ +OStringBuffer aOutput; + +sal_Int32 nStartNode = 0; +sal_Int32 nEndNode = maEditDoc.Count()-1; + +// iterate over the paragraphs ... +for (sal_Int32 nNode = nStartNode; nNode <= nEndNode; nNode++) +{ +const ContentNode* pNode = maEditDoc.GetObject( nNode ); + +const ParaPortion* pParaPortion = FindParaPortion( pNode ); + +sal_Int32 nIndex = 0; +sal_Int32 nEndPortion = pParaPortion->GetTextPortions().Count() - 1; + +aOutput.append(""); +for (sal_Int32 n = 0; n <= nEndPortion; n++) +{ +const TextPortion& rTextPortion = pParaPortion->GetTextPortions()[n]; + +const SvxURLField* pURLField = nullptr; +if ( rTextPortion.GetKind() == PortionKind::FIELD ) +{ +const EditCharAttrib* pAttr = pNode->GetCharAttribs().FindFeature(nIndex); +const SvxFieldItem* pFieldItem = dynamic_cast(pAttr->GetItem()); +if( pFieldItem ) +{ +const SvxFieldData* pFieldData = pFieldItem->GetField(); +pURLField = dynamic_cast(pFieldData); +} +} + +OUString aRTFStr = EditDoc::GetParaAsString(pNode, nIndex, nIndex + rTextPortion.GetLen()); +if (pURLField) +aOutput.append("GetURL().toUtf8() + "\">"); + +aOutput.append(HTMLOutFuncs::ConvertStringToHTML(aRTFStr)); + +if (pURLField) +aOutput.append(""); + +nIndex = nIndex + rTextPortion.GetLen(); +} + +aOutput.append(""); +} + +return aOutput.makeStringAndClear(); +} + std::unique_ptr ImpEditEngine::GetEmptyTextObject() { EditSelection aEmptySel; diff --git a/include/editeng/editview.hxx b/include/editeng/editview.hxx index 0bafa99bb35f..852e43e9e5ff 100644 --- a/include/editeng/editview.hxx +++ b/include/editeng/editview.hxx @@ -279,6 +279,7 @@ public: voidRemoveAttribsKeepLanguages( bool bRemoveParaAttribs ); ErrCode Read( SvStream& rInput, EETextFormat eFormat, SvKeyValueI
core.git: editeng/source
editeng/source/editeng/eehtml.cxx | 28 editeng/source/editeng/eehtml.hxx |1 + 2 files changed, 17 insertions(+), 12 deletions(-) New commits: commit 5739280623bcc111a0d8b808ca4cc5e6598f9cce Author: Caolán McNamara AuthorDate: Wed Oct 2 13:25:09 2024 +0100 Commit: Caolán McNamara CommitDate: Fri Oct 4 13:01:10 2024 +0200 Split out this html parsing hunk as a separate NewLine method Change-Id: I1fb034af2419306f96152ce6802d193d7a1560af Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174441 Tested-by: Jenkins Reviewed-by: Caolán McNamara diff --git a/editeng/source/editeng/eehtml.cxx b/editeng/source/editeng/eehtml.cxx index 1b73960d129f..24fd670ad9ba 100644 --- a/editeng/source/editeng/eehtml.cxx +++ b/editeng/source/editeng/eehtml.cxx @@ -95,6 +95,14 @@ SvParserState EditHTMLParser::CallParser(EditEngine* pEE, const EditPaM& rPaM) return _eState; } +void EditHTMLParser::Newline() +{ +bool bHasText = HasTextInCurrentPara(); +if ( bHasText ) +ImpInsertParaBreak(); +StartPara( false ); +} + void EditHTMLParser::NextToken( HtmlTokenId nToken ) { switch( nToken ) @@ -280,7 +288,8 @@ void EditHTMLParser::NextToken( HtmlTokenId nToken ) case HtmlTokenId::TABLEHEADER_ON: case HtmlTokenId::TABLEDATA_ON: nInCell++; -[[fallthrough]]; +Newline(); +break; case HtmlTokenId::BLOCKQUOTE_ON: case HtmlTokenId::BLOCKQUOTE_OFF: case HtmlTokenId::BLOCKQUOTE30_ON: @@ -291,28 +300,23 @@ void EditHTMLParser::NextToken( HtmlTokenId nToken ) case HtmlTokenId::DT_ON: case HtmlTokenId::ORDERLIST_ON: case HtmlTokenId::UNORDERLIST_ON: -{ -bool bHasText = HasTextInCurrentPara(); -if ( bHasText ) -ImpInsertParaBreak(); -StartPara( false ); -} +Newline(); break; case HtmlTokenId::TABLEHEADER_OFF: case HtmlTokenId::TABLEDATA_OFF: -{ if ( nInCell ) nInCell--; -[[fallthrough]]; -} +EndPara(); +break; case HtmlTokenId::LISTHEADER_OFF: case HtmlTokenId::LI_OFF: case HtmlTokenId::DD_OFF: case HtmlTokenId::DT_OFF: case HtmlTokenId::ORDERLIST_OFF: -case HtmlTokenId::UNORDERLIST_OFF: EndPara(); -break; +case HtmlTokenId::UNORDERLIST_OFF: +EndPara(); +break; case HtmlTokenId::TABLEROW_ON: case HtmlTokenId::TABLEROW_OFF: // A RETURN only after a CELL, for Calc diff --git a/editeng/source/editeng/eehtml.hxx b/editeng/source/editeng/eehtml.hxx index fddd567ac6ba..9f8009c715c8 100644 --- a/editeng/source/editeng/eehtml.hxx +++ b/editeng/source/editeng/eehtml.hxx @@ -53,6 +53,7 @@ private: sal_uInt8 nDefListLevel; voidStartPara( bool bReal ); +voidNewline(); voidEndPara(); voidAnchorStart(); voidAnchorEnd();
core.git: Branch 'distro/collabora/co-24.04' - editeng/source sw/source
editeng/source/editeng/eehtml.cxx| 30 -- editeng/source/editeng/eehtml.hxx|2 ++ sw/source/uibase/docvw/AnnotationWin.cxx |7 ++- 3 files changed, 36 insertions(+), 3 deletions(-) New commits: commit 26e4f2fdca356fd060bcafa5216c1a5de488510a Author: Caolán McNamara AuthorDate: Wed Oct 2 14:18:45 2024 +0100 Commit: Miklos Vajna CommitDate: Fri Oct 4 09:53:12 2024 +0200 allow editeng html import to treat divs as inserting a newline optional, currently cowardly defaulted off, except for the specific use-case. Change-Id: I8a6176ee356fa4d2b665d5325d9b7aba2a6579f6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174387 Tested-by: Jenkins CollaboraOffice Reviewed-by: Miklos Vajna diff --git a/editeng/source/editeng/eehtml.cxx b/editeng/source/editeng/eehtml.cxx index 3db92d077694..046bab27fbee 100644 --- a/editeng/source/editeng/eehtml.cxx +++ b/editeng/source/editeng/eehtml.cxx @@ -41,6 +41,7 @@ EditHTMLParser::EditHTMLParser( SvStream& rIn, OUString _aBaseURL, SvKeyValueIte mpEditEngine(nullptr), bInPara(false), bWasInPara(false), +mbBreakForDivs(false), bFieldsInserted(false), bInTitle(false), nInTable(0), @@ -57,7 +58,25 @@ EditHTMLParser::EditHTMLParser( SvStream& rIn, OUString _aBaseURL, SvKeyValueIte SetSwitchToUCS2( true ); if ( pHTTPHeaderAttrs ) +{ SetEncodingByHTTPHeader( pHTTPHeaderAttrs ); +SetBreakForDivs(*pHTTPHeaderAttrs); +} +} + +void EditHTMLParser::SetBreakForDivs(SvKeyValueIterator& rHTTPHeader) +{ +SvKeyValue aKV; +bool bCont = rHTTPHeader.GetFirst(aKV); +while (bCont) +{ +if (aKV.GetKey() == "newline-on-div") +{ +mbBreakForDivs = aKV.GetValue() == "true"; +break; +} +bCont = rHTTPHeader.GetNext(aKV); +} } EditHTMLParser::~EditHTMLParser() @@ -290,6 +309,15 @@ void EditHTMLParser::NextToken( HtmlTokenId nToken ) nInCell++; Newline(); break; + +case HtmlTokenId::DIVISION_ON: +case HtmlTokenId::DIVISION_OFF: +{ +if (mbBreakForDivs) +Newline(); +break; +} + case HtmlTokenId::BLOCKQUOTE_ON: case HtmlTokenId::BLOCKQUOTE_OFF: case HtmlTokenId::BLOCKQUOTE30_ON: @@ -356,8 +384,6 @@ void EditHTMLParser::NextToken( HtmlTokenId nToken ) // HTML 3.0 case HtmlTokenId::BANNER_ON: case HtmlTokenId::BANNER_OFF: -case HtmlTokenId::DIVISION_ON: -case HtmlTokenId::DIVISION_OFF: // case HtmlTokenId::LISTHEADER_ON://! special handling // case HtmlTokenId::LISTHEADER_OFF: case HtmlTokenId::NOTE_ON: diff --git a/editeng/source/editeng/eehtml.hxx b/editeng/source/editeng/eehtml.hxx index 9f8009c715c8..0cdb1c8553e8 100644 --- a/editeng/source/editeng/eehtml.hxx +++ b/editeng/source/editeng/eehtml.hxx @@ -45,6 +45,7 @@ private: boolbInPara:1; boolbWasInPara:1; // Remember bInPara before HeadingStart, because afterwards it will be gone. +boolmbBreakForDivs:1; // Create newlines on encountering divs boolbFieldsInserted:1; boolbInTitle:1; @@ -68,6 +69,7 @@ private: voidImpSetAttribs( const SfxItemSet& rItems ); voidImpSetStyleSheet( sal_uInt16 nHeadingLevel ); +voidSetBreakForDivs(SvKeyValueIterator& rHTTPHeader); protected: virtual voidNextToken( HtmlTokenId nToken ) override; diff --git a/sw/source/uibase/docvw/AnnotationWin.cxx b/sw/source/uibase/docvw/AnnotationWin.cxx index 41e5bac03dc5..3bb933f61fbd 100644 --- a/sw/source/uibase/docvw/AnnotationWin.cxx +++ b/sw/source/uibase/docvw/AnnotationWin.cxx @@ -32,6 +32,7 @@ #include #include +#include #include #include #include @@ -490,7 +491,11 @@ void SwAnnotationWin::UpdateHTML(const OUString& rHtml) OString sHtmlContent(rHtml.toUtf8()); SvMemoryStream aHTMLStream(const_cast(sHtmlContent.getStr()), sHtmlContent.getLength(), StreamMode::READ); -GetOutlinerView()->Read(aHTMLStream, EETextFormat::Html, nullptr); +SvKeyValueIteratorRef xValues(new SvKeyValueIterator); +// Insert newlines for divs, not normally done, so to keep things simple +// only enable tthat for this case. +xValues->Append(SvKeyValue("newline-on-div", "true")); +GetOutlinerView()->Read(aHTMLStream, EETextFormat::Html, xValues.get()); UpdateData(); }
core.git: Branch 'distro/collabora/co-24.04' - include/svx svx/sdi sw/inc sw/sdi sw/source
include/svx/svxids.hrc |4 +++- svx/sdi/svx.sdi | 10 -- sw/inc/AnnotationWin.hxx |3 ++- sw/sdi/swriter.sdi |9 +++-- sw/source/uibase/docvw/AnnotationWin.cxx | 10 ++ sw/source/uibase/shells/textfld.cxx | 16 ++-- 6 files changed, 40 insertions(+), 12 deletions(-) New commits: commit b4e424adbfdd5c4e18240ddec1405690e8718d2b Author: Caolán McNamara AuthorDate: Tue Oct 1 20:27:19 2024 +0100 Commit: Miklos Vajna CommitDate: Fri Oct 4 09:35:49 2024 +0200 support setting writer comment contents from simple-html Change-Id: I42002c1b1ade940603ca6d2ca0f6072f1672cce8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174365 Tested-by: Jenkins CollaboraOffice Reviewed-by: Miklos Vajna diff --git a/include/svx/svxids.hrc b/include/svx/svxids.hrc index 7cc55ac02813..0a2bc143210a 100644 --- a/include/svx/svxids.hrc +++ b/include/svx/svxids.hrc @@ -1058,8 +1058,10 @@ class XFillGradientItem; #define SID_CHAR_DLG_FOR_PARAGRAPH ( SID_SVX_START + 1210 ) #define SID_SET_DOCUMENT_LANGUAGE TypedWhichId( SID_SVX_START + 1211 ) +#define SID_ATTR_POSTIT_HTML TypedWhichId( SID_SVX_START + 1212 ) + // IMPORTANT NOTE: adjust SID_SVX_FIRSTFREE, when adding new slot id -#define SID_SVX_FIRSTFREE ( SID_SVX_START + 1211 + 1 ) +#define SID_SVX_FIRSTFREE ( SID_SVX_START + 1212 + 1 ) // Overflow check for slot IDs diff --git a/svx/sdi/svx.sdi b/svx/sdi/svx.sdi index bab0601c2f28..7bb020e0149c 100644 --- a/svx/sdi/svx.sdi +++ b/svx/sdi/svx.sdi @@ -4684,7 +4684,10 @@ SfxVoidItem InPlaceObjectResize SID_OBJECTRESIZE SfxVoidItem InsertAnnotation SID_INSERT_POSTIT -(SvxPostItAuthorItem Author SID_ATTR_POSTIT_AUTHOR,SvxPostItDateItem Date SID_ATTR_POSTIT_DATE,SvxPostItTextItem Text SID_ATTR_POSTIT_TEXT) +(SvxPostItAuthorItem Author SID_ATTR_POSTIT_AUTHOR, + SvxPostItDateItem Date SID_ATTR_POSTIT_DATE, + SvxPostItTextItem Text SID_ATTR_POSTIT_TEXT, + SvxPostItTextItem Html SID_ATTR_POSTIT_HTML) [ AutoUpdate = FALSE, FastCall = FALSE, @@ -4705,6 +4708,7 @@ SfxVoidItem EditAnnotation SID_EDIT_POSTIT SvxPostItAuthorItem Author SID_ATTR_POSTIT_AUTHOR, SvxPostItDateItem Date SID_ATTR_POSTIT_DATE, SvxPostItTextItem Text SID_ATTR_POSTIT_TEXT, + SvxPostItTextItem Html SID_ATTR_POSTIT_HTML, SfxInt32Item PositionX SID_ATTR_POSTIT_POSITION_X SfxInt32Item PositionY SID_ATTR_POSTIT_POSITION_Y) [ @@ -4758,7 +4762,9 @@ SfxVoidItem ShowResolvedAnnotations SID_TOGGLE_RESOLVED_NOTES SfxVoidItem ReplyToAnnotation SID_REPLYTO_POSTIT -(SvxPostItIdItem Id SID_ATTR_POSTIT_ID,SvxPostItTextItem Text SID_ATTR_POSTIT_TEXT) +(SvxPostItIdItem Id SID_ATTR_POSTIT_ID, + SvxPostItTextItem Text SID_ATTR_POSTIT_TEXT, + SvxPostItTextItem Html SID_ATTR_POSTIT_HTML) [ AutoUpdate = FALSE, FastCall = FALSE, diff --git a/sw/inc/AnnotationWin.hxx b/sw/inc/AnnotationWin.hxx index aee382e51a82..235a1a70b587 100644 --- a/sw/inc/AnnotationWin.hxx +++ b/sw/inc/AnnotationWin.hxx @@ -71,7 +71,8 @@ class SAL_DLLPUBLIC_RTTI SwAnnotationWin final : public InterimItemWindow voidDelete(); voidGotoPos(); const SwPostItField* GetPostItField() const { return mpField; } -void UpdateText(const OUString& aText); +void UpdateText(const OUString& rText); +void UpdateHTML(const OUString& rHtml); OUString GetAuthor() const; Date GetDate() const; diff --git a/sw/sdi/swriter.sdi b/sw/sdi/swriter.sdi index 77ef4f2e3332..0068641cb3b6 100644 --- a/sw/sdi/swriter.sdi +++ b/sw/sdi/swriter.sdi @@ -2519,7 +2519,10 @@ SfxVoidItem IndexMarkToIndex FN_IDX_MARK_TO_IDX ] SfxVoidItem InsertAnnotation FN_POSTIT -(SvxPostItTextItem Text SID_ATTR_POSTIT_TEXT,SvxPostItAuthorItem Author SID_ATTR_POSTIT_AUTHOR,SvxPostItDateItem Date SID_ATTR_POSTIT_DATE) +(SvxPostItTextItem Text SID_ATTR_POSTIT_TEXT, + SvxPostItTextItem Html SID_ATTR_POSTIT_HTML, + SvxPostItAuthorItem Author SID_ATTR_POSTIT_AUTHOR, + SvxPostItDateItem Date SID_ATTR_POSTIT_DATE) [ AutoUpdate = FALSE, FastCall = FALSE, @@ -7702,7 +7705,9 @@ SfxBoolItem SelectionModeDefault FN_SELECTION_MODE_DEFAULT ] SfxVoidItem ReplyComment FN_REPLY -(SvxPostItIdItem Id SID_ATTR_POSTIT_ID,SvxPostItTextItem Text SID_ATTR_POSTIT_TEXT) +(SvxPostItIdItem Id SID_ATTR_POSTIT_ID, + SvxPostItTextItem Text SID_ATTR_POSTIT_TEXT, + SvxPostItTextItem Html SID_ATTR_POSTIT_HTML) [ AutoUpdate = FALSE, FastCall = FALSE, diff --git a/sw/source/uibase/docvw/AnnotationWin.cxx b/sw/source/uibase/docvw/AnnotationWin.cxx index 75569fcd5cf3..41e5bac03dc5 100644 --- a/sw/source/uibase/docvw/AnnotationWin.cxx +++ b/sw/source/uibase/docvw/AnnotationWin.cxx @@ -484,6 +484,16 @@ void SwAnnotationWin::UpdateText(const OUString&
core.git: Branch 'libreoffice-24-8' - sw/source
sw/source/core/access/AccessibilityCheck.cxx |7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) New commits: commit e66f6f7765ba7855df65deea94ecb0aaefc8488a Author: Caolán McNamara AuthorDate: Thu Oct 3 15:14:05 2024 +0100 Commit: Xisco Fauli CommitDate: Fri Oct 4 09:29:40 2024 +0200 check for null DocShell before deref an effort to fix: https://crashreport.libreoffice.org/stats/signature/static%20void%20sw::%60anonymous%20namespace'::TextFormattingCheck::check(class%20SwNode%20*) Change-Id: I5adb0a1c244ec3372bd58e5a5493cbce80684ae1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174425 Reviewed-by: Xisco Fauli Tested-by: Jenkins (cherry picked from commit c5f4fe10589acff4d253cc3d32acaf67c7456bd7) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/17 diff --git a/sw/source/core/access/AccessibilityCheck.cxx b/sw/source/core/access/AccessibilityCheck.cxx index ff7a6b1b2d3c..df4a710ecf9c 100644 --- a/sw/source/core/access/AccessibilityCheck.cxx +++ b/sw/source/core/access/AccessibilityCheck.cxx @@ -1348,7 +1348,12 @@ public: return; SwTextNode* pTextNode = pCurrent->GetTextNode(); -SwWrtShell* pWrtShell = pTextNode->GetDoc().GetDocShell()->GetWrtShell(); + +SwDocShell* pDocShell = pTextNode->GetDoc().GetDocShell(); +if (!pDocShell) +return; + +SwWrtShell* pWrtShell = pDocShell->GetWrtShell(); if (pWrtShell && !pTextNode->getLayoutFrame(pWrtShell->GetLayout())) return;
core.git: Branch 'distro/collabora/co-24.04' - editeng/source
editeng/source/editeng/eehtml.cxx | 28 editeng/source/editeng/eehtml.hxx |1 + 2 files changed, 17 insertions(+), 12 deletions(-) New commits: commit d6b5d08041b68946f655524c43360f12a72c7185 Author: Caolán McNamara AuthorDate: Wed Oct 2 13:25:09 2024 +0100 Commit: Miklos Vajna CommitDate: Fri Oct 4 09:07:01 2024 +0200 Split out this html parsing hunk as a separate NewLine method Change-Id: I1fb034af2419306f96152ce6802d193d7a1560af Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174386 Tested-by: Jenkins CollaboraOffice Reviewed-by: Miklos Vajna diff --git a/editeng/source/editeng/eehtml.cxx b/editeng/source/editeng/eehtml.cxx index b3ed28395506..3db92d077694 100644 --- a/editeng/source/editeng/eehtml.cxx +++ b/editeng/source/editeng/eehtml.cxx @@ -95,6 +95,14 @@ SvParserState EditHTMLParser::CallParser(EditEngine* pEE, const EditPaM& rPaM) return _eState; } +void EditHTMLParser::Newline() +{ +bool bHasText = HasTextInCurrentPara(); +if ( bHasText ) +ImpInsertParaBreak(); +StartPara( false ); +} + void EditHTMLParser::NextToken( HtmlTokenId nToken ) { switch( nToken ) @@ -280,7 +288,8 @@ void EditHTMLParser::NextToken( HtmlTokenId nToken ) case HtmlTokenId::TABLEHEADER_ON: case HtmlTokenId::TABLEDATA_ON: nInCell++; -[[fallthrough]]; +Newline(); +break; case HtmlTokenId::BLOCKQUOTE_ON: case HtmlTokenId::BLOCKQUOTE_OFF: case HtmlTokenId::BLOCKQUOTE30_ON: @@ -291,28 +300,23 @@ void EditHTMLParser::NextToken( HtmlTokenId nToken ) case HtmlTokenId::DT_ON: case HtmlTokenId::ORDERLIST_ON: case HtmlTokenId::UNORDERLIST_ON: -{ -bool bHasText = HasTextInCurrentPara(); -if ( bHasText ) -ImpInsertParaBreak(); -StartPara( false ); -} +Newline(); break; case HtmlTokenId::TABLEHEADER_OFF: case HtmlTokenId::TABLEDATA_OFF: -{ if ( nInCell ) nInCell--; -[[fallthrough]]; -} +EndPara(); +break; case HtmlTokenId::LISTHEADER_OFF: case HtmlTokenId::LI_OFF: case HtmlTokenId::DD_OFF: case HtmlTokenId::DT_OFF: case HtmlTokenId::ORDERLIST_OFF: -case HtmlTokenId::UNORDERLIST_OFF: EndPara(); -break; +case HtmlTokenId::UNORDERLIST_OFF: +EndPara(); +break; case HtmlTokenId::TABLEROW_ON: case HtmlTokenId::TABLEROW_OFF: // A RETURN only after a CELL, for Calc diff --git a/editeng/source/editeng/eehtml.hxx b/editeng/source/editeng/eehtml.hxx index fddd567ac6ba..9f8009c715c8 100644 --- a/editeng/source/editeng/eehtml.hxx +++ b/editeng/source/editeng/eehtml.hxx @@ -53,6 +53,7 @@ private: sal_uInt8 nDefListLevel; voidStartPara( bool bReal ); +voidNewline(); voidEndPara(); voidAnchorStart(); voidAnchorEnd();
core.git: sw/source
sw/source/core/access/AccessibilityCheck.cxx |7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) New commits: commit c5f4fe10589acff4d253cc3d32acaf67c7456bd7 Author: Caolán McNamara AuthorDate: Thu Oct 3 15:14:05 2024 +0100 Commit: Xisco Fauli CommitDate: Thu Oct 3 23:37:51 2024 +0200 check for null DocShell before deref an effort to fix: https://crashreport.libreoffice.org/stats/signature/static%20void%20sw::%60anonymous%20namespace'::TextFormattingCheck::check(class%20SwNode%20*) Change-Id: I5adb0a1c244ec3372bd58e5a5493cbce80684ae1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174425 Reviewed-by: Xisco Fauli Tested-by: Jenkins diff --git a/sw/source/core/access/AccessibilityCheck.cxx b/sw/source/core/access/AccessibilityCheck.cxx index 04ef133f8e7e..2b6cce2107c8 100644 --- a/sw/source/core/access/AccessibilityCheck.cxx +++ b/sw/source/core/access/AccessibilityCheck.cxx @@ -1548,7 +1548,12 @@ public: return; SwTextNode* pTextNode = pCurrent->GetTextNode(); -SwWrtShell* pWrtShell = pTextNode->GetDoc().GetDocShell()->GetWrtShell(); + +SwDocShell* pDocShell = pTextNode->GetDoc().GetDocShell(); +if (!pDocShell) +return; + +SwWrtShell* pWrtShell = pDocShell->GetWrtShell(); if (pWrtShell && !pTextNode->getLayoutFrame(pWrtShell->GetLayout())) return;
core.git: sw/inc sw/source
sw/inc/swmodule.hxx |5 + sw/source/core/inc/txtfrm.hxx |3 ++- sw/source/core/text/inftxt.cxx|5 ++--- sw/source/core/text/txtfrm.cxx| 11 +-- sw/source/core/txtnode/swfont.cxx | 13 + sw/source/uibase/app/apphdl.cxx |2 +- sw/source/uibase/app/swmodule.cxx |1 + 7 files changed, 25 insertions(+), 15 deletions(-) New commits: commit 259624bc6883f9505a28355f046724ddcefdb951 Author: Caolán McNamara AuthorDate: Thu Oct 3 12:55:50 2024 +0100 Commit: Caolán McNamara CommitDate: Thu Oct 3 16:59:50 2024 +0200 We don't need to constantly fetch SvtCTLOptions::GetCTLTextNumerals we are already listening to SvtCTLOptions and triggering SwViewShell::ChgNumberDigits if it changes, so can just keep the initial value and update it at that point. Change-Id: I669aeb755506b9d703a7c638a82c03935779ce8d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174421 Tested-by: Jenkins Reviewed-by: Caolán McNamara diff --git a/sw/inc/swmodule.hxx b/sw/inc/swmodule.hxx index 9c3a7efa35db..334faf772738 100644 --- a/sw/inc/swmodule.hxx +++ b/sw/inc/swmodule.hxx @@ -25,6 +25,7 @@ #include #include +#include #include #include #include @@ -108,6 +109,8 @@ class SAL_DLLPUBLIC_RTTI SwModule final : public SfxModule, public SfxListener, css::uno::Reference< css::scanner::XScannerManager2 >m_xScannerManager; css::uno::Reference< css::linguistic2::XLanguageGuessing > m_xLanguageGuesser; +SvtCTLOptions::TextNumerals m_eCTLTextNumerals; + boolm_bAuthorInitialised : 1; boolm_bEmbeddedLoadSave : 1; @@ -183,6 +186,8 @@ public: bool IsEmbeddedLoadSave() const { return m_bEmbeddedLoadSave; } void SetEmbeddedLoadSave( bool bFlag ) { m_bEmbeddedLoadSave = bFlag; } +SvtCTLOptions::TextNumerals GetCTLTextNumerals() const { return m_eCTLTextNumerals; } + static void ShowDBObj( SwView const & rView, const SwDBData& rData); // Table modi. diff --git a/sw/source/core/inc/txtfrm.hxx b/sw/source/core/inc/txtfrm.hxx index 182809007213..eb0458a9022d 100644 --- a/sw/source/core/inc/txtfrm.hxx +++ b/sw/source/core/inc/txtfrm.hxx @@ -20,6 +20,7 @@ #define INCLUDED_SW_SOURCE_CORE_INC_TXTFRM_HXX #include +#include #include "cntfrm.hxx" #include "TextFrameIndex.hxx" #include @@ -981,7 +982,7 @@ class SwDigitModeModifier const OutputDevice& rOut; LanguageType nOldLanguageType; public: -SwDigitModeModifier( const OutputDevice& rOutp, LanguageType eCurLang ); +SwDigitModeModifier( const OutputDevice& rOutp, LanguageType eCurLang, SvtCTLOptions::TextNumerals eCTlTextNumerals ); ~SwDigitModeModifier(); }; diff --git a/sw/source/core/text/inftxt.cxx b/sw/source/core/text/inftxt.cxx index 8471cf8282d5..1d7bbaf42e18 100644 --- a/sw/source/core/text/inftxt.cxx +++ b/sw/source/core/text/inftxt.cxx @@ -1637,14 +1637,13 @@ void SwTextFormatInfo::CtorInitTextFormatInfo( OutputDevice* pRenderContext, SwT m_nLineNetHeight = 0; SetLineStart(TextFrameIndex(0)); -SvtCTLOptions::TextNumerals const nTextNumerals( -SvtCTLOptions::GetCTLTextNumerals()); +SvtCTLOptions::TextNumerals const nTextNumerals(SW_MOD()->GetCTLTextNumerals()); // cannot cache for NUMERALS_CONTEXT because we need to know the string // for the whole paragraph now if (nTextNumerals != SvtCTLOptions::NUMERALS_CONTEXT) { // set digit mode to what will be used later to get same results -SwDigitModeModifier const m(*m_pRef, LANGUAGE_NONE /*dummy*/); +SwDigitModeModifier const m(*m_pRef, LANGUAGE_NONE /*dummy*/, nTextNumerals); assert(m_pRef->GetDigitLanguage() != LANGUAGE_NONE); SetCachedVclData(OutputDevice::CreateTextLayoutCache(*m_pText)); } diff --git a/sw/source/core/text/txtfrm.cxx b/sw/source/core/text/txtfrm.cxx index ad813eddfc57..6f44e9268075 100644 --- a/sw/source/core/text/txtfrm.cxx +++ b/sw/source/core/text/txtfrm.cxx @@ -722,7 +722,8 @@ void SwLayoutModeModifier::SetAuto() const_cast(m_rOut).SetLayoutMode( nNewLayoutMode ); } -SwDigitModeModifier::SwDigitModeModifier( const OutputDevice& rOutp, LanguageType eCurLang ) : +SwDigitModeModifier::SwDigitModeModifier( const OutputDevice& rOutp, LanguageType eCurLang, + SvtCTLOptions::TextNumerals eCTLTextNumerals ) : rOut( rOutp ), nOldLanguageType( rOutp.GetDigitLanguage() ) { LanguageType eLang = eCurLang; @@ -730,13 +731,11 @@ SwDigitModeModifier::SwDigitModeModifier( const OutputDevice& rOutp, LanguageTyp eLang = LANGUAGE_ENGLISH_US; else { -const SvtCTLOptions::TextNumerals nTextNumerals = SvtCTLOptions::GetCTLTextNumerals(); - -if ( SvtCTLOptions::NUMERALS_HINDI == nTextNumerals ) +if ( SvtCTLOptions::NUMERALS_HINDI == eCTLTextNumerals ) eLang = LAN
core.git: Branch 'distro/collabora/co-24.04' - include/sal sw/source
include/sal/log-areas.dox |1 + sw/source/uibase/shells/textsh1.cxx |3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) New commits: commit 4baade36fe2a71b2030b1a1292310821e104 Author: Caolán McNamara AuthorDate: Wed Oct 2 08:37:28 2024 +0100 Commit: Caolán McNamara CommitDate: Thu Oct 3 10:48:30 2024 +0200 Log using LOK_WARN instead of std::cerr Change-Id: I3a3cabd90154cb7293949d6a21f599417c364b9b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174370 Tested-by: Jenkins CollaboraOffice Reviewed-by: Attila Szűcs diff --git a/include/sal/log-areas.dox b/include/sal/log-areas.dox index a2240a89a803..2ee98e7985b7 100644 --- a/include/sal/log-areas.dox +++ b/include/sal/log-areas.dox @@ -558,6 +558,7 @@ certain functionality. @li @c sw.qa @li @c sw.rtf - .rtf export filter @li @c sw.tiled +@li @c sw.transform - Transform documents API @li @c sw.ui @li @c sw.uno - Writer UNO interfaces @li @c sw.vba - Writer VBA diff --git a/sw/source/uibase/shells/textsh1.cxx b/sw/source/uibase/shells/textsh1.cxx index 1b86d294021f..870b14a3a8af 100644 --- a/sw/source/uibase/shells/textsh1.cxx +++ b/sw/source/uibase/shells/textsh1.cxx @@ -41,6 +41,7 @@ #include #include #include +#include #include #include #include @@ -809,7 +810,7 @@ void DeleteFields(SfxRequest& rReq, SwWrtShell& rWrtSh) void lcl_LogWarning(std::string sWarning) { -std::cerr << "Warning: " << sWarning << " "; +LOK_WARN("sw.transform", sWarning); } bool lcl_ChangeChartColumnCount(const uno::Reference& xChartDoc, sal_Int32 nId,
core.git: Branch 'distro/collabora/co-24.04' - desktop/source
desktop/source/lib/init.cxx |1 + 1 file changed, 1 insertion(+) New commits: commit d1ed24ba34d422128fd48184dbc3b344b5922d3a Author: Caolán McNamara AuthorDate: Tue Oct 1 16:58:21 2024 +0100 Commit: Miklos Vajna CommitDate: Wed Oct 2 16:19:47 2024 +0200 Get SolarMutex before calling ImplClearAllFontData to avoid: vcl/source/app/dbggui.cxx:35: void ImplDbgTestSolarMutex(): Assertion `ImplGetSVData()->mpDefInst->GetYieldMutex()->IsCurrentThread() && "SolarMutex not owned!"' failed. Change-Id: I6d56bb05e8a89190838c5437043bc61034607d8e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174356 Tested-by: Jenkins CollaboraOffice Reviewed-by: Miklos Vajna diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx index 156522e2d038..41891c139031 100644 --- a/desktop/source/lib/init.cxx +++ b/desktop/source/lib/init.cxx @@ -5297,6 +5297,7 @@ static void lo_setOption(LibreOfficeKit* /*pThis*/, const char *pOption, const c OUString sMagicFileName = "file:///:FD:/" + OUString::number(fd); +SolarMutexGuard aGuard; OutputDevice *pDevice = Application::GetDefaultDevice(); OutputDevice::ImplClearAllFontData(false); pDevice->AddTempDevFont(sMagicFileName, "");
core.git: desktop/source
desktop/source/lib/init.cxx |1 + 1 file changed, 1 insertion(+) New commits: commit 7f09dc4ba952854adfe0165efcca401436c8671e Author: Caolán McNamara AuthorDate: Tue Oct 1 16:58:21 2024 +0100 Commit: Caolán McNamara CommitDate: Wed Oct 2 16:10:00 2024 +0200 Get SolarMutex before calling ImplClearAllFontData to avoid: vcl/source/app/dbggui.cxx:35: void ImplDbgTestSolarMutex(): Assertion `ImplGetSVData()->mpDefInst->GetYieldMutex()->IsCurrentThread() && "SolarMutex not owned!"' failed. Change-Id: I6d56bb05e8a89190838c5437043bc61034607d8e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174328 Tested-by: Jenkins Reviewed-by: Caolán McNamara diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx index 043bc769450e..4bd1beda9abc 100644 --- a/desktop/source/lib/init.cxx +++ b/desktop/source/lib/init.cxx @@ -5265,6 +5265,7 @@ static void lo_setOption(LibreOfficeKit* /*pThis*/, const char *pOption, const c OUString sMagicFileName = "file:///:FD:/" + OUString::number(fd); +SolarMutexGuard aGuard; OutputDevice *pDevice = Application::GetDefaultDevice(); OutputDevice::ImplClearAllFontData(false); pDevice->AddTempDevFont(sMagicFileName, u""_ustr);
core.git: jvmfwk/source
jvmfwk/source/framework.cxx |2 ++ 1 file changed, 2 insertions(+) New commits: commit 0e23cabf2fd00f50e221f4eea7f19ceadc65fd54 Author: Caolán McNamara AuthorDate: Mon Sep 30 20:45:41 2024 +0100 Commit: Caolán McNamara CommitDate: Wed Oct 2 12:25:51 2024 +0200 cid#1606631 Overflowed constant Change-Id: I9ed28057b0435b78743303d1d6edea928598787b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174379 Tested-by: Jenkins Reviewed-by: Caolán McNamara diff --git a/jvmfwk/source/framework.cxx b/jvmfwk/source/framework.cxx index be10c0569a9e..eea9cc92c388 100644 --- a/jvmfwk/source/framework.cxx +++ b/jvmfwk/source/framework.cxx @@ -168,6 +168,8 @@ std::vector jfw_convertUserPathList(std::u16string_view sUserPath) } } result.emplace_back(sToken); +if (nextColon == std::u16string_view::npos) +break; nIdx = nextColon + 1; } while (nIdx > 0); return result;
core.git: connectivity/source
connectivity/source/drivers/dbase/dindexnode.cxx |9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) New commits: commit dba433c1ee35969d9adfef7462c97f07fe206c68 Author: Caolán McNamara AuthorDate: Mon Sep 30 20:40:06 2024 +0100 Commit: Caolán McNamara CommitDate: Wed Oct 2 12:25:31 2024 +0200 cid#1606791 Overflowed constant Change-Id: I540f58b42366a1053ca59c1d31cb44784dcd9ce1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174378 Reviewed-by: Caolán McNamara Tested-by: Jenkins diff --git a/connectivity/source/drivers/dbase/dindexnode.cxx b/connectivity/source/drivers/dbase/dindexnode.cxx index ba439d77bef4..0e4746a0b9a6 100644 --- a/connectivity/source/drivers/dbase/dindexnode.cxx +++ b/connectivity/source/drivers/dbase/dindexnode.cxx @@ -207,8 +207,13 @@ bool ONDXPage::Insert(ONDXNode& rNode, sal_uInt32 nRowsLeft) } else // position unknown { -sal_uInt16 nPos = NODE_NOTFOUND; -while (++nPos < nCount && rNode.GetKey() > ((*this)[nPos]).GetKey()) ; +sal_uInt16 nPos = 0; +while (nPos < nCount) +{ +if (rNode.GetKey() <= ((*this)[nPos]).GetKey()) +break; +++nPos; +} --nCount; // (otherwise we might get Assertions and GPFs - 60593) bResult = Insert(nPos, rNode);
core.git: Branch 'libreoffice-24-2' - vcl/source
vcl/source/window/event.cxx |3 +++ 1 file changed, 3 insertions(+) New commits: commit d7f677fb6a95c689ea5b95b1f6cd8a621d5c2403 Author: Caolán McNamara AuthorDate: Thu Sep 26 12:03:07 2024 +0100 Commit: Xisco Fauli CommitDate: Tue Oct 1 09:52:52 2024 +0200 null-deref seen in testing #2 0x00ac8c3e in std::__glibcxx_assert_fail(char const*, int, char const*, char const*) () #3 0x7fa92f2fa26f in std::unique_ptr >::operator* (this=) at /opt/rh/devtoolset-12/root/usr/include/c++/12/bits/unique_ptr.h:443 #4 std::unique_ptr >::operator* (this=) at /opt/rh/devtoolset-12/root/usr/include/c++/12/bits/unique_ptr.h:443 #5 vcl::Window::CallEventListeners (this=this@entry=0x34eb4f40, nEvent=nEvent@entry=VclEventId::ObjectDying, pData=pData@entry=0x0) at libreoffice/vcl/source/window/event.cxx:272 #6 0x7fa92f38277a in vcl::Window::dispose (this=0x34eb4f40) at libreoffice/vcl/source/window/window.cxx:159 #7 0x7fa92f678064 in VclPtr::disposeAndClear (this=) at libreoffice/include/rtl/ref.hxx:88 #8 ImplDestroyHelpWindow (rHelpData=..., bUpdateHideTime=) at libreoffice/vcl/source/app/help.cxx:576 #9 0x7fa92f6780f8 in ImplDestroyHelpWindow (bUpdateHideTime=) at libreoffice/vcl/source/app/help.cxx:565 #10 0x7fa92f679125 in ImplShowHelpWindow (pParent=0x334cfb90, nHelpWinStyle=, nStyle=QuickHelpFlags::NONE, rHelpText="Chart Area", rScreenPos=Point = {...}, rHelpArea=...) at libreoffice/vcl/source/app/help.cxx:532 #11 0x7fa92f679544 in Help::ShowQuickHelp (pParent=pParent@entry=0x334cfb90, rScreenRect=..., rHelpText="Chart Area", nStyle=nStyle@entry=QuickHelpFlags::NONE) at libreoffice/vcl/source/app/help.cxx:189 #12 0x7fa91ae862e0 in chart::ChartWindow::RequestHelp (this=0x334cfb90, rHEvt=...) at libreoffice/chart2/source/controller/main/ChartWindow.cxx:227 #13 0x7fa92e2e88a0 in (anonymous namespace)::LOKPostAsyncEvent (pEv=0x35b4a320) at libreoffice/sfx2/source/view/lokhelper.cxx:1103 #14 0x7fa92e2e076a in LokChartHelper::postMouseEvent (this=this@entry=0x7ffd226dd650, nType=nType@entry=2, nX=nX@entry=15405, nY=nY@entry=4089, nCount=nCount@entry=1, nButtons=nButtons@entry=0, nModifier=0, fScaleX=fScaleX@entry=0.10001, fScaleY=fScaleY@entry=0.10001) at libreoffice/sfx2/source/view/lokcharthelper.cxx:294 #15 0x7fa92e2e5b80 in SfxLokHelper::testInPlaceComponentMouseEventHit (pViewShell=pViewShell@entry=0x337e52a0, nType=nType@entry=2, nX=nX@entry=15405, nY=nY@entry=4089, nCount=nCount@entry=1, nButtons=nButtons@entry=0, nModifier=0, fScaleX=0.10001, fScaleY=0.10001, bNegativeX=false) at libreoffice/include/rtl/ref.hxx:69 #16 0x7fa91dba1e0e in ScModelObj::postMouseEvent (this=0x4593d10, nType=2, nX=15405, nY=4089, nCount=1, nButtons=0, nModifier=0) at libreoffice/sc/source/ui/unoobj/docuno.cxx:799 #17 0x7fa92e39567f in doc_postMouseEvent (pThis=0x334b8290, nType=2, nX=15405, nY=4089, nCount=1, nButtons=0, nModifier=0) at libreoffice/desktop/source/lib/init.cxx:5597 #18 0x00578631 in lok::Document::postMouseEvent (nModifier=0, nButtons=0, nCount=1, nY=, nX=, nType=, this=) at libreoffice/include/LibreOfficeKit/LibreOfficeKit.hxx:297 #19 ChildSession::mouseEvent (this=this@entry=0x317e3cf0, tokens=..., target=target@entry=LokEventTargetEnum::Document) at kit/ChildSession.cpp:1906 #20 0x00588485 in ChildSession::_handleInput (this=, buffer=, length=) at kit/ChildSession.cpp:634 Change-Id: Ic67c8b7c4553853d0ab36dd448642564b6b6fb69 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173922 Tested-by: Jenkins Reviewed-by: Caolán McNamara (cherry picked from commit 6f53881f444051898e6dce2cbc343057cb6fc6b9) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174022 Reviewed-by: Xisco Fauli (cherry picked from commit 406aaa37294657fa7476d9f74b4b244594bb7ca3) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174023 diff --git a/vcl/source/window/event.cxx b/vcl/source/window/event.cxx index 23d910112a74..de6772615453 100644 --- a/vcl/source/window/event.cxx +++ b/vcl/source/window/event.cxx @@ -269,6 +269,9 @@ void Window::CallEventListeners( VclEventId nEvent, void* pData ) if ( !bIgnoreDisposed && xWindow->isDisposed() ) return; +if (!xWindow->mpWindowImpl) +break; + auto& rWindowImpl = *xWindow->mpWindowImpl; if (!rWindowImpl.maChildEventListeners.empty()) {
core.git: 2 commits - editeng/source filter/source include/vcl sw/source vcl/inc vcl/source vcl/unx
editeng/source/misc/txtrange.cxx|2 +- filter/source/msfilter/escherex.cxx |2 +- include/vcl/weld.hxx|8 sw/source/uibase/inc/prcntfld.hxx |4 ++-- vcl/inc/salvtables.hxx |4 ++-- vcl/source/app/salvtables.cxx |4 ++-- vcl/source/window/builder.cxx |4 ++-- vcl/unx/gtk3/gtkinst.cxx|4 ++-- 8 files changed, 16 insertions(+), 16 deletions(-) New commits: commit ccbf0c4d6d2c8fffcc10d85b50ce6f47b565c72f Author: Caolán McNamara AuthorDate: Sat Sep 28 20:00:04 2024 +0100 Commit: Caolán McNamara CommitDate: Mon Sep 30 21:34:33 2024 +0200 cid#1607858 silence Overflowed constant and cid#1608350 Overflowed constant Change-Id: I63ad25445df936821c896628b95686a535ef52cf Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174209 Reviewed-by: Caolán McNamara Tested-by: Jenkins diff --git a/editeng/source/misc/txtrange.cxx b/editeng/source/misc/txtrange.cxx index 02e452209876..333abe2019df 100644 --- a/editeng/source/misc/txtrange.cxx +++ b/editeng/source/misc/txtrange.cxx @@ -456,7 +456,7 @@ void SvxBoundArgs::Add() nBoolIdx = nBoolIdx - next; nCount = nCount - next; aBoolArr.erase( aBoolArr.begin() + nBoolIdx, aBoolArr.begin() + (nBoolIdx + next) ); -if( nBoolIdx ) +if (nBoolIdx > 0) aBoolArr[ nBoolIdx - 1 ] = false; #if OSL_DEBUG_LEVEL > 1 else diff --git a/filter/source/msfilter/escherex.cxx b/filter/source/msfilter/escherex.cxx index d3be3f16906b..c0b854d5de48 100644 --- a/filter/source/msfilter/escherex.cxx +++ b/filter/source/msfilter/escherex.cxx @@ -2507,7 +2507,7 @@ static void ConvertEnhancedCustomShapeEquation( OSL_ENSURE(false, "Attempted out of bound access to rEquationOrder of CustomShape (!)"); } } -nMask <<= 1; +nMask = sal_uInt32(nMask << 1); } } } commit ab0eb26f6ab5d02dd9c44d0257a416068809ac08 Author: Caolán McNamara AuthorDate: Sat Sep 28 20:16:06 2024 +0100 Commit: Caolán McNamara CommitDate: Mon Sep 30 21:34:17 2024 +0200 cid#1608502 Overflowed constant and cid#1607222 Overflowed constant Change-Id: If145bae8d05470173d1af6e7f540f8f40d7ab8b5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174208 Reviewed-by: Caolán McNamara Tested-by: Jenkins diff --git a/include/vcl/weld.hxx b/include/vcl/weld.hxx index 49c92ebb290a..5988012528b0 100644 --- a/include/vcl/weld.hxx +++ b/include/vcl/weld.hxx @@ -1864,8 +1864,8 @@ public: get_range(dummy, max); return max; } -virtual void set_increments(int step, int page) = 0; -virtual void get_increments(int& step, int& page) const = 0; +virtual void set_increments(sal_Int64 step, sal_Int64 page) = 0; +virtual void get_increments(sal_Int64& step, sal_Int64& page) const = 0; virtual void set_digits(unsigned int digits) = 0; virtual unsigned int get_digits() const = 0; @@ -2137,14 +2137,14 @@ public: return max; } -void set_increments(int step, int page, FieldUnit eValueUnit) +void set_increments(sal_Int64 step, sal_Int64 page, FieldUnit eValueUnit) { step = convert_value_from(step, eValueUnit); page = convert_value_from(page, eValueUnit); m_xSpinButton->set_increments(step, page); } -void get_increments(int& step, int& page, FieldUnit eDestUnit) const +void get_increments(sal_Int64& step, sal_Int64& page, FieldUnit eDestUnit) const { m_xSpinButton->get_increments(step, page); step = convert_value_to(step, eDestUnit); diff --git a/sw/source/uibase/inc/prcntfld.hxx b/sw/source/uibase/inc/prcntfld.hxx index d8393d3097be..3b4775e6a524 100644 --- a/sw/source/uibase/inc/prcntfld.hxx +++ b/sw/source/uibase/inc/prcntfld.hxx @@ -30,8 +30,8 @@ class SW_DLLPUBLIC SwPercentField sal_Int64 m_nRefValue; // 100% value for conversion (in Twips) sal_Int64 m_nOldMax; sal_Int64 m_nOldMin; -int m_nOldSpinSize; -int m_nOldPageSize; +sal_Int64 m_nOldSpinSize; +sal_Int64 m_nOldPageSize; sal_Int64 m_nLastPercent; sal_Int64 m_nLastValue; sal_uInt16 m_nOldDigits; diff --git a/vcl/inc/salvtables.hxx b/vcl/inc/salvtables.hxx index f57ecc9395e3..01da5ed831f6 100644 --- a/vcl/inc/salvtables.hxx +++ b/vcl/inc/salvtables.hxx @@ -709,9 +709,9 @@ public: virtual void get_range(sal_Int64& min, sal_Int64& max) const override; -virtual void set_increments(int step, int /*page*/) override; +virtual void set_increments(sal_Int64 step, sal_Int64 /*page*/) override; -virtual void get_increments(int& step, int& page) const override; +virtual void get_increments(sal_Int64& step, sal_Int64& page) const override; virtual void set_digits(unsigned int digit
core.git: 2 commits - filter/source forms/source
filter/source/config/cache/basecontainer.cxx |4 forms/source/component/EventThread.cxx |4 ++-- 2 files changed, 2 insertions(+), 6 deletions(-) New commits: commit 989bee48c2e06abc32fcf045d762c68fdfb34e87 Author: Caolán McNamara AuthorDate: Sat Sep 28 19:56:51 2024 +0100 Commit: Caolán McNamara CommitDate: Mon Sep 30 21:34:10 2024 +0200 cid#1608448 Data race condition drop mutex, only allowed to be called from ctor Change-Id: I1878cf368caacafdcee96a7112a6cc768ce87520 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174207 Reviewed-by: Caolán McNamara Tested-by: Jenkins diff --git a/filter/source/config/cache/basecontainer.cxx b/filter/source/config/cache/basecontainer.cxx index d81ad858dfbf..85e23378361c 100644 --- a/filter/source/config/cache/basecontainer.cxx +++ b/filter/source/config/cache/basecontainer.cxx @@ -45,13 +45,9 @@ void BaseContainer::init(const OUString& const css::uno::Sequence< OUString >& lServiceNames , FilterCache::EItemType eType ) { -// SAFE -> -std::unique_lock aLock(m_aMutex); - m_sImplementationName = sImplementationName; m_lServiceNames = lServiceNames ; m_eType = eType ; -// <- SAFE } commit 73db214e2f4f15c068d4e946ab0face6d0420199 Author: Caolán McNamara AuthorDate: Sat Sep 28 20:03:42 2024 +0100 Commit: Caolán McNamara CommitDate: Mon Sep 30 21:33:58 2024 +0200 cid#1606905 Data race condition Change-Id: I138cc2ef0f30ae4dcb0d86ada3a62507efc22340 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174206 Reviewed-by: Caolán McNamara Tested-by: Jenkins diff --git a/forms/source/component/EventThread.cxx b/forms/source/component/EventThread.cxx index 2d5336fe384b..62b0af091c8f 100644 --- a/forms/source/component/EventThread.cxx +++ b/forms/source/component/EventThread.cxx @@ -76,11 +76,11 @@ void OComponentEventThread::impl_clearEventQueue() void OComponentEventThread::disposing( const EventObject& evt ) { +std::unique_lock aGuard( m_aMutex ); + if( evt.Source != static_cast(m_xComp.get()) ) return; -std::unique_lock aGuard( m_aMutex ); - // Remove EventListener Reference xEvtLstnr = static_cast(this); m_xComp->removeEventListener( xEvtLstnr );
core.git: Branch 'libreoffice-24-8' - vcl/source
vcl/source/window/event.cxx |3 +++ 1 file changed, 3 insertions(+) New commits: commit 406aaa37294657fa7476d9f74b4b244594bb7ca3 Author: Caolán McNamara AuthorDate: Thu Sep 26 12:03:07 2024 +0100 Commit: Xisco Fauli CommitDate: Mon Sep 30 12:37:58 2024 +0200 null-deref seen in testing #2 0x00ac8c3e in std::__glibcxx_assert_fail(char const*, int, char const*, char const*) () #3 0x7fa92f2fa26f in std::unique_ptr >::operator* (this=) at /opt/rh/devtoolset-12/root/usr/include/c++/12/bits/unique_ptr.h:443 #4 std::unique_ptr >::operator* (this=) at /opt/rh/devtoolset-12/root/usr/include/c++/12/bits/unique_ptr.h:443 #5 vcl::Window::CallEventListeners (this=this@entry=0x34eb4f40, nEvent=nEvent@entry=VclEventId::ObjectDying, pData=pData@entry=0x0) at libreoffice/vcl/source/window/event.cxx:272 #6 0x7fa92f38277a in vcl::Window::dispose (this=0x34eb4f40) at libreoffice/vcl/source/window/window.cxx:159 #7 0x7fa92f678064 in VclPtr::disposeAndClear (this=) at libreoffice/include/rtl/ref.hxx:88 #8 ImplDestroyHelpWindow (rHelpData=..., bUpdateHideTime=) at libreoffice/vcl/source/app/help.cxx:576 #9 0x7fa92f6780f8 in ImplDestroyHelpWindow (bUpdateHideTime=) at libreoffice/vcl/source/app/help.cxx:565 #10 0x7fa92f679125 in ImplShowHelpWindow (pParent=0x334cfb90, nHelpWinStyle=, nStyle=QuickHelpFlags::NONE, rHelpText="Chart Area", rScreenPos=Point = {...}, rHelpArea=...) at libreoffice/vcl/source/app/help.cxx:532 #11 0x7fa92f679544 in Help::ShowQuickHelp (pParent=pParent@entry=0x334cfb90, rScreenRect=..., rHelpText="Chart Area", nStyle=nStyle@entry=QuickHelpFlags::NONE) at libreoffice/vcl/source/app/help.cxx:189 #12 0x7fa91ae862e0 in chart::ChartWindow::RequestHelp (this=0x334cfb90, rHEvt=...) at libreoffice/chart2/source/controller/main/ChartWindow.cxx:227 #13 0x7fa92e2e88a0 in (anonymous namespace)::LOKPostAsyncEvent (pEv=0x35b4a320) at libreoffice/sfx2/source/view/lokhelper.cxx:1103 #14 0x7fa92e2e076a in LokChartHelper::postMouseEvent (this=this@entry=0x7ffd226dd650, nType=nType@entry=2, nX=nX@entry=15405, nY=nY@entry=4089, nCount=nCount@entry=1, nButtons=nButtons@entry=0, nModifier=0, fScaleX=fScaleX@entry=0.10001, fScaleY=fScaleY@entry=0.10001) at libreoffice/sfx2/source/view/lokcharthelper.cxx:294 #15 0x7fa92e2e5b80 in SfxLokHelper::testInPlaceComponentMouseEventHit (pViewShell=pViewShell@entry=0x337e52a0, nType=nType@entry=2, nX=nX@entry=15405, nY=nY@entry=4089, nCount=nCount@entry=1, nButtons=nButtons@entry=0, nModifier=0, fScaleX=0.10001, fScaleY=0.10001, bNegativeX=false) at libreoffice/include/rtl/ref.hxx:69 #16 0x7fa91dba1e0e in ScModelObj::postMouseEvent (this=0x4593d10, nType=2, nX=15405, nY=4089, nCount=1, nButtons=0, nModifier=0) at libreoffice/sc/source/ui/unoobj/docuno.cxx:799 #17 0x7fa92e39567f in doc_postMouseEvent (pThis=0x334b8290, nType=2, nX=15405, nY=4089, nCount=1, nButtons=0, nModifier=0) at libreoffice/desktop/source/lib/init.cxx:5597 #18 0x00578631 in lok::Document::postMouseEvent (nModifier=0, nButtons=0, nCount=1, nY=, nX=, nType=, this=) at libreoffice/include/LibreOfficeKit/LibreOfficeKit.hxx:297 #19 ChildSession::mouseEvent (this=this@entry=0x317e3cf0, tokens=..., target=target@entry=LokEventTargetEnum::Document) at kit/ChildSession.cpp:1906 #20 0x00588485 in ChildSession::_handleInput (this=, buffer=, length=) at kit/ChildSession.cpp:634 Change-Id: Ic67c8b7c4553853d0ab36dd448642564b6b6fb69 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173922 Tested-by: Jenkins Reviewed-by: Caolán McNamara (cherry picked from commit 6f53881f444051898e6dce2cbc343057cb6fc6b9) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174022 Reviewed-by: Xisco Fauli diff --git a/vcl/source/window/event.cxx b/vcl/source/window/event.cxx index 23d910112a74..de6772615453 100644 --- a/vcl/source/window/event.cxx +++ b/vcl/source/window/event.cxx @@ -269,6 +269,9 @@ void Window::CallEventListeners( VclEventId nEvent, void* pData ) if ( !bIgnoreDisposed && xWindow->isDisposed() ) return; +if (!xWindow->mpWindowImpl) +break; + auto& rWindowImpl = *xWindow->mpWindowImpl; if (!rWindowImpl.maChildEventListeners.empty()) {
core.git: Branch 'libreoffice-24-8' - unoxml/source
unoxml/source/dom/documentbuilder.cxx | 17 + unoxml/source/dom/documentbuilder.hxx |8 +--- 2 files changed, 14 insertions(+), 11 deletions(-) New commits: commit 9389e0c6397d258e579bd0cdddafae0c4140da5d Author: Caolán McNamara AuthorDate: Fri Sep 27 21:27:10 2024 +0100 Commit: Michael Stahl CommitDate: Mon Sep 30 12:27:25 2024 +0200 cid#1557088 Data race condition since: commit d181d8acbf49e2fe87c8cf53a9431e503ccced55 CommitDate: Fri Aug 25 12:44:33 2017 +0200 tdf#84237 use XErrorHandler in CDocumentBuilder Change-Id: Iac1d2b88f2910298d30de4d12798bb38c36a0de9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174102 Tested-by: Jenkins Reviewed-by: Caolán McNamara (cherry picked from commit 8e02696b32588e3a1eca3885450873f62213244e) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174021 Reviewed-by: Michael Stahl diff --git a/unoxml/source/dom/documentbuilder.cxx b/unoxml/source/dom/documentbuilder.cxx index 46232463497d..f08769492974 100644 --- a/unoxml/source/dom/documentbuilder.cxx +++ b/unoxml/source/dom/documentbuilder.cxx @@ -254,14 +254,15 @@ namespace DOM CDocumentBuilder * const pDocBuilder = static_cast(pctx->_private); -if (pDocBuilder->getErrorHandler().is()) // if custom error handler is set (using setErrorHandler ()) +Reference xErrorHandler = pDocBuilder->getErrorHandler(); +if (xErrorHandler.is()) // if custom error handler is set (using setErrorHandler ()) { // Prepare SAXParseException to be passed to custom XErrorHandler::warning function css::xml::sax::SAXParseException saxex(make_error_message(pctx), {}, {}, {}, {}, pctx->lastError.line, pctx->lastError.int2); // Call custom warning function - pDocBuilder->getErrorHandler()->warning(::css::uno::Any(saxex)); +xErrorHandler->warning(::css::uno::Any(saxex)); } } catch (const css::uno::Exception &) @@ -284,14 +285,15 @@ namespace DOM CDocumentBuilder * const pDocBuilder = static_cast(pctx->_private); -if (pDocBuilder->getErrorHandler().is()) // if custom error handler is set (using setErrorHandler ()) +Reference xErrorHandler = pDocBuilder->getErrorHandler(); +if (xErrorHandler.is()) // if custom error handler is set (using setErrorHandler ()) { // Prepare SAXParseException to be passed to custom XErrorHandler::error function css::xml::sax::SAXParseException saxex(make_error_message(pctx), {}, {}, {}, {}, pctx->lastError.line, pctx->lastError.int2); // Call custom warning function -pDocBuilder->getErrorHandler()->error(::css::uno::Any(saxex)); +xErrorHandler->error(::css::uno::Any(saxex)); } } catch (const css::uno::Exception &) @@ -412,6 +414,13 @@ namespace DOM m_xErrorHandler = xEH; } + +Reference< XErrorHandler > CDocumentBuilder::getErrorHandler() +{ +std::scoped_lock const g(m_Mutex); + +return m_xErrorHandler; +} } extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface* diff --git a/unoxml/source/dom/documentbuilder.hxx b/unoxml/source/dom/documentbuilder.hxx index 7b93b170d4c1..c63a8970d289 100644 --- a/unoxml/source/dom/documentbuilder.hxx +++ b/unoxml/source/dom/documentbuilder.hxx @@ -104,7 +104,6 @@ namespace DOM /// @throws css::uno::RuntimeException css::uno::Reference< css::xml::sax::XEntityResolver > getEntityResolver(); - /** Specify the ErrorHandler to be used to report errors present in the XML document to be parsed. @@ -115,12 +114,7 @@ namespace DOM Get the ErrorHandler to be used to report errors present in the XML document to be parsed. */ - -const css::uno::Reference< css::xml::sax::XErrorHandler >& getErrorHandler() const -{ -return m_xErrorHandler; -} - +css::uno::Reference< css::xml::sax::XErrorHandler > getErrorHandler(); }; }
core.git: filter/source
filter/source/config/cache/basecontainer.hxx |9 - 1 file changed, 4 insertions(+), 5 deletions(-) New commits: commit b01d057df75096792c53ba7f7a80c3db5afb1ba5 Author: Caolán McNamara AuthorDate: Sat Sep 28 19:54:50 2024 +0100 Commit: Caolán McNamara CommitDate: Sat Sep 28 22:01:20 2024 +0200 This can be protected instead of public Change-Id: I8389173bd155d7334445b991754e54c7641e63e5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174155 Reviewed-by: Caolán McNamara Tested-by: Jenkins diff --git a/filter/source/config/cache/basecontainer.hxx b/filter/source/config/cache/basecontainer.hxx index f1f63b10bc42..f27d027a8ad4 100644 --- a/filter/source/config/cache/basecontainer.hxx +++ b/filter/source/config/cache/basecontainer.hxx @@ -118,6 +118,10 @@ class BaseContainer : public ::cppu::WeakImplHelper< css::lang::XServiceInfo virtual ~BaseContainer() override; +// helper + +protected: + /** @short initialize this generic instance with some specialized values from our derived object. @@ -147,11 +151,6 @@ class BaseContainer : public ::cppu::WeakImplHelper< css::lang::XServiceInfo FilterCache::EItemType eType ); -// helper - -protected: - - /** @short check if the underlying configuration data was already loaded and do it if necessary automatically. */
core.git: 2 commits - connectivity/source wizards/com
connectivity/source/drivers/dbase/dindexnode.cxx | 22 +- wizards/com/sun/star/wizards/report/DBColumn.java |7 ++- wizards/com/sun/star/wizards/report/ReportTextDocument.java |2 wizards/com/sun/star/wizards/report/ReportTextImplementation.java |2 4 files changed, 19 insertions(+), 14 deletions(-) New commits: commit d8d4efbe1faf6e3a4a048ab4bb8f23516ce13268 Author: Caolán McNamara AuthorDate: Sat Sep 28 11:22:38 2024 +0100 Commit: Caolán McNamara CommitDate: Sat Sep 28 20:22:40 2024 +0200 cid#1607041 PA: Public Attribute Change-Id: I8ec74e943232f98c861e035c0da11e8d75f8fa29 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174106 Tested-by: Jenkins Reviewed-by: Caolán McNamara diff --git a/wizards/com/sun/star/wizards/report/DBColumn.java b/wizards/com/sun/star/wizards/report/DBColumn.java index 35bd99429a9a..d993ded1b1b0 100644 --- a/wizards/com/sun/star/wizards/report/DBColumn.java +++ b/wizards/com/sun/star/wizards/report/DBColumn.java @@ -46,7 +46,7 @@ public class DBColumn private XCell xValCell; private XTextRange xValTextCell; private XTextCursor xValCellCursor; -public XCell xNameCell; +private XCell xNameCell; private XTextRange xNameTextCell; private boolean bAlignLeft; private String CharFontName; @@ -183,6 +183,11 @@ public class DBColumn } } +public XCell getNameCell() +{ +return xNameCell; +} + private void getTableColumns(String TableName) { try diff --git a/wizards/com/sun/star/wizards/report/ReportTextDocument.java b/wizards/com/sun/star/wizards/report/ReportTextDocument.java index 52d8e6d2ae96..8e1e325b874d 100644 --- a/wizards/com/sun/star/wizards/report/ReportTextDocument.java +++ b/wizards/com/sun/star/wizards/report/ReportTextDocument.java @@ -448,7 +448,7 @@ class ReportTextDocument extends com.sun.star.wizards.text.TextDocument implemen } CurDBColumn = new DBColumn(CurRecordTable, oTextTableHandler, CurDBMetaData, i - CurDBMetaData.getGroupFieldNames().length); } -if (CurDBColumn.xNameCell != null) +if (CurDBColumn.getNameCell() != null) { DBColumnsVector.add(CurDBColumn); } diff --git a/wizards/com/sun/star/wizards/report/ReportTextImplementation.java b/wizards/com/sun/star/wizards/report/ReportTextImplementation.java index 9f8e77cd05ce..ead591e5e352 100644 --- a/wizards/com/sun/star/wizards/report/ReportTextImplementation.java +++ b/wizards/com/sun/star/wizards/report/ReportTextImplementation.java @@ -436,7 +436,7 @@ public class ReportTextImplementation extends ReportImplementationHelper impleme for (int i = 0; i < iCount; i++) { CurDBColumn = getDoc().DBColumnsVector.get(i); -xNameCellCursor = ReportTextDocument.createTextCursor(CurDBColumn.xNameCell); +xNameCellCursor = ReportTextDocument.createTextCursor(CurDBColumn.getNameCell()); xNameCellCursor.gotoStart(false); FieldContent = getDoc().oTextFieldHandler.getUserFieldContent(xNameCellCursor); if (!FieldContent.equals(PropertyNames.EMPTY_STRING)) commit 645ae19dfc1645cd49df620cc62857f399974e99 Author: Caolán McNamara AuthorDate: Thu Sep 26 08:56:35 2024 +0100 Commit: Caolán McNamara CommitDate: Sat Sep 28 20:22:30 2024 +0200 cid#1606705 Overflowed constant and cid#1607841 Overflowed constant Change-Id: Ia84d2c0d29e485379fe6338a784306bc8ff5343b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174105 Tested-by: Jenkins Reviewed-by: Caolán McNamara diff --git a/connectivity/source/drivers/dbase/dindexnode.cxx b/connectivity/source/drivers/dbase/dindexnode.cxx index 6857679c98f1..ba439d77bef4 100644 --- a/connectivity/source/drivers/dbase/dindexnode.cxx +++ b/connectivity/source/drivers/dbase/dindexnode.cxx @@ -969,28 +969,28 @@ bool ONDXPage::IsFull() const return Count() == rIndex.getHeader().db_maxkeys; } - sal_uInt16 ONDXPage::Search(const ONDXKey& rSearch) { // binary search later -sal_uInt16 i = NODE_NOTFOUND; -while (++i < Count()) -if ((*this)[i].GetKey() == rSearch) -break; +for (sal_uInt16 i = 0, nSize = Count(); i < nSize; ++i) +{ +if (((*this)[i]).GetKey() == rSearch) +return i; +} -return (i < Count()) ? i : NODE_NOTFOUND; +return NODE_NOTFOUND; } - sal_uInt16 ONDXPage::Search(const ONDXPage* pPage) { -sal_uInt16 i = NODE_NOTFOUND; -while (++i < Count()) +for (sal_uInt16 i = 0, nSize = Count(); i < nSize; ++i) +{ if (((*this)[i]).GetChild() == pPage) -break; +return i; +} // if not found, then we assume, that the page itself points to the page -return (i < Count())
core.git: sw/source
sw/source/filter/ww8/wrtw8sty.cxx |6 -- 1 file changed, 4 insertions(+), 2 deletions(-) New commits: commit 8536bb07ac92ecf5a4046d5bacd968c4f8ed5763 Author: Caolán McNamara AuthorDate: Fri Sep 27 19:27:34 2024 +0100 Commit: Caolán McNamara CommitDate: Sat Sep 28 20:22:07 2024 +0200 cid#1607672 silence Overflowed constant Change-Id: I8f66304c961d78c9f8745c68f2e7c6a3d8283586 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174104 Tested-by: Jenkins Reviewed-by: Caolán McNamara diff --git a/sw/source/filter/ww8/wrtw8sty.cxx b/sw/source/filter/ww8/wrtw8sty.cxx index ff7d30bd84dc..c5868b517211 100644 --- a/sw/source/filter/ww8/wrtw8sty.cxx +++ b/sw/source/filter/ww8/wrtw8sty.cxx @@ -219,7 +219,7 @@ sal_uInt16 MSWordStyles::GetSlot( const SwFormat* pFormat ) const /// Get reserved slot number during building the style table. static sal_uInt16 BuildGetSlot(const SwFormat& rFormat) { -switch (sal_uInt16 nRet = rFormat.GetPoolFormatId()) +switch (sal_uInt16 nId = rFormat.GetPoolFormatId()) { case RES_POOLCOLL_STANDARD: return 0; @@ -233,9 +233,11 @@ static sal_uInt16 BuildGetSlot(const SwFormat& rFormat) case RES_POOLCOLL_HEADLINE7: case RES_POOLCOLL_HEADLINE8: case RES_POOLCOLL_HEADLINE9: -nRet -= RES_POOLCOLL_HEADLINE1-1; +{ +sal_uInt16 nRet = nId - (RES_POOLCOLL_HEADLINE1 - 1); assert(nRet < WW8_RESERVED_SLOTS); return nRet; +} } return 0xfff; }
core.git: sw/source
sw/source/core/unocore/unochart.cxx |3 --- 1 file changed, 3 deletions(-) New commits: commit 33c4af119d9e6370316727a5b2271f80e4eef1fb Author: Caolán McNamara AuthorDate: Fri Sep 27 20:57:53 2024 +0100 Commit: Caolán McNamara CommitDate: Sat Sep 28 20:21:32 2024 +0200 cid#1608030 Check of thread-shared field evades lock acquisition and cid#1608103 Check of thread-shared field evades lock acquisition Change-Id: Ifb3191512434f4938f02bfa1a1b6ed038b3e555e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174103 Tested-by: Jenkins Reviewed-by: Caolán McNamara diff --git a/sw/source/core/unocore/unochart.cxx b/sw/source/core/unocore/unochart.cxx index bd7c95880c50..10c79c82cd10 100644 --- a/sw/source/core/unocore/unochart.cxx +++ b/sw/source/core/unocore/unochart.cxx @@ -2215,7 +2215,6 @@ void SAL_CALL SwChartDataSequence::dispose( ) if (!bMustDispose) return; -m_bDisposed = true; if (m_xDataProvider.is()) { const SwTable* pTable = SwTable::FindTable( GetFrameFormat() ); @@ -2664,8 +2663,6 @@ void SAL_CALL SwChartLabeledDataSequence::dispose( ) if (!bMustDispose) return; -m_bDisposed = true; - // require listeners to release references to this object lang::EventObject aEvtObj( static_cast< chart2::data::XLabeledDataSequence * >(this) ); std::unique_lock aGuard( GetChartMutex() );
core.git: 2 commits - sc/source unoxml/source
sc/source/ui/inc/duplicaterecordsdlg.hxx |6 ++ unoxml/source/dom/documentbuilder.cxx| 17 + unoxml/source/dom/documentbuilder.hxx|8 +--- 3 files changed, 20 insertions(+), 11 deletions(-) New commits: commit 8e02696b32588e3a1eca3885450873f62213244e Author: Caolán McNamara AuthorDate: Fri Sep 27 21:27:10 2024 +0100 Commit: Caolán McNamara CommitDate: Sat Sep 28 20:21:02 2024 +0200 cid#1557088 Data race condition since: commit d181d8acbf49e2fe87c8cf53a9431e503ccced55 CommitDate: Fri Aug 25 12:44:33 2017 +0200 tdf#84237 use XErrorHandler in CDocumentBuilder Change-Id: Iac1d2b88f2910298d30de4d12798bb38c36a0de9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174102 Tested-by: Jenkins Reviewed-by: Caolán McNamara diff --git a/unoxml/source/dom/documentbuilder.cxx b/unoxml/source/dom/documentbuilder.cxx index 3be49adcd899..d24b1d7364f7 100644 --- a/unoxml/source/dom/documentbuilder.cxx +++ b/unoxml/source/dom/documentbuilder.cxx @@ -254,14 +254,15 @@ namespace DOM CDocumentBuilder * const pDocBuilder = static_cast(pctx->_private); -if (pDocBuilder->getErrorHandler().is()) // if custom error handler is set (using setErrorHandler ()) +Reference xErrorHandler = pDocBuilder->getErrorHandler(); +if (xErrorHandler.is()) // if custom error handler is set (using setErrorHandler ()) { // Prepare SAXParseException to be passed to custom XErrorHandler::warning function css::xml::sax::SAXParseException saxex(make_error_message(pctx), {}, {}, {}, {}, pctx->lastError.line, pctx->lastError.int2); // Call custom warning function - pDocBuilder->getErrorHandler()->warning(::css::uno::Any(saxex)); +xErrorHandler->warning(::css::uno::Any(saxex)); } } catch (const css::uno::Exception &) @@ -284,14 +285,15 @@ namespace DOM CDocumentBuilder * const pDocBuilder = static_cast(pctx->_private); -if (pDocBuilder->getErrorHandler().is()) // if custom error handler is set (using setErrorHandler ()) +Reference xErrorHandler = pDocBuilder->getErrorHandler(); +if (xErrorHandler.is()) // if custom error handler is set (using setErrorHandler ()) { // Prepare SAXParseException to be passed to custom XErrorHandler::error function css::xml::sax::SAXParseException saxex(make_error_message(pctx), {}, {}, {}, {}, pctx->lastError.line, pctx->lastError.int2); // Call custom warning function -pDocBuilder->getErrorHandler()->error(::css::uno::Any(saxex)); +xErrorHandler->error(::css::uno::Any(saxex)); } } catch (const css::uno::Exception &) @@ -412,6 +414,13 @@ namespace DOM m_xErrorHandler = xEH; } + +Reference< XErrorHandler > CDocumentBuilder::getErrorHandler() +{ +std::scoped_lock const g(m_Mutex); + +return m_xErrorHandler; +} } extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface* diff --git a/unoxml/source/dom/documentbuilder.hxx b/unoxml/source/dom/documentbuilder.hxx index 7b93b170d4c1..c63a8970d289 100644 --- a/unoxml/source/dom/documentbuilder.hxx +++ b/unoxml/source/dom/documentbuilder.hxx @@ -104,7 +104,6 @@ namespace DOM /// @throws css::uno::RuntimeException css::uno::Reference< css::xml::sax::XEntityResolver > getEntityResolver(); - /** Specify the ErrorHandler to be used to report errors present in the XML document to be parsed. @@ -115,12 +114,7 @@ namespace DOM Get the ErrorHandler to be used to report errors present in the XML document to be parsed. */ - -const css::uno::Reference< css::xml::sax::XErrorHandler >& getErrorHandler() const -{ -return m_xErrorHandler; -} - +css::uno::Reference< css::xml::sax::XErrorHandler > getErrorHandler(); }; } commit 9bd20c306e3a7d049b656a96e5eef9c65a8e7994 Author: Caolán McNamara AuthorDate: Sat Sep 28 10:36:50 2024 +0100 Commit: Caolán McNamara CommitDate: Sat Sep 28 20:20:52 2024 +0200 cid#1620316 Uninitialized scalar variable Change-Id: I3ef7f30dc2045b0386bd7f14c0e9be34f7e67726 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174101 Reviewed-by: Caolán McNamara Tested-by: Jenkins diff --git a/sc/source/ui/inc/duplicaterecordsdlg.hxx b/sc/source/ui/inc/duplicaterecordsdlg.hxx index aaa253af7348..07a9f64a992b 100644 --- a/sc/source/ui/inc/duplicaterecordsdlg.hxx +++ b/sc/source/ui/inc/duplicaterecordsdlg.hxx @@ -30,6 +30,12 @@ struct DuplicatesResponse bool bRemove; //
core.git: ucb/source
ucb/source/ucp/tdoc/tdoc_stgelems.cxx |8 ucb/source/ucp/tdoc/tdoc_stgelems.hxx |4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) New commits: commit 247aeeebc9add39e13b05ac9a7dbc852633b5d92 Author: Caolán McNamara AuthorDate: Fri Sep 27 21:08:50 2024 +0100 Commit: Caolán McNamara CommitDate: Sat Sep 28 11:37:13 2024 +0200 setParentStorage is always called with an empty reference Change-Id: I973811b3e8aa41bc331362a96a7cb519aec363a3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174068 Tested-by: Jenkins Reviewed-by: Caolán McNamara diff --git a/ucb/source/ucp/tdoc/tdoc_stgelems.cxx b/ucb/source/ucp/tdoc/tdoc_stgelems.cxx index dff9bf590902..e1eda21a2b7f 100644 --- a/ucb/source/ucp/tdoc/tdoc_stgelems.cxx +++ b/ucb/source/ucp/tdoc/tdoc_stgelems.cxx @@ -574,7 +574,7 @@ OutputStream::closeOutput( ) // Release parent storage. // Now, that the stream is closed/disposed it is not needed any longer. -setParentStorage( uno::Reference< embed::XStorage >() ); +clearParentStorage(); } @@ -589,7 +589,7 @@ OutputStream::dispose() // Release parent storage. // Now, that the stream is closed/disposed it is not needed any longer. -setParentStorage( uno::Reference< embed::XStorage >() ); +clearParentStorage(); } @@ -768,7 +768,7 @@ void SAL_CALL Stream::closeOutput() // Release parent storage. // Now, that the stream is closed/disposed it is not needed any longer. -setParentStorage( uno::Reference< embed::XStorage >() ); +clearParentStorage(); } @@ -836,7 +836,7 @@ void SAL_CALL Stream::dispose() // Release parent storage. // Now, that the stream is closed/disposed it is not needed any longer. -setParentStorage( uno::Reference< embed::XStorage >() ); +clearParentStorage(); } diff --git a/ucb/source/ucp/tdoc/tdoc_stgelems.hxx b/ucb/source/ucp/tdoc/tdoc_stgelems.hxx index 6229923f226c..40dd7f723705 100644 --- a/ucb/source/ucp/tdoc/tdoc_stgelems.hxx +++ b/ucb/source/ucp/tdoc/tdoc_stgelems.hxx @@ -51,10 +51,10 @@ public: const css::uno::Reference< css::embed::XStorage >& getParentStorage() const { return m_xParentStorage; } -void setParentStorage( const css::uno::Reference< css::embed::XStorage > & xStg ) +void clearParentStorage() { std::scoped_lock aGuard( m_aMutex ); -m_xParentStorage = xStg; +m_xParentStorage = nullptr; } private:
core.git: Branch 'distro/collabora/co-24.04.7' - vcl/source
vcl/source/window/event.cxx |3 +++ 1 file changed, 3 insertions(+) New commits: commit f57fc348f59121d63177a3db048d7298450e0fd2 Author: Caolán McNamara AuthorDate: Thu Sep 26 12:03:07 2024 +0100 Commit: Andras Timar CommitDate: Sat Sep 28 09:47:16 2024 +0200 null-deref seen in testing #2 0x00ac8c3e in std::__glibcxx_assert_fail(char const*, int, char const*, char const*) () #3 0x7fa92f2fa26f in std::unique_ptr >::operator* (this=) at /opt/rh/devtoolset-12/root/usr/include/c++/12/bits/unique_ptr.h:443 #4 std::unique_ptr >::operator* (this=) at /opt/rh/devtoolset-12/root/usr/include/c++/12/bits/unique_ptr.h:443 #5 vcl::Window::CallEventListeners (this=this@entry=0x34eb4f40, nEvent=nEvent@entry=VclEventId::ObjectDying, pData=pData@entry=0x0) at libreoffice/vcl/source/window/event.cxx:272 #6 0x7fa92f38277a in vcl::Window::dispose (this=0x34eb4f40) at libreoffice/vcl/source/window/window.cxx:159 #7 0x7fa92f678064 in VclPtr::disposeAndClear (this=) at libreoffice/include/rtl/ref.hxx:88 #8 ImplDestroyHelpWindow (rHelpData=..., bUpdateHideTime=) at libreoffice/vcl/source/app/help.cxx:576 #9 0x7fa92f6780f8 in ImplDestroyHelpWindow (bUpdateHideTime=) at libreoffice/vcl/source/app/help.cxx:565 #10 0x7fa92f679125 in ImplShowHelpWindow (pParent=0x334cfb90, nHelpWinStyle=, nStyle=QuickHelpFlags::NONE, rHelpText="Chart Area", rScreenPos=Point = {...}, rHelpArea=...) at libreoffice/vcl/source/app/help.cxx:532 #11 0x7fa92f679544 in Help::ShowQuickHelp (pParent=pParent@entry=0x334cfb90, rScreenRect=..., rHelpText="Chart Area", nStyle=nStyle@entry=QuickHelpFlags::NONE) at libreoffice/vcl/source/app/help.cxx:189 #12 0x7fa91ae862e0 in chart::ChartWindow::RequestHelp (this=0x334cfb90, rHEvt=...) at libreoffice/chart2/source/controller/main/ChartWindow.cxx:227 #13 0x7fa92e2e88a0 in (anonymous namespace)::LOKPostAsyncEvent (pEv=0x35b4a320) at libreoffice/sfx2/source/view/lokhelper.cxx:1103 #14 0x7fa92e2e076a in LokChartHelper::postMouseEvent (this=this@entry=0x7ffd226dd650, nType=nType@entry=2, nX=nX@entry=15405, nY=nY@entry=4089, nCount=nCount@entry=1, nButtons=nButtons@entry=0, nModifier=0, fScaleX=fScaleX@entry=0.10001, fScaleY=fScaleY@entry=0.10001) at libreoffice/sfx2/source/view/lokcharthelper.cxx:294 #15 0x7fa92e2e5b80 in SfxLokHelper::testInPlaceComponentMouseEventHit (pViewShell=pViewShell@entry=0x337e52a0, nType=nType@entry=2, nX=nX@entry=15405, nY=nY@entry=4089, nCount=nCount@entry=1, nButtons=nButtons@entry=0, nModifier=0, fScaleX=0.10001, fScaleY=0.10001, bNegativeX=false) at libreoffice/include/rtl/ref.hxx:69 #16 0x7fa91dba1e0e in ScModelObj::postMouseEvent (this=0x4593d10, nType=2, nX=15405, nY=4089, nCount=1, nButtons=0, nModifier=0) at libreoffice/sc/source/ui/unoobj/docuno.cxx:799 #17 0x7fa92e39567f in doc_postMouseEvent (pThis=0x334b8290, nType=2, nX=15405, nY=4089, nCount=1, nButtons=0, nModifier=0) at libreoffice/desktop/source/lib/init.cxx:5597 #18 0x00578631 in lok::Document::postMouseEvent (nModifier=0, nButtons=0, nCount=1, nY=, nX=, nType=, this=) at libreoffice/include/LibreOfficeKit/LibreOfficeKit.hxx:297 #19 ChildSession::mouseEvent (this=this@entry=0x317e3cf0, tokens=..., target=target@entry=LokEventTargetEnum::Document) at kit/ChildSession.cpp:1906 #20 0x00588485 in ChildSession::_handleInput (this=, buffer=, length=) at kit/ChildSession.cpp:634 Change-Id: Ic67c8b7c4553853d0ab36dd448642564b6b6fb69 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173986 Tested-by: Jenkins CollaboraOffice Reviewed-by: Miklos Vajna diff --git a/vcl/source/window/event.cxx b/vcl/source/window/event.cxx index 23d910112a74..de6772615453 100644 --- a/vcl/source/window/event.cxx +++ b/vcl/source/window/event.cxx @@ -269,6 +269,9 @@ void Window::CallEventListeners( VclEventId nEvent, void* pData ) if ( !bIgnoreDisposed && xWindow->isDisposed() ) return; +if (!xWindow->mpWindowImpl) +break; + auto& rWindowImpl = *xWindow->mpWindowImpl; if (!rWindowImpl.maChildEventListeners.empty()) {
core.git: sw/source
sw/source/core/unocore/unochart.cxx | 18 +- 1 file changed, 9 insertions(+), 9 deletions(-) New commits: commit 6762578ee5d9c0b7670c5feea5b837130308a1be Author: Caolán McNamara AuthorDate: Fri Sep 27 19:54:21 2024 +0100 Commit: Caolán McNamara CommitDate: Fri Sep 27 22:37:36 2024 +0200 use the same early return as the other ::dispose cases in this file as done with: commit 2bfd51eab364c6b00603e2fa1e9c354eec90dc7f CommitDate: Fri Jul 31 11:00:25 2020 +0200 loplugin:flatten in sw/core/unocore for consistency with the rest, no logic change intended Change-Id: I69cc24c8ba4ec3aa483e869e68b79ab8b406afff Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174067 Tested-by: Jenkins Reviewed-by: Caolán McNamara diff --git a/sw/source/core/unocore/unochart.cxx b/sw/source/core/unocore/unochart.cxx index 996f96cfcc63..bd7c95880c50 100644 --- a/sw/source/core/unocore/unochart.cxx +++ b/sw/source/core/unocore/unochart.cxx @@ -2661,16 +2661,16 @@ void SAL_CALL SwChartLabeledDataSequence::dispose( ) if (!m_bDisposed) m_bDisposed = true; } -if (bMustDispose) -{ -m_bDisposed = true; +if (!bMustDispose) +return; -// require listeners to release references to this object -lang::EventObject aEvtObj( static_cast< chart2::data::XLabeledDataSequence * >(this) ); -std::unique_lock aGuard( GetChartMutex() ); -m_aModifyListeners.disposeAndClear( aGuard, aEvtObj ); -m_aEventListeners.disposeAndClear( aGuard, aEvtObj ); -} +m_bDisposed = true; + +// require listeners to release references to this object +lang::EventObject aEvtObj( static_cast< chart2::data::XLabeledDataSequence * >(this) ); +std::unique_lock aGuard( GetChartMutex() ); +m_aModifyListeners.disposeAndClear( aGuard, aEvtObj ); +m_aEventListeners.disposeAndClear( aGuard, aEvtObj ); } void SAL_CALL SwChartLabeledDataSequence::addEventListener(
core.git: vcl/source
vcl/source/window/event.cxx |3 +++ 1 file changed, 3 insertions(+) New commits: commit 6f53881f444051898e6dce2cbc343057cb6fc6b9 Author: Caolán McNamara AuthorDate: Thu Sep 26 12:03:07 2024 +0100 Commit: Caolán McNamara CommitDate: Fri Sep 27 11:24:29 2024 +0200 null-deref seen in testing #2 0x00ac8c3e in std::__glibcxx_assert_fail(char const*, int, char const*, char const*) () #3 0x7fa92f2fa26f in std::unique_ptr >::operator* (this=) at /opt/rh/devtoolset-12/root/usr/include/c++/12/bits/unique_ptr.h:443 #4 std::unique_ptr >::operator* (this=) at /opt/rh/devtoolset-12/root/usr/include/c++/12/bits/unique_ptr.h:443 #5 vcl::Window::CallEventListeners (this=this@entry=0x34eb4f40, nEvent=nEvent@entry=VclEventId::ObjectDying, pData=pData@entry=0x0) at libreoffice/vcl/source/window/event.cxx:272 #6 0x7fa92f38277a in vcl::Window::dispose (this=0x34eb4f40) at libreoffice/vcl/source/window/window.cxx:159 #7 0x7fa92f678064 in VclPtr::disposeAndClear (this=) at libreoffice/include/rtl/ref.hxx:88 #8 ImplDestroyHelpWindow (rHelpData=..., bUpdateHideTime=) at libreoffice/vcl/source/app/help.cxx:576 #9 0x7fa92f6780f8 in ImplDestroyHelpWindow (bUpdateHideTime=) at libreoffice/vcl/source/app/help.cxx:565 #10 0x7fa92f679125 in ImplShowHelpWindow (pParent=0x334cfb90, nHelpWinStyle=, nStyle=QuickHelpFlags::NONE, rHelpText="Chart Area", rScreenPos=Point = {...}, rHelpArea=...) at libreoffice/vcl/source/app/help.cxx:532 #11 0x7fa92f679544 in Help::ShowQuickHelp (pParent=pParent@entry=0x334cfb90, rScreenRect=..., rHelpText="Chart Area", nStyle=nStyle@entry=QuickHelpFlags::NONE) at libreoffice/vcl/source/app/help.cxx:189 #12 0x7fa91ae862e0 in chart::ChartWindow::RequestHelp (this=0x334cfb90, rHEvt=...) at libreoffice/chart2/source/controller/main/ChartWindow.cxx:227 #13 0x7fa92e2e88a0 in (anonymous namespace)::LOKPostAsyncEvent (pEv=0x35b4a320) at libreoffice/sfx2/source/view/lokhelper.cxx:1103 #14 0x7fa92e2e076a in LokChartHelper::postMouseEvent (this=this@entry=0x7ffd226dd650, nType=nType@entry=2, nX=nX@entry=15405, nY=nY@entry=4089, nCount=nCount@entry=1, nButtons=nButtons@entry=0, nModifier=0, fScaleX=fScaleX@entry=0.10001, fScaleY=fScaleY@entry=0.10001) at libreoffice/sfx2/source/view/lokcharthelper.cxx:294 #15 0x7fa92e2e5b80 in SfxLokHelper::testInPlaceComponentMouseEventHit (pViewShell=pViewShell@entry=0x337e52a0, nType=nType@entry=2, nX=nX@entry=15405, nY=nY@entry=4089, nCount=nCount@entry=1, nButtons=nButtons@entry=0, nModifier=0, fScaleX=0.10001, fScaleY=0.10001, bNegativeX=false) at libreoffice/include/rtl/ref.hxx:69 #16 0x7fa91dba1e0e in ScModelObj::postMouseEvent (this=0x4593d10, nType=2, nX=15405, nY=4089, nCount=1, nButtons=0, nModifier=0) at libreoffice/sc/source/ui/unoobj/docuno.cxx:799 #17 0x7fa92e39567f in doc_postMouseEvent (pThis=0x334b8290, nType=2, nX=15405, nY=4089, nCount=1, nButtons=0, nModifier=0) at libreoffice/desktop/source/lib/init.cxx:5597 #18 0x00578631 in lok::Document::postMouseEvent (nModifier=0, nButtons=0, nCount=1, nY=, nX=, nType=, this=) at libreoffice/include/LibreOfficeKit/LibreOfficeKit.hxx:297 #19 ChildSession::mouseEvent (this=this@entry=0x317e3cf0, tokens=..., target=target@entry=LokEventTargetEnum::Document) at kit/ChildSession.cpp:1906 #20 0x00588485 in ChildSession::_handleInput (this=, buffer=, length=) at kit/ChildSession.cpp:634 Change-Id: Ic67c8b7c4553853d0ab36dd448642564b6b6fb69 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173922 Tested-by: Jenkins Reviewed-by: Caolán McNamara diff --git a/vcl/source/window/event.cxx b/vcl/source/window/event.cxx index 23d910112a74..de6772615453 100644 --- a/vcl/source/window/event.cxx +++ b/vcl/source/window/event.cxx @@ -269,6 +269,9 @@ void Window::CallEventListeners( VclEventId nEvent, void* pData ) if ( !bIgnoreDisposed && xWindow->isDisposed() ) return; +if (!xWindow->mpWindowImpl) +break; + auto& rWindowImpl = *xWindow->mpWindowImpl; if (!rWindowImpl.maChildEventListeners.empty()) {
core.git: wizards/com
wizards/com/sun/star/wizards/ui/UnoDialog.java |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 6c4db29e740c85064f1465aaf3e143c19d1f5362 Author: Caolán McNamara AuthorDate: Thu Sep 26 09:18:28 2024 +0100 Commit: Caolán McNamara CommitDate: Fri Sep 27 11:24:13 2024 +0200 cid#1607206 PA: Public Attribute Change-Id: Ic76b397921c97314005cd0e05646fc45b303ded8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173974 Tested-by: Jenkins Reviewed-by: Caolán McNamara diff --git a/wizards/com/sun/star/wizards/ui/UnoDialog.java b/wizards/com/sun/star/wizards/ui/UnoDialog.java index 6e89d6559c50..9e39ecea5e5a 100644 --- a/wizards/com/sun/star/wizards/ui/UnoDialog.java +++ b/wizards/com/sun/star/wizards/ui/UnoDialog.java @@ -49,7 +49,7 @@ public class UnoDialog private XVclWindowPeer xVclWindowPeer; private HashMap ControlList; protected Resource m_oResource; -public XWindowPeer xWindowPeer = null; +protected XWindowPeer xWindowPeer = null; private PeerConfig m_oPeerConfig; public UnoDialog(XMultiServiceFactory xMSF)
core.git: Branch 'libreoffice-24-8' - stoc/source
stoc/source/inspect/introspection.cxx | 46 +++--- 1 file changed, 16 insertions(+), 30 deletions(-) New commits: commit 05e2d360e55d3fc1d9843a08b42f3a64ccb19733 Author: Caolán McNamara AuthorDate: Tue Sep 24 21:18:20 2024 +0100 Commit: Michael Stahl CommitDate: Fri Sep 27 11:23:03 2024 +0200 cid#1606918 Data race condition and cid#1606991 Data race condition cid#1607010 Data race condition cid#1607323 Data race condition cid#1607335 Data race condition cid#1607635 Data race condition cid#1608162 Data race condition Change-Id: I65edcf08f92fb564d56d0e8954212533c1cbec91 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173895 Tested-by: Jenkins Reviewed-by: Caolán McNamara (cherry picked from commit 695a46783e7dfd7cee0e083d9a8c2864dd7ac884) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173915 Reviewed-by: Michael Stahl diff --git a/stoc/source/inspect/introspection.cxx b/stoc/source/inspect/introspection.cxx index 5491001a070a..2594021dbaa6 100644 --- a/stoc/source/inspect/introspection.cxx +++ b/stoc/source/inspect/introspection.cxx @@ -684,8 +684,8 @@ class ImplIntrospectionAccess : public IntrospectionAccessHelper Reference getXEnumerationAccess(); ReferencegetXIdlArray(); -void cacheXNameContainer(); -void cacheXIndexContainer(); +void cacheXNameContainer(const std::unique_lock& rGuard); +void cacheXIndexContainer(const std::unique_lock& rGuard); public: ImplIntrospectionAccess( Any obj, rtl::Reference< IntrospectionAccessStatic_Impl > pStaticImpl_ ); @@ -796,7 +796,7 @@ Reference ImplIntrospectionAccess::getXElementAccess() return mxObjElementAccess; } -void ImplIntrospectionAccess::cacheXNameContainer() +void ImplIntrospectionAccess::cacheXNameContainer(const std::unique_lock& /*rGuard*/) { Reference xNameContainer; Reference xNameReplace; @@ -818,7 +818,6 @@ void ImplIntrospectionAccess::cacheXNameContainer() } { -std::unique_lock aGuard( m_aMutex ); if( !mxObjNameContainer.is() ) mxObjNameContainer = xNameContainer; if( !mxObjNameReplace.is() ) @@ -833,10 +832,8 @@ Reference ImplIntrospectionAccess::getXNameContainer() std::unique_lock aGuard( m_aMutex ); if( !mxObjNameContainer.is() ) -{ -aGuard.unlock(); -cacheXNameContainer(); -} +cacheXNameContainer(aGuard); + return mxObjNameContainer; } @@ -845,10 +842,8 @@ Reference ImplIntrospectionAccess::getXNameReplace() std::unique_lock aGuard( m_aMutex ); if( !mxObjNameReplace.is() ) -{ -aGuard.unlock(); -cacheXNameContainer(); -} +cacheXNameContainer(aGuard); + return mxObjNameReplace; } @@ -857,14 +852,12 @@ Reference ImplIntrospectionAccess::getXNameAccess() std::unique_lock aGuard( m_aMutex ); if( !mxObjNameAccess.is() ) -{ -aGuard.unlock(); -cacheXNameContainer(); -} +cacheXNameContainer(aGuard); + return mxObjNameAccess; } -void ImplIntrospectionAccess::cacheXIndexContainer() +void ImplIntrospectionAccess::cacheXIndexContainer(const std::unique_lock& /*rGuard*/) { Reference xIndexContainer; Reference xIndexReplace; @@ -886,7 +879,6 @@ void ImplIntrospectionAccess::cacheXIndexContainer() } { -std::unique_lock aGuard( m_aMutex ); if( !mxObjIndexContainer.is() ) mxObjIndexContainer = xIndexContainer; if( !mxObjIndexReplace.is() ) @@ -901,10 +893,8 @@ Reference ImplIntrospectionAccess::getXIndexContainer() std::unique_lock aGuard( m_aMutex ); if( !mxObjIndexContainer.is() ) -{ -aGuard.unlock(); -cacheXIndexContainer(); -} +cacheXIndexContainer(aGuard); + return mxObjIndexContainer; } @@ -913,10 +903,8 @@ Reference ImplIntrospectionAccess::getXIndexReplace() std::unique_lock aGuard( m_aMutex ); if( !mxObjIndexReplace.is() ) -{ -aGuard.unlock(); -cacheXIndexContainer(); -} +cacheXIndexContainer(aGuard); + return mxObjIndexReplace; } @@ -925,10 +913,8 @@ Reference ImplIntrospectionAccess::getXIndexAccess() std::unique_lock aGuard( m_aMutex ); if( !mxObjIndexAccess.is() ) -{ -aGuard.unlock(); -cacheXIndexContainer(); -} +cacheXIndexContainer(aGuard); + return mxObjIndexAccess; }
core.git: Branch 'libreoffice-24-8' - chart2/source
chart2/source/model/main/ChartModel.cxx |1 + 1 file changed, 1 insertion(+) New commits: commit 91a3facd0deba3c55755cf2bc180822ef33ea881 Author: Caolán McNamara AuthorDate: Tue Sep 24 19:39:41 2024 +0100 Commit: Michael Stahl CommitDate: Fri Sep 27 11:06:30 2024 +0200 cid#1606887 Data race condition and cid#1607140 Data race condition Change-Id: Ie27b42012b945bfad0c7344c734dc0b8f0816e70 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173898 Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara (cherry picked from commit bbac45eabed6464f85738e372ea6c2e4f23a11a0) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173916 Tested-by: Jenkins Reviewed-by: Michael Stahl diff --git a/chart2/source/model/main/ChartModel.cxx b/chart2/source/model/main/ChartModel.cxx index 4e97f9c99820..02244c2b 100644 --- a/chart2/source/model/main/ChartModel.cxx +++ b/chart2/source/model/main/ChartModel.cxx @@ -995,6 +995,7 @@ uno::Any SAL_CALL ChartModel::queryInterface( const uno::Type& aType ) // XCloneable Reference< util::XCloneable > SAL_CALL ChartModel::createClone() { +std::unique_lock aGuard(m_aLifeTimeManager.m_aAccessMutex); return Reference< util::XCloneable >( new ChartModel( *this )); }
core.git: 3 commits - wizards/com
wizards/com/sun/star/wizards/db/DBMetaData.java |7 ++- wizards/com/sun/star/wizards/db/SQLQueryComposer.java |2 +- wizards/com/sun/star/wizards/document/Shape.java|7 ++- wizards/com/sun/star/wizards/form/FormControlArranger.java |2 +- wizards/com/sun/star/wizards/form/StyleApplier.java |4 ++-- wizards/com/sun/star/wizards/report/DBColumn.java | 12 +++- wizards/com/sun/star/wizards/report/ReportTextDocument.java |6 +++--- wizards/com/sun/star/wizards/table/TableWizard.java |4 ++-- wizards/com/sun/star/wizards/ui/AggregateComponent.java |2 +- wizards/com/sun/star/wizards/ui/CommandFieldSelection.java |2 +- wizards/com/sun/star/wizards/ui/FilterComponent.java|2 +- 11 files changed, 35 insertions(+), 15 deletions(-) New commits: commit 0724127c6dd8f72b597ce1bdd3ba3aa4cd658e7f Author: Caolán McNamara AuthorDate: Thu Sep 26 09:17:27 2024 +0100 Commit: Caolán McNamara CommitDate: Thu Sep 26 14:53:29 2024 +0200 cid#1607041 PA: Public Attribute Change-Id: Iedea5a5e42fa311441a77ee4e18a1b3cbfdf0c44 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173973 Tested-by: Jenkins Reviewed-by: Caolán McNamara diff --git a/wizards/com/sun/star/wizards/report/DBColumn.java b/wizards/com/sun/star/wizards/report/DBColumn.java index 0c6e36e2219f..35bd99429a9a 100644 --- a/wizards/com/sun/star/wizards/report/DBColumn.java +++ b/wizards/com/sun/star/wizards/report/DBColumn.java @@ -53,7 +53,7 @@ public class DBColumn private PropertyState PropertyState; private int ValColumn = 1; private int ValRow = 0; -public FieldColumn CurDBField; +private FieldColumn CurDBField; private XTextTable xTextTable; private XTableColumns xTableColumns; private XCellRange xCellRange; @@ -450,4 +450,14 @@ public class DBColumn { return ValColumn; } + +public FieldColumn getCurDBField() +{ +return CurDBField; +} + +public void setCurDBField(FieldColumn _curDBField) +{ +CurDBField = _curDBField;; +} } diff --git a/wizards/com/sun/star/wizards/report/ReportTextDocument.java b/wizards/com/sun/star/wizards/report/ReportTextDocument.java index ac8d07000ad5..52d8e6d2ae96 100644 --- a/wizards/com/sun/star/wizards/report/ReportTextDocument.java +++ b/wizards/com/sun/star/wizards/report/ReportTextDocument.java @@ -284,10 +284,10 @@ class ReportTextDocument extends com.sun.star.wizards.text.TextDocument implemen for (int i = 0; i < nSize; i++) { DBColumn CurDBColumn = DBColumnsVector.get(i); -String sFieldName = CurDBColumn.CurDBField.getFieldName(); +String sFieldName = CurDBColumn.getCurDBField().getFieldName(); if (!sFieldName.equals(_sNewNames[i])) { -CurDBColumn.CurDBField = CurDBMetaData.getFieldColumnByDisplayName(_sNewNames[i]); + CurDBColumn.setCurDBField(CurDBMetaData.getFieldColumnByDisplayName(_sNewNames[i])); CurDBColumn.insertColumnData(oTextFieldHandler, bIsCurLandscape); } } @@ -510,7 +510,7 @@ class ReportTextDocument extends com.sun.star.wizards.text.TextDocument implemen for (int i = 0; i < DBColumnsVector.size(); i++) { DBColumn oDBColumn = DBColumnsVector.get(i); -if (oDBColumn.CurDBField.getFieldName().equals(_FieldName)) +if (oDBColumn.getCurDBField().getFieldName().equals(_FieldName)) { return oDBColumn; } commit 72423868bd74afe143cad7245f0cc6c3c4d179de Author: Caolán McNamara AuthorDate: Thu Sep 26 09:11:39 2024 +0100 Commit: Caolán McNamara CommitDate: Thu Sep 26 14:53:22 2024 +0200 cid#1607381 PA: Public Attribute Change-Id: I44377535cabfd0c34a7f2b0815d779b17fbf8f53 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173972 Reviewed-by: Caolán McNamara Tested-by: Jenkins diff --git a/wizards/com/sun/star/wizards/document/Shape.java b/wizards/com/sun/star/wizards/document/Shape.java index 45389fe89c53..a586efedf109 100644 --- a/wizards/com/sun/star/wizards/document/Shape.java +++ b/wizards/com/sun/star/wizards/document/Shape.java @@ -38,7 +38,7 @@ public class Shape { protected XShape xShape; protected FormHandler oFormHandler; -public XServiceInfo xServiceInfo; +private XServiceInfo xServiceInfo; protected Point aPoint; private Size aSize; protected XControlShape xControlShape; @@ -132,4 +132,9 @@ public class Shape { return xShape; } + +public XServiceInfo getServiceInfo() +{ +return xServiceInfo; +} } diff --git a/wizards/com/sun/star/wizards/form/StyleApplier.java b/wizards/com/sun/star/wizards/form/StyleApplier.java index 4596450b0e75..0932246e8a9a 100644 --- a/wizards/com/sun/star/wizards/form
core.git: Branch 'distro/collabora/co-24.04' - vcl/source
vcl/source/window/event.cxx |3 +++ 1 file changed, 3 insertions(+) New commits: commit f337386d9273dbb653044c51aa0bb5da0043e70d Author: Caolán McNamara AuthorDate: Thu Sep 26 12:03:07 2024 +0100 Commit: Miklos Vajna CommitDate: Thu Sep 26 13:38:28 2024 +0200 null-deref seen in testing #2 0x00ac8c3e in std::__glibcxx_assert_fail(char const*, int, char const*, char const*) () #3 0x7fa92f2fa26f in std::unique_ptr >::operator* (this=) at /opt/rh/devtoolset-12/root/usr/include/c++/12/bits/unique_ptr.h:443 #4 std::unique_ptr >::operator* (this=) at /opt/rh/devtoolset-12/root/usr/include/c++/12/bits/unique_ptr.h:443 #5 vcl::Window::CallEventListeners (this=this@entry=0x34eb4f40, nEvent=nEvent@entry=VclEventId::ObjectDying, pData=pData@entry=0x0) at libreoffice/vcl/source/window/event.cxx:272 #6 0x7fa92f38277a in vcl::Window::dispose (this=0x34eb4f40) at libreoffice/vcl/source/window/window.cxx:159 #7 0x7fa92f678064 in VclPtr::disposeAndClear (this=) at libreoffice/include/rtl/ref.hxx:88 #8 ImplDestroyHelpWindow (rHelpData=..., bUpdateHideTime=) at libreoffice/vcl/source/app/help.cxx:576 #9 0x7fa92f6780f8 in ImplDestroyHelpWindow (bUpdateHideTime=) at libreoffice/vcl/source/app/help.cxx:565 #10 0x7fa92f679125 in ImplShowHelpWindow (pParent=0x334cfb90, nHelpWinStyle=, nStyle=QuickHelpFlags::NONE, rHelpText="Chart Area", rScreenPos=Point = {...}, rHelpArea=...) at libreoffice/vcl/source/app/help.cxx:532 #11 0x7fa92f679544 in Help::ShowQuickHelp (pParent=pParent@entry=0x334cfb90, rScreenRect=..., rHelpText="Chart Area", nStyle=nStyle@entry=QuickHelpFlags::NONE) at libreoffice/vcl/source/app/help.cxx:189 #12 0x7fa91ae862e0 in chart::ChartWindow::RequestHelp (this=0x334cfb90, rHEvt=...) at libreoffice/chart2/source/controller/main/ChartWindow.cxx:227 #13 0x7fa92e2e88a0 in (anonymous namespace)::LOKPostAsyncEvent (pEv=0x35b4a320) at libreoffice/sfx2/source/view/lokhelper.cxx:1103 #14 0x7fa92e2e076a in LokChartHelper::postMouseEvent (this=this@entry=0x7ffd226dd650, nType=nType@entry=2, nX=nX@entry=15405, nY=nY@entry=4089, nCount=nCount@entry=1, nButtons=nButtons@entry=0, nModifier=0, fScaleX=fScaleX@entry=0.10001, fScaleY=fScaleY@entry=0.10001) at libreoffice/sfx2/source/view/lokcharthelper.cxx:294 #15 0x7fa92e2e5b80 in SfxLokHelper::testInPlaceComponentMouseEventHit (pViewShell=pViewShell@entry=0x337e52a0, nType=nType@entry=2, nX=nX@entry=15405, nY=nY@entry=4089, nCount=nCount@entry=1, nButtons=nButtons@entry=0, nModifier=0, fScaleX=0.10001, fScaleY=0.10001, bNegativeX=false) at libreoffice/include/rtl/ref.hxx:69 #16 0x7fa91dba1e0e in ScModelObj::postMouseEvent (this=0x4593d10, nType=2, nX=15405, nY=4089, nCount=1, nButtons=0, nModifier=0) at libreoffice/sc/source/ui/unoobj/docuno.cxx:799 #17 0x7fa92e39567f in doc_postMouseEvent (pThis=0x334b8290, nType=2, nX=15405, nY=4089, nCount=1, nButtons=0, nModifier=0) at libreoffice/desktop/source/lib/init.cxx:5597 #18 0x00578631 in lok::Document::postMouseEvent (nModifier=0, nButtons=0, nCount=1, nY=, nX=, nType=, this=) at libreoffice/include/LibreOfficeKit/LibreOfficeKit.hxx:297 #19 ChildSession::mouseEvent (this=this@entry=0x317e3cf0, tokens=..., target=target@entry=LokEventTargetEnum::Document) at kit/ChildSession.cpp:1906 #20 0x00588485 in ChildSession::_handleInput (this=, buffer=, length=) at kit/ChildSession.cpp:634 Change-Id: Ic67c8b7c4553853d0ab36dd448642564b6b6fb69 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173986 Tested-by: Jenkins CollaboraOffice Reviewed-by: Miklos Vajna diff --git a/vcl/source/window/event.cxx b/vcl/source/window/event.cxx index 23d910112a74..de6772615453 100644 --- a/vcl/source/window/event.cxx +++ b/vcl/source/window/event.cxx @@ -269,6 +269,9 @@ void Window::CallEventListeners( VclEventId nEvent, void* pData ) if ( !bIgnoreDisposed && xWindow->isDisposed() ) return; +if (!xWindow->mpWindowImpl) +break; + auto& rWindowImpl = *xWindow->mpWindowImpl; if (!rWindowImpl.maChildEventListeners.empty()) {
core.git: 3 commits - basctl/source basegfx/source unotest/source vcl/source
basctl/source/basicide/doceventnotifier.cxx|1 basegfx/source/polygon/b2dsvgpolypolygon.cxx |8 -- unotest/source/cpp/unoexceptionprotector/unoexceptionprotector.cxx |8 ++ vcl/source/control/tabctrl.cxx | 13 +- 4 files changed, 22 insertions(+), 8 deletions(-) New commits: commit eb227657d91c94f151434434e31087ae74efdd24 Author: Caolán McNamara AuthorDate: Thu Sep 26 08:48:56 2024 +0100 Commit: Caolán McNamara CommitDate: Thu Sep 26 13:39:32 2024 +0200 cid#1608414 Double lock since: commit f3e127217d8daa443b8eda52ac4810e375cc7d63 CommitDate: Wed May 10 13:28:09 2023 +0200 use comphelper::WeakComponentImplHelper in DocumentEventNotifier::Impl problem: 108std::unique_lock aGuard(m_aMutex); 109if ( !impl_isDisposed_nothrow(aGuard) ) 110{ 111acquire(); CID 1608414: (#1 of 1): Double lock (LOCK) 4. double_lock: dispose locks this->m_aMutex while it is locked.[show details] 112dispose(); /include/comphelper/compbase.hxx 73virtual void SAL_CALL dispose() noexcept final override 74{ 1. lock: dispose locks this->m_aMutex.[show details] 75WeakComponentImplHelperBase::dispose(); /comphelper/source/misc/compbase.cxx 20void SAL_CALL WeakComponentImplHelperBase::dispose() 21{ 1.lock: unique_lock locks this->m_aMutex. 22std::unique_lock aGuard(m_aMutex); Change-Id: Ibd9dc0564adf86c6409794f584a743aecd9d36e6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173970 Tested-by: Jenkins Reviewed-by: Caolán McNamara diff --git a/basctl/source/basicide/doceventnotifier.cxx b/basctl/source/basicide/doceventnotifier.cxx index 254c719bb5cc..9d408d7f967a 100644 --- a/basctl/source/basicide/doceventnotifier.cxx +++ b/basctl/source/basicide/doceventnotifier.cxx @@ -109,6 +109,7 @@ namespace basctl if ( !impl_isDisposed_nothrow(aGuard) ) { acquire(); +aGuard.unlock(); // dispose locks m_aMutex dispose(); } } commit 27fc6242c7153fcc3f41e38cc2ea649a3fe0c4cf Author: Caolán McNamara AuthorDate: Wed Sep 25 15:24:20 2024 +0100 Commit: Caolán McNamara CommitDate: Thu Sep 26 13:39:23 2024 +0200 cid#1607525 silence Overflowed constant and cid#1607982 Overflowed constant Change-Id: Ib7be7f8e17deb6184e25e543eab68dd704673eba Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173968 Tested-by: Jenkins Reviewed-by: Caolán McNamara diff --git a/basegfx/source/polygon/b2dsvgpolypolygon.cxx b/basegfx/source/polygon/b2dsvgpolypolygon.cxx index 9728a3896de6..7e525d5e1644 100644 --- a/basegfx/source/polygon/b2dsvgpolypolygon.cxx +++ b/basegfx/source/polygon/b2dsvgpolypolygon.cxx @@ -271,6 +271,7 @@ namespace basegfx::utils aCurrPoly.append(B2DPoint(nLastX, nLastY)); nCurrPolyCount = 1; } +assert(nCurrPolyCount > 0 && "coverity 2023.12.2"); // get first control point. It's the reflection of the PrevControlPoint // of the last point. If not existent, use current point (see SVG) @@ -416,15 +417,18 @@ namespace basegfx::utils } // ensure existence of start point -if(!aCurrPoly.count()) +sal_uInt32 nCurrPolyCount = aCurrPoly.count(); +if (nCurrPolyCount == 0) { aCurrPoly.append(B2DPoint(nLastX, nLastY)); +nCurrPolyCount = 1; } +assert(nCurrPolyCount > 0 && "coverity 2023.12.2"); // get first control point. It's the reflection of the PrevControlPoint // of the last point. If not existent, use current point (see SVG) B2DPoint aPrevControl(nLastX, nLastY); -const sal_uInt32 nIndex(aCurrPoly.count() - 1); +const sal_uInt32 nIndex(nCurrPolyCount - 1); const B2DPoint aPrevPoint(aCurrPoly.getB2DPoint(nIndex)); if(aCurrPoly.areControlPointsUsed() && aCurrPoly.isPrevControlPointUsed(nIndex)) diff --git a/vcl/source/control/tabctrl.cxx b/vcl/source/control/tabctrl.cxx index b104c6ee5e27..5e4c874d53bc 100644 --- a/vcl/source/control/tabctrl.cxx +++ b/vcl/source/control/tabctrl.cxx @@ -1129,7 +1129,7 @@ void TabControl::Paint( vcl::RenderContext& rRe
core.git: sw/source
sw/source/uibase/shells/textidx.cxx | 11 +++ 1 file changed, 7 insertions(+), 4 deletions(-) New commits: commit 5bebb6406a8ca0fa9de1051e8518bf84e070a3ef Author: Caolán McNamara AuthorDate: Thu Sep 26 08:18:43 2024 +0100 Commit: Caolán McNamara CommitDate: Thu Sep 26 13:38:58 2024 +0200 cid#1619696 Dereference after null check Change-Id: I52bf93d2561c94da0f9129c5df90ec8dd21e4deb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173966 Tested-by: Caolán McNamara Reviewed-by: Caolán McNamara diff --git a/sw/source/uibase/shells/textidx.cxx b/sw/source/uibase/shells/textidx.cxx index c8eb43dba577..7258e0d7c547 100644 --- a/sw/source/uibase/shells/textidx.cxx +++ b/sw/source/uibase/shells/textidx.cxx @@ -272,11 +272,14 @@ void SwTextShell::GetIdxState(SfxItemSet &rSet) else rSet.Put(SfxBoolItem(FN_INSERT_AUTH_ENTRY_DLG, true)); -SfxWhichIter aIter(rSet); -if (aIter.FirstWhich() == FN_REMOVE_CUR_TOX) +if (pBase) { -const OUString sLabel = SwResId(STR_DELETEINDEX).replaceAll("%1", pBase->GetTypeName()); -rSet.Put(SfxStringItem(FN_REMOVE_CUR_TOX, sLabel)); +SfxWhichIter aIter(rSet); +if (aIter.FirstWhich() == FN_REMOVE_CUR_TOX) +{ +const OUString sLabel = SwResId(STR_DELETEINDEX).replaceAll("%1", pBase->GetTypeName()); +rSet.Put(SfxStringItem(FN_REMOVE_CUR_TOX, sLabel)); +} } } else if ( rSh.CursorInsideInputField() )
core.git: Branch 'libreoffice-24-8' - framework/source
framework/source/fwe/helper/titlehelper.cxx |5 - 1 file changed, 4 insertions(+), 1 deletion(-) New commits: commit 5f76f598b613dd209149988d29a90f86be45c8fe Author: Caolán McNamara AuthorDate: Tue Sep 24 17:15:41 2024 +0100 Commit: Michael Stahl CommitDate: Thu Sep 26 10:42:59 2024 +0200 cid#1606875 Data race condition Change-Id: Ic4932568bb3f0348595358fa19032aba56bfa6c6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173899 Reviewed-by: Caolán McNamara Tested-by: Jenkins (cherry picked from commit f3e308fd3d29748d6a8fd1463df0a847a52a36d0) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173917 Reviewed-by: Michael Stahl diff --git a/framework/source/fwe/helper/titlehelper.cxx b/framework/source/fwe/helper/titlehelper.cxx index 5fc85505edad..422982ea629e 100644 --- a/framework/source/fwe/helper/titlehelper.cxx +++ b/framework/source/fwe/helper/titlehelper.cxx @@ -242,15 +242,18 @@ void SAL_CALL TitleHelper::disposing(const css::lang::EventObject& aEvent) void TitleHelper::impl_sendTitleChangedEvent () { css::uno::Reference xOwner; +OUString sTitle; // SYNCHRONIZED -> { std::unique_lock aLock(m_aMutex); xOwner = m_xOwner; + +sTitle = m_sTitle; } // <- SYNCHRONIZED -css::frame::TitleChangedEvent aEvent(xOwner, m_sTitle); +css::frame::TitleChangedEvent aEvent(xOwner, sTitle); if( ! aEvent.Source.is() ) return;
core.git: Branch 'libreoffice-24-8' - toolkit/source
toolkit/source/controls/grid/defaultgriddatamodel.cxx |1 + 1 file changed, 1 insertion(+) New commits: commit f217a3605311281791d2c7452771941eb9db4b24 Author: Caolán McNamara AuthorDate: Wed Sep 25 15:32:59 2024 +0100 Commit: Michael Stahl CommitDate: Thu Sep 26 10:41:54 2024 +0200 cid#1606825 Data race condition Change-Id: If2a0385a0b9d7d09c05cacc9bbc1034bd14f53b3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173947 Tested-by: Jenkins Reviewed-by: Caolán McNamara (cherry picked from commit 3cbe17c83c4846fd57a3f45074864367b5139011) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173918 Reviewed-by: Michael Stahl diff --git a/toolkit/source/controls/grid/defaultgriddatamodel.cxx b/toolkit/source/controls/grid/defaultgriddatamodel.cxx index 83d15eb6dcec..1b2bad263ff4 100644 --- a/toolkit/source/controls/grid/defaultgriddatamodel.cxx +++ b/toolkit/source/controls/grid/defaultgriddatamodel.cxx @@ -496,6 +496,7 @@ private: Reference< css::util::XCloneable > SAL_CALL DefaultGridDataModel::createClone( ) { +std::unique_lock aGuard(m_aMutex); return new DefaultGridDataModel( *this ); }
core.git: bin/oss-fuzz-setup.sh Repository.mk sw/inc sw/source vcl/Executable_rtf2pdffuzzer.mk vcl/Module_vcl.mk vcl/workben
Repository.mk |1 bin/oss-fuzz-setup.sh |1 sw/inc/shellio.hxx|2 sw/source/filter/rtf/swparrtf.cxx | 114 ++ sw/source/filter/xml/xmlimp.cxx | 14 ++-- vcl/Executable_rtf2pdffuzzer.mk | 50 vcl/Module_vcl.mk |1 vcl/workben/fftester.cxx | 10 +++ vcl/workben/rtf2pdffuzzer.cxx | 62 vcl/workben/rtf2pdffuzzer.options |3 + 10 files changed, 250 insertions(+), 8 deletions(-) New commits: commit 7198c5e49eff0b82cb423424eaed0ee94d66db7d Author: Caolán McNamara AuthorDate: Mon Sep 16 16:58:00 2024 +0100 Commit: Caolán McNamara CommitDate: Wed Sep 25 22:28:32 2024 +0200 add a rtf to pdf fuzzer Change-Id: Ib805b2e8245903f63096cc21f511ba7ae0a4f488 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173466 Tested-by: Jenkins Reviewed-by: Caolán McNamara diff --git a/Repository.mk b/Repository.mk index b4f3b36796bd..336452487890 100644 --- a/Repository.mk +++ b/Repository.mk @@ -140,6 +140,7 @@ $(eval $(call gb_Helper_register_executables_for_install,OOO,brand, \ $(call gb_Helper_optional,FUZZERS,olefuzzer) \ $(call gb_Helper_optional,FUZZERS,pptfuzzer) \ $(call gb_Helper_optional,FUZZERS,rtffuzzer) \ + $(call gb_Helper_optional,FUZZERS,rtf2pdffuzzer) \ $(call gb_Helper_optional,FUZZERS,cgmfuzzer) \ $(call gb_Helper_optional,FUZZERS,ww2fuzzer) \ $(call gb_Helper_optional,FUZZERS,ww6fuzzer) \ diff --git a/bin/oss-fuzz-setup.sh b/bin/oss-fuzz-setup.sh index 5bfc0ce887eb..565f972948e2 100755 --- a/bin/oss-fuzz-setup.sh +++ b/bin/oss-fuzz-setup.sh @@ -166,6 +166,7 @@ curl --no-progress-meter -S \ -C - -O https://dev-www.libreoffice.org/corpus/htmlfuzzer_seed_corpus.zip \ -C - -O https://dev-www.libreoffice.org/corpus/zipfuzzer_seed_corpus.zip cp fodtfuzzer_seed_corpus.zip fodt2pdffuzzer_seed_corpus.zip +cp rtffuzzer_seed_corpus.zip rtf2pdffuzzer_seed_corpus.zip cp fodsfuzzer_seed_corpus.zip fods2xlsfuzzer_seed_corpus.zip cp htmlfuzzer_seed_corpus.zip schtmlfuzzer_seed_corpus.zip diff --git a/sw/inc/shellio.hxx b/sw/inc/shellio.hxx index a9245c8f3bba..48405803870e 100644 --- a/sw/inc/shellio.hxx +++ b/sw/inc/shellio.hxx @@ -204,6 +204,7 @@ namespace o3tl { extern "C" SAL_DLLPUBLIC_EXPORT bool TestImportDOC(SvStream &rStream, const OUString &rFltName); extern "C" SAL_DLLPUBLIC_EXPORT bool TestImportDOCX(SvStream &rStream); extern "C" SAL_DLLPUBLIC_EXPORT bool TestImportRTF(SvStream &rStream); +extern "C" SAL_DLLPUBLIC_EXPORT bool TestPDFExportRTF(SvStream &rStream); extern "C" SAL_DLLPUBLIC_EXPORT bool TestImportHTML(SvStream &rStream); SAL_DLLPUBLIC_EXPORT void FlushFontCache(); @@ -211,7 +212,6 @@ class SW_DLLPUBLIC Reader { friend class SwReader; friend bool TestImportDOC(SvStream &rStream, const OUString &rFltName); -friend bool TestImportRTF(SvStream &rStream); friend bool TestImportHTML(SvStream &rStream); rtl::Reference mxTemplate; OUString m_aTemplateName; diff --git a/sw/source/filter/rtf/swparrtf.cxx b/sw/source/filter/rtf/swparrtf.cxx index f81c40eaee31..b126eb6b23ef 100644 --- a/sw/source/filter/rtf/swparrtf.cxx +++ b/sw/source/filter/rtf/swparrtf.cxx @@ -28,15 +28,22 @@ #include +#include #include +#include #include #include #include #include +#include #include +#include +#include #include #include +#include +#include using namespace ::com::sun::star; @@ -209,4 +216,111 @@ extern "C" SAL_DLLPUBLIC_EXPORT bool TestImportRTF(SvStream& rStream) return bRet; } +extern "C" SAL_DLLPUBLIC_EXPORT bool TestPDFExportRTF(SvStream& rStream) +{ +#if 0 +//TODO: probably end up needing one of these too +// do the same sort of check as FilterDetect::detect +OString const str(read_uInt8s_ToOString(rStream, 4000)); +rStream.Seek(STREAM_SEEK_TO_BEGIN); +OUString resultString(str.getStr(), str.getLength(), RTL_TEXTENCODING_ASCII_US, + RTL_TEXTTOUNICODE_FLAGS_UNDEFINED_DEFAULT + | RTL_TEXTTOUNICODE_FLAGS_MBUNDEFINED_DEFAULT + | RTL_TEXTTOUNICODE_FLAGS_INVALID_DEFAULT); +if (!resultString.startsWith(" xDesktop += css::frame::Desktop::create(comphelper::getProcessComponentContext()); +uno::Reference xTargetFrame = xDesktop->findFrame(u"_blank"_ustr, 0); + +uno::Reference xContext(comphelper::getProcessComponentContext()); +uno::Reference xModel( +xContext->getServiceManager()->createInstanceWithContext( +u"com.sun.star.text.TextDocument"_ustr, xContext), +uno::UNO_QUERY_THROW); + +uno::Reference xModelLoad(xModel, uno::UNO_QUERY_THROW); +xModelLoad->initNew(); + +uno::Reference xMultiServiceFactory( +comphelper::getProcessServiceFactory()); +uno::Reference xStream(new utl::O
core.git: toolkit/source
toolkit/source/controls/grid/defaultgriddatamodel.cxx |1 + 1 file changed, 1 insertion(+) New commits: commit 3cbe17c83c4846fd57a3f45074864367b5139011 Author: Caolán McNamara AuthorDate: Wed Sep 25 15:32:59 2024 +0100 Commit: Caolán McNamara CommitDate: Wed Sep 25 20:33:09 2024 +0200 cid#1606825 Data race condition Change-Id: If2a0385a0b9d7d09c05cacc9bbc1034bd14f53b3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173947 Tested-by: Jenkins Reviewed-by: Caolán McNamara diff --git a/toolkit/source/controls/grid/defaultgriddatamodel.cxx b/toolkit/source/controls/grid/defaultgriddatamodel.cxx index 0eca84e6e5cd..8831f9106115 100644 --- a/toolkit/source/controls/grid/defaultgriddatamodel.cxx +++ b/toolkit/source/controls/grid/defaultgriddatamodel.cxx @@ -496,6 +496,7 @@ private: Reference< css::util::XCloneable > SAL_CALL DefaultGridDataModel::createClone( ) { +std::unique_lock aGuard(m_aMutex); return new DefaultGridDataModel( *this ); }
core.git: 3 commits - wizards/com
wizards/com/sun/star/wizards/db/QueryMetaData.java |2 +- wizards/com/sun/star/wizards/db/RecordParser.java | 12 +++- wizards/com/sun/star/wizards/db/SQLQueryComposer.java |4 ++-- wizards/com/sun/star/wizards/query/QueryWizard.java |6 +++--- wizards/com/sun/star/wizards/report/ReportTextDocument.java |2 +- wizards/com/sun/star/wizards/ui/UnoDialog.java |2 +- 6 files changed, 19 insertions(+), 9 deletions(-) New commits: commit d26313ea1931be1a9224ede0f599260177ca6ad6 Author: Caolán McNamara AuthorDate: Wed Sep 25 09:05:08 2024 +0100 Commit: Caolán McNamara CommitDate: Wed Sep 25 20:32:58 2024 +0200 cid#1607206 PA: Public Attribute Change-Id: If140f3256a7e1afaae723147cb4870fa01b4e52e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173946 Tested-by: Jenkins Reviewed-by: Caolán McNamara diff --git a/wizards/com/sun/star/wizards/ui/UnoDialog.java b/wizards/com/sun/star/wizards/ui/UnoDialog.java index 6f3f0cd02f4d..6e89d6559c50 100644 --- a/wizards/com/sun/star/wizards/ui/UnoDialog.java +++ b/wizards/com/sun/star/wizards/ui/UnoDialog.java @@ -41,7 +41,7 @@ public class UnoDialog private XNameAccess m_xDlgNameAccess; public XControl xControl; protected XDialog xDialog; -public XReschedule xReschedule; +protected XReschedule xReschedule; protected XWindow xWindow; public XComponent xComponent; public XInterface xDialogModel; commit ca4f427d021b67dfc855dcb10c1e978b278c5bd5 Author: Caolán McNamara AuthorDate: Wed Sep 25 09:04:08 2024 +0100 Commit: Caolán McNamara CommitDate: Wed Sep 25 20:32:51 2024 +0200 cid#1608290 PA: Public Attribute Change-Id: I46bd84741d3958cb807df4f3080426fc2afdd6fe Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173945 Reviewed-by: Caolán McNamara Tested-by: Jenkins diff --git a/wizards/com/sun/star/wizards/db/QueryMetaData.java b/wizards/com/sun/star/wizards/db/QueryMetaData.java index abbc6036754c..342b0a1aa02b 100644 --- a/wizards/com/sun/star/wizards/db/QueryMetaData.java +++ b/wizards/com/sun/star/wizards/db/QueryMetaData.java @@ -31,7 +31,7 @@ public class QueryMetaData extends CommandMetaData // Vector CommandNamesV; private PropertyValue[][] m_aFilterConditions; /* = new PropertyValue[][] {}; */ -public PropertyValue[][] GroupByFilterConditions = new PropertyValue[][] +private PropertyValue[][] GroupByFilterConditions = new PropertyValue[][] { }; public int Type = QueryType.SODETAILQUERY; diff --git a/wizards/com/sun/star/wizards/db/SQLQueryComposer.java b/wizards/com/sun/star/wizards/db/SQLQueryComposer.java index b8979b31ee8b..c0d60e9b362c 100644 --- a/wizards/com/sun/star/wizards/db/SQLQueryComposer.java +++ b/wizards/com/sun/star/wizards/db/SQLQueryComposer.java @@ -296,9 +296,9 @@ public class SQLQueryComposer if (_bincludeGrouping) { appendGroupByColumns(_baddAliasFieldNames); -if (CurDBMetaData.GroupByFilterConditions.length > 0) +if (CurDBMetaData.getGroupByFilterConditions().length > 0) { - m_queryComposer.setStructuredHavingClause(CurDBMetaData.GroupByFilterConditions); + m_queryComposer.setStructuredHavingClause(CurDBMetaData.getGroupByFilterConditions()); } } if (prependSortingCriteria) diff --git a/wizards/com/sun/star/wizards/query/QueryWizard.java b/wizards/com/sun/star/wizards/query/QueryWizard.java index 03f033d0b451..684c21cfb59f 100644 --- a/wizards/com/sun/star/wizards/query/QueryWizard.java +++ b/wizards/com/sun/star/wizards/query/QueryWizard.java @@ -164,7 +164,7 @@ public class QueryWizard extends DatabaseObjectWizard bEnabled = false; if (_bEnabled) { -bEnabled = (m_DBMetaData.GroupByFilterConditions.length > 0); +bEnabled = (m_DBMetaData.getGroupByFilterConditions().length > 0); } break; @@ -281,7 +281,7 @@ public class QueryWizard extends DatabaseObjectWizard { m_DBMetaData.setGroupFieldNames(m_groupFieldSelection.getSelectedFieldNames()); m_DBMetaData.setGroupFieldNames(JavaTools.removeOutdatedFields(m_DBMetaData.getGroupFieldNames(), m_DBMetaData.getNonAggregateFieldNames())); -m_DBMetaData.GroupByFilterConditions = JavaTools.removeOutdatedFields(m_DBMetaData.GroupByFilterConditions, m_DBMetaData.getGroupFieldNames()); + m_DBMetaData.setGroupByFilterConditions(JavaTools.removeOutdatedFields(m_DBMetaData.getGroupByFilterConditions(), m_DBMetaData.getGroupFieldNames())); } } switch (nNewStep) @@ -300,7 +300,7 @@ publ
core.git: 2 commits - wizards/com
wizards/com/sun/star/wizards/db/CommandMetaData.java|3 +-- wizards/com/sun/star/wizards/db/CommandName.java| 14 +++--- wizards/com/sun/star/wizards/db/DBMetaData.java |7 ++- wizards/com/sun/star/wizards/db/RelationController.java |8 wizards/com/sun/star/wizards/db/SQLQueryComposer.java |2 +- wizards/com/sun/star/wizards/query/QuerySummary.java|2 +- wizards/com/sun/star/wizards/query/QueryWizard.java | 16 wizards/com/sun/star/wizards/table/Finalizer.java |4 ++-- wizards/com/sun/star/wizards/ui/AggregateComponent.java |2 +- 9 files changed, 31 insertions(+), 27 deletions(-) New commits: commit 8c78ce59f87f809c3a26b7b92284030d8d5b3438 Author: Caolán McNamara AuthorDate: Wed Sep 25 08:58:07 2024 +0100 Commit: Caolán McNamara CommitDate: Wed Sep 25 20:32:32 2024 +0200 remove call to getCatalogSeparator where return is ignored since: commit 43cc8ad33e815522e2b23ac87a4a9c4526cd85c9 CommitDate: Mon Jan 5 08:23:29 2015 +0200 java: remove dead code Change-Id: Ib2b3e7a45ef1c9f1a7edf06ed6d474375bfe1c5b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173943 Reviewed-by: Caolán McNamara Tested-by: Jenkins diff --git a/wizards/com/sun/star/wizards/db/CommandMetaData.java b/wizards/com/sun/star/wizards/db/CommandMetaData.java index 3f01cc152f96..5cc7d4ac851e 100644 --- a/wizards/com/sun/star/wizards/db/CommandMetaData.java +++ b/wizards/com/sun/star/wizards/db/CommandMetaData.java @@ -539,7 +539,6 @@ public class CommandMetaData extends DBMetaData { try { -getDBMetaData().getCatalogSeparator(); sIdentifierQuote = getDBMetaData().getIdentifierQuoteString(); bCommandComposerAttributesalreadyRetrieved = true; } commit 1cb1e96979593ce51ff8a09a13a250552a2ce5bb Author: Caolán McNamara AuthorDate: Wed Sep 25 08:56:57 2024 +0100 Commit: Caolán McNamara CommitDate: Wed Sep 25 20:32:26 2024 +0200 cid#1606775 PA: Public Attribute Change-Id: Ie5034470b02310f329c041224ebf035769374e50 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173942 Tested-by: Caolán McNamara Reviewed-by: Caolán McNamara diff --git a/wizards/com/sun/star/wizards/db/CommandMetaData.java b/wizards/com/sun/star/wizards/db/CommandMetaData.java index 66b507ca69c9..3f01cc152f96 100644 --- a/wizards/com/sun/star/wizards/db/CommandMetaData.java +++ b/wizards/com/sun/star/wizards/db/CommandMetaData.java @@ -539,8 +539,8 @@ public class CommandMetaData extends DBMetaData { try { -xDBMetaData.getCatalogSeparator(); -sIdentifierQuote = xDBMetaData.getIdentifierQuoteString(); +getDBMetaData().getCatalogSeparator(); +sIdentifierQuote = getDBMetaData().getIdentifierQuoteString(); bCommandComposerAttributesalreadyRetrieved = true; } catch (SQLException e) diff --git a/wizards/com/sun/star/wizards/db/CommandName.java b/wizards/com/sun/star/wizards/db/CommandName.java index 4768018ef3b5..aab9d7f4595a 100644 --- a/wizards/com/sun/star/wizards/db/CommandName.java +++ b/wizards/com/sun/star/wizards/db/CommandName.java @@ -48,14 +48,14 @@ public class CommandName { baddQuotation = _baddQuotation; oCommandMetaData = _CommandMetaData; -if ((_CatalogName != null) && (oCommandMetaData.xDBMetaData.supportsCatalogsInTableDefinitions())) +if ((_CatalogName != null) && (oCommandMetaData.getDBMetaData().supportsCatalogsInTableDefinitions())) { if (!_CatalogName.equals(PropertyNames.EMPTY_STRING)) { CatalogName = _CatalogName; } } -if ((_SchemaName != null) && (oCommandMetaData.xDBMetaData.supportsSchemasInTableDefinitions())) +if ((_SchemaName != null) && (oCommandMetaData.getDBMetaData().supportsSchemasInTableDefinitions())) { if (!_SchemaName.equals(PropertyNames.EMPTY_STRING)) { @@ -86,7 +86,7 @@ public class CommandName this.DisplayName = _DisplayName; int iIndex; -if (oCommandMetaData.xDBMetaData.supportsCatalogsInDataManipulation()) +if (oCommandMetaData.getDBMetaData().supportsCatalogsInDataManipulation()) { // ...then Catalog also in TableName iIndex = _DisplayName.indexOf(sCatalogSep); if (iIndex >= 0) @@ -103,7 +103,7 @@ public class CommandName } } } -if (oCommandMetaData.xDBMetaData.supportsSchemasInDataManipulation()) +if (oCommandMetaData.getDBMetaData().supportsSchemasInDataManipulation()) { String[] NameList = JavaTools.ArrayoutofString(_Di
core.git: 2 commits - sfx2/source wizards/com
sfx2/source/view/viewsh.cxx |1 + wizards/com/sun/star/wizards/db/CommandMetaData.java|7 ++- wizards/com/sun/star/wizards/ui/AggregateComponent.java | 10 +- 3 files changed, 12 insertions(+), 6 deletions(-) New commits: commit eea21fab2b3c5bd692b71cf446de2f37e049a153 Author: Caolán McNamara AuthorDate: Wed Sep 25 08:52:08 2024 +0100 Commit: Caolán McNamara CommitDate: Wed Sep 25 20:32:12 2024 +0200 cid#1606722 PA: Public Attribute Change-Id: I23f518a7b492ae92417657f5a319eb1aae4dac3c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173941 Tested-by: Jenkins Reviewed-by: Caolán McNamara diff --git a/wizards/com/sun/star/wizards/db/CommandMetaData.java b/wizards/com/sun/star/wizards/db/CommandMetaData.java index cec77c795634..66b507ca69c9 100644 --- a/wizards/com/sun/star/wizards/db/CommandMetaData.java +++ b/wizards/com/sun/star/wizards/db/CommandMetaData.java @@ -53,7 +53,7 @@ public class CommandMetaData extends DBMetaData public String[][] AggregateFieldNames = new String[][] { }; -public String[] NumericFieldNames = new String[] +private String[] NumericFieldNames = new String[] { }; protected String[] NonAggregateFieldNames; @@ -105,6 +105,11 @@ public class CommandMetaData extends DBMetaData } } +public String[] getNumericFieldNames() +{ +return NumericFieldNames; +} + public Map getFieldTitleSet() { return FieldTitleSet; diff --git a/wizards/com/sun/star/wizards/ui/AggregateComponent.java b/wizards/com/sun/star/wizards/ui/AggregateComponent.java index 1eaee1fb6ab4..deed09843d13 100644 --- a/wizards/com/sun/star/wizards/ui/AggregateComponent.java +++ b/wizards/com/sun/star/wizards/ui/AggregateComponent.java @@ -296,9 +296,9 @@ public class AggregateComponent extends ControlScroller String[][] sAggregateFieldNames = this.getAggregateFieldNames(); if (benableGroupPage) { -for (int i = 0; i < CurDBMetaData.NumericFieldNames.length; i++) +for (int i = 0; i < CurDBMetaData.getNumericFieldNames().length; i++) { -boolean bisthere = (JavaTools.FieldInTable(sAggregateFieldNames, CurDBMetaData.NumericFieldNames[i]) > -1); +boolean bisthere = (JavaTools.FieldInTable(sAggregateFieldNames, CurDBMetaData.getNumericFieldNames()[i]) > -1); if (!bisthere) { return true; @@ -362,7 +362,7 @@ public class AggregateComponent extends ControlScroller if ((iselfield.length > 0) && (iselfunction.length > 0)) { String[] curaggregatename = new String[] { - CurDBMetaData.NumericFieldNames[iselfield[0]], + CurDBMetaData.getNumericFieldNames()[iselfield[0]], this.sFunctionOperators[iselfunction[0]] }; aggregatevector.add(curaggregatename); } @@ -446,7 +446,7 @@ public class AggregateComponent extends ControlScroller PropertyValue[] currowproperties = new PropertyValue[2]; if (_index < CurDBMetaData.AggregateFieldNames.length) { -short iselfieldsindex = (short) JavaTools.FieldInList(CurDBMetaData.NumericFieldNames, CurDBMetaData.AggregateFieldNames[_index][0]); +short iselfieldsindex = (short) JavaTools.FieldInList(CurDBMetaData.getNumericFieldNames(), CurDBMetaData.AggregateFieldNames[_index][0]); iselfieldslist = new short[] { iselfieldsindex @@ -535,7 +535,7 @@ public class AggregateComponent extends ControlScroller private void insertFieldNames() { -Helper.setUnoPropertyValue(UnoDialog.getModel(xFieldListBox), PropertyNames.STRING_ITEM_LIST, CurDBMetaData.NumericFieldNames); +Helper.setUnoPropertyValue(UnoDialog.getModel(xFieldListBox), PropertyNames.STRING_ITEM_LIST, CurDBMetaData.getNumericFieldNames()); } private boolean isComplete() commit 2c2fc06966dc91306ff83f7d0f2c37925b6b57f4 Author: Caolán McNamara AuthorDate: Wed Sep 25 13:31:33 2024 +0100 Commit: Caolán McNamara CommitDate: Wed Sep 25 20:32:01 2024 +0200 Related: cool#9735 allow LOK_CALLBACK_DOCUMENT_SIZE_CHANGED during paint we want this to get through because of a scenario like #0 ignoreLibreOfficeKitViewCallback (nType=13, pImpl=0xf9bd620) at /home/caolan/LibreOffice/co-24.04/sfx2/source/view/viewsh.cxx:3219 #1 0x7fd4a2428979 in SfxViewShell::libreOfficeKitViewCallback (this=0xf9bd090, nType=13, pPayload=...) at /home/caolan/LibreOffice/co-24.04/sfx2/source/view/viewsh.cxx:3278 #2 0x7f
core.git: framework/source
framework/source/fwe/helper/titlehelper.cxx |5 - 1 file changed, 4 insertions(+), 1 deletion(-) New commits: commit f3e308fd3d29748d6a8fd1463df0a847a52a36d0 Author: Caolán McNamara AuthorDate: Tue Sep 24 17:15:41 2024 +0100 Commit: Caolán McNamara CommitDate: Wed Sep 25 15:38:05 2024 +0200 cid#1606875 Data race condition Change-Id: Ic4932568bb3f0348595358fa19032aba56bfa6c6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173899 Reviewed-by: Caolán McNamara Tested-by: Jenkins diff --git a/framework/source/fwe/helper/titlehelper.cxx b/framework/source/fwe/helper/titlehelper.cxx index 5fc85505edad..422982ea629e 100644 --- a/framework/source/fwe/helper/titlehelper.cxx +++ b/framework/source/fwe/helper/titlehelper.cxx @@ -242,15 +242,18 @@ void SAL_CALL TitleHelper::disposing(const css::lang::EventObject& aEvent) void TitleHelper::impl_sendTitleChangedEvent () { css::uno::Reference xOwner; +OUString sTitle; // SYNCHRONIZED -> { std::unique_lock aLock(m_aMutex); xOwner = m_xOwner; + +sTitle = m_sTitle; } // <- SYNCHRONIZED -css::frame::TitleChangedEvent aEvent(xOwner, m_sTitle); +css::frame::TitleChangedEvent aEvent(xOwner, sTitle); if( ! aEvent.Source.is() ) return;
core.git: 2 commits - chart2/source hwpfilter/source sd/source
chart2/source/model/main/ChartModel.cxx |1 + hwpfilter/source/hcode.cxx | 11 --- sd/source/core/stlpool.cxx |8 +++- 3 files changed, 8 insertions(+), 12 deletions(-) New commits: commit bbac45eabed6464f85738e372ea6c2e4f23a11a0 Author: Caolán McNamara AuthorDate: Tue Sep 24 19:39:41 2024 +0100 Commit: Caolán McNamara CommitDate: Wed Sep 25 15:37:54 2024 +0200 cid#1606887 Data race condition and cid#1607140 Data race condition Change-Id: Ie27b42012b945bfad0c7344c734dc0b8f0816e70 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173898 Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara diff --git a/chart2/source/model/main/ChartModel.cxx b/chart2/source/model/main/ChartModel.cxx index 4e97f9c99820..02244c2b 100644 --- a/chart2/source/model/main/ChartModel.cxx +++ b/chart2/source/model/main/ChartModel.cxx @@ -995,6 +995,7 @@ uno::Any SAL_CALL ChartModel::queryInterface( const uno::Type& aType ) // XCloneable Reference< util::XCloneable > SAL_CALL ChartModel::createClone() { +std::unique_lock aGuard(m_aLifeTimeManager.m_aAccessMutex); return Reference< util::XCloneable >( new ChartModel( *this )); } commit c30fa95c5d0e03c523d22d01be3ae4ce3b79c723 Author: Caolán McNamara AuthorDate: Tue Sep 24 19:45:58 2024 +0100 Commit: Caolán McNamara CommitDate: Wed Sep 25 15:37:40 2024 +0200 cid#1607313 silence Overflowed return value and cid#1608099 Overflowed constant Change-Id: I10e08c1184bb6630b849c3e24a0c9b26302fd18a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173896 Tested-by: Caolán McNamara Reviewed-by: Caolán McNamara diff --git a/hwpfilter/source/hcode.cxx b/hwpfilter/source/hcode.cxx index 8bb22e06c956..9616529bbb33 100644 --- a/hwpfilter/source/hcode.cxx +++ b/hwpfilter/source/hcode.cxx @@ -522,19 +522,16 @@ static int KsSearch(hchar c) static hchar cdkssm2ks_han(hchar kssm) { -unsigned int index; -unsigned char lo, hi; - /* "One" */ if (kssm == 0xd3c5) return 0xc7d1; -index = KsSearch(kssm); +unsigned int index = KsSearch(kssm); if (kssm != ksTbl[index]) return jaso2ks(kssm); -hi = sal::static_int_cast(index / (0xFE - 0xA1 + 1) + 0xB0); -lo = sal::static_int_cast(index % (0xFE - 0xA1 + 1) + 0xA1); -return lo | (hi << 8); +unsigned char hi(index / (0xFE - 0xA1 + 1) + 0xB0); +unsigned char lo(index % (0xFE - 0xA1 + 1) + 0xA1); +return hchar(lo | (hi << 8)); } diff --git a/sd/source/core/stlpool.cxx b/sd/source/core/stlpool.cxx index 8ab0716d533f..2cfd2544fe00 100644 --- a/sd/source/core/stlpool.cxx +++ b/sd/source/core/stlpool.cxx @@ -978,12 +978,10 @@ void SdStyleSheetPool::UpdateStdNames() if( bHelpKnown ) { OUString aNewName; -if (pNameId) +if (pNameId && pNameId == STR_PSEUDOSHEET_OUTLINE) { -if (pNameId == STR_PSEUDOSHEET_OUTLINE) -{ -aNewName += " " + OUString::number( sal_Int32( nHelpId - HID_PSEUDOSHEET_OUTLINE ) ); -} +assert(nHelpId >= HID_PSEUDOSHEET_OUTLINE1 && nHelpId <= HID_PSEUDOSHEET_OUTLINE9); +aNewName += " " + OUString::number( sal_Int32( nHelpId - HID_PSEUDOSHEET_OUTLINE ) ); } if( !aNewName.isEmpty() && aNewName != aOldName )
core.git: stoc/source
stoc/source/inspect/introspection.cxx | 46 +++--- 1 file changed, 16 insertions(+), 30 deletions(-) New commits: commit 695a46783e7dfd7cee0e083d9a8c2864dd7ac884 Author: Caolán McNamara AuthorDate: Tue Sep 24 21:18:20 2024 +0100 Commit: Caolán McNamara CommitDate: Wed Sep 25 15:37:23 2024 +0200 cid#1606918 Data race condition and cid#1606991 Data race condition cid#1607010 Data race condition cid#1607323 Data race condition cid#1607335 Data race condition cid#1607635 Data race condition cid#1608162 Data race condition Change-Id: I65edcf08f92fb564d56d0e8954212533c1cbec91 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173895 Tested-by: Jenkins Reviewed-by: Caolán McNamara diff --git a/stoc/source/inspect/introspection.cxx b/stoc/source/inspect/introspection.cxx index 046063a0a2ae..716e35c95df1 100644 --- a/stoc/source/inspect/introspection.cxx +++ b/stoc/source/inspect/introspection.cxx @@ -685,8 +685,8 @@ class ImplIntrospectionAccess : public IntrospectionAccessHelper Reference getXEnumerationAccess(); ReferencegetXIdlArray(); -void cacheXNameContainer(); -void cacheXIndexContainer(); +void cacheXNameContainer(const std::unique_lock& rGuard); +void cacheXIndexContainer(const std::unique_lock& rGuard); public: ImplIntrospectionAccess( Any obj, rtl::Reference< IntrospectionAccessStatic_Impl > pStaticImpl_ ); @@ -797,7 +797,7 @@ Reference ImplIntrospectionAccess::getXElementAccess() return mxObjElementAccess; } -void ImplIntrospectionAccess::cacheXNameContainer() +void ImplIntrospectionAccess::cacheXNameContainer(const std::unique_lock& /*rGuard*/) { Reference xNameContainer; Reference xNameReplace; @@ -819,7 +819,6 @@ void ImplIntrospectionAccess::cacheXNameContainer() } { -std::unique_lock aGuard( m_aMutex ); if( !mxObjNameContainer.is() ) mxObjNameContainer = xNameContainer; if( !mxObjNameReplace.is() ) @@ -834,10 +833,8 @@ Reference ImplIntrospectionAccess::getXNameContainer() std::unique_lock aGuard( m_aMutex ); if( !mxObjNameContainer.is() ) -{ -aGuard.unlock(); -cacheXNameContainer(); -} +cacheXNameContainer(aGuard); + return mxObjNameContainer; } @@ -846,10 +843,8 @@ Reference ImplIntrospectionAccess::getXNameReplace() std::unique_lock aGuard( m_aMutex ); if( !mxObjNameReplace.is() ) -{ -aGuard.unlock(); -cacheXNameContainer(); -} +cacheXNameContainer(aGuard); + return mxObjNameReplace; } @@ -858,14 +853,12 @@ Reference ImplIntrospectionAccess::getXNameAccess() std::unique_lock aGuard( m_aMutex ); if( !mxObjNameAccess.is() ) -{ -aGuard.unlock(); -cacheXNameContainer(); -} +cacheXNameContainer(aGuard); + return mxObjNameAccess; } -void ImplIntrospectionAccess::cacheXIndexContainer() +void ImplIntrospectionAccess::cacheXIndexContainer(const std::unique_lock& /*rGuard*/) { Reference xIndexContainer; Reference xIndexReplace; @@ -887,7 +880,6 @@ void ImplIntrospectionAccess::cacheXIndexContainer() } { -std::unique_lock aGuard( m_aMutex ); if( !mxObjIndexContainer.is() ) mxObjIndexContainer = xIndexContainer; if( !mxObjIndexReplace.is() ) @@ -902,10 +894,8 @@ Reference ImplIntrospectionAccess::getXIndexContainer() std::unique_lock aGuard( m_aMutex ); if( !mxObjIndexContainer.is() ) -{ -aGuard.unlock(); -cacheXIndexContainer(); -} +cacheXIndexContainer(aGuard); + return mxObjIndexContainer; } @@ -914,10 +904,8 @@ Reference ImplIntrospectionAccess::getXIndexReplace() std::unique_lock aGuard( m_aMutex ); if( !mxObjIndexReplace.is() ) -{ -aGuard.unlock(); -cacheXIndexContainer(); -} +cacheXIndexContainer(aGuard); + return mxObjIndexReplace; } @@ -926,10 +914,8 @@ Reference ImplIntrospectionAccess::getXIndexAccess() std::unique_lock aGuard( m_aMutex ); if( !mxObjIndexAccess.is() ) -{ -aGuard.unlock(); -cacheXIndexContainer(); -} +cacheXIndexContainer(aGuard); + return mxObjIndexAccess; }
core.git: 2 commits - sd/source unotest/source
sd/source/ui/unoidl/unomodel.cxx |2 +- unotest/source/cpp/unoexceptionprotector/unoexceptionprotector.cxx |6 +- 2 files changed, 6 insertions(+), 2 deletions(-) New commits: commit cd5dcc6e43c669d99133b8de7d8559ba3145ba6d Author: Caolán McNamara AuthorDate: Wed Sep 25 08:37:31 2024 +0100 Commit: Caolán McNamara CommitDate: Wed Sep 25 15:37:15 2024 +0200 cid#1619687 Not restoring ostream format Change-Id: Id46d2317a0eeef612836fc58dc9da18cf7ee99a1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173894 Tested-by: Jenkins Reviewed-by: Caolán McNamara diff --git a/unotest/source/cpp/unoexceptionprotector/unoexceptionprotector.cxx b/unotest/source/cpp/unoexceptionprotector/unoexceptionprotector.cxx index 6811c9470104..5273699f57ab 100644 --- a/unotest/source/cpp/unoexceptionprotector/unoexceptionprotector.cxx +++ b/unotest/source/cpp/unoexceptionprotector/unoexceptionprotector.cxx @@ -88,9 +88,13 @@ void printUnoValue( out << std::uppercase << *o3tl::forceAccess(value); break; case css::uno::TypeClass_CHAR: +{ +std::ios_base::fmtflags origfmt = out.flags(); out << "\u" << std::hex << std::uppercase << std::setw(4) << std::setfill('0') -<< std::uint_least16_t(*o3tl::forceAccess(value)) << std::dec; +<< std::uint_least16_t(*o3tl::forceAccess(value)); +out.setf(origfmt); break; +} case css::uno::TypeClass_STRING: out << '"' << *o3tl::forceAccess(value) << '"'; //TODO: encode content break; commit 82584fe1b9976a6aafc84d5d0233b46eac7656a2 Author: Caolán McNamara AuthorDate: Wed Sep 25 08:30:52 2024 +0100 Commit: Caolán McNamara CommitDate: Wed Sep 25 15:37:07 2024 +0200 cid#1619686 Invalid iterator comparison Change-Id: I731cc791b1efab895bddbea9a235a9add3288058 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173893 Reviewed-by: Caolán McNamara Tested-by: Jenkins diff --git a/sd/source/ui/unoidl/unomodel.cxx b/sd/source/ui/unoidl/unomodel.cxx index e7951d7f75b1..b8f752199f4b 100644 --- a/sd/source/ui/unoidl/unomodel.cxx +++ b/sd/source/ui/unoidl/unomodel.cxx @@ -548,7 +548,7 @@ constexpr bool convertEnum(OStringBuffer& rBuffer, EnumT nValue, const frozen::unordered_map& rMap) { auto iterator = rMap.find(nValue); -if (iterator == constAnimationNodeTypeToString.end()) +if (iterator == rMap.end()) return false; rBuffer.append(iterator->second); return true;
core.git: Branch 'distro/collabora/co-24.04.7' - sfx2/source
sfx2/source/view/viewsh.cxx |1 + 1 file changed, 1 insertion(+) New commits: commit ed854872aecbe8012639b7e000c5bcba84cbce82 Author: Caolán McNamara AuthorDate: Wed Sep 25 13:31:33 2024 +0100 Commit: Andras Timar CommitDate: Wed Sep 25 15:24:21 2024 +0200 Related: cool#9735 allow LOK_CALLBACK_DOCUMENT_SIZE_CHANGED during paint we want this to get through because of a scenario like #0 ignoreLibreOfficeKitViewCallback (nType=13, pImpl=0xf9bd620) at /home/caolan/LibreOffice/co-24.04/sfx2/source/view/viewsh.cxx:3219 #1 0x7fd4a2428979 in SfxViewShell::libreOfficeKitViewCallback (this=0xf9bd090, nType=13, pPayload=...) at /home/caolan/LibreOffice/co-24.04/sfx2/source/view/viewsh.cxx:3278 #2 0x7fd4a23ab80b in SfxLokHelper::notifyDocumentSizeChanged (pThisView=0xf9bd090, rPayload=..., pDoc=0xec53578, bInvalidateAll=true) at /home/caolan/LibreOffice/co-24.04/sfx2/source/view/lokhelper.cxx:711 #3 0x7fd484eba265 in SwViewShell::SizeChgNotify (this=0xf9bf3c0) at /home/caolan/LibreOffice/co-24.04/sw/source/core/view/viewsh.cxx:1154 #4 0x7fd484775a62 in AdjustSizeChgNotify (pRoot=0xed16880) at /home/caolan/LibreOffice/co-24.04/sw/source/core/layout/pagechg.cxx:842 #5 0x7fd48477e029 in SwRootFrame::CheckViewLayout (this=0xed16880, pViewOpt=0x0, pVisArea=0x0) at /home/caolan/LibreOffice/co-24.04/sw/source/core/layout/pagechg.cxx:2436 #6 0x7fd484775da2 in SwPageFrame::Cut (this=0x120350f0) at /home/caolan/LibreOffice/co-24.04/sw/source/core/layout/pagechg.cxx:914 #7 0x7fd484779ec8 in SwRootFrame::RemovePage (this=0xed16880, pDelRef=0x7ffe90279548, eResult=SwRemoveResult::Prev) at /home/caolan/LibreOffice/co-24.04/sw/source/core/layout/pagechg.cxx:1511 #8 0x7fd48477a187 in SwRootFrame::RemoveSuperfluous (this=0xed16880) at /home/caolan/LibreOffice/co-24.04/sw/source/core/layout/pagechg.cxx:1550 #9 0x7fd4847336b2 in SwLayAction::InternalAction (this=0x7ffe90279a60, pRenderContext=0xf9bb5f0) at /home/caolan/LibreOffice/co-24.04/sw/source/core/layout/layact.cxx:694 #10 0x7fd4847323b8 in SwLayAction::Action (this=0x7ffe90279a60, pRenderContext=0xf9bb5f0) at /home/caolan/LibreOffice/co-24.04/sw/source/core/layout/layact.cxx:396 #11 0x7fd484eb5fc2 in SwViewShell::ImplEndAction (this=0xf9bf3c0, bIdleEnd=false) at /home/caolan/LibreOffice/co-24.04/sw/source/core/view/viewsh.cxx:309 #12 0x7fd483fa3f78 in SwViewShell::EndAction (this=0xf9bf3c0, bIdleEnd=false) at /home/caolan/LibreOffice/co-24.04/sw/inc/viewsh.hxx:637 #13 0x7fd484ebf56b in SwViewShell::ApplyViewOptions (this=0xeddec90, rOpt=...) at /home/caolan/LibreOffice/co-24.04/sw/source/core/view/viewsh.cxx:2235 #14 0x7fd484577013 in SwEditShell::ApplyViewOptions (this=0xeddec90, rOpt=...) at /home/caolan/LibreOffice/co-24.04/sw/source/core/edit/editsh.cxx:1094 #15 0x7fd48574a5cf in SwWrtShell::ApplyViewOptions (this=0xeddec90, rOpt=...) at /home/caolan/LibreOffice/co-24.04/sw/source/uibase/wrtsh/wrtsh1.cxx:2137 #16 0x7fd484ebe79e in SwViewShell::PaintTile (this=0xeddec90, rDevice=..., contextWidth=1792, contextHeight=768, tilePosX=0, tilePosY=113280, tileWidth=13440, tileHeight=5760) at /home/caolan/LibreOffice/co-24.04/sw/source/core/view/viewsh.cxx:2019 #17 0x7fd4855fc5f0 in SwXTextDocument::paintTile (this=0xec53280, rDevice=..., nOutputWidth=1792, nOutputHeight=768, nTilePosX=0, nTilePosY=113280, nTileWidth=13440, nTileHeight=5760) at /home/caolan/LibreOffice/co-24.04/sw/source/uibase/uno/unotxdoc.cxx:3145 #18 0x7fd4a24c5ada in doc_paintTile (pThis=0xed2fa10, pBuffer=0x12871f30 "", nCanvasWidth=1792, nCanvasHeight=768, nTilePosX=0, nTilePosY=113280, nTileWidth=13440, nTileHeight=5760) at /home/caolan/LibreOffice/co-24.04/desktop/source/lib/init.cxx:4431 #19 0x7fd4a24c6bb3 in doc_paintPartTile (pThis=0xed2fa10, pBuffer=0x12871f30 "", nPart=0, nMode=0, nCanvasWidth=1792, nCanvasHeight=768, nTilePosX=0, nTilePosY=113280, nTileWidth=13440, nTileHeight=5760) at /home/caolan/LibreOffice/co-24.04/desktop/source/lib/init.cxx:4629 #20 0x005f0f0e in lok::Document::paintPartTile (this=0xf521420, pBuffer=0x12871f30 "", nPart=0, nMode=0, nCanvasWidth=1792, nCanvasHeight=768, nTilePosX=0, nTilePosY=113280, nTileWidth=13440, nTileHeight=5760) at /home/caolan/LibreOffice/co-24.04/include/LibreOfficeKit/LibreOfficeKit.hxx:621 #21 0x005c2627 in RenderTiles::doRender(std::shared_ptr const&, DeltaGenerator&, TileCombined&, ThreadPool&, std::function const&, std::function const&, unsigned int, int, bool) (document=..., deltaGen=..., tileCombined=..., pngPool=..., blendWatermark=..., outputMessage=..., mobileAppDocId=3, canonicalViewId=1000, dumpTiles=false) at ./common/RenderTiles.hpp:123 #22 0x005cd29d in Document::renderTiles (this=0xe6eef
core.git: Branch 'distro/collabora/co-24.04' - sfx2/source
sfx2/source/view/viewsh.cxx |1 + 1 file changed, 1 insertion(+) New commits: commit ed75469d322f61abef634d417c5c81bb28585023 Author: Caolán McNamara AuthorDate: Wed Sep 25 13:31:33 2024 +0100 Commit: Miklos Vajna CommitDate: Wed Sep 25 15:17:12 2024 +0200 Related: cool#9735 allow LOK_CALLBACK_DOCUMENT_SIZE_CHANGED during paint we want this to get through because of a scenario like #0 ignoreLibreOfficeKitViewCallback (nType=13, pImpl=0xf9bd620) at /home/caolan/LibreOffice/co-24.04/sfx2/source/view/viewsh.cxx:3219 #1 0x7fd4a2428979 in SfxViewShell::libreOfficeKitViewCallback (this=0xf9bd090, nType=13, pPayload=...) at /home/caolan/LibreOffice/co-24.04/sfx2/source/view/viewsh.cxx:3278 #2 0x7fd4a23ab80b in SfxLokHelper::notifyDocumentSizeChanged (pThisView=0xf9bd090, rPayload=..., pDoc=0xec53578, bInvalidateAll=true) at /home/caolan/LibreOffice/co-24.04/sfx2/source/view/lokhelper.cxx:711 #3 0x7fd484eba265 in SwViewShell::SizeChgNotify (this=0xf9bf3c0) at /home/caolan/LibreOffice/co-24.04/sw/source/core/view/viewsh.cxx:1154 #4 0x7fd484775a62 in AdjustSizeChgNotify (pRoot=0xed16880) at /home/caolan/LibreOffice/co-24.04/sw/source/core/layout/pagechg.cxx:842 #5 0x7fd48477e029 in SwRootFrame::CheckViewLayout (this=0xed16880, pViewOpt=0x0, pVisArea=0x0) at /home/caolan/LibreOffice/co-24.04/sw/source/core/layout/pagechg.cxx:2436 #6 0x7fd484775da2 in SwPageFrame::Cut (this=0x120350f0) at /home/caolan/LibreOffice/co-24.04/sw/source/core/layout/pagechg.cxx:914 #7 0x7fd484779ec8 in SwRootFrame::RemovePage (this=0xed16880, pDelRef=0x7ffe90279548, eResult=SwRemoveResult::Prev) at /home/caolan/LibreOffice/co-24.04/sw/source/core/layout/pagechg.cxx:1511 #8 0x7fd48477a187 in SwRootFrame::RemoveSuperfluous (this=0xed16880) at /home/caolan/LibreOffice/co-24.04/sw/source/core/layout/pagechg.cxx:1550 #9 0x7fd4847336b2 in SwLayAction::InternalAction (this=0x7ffe90279a60, pRenderContext=0xf9bb5f0) at /home/caolan/LibreOffice/co-24.04/sw/source/core/layout/layact.cxx:694 #10 0x7fd4847323b8 in SwLayAction::Action (this=0x7ffe90279a60, pRenderContext=0xf9bb5f0) at /home/caolan/LibreOffice/co-24.04/sw/source/core/layout/layact.cxx:396 #11 0x7fd484eb5fc2 in SwViewShell::ImplEndAction (this=0xf9bf3c0, bIdleEnd=false) at /home/caolan/LibreOffice/co-24.04/sw/source/core/view/viewsh.cxx:309 #12 0x7fd483fa3f78 in SwViewShell::EndAction (this=0xf9bf3c0, bIdleEnd=false) at /home/caolan/LibreOffice/co-24.04/sw/inc/viewsh.hxx:637 #13 0x7fd484ebf56b in SwViewShell::ApplyViewOptions (this=0xeddec90, rOpt=...) at /home/caolan/LibreOffice/co-24.04/sw/source/core/view/viewsh.cxx:2235 #14 0x7fd484577013 in SwEditShell::ApplyViewOptions (this=0xeddec90, rOpt=...) at /home/caolan/LibreOffice/co-24.04/sw/source/core/edit/editsh.cxx:1094 #15 0x7fd48574a5cf in SwWrtShell::ApplyViewOptions (this=0xeddec90, rOpt=...) at /home/caolan/LibreOffice/co-24.04/sw/source/uibase/wrtsh/wrtsh1.cxx:2137 #16 0x7fd484ebe79e in SwViewShell::PaintTile (this=0xeddec90, rDevice=..., contextWidth=1792, contextHeight=768, tilePosX=0, tilePosY=113280, tileWidth=13440, tileHeight=5760) at /home/caolan/LibreOffice/co-24.04/sw/source/core/view/viewsh.cxx:2019 #17 0x7fd4855fc5f0 in SwXTextDocument::paintTile (this=0xec53280, rDevice=..., nOutputWidth=1792, nOutputHeight=768, nTilePosX=0, nTilePosY=113280, nTileWidth=13440, nTileHeight=5760) at /home/caolan/LibreOffice/co-24.04/sw/source/uibase/uno/unotxdoc.cxx:3145 #18 0x7fd4a24c5ada in doc_paintTile (pThis=0xed2fa10, pBuffer=0x12871f30 "", nCanvasWidth=1792, nCanvasHeight=768, nTilePosX=0, nTilePosY=113280, nTileWidth=13440, nTileHeight=5760) at /home/caolan/LibreOffice/co-24.04/desktop/source/lib/init.cxx:4431 #19 0x7fd4a24c6bb3 in doc_paintPartTile (pThis=0xed2fa10, pBuffer=0x12871f30 "", nPart=0, nMode=0, nCanvasWidth=1792, nCanvasHeight=768, nTilePosX=0, nTilePosY=113280, nTileWidth=13440, nTileHeight=5760) at /home/caolan/LibreOffice/co-24.04/desktop/source/lib/init.cxx:4629 #20 0x005f0f0e in lok::Document::paintPartTile (this=0xf521420, pBuffer=0x12871f30 "", nPart=0, nMode=0, nCanvasWidth=1792, nCanvasHeight=768, nTilePosX=0, nTilePosY=113280, nTileWidth=13440, nTileHeight=5760) at /home/caolan/LibreOffice/co-24.04/include/LibreOfficeKit/LibreOfficeKit.hxx:621 #21 0x005c2627 in RenderTiles::doRender(std::shared_ptr const&, DeltaGenerator&, TileCombined&, ThreadPool&, std::function const&, std::function const&, unsigned int, int, bool) (document=..., deltaGen=..., tileCombined=..., pngPool=..., blendWatermark=..., outputMessage=..., mobileAppDocId=3, canonicalViewId=1000, dumpTiles=false) at ./common/RenderTiles.hpp:123 #22 0x005cd29d in Document::renderTiles (this=0xe6eef
core.git: Branch 'distro/cib/libreoffice-6-4' - 5 commits - download.lst external/hunspell solenv/clang-format sw/CppunitTest_sw_layoutwriter2.mk sw/CppunitTest_sw_layoutwriter3.mk sw/Module_sw.mk sw/
download.lst |4 external/hunspell/0001-Resolves-rhbz-2158548-allow-longer-words-for-hunspel.patch | 77 external/hunspell/0001-fix-LibreOffice-build-problem-with-basic_string-appe.patch | 84 external/hunspell/0001-invalid-read-memory-access-624.patch | 25 external/hunspell/UnpackedTarball_hunspell.mk |3 solenv/clang-format/blacklist |2 sw/CppunitTest_sw_layoutwriter2.mk | 81 sw/CppunitTest_sw_layoutwriter3.mk | 81 sw/Module_sw.mk |2 sw/qa/extras/layout/layout.cxx | 2569 -- sw/qa/extras/layout/layout2.cxx | 955 +++ sw/qa/extras/layout/layout3.cxx | 1532 + 12 files changed, 2962 insertions(+), 2453 deletions(-) New commits: commit 0ef99664ff0b4f1a1cebf0ec8e02306d9c6180ce Author: Caolán McNamara AuthorDate: Fri Jan 6 16:28:03 2023 + Commit: Michael Stahl CommitDate: Wed Sep 25 13:42:49 2024 +0200 Related: rhbz#2158548 allow longer words for hunspell-ko https://github.com/hunspell/hunspell/issues/903 A problem since the sanity check added in: commit 05e44e069e4cfaa9ce1264bf13f23fc9abd7ed05 Author: Caolán McNamara Date: Thu Sep 1 13:46:40 2022 +0100 Check word limit (#813) * check against hentry blen max Change-Id: Iab2c062584da076260c3262537690435eae7f396 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145154 Tested-by: Jenkins Reviewed-by: Caolán McNamara (cherry picked from commit 2a8660c6d36a2015c37c65b6bc21c6decd96cf8e) diff --git a/external/hunspell/0001-Resolves-rhbz-2158548-allow-longer-words-for-hunspel.patch b/external/hunspell/0001-Resolves-rhbz-2158548-allow-longer-words-for-hunspel.patch new file mode 100644 index ..c0225fbd70a4 --- /dev/null +++ b/external/hunspell/0001-Resolves-rhbz-2158548-allow-longer-words-for-hunspel.patch @@ -0,0 +1,77 @@ +From e2fe9f86e1769b440972971240e9b8fb1cd53b97 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= +Date: Fri, 6 Jan 2023 16:20:45 + +Subject: [PATCH] Resolves: rhbz#2158548 allow longer words for hunspell-ko +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +https://github.com/hunspell/hunspell/issues/903 + +A problem since the sanity check added in: + +commit 05e44e069e4cfaa9ce1264bf13f23fc9abd7ed05 +Author: Caolán McNamara +Date: Thu Sep 1 13:46:40 2022 +0100 + +Check word limit (#813) + +* check against hentry blen max +--- + src/hunspell/hashmgr.cxx | 6 +++--- + src/hunspell/htypes.hxx | 4 ++-- + tests/korean.dic | 3 ++- + 3 files changed, 7 insertions(+), 6 deletions(-) + +diff --git a/src/hunspell/hashmgr.cxx b/src/hunspell/hashmgr.cxx +index 100916d..14201e9 100644 +--- a/src/hunspell/hashmgr.cxx b/src/hunspell/hashmgr.cxx +@@ -209,7 +209,7 @@ int HashMgr::add_word(const std::string& in_word, + } + + // limit of hp->blen +- if (word->size() > std::numeric_limits::max()) { ++ if (word->size() > std::numeric_limits::max()) { + HUNSPELL_WARNING(stderr, "error: word len %ld is over max limit ", word->size()); + delete desc_copy; + delete word_copy; +@@ -235,8 +235,8 @@ int HashMgr::add_word(const std::string& in_word, + + int i = hash(hpw, word->size()); + +- hp->blen = (unsigned char)word->size(); +- hp->clen = (unsigned char)wcl; ++ hp->blen = (unsigned short)word->size(); ++ hp->clen = (unsigned short)wcl; + hp->alen = (short)al; + hp->astr = aff; + hp->next = NULL; +diff --git a/src/hunspell/htypes.hxx b/src/hunspell/htypes.hxx +index 44366b1..2b896fb 100644 +--- a/src/hunspell/htypes.hxx b/src/hunspell/htypes.hxx +@@ -62,8 +62,8 @@ + #endif + + struct hentry { +- unsigned char blen;// word length in bytes +- unsigned char clen;// word length in characters (different for UTF-8 enc.) ++ unsigned short blen; // word length in bytes ++ unsigned short clen; // word length in characters (different for UTF-8 enc.) + short alen;// length of affix flag vector + unsigned short* astr; // affix flag vector + struct hentry* next; // next word with same hash code +diff --git a/tests/korean.dic b/tests/korean.dic +index 95cb450..d76ea05 100644 +--- a/tests/korean.dic b/tests/korean.dic +@@ -1,3 +1,4 @@ +-2 ++3 + 들어오세요 + 안녕하세요 ++김수한무거북이와두루미삼천갑자동방삭치치카포사리사리세ᅡ워리워리세브리캉무드셀ᅡ구름위허ᅵ케ᅵᆫᅦ담벼락서생원에ᄀ양 +-- +2.38.1 + diff --git a/external/hunspell/UnpackedTarba
core.git: Branch 'libreoffice-24-8' - sd/source
sd/source/ui/dlg/navigatr.cxx | 42 ++ sd/source/ui/dlg/sdtreelb.cxx |7 +-- sd/source/ui/inc/sdtreelb.hxx |1 - 3 files changed, 19 insertions(+), 31 deletions(-) New commits: commit 7f6907d545af386f0ed34a7c9409a90b965164a3 Author: Caolán McNamara AuthorDate: Mon Sep 23 21:02:20 2024 +0100 Commit: Xisco Fauli CommitDate: Wed Sep 25 12:36:16 2024 +0200 Don't change focus from sd navigator if it will be immediately refocused Instead of grabbing focus away from the treeview, and then grabbing focus back to the treeview (which disrupts the vcl treeview's ability to enter inline editing mode on 2nd click), just don't change focus at all if the focus will up in the initial location. git show -w is your friend here Change-Id: Idb53fa95495f1819cd121079f3f51c39cc629336 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173829 Tested-by: Jenkins Reviewed-by: Caolán McNamara Reviewed-by: Jim Raykowski (cherry picked from commit 6c37d95fbbcc97c2dc824ecee8369140a6442980) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173905 Reviewed-by: Xisco Fauli diff --git a/sd/source/ui/dlg/navigatr.cxx b/sd/source/ui/dlg/navigatr.cxx index 51ad28d89e4b..b1703e111f77 100644 --- a/sd/source/ui/dlg/navigatr.cxx +++ b/sd/source/ui/dlg/navigatr.cxx @@ -463,33 +463,27 @@ IMPL_LINK_NOARG(SdNavigatorWin, ClickObjectHdl, weld::TreeView&, bool) // state update. mpBindings->Update(); -// moved here from SetGetFocusHdl. Reset the -// focus only if something has been selected in the -// document. -SfxViewShell* pCurSh = SfxViewShell::Current(); - -if ( pCurSh ) +if (mxTlbObjects->IsNavigationGrabsFocus()) { -vcl::Window* pShellWnd = pCurSh->GetWindow(); -if ( pShellWnd ) -pShellWnd->GrabFocus(); -} +// moved here from SetGetFocusHdl. Reset the +// focus only if something has been selected in the +// document. +SfxViewShell* pCurSh = SfxViewShell::Current(); -// We navigated to an object, but the current shell may be -// still the slide sorter. Explicitly try to grab the draw -// shell focus, so follow-up operations work with the object -// and not with the whole slide. -vcl::Window* pWindow = pViewShell->GetActiveWindow(); -if (pWindow) -pWindow->GrabFocus(); +if ( pCurSh ) +{ +vcl::Window* pShellWnd = pCurSh->GetWindow(); +if ( pShellWnd ) +pShellWnd->GrabFocus(); +} -if (!mxTlbObjects->IsNavigationGrabsFocus()) -{ -// This is the case when keyboard navigation inside the -// navigator should continue to work. -if (mxNavigatorDlg) -mxNavigatorDlg->GrabFocus(); -mxTlbObjects->grab_focus(); +// We navigated to an object, but the current shell may be +// still the slide sorter. Explicitly try to grab the draw +// shell focus, so follow-up operations work with the object +// and not with the whole slide. +vcl::Window* pWindow = pViewShell->GetActiveWindow(); +if (pWindow) +pWindow->GrabFocus(); } } } diff --git a/sd/source/ui/dlg/sdtreelb.cxx b/sd/source/ui/dlg/sdtreelb.cxx index 7eb476cfb48b..69001315e936 100644 --- a/sd/source/ui/dlg/sdtreelb.cxx +++ b/sd/source/ui/dlg/sdtreelb.cxx @@ -306,7 +306,6 @@ IMPL_LINK(SdPageObjsTLV, CommandHdl, const CommandEvent&, rCEvt, bool) if (rCEvt.GetCommand() == CommandEventId::ContextMenu) { -m_bMouseReleased = false; m_xTreeView->grab_focus(); // select clicked entry @@ -321,7 +320,6 @@ IMPL_LINK(SdPageObjsTLV, CommandHdl, const CommandEvent&, rCEvt, bool) } bool bRet = m_aPopupMenuHdl.Call(rCEvt); -m_bMouseReleased = true; return bRet; } @@ -362,7 +360,6 @@ IMPL_LINK(SdPageObjsTLV, KeyInputHdl, const KeyEvent&, rKEvt, bool) IMPL_LINK(SdPageObjsTLV, MousePressHdl, const MouseEvent&, rMEvt, bool) { -m_bMouseReleased = false; m_bEditing = false; m_bSelectionHandlerNavigates = rMEvt.GetClicks() == 1; m_bNavigationGrabsFocus = rMEvt.GetClicks() != 1; @@ -371,7 +368,6 @@ IMPL_LINK(SdPageObjsTLV, MousePressHdl, const MouseEvent&, rMEvt, bool) IMPL_LINK_NOARG(SdPageObjsTLV, MouseReleaseH
core.git: Branch 'distro/collabora/co-24.04.7' - 2 commits - sc/source sd/source
sc/source/ui/view/output2.cxx | 13 ++--- sd/source/ui/dlg/navigatr.cxx | 42 ++ sd/source/ui/dlg/sdtreelb.cxx |7 +-- sd/source/ui/inc/sdtreelb.hxx |1 - 4 files changed, 29 insertions(+), 34 deletions(-) New commits: commit 7db586c233e1b773ed6a77be54cc4a157ea5e334 Author: Caolán McNamara AuthorDate: Tue Sep 24 14:29:16 2024 +0100 Commit: Andras Timar CommitDate: Wed Sep 25 07:13:59 2024 +0200 prefer the per-ViewShell rendering data for default document bg color Change-Id: Ie67d6317641d63524c20a3001179ad958ebce300 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173866 Tested-by: Jenkins CollaboraOffice Reviewed-by: Pranam Lashkari diff --git a/sc/source/ui/view/output2.cxx b/sc/source/ui/view/output2.cxx index 877675c0ac48..859eae2800dc 100644 --- a/sc/source/ui/view/output2.cxx +++ b/sc/source/ui/view/output2.cxx @@ -74,6 +74,7 @@ #include #include #include +#include #include #include @@ -2484,6 +2485,13 @@ bool ScOutputData::DrawEditParam::readCellContent( return true; } +static Color GetConfBackgroundColor() +{ +if (const ScTabViewShell* pTabViewShellBg = ScTabViewShell::GetActiveViewShell()) +return pTabViewShellBg->GetViewRenderingData().GetDocColor(); +return SC_MOD()->GetColorConfig().GetColorValue(svtools::DOCCOLOR).nColor; +} + void ScOutputData::DrawEditParam::setPatternToEngine(bool bUseStyleColor) { // syntax highlighting mode is ignored here @@ -2492,7 +2500,7 @@ void ScOutputData::DrawEditParam::setPatternToEngine(bool bUseStyleColor) if (SfxPoolItem::areSame(mpPattern, mpOldPattern) && mpCondSet == mpOldCondSet && mpPreviewFontSet == mpOldPreviewFontSet ) return; -Color nConfBackColor = SC_MOD()->GetColorConfig().GetColorValue(svtools::DOCCOLOR).nColor; +Color nConfBackColor = GetConfBackgroundColor(); bool bCellContrast = bUseStyleColor && Application::GetSettings().GetStyleSettings().GetHighContrastMode(); @@ -4581,8 +4589,7 @@ void ScOutputData::DrawRotated(bool bPixelToLogic) if (pRowInfo[nRotY].nRotMaxCol != SC_ROTMAX_NONE && pRowInfo[nRotY].nRotMaxCol > nRotMax) nRotMax = pRowInfo[nRotY].nRotMaxCol; -ScModule* pScMod = SC_MOD(); -Color nConfBackColor = pScMod->GetColorConfig().GetColorValue(svtools::DOCCOLOR).nColor; +Color nConfBackColor = GetConfBackgroundColor(); bool bCellContrast = mbUseStyleColor && Application::GetSettings().GetStyleSettings().GetHighContrastMode(); commit 4262eb0cd3bcdedfa53378e641dbb4090a10d4c7 Author: Caolán McNamara AuthorDate: Mon Sep 23 21:02:20 2024 +0100 Commit: Andras Timar CommitDate: Wed Sep 25 07:13:59 2024 +0200 Don't change focus from sd navigator if it will be immediately refocused Instead of grabbing focus away from the treeview, and then grabbing focus back to the treeview (which disrupts the vcl treeview's ability to enter inline editing mode on 2nd click), just don't change focus at all if the focus will end up in the initial location. git show -w is your friend here Change-Id: Idb53fa95495f1819cd121079f3f51c39cc629336 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173830 Tested-by: Jenkins CollaboraOffice Reviewed-by: Miklos Vajna diff --git a/sd/source/ui/dlg/navigatr.cxx b/sd/source/ui/dlg/navigatr.cxx index 8741a2c913b4..88ea5d664108 100644 --- a/sd/source/ui/dlg/navigatr.cxx +++ b/sd/source/ui/dlg/navigatr.cxx @@ -415,33 +415,27 @@ IMPL_LINK_NOARG(SdNavigatorWin, ClickObjectHdl, weld::TreeView&, bool) pDrawView->MarkObj(pCursorEntryObject, pDrawView->GetSdrPageView(), true); } -// moved here from SetGetFocusHdl. Reset the -// focus only if something has been selected in the -// document. -SfxViewShell* pCurSh = SfxViewShell::Current(); - -if ( pCurSh ) +if (mxTlbObjects->IsNavigationGrabsFocus()) { -vcl::Window* pShellWnd = pCurSh->GetWindow(); -if ( pShellWnd ) -pShellWnd->GrabFocus(); -} +// moved here from SetGetFocusHdl. Reset the +// focus only if something has been selected in the +// document. +SfxViewShell* pCurSh = SfxViewShell::Current(); -// We navigated to an object, but the current shell may be -// still the slide sorter. Explicitly try to grab the draw -// shell focus, so follow-up operations work with the object -// and not with the whole slide. -vcl::Window* pWindow = pViewShell->GetActiveWindow(); -if (pWindow) -pWindow->GrabFocus(); +if ( pCurSh
core.git: sc/source
sc/source/ui/view/output2.cxx | 13 ++--- 1 file changed, 10 insertions(+), 3 deletions(-) New commits: commit d17898aafa6f39e1e71959922209656b2243ae67 Author: Caolán McNamara AuthorDate: Tue Sep 24 14:29:16 2024 +0100 Commit: Caolán McNamara CommitDate: Tue Sep 24 20:31:29 2024 +0200 prefer the per-ViewShell rendering data for default document bg color Change-Id: Ie67d6317641d63524c20a3001179ad958ebce300 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173866 Tested-by: Jenkins CollaboraOffice Reviewed-by: Pranam Lashkari (cherry picked from commit 927fd9820bcdbed35b34c7bb7081a19535aa041b) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173795 Tested-by: Jenkins Reviewed-by: Caolán McNamara diff --git a/sc/source/ui/view/output2.cxx b/sc/source/ui/view/output2.cxx index e7079568ddab..db376c5db514 100644 --- a/sc/source/ui/view/output2.cxx +++ b/sc/source/ui/view/output2.cxx @@ -72,6 +72,7 @@ #include #include #include +#include #include #include @@ -2540,6 +2541,13 @@ bool ScOutputData::DrawEditParam::readCellContent( return true; } +static Color GetConfBackgroundColor() +{ +if (const ScTabViewShell* pTabViewShellBg = ScTabViewShell::GetActiveViewShell()) +return pTabViewShellBg->GetViewRenderingData().GetDocColor(); +return SC_MOD()->GetColorConfig().GetColorValue(svtools::DOCCOLOR).nColor; +} + void ScOutputData::DrawEditParam::setPatternToEngine(bool bUseStyleColor) { // syntax highlighting mode is ignored here @@ -2548,7 +2556,7 @@ void ScOutputData::DrawEditParam::setPatternToEngine(bool bUseStyleColor) if (ScPatternAttr::areSame(mpPattern, mpOldPattern) && mpCondSet == mpOldCondSet && mpPreviewFontSet == mpOldPreviewFontSet ) return; -Color nConfBackColor = SC_MOD()->GetColorConfig().GetColorValue(svtools::DOCCOLOR).nColor; +Color nConfBackColor = GetConfBackgroundColor(); bool bCellContrast = bUseStyleColor && Application::GetSettings().GetStyleSettings().GetHighContrastMode(); @@ -4646,8 +4654,7 @@ void ScOutputData::DrawRotated(bool bPixelToLogic) if (pRowInfo[nRotY].nRotMaxCol != SC_ROTMAX_NONE && pRowInfo[nRotY].nRotMaxCol > nRotMax) nRotMax = pRowInfo[nRotY].nRotMaxCol; -ScModule* pScMod = SC_MOD(); -Color nConfBackColor = pScMod->GetColorConfig().GetColorValue(svtools::DOCCOLOR).nColor; +Color nConfBackColor = GetConfBackgroundColor(); bool bCellContrast = mbUseStyleColor && Application::GetSettings().GetStyleSettings().GetHighContrastMode();
core.git: 2 commits - wizards/com
wizards/com/sun/star/wizards/query/Finalizer.java |2 +- wizards/com/sun/star/wizards/report/ReportTextImplementation.java |2 +- wizards/com/sun/star/wizards/text/TextDocument.java |7 ++- wizards/com/sun/star/wizards/ui/UnoDialog.java|7 ++- 4 files changed, 14 insertions(+), 4 deletions(-) New commits: commit efa381c59bf3539b5dba2249e692539056a4162e Author: Caolán McNamara AuthorDate: Tue Sep 24 08:59:24 2024 +0100 Commit: Caolán McNamara CommitDate: Tue Sep 24 18:09:38 2024 +0200 cid#1606653 PA: Public Attribute Change-Id: Iab539e41702f0decc071be13ef02c0fb14b11e63 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173848 Tested-by: Jenkins Reviewed-by: Caolán McNamara diff --git a/wizards/com/sun/star/wizards/query/Finalizer.java b/wizards/com/sun/star/wizards/query/Finalizer.java index a7c82fa55235..0f01ea5070fd 100644 --- a/wizards/com/sun/star/wizards/query/Finalizer.java +++ b/wizards/com/sun/star/wizards/query/Finalizer.java @@ -172,7 +172,7 @@ public class Finalizer public String finish() { String queryName = getTitle(); -if ( CurDBMetaData.getSQLQueryComposer().setQueryCommand( m_queryWizard.xWindow, true, true ) +if ( CurDBMetaData.getSQLQueryComposer().setQueryCommand( m_queryWizard.getWindow(), true, true ) && CurDBMetaData.createQuery( CurDBMetaData.getSQLQueryComposer(), queryName ) ) return queryName; diff --git a/wizards/com/sun/star/wizards/ui/UnoDialog.java b/wizards/com/sun/star/wizards/ui/UnoDialog.java index 837b050954e1..6f3f0cd02f4d 100644 --- a/wizards/com/sun/star/wizards/ui/UnoDialog.java +++ b/wizards/com/sun/star/wizards/ui/UnoDialog.java @@ -42,7 +42,7 @@ public class UnoDialog public XControl xControl; protected XDialog xDialog; public XReschedule xReschedule; -public XWindow xWindow; +protected XWindow xWindow; public XComponent xComponent; public XInterface xDialogModel; private XInterface xUnoDialog; @@ -151,6 +151,11 @@ public class UnoDialog return m_oResource; } +public XWindow getWindow() +{ +return xWindow; +} + public void setControlProperties(String ControlName, String[] PropertyNames, Object[] PropertyValues) { try commit a9889e1aa88dbbd1fd5312d57b73eb4f2957b9c9 Author: Caolán McNamara AuthorDate: Tue Sep 24 08:57:59 2024 +0100 Commit: Caolán McNamara CommitDate: Tue Sep 24 18:09:31 2024 +0200 cid#1606721 PA: Public Attribute Change-Id: I62fbc3ee8fc05facb4c1542706c46266005c363f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173847 Tested-by: Jenkins Reviewed-by: Caolán McNamara diff --git a/wizards/com/sun/star/wizards/report/ReportTextImplementation.java b/wizards/com/sun/star/wizards/report/ReportTextImplementation.java index 1584a2e54ecf..9f8e77cd05ce 100644 --- a/wizards/com/sun/star/wizards/report/ReportTextImplementation.java +++ b/wizards/com/sun/star/wizards/report/ReportTextImplementation.java @@ -454,7 +454,7 @@ public class ReportTextImplementation extends ReportImplementationHelper impleme private XMultiServiceFactory getDocumentServiceFactory() { -return m_aDoc.xMSFDoc; +return m_aDoc.getMSFDoc(); } public void store(String _sName, int _nOpenMode) throws com.sun.star.uno.Exception diff --git a/wizards/com/sun/star/wizards/text/TextDocument.java b/wizards/com/sun/star/wizards/text/TextDocument.java index bc050b07d1b1..79b3262aaeb7 100644 --- a/wizards/com/sun/star/wizards/text/TextDocument.java +++ b/wizards/com/sun/star/wizards/text/TextDocument.java @@ -53,7 +53,7 @@ public class TextDocument protected com.sun.star.task.XStatusIndicator xProgressBar; public com.sun.star.frame.XFrame xFrame; public XText xText; -public XMultiServiceFactory xMSFDoc; +protected XMultiServiceFactory xMSFDoc; public XMultiServiceFactory xMSF; public com.sun.star.awt.XWindowPeer xWindowPeer; @@ -237,6 +237,11 @@ public class TextDocument return xProgressBar; } +public XMultiServiceFactory getMSFDoc() +{ +return xMSFDoc; +} + private Size getPageSize() { try
core.git: 2 commits - wizards/com
wizards/com/sun/star/wizards/db/CommandMetaData.java |7 ++- wizards/com/sun/star/wizards/document/Control.java |7 ++- wizards/com/sun/star/wizards/form/FormControlArranger.java | 10 +- wizards/com/sun/star/wizards/form/StyleApplier.java|8 wizards/com/sun/star/wizards/form/UIControlArranger.java |2 +- wizards/com/sun/star/wizards/query/QueryWizard.java|8 6 files changed, 26 insertions(+), 16 deletions(-) New commits: commit 81d920a9655c29a723b1257996555dc221c0eae3 Author: Caolán McNamara AuthorDate: Tue Sep 24 08:55:53 2024 +0100 Commit: Caolán McNamara CommitDate: Tue Sep 24 18:09:23 2024 +0200 cid#1606722 PA: Public Attribute Change-Id: Icf37c5cc813ef80252f557d8896e163fe90e97b9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173846 Reviewed-by: Caolán McNamara Tested-by: Jenkins diff --git a/wizards/com/sun/star/wizards/db/CommandMetaData.java b/wizards/com/sun/star/wizards/db/CommandMetaData.java index 32a7a4f4be95..cec77c795634 100644 --- a/wizards/com/sun/star/wizards/db/CommandMetaData.java +++ b/wizards/com/sun/star/wizards/db/CommandMetaData.java @@ -56,7 +56,7 @@ public class CommandMetaData extends DBMetaData public String[] NumericFieldNames = new String[] { }; -public String[] NonAggregateFieldNames; +protected String[] NonAggregateFieldNames; private int CommandType; private String Command; private String sIdentifierQuote = PropertyNames.EMPTY_STRING; @@ -115,6 +115,11 @@ public class CommandMetaData extends DBMetaData return m_aAllFieldNames; } +public String[] getNonAggregateFieldNames() +{ +return NonAggregateFieldNames; +} + public XPropertySet getColumnObjectByFieldName(String _FieldName, boolean _bgetByDisplayName) { try diff --git a/wizards/com/sun/star/wizards/query/QueryWizard.java b/wizards/com/sun/star/wizards/query/QueryWizard.java index 471aa4a8594a..442d9e9474df 100644 --- a/wizards/com/sun/star/wizards/query/QueryWizard.java +++ b/wizards/com/sun/star/wizards/query/QueryWizard.java @@ -280,7 +280,7 @@ public class QueryWizard extends DatabaseObjectWizard if (m_DBMetaData.xDBMetaData.supportsGroupBy()) { m_DBMetaData.setGroupFieldNames(m_groupFieldSelection.getSelectedFieldNames()); - m_DBMetaData.setGroupFieldNames(JavaTools.removeOutdatedFields(m_DBMetaData.getGroupFieldNames(), m_DBMetaData.NonAggregateFieldNames)); + m_DBMetaData.setGroupFieldNames(JavaTools.removeOutdatedFields(m_DBMetaData.getGroupFieldNames(), m_DBMetaData.getNonAggregateFieldNames())); m_DBMetaData.GroupByFilterConditions = JavaTools.removeOutdatedFields(m_DBMetaData.GroupByFilterConditions, m_DBMetaData.getGroupFieldNames()); } } @@ -361,9 +361,9 @@ public class QueryWizard extends DatabaseObjectWizard { m_DBMetaData.setNonAggregateFieldNames(); m_groupFieldSelection.initialize(m_DBMetaData.getUniqueAggregateFieldNames(), false, m_DBMetaData.xDBMetaData.getMaxColumnsInGroupBy()); - m_groupFieldSelection.initializeSelectedFields(m_DBMetaData.NonAggregateFieldNames); + m_groupFieldSelection.initializeSelectedFields(m_DBMetaData.getNonAggregateFieldNames()); m_groupFieldSelection.setMultipleMode(false); -setStepEnabled(SOGROUPFILTER_PAGE, m_aggregateComponent.isGroupingpossible() && m_DBMetaData.NonAggregateFieldNames.length > 0); +setStepEnabled(SOGROUPFILTER_PAGE, m_aggregateComponent.isGroupingpossible() && m_DBMetaData.getNonAggregateFieldNames().length > 0); } } } @@ -441,7 +441,7 @@ public class QueryWizard extends DatabaseObjectWizard { boolean bEnabled = (m_groupFieldSelection.getSelectedFieldNames().length > 0); String CurDisplayFieldName = SelItems[0]; -if (JavaTools.FieldInList(m_DBMetaData.NonAggregateFieldNames, CurDisplayFieldName) > -1) +if (JavaTools.FieldInList(m_DBMetaData.getNonAggregateFieldNames(), CurDisplayFieldName) > -1) { showMessageBox("ErrorBox", VclWindowPeerAttribute.OK, resmsgNonNumericAsGroupBy); m_groupFieldSelection.getSelectedFieldsListBox().addItems(SelItems, m_groupFieldSelection.getSelectedFieldsListBox().getItemCount()); commit f3f581b462d45233a37de6636687f2b2c06b388c Author: Caolán McNamara AuthorDate: Tue Sep 24 08:53:33 2024 +0100 Commit: Caolán McNamara CommitDate: Tue Sep 24 18:09:13 2024 +0200 cid#1607022 PA: Public Attribute Change-Id: I0c0a107643b67395a2f4835aab70c58ca6edec
core.git: 2 commits - wizards/com
wizards/com/sun/star/wizards/report/DBColumn.java |7 ++- wizards/com/sun/star/wizards/report/ReportTextDocument.java |4 ++-- wizards/com/sun/star/wizards/ui/UnoDialog.java |2 +- 3 files changed, 9 insertions(+), 4 deletions(-) New commits: commit 3c3657cbabe711d057c09e8869b2751a78c34e3a Author: Caolán McNamara AuthorDate: Tue Sep 24 08:49:48 2024 +0100 Commit: Caolán McNamara CommitDate: Tue Sep 24 18:09:06 2024 +0200 cid#1607041 PA: Public Attribute Change-Id: I991d0213a2f429a89e6b1431d9dc900400b60a96 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173844 Reviewed-by: Caolán McNamara Tested-by: Jenkins diff --git a/wizards/com/sun/star/wizards/report/DBColumn.java b/wizards/com/sun/star/wizards/report/DBColumn.java index e53b0649d271..0c6e36e2219f 100644 --- a/wizards/com/sun/star/wizards/report/DBColumn.java +++ b/wizards/com/sun/star/wizards/report/DBColumn.java @@ -51,7 +51,7 @@ public class DBColumn private boolean bAlignLeft; private String CharFontName; private PropertyState PropertyState; -public int ValColumn = 1; +private int ValColumn = 1; private int ValRow = 0; public FieldColumn CurDBField; private XTextTable xTextTable; @@ -445,4 +445,9 @@ public class DBColumn return true;//most probably this is really the Namecell } } + +public int getValColumn() +{ +return ValColumn; +} } diff --git a/wizards/com/sun/star/wizards/report/ReportTextDocument.java b/wizards/com/sun/star/wizards/report/ReportTextDocument.java index b7f7c2a04de9..62f7391eec8b 100644 --- a/wizards/com/sun/star/wizards/report/ReportTextDocument.java +++ b/wizards/com/sun/star/wizards/report/ReportTextDocument.java @@ -491,11 +491,11 @@ class ReportTextDocument extends com.sun.star.wizards.text.TextDocument implemen { DBColumn oDBColumn1 = getDBColumnByName(oFieldColumn1.getFieldName()); DBColumn oDBColumn2 = getDBColumnByName(oFieldColumn2.getFieldName()); -if (oDBColumn1.ValColumn < oDBColumn2.ValColumn) +if (oDBColumn1.getValColumn() < oDBColumn2.getValColumn()) { return -1; } -else if (oDBColumn1.ValColumn == oDBColumn2.ValColumn) +else if (oDBColumn1.getValColumn() == oDBColumn2.getValColumn()) { return 0; } commit a90d2bcb3d18787e3c9dec9a762d88492a9ba934 Author: Caolán McNamara AuthorDate: Tue Sep 24 08:48:04 2024 +0100 Commit: Caolán McNamara CommitDate: Tue Sep 24 18:08:57 2024 +0200 cid#1607206 PA: Public Attribute Change-Id: I70a2b4fbbde93f9ce839129441a17afe3d2059e7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173843 Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara diff --git a/wizards/com/sun/star/wizards/ui/UnoDialog.java b/wizards/com/sun/star/wizards/ui/UnoDialog.java index 9e5b439fc532..837b050954e1 100644 --- a/wizards/com/sun/star/wizards/ui/UnoDialog.java +++ b/wizards/com/sun/star/wizards/ui/UnoDialog.java @@ -40,7 +40,7 @@ public class UnoDialog XControlContainer xDlgContainer; private XNameAccess m_xDlgNameAccess; public XControl xControl; -public XDialog xDialog; +protected XDialog xDialog; public XReschedule xReschedule; public XWindow xWindow; public XComponent xComponent;
core.git: wizards/com
wizards/com/sun/star/wizards/document/Shape.java|8 ++-- wizards/com/sun/star/wizards/form/FormDocument.java | 12 ++-- 2 files changed, 12 insertions(+), 8 deletions(-) New commits: commit 6f903afd4e94594a396f7e9087bd04c0eb84541c Author: Caolán McNamara AuthorDate: Tue Sep 24 08:47:06 2024 +0100 Commit: Caolán McNamara CommitDate: Tue Sep 24 18:08:41 2024 +0200 cid#1607381 PA: Public Attribute Change-Id: I9aa852422a0ce3daa527599f9d3ed033b5943d04 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173842 Tested-by: Jenkins Reviewed-by: Caolán McNamara diff --git a/wizards/com/sun/star/wizards/document/Shape.java b/wizards/com/sun/star/wizards/document/Shape.java index 72c17d7f84f1..45389fe89c53 100644 --- a/wizards/com/sun/star/wizards/document/Shape.java +++ b/wizards/com/sun/star/wizards/document/Shape.java @@ -36,8 +36,7 @@ import com.sun.star.wizards.common.Helper; */ public class Shape { - -public XShape xShape; +protected XShape xShape; protected FormHandler oFormHandler; public XServiceInfo xServiceInfo; protected Point aPoint; @@ -128,4 +127,9 @@ public class Shape { xShape.setPosition(_aPoint); } + +public XShape getShape() +{ +return xShape; +} } diff --git a/wizards/com/sun/star/wizards/form/FormDocument.java b/wizards/com/sun/star/wizards/form/FormDocument.java index cec2358658c6..810f640e5e36 100644 --- a/wizards/com/sun/star/wizards/form/FormDocument.java +++ b/wizards/com/sun/star/wizards/form/FormDocument.java @@ -368,7 +368,7 @@ public class FormDocument extends TextDocument curArrangement = _curArrangement; if (oGridControl != null) { -oFormHandler.xDrawPage.remove(oGridControl.xShape); +oFormHandler.xDrawPage.remove(oGridControl.getShape()); oGridControl.xComponent.dispose(); oGridControl = null; } @@ -446,7 +446,7 @@ public class FormDocument extends TextDocument { if (curArrangement == FormWizard.AS_GRID) { -return oGridControl.xShape.getSize().Height; +return oGridControl.getSize().Height; } else { @@ -458,7 +458,7 @@ public class FormDocument extends TextDocument { if (curArrangement == FormWizard.AS_GRID) { -return oGridControl.xShape.getPosition().Y; +return oGridControl.getPosition().Y; } else { @@ -543,13 +543,13 @@ public class FormDocument extends TextDocument { if ((oLabelControls[i] != null) && (oDBControls[i] != null)) { -oFormHandler.removeShape(oLabelControls[i].xShape); -oFormHandler.removeShape(oDBControls[i].xShape); + oFormHandler.removeShape(oLabelControls[i].getShape()); + oFormHandler.removeShape(oDBControls[i].getShape()); } } else { -oFormHandler.groupShapesTogether(xMSF, oLabelControls[i].xShape, oDBControls[i].xShape); +oFormHandler.groupShapesTogether(xMSF, oLabelControls[i].getShape(), oDBControls[i].getShape()); } } }
core.git: 2 commits - wizards/com
wizards/com/sun/star/wizards/db/DBMetaData.java |2 +- wizards/com/sun/star/wizards/query/QueryWizard.java |2 +- wizards/com/sun/star/wizards/table/PrimaryKeyHandler.java |2 +- wizards/com/sun/star/wizards/ui/FieldSelection.java |7 ++- 4 files changed, 9 insertions(+), 4 deletions(-) New commits: commit b3a14ae7efa82473998c04d9e23748c878566acf Author: Caolán McNamara AuthorDate: Tue Sep 24 08:43:29 2024 +0100 Commit: Caolán McNamara CommitDate: Tue Sep 24 18:08:33 2024 +0200 cid#1607483 PA: Public Attribute Change-Id: I4712b1523cc54feb3b84b5435960e4d5707735a4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173841 Reviewed-by: Caolán McNamara Tested-by: Jenkins diff --git a/wizards/com/sun/star/wizards/query/QueryWizard.java b/wizards/com/sun/star/wizards/query/QueryWizard.java index 4ecb47072c45..471aa4a8594a 100644 --- a/wizards/com/sun/star/wizards/query/QueryWizard.java +++ b/wizards/com/sun/star/wizards/query/QueryWizard.java @@ -444,7 +444,7 @@ public class QueryWizard extends DatabaseObjectWizard if (JavaTools.FieldInList(m_DBMetaData.NonAggregateFieldNames, CurDisplayFieldName) > -1) { showMessageBox("ErrorBox", VclWindowPeerAttribute.OK, resmsgNonNumericAsGroupBy); - m_groupFieldSelection.xSelectedFieldsListBox.addItems(SelItems, m_groupFieldSelection.xSelectedFieldsListBox.getItemCount()); + m_groupFieldSelection.getSelectedFieldsListBox().addItems(SelItems, m_groupFieldSelection.getSelectedFieldsListBox().getItemCount()); String FieldList[] = m_groupFieldSelection.getFieldsListBox().getItems(); int index = JavaTools.FieldInList(FieldList, CurDisplayFieldName); if (index > -1) diff --git a/wizards/com/sun/star/wizards/ui/FieldSelection.java b/wizards/com/sun/star/wizards/ui/FieldSelection.java index 7c4e912539b8..97f19e4eb108 100644 --- a/wizards/com/sun/star/wizards/ui/FieldSelection.java +++ b/wizards/com/sun/star/wizards/ui/FieldSelection.java @@ -26,7 +26,7 @@ import java.util.*; public class FieldSelection { protected XListBox xFieldsListBox; // Left ListBox -public XListBox xSelectedFieldsListBox; // right (selected) ListBox +protected XListBox xSelectedFieldsListBox; // right (selected) ListBox protected UnoDialog CurUnoDialog; protected String sIncSuffix; @@ -628,6 +628,11 @@ public class FieldSelection return xFieldsListBox; } +public XListBox getSelectedFieldsListBox() +{ +return xSelectedFieldsListBox; +} + public void setModified(boolean _bModified) { bisModified = _bModified; commit 96427ee2e19479fb4a88e08ad176361aaae1a5a6 Author: Caolán McNamara AuthorDate: Tue Sep 24 08:40:34 2024 +0100 Commit: Caolán McNamara CommitDate: Tue Sep 24 18:08:25 2024 +0200 cid#1607639 PA: Public Attribute Change-Id: I58d91c2d89b175dc8b8c062e1e291fe9c5192017 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173840 Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara diff --git a/wizards/com/sun/star/wizards/db/DBMetaData.java b/wizards/com/sun/star/wizards/db/DBMetaData.java index d319af18285a..287d92cd4863 100644 --- a/wizards/com/sun/star/wizards/db/DBMetaData.java +++ b/wizards/com/sun/star/wizards/db/DBMetaData.java @@ -132,7 +132,7 @@ public class DBMetaData private boolean bPasswordIsRequired; private static final int NOLIMIT = 999; private static final int INVALID = 999; -public TypeInspector oTypeInspector; +protected TypeInspector oTypeInspector; private NumberFormatter oNumberFormatter = null; private long lDateCorrection = INVALID; private boolean bdisposeConnection = false; diff --git a/wizards/com/sun/star/wizards/table/PrimaryKeyHandler.java b/wizards/com/sun/star/wizards/table/PrimaryKeyHandler.java index 633eb906e841..e1280768c9a2 100644 --- a/wizards/com/sun/star/wizards/table/PrimaryKeyHandler.java +++ b/wizards/com/sun/star/wizards/table/PrimaryKeyHandler.java @@ -59,7 +59,7 @@ public class PrimaryKeyHandler implements XFieldSelectionListener { this.CurUnoDialog = _CurUnoDialog; curTableDescriptor = _curTableDescriptor; -bAutoPrimaryKeysupportsAutoIncrementation = curTableDescriptor.oTypeInspector.isAutoIncrementationSupported(); +bAutoPrimaryKeysupportsAutoIncrementation = curTableDescriptor.getDBDataTypeInspector().isAutoIncrementationSupported(); short curtabindex = (short) ((TableWizard.SOPRIMARYKEYPAGE * 100) - 20); Integer IPRIMEKEYSTEP = Integer.valueOf(TableWizard.SOPRIMARYKEYPAGE); final String sExplanations = CurUnoDialog.getResource().getResText("RID_TABLE_26");
core.git: 2 commits - wizards/com
wizards/com/sun/star/wizards/db/DBMetaData.java |7 +- wizards/com/sun/star/wizards/db/RecordParser.java | 14 ++-- wizards/com/sun/star/wizards/db/SQLQueryComposer.java |2 - wizards/com/sun/star/wizards/form/FormWizard.java |2 - wizards/com/sun/star/wizards/report/DBColumn.java |4 +-- wizards/com/sun/star/wizards/report/ReportTextDocument.java |4 +-- wizards/com/sun/star/wizards/table/FieldFormatter.java |2 - wizards/com/sun/star/wizards/table/Finalizer.java |2 - wizards/com/sun/star/wizards/table/TableWizard.java |2 - 9 files changed, 27 insertions(+), 12 deletions(-) New commits: commit 5fcc0a0c65a1856a1fb9930b0c64bedeb0a2878a Author: Caolán McNamara AuthorDate: Tue Sep 24 08:39:04 2024 +0100 Commit: Caolán McNamara CommitDate: Tue Sep 24 18:08:06 2024 +0200 cid#1608090 PA: Public Attribute Change-Id: I8ea0d65e01affa7b2a7b787bebcf5bc2ca3b63f3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173839 Reviewed-by: Caolán McNamara Tested-by: Jenkins diff --git a/wizards/com/sun/star/wizards/db/RecordParser.java b/wizards/com/sun/star/wizards/db/RecordParser.java index 4c93a0364a58..53c37032200e 100644 --- a/wizards/com/sun/star/wizards/db/RecordParser.java +++ b/wizards/com/sun/star/wizards/db/RecordParser.java @@ -46,7 +46,7 @@ public class RecordParser extends QueryMetaData private XComponent xRowSetComponent; private XInteractionHandler xInteraction; public FieldColumn[] GroupFieldColumns; -public FieldColumn[] RecordFieldColumns; +private FieldColumn[] RecordFieldColumns; /** Creates a new instance of RecordParser */ public RecordParser(XMultiServiceFactory _xMSF) @@ -55,6 +55,16 @@ public class RecordParser extends QueryMetaData getInterfaces(); } +public FieldColumn[] getRecordFieldColumns() +{ +return RecordFieldColumns; +} + +public void setRecordFieldColumns(FieldColumn[] recordFieldColumns) +{ +RecordFieldColumns = recordFieldColumns; +} + private void getInterfaces() { try diff --git a/wizards/com/sun/star/wizards/report/DBColumn.java b/wizards/com/sun/star/wizards/report/DBColumn.java index 40c01e51490b..e53b0649d271 100644 --- a/wizards/com/sun/star/wizards/report/DBColumn.java +++ b/wizards/com/sun/star/wizards/report/DBColumn.java @@ -79,9 +79,9 @@ public class DBColumn this.CurDBMetaData = _CurDBMetaData; this.CurRecordTable = _CurRecordTable; bIsGroupColumn = false; -if (CurDBMetaData.RecordFieldColumns != null) +if (CurDBMetaData.getRecordFieldColumns() != null) { -CurDBField = CurDBMetaData.getFieldColumnByFieldName(CurDBMetaData.RecordFieldColumns[i].getFieldName()); +CurDBField = CurDBMetaData.getFieldColumnByFieldName(CurDBMetaData.getRecordFieldColumns()[i].getFieldName()); } else { diff --git a/wizards/com/sun/star/wizards/report/ReportTextDocument.java b/wizards/com/sun/star/wizards/report/ReportTextDocument.java index 9d2fa7434b2c..b7f7c2a04de9 100644 --- a/wizards/com/sun/star/wizards/report/ReportTextDocument.java +++ b/wizards/com/sun/star/wizards/report/ReportTextDocument.java @@ -472,14 +472,14 @@ class ReportTextDocument extends com.sun.star.wizards.text.TextDocument implemen DelFieldName }); CurDBMetaData.setRecordFieldNames(aNewList); -CurDBMetaData.RecordFieldColumns = removeFieldColumnByFieldName(DelFieldName, CurDBMetaData.RecordFieldColumns); + CurDBMetaData.setRecordFieldColumns(removeFieldColumnByFieldName(DelFieldName, CurDBMetaData.getRecordFieldColumns())); CurDBMetaData.setFieldColumns(removeFieldColumnByFieldName(DelFieldName, CurDBMetaData.getFieldColumns())); } i--; } } -java.util.Arrays.sort(CurDBMetaData.RecordFieldColumns, this); +java.util.Arrays.sort(CurDBMetaData.getRecordFieldColumns(), this); } catch (Exception exception) { commit 3e831187387c7b3fc584c1164c4497a140911f3c Author: Caolán McNamara AuthorDate: Tue Sep 24 08:34:47 2024 +0100 Commit: Caolán McNamara CommitDate: Tue Sep 24 18:07:56 2024 +0200 cid#1608290 PA: Public Attribute Change-Id: I3fe12f088e6bd2951a9dfdf62b156eb33a44750b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173838 Tested-by: Jenkins Reviewed-by: Caolán McNamara diff --git a/wizards/com/sun/star/wizards/db/DBMetaData.java b/wizards/com/sun/star/wizards/db/DBMetaData.java index 6637f759331c..d319af18285a 100644 --- a/wizards/com/sun/star/wizards/db/DBMetaData.java +++ b/wizards/com/sun/star/wizards/db/DBMetaData.jav
core.git: Branch 'distro/collabora/co-24.04' - sc/source
sc/source/ui/view/output2.cxx | 13 ++--- 1 file changed, 10 insertions(+), 3 deletions(-) New commits: commit 927fd9820bcdbed35b34c7bb7081a19535aa041b Author: Caolán McNamara AuthorDate: Tue Sep 24 14:29:16 2024 +0100 Commit: Pranam Lashkari CommitDate: Tue Sep 24 17:18:20 2024 +0200 prefer the per-ViewShell rendering data for default document bg color Change-Id: Ie67d6317641d63524c20a3001179ad958ebce300 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173866 Tested-by: Jenkins CollaboraOffice Reviewed-by: Pranam Lashkari diff --git a/sc/source/ui/view/output2.cxx b/sc/source/ui/view/output2.cxx index 877675c0ac48..859eae2800dc 100644 --- a/sc/source/ui/view/output2.cxx +++ b/sc/source/ui/view/output2.cxx @@ -74,6 +74,7 @@ #include #include #include +#include #include #include @@ -2484,6 +2485,13 @@ bool ScOutputData::DrawEditParam::readCellContent( return true; } +static Color GetConfBackgroundColor() +{ +if (const ScTabViewShell* pTabViewShellBg = ScTabViewShell::GetActiveViewShell()) +return pTabViewShellBg->GetViewRenderingData().GetDocColor(); +return SC_MOD()->GetColorConfig().GetColorValue(svtools::DOCCOLOR).nColor; +} + void ScOutputData::DrawEditParam::setPatternToEngine(bool bUseStyleColor) { // syntax highlighting mode is ignored here @@ -2492,7 +2500,7 @@ void ScOutputData::DrawEditParam::setPatternToEngine(bool bUseStyleColor) if (SfxPoolItem::areSame(mpPattern, mpOldPattern) && mpCondSet == mpOldCondSet && mpPreviewFontSet == mpOldPreviewFontSet ) return; -Color nConfBackColor = SC_MOD()->GetColorConfig().GetColorValue(svtools::DOCCOLOR).nColor; +Color nConfBackColor = GetConfBackgroundColor(); bool bCellContrast = bUseStyleColor && Application::GetSettings().GetStyleSettings().GetHighContrastMode(); @@ -4581,8 +4589,7 @@ void ScOutputData::DrawRotated(bool bPixelToLogic) if (pRowInfo[nRotY].nRotMaxCol != SC_ROTMAX_NONE && pRowInfo[nRotY].nRotMaxCol > nRotMax) nRotMax = pRowInfo[nRotY].nRotMaxCol; -ScModule* pScMod = SC_MOD(); -Color nConfBackColor = pScMod->GetColorConfig().GetColorValue(svtools::DOCCOLOR).nColor; +Color nConfBackColor = GetConfBackgroundColor(); bool bCellContrast = mbUseStyleColor && Application::GetSettings().GetStyleSettings().GetHighContrastMode();
core.git: Branch 'distro/collabora/co-24.04' - sd/source
sd/source/ui/dlg/navigatr.cxx | 42 ++ sd/source/ui/dlg/sdtreelb.cxx |7 +-- sd/source/ui/inc/sdtreelb.hxx |1 - 3 files changed, 19 insertions(+), 31 deletions(-) New commits: commit 6039a47c4eebb1fe1b319d7bbaaabff54477d918 Author: Caolán McNamara AuthorDate: Mon Sep 23 21:02:20 2024 +0100 Commit: Miklos Vajna CommitDate: Tue Sep 24 14:06:00 2024 +0200 Don't change focus from sd navigator if it will be immediately refocused Instead of grabbing focus away from the treeview, and then grabbing focus back to the treeview (which disrupts the vcl treeview's ability to enter inline editing mode on 2nd click), just don't change focus at all if the focus will end up in the initial location. git show -w is your friend here Change-Id: Idb53fa95495f1819cd121079f3f51c39cc629336 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173830 Tested-by: Jenkins CollaboraOffice Reviewed-by: Miklos Vajna diff --git a/sd/source/ui/dlg/navigatr.cxx b/sd/source/ui/dlg/navigatr.cxx index 8741a2c913b4..88ea5d664108 100644 --- a/sd/source/ui/dlg/navigatr.cxx +++ b/sd/source/ui/dlg/navigatr.cxx @@ -415,33 +415,27 @@ IMPL_LINK_NOARG(SdNavigatorWin, ClickObjectHdl, weld::TreeView&, bool) pDrawView->MarkObj(pCursorEntryObject, pDrawView->GetSdrPageView(), true); } -// moved here from SetGetFocusHdl. Reset the -// focus only if something has been selected in the -// document. -SfxViewShell* pCurSh = SfxViewShell::Current(); - -if ( pCurSh ) +if (mxTlbObjects->IsNavigationGrabsFocus()) { -vcl::Window* pShellWnd = pCurSh->GetWindow(); -if ( pShellWnd ) -pShellWnd->GrabFocus(); -} +// moved here from SetGetFocusHdl. Reset the +// focus only if something has been selected in the +// document. +SfxViewShell* pCurSh = SfxViewShell::Current(); -// We navigated to an object, but the current shell may be -// still the slide sorter. Explicitly try to grab the draw -// shell focus, so follow-up operations work with the object -// and not with the whole slide. -vcl::Window* pWindow = pViewShell->GetActiveWindow(); -if (pWindow) -pWindow->GrabFocus(); +if ( pCurSh ) +{ +vcl::Window* pShellWnd = pCurSh->GetWindow(); +if ( pShellWnd ) +pShellWnd->GrabFocus(); +} -if (!mxTlbObjects->IsNavigationGrabsFocus()) -{ -// This is the case when keyboard navigation inside the -// navigator should continue to work. -if (mxNavigatorDlg) -mxNavigatorDlg->GrabFocus(); -mxTlbObjects->grab_focus(); +// We navigated to an object, but the current shell may be +// still the slide sorter. Explicitly try to grab the draw +// shell focus, so follow-up operations work with the object +// and not with the whole slide. +vcl::Window* pWindow = pViewShell->GetActiveWindow(); +if (pWindow) +pWindow->GrabFocus(); } } } diff --git a/sd/source/ui/dlg/sdtreelb.cxx b/sd/source/ui/dlg/sdtreelb.cxx index ecf2e612051a..abfacd81baea 100644 --- a/sd/source/ui/dlg/sdtreelb.cxx +++ b/sd/source/ui/dlg/sdtreelb.cxx @@ -301,7 +301,6 @@ IMPL_LINK(SdPageObjsTLV, CommandHdl, const CommandEvent&, rCEvt, bool) if (rCEvt.GetCommand() == CommandEventId::ContextMenu) { -m_bMouseReleased = false; m_xTreeView->grab_focus(); // select clicked entry @@ -316,7 +315,6 @@ IMPL_LINK(SdPageObjsTLV, CommandHdl, const CommandEvent&, rCEvt, bool) } bool bRet = m_aPopupMenuHdl.Call(rCEvt); -m_bMouseReleased = true; return bRet; } @@ -357,7 +355,6 @@ IMPL_LINK(SdPageObjsTLV, KeyInputHdl, const KeyEvent&, rKEvt, bool) IMPL_LINK(SdPageObjsTLV, MousePressHdl, const MouseEvent&, rMEvt, bool) { -m_bMouseReleased = false; m_bEditing = false; m_bSelectionHandlerNavigates = rMEvt.GetClicks() == 1; m_bNavigationGrabsFocus = rMEvt.GetClicks() != 1; @@ -366,7 +363,6 @@ IMPL_LINK(SdPageObjsTLV, MousePressHdl, const MouseEvent&, rMEvt, bool) IMPL_LINK_NOARG(SdPageObjsTLV, MouseReleaseHdl, const MouseEvent&, bool) { -m_bMouseReleased = true; if (m_aMouseReleaseHdl.IsSet() && m_aMouseReleaseHdl.Call(MouseEvent()
core.git: connectivity/source
connectivity/source/drivers/hsqldb/StorageNativeInputStream.cxx |3 +++ 1 file changed, 3 insertions(+) New commits: commit 3af9cc7e2514641f2e9a1238ddaaf578271ab832 Author: Caolán McNamara AuthorDate: Tue Sep 24 09:35:13 2024 +0100 Commit: Caolán McNamara CommitDate: Tue Sep 24 13:27:48 2024 +0200 cid#1607586 explicitly return after JNI ThrowNew Change-Id: Ib863d3c9769602088fae8d4d51d0449101979cbd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173850 Tested-by: Jenkins Reviewed-by: Caolán McNamara diff --git a/connectivity/source/drivers/hsqldb/StorageNativeInputStream.cxx b/connectivity/source/drivers/hsqldb/StorageNativeInputStream.cxx index 51468b472bd5..3336c7f78bb0 100644 --- a/connectivity/source/drivers/hsqldb/StorageNativeInputStream.cxx +++ b/connectivity/source/drivers/hsqldb/StorageNativeInputStream.cxx @@ -134,9 +134,12 @@ extern "C" SAL_JNI_EXPORT jlong JNICALL Java_com_sun_star_sdbcx_comp_hsqldb_Stor #endif if ( n < 0 ) +{ ThrowException( env, "java/io/IOException", "n < 0"); +return 0; +} std::shared_ptr pHelper = StorageContainer::getRegisteredStream(env,name,key); OSL_ENSURE(pHelper,"No stream helper!");
core.git: connectivity/source hwpfilter/source tools/source
connectivity/source/drivers/hsqldb/StorageNativeInputStream.cxx |2 +- hwpfilter/source/hcode.cxx |7 +++ tools/source/misc/fix16.cxx |2 +- 3 files changed, 5 insertions(+), 6 deletions(-) New commits: commit c8b5ac2a54af99e32f77aa07dec0dda2be074289 Author: Caolán McNamara AuthorDate: Mon Sep 16 10:01:51 2024 +0100 Commit: Caolán McNamara CommitDate: Tue Sep 24 13:27:26 2024 +0200 cid#1607586 Overflowed return value and cid#1608074 Overflowed return value cid#1607598 Overflowed return value Change-Id: Ib884c10083c01578a7a0926d5f2f3c2d1f7501c1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173833 Tested-by: Caolán McNamara Reviewed-by: Caolán McNamara diff --git a/connectivity/source/drivers/hsqldb/StorageNativeInputStream.cxx b/connectivity/source/drivers/hsqldb/StorageNativeInputStream.cxx index ebf3700c667d..51468b472bd5 100644 --- a/connectivity/source/drivers/hsqldb/StorageNativeInputStream.cxx +++ b/connectivity/source/drivers/hsqldb/StorageNativeInputStream.cxx @@ -156,7 +156,7 @@ extern "C" SAL_JNI_EXPORT jlong JNICALL Java_com_sun_star_sdbcx_comp_hsqldb_Stor if (tmpLongVal > std::numeric_limits::max() ) tmpIntVal = std::numeric_limits::max(); else // Casting is safe here. -tmpIntVal = static_cast(tmpLongVal); +tmpIntVal = static_cast(tmpLongVal & 0x); tmpLongVal -= tmpIntVal; diff --git a/hwpfilter/source/hcode.cxx b/hwpfilter/source/hcode.cxx index 82930d0ba466..8bb22e06c956 100644 --- a/hwpfilter/source/hcode.cxx +++ b/hwpfilter/source/hcode.cxx @@ -450,24 +450,23 @@ static hchar s_hh2kssm(hchar hh) if (hh >= HCA_TG) return sal::static_int_cast(hhtg_tg[hh - HCA_TG]); if (idx == 0x1F) -hh = hh - 0x1F00 + 0x360; +hh = (hh - 0x1F00 + 0x360) & 0x; else { hh -= HCA_KSS; if (hh >= 0x360) hh += 0xC0; } -idx = hh / 0xC0 + 217; +idx = (hh / 0xC0 + 217) & 0x; i = hh % 0xC0; if (i >= 95) i -= 2; i += 48; if (i >= 127) i += 18; -return (idx << 8) | i; +return ((idx << 8) | i) & 0x; } - static hchar lineCharConv(hchar ch) { int flag; diff --git a/tools/source/misc/fix16.cxx b/tools/source/misc/fix16.cxx index 951049de..b726acb8f660 100644 --- a/tools/source/misc/fix16.cxx +++ b/tools/source/misc/fix16.cxx @@ -70,7 +70,7 @@ fix16_t fix16_mul(fix16_t inArg0, fix16_t inArg1) return fix16_overflow; } -fix16_t result = static_cast(product >> 16); +fix16_t result = (product >> 16) & 0x; result += (product & 0x8000) >> 15; return result;
core.git: dbaccess/source sw/source
dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx |2 +- sw/source/core/doc/DocumentRedlineManager.cxx |2 +- sw/source/core/doc/ftnidx.cxx | 10 +++--- 3 files changed, 9 insertions(+), 5 deletions(-) New commits: commit c46c109204675d9a04ed16b8c53fdba71519ef4a Author: Caolán McNamara AuthorDate: Sun Sep 22 20:36:24 2024 +0100 Commit: Caolán McNamara CommitDate: Tue Sep 24 10:12:44 2024 +0200 cid#1607535 silence Overflowed constant and cid#1608504 Overflowed constant cid#1607518 Overflowed constant Change-Id: Ife45a2f414ea703f627b7083d746bc11f6d4f359 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173832 Tested-by: Jenkins Reviewed-by: Caolán McNamara diff --git a/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx b/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx index befb38b6812d..b674baa0b916 100644 --- a/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx +++ b/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx @@ -1618,7 +1618,7 @@ OTableFieldDescRef OSelectionBrowseBox::FindFirstFreeCol(sal_uInt16& _rColumnPos for (auto const& field : getFields()) { -++_rColumnPosition; +_rColumnPosition = static_cast(_rColumnPosition + 1); OTableFieldDescRef pEntry = field; if ( pEntry.is() && pEntry->IsEmpty() ) return pEntry; diff --git a/sw/source/core/doc/DocumentRedlineManager.cxx b/sw/source/core/doc/DocumentRedlineManager.cxx index 8be40de4c498..411727e1880f 100644 --- a/sw/source/core/doc/DocumentRedlineManager.cxx +++ b/sw/source/core/doc/DocumentRedlineManager.cxx @@ -1404,7 +1404,7 @@ DocumentRedlineManager::AppendRedline(SwRangeRedline* pNewRedl, bool const bCall bool bCompress = false; SwRedlineTable::size_type n = 0; // look up the first Redline for the starting position -if( !GetRedline( *pStt, &n ) && n ) +if( !GetRedline( *pStt, &n ) && n > 0 ) --n; const SwRedlineTable::size_type nStartPos = n; bool bDec = false; diff --git a/sw/source/core/doc/ftnidx.cxx b/sw/source/core/doc/ftnidx.cxx index 81f6378c5a49..c96bda71f04f 100644 --- a/sw/source/core/doc/ftnidx.cxx +++ b/sw/source/core/doc/ftnidx.cxx @@ -135,8 +135,12 @@ void SwFootnoteIdxs::UpdateFootnote( const SwNode& rStt ) { // Step forward until the Index is not the same anymore const SwNode* pCmpNd = &rStt; -while( nPos && pCmpNd == &((*this)[ --nPos ]->GetTextNode()) ) -; +while (nPos > 0) +{ +--nPos; +if (pCmpNd != &((*this)[nPos]->GetTextNode())) +break; +} ++nPos; } @@ -146,7 +150,7 @@ void SwFootnoteIdxs::UpdateFootnote( const SwNode& rStt ) if( rOutlNds.empty() ) { nFootnoteNo = nPos+1; -if (nPos) +if (nPos > 0) { nFootnoteNoHidden = (*this)[nPos - 1]->GetFootnote().GetNumberRLHidden() + 1; }
core.git: sd/source
sd/source/ui/dlg/navigatr.cxx | 42 ++ sd/source/ui/dlg/sdtreelb.cxx |7 +-- sd/source/ui/inc/sdtreelb.hxx |1 - 3 files changed, 19 insertions(+), 31 deletions(-) New commits: commit 6c37d95fbbcc97c2dc824ecee8369140a6442980 Author: Caolán McNamara AuthorDate: Mon Sep 23 21:02:20 2024 +0100 Commit: Caolán McNamara CommitDate: Tue Sep 24 09:30:11 2024 +0200 Don't change focus from sd navigator if it will be immediately refocused Instead of grabbing focus away from the treeview, and then grabbing focus back to the treeview (which disrupts the vcl treeview's ability to enter inline editing mode on 2nd click), just don't change focus at all if the focus will up in the initial location. git show -w is your friend here Change-Id: Idb53fa95495f1819cd121079f3f51c39cc629336 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173829 Tested-by: Jenkins Reviewed-by: Caolán McNamara Reviewed-by: Jim Raykowski diff --git a/sd/source/ui/dlg/navigatr.cxx b/sd/source/ui/dlg/navigatr.cxx index ff38bfbb2bc7..c6eed54865a8 100644 --- a/sd/source/ui/dlg/navigatr.cxx +++ b/sd/source/ui/dlg/navigatr.cxx @@ -464,33 +464,27 @@ IMPL_LINK_NOARG(SdNavigatorWin, ClickObjectHdl, weld::TreeView&, bool) // state update. mpBindings->Update(); -// moved here from SetGetFocusHdl. Reset the -// focus only if something has been selected in the -// document. -SfxViewShell* pCurSh = SfxViewShell::Current(); - -if ( pCurSh ) +if (mxTlbObjects->IsNavigationGrabsFocus()) { -vcl::Window* pShellWnd = pCurSh->GetWindow(); -if ( pShellWnd ) -pShellWnd->GrabFocus(); -} +// moved here from SetGetFocusHdl. Reset the +// focus only if something has been selected in the +// document. +SfxViewShell* pCurSh = SfxViewShell::Current(); -// We navigated to an object, but the current shell may be -// still the slide sorter. Explicitly try to grab the draw -// shell focus, so follow-up operations work with the object -// and not with the whole slide. -vcl::Window* pWindow = pViewShell->GetActiveWindow(); -if (pWindow) -pWindow->GrabFocus(); +if ( pCurSh ) +{ +vcl::Window* pShellWnd = pCurSh->GetWindow(); +if ( pShellWnd ) +pShellWnd->GrabFocus(); +} -if (!mxTlbObjects->IsNavigationGrabsFocus()) -{ -// This is the case when keyboard navigation inside the -// navigator should continue to work. -if (mxNavigatorDlg) -mxNavigatorDlg->GrabFocus(); -mxTlbObjects->grab_focus(); +// We navigated to an object, but the current shell may be +// still the slide sorter. Explicitly try to grab the draw +// shell focus, so follow-up operations work with the object +// and not with the whole slide. +vcl::Window* pWindow = pViewShell->GetActiveWindow(); +if (pWindow) +pWindow->GrabFocus(); } } } diff --git a/sd/source/ui/dlg/sdtreelb.cxx b/sd/source/ui/dlg/sdtreelb.cxx index 7eb476cfb48b..69001315e936 100644 --- a/sd/source/ui/dlg/sdtreelb.cxx +++ b/sd/source/ui/dlg/sdtreelb.cxx @@ -306,7 +306,6 @@ IMPL_LINK(SdPageObjsTLV, CommandHdl, const CommandEvent&, rCEvt, bool) if (rCEvt.GetCommand() == CommandEventId::ContextMenu) { -m_bMouseReleased = false; m_xTreeView->grab_focus(); // select clicked entry @@ -321,7 +320,6 @@ IMPL_LINK(SdPageObjsTLV, CommandHdl, const CommandEvent&, rCEvt, bool) } bool bRet = m_aPopupMenuHdl.Call(rCEvt); -m_bMouseReleased = true; return bRet; } @@ -362,7 +360,6 @@ IMPL_LINK(SdPageObjsTLV, KeyInputHdl, const KeyEvent&, rKEvt, bool) IMPL_LINK(SdPageObjsTLV, MousePressHdl, const MouseEvent&, rMEvt, bool) { -m_bMouseReleased = false; m_bEditing = false; m_bSelectionHandlerNavigates = rMEvt.GetClicks() == 1; m_bNavigationGrabsFocus = rMEvt.GetClicks() != 1; @@ -371,7 +368,6 @@ IMPL_LINK(SdPageObjsTLV, MousePressHdl, const MouseEvent&, rMEvt, bool) IMPL_LINK_NOARG(SdPageObjsTLV, MouseReleaseHdl, const MouseEvent&, bool) { -m_bMouseReleased = true; if (m_aMouseReleaseHdl.IsSet() && m_aMouseReleaseHdl.Call(MouseEvent())) return false;
core.git: 3 commits - codemaker/source sd/source unodevtools/source unotools/source wizards/com xmloff/source
codemaker/source/netmaker/netproduce.cxx|3 ++- sd/source/core/stlpool.cxx |4 ++-- unodevtools/source/skeletonmaker/cpptypemaker.cxx |4 +++- unotools/source/config/bootstrap.cxx|4 +++- wizards/com/sun/star/wizards/form/FormWizard.java | 20 ++-- wizards/com/sun/star/wizards/text/TextDocument.java |7 ++- xmloff/source/core/xmlmultiimagehelper.cxx |4 +++- 7 files changed, 29 insertions(+), 17 deletions(-) New commits: commit 08964038e1432bcda91de1a7e5454ab4e8b114a8 Author: Caolán McNamara AuthorDate: Sun Sep 22 20:21:01 2024 +0100 Commit: Caolán McNamara CommitDate: Mon Sep 23 09:32:54 2024 +0200 cid#1607989 Overflowed constant and cid#1607976 Overflowed constant cid#1607855 Overflowed constant cid#1607731 Overflowed constant Change-Id: I18e8ffb8a9b5a55e0ecb71862549a94ff5c2fc1a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173781 Tested-by: Jenkins Reviewed-by: Caolán McNamara diff --git a/codemaker/source/netmaker/netproduce.cxx b/codemaker/source/netmaker/netproduce.cxx index d1fa788f28de..ab3495b9e641 100644 --- a/codemaker/source/netmaker/netproduce.cxx +++ b/codemaker/source/netmaker/netproduce.cxx @@ -1204,7 +1204,8 @@ OString NetProducer::getNetName(std::string_view name) // if polymorphic, process parameters too if (fullNameView.ends_with('>')) { -size_t start = fullNameView.find_first_of('<') + 1; +const std::string_view::size_type nFirstAngle = fullNameView.find_first_of('<'); +size_t start = (nFirstAngle != std::string_view::npos) ? (nFirstAngle + 1) : 0; size_t end = fullNameView.size() - 1; buffer.append(fullNameView.substr(0, start)); OString params(fullNameView.substr(start, end - start)); diff --git a/unodevtools/source/skeletonmaker/cpptypemaker.cxx b/unodevtools/source/skeletonmaker/cpptypemaker.cxx index 1423f2739a5b..5432957b9e86 100644 --- a/unodevtools/source/skeletonmaker/cpptypemaker.cxx +++ b/unodevtools/source/skeletonmaker/cpptypemaker.cxx @@ -68,7 +68,9 @@ static void printType( if (sort == codemaker::UnoType::Sort::Enum) { auto pEnumTypeEntity(dynamic_cast(entity.get())); assert(pEnumTypeEntity); -o << OUString(nucleus.substr(nucleus.rfind('.') + 1)) << "_" +const std::string_view::size_type nLastDot = nucleus.rfind('.'); +const auto nAfterDot = (nLastDot != std::string_view::npos) ? (nLastDot + 1) : 0; +o << OUString(nucleus.substr(nAfterDot)) << "_" << pEnumTypeEntity->getMembers()[0].name; } return; diff --git a/unotools/source/config/bootstrap.cxx b/unotools/source/config/bootstrap.cxx index 5dcf43ee2942..8804a2229f36 100644 --- a/unotools/source/config/bootstrap.cxx +++ b/unotools/source/config/bootstrap.cxx @@ -415,7 +415,9 @@ char const PERIOD[] = ". "; static void addFileError(OUStringBuffer& _rBuf, std::u16string_view _aPath, AsciiString _sWhat) { -std::u16string_view sSimpleFileName = _aPath.substr(1 +_aPath.rfind(cURLSeparator)); +const std::string_view::size_type nLastSep = _aPath.rfind(cURLSeparator); +const auto nAfterSep = (nLastSep != std::string_view::npos) ? (nLastSep + 1) : 0; +std::u16string_view sSimpleFileName = _aPath.substr(nAfterSep); _rBuf.append("The configuration file"); _rBuf.append(OUString::Concat(" '") + sSimpleFileName + "' "); diff --git a/xmloff/source/core/xmlmultiimagehelper.cxx b/xmloff/source/core/xmlmultiimagehelper.cxx index 99e4b1f6080d..87b38a5bc13d 100644 --- a/xmloff/source/core/xmlmultiimagehelper.cxx +++ b/xmloff/source/core/xmlmultiimagehelper.cxx @@ -31,7 +31,9 @@ namespace OUString sMimeType; if (o3tl::starts_with(rString, u"vnd.sun.star.Package")) { -OString aExtension = OUStringToOString(rString.substr(rString.rfind('.') + 1), RTL_TEXTENCODING_ASCII_US); +const std::string_view::size_type nLastDot = rString.rfind('.'); +const auto nAfterDot = (nLastDot != std::string_view::npos) ? (nLastDot + 1) : 0; +OString aExtension = OUStringToOString(rString.substr(nAfterDot), RTL_TEXTENCODING_ASCII_US); sMimeType = comphelper::GraphicMimeTypeHelper::GetMimeTypeForExtension(aExtension); } return sMimeType; commit dcde476695d287d836e74a1cb5cc42379aa6a469 Author: Caolán McNamara AuthorDate: Sun Sep 22 20:14:39 2024 +0100 Commit: Caolán McNamara CommitDate: Mon Sep 23 09:32:46 2024 +0200 SfxStyleSheetBase::GetHelpId return sal_uInt32 Change-Id: I52c5ed939fd4cf26bf9f94651681650047f90030 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173780 Reviewed-by: Caolán McNamara Tested-by: Jenkins diff --git a/sd/source/core/stlpool.cxx b/sd/source/core/stlpool.cxx index 0c6e45677c08..8ab0716d533
core.git: 3 commits - sd/source sw/source wizards/com
sd/source/filter/ppt/propread.cxx | 4 +-- sw/source/core/fields/cellfml.cxx | 2 - wizards/com/sun/star/wizards/db/CommandMetaData.java| 12 +- wizards/com/sun/star/wizards/form/FormControlArranger.java | 2 - wizards/com/sun/star/wizards/form/FormDocument.java | 8 +- wizards/com/sun/star/wizards/query/QueryWizard.java | 4 +-- wizards/com/sun/star/wizards/report/ReportTextDocument.java | 4 +-- wizards/com/sun/star/wizards/report/ReportTextImplementation.java | 2 - wizards/com/sun/star/wizards/reportbuilder/ReportBuilderImplementation.java | 4 +-- wizards/com/sun/star/wizards/ui/FieldSelection.java | 7 + 10 files changed, 34 insertions(+), 15 deletions(-) New commits: commit a48511a90ccbb1c04c97e278490c4fb713b60254 Author: Caolán McNamara AuthorDate: Sun Sep 22 19:33:35 2024 +0100 Commit: Caolán McNamara CommitDate: Sun Sep 22 22:29:32 2024 +0200 cid#1607483 PA: Public Attribute Change-Id: Ib31c45ffb51db8ec7b3a8c8809b212515cee0437 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173777 Reviewed-by: Caolán McNamara Tested-by: Jenkins diff --git a/wizards/com/sun/star/wizards/query/QueryWizard.java b/wizards/com/sun/star/wizards/query/QueryWizard.java index d9ef71027117..4ecb47072c45 100644 --- a/wizards/com/sun/star/wizards/query/QueryWizard.java +++ b/wizards/com/sun/star/wizards/query/QueryWizard.java @@ -445,11 +445,11 @@ public class QueryWizard extends DatabaseObjectWizard { showMessageBox("ErrorBox", VclWindowPeerAttribute.OK, resmsgNonNumericAsGroupBy); m_groupFieldSelection.xSelectedFieldsListBox.addItems(SelItems, m_groupFieldSelection.xSelectedFieldsListBox.getItemCount()); -String FieldList[] = m_groupFieldSelection.xFieldsListBox.getItems(); +String FieldList[] = m_groupFieldSelection.getFieldsListBox().getItems(); int index = JavaTools.FieldInList(FieldList, CurDisplayFieldName); if (index > -1) { - m_groupFieldSelection.xFieldsListBox.removeItems((short) index, (short) 1); + m_groupFieldSelection.getFieldsListBox().removeItems((short) index, (short) 1); } } else diff --git a/wizards/com/sun/star/wizards/ui/FieldSelection.java b/wizards/com/sun/star/wizards/ui/FieldSelection.java index dc9f83dbec7c..7c4e912539b8 100644 --- a/wizards/com/sun/star/wizards/ui/FieldSelection.java +++ b/wizards/com/sun/star/wizards/ui/FieldSelection.java @@ -25,7 +25,7 @@ import java.util.*; public class FieldSelection { -public XListBox xFieldsListBox; // Left ListBox +protected XListBox xFieldsListBox; // Left ListBox public XListBox xSelectedFieldsListBox; // right (selected) ListBox protected UnoDialog CurUnoDialog; @@ -623,6 +623,11 @@ public class FieldSelection CurUnoDialog.setControlProperty("lstFields" + sIncSuffix, PropertyNames.STRING_ITEM_LIST, sleftboxfieldnames); } +public XListBox getFieldsListBox() +{ +return xFieldsListBox; +} + public void setModified(boolean _bModified) { bisModified = _bModified; commit 77e1eadff7a221d0c26cf1021d3a896a9c6ccfe4 Author: Caolán McNamara AuthorDate: Sun Sep 22 19:30:54 2024 +0100 Commit: Caolán McNamara CommitDate: Sun Sep 22 22:29:25 2024 +0200 cid#1608290 PA: Public Attribute Change-Id: Id4afe36a78851205d79850800407966387cc43fb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173776 Tested-by: Jenkins Reviewed-by: Caolán McNamara diff --git a/wizards/com/sun/star/wizards/db/CommandMetaData.java b/wizards/com/sun/star/wizards/db/CommandMetaData.java index 60d555d94066..32a7a4f4be95 100644 --- a/wizards/com/sun/star/wizards/db/CommandMetaData.java +++ b/wizards/com/sun/star/wizards/db/CommandMetaData.java @@ -38,7 +38,7 @@ public class CommandMetaData extends DBMetaData protected String[] m_aAllFieldNames = new String[] { }; -public FieldColumn[] FieldColumns = new FieldColumn[] +protected FieldColumn[] FieldColumns = new FieldColumn[] { }; private String[] GroupFieldNames = new String[] @@ -261,6 +261,16 @@ public class CommandMetaData extends DBMetaData throw new com.sun.star.uno.RuntimeException(); } +public FieldColumn[] getFieldColumns() +{ +return FieldColumns; +} + +public void setFieldColumns(FieldColumn[] _fieldColumns) +{ +FieldColumns = _fieldColumns; +} + public boolean getFieldNamesOfCommand(String _commandn
core.git: sw/source
sw/source/ui/dbui/mmaddressblockpage.cxx | 16 +--- 1 file changed, 9 insertions(+), 7 deletions(-) New commits: commit 4605d36e7ee5ebe4776ab4bc78b255ac5f33c3ab Author: Caolán McNamara AuthorDate: Fri Sep 20 20:27:32 2024 +0100 Commit: Caolán McNamara CommitDate: Sun Sep 22 20:11:03 2024 +0200 cid#1607080 Overflowed constant this doesn't make any sense to me with: m_xEditEngine->GetText(nParaCount - 1) before a check against non-0 nParaCount int nPara = nParaCount ? nParaCount - 1 : 0; surely GetText(nParaCount - 1) can at best return an empty string like this since: commit c9596fa3c6e7137ad9c4f8cdaa69c625d37e7bc6 CommitDate: Mon Mar 7 16:35:17 2005 + INTEGRATION: CWS os49 (1.4.84); FILE MERGED Change-Id: I6c605f27fee0b8c9f58a0e2bc7bc975a2efd1f8c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173750 Tested-by: Jenkins Reviewed-by: Caolán McNamara diff --git a/sw/source/ui/dbui/mmaddressblockpage.cxx b/sw/source/ui/dbui/mmaddressblockpage.cxx index 72a407ae0b87..a6d6cb10d4b3 100644 --- a/sw/source/ui/dbui/mmaddressblockpage.cxx +++ b/sw/source/ui/dbui/mmaddressblockpage.cxx @@ -1160,15 +1160,17 @@ void AddressMultiLineEdit::SetText( const OUString& rStr ) } // add two empty paragraphs at the end -if(m_pParentDialog->m_eType == SwCustomizeAddressBlockDialog::ADDRESSBLOCK_NEW || -m_pParentDialog->m_eType == SwCustomizeAddressBlockDialog::ADDRESSBLOCK_EDIT) +if (nParaCount > 0) { -sal_Int32 nLastLen = m_xEditEngine->GetText(nParaCount - 1).getLength(); -if(nLastLen) +if(m_pParentDialog->m_eType == SwCustomizeAddressBlockDialog::ADDRESSBLOCK_NEW || +m_pParentDialog->m_eType == SwCustomizeAddressBlockDialog::ADDRESSBLOCK_EDIT) { -int nPara = nParaCount ? nParaCount - 1 : 0; -ESelection aPaM(nPara, nLastLen, nPara, nLastLen); -m_xEditEngine->QuickInsertText(u" "_ustr, aPaM); +sal_Int32 nLastLen = m_xEditEngine->GetText(nParaCount - 1).getLength(); +if (nLastLen) +{ +ESelection aPaM(nParaCount - 1, nLastLen, nParaCount - 1, nLastLen); +m_xEditEngine->QuickInsertText(u" "_ustr, aPaM); +} } }
core.git: l10ntools/source unodevtools/source
l10ntools/source/treemerge.cxx|5 - unodevtools/source/skeletonmaker/cpptypemaker.cxx |3 ++- 2 files changed, 6 insertions(+), 2 deletions(-) New commits: commit 490e64cdc890c5998d54d4ad3c3ac85e7e8e3bee Author: Caolán McNamara AuthorDate: Fri Sep 20 20:19:49 2024 +0100 Commit: Caolán McNamara CommitDate: Sun Sep 22 20:10:23 2024 +0200 cid#1607175 Overflowed constant and cid#1606656 Overflowed constant Change-Id: I278d3745ca5d22defde8ab268e644e9ee312a3cd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173751 Tested-by: Jenkins Reviewed-by: Caolán McNamara diff --git a/l10ntools/source/treemerge.cxx b/l10ntools/source/treemerge.cxx index 47bfec04ef46..5dc6455e7018 100644 --- a/l10ntools/source/treemerge.cxx +++ b/l10ntools/source/treemerge.cxx @@ -71,9 +71,12 @@ namespace const auto nAfterSlash = (nFirstSlash != std::string_view::npos) ? (nFirstSlash + 1) : 0; // Update id attribute of topic { +std::u16string_view::size_type nXhpSlash = rXhpRoot.rfind('/'); +const auto nAfterXhpSlash = (nXhpSlash != std::u16string_view::npos) ? (nXhpSlash + 1) : 0; + OString sNewID = OString::Concat(sID.subView( 0, nAfterSlash )) + -rXhpRoot.substr( rXhpRoot.rfind('/') + 1 ) + +rXhpRoot.substr( nAfterXhpSlash ) + sID.subView( sID.indexOf( '/', nAfterSlash ) ); xmlSetProp( pReturn, reinterpret_cast("id"), diff --git a/unodevtools/source/skeletonmaker/cpptypemaker.cxx b/unodevtools/source/skeletonmaker/cpptypemaker.cxx index 481299c2e1c2..1423f2739a5b 100644 --- a/unodevtools/source/skeletonmaker/cpptypemaker.cxx +++ b/unodevtools/source/skeletonmaker/cpptypemaker.cxx @@ -265,7 +265,8 @@ static void printConstructor( rtl::Reference< unoidl::Entity > const & entity, std::u16string_view name, std::vector< OUString > const & arguments) { -o << "public " << OUString(name.substr(name.rfind('.') + 1)) << '('; +std::u16string_view::size_type pos = name.rfind('.'); +o << "public " << OUString(name.substr((pos != std::u16string_view::npos) ? pos + 1 : 0)) << '('; printConstructorParameters( o, options, manager, sort, entity, name, arguments); o << "); ";
core.git: 2 commits - connectivity/source sw/source vcl/source
connectivity/source/drivers/dbase/DIndexIter.cxx |2 +- sw/source/core/doc/docredln.cxx |5 - vcl/source/treelist/treelist.cxx |1 + 3 files changed, 6 insertions(+), 2 deletions(-) New commits: commit 5f6cd97220fca3d00647a5a1641f2e3f8b9f3533 Author: Caolán McNamara AuthorDate: Fri Sep 20 20:18:11 2024 +0100 Commit: Caolán McNamara CommitDate: Sat Sep 21 22:34:01 2024 +0200 cid#1607193 silence Overflowed constant Change-Id: If3728d8b5410c26637411335ac2bb28a29a55fc3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173749 Reviewed-by: Caolán McNamara Tested-by: Jenkins diff --git a/connectivity/source/drivers/dbase/DIndexIter.cxx b/connectivity/source/drivers/dbase/DIndexIter.cxx index 5420d044d5c6..35f5862b1bc2 100644 --- a/connectivity/source/drivers/dbase/DIndexIter.cxx +++ b/connectivity/source/drivers/dbase/DIndexIter.cxx @@ -109,7 +109,7 @@ ONDXKey* OIndexIterator::GetFirstKey(ONDXPage* pPage, const OOperand& rKey) pFoundKey = nullptr; m_aCurLeaf = pPage; -m_nCurNode = pFoundKey ? i : i - 1; +m_nCurNode = pFoundKey ? i : sal_uInt16(i - 1); } return pFoundKey; } commit 08db0792562f23be138c56e347a6c3121ad1512c Author: Caolán McNamara AuthorDate: Fri Aug 30 09:26:32 2024 +0100 Commit: Caolán McNamara CommitDate: Sat Sep 21 22:33:50 2024 +0200 cid#1607013 silence Overflowed return value and cid#1607569 Overflowed return value Change-Id: Ie83b1e4c9942e5d74b23c5ef00032d0a8721d982 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173742 Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara diff --git a/sw/source/core/doc/docredln.cxx b/sw/source/core/doc/docredln.cxx index f6ef057d4ae5..c1b9d8f9d74a 100644 --- a/sw/source/core/doc/docredln.cxx +++ b/sw/source/core/doc/docredln.cxx @@ -778,11 +778,14 @@ SwRedlineTable::size_type SwRedlineTable::FindPrevSeqNo( sal_uInt16 nSeqNo, size ++nSttPos; while( nSttPos > nEnd ) -if( nSeqNo == operator[]( --nSttPos )->GetSeqNo() ) +{ +--nSttPos; +if( nSeqNo == operator[](nSttPos)->GetSeqNo() ) { nRet = nSttPos; break; } +} } return nRet; } diff --git a/vcl/source/treelist/treelist.cxx b/vcl/source/treelist/treelist.cxx index 3c9079cb68cb..50003c621fe7 100644 --- a/vcl/source/treelist/treelist.cxx +++ b/vcl/source/treelist/treelist.cxx @@ -431,6 +431,7 @@ sal_uInt32 SvTreeList::GetVisibleChildCount(const SvListView* pView, SvTreeListE pParent = NextVisible( pView, pParent, &nActDepth ); nCount++; } while( pParent && nRefDepth < nActDepth ); +assert(nCount >= 1 && "given do...while"); nCount--; return nCount; }
core.git: 2 commits - connectivity/source oox/source sd/qa sw/source test/source
connectivity/source/drivers/dbase/dindexnode.cxx |2 oox/source/export/shapes.cxx | 15 ++--- sd/qa/unit/export-tests-ooxml4.cxx |3 - sw/source/core/access/accmap.cxx |2 sw/source/core/text/txtfrm.cxx |2 sw/source/uibase/utlui/navipi.cxx|6 +- test/source/bootstrapfixture.cxx | 58 ++- 7 files changed, 69 insertions(+), 19 deletions(-) New commits: commit e2bf07ea2553acf204f94c90bb4f547b15b12861 Author: Caolán McNamara AuthorDate: Thu Sep 19 12:53:19 2024 +0100 Commit: Caolán McNamara CommitDate: Sat Sep 21 22:33:24 2024 +0200 cid#1607126 silence Overflowed constant and cid#1607075 Overflowed constant cid#1606969 Overflowed constant cid#1606652 Overflowed constant Change-Id: I7f7ee294438b73785b4005eb529bda98fdddfc97 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173741 Tested-by: Jenkins Reviewed-by: Caolán McNamara diff --git a/connectivity/source/drivers/dbase/dindexnode.cxx b/connectivity/source/drivers/dbase/dindexnode.cxx index 6eb435765fa6..6857679c98f1 100644 --- a/connectivity/source/drivers/dbase/dindexnode.cxx +++ b/connectivity/source/drivers/dbase/dindexnode.cxx @@ -168,7 +168,7 @@ bool ONDXPage::Find(const ONDXKey& rKey) else if (i == nCount) { rIndex.m_aCurLeaf = this; -rIndex.m_nCurNode = i - 1; +rIndex.m_nCurNode = sal_uInt16(i - 1); bResult = false; } else diff --git a/sw/source/core/access/accmap.cxx b/sw/source/core/access/accmap.cxx index ebcd334825a6..ab44250bca8c 100644 --- a/sw/source/core/access/accmap.cxx +++ b/sw/source/core/access/accmap.cxx @@ -1282,7 +1282,7 @@ void SwAccessibleMap::InvalidateShapeInParaSelection() { SwAccessibleObjShape_Impl *pShape = pShapes.get(); size_t nNumShapes = nShapes; -while( nNumShapes ) +while (nNumShapes > 0) { if( pShape < pSelShape && (pShape->first==(*aIter).first) ) { diff --git a/sw/source/core/text/txtfrm.cxx b/sw/source/core/text/txtfrm.cxx index 8ab7ca61d2e5..fbd3a3891fbb 100644 --- a/sw/source/core/text/txtfrm.cxx +++ b/sw/source/core/text/txtfrm.cxx @@ -933,7 +933,7 @@ void RemoveFootnotesForNode( rFootnoteIdxs.SeekEntry( rTextNode, &nPos ); if (nPos < rFootnoteIdxs.size()) { -while (nPos && rTextNode == (rFootnoteIdxs[ nPos ]->GetTextNode())) +while (nPos > 0 && rTextNode == (rFootnoteIdxs[ nPos ]->GetTextNode())) --nPos; if (nPos || rTextNode != (rFootnoteIdxs[ nPos ]->GetTextNode())) ++nPos; diff --git a/sw/source/uibase/utlui/navipi.cxx b/sw/source/uibase/utlui/navipi.cxx index 4db946c53e5f..b2bd8684a1dd 100644 --- a/sw/source/uibase/utlui/navipi.cxx +++ b/sw/source/uibase/utlui/navipi.cxx @@ -79,8 +79,10 @@ void SwNavigationPI::MoveOutline(SwOutlineNodes::size_type nSource, SwOutlineNod if (!pView) return; SwWrtShell &rSh = pView->GetWrtShell(); -if(nTarget < nSource || nTarget == SwOutlineNodes::npos) -nTarget ++; +if (nTarget == SwOutlineNodes::npos) +nTarget = 0; +else if (nTarget < nSource) +nTarget++; if ( !rSh.IsOutlineMovable( nSource )) return; commit 275aebc5085cd4b0fd3d045ef1ec65c99e1d5b56 Author: Mike Kaganski AuthorDate: Sat Sep 21 18:41:17 2024 +0500 Commit: Mike Kaganski CommitDate: Sat Sep 21 22:33:12 2024 +0200 tdf#163064: pic element is required here, after all In commit cf15306ccf49da290b391517e2c5dd22a4f1be45 (ERROR: Invalid content was found starting with element 'p:pic'., 2014-12-22), the pic element inside the oleObj element was only alloswed for the old revision of ECMA-736 export, because that was considered invalid by officeotron. However, as of ECMA-376-1:2016, this element is mandatory; CT_OleObject definition in Annex A has: and Annex L (Primer) has L.7.2.5 "Embeddings in a PresentationML Document" saying: The oleObj element shall have a pic child element that (optionally) contains the image data to be used in place of loading the actual object data. The omission of this in the export is the reason of tdf#163064. So here I filter out the error from the validation results, which is not ideal (I have no way to know if the found pic is really in the oleObj, or somewhere else), but a lesser evil, compared to required exclusion of all tests that export OLE objects. Change-Id: Ia73a49da7347e8ff22c626e211b55ba1e0625070 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173761 Reviewed-by: Mike Kaganski Tested-by: Jenkins diff --git a/oox/source/export/shapes.cxx b/oox
core.git: Branch 'libreoffice-24-2' - sd/source
sd/source/ui/unoidl/unomodel.cxx |4 1 file changed, 4 insertions(+) New commits: commit 508b4ef89dcdd5b2d07e0b7421728b0fb4927f0c Author: Caolán McNamara AuthorDate: Sat Sep 14 21:07:33 2024 +0100 Commit: Xisco Fauli CommitDate: Fri Sep 20 21:04:08 2024 +0200 Resolves: tdf#162958 When using formula with Impress Style is lost regression since: commit 125cf1525361c6cd699574f60b4cf12868188568 CommitDate: Thu Sep 7 08:54:56 2023 +0200 add referer to ole objects where these service names changed there should be listed here too so they get the same post-create setup they do on the bare "no-argument" route. Change-Id: I21fb9a92f63cac46e4a0fd46f7c2b8d2956ec829 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173385 Tested-by: Jenkins Reviewed-by: Xisco Fauli diff --git a/sd/source/ui/unoidl/unomodel.cxx b/sd/source/ui/unoidl/unomodel.cxx index dd9d5739555b..305ed299b639 100644 --- a/sd/source/ui/unoidl/unomodel.cxx +++ b/sd/source/ui/unoidl/unomodel.cxx @@ -1115,7 +1115,11 @@ SdXImpressDocument::createInstanceWithArguments( { OUString arg; if ((ServiceSpecifier == "com.sun.star.drawing.GraphicObjectShape" + || ServiceSpecifier == "com.sun.star.drawing.AppletShape" + || ServiceSpecifier == "com.sun.star.drawing.FrameShape" + || ServiceSpecifier == "com.sun.star.drawing.OLE2Shape" || ServiceSpecifier == "com.sun.star.drawing.MediaShape" + || ServiceSpecifier == "com.sun.star.drawing.PluginShape" || ServiceSpecifier == "com.sun.star.presentation.MediaShape") && Arguments.getLength() == 1 && (Arguments[0] >>= arg)) {
core.git: Branch 'libreoffice-24-8' - sd/source
sd/source/ui/unoidl/unomodel.cxx |4 1 file changed, 4 insertions(+) New commits: commit 509c22c658adcb84fa1b322456651bf09b621315 Author: Caolán McNamara AuthorDate: Sat Sep 14 21:07:33 2024 +0100 Commit: Xisco Fauli CommitDate: Fri Sep 20 21:03:57 2024 +0200 Resolves: tdf#162958 When using formula with Impress Style is lost regression since: commit 125cf1525361c6cd699574f60b4cf12868188568 CommitDate: Thu Sep 7 08:54:56 2023 +0200 add referer to ole objects where these service names changed there should be listed here too so they get the same post-create setup they do on the bare "no-argument" route. Change-Id: I21fb9a92f63cac46e4a0fd46f7c2b8d2956ec829 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173304 Tested-by: Jenkins Reviewed-by: Xisco Fauli diff --git a/sd/source/ui/unoidl/unomodel.cxx b/sd/source/ui/unoidl/unomodel.cxx index da1c4ca806e6..cd649274f022 100644 --- a/sd/source/ui/unoidl/unomodel.cxx +++ b/sd/source/ui/unoidl/unomodel.cxx @@ -1122,7 +1122,11 @@ SdXImpressDocument::createInstanceWithArguments( { OUString arg; if ((ServiceSpecifier == "com.sun.star.drawing.GraphicObjectShape" + || ServiceSpecifier == "com.sun.star.drawing.AppletShape" + || ServiceSpecifier == "com.sun.star.drawing.FrameShape" + || ServiceSpecifier == "com.sun.star.drawing.OLE2Shape" || ServiceSpecifier == "com.sun.star.drawing.MediaShape" + || ServiceSpecifier == "com.sun.star.drawing.PluginShape" || ServiceSpecifier == "com.sun.star.presentation.MediaShape") && Arguments.getLength() == 1 && (Arguments[0] >>= arg)) {
core.git: 2 commits - config_host.mk.in configure.ac distro-configs/LibreOfficeCoverity.conf RepositoryExternal.mk wizards/com
RepositoryExternal.mk | 12 +++ config_host.mk.in |2 configure.ac | 34 +- distro-configs/LibreOfficeCoverity.conf |2 wizards/com/sun/star/wizards/form/StyleApplier.java |4 - wizards/com/sun/star/wizards/report/ReportTextImplementation.java |6 - wizards/com/sun/star/wizards/text/TextDocument.java |6 + 7 files changed, 57 insertions(+), 9 deletions(-) New commits: commit 3de3f660af5afad6f4a78cc021ed20dada936bbd Author: Caolán McNamara AuthorDate: Fri Sep 20 12:25:11 2024 +0100 Commit: Caolán McNamara CommitDate: Fri Sep 20 17:43:42 2024 +0200 add a --with-system-java-websocket there was a system Java-WebSocket in Fedora 35, f.e. but unaware if this is actively packaged standalone in contemporary distros, but useful for the coverity build case. Change-Id: Id6393dbfb1c449b75391752a8bb5e5ea4481a084 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173725 Tested-by: Jenkins Reviewed-by: Caolán McNamara diff --git a/RepositoryExternal.mk b/RepositoryExternal.mk index 2d35152eb0b8..4a421d6f08e6 100644 --- a/RepositoryExternal.mk +++ b/RepositoryExternal.mk @@ -3967,7 +3967,15 @@ endef endif # SYSTEM_JFREEREPORT -# no known distro packaged Java-Websocket at present +# As a guide, Java-Websocket was packaged for Fedora 35 +# https://src.fedoraproject.org/rpms/Java-WebSocket/tree/f35 +ifneq ($(SYSTEM_JAVA_WEBSOCKET),) + +define gb_Jar__use_java_websocket +$(call gb_Jar_use_system_jar,$(1),$(JAVA_WEBSOCKET_JAR)) +endef + +else # !SYSTEM_JAVA_WEBSOCKET ifeq ($(ENABLE_JAVA),TRUE) $(eval $(call gb_Helper_register_jars_for_install,URE,ure, \ @@ -3979,6 +3987,8 @@ define gb_Jar__use_java_websocket $(call gb_Jar_use_jar,$(1),java_websocket) endef +endif # SYSTEM_JAVA_WEBSOCKET + # Executables define gb_Executable__register_bestreversemap diff --git a/config_host.mk.in b/config_host.mk.in index 315642b8dd35..fcc5a8b904a1 100644 --- a/config_host.mk.in +++ b/config_host.mk.in @@ -386,6 +386,7 @@ export KF5_LIBS=$(gb_SPACE)@KF5_LIBS@ export KF6_CFLAGS=$(gb_SPACE)@KF6_CFLAGS@ export KF6_LIBS=$(gb_SPACE)@KF6_LIBS@ export KRB5_LIBS=@KRB5_LIBS@ +export JAVA_WEBSOCKET_JAR=@JAVA_WEBSOCKET_JAR@ export LCMS2_CFLAGS=$(gb_SPACE)@LCMS2_CFLAGS@ export LCMS2_LIBS=$(gb_SPACE)@LCMS2_LIBS@ export LD=@LD@ @@ -677,6 +678,7 @@ SYSTEM_EBOOK=@SYSTEM_EBOOK@ SYSTEM_ETONYEK=@SYSTEM_ETONYEK@ SYSTEM_EPUBGEN=@SYSTEM_EPUBGEN@ SYSTEM_FREEHAND=@SYSTEM_FREEHAND@ +SYSTEM_JAVA_WEBSOCKET=@SYSTEM_JAVA_WEBSOCKET@ SYSTEM_LIBATOMIC_OPS=@SYSTEM_LIBATOMIC_OPS@ SYSTEM_LIBEOT=@SYSTEM_LIBEOT@ SYSTEM_LIBEXTTEXTCAT=@SYSTEM_LIBEXTTEXTCAT@ diff --git a/configure.ac b/configure.ac index 25324da03940..698fadaf1940 100644 --- a/configure.ac +++ b/configure.ac @@ -13155,17 +13155,47 @@ AC_SUBST(LIBASSUAN_LIBS) AC_SUBST(GPGMEPP_CFLAGS) AC_SUBST(GPGMEPP_LIBS) +AC_ARG_WITH(system-java-websocket, +AS_HELP_STRING([--with-system-java-websocket], +[Use Java-WebSocket already on system.]),, +[with_system_java_websocket="$with_system_jars"]) + +AC_ARG_WITH(java-websocket-jar, +AS_HELP_STRING([--with-java-websocket-jar=JARFILE], +[Specify path to jarfile manually.]), +JAVA_WEBSOCKET_JAR=$withval) + AC_MSG_CHECKING([whether to build Java Websocket for the UNO remote websocket client]) if test "$with_java" != "no"; then AC_MSG_RESULT([yes]) ENABLE_JAVA_WEBSOCKET=TRUE -BUILD_TYPE="$BUILD_TYPE JAVA_WEBSOCKET" -NEED_ANT=TRUE + +dnl === +dnl Check for system Java-WebSocket +dnl === +AC_MSG_CHECKING([which Java-WebSocket to use]) +if test "$with_system_java_websocket" = "yes"; then +AC_MSG_RESULT([external]) +SYSTEM_JAVA_WEBSOCKET=TRUE +if test -z $JAVA_WEBSOCKET_JAR; then + JAVA_WEBSOCKET_JAR=/usr/share/java/Java-WebSocket/Java-WebSocket.jar +fi +if ! test -f $JAVA_WEBSOCKET_JAR; then +AC_MSG_ERROR(Java-WebSocket.jar not found.) +fi +else +AC_MSG_RESULT([internal]) +SYSTEM_JAVA_WEBSOCKET= +BUILD_TYPE="$BUILD_TYPE JAVA_WEBSOCKET" +NEED_ANT=TRUE +fi else AC_MSG_RESULT([no]) ENABLE_JAVA_WEBSOCKET= fi AC_SUBST(ENABLE_JAVA_WEBSOCKET) +AC_SUBST(SYSTEM_JAVA_WEBSOCKET) +AC_SUBST(JAVA_WEBSOCKET_JAR) AC_MSG_CHECKING([whether to build the Wiki Publisher extension]) if test "x$enable_ext_wiki_publisher" = "xyes" -a "x$enable_extension_integration" != "xno" -a "$with_java" != "no"; then diff --git a/distro-configs/LibreOfficeCoverity.conf b/distro-configs/LibreOfficeCoverity.conf index 29959e007812..4133558a89e2 100644 --- a/distro-configs/LibreOfficeCo
core.git: wizards/com
wizards/com/sun/star/wizards/db/CommandMetaData.java |7 ++- wizards/com/sun/star/wizards/ui/CommandFieldSelection.java |7 --- 2 files changed, 10 insertions(+), 4 deletions(-) New commits: commit d0f7619735ede9bbed904309c119cccdc5aee040 Author: Caolán McNamara AuthorDate: Fri Sep 20 09:35:39 2024 +0100 Commit: Caolán McNamara CommitDate: Fri Sep 20 17:06:32 2024 +0200 cid#1606722 PA: Public Attribute Change-Id: Ideb3c4523dc6210f56c978fdab52690a54b88d1d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173723 Tested-by: Jenkins Reviewed-by: Caolán McNamara diff --git a/wizards/com/sun/star/wizards/db/CommandMetaData.java b/wizards/com/sun/star/wizards/db/CommandMetaData.java index 64ab269eda90..60d555d94066 100644 --- a/wizards/com/sun/star/wizards/db/CommandMetaData.java +++ b/wizards/com/sun/star/wizards/db/CommandMetaData.java @@ -35,7 +35,7 @@ import java.util.Map; public class CommandMetaData extends DBMetaData { protected Map FieldTitleSet = new HashMap(); -public String[] m_aAllFieldNames = new String[] +protected String[] m_aAllFieldNames = new String[] { }; public FieldColumn[] FieldColumns = new FieldColumn[] @@ -110,6 +110,11 @@ public class CommandMetaData extends DBMetaData return FieldTitleSet; } +public String[] getAllFieldNames() +{ +return m_aAllFieldNames; +} + public XPropertySet getColumnObjectByFieldName(String _FieldName, boolean _bgetByDisplayName) { try diff --git a/wizards/com/sun/star/wizards/ui/CommandFieldSelection.java b/wizards/com/sun/star/wizards/ui/CommandFieldSelection.java index 6499fdbd79a8..580ea02b3d2a 100644 --- a/wizards/com/sun/star/wizards/ui/CommandFieldSelection.java +++ b/wizards/com/sun/star/wizards/ui/CommandFieldSelection.java @@ -223,11 +223,12 @@ public class CommandFieldSelection extends FieldSelection implements Comparator< if (binitialize) { CurDBMetaData.setCommandName(curCommandName); -if (CurDBMetaData.m_aAllFieldNames != null) +String[] allFieldNames = CurDBMetaData.getAllFieldNames(); +if (allFieldNames != null) { -if (CurDBMetaData.m_aAllFieldNames.length > 0) +if (allFieldNames.length > 0) { -initialize(CurDBMetaData.m_aAllFieldNames, AppendMode, CurDBMetaData.getMaxColumnsInSelect()); +initialize(allFieldNames, AppendMode, CurDBMetaData.getMaxColumnsInSelect()); return; } }
core.git: 2 commits - wizards/com
wizards/com/sun/star/wizards/db/CommandMetaData.java|3 +-- wizards/com/sun/star/wizards/query/QueryWizard.java |2 +- wizards/com/sun/star/wizards/report/DBColumn.java |7 +-- wizards/com/sun/star/wizards/report/ReportTextDocument.java |4 ++-- 4 files changed, 9 insertions(+), 7 deletions(-) New commits: commit ad9d635bffc4afa32250583dc28b053aaab91501 Author: Caolán McNamara AuthorDate: Fri Sep 20 09:32:01 2024 +0100 Commit: Caolán McNamara CommitDate: Fri Sep 20 17:06:25 2024 +0200 cid#1607041 PA: Public Attribute Change-Id: I3e162e3b58f750b92c5939f3866fdcb8a148de99 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173722 Tested-by: Caolán McNamara Reviewed-by: Caolán McNamara diff --git a/wizards/com/sun/star/wizards/report/DBColumn.java b/wizards/com/sun/star/wizards/report/DBColumn.java index 22fe7e657e37..40c01e51490b 100644 --- a/wizards/com/sun/star/wizards/report/DBColumn.java +++ b/wizards/com/sun/star/wizards/report/DBColumn.java @@ -57,7 +57,7 @@ public class DBColumn private XTextTable xTextTable; private XTableColumns xTableColumns; private XCellRange xCellRange; -public XNamed xTableName; +private XNamed xTableName; private boolean bIsGroupColumn; private RecordParser CurDBMetaData; private RecordTable CurRecordTable; @@ -233,7 +233,10 @@ public class DBColumn oTextFieldHandler.insertUserField(xTextCursor, CurDBField.getFieldName(), CurDBField.getFieldTitle()); } - +public XNamed getTableName() +{ +return xTableName; +} public void formatValueCell() { diff --git a/wizards/com/sun/star/wizards/report/ReportTextDocument.java b/wizards/com/sun/star/wizards/report/ReportTextDocument.java index a8880d53a015..7fc9b0345957 100644 --- a/wizards/com/sun/star/wizards/report/ReportTextDocument.java +++ b/wizards/com/sun/star/wizards/report/ReportTextDocument.java @@ -315,10 +315,10 @@ class ReportTextDocument extends com.sun.star.wizards.text.TextDocument implemen { String TableName = TBLGROUPSECTION + (TableIndex + 1); // Note: for some reason the table might lose its name and has to be renamed therefore -String OldTableName = CurDBColumn.xTableName.getName(); +String OldTableName = CurDBColumn.getTableName().getName(); if (OldTableName.compareTo(TableName) != 0) { -CurDBColumn.xTableName.setName(TableName); +CurDBColumn.getTableName().setName(TableName); } CurDBColumn.insertColumnData(oTextFieldHandler, this.bIsCurLandscape); CurDBColumn.setCellFont(); commit e65acc30dbaef1f21796eaf4d42e2568bb7b0b15 Author: Caolán McNamara AuthorDate: Fri Sep 20 09:29:23 2024 +0100 Commit: Caolán McNamara CommitDate: Fri Sep 20 17:06:11 2024 +0200 cid#1607131 PA: Public Attribute Change-Id: Ief73e86c6fa4459e25d98befa0dc383326f22a79 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173721 Tested-by: Jenkins Reviewed-by: Caolán McNamara diff --git a/wizards/com/sun/star/wizards/db/CommandMetaData.java b/wizards/com/sun/star/wizards/db/CommandMetaData.java index 08b527f3ee10..64ab269eda90 100644 --- a/wizards/com/sun/star/wizards/db/CommandMetaData.java +++ b/wizards/com/sun/star/wizards/db/CommandMetaData.java @@ -34,8 +34,7 @@ import java.util.Map; public class CommandMetaData extends DBMetaData { - -public Map FieldTitleSet = new HashMap(); +protected Map FieldTitleSet = new HashMap(); public String[] m_aAllFieldNames = new String[] { }; diff --git a/wizards/com/sun/star/wizards/query/QueryWizard.java b/wizards/com/sun/star/wizards/query/QueryWizard.java index 16a7e4cdef06..d9ef71027117 100644 --- a/wizards/com/sun/star/wizards/query/QueryWizard.java +++ b/wizards/com/sun/star/wizards/query/QueryWizard.java @@ -303,7 +303,7 @@ public class QueryWizard extends DatabaseObjectWizard m_groupFilterComponent.initialize(m_DBMetaData.GroupByFilterConditions, m_DBMetaData.getGroupFieldNames()); break; case SOTITLES_PAGE: - m_titlesComponent.initialize(m_DBMetaData.getDisplayFieldNames(), m_DBMetaData.FieldTitleSet); + m_titlesComponent.initialize(m_DBMetaData.getDisplayFieldNames(), m_DBMetaData.getFieldTitleSet()); break; case SOSUMMARY_PAGE: m_finalizer.initialize();
core.git: 2 commits - wizards/com
wizards/com/sun/star/wizards/db/DBMetaData.java |7 +- wizards/com/sun/star/wizards/db/RecordParser.java|2 wizards/com/sun/star/wizards/form/DataEntrySetter.java | 12 ++-- wizards/com/sun/star/wizards/form/FieldLinker.java | 24 wizards/com/sun/star/wizards/form/Finalizer.java |8 +- wizards/com/sun/star/wizards/form/FormConfiguration.java | 10 +-- wizards/com/sun/star/wizards/form/FormDocument.java |2 wizards/com/sun/star/wizards/form/StyleApplier.java | 10 +-- wizards/com/sun/star/wizards/form/UIControlArranger.java | 18 +++--- wizards/com/sun/star/wizards/query/Finalizer.java| 12 ++-- wizards/com/sun/star/wizards/report/GroupFieldHandler.java |6 +- wizards/com/sun/star/wizards/report/ReportFinalizer.java | 16 ++--- wizards/com/sun/star/wizards/report/ReportLayouter.java | 28 - wizards/com/sun/star/wizards/table/FieldFormatter.java | 12 ++-- wizards/com/sun/star/wizards/table/Finalizer.java| 16 ++--- wizards/com/sun/star/wizards/table/PrimaryKeyHandler.java| 18 +++--- wizards/com/sun/star/wizards/table/ScenarioSelector.java | 12 ++-- wizards/com/sun/star/wizards/ui/AggregateComponent.java | 20 +++--- wizards/com/sun/star/wizards/ui/CommandFieldSelection.java |4 - wizards/com/sun/star/wizards/ui/DBLimitedFieldSelection.java |2 wizards/com/sun/star/wizards/ui/FieldSelection.java | 12 ++-- wizards/com/sun/star/wizards/ui/FilterComponent.java | 32 +-- wizards/com/sun/star/wizards/ui/SortingComponent.java| 28 - wizards/com/sun/star/wizards/ui/UnoDialog.java |2 24 files changed, 158 insertions(+), 155 deletions(-) New commits: commit 0b642c711e3c60651a189073e594acc26e0d381d Author: Caolán McNamara AuthorDate: Fri Sep 20 09:27:23 2024 +0100 Commit: Caolán McNamara CommitDate: Fri Sep 20 17:06:04 2024 +0200 cid#1607206 PA: Public Attribute Change-Id: I27a8247f0674c90ea16f896c1aba465aeeaa9992 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173720 Tested-by: Jenkins Reviewed-by: Caolán McNamara diff --git a/wizards/com/sun/star/wizards/form/DataEntrySetter.java b/wizards/com/sun/star/wizards/form/DataEntrySetter.java index 4b4a3e0cf9ac..e31c7ee285fb 100644 --- a/wizards/com/sun/star/wizards/form/DataEntrySetter.java +++ b/wizards/com/sun/star/wizards/form/DataEntrySetter.java @@ -41,12 +41,12 @@ public class DataEntrySetter { short curtabindex = (short) (FormWizard.SODATA_PAGE * 100); Integer IDataStep = Integer.valueOf(FormWizard.SODATA_PAGE); -String sNewDataOnly = CurUnoDialog.m_oResource.getResText("RID_FORM_44"); -String sDisplayAllData = CurUnoDialog.m_oResource.getResText("RID_FORM_46"); -String sNoModification = CurUnoDialog.m_oResource.getResText("RID_FORM_47"); // AllowUpdates -String sNoDeletion = CurUnoDialog.m_oResource.getResText("RID_FORM_48"); // AllowDeletes -String sNoAddition = CurUnoDialog.m_oResource.getResText("RID_FORM_49"); // AllowInserts -String sdontdisplayExistingData = CurUnoDialog.m_oResource.getResText("RID_FORM_45"); +String sNewDataOnly = CurUnoDialog.getResource().getResText("RID_FORM_44"); +String sDisplayAllData = CurUnoDialog.getResource().getResText("RID_FORM_46"); +String sNoModification = CurUnoDialog.getResource().getResText("RID_FORM_47"); // AllowUpdates +String sNoDeletion = CurUnoDialog.getResource().getResText("RID_FORM_48"); // AllowDeletes +String sNoAddition = CurUnoDialog.getResource().getResText("RID_FORM_49"); // AllowInserts +String sdontdisplayExistingData = CurUnoDialog.getResource().getResText("RID_FORM_45"); CurUnoDialog.insertRadioButton("optNewDataOnly", new XItemListenerAdapter() { @Override diff --git a/wizards/com/sun/star/wizards/form/FieldLinker.java b/wizards/com/sun/star/wizards/form/FieldLinker.java index 71b75959a7e2..35c325d10d9d 100644 --- a/wizards/com/sun/star/wizards/form/FieldLinker.java +++ b/wizards/com/sun/star/wizards/form/FieldLinker.java @@ -41,7 +41,7 @@ public class FieldLinker extends DBLimitedFieldSelection private XListBox[] lstMasterFields; private int[] SOLINKLST = null; private String[] sSlaveListHeader; -private String[] sMasterListHeader; //CurUnoDialog.m_oResource.getResText("RID_FORM_40"); +private String[] sMasterListHeader; //CurUnoDialog.getResource().getResText("RID_FORM_40"); public FieldLinker(WizardDialog _CurUnoDialog, int iStep, int iCompPosY, int _firsthelpid) { @@ -63,16 +63,16 @@ public class FieldLinker extends DBLimitedFieldSelection int SOSECLINKLST = 1; int SOTHIRDLINKLST = 2; int SOFOURTHLINKLST = 3; -
core.git: 2 commits - wizards/com
wizards/com/sun/star/wizards/db/CommandMetaData.java |2 wizards/com/sun/star/wizards/db/RecordParser.java |9 +- wizards/com/sun/star/wizards/db/SQLQueryComposer.java |6 - wizards/com/sun/star/wizards/query/QuerySummary.java |2 wizards/com/sun/star/wizards/query/QueryWizard.java |4 - wizards/com/sun/star/wizards/report/GroupFieldHandler.java|4 - wizards/com/sun/star/wizards/report/ReportTextDocument.java | 38 +- wizards/com/sun/star/wizards/report/ReportTextImplementation.java | 10 +- wizards/com/sun/star/wizards/report/ReportWizard.java |4 - wizards/com/sun/star/wizards/ui/AggregateComponent.java |2 10 files changed, 43 insertions(+), 38 deletions(-) New commits: commit 45eb7e7cf2e29fed5e5bdce7197871cd115e1cb6 Author: Caolán McNamara AuthorDate: Fri Sep 20 09:16:40 2024 +0100 Commit: Caolán McNamara CommitDate: Fri Sep 20 17:05:38 2024 +0200 cid#1608090 PA: Public Attribute Change-Id: I9bd34262523a7eaa430824749adee6f3e326c59e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173718 Tested-by: Caolán McNamara Reviewed-by: Caolán McNamara diff --git a/wizards/com/sun/star/wizards/db/RecordParser.java b/wizards/com/sun/star/wizards/db/RecordParser.java index 6bd83b0af180..abe9e29d2acc 100644 --- a/wizards/com/sun/star/wizards/db/RecordParser.java +++ b/wizards/com/sun/star/wizards/db/RecordParser.java @@ -40,7 +40,7 @@ public class RecordParser extends QueryMetaData private XNameAccess xColumns; private com.sun.star.sdbc.XRow xResultSetRow; -public XResultSet ResultSet; +private XResultSet ResultSet; private XInterface xRowSet; private XCompletedExecution xExecute; private XComponent xRowSetComponent; @@ -232,6 +232,11 @@ public class RecordParser extends QueryMetaData return true; } +public XResultSet getResultSet() +{ +return ResultSet; +} + @Override public void dispose() { diff --git a/wizards/com/sun/star/wizards/report/ReportTextImplementation.java b/wizards/com/sun/star/wizards/report/ReportTextImplementation.java index a70d4eee4b2b..29d3d25c64b0 100644 --- a/wizards/com/sun/star/wizards/report/ReportTextImplementation.java +++ b/wizards/com/sun/star/wizards/report/ReportTextImplementation.java @@ -338,7 +338,7 @@ public class ReportTextImplementation extends ReportImplementationHelper impleme XTextCursor xTextCursor = ReportTextDocument.createTextCursor(getDoc().xTextDocument.getText()); xTextDocument.lockControllers(); -if (getRecordParser().ResultSet.next()) +if (getRecordParser().getResultSet().next()) { replaceUserFields(); Helper.setUnoPropertyValue(xTextCursor, "PageDescName", "First Page"); @@ -354,7 +354,7 @@ public class ReportTextImplementation extends ReportImplementationHelper impleme if (getRecordParser().getcurrentRecordData(DataVector)) { m_bStopProcess = false; -while ((getRecordParser().ResultSet.next()) && (!m_bStopProcess)) +while ((getRecordParser().getResultSet().next()) && (!m_bStopProcess)) { breset = false; for (ColIndex = 0; ColIndex < GroupFieldCount; ColIndex++) commit c9ce398635c7712d493a1d7112b7afdb442fb2d7 Author: Caolán McNamara AuthorDate: Fri Sep 20 09:12:55 2024 +0100 Commit: Caolán McNamara CommitDate: Fri Sep 20 17:05:28 2024 +0200 cid#1608290 PA: Public Attribute Change-Id: Ifb9bedaaaf152c6c43454811b63bdf55a157cf2a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173717 Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara diff --git a/wizards/com/sun/star/wizards/db/CommandMetaData.java b/wizards/com/sun/star/wizards/db/CommandMetaData.java index 28180382f2b1..08b527f3ee10 100644 --- a/wizards/com/sun/star/wizards/db/CommandMetaData.java +++ b/wizards/com/sun/star/wizards/db/CommandMetaData.java @@ -42,7 +42,7 @@ public class CommandMetaData extends DBMetaData public FieldColumn[] FieldColumns = new FieldColumn[] { }; -public String[] GroupFieldNames = new String[] +private String[] GroupFieldNames = new String[] { }; private String[][] SortFieldNames = new String[][] diff --git a/wizards/com/sun/star/wizards/db/RecordParser.java b/wizards/com/sun/star/wizards/db/RecordParser.java index e4295e473424..6bd83b0af180 100644 --- a/wizards/com/sun/star/wizards/db/RecordParser.java +++ b/wizards/com/sun/star/wizards/db/RecordParser.java @@ -193,7 +193,7 @@ public class RecordParser extends QueryMetaData throw new InvalidQueryException(xMSF, Command); } } -GroupFieldColum
core.git: Branch 'libreoffice-24-8' - sw/source
sw/source/core/doc/notxtfrm.cxx |5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) New commits: commit 76bc1304ffc937d8a38471119694b1d9d64d7070 Author: Caolán McNamara AuthorDate: Thu Sep 19 19:39:00 2024 +0100 Commit: Xisco Fauli CommitDate: Fri Sep 20 10:33:47 2024 +0200 null-deref seen on rtf2pdf with tdf94049-1.rtf Change-Id: I9cd64f5fb20ccea84446909414624314b7eb956b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173684 Reviewed-by: Caolán McNamara Tested-by: Jenkins (cherry picked from commit cb08fb797c58a4d21e7ae3a700b0e9ed30524a90) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173639 Reviewed-by: Xisco Fauli diff --git a/sw/source/core/doc/notxtfrm.cxx b/sw/source/core/doc/notxtfrm.cxx index 8afc1c60b280..b4ff11be973f 100644 --- a/sw/source/core/doc/notxtfrm.cxx +++ b/sw/source/core/doc/notxtfrm.cxx @@ -1417,12 +1417,13 @@ void SwNoTextFrame::ImplPaintPictureBitmap( vcl::RenderContext* pOut, const Point aPosition(rAlignedGrfArea.Pos()); const Size aSize(rAlignedGrfArea.SSize()); +uno::Reference xObj = pOLENd->GetOLEObj().GetOleRef(); + if ( pGraphic && pGraphic->GetType() != GraphicType::NONE ) { pGraphic->Draw(*pOut, aPosition, aSize); // shade the representation if the object is activated outplace -uno::Reference < embed::XEmbeddedObject > xObj = pOLENd->GetOLEObj().GetOleRef(); if ( xObj.is() && xObj->getCurrentState() == embed::EmbedStates::ACTIVE ) { @@ -1441,7 +1442,7 @@ void SwNoTextFrame::ImplPaintPictureBitmap( vcl::RenderContext* pOut, pOut); } -sal_Int64 nMiscStatus = pOLENd->GetOLEObj().GetOleRef()->getStatus( pOLENd->GetAspect() ); +sal_Int64 nMiscStatus = xObj ? xObj->getStatus(pOLENd->GetAspect()) : 0; if ( !bPrn && dynamic_cast< const SwCursorShell *>( pShell ) != nullptr && (nMiscStatus & embed::EmbedMisc::MS_EMBED_ACTIVATEWHENVISIBLE)) {
core.git: sw/source
sw/source/core/doc/notxtfrm.cxx |5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) New commits: commit cb08fb797c58a4d21e7ae3a700b0e9ed30524a90 Author: Caolán McNamara AuthorDate: Thu Sep 19 19:39:00 2024 +0100 Commit: Caolán McNamara CommitDate: Thu Sep 19 22:33:19 2024 +0200 null-deref seen on rtf2pdf with tdf94049-1.rtf Change-Id: I9cd64f5fb20ccea84446909414624314b7eb956b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173684 Reviewed-by: Caolán McNamara Tested-by: Jenkins diff --git a/sw/source/core/doc/notxtfrm.cxx b/sw/source/core/doc/notxtfrm.cxx index fbbcc035b118..f785718035fe 100644 --- a/sw/source/core/doc/notxtfrm.cxx +++ b/sw/source/core/doc/notxtfrm.cxx @@ -1417,12 +1417,13 @@ void SwNoTextFrame::ImplPaintPictureBitmap( vcl::RenderContext* pOut, const Point aPosition(rAlignedGrfArea.Pos()); const Size aSize(rAlignedGrfArea.SSize()); +uno::Reference xObj = pOLENd->GetOLEObj().GetOleRef(); + if ( pGraphic && pGraphic->GetType() != GraphicType::NONE ) { pGraphic->Draw(*pOut, aPosition, aSize); // shade the representation if the object is activated outplace -uno::Reference < embed::XEmbeddedObject > xObj = pOLENd->GetOLEObj().GetOleRef(); if ( xObj.is() && xObj->getCurrentState() == embed::EmbedStates::ACTIVE ) { @@ -1441,7 +1442,7 @@ void SwNoTextFrame::ImplPaintPictureBitmap( vcl::RenderContext* pOut, pOut); } -sal_Int64 nMiscStatus = pOLENd->GetOLEObj().GetOleRef()->getStatus( pOLENd->GetAspect() ); +sal_Int64 nMiscStatus = xObj ? xObj->getStatus(pOLENd->GetAspect()) : 0; if ( !bPrn && dynamic_cast< const SwCursorShell *>( pShell ) != nullptr && (nMiscStatus & embed::EmbedMisc::MS_EMBED_ACTIVATEWHENVISIBLE)) {
core.git: vcl/workben
vcl/workben/cgmfuzzer.cxx| 106 +-- vcl/workben/diffuzzer.cxx| 22 vcl/workben/dxffuzzer.cxx| 10 ++-- vcl/workben/epsfuzzer.cxx| 10 ++-- vcl/workben/metfuzzer.cxx| 10 ++-- vcl/workben/olefuzzer.cxx|6 +- vcl/workben/pptfuzzer.cxx| 74 +++--- vcl/workben/qpwfuzzer.cxx| 24 - vcl/workben/rtffuzzer.cxx| 22 vcl/workben/schtmlfuzzer.cxx | 22 vcl/workben/scrtffuzzer.cxx | 20 vcl/workben/slkfuzzer.cxx| 24 - vcl/workben/svmfuzzer.cxx| 24 - vcl/workben/wmffuzzer.cxx|8 +-- vcl/workben/ww2fuzzer.cxx| 62 - vcl/workben/ww6fuzzer.cxx| 64 - vcl/workben/ww8fuzzer.cxx| 64 - 17 files changed, 286 insertions(+), 286 deletions(-) New commits: commit 67dd735a040e93ddd7b098d013eca9526a321f88 Author: Caolán McNamara AuthorDate: Thu Sep 19 15:30:58 2024 +0100 Commit: Caolán McNamara CommitDate: Thu Sep 19 16:31:54 2024 +0200 ofz#71782 fix build failure Change-Id: I4be65927215dbf9c10ecd51baca42b59b569d75b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173677 Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara diff --git a/vcl/workben/cgmfuzzer.cxx b/vcl/workben/cgmfuzzer.cxx index 812fd0dbe3c3..993937adba53 100644 --- a/vcl/workben/cgmfuzzer.cxx +++ b/vcl/workben/cgmfuzzer.cxx @@ -17,59 +17,59 @@ extern "C" { void * i18npool_component_getFactory( const char* , void* , void* ); -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_comp_framework_Desktop_get_implementation( void *, void * ); -void * com_sun_star_i18n_CharacterClassification_Unicode_get_implementation( void *, void * ); -void * com_sun_star_i18n_CharacterClassification_get_implementation( void *, void * ); -void * com_sun_star_i18n_NativeNumberSupplier_get_implementation( void *, void * ); -void * com_sun_star_i18n_NumberFormatCodeMapper_get_implementation( void *, void * ); -void * com_sun_star_i18n_Transliteration_get_implementation( void *, void * ); -void * com_sun_star_drawing_EnhancedCustomShapeEngine_get_implementation( void *, void * ); -void * com_sun_star_drawing_SvxShapeCollection_get_implementation( void *, void * ); -void * SfxDocumentMetaData_get_implementation( void *, void * ); -void * com_sun_star_animations_AnimateColor_get_implementation( void *, void * ); -void * com_sun_star_animations_AnimateMotion_get_implementation( void *, void * ); -void * com_sun_star_animations_AnimateSet_get_implementation( void *, void * ); -void * com_sun_star_animations_AnimateTransform_get_implementation( void *, void * ); -void * com_sun_star_animations_Animate_get_implementation( void *, void * ); -void * com_sun_star_animations_Audio_get_implementation( void *, void * ); -void * com_sun_star_animations_Command_get_implementation( void *, void * ); -void * com_sun_star_animations_IterateContainer_get_implementation( void *, void * ); -void * com_sun_star_animations_ParallelTimeContainer_get_implementation( void *, void * ); -void * com_sun_star_animations_SequenceTimeContainer_get_implementation( void *, void * ); -void * com_sun_star_animations_TransitionFilter_get_implementation( void *, void * ); -void * com_sun_star_comp_comphelper_OPropertyBag( void *, void * ); -void * com_sun_star_comp_uui_UUIInteractionHandler_get_implementation( void *, void * ); -void * emfio_emfreader_XEmfParser_get_implementation( void *, void * ); -void * unoxml_rdfRepository_get_implementation( void *, void * ); -void * unoxml_CURI_get_implementation( void *, void * ); -void * unoxml_CLiteral_get_implementation( void *, void * ); -void * unoxml_CBlankNode_get_implementation( void *, void * ); -void * unoxml_CXPathAPI_get_implementation( void *, void * ); -void * unoxml_CSAXDocumentBuilder_get_implementation( void *, void * ); -void * unoxml_CDocumentBuilder_get_implementation( void *, void * ); -void * linguistic_ConvDicList_get_implementation( void *, void * ); -void * linguistic_DicList_get_implementation( void *, void * ); -void * linguistic_LinguProps_get_implementation( void *, void * ); -void * linguistic_LngSvcMgr_get_implementation( void *, void * ); -void * linguistic_GrammarCheckingIterator_get_implementation( void *, void * ); -void * sd_DrawingDocument_get_implementation( void *, void * ); -void * com_sun_star_comp_Draw_DrawingModule_get_implementation( void *, void * ); -void * sd_PresentationDocument_get_implementation( void *, void * ); -void * com_sun_star_comp_Draw_PresenterHelper_get_implementation( void *, void * ); -void * com_sun_star_comp_Draw_PresenterPreviewCache_get_implementation( v
core.git: 2 commits - sc/source wizards/com
sc/source/filter/lotus/op.cxx |5 +++-- wizards/com/sun/star/wizards/form/FieldLinker.java |2 +- wizards/com/sun/star/wizards/report/ReportLayouter.java |2 +- wizards/com/sun/star/wizards/ui/AggregateComponent.java |2 +- wizards/com/sun/star/wizards/ui/FieldSelection.java |4 ++-- wizards/com/sun/star/wizards/ui/FilterComponent.java|2 +- wizards/com/sun/star/wizards/ui/SortingComponent.java |2 +- wizards/com/sun/star/wizards/ui/UnoDialog.java |4 ++-- 8 files changed, 12 insertions(+), 11 deletions(-) New commits: commit 863d4390f07c541baaf10d9d91585e7fce71cdb2 Author: Caolán McNamara AuthorDate: Thu Sep 19 13:05:29 2024 +0100 Commit: Caolán McNamara CommitDate: Thu Sep 19 15:43:37 2024 +0200 cid#1608386 PA: Public Attribute Change-Id: Ie82c097a6c3241a9ed3642ba4985acc77cdd7f1c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173669 Tested-by: Jenkins Reviewed-by: Caolán McNamara diff --git a/wizards/com/sun/star/wizards/form/FieldLinker.java b/wizards/com/sun/star/wizards/form/FieldLinker.java index 74dc5707e10d..71b75959a7e2 100644 --- a/wizards/com/sun/star/wizards/form/FieldLinker.java +++ b/wizards/com/sun/star/wizards/form/FieldLinker.java @@ -297,7 +297,7 @@ public class FieldLinker extends DBLimitedFieldSelection if (EventObject == null) { return; } -int ikey = CurUnoDialog.getControlKey(EventObject.Source, CurUnoDialog.ControlList); +int ikey = CurUnoDialog.getControlKey(EventObject.Source); enableNextControlRow(ikey); } diff --git a/wizards/com/sun/star/wizards/report/ReportLayouter.java b/wizards/com/sun/star/wizards/report/ReportLayouter.java index f6397ce92c09..29f7b2d1e584 100644 --- a/wizards/com/sun/star/wizards/report/ReportLayouter.java +++ b/wizards/com/sun/star/wizards/report/ReportLayouter.java @@ -227,7 +227,7 @@ public class ReportLayouter Helper.setUnoPropertyValue(CurUnoDialog.xDialogModel, PropertyNames.PROPERTY_ENABLED, Boolean.FALSE); // LLA: should we lock controllers here? // CurReportDocument.getDoc().xTextDocument.lockControllers(); -int iKey = CurUnoDialog.getControlKey(EventObject.Source, CurUnoDialog.ControlList); +int iKey = CurUnoDialog.getControlKey(EventObject.Source); switch (iKey) { case SOCONTENTLST: diff --git a/wizards/com/sun/star/wizards/ui/AggregateComponent.java b/wizards/com/sun/star/wizards/ui/AggregateComponent.java index c9f0659f385f..a4bb1fa9b5bf 100644 --- a/wizards/com/sun/star/wizards/ui/AggregateComponent.java +++ b/wizards/com/sun/star/wizards/ui/AggregateComponent.java @@ -152,7 +152,7 @@ public class AggregateComponent extends ControlScroller { try { -int iKey = CurUnoDialog.getControlKey(actionEvent.Source, CurUnoDialog.ControlList); +int iKey = CurUnoDialog.getControlKey(actionEvent.Source); switch (iKey) { case SOADDROW: diff --git a/wizards/com/sun/star/wizards/ui/FieldSelection.java b/wizards/com/sun/star/wizards/ui/FieldSelection.java index 2c192ca6f4aa..b9d2bba3d84b 100644 --- a/wizards/com/sun/star/wizards/ui/FieldSelection.java +++ b/wizards/com/sun/star/wizards/ui/FieldSelection.java @@ -60,7 +60,7 @@ public class FieldSelection public void itemStateChanged(com.sun.star.awt.ItemEvent EventObject) { com.sun.star.wizards.common.Helper.setUnoPropertyValue(CurUnoDialog.xDialogModel, PropertyNames.PROPERTY_ENABLED, Boolean.FALSE); -int iKey = CurUnoDialog.getControlKey(EventObject.Source, CurUnoDialog.ControlList); +int iKey = CurUnoDialog.getControlKey(EventObject.Source); switch (iKey) { case SOFLDSLST: @@ -90,7 +90,7 @@ public class FieldSelection { try { -int iKey = CurUnoDialog.getControlKey(actionEvent.Source, CurUnoDialog.ControlList); +int iKey = CurUnoDialog.getControlKey(actionEvent.Source); switch (iKey) { case SOCMDMOVESEL: diff --git a/wizards/com/sun/star/wizards/ui/FilterComponent.java b/wizards/com/sun/star/wizards/ui/FilterComponent.java index f70714a319b1..2a91ed124eb7 100644 --- a/wizards/com/sun/star/wizards/ui/FilterComponent.java +++ b/wizards/com/sun/star/wizards/ui/FilterComponent.java @@ -110,7 +110,7 @@ public class FilterComponent return; } -int iKey = CurUnoDialog.getControlKey(EventObject.Source, CurUnoDialog.ControlList); +int iKey = CurUnoDialog.getControlKey(EventObject.Source); String sControlName = PropertyNames.EMPTY_ST
core.git: 2 commits - l10ntools/source sal/cppunittester
l10ntools/source/treemerge.cxx |9 + sal/cppunittester/cppunittester.cxx |3 ++- 2 files changed, 7 insertions(+), 5 deletions(-) New commits: commit 795940e4acb56d4085c93072b4def0310bf2b4eb Author: Caolán McNamara AuthorDate: Wed Sep 18 17:42:18 2024 +0100 Commit: Caolán McNamara CommitDate: Thu Sep 19 15:43:19 2024 +0200 cid#1606864 Overflowed constant Change-Id: I08beb9bd76065ea846171e07fbf6e427ada37360 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173667 Reviewed-by: Caolán McNamara Tested-by: Jenkins diff --git a/sal/cppunittester/cppunittester.cxx b/sal/cppunittester/cppunittester.cxx index 610f8a8155ef..b1dcbfcd155e 100644 --- a/sal/cppunittester/cppunittester.cxx +++ b/sal/cppunittester/cppunittester.cxx @@ -356,7 +356,8 @@ double get_time(timeval* time) OString generateTestName(std::u16string_view rPath) { size_t nPathSep = rPath.rfind('/'); -std::u16string_view aTestName = rPath.substr(nPathSep+1); +size_t nAfterPathSep = (nPathSep != std::string_view::npos) ? (nPathSep + 1) : 0; +std::u16string_view aTestName = rPath.substr(nAfterPathSep); return OUStringToOString(aTestName, RTL_TEXTENCODING_UTF8); } commit 2f4c8f896f38e9d4999addff980278154e3b9322 Author: Caolán McNamara AuthorDate: Wed Sep 18 17:36:39 2024 +0100 Commit: Caolán McNamara CommitDate: Thu Sep 19 15:43:13 2024 +0200 cid#1606656 Overflowed constant Change-Id: I1503ebd911abf6e1e2060ce6dc3f0ac05e325982 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173666 Tested-by: Caolán McNamara Reviewed-by: Caolán McNamara diff --git a/l10ntools/source/treemerge.cxx b/l10ntools/source/treemerge.cxx index f6af92791662..47bfec04ef46 100644 --- a/l10ntools/source/treemerge.cxx +++ b/l10ntools/source/treemerge.cxx @@ -67,13 +67,14 @@ namespace helper::xmlStrToOString( pID ); xmlFree( pID ); -const sal_Int32 nFirstSlash = sID.indexOf('/'); +const std::string_view::size_type nFirstSlash = sID.indexOf('/'); +const auto nAfterSlash = (nFirstSlash != std::string_view::npos) ? (nFirstSlash + 1) : 0; // Update id attribute of topic { OString sNewID = -OString::Concat(sID.subView( 0, nFirstSlash + 1 )) + +OString::Concat(sID.subView( 0, nAfterSlash )) + rXhpRoot.substr( rXhpRoot.rfind('/') + 1 ) + -sID.subView( sID.indexOf( '/', nFirstSlash + 1 ) ); +sID.subView( sID.indexOf( '/', nAfterSlash ) ); xmlSetProp( pReturn, reinterpret_cast("id"), reinterpret_cast(sNewID.getStr())); @@ -81,7 +82,7 @@ namespace const OString sXhpPath = OString::Concat(rXhpRoot) + -sID.subView(sID.indexOf('/', nFirstSlash + 1)); +sID.subView(sID.indexOf('/', nAfterSlash)); xmlDocPtr pXhpFile = xmlParseFile( sXhpPath.getStr() ); // if xhpfile is missing than put this topic into comment if ( !pXhpFile )
core.git: Branch 'distro/collabora/co-24.04.7' - download.lst external/more_fonts
download.lst |4 ++-- external/more_fonts/ExternalPackage_karla.mk |8 2 files changed, 6 insertions(+), 6 deletions(-) New commits: commit 4e98bcfcac839ad21585c8954363bb56985a2de7 Author: Caolán McNamara AuthorDate: Thu Sep 19 12:41:14 2024 +0100 Commit: Andras Timar CommitDate: Thu Sep 19 14:20:51 2024 +0200 upgrade to current Karla font that contains the 'fi' ligature Change-Id: I4577b3250b8d1366b03d080c49643ef15eeff2fd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173665 Tested-by: Jenkins CollaboraOffice Reviewed-by: Andras Timar (cherry picked from commit ca7af7bef0968478ea42d78da42b205bdf6f432d) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173636 Tested-by: Andras Timar diff --git a/download.lst b/download.lst index c21eaa4bd7ee..2371b618d4ef 100644 --- a/download.lst +++ b/download.lst @@ -150,8 +150,8 @@ FONT_GENTIUM_TARBALL := 1725634df4bb3dcb1b2c91a6175f8789-GentiumBasic_1102.zip # three static lines # so that git cherry-pick # will not run into conflicts -FONT_KARLA_SHA256SUM := 0cba83e7d555ae792d98a657b847cff1ccb198ecf740117a610f76d66e48eaba -FONT_KARLA_TARBALL := 506757f768adb2331881d5186f7286bd-karla.zip +FONT_KARLA_SHA256SUM := c64cdbc55389c1bfb320dcef41a19f156bad271a99bc9253be118564dbb738b5 +FONT_KARLA_TARBALL := 2024-09-19-karla-main.zip # three static lines # so that git cherry-pick # will not run into conflicts diff --git a/external/more_fonts/ExternalPackage_karla.mk b/external/more_fonts/ExternalPackage_karla.mk index 580777e50a0c..651ea18a1bbf 100644 --- a/external/more_fonts/ExternalPackage_karla.mk +++ b/external/more_fonts/ExternalPackage_karla.mk @@ -10,10 +10,10 @@ $(eval $(call gb_ExternalPackage_ExternalPackage,fonts_karla,font_karla)) $(eval $(call gb_ExternalPackage_add_unpacked_files,fonts_karla,$(LIBO_SHARE_FOLDER)/fonts/truetype,\ - Karla-Italic.ttf \ - Karla-Regular.ttf \ - Karla-BoldItalic.ttf \ - Karla-Bold.ttf \ + fonts/ttf/Karla-Italic.ttf \ + fonts/ttf/Karla-Regular.ttf \ + fonts/ttf/Karla-BoldItalic.ttf \ + fonts/ttf/Karla-Bold.ttf \ )) # vim: set noet sw=4 ts=4:
core.git: Branch 'distro/collabora/co-24.04' - download.lst external/more_fonts
download.lst |4 ++-- external/more_fonts/ExternalPackage_karla.mk |8 2 files changed, 6 insertions(+), 6 deletions(-) New commits: commit ca7af7bef0968478ea42d78da42b205bdf6f432d Author: Caolán McNamara AuthorDate: Thu Sep 19 12:41:14 2024 +0100 Commit: Andras Timar CommitDate: Thu Sep 19 14:20:24 2024 +0200 upgrade to current Karla font that contains the 'fi' ligature Change-Id: I4577b3250b8d1366b03d080c49643ef15eeff2fd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173665 Tested-by: Jenkins CollaboraOffice Reviewed-by: Andras Timar diff --git a/download.lst b/download.lst index 01733eefb9f9..c8bf1faa8502 100644 --- a/download.lst +++ b/download.lst @@ -150,8 +150,8 @@ FONT_GENTIUM_TARBALL := 1725634df4bb3dcb1b2c91a6175f8789-GentiumBasic_1102.zip # three static lines # so that git cherry-pick # will not run into conflicts -FONT_KARLA_SHA256SUM := 0cba83e7d555ae792d98a657b847cff1ccb198ecf740117a610f76d66e48eaba -FONT_KARLA_TARBALL := 506757f768adb2331881d5186f7286bd-karla.zip +FONT_KARLA_SHA256SUM := c64cdbc55389c1bfb320dcef41a19f156bad271a99bc9253be118564dbb738b5 +FONT_KARLA_TARBALL := 2024-09-19-karla-main.zip # three static lines # so that git cherry-pick # will not run into conflicts diff --git a/external/more_fonts/ExternalPackage_karla.mk b/external/more_fonts/ExternalPackage_karla.mk index 580777e50a0c..651ea18a1bbf 100644 --- a/external/more_fonts/ExternalPackage_karla.mk +++ b/external/more_fonts/ExternalPackage_karla.mk @@ -10,10 +10,10 @@ $(eval $(call gb_ExternalPackage_ExternalPackage,fonts_karla,font_karla)) $(eval $(call gb_ExternalPackage_add_unpacked_files,fonts_karla,$(LIBO_SHARE_FOLDER)/fonts/truetype,\ - Karla-Italic.ttf \ - Karla-Regular.ttf \ - Karla-BoldItalic.ttf \ - Karla-Bold.ttf \ + fonts/ttf/Karla-Italic.ttf \ + fonts/ttf/Karla-Regular.ttf \ + fonts/ttf/Karla-BoldItalic.ttf \ + fonts/ttf/Karla-Bold.ttf \ )) # vim: set noet sw=4 ts=4:
core.git: Branch 'libreoffice-24-2' - external/libtiff
external/libtiff/UnpackedTarball_libtiff.mk |1 + external/libtiff/ofz68840.patch | 17 + 2 files changed, 18 insertions(+) New commits: commit 3545ae224190081908c37e3b9d16e8d28d788aed Author: Caolán McNamara AuthorDate: Fri May 24 20:43:42 2024 +0100 Commit: Michael Stahl CommitDate: Thu Sep 19 13:47:25 2024 +0200 ofz#68840 another putcontig8bitYCbCr22tile issue Change-Id: I6e119cf1b3bec609f94784eb0c439835875d6112 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168031 Tested-by: Jenkins Reviewed-by: Caolán McNamara (cherry picked from commit 034b68eb3a015553254c7238b13db8f94514080d) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173653 Reviewed-by: Michael Stahl diff --git a/external/libtiff/UnpackedTarball_libtiff.mk b/external/libtiff/UnpackedTarball_libtiff.mk index f7eeb6ace868..f268be5926c6 100644 --- a/external/libtiff/UnpackedTarball_libtiff.mk +++ b/external/libtiff/UnpackedTarball_libtiff.mk @@ -16,6 +16,7 @@ $(eval $(call gb_UnpackedTarball_set_patchlevel,libtiff,1)) $(eval $(call gb_UnpackedTarball_add_patches,libtiff,\ external/libtiff/libtiff.linknolibs.patch \ external/libtiff/0001-ofz-54685-Timeout.patch \ +external/libtiff/ofz68840.patch \ )) # vim: set noet sw=4 ts=4: diff --git a/external/libtiff/ofz68840.patch b/external/libtiff/ofz68840.patch new file mode 100644 index ..0a8721ebe012 --- /dev/null +++ b/external/libtiff/ofz68840.patch @@ -0,0 +1,17 @@ +--- a/libtiff/tif_tile.c b/libtiff/tif_tile.c +@@ -233,7 +233,13 @@ + _TIFFMultiply64(tif, samplingrow_size, samplingblocks_ver, module)); + } + else +-return (_TIFFMultiply64(tif, nrows, TIFFTileRowSize64(tif), module)); ++{ ++uint64_t row_size = TIFFTileRowSize64(tif); ++/* I think the way this works the expectation is there are always even num of samples */ ++if (td->td_photometric == PHOTOMETRIC_YCBCR) ++row_size = TIFFroundup_64(row_size, 2); ++return (_TIFFMultiply64(tif, nrows, row_size, module)); ++} + } + tmsize_t TIFFVTileSize(TIFF *tif, uint32_t nrows) + {
core.git: svtools/source
svtools/source/uno/popupwindowcontroller.cxx | 10 ++ 1 file changed, 10 insertions(+) New commits: commit ceff75b533654154ac077a7313ebebd53aedaa5e Author: Caolán McNamara AuthorDate: Wed Sep 18 17:05:51 2024 +0100 Commit: Caolán McNamara CommitDate: Thu Sep 19 09:21:09 2024 +0200 Resolves: tdf#141577 explicitly set current frame as active frame of the current frame window. Creating the popup will grab focus into the dropdown, making the embedded frame lose focus, so it considers itself inactive (like right clicking in main frame area makes the embedded frame lose focus), so for this embedded object in another frame case make the original frame the active child of its parent after the popup has been created. Change-Id: Id6e12babcf4ebce05c297888b7b04756f2a12ccf Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173624 Tested-by: Jenkins Reviewed-by: Caolán McNamara diff --git a/svtools/source/uno/popupwindowcontroller.cxx b/svtools/source/uno/popupwindowcontroller.cxx index 63326fcf570a..18aad5cef74b 100644 --- a/svtools/source/uno/popupwindowcontroller.cxx +++ b/svtools/source/uno/popupwindowcontroller.cxx @@ -212,6 +212,16 @@ Reference< awt::XWindow > SAL_CALL PopupWindowController::createPopupWindow() { mxPopoverContainer->unsetPopover(); mxPopoverContainer->setPopover(weldPopupWindow()); + +// tdf#141577 setPopover might GrabFocus, which may cause the ActiveFrame to be +// unset. So explicitly set this frame as the active frame of its parent when +// this popup is created. +if (uno::Reference xFrame = getFrameInterface()) +{ +if (uno::Reference xParentFrame = xFrame->getCreator()) +xParentFrame->setActiveFrame(xFrame); +} + return Reference(); }
core.git: sc/source
sc/source/filter/html/htmlpars.cxx |2 ++ 1 file changed, 2 insertions(+) New commits: commit e3c181331dbd5fca36576bac4e79ddcceb7369e5 Author: Caolán McNamara AuthorDate: Wed Sep 18 17:29:41 2024 +0100 Commit: Caolán McNamara CommitDate: Thu Sep 19 09:20:43 2024 +0200 ofz: Timeout in schtmlfuzzer use same fuzzing rowspan limit as xml import Change-Id: Id75d8cb8859bb2a6494d6aea160905cc6b75cb46 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173645 Tested-by: Jenkins Reviewed-by: Caolán McNamara diff --git a/sc/source/filter/html/htmlpars.cxx b/sc/source/filter/html/htmlpars.cxx index cf4aa77a3ae3..924346c7de8e 100644 --- a/sc/source/filter/html/htmlpars.cxx +++ b/sc/source/filter/html/htmlpars.cxx @@ -1082,6 +1082,8 @@ void ScHTMLLayoutParser::TableDataOn( HtmlImportInfo* pInfo ) mxActEntry->nRowOverlap = static_cast(nRowOverlap); else SAL_WARN("sc", "ScHTMLLayoutParser::TableDataOn ignoring rowspan: " << nRowOverlap); +if (comphelper::IsFuzzing()) +mxActEntry->nRowOverlap = std::min(mxActEntry->nRowOverlap, sal_Int32(1024)); } break; case HtmlOptionId::ALIGN:
core.git: linguistic/source
linguistic/source/gciterator.cxx |7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) New commits: commit 42f8b7ab7f76676987e5b3aabedffcc3466bcaed Author: Caolán McNamara AuthorDate: Tue Sep 17 14:10:27 2024 +0100 Commit: Caolán McNamara CommitDate: Wed Sep 18 22:13:23 2024 +0200 reset m_bEnd after use to quit lcl_workerfunc so lcl_workerfunc can be launched again on-demand Change-Id: I23dd48dc433190413f5c63464dcce112128b81ad Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173564 Tested-by: Jenkins CollaboraOffice Reviewed-by: Michael Meeks (cherry picked from commit fd88a5bcb271a1711f484a319ee23d6b7013b232) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173502 Reviewed-by: Caolán McNamara Tested-by: Jenkins diff --git a/linguistic/source/gciterator.cxx b/linguistic/source/gciterator.cxx index 2c8f5f4dbb3b..2077c4dc4328 100644 --- a/linguistic/source/gciterator.cxx +++ b/linguistic/source/gciterator.cxx @@ -310,9 +310,14 @@ void GrammarCheckingIterator::TerminateThread() osl_joinWithThread(t); osl_destroyThread(t); } +// After m_bEnd was used to flag lcl_workerfunc to quit, now +// reset it so lcl_workerfunc could be relaunched later. +{ +::osl::Guard< ::osl::Mutex > aGuard( MyMutex() ); +m_bEnd = false; +} } - bool GrammarCheckingIterator::joinThreads() { TerminateThread();
core.git: vcl/unx
vcl/unx/gtk3/gtkinst.cxx | 11 +++ 1 file changed, 11 insertions(+) New commits: commit 1972d0d9d63639ce35096e412f3157a708dbb60a Author: Caolán McNamara AuthorDate: Wed Sep 18 13:10:43 2024 +0100 Commit: Caolán McNamara CommitDate: Wed Sep 18 21:25:12 2024 +0200 Resolves: tdf#162538 explicitly make buttons gain focus on activatation even if by keyboard. So spinbuttons that depend on losing focus to update will update before 'ok' is called. Change-Id: I1eddd4c29c3ffeb06ead058c9efbdfde01418589 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173616 Tested-by: Jenkins Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara diff --git a/vcl/unx/gtk3/gtkinst.cxx b/vcl/unx/gtk3/gtkinst.cxx index 2c54e1662e41..4bad56a9544e 100644 --- a/vcl/unx/gtk3/gtkinst.cxx +++ b/vcl/unx/gtk3/gtkinst.cxx @@ -9914,6 +9914,17 @@ private: { GtkInstanceButton* pThis = static_cast(widget); SolarMutexGuard aGuard; +// tdf#162538, SpinButtons update on losing focus, and use of keyboard +// short cuts to activate buttons doesn't guarantee the button gains +// focus when activated, so ensure that explicitly so spinbuttons are +// updated. +if (!gtk_widget_has_focus(pThis->m_pWidget)) +{ +GtkWindow* pWindow = GTK_WINDOW(widget_get_toplevel(pThis->m_pWidget)); +GtkWidget* pFocus = pWindow ? gtk_window_get_focus(pWindow) : nullptr; +if (pFocus && GTK_IS_SPIN_BUTTON(pFocus)) +gtk_widget_grab_focus(pThis->m_pWidget); +} pThis->signal_clicked(); }
core.git: basegfx/source scaddins/source sfx2/source svl/source svx/source sw/source
basegfx/source/polygon/b2dsvgpolypolygon.cxx|6 -- scaddins/source/analysis/analysis.cxx |2 +- sfx2/source/view/lokcharthelper.cxx |3 ++- svl/source/numbers/zformat.cxx |2 +- svx/source/svdraw/svdpage.cxx |2 +- sw/source/core/crsr/trvlfnfl.cxx|9 + sw/source/core/doc/DocumentStylePoolManager.cxx |5 - sw/source/core/doc/doccomp.cxx |2 +- sw/source/core/doc/docftn.cxx |2 +- sw/source/uibase/dochdl/gloshdl.cxx |8 10 files changed, 24 insertions(+), 17 deletions(-) New commits: commit 35dfb73889a084fc4a428071471429396a7d1287 Author: Caolán McNamara AuthorDate: Tue Sep 17 17:02:10 2024 +0100 Commit: Caolán McNamara CommitDate: Wed Sep 18 21:24:57 2024 +0200 cid#1607355 silence Overflowed constant and cid#1607426 Overflowed constant cid#1608151 Overflowed constant cid#1608163 Overflowed constant cid#1608208 Overflowed constant cid#1608228 Overflowed constant cid#1608299 Overflowed constant cid#1608549 Overflowed constant cid#1607982 Overflowed constant cid#1608078 Overflowed return value Change-Id: Id4ccc03b610f4dcf7912c239c7c079da1aef4ba2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173615 Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara diff --git a/basegfx/source/polygon/b2dsvgpolypolygon.cxx b/basegfx/source/polygon/b2dsvgpolypolygon.cxx index fe4f646eb3ba..9728a3896de6 100644 --- a/basegfx/source/polygon/b2dsvgpolypolygon.cxx +++ b/basegfx/source/polygon/b2dsvgpolypolygon.cxx @@ -265,15 +265,17 @@ namespace basegfx::utils } // ensure existence of start point -if(!aCurrPoly.count()) +sal_uInt32 nCurrPolyCount = aCurrPoly.count(); +if (nCurrPolyCount == 0) { aCurrPoly.append(B2DPoint(nLastX, nLastY)); +nCurrPolyCount = 1; } // get first control point. It's the reflection of the PrevControlPoint // of the last point. If not existent, use current point (see SVG) B2DPoint aPrevControl(nLastX, nLastY); -const sal_uInt32 nIndex(aCurrPoly.count() - 1); +const sal_uInt32 nIndex(nCurrPolyCount - 1); if(aCurrPoly.areControlPointsUsed() && aCurrPoly.isPrevControlPointUsed(nIndex)) { diff --git a/scaddins/source/analysis/analysis.cxx b/scaddins/source/analysis/analysis.cxx index 249946f3699c..81e12782a320 100644 --- a/scaddins/source/analysis/analysis.cxx +++ b/scaddins/source/analysis/analysis.cxx @@ -407,7 +407,7 @@ sal_Int32 SAL_CALL AnalysisAddIn::getWeeknum( const uno::Reference< beans::XProp DaysToDate( nDate, nDay, nMonth, nYear ); sal_Int32 nFirstInYear = DateToDays( 1, 1, nYear ); -sal_uInt16 nFirstDayInYear = GetDayOfWeek( nFirstInYear ); +sal_Int16 nFirstDayInYear = GetDayOfWeek( nFirstInYear ); return ( nDate - nFirstInYear + ( ( nMode == 1 )? ( nFirstDayInYear + 1 ) % 7 : nFirstDayInYear ) ) / 7 + 1; } diff --git a/sfx2/source/view/lokcharthelper.cxx b/sfx2/source/view/lokcharthelper.cxx index f8e8ec47ea4e..f8b31f7c4f10 100644 --- a/sfx2/source/view/lokcharthelper.cxx +++ b/sfx2/source/view/lokcharthelper.cxx @@ -85,8 +85,9 @@ vcl::Window* LokChartHelper::GetWindow() if (pParent) { sal_uInt16 nTotChildren = pParent->GetChildCount(); -while (nTotChildren--) +while (nTotChildren > 0) { +--nTotChildren; vcl::Window* pChildWin = pParent->GetChild(nTotChildren); if (pChildWin && pChildWin->IsChart()) { diff --git a/svl/source/numbers/zformat.cxx b/svl/source/numbers/zformat.cxx index 31991e8c20b5..eda77fc62859 100644 --- a/svl/source/numbers/zformat.cxx +++ b/svl/source/numbers/zformat.cxx @@ -1554,7 +1554,7 @@ OUString SvNumberformat::LocaleType::generateCode() const { aBuf.append(toUniChar(n)); } -n16 = n16 << 4; +n16 = (n16 << 4) & 0x; } return aBuf.makeStringAndClear(); diff --git a/svx/source/svdraw/svdpage.cxx b/svx/source/svdraw/svdpage.cxx index 7618c51c825a..db4a041c577d 100644 --- a/svx/source/svdraw/svdpage.cxx +++ b/svx/source/svdraw/svdpage.cxx @@ -684,7 +684,7 @@ void SdrObjList::sort( std::vector& sortOrder) { if (nPrev != aDuplicates[i]) aNewSortOrder[i] = aDuplicates[i] + aIncrements[aDuplicates
core.git: ucb/source unodevtools/source unoidl/source
ucb/source/ucp/file/filglob.cxx|2 +- unodevtools/source/skeletonmaker/javatypemaker.cxx |3 ++- unoidl/source/sourceprovider-parser.y |3 ++- 3 files changed, 5 insertions(+), 3 deletions(-) New commits: commit b35a1ee2aa85d42a749c4380feb252dc4c1e143c Author: Caolán McNamara AuthorDate: Tue Sep 17 17:00:13 2024 +0100 Commit: Caolán McNamara CommitDate: Wed Sep 18 18:03:24 2024 +0200 cid#1607362 Overflowed constant and cid#1607419 Overflowed constant cid#1608605 Overflowed constant Change-Id: Ia63cc771021d8a8031c62582a2fa6a68dc214f08 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173614 Reviewed-by: Caolán McNamara Tested-by: Jenkins diff --git a/ucb/source/ucp/file/filglob.cxx b/ucb/source/ucp/file/filglob.cxx index ce719986961f..93fb4ad81a4d 100644 --- a/ucb/source/ucp/file/filglob.cxx +++ b/ucb/source/ucp/file/filglob.cxx @@ -187,7 +187,7 @@ namespace fileaccess { std::u16string_view getTitle( std::u16string_view aPath ) { size_t lastIndex = aPath.rfind( '/' ); -return aPath.substr( lastIndex + 1 ); +return aPath.substr((lastIndex != std::u16string_view::npos) ? lastIndex + 1 : 0); } diff --git a/unodevtools/source/skeletonmaker/javatypemaker.cxx b/unodevtools/source/skeletonmaker/javatypemaker.cxx index 639438799d48..49a86e87d866 100644 --- a/unodevtools/source/skeletonmaker/javatypemaker.cxx +++ b/unodevtools/source/skeletonmaker/javatypemaker.cxx @@ -252,7 +252,8 @@ static void printConstructor( rtl::Reference< unoidl::Entity > const & entity, std::u16string_view name, std::vector< OUString > const & arguments) { -o << "public " << OUString(name.substr(name.rfind('.') + 1)) << '('; +std::u16string_view::size_type pos = name.rfind('.'); +o << "public " << OUString(name.substr((pos != std::u16string_view::npos) ? pos + 1 : 0)) << '('; printConstructorParameters( o, options, manager, sort, entity, name, arguments); o << "); "; diff --git a/unoidl/source/sourceprovider-parser.y b/unoidl/source/sourceprovider-parser.y index 0ce80ac5d9ac..2b126d4811bb 100644 --- a/unoidl/source/sourceprovider-parser.y +++ b/unoidl/source/sourceprovider-parser.y @@ -168,7 +168,8 @@ template rtl::Reference getCurrentPad( bool nameHasSameIdentifierAs(std::u16string_view name, std::u16string_view identifier) { -size_t i = name.rfind('.') + 1; +std::u16string_view::size_type pos = name.rfind('.'); +size_t i = (pos != std::u16string_view::npos) ? pos + 1 : 0; return identifier.size() == name.size() - i && o3tl::starts_with(name.substr(i), identifier); }
core.git: wizards/com
wizards/com/sun/star/wizards/db/DBMetaData.java |2 +- wizards/com/sun/star/wizards/db/SQLQueryComposer.java |7 ++- wizards/com/sun/star/wizards/report/ReportTextImplementation.java |2 +- wizards/com/sun/star/wizards/report/ReportWizard.java |2 +- 4 files changed, 9 insertions(+), 4 deletions(-) New commits: commit 7da920fa17b4006b2d26cd3963d5cedf0a375a41 Author: Caolán McNamara AuthorDate: Tue Sep 17 17:39:44 2024 +0100 Commit: Caolán McNamara CommitDate: Wed Sep 18 14:34:44 2024 +0200 cid#1608459 PA: Public Attribute Change-Id: I6dccead2abe3062558a1b87c56c6efc14cf0fb19 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173589 Reviewed-by: Caolán McNamara Tested-by: Jenkins diff --git a/wizards/com/sun/star/wizards/db/DBMetaData.java b/wizards/com/sun/star/wizards/db/DBMetaData.java index 1a720b0ac3a5..6367c3800536 100644 --- a/wizards/com/sun/star/wizards/db/DBMetaData.java +++ b/wizards/com/sun/star/wizards/db/DBMetaData.java @@ -750,7 +750,7 @@ public class DBMetaData Object oQuery = xSSFQueryDefs.createInstance(); //"com.sun.star.sdb.QueryDefinition" XPropertySet xPSet = UnoRuntime.queryInterface( XPropertySet.class, oQuery ); -String s = _oSQLQueryComposer.m_xQueryAnalyzer.getQuery(); +String s = _oSQLQueryComposer.getQuery(); xPSet.setPropertyValue(PropertyNames.COMMAND, s); XNameContainer xNameCont = UnoRuntime.queryInterface( XNameContainer.class, xQueryDefs ); diff --git a/wizards/com/sun/star/wizards/db/SQLQueryComposer.java b/wizards/com/sun/star/wizards/db/SQLQueryComposer.java index 17bc953affa9..9ab58f2861dd 100644 --- a/wizards/com/sun/star/wizards/db/SQLQueryComposer.java +++ b/wizards/com/sun/star/wizards/db/SQLQueryComposer.java @@ -39,7 +39,7 @@ public class SQLQueryComposer { private QueryMetaData CurDBMetaData; -public XSingleSelectQueryAnalyzer m_xQueryAnalyzer; +private XSingleSelectQueryAnalyzer m_xQueryAnalyzer; private ArrayList composedCommandNames = new ArrayList(1); private XSingleSelectQueryComposer m_queryComposer; private XMultiServiceFactory xMSF; @@ -225,6 +225,11 @@ public class SQLQueryComposer return _filterconditions; } +public void setQuery(String Query) throws SQLException +{ +m_xQueryAnalyzer.setQuery(Query); +} + public String getQuery() { return m_xQueryAnalyzer.getQuery(); diff --git a/wizards/com/sun/star/wizards/report/ReportTextImplementation.java b/wizards/com/sun/star/wizards/report/ReportTextImplementation.java index 590d54473861..6d81e99fc87b 100644 --- a/wizards/com/sun/star/wizards/report/ReportTextImplementation.java +++ b/wizards/com/sun/star/wizards/report/ReportTextImplementation.java @@ -277,7 +277,7 @@ public class ReportTextImplementation extends ReportImplementationHelper impleme { return bexecute; } - getRecordParser().getSQLQueryComposer().m_xQueryAnalyzer.setQuery(getRecordParser().Command); + getRecordParser().getSQLQueryComposer().setQuery(getRecordParser().Command); getRecordParser().getSQLQueryComposer().prependSortingCriteria(); getRecordParser().Command = getRecordParser().getSQLQueryComposer().getQuery(); diff --git a/wizards/com/sun/star/wizards/report/ReportWizard.java b/wizards/com/sun/star/wizards/report/ReportWizard.java index 1b3eff175dba..8ad2c611292d 100644 --- a/wizards/com/sun/star/wizards/report/ReportWizard.java +++ b/wizards/com/sun/star/wizards/report/ReportWizard.java @@ -275,7 +275,7 @@ public class ReportWizard extends DatabaseObjectWizard implements XTextListener { if (m_reportDocument instanceof ReportTextImplementation) { -sqlQueryComposer.m_xQueryAnalyzer.setQuery(sCommand); +sqlQueryComposer.setQuery(sCommand); sqlQueryComposer.prependSortingCriteria(); m_reportDocument.setCommandType(CommandType.COMMAND); m_reportDocument.setCommand(sqlQueryComposer.getQuery());
core.git: sw/source
sw/source/uibase/config/cfgitems.cxx |3 +++ 1 file changed, 3 insertions(+) New commits: commit bbef07065433ecc33e22724e65974e2b7509929a Author: Caolán McNamara AuthorDate: Wed Sep 18 08:22:46 2024 +0100 Commit: Caolán McNamara CommitDate: Wed Sep 18 13:15:16 2024 +0200 cid#1619460 Uninitialized scalar field since: commit 4855bbfa4d0cbc6376ab2a40151886f84fafac40 CommitDate: Tue Sep 17 03:44:46 2024 +0200 tdf#132274 add zoom defaults to Writer options Change-Id: Ie7dae9add87fe14c87b53d9b86d77a84ce0c2a7a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173587 Tested-by: Jenkins Reviewed-by: Caolán McNamara diff --git a/sw/source/uibase/config/cfgitems.cxx b/sw/source/uibase/config/cfgitems.cxx index 3a1cb2bf4ca2..a041169dbba4 100644 --- a/sw/source/uibase/config/cfgitems.cxx +++ b/sw/source/uibase/config/cfgitems.cxx @@ -126,6 +126,9 @@ SwElemItem::SwElemItem(const SwViewOption& rVOpt) : m_bShowChangesInMargin = rVOpt.IsShowChangesInMargin(); m_bFieldHiddenText = rVOpt.IsShowHiddenField(); m_bShowHiddenPara = rVOpt.IsShowHiddenPara(); +m_bDefaultZoom = false; +m_eDefaultZoomType = rVOpt.GetZoomType(); +m_nDefaultZoomValue = rVOpt.GetZoom(); } SwElemItem* SwElemItem::Clone( SfxItemPool* ) const
core.git: Branch 'libreoffice-24-8' - desktop/source
desktop/source/lib/init.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 1c4f8f5e610f3866fef283f101d1984108e70e63 Author: Caolán McNamara AuthorDate: Mon Sep 16 17:33:44 2024 +0100 Commit: Michael Stahl CommitDate: Wed Sep 18 12:27:21 2024 +0200 This should iterate over the thesaurus languages, not the spelling ones Change-Id: I94410274f7afbc0a6bc33fe43beb9810a905dfe4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173467 Tested-by: Jenkins CollaboraOffice Reviewed-by: Miklos Vajna Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173556 Reviewed-by: Caolán McNamara Tested-by: Jenkins (cherry picked from commit 9671a3d31e279a40378a7ddf05e57df982e4bc98) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173497 Reviewed-by: Michael Stahl diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx index be7cf1554ccc..a892eb51a981 100644 --- a/desktop/source/lib/init.cxx +++ b/desktop/source/lib/init.cxx @@ -7610,7 +7610,7 @@ static void preloadData() // preload all available thesauri css::uno::Reference xThesaurus(xLngSvcMgr->getThesaurus()); -css::uno::Reference xThesLocales(xSpellChecker, css::uno::UNO_QUERY_THROW); +css::uno::Reference xThesLocales(xThesaurus, css::uno::UNO_QUERY_THROW); aLocales = xThesLocales->getLocales(); std::cerr << "Preloading thesauri: "; for (auto& it : aLocales)
core.git: comphelper/source include/comphelper
comphelper/source/misc/accessiblekeybindinghelper.cxx | 20 -- include/comphelper/accessiblekeybindinghelper.hxx |1 2 files changed, 21 deletions(-) New commits: commit 36b988312ae8013deefcdf4800592230e7c95ad8 Author: Caolán McNamara AuthorDate: Tue Sep 17 17:27:13 2024 +0100 Commit: Caolán McNamara CommitDate: Wed Sep 18 11:45:21 2024 +0200 cid#174 drop unused copy ctor Change-Id: Ibaad87cc2f481f3bc7f726ecde0c466a563a96a7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173588 Reviewed-by: Caolán McNamara Tested-by: Jenkins diff --git a/comphelper/source/misc/accessiblekeybindinghelper.cxx b/comphelper/source/misc/accessiblekeybindinghelper.cxx index d1db69b98fa8..88c1edd348ed 100644 --- a/comphelper/source/misc/accessiblekeybindinghelper.cxx +++ b/comphelper/source/misc/accessiblekeybindinghelper.cxx @@ -26,34 +26,20 @@ namespace comphelper { - - using namespace ::com::sun::star; // MT 04/2003: was ::drafts::com::sun::star - otherwise too many changes using namespace ::com::sun::star::uno; using namespace ::com::sun::star::lang; using namespace ::com::sun::star::accessibility; - // OAccessibleKeyBindingHelper - - OAccessibleKeyBindingHelper::OAccessibleKeyBindingHelper() { } - -OAccessibleKeyBindingHelper::OAccessibleKeyBindingHelper( const OAccessibleKeyBindingHelper& rHelper ) -: cppu::WeakImplHelper( rHelper ) -, m_aKeyBindings( rHelper.m_aKeyBindings ) -{ -} - - OAccessibleKeyBindingHelper::~OAccessibleKeyBindingHelper() { } - void OAccessibleKeyBindingHelper::AddKeyBinding( const Sequence< awt::KeyStroke >& rKeyBinding ) { std::scoped_lock aGuard( m_aMutex ); @@ -61,17 +47,13 @@ namespace comphelper m_aKeyBindings.push_back( rKeyBinding ); } - void OAccessibleKeyBindingHelper::AddKeyBinding( const awt::KeyStroke& rKeyStroke ) { std::scoped_lock aGuard( m_aMutex ); m_aKeyBindings.push_back( { rKeyStroke } ); } - // XAccessibleKeyBinding - - sal_Int32 OAccessibleKeyBindingHelper::getAccessibleKeyBindingCount() { std::scoped_lock aGuard( m_aMutex ); @@ -79,7 +61,6 @@ namespace comphelper return m_aKeyBindings.size(); } - Sequence< awt::KeyStroke > OAccessibleKeyBindingHelper::getAccessibleKeyBinding( sal_Int32 nIndex ) { std::scoped_lock aGuard( m_aMutex ); @@ -90,7 +71,6 @@ namespace comphelper return m_aKeyBindings[nIndex]; } - } // namespace comphelper diff --git a/include/comphelper/accessiblekeybindinghelper.hxx b/include/comphelper/accessiblekeybindinghelper.hxx index fe6b03521f5b..c1b8782be0e4 100644 --- a/include/comphelper/accessiblekeybindinghelper.hxx +++ b/include/comphelper/accessiblekeybindinghelper.hxx @@ -49,7 +49,6 @@ namespace comphelper public: OAccessibleKeyBindingHelper(); -OAccessibleKeyBindingHelper( const OAccessibleKeyBindingHelper& rHelper ); /// @throws css::uno::RuntimeException void AddKeyBinding( const css::uno::Sequence< css::awt::KeyStroke >& rKeyBinding );
core.git: Branch 'distro/collabora/co-24.04.7' - linguistic/source
linguistic/source/gciterator.cxx |7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) New commits: commit a49343122ea1b1b66457e8c6dbba74db8c4bd002 Author: Caolán McNamara AuthorDate: Tue Sep 17 14:10:27 2024 +0100 Commit: Andras Timar CommitDate: Tue Sep 17 21:07:42 2024 +0200 reset m_bEnd after use to quit lcl_workerfunc so lcl_workerfunc can be launched again on-demand Change-Id: I23dd48dc433190413f5c63464dcce112128b81ad Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173564 Tested-by: Jenkins CollaboraOffice Reviewed-by: Michael Meeks (cherry picked from commit fd88a5bcb271a1711f484a319ee23d6b7013b232) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173498 Reviewed-by: Andras Timar Tested-by: Andras Timar diff --git a/linguistic/source/gciterator.cxx b/linguistic/source/gciterator.cxx index ad85bab95953..7505ad634c98 100644 --- a/linguistic/source/gciterator.cxx +++ b/linguistic/source/gciterator.cxx @@ -310,9 +310,14 @@ void GrammarCheckingIterator::TerminateThread() osl_joinWithThread(t); osl_destroyThread(t); } +// After m_bEnd was used to flag lcl_workerfunc to quit, now +// reset it so lcl_workerfunc could be relaunched later. +{ +::osl::Guard< ::osl::Mutex > aGuard( MyMutex() ); +m_bEnd = false; +} } - bool GrammarCheckingIterator::joinThreads() { TerminateThread();
core.git: 2 commits - desktop/source external/libpng
desktop/source/lib/init.cxx |2 external/libpng/0001-ACES-AP0-adjusted-fixes.patch.1 | 239 +-- 2 files changed, 220 insertions(+), 21 deletions(-) New commits: commit bfb66b4ee83e5f92239ea02417ef4c1e4c8f659e Author: Caolán McNamara AuthorDate: Tue Sep 17 13:41:24 2024 +0100 Commit: Caolán McNamara CommitDate: Tue Sep 17 20:32:28 2024 +0200 ofz#71606 use extended upstream solution Change-Id: Id4c511572792da1edd7ebbe15c1fb994ac30bdd4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173561 Reviewed-by: Caolán McNamara Tested-by: Jenkins diff --git a/external/libpng/0001-ACES-AP0-adjusted-fixes.patch.1 b/external/libpng/0001-ACES-AP0-adjusted-fixes.patch.1 index af8b53554ebc..7706f71139bb 100644 --- a/external/libpng/0001-ACES-AP0-adjusted-fixes.patch.1 +++ b/external/libpng/0001-ACES-AP0-adjusted-fixes.patch.1 @@ -1,27 +1,107 @@ -From e06f9a3bece6130212b244ac4e1a1d316990f3c0 Mon Sep 17 00:00:00 2001 +From 521e8e8f7f3ef05135380d5b755e147826364da5 Mon Sep 17 00:00:00 2001 From: John Bowler Date: Mon, 16 Sep 2024 17:30:38 -0700 Subject: [PATCH] ACES AP0 adjusted fixes -The subtracts in PNG_XYZ_from_xy might be producing integer overflow -with some valid but extreme xy values. This re-introduces the previous -checks but with less limited bounds; sufficient I believe to accomodate -any reasonable set of endpoints. +The subtracts in PNG_XYZ_from_xy are producing integer overflow with +some valid but extreme xy values. This re-introduces the previous +checks but with less limited bounds; sufficient to accomodate the +ACEScg end points (ACES AP1) but not for the ACES AP0 end points. Those +were not working anyway because libpng reads the cHRM parameters as +unsigned values so they must always be at least 0. -This is a temporary fix since it outlaws valid PNG cHRM chunks; the only -valid approaches are not to check or to using floating point arithmetic -internally. +A better solution requires recognizing reasonable negative values (ones +which violate the current spec) and allowing them too, at least on read. Signed-off-by: John Bowler --- - png.c | 14 ++ - 1 file changed, 14 insertions(+) + png.c | 156 -- + 1 file changed, 120 insertions(+), 36 deletions(-) diff --git a/png.c b/png.c -index 500daea5f..5d6db2974 100644 +index 500daea5f..8a1e2a451 100644 --- a/png.c +++ b/png.c -@@ -1289,6 +1289,20 @@ png_XYZ_from_xy(png_XYZ *XYZ, const png_xy *xy) +@@ -1203,22 +1203,66 @@ png_colorspace_sync(png_const_structrp png_ptr, png_inforp info_ptr) + #endif /* GAMMA */ + + #ifdef PNG_COLORSPACE_SUPPORTED +-static int +-png_safe_add(png_int_32 *addend0_and_result, png_int_32 addend1, +- png_int_32 addend2) { +- /* Safely add three integers. Returns 0 on success, 1 on overlow. ++static png_int_32 ++png_fp_add(png_int_32 addend0, png_int_32 addend1, int *error) ++{ ++ /* Safely add two fixed point values setting an error flag and returning 0.5 ++* on overflow. + * IMPLEMENTATION NOTE: ANSI requires signed overflow not to occur, therefore + * relying on addition of two positive values producing a negative one is not + * safe. + */ +- int addend0 = *addend0_and_result; +- if (0x7fff - addend0 < addend1) +- return 1; +- addend0 += addend1; +- if (0x7fff - addend1 < addend2) +- return 1; +- *addend0_and_result = addend0 + addend2; +- return 0; ++ if (addend0 > 0) ++ { ++ if (0x7fff - addend0 >= addend1) ++ return addend0+addend1; ++ } ++ else if (addend0 < 0) ++ { ++ if (-0x7fff - addend0 <= addend1) ++ return addend0+addend1; ++ } ++ else ++ return addend1; ++ ++ *error = 1; ++ return PNG_FP_1/2; ++} ++ ++static png_int_32 ++png_fp_sub(png_int_32 addend0, png_int_32 addend1, int *error) ++{ ++ /* As above but calculate addend0-addend1. */ ++ if (addend1 > 0) ++ { ++ if (-0x7fff + addend1 <= addend0) ++ return addend0-addend1; ++ } ++ else if (addend1 < 0) ++ { ++ if (0x7fff + addend1 >= addend0) ++ return addend0+addend1; ++ } ++ else ++ return addend0; ++ ++ *error = 1; ++ return PNG_FP_1/2; ++} ++ ++static int ++png_safe_add(png_int_32 *addend0_and_result, png_int_32 addend1, ++ png_int_32 addend2) ++{ ++ /* Safely add three integers. Returns 0 on success, 1 on overflow. Does not ++* set the result on overflow. ++*/ ++ int error = 0; ++ int result = png_fp_add(*addend0_and_result, ++ png_fp_add(addend1, addend2, &error), ++ &error); ++ if (!error) *addend0_and_result = result; ++ return error; + } + + /* Added at libpng-1.5.5 to support read and write of true CIEXYZ values for +@@ -1289,6 +1333,29 @@ png_XYZ_from_xy(png_XYZ *XYZ, const png_xy *xy) png_fixed_point red_inverse, green_inverse, b
core.git: sw/source
sw/source/ui/misc/outline.cxx |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) New commits: commit 848ff3ffadf6f366ca952af15e6b770ad6a167dc Author: Caolán McNamara AuthorDate: Tue Sep 17 10:55:12 2024 +0100 Commit: Caolán McNamara CommitDate: Tue Sep 17 20:31:54 2024 +0200 cid#1607992 silence Overflowed constant Change-Id: Ib5ceaa4f8f42c897dba8f941e4b094d9f522b3bb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173555 Tested-by: Caolán McNamara Reviewed-by: Caolán McNamara diff --git a/sw/source/ui/misc/outline.cxx b/sw/source/ui/misc/outline.cxx index 2249dba318b0..92bfbbeaab88 100644 --- a/sw/source/ui/misc/outline.cxx +++ b/sw/source/ui/misc/outline.cxx @@ -276,9 +276,9 @@ IMPL_LINK(SwOutlineTabDialog, MenuSelectHdl, const OUString&, rIdent, void) return; } -if( nLevelNo-- ) +if (nLevelNo > 0) { -const SwNumRulesWithName *pRules = m_pChapterNumRules->GetRules( nLevelNo ); +const SwNumRulesWithName *pRules = m_pChapterNumRules->GetRules(nLevelNo - 1); if( pRules ) { pRules->ResetNumRule(m_rWrtSh, *m_xNumRule);
core.git: sw/source
sw/source/core/doc/gctable.cxx |9 - 1 file changed, 8 insertions(+), 1 deletion(-) New commits: commit 0fda9371ce530d1c79e6eb404afd7127371f7975 Author: Caolán McNamara AuthorDate: Tue Sep 17 10:53:27 2024 +0100 Commit: Caolán McNamara CommitDate: Tue Sep 17 20:31:31 2024 +0200 cid#1608032 Overflowed constant Change-Id: I4b74a139483ff932e71102ec73ab6d352e533245 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173554 Tested-by: Caolán McNamara Reviewed-by: Caolán McNamara diff --git a/sw/source/core/doc/gctable.cxx b/sw/source/core/doc/gctable.cxx index 30937cadd541..2c207ede9364 100644 --- a/sw/source/core/doc/gctable.cxx +++ b/sw/source/core/doc/gctable.cxx @@ -441,9 +441,16 @@ static bool lcl_MergeGCLine(SwTableLine* pLn, GCLinePara* pGCPara) } // ATTENTION: The number of boxes can change! -for( SwTableBoxes::size_type nLen = 0; nLen < pLn->GetTabBoxes().size(); ++nLen ) +SwTableBoxes::size_type nLen = 0; +while (nLen < pLn->GetTabBoxes().size()) +{ if( !lcl_MergeGCBox( pLn->GetTabBoxes()[nLen], pGCPara )) +{ --nLen; +continue; +} +++nLen; +} } return true; }