1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
11 #include <svx/CommonStyleManager.hxx>
12 #include <svx/CommonStylePreviewRenderer.hxx>
17 sfx2::StylePreviewRenderer
* CommonStyleManager::CreateStylePreviewRenderer(
18 OutputDevice
& rOutputDev
, OUString
const & rName
,
19 SfxStyleFamily eFamily
, long nMaxHeight
)
21 SfxStyleSheetBasePool
* pPool
= mrShell
.GetStyleSheetPool();
25 pPool
->SetSearchMask(eFamily
, SFXSTYLEBIT_ALL
);
26 SfxStyleSheetBase
* pStyle
= nullptr;
27 pStyle
= pPool
->First();
31 if (rName
== pStyle
->GetName())
32 return new CommonStylePreviewRenderer(mrShell
, rOutputDev
, pStyle
, nMaxHeight
);
33 pStyle
= pPool
->Next();
39 } // end svx namespace
41 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */