LibreOffice Module slideshow (master) 1
shapesubset.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#ifndef INCLUDED_SLIDESHOW_SOURCE_INC_SHAPESUBSET_HXX
21#define INCLUDED_SLIDESHOW_SOURCE_INC_SHAPESUBSET_HXX
22
24#include "doctreenode.hxx"
25
26#include <memory>
27
28namespace slideshow::internal
29 {
30 class ShapeSubset;
31 typedef ::std::shared_ptr< ShapeSubset > ShapeSubsetSharedPtr;
32
33 /* Definition of ShapeSubset class */
34
46 {
47 public:
61 const DocTreeNode& rTreeNode,
62 SubsettableShapeManagerSharedPtr xSubsetManager );
63
77 ShapeSubset( const ShapeSubsetSharedPtr& rOriginalSubset,
78 const DocTreeNode& rTreeNode );
79
88
90
91 // For a rationale for this hacky combination of user-provided dtor, defaulted copy
92 // ctor, and deleted copy assignment op, see the "TODO(Q1)" comment in
93 // CloningNodeCreator (slideshow/source/engine/animationnodes/animationnodefactory.cxx):
94 ShapeSubset(ShapeSubset const &) = default;
95 void operator =(ShapeSubset const &) = delete;
96
103
111 void enableSubsetShape();
112
119 void disableSubsetShape();
120
124 bool isFullSet() const;
125
128 const DocTreeNode& getSubset() const;
129
130 private:
131 // default copy/assignment are okay
132 //ShapeSubset(const ShapeSubset&);
133 //ShapeSubset& operator=( const ShapeSubset& );
134
139 };
140
141}
142
143#endif // INCLUDED_SLIDESHOW_SOURCE_INC_SHAPESUBSET_HXX
144
145/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
This class represents kind of a DOM tree node for shape text.
Definition: doctreenode.hxx:45
Subset RAII wrapper for shapes.
Definition: shapesubset.hxx:46
void disableSubsetShape()
Disable the subset shape.
ShapeSubset(ShapeSubset const &)=default
SubsettableShapeManagerSharedPtr mpShapeManager
AttributableShapeSharedPtr mpSubsetShape
AttributableShapeSharedPtr mpOriginalShape
bool isFullSet() const
Query whether this subset actually is none, but contains the whole original shape's content.
ShapeSubset(AttributableShapeSharedPtr xOriginalShape, const DocTreeNode &rTreeNode, SubsettableShapeManagerSharedPtr xSubsetManager)
Create a subset directly from a Shape.
Definition: shapesubset.cxx:31
void operator=(ShapeSubset const &)=delete
void enableSubsetShape()
Enable the subset shape.
Definition: shapesubset.cxx:89
AttributableShapeSharedPtr const & getSubsetShape() const
Get the actual subset shape.
Definition: shapesubset.cxx:84
const DocTreeNode & getSubset() const
Query subset this object represents.
::std::shared_ptr< SubsettableShapeManager > SubsettableShapeManagerSharedPtr
::std::shared_ptr< ShapeSubset > ShapeSubsetSharedPtr
Definition: shapesubset.hxx:30
::std::shared_ptr< AttributableShape > AttributableShapeSharedPtr