summaryrefslogtreecommitdiff
path: root/sc/source/ui/app/client.cxx
diff options
context:
space:
mode:
authorJens-Heiner Rechtien <hr@openoffice.org>2004-02-03 11:33:28 +0000
committerJens-Heiner Rechtien <hr@openoffice.org>2004-02-03 11:33:28 +0000
commit93a9959c08ac3f230066d0d99088c83fcb603c5c (patch)
tree24a8c63655e20678bc74648065caf9a720472db8 /sc/source/ui/app/client.cxx
parent818fa7f81b4f951a90c181e8d99f9e30f80bf935 (diff)
INTEGRATION: CWS calcrtl (1.8.82); FILE MERGED
2003/07/30 18:24:46 nn 1.8.82.1: #106948# RTL: RequestObjAreaPixel
Diffstat (limited to 'sc/source/ui/app/client.cxx')
-rw-r--r--sc/source/ui/app/client.cxx48
1 files changed, 29 insertions, 19 deletions
diff --git a/sc/source/ui/app/client.cxx b/sc/source/ui/app/client.cxx
index acb081258a1c..3d6f8a81fbe4 100644
--- a/sc/source/ui/app/client.cxx
+++ b/sc/source/ui/app/client.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: client.cxx,v $
*
- * $Revision: 1.8 $
+ * $Revision: 1.9 $
*
- * last change: $Author: nn $ $Date: 2002-10-30 14:47:33 $
+ * last change: $Author: hr $ $Date: 2004-02-03 12:33:28 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -155,38 +155,48 @@ void __EXPORT ScClient::RequestObjAreaPixel( const Rectangle& rObjRect )
SdrPage* pPage = pModel->GetPage(nTab);
if (pPage)
{
+ Point aPos;
Size aSize = pPage->GetSize();
- if (aLogicRect.Right() >= aSize.Width()) // rechts
+ if ( aSize.Width() < 0 )
{
- long nDiff = aLogicRect.Right() - aSize.Width() + 1;
+ aPos.X() = aSize.Width() + 1; // negative
+ aSize.Width() = -aSize.Width(); // positive
+ }
+ Rectangle aPageRect( aPos, aSize );
+
+ if (aLogicRect.Right() > aPageRect.Right())
+ {
+ long nDiff = aLogicRect.Right() - aPageRect.Right();
aLogicRect.Left() -= nDiff;
aLogicRect.Right() -= nDiff;
bChange = TRUE;
}
- if (aLogicRect.Bottom() >= aSize.Height()) // unten
+ if (aLogicRect.Bottom() > aPageRect.Bottom())
{
- long nDiff = aLogicRect.Bottom() - aSize.Height() + 1;
+ long nDiff = aLogicRect.Bottom() - aPageRect.Bottom();
aLogicRect.Top() -= nDiff;
aLogicRect.Bottom() -= nDiff;
bChange = TRUE;
}
+
+ if (aLogicRect.Left() < aPageRect.Left())
+ {
+ long nDiff = aLogicRect.Left() - aPageRect.Left();
+ aLogicRect.Right() -= nDiff;
+ aLogicRect.Left() -= nDiff;
+ bChange = TRUE;
+ }
+ if (aLogicRect.Top() < aPageRect.Top())
+ {
+ long nDiff = aLogicRect.Top() - aPageRect.Top();
+ aLogicRect.Bottom() -= nDiff;
+ aLogicRect.Top() -= nDiff;
+ bChange = TRUE;
+ }
}
else
DBG_ERROR("RequestObjAreaPixel: Page ist weg");
- if (aLogicRect.Left() < 0) // links
- {
- aLogicRect.Right() -= aLogicRect.Left();
- aLogicRect.Left() = 0;
- bChange = TRUE;
- }
- if (aLogicRect.Top() < 0) // oben
- {
- aLogicRect.Bottom() -= aLogicRect.Top();
- aLogicRect.Top() = 0;
- bChange = TRUE;
- }
-
// wieder in Pixel umrechnen
if (bChange)