LibreOffice Module svx (master) 1
|
#include <CommonStylePreviewRenderer.hxx>
Classes | |
struct | ScriptInfo |
Public Member Functions | |
CommonStylePreviewRenderer (const SfxObjectShell &rShell, OutputDevice &rOutputDev, SfxStyleSheetBase *pStyle, tools::Long nMaxHeight) | |
virtual | ~CommonStylePreviewRenderer () override |
virtual bool | recalculate () override |
virtual bool | render (const tools::Rectangle &aRectangle, RenderAlign eRenderAlign=RenderAlign::CENTER) override |
Public Member Functions inherited from sfx2::StylePreviewRenderer | |
StylePreviewRenderer (const SfxObjectShell &rShell, OutputDevice &rOutputDev, SfxStyleSheetBase *pStyle, tools::Long nMaxHeight) | |
virtual | ~StylePreviewRenderer () |
virtual bool | recalculate ()=0 |
virtual bool | render (const tools::Rectangle &aRectangle, RenderAlign eRenderAlign=RenderAlign::CENTER)=0 |
Private Member Functions | |
bool | SetFontSize (const SfxItemSet &rSet, sal_uInt16 nSlot, SvxFont &rFont) |
void | CalcRenderSize () |
void | CheckScript () |
Private Attributes | |
std::optional< SvxFont > | m_oFont |
std::optional< SvxFont > | m_oCJKFont |
std::optional< SvxFont > | m_oCTLFont |
Color | maFontColor |
Color | maHighlightColor |
Color | maBackgroundColor |
tools::Long | mnHeight |
tools::Long | mnBaseLine |
OUString | maStyleName |
OUString | maScriptText |
std::vector< ScriptInfo > | maScriptChanges |
Additional Inherited Members | |
Public Types inherited from sfx2::StylePreviewRenderer | |
enum | RenderAlign { TOP , CENTER } |
Protected Attributes inherited from sfx2::StylePreviewRenderer | |
const SfxObjectShell & | mrShell |
OutputDevice & | mrOutputDev |
SfxStyleSheetBase * | mpStyle |
tools::Long | mnMaxHeight |
Definition at line 30 of file CommonStylePreviewRenderer.hxx.
svx::CommonStylePreviewRenderer::CommonStylePreviewRenderer | ( | const SfxObjectShell & | rShell, |
OutputDevice & | rOutputDev, | ||
SfxStyleSheetBase * | pStyle, | ||
tools::Long | nMaxHeight | ||
) |
Definition at line 48 of file CommonStylePreviewRenderer.cxx.
References COL_AUTO(), GetName(), maBackgroundColor, and mnHeight.
|
overridevirtual |
Definition at line 61 of file CommonStylePreviewRenderer.cxx.
|
private |
Definition at line 230 of file CommonStylePreviewRenderer.cxx.
References vcl::FONT, tools::Rectangle::GetHeight(), OutputDevice::GetTextBoundRect(), OutputDevice::GetTextWidth(), Size::Height(), m_oCJKFont, m_oCTLFont, m_oFont, maScriptChanges, maStyleName, mnBaseLine, mnHeight, sfx2::StylePreviewRenderer::mnMaxHeight, sfx2::StylePreviewRenderer::mrOutputDev, OutputDevice::Pop(), OutputDevice::Push(), OutputDevice::SetFont(), tools::Rectangle::Top(), and Size::Width().
Referenced by recalculate().
|
private |
Definition at line 405 of file CommonStylePreviewRenderer.cxx.
References i, maScriptChanges, maScriptText, and maStyleName.
Referenced by recalculate().
|
overridevirtual |
Implements sfx2::StylePreviewRenderer.
Definition at line 103 of file CommonStylePreviewRenderer.cxx.
References CalcRenderSize(), CheckScript(), GetCaseMap(), SfxStyleSheetBase::GetFamily(), SfxStyleSheetBase::GetItemSetForPreview(), GetValue, m_oCJKFont, m_oCTLFont, m_oFont, maBackgroundColor, maFontColor, maHighlightColor, sfx2::StylePreviewRenderer::mpStyle, SvxFont::SetCaseMap(), svx::SetFont(), SetFontSize(), XATTR_FILLCOLOR(), and XATTR_FILLSTYLE().
|
overridevirtual |
Implements sfx2::StylePreviewRenderer.
Definition at line 325 of file CommonStylePreviewRenderer.cxx.
References Point::AdjustX(), Point::AdjustY(), sfx2::StylePreviewRenderer::CENTER, COL_AUTO(), OutputDevice::DrawRect(), OutputDevice::DrawText(), vcl::FILLCOLOR, vcl::FONT, tools::Rectangle::GetHeight(), m_oCJKFont, m_oCTLFont, m_oFont, maBackgroundColor, maFontColor, maHighlightColor, maScriptChanges, maStyleName, mnBaseLine, mnHeight, sfx2::StylePreviewRenderer::mrOutputDev, OutputDevice::Pop(), OutputDevice::Push(), OutputDevice::SetFillColor(), OutputDevice::SetFont(), OutputDevice::SetTextColor(), OutputDevice::SetTextFillColor(), vcl::TEXTCOLOR, vcl::TEXTFILLCOLOR, and tools::Rectangle::TopLeft().
|
private |
Definition at line 87 of file CommonStylePreviewRenderer.cxx.
References SfxItemSet::Get(), OutputDevice::GetFontMetric(), SfxObjectShell::GetMapUnit(), svx::GetWhich(), OutputDevice::LogicToPixel(), sfx2::StylePreviewRenderer::mrOutputDev, sfx2::StylePreviewRenderer::mrShell, rSet, and OutputDevice::SetFont().
Referenced by recalculate().
|
private |
Definition at line 33 of file CommonStylePreviewRenderer.hxx.
Referenced by CalcRenderSize(), recalculate(), and render().
|
private |
Definition at line 34 of file CommonStylePreviewRenderer.hxx.
Referenced by CalcRenderSize(), recalculate(), and render().
|
private |
Definition at line 32 of file CommonStylePreviewRenderer.hxx.
Referenced by CalcRenderSize(), recalculate(), and render().
|
private |
Definition at line 37 of file CommonStylePreviewRenderer.hxx.
Referenced by recalculate(), and render().
|
private |
Definition at line 35 of file CommonStylePreviewRenderer.hxx.
Referenced by recalculate(), and render().
|
private |
Definition at line 36 of file CommonStylePreviewRenderer.hxx.
Referenced by recalculate(), and render().
|
private |
Definition at line 54 of file CommonStylePreviewRenderer.hxx.
Referenced by CalcRenderSize(), CheckScript(), and render().
|
private |
Definition at line 41 of file CommonStylePreviewRenderer.hxx.
Referenced by CheckScript().
|
private |
Definition at line 40 of file CommonStylePreviewRenderer.hxx.
Referenced by CalcRenderSize(), CheckScript(), and render().
|
private |
Definition at line 39 of file CommonStylePreviewRenderer.hxx.
Referenced by CalcRenderSize(), and render().
|
private |
Definition at line 38 of file CommonStylePreviewRenderer.hxx.
Referenced by CalcRenderSize(), and render().