summaryrefslogtreecommitdiff
path: root/sc/source
diff options
context:
space:
mode:
authorNiklas Nebel <nn@openoffice.org>2002-05-02 08:37:39 +0000
committerNiklas Nebel <nn@openoffice.org>2002-05-02 08:37:39 +0000
commit88103f7214188c4cc414c72bf14c7a70fbce7301 (patch)
tree008b7a3d9a867ed799faf056359ab8852d780b68 /sc/source
parent9e133d1570b562c32d299f3bfb6cae409eb3ddb5 (diff)
#98001# don't invalidate location data when setting the same offset again
Diffstat (limited to 'sc/source')
-rw-r--r--sc/source/ui/view/preview.cxx10
1 files changed, 8 insertions, 2 deletions
diff --git a/sc/source/ui/view/preview.cxx b/sc/source/ui/view/preview.cxx
index c6a0256fb7b8..b08fd21aad2b 100644
--- a/sc/source/ui/view/preview.cxx
+++ b/sc/source/ui/view/preview.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: preview.cxx,v $
*
- * $Revision: 1.12 $
+ * $Revision: 1.13 $
*
- * last change: $Author: nn $ $Date: 2002-04-29 18:43:38 $
+ * last change: $Author: nn $ $Date: 2002-05-02 09:37:39 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -678,6 +678,9 @@ USHORT ScPreview::GetOptimalZoom(BOOL bWidthOnly)
void ScPreview::SetXOffset( long nX )
{
+ if ( aOffset.X() == nX )
+ return;
+
if (bValid)
{
long nDif = LogicToPixel(aOffset).X() - LogicToPixel(Point(nX,0)).X();
@@ -701,6 +704,9 @@ void ScPreview::SetXOffset( long nX )
void ScPreview::SetYOffset( long nY )
{
+ if ( aOffset.Y() == nY )
+ return;
+
if (bValid)
{
long nDif = LogicToPixel(aOffset).Y() - LogicToPixel(Point(0,nY)).Y();