diff options
author | Armin Le Grand (allotropia) <armin.le.grand.extern@allotropia.de> | 2023-05-12 15:32:51 +0200 |
---|---|---|
committer | Armin Le Grand <Armin.Le.Grand@me.com> | 2023-05-15 15:19:53 +0200 |
commit | 438f0752deaf7d6e6d9d1df381b64aca4628e944 (patch) | |
tree | f1907b25dad1cbf2604b16c657e11f5623c8b5b2 /sw/source/uibase | |
parent | efa965969c6d3dfe5745a535605a6b9a482a03bd (diff) |
MCGR: consolidations/cleanups for changes so far
Change-Id: I85cf40e4803b0485bb40349d8e81adc8123666c4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151706
Tested-by: Jenkins
Reviewed-by: Armin Le Grand <Armin.Le.Grand@me.com>
Diffstat (limited to 'sw/source/uibase')
-rw-r--r-- | sw/source/uibase/docvw/HeaderFooterWin.cxx | 2 | ||||
-rw-r--r-- | sw/source/uibase/docvw/ShadowOverlayObject.cxx | 6 | ||||
-rw-r--r-- | sw/source/uibase/shells/drawdlg.cxx | 4 | ||||
-rw-r--r-- | sw/source/uibase/sidebar/PageStylesPanel.cxx | 14 | ||||
-rw-r--r-- | sw/source/uibase/sidebar/PageStylesPanel.hxx | 2 | ||||
-rw-r--r-- | sw/source/uibase/uiview/viewtab.cxx | 4 |
6 files changed, 16 insertions, 16 deletions
diff --git a/sw/source/uibase/docvw/HeaderFooterWin.cxx b/sw/source/uibase/docvw/HeaderFooterWin.cxx index 0ea4a37937f0..64e34e01f6bd 100644 --- a/sw/source/uibase/docvw/HeaderFooterWin.cxx +++ b/sw/source/uibase/docvw/HeaderFooterWin.cxx @@ -153,7 +153,7 @@ void SwFrameButtonPainter::PaintButton(drawinglayer::primitive2d::Primitive2DCon nAngle = 0; FillGradientAttribute aFillAttrs(css::awt::GradientStyle_LINEAR, 0.0, 0.0, 0.0, nAngle, - basegfx::utils::createColorStopsFromStartEndColor(aLighterColor, aFillColor)); + basegfx::BColorStops(aLighterColor, aFillColor)); rSeq.push_back(drawinglayer::primitive2d::Primitive2DReference( new drawinglayer::primitive2d::FillGradientPrimitive2D(aGradientRect, std::move(aFillAttrs)))); } diff --git a/sw/source/uibase/docvw/ShadowOverlayObject.cxx b/sw/source/uibase/docvw/ShadowOverlayObject.cxx index afabffb44e66..0d0450876d2e 100644 --- a/sw/source/uibase/docvw/ShadowOverlayObject.cxx +++ b/sw/source/uibase/docvw/ShadowOverlayObject.cxx @@ -90,7 +90,7 @@ void ShadowPrimitive::create2DDecomposition( 0.5, 0.5, M_PI, - basegfx::utils::createColorStopsFromStartEndColor( + basegfx::BColorStops( basegfx::BColor(230.0/255.0,230.0/255.0,230.0/255.0), basegfx::BColor(180.0/255.0,180.0/255.0,180.0/255.0))); @@ -109,7 +109,7 @@ void ShadowPrimitive::create2DDecomposition( 0.5, 0.5, M_PI, - basegfx::utils::createColorStopsFromStartEndColor( + basegfx::BColorStops( basegfx::BColor(230.0/255.0,230.0/255.0,230.0/255.0), basegfx::BColor(180.0/255.0,180.0/255.0,180.0/255.0))); @@ -128,7 +128,7 @@ void ShadowPrimitive::create2DDecomposition( 0.5, 0.5, M_PI, - basegfx::utils::createColorStopsFromStartEndColor( + basegfx::BColorStops( basegfx::BColor(230.0/255.0,230.0/255.0,230.0/255.0), basegfx::BColor(83.0/255.0,83.0/255.0,83.0/255.0))); diff --git a/sw/source/uibase/shells/drawdlg.cxx b/sw/source/uibase/shells/drawdlg.cxx index 6117cf0dc32a..ec93f35029b0 100644 --- a/sw/source/uibase/shells/drawdlg.cxx +++ b/sw/source/uibase/shells/drawdlg.cxx @@ -235,7 +235,7 @@ namespace } if (const SfxStringItem* pJSON = pArgs->GetItemIfSet(SID_FILL_GRADIENT_JSON, false)) { - XGradient aGradient = XGradient::fromJSON(pJSON->GetValue()); + basegfx::BGradient aGradient = basegfx::BGradient::fromJSON(pJSON->GetValue()); XFillGradientItem aItem(aGradient); pArgs->Put(aItem); } @@ -319,7 +319,7 @@ static void lcl_unifyFillTransparencyItems(const SfxItemSet& rSet) if (!pFillTranspItem) return; - XGradient aTmpGradient = pFillFloatTranspItem->GetGradientValue(); + basegfx::BGradient aTmpGradient = pFillFloatTranspItem->GetGradientValue(); sal_uInt16 nTranspPercent = pFillTranspItem->GetValue(); // Encode transparency percentage as intensity sal_uInt16 nIntensity = 100 - std::min<sal_uInt16> diff --git a/sw/source/uibase/sidebar/PageStylesPanel.cxx b/sw/source/uibase/sidebar/PageStylesPanel.cxx index 05774730daea..9565b177b84d 100644 --- a/sw/source/uibase/sidebar/PageStylesPanel.cxx +++ b/sw/source/uibase/sidebar/PageStylesPanel.cxx @@ -192,10 +192,10 @@ void PageStylesPanel::Update() mxBgColorLB->show(); mxBgGradientLB->show(); - const XGradient xGradient = GetGradientSetOrDefault(); - const Color aStartColor(xGradient.GetColorStops().front().getStopColor()); + const basegfx::BGradient aBGradient = GetGradientSetOrDefault(); + const Color aStartColor(aBGradient.GetColorStops().front().getStopColor()); mxBgColorLB->SelectEntry(aStartColor); - const Color aEndColor(xGradient.GetColorStops().back().getStopColor()); + const Color aEndColor(aBGradient.GetColorStops().back().getStopColor()); mxBgGradientLB->SelectEntry(aEndColor); } break; @@ -256,11 +256,11 @@ Color const & PageStylesPanel::GetColorSetOrDefault() return mpBgColorItem->GetColorValue(); } -XGradient const & PageStylesPanel::GetGradientSetOrDefault() +basegfx::BGradient const & PageStylesPanel::GetGradientSetOrDefault() { if( !mpBgGradientItem ) { - XGradient aGradient; + basegfx::BGradient aGradient; OUString aGradientName; if (SfxObjectShell* pSh = SfxObjectShell::Current()) { @@ -550,8 +550,8 @@ void PageStylesPanel::ModifyFillColor() break; case GRADIENT: { - XGradient aGradient( - basegfx::utils::createColorStopsFromStartEndColor( + basegfx::BGradient aGradient( + basegfx::BColorStops( mxBgColorLB->GetSelectEntryColor().getBColor(), mxBgGradientLB->GetSelectEntryColor().getBColor())); diff --git a/sw/source/uibase/sidebar/PageStylesPanel.hxx b/sw/source/uibase/sidebar/PageStylesPanel.hxx index d39d2a073e67..5395b2784eb5 100644 --- a/sw/source/uibase/sidebar/PageStylesPanel.hxx +++ b/sw/source/uibase/sidebar/PageStylesPanel.hxx @@ -93,7 +93,7 @@ private: void Initialize(); void Update(); Color const & GetColorSetOrDefault(); - XGradient const & GetGradientSetOrDefault(); + basegfx::BGradient const & GetGradientSetOrDefault(); OUString const & GetHatchingSetOrDefault(); OUString const & GetBitmapSetOrDefault(); OUString const & GetPatternSetOrDefault(); diff --git a/sw/source/uibase/uiview/viewtab.cxx b/sw/source/uibase/uiview/viewtab.cxx index 9f1bf5f9ce36..729405068a1a 100644 --- a/sw/source/uibase/uiview/viewtab.cxx +++ b/sw/source/uibase/uiview/viewtab.cxx @@ -2517,8 +2517,8 @@ void SwView::StateTabWin(SfxItemSet& rSet) case drawing::FillStyle_GRADIENT: { - const XGradient& xGradient = aSet.GetItem<XFillGradientItem>( XATTR_FILLGRADIENT )->GetGradientValue(); - XFillGradientItem aFillGradientItem( OUString(), xGradient, SID_ATTR_PAGE_GRADIENT ); + const basegfx::BGradient& aBGradient = aSet.GetItem<XFillGradientItem>( XATTR_FILLGRADIENT )->GetGradientValue(); + XFillGradientItem aFillGradientItem( OUString(), aBGradient, SID_ATTR_PAGE_GRADIENT ); rSet.Put( aFillGradientItem ); } break; |