summaryrefslogtreecommitdiff
path: root/svx/source/unodraw/unopage.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'svx/source/unodraw/unopage.cxx')
-rwxr-xr-x[-rw-r--r--]svx/source/unodraw/unopage.cxx23
1 files changed, 11 insertions, 12 deletions
diff --git a/svx/source/unodraw/unopage.cxx b/svx/source/unodraw/unopage.cxx
index e893128d797a..ab100043a552 100644..100755
--- a/svx/source/unodraw/unopage.cxx
+++ b/svx/source/unodraw/unopage.cxx
@@ -50,15 +50,16 @@
#include <svx/svdpagv.hxx>
#include <svx/unopage.hxx>
#include "shapeimpl.hxx"
-#include "globl3d.hxx"
+#include "svx/globl3d.hxx"
#include <svx/polysc3d.hxx>
#include <svx/unoprov.hxx>
#include <svx/svdopath.hxx>
-#include "unoapi.hxx"
+#include "svx/unoapi.hxx"
#include <svx/svdomeas.hxx>
#include <svx/extrud3d.hxx>
#include <svx/lathe3d.hxx>
#include <vcl/svapp.hxx>
+#include <tools/diagnose_ex.h>
using ::rtl::OUString;
using namespace ::cppu;
@@ -299,7 +300,7 @@ void SAL_CALL SvxDrawPage::add( const uno::Reference< drawing::XShape >& xShape
{
SolarMutexGuard aGuard;
- if( (mpModel == 0) || (mpPage == 0) )
+ if ( ( mpModel == NULL ) || ( mpPage == NULL ) )
throw lang::DisposedException();
SvxShape* pShape = SvxShape::getImplementation( xShape );
@@ -312,6 +313,7 @@ void SAL_CALL SvxDrawPage::add( const uno::Reference< drawing::XShape >& xShape
if(!pObj)
{
pObj = CreateSdrObject( xShape );
+ ENSURE_OR_RETURN_VOID( pObj != NULL, "SvxDrawPage::add: no SdrObject was created!" );
}
else if ( !pObj->IsInserted() )
{
@@ -319,13 +321,10 @@ void SAL_CALL SvxDrawPage::add( const uno::Reference< drawing::XShape >& xShape
mpPage->InsertObject( pObj );
}
- if(pObj == NULL)
- return;
-
pShape->Create( pObj, this );
+ OSL_ENSURE( pShape->GetSdrObject() == pObj, "SvxDrawPage::add: shape does not know about its newly created SdrObject!" );
- if( mpModel )
- mpModel->SetChanged();
+ mpModel->SetChanged();
}
//----------------------------------------------------------------------
@@ -438,7 +437,7 @@ namespace
//----------------------------------------------------------------------
// ACHTUNG: _SelectObjectsInView selektiert die ::com::sun::star::drawing::Shapes nur in der angegebennen
-// SdrPageView. Dies mu nicht die sichtbare SdrPageView sein.
+// SdrPageView. Dies mu� nicht die sichtbare SdrPageView sein.
//----------------------------------------------------------------------
void SvxDrawPage::_SelectObjectsInView( const Reference< drawing::XShapes > & aShapes, SdrPageView* pPageView ) throw ()
{
@@ -462,7 +461,7 @@ void SvxDrawPage::_SelectObjectsInView( const Reference< drawing::XShapes > & aS
//----------------------------------------------------------------------
// ACHTUNG: _SelectObjectInView selektiert das Shape *nur* in der angegebennen
-// SdrPageView. Dies mu nicht die sichtbare SdrPageView sein.
+// SdrPageView. Dies mu� nicht die sichtbare SdrPageView sein.
//----------------------------------------------------------------------
void SvxDrawPage::_SelectObjectInView( const Reference< drawing::XShape > & xShape, SdrPageView* pPageView ) throw()
{
@@ -617,7 +616,7 @@ SdrObject *SvxDrawPage::_CreateSdrObject( const Reference< drawing::XShape > & x
aNewPolygon.setClosed(true);
pObj->SetExtrudePolygon(basegfx::B2DPolyPolygon(aNewPolygon));
- // #107245# pObj->SetExtrudeCharacterMode(TRUE);
+ // #107245# pObj->SetExtrudeCharacterMode(sal_True);
pObj->SetMergedItem(Svx3DCharacterModeItem(sal_True));
}
else if(pNewObj->ISA(E3dLatheObj))
@@ -630,7 +629,7 @@ SdrObject *SvxDrawPage::_CreateSdrObject( const Reference< drawing::XShape > & x
aNewPolygon.setClosed(true);
pObj->SetPolyPoly2D(basegfx::B2DPolyPolygon(aNewPolygon));
- // #107245# pObj->SetLatheCharacterMode(TRUE);
+ // #107245# pObj->SetLatheCharacterMode(sal_True);
pObj->SetMergedItem(Svx3DCharacterModeItem(sal_True));
}
}