loplugin:reftotemp in drawinglayer..framework
Change-Id: I31618b4ae7ea4e37834bffc89e352b4c33eda14d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176372 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Jenkins
This commit is contained in:
parent
a9ac0a7f6c
commit
ce8816ff95
9 changed files with 36 additions and 36 deletions
|
@ -182,23 +182,23 @@ void GlowPrimitive2D::create2DDecomposition(
|
|||
if (aAlpha.IsEmpty())
|
||||
return;
|
||||
|
||||
const Size& rBitmapExSizePixel(aAlpha.GetSizePixel());
|
||||
const Size aBitmapExSizePixel(aAlpha.GetSizePixel());
|
||||
|
||||
if (rBitmapExSizePixel.Width() <= 0 || rBitmapExSizePixel.Height() <= 0)
|
||||
if (aBitmapExSizePixel.Width() <= 0 || aBitmapExSizePixel.Height() <= 0)
|
||||
return;
|
||||
|
||||
// We may have to take a corrective scaling into account when the
|
||||
// MaximumQuadraticPixel limit was used/triggered
|
||||
double fScale(1.0);
|
||||
|
||||
if (static_cast<sal_uInt32>(rBitmapExSizePixel.Width()) != nDiscreteClippedWidth
|
||||
|| static_cast<sal_uInt32>(rBitmapExSizePixel.Height()) != nDiscreteClippedHeight)
|
||||
if (static_cast<sal_uInt32>(aBitmapExSizePixel.Width()) != nDiscreteClippedWidth
|
||||
|| static_cast<sal_uInt32>(aBitmapExSizePixel.Height()) != nDiscreteClippedHeight)
|
||||
{
|
||||
// scale in X and Y should be the same (see fReduceFactor in createAlphaMask),
|
||||
// so adapt numerically to a single scale value, they are integer rounded values
|
||||
const double fScaleX(static_cast<double>(rBitmapExSizePixel.Width())
|
||||
const double fScaleX(static_cast<double>(aBitmapExSizePixel.Width())
|
||||
/ static_cast<double>(nDiscreteClippedWidth));
|
||||
const double fScaleY(static_cast<double>(rBitmapExSizePixel.Height())
|
||||
const double fScaleY(static_cast<double>(aBitmapExSizePixel.Height())
|
||||
/ static_cast<double>(nDiscreteClippedHeight));
|
||||
|
||||
fScale = (fScaleX + fScaleY) * 0.5;
|
||||
|
|
|
@ -224,22 +224,22 @@ void ShadowPrimitive2D::create2DDecomposition(
|
|||
if (aAlpha.IsEmpty())
|
||||
return;
|
||||
|
||||
const Size& rBitmapExSizePixel(aAlpha.GetSizePixel());
|
||||
if (!(rBitmapExSizePixel.Width() > 0 && rBitmapExSizePixel.Height() > 0))
|
||||
const Size aBitmapExSizePixel(aAlpha.GetSizePixel());
|
||||
if (!(aBitmapExSizePixel.Width() > 0 && aBitmapExSizePixel.Height() > 0))
|
||||
return;
|
||||
|
||||
// We may have to take a corrective scaling into account when the
|
||||
// MaximumQuadraticPixel limit was used/triggered
|
||||
double fScale(1.0);
|
||||
|
||||
if (static_cast<sal_uInt32>(rBitmapExSizePixel.Width()) != nDiscreteClippedWidth
|
||||
|| static_cast<sal_uInt32>(rBitmapExSizePixel.Height()) != nDiscreteClippedHeight)
|
||||
if (static_cast<sal_uInt32>(aBitmapExSizePixel.Width()) != nDiscreteClippedWidth
|
||||
|| static_cast<sal_uInt32>(aBitmapExSizePixel.Height()) != nDiscreteClippedHeight)
|
||||
{
|
||||
// scale in X and Y should be the same (see fReduceFactor in createAlphaMask),
|
||||
// so adapt numerically to a single scale value, they are integer rounded values
|
||||
const double fScaleX(static_cast<double>(rBitmapExSizePixel.Width())
|
||||
const double fScaleX(static_cast<double>(aBitmapExSizePixel.Width())
|
||||
/ static_cast<double>(nDiscreteClippedWidth));
|
||||
const double fScaleY(static_cast<double>(rBitmapExSizePixel.Height())
|
||||
const double fScaleY(static_cast<double>(aBitmapExSizePixel.Height())
|
||||
/ static_cast<double>(nDiscreteClippedHeight));
|
||||
|
||||
fScale = (fScaleX + fScaleY) * 0.5;
|
||||
|
|
|
@ -211,36 +211,36 @@ void TextLayouterDevice::setTextColor(const basegfx::BColor& rColor)
|
|||
|
||||
double TextLayouterDevice::getOverlineOffset() const
|
||||
{
|
||||
const ::FontMetric& rMetric = mrDevice.GetFontMetric();
|
||||
double fRet = (rMetric.GetInternalLeading() / 2.0) - rMetric.GetAscent();
|
||||
const ::FontMetric aMetric = mrDevice.GetFontMetric();
|
||||
double fRet = (aMetric.GetInternalLeading() / 2.0) - aMetric.GetAscent();
|
||||
return fRet * mnFontScalingFixY;
|
||||
}
|
||||
|
||||
double TextLayouterDevice::getUnderlineOffset() const
|
||||
{
|
||||
const ::FontMetric& rMetric = mrDevice.GetFontMetric();
|
||||
double fRet = rMetric.GetDescent() / 2.0;
|
||||
const ::FontMetric aMetric = mrDevice.GetFontMetric();
|
||||
double fRet = aMetric.GetDescent() / 2.0;
|
||||
return fRet * mnFontScalingFixY;
|
||||
}
|
||||
|
||||
double TextLayouterDevice::getStrikeoutOffset() const
|
||||
{
|
||||
const ::FontMetric& rMetric = mrDevice.GetFontMetric();
|
||||
double fRet = (rMetric.GetAscent() - rMetric.GetInternalLeading()) / 3.0;
|
||||
const ::FontMetric aMetric = mrDevice.GetFontMetric();
|
||||
double fRet = (aMetric.GetAscent() - aMetric.GetInternalLeading()) / 3.0;
|
||||
return fRet * mnFontScalingFixY;
|
||||
}
|
||||
|
||||
double TextLayouterDevice::getOverlineHeight() const
|
||||
{
|
||||
const ::FontMetric& rMetric = mrDevice.GetFontMetric();
|
||||
double fRet = rMetric.GetInternalLeading() / 2.5;
|
||||
const ::FontMetric aMetric = mrDevice.GetFontMetric();
|
||||
double fRet = aMetric.GetInternalLeading() / 2.5;
|
||||
return fRet * mnFontScalingFixY;
|
||||
}
|
||||
|
||||
double TextLayouterDevice::getUnderlineHeight() const
|
||||
{
|
||||
const ::FontMetric& rMetric = mrDevice.GetFontMetric();
|
||||
double fRet = rMetric.GetDescent() / 4.0;
|
||||
const ::FontMetric aMetric = mrDevice.GetFontMetric();
|
||||
double fRet = aMetric.GetDescent() / 4.0;
|
||||
return fRet * mnFontScalingFixY;
|
||||
}
|
||||
|
||||
|
@ -319,14 +319,14 @@ basegfx::B2DRange TextLayouterDevice::getTextBoundRect(const OUString& rText, sa
|
|||
|
||||
double TextLayouterDevice::getFontAscent() const
|
||||
{
|
||||
const ::FontMetric& rMetric = mrDevice.GetFontMetric();
|
||||
return rMetric.GetAscent() * mnFontScalingFixY;
|
||||
const ::FontMetric aMetric = mrDevice.GetFontMetric();
|
||||
return aMetric.GetAscent() * mnFontScalingFixY;
|
||||
}
|
||||
|
||||
double TextLayouterDevice::getFontDescent() const
|
||||
{
|
||||
const ::FontMetric& rMetric = mrDevice.GetFontMetric();
|
||||
return rMetric.GetDescent() * mnFontScalingFixY;
|
||||
const ::FontMetric aMetric = mrDevice.GetFontMetric();
|
||||
return aMetric.GetDescent() * mnFontScalingFixY;
|
||||
}
|
||||
|
||||
void TextLayouterDevice::addTextRectActions(const ::tools::Rectangle& rRectangle,
|
||||
|
|
|
@ -4042,8 +4042,8 @@ void SVGActionWriter::ImplWriteActions( const GDIMetaFile& rMtf,
|
|||
case MetaActionType::MOVECLIPREGION:
|
||||
{
|
||||
const_cast<MetaAction*>(pAction)->Execute( mpVDev );
|
||||
const vcl::Region& rClipRegion = mpVDev->GetActiveClipRegion();
|
||||
ImplWriteClipPath( rClipRegion.GetAsPolyPolygon() );
|
||||
const vcl::Region aClipRegion = mpVDev->GetActiveClipRegion();
|
||||
ImplWriteClipPath( aClipRegion.GetAsPolyPolygon() );
|
||||
|
||||
mbClipAttrChanged = true;
|
||||
}
|
||||
|
|
|
@ -312,7 +312,7 @@ IMPL_LINK_NOARG(FuncPage, SelHelpClickHdl, weld::Button&, void)
|
|||
{
|
||||
if (Help* pHelp = Application::GetHelp())
|
||||
{
|
||||
const OUString& sHelpId = pDesc->getHelpId();
|
||||
const OUString sHelpId = pDesc->getHelpId();
|
||||
if (!sHelpId.isEmpty())
|
||||
{
|
||||
pHelp->Start(sHelpId);
|
||||
|
|
|
@ -1064,12 +1064,12 @@ void RemoteFilesDialog::UpdateControls( const OUString& rURL )
|
|||
m_xTreeView->connect_changed(Link<weld::TreeView&,void>());
|
||||
|
||||
// read cached data for this url and fill the tree
|
||||
const ::std::vector< SvtContentEntry >& rFolders = m_xFileView->GetContent();
|
||||
const ::std::vector< SvtContentEntry > aContentFolders = m_xFileView->GetContent();
|
||||
::std::vector< std::pair< OUString, OUString > > aFolders;
|
||||
|
||||
m_xName_ed->ClearEntries();
|
||||
|
||||
for(const auto & rFolder : rFolders)
|
||||
for(const auto & rFolder : aContentFolders)
|
||||
{
|
||||
//WebDAV folders path ends in '/', so strip it
|
||||
OUString aFolderName = rFolder.maURL;
|
||||
|
|
|
@ -111,8 +111,8 @@ void AcceleratorCache::removeKey(const css::awt::KeyEvent& aKey)
|
|||
|
||||
void AcceleratorCache::removeCommand(const OUString& sCommand)
|
||||
{
|
||||
const TKeyList& lKeys = getKeysByCommand(sCommand);
|
||||
for (auto const& lKey : lKeys)
|
||||
const TKeyList aKeys = getKeysByCommand(sCommand);
|
||||
for (auto const& lKey : aKeys)
|
||||
{
|
||||
removeKey(lKey);
|
||||
}
|
||||
|
|
|
@ -644,7 +644,7 @@ void ToolBarManager::CheckAndUpdateImages()
|
|||
m_eSymbolSize = eNewSymbolSize;
|
||||
}
|
||||
|
||||
const OUString& sCurrentIconTheme = SvtMiscOptions::GetIconTheme();
|
||||
const OUString sCurrentIconTheme = SvtMiscOptions::GetIconTheme();
|
||||
if ( m_sIconTheme != sCurrentIconTheme )
|
||||
{
|
||||
bRefreshImages = true;
|
||||
|
|
|
@ -72,8 +72,8 @@ void AcceleratorConfigurationWriter::flush()
|
|||
AcceleratorCache::TKeyList lKeys = m_rContainer.getAllKeys();
|
||||
for (auto const& lKey : lKeys)
|
||||
{
|
||||
const OUString& rCommand = m_rContainer.getCommandByKey(lKey);
|
||||
impl_ts_writeKeyCommandPair(lKey, rCommand, xExtendedCFG);
|
||||
const OUString aCommand = m_rContainer.getCommandByKey(lKey);
|
||||
impl_ts_writeKeyCommandPair(lKey, aCommand, xExtendedCFG);
|
||||
}
|
||||
|
||||
/* TODO write key-command list
|
||||
|
|
Loading…
Reference in a new issue