Makefile.in | 2 - Repository.mk | 1 include/sfx2/childwin.hxx | 2 + sc/source/filter/starcalc/scflt.cxx | 4 +- sc/source/ui/inc/navipi.hxx | 5 +- sc/source/ui/navipi/navipi.cxx | 27 +++++++++------- sc/source/ui/sidebar/ScPanelFactory.cxx | 2 - sfx2/source/appl/childwin.cxx | 16 ++++----- svx/source/unodraw/UnoGraphicExporter.cxx | 9 ++--- sw/source/uibase/inc/navipi.hxx | 8 +--- sw/source/uibase/sidebar/SwPanelFactory.cxx | 2 - sw/source/uibase/utlui/navipi.cxx | 28 ++++++++-------- vcl/Executable_psdfuzzer.mk | 47 ++++++++++++++++++++++++++++ vcl/Module_vcl.mk | 1 vcl/workben/psdfuzzer.cxx | 24 ++++++++++++++ 15 files changed, 130 insertions(+), 48 deletions(-)
New commits: commit e3bd10f8d5c7750dd0a700f738f4713519cde118 Author: Caolán McNamara <caol...@redhat.com> Date: Tue Jan 24 15:06:34 2017 +0000 adjust the hide of the zoom so its dynamic on docking/undocking navigators Change-Id: I525d0abf5618ffc2f614857a29e530f7140c0de7 diff --git a/sc/source/ui/inc/navipi.hxx b/sc/source/ui/inc/navipi.hxx index 128b146..74fce92 100644 --- a/sc/source/ui/inc/navipi.hxx +++ b/sc/source/ui/inc/navipi.hxx @@ -261,6 +261,8 @@ public: virtual void dispose() override; virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) override; + + virtual void StateChanged(StateChangedType nStateChange) override; }; class ScNavigatorDialogWrapper: public SfxChildWindowContext diff --git a/sc/source/ui/navipi/navipi.cxx b/sc/source/ui/navipi/navipi.cxx index 45a24ec..85e3a22 100644 --- a/sc/source/ui/navipi/navipi.cxx +++ b/sc/source/ui/navipi/navipi.cxx @@ -529,13 +529,6 @@ ScNavigatorDlg::ScNavigatorDlg(SfxBindings* pB, vcl::Window* pParent) aContentIdle.SetInvokeHandler( LINK( this, ScNavigatorDlg, TimeHdl ) ); aContentIdle.SetPriority( TaskPriority::LOWEST ); - if (!SfxChildWindowContext::GetFloatingWindow(GetParent())) - { - // When the navigator is displayed in the sidebar, or is otherwise - // docked, it has the whole deck to fill. Therefore hide the button that - // hides all controls below the top two rows of buttons. - aTbxCmd->RemoveItem(aTbxCmd->GetItemPos(nZoomId)); - } aLbEntries->SetNavigatorDlgFlag(true); // if scenario was active, switch on @@ -549,6 +542,18 @@ ScNavigatorDlg::ScNavigatorDlg(SfxBindings* pB, vcl::Window* pParent) aExpandedSize = GetOptimalSize(); } +void ScNavigatorDlg::StateChanged(StateChangedType nStateChange) +{ + PanelLayout::StateChanged(nStateChange); + if (nStateChange == StateChangedType::InitShow) + { + // When the navigator is displayed in the sidebar, or is otherwise + // docked, it has the whole deck to fill. Therefore hide the button that + // hides all controls below the top two rows of buttons. + aTbxCmd->ShowItem(aTbxCmd->GetItemId(nZoomId), SfxChildWindowContext::GetFloatingWindow(GetParent())); + } +} + ScNavigatorDlg::~ScNavigatorDlg() { disposeOnce(); diff --git a/sw/source/uibase/inc/navipi.hxx b/sw/source/uibase/inc/navipi.hxx index 80b8c9e..4915ce9 100644 --- a/sw/source/uibase/inc/navipi.hxx +++ b/sw/source/uibase/inc/navipi.hxx @@ -119,8 +119,6 @@ class SwNavigationPI : public PanelLayout, void SetPopupWindow( SfxPopupWindow* ); - using Window::StateChanged; - protected: // release ObjectShellLock early enough for app end @@ -142,6 +140,8 @@ public: virtual void StateChanged( sal_uInt16 nSID, SfxItemState eState, const SfxPoolItem* pState ) override; + virtual void StateChanged(StateChangedType nStateChange) override; + static OUString CreateDropFileName( TransferableDataHelper& rData ); static OUString CleanEntry(const OUString& rEntry); diff --git a/sw/source/uibase/utlui/navipi.cxx b/sw/source/uibase/utlui/navipi.cxx index 9fc3a69..3168e01 100644 --- a/sw/source/uibase/utlui/navipi.cxx +++ b/sw/source/uibase/utlui/navipi.cxx @@ -728,15 +728,6 @@ SwNavigationPI::SwNavigationPI(SfxBindings* _pBindings, m_aGlobalTree->SetAccessibleName(SW_RESSTR(STR_ACCESS_TL_GLOBAL)); m_aDocListBox->SetAccessibleName(m_aStatusArr[3]); - if (!SfxChildWindowContext::GetFloatingWindow(GetParent())) - { - // if the parent isn't a float, then then the navigator is displayed in - // the sidebar or is otherwise docked. While the navigator could change - // its size, the sidebar can not, and the navigator would just waste - // space. Therefore hide this button. - m_aContentToolBox->RemoveItem(m_aContentToolBox->GetItemPos(m_aContentToolBox->GetItemId("listbox"))); - } - m_aExpandedSize = GetOptimalSize(); } @@ -849,6 +840,19 @@ void SwNavigationPI::StateChanged( sal_uInt16 nSID, SfxItemState /*eState*/, } } +void SwNavigationPI::StateChanged(StateChangedType nStateChange) +{ + PanelLayout::StateChanged(nStateChange); + if (nStateChange == StateChangedType::InitShow) + { + // if the parent isn't a float, then then the navigator is displayed in + // the sidebar or is otherwise docked. While the navigator could change + // its size, the sidebar can not, and the navigator would just waste + // space. Therefore hide this button. + m_aContentToolBox->ShowItem(m_aContentToolBox->GetItemId("listbox"), SfxChildWindowContext::GetFloatingWindow(GetParent())); + } +} + // Get the numeric field from the toolbox. NumEditAction& SwNavigationPI::GetPageEdit() commit b37ac48935621fcc7b71f81a8b892f24e85e5b6f Author: Caolán McNamara <caol...@redhat.com> Date: Tue Jan 24 14:42:46 2017 +0000 Resolves: tdf#105450 calc navigator gets 0 height on toggle off/on when docked Change-Id: Icd346cdf0a208ccaeddd77e6803f4f906361324c diff --git a/include/sfx2/childwin.hxx b/include/sfx2/childwin.hxx index a8c1b23..10aa39a 100644 --- a/include/sfx2/childwin.hxx +++ b/include/sfx2/childwin.hxx @@ -137,6 +137,8 @@ public: FloatingWindow* GetFloatingWindow() const; + static FloatingWindow* GetFloatingWindow(vcl::Window *pParent); + static void RegisterChildWindowContext(SfxModule*, sal_uInt16, SfxChildWinContextFactory*); }; diff --git a/sc/source/ui/inc/navipi.hxx b/sc/source/ui/inc/navipi.hxx index 68fdba9..128b146 100644 --- a/sc/source/ui/inc/navipi.hxx +++ b/sc/source/ui/inc/navipi.hxx @@ -194,7 +194,6 @@ private: OUString aStrHidden; OUString aStrActiveWin; - bool bInSidebar; sal_uInt16 nZoomId; sal_uInt16 nChangeRootId; sal_uInt16 nDragModeId; @@ -257,7 +256,7 @@ private: static void ReleaseFocus(); public: - ScNavigatorDlg(SfxBindings* pB, bool bSidebar, vcl::Window* pParent); + ScNavigatorDlg(SfxBindings* pB, vcl::Window* pParent); virtual ~ScNavigatorDlg() override; virtual void dispose() override; diff --git a/sc/source/ui/navipi/navipi.cxx b/sc/source/ui/navipi/navipi.cxx index efcd407..45a24ec 100644 --- a/sc/source/ui/navipi/navipi.cxx +++ b/sc/source/ui/navipi/navipi.cxx @@ -422,7 +422,7 @@ ScNavigatorDialogWrapper::ScNavigatorDialogWrapper(vcl::Window* pParent, SfxChildWinInfo* /* pInfo */) : SfxChildWindowContext(nId) { - pNavigator = VclPtr<ScNavigatorDlg>::Create(pBind, false, pParent); + pNavigator = VclPtr<ScNavigatorDlg>::Create(pBind, pParent); if (SfxNavigator* pNav = dynamic_cast<SfxNavigator*>(pParent)) pNav->SetMinOutputSizePixel(pNavigator->GetOptimalSize()); SetWindow(pNavigator); @@ -433,13 +433,12 @@ ScNavigatorDialogWrapper::ScNavigatorDialogWrapper(vcl::Window* pParent, #define REGISTER_SLOT(i,id) \ ppBoundItems[i]=new ScNavigatorControllerItem(id,*this,rBindings); -ScNavigatorDlg::ScNavigatorDlg(SfxBindings* pB, bool bSidebar, vcl::Window* pParent) +ScNavigatorDlg::ScNavigatorDlg(SfxBindings* pB, vcl::Window* pParent) : PanelLayout(pParent, "NavigatorPanel", "modules/scalc/ui/navigatorpanel.ui", nullptr) , rBindings(*pB) , aStrDragMode(ScResId(SCSTR_DRAGMODE)) , aStrDisplay(ScResId(SCSTR_DISPLAY)) , aStrActiveWin(ScResId(SCSTR_ACTIVEWIN)) - , bInSidebar(bSidebar) , pMarkArea(nullptr) , pViewData(nullptr ) , eListMode(NAV_LMODE_NONE) @@ -530,11 +529,11 @@ ScNavigatorDlg::ScNavigatorDlg(SfxBindings* pB, bool bSidebar, vcl::Window* pPar aContentIdle.SetInvokeHandler( LINK( this, ScNavigatorDlg, TimeHdl ) ); aContentIdle.SetPriority( TaskPriority::LOWEST ); - if (bInSidebar) + if (!SfxChildWindowContext::GetFloatingWindow(GetParent())) { - // When the navigator is displayed in the sidebar it has the whole deck - // to fill. Therefore hide the button that hides all controls below - // the top two rows of buttons. + // When the navigator is displayed in the sidebar, or is otherwise + // docked, it has the whole deck to fill. Therefore hide the button that + // hides all controls below the top two rows of buttons. aTbxCmd->RemoveItem(aTbxCmd->GetItemPos(nZoomId)); } aLbEntries->SetNavigatorDlgFlag(true); @@ -839,7 +838,8 @@ void ScNavigatorDlg::SetListMode(NavListMode eMode) { if (eMode != eListMode) { - bool bForceParentResize = (eMode == NAV_LMODE_NONE || eListMode == NAV_LMODE_NONE); + bool bForceParentResize = SfxChildWindowContext::GetFloatingWindow(GetParent()) && + (eMode == NAV_LMODE_NONE || eListMode == NAV_LMODE_NONE); SfxNavigator* pNav = bForceParentResize ? dynamic_cast<SfxNavigator*>(GetParent()) : nullptr; if (pNav && eMode == NAV_LMODE_NONE) //save last normal size on minimizing aExpandedSize = GetSizePixel(); diff --git a/sc/source/ui/sidebar/ScPanelFactory.cxx b/sc/source/ui/sidebar/ScPanelFactory.cxx index e705400..95740e4 100644 --- a/sc/source/ui/sidebar/ScPanelFactory.cxx +++ b/sc/source/ui/sidebar/ScPanelFactory.cxx @@ -93,7 +93,7 @@ Reference<ui::XUIElement> SAL_CALL ScPanelFactory::createUIElement ( pPanel = NumberFormatPropertyPanel::Create( pParentWindow, xFrame, pBindings ); else if (rsResourceURL.endsWith("/NavigatorPanel")) { - pPanel = VclPtr<ScNavigatorDlg>::Create(pBindings, true, pParentWindow); + pPanel = VclPtr<ScNavigatorDlg>::Create(pBindings, pParentWindow); nMinimumSize = 0; } else if (rsResourceURL.endsWith("/FunctionsPanel")) diff --git a/sfx2/source/appl/childwin.cxx b/sfx2/source/appl/childwin.cxx index 54a581c..f9735e2 100644 --- a/sfx2/source/appl/childwin.cxx +++ b/sfx2/source/appl/childwin.cxx @@ -518,22 +518,22 @@ SfxChildWindowContext::~SfxChildWindowContext() pWindow.disposeAndClear(); } -FloatingWindow* SfxChildWindowContext::GetFloatingWindow() const +FloatingWindow* SfxChildWindowContext::GetFloatingWindow(vcl::Window *pParent) { - vcl::Window *pParent = pWindow->GetParent(); if (pParent->GetType() == WINDOW_DOCKINGWINDOW || pParent->GetType() == WINDOW_TOOLBOX) { return static_cast<DockingWindow*>(pParent)->GetFloatingWindow(); } - else if (pParent->GetType() == WINDOW_FLOATINGWINDOW) + if (pParent->GetType() == WINDOW_FLOATINGWINDOW) { return static_cast<FloatingWindow*>(pParent); } - else - { - OSL_FAIL("No FloatingWindow-Context!"); - return nullptr; - } + return nullptr; +} + +FloatingWindow* SfxChildWindowContext::GetFloatingWindow() const +{ + return SfxChildWindowContext::GetFloatingWindow(pWindow->GetParent()); } void SfxChildWindow::SetFactory_Impl( SfxChildWinFactory *pF ) diff --git a/sw/source/uibase/inc/navipi.hxx b/sw/source/uibase/inc/navipi.hxx index 1c650ca..80b8c9e 100644 --- a/sw/source/uibase/inc/navipi.hxx +++ b/sw/source/uibase/inc/navipi.hxx @@ -85,8 +85,6 @@ class SwNavigationPI : public PanelLayout, VclPtr<SfxPopupWindow> m_pPopupWindow; VclPtr<SfxPopupWindow> m_pFloatingWindow; - SfxChildWindowContext* m_pContextWin; - SwNavigationConfig *m_pConfig; SfxBindings &m_rBindings; @@ -134,7 +132,7 @@ protected: public: - SwNavigationPI(SfxBindings*, SfxChildWindowContext*, vcl::Window*); + SwNavigationPI(SfxBindings*, vcl::Window*); virtual ~SwNavigationPI() override; virtual void dispose() override; diff --git a/sw/source/uibase/sidebar/SwPanelFactory.cxx b/sw/source/uibase/sidebar/SwPanelFactory.cxx index a0a1a85..3a33252 100644 --- a/sw/source/uibase/sidebar/SwPanelFactory.cxx +++ b/sw/source/uibase/sidebar/SwPanelFactory.cxx @@ -165,7 +165,7 @@ Reference<ui::XUIElement> SAL_CALL SwPanelFactory::createUIElement ( } else if (rsResourceURL.endsWith("/NavigatorPanel")) { - VclPtrInstance<SwNavigationPI> pPanel(pBindings, nullptr, pParentWindow); + VclPtrInstance<SwNavigationPI> pPanel(pBindings, pParentWindow); xElement = sfx2::sidebar::SidebarPanelBase::Create( rsResourceURL, xFrame, diff --git a/sw/source/uibase/utlui/navipi.cxx b/sw/source/uibase/utlui/navipi.cxx index 6aff4df..9fc3a69 100644 --- a/sw/source/uibase/utlui/navipi.cxx +++ b/sw/source/uibase/utlui/navipi.cxx @@ -244,7 +244,7 @@ IMPL_LINK( SwNavigationPI, ToolBoxSelectHdl, ToolBox *, pBox, void ) } else if (sCommand == "listbox") { - if (m_pContextWin && m_pContextWin->GetFloatingWindow()) + if (SfxChildWindowContext::GetFloatingWindow(GetParent())) { if (IsZoomedIn()) { @@ -583,7 +583,6 @@ void SwNavigationPI::ZoomIn() } SwNavigationPI::SwNavigationPI(SfxBindings* _pBindings, - SfxChildWindowContext* pCw, vcl::Window* pParent) : PanelLayout(pParent, "NavigatorPanel", "modules/swriter/ui/navigatorpanel.ui", nullptr) , SfxControllerItem(SID_DOCFULLNAME, *_pBindings) @@ -594,7 +593,6 @@ SwNavigationPI::SwNavigationPI(SfxBindings* _pBindings, , m_pCreateView(nullptr) , m_pPopupWindow(nullptr) , m_pFloatingWindow(nullptr) - , m_pContextWin(pCw) , m_pConfig(SW_MOD()->GetNavigationConfig()) , m_rBindings(*_pBindings) , m_nAutoMarkIdx(1) @@ -730,12 +728,12 @@ SwNavigationPI::SwNavigationPI(SfxBindings* _pBindings, m_aGlobalTree->SetAccessibleName(SW_RESSTR(STR_ACCESS_TL_GLOBAL)); m_aDocListBox->SetAccessibleName(m_aStatusArr[3]); - if (m_pContextWin == nullptr) + if (!SfxChildWindowContext::GetFloatingWindow(GetParent())) { - // When the context window is missing then the navigator is - // displayed in the sidebar. While the navigator could change - // its size, the sidebar can not, and the navigator would just - // waste space. Therefore hide this button. + // if the parent isn't a float, then then the navigator is displayed in + // the sidebar or is otherwise docked. While the navigator could change + // its size, the sidebar can not, and the navigator would just waste + // space. Therefore hide this button. m_aContentToolBox->RemoveItem(m_aContentToolBox->GetItemPos(m_aContentToolBox->GetItemId("listbox"))); } @@ -1194,7 +1192,7 @@ SwNavigationChild::SwNavigationChild( vcl::Window* pParent, SfxChildWinInfo* ) : SfxChildWindowContext( nId ) { - VclPtr<SwNavigationPI> pNavi = VclPtr<SwNavigationPI>::Create( _pBindings, this, pParent ); + VclPtr<SwNavigationPI> pNavi = VclPtr<SwNavigationPI>::Create(_pBindings, pParent); _pBindings->Invalidate(SID_NAVIGATOR); SwNavigationConfig* pNaviConfig = SW_MOD()->GetNavigationConfig(); commit 25a10ae68effd9b80b0023a86e8f8c6e74697be6 Author: Caolán McNamara <caol...@redhat.com> Date: Tue Jan 24 09:13:23 2017 +0000 add psd fuzzer Change-Id: I8969e9f5020a6c1957b7f326e5dcca52915ddd4f diff --git a/Makefile.in b/Makefile.in index d01cbf4..c56b798 100644 --- a/Makefile.in +++ b/Makefile.in @@ -426,7 +426,7 @@ $(foreach ide,\ eclipsecdt,\ $(eval $(call gb_Top_GbuildToIdeIntegration,$(ide)))) -fuzzers: Library_sal Library_salhelper Library_reg Library_store Library_unoidl codemaker Library_cppu Library_i18nlangtag Library_cppuhelper Library_comphelper StaticLibrary_ulingu StaticLibrary_jpeg StaticLibrary_findsofficepath Library_tl Rdb_services udkapi offapi Library_clew Library_gie Library_reflection Library_invocadapt Library_bootstrap Library_introspection Library_stocservices Library_xmlreader Library_gcc3_uno instsetoo_native more_fonts StaticLibrary_fuzzer Executable_wmffuzzer Executable_jpgfuzzer Executable_giffuzzer Executable_xbmfuzzer Executable_xpmfuzzer Executable_pngfuzzer Executable_bmpfuzzer Executable_svmfuzzer Executable_pcdfuzzer Executable_dxffuzzer Executable_metfuzzer Executable_ppmfuzzer +fuzzers: Library_sal Library_salhelper Library_reg Library_store Library_unoidl codemaker Library_cppu Library_i18nlangtag Library_cppuhelper Library_comphelper StaticLibrary_ulingu StaticLibrary_jpeg StaticLibrary_findsofficepath Library_tl Rdb_services udkapi offapi Library_clew Library_gie Library_reflection Library_invocadapt Library_bootstrap Library_introspection Library_stocservices Library_xmlreader Library_gcc3_uno instsetoo_native more_fonts StaticLibrary_fuzzer Executable_wmffuzzer Executable_jpgfuzzer Executable_giffuzzer Executable_xbmfuzzer Executable_xpmfuzzer Executable_pngfuzzer Executable_bmpfuzzer Executable_svmfuzzer Executable_pcdfuzzer Executable_dxffuzzer Executable_metfuzzer Executable_ppmfuzzer Executable_psdfuzzer endif # MAKE_RESTARTS diff --git a/Repository.mk b/Repository.mk index aa8043f..e039a8c 100644 --- a/Repository.mk +++ b/Repository.mk @@ -105,6 +105,7 @@ $(eval $(call gb_Helper_register_executables_for_install,OOO,brand, \ $(call gb_Helper_optional,FUZZERS,dxffuzzer) \ $(call gb_Helper_optional,FUZZERS,metfuzzer) \ $(call gb_Helper_optional,FUZZERS,ppmfuzzer) \ + $(call gb_Helper_optional,FUZZERS,psdfuzzer) \ $(if $(filter-out ANDROID IOS MACOSX WNT,$(OS)),oosplash) \ soffice_bin \ $(if $(filter DESKTOP,$(BUILD_TYPE)),unopkg_bin) \ diff --git a/vcl/Executable_psdfuzzer.mk b/vcl/Executable_psdfuzzer.mk new file mode 100644 index 0000000..d9dc453 --- /dev/null +++ b/vcl/Executable_psdfuzzer.mk @@ -0,0 +1,47 @@ +# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*- +# +# +# This file is part of the LibreOffice project. +# +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. +# + +include $(SRCDIR)/vcl/commonfuzzer.mk + +$(eval $(call gb_Executable_Executable,psdfuzzer)) + +$(eval $(call gb_Executable_use_api,psdfuzzer,\ + offapi \ + udkapi \ +)) + +$(eval $(call gb_Executable_use_externals,psdfuzzer,\ + $(fuzzer_externals) \ +)) + +$(eval $(call gb_Executable_set_include,psdfuzzer,\ + $$(INCLUDE) \ + -I$(SRCDIR)/vcl/inc \ +)) + +$(eval $(call gb_Executable_use_libraries,psdfuzzer,\ + $(fuzzer_libraries) \ +)) + +$(eval $(call gb_Executable_use_static_libraries,psdfuzzer,\ + findsofficepath \ + ulingu \ + fuzzer \ +)) + +$(eval $(call gb_Executable_add_exception_objects,psdfuzzer,\ + vcl/workben/psdfuzzer \ +)) + +$(eval $(call gb_Executable_add_libs,psdfuzzer,\ + -lFuzzingEngine \ +)) + +# vim: set noet sw=4 ts=4: diff --git a/vcl/Module_vcl.mk b/vcl/Module_vcl.mk index f0298d8..a10236b 100644 --- a/vcl/Module_vcl.mk +++ b/vcl/Module_vcl.mk @@ -118,6 +118,7 @@ $(eval $(call gb_Module_add_targets,vcl,\ Executable_dxffuzzer \ Executable_metfuzzer \ Executable_ppmfuzzer \ + Executable_psdfuzzer \ )) endif diff --git a/vcl/workben/psdfuzzer.cxx b/vcl/workben/psdfuzzer.cxx new file mode 100644 index 0000000..664e1d0 --- /dev/null +++ b/vcl/workben/psdfuzzer.cxx @@ -0,0 +1,24 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + */ + +#include <tools/stream.hxx> +#include <vcl/FilterConfigItem.hxx> +#include "commonfuzzer.hxx" + +extern "C" bool ipdGraphicImport(SvStream& rStream, Graphic& rGraphic, FilterConfigItem* pConfigItem); + +extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) +{ + SvMemoryStream aStream(const_cast<uint8_t*>(data), size, StreamMode::READ); + Graphic aGraphic; + (void)ipdGraphicImport(aStream, aGraphic, nullptr); + return 0; +} + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ commit ecf852299b71a678d084cb93f6b37b9df5dd61cb Author: Caolán McNamara <caol...@redhat.com> Date: Tue Jan 24 11:29:41 2017 +0000 coverity#1242895 Untrusted value as argument Change-Id: I1f0d8aee19d2723861aa70f31176db08299cd9b9 diff --git a/sc/source/filter/starcalc/scflt.cxx b/sc/source/filter/starcalc/scflt.cxx index 9bf381d..4880cc1 100644 --- a/sc/source/filter/starcalc/scflt.cxx +++ b/sc/source/filter/starcalc/scflt.cxx @@ -1542,7 +1542,9 @@ void Sc10Import::LoadTables() { rStream.ReadUInt16( DataEnd ); rStream.ReadUInt16( DataValue ); - pDoc->SetRowHeightRange(static_cast<SCROW> (DataStart), static_cast<SCROW> (DataEnd), static_cast<SCTAB> (TabNo), DataValue); + pDoc->SetRowHeightRange(SanitizeRow(static_cast<SCROW>(DataStart)), + SanitizeRow(static_cast<SCROW>(DataEnd)), + static_cast<SCTAB> (TabNo), DataValue); DataStart = DataEnd + 1; } pPrgrsBar->Progress(); commit 84568fa10a0aaff14b87f725604704f1907dc2e3 Author: Caolán McNamara <caol...@redhat.com> Date: Tue Jan 24 11:26:57 2017 +0000 coverity#1399021 Unchecked dynamic_cast Change-Id: I3befc9be20f8d414ec786f1a94f1f85ce94fb44b diff --git a/svx/source/unodraw/UnoGraphicExporter.cxx b/svx/source/unodraw/UnoGraphicExporter.cxx index 0be6470..3e0e40f 100644 --- a/svx/source/unodraw/UnoGraphicExporter.cxx +++ b/svx/source/unodraw/UnoGraphicExporter.cxx @@ -687,17 +687,16 @@ bool GraphicExporter::GetGraphic( ExportSettings& rSettings, Graphic& aGraphic, } } - std::unique_ptr< SdrView > pLocalView; - if( dynamic_cast<FmFormModel*>( mpDoc ) ) + std::unique_ptr<SdrView> xLocalView; + if (FmFormModel* pFormModel = dynamic_cast<FmFormModel*>(mpDoc)) { - pLocalView.reset( new FmFormView( dynamic_cast<FmFormModel*>( mpDoc ), aVDev ) ); + xLocalView.reset(new FmFormView(pFormModel, aVDev) ); } else { - pLocalView.reset( new SdrView( mpDoc, aVDev ) ); + xLocalView.reset(new SdrView(mpDoc, aVDev)); } - ScopedVclPtr<VirtualDevice> pVDev(CreatePageVDev( pPage, nWidthPix, nHeightPix )); if( pVDev )
_______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits