summaryrefslogtreecommitdiff
path: root/sc/source/ui/app/client.cxx
diff options
context:
space:
mode:
authorIvo Hinkelmann <ihi@openoffice.org>2007-04-19 08:23:04 +0000
committerIvo Hinkelmann <ihi@openoffice.org>2007-04-19 08:23:04 +0000
commita4817277f24c137c5fe2b5e5a2a461acd49814da (patch)
treecc8e1d951eab600d4d6a20157c9eb7989aab3e0c /sc/source/ui/app/client.cxx
parent906f08b5fa25b95927af88ed8d03eb9ea81616cd (diff)
INTEGRATION: CWS fwk64 (1.17.6); FILE MERGED
2007/03/25 18:13:38 mav 1.17.6.2: RESYNC: (1.17-1.18); FILE MERGED 2007/03/20 11:31:54 mav 1.17.6.1: #107330# check objects for size and position protection
Diffstat (limited to 'sc/source/ui/app/client.cxx')
-rw-r--r--sc/source/ui/app/client.cxx22
1 files changed, 14 insertions, 8 deletions
diff --git a/sc/source/ui/app/client.cxx b/sc/source/ui/app/client.cxx
index 0e098c443202..a9f39ac79480 100644
--- a/sc/source/ui/app/client.cxx
+++ b/sc/source/ui/app/client.cxx
@@ -4,9 +4,9 @@
*
* $RCSfile: client.cxx,v $
*
- * $Revision: 1.18 $
+ * $Revision: 1.19 $
*
- * last change: $Author: vg $ $Date: 2007-02-27 12:57:24 $
+ * last change: $Author: ihi $ $Date: 2007-04-19 09:23:04 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -116,10 +116,20 @@ void __EXPORT ScClient::RequestNewObjectArea( Rectangle& aLogicRect )
return;
}
- BOOL bChange = FALSE;
+ Rectangle aOldRect = GetObjArea();
+ SdrOle2Obj* pDrawObj = GetDrawObj();
+ if ( pDrawObj )
+ {
+ if ( pDrawObj->IsResizeProtect() )
+ aLogicRect.SetSize( aOldRect.GetSize() );
+
+ if ( pDrawObj->IsMoveProtect() )
+ aLogicRect.SetPos( aOldRect.TopLeft() );
+ }
+
USHORT nTab = pViewSh->GetViewData()->GetTabNo();
SdrPage* pPage = pModel->GetPage(static_cast<sal_uInt16>(static_cast<sal_Int16>(nTab)));
- if (pPage)
+ if ( pPage && aLogicRect != aOldRect )
{
Point aPos;
Size aSize = pPage->GetSize();
@@ -135,14 +145,12 @@ void __EXPORT ScClient::RequestNewObjectArea( Rectangle& aLogicRect )
long nDiff = aLogicRect.Right() - aPageRect.Right();
aLogicRect.Left() -= nDiff;
aLogicRect.Right() -= nDiff;
- bChange = TRUE;
}
if (aLogicRect.Bottom() > aPageRect.Bottom())
{
long nDiff = aLogicRect.Bottom() - aPageRect.Bottom();
aLogicRect.Top() -= nDiff;
aLogicRect.Bottom() -= nDiff;
- bChange = TRUE;
}
if (aLogicRect.Left() < aPageRect.Left())
@@ -150,14 +158,12 @@ void __EXPORT ScClient::RequestNewObjectArea( Rectangle& aLogicRect )
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;
}
}
}