canvas: Drop dxcanvas::CanvasFont::ImplRef typedef
and also oglcanvas::CanvasFont::ImplRef. Change-Id: I18da9155134537a8c33c043c3260fe4e404d2bb3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/208851 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
This commit is contained in:
@@ -87,7 +87,7 @@ namespace dxcanvas
|
||||
{
|
||||
::osl::MutexGuard aGuard( m_aMutex );
|
||||
|
||||
return new TextLayout( aText, nDirection, nRandomSeed, ImplRef( this ) );
|
||||
return new TextLayout(aText, nDirection, nRandomSeed, rtl::Reference<CanvasFont>(this));
|
||||
}
|
||||
|
||||
uno::Sequence< double > SAL_CALL CanvasFont::getAvailableSizes( )
|
||||
|
||||
@@ -48,7 +48,6 @@ namespace dxcanvas
|
||||
public CanvasFont_Base
|
||||
{
|
||||
public:
|
||||
typedef rtl::Reference<CanvasFont> ImplRef;
|
||||
/// make noncopyable
|
||||
CanvasFont(const CanvasFont&) = delete;
|
||||
const CanvasFont& operator=(const CanvasFont&) = delete;
|
||||
|
||||
@@ -527,8 +527,7 @@ namespace dxcanvas
|
||||
Gdiplus::Color(
|
||||
dxcanvastools::sequenceToArgb(renderState.DeviceColor)));
|
||||
|
||||
CanvasFont::ImplRef pFont(
|
||||
dxcanvastools::canvasFontFromXFont(xFont) );
|
||||
rtl::Reference<CanvasFont> pFont(dxcanvastools::canvasFontFromXFont(xFont));
|
||||
|
||||
// Move glyphs up, such that output happens at the font
|
||||
// baseline.
|
||||
|
||||
@@ -570,14 +570,14 @@ namespace dxcanvastools
|
||||
}
|
||||
}
|
||||
|
||||
CanvasFont::ImplRef canvasFontFromXFont( const uno::Reference< rendering::XCanvasFont >& xFont )
|
||||
rtl::Reference<CanvasFont> canvasFontFromXFont(const uno::Reference<rendering::XCanvasFont>& xFont)
|
||||
{
|
||||
CanvasFont* pCanvasFont = dynamic_cast< CanvasFont* >(xFont.get());
|
||||
|
||||
ENSURE_ARG_OR_THROW( pCanvasFont,
|
||||
"canvasFontFromXFont(): Invalid XFont (or incompatible font for this XCanvas)" );
|
||||
|
||||
return CanvasFont::ImplRef( pCanvasFont );
|
||||
return rtl::Reference<CanvasFont>(pCanvasFont);
|
||||
}
|
||||
|
||||
void setModulateImageAttributes( Gdiplus::ImageAttributes& o_rAttr,
|
||||
|
||||
@@ -113,7 +113,7 @@ using namespace dxcanvas;
|
||||
|
||||
BitmapSharedPtr bitmapFromXBitmap( const css::uno::Reference< css::rendering::XBitmap >& xBitmap );
|
||||
|
||||
CanvasFont::ImplRef canvasFontFromXFont( const css::uno::Reference< css::rendering::XCanvasFont >& xFont );
|
||||
rtl::Reference<CanvasFont> canvasFontFromXFont(const css::uno::Reference<css::rendering::XCanvasFont>& xFont);
|
||||
|
||||
void setModulateImageAttributes( Gdiplus::ImageAttributes& o_rAttr,
|
||||
double nRedModulation,
|
||||
|
||||
@@ -36,7 +36,7 @@ namespace dxcanvas
|
||||
TextLayout::TextLayout( const rendering::StringContext& aText,
|
||||
sal_Int8 nDirection,
|
||||
sal_Int64 /*nRandomSeed*/,
|
||||
const CanvasFont::ImplRef& rFont ) :
|
||||
const rtl::Reference<CanvasFont>& rFont) :
|
||||
TextLayout_Base( m_aMutex ),
|
||||
maText( aText ),
|
||||
maLogicalAdvancements(),
|
||||
|
||||
@@ -47,7 +47,7 @@ namespace dxcanvas
|
||||
TextLayout( const css::rendering::StringContext& aText,
|
||||
sal_Int8 nDirection,
|
||||
sal_Int64 nRandomSeed,
|
||||
const CanvasFont::ImplRef& rFont );
|
||||
const rtl::Reference<CanvasFont>& rFont);
|
||||
/// make noncopyable
|
||||
TextLayout(const TextLayout&) = delete;
|
||||
const TextLayout& operator=(const TextLayout&) = delete;
|
||||
@@ -98,7 +98,7 @@ namespace dxcanvas
|
||||
css::rendering::StringContext maText;
|
||||
css::uno::Sequence< double > maLogicalAdvancements;
|
||||
css::uno::Sequence< sal_Bool > maKashidaPositions;
|
||||
CanvasFont::ImplRef mpFont;
|
||||
rtl::Reference<CanvasFont> mpFont;
|
||||
sal_Int8 mnTextDirection;
|
||||
};
|
||||
|
||||
|
||||
@@ -130,7 +130,7 @@ namespace dxcanvas
|
||||
aFont.SetColor( aColor );
|
||||
aFont.SetFillColor( aColor );
|
||||
|
||||
CanvasFont::ImplRef pFont(dxcanvastools::canvasFontFromXFont(rCanvasFont));
|
||||
rtl::Reference<CanvasFont> pFont(dxcanvastools::canvasFontFromXFont(rCanvasFont));
|
||||
if (pFont.is() && pFont->getEmphasisMark())
|
||||
aFont.SetEmphasisMark(FontEmphasisMark(pFont->getEmphasisMark()));
|
||||
|
||||
@@ -278,7 +278,7 @@ namespace dxcanvas
|
||||
aFont.SetFontWidth( nNewWidth );
|
||||
}
|
||||
|
||||
CanvasFont::ImplRef pFont(dxcanvastools::canvasFontFromXFont(rCanvasFont));
|
||||
rtl::Reference<CanvasFont> pFont(dxcanvastools::canvasFontFromXFont(rCanvasFont));
|
||||
if (pFont.is() && pFont->getEmphasisMark())
|
||||
aFont.SetEmphasisMark(FontEmphasisMark(pFont->getEmphasisMark()));
|
||||
|
||||
|
||||
@@ -36,7 +36,7 @@ namespace oglcanvas
|
||||
{
|
||||
std::unique_lock aGuard( m_aMutex );
|
||||
|
||||
return new TextLayout( aText, nDirection, nRandomSeed, ImplRef( this ) );
|
||||
return new TextLayout(aText, nDirection, nRandomSeed, rtl::Reference<CanvasFont>(this));
|
||||
}
|
||||
|
||||
rendering::FontRequest SAL_CALL CanvasFont::getFontRequest( )
|
||||
|
||||
@@ -26,8 +26,6 @@ namespace oglcanvas
|
||||
class CanvasFont : public CanvasFontBase
|
||||
{
|
||||
public:
|
||||
typedef rtl::Reference<CanvasFont> ImplRef;
|
||||
|
||||
/// make noncopyable
|
||||
CanvasFont(const CanvasFont&) = delete;
|
||||
const CanvasFont& operator=(const CanvasFont&) = delete;
|
||||
|
||||
@@ -22,7 +22,7 @@ namespace oglcanvas
|
||||
TextLayout::TextLayout( rendering::StringContext aText,
|
||||
sal_Int8 nDirection,
|
||||
sal_Int64 /*nRandomSeed*/,
|
||||
CanvasFont::ImplRef rFont ) :
|
||||
rtl::Reference<CanvasFont> rFont) :
|
||||
maText(std::move( aText )),
|
||||
mpFont(std::move( rFont )),
|
||||
mnTextDirection( nDirection )
|
||||
|
||||
@@ -28,7 +28,7 @@ namespace oglcanvas
|
||||
TextLayout( css::rendering::StringContext aText,
|
||||
sal_Int8 nDirection,
|
||||
sal_Int64 nRandomSeed,
|
||||
CanvasFont::ImplRef rFont );
|
||||
rtl::Reference<CanvasFont> rFont);
|
||||
|
||||
/// make noncopyable
|
||||
TextLayout(const TextLayout&) = delete;
|
||||
@@ -62,7 +62,7 @@ namespace oglcanvas
|
||||
css::rendering::StringContext maText;
|
||||
css::uno::Sequence< double > maLogicalAdvancements;
|
||||
css::uno::Sequence< sal_Bool > maKashidaPositions;
|
||||
CanvasFont::ImplRef mpFont;
|
||||
rtl::Reference<CanvasFont> mpFont;
|
||||
sal_Int8 mnTextDirection;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user