shapeexport3.cxx (1f882ec4) | shapeexport3.cxx (5e6b5d64) |
---|---|
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 --- 110 unchanged lines hidden (view full) --- 119 aTransform.AddHomogenMatrix(xHomMat); 120 if(aTransform.NeedsAction()) 121 mrExport.AddAttribute(XML_NAMESPACE_DR3D, XML_TRANSFORM, aTransform.GetExportString(mrExport.GetMM100UnitConverter())); 122 123 switch(eShapeType) 124 { 125 case XmlShapeTypeDraw3DCubeObject: 126 { | 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 --- 110 unchanged lines hidden (view full) --- 119 aTransform.AddHomogenMatrix(xHomMat); 120 if(aTransform.NeedsAction()) 121 mrExport.AddAttribute(XML_NAMESPACE_DR3D, XML_TRANSFORM, aTransform.GetExportString(mrExport.GetMM100UnitConverter())); 122 123 switch(eShapeType) 124 { 125 case XmlShapeTypeDraw3DCubeObject: 126 { |
127 // write 3DCube shape 128 SvXMLElementExport aOBJ(mrExport, XML_NAMESPACE_DR3D, XML_CUBE, sal_True, sal_True); 129 | |
130 // minEdge 131 aAny = xPropSet->getPropertyValue(OUString(RTL_CONSTASCII_USTRINGPARAM("D3DPosition"))); 132 drawing::Position3D aPosition3D; 133 aAny >>= aPosition3D; 134 ::basegfx::B3DVector aPos3D(aPosition3D.PositionX, aPosition3D.PositionY, aPosition3D.PositionZ); 135 136 // maxEdge 137 aAny = xPropSet->getPropertyValue(OUString(RTL_CONSTASCII_USTRINGPARAM("D3DSize"))); --- 15 unchanged lines hidden (view full) --- 153 // write maxEdge 154 if(aDir3D != ::basegfx::B3DVector(2500.0, 2500.0, 2500.0)) // write only when not default 155 { 156 mrExport.GetMM100UnitConverter().convertB3DVector(sStringBuffer, aDir3D); 157 aStr = sStringBuffer.makeStringAndClear(); 158 mrExport.AddAttribute(XML_NAMESPACE_DR3D, XML_MAX_EDGE, aStr); 159 } 160 | 127 // minEdge 128 aAny = xPropSet->getPropertyValue(OUString(RTL_CONSTASCII_USTRINGPARAM("D3DPosition"))); 129 drawing::Position3D aPosition3D; 130 aAny >>= aPosition3D; 131 ::basegfx::B3DVector aPos3D(aPosition3D.PositionX, aPosition3D.PositionY, aPosition3D.PositionZ); 132 133 // maxEdge 134 aAny = xPropSet->getPropertyValue(OUString(RTL_CONSTASCII_USTRINGPARAM("D3DSize"))); --- 15 unchanged lines hidden (view full) --- 150 // write maxEdge 151 if(aDir3D != ::basegfx::B3DVector(2500.0, 2500.0, 2500.0)) // write only when not default 152 { 153 mrExport.GetMM100UnitConverter().convertB3DVector(sStringBuffer, aDir3D); 154 aStr = sStringBuffer.makeStringAndClear(); 155 mrExport.AddAttribute(XML_NAMESPACE_DR3D, XML_MAX_EDGE, aStr); 156 } 157 |
161 break; | 158 // write 3DCube shape 159 // #123542# Do this *after* the attributes are added, else these will be lost since opening 160 // the scope will clear the global attribute list at the exporter 161 SvXMLElementExport aOBJ(mrExport, XML_NAMESPACE_DR3D, XML_CUBE, sal_True, sal_True); 162 163 break; |
162 } 163 case XmlShapeTypeDraw3DSphereObject: 164 { | 164 } 165 case XmlShapeTypeDraw3DSphereObject: 166 { |
165 // write 3DSphere shape 166 SvXMLElementExport aOBJ(mrExport, XML_NAMESPACE_DR3D, XML_SPHERE, sal_True, sal_True); 167 | |
168 // Center 169 aAny = xPropSet->getPropertyValue(OUString(RTL_CONSTASCII_USTRINGPARAM("D3DPosition"))); 170 drawing::Position3D aPosition3D; 171 aAny >>= aPosition3D; 172 ::basegfx::B3DVector aPos3D(aPosition3D.PositionX, aPosition3D.PositionY, aPosition3D.PositionZ); 173 174 // Size 175 aAny = xPropSet->getPropertyValue(OUString(RTL_CONSTASCII_USTRINGPARAM("D3DSize"))); --- 12 unchanged lines hidden (view full) --- 188 // write Size 189 if(aDir3D != ::basegfx::B3DVector(5000.0, 5000.0, 5000.0)) // write only when not default 190 { 191 mrExport.GetMM100UnitConverter().convertB3DVector(sStringBuffer, aDir3D); 192 aStr = sStringBuffer.makeStringAndClear(); 193 mrExport.AddAttribute(XML_NAMESPACE_DR3D, XML_SIZE, aStr); 194 } 195 | 167 // Center 168 aAny = xPropSet->getPropertyValue(OUString(RTL_CONSTASCII_USTRINGPARAM("D3DPosition"))); 169 drawing::Position3D aPosition3D; 170 aAny >>= aPosition3D; 171 ::basegfx::B3DVector aPos3D(aPosition3D.PositionX, aPosition3D.PositionY, aPosition3D.PositionZ); 172 173 // Size 174 aAny = xPropSet->getPropertyValue(OUString(RTL_CONSTASCII_USTRINGPARAM("D3DSize"))); --- 12 unchanged lines hidden (view full) --- 187 // write Size 188 if(aDir3D != ::basegfx::B3DVector(5000.0, 5000.0, 5000.0)) // write only when not default 189 { 190 mrExport.GetMM100UnitConverter().convertB3DVector(sStringBuffer, aDir3D); 191 aStr = sStringBuffer.makeStringAndClear(); 192 mrExport.AddAttribute(XML_NAMESPACE_DR3D, XML_SIZE, aStr); 193 } 194 |
195 // write 3DSphere shape 196 // #123542# Do this *after* the attributes are added, else these will be lost since opening 197 // the scope will clear the global attribute list at the exporter 198 SvXMLElementExport aOBJ(mrExport, XML_NAMESPACE_DR3D, XML_SPHERE, sal_True, sal_True); 199 |
|
196 break; 197 } 198 case XmlShapeTypeDraw3DLatheObject: 199 case XmlShapeTypeDraw3DExtrudeObject: 200 { 201 // write special 3DLathe/3DExtrude attributes, get 3D PolyPolygon as drawing::PolyPolygonShape3D 202 aAny = xPropSet->getPropertyValue(OUString(RTL_CONSTASCII_USTRINGPARAM("D3DPolyPolygon3D"))); 203 drawing::PolyPolygonShape3D xPolyPolygon3D; --- 232 unchanged lines hidden --- | 200 break; 201 } 202 case XmlShapeTypeDraw3DLatheObject: 203 case XmlShapeTypeDraw3DExtrudeObject: 204 { 205 // write special 3DLathe/3DExtrude attributes, get 3D PolyPolygon as drawing::PolyPolygonShape3D 206 aAny = xPropSet->getPropertyValue(OUString(RTL_CONSTASCII_USTRINGPARAM("D3DPolyPolygon3D"))); 207 drawing::PolyPolygonShape3D xPolyPolygon3D; --- 232 unchanged lines hidden --- |