summaryrefslogtreecommitdiff
path: root/reportdesign/source/core/inc/Tools.hxx
diff options
context:
space:
mode:
Diffstat (limited to 'reportdesign/source/core/inc/Tools.hxx')
-rw-r--r--reportdesign/source/core/inc/Tools.hxx10
1 files changed, 6 insertions, 4 deletions
diff --git a/reportdesign/source/core/inc/Tools.hxx b/reportdesign/source/core/inc/Tools.hxx
index f61bd095ff2a..81d7a00cf757 100644
--- a/reportdesign/source/core/inc/Tools.hxx
+++ b/reportdesign/source/core/inc/Tools.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -50,6 +50,7 @@ namespace reportdesign
if ( _bOn && !_xSection.is() )
_xSection = new OSection(_xParent,_xParent->getContext(),_bPageSection);
else if ( !_bOn )
+ //_xSection.clear();
::comphelper::disposeComponent(_xSection);
}
@@ -95,7 +96,7 @@ namespace reportdesign
public:
template<typename T> static void setSize(const ::com::sun::star::awt::Size& aSize,T* _pShape)
{
- OSL_ENSURE(aSize.Width >= 0 && aSize.Height >= 0,"Illegal width or height!");
+ OSL_ENSURE(aSize.Width >= 0 && aSize.Height >= 0,"Illegal with or height!");
::osl::MutexGuard aGuard(_pShape->m_aMutex);
if ( _pShape->m_aProps.aComponent.m_xShape.is() )
@@ -117,7 +118,7 @@ namespace reportdesign
if ( _pShape->m_aProps.aComponent.m_xShape.is() )
{
::com::sun::star::awt::Size aSize = _pShape->m_aProps.aComponent.m_xShape->getSize();
- OSL_ENSURE(aSize.Width >= 0 && aSize.Height >= 0,"Illegal width or height!");
+ OSL_ENSURE(aSize.Width >= 0 && aSize.Height >= 0,"Illegal with or height!");
return aSize;
}
return ::com::sun::star::awt::Size(_pShape->m_aProps.aComponent.m_nWidth,_pShape->m_aProps.aComponent.m_nHeight);
@@ -153,6 +154,7 @@ namespace reportdesign
if ( _pShape->m_aProps.aComponent.m_xShape.is() )
{
::com::sun::star::awt::Point aPosition = _pShape->m_aProps.aComponent.m_xShape->getPosition();
+// OSL_ENSURE(aPosition.X >= 0 && aPosition.Y >= 0,"Illegal position!");
return aPosition;
}
return ::com::sun::star::awt::Point(_pShape->m_aProps.aComponent.m_nPosX,_pShape->m_aProps.aComponent.m_nPosY);
@@ -166,7 +168,7 @@ namespace reportdesign
if ( xChild.is() )
xChild->setParent(Parent);
}
- template<typename T> static com::sun::star::uno::Reference< com::sun::star::uno::XInterface > getParent( T* _pShape )
+ template<typename T> static com::sun::star::uno::Reference< com::sun::star::uno::XInterface > getParent( T* _pShape )
{
::osl::MutexGuard aGuard(_pShape->m_aMutex);
::com::sun::star::uno::Reference< ::com::sun::star::container::XChild > xChild;