viewcontactofsdrobj.cxx (025b0597) viewcontactofsdrobj.cxx (672a9062)
1/**************************************************************
1/**************************************************************
2 *
2 *
3 * Licensed to the Apache Software Foundation (ASF) under one
4 * or more contributor license agreements. See the NOTICE file
5 * distributed with this work for additional information
6 * regarding copyright ownership. The ASF licenses this file
7 * to you under the Apache License, Version 2.0 (the
8 * "License"); you may not use this file except in compliance
9 * with the License. You may obtain a copy of the License at
3 * Licensed to the Apache Software Foundation (ASF) under one
4 * or more contributor license agreements. See the NOTICE file
5 * distributed with this work for additional information
6 * regarding copyright ownership. The ASF licenses this file
7 * to you under the Apache License, Version 2.0 (the
8 * "License"); you may not use this file except in compliance
9 * with the License. You may obtain a copy of the License at
10 *
10 *
11 * http://www.apache.org/licenses/LICENSE-2.0
11 * http://www.apache.org/licenses/LICENSE-2.0
12 *
12 *
13 * Unless required by applicable law or agreed to in writing,
14 * software distributed under the License is distributed on an
15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16 * KIND, either express or implied. See the License for the
17 * specific language governing permissions and limitations
18 * under the License.
13 * Unless required by applicable law or agreed to in writing,
14 * software distributed under the License is distributed on an
15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16 * KIND, either express or implied. See the License for the
17 * specific language governing permissions and limitations
18 * under the License.
19 *
19 *
20 *************************************************************/
21
22
23
24// MARKER(update_precomp.py): autogen include statement, do not remove
25#include "precompiled_svx.hxx"
26#include <svx/sdr/contact/viewcontactofsdrobj.hxx>
27#include <svx/sdr/contact/viewobjectcontactofsdrobj.hxx>

--- 104 unchanged lines hidden (view full) ---

132 meRememberedAnimationKind = rTextObj.GetTextAniKind();
133 }
134 }
135
136 // call parent
137 ViewContact::ActionChanged();
138 }
139
20 *************************************************************/
21
22
23
24// MARKER(update_precomp.py): autogen include statement, do not remove
25#include "precompiled_svx.hxx"
26#include <svx/sdr/contact/viewcontactofsdrobj.hxx>
27#include <svx/sdr/contact/viewobjectcontactofsdrobj.hxx>

--- 104 unchanged lines hidden (view full) ---

132 meRememberedAnimationKind = rTextObj.GetTextAniKind();
133 }
134 }
135
136 // call parent
137 ViewContact::ActionChanged();
138 }
139
140 // overload for acessing the SdrObject
140 // overload for accessing the SdrObject
141 SdrObject* ViewContactOfSdrObj::TryToGetSdrObject() const
142 {
143 return &GetSdrObject();
144 }
141 SdrObject* ViewContactOfSdrObj::TryToGetSdrObject() const
142 {
143 return &GetSdrObject();
144 }
145
145
146 //////////////////////////////////////////////////////////////////////////////
147 // primitive stuff
148
149 // add Gluepoints (if available)
150 drawinglayer::primitive2d::Primitive2DSequence ViewContactOfSdrObj::createGluePointPrimitive2DSequence() const
151 {
152 drawinglayer::primitive2d::Primitive2DSequence xRetval;
153 const SdrGluePointList* pGluePointList = GetSdrObject().GetGluePointList();

--- 16 unchanged lines hidden (view full) ---

170 aGluepointVector.push_back(basegfx::B2DPoint(aPosition.X(), aPosition.Y()));
171 }
172
173 if(!aGluepointVector.empty())
174 {
175 const basegfx::BColor aBackPen(1.0, 1.0, 1.0);
176 const basegfx::BColor aRGBFrontColor(0.0, 0.0, 1.0); // COL_LIGHTBLUE
177 const drawinglayer::primitive2d::Primitive2DReference xReference(new drawinglayer::primitive2d::MarkerArrayPrimitive2D(
146 //////////////////////////////////////////////////////////////////////////////
147 // primitive stuff
148
149 // add Gluepoints (if available)
150 drawinglayer::primitive2d::Primitive2DSequence ViewContactOfSdrObj::createGluePointPrimitive2DSequence() const
151 {
152 drawinglayer::primitive2d::Primitive2DSequence xRetval;
153 const SdrGluePointList* pGluePointList = GetSdrObject().GetGluePointList();

--- 16 unchanged lines hidden (view full) ---

170 aGluepointVector.push_back(basegfx::B2DPoint(aPosition.X(), aPosition.Y()));
171 }
172
173 if(!aGluepointVector.empty())
174 {
175 const basegfx::BColor aBackPen(1.0, 1.0, 1.0);
176 const basegfx::BColor aRGBFrontColor(0.0, 0.0, 1.0); // COL_LIGHTBLUE
177 const drawinglayer::primitive2d::Primitive2DReference xReference(new drawinglayer::primitive2d::MarkerArrayPrimitive2D(
178 aGluepointVector,
178 aGluepointVector,
179 drawinglayer::primitive2d::createDefaultGluepoint_7x7(aBackPen, aRGBFrontColor)));
179 drawinglayer::primitive2d::createDefaultGluepoint_7x7(aBackPen, aRGBFrontColor)));
180 xRetval = drawinglayer::primitive2d::Primitive2DSequence(&xReference, 1);
180 xRetval = drawinglayer::primitive2d::Primitive2DSequence(&xReference, 1);
181 }
182 }
183 }
184
185 return xRetval;
186 }
187
181 }
182 }
183 }
184
185 return xRetval;
186 }
187
188 drawinglayer::primitive2d::Primitive2DSequence ViewContactOfSdrObj::embedToObjectSpecificInformation(const drawinglayer::primitive2d::Primitive2DSequence& rSource) const
189 {
190 if(rSource.hasElements() &&
191 (GetSdrObject().GetName().Len() ||
192 GetSdrObject().GetTitle().Len() ||
193 GetSdrObject().GetDescription().Len()))
194 {
195 const drawinglayer::primitive2d::Primitive2DReference xRef(
196 new drawinglayer::primitive2d::ObjectInfoPrimitive2D(
197 rSource,
198 GetSdrObject().GetName(),
199 GetSdrObject().GetTitle(),
200 GetSdrObject().GetDescription()));
188 drawinglayer::primitive2d::Primitive2DSequence ViewContactOfSdrObj::embedToObjectSpecificInformation(const drawinglayer::primitive2d::Primitive2DSequence& rSource) const
189 {
190 if(rSource.hasElements() &&
191 (GetSdrObject().GetName().Len() ||
192 GetSdrObject().GetTitle().Len() ||
193 GetSdrObject().GetDescription().Len()))
194 {
195 const drawinglayer::primitive2d::Primitive2DReference xRef(
196 new drawinglayer::primitive2d::ObjectInfoPrimitive2D(
197 rSource,
198 GetSdrObject().GetName(),
199 GetSdrObject().GetTitle(),
200 GetSdrObject().GetDescription()));
201
201
202 return drawinglayer::primitive2d::Primitive2DSequence(&xRef, 1);
203 }
202 return drawinglayer::primitive2d::Primitive2DSequence(&xRef, 1);
203 }
204
204
205 return rSource;
206 }
205 return rSource;
206 }
207
208 } // end of namespace contact
209} // end of namespace sdr
210
211//////////////////////////////////////////////////////////////////////////////
212// eof
207
208 } // end of namespace contact
209} // end of namespace sdr
210
211//////////////////////////////////////////////////////////////////////////////
212// eof