LibreOffice Module starmath (master) 1
unomodel.hxx
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/*
3 * This file is part of the LibreOffice project.
4 *
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/.
8 *
9 * This file incorporates work covered by the following license notice:
10 *
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18 */
19
20#pragma once
21
22#include <com/sun/star/lang/XServiceInfo.hpp>
23#include <com/sun/star/view/XRenderable.hpp>
24
25#include <sfx2/sfxbasemodel.hxx>
27#include <vcl/print.hxx>
29
30inline constexpr OUStringLiteral PRTUIOPT_TITLE_ROW = u"TitleRow";
31inline constexpr OUStringLiteral PRTUIOPT_FORMULA_TEXT = u"FormulaText";
32inline constexpr OUStringLiteral PRTUIOPT_BORDER = u"Border";
33inline constexpr OUStringLiteral PRTUIOPT_PRINT_FORMAT = u"PrintFormat";
34inline constexpr OUStringLiteral PRTUIOPT_PRINT_SCALE = u"PrintScale";
35
37{
38public:
40};
41
42
43class SmModel final : public SfxBaseModel,
45 public css::lang::XServiceInfo,
46 public css::view::XRenderable,
47 public oox::FormulaImExportBase
48{
49 std::unique_ptr<SmPrintUIOptions> m_pPrintUIOptions;
50
51 virtual void _setPropertyValues( const comphelper::PropertyMapEntry** ppEntries, const css::uno::Any* pValues ) override;
52 virtual void _getPropertyValues( const comphelper::PropertyMapEntry** ppEntries, css::uno::Any* pValue ) override;
53public:
54 explicit SmModel( SfxObjectShell *pObjSh );
55 virtual ~SmModel() noexcept override;
56
57 //XInterface
58 virtual css::uno::Any SAL_CALL queryInterface( const css::uno::Type& aType ) override;
59 virtual void SAL_CALL acquire( ) noexcept override;
60 virtual void SAL_CALL release( ) noexcept override;
61
62 //XTypeProvider
63 virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes( ) override;
64
65 static const css::uno::Sequence< sal_Int8 > & getUnoTunnelId();
66
67 //XUnoTunnel
68 virtual sal_Int64 SAL_CALL getSomething( const css::uno::Sequence< sal_Int8 >& aIdentifier ) override;
69
70 //XRenderable
71 virtual sal_Int32 SAL_CALL getRendererCount( const css::uno::Any& rSelection, const css::uno::Sequence< css::beans::PropertyValue >& rxOptions ) override;
72 virtual css::uno::Sequence< css::beans::PropertyValue > SAL_CALL getRenderer( sal_Int32 nRenderer, const css::uno::Any& rSelection, const css::uno::Sequence< css::beans::PropertyValue >& rxOptions ) override;
73 virtual void SAL_CALL render( sal_Int32 nRenderer, const css::uno::Any& rSelection, const css::uno::Sequence< css::beans::PropertyValue >& rxOptions ) override;
74
75 //XServiceInfo
76 virtual OUString SAL_CALL getImplementationName() override;
77 virtual sal_Bool SAL_CALL supportsService(const OUString& ServiceName) override;
78 virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override;
79
80 virtual void SAL_CALL setParent( const css::uno::Reference< css::uno::XInterface >& xParent ) override;
81
82 // oox::FormulaImExportBase
83 virtual void writeFormulaOoxml(::sax_fastparser::FSHelperPtr pSerializer,
84 oox::core::OoxmlVersion version,
85 oox::drawingml::DocumentType documentType, sal_Int8 nAlign) override;
86 virtual void writeFormulaRtf(OStringBuffer& rBuffer, rtl_TextEncoding nEncoding) override;
87 virtual void readFormulaOoxml( oox::formulaimport::XmlStream& stream ) override;
88 virtual Size getFormulaSize() const override;
89};
90
91/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
virtual OUString SAL_CALL getImplementationName() override
Definition: unomodel.cxx:376
virtual void SAL_CALL acquire() noexcept override
Definition: unomodel.cxx:334
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
Definition: unomodel.cxx:386
virtual void SAL_CALL render(sal_Int32 nRenderer, const css::uno::Any &rSelection, const css::uno::Sequence< css::beans::PropertyValue > &rxOptions) override
Definition: unomodel.cxx:933
virtual sal_Int32 SAL_CALL getRendererCount(const css::uno::Any &rSelection, const css::uno::Sequence< css::beans::PropertyValue > &rxOptions) override
Definition: unomodel.cxx:890
static const css::uno::Sequence< sal_Int8 > & getUnoTunnelId()
Definition: unomodel.cxx:354
virtual sal_Bool SAL_CALL supportsService(const OUString &ServiceName) override
Definition: unomodel.cxx:381
virtual void SAL_CALL release() noexcept override
Definition: unomodel.cxx:339
virtual css::uno::Any SAL_CALL queryInterface(const css::uno::Type &aType) override
Definition: unomodel.cxx:320
virtual ~SmModel() noexcept override
Definition: unomodel.cxx:316
virtual css::uno::Sequence< css::beans::PropertyValue > SAL_CALL getRenderer(sal_Int32 nRenderer, const css::uno::Any &rSelection, const css::uno::Sequence< css::beans::PropertyValue > &rxOptions) override
Definition: unomodel.cxx:897
virtual void _getPropertyValues(const comphelper::PropertyMapEntry **ppEntries, css::uno::Any *pValue) override
Definition: unomodel.cxx:675
virtual void writeFormulaOoxml(::sax_fastparser::FSHelperPtr pSerializer, oox::core::OoxmlVersion version, oox::drawingml::DocumentType documentType, sal_Int8 nAlign) override
Definition: unomodel.cxx:1038
virtual Size getFormulaSize() const override
Definition: unomodel.cxx:1056
virtual void SAL_CALL setParent(const css::uno::Reference< css::uno::XInterface > &xParent) override
Definition: unomodel.cxx:1030
std::unique_ptr< SmPrintUIOptions > m_pPrintUIOptions
Definition: unomodel.hxx:49
virtual void _setPropertyValues(const comphelper::PropertyMapEntry **ppEntries, const css::uno::Any *pValues) override
Definition: unomodel.cxx:393
virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() override
Definition: unomodel.cxx:344
virtual void writeFormulaRtf(OStringBuffer &rBuffer, rtl_TextEncoding nEncoding) override
Definition: unomodel.cxx:1046
virtual sal_Int64 SAL_CALL getSomething(const css::uno::Sequence< sal_Int8 > &aIdentifier) override
Definition: unomodel.cxx:360
virtual void readFormulaOoxml(oox::formulaimport::XmlStream &stream) override
Definition: unomodel.cxx:1051
SmModel(SfxObjectShell *pObjSh)
Definition: unomodel.cxx:310
float u
Type
OoxmlVersion
std::shared_ptr< FastSerializerHelper > FSHelperPtr
DocumentType
unsigned char sal_Bool
signed char sal_Int8
constexpr OUStringLiteral PRTUIOPT_TITLE_ROW
Definition: unomodel.hxx:30
constexpr OUStringLiteral PRTUIOPT_BORDER
Definition: unomodel.hxx:32
constexpr OUStringLiteral PRTUIOPT_PRINT_SCALE
Definition: unomodel.hxx:34
constexpr OUStringLiteral PRTUIOPT_PRINT_FORMAT
Definition: unomodel.hxx:33
constexpr OUStringLiteral PRTUIOPT_FORMULA_TEXT
Definition: unomodel.hxx:31