svgnode.cxx (e2bf1e9d) | svgnode.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 --- 13 unchanged lines hidden (view full) --- 22// MARKER(update_precomp.py): autogen include statement, do not remove 23#include "precompiled_svgio.hxx" 24 25#include <svgio/svgreader/svgnode.hxx> 26#include <basegfx/polygon/b2dpolypolygontools.hxx> 27#include <svgio/svgreader/svgdocument.hxx> 28#include <svgio/svgreader/svgnode.hxx> 29#include <svgio/svgreader/svgstyleattributes.hxx> | 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 --- 13 unchanged lines hidden (view full) --- 22// MARKER(update_precomp.py): autogen include statement, do not remove 23#include "precompiled_svgio.hxx" 24 25#include <svgio/svgreader/svgnode.hxx> 26#include <basegfx/polygon/b2dpolypolygontools.hxx> 27#include <svgio/svgreader/svgdocument.hxx> 28#include <svgio/svgreader/svgnode.hxx> 29#include <svgio/svgreader/svgstyleattributes.hxx> |
30#include <drawinglayer/primitive2d/objectinfoprimitive2d.hxx> |
|
30 31////////////////////////////////////////////////////////////////////////////// 32 33namespace svgio 34{ 35 namespace svgreader 36 { 37 const SvgStyleAttributes* SvgNode::getSvgStyleAttributes() const --- 146 unchanged lines hidden (view full) --- 184 drawinglayer::primitive2d::appendPrimitive2DSequenceToPrimitive2DSequence(rTarget, aNewTarget); 185 } 186 } 187 else 188 { 189 OSL_ENSURE(false, "Null-Pointer in child node list (!)"); 190 } 191 } | 31 32////////////////////////////////////////////////////////////////////////////// 33 34namespace svgio 35{ 36 namespace svgreader 37 { 38 const SvgStyleAttributes* SvgNode::getSvgStyleAttributes() const --- 146 unchanged lines hidden (view full) --- 185 drawinglayer::primitive2d::appendPrimitive2DSequenceToPrimitive2DSequence(rTarget, aNewTarget); 186 } 187 } 188 else 189 { 190 OSL_ENSURE(false, "Null-Pointer in child node list (!)"); 191 } 192 } |
193 194 if(rTarget.hasElements()) 195 { 196 const SvgStyleAttributes* pStyles = getSvgStyleAttributes(); 197 198 if(pStyles) 199 { 200 // check if we have Title or Desc 201 const rtl::OUString& rTitle = pStyles->getTitle(); 202 const rtl::OUString& rDesc = pStyles->getDesc(); 203 204 if(rTitle.getLength() || rDesc.getLength()) 205 { 206 // default object name is empty 207 rtl::OUString aObjectName; 208 209 // use path as object name when outmost element 210 if(SVGTokenSvg == getType()) 211 { 212 aObjectName = getDocument().getAbsolutePath(); 213 } 214 215 // pack in ObjectInfoPrimitive2D group 216 const drawinglayer::primitive2d::Primitive2DReference xRef( 217 new drawinglayer::primitive2d::ObjectInfoPrimitive2D( 218 rTarget, 219 aObjectName, 220 rTitle, 221 rDesc)); 222 223 rTarget = drawinglayer::primitive2d::Primitive2DSequence(&xRef, 1); 224 } 225 } 226 } |
|
192 } 193 } 194 195 const basegfx::B2DRange* SvgNode::getCurrentViewPort() const 196 { 197 if(getParent()) 198 { 199 return getParent()->getCurrentViewPort(); --- 93 unchanged lines hidden --- | 227 } 228 } 229 230 const basegfx::B2DRange* SvgNode::getCurrentViewPort() const 231 { 232 if(getParent()) 233 { 234 return getParent()->getCurrentViewPort(); --- 93 unchanged lines hidden --- |