viewcontact.cxx (f6e50924) viewcontact.cxx (025b0597)
1/**************************************************************
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

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

277 new drawinglayer::primitive2d::PolygonHairlinePrimitive2D(aOutline, aYellow));
278
279 return drawinglayer::primitive2d::Primitive2DSequence(&xReference, 1);
280 }
281
282 drawinglayer::primitive2d::Primitive2DSequence ViewContact::getViewIndependentPrimitive2DSequence() const
283 {
284 // local up-to-date checks. Create new list and compare.
1/**************************************************************
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

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

277 new drawinglayer::primitive2d::PolygonHairlinePrimitive2D(aOutline, aYellow));
278
279 return drawinglayer::primitive2d::Primitive2DSequence(&xReference, 1);
280 }
281
282 drawinglayer::primitive2d::Primitive2DSequence ViewContact::getViewIndependentPrimitive2DSequence() const
283 {
284 // local up-to-date checks. Create new list and compare.
285 const drawinglayer::primitive2d::Primitive2DSequence xNew(createViewIndependentPrimitive2DSequence());
285 drawinglayer::primitive2d::Primitive2DSequence xNew(createViewIndependentPrimitive2DSequence());
286
286
287 if(xNew.hasElements())
288 {
289 // allow evtl. embedding in object-specific infos, e.g. Name, Title, Description
290 xNew = embedToObjectSpecificInformation(xNew);
291 }
292
287 if(!drawinglayer::primitive2d::arePrimitive2DSequencesEqual(mxViewIndependentPrimitive2DSequence, xNew))
288 {
289 // has changed, copy content
290 const_cast< ViewContact* >(this)->mxViewIndependentPrimitive2DSequence = xNew;
291 }
292
293 // return current Primitive2DSequence
294 return mxViewIndependentPrimitive2DSequence;
295 }
296
297 // add Gluepoints (if available)
298 drawinglayer::primitive2d::Primitive2DSequence ViewContact::createGluePointPrimitive2DSequence() const
299 {
300 // default returns empty reference
301 return drawinglayer::primitive2d::Primitive2DSequence();
302 }
303
293 if(!drawinglayer::primitive2d::arePrimitive2DSequencesEqual(mxViewIndependentPrimitive2DSequence, xNew))
294 {
295 // has changed, copy content
296 const_cast< ViewContact* >(this)->mxViewIndependentPrimitive2DSequence = xNew;
297 }
298
299 // return current Primitive2DSequence
300 return mxViewIndependentPrimitive2DSequence;
301 }
302
303 // add Gluepoints (if available)
304 drawinglayer::primitive2d::Primitive2DSequence ViewContact::createGluePointPrimitive2DSequence() const
305 {
306 // default returns empty reference
307 return drawinglayer::primitive2d::Primitive2DSequence();
308 }
309
310 drawinglayer::primitive2d::Primitive2DSequence ViewContact::embedToObjectSpecificInformation(const drawinglayer::primitive2d::Primitive2DSequence& rSource) const
311 {
312 // nothing to do for default
313 return rSource;
314 }
315
304 void ViewContact::flushViewObjectContacts(bool bWithHierarchy)
305 {
306 if(bWithHierarchy)
307 {
308 // flush DrawingLayer hierarchy
309 const sal_uInt32 nCount(GetObjectCount());
310
311 for(sal_uInt32 a(0); a < nCount; a++)

--- 14 unchanged lines hidden ---
316 void ViewContact::flushViewObjectContacts(bool bWithHierarchy)
317 {
318 if(bWithHierarchy)
319 {
320 // flush DrawingLayer hierarchy
321 const sal_uInt32 nCount(GetObjectCount());
322
323 for(sal_uInt32 a(0); a < nCount; a++)

--- 14 unchanged lines hidden ---