Kaydet (Commit) 76360c8d authored tarafından Tomaž Vajngerl's avatar Tomaž Vajngerl

create the stlye preview renderer with style as parameter

Change-Id: Ie191467305279253f165f13980c125f6b7b9fdde
üst 210f42a3
...@@ -38,6 +38,10 @@ public: ...@@ -38,6 +38,10 @@ public:
virtual StylePreviewRenderer* CreateStylePreviewRenderer( virtual StylePreviewRenderer* CreateStylePreviewRenderer(
OutputDevice& rOutputDev, OUString const & rName, OutputDevice& rOutputDev, OUString const & rName,
SfxStyleFamily eFamily, long nMaxHeight = 32) = 0; SfxStyleFamily eFamily, long nMaxHeight = 32) = 0;
virtual StylePreviewRenderer* CreateStylePreviewRenderer(
OutputDevice& rOutputDev, SfxStyleSheetBase* pStyle,
long nMaxHeight = 32) = 0;
}; };
} // end namespace sfx2 } // end namespace sfx2
......
...@@ -32,6 +32,10 @@ public: ...@@ -32,6 +32,10 @@ public:
virtual sfx2::StylePreviewRenderer* CreateStylePreviewRenderer( virtual sfx2::StylePreviewRenderer* CreateStylePreviewRenderer(
OutputDevice& rOutputDev, OUString const & rName, OutputDevice& rOutputDev, OUString const & rName,
SfxStyleFamily eFamily, long nMaxHeight = 32) SAL_OVERRIDE; SfxStyleFamily eFamily, long nMaxHeight = 32) SAL_OVERRIDE;
virtual sfx2::StylePreviewRenderer* CreateStylePreviewRenderer(
OutputDevice& rOutputDev, SfxStyleSheetBase* pStyle,
long nMaxHeight = 32) SAL_OVERRIDE;
}; };
} // end namespace svx } // end namespace svx
......
...@@ -29,13 +29,21 @@ sfx2::StylePreviewRenderer* CommonStyleManager::CreateStylePreviewRenderer( ...@@ -29,13 +29,21 @@ sfx2::StylePreviewRenderer* CommonStyleManager::CreateStylePreviewRenderer(
while (pStyle) while (pStyle)
{ {
if (rName == pStyle->GetName()) if (rName == pStyle->GetName())
return new CommonStylePreviewRenderer(mrShell, rOutputDev, pStyle, nMaxHeight); return CreateStylePreviewRenderer(rOutputDev, pStyle, nMaxHeight);
pStyle = pPool->Next(); pStyle = pPool->Next();
} }
return nullptr; return nullptr;
} }
sfx2::StylePreviewRenderer* CommonStyleManager::CreateStylePreviewRenderer(
OutputDevice& rOutputDev, SfxStyleSheetBase* pStyle,
long nMaxHeight)
{
return new CommonStylePreviewRenderer(mrShell, rOutputDev, pStyle, nMaxHeight);
}
} // end svx namespace } // end svx namespace
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
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