svdobj.cxx (db3fbf26) svdobj.cxx (f59b791f)
1/**************************************************************
2 *
3 * Licensed to the Apache Software Foundation (ASF) under one
4 * or more contributor license agreements. See the NOTICE file
5 * distributed with this work for additional information
6 * regarding copyright ownership. The ASF licenses this file
7 * to you under the Apache License, Version 2.0 (the
8 * "License"); you may not use this file except in compliance

--- 2900 unchanged lines hidden (view full) ---

2909{
2910 maWeakUnoShape = _rxUnoShape;
2911 mpSvxShape = SvxShape::getImplementation( _rxUnoShape );
2912// OSL_ENSURE( mpSvxShape || !_rxUnoShape.is(),
2913// "SdrObject::setUnoShape: not sure it's a good idea to have an XShape which is not implemented by SvxShape ..." );
2914}
2915
2916/** only for internal use! */
1/**************************************************************
2 *
3 * Licensed to the Apache Software Foundation (ASF) under one
4 * or more contributor license agreements. See the NOTICE file
5 * distributed with this work for additional information
6 * regarding copyright ownership. The ASF licenses this file
7 * to you under the Apache License, Version 2.0 (the
8 * "License"); you may not use this file except in compliance

--- 2900 unchanged lines hidden (view full) ---

2909{
2910 maWeakUnoShape = _rxUnoShape;
2911 mpSvxShape = SvxShape::getImplementation( _rxUnoShape );
2912// OSL_ENSURE( mpSvxShape || !_rxUnoShape.is(),
2913// "SdrObject::setUnoShape: not sure it's a good idea to have an XShape which is not implemented by SvxShape ..." );
2914}
2915
2916/** only for internal use! */
2917SvxShape* SdrObject::getSvxShape() const
2917SvxShape* SdrObject::getSvxShape()
2918{
2919 DBG_TESTSOLARMUTEX();
2920 // retrieving the impl pointer and subsequently using it is not thread-safe, of course, so it needs to be
2921 // guarded by the SolarMutex
2922
2918{
2919 DBG_TESTSOLARMUTEX();
2920 // retrieving the impl pointer and subsequently using it is not thread-safe, of course, so it needs to be
2921 // guarded by the SolarMutex
2922
2923#if OSL_DEBUG_LEVE > 0
2924 uno::Reference< uno::XInterface > xShape( maWeakUnoShape );
2923 uno::Reference< uno::XInterface > xShape( maWeakUnoShape );
2925 OSL_ENSURE( !( !xShapeGuard.is() && mpSvxShape ),
2924#if OSL_DEBUG_LEVE > 0
2925 OSL_ENSURE( !( !xShape.is() && mpSvxShape ),
2926 "SdrObject::getSvxShape: still having IMPL-Pointer to dead object!" );
2927#endif
2926 "SdrObject::getSvxShape: still having IMPL-Pointer to dead object!" );
2927#endif
2928 //#113608#, make sure mpSvxShape is always synchronized with maWeakUnoShape
2929 if ( mpSvxShape && !xShape.is() )
2930 mpSvxShape = NULL;
2928
2929 return mpSvxShape;
2930}
2931
2932::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SdrObject::getUnoShape()
2933{
2934 // try weak reference first
2935 uno::Reference< uno::XInterface > xShape( getWeakUnoShape() );

--- 371 unchanged lines hidden ---
2931
2932 return mpSvxShape;
2933}
2934
2935::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SdrObject::getUnoShape()
2936{
2937 // try weak reference first
2938 uno::Reference< uno::XInterface > xShape( getWeakUnoShape() );

--- 371 unchanged lines hidden ---