[Libreoffice-commits] core.git: sw/inc sw/source
sw/inc/accmap.hxx|4 sw/source/core/access/accmap.cxx | 196 ++- 2 files changed, 76 insertions(+), 124 deletions(-) New commits: commit 14dc749f575a8faea301472ed22f9c6b24044e8d Author: Noel Grandin AuthorDate: Wed Aug 30 16:02:29 2023 +0200 Commit: Noel Grandin CommitDate: Fri Sep 1 08:49:17 2023 +0200 use concrete type for SwAccessibleMap::mxCursorContext avoid some unnecessary casting Change-Id: I354ac67aa7a0c7f8ebe676315c66c97af31dc4e1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156318 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/sw/inc/accmap.hxx b/sw/inc/accmap.hxx index 33f3a2d93f94..42a73cbf4fe9 100644 --- a/sw/inc/accmap.hxx +++ b/sw/inc/accmap.hxx @@ -27,7 +27,7 @@ #include #include - +#include #include #include #include @@ -108,7 +108,7 @@ class SwAccessibleMap final : public ::accessibility::IAccessibleViewForwarder, /// preview-to-display coordinates std::unique_ptr mpPreview; -css::uno::WeakReference < css::accessibility::XAccessible > mxCursorContext; +unotools::WeakReference< SwAccessibleContext > mxCursorContext; bool mbShapeSelected; diff --git a/sw/source/core/access/accmap.cxx b/sw/source/core/access/accmap.cxx index 02038f14fc25..b8b87289286a 100644 --- a/sw/source/core/access/accmap.cxx +++ b/sw/source/core/access/accmap.cxx @@ -86,8 +86,8 @@ using namespace ::sw::access; class SwAccessibleContextMap_Impl { public: -typedef const SwFrame * key_type; -typedef uno::WeakReference < XAccessible > mapped_type; +typedef const SwFrame * key_type; +typedef unotools::WeakReference < SwAccessibleContext > mapped_type; typedef std::pair value_type; typedef std::unordered_map::iterator iterator; typedef std::unordered_map::const_iterator const_iterator; @@ -647,8 +647,8 @@ struct SwAccessibleParaSelection struct SwXAccWeakRefComp { -bool operator()( const uno::WeakReference& _rXAccWeakRef1, - const uno::WeakReference& _rXAccWeakRef2 ) const +bool operator()( const unotools::WeakReference& _rXAccWeakRef1, + const unotools::WeakReference& _rXAccWeakRef2 ) const { return _rXAccWeakRef1.get() < _rXAccWeakRef2.get(); } @@ -659,7 +659,7 @@ struct SwXAccWeakRefComp class SwAccessibleSelectedParas_Impl { public: -typedef uno::WeakReference < XAccessible > key_type; +typedef unotools::WeakReference < SwAccessibleContext > key_type; typedef SwAccessibleParaSelection mapped_type; typedef std::pair value_type; typedef SwXAccWeakRefComp key_compare; @@ -859,7 +859,7 @@ void SwAccPreviewData::AdjustLogicPgRectToVisibleArea( _iorLogicPgSwRect.AddBottom( - nTmpDiff ); } -static bool AreInSameTable( const uno::Reference< XAccessible >& rAcc, +static bool AreInSameTable( const rtl::Reference< SwAccessibleContext >& rAcc, const SwFrame *pFrame ) { bool bRet = false; @@ -870,11 +870,9 @@ static bool AreInSameTable( const uno::Reference< XAccessible >& rAcc, // by comparing the last table frame in the // follow chain, because that's cheaper than // searching the first one. -SwAccessibleContext *pAccImpl = -static_cast< SwAccessibleContext *>( rAcc.get() ); -if( pAccImpl->GetFrame()->IsCellFrame() ) +if( rAcc->GetFrame()->IsCellFrame() ) { -const SwTabFrame *pTabFrame1 = pAccImpl->GetFrame()->FindTabFrame(); +const SwTabFrame *pTabFrame1 = rAcc->GetFrame()->FindTabFrame(); if (pTabFrame1) { while (pTabFrame1->GetFollow()) @@ -904,14 +902,10 @@ void SwAccessibleMap::FireEvent( const SwAccessibleEvent_Impl& rEvent ) mpFrameMap->find( rEvent.mpParentFrame ); if( aIter != mpFrameMap->end() ) { -uno::Reference < XAccessible > xAcc( (*aIter).second ); -if (xAcc.is()) +rtl::Reference < SwAccessibleContext > xContext( (*aIter).second.get() ); +if (xContext.is() && xContext->getAccessibleRole() == AccessibleRole::PARAGRAPH) { -uno::Reference < XAccessibleContext > xContext(xAcc,uno::UNO_QUERY); -if (xContext.is() && xContext->getAccessibleRole() == AccessibleRole::PARAGRAPH) -{ -xAccImpl = static_cast< SwAccessibleContext *>( xAcc.get() ); -} +xAccImpl = xContext.get(); } } } @@ -1324,7 +1318,7 @@ void SwAccessibleM
Re: Question of Gerrit build
Hi Taichi, On Thu, Aug 31, 2023 at 11:55:58PM +0900, taichi <20001...@ymail.ne.jp> wrote: > In Gerrit build, Windows builder configuration is only for x86, isn't there > one for x86_64 or ARM64? That's correct. Your trade-off is to have fast CI feedback vs testing every possible configuration. The current setup is to test on linux (clang+dbgutil+make check and gcc+release+a smaller subset of tests), windows, mac and 2 randomly picked android configs (out of the 4). The jenkins:all label can opt in to have all android configs. The rest is covered by tinderboxes (post-submit): https://ci.libreoffice.org/view/tb%20platform%20status/ There is more there, like wasm and mac vs mac_arm64. Regards, Miklos
[Libreoffice-commits] core.git: sw/source
sw/source/core/layout/flycnt.cxx | 18 ++ sw/source/core/text/xmldump.cxx | 18 -- 2 files changed, 18 insertions(+), 18 deletions(-) New commits: commit f81554ef7855d76fbb1708b127c66e29c5d125bd Author: Miklos Vajna AuthorDate: Thu Aug 31 20:06:00 2023 +0200 Commit: Miklos Vajna CommitDate: Fri Sep 1 08:09:01 2023 +0200 sw layout xml dump: move at-content fly dumper to flycnt That's where the rest of the SwFlyAtContentFrame member functions are defined. Change-Id: I0215a21c6f3bf41a1e5998b2c5a91864c70f2f93 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156355 Tested-by: Jenkins Reviewed-by: Miklos Vajna diff --git a/sw/source/core/layout/flycnt.cxx b/sw/source/core/layout/flycnt.cxx index 113eaafbce9d..5eabc5ccaef2 100644 --- a/sw/source/core/layout/flycnt.cxx +++ b/sw/source/core/layout/flycnt.cxx @@ -1732,6 +1732,24 @@ void SwFlyAtContentFrame::DelEmpty() } } +void SwFlyAtContentFrame::dumpAsXmlAttributes(xmlTextWriterPtr pWriter) const +{ +SwFlyFreeFrame::dumpAsXmlAttributes(pWriter); + +if (m_pFollow != nullptr) +{ +(void)xmlTextWriterWriteAttribute( +pWriter, BAD_CAST("follow"), + BAD_CAST(OString::number(m_pFollow->GetFrame().GetFrameId()).getStr())); +} +if (m_pPrecede != nullptr) +{ +(void)xmlTextWriterWriteAttribute( +pWriter, BAD_CAST("precede"), + BAD_CAST(OString::number(m_pPrecede->GetFrame().GetFrameId()).getStr())); +} +} + void SwRootFrame::InsertEmptyFly(SwFlyFrame* pDel) { if (!mpFlyDestroy) diff --git a/sw/source/core/text/xmldump.cxx b/sw/source/core/text/xmldump.cxx index 48c893bf403c..e3b333b602a0 100644 --- a/sw/source/core/text/xmldump.cxx +++ b/sw/source/core/text/xmldump.cxx @@ -294,22 +294,4 @@ void SwFont::dumpAsXml(xmlTextWriterPtr writer) const (void)xmlTextWriterEndElement(writer); } -void SwFlyAtContentFrame::dumpAsXmlAttributes(xmlTextWriterPtr pWriter) const -{ -SwFlyFreeFrame::dumpAsXmlAttributes(pWriter); - -if (m_pFollow != nullptr) -{ -(void)xmlTextWriterWriteAttribute( -pWriter, BAD_CAST("follow"), - BAD_CAST(OString::number(m_pFollow->GetFrame().GetFrameId()).getStr())); -} -if (m_pPrecede != nullptr) -{ -(void)xmlTextWriterWriteAttribute( -pWriter, BAD_CAST("precede"), - BAD_CAST(OString::number(m_pPrecede->GetFrame().GetFrameId()).getStr())); -} -} - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
[Libreoffice-commits] core.git: starmath/qa
starmath/qa/cppunit/test_node.cxx | 37 +++-- 1 file changed, 19 insertions(+), 18 deletions(-) New commits: commit 0feb934fbe3a5deee24cf373922d824ddf5ea7c4 Author: Stephan Bergmann AuthorDate: Thu Aug 31 16:39:14 2023 +0200 Commit: Stephan Bergmann CommitDate: Fri Sep 1 08:08:32 2023 +0200 Replace a macro with a function Such test code should generally be non-DRY, but using a macro rather than a function here didn't help much in that regard: For a failing test, it just traded reporting the line of the failing CPPUNIT_ASSERT for reporting the line of the failing CHECK_GREEK_SYMBOL call, neither of which by itself gives sufficient context. Change-Id: Icce6a68d67d36e8809bf96dcd36ceef6b7b7c9eb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156351 Tested-by: Jenkins Reviewed-by: Stephan Bergmann diff --git a/starmath/qa/cppunit/test_node.cxx b/starmath/qa/cppunit/test_node.cxx index af9ff177f38f..acb1c27d4c79 100644 --- a/starmath/qa/cppunit/test_node.cxx +++ b/starmath/qa/cppunit/test_node.cxx @@ -36,6 +36,7 @@ public: private: void testTdf47813(); +void CHECK_GREEK_SYMBOL(OUString const & text, sal_Unicode code, bool bItalic); void testTdf52225(); CPPUNIT_TEST_SUITE(NodeTest); @@ -92,26 +93,26 @@ void NodeTest::testTdf47813() CPPUNIT_ASSERT_DOUBLES_EQUAL(1.0, nWidthR/static_cast(nWidthA), 0.03); } +void NodeTest::CHECK_GREEK_SYMBOL(OUString const & text, sal_Unicode code, bool bItalic) { +mxDocShell->SetText(text); +const SmTableNode *pTree= mxDocShell->GetFormulaTree(); +CPPUNIT_ASSERT_EQUAL(size_t(1), pTree->GetNumSubNodes()); +const SmNode *pLine = pTree->GetSubNode(0); +CPPUNIT_ASSERT(pLine); +CPPUNIT_ASSERT_EQUAL(SmNodeType::Line, pLine->GetType()); +CPPUNIT_ASSERT_EQUAL(size_t(1), pLine->GetNumSubNodes()); +const SmNode *pNode = pLine->GetSubNode(0); +CPPUNIT_ASSERT(pNode); +CPPUNIT_ASSERT_EQUAL(SmNodeType::Special, pNode->GetType()); +const SmSpecialNode *pSn = static_cast(pNode); +CPPUNIT_ASSERT_EQUAL(sal_Int32(1), pSn->GetText().getLength()); +CPPUNIT_ASSERT_EQUAL(code, pSn->GetText()[0]); +CPPUNIT_ASSERT_EQUAL(text, pSn->GetToken().aText); +CPPUNIT_ASSERT_EQUAL(bItalic, IsItalic(pSn->GetFont())); +} + void NodeTest::testTdf52225() { -#define CHECK_GREEK_SYMBOL(text, code, bItalic) do {\ -mxDocShell->SetText(text); \ -const SmTableNode *pTree= mxDocShell->GetFormulaTree(); \ -CPPUNIT_ASSERT_EQUAL(size_t(1), pTree->GetNumSubNodes()); \ -const SmNode *pLine = pTree->GetSubNode(0); \ -CPPUNIT_ASSERT(pLine); \ -CPPUNIT_ASSERT_EQUAL(SmNodeType::Line, pLine->GetType()); \ -CPPUNIT_ASSERT_EQUAL(size_t(1), pLine->GetNumSubNodes()); \ -const SmNode *pNode = pLine->GetSubNode(0); \ -CPPUNIT_ASSERT(pNode); \ -CPPUNIT_ASSERT_EQUAL(SmNodeType::Special, pNode->GetType());\ -const SmSpecialNode *pSn = static_cast(pNode); \ -CPPUNIT_ASSERT_EQUAL(sal_Int32(1), pSn->GetText().getLength()); \ -CPPUNIT_ASSERT_EQUAL(code, pSn->GetText()[0]); \ -CPPUNIT_ASSERT_EQUAL(OUString(text), pSn->GetToken().aText);\ -CPPUNIT_ASSERT_EQUAL(bItalic, IsItalic(pSn->GetFont()));\ -} while (false) - SmFormat aFormat = mxDocShell->GetFormat(); CPPUNIT_ASSERT_EQUAL(sal_Int16(2), aFormat.GetGreekCharStyle()); // default format = 2 CHECK_GREEK_SYMBOL("%ALPHA", u'\x0391', false);
[Libreoffice-commits] core.git: sd/source svx/source
sd/source/core/ThemeColorChanger.cxx | 42 ++- svx/source/theme/ThemeColorChangerCommon.cxx | 17 +- 2 files changed, 32 insertions(+), 27 deletions(-) New commits: commit 70663f464b24f223c4174681b9a469d9f554bcee Author: Tomaž Vajngerl AuthorDate: Thu Aug 31 08:11:18 2023 +0200 Commit: Tomaž Vajngerl CommitDate: Fri Sep 1 07:29:02 2023 +0200 sd: set the theme for all master pages It can be annoying for the user to set the theme one by one for each master page. The reason for this is that in MSO the master slide (which contains the theme) has multiple layouts, which are converted to master pages in LO. As LO doesn't group master pages together the theme is defined on each master page, so it is needed to change each master page one by one. Change-Id: I94d75246ca012005ab376446c0941b8f57ca Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156361 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl diff --git a/sd/source/core/ThemeColorChanger.cxx b/sd/source/core/ThemeColorChanger.cxx index adfacb6a47ac..3a5c7804ae57 100644 --- a/sd/source/core/ThemeColorChanger.cxx +++ b/sd/source/core/ThemeColorChanger.cxx @@ -154,31 +154,35 @@ void ThemeColorChanger::apply(std::shared_ptr const& pColorSet) { SdrPage* pCurrentPage = rModel.GetPage(nPage); -// Skip pages that are using a different master page -if (!pCurrentPage->TRG_HasMasterPage() -|| &pCurrentPage->TRG_GetMasterPage() != mpMasterPage) -continue; - -for (size_t nObject = 0; nObject < pCurrentPage->GetObjCount(); ++nObject) +// TODO - for now change all the objects regardless to which master page it belongs to. +// Currently we don't have a concept of master slide with a group of layouts as in MSO, but we always only +// have master pages, which aren't grouped together. In MSO the theme is defined per master slide, so when +// changing a theme, all the layouts get the new theme, as layouts are synonomus to master pages in LibreOffise, +// this is not possible to do and we would need to change the theme for each master page separately, which +// is just annoying for the user. + +// if (!pCurrentPage->TRG_HasMasterPage() || &pCurrentPage->TRG_GetMasterPage() != mpMasterPage) +// continue; + +SdrObjListIter aIter(pCurrentPage, SdrIterMode::DeepWithGroups); +while (aIter.IsMore()) { -SdrObject* pObject = pCurrentPage->GetObj(nObject); -svx::theme::updateSdrObject(*pColorSet, pObject, pView, pUndoManager); - -// update child objects -SdrObjList* pList = pObject->GetSubList(); -if (pList) -{ -SdrObjListIter aIter(pList, SdrIterMode::DeepWithGroups); -while (aIter.IsMore()) -{ -svx::theme::updateSdrObject(*pColorSet, aIter.Next(), pView, pUndoManager); -} -} +svx::theme::updateSdrObject(*pColorSet, aIter.Next(), pView, pUndoManager); } } changeThemeColors(mpDocShell, mpMasterPage, pColorSet); +// See the TODO comment a couple of line above for the explanation - need to change the ThemeColors for all master +// pages for now, but the following code will need to be changed in the future when we have the concept similar to +// master slide and layouts +for (sal_uInt16 nPage = 0; nPage < rModel.GetPageCount(); ++nPage) +{ +SdrPage* pCurrentPage = rModel.GetPage(nPage); +if (pCurrentPage->IsMasterPage() && pCurrentPage != mpMasterPage) +changeThemeColors(mpDocShell, pCurrentPage, pColorSet); +} + pUndoManager->LeaveListAction(); } diff --git a/svx/source/theme/ThemeColorChangerCommon.cxx b/svx/source/theme/ThemeColorChangerCommon.cxx index 44f041f5f3b0..446943100101 100644 --- a/svx/source/theme/ThemeColorChangerCommon.cxx +++ b/svx/source/theme/ThemeColorChangerCommon.cxx @@ -104,13 +104,8 @@ bool updateEditEngTextSections(model::ColorSet const& rColorSet, SdrObject* pObj bool updateObjectAttributes(model::ColorSet const& rColorSet, SdrObject& rObject, SfxUndoManager* pUndoManager) { -if (pUndoManager) -{ -pUndoManager->AddUndoAction( - rObject.getSdrModelFromSdrObject().GetSdrUndoFactory().CreateUndoAttrObject( -rObject, true, true)); -} bool bChanged = false; + auto aItemSet = rObject.GetMergedItemSet(); if (const XFillColorItem* pItem = aItemSet.GetItemIfSet(XATTR_FILLCOLOR, false)) @@ -151,6 +146,13 @@ bool updateObjectAttributes(model::ColorSet const& rColorSet, SdrObject& rObject } if (bChanged) { +const bool bUndo = pUndoManager && pUndoManager->IsInListAction(); +if (bUndo) +{ +
[Libreoffice-commits] core.git: sfx2/source
sfx2/source/control/charwin.cxx |7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) New commits: commit d88779fc86385dde1215fd28b78a69eacc6b4f97 Author: Jim Raykowski AuthorDate: Thu Aug 31 10:06:21 2023 -0800 Commit: Jim Raykowski CommitDate: Fri Sep 1 00:37:22 2023 +0200 tdf#156538 follow up: Use better tooltip activation rectangle This patch corrects the tooltip only being shown when the mouse pointer is in the top third of the window when using gtk3. Change-Id: I9d705c064bc4654ed660842215ffd59edc14891b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156358 Tested-by: Jenkins Reviewed-by: Jim Raykowski diff --git a/sfx2/source/control/charwin.cxx b/sfx2/source/control/charwin.cxx index 999aa2e4a95d..475583c890b0 100644 --- a/sfx2/source/control/charwin.cxx +++ b/sfx2/source/control/charwin.cxx @@ -102,10 +102,9 @@ OUString SvxCharView::GetCharInfoText() OUString SvxCharView::RequestHelp(tools::Rectangle& rHelpRect) { -OUString sCharInfoText(GetCharInfoText()); -// Gtk3 requires a help rectangle be supplied for the tooltip to display, X11 does not. -mxVirDev->GetTextBoundRect(rHelpRect, sCharInfoText); -return sCharInfoText; +// Gtk3 requires a rectangle be specified for the tooltip to display, X11 does not. +rHelpRect = tools::Rectangle(Point(), GetOutputSizePixel()); +return GetCharInfoText(); } bool SvxCharView::MouseButtonDown(const MouseEvent& rMEvt)
[Libreoffice-commits] core.git: include/svl sw/inc sw/source
include/svl/hint.hxx|1 sw/inc/fchrfmt.hxx |2 - sw/inc/fmtfld.hxx |2 - sw/inc/format.hxx |1 sw/inc/hintids.hxx |2 - sw/inc/hints.hxx| 17 + sw/inc/txtatr.hxx |4 +- sw/inc/txtinet.hxx |2 - sw/source/core/attr/format.cxx | 13 ++- sw/source/core/attr/hints.cxx | 10 ++--- sw/source/core/doc/DocumentStylePoolManager.cxx | 28 +++- sw/source/core/doc/docfmt.cxx | 35 +--- sw/source/core/doc/fmtcol.cxx |5 ++ sw/source/core/doc/poolfmt.cxx |8 ++-- sw/source/core/docnode/node.cxx | 11 ++ sw/source/core/fields/ddetbl.cxx|2 - sw/source/core/fields/docufld.cxx |5 +- sw/source/core/inc/flyfrm.hxx |3 - sw/source/core/inc/pagefrm.hxx |3 - sw/source/core/layout/atrfrm.cxx|9 - sw/source/core/layout/fly.cxx | 14 +++- sw/source/core/layout/flyincnt.cxx |6 +++ sw/source/core/layout/flylay.cxx|6 +++ sw/source/core/layout/pagechg.cxx | 17 +++-- sw/source/core/layout/pagedesc.cxx |7 sw/source/core/table/swtable.cxx| 10 ++--- sw/source/core/txtnode/atrfld.cxx | 16 +++-- sw/source/core/txtnode/fmtatr2.cxx | 11 +++--- sw/source/core/txtnode/ndtxt.cxx|7 +++- sw/source/core/txtnode/txtatr2.cxx | 42 +++- sw/source/core/unocore/unocoll.cxx | 22 +--- sw/source/core/unocore/unostyle.cxx |7 +--- sw/source/uibase/utlui/content.cxx |6 +-- 33 files changed, 173 insertions(+), 161 deletions(-) New commits: commit 140079362502408c75ceee67e86d779f61c0ac1b Author: Bjoern Michaelsen AuthorDate: Wed Aug 9 11:34:00 2023 +0200 Commit: Bjoern Michaelsen CommitDate: Fri Sep 1 00:05:28 2023 +0200 remove AUTOFMT_DOCNODE - remove obsolete GetInfo()s - introduce SwFormat::IsUsed() - move handling from GetInfo to SwClientNotify - make sure SwAutoFormatUsedHint is forwarded to clients where needed (e.g. SwTextFormatColl, SwDDETable, SwPageDesc, ...) Change-Id: I07d9e94ee791ca6e738b4eb3e597055ad8fbe755 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155504 Tested-by: Jenkins Reviewed-by: Bjoern Michaelsen diff --git a/include/svl/hint.hxx b/include/svl/hint.hxx index ba230f92b817..91533d4ffdbb 100644 --- a/include/svl/hint.hxx +++ b/include/svl/hint.hxx @@ -153,6 +153,7 @@ enum class SfxHintId { SwDocPosUpdateAtIndex, SwTableHeadingChange, SwVirtPageNumHint, +SwAutoFormatUsedHint, ThisIsAnSdrHint }; diff --git a/sw/inc/fchrfmt.hxx b/sw/inc/fchrfmt.hxx index 87508596013b..2b5aec14278e 100644 --- a/sw/inc/fchrfmt.hxx +++ b/sw/inc/fchrfmt.hxx @@ -60,8 +60,6 @@ public: virtual bool QueryValue( css::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const override; virtual bool PutValue( const css::uno::Any& rVal, sal_uInt8 nMemberId ) override; -virtual boolGetInfo( SfxPoolItem& rInfo ) const override; - void SetCharFormat( SwFormat* pFormat ) { assert(!pFormat->IsDefault()); // expose cases that lead to use-after-free diff --git a/sw/inc/fmtfld.hxx b/sw/inc/fmtfld.hxx index 4c4c1ea91293..ba23014a1f82 100644 --- a/sw/inc/fmtfld.hxx +++ b/sw/inc/fmtfld.hxx @@ -124,8 +124,6 @@ public: virtual booloperator==( const SfxPoolItem& ) const override; virtual SwFormatField* Clone( SfxItemPool* pPool = nullptr ) const override; -virtual bool GetInfo( SfxPoolItem& rInfo ) const override; - void InvalidateField(); const SwField* GetField() const diff --git a/sw/inc/format.hxx b/sw/inc/format.hxx index 9313b863dfbb..f420afcf512e 100644 --- a/sw/inc/format.hxx +++ b/sw/inc/format.hxx @@ -280,6 +280,7 @@ public: virtual drawinglayer::attribute::SdrAllFillAttributesHelperPtr getSdrAllFillAttributesHelper() const; virtual bool supportsFullDrawingLayerFillAttributeSet() const; void RemoveAllUnos(); +bool IsUsed() const; }; #endif // INCLUDED_SW_INC_FORMAT_HXX diff --git a/sw/inc/hintids.hxx b/sw/inc/hintids.hxx index 339a73068162..feb6299ee001 100644 --- a/sw/inc/hintids.hxx +++ b/sw/inc/hintids.hxx @@ -140,7 +140,6 @@ class SwTextGridItem; class SwTransparencyGrf; class SwFormatRuby; class SwTableFormulaUpdate; -class SwAutoFormatGetDocNode; class VirtPageNumHint; class SwFindNearestNode; class SwFltAnchor; @@ -431,7 +430,6 @@ constexpr TypedWhichId RES_OBJECTDYI
[Libreoffice-commits] core.git: 2 commits - helpcontent2 ridljar/com
helpcontent2 |2 +- ridljar/com/sun/star/lib/util/NativeLibraryLoader.java |9 - 2 files changed, 1 insertion(+), 10 deletions(-) New commits: commit 345b214c37d1f645dd0e6e084358f8ca81d9ed66 Author: Hossein AuthorDate: Thu Aug 31 11:02:09 2023 +0200 Commit: Hossein CommitDate: Fri Sep 1 00:02:44 2023 +0200 tdf#149069 Revert "ridljar: check UnoClassLoader used for NativeLibraryLoader" This reverts commit 97b61ea3297e04e64aab1e1a4ec50202e9f86fff. It checked that the NativeLibraryLoader is an instance of the class com.sun.star.lib.unoloader.UnoClassLoader. If this is not the case, a warning was displayed. This was for java_uno bridge to work. On the other hand, as the comment in the code implies, "not a problem if this is using Java remote bridge or (in a) unit test". But, in the code there was no check for that. As a result, this warning is displayed in many places like the simple examples that want to connect to the LibreOffice process via Java API. Change-Id: I056ed372ad071573051024a63e51afd6b4425ce5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156302 Reviewed-by: Michael Stahl Tested-by: Jenkins Reviewed-by: Hossein diff --git a/ridljar/com/sun/star/lib/util/NativeLibraryLoader.java b/ridljar/com/sun/star/lib/util/NativeLibraryLoader.java index d255a71ea5d1..eb5c6af34e90 100644 --- a/ridljar/com/sun/star/lib/util/NativeLibraryLoader.java +++ b/ridljar/com/sun/star/lib/util/NativeLibraryLoader.java @@ -21,7 +21,6 @@ package com.sun.star.lib.util; import java.io.File; import java.net.URL; import java.net.URLClassLoader; -import com.sun.star.lib.unoloader.UnoClassLoader; /** * Helper functions to locate and load native files. @@ -36,14 +35,6 @@ import com.sun.star.lib.unoloader.UnoClassLoader; * algorithm. */ public final class NativeLibraryLoader { -static { -// if it's some other class loader, then resolving the symbol -// Java_com_sun_star_bridges_jni_1uno_JNI_1proxy_dispatch_1call in -// java_uno will not work and result in UnsatisfiedLinkError -if (!(NativeLibraryLoader.class.getClassLoader() instanceof com.sun.star.lib.unoloader.UnoClassLoader)) { -System.err.println("warning: com.sun.star.lib.util.NativeLibraryLoader must be loaded by com.sun.star.lib.unoloader.UnoClassLoader for java_uno bridge to work (not a problem if this is using Java remote bridge or unit test)"); -} -} /** * Load a system library, using a given class loader to locate the library. * commit 462b0fee32442d6e6baffaf8a157d448dd0ecb4f Author: Olivier Hallot AuthorDate: Thu Aug 31 19:02:29 2023 -0300 Commit: Gerrit Code Review CommitDate: Fri Sep 1 00:02:29 2023 +0200 Update git submodules * Update helpcontent2 from branch 'master' to 4913c6e46228cf9b750f30f686fbb2c70baf21c7 - PDF export Help page, improve navigation Change-Id: Ic4f061289ed82cf2a42d2f0e714a4f7a40cd47e8 Reviewed-on: https://gerrit.libreoffice.org/c/help/+/156365 Tested-by: Jenkins Reviewed-by: Olivier Hallot diff --git a/helpcontent2 b/helpcontent2 index ffaa9e1adb04..4913c6e46228 16 --- a/helpcontent2 +++ b/helpcontent2 @@ -1 +1 @@ -Subproject commit ffaa9e1adb04a683ec87eb5c4c35387384e32702 +Subproject commit 4913c6e46228cf9b750f30f686fbb2c70baf21c7
[Libreoffice-commits] help.git: source/text
source/text/shared/01/ref_pdf_export_digital_signature.xhp | 52 +++--- source/text/shared/01/ref_pdf_export_general.xhp | 110 ++--- source/text/shared/01/ref_pdf_export_initial_view.xhp | 68 source/text/shared/01/ref_pdf_export_links.xhp | 34 ++-- source/text/shared/01/ref_pdf_export_security.xhp | 54 +++--- source/text/shared/01/ref_pdf_export_user_interface.xhp| 50 ++--- source/text/shared/guide/pdf_params.xhp|7 7 files changed, 190 insertions(+), 185 deletions(-) New commits: commit 4913c6e46228cf9b750f30f686fbb2c70baf21c7 Author: Olivier Hallot AuthorDate: Thu Aug 31 18:56:25 2023 -0300 Commit: Olivier Hallot CommitDate: Fri Sep 1 00:02:28 2023 +0200 PDF export Help page, improve navigation Change-Id: Ic4f061289ed82cf2a42d2f0e714a4f7a40cd47e8 Reviewed-on: https://gerrit.libreoffice.org/c/help/+/156365 Tested-by: Jenkins Reviewed-by: Olivier Hallot diff --git a/source/text/shared/01/ref_pdf_export_digital_signature.xhp b/source/text/shared/01/ref_pdf_export_digital_signature.xhp index c9278808cd..3e0f1f43e6 100644 --- a/source/text/shared/01/ref_pdf_export_digital_signature.xhp +++ b/source/text/shared/01/ref_pdf_export_digital_signature.xhp @@ -11,68 +11,68 @@ -PDF Export Digital Signature +PDF Export Digital Signature /text/shared/01/ref_pdf_export_digital_signature.xhp - + PDF export;digital signature PDF export;sign PDF document PDF export;time stamp - - + + Digital Signatures -This tab contains the options related to exporting to a digitally signed PDF. +This tab contains the options related to exporting to a digitally signed PDF. -Digital signatures are used to ensure that the PDF was really created by the original author (i.e. you), and that the document has not been modified since it was signed. -The signed PDF export uses the keys and X.509 certificates already stored in your default key store location or on a smartcard. +Digital signatures are used to ensure that the PDF was really created by the original author (i.e. you), and that the document has not been modified since it was signed. +The signed PDF export uses the keys and X.509 certificates already stored in your default key store location or on a smartcard. - + -The key store to be used can be selected under %PRODUCTNAME - Preferences +The key store to be used can be selected under %PRODUCTNAME - Preferences Tools - Options - %PRODUCTNAME - Security - Certificate Path. -When using a smartcard, it must already be configured for use by your key store. This is usually done during installation of the smartcard software. +When using a smartcard, it must already be configured for use by your key store. This is usually done during installation of the smartcard software. - + Certificate Use this certificate to digitally sign PDF documents -Allows you to select a certificate to be used for signing this PDF export. - +Allows you to select a certificate to be used for signing this PDF export. + Select -Opens the Select Certificate dialog. -All certificates found in your selected key store are displayed. If the key store is protected by a password, you are prompted for it. When using a smartcard that is protected by a PIN, you are also prompted for that. -Select the certificate to use for digitally signing the exported PDF by clicking on the corresponding line, then click OK. -All other fields on the Digital Signatures tab will be accessible only after a certificate has been selected. - +Opens the Select Certificate dialog. +All certificates found in your selected key store are displayed. If the key store is protected by a password, you are prompted for it. When using a smartcard that is protected by a PIN, you are also prompted for that. +Select the certificate to use for digitally signing the exported PDF by clicking on the corresponding line, then click OK. +All other fields on the Digital Signatures tab will be accessible only after a certificate has been selected. + Certificate password -Enter the password used for protecting the private key associated with the selected certificate. Usually this is the key store password. +Enter the password used for protecting the private key associated with the selected certificate. Usually this is the key store password. If the key store password has already been entered in the Select Certificate dialog, the key store may already be unlocked and not require the password again. But to be on the safe side, enter
[Libreoffice-commits] core.git: Branch 'distro/collabora/co-23.05' - xmloff/qa xmloff/source
xmloff/qa/unit/data/tdf157018_CustomTheme.fodg | 338 + xmloff/qa/unit/draw.cxx| 33 ++ xmloff/source/draw/ximpstyl.cxx|7 3 files changed, 373 insertions(+), 5 deletions(-) New commits: commit 117a391d871d94070b67b3c61e8cfcd5a156f9ae Author: Regina Henschel AuthorDate: Thu Aug 31 01:15:26 2023 +0200 Commit: Tomaž Vajngerl CommitDate: Thu Aug 31 21:59:07 2023 +0200 tdf#157018 Enable import of color theme for Draw Use the color theme import in Draw too, otherwise we will not be able to detect theme colors. Change-Id: I8f01ba69848a6265193407a952144b31e3a7fdb2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156313 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl (cherry picked from commit b8eebad5c7d9311b3007f6717e72e96634e57c05) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156370 Tested-by: Jenkins CollaboraOffice diff --git a/xmloff/qa/unit/data/tdf157018_CustomTheme.fodg b/xmloff/qa/unit/data/tdf157018_CustomTheme.fodg new file mode 100644 index ..49673ca66793 --- /dev/null +++ b/xmloff/qa/unit/data/tdf157018_CustomTheme.fodg @@ -0,0 +1,338 @@ + +http://openoffice.org/2004/office"; xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0" xmlns:xlink="http://www.w3.org/1999/xlink"; xmlns:config="urn:oasis:names:tc:opendocument:xmlns:config:1.0" xmlns:dc="http://purl.org/dc/elements/1.1/"; xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0" xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0" xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" xmlns:rpt="http://openoffice.org/2005/report"; xmlns:draw="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0" xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0" xmlns:chart="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" xmlns:table="urn:oasis:names:tc:opendocument:xmlns:table:1.0" xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0" xmlns:ooow="http://openoffice.org/200 4/writer" xmlns:oooc="http://openoffice.org/2004/calc"; xmlns:of="urn:oasis:names:tc:opendocument:xmlns:of:1.2" xmlns:xforms="http://www.w3.org/2002/xforms"; xmlns:tableooo="http://openoffice.org/2009/table"; xmlns:calcext="urn:org:documentfoundation:names:experimental:calc:xmlns:calcext:1.0" xmlns:drawooo="http://openoffice.org/2010/draw"; xmlns:loext="urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.0" xmlns:field="urn:openoffice:names:experimental:ooo-ms-interop:xmlns:field:1.0" xmlns:math="http://www.w3.org/1998/Math/MathML"; xmlns:form="urn:oasis:names:tc:opendocument:xmlns:form:1.0" xmlns:script="urn:oasis:names:tc:opendocument:xmlns:script:1.0" xmlns:formx="urn:openoffice:names:experimental:ooxml-odf-interop:xmlns:form:1.0" xmlns:dom="http://www.w3.org/2001/xml-events"; xmlns:xsd="http://www.w3.org/2001/XMLSchema"; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; xmlns:xhtml="http://www.w3.org/1999/xhtml"; xmlns:grddl="http://www.w3.org/2003/g/data-view#"; xmlns :css3t="http://www.w3.org/TR/css3-text/"; xmlns:presentation="urn:oasis:names:tc:opendocument:xmlns:presentation:1.0" xmlns:smil="urn:oasis:names:tc:opendocument:xmlns:smil-compatible:1.0" xmlns:anim="urn:oasis:names:tc:opendocument:xmlns:animation:1.0" xmlns:officeooo="http://openoffice.org/2009/office"; office:version="1.3" office:mimetype="application/vnd.oasis.opendocument.graphics"> + +2023-08-29T21:49:18.19200 +PT1S +1 +B2020/24.2.0.0.alpha0$Windows_X86_64 LibreOffice_project/aa3eea21fcf302ef4ddbba5841037378945f9d5e + + + + +13970 +10795 +0 +0 + + +view1 +false +false +true +true +false +false +false +false +true +1500 +false +Hw== +Hw== + +false +true +true +0 +0 +true +true +true +4 +0 +-407 +-9321 +40625 +29064 +1270 +1270 +317 +317 +1270 +4 +1270 +4 +false +1500 +true +false +false +false +
[Libreoffice-commits] core.git: configmgr/source
configmgr/source/access.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit af8ee87852496e51d4c3e0e8f446503e4a8faabb Author: Noel Grandin AuthorDate: Thu Aug 31 14:18:03 2023 +0200 Commit: Noel Grandin CommitDate: Thu Aug 31 21:50:18 2023 +0200 SAL_WARN->SAL_INFO in Access::getChild reduce log noise Change-Id: I95393f18fe8cc019c89ad4779d5b10f64993bd51 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156340 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/configmgr/source/access.cxx b/configmgr/source/access.cxx index 00a9db96407f..46657374030a 100644 --- a/configmgr/source/access.cxx +++ b/configmgr/source/access.cxx @@ -1377,7 +1377,7 @@ rtl::Reference< ChildAccess > Access::getChild(OUString const & name) { << locale << "\" recursively starting with \"*\""); return getChild(locale); } -SAL_WARN_IF( +SAL_INFO_IF( locale.isEmpty(), "configmgr", ("access best-matching localized property value via \"*\"" " with empty ; falling back to defaults"));
[Libreoffice-commits] core.git: helpcontent2
helpcontent2 |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 774ca713bf838ef6996e2598d4a43c6fea6bc85c Author: Olivier Hallot AuthorDate: Thu Aug 31 16:21:08 2023 -0300 Commit: Gerrit Code Review CommitDate: Thu Aug 31 21:21:08 2023 +0200 Update git submodules * Update helpcontent2 from branch 'master' to ffaa9e1adb04a683ec87eb5c4c35387384e32702 - Prevent literal words to wrap in lines. Applies mostly on table columns Change-Id: Ie18b84d9a052f4b189f06c43132457a3a925dcaa Reviewed-on: https://gerrit.libreoffice.org/c/help/+/156354 Tested-by: Jenkins Reviewed-by: Olivier Hallot diff --git a/helpcontent2 b/helpcontent2 index d686d91fb8d1..ffaa9e1adb04 16 --- a/helpcontent2 +++ b/helpcontent2 @@ -1 +1 @@ -Subproject commit d686d91fb8d108c8283dd8d9f537224ed43ac6ac +Subproject commit ffaa9e1adb04a683ec87eb5c4c35387384e32702
[Libreoffice-commits] help.git: help3xsl/default.css
help3xsl/default.css |3 +++ 1 file changed, 3 insertions(+) New commits: commit ffaa9e1adb04a683ec87eb5c4c35387384e32702 Author: Olivier Hallot AuthorDate: Thu Aug 31 12:43:26 2023 -0300 Commit: Olivier Hallot CommitDate: Thu Aug 31 21:21:07 2023 +0200 Prevent literal words to wrap in lines. Applies mostly on table columns Change-Id: Ie18b84d9a052f4b189f06c43132457a3a925dcaa Reviewed-on: https://gerrit.libreoffice.org/c/help/+/156354 Tested-by: Jenkins Reviewed-by: Olivier Hallot diff --git a/help3xsl/default.css b/help3xsl/default.css index 7ce0da75f3..539a7da2fb 100644 --- a/help3xsl/default.css +++ b/help3xsl/default.css @@ -125,6 +125,9 @@ pre, font-family: var(--font_mono); word-wrap: anywhere; } +.literal { +white-space: nowrap; +} .smathcode { border-radius: 2px; padding: 1px 3px;
[Libreoffice-commits] help.git: source/text
source/text/shared/guide/pdf_params.xhp | 37 +--- 1 file changed, 29 insertions(+), 8 deletions(-) New commits: commit d686d91fb8d108c8283dd8d9f537224ed43ac6ac Author: Olivier Hallot AuthorDate: Thu Aug 31 12:41:13 2023 -0300 Commit: Olivier Hallot CommitDate: Thu Aug 31 21:20:48 2023 +0200 tdf#147105 More PDF export param documented + Added index to this long page. Change-Id: I58089001532a4a2d8b2f309958117821e6fc237f Reviewed-on: https://gerrit.libreoffice.org/c/help/+/156353 Tested-by: Jenkins Reviewed-by: Olivier Hallot diff --git a/source/text/shared/guide/pdf_params.xhp b/source/text/shared/guide/pdf_params.xhp index 82f8b89076..5e9871f7ba 100644 --- a/source/text/shared/guide/pdf_params.xhp +++ b/source/text/shared/guide/pdf_params.xhp @@ -37,10 +37,18 @@ soffice --convert-to 'pdf:draw_pdf_Export:{"EncryptFile":{"type":"boolean","value":"true"},"DocumentOpenPassword":{"type":"string","value":"secret"}}' test.odg -To set version 1.5 (instead of the default 1.6): +To set version 1.5 (instead of the default 1.7): soffice --convert-to 'pdf:draw_pdf_Export:{"SelectPdfVersion":{"type":"long","value":"15"}}' test.odg -General Properties +Index + + + + + + + +General Properties @@ -490,8 +498,22 @@ false + + +SinglePageSheets + + +Ignores each sheet’s paper size, print ranges and shown/hidden status and puts every sheet (even hidden sheets) on exactly one page. + + +boolean + + +false + + -Initial View +Initial View @@ -605,7 +627,7 @@ -User Interface +User Interface @@ -750,7 +772,7 @@ -Links +Links @@ -826,7 +848,7 @@ -Security +Security @@ -989,8 +1011,7 @@ - -Digital Signature +Digital Signature
[Libreoffice-commits] core.git: helpcontent2
helpcontent2 |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 6363ecce73a9d5dfb5010b6b6fad4686ec4ab6fa Author: Olivier Hallot AuthorDate: Thu Aug 31 16:20:48 2023 -0300 Commit: Gerrit Code Review CommitDate: Thu Aug 31 21:20:48 2023 +0200 Update git submodules * Update helpcontent2 from branch 'master' to d686d91fb8d108c8283dd8d9f537224ed43ac6ac - tdf#147105 More PDF export param documented + Added index to this long page. Change-Id: I58089001532a4a2d8b2f309958117821e6fc237f Reviewed-on: https://gerrit.libreoffice.org/c/help/+/156353 Tested-by: Jenkins Reviewed-by: Olivier Hallot diff --git a/helpcontent2 b/helpcontent2 index d122af7bbaa5..d686d91fb8d1 16 --- a/helpcontent2 +++ b/helpcontent2 @@ -1 +1 @@ -Subproject commit d122af7bbaa552c59a060682331149d102533561 +Subproject commit d686d91fb8d108c8283dd8d9f537224ed43ac6ac
[Libreoffice-commits] core.git: starmath/CppunitTest_starmath_import.mk starmath/inc starmath/qa starmath/source
starmath/CppunitTest_starmath_import.mk |1 starmath/inc/unomodel.hxx|4 + starmath/qa/cppunit/data/font-styles.odf |binary starmath/qa/cppunit/test_import.cxx | 91 +++ starmath/source/unomodel.cxx | 57 +-- 5 files changed, 136 insertions(+), 17 deletions(-) New commits: commit 626d17a8ec270937575e9684a325eb0669327a25 Author: Khaled Hosny AuthorDate: Thu Aug 31 14:54:52 2023 +0300 Commit: خالد حسني CommitDate: Thu Aug 31 20:41:00 2023 +0200 tdf#143213: Fix reading math font settings from file The order of reading the settings is significant, e.g. if font italic was read first then font name, font name would set a new font overriding the italic setting. We now collect all font settings and apply them at once. Change-Id: Idb32d7d416607011bc325eff0b73c03b2d12e7d3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156352 Tested-by: Jenkins Reviewed-by: خالد حسني diff --git a/starmath/CppunitTest_starmath_import.mk b/starmath/CppunitTest_starmath_import.mk index 15c9053facfb..0139b590bac6 100644 --- a/starmath/CppunitTest_starmath_import.mk +++ b/starmath/CppunitTest_starmath_import.mk @@ -19,6 +19,7 @@ $(eval $(call gb_CppunitTest_use_external,starmath_import,boost_headers)) $(eval $(call gb_CppunitTest_use_sdk_api,starmath_import)) $(eval $(call gb_CppunitTest_add_exception_objects,starmath_import,\ +starmath/qa/cppunit/test_import \ starmath/qa/extras/mmlimport-test \ )) diff --git a/starmath/inc/unomodel.hxx b/starmath/inc/unomodel.hxx index 6c2ecbbdd4b0..6292b2825508 100644 --- a/starmath/inc/unomodel.hxx +++ b/starmath/inc/unomodel.hxx @@ -27,6 +27,8 @@ #include #include +#include "format.hxx" + inline constexpr OUStringLiteral PRTUIOPT_TITLE_ROW = u"TitleRow"; inline constexpr OUStringLiteral PRTUIOPT_FORMULA_TEXT = u"FormulaText"; inline constexpr OUStringLiteral PRTUIOPT_BORDER = u"Border"; @@ -48,6 +50,8 @@ class SmModel final : public SfxBaseModel, { std::unique_ptr m_pPrintUIOptions; +SmFace maFonts[FNT_END + 1]; + virtual void _setPropertyValues( const comphelper::PropertyMapEntry** ppEntries, const css::uno::Any* pValues ) override; virtual void _getPropertyValues( const comphelper::PropertyMapEntry** ppEntries, css::uno::Any* pValue ) override; public: diff --git a/starmath/qa/cppunit/data/font-styles.odf b/starmath/qa/cppunit/data/font-styles.odf new file mode 100644 index ..3b58386c2f1d Binary files /dev/null and b/starmath/qa/cppunit/data/font-styles.odf differ diff --git a/starmath/qa/cppunit/test_import.cxx b/starmath/qa/cppunit/test_import.cxx new file mode 100644 index ..5486dfe43e0c --- /dev/null +++ b/starmath/qa/cppunit/test_import.cxx @@ -0,0 +1,91 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + */ + +#include +#include + +#include + +#include +#include + +using namespace ::com::sun::star; + +namespace +{ +class Test : public UnoApiTest +{ +public: +Test() +: UnoApiTest("starmath/qa/cppunit/data/") +{ +} + +void testFontStyles(); + +CPPUNIT_TEST_SUITE(Test); +CPPUNIT_TEST(testFontStyles); +CPPUNIT_TEST_SUITE_END(); +}; + +void Test::testFontStyles() +{ +// tdf#143213 +loadFromURL(u"font-styles.odf"); +SfxBaseModel* pModel = dynamic_cast(mxComponent.get()); +SmDocShell* pDocShell = static_cast(pModel->GetObjectShell()); + +const SmFormat& aFormat = pDocShell->GetFormat(); + +CPPUNIT_ASSERT_EQUAL(ITALIC_NORMAL, aFormat.GetFont(FNT_MATH).GetItalic()); +CPPUNIT_ASSERT_EQUAL(WEIGHT_BOLD, aFormat.GetFont(FNT_MATH).GetWeight()); +CPPUNIT_ASSERT_EQUAL(aFormat.GetBaseSize().Height(), + aFormat.GetFont(FNT_MATH).GetFontSize().Height()); + +CPPUNIT_ASSERT_EQUAL(ITALIC_NORMAL, aFormat.GetFont(FNT_VARIABLE).GetItalic()); +CPPUNIT_ASSERT_EQUAL(WEIGHT_BOLD, aFormat.GetFont(FNT_VARIABLE).GetWeight()); +CPPUNIT_ASSERT_EQUAL(aFormat.GetBaseSize().Height(), + aFormat.GetFont(FNT_VARIABLE).GetFontSize().Height()); + +CPPUNIT_ASSERT_EQUAL(ITALIC_NORMAL, aFormat.GetFont(FNT_FUNCTION).GetItalic()); +CPPUNIT_ASSERT_EQUAL(WEIGHT_BOLD, aFormat.GetFont(FNT_FUNCTION).GetWeight()); +CPPUNIT_ASSERT_EQUAL(aFormat.GetBaseSize().Height(), + aFormat.GetFont(FNT_FUNCTION).GetFontSize().Height()); + +CPPUNIT_ASSERT_EQUAL(ITALIC_NORMAL, aFormat.GetFont(FNT_NUMBER).GetItalic()); +CPPUNIT_ASSERT_EQUAL(WEIGHT_BOLD, aFormat.GetFont(FNT_NUMBER).GetWeight()); +CPPUNIT_ASSERT_EQUAL(aFormat.GetBaseSize().Height(), +
[Libreoffice-commits] core.git: connectivity/source dbaccess/source offapi/com
connectivity/source/commontools/dbtools2.cxx | 29 ++- connectivity/source/commontools/formattedcolumnvalue.cxx |2 dbaccess/source/ui/tabledesign/FieldDescriptions.cxx |3 offapi/com/sun/star/sdbc/DataType.idl| 130 +++ 4 files changed, 125 insertions(+), 39 deletions(-) New commits: commit 5b205d2b3946acd79dcb8f5abed88a0bd8afaef4 Author: Pierre AuthorDate: Sun Aug 20 00:22:58 2023 +0200 Commit: Julien Nabet CommitDate: Thu Aug 31 20:28:50 2023 +0200 tdf#156816 Base handles scale on SQL type TIME as with TIMESTAMP Generally import new DataType identification constants from OpenJDK's java.sql.Types Use same values for compatibility. Change-Id: I6e3eb986dc34e8a5e2af75669363177785ff56e5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155866 Reviewed-by: Lionel Mamane Tested-by: Julien Nabet diff --git a/connectivity/source/commontools/dbtools2.cxx b/connectivity/source/commontools/dbtools2.cxx index 2cee15cd7f6a..fc533d0ff024 100644 --- a/connectivity/source/commontools/dbtools2.cxx +++ b/connectivity/source/commontools/dbtools2.cxx @@ -127,30 +127,39 @@ OUString createStandardTypePart(const Reference< XPropertySet >& xColProp,const if ( (nPrecision > 0 || nScale > 0) && bUseLiteral ) { -sal_Int32 nParenPos = sTypeName.indexOf('('); +bool bTimed = (nDataType == DataType::TIME || + nDataType == DataType::TIME_WITH_TIMEZONE || + nDataType == DataType::TIMESTAMP || + nDataType == DataType::TIMESTAMP_WITH_TIMEZONE); + +sal_Int32 nParenPos = (nDataType == DataType::TIME_WITH_TIMEZONE || + nDataType == DataType::TIMESTAMP_WITH_TIMEZONE) ? + sTypeName.indexOf(' ') : + sTypeName.indexOf('('); + if ( nParenPos == -1 ) -{ -aSql.append(sTypeName + "("); -} +aSql.append(sTypeName); else -{ -aSql.append(sTypeName.subView(0, ++nParenPos)); -} +aSql.append(sTypeName.subView(0, nParenPos)); +aSql.append("("); -if ( nPrecision > 0 && nDataType != DataType::TIMESTAMP ) +if ( nPrecision > 0 && !bTimed ) { aSql.append(nPrecision); if ( (nScale > 0) || (!_sCreatePattern.empty() && sCreateParams.indexOf(_sCreatePattern) != -1) ) aSql.append(","); } -if ( (nScale > 0) || ( !_sCreatePattern.empty() && sCreateParams.indexOf(_sCreatePattern) != -1 ) || nDataType == DataType::TIMESTAMP ) +if ( (nScale > 0) || ( !_sCreatePattern.empty() && sCreateParams.indexOf(_sCreatePattern) != -1 ) || bTimed ) aSql.append(nScale); if ( nParenPos == -1 ) aSql.append(")"); else { -nParenPos = sTypeName.indexOf(')',nParenPos); +if ( bTimed ) +aSql.append(")"); +else +nParenPos = sTypeName.indexOf(')',nParenPos); aSql.append(sTypeName.subView(nParenPos)); } } diff --git a/connectivity/source/commontools/formattedcolumnvalue.cxx b/connectivity/source/commontools/formattedcolumnvalue.cxx index 621bc9acf59b..a389236e6aa0 100644 --- a/connectivity/source/commontools/formattedcolumnvalue.cxx +++ b/connectivity/source/commontools/formattedcolumnvalue.cxx @@ -126,7 +126,9 @@ namespace dbtools { case DataType::DATE: case DataType::TIME: +case DataType::TIME_WITH_TIMEZONE: case DataType::TIMESTAMP: +case DataType::TIMESTAMP_WITH_TIMEZONE: case DataType::BIT: case DataType::BOOLEAN: case DataType::TINYINT: diff --git a/dbaccess/source/ui/tabledesign/FieldDescriptions.cxx b/dbaccess/source/ui/tabledesign/FieldDescriptions.cxx index a8efb638a7bd..4a4a499380a9 100644 --- a/dbaccess/source/ui/tabledesign/FieldDescriptions.cxx +++ b/dbaccess/source/ui/tabledesign/FieldDescriptions.cxx @@ -187,7 +187,10 @@ void OFieldDescription::FillFromTypeInfo(const TOTypeInfoSP& _pType,bool _bForce SetPrecision(std::min(nPrec,_pType->nPrecision)); } break; +case DataType::TIME: +case DataType::TIME_WITH_TIMEZONE: case DataType::TIMESTAMP: +case DataType::TIMESTAMP_WITH_TIMEZONE: if ( bForce && _pType->nMaximumScale) { SetScale(std::min(GetScale() ? GetScale() : DEFAULT_NUMERIC_SCALE,_pType->nMaximumScale)); diff --git a/offapi/com/sun/star/sdbc/DataType.idl b/offapi/com/sun/star/sdbc/DataType.idl index 12cfa4f9395c..375a76f30a86 100644 --- a/offapi/com/sun/star/sdbc/DataType.idl +++ b/offapi/com/sun/star/sdbc/DataType.
[Libreoffice-commits] core.git: sw/source
sw/source/core/text/EnhancedPDFExportHelper.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit cd57d3c5743ca4ed4cf59eaabaee551c085d430c Author: Michael Stahl AuthorDate: Wed Aug 30 20:10:33 2023 +0200 Commit: Michael Stahl CommitDate: Thu Aug 31 20:16:47 2023 +0200 tdf#156306 sw: PDF export: another implicit structure element BeginBlockStructureElements() calls BeginTag(vcl::PDFWriter::TOCI) when exporting fdo51792-1.odt sw/source/core/text/EnhancedPDFExportHelper.cxx:501: void SwTaggedPDFHelper::BeginTag(vcl::PDFWriter::StructElement, const rtl::OUString&): Assertion `rFrameTagSet.find(pKey) == rFrameTagSet.end()' failed. Change-Id: I71ab6a6522c580e8bb740862dc0867ee615d0273 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156308 Tested-by: Jenkins Reviewed-by: Michael Stahl diff --git a/sw/source/core/text/EnhancedPDFExportHelper.cxx b/sw/source/core/text/EnhancedPDFExportHelper.cxx index 40e6a8fbde13..0b4fe669b7d8 100644 --- a/sw/source/core/text/EnhancedPDFExportHelper.cxx +++ b/sw/source/core/text/EnhancedPDFExportHelper.cxx @@ -468,7 +468,7 @@ void SwTaggedPDFHelper::BeginTag( vcl::PDFWriter::StructElement eType, const OUS { void const* pKey(nullptr); -if (mpFrameInfo && eType != vcl::PDFWriter::LIBody) +if (mpFrameInfo && eType != vcl::PDFWriter::LIBody && eType != vcl::PDFWriter::TOCI) { const SwFrame& rFrame = mpFrameInfo->mrFrame;
[Libreoffice-commits] core.git: basic/qa include/sal
basic/qa/cppunit/basic_coverage.cxx |7 +++ basic/qa/cppunit/basictest.cxx |8 basic/qa/cppunit/test_vba.cxx | 11 +-- include/sal/log-areas.dox |1 + 4 files changed, 13 insertions(+), 14 deletions(-) New commits: commit df0db4132428e95d276e923d8d5fb603dbb7f7bb Author: sahil AuthorDate: Wed Aug 30 17:25:08 2023 +0530 Commit: Ilmari Lauhakangas CommitDate: Thu Aug 31 19:50:23 2023 +0200 tdf#130924 replace '*printf' with 'SAL_*' logging macros. Change-Id: I5bb4052ded82c355f7d71e4f38ebdefe3fcc25da Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156283 Tested-by: Jenkins Tested-by: Ilmari Lauhakangas Reviewed-by: Ilmari Lauhakangas diff --git a/basic/qa/cppunit/basic_coverage.cxx b/basic/qa/cppunit/basic_coverage.cxx index 0f0722917232..ee36f2d1309f 100644 --- a/basic/qa/cppunit/basic_coverage.cxx +++ b/basic/qa/cppunit/basic_coverage.cxx @@ -81,16 +81,15 @@ void Coverage::process_directory(const OUString& sDirName) testMacro.LoadSourceFromFile("TestModule", sFileURL); SbxVariableRef pReturn = testMacro.Run(); CPPUNIT_ASSERT_MESSAGE("No return variable huh?", pReturn.is()); -fprintf(stderr, "macro result for %s\n", OUStringToOString(sFileURL,RTL_TEXTENCODING_UTF8).getStr()); -fprintf(stderr, "macro returned:\n%s\n", -OUStringToOString(pReturn->GetOUString(), RTL_TEXTENCODING_UTF8).getStr()); +SAL_INFO("basic.qa", "macro result for " << sFileURL); +SAL_INFO("basic.qa", "macro returned:\n" << pReturn->GetOUString()); CPPUNIT_ASSERT_EQUAL_MESSAGE("Result not as expected", OUString("OK"), pReturn->GetOUString()); } } } } -fprintf(stderr,"end process directory\n"); +SAL_INFO("basic.qa", "end process directory"); } void Coverage::Coverage_Iterator() diff --git a/basic/qa/cppunit/basictest.cxx b/basic/qa/cppunit/basictest.cxx index 8cf9812d5212..ebf39635620a 100644 --- a/basic/qa/cppunit/basictest.cxx +++ b/basic/qa/cppunit/basictest.cxx @@ -7,6 +7,7 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ +#include #include "basictest.hxx" #include #include @@ -42,7 +43,7 @@ MacroSnippet::MacroSnippet() void MacroSnippet::LoadSourceFromFile(const OUString& sModuleName, const OUString& sMacroFileURL) { OUString sSource; -fprintf(stderr,"loadSource opening macro file %s\n", OUStringToOString( sMacroFileURL, RTL_TEXTENCODING_UTF8 ).getStr() ); +SAL_INFO("basic.qa", "loadSource opening macro file" << sMacroFileURL); osl::File aFile(sMacroFileURL); if(aFile.open(osl_File_OpenFlag_Read) == osl::FileBase::E_None) @@ -112,9 +113,8 @@ const ErrCode& MacroSnippet::getError() const { return maErrCode; } IMPL_LINK( MacroSnippet, BasicErrorHdl, StarBASIC *, /*pBasic*/, bool) { -fprintf(stderr,"(%d:%d)\n", -StarBASIC::GetLine(), StarBASIC::GetCol1()); -fprintf(stderr,"Basic error: %s\n", OUStringToOString( StarBASIC::GetErrorText(), RTL_TEXTENCODING_UTF8 ).getStr() ); +SAL_INFO("basic.qa", '(' << StarBASIC::GetLine() << ':' << StarBASIC::GetCol1() << ")"); +SAL_INFO("basic.qa", "Basic error: " << StarBASIC::GetErrorText()); mbError = true; maErrCode = StarBASIC::GetErrorCode(); return false; diff --git a/basic/qa/cppunit/test_vba.cxx b/basic/qa/cppunit/test_vba.cxx index 8a15ba7234e8..a95e2db6a7bd 100644 --- a/basic/qa/cppunit/test_vba.cxx +++ b/basic/qa/cppunit/test_vba.cxx @@ -6,6 +6,7 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ +#include #include "basictest.hxx" #include @@ -168,9 +169,8 @@ void VBATest::testMiscVBAFunctions() myMacro.LoadSourceFromFile("TestModule", sMacroURL); SbxVariableRef pReturn = myMacro.Run(); CPPUNIT_ASSERT_MESSAGE("No return variable huh?", pReturn.is()); -fprintf(stderr, "macro result for %s\n", macroSource[i]); -fprintf(stderr, "macro returned:\n%s\n", -OUStringToOString(pReturn->GetOUString(), RTL_TEXTENCODING_UTF8).getStr()); +SAL_INFO("basic.qa", "macro result for" << macroSource[i]); +SAL_INFO("basic.qa", "macro returned:\n" << pReturn->GetOUString()); CPPUNIT_ASSERT_EQUAL_MESSAGE("Result not as expected", OUString("OK"), pReturn->GetOUString()); } @@ -248,9 +248,8 @@ void VBATest::testMiscOLEStuff() myMacro.LoadSourceFromFile("TestModule", sMacroURL); SbxVariableRef pReturn = myMacro.Run( aArgs ); CPPUNIT_ASSERT_MESSAGE("No return variable huh?", pReturn.is()); -fprintf(stderr, "macro result for %s\n", macroSource[i]); -fpri
[Libreoffice-commits] core.git: sw/qa
sw/qa/uitest/table/tdf146145.py | 11 ++- 1 file changed, 6 insertions(+), 5 deletions(-) New commits: commit dec20ed5e833801f70f4138a47fb0f09f006f963 Author: Noel Grandin AuthorDate: Thu Aug 31 15:53:37 2023 +0200 Commit: Noel Grandin CommitDate: Thu Aug 31 18:57:20 2023 +0200 disable more of the unreliable track changes UITest tends to get stuck here, and then the build is eventually killed Change-Id: I281e3a54be2abfb54b24028b4775eb79bbdacf70 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156349 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/sw/qa/uitest/table/tdf146145.py b/sw/qa/uitest/table/tdf146145.py index 17c2ae779b8e..d34e9e256ab8 100644 --- a/sw/qa/uitest/table/tdf146145.py +++ b/sw/qa/uitest/table/tdf146145.py @@ -221,11 +221,12 @@ class tdf146145(UITestCase): self.xUITest.executeCommand(".uno:InsertColumnsBefore") self.xUITest.executeCommand(".uno:InsertColumnsBefore") xToolkit.processEventsToIdle() -while self.is_enabled_Accept_Track_Change(): -time.sleep(0.1) -self.assertFalse(self.is_enabled_Accept_Track_Change()) - -self.assertEqual(len(tables[0].getColumns()), 5) +# Disabled unreliable test, tends to get stuck here +#while self.is_enabled_Accept_Track_Change(): +#time.sleep(0.1) +#self.assertFalse(self.is_enabled_Accept_Track_Change()) +# +#self.assertEqual(len(tables[0].getColumns()), 5) # check the fix again to avoid of the asynchron state changes self.xUITest.executeCommand(".uno:GoLeft")
[Libreoffice-commits] core.git: sd/source
sd/source/core/stlsheet.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit cffc470c31062cd35f715bc45a53080735ff3356 Author: Noel Grandin AuthorDate: Thu Aug 31 14:43:45 2023 +0200 Commit: Noel Grandin CommitDate: Thu Aug 31 18:56:33 2023 +0200 ignore UnknownPropertyException in SdStyleSheet::setPropertyValues reduce log noise Change-Id: I25a61ecbc7c3357b980086b591f5906991244012 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156341 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/sd/source/core/stlsheet.cxx b/sd/source/core/stlsheet.cxx index 2038604861df..3084d494b454 100644 --- a/sd/source/core/stlsheet.cxx +++ b/sd/source/core/stlsheet.cxx @@ -1253,7 +1253,7 @@ void SAL_CALL SdStyleSheet::setPropertyValues(const css::uno::Sequence } catch (const css::beans::UnknownPropertyException&) { -DBG_UNHANDLED_EXCEPTION("sd"); +// ignore this, some code likes to liberally sprinkle properties all over stuff that doesn't support those properties } }
[Libreoffice-commits] core.git: sc/qa
sc/qa/unit/data/functions/statistical/fods/KahanSum.fods | 3830 +++ 1 file changed, 1971 insertions(+), 1859 deletions(-) New commits: commit 0603e8fd85f626340c756d80df5612343480beea Author: Eike Rathke AuthorDate: Thu Aug 31 15:01:21 2023 +0200 Commit: Eike Rathke CommitDate: Thu Aug 31 18:53:15 2023 +0200 Related: tdf#156985 Adjust doc layout to what FunctionsTest::load() expects In case of failure to show failure details sc/qa/unit/functions_test.cxx FunctionsTest::load() assumes result in A, expected in B, check in C and formula in D. Change-Id: I48d9e123664da314a1f7791f949d89569150b0c6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156346 Reviewed-by: Eike Rathke Tested-by: Jenkins diff --git a/sc/qa/unit/data/functions/statistical/fods/KahanSum.fods b/sc/qa/unit/data/functions/statistical/fods/KahanSum.fods index e2bba0018e1f..c2b87afcd480 100644 --- a/sc/qa/unit/data/functions/statistical/fods/KahanSum.fods +++ b/sc/qa/unit/data/functions/statistical/fods/KahanSum.fods @@ -1,227 +1,227 @@ -http://www.w3.org/TR/css3-text/"; xmlns:grddl="http://www.w3.org/2003/g/data-view#"; xmlns:xhtml="http://www.w3.org/1999/xhtml"; xmlns:formx="urn:openoffice:names:experimental:ooxml-odf-interop:xmlns:form:1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; xmlns:xsd="http://www.w3.org/2001/XMLSchema"; xmlns:chart="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0" xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" xmlns:oooc="http://openoffice.org/2004/calc"; xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0" xmlns:ooow="http://openoffice.org/2004/writer"; xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0" xmlns:dc="http://purl.org/dc/elements/1.1/"; xmlns:rpt="http://openoffice.org/2005/report"; xmlns:draw="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" xmlns:config="urn:oasis:nam es:tc:opendocument:xmlns:config:1.0" xmlns:xlink="http://www.w3.org/1999/xlink"; xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0" xmlns:ooo="http://openoffice.org/2004/office"; xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0" xmlns:table="urn:oasis:names:tc:opendocument:xmlns:table:1.0" xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0" xmlns:of="urn:oasis:names:tc:opendocument:xmlns:of:1.2" xmlns:calcext="urn:org:documentfoundation:names:experimental:calc:xmlns:calcext:1.0" xmlns:tableooo="http://openoffice.org/2009/table"; xmlns:drawooo="http://openoffice.org/2010/draw"; xmlns:loext="urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.0" xmlns:dom="http://www.w3.org/2001/xml-events"; xmlns:field="urn:openoffice:names:experimental:ooo-ms-interop:xmlns:field:1.0" xmlns:math="http://www.w3.org/1998/Math/MathML"; xmlns:form="urn:oasis:names:tc:opendocument:xmlns:fo rm:1.0" xmlns:script="urn:oasis:names:tc:opendocument:xmlns:script:1.0" xmlns:xforms="http://www.w3.org/2002/xforms"; office:version="1.3" office:mimetype="application/vnd.oasis.opendocument.spreadsheet"> +http://www.w3.org/TR/css3-text/"; xmlns:grddl="http://www.w3.org/2003/g/data-view#"; xmlns:xhtml="http://www.w3.org/1999/xhtml"; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; xmlns:xsd="http://www.w3.org/2001/XMLSchema"; xmlns:xforms="http://www.w3.org/2002/xforms"; xmlns:dom="http://www.w3.org/2001/xml-events"; xmlns:script="urn:oasis:names:tc:opendocument:xmlns:script:1.0" xmlns:form="urn:oasis:names:tc:opendocument:xmlns:form:1.0" xmlns:math="http://www.w3.org/1998/Math/MathML"; xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" xmlns:ooo="http://openoffice.org/2004/office"; xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0" xmlns:config="urn:oasis:names:tc:opendocument:xmlns:config:1.0" xmlns:ooow="http://openoffice.org/2004/writer"; xmlns:xlink="http://www.w3.org/1999/xlink"; xmlns:drawooo="http://openoffice.org/2010/draw"; xmlns:oooc="http://o penoffice.org/2004/calc" xmlns:dc="http://purl.org/dc/elements/1.1/"; xmlns:calcext="urn:org:documentfoundation:names:experimental:calc:xmlns:calcext:1.0" xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0" xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" xmlns:of="urn:oasis:names:tc:opendocument:xmlns:of:1.2" xmlns:tableooo="http://openoffice.org/2009/table"; xmlns:draw="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0" xmlns:rpt="http://openoffice.org/2005/report"; xmlns:formx="urn:openoffice:names:experimental:ooxml-odf-interop:xmlns:form:1.0" xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0" xmlns:chart="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" xmlns:table="urn:oasis:names:tc:opendocument:xmlns:table:1.0
[Libreoffice-commits] core.git: vcl/source
vcl/source/uitest/uno/uiobject_uno.cxx | 19 +-- 1 file changed, 1 insertion(+), 18 deletions(-) New commits: commit 437db5267842d3985e3d4050096275da6dd45c3b Author: Noel Grandin AuthorDate: Thu Aug 31 15:07:42 2023 +0200 Commit: Noel Grandin CommitDate: Thu Aug 31 18:40:33 2023 +0200 remove null checks for mpObj in UIObjectUnoObj Checking for mpObj == nullptr implies that in some sense this object could end up in that state, but the only way that can happen is if we call this object after its destructor has been called. In which case throwing RuntimeException is not appropriate because calling a dead object should not be possible. Rather just let it SIGSEGV instead of hiding it behind an exception that might be ignored. Change-Id: I92911a3108f74ed5dfa4986bec028cbc365ac916 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156345 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/vcl/source/uitest/uno/uiobject_uno.cxx b/vcl/source/uitest/uno/uiobject_uno.cxx index a0a718096391..0d23fe9272a7 100644 --- a/vcl/source/uitest/uno/uiobject_uno.cxx +++ b/vcl/source/uitest/uno/uiobject_uno.cxx @@ -43,6 +43,7 @@ struct Notifier { UIObjectUnoObj::UIObjectUnoObj(std::unique_ptr pObj): mpObj(std::move(pObj)) { +assert(mpObj); } UIObjectUnoObj::~UIObjectUnoObj() @@ -53,9 +54,6 @@ UIObjectUnoObj::~UIObjectUnoObj() css::uno::Reference SAL_CALL UIObjectUnoObj::getChild(const OUString& rID) { -if (!mpObj) -throw css::uno::RuntimeException(); - SolarMutexGuard aGuard; std::unique_ptr pObj = mpObj->get_child(rID); return new UIObjectUnoObj(std::move(pObj)); @@ -116,9 +114,6 @@ IMPL_LINK_NOARG(ExecuteWrapper, ExecuteActionHdl, Timer*, void) void SAL_CALL UIObjectUnoObj::executeAction(const OUString& rAction, const css::uno::Sequence& rPropValues) { -if (!mpObj) -throw css::uno::RuntimeException(); - auto aIdle = std::make_unique("UI Test Idle Handler"); aIdle->SetPriority(TaskPriority::HIGHEST); @@ -158,9 +153,6 @@ void SAL_CALL UIObjectUnoObj::executeAction(const OUString& rAction, const css:: css::uno::Sequence UIObjectUnoObj::getState() { -if (!mpObj) -throw css::uno::RuntimeException(); - SolarMutexGuard aGuard; StringMap aMap = mpObj->get_state(); css::uno::Sequence aProps(aMap.size()); @@ -173,9 +165,6 @@ css::uno::Sequence UIObjectUnoObj::getState() css::uno::Sequence UIObjectUnoObj::getChildren() { -if (!mpObj) -throw css::uno::RuntimeException(); - std::set aChildren; { @@ -191,9 +180,6 @@ css::uno::Sequence UIObjectUnoObj::getChildren() OUString SAL_CALL UIObjectUnoObj::getType() { -if (!mpObj) -throw css::uno::RuntimeException(); - SolarMutexGuard aGuard; return mpObj->get_type(); } @@ -215,9 +201,6 @@ css::uno::Sequence UIObjectUnoObj::getSupportedServiceNames() OUString SAL_CALL UIObjectUnoObj::getHierarchy() { -if (!mpObj) -throw css::uno::RuntimeException(); - SolarMutexGuard aGuard; return mpObj->dumpHierarchy(); }
[Libreoffice-commits] core.git: vcl/source
vcl/source/outdev/font.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit fffdfd9e58a6ec31be775123ae6d3f90a6e8e840 Author: Noel Grandin AuthorDate: Thu Aug 31 14:17:17 2023 +0200 Commit: Noel Grandin CommitDate: Thu Aug 31 18:39:50 2023 +0200 SAL_WARN->SAL_INFO in ImplGlyphFallbackLayout reduce log noise Change-Id: I479f936284922ad1062cab0e9ae78795aed84e91 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156339 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/vcl/source/outdev/font.cxx b/vcl/source/outdev/font.cxx index 4198cf334a15..ea0727b294f9 100644 --- a/vcl/source/outdev/font.cxx +++ b/vcl/source/outdev/font.cxx @@ -1080,7 +1080,7 @@ std::unique_ptr OutputDevice::ImplGlyphFallbackLayout( std::unique_pt { if(aMissingCodes != oldMissingCodes) { -SAL_WARN("vcl.gdi", "Font fallback to the same font, but has missing codes"); +SAL_INFO("vcl.gdi", "Font fallback to the same font, but has missing codes"); // Restore the missing codes if we're not going to use this font. aMissingCodes = oldMissingCodes; }
[Libreoffice-commits] core.git: xmloff/qa xmloff/source
xmloff/qa/unit/data/tdf157018_CustomTheme.fodg | 338 + xmloff/qa/unit/draw.cxx| 33 ++ xmloff/source/draw/ximpstyl.cxx|7 3 files changed, 373 insertions(+), 5 deletions(-) New commits: commit be53bf55c44dedd9a94c74b8f7c1c222746ed23f Author: Regina Henschel AuthorDate: Thu Aug 31 01:15:26 2023 +0200 Commit: Tomaž Vajngerl CommitDate: Thu Aug 31 18:36:47 2023 +0200 tdf#157018 Enable import of color theme for Draw Use the color theme import in Draw too, otherwise we will not be able to detect theme colors. Change-Id: I8f01ba69848a6265193407a952144b31e3a7fdb2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156313 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl diff --git a/xmloff/qa/unit/data/tdf157018_CustomTheme.fodg b/xmloff/qa/unit/data/tdf157018_CustomTheme.fodg new file mode 100644 index ..49673ca66793 --- /dev/null +++ b/xmloff/qa/unit/data/tdf157018_CustomTheme.fodg @@ -0,0 +1,338 @@ + +http://openoffice.org/2004/office"; xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0" xmlns:xlink="http://www.w3.org/1999/xlink"; xmlns:config="urn:oasis:names:tc:opendocument:xmlns:config:1.0" xmlns:dc="http://purl.org/dc/elements/1.1/"; xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0" xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0" xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" xmlns:rpt="http://openoffice.org/2005/report"; xmlns:draw="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0" xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0" xmlns:chart="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" xmlns:table="urn:oasis:names:tc:opendocument:xmlns:table:1.0" xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0" xmlns:ooow="http://openoffice.org/200 4/writer" xmlns:oooc="http://openoffice.org/2004/calc"; xmlns:of="urn:oasis:names:tc:opendocument:xmlns:of:1.2" xmlns:xforms="http://www.w3.org/2002/xforms"; xmlns:tableooo="http://openoffice.org/2009/table"; xmlns:calcext="urn:org:documentfoundation:names:experimental:calc:xmlns:calcext:1.0" xmlns:drawooo="http://openoffice.org/2010/draw"; xmlns:loext="urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.0" xmlns:field="urn:openoffice:names:experimental:ooo-ms-interop:xmlns:field:1.0" xmlns:math="http://www.w3.org/1998/Math/MathML"; xmlns:form="urn:oasis:names:tc:opendocument:xmlns:form:1.0" xmlns:script="urn:oasis:names:tc:opendocument:xmlns:script:1.0" xmlns:formx="urn:openoffice:names:experimental:ooxml-odf-interop:xmlns:form:1.0" xmlns:dom="http://www.w3.org/2001/xml-events"; xmlns:xsd="http://www.w3.org/2001/XMLSchema"; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; xmlns:xhtml="http://www.w3.org/1999/xhtml"; xmlns:grddl="http://www.w3.org/2003/g/data-view#"; xmlns :css3t="http://www.w3.org/TR/css3-text/"; xmlns:presentation="urn:oasis:names:tc:opendocument:xmlns:presentation:1.0" xmlns:smil="urn:oasis:names:tc:opendocument:xmlns:smil-compatible:1.0" xmlns:anim="urn:oasis:names:tc:opendocument:xmlns:animation:1.0" xmlns:officeooo="http://openoffice.org/2009/office"; office:version="1.3" office:mimetype="application/vnd.oasis.opendocument.graphics"> + +2023-08-29T21:49:18.19200 +PT1S +1 +B2020/24.2.0.0.alpha0$Windows_X86_64 LibreOffice_project/aa3eea21fcf302ef4ddbba5841037378945f9d5e + + + + +13970 +10795 +0 +0 + + +view1 +false +false +true +true +false +false +false +false +true +1500 +false +Hw== +Hw== + +false +true +true +0 +0 +true +true +true +4 +0 +-407 +-9321 +40625 +29064 +1270 +1270 +317 +317 +1270 +4 +1270 +4 +false +1500 +true +false +false +false +false + + + + +true +1270 +EPSON6FC99C (WP-4025 Series) +iAv+/0VQU09ONk
[Libreoffice-commits] core.git: Branch 'distro/collabora/co-23.05' - svx/source
svx/source/theme/ThemeColorChangerCommon.cxx | 11 ++- 1 file changed, 6 insertions(+), 5 deletions(-) New commits: commit 6d2633b37dabfad4ea1ea82041f8ae60a56cafd8 Author: Caolán McNamara AuthorDate: Thu Aug 31 09:03:31 2023 +0100 Commit: Tomaž Vajngerl CommitDate: Thu Aug 31 18:31:31 2023 +0200 cid#1542447 Explicit null dereferenced Change-Id: I1de10a8a459175f79bb2b8f796cde287be1945c9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156228 Tested-by: Jenkins CollaboraOffice Reviewed-by: Tomaž Vajngerl diff --git a/svx/source/theme/ThemeColorChangerCommon.cxx b/svx/source/theme/ThemeColorChangerCommon.cxx index 29d65cdda960..fab4835684a1 100644 --- a/svx/source/theme/ThemeColorChangerCommon.cxx +++ b/svx/source/theme/ThemeColorChangerCommon.cxx @@ -49,16 +49,16 @@ const SvxColorItem* getColorItem(const editeng::Section& rSection) return nullptr; } -bool updateEditEngTextSections(model::ColorSet const& rColorSet, SdrObject* pObject, SdrView* pView) +bool updateEditEngTextSections(model::ColorSet const& rColorSet, SdrObject* pObject, SdrView& rView) { SdrTextObj* pTextObject = DynCastSdrTextObj(pObject); if (!pTextObject) return false; -pView->SdrBeginTextEdit(pTextObject); +rView.SdrBeginTextEdit(pTextObject); -auto* pOutlinerView = pView->GetTextEditOutlinerView(); +auto* pOutlinerView = rView.GetTextEditOutlinerView(); if (!pOutlinerView) return false; @@ -97,7 +97,7 @@ bool updateEditEngTextSections(model::ColorSet const& rColorSet, SdrObject* pObj } } -pView->SdrEndTextEdit(); +rView.SdrEndTextEdit(); return true; } @@ -166,7 +166,8 @@ void updateSdrObject(model::ColorSet const& rColorSet, SdrObject* pObject, SdrVi if (!pObject) return; -updateEditEngTextSections(rColorSet, pObject, pView); +if (pView) +updateEditEngTextSections(rColorSet, pObject, *pView); updateObjectAttributes(rColorSet, *pObject, pUndoManager); }
[Libreoffice-commits] core.git: Branch 'distro/collabora/co-23.05' - connectivity/source
connectivity/source/parse/sqliterator.cxx |4 1 file changed, 4 insertions(+) New commits: commit 0d579a1b8122eed6348ee4a512573277e2d5db77 Author: Henry Castro AuthorDate: Wed Aug 30 10:25:51 2023 -0400 Commit: Caolán McNamara CommitDate: Thu Aug 31 18:15:31 2023 +0200 connectiviy: fix to detect column data type if Base SQL query: SELECT COUNT("test"."id") from Test If changed to Spanish UI, detect the column type from a neutral context parser. Signed-off-by: Henry Castro Change-Id: I1faa8ff8417a0fc4996b289bd2ce0baad52fc00c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156298 Tested-by: Jenkins CollaboraOffice Reviewed-by: Caolán McNamara diff --git a/connectivity/source/parse/sqliterator.cxx b/connectivity/source/parse/sqliterator.cxx index 64ea48d0351a..3428fba569e1 100644 --- a/connectivity/source/parse/sqliterator.cxx +++ b/connectivity/source/parse/sqliterator.cxx @@ -2109,7 +2109,11 @@ sal_Int32 OSQLParseTreeIterator::getFunctionReturnType(const OSQLParseNode* _pNo nType = DataType::DOUBLE; } else +{ nType = ::connectivity::OSQLParser::getFunctionReturnType( sFunctionName, &m_rParser.getContext() ); +if (nType == DataType::SQLNULL) +nType = ::connectivity::OSQLParser::getFunctionReturnType( sFunctionName, m_rParser.getNeutral() ); +} } return nType;
[Libreoffice-commits] core.git: Branch 'distro/collabora/co-23.05' - 3 commits - connectivity/source dbaccess/source include/connectivity include/svx svx/source
connectivity/source/parse/sqlnode.cxx |7 +-- dbaccess/source/core/api/SingleSelectQueryComposer.cxx |2 +- dbaccess/source/core/inc/SingleSelectQueryComposer.hxx |1 + include/connectivity/sqlparse.hxx | 10 +++--- include/svx/ParseContext.hxx | 11 +-- svx/source/form/ParseContext.cxx | 16 6 files changed, 39 insertions(+), 8 deletions(-) New commits: commit 57379b62950d5730cdd0ec2b14eaf55370a3298e Author: Henry Castro AuthorDate: Wed Aug 30 10:23:31 2023 -0400 Commit: Caolán McNamara CommitDate: Thu Aug 31 18:15:23 2023 +0200 connectivity: add neutral context parser Signed-off-by: Henry Castro Change-Id: I12b0fe811d141873aaa64af5b6c457051c3356b0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156297 Tested-by: Caolán McNamara Reviewed-by: Caolán McNamara diff --git a/connectivity/source/parse/sqlnode.cxx b/connectivity/source/parse/sqlnode.cxx index 1cb631a80c78..e8e8b44f463b 100644 --- a/connectivity/source/parse/sqlnode.cxx +++ b/connectivity/source/parse/sqlnode.cxx @@ -1305,8 +1305,11 @@ std::unique_ptr OSQLParser::predicateTree(OUString& rErrorMessage } -OSQLParser::OSQLParser(css::uno::Reference< css::uno::XComponentContext > xContext, const IParseContext* _pContext) +OSQLParser::OSQLParser(css::uno::Reference< css::uno::XComponentContext > xContext, + const IParseContext* _pContext, + const IParseContext* _pNeutral) :m_pContext(_pContext) +,m_pNeutral(_pNeutral) ,m_pData( new OSQLParser_Data ) ,m_nFormatKey(0) ,m_nDateFormatKey(0) diff --git a/dbaccess/source/core/api/SingleSelectQueryComposer.cxx b/dbaccess/source/core/api/SingleSelectQueryComposer.cxx index 45d9a8ce6595..15667d7d170b 100644 --- a/dbaccess/source/core/api/SingleSelectQueryComposer.cxx +++ b/dbaccess/source/core/api/SingleSelectQueryComposer.cxx @@ -217,7 +217,7 @@ OSingleSelectQueryComposer::OSingleSelectQueryComposer(const Reference< XNameAcc const Reference& _rContext ) :OSubComponent(m_aMutex,_xConnection) ,OPropertyContainer(m_aBHelper) -,m_aSqlParser( _rContext, &m_aParseContext ) +,m_aSqlParser( _rContext, &m_aParseContext, &m_aNeutralContext ) ,m_aSqlIterator( _xConnection, _rxTables, m_aSqlParser ) ,m_aAdditiveIterator( _xConnection, _rxTables, m_aSqlParser ) ,m_aElementaryParts( size_t(SQLPartCount) ) diff --git a/dbaccess/source/core/inc/SingleSelectQueryComposer.hxx b/dbaccess/source/core/inc/SingleSelectQueryComposer.hxx index a0edfd195a69..fdde2d451d17 100644 --- a/dbaccess/source/core/inc/SingleSelectQueryComposer.hxx +++ b/dbaccess/source/core/inc/SingleSelectQueryComposer.hxx @@ -76,6 +76,7 @@ namespace dbaccess typedef std::function TGetParseNode; ::svxform::OSystemParseContext m_aParseContext; +::svxform::ONeutralParseContext m_aNeutralContext; ::connectivity::OSQLParser m_aSqlParser; ::connectivity::OSQLParseTreeIterator m_aSqlIterator; // the iterator for the complete statement ::connectivity::OSQLParseTreeIterator m_aAdditiveIterator;// the iterator for the "additive statement" (means without the clauses of the elementary statement) diff --git a/include/connectivity/sqlparse.hxx b/include/connectivity/sqlparse.hxx index 7e55d41e339f..50c72f6ebcdc 100644 --- a/include/connectivity/sqlparse.hxx +++ b/include/connectivity/sqlparse.hxx @@ -124,7 +124,8 @@ namespace connectivity static sal_Int32s_nRefCount; // information on the current parse action -const IParseContext*m_pContext; +const IParseContext* m_pContext; +const IParseContext* m_pNeutral; std::unique_ptr m_pParseTree; // result from parsing ::std::unique_ptr< OSQLParser_Data > m_pData; @@ -156,7 +157,9 @@ namespace connectivity public: // if NULL, a default context will be used // the context must live as long as the parser -OSQLParser(css::uno::Reference< css::uno::XComponentContext > xContext, const IParseContext* _pContext = nullptr); +OSQLParser(css::uno::Reference< css::uno::XComponentContext > xContext, + const IParseContext* _pContext = nullptr, + const IParseContext* _pNeutral = nullptr); ~OSQLParser(); // Parsing an SQLStatement @@ -173,7 +176,8 @@ namespace connectivity bool bUseRealName = true); // Access to the context -const IParseContext& getContext() const {return *m_pContext;} +const IParseContext& getContext() const { return *m_pContext; } +const IParseConte
[Libreoffice-commits] core.git: sc/qa sc/source
sc/qa/unit/data/ods/tdf150815.ods |binary sc/qa/unit/subsequent_filters_test3.cxx | 22 +- sc/source/ui/inc/viewfunc.hxx |4 ++-- sc/source/ui/view/viewfunc.cxx | 22 ++ 4 files changed, 45 insertions(+), 3 deletions(-) New commits: commit d1411afab98f7b41e9e700ef26b43dc77242d917 Author: Tibor Nagy AuthorDate: Wed Aug 30 16:22:02 2023 +0200 Commit: László Németh CommitDate: Thu Aug 31 18:01:33 2023 +0200 tdf#150815 sc: fix repainting sparkline On Windows, if the input range of the sparkline is not in the same row as the output range, the sparkline wasn't repainted after changing the data within its range. Force the update to avoid of showing obsolete data. Change-Id: Id56209b20387ee68144507a0102d3a0d093ff1ea Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156304 Reviewed-by: László Németh Tested-by: László Németh diff --git a/sc/qa/unit/data/ods/tdf150815.ods b/sc/qa/unit/data/ods/tdf150815.ods new file mode 100644 index ..2dd407b6cea5 Binary files /dev/null and b/sc/qa/unit/data/ods/tdf150815.ods differ diff --git a/sc/qa/unit/subsequent_filters_test3.cxx b/sc/qa/unit/subsequent_filters_test3.cxx index d277e0858905..ff19d3d55c3c 100644 --- a/sc/qa/unit/subsequent_filters_test3.cxx +++ b/sc/qa/unit/subsequent_filters_test3.cxx @@ -393,7 +393,8 @@ struct PaintListener : public SfxListener { if ((pPaintHint->GetStartCol() <= 0 && pPaintHint->GetEndCol() >= 0) && ((pPaintHint->GetStartRow() <= 9 && pPaintHint->GetEndRow() >= 9) -|| (pPaintHint->GetStartRow() == 2 && pPaintHint->GetEndRow() == 3))) +|| (pPaintHint->GetStartRow() == 2 && pPaintHint->GetEndRow() == 3) +|| (pPaintHint->GetStartRow() == 1 && pPaintHint->GetEndRow() == 1))) { mbCalled = true; } @@ -441,6 +442,25 @@ CPPUNIT_TEST_FIXTURE(ScFiltersTest3, testTdf131471) CPPUNIT_ASSERT(aListener.mbCalled); } +CPPUNIT_TEST_FIXTURE(ScFiltersTest3, testTdf150815_RepaintSparkline) +{ +createScDoc("ods/tdf150815.ods"); + +ScDocument* pDoc = getScDoc(); +ScDocShell* pDocSh = getScDocShell(); + +PaintListener aListener; +aListener.StartListening(*pDocSh); + +auto pSparkline = pDoc->GetSparkline(ScAddress(0, 1, 0)); +CPPUNIT_ASSERT(pSparkline); + +ScTabViewShell* pViewShell = getViewShell(); +pViewShell->EnterData(0, 0, 0, "10"); + +CPPUNIT_ASSERT(aListener.mbCalled); +} + CPPUNIT_TEST_FIXTURE(ScFiltersTest3, testTdf137091) { // Set the system locale to Turkish diff --git a/sc/source/ui/inc/viewfunc.hxx b/sc/source/ui/inc/viewfunc.hxx index 0d8d7515441a..323e7cbbe793 100644 --- a/sc/source/ui/inc/viewfunc.hxx +++ b/sc/source/ui/inc/viewfunc.hxx @@ -90,8 +90,8 @@ public: boolAutoSum( const ScRange& rRange, bool bSubTotal, bool bSetCursor, bool bContinue, const OpCode eCode ); OUStringGetAutoSumFormula( const ScRangeList& rRangeList, bool bSubTotal, const ScAddress& rAddr, const OpCode eCode ); -voidEnterData( SCCOL nCol, SCROW nRow, SCTAB nTab, const OUString& rString, - const EditTextObject* pData = nullptr, bool bMatrixExpand = false ); +SC_DLLPUBLIC void EnterData(SCCOL nCol, SCROW nRow, SCTAB nTab, const OUString& rString, +const EditTextObject* pData = nullptr, bool bMatrixExpand = false); voidEnterData( SCCOL nCol, SCROW nRow, SCTAB nTab, const EditTextObject& rData, bool bTestSimple = false ); voidEnterValue( SCCOL nCol, SCROW nRow, SCTAB nTab, const double& rValue ); diff --git a/sc/source/ui/view/viewfunc.cxx b/sc/source/ui/view/viewfunc.cxx index 13c4ce63c6e7..af0dc57357f9 100644 --- a/sc/source/ui/view/viewfunc.cxx +++ b/sc/source/ui/view/viewfunc.cxx @@ -77,6 +77,7 @@ #include #include #include +#include #include @@ -103,6 +104,26 @@ static void lcl_PostRepaintCondFormat( const ScConditionalFormat *pCondFmt, ScDo } } +static void lcl_PostRepaintSparkLine(sc::SparklineList* pSparklineList, const ScRange& rRange, + ScDocShell* pDocSh) +{ +if (pSparklineList) +{ +for (auto& rSparkLineGroup : pSparklineList->getSparklineGroups()) +{ +for (auto& rSparkline : pSparklineList->getSparklinesFor(rSparkLineGroup)) +{ +if (rSparkline->getInputRange().Contains(rRange)) +{ +pDocSh->PostPaint( +ScRange(rSparkline->getColumn(), rSparkline->getRow(), rRange.aStart.Tab()), +PaintPartFlags::All, SC_PF_TESTMERGE); +} +} +} +} +} + ScViewFunc::ScViewFunc( vcl::Window* pParent, ScDocShell& rD
[Libreoffice-commits] core.git: svx/source
svx/source/unodraw/unoshape.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 5f89cf39c8c6228e3580aa94db4978825ea1fba2 Author: Noel Grandin AuthorDate: Thu Aug 31 14:49:17 2023 +0200 Commit: Noel Grandin CommitDate: Thu Aug 31 17:45:07 2023 +0200 improve debug warning message Change-Id: I72f5966a6c144a40d81e479c3d8d27d345064993 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156342 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/svx/source/unodraw/unoshape.cxx b/svx/source/unodraw/unoshape.cxx index 362c0ba149a6..6bd355391301 100644 --- a/svx/source/unodraw/unoshape.cxx +++ b/svx/source/unodraw/unoshape.cxx @@ -1876,7 +1876,7 @@ uno::Any SvxShape::GetAnyForItem( SfxItemSet const & aSet, const SfxItemProperty } else { -OSL_FAIL("SvxShape::GetAnyForItem() Returnvalue has wrong Type!" ); +SAL_WARN("svx", "SvxShape::GetAnyForItem() Return value has wrong Type, " << pMap->aType << " != " << aAny.getValueType()); } }
[Libreoffice-commits] core.git: vcl/skia
vcl/skia/skia_denylist_vulkan.xml |3 +++ 1 file changed, 3 insertions(+) New commits: commit 8109a05543e16a5a499bf3ddc9d45b7c979480bc Author: Julien Nabet AuthorDate: Thu Aug 31 12:33:45 2023 +0200 Commit: Julien Nabet CommitDate: Thu Aug 31 17:25:14 2023 +0200 Related tdf#156986: blacklist Nvidia RTX 4070 for Skia hardware rendering Change-Id: I3f59be1f5501684238a5ccd2736509afe7ac8d57 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156334 Reviewed-by: Julien Nabet Tested-by: Julien Nabet diff --git a/vcl/skia/skia_denylist_vulkan.xml b/vcl/skia/skia_denylist_vulkan.xml index 2bb3b73bb747..8da86069fc46 100644 --- a/vcl/skia/skia_denylist_vulkan.xml +++ b/vcl/skia/skia_denylist_vulkan.xml @@ -48,6 +48,9 @@ + + +
[Libreoffice-commits] core.git: Branch 'distro/collabora/co-23.05' - sw/qa sw/source
sw/qa/uibase/shells/textsh.cxx | 47 sw/source/uibase/shells/textsh1.cxx | 15 ++- 2 files changed, 61 insertions(+), 1 deletion(-) New commits: commit dfb6973c8ec841973d8e03ba304a8f58f894ae09 Author: Miklos Vajna AuthorDate: Wed Aug 30 08:59:44 2023 +0200 Commit: Caolán McNamara CommitDate: Thu Aug 31 17:11:41 2023 +0200 tdf#77760 sw floattable: add support for footnotes, UI Import filters could already create footnotes in floating tables, allow the same from the UI. Use IsFlySplitAllowed() as the check, because that already knows rejecting special anchor locations like footnotes/headers/footers in addition to actually decide if this is a split fly or not. (cherry picked from commit 739597df38dcaab0460482e3bc3f18f2471d43ab) Change-Id: Ib9bab7b29d1bea0c15f3d829d16c9edbf1455b6b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156336 Tested-by: Jenkins CollaboraOffice Tested-by: Caolán McNamara Reviewed-by: Caolán McNamara diff --git a/sw/qa/uibase/shells/textsh.cxx b/sw/qa/uibase/shells/textsh.cxx index a97fc8bd7f5f..6ecf33025c18 100644 --- a/sw/qa/uibase/shells/textsh.cxx +++ b/sw/qa/uibase/shells/textsh.cxx @@ -12,8 +12,17 @@ #include #include #include +#include +#include #include +#include +#include +#include +#include +#include +#include +#include namespace { @@ -59,6 +68,44 @@ CPPUNIT_TEST_FIXTURE(Test, testDeleteSections) // i.e. the section was not deleted. CPPUNIT_ASSERT_EQUAL(static_cast(0), pDoc->GetSections().size()); } + +CPPUNIT_TEST_FIXTURE(Test, testSplitFlyFootnoteUI) +{ +// Given a document with a split fly (to host a table): +createSwDoc(); +SwDoc* pDoc = getSwDoc(); +SwWrtShell* pWrtShell = getSwDocShell()->GetWrtShell(); +SwFlyFrameAttrMgr aMgr(true, pWrtShell, Frmmgr_Type::TEXT, nullptr); +RndStdIds eAnchor = RndStdIds::FLY_AT_PARA; +pWrtShell->StartAllAction(); +aMgr.InsertFlyFrame(eAnchor, aMgr.GetPos(), aMgr.GetSize()); +pWrtShell->EndAllAction(); +pWrtShell->StartAllAction(); +SwFrameFormats& rFlys = *pDoc->GetSpzFrameFormats(); +SwFrameFormat* pFly = rFlys[0]; +{ +SwAttrSet aSet(pFly->GetAttrSet()); +aSet.Put(SwFormatFlySplit(true)); +pDoc->SetAttr(aSet, *pFly); +} +pWrtShell->EndAllAction(); +pWrtShell->UnSelectFrame(); +pWrtShell->LeaveSelFrameMode(); +pWrtShell->GetView().AttrChangedNotify(nullptr); +pWrtShell->MoveSection(GoCurrSection, fnSectionEnd); + +// When checking if we can insert a footnote inside the split fly: +SwView& rView = pWrtShell->GetView(); +std::unique_ptr pItem; +SfxItemState eState = rView.GetViewFrame()->GetBindings().QueryState(FN_INSERT_FOOTNOTE, pItem); + +// Then make sure that the insertion is allowed: +// Without the accompanying fix in place, this test would have failed with: +// - Expected: 32 (DEFAULT) +// - Actual : 1 (DISABLED) +// i.e. the insertion was denied. +CPPUNIT_ASSERT_EQUAL(SfxItemState::DEFAULT, eState); +} } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/uibase/shells/textsh1.cxx b/sw/source/uibase/shells/textsh1.cxx index 4fd74802e01a..daad30d0a067 100644 --- a/sw/source/uibase/shells/textsh1.cxx +++ b/sw/source/uibase/shells/textsh1.cxx @@ -118,6 +118,8 @@ #include #include #include +#include +#include using namespace ::com::sun::star; using namespace com::sun::star::beans; @@ -2261,7 +2263,18 @@ void SwTextShell::GetState( SfxItemSet &rSet ) { const FrameTypeFlags nNoType = FrameTypeFlags::FLY_ANY | FrameTypeFlags::HEADER | FrameTypeFlags::FOOTER | FrameTypeFlags::FOOTNOTE; -if ( rSh.GetFrameType(nullptr,true) & nNoType ) +FrameTypeFlags eType = rSh.GetFrameType(nullptr, true); +bool bSplitFly = false; +if (eType & FrameTypeFlags::FLY_ATCNT) +{ +SwContentFrame* pContentFrame = rSh.GetCurrFrame(/*bCalcFrame=*/false); +if (pContentFrame) +{ +SwFlyFrame* pFlyFrame = pContentFrame->FindFlyFrame(); +bSplitFly = pFlyFrame && pFlyFrame->IsFlySplitAllowed(); +} +} +if (eType & nNoType && !bSplitFly) rSet.DisableItem(nWhich); if ( rSh.CursorInsideInputField() )
[Libreoffice-commits] core.git: sc/qa
sc/qa/unit/functions_test.cxx |6 -- 1 file changed, 4 insertions(+), 2 deletions(-) New commits: commit 63582b234ddcca3bcb1f76843363e5e7d0b0a08e Author: Eike Rathke AuthorDate: Thu Aug 31 14:53:37 2023 +0200 Commit: Eike Rathke CommitDate: Thu Aug 31 17:07:09 2023 +0200 Related: tdf#156985 Do not fail for first empty check cell in test failure case So we can actually find a detail if there are empty rows and not just bail out with "Sheet2.A1 '' result: 0, expected: 0" or such. Change-Id: I163f84edebfb98f6f0351ba3dc889d3fab0e6789 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156344 Reviewed-by: Eike Rathke Tested-by: Jenkins diff --git a/sc/qa/unit/functions_test.cxx b/sc/qa/unit/functions_test.cxx index 8efdfa5b0f82..40504480d04d 100644 --- a/sc/qa/unit/functions_test.cxx +++ b/sc/qa/unit/functions_test.cxx @@ -40,8 +40,10 @@ bool FunctionsTest::load(const OUString& rFilter, const OUString& rURL, SCROW maxRow = rDoc.GetLastDataRow(tab, 2, 2, rDoc.MaxRow()); for(SCROW row = 0; row <= maxRow; ++row) { -// Column C has the check result, column D has the formula text. -if(rDoc.HasStringData(2, row, tab)) +// Column A has the result value, column B has the expected +// value, Column C has the check result (1 or 0), column D has +// the formula text. +if(rDoc.HasStringData(2, row, tab) || !rDoc.HasData(2, row, tab)) continue; if(!rtl::math::approxEqual(1.0, rDoc.GetValue(2, row, 1))) CPPUNIT_FAIL( OUString( "Testing " + rURL + " failed, "
Question of Gerrit build
Hello. In Gerrit build, Windows builder configuration is only for x86, isn't there one for x86_64 or ARM64? Regards, taichi
[Libreoffice-commits] core.git: accessibility/source
accessibility/source/standard/vclxaccessibletabcontrol.cxx |5 - 1 file changed, 4 insertions(+), 1 deletion(-) New commits: commit bbd1eaeb4f8a923d861aae15264b2d4138590642 Author: Michael Weghorn AuthorDate: Thu Aug 31 14:47:06 2023 +0200 Commit: Michael Weghorn CommitDate: Thu Aug 31 17:00:23 2023 +0200 a11y: Re-add check for empty reference in VCLXAccessibleTabControl It got lost with commit a3f77a61c03340b79930e89d5c4045d814b93edf Date: Wed Aug 30 14:43:18 2023 +0200 use concrete type for VCLXAccessibleTabControl::m_aAccessibleChildren and resulted in a crash when e.g. doing the following with the qt6 VCL plugin on Linux: 1) open attachment 189287 from tdf#104833 2) "Tools" -> "Macros" -> "Organize Dialogs" 3) select the dialog from the doc 4) select "Edit" Change-Id: I2c4aea951976738c575943a64d01eaac2766fdd1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156343 Tested-by: Jenkins Reviewed-by: Michael Weghorn diff --git a/accessibility/source/standard/vclxaccessibletabcontrol.cxx b/accessibility/source/standard/vclxaccessibletabcontrol.cxx index 0855b0f177aa..a0990d51febd 100644 --- a/accessibility/source/standard/vclxaccessibletabcontrol.cxx +++ b/accessibility/source/standard/vclxaccessibletabcontrol.cxx @@ -218,7 +218,10 @@ void VCLXAccessibleTabControl::ProcessWindowEvent( const VclWindowEvent& rVclWin // dispose all tab pages for (const rtl::Reference& i : m_aAccessibleChildren) -i->dispose(); +{ +if (i.is()) +i->dispose(); +} m_aAccessibleChildren.clear(); }
ESC meeting minutes: 2023-08-31
* Present: + Heiko, Olivier, Caolan, Gabriel, Ilmari, Khaled, Michael W, Michael S, Stephan, Cloph, Stephane, Thorsten, Miklos, Gabriel, Eike * Completed Action Items: + Fix gdb pretty-printers on tb99 (Cloph) + added the allow line to .gdbinit, also on the other bots as well * Pending Action Items: + Try gtk4 local builds, Qt6 local builds (Cloph) * Release Engineering update (Cloph) + 7.6 status: 7.6.1 rc2 in 1 week? + 7.5 status: 7.5.6 rc2 this week, tag was done yesterday + update for the impress remote for Android + addressing the new play store requirement + AI: update the core.git README.md with the new Linux baseline (Cloph) * Documentation (Olivier) + New Help + No news + Helpcontents2 + Updates on UI commands (ohallot) + Fixes of HIDs x pages (ohallot, R Lima) + Q: one help page per UNO command? + sounds sensible (Miklos) + would be good to find an example to follow that plays nicely with the help (Miklos) + ScriptForge updates (R. Lima) + Note: Python Help support since long time. + Guides + New books from Spanish Com'ty in bookshelf (JC. Sanz) + Time to review book template, branding for 24's + "Plain English" debate (Rob Thornton) + Bugzilla Documentation statistics 269(269) bugs open + Updates: BZ changes 1 week 1 month 3 months 12 months created 8(4)29(-7) 76(-2) 308(0) commented 15(4)84(-9)247(2) 1100(4) resolved 1(-2) 12(-5) 31(-3) 172(-1) + top 10 contributors: Olivier Hallot made 28 changes in 1 month, and 462 changes in 1 year Stéphane Guillou made 18 changes in 1 month, and 325 changes in 1 year Rafael Lima made 16 changes in 1 month, and 163 changes in 1 year Nabet, Julien made 11 changes in 1 month, and 31 changes in 1 year Heiko Tietze made 8 changes in 1 month, and 118 changes in 1 year Wolfgang Jäger made 6 changes in 1 month, and 6 changes in 1 year Seth Chaiklin made 6 changes in 1 month, and 303 changes in 1 year Ilmari Lauhakangas made 5 changes in 1 month, and 113 changes in 1 year Kaganski, Mike made 5 changes in 1 month, and 76 changes in 1 year *UNKNOWN* made 4 changes in 1 month, and 12 changes in 1 year * UX Update (Heiko) + Bugzilla (topicUI) statistics 265(265) (topicUI) bugs open, 59(59) (needsUXEval) needs to be evaluated by the UXteam + Updates: BZ changes 1 week 1 month3 months 12 months added 8(8) 10(-4) 22(-1) 53(-1) commented 66(22) 172(-10) 460(-50) 2421(7) removed 0(-1) 1(0) 3(-2) 27(0) resolved 6(-3)26(-4) 78(1) 330(1) + top 10 contributors: Heiko Tietze made 78 changes in 1 month, and 1440 changes in 1 year Eyal Rozenberg made 57 changes in 1 month, and 345 changes in 1 year Stéphane Guillou made 42 changes in 1 month, and 450 changes in 1 year خالد حسني made 23 changes in 1 month, and 37 changes in 1 year Henschel, Regina made 19 changes in 1 month, and 52 changes in 1 year Kaganski, Mike made 14 changes in 1 month, and 135 changes in 1 year Bogdan B made 12 changes in 1 month, and 97 changes in 1 year Roman Kuznetsov made 9 changes in 1 month, and 159 changes in 1 year Leroy made 9 changes in 1 month, and 14 changes in 1 year Rafael Lima made 9 changes in 1 month, and 213 changes in 1 year + [Bug 157035] Enable Styles import from a master document + [Bug 149625] FORMATTING: Pasting a table cell, pastes the source cell in the upper/actual cell as an inner table cell + [Bug 156885] add toggle to show / hide authorship metadata in popup Calc comments + [Bug 156454] Indication of which table rows are considered heading rows is "hidden away" from the user -> + [Bug 157006] UX review needed for Options - Writer - Compatibility dialog + input welcome -> + [Bug 156925] Add a Color Scheme switcher to the Basic IDE + proposal at https://gerrit.libreoffice.org/c/core/+/155928 + [Bug 156549] New CAD features for cable design + [Bug 156939] "Fit height to text" is misleading, only regards growing rather than shrinking + [Bug 156942] "Fit width to text" shouldn't default to "extend width to fit whole paragraph on a single line" + [Bug 156964] Support idiom of title bar moving up or down according to main box contents + [Bug 156507] Ability to remove non-printing/"atypical" characters in a stretch of text * Crash Testing (Caolan) + 14(+0) import failure, 0(+0) export failures - just 1 calc parallel issue remaining - everything else is w
[Libreoffice-commits] core.git: svx/source
svx/source/unodraw/unoshape.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 6baacabbb74171287d449f23cb70bd2523b18039 Author: Noel Grandin AuthorDate: Thu Aug 31 14:16:05 2023 +0200 Commit: Noel Grandin CommitDate: Thu Aug 31 15:39:28 2023 +0200 ignore UnknownPropertyException in SvxShape::setPropertyValues which greatly reduces the log noise when debugging Change-Id: I556fb79c04b23f757b92ed635233d5222c177df1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156338 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/svx/source/unodraw/unoshape.cxx b/svx/source/unodraw/unoshape.cxx index e3663d024f5e..362c0ba149a6 100644 --- a/svx/source/unodraw/unoshape.cxx +++ b/svx/source/unodraw/unoshape.cxx @@ -1709,7 +1709,7 @@ void SAL_CALL SvxShape::setPropertyValues( const css::uno::Sequence< OUString >& } catch (beans::UnknownPropertyException&) { -DBG_UNHANDLED_EXCEPTION("svx"); +// ignore, various code likes to opportunisticly set properties on objects that don't support those properties } catch (uno::Exception&) {
[Libreoffice-commits] core.git: svx/source
svx/source/theme/ThemeColorChangerCommon.cxx | 11 ++- 1 file changed, 6 insertions(+), 5 deletions(-) New commits: commit 60880c9a7634468a852d4b0bf2d7a69d41ac7d11 Author: Caolán McNamara AuthorDate: Thu Aug 31 09:03:31 2023 +0100 Commit: Caolán McNamara CommitDate: Thu Aug 31 15:23:18 2023 +0200 cid#1542447 Explicit null dereferenced Change-Id: I1de10a8a459175f79bb2b8f796cde287be1945c9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156326 Tested-by: Jenkins Reviewed-by: Caolán McNamara diff --git a/svx/source/theme/ThemeColorChangerCommon.cxx b/svx/source/theme/ThemeColorChangerCommon.cxx index 5629036f9a68..44f041f5f3b0 100644 --- a/svx/source/theme/ThemeColorChangerCommon.cxx +++ b/svx/source/theme/ThemeColorChangerCommon.cxx @@ -48,16 +48,16 @@ const SvxColorItem* getColorItem(const editeng::Section& rSection) return nullptr; } -bool updateEditEngTextSections(model::ColorSet const& rColorSet, SdrObject* pObject, SdrView* pView) +bool updateEditEngTextSections(model::ColorSet const& rColorSet, SdrObject* pObject, SdrView& rView) { SdrTextObj* pTextObject = DynCastSdrTextObj(pObject); if (!pTextObject) return false; -pView->SdrBeginTextEdit(pTextObject); +rView.SdrBeginTextEdit(pTextObject); -auto* pOutlinerView = pView->GetTextEditOutlinerView(); +auto* pOutlinerView = rView.GetTextEditOutlinerView(); if (!pOutlinerView) return false; @@ -96,7 +96,7 @@ bool updateEditEngTextSections(model::ColorSet const& rColorSet, SdrObject* pObj } } -pView->SdrEndTextEdit(); +rView.SdrEndTextEdit(); return true; } @@ -165,7 +165,8 @@ void updateSdrObject(model::ColorSet const& rColorSet, SdrObject* pObject, SdrVi if (!pObject) return; -updateEditEngTextSections(rColorSet, pObject, pView); +if (pView) +updateEditEngTextSections(rColorSet, pObject, *pView); updateObjectAttributes(rColorSet, *pObject, pUndoManager); }
[Libreoffice-commits] core.git: comphelper/source
comphelper/source/eventattachermgr/eventattachermgr.cxx |3 +++ 1 file changed, 3 insertions(+) New commits: commit b9d9f9ee71464425a52c5798503840b106b210bc Author: Noel Grandin AuthorDate: Thu Aug 31 14:01:17 2023 +0200 Commit: Noel Grandin CommitDate: Thu Aug 31 15:20:41 2023 +0200 tdf#156967 cal basic, CSV import macro crashes regression from commit ba4191ff0de05334ba32b53a09ad992710f03f9d Author: Noel Grandin Date: Mon Jan 30 21:48:53 2023 +0200 osl::Mutex->std::mutex in ImplEventAttacherManager Change-Id: I1557d9b6f66628fae1f466198ac4a8961e85e5bb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156337 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/comphelper/source/eventattachermgr/eventattachermgr.cxx b/comphelper/source/eventattachermgr/eventattachermgr.cxx index 260121ba1517..50085c5ce6e4 100644 --- a/comphelper/source/eventattachermgr/eventattachermgr.cxx +++ b/comphelper/source/eventattachermgr/eventattachermgr.cxx @@ -252,7 +252,10 @@ Any SAL_CALL AttacherAllListener_Impl::approveFiring( const AllEventObject& Even OInterfaceIteratorHelper4 aIt( l, mxManager->aScriptListeners ); while( aIt.hasMoreElements() ) { +// cannot hold lock over call to approveFiring, since it might recurse back into us +l.unlock(); aRet = aIt.next()->approveFiring( aScriptEvent ); +l.lock(); try { Reference< XIdlClass > xListenerType = mxManager->getReflection(l)->
[Libreoffice-commits] core.git: 2 commits - svx/source
svx/source/accessibility/charmapacc.cxx |8 +- svx/source/accessibility/svxpixelctlaccessiblecontext.cxx | 43 +- svx/source/dialog/charmap.cxx |9 +- svx/source/inc/charmapacc.hxx |4 - svx/source/inc/svxpixelctlaccessiblecontext.hxx |4 - 5 files changed, 32 insertions(+), 36 deletions(-) New commits: commit 1fb467ae240de07bc381385ec0589a6e99ca7042 Author: Noel Grandin AuthorDate: Thu Aug 31 08:46:39 2023 +0200 Commit: Noel Grandin CommitDate: Thu Aug 31 15:10:56 2023 +0200 use concrete type for SvxShowCharSetAcc::m_aChildren avoid some unnecessary casting Change-Id: I73338c00b90357fe939e38a53f87a4ef9f13e86c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156322 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/svx/source/accessibility/charmapacc.cxx b/svx/source/accessibility/charmapacc.cxx index 61cf9ca853e1..b5a0544d75b5 100644 --- a/svx/source/accessibility/charmapacc.cxx +++ b/svx/source/accessibility/charmapacc.cxx @@ -56,7 +56,7 @@ SvxShowCharSetItem::~SvxShowCharSetItem() } } -uno::Reference< css::accessibility::XAccessible > SvxShowCharSetItem::GetAccessible() +rtl::Reference SvxShowCharSetItem::GetAccessible() { if( !m_xItem.is() ) { @@ -84,8 +84,8 @@ SvxShowCharSetAcc::~SvxShowCharSetAcc() void SAL_CALL SvxShowCharSetAcc::disposing() { OAccessibleSelectionHelper::disposing(); -for (auto& rChild : m_aChildren) -::comphelper::disposeComponent(rChild); +for (auto& rxChild : m_aChildren) +rxChild->dispose(); m_aChildren.clear(); m_pParent = nullptr; @@ -146,7 +146,7 @@ uno::Reference< css::accessibility::XAccessible > SAL_CALL SvxShowCharSetAcc::ge { OExternalLockGuard aGuard( this ); -uno::Reference< css::accessibility::XAccessible >xRet; +rtl::Reference< SvxShowCharSetItemAcc > xRet; SvxShowCharSetItem* pItem = m_pParent->ImplGetItem( static_cast< sal_uInt16 >( i ) ); if( !pItem ) diff --git a/svx/source/dialog/charmap.cxx b/svx/source/dialog/charmap.cxx index 18a31b5f7a74..a9806505d8c8 100644 --- a/svx/source/dialog/charmap.cxx +++ b/svx/source/dialog/charmap.cxx @@ -767,11 +767,14 @@ void SvxShowCharSet::SelectIndex(int nNewIndex, bool bFocus) if( m_xAccessible.is() ) { svx::SvxShowCharSetItem* pItem = ImplGetItem(nSelectedIndex); +rtl::Reference xItemAcc = pItem->GetAccessible(); // Don't fire the focus event. if ( bFocus ) -m_xAccessible->fireEvent( AccessibleEventId::ACTIVE_DESCENDANT_CHANGED, Any(), Any(pItem->GetAccessible()) ); // this call assures that m_pItem is set +m_xAccessible->fireEvent( AccessibleEventId::ACTIVE_DESCENDANT_CHANGED, Any(), +Any(uno::Reference(xItemAcc)) ); // this call assures that m_pItem is set else -m_xAccessible->fireEvent( AccessibleEventId::ACTIVE_DESCENDANT_CHANGED_NOFOCUS, Any(), Any(pItem->GetAccessible()) ); // this call assures that m_pItem is set +m_xAccessible->fireEvent( AccessibleEventId::ACTIVE_DESCENDANT_CHANGED_NOFOCUS, Any(), +Any(uno::Reference(xItemAcc)) ); // this call assures that m_pItem is set assert(pItem->m_xItem.is() && "No accessible created!"); Any aOldAny, aNewAny; @@ -826,7 +829,7 @@ IMPL_LINK_NOARG(SvxShowCharSet, VscrollHdl, weld::ScrolledWindow&, void) int nLast = LastInView(); for ( ; nLast != nSelectedIndex; ++nLast) { -aOldAny <<= ImplGetItem(nLast)->GetAccessible(); +aOldAny <<= uno::Reference(ImplGetItem(nLast)->GetAccessible()); m_xAccessible ->fireEvent( AccessibleEventId::CHILD, aOldAny, aNewAny ); } } diff --git a/svx/source/inc/charmapacc.hxx b/svx/source/inc/charmapacc.hxx index c909756c22d1..43ab846d5b6f 100644 --- a/svx/source/inc/charmapacc.hxx +++ b/svx/source/inc/charmapacc.hxx @@ -52,7 +52,7 @@ namespace svx SvxShowCharSetItem( SvxShowCharSet& rParent, SvxShowCharSetAcc* _pParent, sal_uInt16 _nPos ); ~SvxShowCharSetItem(); -css::uno::Reference< css::accessibility::XAccessible > GetAccessible(); +rtl::Reference< SvxShowCharSetItemAcc > GetAccessible(); }; @@ -66,7 +66,7 @@ namespace svx css::accessibility::XAccessible, css::accessibility::XAccessibleTable> { -::std::vector< css::uno::Reference< css::accessibility::XAccessible > > m_aChildren; +::std::vector< rtl::Reference< SvxShowCharSetItemAcc > > m_aChildren; SvxShowCharSet* m_pParent; // the vcl control virtual void SAL_CALL disposing() override; public:
Re: new bridgetest failures in 7.6 on ppc64le
On 8/31/23 13:51, Dan Horák wrote: On Thu, 31 Aug 2023 10:21:05 +0200 Dan Horák wrote: Hello, I am working with the Fedora LibreOffice team on keeping LO building on ppc64le and s390x platforms and we found some new test failures during the rebase to 7.6. This is the first of them. ... [CXX] vcl/qa/cppunit/GraphicTest.cxx [CXX] vcl/qa/cppunit/GraphicDescriptorTest.cxx two floats struct test failed four floats struct test failed standard test failed exception occurred: error: test failed! at /home/sharkcz/projects/libreoffice/testtools/source/bridgetest/bridgetest.cxx:1268 error: error: test failed! at /home/sharkcz/projects/libreoffice/testtools/source/bridgetest/bridgetest.cxx:1268 dying...make[1]: *** [/home/sharkcz/projects/libreoffice/testtools/CustomTarget_uno_test.mk:26: /home/sharkcz/projects/libreoffice/workdir/CustomTarget/testtools/uno_test.done] Error 1 make[1]: *** Waiting for unfinished jobs I have tracked it down to https://git.libreoffice.org/core/+/32c845cb4389aba9430ce471b04f2891f5ff630d%5E%21/ So I guess it possibly uncovered a real issue somewhere else. Seems the TwoFloat/FourFloat checks from https://git.libreoffice.org/core/+/refs/heads/master/testtools/source/bridgetest/bridgetest.cxx#472 are called twice during "make unitcheck" and the second run returns garbage in the second (and third/fourth?) member. Any pointers where to look further or any help on resolving it would be appreciated. and before the mentioned commit the check is run only once. Doesn't it mean the Java bridge is broken for ppc64le, because it now runs the Java test as well? Smells a bit like it, though that would also be somewhat odd as that bridge should mostly be platform-agnostic. While the first test checks a roundtrip from C++ (testtools/source/bridgetest/bridgetest.cxx) to the binary UNO hub to C++ (testtools/source/bridgetest/cppobj.cxx) and back, that second test checks a roundtrip form C++ (testtools/source/bridgetest/bridgetest.cxx) to the binary UNO hub to Java (testtools/com/sun/star/comp/bridge/TestComponent.java) and back. Maybe bridges/source/jni_uno/jni_data.cxx Bridge::map_to_uno/_java are good first pointers where to look for corrupted values in-flight, and then go from there...
Re: new bridgetest failures in 7.6 on ppc64le
On Thu, 31 Aug 2023 10:21:05 +0200 Dan Horák wrote: > Hello, > > I am working with the Fedora LibreOffice team on keeping LO building on > ppc64le and s390x platforms and we found some new test failures during the > rebase to 7.6. This is the first of them. > > ... > [CXX] vcl/qa/cppunit/GraphicTest.cxx > [CXX] vcl/qa/cppunit/GraphicDescriptorTest.cxx > two floats struct test failed > four floats struct test failed > standard test failed > exception occurred: error: test failed! at > /home/sharkcz/projects/libreoffice/testtools/source/bridgetest/bridgetest.cxx:1268 > > > error: error: test failed! at > > /home/sharkcz/projects/libreoffice/testtools/source/bridgetest/bridgetest.cxx:1268 > > dying...make[1]: *** > > [/home/sharkcz/projects/libreoffice/testtools/CustomTarget_uno_test.mk:26: > > /home/sharkcz/projects/libreoffice/workdir/CustomTarget/testtools/uno_test.done] > > Error 1 > make[1]: *** Waiting for unfinished jobs > > > I have tracked it down to > https://git.libreoffice.org/core/+/32c845cb4389aba9430ce471b04f2891f5ff630d%5E%21/ > So I guess it possibly uncovered a real issue somewhere else. > > Seems the TwoFloat/FourFloat checks from > https://git.libreoffice.org/core/+/refs/heads/master/testtools/source/bridgetest/bridgetest.cxx#472 > are called twice during "make unitcheck" and the second run returns > garbage in the second (and third/fourth?) member. Any pointers where to > look further or any help on resolving it would be appreciated. and before the mentioned commit the check is run only once. Doesn't it mean the Java bridge is broken for ppc64le, because it now runs the Java test as well? Dan
new bridgetest failures in 7.6 on ppc64le
Hello, I am working with the Fedora LibreOffice team on keeping LO building on ppc64le and s390x platforms and we found some new test failures during the rebase to 7.6. This is the first of them. ... [CXX] vcl/qa/cppunit/GraphicTest.cxx [CXX] vcl/qa/cppunit/GraphicDescriptorTest.cxx two floats struct test failed four floats struct test failed standard test failed exception occurred: error: test failed! at /home/sharkcz/projects/libreoffice/testtools/source/bridgetest/bridgetest.cxx:1268 > error: error: test failed! at > /home/sharkcz/projects/libreoffice/testtools/source/bridgetest/bridgetest.cxx:1268 > dying...make[1]: *** > [/home/sharkcz/projects/libreoffice/testtools/CustomTarget_uno_test.mk:26: > /home/sharkcz/projects/libreoffice/workdir/CustomTarget/testtools/uno_test.done] > Error 1 make[1]: *** Waiting for unfinished jobs I have tracked it down to https://git.libreoffice.org/core/+/32c845cb4389aba9430ce471b04f2891f5ff630d%5E%21/ So I guess it possibly uncovered a real issue somewhere else. Seems the TwoFloat/FourFloat checks from https://git.libreoffice.org/core/+/refs/heads/master/testtools/source/bridgetest/bridgetest.cxx#472 are called twice during "make unitcheck" and the second run returns garbage in the second (and third/fourth?) member. Any pointers where to look further or any help on resolving it would be appreciated. The plan is to looks at the other new failures as well, set a baseline and then run some CI to catch any new issues early. Thanks, Dan
Re: #tdf51510: Change the DPI to get better resolution, but failed the unit test
Sorry to come back to this: every document has a property called "Image Preferred DPI" that can be used to represent the printing intentions of that document. Apparent dimensions are a result of deviding the available pixels in the Image by the print intentions . if the user like to send the document to a professional printing house then all images need to have a DPI of minimal 254, laser printers need 150 DPI and on screen presentations 96 DPI Tomaz has this implemented a feature called "Image Preferred DPI" so the dimensions of an image in the document can been checked/controled by the number of pixels in the image and the print intentions off a document. With a Preferred DPI of 254 and 2450 pixels in the image, the image can be displayed at a maximum size of 10 inches. If the image is smaller, then fewer than 2450 pixels are needed. So the "Image Preferred DPI" can be used to determine the "Print Intentions" for a Document, and it can easily calculate how many DPI or pixels an image needs. grtz Fernand On 31/08/2023 5:05, Lodev wrote: Hi, Tomaž Vajngerl 於 2023/8/31 03:13 寫道: Hi, On Tue, Aug 29, 2023 at 9:09 AM Lodev wrote: Sorry if I'm asking a stupid question here. First, I've never seen or used a document with "multiple instances that all point to the same image in the document". That's easy - drag the image while holding ctrl and drop. It will make a copy of the Graphic, but it still references the same instance and you can resize each one independently. If you save the document there will be only one image saved. Thanks. And I take "the image in the document" or "The size the image takes up in the document" seems to be the "Apparent dimensions", 4.24" in this case. Is it? Yes - the document has a size and combined with the size of the image (in the document, not what it is set in SVG) you can calculate the actual needed DPI relative to the document. That is, even if there are multiple images in this document which the source is the same one (I still don't know how to do that), shouldn't it be calculated regarding to the "Apparent dimensions" here? I mean, after all, that is what user set in the document. That's the point - what is important is the size of the image in the document, not what the size is the SVG image. Since the image shown in the document is actually 4.24"x4.24", while the original svg file is 0.21"x0.21, shouldn't it be 20 times (4.24/0.21 ~= 20) DPI, that is, 96*20 = 1920 sent to xBitmap()? Yes, that seems correct. But this is only for this case - another case would need another factor. For example if you resize the image in the document to 0.42 x 0.42, you would use the factor 2. We tried to set Size(20,20) to get aDPI, or directly set aDPI to (1920,1920), they both ended up 4.24"x4.24" with 99DPI, which is good enough. Do you think it a reasonable thought? That's only for this image where 20 is correct - you would need another number calculated per image. Also use a constant DPI factor as I already said at the beginning, not the size of the output device. So you will need to first find the place where conversion for the embedded PNG and properly calculate the size at that place - not inside this method. The size should be the Apparent dimensions, since in the document it was set to that size. That's what we thought. Yes - it needs to be the size in the document, not the size of SVG. BTW, if so, how can we get the Apparent dimensions in this method? You will have to set it from the outside as a parameter - as it depends on the image and here you don't have the information. So, that's what we thought - to calculate the necessary DPI by Apparent dimensions every time we export to docx. Could you please give us some hint about where to get the Apparent dimensions? It's not very trivial to us. We'd like to give it a try to provide a patch for this issue. Thanks for your help, Dev
[Libreoffice-commits] core.git: Branch 'distro/cib/libreoffice-6-4' - comphelper/source include/comphelper include/filter include/oox oox/qa oox/source
comphelper/source/misc/docpasswordhelper.cxx |4 + comphelper/source/misc/hash.cxx |6 ++ include/comphelper/hash.hxx |1 include/filter/msfilter/mscodec.hxx |1 include/oox/crypto/AgileEngine.hxx |1 include/oox/crypto/CryptTools.hxx|1 oox/qa/unit/CryptoTest.cxx | 62 +++ oox/source/crypto/AgileEngine.cxx| 33 +- oox/source/crypto/CryptTools.cxx |6 ++ 9 files changed, 112 insertions(+), 3 deletions(-) New commits: commit 4fff1101da5d953c76da6f0f247e24935fb28ca6 Author: Balazs Varga AuthorDate: Tue Aug 22 22:10:20 2023 +0200 Commit: Balazs Varga CommitDate: Thu Aug 31 11:47:30 2023 +0200 tdf#156835 - FILEOPEN XLSX: add SHA-384 encryption support for ooxml import Password protected file with SHA-384 encryption does not open before this patch. cherry-picked from: 9254fbce6b9e20a75aa2a379bcf2fc9dc41a5b44 Change-Id: I482233f788b8e9da210ad6d2a6c4ece18d05d248 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156282 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156309 Tested-by: Balazs Varga Reviewed-by: Balazs Varga diff --git a/comphelper/source/misc/docpasswordhelper.cxx b/comphelper/source/misc/docpasswordhelper.cxx index dfc408690027..946737994ab7 100644 --- a/comphelper/source/misc/docpasswordhelper.cxx +++ b/comphelper/source/misc/docpasswordhelper.cxx @@ -268,7 +268,9 @@ std::vector DocPasswordHelper::GetOoxHashAsVector( eType = comphelper::HashType::SHA512; else if (rAlgorithmName == "SHA-256" || rAlgorithmName == "SHA256") eType = comphelper::HashType::SHA256; -else if (rAlgorithmName == "SHA-1" || rAlgorithmName == "SHA1") // "SHA1" might be in the wild +else if (rAlgorithmName == u"SHA-384" || rAlgorithmName == u"SHA384") +eType = comphelper::HashType::SHA384; +else if (rAlgorithmName == u"SHA-1" || rAlgorithmName == u"SHA1") // "SHA1" might be in the wild eType = comphelper::HashType::SHA1; else if (rAlgorithmName == "MD5") eType = comphelper::HashType::MD5; diff --git a/comphelper/source/misc/hash.cxx b/comphelper/source/misc/hash.cxx index 3db0b3e56616..ca5467904c22 100644 --- a/comphelper/source/misc/hash.cxx +++ b/comphelper/source/misc/hash.cxx @@ -39,6 +39,8 @@ struct HashImpl return HASH_AlgSHA1; case HashType::SHA256: return HASH_AlgSHA256; +case HashType::SHA384: +return HASH_AlgSHA384; case HashType::SHA512: return HASH_AlgSHA512; } @@ -58,6 +60,8 @@ struct HashImpl return EVP_sha1(); case HashType::SHA256: return EVP_sha256(); +case HashType::SHA384: +return EVP_sha384(); case HashType::SHA512: return EVP_sha512(); } @@ -138,6 +142,8 @@ size_t Hash::getLength() const return 20; case HashType::SHA256: return 32; +case HashType::SHA384: +return 48; case HashType::SHA512: return 64; } diff --git a/include/comphelper/hash.hxx b/include/comphelper/hash.hxx index 52ad5e5cdf1e..ae16d5ddd57f 100644 --- a/include/comphelper/hash.hxx +++ b/include/comphelper/hash.hxx @@ -26,6 +26,7 @@ enum class HashType MD5, SHA1, SHA256, +SHA384, SHA512 }; diff --git a/include/filter/msfilter/mscodec.hxx b/include/filter/msfilter/mscodec.hxx index 47067a38fe5e..9f0a858fb227 100644 --- a/include/filter/msfilter/mscodec.hxx +++ b/include/filter/msfilter/mscodec.hxx @@ -444,6 +444,7 @@ const sal_uInt32 SALT_LENGTH= 16; const sal_uInt32 ENCRYPTED_VERIFIER_LENGTH = 16; const sal_uInt32 SHA1_HASH_LENGTH = RTL_DIGEST_LENGTH_SHA1; // 20 const sal_uInt32 SHA256_HASH_LENGTH = 32; +const sal_uInt32 SHA384_HASH_LENGTH = 48; const sal_uInt32 SHA512_HASH_LENGTH = 64; struct MSFILTER_DLLPUBLIC EncryptionStandardHeader diff --git a/include/oox/crypto/AgileEngine.hxx b/include/oox/crypto/AgileEngine.hxx index 796f030b3bce..0a1721dc096b 100644 --- a/include/oox/crypto/AgileEngine.hxx +++ b/include/oox/crypto/AgileEngine.hxx @@ -71,6 +71,7 @@ struct OOX_DLLPUBLIC AgileEncryptionParameters enum class AgileEncryptionPreset { AES_128_SHA1, +AES_128_SHA384, AES_256_SHA512, }; diff --git a/include/oox/crypto/CryptTools.hxx b/include/oox/crypto/CryptTools.hxx index 5bd7119c548c..0ff8f1c28bed 100644 --- a/include/oox/crypto/CryptTools.hxx +++ b/include/oox/crypto/CryptTools.hxx @@ -49,6 +49,7 @@ enum class CryptoHashType { SHA1, SHA256, +SHA384, SHA512 }; diff --git a/oox/qa/unit/CryptoTest.cxx b/oox/qa/unit/CryptoTest.cxx index 47d567fab34b..38aad4dff4b8 100
Re: tdf#156333: Implementing Text Effects
On 30/08/2023 20:24, Tomaž Vajngerl wrote: Hi, On Tue, Aug 29, 2023 at 12:30 PM Амин Иргалиев wrote: It is possible that the model we need is in sw/source/core/inc/swfont.hxx. Yes, looks like the correct place (not exactly sure), but that would add it only for Writer (which is fine for now). I would trace how the "Relief" parameter (or "Shadow") is used and manipulated as that's kind-of a text effect that's already implemented. Best to go down from OOXML import and look how the font attributes are set... adding it to the model needs a new SfxPoolItem subclass, and a new WhichId in sw/inc/hintids.hxx, to be inserted before RES_CHRATR_END. the item is used in SwTextNode item set, in SwFormatColl item set, and in the SwFormatAutoFormat item set (which is used with RES_TXTATR_AUTOFMT for formatted text portions inside a paragraph). the SwFont is then used during the text formatting, there is an array somewhere ... in SwAttrHandler that will need an extra entry for the new item.
[Libreoffice-commits] core.git: cui/source
cui/source/options/treeopt.cxx | 13 + 1 file changed, 1 insertion(+), 12 deletions(-) New commits: commit 379d6042cd379df4988f891d068996ba8035f9da Author: Caolán McNamara AuthorDate: Thu Aug 31 08:57:50 2023 +0100 Commit: Caolán McNamara CommitDate: Thu Aug 31 11:28:25 2023 +0200 cid#1542448 make_iterator always succeeds so (!xEntry) here doesn't happen Change-Id: I9d4d63a14220ba69bf57f1a58a6d36e270252e8e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156325 Tested-by: Jenkins Reviewed-by: Caolán McNamara diff --git a/cui/source/options/treeopt.cxx b/cui/source/options/treeopt.cxx index 4af68df0171a..d514b7deeb7f 100644 --- a/cui/source/options/treeopt.cxx +++ b/cui/source/options/treeopt.cxx @@ -820,7 +820,6 @@ IMPL_LINK_NOARG(OfaTreeOptionsDialog, ImplUpdateDataHdl, Timer*, void) void OfaTreeOptionsDialog::selectFirstEntry() { -std::unique_ptr xEntry; std::unique_ptr xTemp = xTreeLB->make_iterator(); bool bTemp = xTreeLB->get_iter_first(*xTemp); @@ -829,17 +828,7 @@ void OfaTreeOptionsDialog::selectFirstEntry() // select only the first child if (xTreeLB->get_iter_depth(*xTemp) && xTreeLB->get_id(*xTemp).toInt64()) { -xEntry = xTreeLB->make_iterator(xTemp.get()); - -if (!xEntry) -{ -xEntry = xTreeLB->make_iterator(); -if (!xTreeLB->get_iter_first(*xEntry) || !xTreeLB->iter_next(*xEntry)) -xEntry.reset(); -} - -if (!xEntry) -return; +std::unique_ptr xEntry(xTreeLB->make_iterator(xTemp.get())); std::unique_ptr xParent(xTreeLB->make_iterator(xEntry.get())); xTreeLB->iter_parent(*xParent);
[Libreoffice-commits] core.git: sc/qa
sc/qa/uitest/inputLine/tdf67346.py | 13 +++-- 1 file changed, 7 insertions(+), 6 deletions(-) New commits: commit 2279fce1292fb5d699dda51e3bd19efdff8fb077 Author: Noel Grandin AuthorDate: Thu Aug 31 09:45:29 2023 +0200 Commit: Noel Grandin CommitDate: Thu Aug 31 10:54:11 2023 +0200 disable failing inputline UITest this test fails here on jenkins about 30% of the time Change-Id: Ie82f4f2621b7d05b7a74bba1b0b5c96b98314b46 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156324 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/sc/qa/uitest/inputLine/tdf67346.py b/sc/qa/uitest/inputLine/tdf67346.py index cc9dc14d628c..27764af5c377 100644 --- a/sc/qa/uitest/inputLine/tdf67346.py +++ b/sc/qa/uitest/inputLine/tdf67346.py @@ -39,12 +39,13 @@ class tdf67346(UITestCase): self.xUITest.executeCommand(".uno:Paste") self.assertEqual(get_cell_by_position(document, 0, 0, 0).getString(), "Apple") self.assertEqual(get_cell_by_position(document, 0, 0, 1).getString(), "Apple") -self.assertEqual(get_state_as_dict(xInputWin)["Text"], "Apple") - -self.xUITest.executeCommand(".uno:Undo") -self.assertEqual(get_cell_by_position(document, 0, 0, 0).getString(), "Apple") -self.assertEqual(get_cell_by_position(document, 0, 0, 1).getString(), "") -self.assertEqual(get_state_as_dict(xInputWin)["Text"], "") +# this test keeps failing here on jenkins +#self.assertEqual(get_state_as_dict(xInputWin)["Text"], "Apple") +# +#self.xUITest.executeCommand(".uno:Undo") +#self.assertEqual(get_cell_by_position(document, 0, 0, 0).getString(), "Apple") +#self.assertEqual(get_cell_by_position(document, 0, 0, 1).getString(), "") +#self.assertEqual(get_state_as_dict(xInputWin)["Text"], "") # vim: set shiftwidth=4 softtabstop=4 expandtab:
[Libreoffice-commits] core.git: sw/source
sw/source/core/access/acctable.cxx | 25 - sw/source/core/access/acctable.hxx |4 ++-- 2 files changed, 10 insertions(+), 19 deletions(-) New commits: commit c21ed0c9136c0a26b6e7258492c635e988bb87a5 Author: Noel Grandin AuthorDate: Wed Aug 30 15:37:51 2023 +0200 Commit: Noel Grandin CommitDate: Thu Aug 31 10:41:43 2023 +0200 use concrete type for SwAccessibleTable::Cells_t avoid some unnecessary casting Change-Id: If9998f5ffd3c4b71f81f10e8f274671bb72da017 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156317 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/sw/source/core/access/acctable.cxx b/sw/source/core/access/acctable.cxx index 0e3101c71cef..3c8beaf9a0a4 100644 --- a/sw/source/core/access/acctable.cxx +++ b/sw/source/core/access/acctable.cxx @@ -1501,31 +1501,23 @@ void SwAccessibleTable::FireSelectionEvent( ) aEvent.EventId = AccessibleEventId::SELECTION_CHANGED_REMOVE; -for (const auto& rCell : m_vecCellRemove) +for (const unotools::WeakReference& rxCell : m_vecCellRemove) { // fdo#57197: check if the object is still alive -uno::Reference const xAcc(rCell.second); -if (xAcc.is()) -{ -SwAccessibleContext *const pAccCell(rCell.first); -assert(pAccCell); +rtl::Reference const pAccCell(rxCell); +if (pAccCell) pAccCell->FireAccessibleEvent(aEvent); -} } if (m_vecCellAdd.size() <= SELECTION_WITH_NUM) { aEvent.EventId = AccessibleEventId::SELECTION_CHANGED_ADD; -for (const auto& rCell : m_vecCellAdd) +for (const unotools::WeakReference& rxCell : m_vecCellAdd) { // fdo#57197: check if the object is still alive -uno::Reference const xAcc(rCell.second); -if (xAcc.is()) -{ -SwAccessibleContext *const pAccCell(rCell.first); -assert(pAccCell); +rtl::Reference const pAccCell(rxCell); +if (pAccCell) pAccCell->FireAccessibleEvent(aEvent); -} } return ; } @@ -1539,14 +1531,13 @@ void SwAccessibleTable::FireSelectionEvent( ) void SwAccessibleTable::AddSelectionCell( SwAccessibleContext *const pAccCell, bool const bAddOrRemove) { -uno::Reference const xTmp(pAccCell); if (bAddOrRemove) { -m_vecCellAdd.emplace_back(pAccCell, xTmp); +m_vecCellAdd.emplace_back(pAccCell); } else { -m_vecCellRemove.emplace_back(pAccCell, xTmp); +m_vecCellRemove.emplace_back(pAccCell); } } diff --git a/sw/source/core/access/acctable.hxx b/sw/source/core/access/acctable.hxx index 5187caed411e..9996ffa33b0d 100644 --- a/sw/source/core/access/acctable.hxx +++ b/sw/source/core/access/acctable.hxx @@ -25,6 +25,7 @@ #include #include +#include #include "acccontext.hxx" @@ -46,8 +47,7 @@ class SwAccessibleTable : { std::unique_ptr mpTableData;// the table's data, protected by SolarMutex OUString m_sDesc; -typedef std::vector< std::pair > > Cells_t; +typedef std::vector< unotools::WeakReference > Cells_t; Cells_t m_vecCellAdd; Cells_t m_vecCellRemove;
[Libreoffice-commits] core.git: 2 commits - accessibility/inc accessibility/source
accessibility/inc/extended/accessibletabbarpagelist.hxx |9 accessibility/inc/standard/accessiblemenubasecomponent.hxx|5 accessibility/source/extended/accessibletabbarpagelist.cxx| 65 ++-- accessibility/source/standard/accessiblemenubasecomponent.cxx | 140 +++--- 4 files changed, 85 insertions(+), 134 deletions(-) New commits: commit 89b6d1cd2ed3ea4633a8f4e90daf99001decef3e Author: Noel Grandin AuthorDate: Wed Aug 30 15:28:46 2023 +0200 Commit: Noel Grandin CommitDate: Thu Aug 31 10:34:20 2023 +0200 use concrete type for AccessibleTabBarPageList::m_aAccessibleChildren avoid some unnecessary casting Change-Id: Ib8bddff9fe91afd192584fa1ad2728d0701f425a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156316 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/accessibility/inc/extended/accessibletabbarpagelist.hxx b/accessibility/inc/extended/accessibletabbarpagelist.hxx index 858a475d7669..d3f3d56f317d 100644 --- a/accessibility/inc/extended/accessibletabbarpagelist.hxx +++ b/accessibility/inc/extended/accessibletabbarpagelist.hxx @@ -27,11 +27,9 @@ #include - namespace accessibility { - - +class AccessibleTabBarPage; class AccessibleTabBarPageList final : public cppu::ImplInheritanceHelper< @@ -41,7 +39,7 @@ namespace accessibility css::lang::XServiceInfo> { private: -typedef std::vector< css::uno::Reference< css::accessibility::XAccessible > > AccessibleChildren; +typedef std::vector< rtl::Reference< AccessibleTabBarPage > > AccessibleChildren; AccessibleChildren m_aAccessibleChildren; sal_Int32 m_nIndexInParent; @@ -105,6 +103,9 @@ namespace accessibility virtual sal_Int64 SAL_CALL getSelectedAccessibleChildCount( ) override; virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getSelectedAccessibleChild( sal_Int64 nSelectedChildIndex ) override; virtual void SAL_CALL deselectAccessibleChild( sal_Int64 nChildIndex ) override; + +private: +rtl::Reference< AccessibleTabBarPage > getAccessibleChildImpl( sal_Int64 i ); }; diff --git a/accessibility/source/extended/accessibletabbarpagelist.cxx b/accessibility/source/extended/accessibletabbarpagelist.cxx index 3eb8ab324c37..5faaed6846e2 100644 --- a/accessibility/source/extended/accessibletabbarpagelist.cxx +++ b/accessibility/source/extended/accessibletabbarpagelist.cxx @@ -52,20 +52,16 @@ namespace accessibility ,m_nIndexInParent( nIndexInParent ) { if ( m_pTabBar ) -m_aAccessibleChildren.assign( m_pTabBar->GetPageCount(), Reference< XAccessible >() ); +m_aAccessibleChildren.assign( m_pTabBar->GetPageCount(), rtl::Reference< AccessibleTabBarPage >() ); } void AccessibleTabBarPageList::UpdateShowing( bool bShowing ) { -for (const Reference& xChild : m_aAccessibleChildren) +for (const rtl::Reference& xChild : m_aAccessibleChildren) { if ( xChild.is() ) -{ -AccessibleTabBarPage* pAccessibleTabBarPage = static_cast< AccessibleTabBarPage* >( xChild.get() ); -if ( pAccessibleTabBarPage ) -pAccessibleTabBarPage->SetShowing( bShowing ); -} +xChild->SetShowing( bShowing ); } } @@ -76,13 +72,9 @@ namespace accessibility if ( i >= 0 && o3tl::make_unsigned(i) < m_aAccessibleChildren.size() ) { -Reference< XAccessible > xChild( m_aAccessibleChildren[i] ); +rtl::Reference< AccessibleTabBarPage > xChild( m_aAccessibleChildren[i] ); if ( xChild.is() ) -{ -AccessibleTabBarPage* pAccessibleTabBarPage = static_cast< AccessibleTabBarPage* >( xChild.get() ); -if ( pAccessibleTabBarPage ) -pAccessibleTabBarPage->SetSelected( bSelected ); -} +xChild->SetSelected( bSelected ); } } @@ -92,11 +84,10 @@ namespace accessibility if ( i < 0 || o3tl::make_unsigned(i) >= m_aAccessibleChildren.size() ) return; -Reference< XAccessible > xChild( m_aAccessibleChildren[i] ); -if ( xChild.is() ) +if ( m_pTabBar ) { -AccessibleTabBarPage* pAccessibleTabBarPage = static_cast< AccessibleTabBarPage* >( xChild.get() ); -if ( pAccessibleTabBarPage && m_pTabBar ) +rtl::Reference< AccessibleTabBarPage > pAccessibleTabBarPage( m_aAccessibleChildren[i] ); +if ( pAccessibleTabBarPage.is() ) { OUString sPageText = m_pTabBar->GetPageText( m_pTabBar->GetPageId( static_cast(i) ) ); pAccessibleTabBarPage->SetPageText( sPageText ); @@ -111,7 +102,7 @@ namespace accessibility
[Libreoffice-commits] core.git: accessibility/inc accessibility/source
accessibility/inc/standard/vclxaccessiblestatusbar.hxx|4 accessibility/source/standard/vclxaccessiblestatusbar.cxx | 62 +- 2 files changed, 25 insertions(+), 41 deletions(-) New commits: commit 5dbc129d49937f643f66eeeb23cbd8952597db15 Author: Noel Grandin AuthorDate: Wed Aug 30 15:01:16 2023 +0200 Commit: Noel Grandin CommitDate: Thu Aug 31 10:33:53 2023 +0200 use concrete type for VCLXAccessibleStatusBar::m_aAccessibleChildren avoid some unnecessary casting Change-Id: Id9e52b0b6dd8dc2cedc8b9cf80c17f1cf4afe502 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156314 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/accessibility/inc/standard/vclxaccessiblestatusbar.hxx b/accessibility/inc/standard/vclxaccessiblestatusbar.hxx index 16bff48e3856..17f77af4fbb6 100644 --- a/accessibility/inc/standard/vclxaccessiblestatusbar.hxx +++ b/accessibility/inc/standard/vclxaccessiblestatusbar.hxx @@ -26,12 +26,12 @@ #include - +class VCLXAccessibleStatusBarItem; class VCLXAccessibleStatusBar final : public VCLXAccessibleComponent { private: -typedef std::vector< css::uno::Reference< css::accessibility::XAccessible > > AccessibleChildren; +typedef std::vector< rtl::Reference< VCLXAccessibleStatusBarItem > > AccessibleChildren; AccessibleChildren m_aAccessibleChildren; VclPtr m_pStatusBar; diff --git a/accessibility/source/standard/vclxaccessiblestatusbar.cxx b/accessibility/source/standard/vclxaccessiblestatusbar.cxx index 52d32eb7cc55..5726193715e8 100644 --- a/accessibility/source/standard/vclxaccessiblestatusbar.cxx +++ b/accessibility/source/standard/vclxaccessiblestatusbar.cxx @@ -43,7 +43,7 @@ VCLXAccessibleStatusBar::VCLXAccessibleStatusBar( VCLXWindow* pVCLXWindow ) m_pStatusBar = GetAs(); if ( m_pStatusBar ) -m_aAccessibleChildren.assign( m_pStatusBar->GetItemCount(), Reference< XAccessible >() ); +m_aAccessibleChildren.assign( m_pStatusBar->GetItemCount(), rtl::Reference< VCLXAccessibleStatusBarItem >() ); } @@ -51,13 +51,9 @@ void VCLXAccessibleStatusBar::UpdateShowing( sal_Int32 i, bool bShowing ) { if ( i >= 0 && o3tl::make_unsigned(i) < m_aAccessibleChildren.size() ) { -Reference< XAccessible > xChild( m_aAccessibleChildren[i] ); -if ( xChild.is() ) -{ -VCLXAccessibleStatusBarItem* pVCLXAccessibleStatusBarItem = static_cast< VCLXAccessibleStatusBarItem* >( xChild.get() ); -if ( pVCLXAccessibleStatusBarItem ) -pVCLXAccessibleStatusBarItem->SetShowing( bShowing ); -} +rtl::Reference< VCLXAccessibleStatusBarItem > pVCLXAccessibleStatusBarItem( m_aAccessibleChildren[i] ); +if ( pVCLXAccessibleStatusBarItem ) +pVCLXAccessibleStatusBarItem->SetShowing( bShowing ); } } @@ -67,15 +63,11 @@ void VCLXAccessibleStatusBar::UpdateItemName( sal_Int32 i ) if ( i < 0 || o3tl::make_unsigned(i) >= m_aAccessibleChildren.size() ) return; -Reference< XAccessible > xChild( m_aAccessibleChildren[i] ); -if ( xChild.is() ) +rtl::Reference< VCLXAccessibleStatusBarItem > pVCLXAccessibleStatusBarItem( m_aAccessibleChildren[i] ); +if ( pVCLXAccessibleStatusBarItem.is() ) { -VCLXAccessibleStatusBarItem* pVCLXAccessibleStatusBarItem = static_cast< VCLXAccessibleStatusBarItem* >( xChild.get() ); -if ( pVCLXAccessibleStatusBarItem ) -{ -OUString sItemName = pVCLXAccessibleStatusBarItem->GetItemName(); -pVCLXAccessibleStatusBarItem->SetItemName( sItemName ); -} +OUString sItemName = pVCLXAccessibleStatusBarItem->GetItemName(); +pVCLXAccessibleStatusBarItem->SetItemName( sItemName ); } } @@ -85,15 +77,11 @@ void VCLXAccessibleStatusBar::UpdateItemText( sal_Int32 i ) if ( i < 0 || o3tl::make_unsigned(i) >= m_aAccessibleChildren.size() ) return; -Reference< XAccessible > xChild( m_aAccessibleChildren[i] ); -if ( xChild.is() ) +rtl::Reference< VCLXAccessibleStatusBarItem > pVCLXAccessibleStatusBarItem( m_aAccessibleChildren[i] ); +if ( pVCLXAccessibleStatusBarItem.is() ) { -VCLXAccessibleStatusBarItem* pVCLXAccessibleStatusBarItem = static_cast< VCLXAccessibleStatusBarItem* >( xChild.get() ); -if ( pVCLXAccessibleStatusBarItem ) -{ -OUString sItemText = pVCLXAccessibleStatusBarItem->GetItemText(); -pVCLXAccessibleStatusBarItem->SetItemText( sItemText ); -} +OUString sItemText = pVCLXAccessibleStatusBarItem->GetItemText(); +pVCLXAccessibleStatusBarItem->SetItemText( sItemText ); } } @@ -104,7 +92,7 @@ void VCLXAccessibleStatusBar::InsertChild( sal_Int32 i ) return; // insert entry in child list -m_aAccessibleChildren.insert( m_aAccessibleChildren.begin() + i, Reference< XAccessible >() ); +m_aAccessible
[Libreoffice-commits] core.git: Branch 'distro/collabora/co-23.05' - svtools/source svx/source vcl/jsdialog
svtools/source/control/ctrlbox.cxx |2 +- svx/source/tbxctrls/tbcontrl.cxx |3 ++- vcl/jsdialog/enabled.cxx |5 - 3 files changed, 7 insertions(+), 3 deletions(-) New commits: commit 9a483a7cc1006274bced96edbeb51ab326e8763e Author: Szymon Kłos AuthorDate: Tue Aug 8 06:48:10 2023 +0200 Commit: Szymon Kłos CommitDate: Thu Aug 31 10:16:42 2023 +0200 jsdialog: enable font name & size combobox This enables font selector with font rendering in Online Change-Id: I2b57c0831e84a957374c2b1733f6526ca80ac7bd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156242 Tested-by: Jenkins CollaboraOffice Reviewed-by: Szymon Kłos diff --git a/svtools/source/control/ctrlbox.cxx b/svtools/source/control/ctrlbox.cxx index e5ba7b2b0662..221b2dc66e54 100644 --- a/svtools/source/control/ctrlbox.cxx +++ b/svtools/source/control/ctrlbox.cxx @@ -532,7 +532,7 @@ static bool IsRunningUnitTest() { return getenv("LO_TESTNAME") != nullptr; } void FontNameBox::EnableWYSIWYG(bool bEnable) { -if (comphelper::LibreOfficeKit::isActive() || IsRunningUnitTest()) +if (IsRunningUnitTest()) return; if (mbWYSIWYG == bEnable) return; diff --git a/svx/source/tbxctrls/tbcontrl.cxx b/svx/source/tbxctrls/tbcontrl.cxx index 2eda9b2be745..835598d23c0e 100644 --- a/svx/source/tbxctrls/tbcontrl.cxx +++ b/svx/source/tbxctrls/tbcontrl.cxx @@ -42,6 +42,7 @@ #include #include #include +#include #include #include #include @@ -1743,7 +1744,7 @@ SvxFontNameBox_Base::SvxFontNameBox_Base(std::unique_ptr xWidget SvxFontNameBox_Impl::SvxFontNameBox_Impl(vcl::Window* pParent, const Reference& rDispatchProvider, const Reference& rFrame, SvxFontNameToolBoxControl& rCtrl) -: InterimItemWindow(pParent, "svx/ui/fontnamebox.ui", "FontNameBox") +: InterimItemWindow(pParent, "svx/ui/fontnamebox.ui", "FontNameBox", true, reinterpret_cast(SfxViewShell::Current())) , SvxFontNameBox_Base(m_xBuilder->weld_combo_box("fontnamecombobox"), rDispatchProvider, rFrame, rCtrl) { set_id("fontnamecombobox"); diff --git a/vcl/jsdialog/enabled.cxx b/vcl/jsdialog/enabled.cxx index 4db6b0da9113..50e90455c2e6 100644 --- a/vcl/jsdialog/enabled.cxx +++ b/vcl/jsdialog/enabled.cxx @@ -372,7 +372,10 @@ bool isBuilderEnabledForSidebar(std::u16string_view rUIFile) bool isInterimBuilderEnabledForNotebookbar(std::u16string_view rUIFile) { -if (rUIFile == u"modules/scalc/ui/numberbox.ui" || rUIFile == u"svx/ui/stylespreview.ui") +if (rUIFile == u"modules/scalc/ui/numberbox.ui" +|| rUIFile == u"svx/ui/fontnamebox.ui" +|| rUIFile == u"svx/ui/fontsizebox.ui" +|| rUIFile == u"svx/ui/stylespreview.ui") { return true; }
[Libreoffice-commits] core.git: 2 commits - include/svtools include/vcl svtools/source svx/source vcl/inc vcl/jsdialog vcl/source
include/svtools/ctrlbox.hxx |3 ++- include/vcl/weldutils.hxx|3 ++- include/vcl/window.hxx |4 ++-- svtools/source/control/ctrlbox.cxx | 29 - svx/source/tbxctrls/tbcontrl.cxx |2 ++ vcl/inc/jsdialog/jsdialogbuilder.hxx |2 +- vcl/jsdialog/executor.cxx| 11 ++- vcl/jsdialog/jsdialogbuilder.cxx |5 - vcl/source/app/weldutils.cxx |4 ++-- vcl/source/window/window.cxx | 14 +- 10 files changed, 58 insertions(+), 19 deletions(-) New commits: commit 038bce9b92d8b8f64d1f3797c02d3cde3a9471c2 Author: Szymon Kłos AuthorDate: Fri Aug 25 16:00:21 2023 +0200 Commit: Szymon Kłos CommitDate: Thu Aug 31 10:15:50 2023 +0200 jsdialog: combobox rendering with DPI set Change-Id: I0efb8f765cc95e0eee02fb5905bc392fc754f3ad Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156114 Tested-by: Jenkins CollaboraOffice Reviewed-by: Caolán McNamara Reviewed-by: Szymon Kłos Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156250 Tested-by: Jenkins diff --git a/vcl/inc/jsdialog/jsdialogbuilder.hxx b/vcl/inc/jsdialog/jsdialogbuilder.hxx index dc6e04c3eb4e..f632753d35b1 100644 --- a/vcl/inc/jsdialog/jsdialogbuilder.hxx +++ b/vcl/inc/jsdialog/jsdialogbuilder.hxx @@ -621,7 +621,7 @@ public: virtual void set_active(int pos) override; virtual bool changed_by_direct_pick() const override; -void render_entry(int pos); +void render_entry(int pos, int dpix, int dpiy); }; class JSNotebook final : public JSWidget diff --git a/vcl/jsdialog/executor.cxx b/vcl/jsdialog/executor.cxx index 57a1c4db22d8..17c56d78e61e 100644 --- a/vcl/jsdialog/executor.cxx +++ b/vcl/jsdialog/executor.cxx @@ -133,7 +133,16 @@ bool ExecuteAction(const OUString& nWindowId, const OUString& rWidget, StringMap { auto pJSCombobox = dynamic_cast(pWidget); if (pJSCombobox) - pJSCombobox->render_entry(o3tl::toInt32(rData["data"])); +{ +// pos;dpix;dpiy +const OUString& sParams = rData["data"]; +const OUString aPos = sParams.getToken(0, ';'); +const OUString aDpiScaleX = sParams.getToken(1, ';'); +const OUString aDpiScaleY = sParams.getToken(2, ';'); + +pJSCombobox->render_entry(o3tl::toInt32(aPos), o3tl::toInt32(aDpiScaleX), + o3tl::toInt32(aDpiScaleY)); +} return true; } } diff --git a/vcl/jsdialog/jsdialogbuilder.cxx b/vcl/jsdialog/jsdialogbuilder.cxx index 8f7949c474ca..cd191d15a9d8 100644 --- a/vcl/jsdialog/jsdialogbuilder.cxx +++ b/vcl/jsdialog/jsdialogbuilder.cxx @@ -1664,9 +1664,12 @@ void JSComboBox::set_active(int pos) bool JSComboBox::changed_by_direct_pick() const { return true; } -void JSComboBox::render_entry(int pos) +void JSComboBox::render_entry(int pos, int dpix, int dpiy) { ScopedVclPtrInstance pDevice(DeviceFormat::WITH_ALPHA); +pDevice->SetDPIX(96.0 * dpix / 100); +pDevice->SetDPIY(96.0 * dpiy / 100); + Size aRenderSize = signal_custom_get_size(*pDevice); pDevice->SetOutputSize(aRenderSize); commit 3fad74eb9def27788faddd74f5285120e0aefdd9 Author: Szymon Kłos AuthorDate: Fri Aug 25 18:01:32 2023 +0200 Commit: Szymon Kłos CommitDate: Thu Aug 31 10:15:45 2023 +0200 jsdialog: render font previews with hidpi we pass dpi scale, let's use it to determine combobox entry size Change-Id: I4088eca565b301c5693e52b1c05af1a335fc34fa Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156115 Tested-by: Jenkins CollaboraOffice Reviewed-by: Caolán McNamara Reviewed-by: Szymon Kłos Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156251 Tested-by: Jenkins diff --git a/include/svtools/ctrlbox.hxx b/include/svtools/ctrlbox.hxx index 0d7293fc77eb..39863b171b0e 100644 --- a/include/svtools/ctrlbox.hxx +++ b/include/svtools/ctrlbox.hxx @@ -340,7 +340,8 @@ private: voidLoadMRUEntries( const OUString& aFontMRUEntriesFile ); voidSaveMRUEntries( const OUString& aFontMRUEntriesFile ) const; -OutputDevice& CachePreview(size_t nIndex, Point* pTopLeft); +OutputDevice& CachePreview(size_t nIndex, Point* pTopLeft, + sal_Int32 nDPIX = 96, sal_Int32 nDPIY = 96); public: FontNameBox(std::unique_ptr p); diff --git a/include/vcl/weldutils.hxx b/include/vcl/weldutils.hxx index 8a4c128515a0..1987066badf8 100644 --- a/include/vcl/weldutils.hxx +++ b/include/vcl/weldutils.hxx @@ -464,7 +464,8 @@ VCL_DLLPUBLIC int GetMinimumEditHeight(); VCL_DLLPUBLIC weld::Window* GetPopupParent(vcl::Window& rOutWin, tools::Rectangl
New Defects reported by Coverity Scan for LibreOffice
Hi, Please find the latest report on new defect(s) introduced to LibreOffice found with Coverity Scan. 3 new defect(s) introduced to LibreOffice found with Coverity Scan. 1 defect(s), reported by Coverity Scan earlier, were marked fixed in the recent build analyzed by Coverity Scan. New defect(s) Reported-by: Coverity Scan Showing 3 of 3 defect(s) ** CID 1542448: Null pointer dereferences (REVERSE_INULL) /cui/source/options/treeopt.cxx: 841 in OfaTreeOptionsDialog::selectFirstEntry()() *** CID 1542448: Null pointer dereferences (REVERSE_INULL) /cui/source/options/treeopt.cxx: 841 in OfaTreeOptionsDialog::selectFirstEntry()() 835 { 836 xEntry = xTreeLB->make_iterator(); 837 if (!xTreeLB->get_iter_first(*xEntry) || !xTreeLB->iter_next(*xEntry)) 838 xEntry.reset(); 839 } 840 >>> CID 1542448: Null pointer dereferences (REVERSE_INULL) >>> Null-checking "xEntry" suggests that it may be null, but it has already >>> been dereferenced on all paths leading to the check. 841 if (!xEntry) 842 return; 843 844 std::unique_ptr xParent(xTreeLB->make_iterator(xEntry.get())); 845 xTreeLB->iter_parent(*xParent); 846 xTreeLB->expand_row(*xParent); ** CID 1542447: Null pointer dereferences (FORWARD_NULL) *** CID 1542447: Null pointer dereferences (FORWARD_NULL) /sc/source/ui/theme/ThemeColorChanger.cxx: 220 in scchangeSheets(ScDocShell &, ScTabViewShell *, ScDrawLayer *, const std::shared_ptr &)() 214 pView = pViewShell->GetScDrawView(); 215 216 SdrPage* pPage = pModel->GetPage(static_cast(nTab)); 217 SdrObjListIter aIter(pPage, SdrIterMode::DeepNoGroups); 218 for (SdrObject* pObject = aIter.Next(); pObject; pObject = aIter.Next()) 219 { >>> CID 1542447: Null pointer dereferences (FORWARD_NULL) >>> Passing null pointer "pView" to "updateSdrObject", which dereferences >>> it. 220 svx::theme::updateSdrObject(*pColorSet, pObject, pView, rDocShell.GetUndoManager()); 221 } 222 223 std::unique_ptr pUndo = pModel->GetCalcUndo(); 224 225 if (pUndo) ** CID 1542446: Uninitialized variables (UNINIT) *** CID 1542446: Uninitialized variables (UNINIT) /sc/source/ui/theme/ThemeColorChanger.cxx: 206 in scchangeSheets(ScDocShell &, ScTabViewShell *, ScDrawLayer *, const std::shared_ptr &)() 200 ScEditDataArray* pDataArray = pUndo->GetDataArray(); 201 202 rDocument.ApplySelectionPattern(aNewPattern, aMark, pDataArray); 203 204 rDocShell.GetUndoManager()->AddUndoAction(std::move(pUndo)); 205 } >>> CID 1542446: Uninitialized variables (UNINIT) >>> Using uninitialized value "aNewPattern.pName._M_payload._M_payload" >>> when calling "~ScPatternAttr". 206 } 207 } 208 209 // Change all SdrObjects 210 { 211 pModel->BeginCalcUndo(true); To view the defects in Coverity Scan visit, https://u15810271.ct.sendgrid.net/ls/click?upn=HRESupC-2F2Czv4BOaCWWCy7my0P0qcxCbhZ31OYv50ypSs1kiFPuCn2xFdlMIFBirii0zZ9j2-2F9F2XPBcBm2BNgi9duPy3v-2FzgFDd2LJ-2BDKI-3DacUJ_OTq2XUZbbipYjyLSo6GRo-2FpVxQ9OzkDINu9UTS-2FQhSdO0F0jQniitrGlNxDIzPJiRlmMPRrg5ltzIRs9dFvttPn1qIlOHBgq3lwvmLvdMiakh1ZnzQwId1VcG2xuTBe1m3U6ViOGvz-2Ff-2BuZsVy83vqDBd5iLHYuKvm9dGZpQyBu1pUcrwxU9IFTjxANiZBsUfY-2FpEhwqQ0LeTlgwyxzqlmJE5B1ql-2FdGV-2FpJFKGnzlI-3D
[Libreoffice-commits] core.git: Branch 'libreoffice-7-6' - comphelper/source include/comphelper include/oox oox/qa oox/source
comphelper/source/misc/docpasswordhelper.cxx |2 comphelper/source/misc/hash.cxx |6 ++ include/comphelper/hash.hxx |2 include/oox/crypto/AgileEngine.hxx |1 include/oox/crypto/CryptTools.hxx|1 oox/qa/unit/CryptoTest.cxx | 62 +++ oox/source/crypto/AgileEngine.cxx| 31 + oox/source/crypto/CryptTools.cxx |6 ++ 8 files changed, 110 insertions(+), 1 deletion(-) New commits: commit 3159296b3b033f2355a96b024c6834ad51321b75 Author: Balazs Varga AuthorDate: Tue Aug 22 22:10:20 2023 +0200 Commit: Samuel Mehrbrodt CommitDate: Thu Aug 31 09:18:35 2023 +0200 tdf#156835 - FILEOPEN XLSX: add SHA-384 encryption support for ooxml import Password protected file with SHA-384 encryption does not open before this patch. Change-Id: I482233f788b8e9da210ad6d2a6c4ece18d05d248 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156282 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt (cherry picked from commit 9254fbce6b9e20a75aa2a379bcf2fc9dc41a5b44) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156225 diff --git a/comphelper/source/misc/docpasswordhelper.cxx b/comphelper/source/misc/docpasswordhelper.cxx index 5489690fae6a..0adb6eff9a4a 100644 --- a/comphelper/source/misc/docpasswordhelper.cxx +++ b/comphelper/source/misc/docpasswordhelper.cxx @@ -373,6 +373,8 @@ std::vector DocPasswordHelper::GetOoxHashAsVector( eType = comphelper::HashType::SHA512; else if (rAlgorithmName == u"SHA-256" || rAlgorithmName == u"SHA256") eType = comphelper::HashType::SHA256; +else if (rAlgorithmName == u"SHA-384" || rAlgorithmName == u"SHA384") +eType = comphelper::HashType::SHA384; else if (rAlgorithmName == u"SHA-1" || rAlgorithmName == u"SHA1") // "SHA1" might be in the wild eType = comphelper::HashType::SHA1; else if (rAlgorithmName == u"MD5") diff --git a/comphelper/source/misc/hash.cxx b/comphelper/source/misc/hash.cxx index d537b9eeff72..25b93ad87e54 100644 --- a/comphelper/source/misc/hash.cxx +++ b/comphelper/source/misc/hash.cxx @@ -43,6 +43,8 @@ struct HashImpl return HASH_AlgSHA1; case HashType::SHA256: return HASH_AlgSHA256; +case HashType::SHA384: +return HASH_AlgSHA384; case HashType::SHA512: return HASH_AlgSHA512; } @@ -62,6 +64,8 @@ struct HashImpl return EVP_sha1(); case HashType::SHA256: return EVP_sha256(); +case HashType::SHA384: +return EVP_sha384(); case HashType::SHA512: return EVP_sha512(); } @@ -151,6 +155,8 @@ size_t Hash::getLength() const return SHA1_HASH_LENGTH; case HashType::SHA256: return SHA256_HASH_LENGTH; +case HashType::SHA384: +return SHA384_HASH_LENGTH; case HashType::SHA512: return SHA512_HASH_LENGTH; } diff --git a/include/comphelper/hash.hxx b/include/comphelper/hash.hxx index 54ab3a25105c..a3ad468d3eb5 100644 --- a/include/comphelper/hash.hxx +++ b/include/comphelper/hash.hxx @@ -27,12 +27,14 @@ enum class HashType MD5, SHA1, SHA256, +SHA384, SHA512 }; const sal_uInt32 MD5_HASH_LENGTH = RTL_DIGEST_LENGTH_MD5; const sal_uInt32 SHA1_HASH_LENGTH = RTL_DIGEST_LENGTH_SHA1; const sal_uInt32 SHA256_HASH_LENGTH = 32; +const sal_uInt32 SHA384_HASH_LENGTH = 48; const sal_uInt32 SHA512_HASH_LENGTH = 64; struct HashImpl; diff --git a/include/oox/crypto/AgileEngine.hxx b/include/oox/crypto/AgileEngine.hxx index ece492871163..07ce3cb5eeb1 100644 --- a/include/oox/crypto/AgileEngine.hxx +++ b/include/oox/crypto/AgileEngine.hxx @@ -70,6 +70,7 @@ struct OOX_DLLPUBLIC AgileEncryptionParameters enum class AgileEncryptionPreset { AES_128_SHA1, +AES_128_SHA384, AES_256_SHA512, }; diff --git a/include/oox/crypto/CryptTools.hxx b/include/oox/crypto/CryptTools.hxx index c8c1420079bd..10382b979380 100644 --- a/include/oox/crypto/CryptTools.hxx +++ b/include/oox/crypto/CryptTools.hxx @@ -48,6 +48,7 @@ enum class CryptoHashType { SHA1, SHA256, +SHA384, SHA512 }; diff --git a/oox/qa/unit/CryptoTest.cxx b/oox/qa/unit/CryptoTest.cxx index cbdf99b65216..290fce38eb4b 100644 --- a/oox/qa/unit/CryptoTest.cxx +++ b/oox/qa/unit/CryptoTest.cxx @@ -95,6 +95,15 @@ void CryptoTest::testCryptoHash() toString(aHash)); } +{ +oox::crypto::CryptoHash aCryptoHash(aKey, oox::crypto::CryptoHashType::SHA384); +aCryptoHash.update(aContent); +std::vector aHash = aCryptoHash.finalize(); + CPPUNIT_ASSERT_EQUAL(std::string("d7f4727e2c0b39ae0f1e40cc96f60242d5b7801841cea6fc592c5d3e1" + "ae50700582a