Kaydet (Commit) b9de0474 authored tarafından Noel Grandin's avatar Noel Grandin

loplugin:flatten in scaddins..sd

Change-Id: I190323ce910224f883c4370b2c752644a5a35edd
Reviewed-on: https://gerrit.libreoffice.org/42626Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarNoel Grandin <noel.grandin@collabora.co.uk>
üst 448e9da1
......@@ -39,6 +39,7 @@ private:
SourceRange ignoreMacroExpansions(SourceRange range);
SourceRange extendOverComments(SourceRange range);
std::string getSourceAsString(SourceRange range);
std::string invertCondition(Expr const * condExpr, SourceRange conditionRange);
};
static const Stmt * containsSingleThrowExpr(const Stmt * stmt)
......@@ -131,14 +132,7 @@ bool Flatten::rewrite(const IfStmt* ifStmt)
// in adjusting the formatting I assume that "{" starts on a new line
std::string conditionString = getSourceAsString(conditionRange);
auto condExpr = ifStmt->getCond()->IgnoreImpCasts();
if (auto exprWithCleanups = dyn_cast<ExprWithCleanups>(condExpr))
condExpr = exprWithCleanups->getSubExpr()->IgnoreImpCasts();
if (isa<DeclRefExpr>(condExpr) || isa<CallExpr>(condExpr) || isa<MemberExpr>(condExpr))
conditionString = "!" + conditionString;
else
conditionString = "!(" + conditionString + ")";
std::string conditionString = invertCondition(ifStmt->getCond(), conditionRange);
std::string thenString = getSourceAsString(thenRange);
if (auto compoundStmt = dyn_cast<CompoundStmt>(ifStmt->getThen())) {
......@@ -166,6 +160,32 @@ bool Flatten::rewrite(const IfStmt* ifStmt)
return true;
}
std::string Flatten::invertCondition(Expr const * condExpr, SourceRange conditionRange)
{
std::string s = getSourceAsString(conditionRange);
condExpr = condExpr->IgnoreImpCasts();
if (auto exprWithCleanups = dyn_cast<ExprWithCleanups>(condExpr))
condExpr = exprWithCleanups->getSubExpr()->IgnoreImpCasts();
if (auto unaryOp = dyn_cast<UnaryOperator>(condExpr))
{
if (unaryOp->getOpcode() != UO_LNot)
return "!(" + s + ")";
auto i = s.find("!");
assert (i != std::string::npos);
s = s.substr(i+1);
}
else if (isa<CXXOperatorCallExpr>(condExpr))
s = "!(" + s + ")";
else if (isa<DeclRefExpr>(condExpr) || isa<CallExpr>(condExpr) || isa<MemberExpr>(condExpr))
s = "!" + s;
else
s = "!(" + s + ")";
return s;
}
std::string stripOpenAndCloseBrace(std::string s)
{
size_t i = s.find("{");
......
......@@ -22,7 +22,7 @@
#define CHK_Freq ( nFreq != 1 && nFreq != 2 && nFreq != 4 )
#define CHK_FINITE(d) if( !::rtl::math::isFinite( d ) ) throw css::lang::IllegalArgumentException()
#define RETURN_FINITE(d) if( ::rtl::math::isFinite( d ) ) return d; else throw css::lang::IllegalArgumentException()
#define RETURN_FINITE(d) if( !::rtl::math::isFinite( d ) ) throw css::lang::IllegalArgumentException(); return d;
#endif
......
......@@ -686,18 +686,15 @@ double ConvertToDec( const OUString& aStr, sal_uInt16 nBase, sal_uInt16 nCharLim
else
n = nBase;
if( n < nBase )
if( n >= nBase )
throw lang::IllegalArgumentException(); // illegal char!
if( bFirstDig )
{
if( bFirstDig )
{
bFirstDig = false;
nFirstDig = n;
}
fVal = fVal * fBase + double( n );
bFirstDig = false;
nFirstDig = n;
}
else
// illegal char!
throw lang::IllegalArgumentException();
fVal = fVal * fBase + double( n );
p++;
......@@ -1504,20 +1501,18 @@ void SortedIndividualInt32List::InsertHolidayList(
if( rHolAny.getValueTypeClass() == uno::TypeClass_SEQUENCE )
{
uno::Sequence< uno::Sequence< uno::Any > > aAnySeq;
if( rHolAny >>= aAnySeq )
if( !(rHolAny >>= aAnySeq) )
throw lang::IllegalArgumentException();
const uno::Sequence< uno::Any >* pSeqArray = aAnySeq.getConstArray();
for( sal_Int32 nIndex1 = 0; nIndex1 < aAnySeq.getLength(); nIndex1++ )
{
const uno::Sequence< uno::Any >* pSeqArray = aAnySeq.getConstArray();
for( sal_Int32 nIndex1 = 0; nIndex1 < aAnySeq.getLength(); nIndex1++ )
{
const uno::Sequence< uno::Any >& rSubSeq = pSeqArray[ nIndex1 ];
const uno::Any* pAnyArray = rSubSeq.getConstArray();
const uno::Sequence< uno::Any >& rSubSeq = pSeqArray[ nIndex1 ];
const uno::Any* pAnyArray = rSubSeq.getConstArray();
for( sal_Int32 nIndex2 = 0; nIndex2 < rSubSeq.getLength(); nIndex2++ )
InsertHolidayList( rAnyConv, pAnyArray[ nIndex2 ], nNullDate, false/*bInsertOnWeekend*/ );
}
for( sal_Int32 nIndex2 = 0; nIndex2 < rSubSeq.getLength(); nIndex2++ )
InsertHolidayList( rAnyConv, pAnyArray[ nIndex2 ], nNullDate, false/*bInsertOnWeekend*/ );
}
else
throw lang::IllegalArgumentException();
}
else
InsertHolidayList( rAnyConv, rHolAny, nNullDate, false/*bInsertOnWeekend*/ );
......@@ -1751,13 +1746,10 @@ void Complex::Power( double fPower )
{
if( r == 0.0 && i == 0.0 )
{
if( fPower > 0 )
{
r = i = 0.0;
return;
}
else
if( fPower <= 0 )
throw lang::IllegalArgumentException();
r = i = 0.0;
return;
}
double p, phi;
......@@ -2102,15 +2094,13 @@ void ComplexList::Append( const uno::Sequence< uno::Any >& aMultPars, ComplListA
case uno::TypeClass_SEQUENCE:
{
uno::Sequence< uno::Sequence< uno::Any > > aValArr;
if( r >>= aValArr )
{
sal_Int32 nE = aValArr.getLength();
const uno::Sequence< uno::Any >* pArr = aValArr.getConstArray();
for( sal_Int32 n = 0 ; n < nE ; n++ )
Append( pArr[ n ], eAH );
}
else
if( !(r >>= aValArr) )
throw lang::IllegalArgumentException();
sal_Int32 nE = aValArr.getLength();
const uno::Sequence< uno::Any >* pArr = aValArr.getConstArray();
for( sal_Int32 n = 0 ; n < nE ; n++ )
Append( pArr[ n ], eAH );
}
break;
default:
......@@ -2558,10 +2548,10 @@ double ConvertDataList::Convert( double fVal, const OUString& rFrom, const OUStr
++it;
}
if( pFrom && pTo )
return pFrom->Convert( fVal, *pTo, nLevelFrom, nLevelTo );
else
if( !pFrom || !pTo )
throw lang::IllegalArgumentException();
return pFrom->Convert( fVal, *pTo, nLevelFrom, nLevelTo );
}
......
......@@ -74,10 +74,9 @@ double BesselJ( double x, sal_Int32 N )
bool bAsymptoticPossible = pow(fX,0.4) > N;
if (fEstimateIteration > fMaxIteration)
{
if (bAsymptoticPossible)
return fSign * sqrt(f_2_DIV_PI/fX)* cos(fX-N*f_PI_DIV_2-f_PI_DIV_4);
else
if (!bAsymptoticPossible)
throw NoConvergenceException();
return fSign * sqrt(f_2_DIV_PI/fX)* cos(fX-N*f_PI_DIV_2-f_PI_DIV_4);
}
double const epsilon = 1.0e-15; // relative error
......@@ -148,10 +147,10 @@ double BesselJ( double x, sal_Int32 N )
k = k + 1.0;
}
while (!bHasfound && k <= fMaxIteration);
if (bHasfound)
return u * fSign;
else
if (!bHasfound)
throw NoConvergenceException(); // unlikely to happen
return u * fSign;
}
......@@ -367,10 +366,9 @@ double Bessely0( double fX )
k=k+1;
}
while (!bHasFound && k<fMaxIteration);
if (bHasFound)
return u*f_2_DIV_PI;
else
if (!bHasFound)
throw NoConvergenceException(); // not likely to happen
return u*f_2_DIV_PI;
}
// See #i31656# for a commented version of this implementation, attachment #desc6
......@@ -423,10 +421,9 @@ double Bessely1( double fX )
k=k+1;
}
while (!bHasFound && k<fMaxIteration);
if (bHasFound)
return -u*2.0/f_PI;
else
if (!bHasFound)
throw NoConvergenceException();
return -u*2.0/f_PI;
}
double BesselY( double fNum, sal_Int32 nOrder )
......
......@@ -38,7 +38,7 @@
#include <com/sun/star/sheet/addin/XPricingFunctions.hpp>
#include <cppuhelper/implbase.hxx>
#define RETURN_FINITE(d) if( ::rtl::math::isFinite( d ) ) return d; else throw css::lang::IllegalArgumentException()
#define RETURN_FINITE(d) if( !::rtl::math::isFinite( d ) ) throw css::lang::IllegalArgumentException(); return d;
namespace sca {
......
......@@ -185,80 +185,79 @@ namespace basprov
Any BasicMethodNodeImpl::invoke( const OUString& aFunctionName, const Sequence< Any >&,
Sequence< sal_Int16 >&, Sequence< Any >& )
{
if ( aFunctionName == BASPROV_PROPERTY_EDITABLE )
if ( aFunctionName != BASPROV_PROPERTY_EDITABLE )
{
OUString sDocURL, sLibName, sModName;
sal_uInt16 nLine1 = 0, nLine2;
throw IllegalArgumentException(
"BasicMethodNodeImpl::invoke: function name not supported!",
Reference< XInterface >(), 1 );
}
if ( !m_bIsAppScript )
{
Reference< frame::XModel > xModel = MiscUtils::tDocUrlToModel( m_sScriptingContext );
OUString sDocURL, sLibName, sModName;
sal_uInt16 nLine1 = 0, nLine2;
if ( !m_bIsAppScript )
{
Reference< frame::XModel > xModel = MiscUtils::tDocUrlToModel( m_sScriptingContext );
if ( xModel.is() )
if ( xModel.is() )
{
sDocURL = xModel->getURL();
if ( sDocURL.isEmpty() )
{
sDocURL = xModel->getURL();
if ( sDocURL.isEmpty() )
Sequence < PropertyValue > aProps = xModel->getArgs();
sal_Int32 nProps = aProps.getLength();
const PropertyValue* pProps = aProps.getConstArray();
for ( sal_Int32 i = 0; i < nProps; ++i )
{
Sequence < PropertyValue > aProps = xModel->getArgs();
sal_Int32 nProps = aProps.getLength();
const PropertyValue* pProps = aProps.getConstArray();
for ( sal_Int32 i = 0; i < nProps; ++i )
// TODO: according to MBA the property 'Title' may change in future
if ( pProps[i].Name == "Title" )
{
// TODO: according to MBA the property 'Title' may change in future
if ( pProps[i].Name == "Title" )
{
pProps[i].Value >>= sDocURL;
break;
}
pProps[i].Value >>= sDocURL;
break;
}
}
}
}
}
if ( m_pMethod )
if ( m_pMethod )
{
m_pMethod->GetLineRange( nLine1, nLine2 );
SbModule* pModule = m_pMethod->GetModule();
if ( pModule )
{
m_pMethod->GetLineRange( nLine1, nLine2 );
SbModule* pModule = m_pMethod->GetModule();
if ( pModule )
{
sModName = pModule->GetName();
StarBASIC* pBasic = static_cast< StarBASIC* >( pModule->GetParent() );
if ( pBasic )
sLibName = pBasic->GetName();
}
sModName = pModule->GetName();
StarBASIC* pBasic = static_cast< StarBASIC* >( pModule->GetParent() );
if ( pBasic )
sLibName = pBasic->GetName();
}
}
if ( m_xContext.is() )
{
Reference< frame::XDesktop2 > xDesktop = frame::Desktop::create( m_xContext );
if ( m_xContext.is() )
{
Reference< frame::XDesktop2 > xDesktop = frame::Desktop::create( m_xContext );
Reference < frame::XDispatchProvider > xProv( xDesktop->getCurrentFrame(), UNO_QUERY );
Reference < frame::XDispatchProvider > xProv( xDesktop->getCurrentFrame(), UNO_QUERY );
if ( xProv.is() )
{
Reference< frame::XDispatchHelper > xHelper( frame::DispatchHelper::create( m_xContext ) );
Sequence < PropertyValue > aArgs(7);
aArgs[0].Name = "Document";
aArgs[0].Value <<= sDocURL;
aArgs[1].Name = "LibName";
aArgs[1].Value <<= sLibName;
aArgs[2].Name = "Name";
aArgs[2].Value <<= sModName;
aArgs[3].Name = "Type";
aArgs[3].Value <<= OUString("Module");
aArgs[4].Name = "Line";
aArgs[4].Value <<= static_cast< sal_uInt32 >( nLine1 );
xHelper->executeDispatch( xProv, ".uno:BasicIDEAppear", OUString(), 0, aArgs );
}
if ( xProv.is() )
{
Reference< frame::XDispatchHelper > xHelper( frame::DispatchHelper::create( m_xContext ) );
Sequence < PropertyValue > aArgs(7);
aArgs[0].Name = "Document";
aArgs[0].Value <<= sDocURL;
aArgs[1].Name = "LibName";
aArgs[1].Value <<= sLibName;
aArgs[2].Name = "Name";
aArgs[2].Value <<= sModName;
aArgs[3].Name = "Type";
aArgs[3].Value <<= OUString("Module");
aArgs[4].Name = "Line";
aArgs[4].Value <<= static_cast< sal_uInt32 >( nLine1 );
xHelper->executeDispatch( xProv, ".uno:BasicIDEAppear", OUString(), 0, aArgs );
}
}
else
{
throw IllegalArgumentException(
"BasicMethodNodeImpl::invoke: function name not supported!",
Reference< XInterface >(), 1 );
}
return Any();
}
......
......@@ -335,19 +335,14 @@ namespace dlgprov
if ( !m_xEventAttacher.is() )
{
Reference< XMultiComponentFactory > xSMgr( m_xContext->getServiceManager() );
if ( xSMgr.is() )
{
m_xEventAttacher.set( xSMgr->createInstanceWithContext(
"com.sun.star.script.EventAttacher", m_xContext ), UNO_QUERY );
if ( !m_xEventAttacher.is() )
throw ServiceNotRegisteredException();
}
else
{
if ( !xSMgr.is() )
throw RuntimeException();
}
m_xEventAttacher.set( xSMgr->createInstanceWithContext(
"com.sun.star.script.EventAttacher", m_xContext ), UNO_QUERY );
if ( !m_xEventAttacher.is() )
throw ServiceNotRegisteredException();
}
}
OUString sDialogCodeName;
......
......@@ -300,23 +300,7 @@ MasterScriptProvider::getScript( const OUString& scriptURI )
buf.append( "com.sun.star.script.provider.ScriptProviderFor");
buf.append( language );
OUString serviceName = buf.makeStringAndClear();
if ( providerCache() )
{
try
{
xScriptProvider.set(
providerCache()->getProvider( serviceName ),
UNO_QUERY_THROW );
}
catch( const Exception& e )
{
throw provider::ScriptFrameworkErrorException(
e.Message, Reference< XInterface >(),
sfUri->getName(), language,
provider::ScriptFrameworkErrorType::NOTSUPPORTED );
}
}
else
if ( !providerCache() )
{
throw provider::ScriptFrameworkErrorException(
"No LanguageProviders detected",
......@@ -324,6 +308,21 @@ MasterScriptProvider::getScript( const OUString& scriptURI )
sfUri->getName(), language,
provider::ScriptFrameworkErrorType::NOTSUPPORTED );
}
try
{
xScriptProvider.set(
providerCache()->getProvider( serviceName ),
UNO_QUERY_THROW );
}
catch( const Exception& e )
{
throw provider::ScriptFrameworkErrorException(
e.Message, Reference< XInterface >(),
sfUri->getName(), language,
provider::ScriptFrameworkErrorType::NOTSUPPORTED );
}
xScript=xScriptProvider->getScript( scriptURI );
}
else
......@@ -457,16 +456,13 @@ MasterScriptProvider::insertByName( const OUString& aName, const Any& aElement )
{
if ( !m_bIsPkgMSP )
{
if ( m_xMSPPkg.is() )
{
Reference< container::XNameContainer > xCont( m_xMSPPkg, UNO_QUERY_THROW );
xCont->insertByName( aName, aElement );
}
else
if ( !m_xMSPPkg.is() )
{
throw RuntimeException( "PackageMasterScriptProvider is unitialised" );
}
Reference< container::XNameContainer > xCont( m_xMSPPkg, UNO_QUERY_THROW );
xCont->insertByName( aName, aElement );
}
else
{
......@@ -529,16 +525,13 @@ MasterScriptProvider::removeByName( const OUString& Name )
{
if ( !m_bIsPkgMSP )
{
if ( m_xMSPPkg.is() )
{
Reference< container::XNameContainer > xCont( m_xMSPPkg, UNO_QUERY_THROW );
xCont->removeByName( Name );
}
else
if ( !m_xMSPPkg.is() )
{
throw RuntimeException( "PackageMasterScriptProvider is unitialised" );
}
Reference< container::XNameContainer > xCont( m_xMSPPkg, UNO_QUERY_THROW );
xCont->removeByName( Name );
}
else
{
......
......@@ -485,22 +485,20 @@ void SdStyleFamily::setPropertyValue( const OUString& , const Any& )
Any SdStyleFamily::getPropertyValue( const OUString& PropertyName )
{
if ( PropertyName == "DisplayName" )
if ( PropertyName != "DisplayName" )
{
SolarMutexGuard aGuard;
OUString sDisplayName;
switch( mnFamily )
{
case SD_STYLE_FAMILY_MASTERPAGE: sDisplayName = getName(); break;
case SD_STYLE_FAMILY_CELL: sDisplayName = SdResId(STR_CELL_STYLE_FAMILY); break;
default: sDisplayName = SdResId(STR_GRAPHICS_STYLE_FAMILY); break;
}
return Any( sDisplayName );
throw UnknownPropertyException( "unknown property: " + PropertyName, static_cast<OWeakObject *>(this) );
}
else
SolarMutexGuard aGuard;
OUString sDisplayName;
switch( mnFamily )
{
throw UnknownPropertyException( "unknown property: " + PropertyName, static_cast<OWeakObject *>(this) );
case SD_STYLE_FAMILY_MASTERPAGE: sDisplayName = getName(); break;
case SD_STYLE_FAMILY_CELL: sDisplayName = SdResId(STR_CELL_STYLE_FAMILY); break;
default: sDisplayName = SdResId(STR_GRAPHICS_STYLE_FAMILY); break;
}
return Any( sDisplayName );
}
void SdStyleFamily::addPropertyChangeListener( const OUString& , const Reference<XPropertyChangeListener>& )
......
......@@ -219,14 +219,12 @@ uno::Reference<XAccessible> SAL_CALL
aGuard.clear();
// Forward request to children manager.
if (pChildrenManager != nullptr)
{
return pChildrenManager->GetChild (nIndex);
}
else
if (pChildrenManager == nullptr)
throw lang::IndexOutOfBoundsException (
"no accessible child with index " + OUString::number(nIndex),
static_cast<uno::XWeak*>(this));
return pChildrenManager->GetChild (nIndex);
}
OUString SAL_CALL
......
......@@ -499,10 +499,10 @@ void SAL_CALL AccessibleSlideSorterView::selectAccessibleChild (sal_Int32 nChild
const SolarMutexGuard aSolarGuard;
AccessibleSlideSorterObject* pChild = mpImpl->GetAccessibleChild(nChildIndex);
if (pChild != nullptr)
mrSlideSorter.GetController().GetPageSelector().SelectPage(pChild->GetPageNumber());
else
if (pChild == nullptr)
throw lang::IndexOutOfBoundsException();
mrSlideSorter.GetController().GetPageSelector().SelectPage(pChild->GetPageNumber());
}
sal_Bool SAL_CALL AccessibleSlideSorterView::isAccessibleChildSelected (sal_Int32 nChildIndex)
......@@ -512,12 +512,12 @@ sal_Bool SAL_CALL AccessibleSlideSorterView::isAccessibleChildSelected (sal_Int3
const SolarMutexGuard aSolarGuard;
AccessibleSlideSorterObject* pChild = mpImpl->GetAccessibleChild(nChildIndex);
if (pChild != nullptr)
bIsSelected = mrSlideSorter.GetController().GetPageSelector().IsPageSelected(
pChild->GetPageNumber());
else
if (pChild == nullptr)
throw lang::IndexOutOfBoundsException();
bIsSelected = mrSlideSorter.GetController().GetPageSelector().IsPageSelected(
pChild->GetPageNumber());
return bIsSelected;
}
......@@ -578,10 +578,10 @@ void SAL_CALL AccessibleSlideSorterView::deselectAccessibleChild (sal_Int32 nChi
const SolarMutexGuard aSolarGuard;
AccessibleSlideSorterObject* pChild = mpImpl->GetAccessibleChild(nChildIndex);
if (pChild != nullptr)
mrSlideSorter.GetController().GetPageSelector().DeselectPage(pChild->GetPageNumber());
else
if (pChild == nullptr)
throw lang::IndexOutOfBoundsException();
mrSlideSorter.GetController().GetPageSelector().DeselectPage(pChild->GetPageNumber());
}
// XServiceInfo
......
......@@ -220,44 +220,7 @@ Reference<XResource> SAL_CALL BasicPaneFactory::createResource (
return rPane.CompareURL(rxPaneId->getResourceURL());
} ));
if (iDescriptor != mpPaneContainer->end())
{
if (iDescriptor->mxPane.is())
{
// The pane has already been created and is still active (has
// not yet been released). This should not happen.
xPane = iDescriptor->mxPane;
}
else
{
// Create a new pane.
switch (iDescriptor->mePaneId)
{
case CenterPaneId:
xPane = CreateFrameWindowPane(rxPaneId);
break;
case FullScreenPaneId:
xPane = CreateFullScreenPane(mxComponentContext, rxPaneId);
break;
case LeftImpressPaneId:
case LeftDrawPaneId:
xPane = CreateChildWindowPane(
rxPaneId,
*iDescriptor);
break;
}
iDescriptor->mxPane = xPane;
// Listen for the pane being disposed.
Reference<lang::XComponent> xComponent (xPane, UNO_QUERY);
if (xComponent.is())
xComponent->addEventListener(this);
}
iDescriptor->mbIsReleased = false;
}
else
if (iDescriptor == mpPaneContainer->end())
{
// The requested pane can not be created by any of the factories
// managed by the called BasicPaneFactory object.
......@@ -266,6 +229,42 @@ Reference<XResource> SAL_CALL BasicPaneFactory::createResource (
0);
}
if (iDescriptor->mxPane.is())
{
// The pane has already been created and is still active (has
// not yet been released). This should not happen.
xPane = iDescriptor->mxPane;
}
else
{
// Create a new pane.
switch (iDescriptor->mePaneId)
{
case CenterPaneId:
xPane = CreateFrameWindowPane(rxPaneId);
break;
case FullScreenPaneId:
xPane = CreateFullScreenPane(mxComponentContext, rxPaneId);
break;
case LeftImpressPaneId:
case LeftDrawPaneId:
xPane = CreateChildWindowPane(
rxPaneId,
*iDescriptor);
break;
}
iDescriptor->mxPane = xPane;
// Listen for the pane being disposed.
Reference<lang::XComponent> xComponent (xPane, UNO_QUERY);
if (xComponent.is())
xComponent->addEventListener(this);
}
iDescriptor->mbIsReleased = false;
return xPane;
}
......@@ -282,33 +281,7 @@ void SAL_CALL BasicPaneFactory::releaseResource (
mpPaneContainer->end(),
[&] (PaneDescriptor const& rPane) { return rPane.ComparePane(rxPane); } ));
if (iDescriptor != mpPaneContainer->end())
{
// The given pane was created by one of the factories. Child
// windows are just hidden and will be reused when requested later.
// Other windows are disposed and their reference is reset so that
// on the next createPane() call for the same pane type the pane is
// created anew.
ChildWindowPane* pChildWindowPane = dynamic_cast<ChildWindowPane*>(rxPane.get());
if (pChildWindowPane != nullptr)
{
iDescriptor->mbIsReleased = true;
pChildWindowPane->Hide();
}
else
{
iDescriptor->mxPane = nullptr;
Reference<XComponent> xComponent (rxPane, UNO_QUERY);
if (xComponent.is())
{
// We are disposing the pane and do not have to be informed of