drawinglayer/source/processor2d/vclprocessor2d.cxx | 3 - sc/source/ui/condformat/condformateasydlg.cxx | 27 +++++++++++++ svx/source/svdraw/svdetc.cxx | 42 +++++++++++++++++---- sw/source/core/crsr/crsrsh.cxx | 1 4 files changed, 63 insertions(+), 10 deletions(-)
New commits: commit 1c7ca1368a2dd19794dc8896ccaee8230b6583c0 Author: Julien Nabet <serval2...@yahoo.fr> AuthorDate: Sun Oct 27 11:30:35 2024 +0100 Commit: Andras Timar <andras.ti...@collabora.com> CommitDate: Mon Oct 28 17:11:14 2024 +0100 cid#1633859: COPY_PASTE_ERROR Change-Id: I8934e68b169fe94ea6fb6fbf47d2ab09eb314ac6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175615 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com> Reviewed-by: Pranam Lashkari <lpra...@collabora.com> diff --git a/sc/source/ui/condformat/condformateasydlg.cxx b/sc/source/ui/condformat/condformateasydlg.cxx index 8bc37d863810..3adaf9cd8ffe 100644 --- a/sc/source/ui/condformat/condformateasydlg.cxx +++ b/sc/source/ui/condformat/condformateasydlg.cxx @@ -287,7 +287,7 @@ ConditionalFormatEasyDialog::ConditionalFormatEasyDialog(SfxBindings* pBindings, if (mxNumberEntry->get_visible()) mxNumberEntry->set_text(condEntry->GetExpression(aRange.GetTopLeftCorner(), 0)); if (mxNumberEntry2->get_visible()) - mxNumberEntry->set_text(condEntry->GetExpression(aRange.GetTopLeftCorner(), 1)); + mxNumberEntry2->set_text(condEntry->GetExpression(aRange.GetTopLeftCorner(), 1)); } else if (type == ScFormatEntry::Type::Date) { commit 4b62ff743f1396a318045dfe9108eb5f9e08f3a9 Author: Pranam Lashkari <lpra...@collabora.com> AuthorDate: Thu Oct 17 06:23:21 2024 +0400 Commit: Andras Timar <andras.ti...@collabora.com> CommitDate: Mon Oct 28 17:11:14 2024 +0100 sc: prefill easy condition dialog with editing condition data Change-Id: I207bcbf15bedf3dd51980f04899b2c751b64295d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175036 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com> Reviewed-by: Caolán McNamara <caolan.mcnam...@collabora.com> Tested-by: Caolán McNamara <caolan.mcnam...@collabora.com> diff --git a/sc/source/ui/condformat/condformateasydlg.cxx b/sc/source/ui/condformat/condformateasydlg.cxx index 47936bdc64d9..8bc37d863810 100644 --- a/sc/source/ui/condformat/condformateasydlg.cxx +++ b/sc/source/ui/condformat/condformateasydlg.cxx @@ -273,10 +273,35 @@ ConditionalFormatEasyDialog::ConditionalFormatEasyDialog(SfxBindings* pBindings, aRange.Format(sRangeString, ScRefFlags::VALID, *mpDocument, mpDocument->GetAddressConvention()); mxRangeEntry->SetText(sRangeString); + ScConditionalFormat* format = mpViewData->GetDocument().GetCondFormat( + maPosition.Col(), maPosition.Row(), maPosition.Tab()); + OUString sStyleName; + if (format) + { + const ScFormatEntry* entry = format->GetEntry(mnEntryIndex); + ScFormatEntry::Type type = entry->GetType(); + if (type == ScFormatEntry::Type::Condition) + { + const ScCondFormatEntry* condEntry = static_cast<const ScCondFormatEntry*>(entry); + sStyleName = condEntry->GetStyle(); + if (mxNumberEntry->get_visible()) + mxNumberEntry->set_text(condEntry->GetExpression(aRange.GetTopLeftCorner(), 0)); + if (mxNumberEntry2->get_visible()) + mxNumberEntry->set_text(condEntry->GetExpression(aRange.GetTopLeftCorner(), 1)); + } + else if (type == ScFormatEntry::Type::Date) + { + const ScCondDateFormatEntry* dateEntry + = static_cast<const ScCondDateFormatEntry*>(entry); + sStyleName = dateEntry->GetStyleName(); + } + } + StartListening(*mpDocument->GetStyleSheetPool(), DuplicateHandling::Prevent); ScCondFormatHelper::FillStyleListBox(mpDocument, *mxStyles); - mxStyles->set_active(1); + mxStyles->set_active_text(sStyleName); + StyleSelectHdl(*mxStyles); mxWdPreviewWin->show(); } commit 524f06ba0f00b8d02a39b294109e0a7ae73312b4 Author: Caolán McNamara <caolan.mcnam...@collabora.com> AuthorDate: Sat Oct 26 10:55:07 2024 +0100 Commit: Andras Timar <andras.ti...@collabora.com> CommitDate: Mon Oct 28 17:09:39 2024 +0100 cid#1633842 Uninitialized scalar field Change-Id: I59d9164b191c13ac66d4a663cf5a420f7ccec44a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175614 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com> Reviewed-by: Szymon Kłos <szymon.k...@collabora.com> diff --git a/sw/source/core/crsr/crsrsh.cxx b/sw/source/core/crsr/crsrsh.cxx index 20e32e66c255..9f9b4aa66f09 100644 --- a/sw/source/core/crsr/crsrsh.cxx +++ b/sw/source/core/crsr/crsrsh.cxx @@ -3389,6 +3389,7 @@ SwCursorShell::SwCursorShell( SwDoc& rDoc, vcl::Window *pInitWin, m_bAllProtect = m_bVisPortChgd = m_bChgCallFlag = m_bInCMvVisportChgd = m_bGCAttr = m_bIgnoreReadonly = m_bSelTableCells = m_bBasicHideCursor = m_bOverwriteCursor = false; + m_bIsCursorPosChanged = false; m_bSendAccessibleCursorEvents = true; m_bCallChgLnk = m_bHasFocus = m_bAutoUpdateCells = true; m_bSVCursorVis = true; commit 5008f8457fb3c9c1786e5deb13576e143ab83177 Author: Pranam Lashkari <lpra...@collabora.com> AuthorDate: Fri Oct 25 10:56:37 2024 +0530 Commit: Andras Timar <andras.ti...@collabora.com> CommitDate: Mon Oct 28 17:09:39 2024 +0100 svx: calculate fill color with transperency calculate absoulutly visible color based on transperency against the doc background TODO: calculate this color based on the object in the background to increase visibility more Change-Id: I56076c29f10c58c6ee13e1358da92a4685ea01e5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175621 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com> Tested-by: Caolán McNamara <caolan.mcnam...@collabora.com> Reviewed-by: Caolán McNamara <caolan.mcnam...@collabora.com> diff --git a/svx/source/svdraw/svdetc.cxx b/svx/source/svdraw/svdetc.cxx index e5f99a8f8f01..6ae1eb3b1e5c 100644 --- a/svx/source/svdraw/svdetc.cxx +++ b/svx/source/svdraw/svdetc.cxx @@ -37,6 +37,7 @@ #include <svx/xbtmpit.hxx> #include <svx/xflgrit.hxx> #include <svx/svdoole2.hxx> +#include <svx/xfltrit.hxx> #include <svl/itempool.hxx> #include <unotools/configmgr.hxx> #include <unotools/localedatawrapper.hxx> @@ -240,12 +241,13 @@ bool OLEObjCache::UnloadObj(SdrOle2Obj& rObj) std::optional<Color> GetDraftFillColor(const SfxItemSet& rSet) { drawing::FillStyle eFill=rSet.Get(XATTR_FILLSTYLE).GetValue(); - + Color aResult; switch(eFill) { case drawing::FillStyle_SOLID: { - return rSet.Get(XATTR_FILLCOLOR).GetColorValue(); + aResult = rSet.Get(XATTR_FILLCOLOR).GetColorValue(); + break; } case drawing::FillStyle_HATCH: { @@ -260,14 +262,16 @@ std::optional<Color> GetDraftFillColor(const SfxItemSet& rSet) } const basegfx::BColor aAverageColor(basegfx::average(aCol1.getBColor(), aCol2.getBColor())); - return Color(aAverageColor); + aResult = Color(aAverageColor); + break; } case drawing::FillStyle_GRADIENT: { const basegfx::BGradient& rGrad=rSet.Get(XATTR_FILLGRADIENT).GetGradientValue(); Color aCol1(Color(rGrad.GetColorStops().front().getStopColor())); Color aCol2(Color(rGrad.GetColorStops().back().getStopColor())); const basegfx::BColor aAverageColor(basegfx::average(aCol1.getBColor(), aCol2.getBColor())); - return Color(aAverageColor); + aResult = Color(aAverageColor); + break; } case drawing::FillStyle_BITMAP: { @@ -307,14 +311,38 @@ std::optional<Color> GetDraftFillColor(const SfxItemSet& rSet) nGn /= nCount; nBl /= nCount; - return Color(sal_uInt8(nRt), sal_uInt8(nGn), sal_uInt8(nBl)); + aResult = Color(sal_uInt8(nRt), sal_uInt8(nGn), sal_uInt8(nBl)); } break; } - default: break; + default: + return {}; } - return {}; + sal_uInt16 nTransparencyPercentage = rSet.Get(XATTR_FILLTRANSPARENCE).GetValue(); + if (!nTransparencyPercentage) + return aResult; + + auto nTransparency = nTransparencyPercentage / 100.0; + auto nOpacity = 1 - nTransparency; + + svtools::ColorConfig aColorConfig; + Color aBackground(aColorConfig.GetColorValue(svtools::DOCCOLOR).nColor); + + // https://en.wikipedia.org/wiki/Alpha_compositing + // We are here calculating transperency fill color against background with + // To put it is simple words with example + // I.E: fill is Red (FF0000) and background is pure white (FFFFFF) + // If we add 50% transperency to fill color will look like Pink(ff7777) + + // TODO: calculate this colors based on object in background and not just the doc color + aResult.SetRed( + std::min(aResult.GetRed() * nOpacity + aBackground.GetRed() * nTransparency, 255.0)); + aResult.SetGreen( + std::min(aResult.GetGreen() * nOpacity + aBackground.GetGreen() * nTransparency, 255.0)); + aResult.SetBlue( + std::min(aResult.GetBlue() * nOpacity + aBackground.GetBlue() * nTransparency, 255.0)); + return aResult; } std::unique_ptr<SdrOutliner> SdrMakeOutliner(OutlinerMode nOutlinerMode, SdrModel& rModel) commit b5ce11bffb0a65d2ed1756f1eb1434bca947f5a9 Author: Mike Kaganski <mike.kagan...@collabora.com> AuthorDate: Fri Apr 26 01:00:21 2024 +0500 Commit: Andras Timar <andras.ti...@collabora.com> CommitDate: Mon Oct 28 17:09:23 2024 +0100 tdf#157240: also set font color together with font Commit b008831a5545e5a777d77547ef96b9798d795f30 (tdf#152990 set the font after the MapMode is (potentially) set, 2023-01-14) had moved setting of font forward, but left setting the font color behind. This fixed that. Change-Id: I73fadc7c139da3b6f84b7fc875c585d02fc1c719 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166654 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kagan...@collabora.com> (cherry picked from commit 1112a2bea0cb260fd64360b679c3f0f5c495e16e) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175486 Reviewed-by: Xisco Fauli <xiscofa...@libreoffice.org> (cherry picked from commit 69d8872fafbc6eab9f895f5c84355fa77e71ca3e) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175612 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com> Reviewed-by: Andras Timar <andras.ti...@collabora.com> diff --git a/drawinglayer/source/processor2d/vclprocessor2d.cxx b/drawinglayer/source/processor2d/vclprocessor2d.cxx index 45127a454008..e442b2a6f0f8 100644 --- a/drawinglayer/source/processor2d/vclprocessor2d.cxx +++ b/drawinglayer/source/processor2d/vclprocessor2d.cxx @@ -328,8 +328,6 @@ void VclProcessor2D::RenderTextSimpleOrDecoratedPortionPrimitive2D( mpOutputDevice->SetLayoutMode(nRTLLayoutMode); } - mpOutputDevice->SetTextColor(Color(aRGBFontColor)); - OUString aText(rTextCandidate.getText()); sal_Int32 nPos = rTextCandidate.getTextPosition(); sal_Int32 nLen = rTextCandidate.getTextLength(); @@ -443,6 +441,7 @@ void VclProcessor2D::RenderTextSimpleOrDecoratedPortionPrimitive2D( // tdf#152990 set the font after the MapMode is (potentially) set so canvas uses the desired // font size mpOutputDevice->SetFont(aFont); + mpOutputDevice->SetTextColor(Color(aRGBFontColor)); if (!aDXArray.empty()) {