summaryrefslogtreecommitdiff
path: root/svx/source/dialog/grfpage.cxx
diff options
context:
space:
mode:
authorjp <jp@openoffice.org>2000-10-12 11:10:35 +0000
committerjp <jp@openoffice.org>2000-10-12 11:10:35 +0000
commit4479a0d9e0ffdaffff814249d7a26f0b68b4f17e (patch)
tree5417b01669021d93aeb5ead6d3bbe9c78b975b88 /svx/source/dialog/grfpage.cxx
parent8bc589f42a5604f202587f3908bca9c17c198541 (diff)
Bug #79388#: ActivatePage - GrfSize must not be set
Diffstat (limited to 'svx/source/dialog/grfpage.cxx')
-rw-r--r--svx/source/dialog/grfpage.cxx17
1 files changed, 10 insertions, 7 deletions
diff --git a/svx/source/dialog/grfpage.cxx b/svx/source/dialog/grfpage.cxx
index 4dc38b1676..b8edde2e27 100644
--- a/svx/source/dialog/grfpage.cxx
+++ b/svx/source/dialog/grfpage.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: grfpage.cxx,v $
*
- * $Revision: 1.3 $
+ * $Revision: 1.4 $
*
- * last change: $Author: pb $ $Date: 2000-10-09 11:40:21 $
+ * last change: $Author: jp $ $Date: 2000-10-12 12:10:35 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -399,11 +399,15 @@ void SvxGrfCropPage::ActivatePage(const SfxItemSet& rSet)
SID_ATTR_GRAF_CROP ) ) );
bSetOrigSize = FALSE;
+
// Size
- const Size& rSize = ((const SvxSizeItem&)rSet.Get(
- SID_ATTR_GRAF_FRMSIZE)).GetSize();
- nOldWidth = rSize.Width();
- nOldHeight = rSize.Height();
+ Size aSize;
+ const SfxPoolItem* pItem;
+ if( SFX_ITEM_SET == rSet.GetItemState( SID_ATTR_GRAF_FRMSIZE, FALSE, &pItem ) )
+ aSize = ((const SvxSizeItem*)pItem)->GetSize();
+
+ nOldWidth = aSize.Width();
+ nOldHeight = aSize.Height();
long nWidth = aWidthMF.Normalize(nOldWidth);
long nHeight = aHeightMF.Normalize(nOldHeight);
@@ -435,7 +439,6 @@ void SvxGrfCropPage::ActivatePage(const SfxItemSet& rSet)
aHeightMF.SaveValue();
bInitialized = TRUE;
- const SfxPoolItem* pItem;
if( SFX_ITEM_SET == rSet.GetItemState( SID_ATTR_GRAF_GRAPHIC, FALSE, &pItem ) )
{
const SvxBrushItem& rBrush = *(SvxBrushItem*)pItem;