use Graphic::GetBitmap instead of Graphic::GetBitmapEx

in places where we want a Bitmap

Change-Id: I70acdfde07df5bda84aa21143b2a0aca98023fe5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/189675
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Jenkins
This commit is contained in:
Noel Grandin
2025-08-21 20:54:31 +02:00
committed by Noel Grandin
parent 95b49b333c
commit 66b0aab258
9 changed files with 14 additions and 14 deletions
@@ -97,7 +97,7 @@ bool ChartTransferable::GetData( const css::datatransfer::DataFlavor& rFlavor, c
else if( nFormat == SotClipboardFormatId::BITMAP )
{
Graphic aGraphic( m_xMetaFileGraphic );
bResult = SetBitmapEx( Bitmap(aGraphic.GetBitmapEx()), rFlavor );
bResult = SetBitmapEx( aGraphic.GetBitmap(), rFlavor );
}
}
@@ -1682,7 +1682,7 @@ namespace cppcanvas::internal
Graphic aGraphic;
aFill.getGraphic( aGraphic );
Bitmap aBmp( aGraphic.GetBitmapEx() );
Bitmap aBmp( aGraphic.GetBitmap() );
const ::Size aBmpSize( aBmp.GetSizePixel() );
::SvtGraphicFill::Transform aTransform;
+2 -2
View File
@@ -294,7 +294,7 @@ IMPL_LINK_NOARG(SvxPatternTabPage, ChangePatternHdl_Impl, ValueSet*, void)
Color aBackColor;
Color aPixelColor;
bool bIs8x8(vcl::bitmap::isHistorical8x8(Bitmap(pGraphicObject->GetGraphic().GetBitmapEx()), aBackColor, aPixelColor));
bool bIs8x8(vcl::bitmap::isHistorical8x8(pGraphicObject->GetGraphic().GetBitmap(), aBackColor, aPixelColor));
m_xLbColor->SetNoSelection();
m_xLbBackgroundColor->SetNoSelection();
@@ -307,7 +307,7 @@ IMPL_LINK_NOARG(SvxPatternTabPage, ChangePatternHdl_Impl, ValueSet*, void)
// setting the pixel control
m_xCtlPixel->SetXBitmap(Bitmap(pGraphicObject->GetGraphic().GetBitmapEx()));
m_xCtlPixel->SetXBitmap(pGraphicObject->GetGraphic().GetBitmap());
m_xLbColor->SelectEntry( aPixelColor );
m_xLbBackgroundColor->SelectEntry( aBackColor );
@@ -203,7 +203,7 @@ bool prepareBitmapForDirectRender(
{
// bitmap graphic, always handle locally, so get bitmap data independent
// if it'sie or it's discrete display size
rTarget = Bitmap(rGraphic.GetBitmapEx());
rTarget = rGraphic.GetBitmap();
}
else
{
@@ -243,7 +243,7 @@ bool prepareBitmapForDirectRender(
// at BitmapEx is possible, just get the default fallback Bitmap from the
// vector data to continue. Trust the existing converters for now to
// do something with good quality.
rTarget = Bitmap(rGraphic.GetBitmapEx());
rTarget = rGraphic.GetBitmap();
}
}
+2 -2
View File
@@ -866,7 +866,7 @@ void FillModel::pushToPropMap( ShapePropertyMap& rPropMap, const GraphicHelper&
const Graphic aGraphic(aFillProps.maBlipProps.mxFillGraphic);
::Color nBackColor;
::Color nPixelColor;
bool bIs8x8 = vcl::bitmap::isHistorical8x8(Bitmap(aGraphic.GetBitmapEx()),
bool bIs8x8 = vcl::bitmap::isHistorical8x8(aGraphic.GetBitmap(),
nBackColor, nPixelColor);
if (bIs8x8)
{
@@ -880,7 +880,7 @@ void FillModel::pushToPropMap( ShapePropertyMap& rPropMap, const GraphicHelper&
moOpacity, COL_LIGHTGRAY)
.getColor(rGraphicHelper);
XOBitmap aXOB(Bitmap(aGraphic.GetBitmapEx()));
XOBitmap aXOB(aGraphic.GetBitmap());
aXOB.Bitmap2Array();
// LO uses the first pixel's color to represent background pixels
if (aXOB.GetBackgroundColor() == COL_WHITE)
+3 -3
View File
@@ -1327,15 +1327,15 @@ bool View::InsertData( const TransferableDataHelper& rDataHelper,
if (rDataHelper.GetGraphic(SotClipboardFormatId::GDIMETAFILE, aGraphic))
{
aBmp = Bitmap(aGraphic.GetBitmapEx());
aBmp = aGraphic.GetBitmap();
}
else if (rDataHelper.GetGraphic(SotClipboardFormatId::SVXB, aGraphic))
{
aBmp = Bitmap(aGraphic.GetBitmapEx());
aBmp = aGraphic.GetBitmap();
}
else if (rDataHelper.GetGraphic(SotClipboardFormatId::BITMAP, aGraphic))
{
aBmp = Bitmap(aGraphic.GetBitmapEx());
aBmp = aGraphic.GetBitmap();
}
}
@@ -175,7 +175,7 @@ namespace slideshow::internal
}
Graphic aGraphic(xGraphic);
const Bitmap aBmp(aGraphic.GetBitmapEx());
const Bitmap aBmp(aGraphic.GetBitmap());
uno::Reference< rendering::XBitmap > xBitmap(vcl::unotools::xBitmapFromBitmap(aBmp));
+1 -1
View File
@@ -167,7 +167,7 @@ bool SvEmbedTransferHelper::GetData( const css::datatransfer::DataFlavor& rFlavo
}
else if ( ( nFormat == SotClipboardFormatId::BITMAP || nFormat == SotClipboardFormatId::PNG ) && m_oGraphic )
{
bRet = SetBitmapEx( Bitmap(m_oGraphic->GetBitmapEx()), rFlavor );
bRet = SetBitmapEx( m_oGraphic->GetBitmap(), rFlavor );
}
else if ( m_xObj.is() && ::svt::EmbeddedObjectRef::TryRunningState( m_xObj ) )
{
+1 -1
View File
@@ -669,7 +669,7 @@ bool SwTransferable::GetData( const DataFlavor& rFlavor, const OUString& rDestDo
case SotClipboardFormatId::PNG:
// Neither pClpBitmap nor pClpGraphic are necessarily set
if( (m_eBufferType & TransferBufferType::Graphic) && (m_oClpBitmap || m_oClpGraphic))
bOK = SetBitmapEx( Bitmap((m_oClpBitmap ? m_oClpBitmap : m_oClpGraphic)->GetBitmapEx()), rFlavor );
bOK = SetBitmapEx( (m_oClpBitmap ? m_oClpBitmap : m_oClpGraphic)->GetBitmap(), rFlavor );
break;
case SotClipboardFormatId::SVIM: