[Libreoffice-commits] core.git: 3 commits - include/sfx2 include/svx sfx2/source svx/source vcl/source
Michael Meeks
michael.meeks at collabora.com
Thu May 7 01:38:25 PDT 2015
include/sfx2/tbxctrl.hxx | 3 +--
include/svx/layctrl.hxx | 2 --
sfx2/source/toolbox/tbxitem.cxx | 11 +----------
svx/source/tbxctrls/layctrl.cxx | 23 -----------------------
vcl/source/control/combobox.cxx | 29 ++++++++++++++++-------------
vcl/source/window/floatwin.cxx | 1 +
6 files changed, 19 insertions(+), 50 deletions(-)
New commits:
commit 35fa267341be9d5d22a41e2aad1f1da462543783
Author: Michael Meeks <michael.meeks at collabora.com>
Date: Wed May 6 21:04:31 2015 +0100
tdf#90956 - ComboBox: handle re-size calculation during dispose.
Change-Id: I3d6e421a10b0d6b0edb85c0a6454315198bfd22f
diff --git a/vcl/source/control/combobox.cxx b/vcl/source/control/combobox.cxx
index 7c12bbc..b55f1cb 100644
--- a/vcl/source/control/combobox.cxx
+++ b/vcl/source/control/combobox.cxx
@@ -559,20 +559,23 @@ void ComboBox::Resize()
{
Control::Resize();
- Size aOutSz = GetOutputSizePixel();
- if( IsDropDownBox() )
+ if (mpSubEdit)
{
- ComboBoxBounds aBounds(calcComboBoxDropDownComponentBounds(aOutSz,
- GetWindow(WINDOW_BORDER)->GetOutputSizePixel()));
- mpSubEdit->SetPosSizePixel(aBounds.aSubEditPos, aBounds.aSubEditSize);
- mpBtn->SetPosSizePixel(aBounds.aButtonPos, aBounds.aButtonSize);
- }
- else
- {
- mpSubEdit->SetSizePixel( Size( aOutSz.Width(), mnDDHeight ) );
- mpImplLB->setPosSizePixel( 0, mnDDHeight, aOutSz.Width(), aOutSz.Height() - mnDDHeight );
- if ( !GetText().isEmpty() )
- ImplUpdateFloatSelection();
+ Size aOutSz = GetOutputSizePixel();
+ if( IsDropDownBox() )
+ {
+ ComboBoxBounds aBounds(calcComboBoxDropDownComponentBounds(aOutSz,
+ GetWindow(WINDOW_BORDER)->GetOutputSizePixel()));
+ mpSubEdit->SetPosSizePixel(aBounds.aSubEditPos, aBounds.aSubEditSize);
+ mpBtn->SetPosSizePixel(aBounds.aButtonPos, aBounds.aButtonSize);
+ }
+ else
+ {
+ mpSubEdit->SetSizePixel( Size( aOutSz.Width(), mnDDHeight ) );
+ mpImplLB->setPosSizePixel( 0, mnDDHeight, aOutSz.Width(), aOutSz.Height() - mnDDHeight );
+ if ( !GetText().isEmpty() )
+ ImplUpdateFloatSelection();
+ }
}
// adjust the size of the FloatingWindow even when invisible
commit 207b0799d9b5b7029ccde23787f55e6efc2df2aa
Author: Michael Meeks <michael.meeks at collabora.com>
Date: Wed May 6 20:43:06 2015 +0100
tdf#91073 - keep the popup pointer around while we operate on it.
Change-Id: I33767036847aed3d5c7ee4a7d13e81590e46b65b
diff --git a/sfx2/source/toolbox/tbxitem.cxx b/sfx2/source/toolbox/tbxitem.cxx
index d30b026..5119f608 100644
--- a/sfx2/source/toolbox/tbxitem.cxx
+++ b/sfx2/source/toolbox/tbxitem.cxx
@@ -622,7 +622,7 @@ void SAL_CALL SfxToolBoxControl::doubleClick() throw (::com::sun::star::uno::Run
Reference< ::com::sun::star::awt::XWindow > SAL_CALL SfxToolBoxControl::createPopupWindow() throw (::com::sun::star::uno::RuntimeException, std::exception)
{
SolarMutexGuard aGuard;
- vcl::Window* pWindow = CreatePopupWindow();
+ VclPtr<vcl::Window> pWindow = CreatePopupWindow();
if ( pWindow )
return VCLUnoHelper::GetInterface( pWindow );
else
diff --git a/vcl/source/window/floatwin.cxx b/vcl/source/window/floatwin.cxx
index 0d6ef0d..f7892c5 100644
--- a/vcl/source/window/floatwin.cxx
+++ b/vcl/source/window/floatwin.cxx
@@ -186,6 +186,7 @@ void FloatingWindow::doDeferredInit(WinBits nBits)
FloatingWindow::~FloatingWindow()
{
disposeOnce();
+ assert (!mnPostId);
}
void FloatingWindow::dispose()
commit ca0bf47a14fc57c0c38915ad4a5a0ebfa0219295
Author: Michael Meeks <michael.meeks at collabora.com>
Date: Wed May 6 15:34:21 2015 +0100
Remove unused CreatePopupWindowCascading virtual methods.
Change-Id: I44125b9909c0d81abd84c9666d44225e99c94c54
diff --git a/include/sfx2/tbxctrl.hxx b/include/sfx2/tbxctrl.hxx
index d39337c..11da16c 100644
--- a/include/sfx2/tbxctrl.hxx
+++ b/include/sfx2/tbxctrl.hxx
@@ -198,8 +198,7 @@ protected:
virtual void DoubleClick();
virtual void Click();
virtual SfxPopupWindowType GetPopupWindowType() const;
- virtual VclPtr<SfxPopupWindow> CreatePopupWindow();
- virtual SfxPopupWindow* CreatePopupWindowCascading();
+ virtual VclPtr<SfxPopupWindow> CreatePopupWindow();
virtual VclPtr<vcl::Window> CreateItemWindow( vcl::Window *pParent );
// Must be called by subclass to set a new popup window instance
diff --git a/include/svx/layctrl.hxx b/include/svx/layctrl.hxx
index 05eaf5d..ec62655 100644
--- a/include/svx/layctrl.hxx
+++ b/include/svx/layctrl.hxx
@@ -32,7 +32,6 @@ private:
public:
virtual SfxPopupWindowType GetPopupWindowType() const SAL_OVERRIDE;
virtual VclPtr<SfxPopupWindow> CreatePopupWindow() SAL_OVERRIDE;
- virtual SfxPopupWindow* CreatePopupWindowCascading() SAL_OVERRIDE;
virtual void StateChanged( sal_uInt16 nSID,
SfxItemState eState,
const SfxPoolItem* pState ) SAL_OVERRIDE;
@@ -51,7 +50,6 @@ class SVX_DLLPUBLIC SvxColumnsToolBoxControl : public SfxToolBoxControl
public:
virtual SfxPopupWindowType GetPopupWindowType() const SAL_OVERRIDE;
virtual VclPtr<SfxPopupWindow> CreatePopupWindow() SAL_OVERRIDE;
- virtual SfxPopupWindow* CreatePopupWindowCascading() SAL_OVERRIDE;
SFX_DECL_TOOLBOX_CONTROL();
diff --git a/sfx2/source/toolbox/tbxitem.cxx b/sfx2/source/toolbox/tbxitem.cxx
index 956651c..d30b026 100644
--- a/sfx2/source/toolbox/tbxitem.cxx
+++ b/sfx2/source/toolbox/tbxitem.cxx
@@ -982,20 +982,11 @@ VclPtr<SfxPopupWindow> SfxToolBoxControl::CreatePopupWindow()
return 0;
}
-SfxPopupWindow* SfxToolBoxControl::CreatePopupWindowCascading()
-{
- return 0;
-}
-
-
-
VclPtr<vcl::Window> SfxToolBoxControl::CreateItemWindow( vcl::Window * )
{
return VclPtr<vcl::Window>();
}
-
-
SfxFrameStatusListener::SfxFrameStatusListener(
const Reference< XComponentContext >& rxContext,
const Reference< XFrame >& xFrame,
diff --git a/svx/source/tbxctrls/layctrl.cxx b/svx/source/tbxctrls/layctrl.cxx
index c45f89c..36368ca 100644
--- a/svx/source/tbxctrls/layctrl.cxx
+++ b/svx/source/tbxctrls/layctrl.cxx
@@ -741,17 +741,6 @@ VclPtr<SfxPopupWindow> SvxTableToolBoxControl::CreatePopupWindow()
return 0;
}
-
-
-SfxPopupWindow* SvxTableToolBoxControl::CreatePopupWindowCascading()
-{
- if ( bEnabled )
- return VclPtr<TableWindow>::Create( GetSlotId(), m_aCommandURL, GetToolBox().GetItemText( GetId() ), GetToolBox(), m_xFrame );
- return 0;
-}
-
-
-
void SvxTableToolBoxControl::StateChanged( sal_uInt16, SfxItemState eState, const SfxPoolItem* pState )
{
if ( pState && pState->ISA(SfxUInt16Item) )
@@ -806,18 +795,6 @@ VclPtr<SfxPopupWindow> SvxColumnsToolBoxControl::CreatePopupWindow()
return pWin;
}
-
-
-SfxPopupWindow* SvxColumnsToolBoxControl::CreatePopupWindowCascading()
-{
- ColumnsWindow* pWin = 0;
- if(bEnabled)
- {
- pWin = VclPtr<ColumnsWindow>::Create( GetSlotId(), m_aCommandURL, GetToolBox().GetItemText( GetId() ), GetToolBox(), m_xFrame );
- }
- return pWin;
-}
-
void SvxColumnsToolBoxControl::StateChanged( sal_uInt16 nSID,
SfxItemState eState,
const SfxPoolItem* pState )
More information about the Libreoffice-commits
mailing list