diff options
Diffstat (limited to 'sd/source/ui/toolpanel/TitledControl.cxx')
-rw-r--r-- | sd/source/ui/toolpanel/TitledControl.cxx | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/sd/source/ui/toolpanel/TitledControl.cxx b/sd/source/ui/toolpanel/TitledControl.cxx index 3f424357fedd..d06812e8526a 100644 --- a/sd/source/ui/toolpanel/TitledControl.cxx +++ b/sd/source/ui/toolpanel/TitledControl.cxx @@ -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 @@ -39,12 +39,12 @@ #include <vcl/svapp.hxx> -namespace sd { namespace toolpanel { +namespace sd { namespace toolpanel { TitledControl::TitledControl ( TreeNode* pParent, - ::std::auto_ptr<TreeNode> pControl, + ::std::auto_ptr<TreeNode> pControl, const String& rTitle, const ClickHandler& rClickHandler, TitleBar::TitleBarType eType) @@ -138,7 +138,7 @@ sal_Int32 TitledControl::GetPreferredHeight (sal_Int32 nWidth) bool TitledControl::IsResizable (void) { - return IsExpanded() + return IsExpanded() && GetControl()->IsResizable(); } @@ -157,7 +157,7 @@ void TitledControl::Resize (void) { Size aWindowSize (GetOutputSizePixel()); - int nTitleBarHeight + int nTitleBarHeight = GetTitleBar()->GetPreferredHeight(aWindowSize.Width()); GetTitleBar()->GetWindow()->SetPosSizePixel ( Point (0,0), @@ -165,7 +165,7 @@ void TitledControl::Resize (void) TreeNode* pControl = GetControl(); - if (pControl != NULL + if (pControl != NULL && pControl->GetWindow() != NULL && pControl->GetWindow()->IsVisible()) { @@ -258,7 +258,7 @@ bool TitledControl::Expand (bool bExpanded) if (bExpansionStateChanged) UpdateStates(); } - + return bExpansionStateChanged; } @@ -288,7 +288,7 @@ bool TitledControl::IsExpanded (void) const return false; } -void TitledControl::SetEnabledState(bool bFlag) +void TitledControl::SetEnabledState(bool bFlag) { if (!bFlag) { @@ -297,13 +297,13 @@ void TitledControl::SetEnabledState(bool bFlag) ControlContainer::ES_COLLAPSE); Disable(); } - else + else { -/* +/* GetParentNode()->GetControlContainer().SetExpansionState ( this, ControlContainer::ES_EXPAND); -*/ +*/ Enable(); } @@ -352,7 +352,7 @@ void TitledControl::UpdateStates (void) -IMPL_LINK(TitledControl, WindowEventListener, +IMPL_LINK(TitledControl, WindowEventListener, VclSimpleEvent*, pEvent) { if (pEvent!=NULL && pEvent->ISA(VclWindowEvent)) |