LibreOffice Module svx (master) 1
cellproperties.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#pragma once
20
21#include "textproperties.hxx"
22#include <svx/itextprovider.hxx>
23#include <rtl/ref.hxx>
24
25namespace sdr::table
26{
27class Cell;
29}
30
31namespace sdr::properties
32{
34{
35public:
37 virtual ~CellTextProvider();
38
39private:
40 virtual sal_Int32 getTextCount() const override;
41 virtual SdrText* getText(sal_Int32 nIndex) const override;
42
43private:
45};
46
47class CellProperties final : public TextProperties
48{
49protected:
50 // create a new itemset
52
53 const svx::ITextProvider& getTextProvider() const override;
54
55public:
56 // basic constructor
57 CellProperties(SdrObject& rObj, ::sdr::table::Cell* pCell);
58
59 // constructor for copying, but using new object
60 CellProperties(const CellProperties& rProps, SdrObject& rObj, sdr::table::Cell* pCell);
62
63 // Clone() operator, normally just calls the local copy constructor
64 std::unique_ptr<BaseProperties> Clone(SdrObject& rObj) const override;
65
66 void ForceDefaultAttributes() override;
67
69 sal_uInt16 nDeletedWhich) override;
70
71 void ItemChange(const sal_uInt16 nWhich, const SfxPoolItem* pNewItem = nullptr) override;
72
73private:
76};
77
78} // namespace sdr::properties
79
80/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
Abstract DrawObject.
Definition: svdobj.hxx:260
SfxItemSet CreateObjectSpecificItemSet(SfxItemPool &rPool) override
Definition: cell.cxx:137
void ItemChange(const sal_uInt16 nWhich, const SfxPoolItem *pNewItem=nullptr) override
Definition: cell.cxx:261
const CellTextProvider maTextProvider
std::unique_ptr< BaseProperties > Clone(SdrObject &rObj) const override
Definition: cell.cxx:176
CellProperties(SdrObject &rObj, ::sdr::table::Cell *pCell)
const svx::ITextProvider & getTextProvider() const override
Get the TextProvider related to our SdrObject.
Definition: cell.cxx:153
void ForceDefaultAttributes() override
Definition: cell.cxx:182
void ItemSetChanged(o3tl::span< const SfxPoolItem *const > aChangedItems, sal_uInt16 nDeletedWhich) override
Definition: cell.cxx:186
virtual SdrText * getText(sal_Int32 nIndex) const override
Return the nth available text.
Definition: cell.cxx:129
const sdr::table::CellRef m_xCell
virtual sal_Int32 getTextCount() const override
Return the number of texts available for this object.
Definition: cell.cxx:124
CellTextProvider(sdr::table::CellRef xCell)
Definition: cell.cxx:115
This interface provides access to text object(s) in an SdrObject.
sal_Int32 nIndex
rtl::Reference< Cell > CellRef
Definition: celltypes.hxx:33