summaryrefslogtreecommitdiff
path: root/sw/source/core/unocore
diff options
context:
space:
mode:
authorJens-Heiner Rechtien <hr@openoffice.org>2005-12-28 16:12:52 +0000
committerJens-Heiner Rechtien <hr@openoffice.org>2005-12-28 16:12:52 +0000
commitf0dba1ddef977a0bcfc7d642ac1da385c92af926 (patch)
tree9f1e2449340d5d377e3765a0f2f99ccdd02c86ab /sw/source/core/unocore
parentaa86f5c2951f82801814165416a6f05a216ec0d1 (diff)
INTEGRATION: CWS dbwizardpp1 (1.66.206); FILE MERGED
2005/12/05 18:06:42 bc 1.66.206.2: RESYNC: (1.66-1.68); FILE MERGED 2005/08/16 12:37:04 od 1.66.206.1: #i53320# - <SwXShape::queryInterface(..)> return own implementation, if interface ::XShape is requested - <SwXShape::getPosition()> relative position of group member object is given always in horizontal left-to-right layout in order to get group objects correctly loaded.
Diffstat (limited to 'sw/source/core/unocore')
-rw-r--r--sw/source/core/unocore/unodraw.cxx69
1 files changed, 41 insertions, 28 deletions
diff --git a/sw/source/core/unocore/unodraw.cxx b/sw/source/core/unocore/unodraw.cxx
index c62b1cc4cb69..ee3997bb82c4 100644
--- a/sw/source/core/unocore/unodraw.cxx
+++ b/sw/source/core/unocore/unodraw.cxx
@@ -4,9 +4,9 @@
*
* $RCSfile: unodraw.cxx,v $
*
- * $Revision: 1.68 $
+ * $Revision: 1.69 $
*
- * last change: $Author: hr $ $Date: 2005-09-28 11:22:07 $
+ * last change: $Author: hr $ $Date: 2005-12-28 17:12:52 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -1026,8 +1026,17 @@ SwXShape::~SwXShape()
uno::Any SwXShape::queryInterface( const uno::Type& aType ) throw( uno::RuntimeException )
{
uno::Any aRet = SwXShapeBaseClass::queryInterface(aType);
+ // --> OD 2005-08-15 #i53320# - follow-up of #i31698#
+ // interface com::sun::star::drawing::XShape is overloaded. Thus, provide
+ // correct object instance.
if(!aRet.hasValue() && xShapeAgg.is())
- aRet = xShapeAgg->queryAggregation(aType);
+ {
+ if(aType == ::getCppuType((uno::Reference<XShape>*)0))
+ aRet <<= uno::Reference<XShape>(this);
+ else
+ aRet = xShapeAgg->queryAggregation(aType);
+ }
+ // <--
return aRet;
}
/* -----------------------------16.06.00 12:21--------------------------------
@@ -2145,36 +2154,39 @@ awt::Point SAL_CALL SwXShape::getPosition() throw ( uno::RuntimeException )
// consider the layout direction
const Rectangle aMemberObjRect = GetSvxShape()->GetSdrObject()->GetSnapRect();
const Rectangle aGroupObjRect = pTopGroupObj->GetSnapRect();
- const SwFrmFmt::tLayoutDir eLayoutDir = GetFrmFmt()
- ? GetFrmFmt()->GetLayoutDir()
- : SwFrmFmt::HORI_L2R;
+ // --> OD 2005-08-16 #i53320# - relative position of group member and
+ // top group object is always given in horizontal left-to-right layout.
+// const SwFrmFmt::tLayoutDir eLayoutDir = GetFrmFmt()
+// ? GetFrmFmt()->GetLayoutDir()
+// : SwFrmFmt::HORI_L2R;
awt::Point aOffset( 0, 0 );
- switch ( eLayoutDir )
- {
- case SwFrmFmt::HORI_L2R:
+// switch ( eLayoutDir )
+// {
+// case SwFrmFmt::HORI_L2R:
{
aOffset.X = ( aMemberObjRect.Left() - aGroupObjRect.Left() );
aOffset.Y = ( aMemberObjRect.Top() - aGroupObjRect.Top() );
}
- break;
- case SwFrmFmt::HORI_R2L:
- {
- aOffset.X = ( aGroupObjRect.Right() - aMemberObjRect.Right() );
- aOffset.Y = ( aMemberObjRect.Top() - aGroupObjRect.Top() );
- }
- break;
- case SwFrmFmt::VERT_R2L:
- {
- aOffset.X = ( aMemberObjRect.Top() - aGroupObjRect.Top() );
- aOffset.Y = ( aGroupObjRect.Right() - aMemberObjRect.Right() );
- }
- break;
- default:
- {
- ASSERT( false,
- "<SwXShape::getPosition()> - unsupported layout direction" );
- }
- }
+// break;
+// case SwFrmFmt::HORI_R2L:
+// {
+// aOffset.X = ( aGroupObjRect.Right() - aMemberObjRect.Right() );
+// aOffset.Y = ( aMemberObjRect.Top() - aGroupObjRect.Top() );
+// }
+// break;
+// case SwFrmFmt::VERT_R2L:
+// {
+// aOffset.X = ( aMemberObjRect.Top() - aGroupObjRect.Top() );
+// aOffset.Y = ( aGroupObjRect.Right() - aMemberObjRect.Right() );
+// }
+// break;
+// default:
+// {
+// ASSERT( false,
+// "<SwXShape::getPosition()> - unsupported layout direction" );
+// }
+// }
+ // <--
aOffset.X = TWIP_TO_MM100(aOffset.X);
aOffset.Y = TWIP_TO_MM100(aOffset.Y);
aPos.X += aOffset.X;
@@ -2852,3 +2864,4 @@ sal_Bool SwXGroupShape::hasElements( ) throw(uno::RuntimeException)
return xAcc->hasElements();
}
+