summaryrefslogtreecommitdiff
path: root/xmloff/source/draw/xexptran.cxx
diff options
context:
space:
mode:
authorVladimir Glazounov <vg@openoffice.org>2006-04-06 15:15:31 +0000
committerVladimir Glazounov <vg@openoffice.org>2006-04-06 15:15:31 +0000
commitdeff32ce76d3afce9bf28fe0e98159f13080b10f (patch)
treeaf539b01420d19746cede3a1d67f543c9e6eb6a2 /xmloff/source/draw/xexptran.cxx
parent5c3e9b31b110daee8d2b56010fa65ca933224090 (diff)
INTEGRATION: CWS impress89 (1.19.90); FILE MERGED
2006/03/14 12:26:56 cl 1.19.90.1: #i51301# do not crash with empty viewboxes
Diffstat (limited to 'xmloff/source/draw/xexptran.cxx')
-rw-r--r--xmloff/source/draw/xexptran.cxx12
1 files changed, 6 insertions, 6 deletions
diff --git a/xmloff/source/draw/xexptran.cxx b/xmloff/source/draw/xexptran.cxx
index a393533ac6ca..e6781f045ae8 100644
--- a/xmloff/source/draw/xexptran.cxx
+++ b/xmloff/source/draw/xexptran.cxx
@@ -4,9 +4,9 @@
*
* $RCSfile: xexptran.cxx,v $
*
- * $Revision: 1.19 $
+ * $Revision: 1.20 $
*
- * last change: $Author: rt $ $Date: 2005-09-09 13:54:49 $
+ * last change: $Author: vg $ $Date: 2006-04-06 16:15:31 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -1299,7 +1299,7 @@ SdXMLImExPointsElement::SdXMLImExPointsElement(drawing::PointSequence* pPoints,
sal_Int32 nX( pArray->X - rObjectPos.X );
sal_Int32 nY( pArray->Y - rObjectPos.Y );
- if(bScale)
+ if(bScale && rObjectSize.Width && rObjectSize.Height)
{
nX = (nX * rViewBox.GetWidth()) / rObjectSize.Width;
nY = (nY * rViewBox.GetHeight()) / rObjectSize.Height;
@@ -1408,7 +1408,7 @@ SdXMLImExPointsElement::SdXMLImExPointsElement(const OUString& rNew,
nY -= rViewBox.GetY();
}
- if(bScale)
+ if(bScale && rViewBox.GetWidth() && rViewBox.GetHeight() )
{
nX = (nX * rObjectSize.Width) / rViewBox.GetWidth();
nY = (nY * rObjectSize.Height) / rViewBox.GetHeight();
@@ -1466,7 +1466,7 @@ void Imp_PrepareCoorExport(sal_Int32& nX, sal_Int32& nY,
nX = pPointArray->X - rObjectPos.X;
nY = pPointArray->Y - rObjectPos.Y;
- if(bScale)
+ if(bScale && rObjectSize.Width && rObjectSize.Height )
{
nX = (nX * mrViewBox.GetWidth()) / rObjectSize.Width;
nY = (nY * mrViewBox.GetHeight()) / rObjectSize.Height;
@@ -2097,7 +2097,7 @@ void Imp_PrepareCoorImport(sal_Int32& nX, sal_Int32& nY,
nY -= rViewBox.GetY();
}
- if(bScale)
+ if(bScale && rViewBox.GetWidth() && rViewBox.GetHeight())
{
nX = (nX * rObjectSize.Width) / rViewBox.GetWidth();
nY = (nY * rObjectSize.Height) / rViewBox.GetHeight();