Kaydet (Commit) 54028ff5 authored tarafından Tomaž Vajngerl's avatar Tomaž Vajngerl Kaydeden (comit) Andras Timar

tdf#91748 fix preview of special characters

Change-Id: Icf18e8be2ec07bb4bcd6edce3e41a6e88ecefca7
(cherry picked from commit 56d62036)
üst b861655c
...@@ -184,6 +184,8 @@ VCL_BUILDER_FACTORY(SvxShowText) ...@@ -184,6 +184,8 @@ VCL_BUILDER_FACTORY(SvxShowText)
void SvxShowText::Paint(vcl::RenderContext& rRenderContext, const Rectangle&) void SvxShowText::Paint(vcl::RenderContext& rRenderContext, const Rectangle&)
{ {
rRenderContext.SetFont(maFont);
Color aTextCol = rRenderContext.GetTextColor(); Color aTextCol = rRenderContext.GetTextColor();
const StyleSettings& rStyleSettings = Application::GetSettings().GetStyleSettings(); const StyleSettings& rStyleSettings = Application::GetSettings().GetStyleSettings();
...@@ -268,13 +270,14 @@ void SvxShowText::Paint(vcl::RenderContext& rRenderContext, const Rectangle&) ...@@ -268,13 +270,14 @@ void SvxShowText::Paint(vcl::RenderContext& rRenderContext, const Rectangle&)
void SvxShowText::SetFont( const vcl::Font& rFont ) void SvxShowText::SetFont( const vcl::Font& rFont )
{ {
long nWinHeight = GetOutputSizePixel().Height(); long nWinHeight = GetOutputSizePixel().Height();
vcl::Font aFont = rFont; maFont = vcl::Font(rFont);
aFont.SetWeight( WEIGHT_NORMAL ); maFont.SetWeight(WEIGHT_NORMAL);
aFont.SetAlign( ALIGN_TOP ); maFont.SetAlign(ALIGN_TOP);
aFont.SetSize( PixelToLogic( Size( 0, nWinHeight/2 ) ) ); maFont.SetSize(PixelToLogic(Size(0, nWinHeight / 2)));
aFont.SetTransparent( true ); maFont.SetTransparent(true);
Control::SetFont( aFont ); Control::SetFont(maFont);
mnY = ( nWinHeight - GetTextHeight() ) / 2;
mnY = (nWinHeight - GetTextHeight()) / 2;
Invalidate(); Invalidate();
} }
......
...@@ -55,6 +55,7 @@ protected: ...@@ -55,6 +55,7 @@ protected:
private: private:
long mnY; long mnY;
bool mbCenter; bool mbCenter;
vcl::Font maFont;
}; };
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment