cui/source/inc/treeopt.hxx | 2 +- cui/source/options/treeopt.cxx | 2 +- dbaccess/source/ui/dlg/UserAdminDlg.cxx | 1 - include/svtools/wizdlg.hxx | 2 +- include/svx/sidebar/PanelLayout.hxx | 2 +- include/vcl/dialog.hxx | 2 +- include/vcl/layout.hxx | 2 +- include/vcl/tabctrl.hxx | 2 +- include/vcl/window.hxx | 3 ++- sc/source/filter/xml/xmlexprt.cxx | 2 ++ svtools/source/dialogs/wizdlg.cxx | 2 +- svx/source/sidebar/PanelLayout.cxx | 2 +- sw/source/core/unocore/unostyle.cxx | 17 ++++++++++++++--- sw/source/ui/vba/vbaheadersfooters.cxx | 6 +++--- sw/source/ui/vba/vbaheadersfooters.hxx | 2 +- vcl/source/control/tabctrl.cxx | 4 ++-- vcl/source/glyphs/graphite_layout.cxx | 2 +- vcl/source/window/dialog.cxx | 2 +- vcl/source/window/layout.cxx | 4 ++-- vcl/source/window/window.cxx | 4 ++-- vcl/source/window/window2.cxx | 9 ++++++--- 21 files changed, 45 insertions(+), 29 deletions(-)
New commits: commit 65ecb0d8f43f99f3794fe1aa19c87c153534fbf2 Author: Caolán McNamara <caol...@redhat.com> Date: Tue Jul 15 09:21:38 2014 +0100 Related: fdo#80633 we can retain cached size for visibility change we still need to invalidate the layout of our parents, but we can keep the cached optimal size Change-Id: I8e77366bd61ff45d34f9d411c7f501a3a9ccbd4e diff --git a/cui/source/inc/treeopt.hxx b/cui/source/inc/treeopt.hxx index e698653..d8077d2f 100644 --- a/cui/source/inc/treeopt.hxx +++ b/cui/source/inc/treeopt.hxx @@ -189,7 +189,7 @@ private: VectorOfNodes LoadNodes( Module* pModule, const OUString& rExtensionId ); void InsertNodes( const VectorOfNodes& rNodeList ); - virtual void queue_resize() SAL_OVERRIDE; + virtual void queue_resize(StateChangedType eReason = STATE_CHANGE_LAYOUT) SAL_OVERRIDE; void SetPaneSize(Window *pPane); protected: diff --git a/cui/source/options/treeopt.cxx b/cui/source/options/treeopt.cxx index ed363cc..5817013a 100644 --- a/cui/source/options/treeopt.cxx +++ b/cui/source/options/treeopt.cxx @@ -934,7 +934,7 @@ bool OfaTreeOptionsDialog::hasTreePendingLayout() const return maTreeLayoutTimer.IsActive(); } -void OfaTreeOptionsDialog::queue_resize() +void OfaTreeOptionsDialog::queue_resize(StateChangedType /*eReason*/) { if (hasTreePendingLayout()) return; diff --git a/include/svtools/wizdlg.hxx b/include/svtools/wizdlg.hxx index 8d26dc4..4efca16 100644 --- a/include/svtools/wizdlg.hxx +++ b/include/svtools/wizdlg.hxx @@ -264,7 +264,7 @@ public: virtual void ActivatePage(); virtual long DeactivatePage(); - virtual void queue_resize() SAL_OVERRIDE; + virtual void queue_resize(StateChangedType eReason = STATE_CHANGE_LAYOUT) SAL_OVERRIDE; bool ShowPrevPage(); bool ShowNextPage(); diff --git a/include/svx/sidebar/PanelLayout.hxx b/include/svx/sidebar/PanelLayout.hxx index 3dc4bfc..13b6086 100644 --- a/include/svx/sidebar/PanelLayout.hxx +++ b/include/svx/sidebar/PanelLayout.hxx @@ -36,7 +36,7 @@ public: virtual Size GetOptimalSize() const SAL_OVERRIDE; virtual void setPosSizePixel(long nX, long nY, long nWidth, long nHeight, sal_uInt16 nFlags = WINDOW_POSSIZE_ALL) SAL_OVERRIDE; - virtual void queue_resize() SAL_OVERRIDE; + virtual void queue_resize(StateChangedType eReason = STATE_CHANGE_LAYOUT) SAL_OVERRIDE; }; diff --git a/include/vcl/dialog.hxx b/include/vcl/dialog.hxx index 8776ec0..27c79e1 100644 --- a/include/vcl/dialog.hxx +++ b/include/vcl/dialog.hxx @@ -104,7 +104,7 @@ public: bool isLayoutEnabled() const; void setOptimalLayoutSize(); bool isCalculatingInitialLayoutSize() const { return mbIsCalculatingInitialLayoutSize; } - virtual void queue_resize() SAL_OVERRIDE; + virtual void queue_resize(StateChangedType eReason = STATE_CHANGE_LAYOUT) SAL_OVERRIDE; virtual bool set_property(const OString &rKey, const OString &rValue) SAL_OVERRIDE; VclButtonBox* get_action_area() { return mpActionArea;} VclBox* get_content_area() { return mpContentArea;} diff --git a/include/vcl/layout.hxx b/include/vcl/layout.hxx index b054583..a681038 100644 --- a/include/vcl/layout.hxx +++ b/include/vcl/layout.hxx @@ -40,7 +40,7 @@ public: m_bLayoutDirty = true; } - virtual void queue_resize() SAL_OVERRIDE; + virtual void queue_resize(StateChangedType eReason = STATE_CHANGE_LAYOUT) SAL_OVERRIDE; protected: //these are the two that need to be implemented by //containers, figure out how much space you want... diff --git a/include/vcl/tabctrl.hxx b/include/vcl/tabctrl.hxx index 8105799..00e3a06 100644 --- a/include/vcl/tabctrl.hxx +++ b/include/vcl/tabctrl.hxx @@ -193,7 +193,7 @@ public: mbLayoutDirty = true; } - virtual void queue_resize() SAL_OVERRIDE; + virtual void queue_resize(StateChangedType eReason = STATE_CHANGE_LAYOUT) SAL_OVERRIDE; }; #endif // INCLUDED_VCL_TABCTRL_HXX diff --git a/include/vcl/window.hxx b/include/vcl/window.hxx index 2d68c7a..40ea009 100644 --- a/include/vcl/window.hxx +++ b/include/vcl/window.hxx @@ -247,6 +247,7 @@ typedef sal_uInt16 StateChangedType; #define STATE_CHANGE_READONLY ((StateChangedType)16) #define STATE_CHANGE_EXTENDEDSTYLE ((StateChangedType)17) #define STATE_CHANGE_MIRRORING ((StateChangedType)18) +#define STATE_CHANGE_LAYOUT ((StateChangedType)19) #define STATE_CHANGE_CONTROL_FOCUS ((StateChangedType)20) #define STATE_CHANGE_USER ((StateChangedType)10000) @@ -1201,7 +1202,7 @@ public: * * akin to gtk_widget_queue_resize */ - virtual void queue_resize(); + virtual void queue_resize(StateChangedType eReason = STATE_CHANGE_LAYOUT); /* * Sets the "width-request" property diff --git a/svtools/source/dialogs/wizdlg.cxx b/svtools/source/dialogs/wizdlg.cxx index 50af198..51bd143 100644 --- a/svtools/source/dialogs/wizdlg.cxx +++ b/svtools/source/dialogs/wizdlg.cxx @@ -119,7 +119,7 @@ bool WizardDialog::hasWizardPendingLayout() const return maWizardLayoutTimer.IsActive(); } -void WizardDialog::queue_resize() +void WizardDialog::queue_resize(StateChangedType /*eReason*/) { if (hasWizardPendingLayout()) return; diff --git a/svx/source/sidebar/PanelLayout.cxx b/svx/source/sidebar/PanelLayout.cxx index 9635fcc..04a6218 100644 --- a/svx/source/sidebar/PanelLayout.cxx +++ b/svx/source/sidebar/PanelLayout.cxx @@ -43,7 +43,7 @@ bool PanelLayout::hasPanelPendingLayout() const return m_aPanelLayoutTimer.IsActive(); } -void PanelLayout::queue_resize() +void PanelLayout::queue_resize(StateChangedType /*eReason*/) { if (m_bInClose) return; diff --git a/vcl/source/control/tabctrl.cxx b/vcl/source/control/tabctrl.cxx index 6148a95..cb21606 100644 --- a/vcl/source/control/tabctrl.cxx +++ b/vcl/source/control/tabctrl.cxx @@ -2224,10 +2224,10 @@ Size TabControl::GetOptimalSize() const return calculateRequisition(); } -void TabControl::queue_resize() +void TabControl::queue_resize(StateChangedType eReason) { markLayoutDirty(); - Window::queue_resize(); + Window::queue_resize(eReason); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/vcl/source/window/dialog.cxx b/vcl/source/window/dialog.cxx index 87d9d77..ef315da 100644 --- a/vcl/source/window/dialog.cxx +++ b/vcl/source/window/dialog.cxx @@ -1230,7 +1230,7 @@ IMPL_LINK( Dialog, ImplHandleLayoutTimerHdl, void*, EMPTYARG ) return 0; } -void Dialog::queue_resize() +void Dialog::queue_resize(StateChangedType /*eReason*/) { if (hasPendingLayout() || isCalculatingInitialLayoutSize()) return; diff --git a/vcl/source/window/layout.cxx b/vcl/source/window/layout.cxx index 5ae3412..21e49f5 100644 --- a/vcl/source/window/layout.cxx +++ b/vcl/source/window/layout.cxx @@ -157,10 +157,10 @@ void VclContainer::SetSizePixel(const Size& rAllocation) } } -void VclContainer::queue_resize() +void VclContainer::queue_resize(StateChangedType eReason) { markLayoutDirty(); - Window::queue_resize(); + Window::queue_resize(eReason); } void VclBox::accumulateMaxes(const Size &rChildSize, Size &rSize) const diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx index 4699338..b7166f0 100644 --- a/vcl/source/window/window.cxx +++ b/vcl/source/window/window.cxx @@ -1984,7 +1984,7 @@ void Window::Tracking( const TrackingEvent& rTEvt ) pWrapper->Tracking( rTEvt ); } -void Window::StateChanged( StateChangedType eType ) +void Window::StateChanged(StateChangedType eType) { switch (eType) { @@ -2002,7 +2002,7 @@ void Window::StateChanged( StateChangedType eType ) break; //stuff that does invalidate the layout default: - queue_resize(); + queue_resize(eType); break; } } diff --git a/vcl/source/window/window2.cxx b/vcl/source/window/window2.cxx index 52ccd62..cabf358 100644 --- a/vcl/source/window/window2.cxx +++ b/vcl/source/window/window2.cxx @@ -1423,13 +1423,16 @@ namespace } } -void Window::queue_resize() +void Window::queue_resize(StateChangedType eReason) { bool bSomeoneCares = queue_ungrouped_resize(this); WindowImpl *pWindowImpl = mpWindowImpl->mpBorderWindow ? mpWindowImpl->mpBorderWindow->mpWindowImpl : mpWindowImpl; - pWindowImpl->mnOptimalWidthCache = -1; - pWindowImpl->mnOptimalHeightCache = -1; + if (eReason != STATE_CHANGE_VISIBLE) + { + pWindowImpl->mnOptimalWidthCache = -1; + pWindowImpl->mnOptimalHeightCache = -1; + } if (pWindowImpl->m_xSizeGroup && pWindowImpl->m_xSizeGroup->get_mode() != VCL_SIZE_GROUP_NONE) { std::set<Window*> &rWindows = pWindowImpl->m_xSizeGroup->get_widgets(); commit 835c9e6d842fb726e11afee032ef1d25d28efd58 Author: Caolán McNamara <caol...@redhat.com> Date: Tue Jul 15 09:19:12 2014 +0100 shouldn't need to call AdjustLayout now its converted to .ui Change-Id: I539741e71785232987b26c7b414a416dda5e4bb6 diff --git a/dbaccess/source/ui/dlg/UserAdminDlg.cxx b/dbaccess/source/ui/dlg/UserAdminDlg.cxx index 01c31a6..633e83e 100644 --- a/dbaccess/source/ui/dlg/UserAdminDlg.cxx +++ b/dbaccess/source/ui/dlg/UserAdminDlg.cxx @@ -119,7 +119,6 @@ namespace dbaui static_cast<OGenericAdministrationPage&>(_rPage).SetServiceFactory( m_pImpl->getORB() ); static_cast<OGenericAdministrationPage&>(_rPage).SetAdminDialog(this,this); - AdjustLayout(); Window *pWin = GetViewWindow(); if(pWin) pWin->Invalidate(); commit 0167897dde8c56d418aa210b7310644fc53e7151 Author: Caolán McNamara <caol...@redhat.com> Date: Tue Jul 15 11:54:21 2014 +0100 coverity#735799 Dereference after null check Change-Id: Id499cb873938621762f0e213fa17505fefb33574 diff --git a/sc/source/filter/xml/xmlexprt.cxx b/sc/source/filter/xml/xmlexprt.cxx index 11f8a9f..2b4cbef 100644 --- a/sc/source/filter/xml/xmlexprt.cxx +++ b/sc/source/filter/xml/xmlexprt.cxx @@ -1928,6 +1928,8 @@ void ScXMLExport::_ExportContent() sal_Int32 nShapesCount(0); CollectSharedData(nTableCount, nShapesCount); OSL_FAIL("no shared data setted"); + if (!pSharedData) + return; } ScXMLExportDatabaseRanges aExportDatabaseRanges(*this); if (!GetModel().is()) commit 9a89ae59567af5f7c6fbc92ada7dabfac11deaf3 Author: Caolán McNamara <caol...@redhat.com> Date: Tue Jul 15 08:54:43 2014 +0100 coverity#1224992 Uncaught exception Change-Id: I328cf5e83e6532dfa5090f5c5e3a1568c48c11d2 diff --git a/sw/source/core/unocore/unostyle.cxx b/sw/source/core/unocore/unostyle.cxx index b7b7d93..cf03055 100644 --- a/sw/source/core/unocore/unostyle.cxx +++ b/sw/source/core/unocore/unostyle.cxx @@ -4165,11 +4165,11 @@ uno::Reference< style::XAutoStyle > SwXAutoStyleFamily::insertStyle( { pPropSet->setPropertyValue( pSeq[i].Name, pSeq[i].Value, aSet ); } - catch (beans::UnknownPropertyException &) + catch (const beans::UnknownPropertyException &) { OSL_FAIL( "Unknown property" ); } - catch (lang::IllegalArgumentException &) + catch (const lang::IllegalArgumentException &) { OSL_FAIL( "Illegal argument" ); } @@ -4314,7 +4314,18 @@ uno::Reference< style::XAutoStyle > SwXAutoStyleFamily::insertStyle( if(!bDone) { - pPropSet->setPropertyValue( rPropName, aValue, aSet ); + try + { + pPropSet->setPropertyValue( rPropName, aValue, aSet ); + } + catch (const beans::UnknownPropertyException &) + { + OSL_FAIL( "Unknown property" ); + } + catch (const lang::IllegalArgumentException &) + { + OSL_FAIL( "Illegal argument" ); + } } } commit 1e7439001f1651557c1ea64549ba10487daa915d Author: Caolán McNamara <caol...@redhat.com> Date: Tue Jul 15 08:44:05 2014 +0100 fix higher debug levels Change-Id: I74e4689062d452f8e0fba115cd984aa876711c45 diff --git a/vcl/source/glyphs/graphite_layout.cxx b/vcl/source/glyphs/graphite_layout.cxx index 76f7050..57e61ff 100644 --- a/vcl/source/glyphs/graphite_layout.cxx +++ b/vcl/source/glyphs/graphite_layout.cxx @@ -604,7 +604,7 @@ gr_segment * GraphiteLayout::CreateSegment(ImplLayoutArgs& rArgs) if (pSegment != NULL) { #ifdef GRLAYOUT_DEBUG - fprintf(grLog(),"Gr::LayoutText %d-%d, context %d, len %d, numchars %d, rtl %d scaling %f:", rArgs.mnMinCharPos, + fprintf(grLog(),"Gr::LayoutText %d-%d, context %d, len %d, numchars %" SAL_PRI_SIZET "u, rtl %d scaling %f:", rArgs.mnMinCharPos, rArgs.mnEndCharPos, limit, rArgs.mnLength, numchars, bRtl, mfScaling); for (int i = mnSegCharOffset; i < limit; ++i) fprintf(grLog(), " %04X", rArgs.mpStr[i]); commit 11291be10e44000f2c01645318744ff74c33c208 Author: Caolán McNamara <caol...@redhat.com> Date: Mon Jul 14 20:39:13 2014 +0100 coverity#738453 Uncaught exception Change-Id: Id05fd31d3a62bec8d658b9ecbae484ac081b8960 diff --git a/sw/source/ui/vba/vbaheadersfooters.cxx b/sw/source/ui/vba/vbaheadersfooters.cxx index 1ecbb91..0824209 100644 --- a/sw/source/ui/vba/vbaheadersfooters.cxx +++ b/sw/source/ui/vba/vbaheadersfooters.cxx @@ -89,13 +89,13 @@ SwVbaHeadersFooters::SwVbaHeadersFooters( const uno::Reference< XHelperInterface return 3; } -uno::Any SAL_CALL SwVbaHeadersFooters::Item( const uno::Any& Index1, const uno::Any& ) throw (uno::RuntimeException) +uno::Any SAL_CALL SwVbaHeadersFooters::Item( const uno::Any& Index1, const uno::Any& ) throw (lang::IndexOutOfBoundsException, uno::RuntimeException) { sal_Int32 nIndex = 0; Index1 >>= nIndex; if( ( nIndex < 1 ) || ( nIndex > 3 ) ) { - throw container::NoSuchElementException(); + throw lang::IndexOutOfBoundsException(); } return uno::makeAny( uno::Reference< word::XHeaderFooter >( new SwVbaHeaderFooter( this, mxContext, mxModel, mxPageStyleProps, mbHeader, nIndex ) ) ); } diff --git a/sw/source/ui/vba/vbaheadersfooters.hxx b/sw/source/ui/vba/vbaheadersfooters.hxx index 7e62f1a..3f4de95 100644 --- a/sw/source/ui/vba/vbaheadersfooters.hxx +++ b/sw/source/ui/vba/vbaheadersfooters.hxx @@ -37,7 +37,7 @@ public: virtual ~SwVbaHeadersFooters() {} virtual ::sal_Int32 SAL_CALL getCount() throw (css::uno::RuntimeException) SAL_OVERRIDE; - virtual css::uno::Any SAL_CALL Item( const css::uno::Any& Index1, const css::uno::Any& )throw (css::uno::RuntimeException) SAL_OVERRIDE; + virtual css::uno::Any SAL_CALL Item( const css::uno::Any& Index1, const css::uno::Any& ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException) SAL_OVERRIDE; // XEnumerationAccess virtual css::uno::Type SAL_CALL getElementType() throw (css::uno::RuntimeException) SAL_OVERRIDE; virtual css::uno::Reference< css::container::XEnumeration > SAL_CALL createEnumeration() throw (css::uno::RuntimeException) SAL_OVERRIDE; commit f9c460e34d46559f825b91fbc54755a65e6fabc4 Author: Caolán McNamara <caol...@redhat.com> Date: Mon Jul 14 20:36:27 2014 +0100 coverity#738454 Uncaught exception Change-Id: I9b344efa1b46a6e7c6b69d3044ef88b4cba826cb diff --git a/sw/source/ui/vba/vbaheadersfooters.cxx b/sw/source/ui/vba/vbaheadersfooters.cxx index d46b914..1ecbb91 100644 --- a/sw/source/ui/vba/vbaheadersfooters.cxx +++ b/sw/source/ui/vba/vbaheadersfooters.cxx @@ -47,7 +47,7 @@ public: virtual uno::Any SAL_CALL getByIndex( sal_Int32 Index ) throw (lang::IndexOutOfBoundsException, lang::WrappedTargetException, uno::RuntimeException, std::exception) SAL_OVERRIDE { if( Index < 1 || Index > 3 ) - throw container::NoSuchElementException(); + throw lang::IndexOutOfBoundsException(); return uno::makeAny( uno::Reference< word::XHeaderFooter >( new SwVbaHeaderFooter( mxParent, mxContext, mxModel, mxPageStyleProps, mbHeader, Index ) ) ); } virtual uno::Type SAL_CALL getElementType( ) throw (uno::RuntimeException, std::exception) SAL_OVERRIDE
_______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits