LibreOffice Module svx (master) 1
viewobjectcontactofgroup.cxx
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
25#include <svx/svdobj.hxx>
26
27
28using namespace com::sun::star;
29
30
31namespace sdr::contact
32{
34 : ViewObjectContactOfSdrObj(rObjectContact, rViewContact)
35 {
36 }
37
39 {
40 }
41
43 {
44 // check model-view visibility
45 if(!isPrimitiveVisible(rDisplayInfo))
46 return;
47
49
50 const sal_uInt32 nSubHierarchyCount(GetViewContact().GetObjectCount());
51 if(nSubHierarchyCount)
52 {
53 const bool bDoGhostedDisplaying(
54 GetObjectContact().DoVisualizeEnteredGroup()
55 && !GetObjectContact().isOutputToPrinter()
56 && GetObjectContact().getActiveViewContact() == &GetViewContact());
57
58 if(bDoGhostedDisplaying)
59 {
60 rDisplayInfo.ClearGhostedDrawMode();
61 }
62
63 // visit object hierarchy
64 getPrimitive2DSequenceSubHierarchy(rDisplayInfo, primitiveSequence);
65
66 if(bDoGhostedDisplaying)
67 {
68 rDisplayInfo.SetGhostedDrawMode();
69 }
70 }
71 else
72 {
73 // draw replacement object for group. This will use ViewContactOfGroup::createViewIndependentPrimitive2DSequence
74 // which creates the replacement primitives for an empty group
76 }
77
78 primitiveSequence = GetViewContact().embedToObjectSpecificInformation(primitiveSequence);
79
80 // ISO 14289-1:2014, Clause: 7.3
81 createStructureTag(primitiveSequence);
82
83 rVisitor.visit(primitiveSequence);
84 }
85
87 {
89 }
90
91} // end of namespace
92
93/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
bool isVisibleOnAnyOfTheseLayers(const SdrLayerIDSet &rSet) const
Definition: svdobj.cxx:650
virtual void visit(const Primitive2DReference &)=0
virtual drawinglayer::primitive2d::Primitive2DContainer embedToObjectSpecificInformation(drawinglayer::primitive2d::Primitive2DContainer rSource) const
ViewObjectContactOfGroup(ObjectContact &rObjectContact, ViewContact &rViewContact)
virtual void getPrimitive2DSequenceHierarchy(DisplayInfo &rDisplayInfo, drawinglayer::primitive2d::Primitive2DDecompositionVisitor &rVisitor) const override
virtual bool isPrimitiveVisibleOnAnyLayer(const SdrLayerIDSet &aLayers) const override
Test whether the primitive is visible on any layer from aLayers.
virtual bool isPrimitiveVisible(const DisplayInfo &rDisplayInfo) const override
ViewContact & GetViewContact() const
ObjectContact & GetObjectContact() const
void getPrimitive2DSequenceSubHierarchy(DisplayInfo &rDisplayInfo, drawinglayer::primitive2d::Primitive2DDecompositionVisitor &rVisitor) const
virtual void getPrimitive2DSequenceHierarchy(DisplayInfo &rDisplayInfo, drawinglayer::primitive2d::Primitive2DDecompositionVisitor &rVisitor) const
void createStructureTag(drawinglayer::primitive2d::Primitive2DContainer &rNewPrimitiveSequence) const
Check if we need to embed to a StructureTagPrimitive2D, too.