Repository.mk | 1 basic/source/comp/exprtree.cxx | 4 bin/distro-install-file-lists | 1 framework/source/uielement/toolbarmanager.cxx | 1 lotuswordpro/source/filter/lwpfrib.cxx | 8 - odk/source/unoapploader/unx/unoapploader.c | 1 sc/source/filter/excel/colrowst.cxx | 3 shell/Executable_gnome_open_url.mk | 22 ---- shell/Module_shell.mk | 1 shell/source/unix/misc/gnome-open-url.c | 117 -------------------------- shell/source/unix/misc/gnome-open-url.sh | 4 svl/source/items/itemset.cxx | 10 ++ sw/source/core/unocore/unocrsrhelper.cxx | 2 sw/source/filter/xml/xmltbli.cxx | 10 -- sw/source/uibase/dochdl/gloshdl.cxx | 2 sw/source/uibase/docvw/PostItMgr.cxx | 5 - sw/source/uibase/uiview/view2.cxx | 2 vcl/source/fontsubset/sft.cxx | 2 vcl/source/gdi/regionband.cxx | 18 +++- 19 files changed, 44 insertions(+), 170 deletions(-)
New commits: commit 6ca5cc5b1aea3c7dc9f8c5f96eb9b9237430278f Author: Caolán McNamara <caol...@redhat.com> Date: Mon Nov 17 13:34:39 2014 +0000 help coverity out with empty() Change-Id: Icc28a0f0f4afcbda9e595fa753494a8161f82d4c diff --git a/sw/source/uibase/docvw/PostItMgr.cxx b/sw/source/uibase/docvw/PostItMgr.cxx index c5e18c9..a2221fe 100644 --- a/sw/source/uibase/docvw/PostItMgr.cxx +++ b/sw/source/uibase/docvw/PostItMgr.cxx @@ -988,14 +988,15 @@ bool SwPostItMgr::LayoutByPage(std::list<SwSidebarWin*> &aVisiblePostItList,cons long lTopBorder = rBorder.Top() + 5; long lBottomBorder = rBorder.Bottom() - 5; const long lVisibleHeight = lBottomBorder - lTopBorder; //rBorder.GetHeight() ; + const size_t nPostItListSize = aVisiblePostItList.size(); long lTranslatePos = 0; bool bScrollbars = false; // do all necessary resizings - if (!aVisiblePostItList.empty() && lVisibleHeight < lNeededHeight) + if (nPostItListSize > 0 && lVisibleHeight < lNeededHeight) { // ok, now we have to really resize and adding scrollbars - const long lAverageHeight = (lVisibleHeight - aVisiblePostItList.size()*GetSpaceBetween()) / aVisiblePostItList.size(); + const long lAverageHeight = (lVisibleHeight - nPostItListSize*GetSpaceBetween()) / nPostItListSize; if (lAverageHeight<GetMinimumSizeWithMeta()) { bScrollbars = true; commit a7d26c9f252f35eb18d8ab2900e4a6f67ca2e875 Author: Caolán McNamara <caol...@redhat.com> Date: Mon Nov 17 12:57:44 2014 +0000 coverity#1242859 rework to silence Untrusted loop bound Change-Id: Ic30dd457b0f2fdbd13aa1508f97cdda6364390e4 diff --git a/vcl/source/gdi/regionband.cxx b/vcl/source/gdi/regionband.cxx index 4e37854..05f3f7f 100644 --- a/vcl/source/gdi/regionband.cxx +++ b/vcl/source/gdi/regionband.cxx @@ -199,10 +199,21 @@ void RegionBand::load(SvStream& rIStrm) ImplRegionBand* pCurrBand = 0; // get header from first element - sal_uInt16 nTmp16(0); - rIStrm.ReadUInt16( nTmp16 ); + sal_uInt16 nTmp16(STREAMENTRY_END); + rIStrm.ReadUInt16(nTmp16); - while(STREAMENTRY_END != (StreamEntryType)nTmp16) + if (STREAMENTRY_END == (StreamEntryType)nTmp16) + return; + + size_t nRecordsPossible = rIStrm.remainingSize() / (2*sizeof(sal_Int32)); + if (!nRecordsPossible) + { + OSL_ENSURE(false, "premature end of region stream" ); + implReset(); + return; + } + + do { // insert new band or new separation? if(STREAMENTRY_BANDHEADER == (StreamEntryType)nTmp16) @@ -254,6 +265,7 @@ void RegionBand::load(SvStream& rIStrm) // get next header rIStrm.ReadUInt16( nTmp16 ); } + while(STREAMENTRY_END != (StreamEntryType)nTmp16); } commit 6b709b27b3552ced17b612b78f1c8cadc81f620c Author: Caolán McNamara <caol...@redhat.com> Date: Mon Nov 17 12:40:45 2014 +0000 coverity#735399 Logically dead code we can only enter the bAssumeExprLParenMode controlled block once because the block sets bAssumeExprLParenMode to false bAssumeExprLParenMode is only true if the first token read in the method is LPAREN so we can only enter this block if the current token is LPAREN and its the first token processed, so the token can't be BYVAL Change-Id: I6e668fca4d127d7dbfe447e2d9f2231e05278a7d diff --git a/basic/source/comp/exprtree.cxx b/basic/source/comp/exprtree.cxx index d004b09..c01a729 100644 --- a/basic/source/comp/exprtree.cxx +++ b/basic/source/comp/exprtree.cxx @@ -1071,10 +1071,6 @@ SbiParameters::SbiParameters( SbiParser* p, bool bStandaloneExpression, bool bPa { bBracket = true; delete pExpr; - if( bByVal ) - { - pParser->Error( SbERR_LVALUE_EXPECTED ); - } return; } } commit 9d3c54c981de898e79885d73103878555b13133b Author: Caolán McNamara <caol...@redhat.com> Date: Mon Nov 17 12:09:54 2014 +0000 OSL_ENSURE->assert where guaranteed deref follows Change-Id: I241e13cbf440c1a7e208c2646ded7bf2628ca25b diff --git a/sw/source/filter/xml/xmltbli.cxx b/sw/source/filter/xml/xmltbli.cxx index 9971add..a9a9a50 100644 --- a/sw/source/filter/xml/xmltbli.cxx +++ b/sw/source/filter/xml/xmltbli.cxx @@ -688,10 +688,10 @@ void SwXMLTableCellContext_Impl::EndElement() // Until we have an API for copying we have to use the core. Reference<XUnoTunnel> xSrcCrsrTunnel( xSrcTxtCursor, UNO_QUERY); - OSL_ENSURE( xSrcCrsrTunnel.is(), "missing XUnoTunnel for Cursor" ); + assert(xSrcCrsrTunnel.is() && "missing XUnoTunnel for Cursor"); OTextCursorHelper *pSrcTxtCrsr = reinterpret_cast< OTextCursorHelper * >( sal::static_int_cast< sal_IntPtr >( xSrcCrsrTunnel->getSomething( OTextCursorHelper::getUnoTunnelId() ))); - OSL_ENSURE( pSrcTxtCrsr, "SwXTextCursor missing" ); + assert(pSrcTxtCrsr && "SwXTextCursor missing"); SwDoc *pDoc = pSrcTxtCrsr->GetDoc(); const SwPaM *pSrcPaM = pSrcTxtCrsr->GetPaM(); @@ -701,8 +701,7 @@ void SwXMLTableCellContext_Impl::EndElement() Reference<XUnoTunnel> xDstCrsrTunnel( GetImport().GetTextImport()->GetCursor(), UNO_QUERY); - OSL_ENSURE( xDstCrsrTunnel.is(), - "missing XUnoTunnel for Cursor" ); + assert(xDstCrsrTunnel.is() && "missing XUnoTunnel for Cursor"); OTextCursorHelper *pDstTxtCrsr = reinterpret_cast< OTextCursorHelper * >( sal::static_int_cast< sal_IntPtr >( xDstCrsrTunnel->getSomething( OTextCursorHelper::getUnoTunnelId() )) ); assert(pDstTxtCrsr && "SwXTextCursor missing"); commit 43d6da691fd23dd788f192f3e5f80676a7acc220 Author: Caolán McNamara <caol...@redhat.com> Date: Mon Nov 17 12:08:40 2014 +0000 coverity#1242523 we just need a copy here Change-Id: I238756de13a5bd2711538cbd92e78bbae8fced22 diff --git a/sw/source/filter/xml/xmltbli.cxx b/sw/source/filter/xml/xmltbli.cxx index e1f2f46..9971add 100644 --- a/sw/source/filter/xml/xmltbli.cxx +++ b/sw/source/filter/xml/xmltbli.cxx @@ -706,8 +706,7 @@ void SwXMLTableCellContext_Impl::EndElement() OTextCursorHelper *pDstTxtCrsr = reinterpret_cast< OTextCursorHelper * >( sal::static_int_cast< sal_IntPtr >( xDstCrsrTunnel->getSomething( OTextCursorHelper::getUnoTunnelId() )) ); assert(pDstTxtCrsr && "SwXTextCursor missing"); - SwPaM aSrcPaM( *pSrcPaM->GetPoint(), - *pSrcPaM->GetMark() ); + SwPaM aSrcPaM(*pSrcPaM->GetMark(), *pSrcPaM->GetPoint()); SwPosition aDstPos( *pDstTxtCrsr->GetPaM()->GetPoint() ); pDoc->getIDocumentContentOperations().CopyRange( aSrcPaM, aDstPos, false ); commit 0f83c393d34e879a6fadcc21faad5e9d3835637b Author: Caolán McNamara <caol...@redhat.com> Date: Mon Nov 17 12:05:06 2014 +0000 coverity#1242810 Untrusted loop bound Change-Id: I457f0f92dc32630e52efbb2bd068208a8570c5d0 diff --git a/svl/source/items/itemset.cxx b/svl/source/items/itemset.cxx index eb5ffaa..9dc809f 100644 --- a/svl/source/items/itemset.cxx +++ b/svl/source/items/itemset.cxx @@ -1487,6 +1487,16 @@ SvStream &SfxItemSet::Load // Load Item count and as many Items sal_uInt16 nCount = 0; rStream.ReadUInt16( nCount ); + + const size_t nMinRecordSize = sizeof(sal_uInt16) * 2; + const size_t nMaxRecords = rStream.remainingSize() / nMinRecordSize; + if (nCount > nMaxRecords) + { + SAL_WARN("svl", "Parsing error: " << nMaxRecords << + " max possible entries, but " << nCount << " claimed, truncating"); + nCount = nMaxRecords; + } + for ( sal_uInt16 i = 0; i < nCount; ++i ) { // Load Surrogate/Item and resolve Surrogate commit 357f9d22a0537a2af888d0b88ca3f1b2628d6516 Author: Caolán McNamara <caol...@redhat.com> Date: Mon Nov 17 11:52:18 2014 +0000 give all the open-url scripts the same starting permissions Change-Id: I35fcb2d73accf20baa96b62d99be6d0a3ebb3ba2 diff --git a/shell/source/unix/misc/kde-open-url.sh b/shell/source/unix/misc/kde-open-url.sh old mode 100644 new mode 100755 diff --git a/shell/source/unix/misc/tde-open-url.sh b/shell/source/unix/misc/tde-open-url.sh old mode 100644 new mode 100755 commit 20dab428f88066cdc54f64eaa65a7c098a250c76 Author: Caolán McNamara <caol...@redhat.com> Date: Mon Nov 17 11:48:13 2014 +0000 drop gnome-open-url binary we don't really need it anymore, fallback to our own open-url if there is nothing else to take it Change-Id: I7a4e841a53bda30e29d48b9c34d24af085f1b4b5 Related: coverity#706194 Use of untrusted string value diff --git a/Repository.mk b/Repository.mk index 3d3e35a..e5fa7eb 100644 --- a/Repository.mk +++ b/Repository.mk @@ -173,7 +173,6 @@ $(eval $(call gb_Helper_register_executables_for_install,OOO,python, \ ifeq ($(GUIBASE),unx) $(eval $(call gb_Helper_register_executables_for_install,OOO,gnome, \ - gnome-open-url.bin \ $(if $(ENABLE_GTK),\ xid-fullscreen-on-all-monitors \ ) \ diff --git a/bin/distro-install-file-lists b/bin/distro-install-file-lists index 167d514..73366f4 100755 --- a/bin/distro-install-file-lists +++ b/bin/distro-install-file-lists @@ -351,7 +351,6 @@ if test "z$OOO_VENDOR" != "zDebian" ; then done # Put gtk/gnome stuff into gnome package - mv_file_between_flists gnome_list.txt core_list.txt $INSTALLDIR/program/gnome-open-url.bin mv_file_between_flists gnome_list.txt core_list.txt $INSTALLDIR/program/ucpgvfs1lo.so # Ship ooqstart for gnome in gnome package diff --git a/shell/Executable_gnome_open_url.mk b/shell/Executable_gnome_open_url.mk deleted file mode 100644 index a5f810e..0000000 --- a/shell/Executable_gnome_open_url.mk +++ /dev/null @@ -1,22 +0,0 @@ -# -*- 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/. -# - -$(eval $(call gb_Executable_Executable,gnome-open-url.bin)) - -ifeq ($(filter DRAGONFLY FREEBSD NETBSD OPENBSD MACOSX,$(OS)),) -$(eval $(call gb_Executable_add_libs,gnome-open-url.bin,\ - -ldl \ -)) -endif - -$(eval $(call gb_Executable_add_cobjects,gnome-open-url.bin,\ - shell/source/unix/misc/gnome-open-url \ -)) - -# vim: set shiftwidth=4 tabstop=4 noexpandtab: diff --git a/shell/Module_shell.mk b/shell/Module_shell.mk index 46f081d..de906ac 100644 --- a/shell/Module_shell.mk +++ b/shell/Module_shell.mk @@ -123,7 +123,6 @@ ifneq ($(filter-out MACOSX WNT,$(OS)),) ifneq ($(ENABLE_HEADLESS),TRUE) $(eval $(call gb_Module_add_targets,shell,\ - Executable_gnome_open_url \ Library_recentfile \ Package_scripts \ Package_scripts_gnome \ diff --git a/shell/source/unix/misc/gnome-open-url.c b/shell/source/unix/misc/gnome-open-url.c deleted file mode 100644 index cd275cd..0000000 --- a/shell/source/unix/misc/gnome-open-url.c +++ /dev/null @@ -1,117 +0,0 @@ -/* -*- 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/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ - -#include <stdlib.h> -#include <stdio.h> -#include <dlfcn.h> -#include <string.h> -#include <unistd.h> - -typedef int gboolean; -typedef char gchar; -typedef struct _GError GError; - -struct _GError -{ - int domain; - int code; - char *message; -}; - -typedef enum { - GNOME_VFS_OK -} GnomeVFSResult; - -/* - * Wrapper function which extracs gnome_url_show from libgnome - */ - -gboolean gnome_url_show (const char *url, GError **error) -{ - void* handle = dlopen("libgnomevfs-2.so.0", RTLD_LAZY); - gboolean ret = 0; - - (void)error; /* avoid warning due to unused parameter */ - - if( NULL != handle ) - { - gboolean (* init) (void) = - (gboolean (*) (void)) dlsym(handle, "gnome_vfs_init"); - - if( NULL != init && init() ) - { - GnomeVFSResult (* func) (const char *url) = - (GnomeVFSResult (*) (const char *)) dlsym(handle, "gnome_vfs_url_show"); - - if( NULL != func ) - ret = (GNOME_VFS_OK == func(url)); - } - - dlclose(handle); - } - - return ret; -} - -/* - * The intended use of this tool is to pass the argument to - * the gnome_show_url function of libgnome2. - */ - -int main(int argc, char *argv[] ) -{ - GError *error = NULL; - char *fallback; - char *idx; - int retcode = -1; - - if( argc != 2 ) - { - fprintf( stderr, "Usage: gnome-open-url <uri>\n" ); - return -1; - } - - if( gnome_url_show(argv[1], &error) ) - { - return 0; - } - - /* - * launch open-url command by replacing gnome-open-url from - * the command line. This is the fallback when running on - * remote machines with no GNOME installed. - */ - - fallback = strdup(argv[0]); - idx = strstr(fallback, "gnome-open-url"); - if ( NULL != idx ) - { - char *args[3]; - strncpy(idx, "open-url", 9); - args[0] = fallback; - args[1] = argv[1]; - args[2] = NULL; - retcode = execv(fallback, args); - } - free(fallback); - - return retcode; -} - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/shell/source/unix/misc/gnome-open-url.sh b/shell/source/unix/misc/gnome-open-url.sh index ab730d1..0bcd7b63 100755 --- a/shell/source/unix/misc/gnome-open-url.sh +++ b/shell/source/unix/misc/gnome-open-url.sh @@ -1,6 +1,6 @@ #!/bin/sh -# use xdg-open or gnome-open if available -xdg-open "$1" 2>/dev/null || gnome-open "$1" 2>/dev/null || "$0.bin" $1 +# use xdg-open or gnome-open if available, falling back to our own open-url +xdg-open "$1" 2>/dev/null || gnome-open "$1" 2>/dev/null || `dirname "$0"`/open-url "$1" 2>/dev/null exit 0 commit 5208856b3ba586ef2e033ae8421fd35d00b47c94 Author: Caolán McNamara <caol...@redhat.com> Date: Mon Nov 17 11:30:38 2014 +0000 document coverity#706181 Use of untrusted string value Change-Id: If8c80568175b3a5380ee78dda5ebd161c5dba2f6 diff --git a/odk/source/unoapploader/unx/unoapploader.c b/odk/source/unoapploader/unx/unoapploader.c index 48e3678..e2b7b0b 100644 --- a/odk/source/unoapploader/unx/unoapploader.c +++ b/odk/source/unoapploader/unx/unoapploader.c @@ -221,6 +221,7 @@ int main( int argc, char *argv[] ) * create the application process; * if successful, execvp doesn't return to the calling process */ + /* coverity[tainted_string] - createCommandName creates a safe string */ execvp( cmdname, argv ); fprintf( stderr, "Error: execvp failed!\n" ); fflush( stderr ); commit 60b3d8119cfe99dc0987178cdab0ff5dac8029bb Author: Caolán McNamara <caol...@redhat.com> Date: Mon Nov 17 10:41:32 2014 +0000 third argument should be SfxFilterFlags Change-Id: Id0a73ffbbddc7fd2b2190cc04f59769561f45dd0 diff --git a/sw/source/core/unocore/unocrsrhelper.cxx b/sw/source/core/unocore/unocrsrhelper.cxx index b5e3ecd..efe476a 100644 --- a/sw/source/core/unocore/unocrsrhelper.cxx +++ b/sw/source/core/unocore/unocrsrhelper.cxx @@ -1017,7 +1017,7 @@ void InsertFile(SwUnoCrsr* pUnoCrsr, const OUString& rURL, pMed->GetItemSet()->Put( SfxStringItem( SID_DOC_BASEURL, sBaseURL ) ); SfxFilterMatcher aMatcher( rFact.GetFilterContainer()->GetName() ); - ErrCode nErr = aMatcher.GuessFilter( *pMed, &pFilter, sal_False ); + ErrCode nErr = aMatcher.GuessFilter(*pMed, &pFilter, SFX_FILTER_VERSION_NONE); if ( nErr || !pFilter) DELETEZ(pMed); else diff --git a/sw/source/uibase/dochdl/gloshdl.cxx b/sw/source/uibase/dochdl/gloshdl.cxx index 7904405..eada932 100644 --- a/sw/source/uibase/dochdl/gloshdl.cxx +++ b/sw/source/uibase/dochdl/gloshdl.cxx @@ -729,7 +729,7 @@ bool SwGlossaryHdl::ImportGlossaries( const OUString& rName ) boost::scoped_ptr<SfxMedium> pMed(new SfxMedium( rName, STREAM_READ, 0, 0 )); SfxFilterMatcher aMatcher( OUString("swriter") ); pMed->UseInteractionHandler( true ); - if( !aMatcher.GuessFilter( *pMed, &pFilter, sal_False ) ) + if (!aMatcher.GuessFilter(*pMed, &pFilter, SFX_FILTER_VERSION_NONE)) { SwTextBlocks *pGlossary = NULL; pMed->SetFilter( pFilter ); diff --git a/sw/source/uibase/uiview/view2.cxx b/sw/source/uibase/uiview/view2.cxx index 3bd1eeb..7aca2c1 100644 --- a/sw/source/uibase/uiview/view2.cxx +++ b/sw/source/uibase/uiview/view2.cxx @@ -2132,7 +2132,7 @@ long SwView::InsertDoc( sal_uInt16 nSlotId, const OUString& rFileName, const OUS pMed = new SfxMedium(rFileName, STREAM_READ, 0, 0 ); SfxFilterMatcher aMatcher( rFact.GetFilterContainer()->GetName() ); pMed->UseInteractionHandler( true ); - ErrCode nErr = aMatcher.GuessFilter( *pMed, &pFilter, sal_False ); + ErrCode nErr = aMatcher.GuessFilter(*pMed, &pFilter, SFX_FILTER_VERSION_NONE); if ( nErr ) DELETEZ(pMed); else commit 639f6dcb1fdc5b1c0a6d5804324f9ff36fd989be Author: Caolán McNamara <caol...@redhat.com> Date: Mon Nov 17 10:20:49 2014 +0000 coverity#705177 Missing break in switch this is the "close toolbar" button on right clicking a toolbar. close toolbar continues to work as expected Change-Id: I436fbe9f133442136b6e60a1f6080926f64eaef6 diff --git a/framework/source/uielement/toolbarmanager.cxx b/framework/source/uielement/toolbarmanager.cxx index 01541fc..f18bc3f 100644 --- a/framework/source/uielement/toolbarmanager.cxx +++ b/framework/source/uielement/toolbarmanager.cxx @@ -1913,6 +1913,7 @@ IMPL_LINK( ToolBarManager, MenuSelect, Menu*, pMenu ) pExecuteInfo->xWindow = VCLUnoHelper::GetInterface( m_pToolBar ); Application::PostUserEvent( STATIC_LINK(0, ToolBarManager, ExecuteHdl_Impl), pExecuteInfo ); + break; } default: commit bf5bb66fbfcb563ed4fdc0b99238fcb6239ffd9f Author: Caolán McNamara <caol...@redhat.com> Date: Mon Nov 17 10:11:28 2014 +0000 coverity#1251174 help coverity out here Change-Id: I07d6d0356ee0093f7f10a7dfbbc37a620205f37a diff --git a/vcl/source/fontsubset/sft.cxx b/vcl/source/fontsubset/sft.cxx index b694520f5..4cdb95c 100644 --- a/vcl/source/fontsubset/sft.cxx +++ b/vcl/source/fontsubset/sft.cxx @@ -1091,7 +1091,7 @@ static sal_uInt32 getGlyph2(const sal_uInt8 *cmap, const sal_uInt32 nMaxCmapSize } if(k == 0) { - firstCode = Int16FromMOTA(subHeader2s[k].firstCode); + firstCode = Int16FromMOTA(subHeader2s[0].firstCode); if(theLowByte >= firstCode && theLowByte < (firstCode + Int16FromMOTA(subHeader2s[k].entryCount))) { sal_uInt16* const pGlyph = (&(subHeader2s[0].idRangeOffset)) + (Int16FromMOTA(subHeader2s[0].idRangeOffset)/2) /* + offset */ commit b21b723c7c6ee06439200631f65ab0a39d42bbb4 Author: Caolán McNamara <caol...@redhat.com> Date: Mon Nov 17 09:55:30 2014 +0000 coverity#738972 rework to help coverity out Change-Id: I288eb5ba7a38844af1b517ae7480729c236ebd63 diff --git a/lotuswordpro/source/filter/lwpfrib.cxx b/lotuswordpro/source/filter/lwpfrib.cxx index aca528b..1d614aa 100644 --- a/lotuswordpro/source/filter/lwpfrib.cxx +++ b/lotuswordpro/source/filter/lwpfrib.cxx @@ -263,8 +263,8 @@ void LwpFrib::RegisterStyle(LwpFoundry* pFoundry) pFont = pFoundry->GetFontManger().CreateOverrideFont(pCharStyle->GetFinalFontID(),m_pModifiers->FontID); pStyle->SetFont(pFont); IXFStyleRet aNewStyle = pXFStyleManager->AddStyle(pStyle); - IXFStyle *pNewStyle = aNewStyle.m_pStyle; - m_StyleName = pNewStyle->GetStyleName(); + pStyle = dynamic_cast<XFTextStyle*>(aNewStyle.m_pStyle); + m_StyleName = pStyle->GetStyleName(); if (aNewStyle.m_bOrigDeleted) pStyle = NULL; } @@ -279,8 +279,8 @@ void LwpFrib::RegisterStyle(LwpFoundry* pFoundry) pFont = pFoundry->GetFontManger().CreateFont(m_pModifiers->FontID); pStyle->SetFont(pFont); IXFStyleRet aNewStyle = pXFStyleManager->AddStyle(pStyle); - IXFStyle *pNewStyle = aNewStyle.m_pStyle; - m_StyleName = pNewStyle->GetStyleName(); + pStyle = dynamic_cast<XFTextStyle*>(aNewStyle.m_pStyle); + m_StyleName = pStyle->GetStyleName(); if (aNewStyle.m_bOrigDeleted) pStyle = NULL; } commit 10bde6bcffc2caee731fe4c8f7f946eae6b496e4 Author: Caolán McNamara <caol...@redhat.com> Date: Mon Nov 17 09:48:26 2014 +0000 coverity#704257 Logically dead code since commit 4939fe9653430ae002056ca1481aa1716da1b368 Date: Tue Jan 29 14:23:27 2008 +0000 INTEGRATION: CWS dr58_SRC680 (1.32.188); FILE MERGED 2007/10/25 10:41:26 dr 1.32.188.1: #i81396# do not hide rows with default height Change-Id: Id185ae2ee37d1db8aaab493f7fc6a81d93424182 diff --git a/sc/source/filter/excel/colrowst.cxx b/sc/source/filter/excel/colrowst.cxx index cc447e2..9f334c0 100644 --- a/sc/source/filter/excel/colrowst.cxx +++ b/sc/source/filter/excel/colrowst.cxx @@ -132,9 +132,6 @@ void XclImpColRowSettings::SetHeight( SCROW nScRow, sal_uInt16 nHeight ) ::set_flag(nFlagVal, EXC_COLROW_USED); ::set_flag(nFlagVal, EXC_COLROW_DEFAULT, bDefHeight); - if (!bDefHeight && nRawHeight == 0) - maHiddenRows.insert_back(nScRow, nScRow+1, true); - maRowFlags.insert_back(nScRow, nScRow+1, nFlagVal); if (nScRow > mnLastScRow)
_______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits