sc/source/core/tool/detfunc.cxx | 5 +++++ 1 file changed, 5 insertions(+)
New commits: commit 0ed12710d743e12501292d688caf6e4a72f16376 Author: Maxim Monastirsky <momonas...@gmail.com> AuthorDate: Wed Apr 19 17:19:13 2023 +0300 Commit: Maxim Monastirsky <momonas...@gmail.com> CommitDate: Thu Apr 20 14:11:42 2023 +0200 sc drawstyles: Avoid styles for detective shapes Those are fixed shapes with fixed formatting, and not supposed to be changed by the user (with the exception of their color via Tools > Options... > LibreOffice > AC, but that is a user profile setting, not a document formatting). So we need to undo the setting of the default style, which happens by default for all created shapes. Change-Id: Id48b4e9fb9b84008f154a7277f17ec00156ccc76 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150659 Tested-by: Jenkins Reviewed-by: Maxim Monastirsky <momonas...@gmail.com> diff --git a/sc/source/core/tool/detfunc.cxx b/sc/source/core/tool/detfunc.cxx index 4ec4d4349918..ac2c477b0210 100644 --- a/sc/source/core/tool/detfunc.cxx +++ b/sc/source/core/tool/detfunc.cxx @@ -370,6 +370,7 @@ void ScDetectiveFunc::InsertArrow( SCCOL nCol, SCROW nRow, *pModel, aRect); + pBox->NbcSetStyleSheet(nullptr, true); pBox->SetMergedItemSetAndBroadcast(rData.GetBoxSet()); pBox->SetLayer( SC_LAYER_INTERN ); @@ -413,6 +414,7 @@ void ScDetectiveFunc::InsertArrow( SCCOL nCol, SCROW nRow, *pModel, SdrObjKind::Line, basegfx::B2DPolyPolygon(aTempPoly)); + pArrow->NbcSetStyleSheet(nullptr, true); pArrow->NbcSetLogicRect(tools::Rectangle::Normalize(aStartPos,aEndPos)); //TODO: needed ??? pArrow->SetMergedItemSetAndBroadcast(rAttrSet); @@ -447,6 +449,7 @@ void ScDetectiveFunc::InsertToOtherTab( SCCOL nStartCol, SCROW nStartRow, *pModel, aRect); + pBox->NbcSetStyleSheet(nullptr, true); pBox->SetMergedItemSetAndBroadcast(rData.GetBoxSet()); pBox->SetLayer( SC_LAYER_INTERN ); @@ -482,6 +485,7 @@ void ScDetectiveFunc::InsertToOtherTab( SCCOL nStartCol, SCROW nStartRow, *pModel, SdrObjKind::Line, basegfx::B2DPolyPolygon(aTempPoly)); + pArrow->NbcSetStyleSheet(nullptr, true); pArrow->NbcSetLogicRect(tools::Rectangle::Normalize(aStartPos,aEndPos)); //TODO: needed ??? pArrow->SetMergedItemSetAndBroadcast(rAttrSet); @@ -554,6 +558,7 @@ void ScDetectiveFunc::DrawCircle( SCCOL nCol, SCROW nRow, ScDetectiveData& rData aRect); SfxItemSet& rAttrSet = rData.GetCircleSet(); + pCircle->NbcSetStyleSheet(nullptr, true); pCircle->SetMergedItemSetAndBroadcast(rAttrSet); pCircle->SetLayer( SC_LAYER_INTERN );