use search from StyleManager in "Style & Formatting"
Change-Id: I09fff1816b1d569cbfd50c7cafb19c9b169528bf
This commit is contained in:
@@ -132,21 +132,28 @@ void StyleLBoxString::Paint(
|
||||
|
||||
if (pStyleManager)
|
||||
{
|
||||
std::unique_ptr<sfx2::StylePreviewRenderer> pStylePreviewRenderer(pStyleManager->CreateStylePreviewRenderer(rRenderContext, GetText(), meStyleFamily, 32 * rRenderContext.GetDPIScaleFactor()));
|
||||
SfxStyleSheetBase* pStyleSheet = pStyleManager->Search(GetText(), meStyleFamily);
|
||||
|
||||
if (pStylePreviewRenderer)
|
||||
if (pStyleSheet)
|
||||
{
|
||||
if (pStylePreviewRenderer->recalculate())
|
||||
{
|
||||
mpViewData->maSize = pStylePreviewRenderer->getRenderSize();
|
||||
}
|
||||
else
|
||||
{
|
||||
SvLBoxString::InitViewData( &rDevice, const_cast<SvTreeListEntry*>(&rEntry), mpViewData);
|
||||
}
|
||||
sal_Int32 nSize = 32 * rRenderContext.GetDPIScaleFactor();
|
||||
std::unique_ptr<sfx2::StylePreviewRenderer> pStylePreviewRenderer(
|
||||
pStyleManager->CreateStylePreviewRenderer(rRenderContext, pStyleSheet, nSize));
|
||||
|
||||
Rectangle aPaintRectangle = pView->GetPaintRectangle();
|
||||
bPainted = pStylePreviewRenderer->render(aPaintRectangle);
|
||||
if (pStylePreviewRenderer)
|
||||
{
|
||||
if (pStylePreviewRenderer->recalculate())
|
||||
{
|
||||
mpViewData->maSize = pStylePreviewRenderer->getRenderSize();
|
||||
}
|
||||
else
|
||||
{
|
||||
SvLBoxString::InitViewData( &rDevice, const_cast<SvTreeListEntry*>(&rEntry), mpViewData);
|
||||
}
|
||||
|
||||
Rectangle aPaintRectangle = pView->GetPaintRectangle();
|
||||
bPainted = pStylePreviewRenderer->render(aPaintRectangle);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user