[Libreoffice-commits] core.git: 3 commits - filter/source sd/source sfx2/source sw/inc sw/qa sw/source vcl/source
filter/source/msfilter/msdffimp.cxx |1 filter/source/t602/t602filter.cxx|2 - sd/source/ui/app/sdxfer.cxx | 18 - sd/source/ui/inc/sdxfer.hxx |4 +- sfx2/source/control/templatedlglocalview.cxx |1 sfx2/source/dialog/StyleList.cxx |2 - sw/inc/ToxLinkProcessor.hxx |3 + sw/inc/breakit.hxx |7 ++- sw/qa/core/test_ToxLinkProcessor.cxx |4 +- sw/source/core/bastyp/breakit.cxx|2 - sw/source/core/tox/ToxLinkProcessor.cxx | 13 +++ sw/source/core/unocore/unoidx.cxx| 30 sw/source/filter/ww8/ww8graf.cxx |4 +- sw/source/filter/ww8/ww8par.cxx |4 +- sw/source/filter/ww8/ww8par.hxx |2 - sw/source/filter/ww8/ww8par3.cxx |2 - sw/source/filter/ww8/ww8par6.cxx |6 +-- sw/source/ui/index/cntex.cxx | 22 ++-- sw/source/ui/index/cnttab.cxx|2 - sw/source/uibase/dochdl/swdtflvr.cxx | 14 +++ sw/source/uibase/inc/conttree.hxx|4 +- sw/source/uibase/inc/swdtflvr.hxx|4 +- sw/source/uibase/inc/swuicnttab.hxx |2 - sw/source/uibase/sidebar/TableEditPanel.cxx | 49 --- sw/source/uibase/sidebar/TableEditPanel.hxx |4 +- sw/source/uibase/utlui/glbltree.cxx | 16 vcl/source/fontsubset/sft.cxx|1 27 files changed, 107 insertions(+), 116 deletions(-) New commits: commit 20ab6da2ce6ed5728683b6cfc1dbe11a2f676ae0 Author: Noel Grandin AuthorDate: Mon Mar 6 15:04:35 2023 +0200 Commit: Noel Grandin CommitDate: Tue Mar 7 06:58:42 2023 + no need to allocate these separately they are all one or two words in size Change-Id: I701be7fd8bd4402af9c7b1473c9f4b3c8a9c0e90 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148339 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/sd/source/ui/app/sdxfer.cxx b/sd/source/ui/app/sdxfer.cxx index 2e048542f9b6..a6cf586eef65 100644 --- a/sd/source/ui/app/sdxfer.cxx +++ b/sd/source/ui/app/sdxfer.cxx @@ -130,7 +130,7 @@ SdTransferable::~SdTransferable() delete mpSdDrawDocumentIntern; moGraphic.reset(); -mpBookmark.reset(); +moBookmark.reset(); mpImageMap.reset(); mpVDev.disposeAndClear(); @@ -147,7 +147,7 @@ void SdTransferable::CreateObjectReplacement( SdrObject* pObj ) mpOLEDataHelper.reset(); moGraphic.reset(); -mpBookmark.reset(); +moBookmark.reset(); mpImageMap.reset(); if( auto pOleObj = dynamic_cast< SdrOle2Obj* >( pObj ) ) @@ -200,7 +200,7 @@ void SdTransferable::CreateObjectReplacement( SdrObject* pObj ) xPropSet->getPropertyValue( "Label" ) >>= aLabel; xPropSet->getPropertyValue( "TargetURL" ) >>= aURL; -mpBookmark.reset( new INetBookmark( aURL, aLabel ) ); +moBookmark.emplace( aURL, aLabel ); } } } @@ -226,7 +226,7 @@ void SdTransferable::CreateObjectReplacement( SdrObject* pObj ) // when both are unused if(!pObj->HasFillStyle() && !pObj->HasLineStyle()) { -mpBookmark.reset( new INetBookmark( pURL->GetURL(), pURL->GetRepresentation() ) ); +moBookmark.emplace( pURL->GetURL(), pURL->GetRepresentation() ); } } } @@ -413,7 +413,7 @@ void SdTransferable::AddSupportedFormats() AddFormat( SotClipboardFormatId::BITMAP ); } } -else if( mpBookmark ) +else if( moBookmark ) { AddFormat( SotClipboardFormatId::NETSCAPE_BOOKMARK ); AddFormat( SotClipboardFormatId::STRING ); @@ -518,9 +518,9 @@ bool SdTransferable::GetData( const DataFlavor& rFlavor, const OUString& rDestDo mpSdDrawDocumentIntern->SetOnlineSpell(true); } } -else if( ( nFormat == SotClipboardFormatId::STRING ) && mpBookmark ) +else if( ( nFormat == SotClipboardFormatId::STRING ) && moBookmark ) { -bOK = SetString( mpBookmark->GetURL() ); +bOK = SetString( moBookmark->GetURL() ); } else if( ( nFormat == SotClipboardFormatId::SVXB ) && moGraphic ) { @@ -530,9 +530,9 @@ bool SdTransferable::GetData( const DataFlavor& rFlavor, const OUString& rDestDo { bOK = SetImageMap( *mpImageMap ); } -else if( mpBookmark ) +else if( moBookmark ) { -bOK = SetINetBookmark( *mpBookmark, rFlavor ); +bOK = SetINetBookmark( *moBookmark, rFlavor ); } else if( nFormat == SotClipboardFormatId::EMBED_SOURCE ) { diff --git
[Libreoffice-commits] core.git: 3 commits - filter/source soltools/cpp
filter/source/flash/swfwriter1.cxx |4 ++-- filter/source/svg/svgwriter.cxx|3 ++- soltools/cpp/_macro.c |1 + 3 files changed, 5 insertions(+), 3 deletions(-) New commits: commit a15729a63ea90a066a6a98a762f4a1c2b19f9389 Author: Caolán McNamara AuthorDate: Sun Nov 17 19:12:44 2019 + Commit: Caolán McNamara CommitDate: Mon Nov 18 10:02:15 2019 +0100 cid#1430070 Copy-paste error add annotation Change-Id: I6973335b8877b48d5cf0a08f4e291585de352446 Reviewed-on: https://gerrit.libreoffice.org/83035 Tested-by: Jenkins Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara diff --git a/filter/source/svg/svgwriter.cxx b/filter/source/svg/svgwriter.cxx index 9253bbace5f3..ca4a2368bd9d 100644 --- a/filter/source/svg/svgwriter.cxx +++ b/filter/source/svg/svgwriter.cxx @@ -2428,7 +2428,8 @@ void SVGActionWriter::ImplWriteText( const Point& rPos, const OUString& rText, if ( aTextColor == COL_BLACK ) aTextColor = COL_WHITE; -if ( aTextColor == COL_WHITE ) +// coverity[copy_paste_error : FALSE] - aReliefColor depending on aTextColor is correct +if (aTextColor == COL_WHITE) aReliefColor = COL_BLACK; commit 24a8e873bba179cf50b2157e95a97d089e379e1c Author: Caolán McNamara AuthorDate: Sun Nov 17 19:14:07 2019 + Commit: Caolán McNamara CommitDate: Mon Nov 18 10:01:57 2019 +0100 cid#1430063 Copy-paste error add annotation Change-Id: I162b4f388baff243425d34a13c1104dfdaf92588 Reviewed-on: https://gerrit.libreoffice.org/83036 Tested-by: Jenkins Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara diff --git a/filter/source/flash/swfwriter1.cxx b/filter/source/flash/swfwriter1.cxx index 5416ab869442..4bc117c0dccf 100644 --- a/filter/source/flash/swfwriter1.cxx +++ b/filter/source/flash/swfwriter1.cxx @@ -402,10 +402,10 @@ void Writer::Impl_writeText( const Point& rPos, const OUString& rText, const lon if ( aTextColor == COL_BLACK ) aTextColor = COL_WHITE; -if ( aTextColor == COL_WHITE ) +// coverity[copy_paste_error : FALSE] - aReliefColor depending on aTextColor is correct +if (aTextColor == COL_WHITE) aReliefColor = COL_BLACK; - Point aPos( rPos ); Point aOffset( 6,6 ); commit de38c4a5ea015f0f881b80f7ec0dcbaf323bc1e0 Author: Caolán McNamara AuthorDate: Sun Nov 17 17:54:20 2019 + Commit: Caolán McNamara CommitDate: Mon Nov 18 10:01:42 2019 +0100 cid#1448469 Out-of-bounds access add an annotation Change-Id: I70a431fecd8a87f2167bdce53ec2397d22436a9d Reviewed-on: https://gerrit.libreoffice.org/83025 Tested-by: Jenkins Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara diff --git a/soltools/cpp/_macro.c b/soltools/cpp/_macro.c index eaafb86034ef..ef41b992edae 100644 --- a/soltools/cpp/_macro.c +++ b/soltools/cpp/_macro.c @@ -411,6 +411,7 @@ int ntok++; if (trp->tp >= trp->lp) { +// coverity[overrun-buffer-arg: FALSE] - a multiple of trp->max is allocated, not trp->max itself gettokens(trp, 0); if ((trp->lp - 1)->type == END) { ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: 3 commits - filter/source forms/source fpicker/source framework/source
filter/source/config/cache/filtercache.cxx |6 filter/source/config/cache/filterfactory.cxx |2 filter/source/graphicfilter/ieps/ieps.cxx |4 filter/source/graphicfilter/ios2met/ios2met.cxx|3 filter/source/graphicfilter/ipict/ipict.cxx| 10 filter/source/graphicfilter/ipsd/ipsd.cxx |4 filter/source/msfilter/eschesdo.cxx|4 filter/source/msfilter/msoleexp.cxx| 10 filter/source/msfilter/msvbahelper.cxx |4 filter/source/msfilter/svdfppt.cxx | 62 +-- filter/source/svg/svgexport.cxx|2 filter/source/svg/svgwriter.cxx| 76 ++-- filter/source/t602/t602filter.cxx |4 filter/source/xmlfilteradaptor/XmlFilterAdaptor.cxx|8 filter/source/xsltdialog/xmlfiltersettingsdialog.cxx |8 filter/source/xsltdialog/xmlfiltertestdialog.cxx |4 forms/source/component/FormComponent.cxx |2 forms/source/component/FormattedField.cxx |4 forms/source/component/ImageControl.cxx|2 forms/source/misc/InterfaceContainer.cxx | 10 fpicker/source/office/OfficeFilePicker.cxx |2 fpicker/source/office/RemoteFilesDialog.cxx|2 fpicker/source/office/iodlg.cxx|6 framework/source/accelerators/acceleratorconfiguration.cxx |5 framework/source/accelerators/presethandler.cxx| 20 - framework/source/dispatch/dispatchinformationprovider.cxx | 16 framework/source/dispatch/dispatchprovider.cxx |6 framework/source/dispatch/interceptionhelper.cxx |8 framework/source/fwe/classes/addonsoptions.cxx |2 framework/source/fwe/helper/titlehelper.cxx| 220 +++-- framework/source/helper/oframes.cxx|4 framework/source/jobs/helponstartup.cxx|4 framework/source/jobs/job.cxx |2 framework/source/jobs/jobexecutor.cxx | 31 - framework/source/jobs/joburl.cxx |6 framework/source/jobs/shelljob.cxx |6 framework/source/layoutmanager/helpers.cxx | 10 framework/source/layoutmanager/layoutmanager.cxx | 10 framework/source/layoutmanager/toolbarlayoutmanager.cxx|2 framework/source/loadenv/loadenv.cxx |4 framework/source/services/autorecovery.cxx |4 framework/source/services/frame.cxx|8 framework/source/services/pathsettings.cxx | 12 framework/source/tabwin/tabwindow.cxx |2 framework/source/uielement/controlmenucontroller.cxx |2 framework/source/uielement/progressbarwrapper.cxx |4 46 files changed, 325 insertions(+), 302 deletions(-) New commits: commit cfadf87cf51e0681d5fc4059a973ed1630a8203f Author: Noel Grandin AuthorDate: Fri Feb 8 13:16:30 2019 +0200 Commit: Noel Grandin CommitDate: Sat Feb 9 17:07:24 2019 +0100 loplugin:indentation in framework Change-Id: I9d0ef502eb812499b0372436083f673bb19ff578 Reviewed-on: https://gerrit.libreoffice.org/67557 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/framework/source/accelerators/acceleratorconfiguration.cxx b/framework/source/accelerators/acceleratorconfiguration.cxx index 37baeba37364..559be7efbb1b 100644 --- a/framework/source/accelerators/acceleratorconfiguration.cxx +++ b/framework/source/accelerators/acceleratorconfiguration.cxx @@ -864,7 +864,7 @@ void SAL_CALL XCUBasedAcceleratorConfiguration::setStorage(const css::uno::Refer sal_Bool SAL_CALL XCUBasedAcceleratorConfiguration::hasStorage() { SAL_INFO("fwk.accelerators", "XCUBasedAcceleratorConfiguration::hasStorage(): implement this HACK .-)"); -return false; +return false; } void SAL_CALL XCUBasedAcceleratorConfiguration::addConfigurationListener(const css::uno::Reference< css::ui::XUIConfigurationListener >& /*xListener*/) @@ -918,8 +918,7 @@ void SAL_CALL XCUBasedAcceleratorConfiguration::changesOccurred(const css::util: css::util::ChangesEvent aReceivedEvents( aEvent ); const sal_Int32 c = aReceivedEvents.Changes.getLength(); - sal_Int32 i = 0; -for (i=0; i xAccess; - css::uno::Sequence< OUString > lNames; -const OUString* pNames; - sal_Int32 c; - sal_Int32 i; - std::vector lPresets; - std::vector lTargets;
[Libreoffice-commits] core.git: 3 commits - filter/source
filter/source/graphicfilter/egif/giflzwc.cxx | 15 +++ filter/source/graphicfilter/egif/giflzwc.hxx |4 ++-- filter/source/graphicfilter/etiff/etiff.cxx | 12 ++-- filter/source/graphicfilter/icgm/bundles.cxx | 18 -- filter/source/graphicfilter/icgm/bundles.hxx |2 +- 5 files changed, 24 insertions(+), 27 deletions(-) New commits: commit 945642c28971efc89d3bbc5e474814b19ba2a76c Author: Noel GrandinDate: Thu May 3 15:08:26 2018 +0200 loplugin:useuniqueptr in CGMFList Change-Id: I2ad0995c9ef9e04efb4ee3dad9c1a879303c8dbd Reviewed-on: https://gerrit.libreoffice.org/53873 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/filter/source/graphicfilter/icgm/bundles.cxx b/filter/source/graphicfilter/icgm/bundles.cxx index 13bddfdcf0ec..3b0fb067b877 100644 --- a/filter/source/graphicfilter/icgm/bundles.cxx +++ b/filter/source/graphicfilter/icgm/bundles.cxx @@ -112,9 +112,9 @@ CGMFList& CGMFList::operator=( const CGMFList& rSource ) nFontsAvailable = rSource.nFontsAvailable; nFontNameCount = rSource.nFontNameCount; nCharSetCount = rSource.nCharSetCount; -for (FontEntry* pPtr : rSource.aFontEntryList) +for (auto const & pPtr : rSource.aFontEntryList) { -FontEntry* pCFontEntry = new FontEntry; +std::unique_ptr pCFontEntry(new FontEntry); if ( pPtr->pFontName ) { sal_uInt32 nSize = strlen( reinterpret_cast (pPtr->pFontName.get()) ) + 1; @@ -129,7 +129,7 @@ CGMFList& CGMFList::operator=( const CGMFList& rSource ) } pCFontEntry->eCharSetType = pPtr->eCharSetType; pCFontEntry->nFontType = pPtr->nFontType; -aFontEntryList.push_back( pCFontEntry ); +aFontEntryList.push_back( std::move(pCFontEntry) ); } return *this; } @@ -140,7 +140,7 @@ FontEntry* CGMFList::GetFontEntry( sal_uInt32 nIndex ) sal_uInt32 nInd = nIndex; if ( nInd ) nInd--; -return ( nInd < aFontEntryList.size() ) ? aFontEntryList[ nInd ] : nullptr; +return ( nInd < aFontEntryList.size() ) ? aFontEntryList[ nInd ].get() : nullptr; } @@ -168,11 +168,11 @@ void CGMFList::InsertName( sal_uInt8 const * pSource, sal_uInt32 nSize ) { nFontsAvailable++; pFontEntry = new FontEntry; -aFontEntryList.push_back( pFontEntry ); +aFontEntryList.push_back( std::unique_ptr(pFontEntry) ); } else { -pFontEntry = aFontEntryList[ nFontNameCount ]; +pFontEntry = aFontEntryList[ nFontNameCount ].get(); } nFontNameCount++; std::unique_ptr pBuf(new sal_Int8[ nSize ]); @@ -229,11 +229,11 @@ void CGMFList::InsertCharSet( CharSetType eCharSetType, sal_uInt8 const * pSourc { nFontsAvailable++; pFontEntry = new FontEntry; -aFontEntryList.push_back( pFontEntry ); +aFontEntryList.push_back( std::unique_ptr(pFontEntry) ); } else { -pFontEntry = aFontEntryList[ nCharSetCount ]; +pFontEntry = aFontEntryList[ nCharSetCount ].get(); } nCharSetCount++; pFontEntry->eCharSetType = eCharSetType; @@ -245,8 +245,6 @@ void CGMFList::InsertCharSet( CharSetType eCharSetType, sal_uInt8 const * pSourc void CGMFList::ImplDeleteList() { -for (FontEntry* i : aFontEntryList) -delete i; aFontEntryList.clear(); } diff --git a/filter/source/graphicfilter/icgm/bundles.hxx b/filter/source/graphicfilter/icgm/bundles.hxx index 51e92567a534..cf1516e2c5a1 100644 --- a/filter/source/graphicfilter/icgm/bundles.hxx +++ b/filter/source/graphicfilter/icgm/bundles.hxx @@ -159,7 +159,7 @@ class CGMFList { sal_uInt32 nFontNameCount; sal_uInt32 nCharSetCount; -::std::vector< FontEntry* > +::std::vector< std::unique_ptr > aFontEntryList; voidImplDeleteList(); commit 2834d503d683c7a125b24e49f0127d43cb2501e9 Author: Noel Grandin Date: Thu May 3 15:05:21 2018 +0200 loplugin:useuniqueptr in TIFFWriter Change-Id: I119e280f43e38c9ada64ce5a59dcee2aa0dc2e94 Reviewed-on: https://gerrit.libreoffice.org/53872 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/filter/source/graphicfilter/etiff/etiff.cxx b/filter/source/graphicfilter/etiff/etiff.cxx index 643f44031fb0..9663cb669abc 100644 --- a/filter/source/graphicfilter/etiff/etiff.cxx +++ b/filter/source/graphicfilter/etiff/etiff.cxx @@ -79,7 +79,7 @@ private: sal_uInt32 mnBitmapPos; sal_uInt32 mnStripByteCountPos; -TIFFLZWCTreeNode* pTable; +std::unique_ptr pTable; TIFFLZWCTreeNode* pPrefix; sal_uInt16 nDataSize; sal_uInt16 nClearCode;
[Libreoffice-commits] core.git: 3 commits - filter/source
filter/source/graphicfilter/itiff/itiff.cxx | 16 +++- 1 file changed, 11 insertions(+), 5 deletions(-) New commits: commit ee619fb344c7e8f491e09bd256df7f8567af9bef Author: Caolán McNamaraDate: Thu Feb 23 11:05:40 2017 + ofz: don't read data that isn't there Change-Id: I7fdcb78bde8f650c1a57d34177d8993a6d8a0a2f diff --git a/filter/source/graphicfilter/itiff/itiff.cxx b/filter/source/graphicfilter/itiff/itiff.cxx index 12aee89..807756a 100644 --- a/filter/source/graphicfilter/itiff/itiff.cxx +++ b/filter/source/graphicfilter/itiff/itiff.cxx @@ -995,6 +995,12 @@ bool TIFFReader::ConvertScanline(sal_Int32 nY) { sal_uInt32 nByteCount = nImageWidth >> 3; +sal_uInt32 nBytesNeeded = nByteCount; +if (nImageWidth & 7) +++nBytesNeeded; +if (pt + nBytesNeeded > ptend) +return false; + if ( bByteSwap ) { sal_Int32 nx = 0; commit 46b1b5dd2a5368663fd56434160fa126f1a54d84 Author: Caolán McNamara Date: Thu Feb 23 11:03:49 2017 + make this a little clearer no logic change intended Change-Id: Ibfc46d0aba9e220be54270734e0cdfbc123be9a5 diff --git a/filter/source/graphicfilter/itiff/itiff.cxx b/filter/source/graphicfilter/itiff/itiff.cxx index 4fdbb30..12aee89 100644 --- a/filter/source/graphicfilter/itiff/itiff.cxx +++ b/filter/source/graphicfilter/itiff/itiff.cxx @@ -993,12 +993,12 @@ bool TIFFReader::ConvertScanline(sal_Int32 nY) case 1 : { -sal_uInt32 nByteCount = ( nImageWidth >> 3 ) + 1; +sal_uInt32 nByteCount = nImageWidth >> 3; if ( bByteSwap ) { sal_Int32 nx = 0; -while ( --nByteCount ) +while (nByteCount--) { nByteVal = *pt++; pAcc->SetPixelIndex( nY, nx++, nByteVal & 1 ); @@ -1030,7 +1030,7 @@ bool TIFFReader::ConvertScanline(sal_Int32 nY) else { sal_Int32 nx = 7; -while ( --nByteCount ) +while (nByteCount--) { nByteVal = *pt++; pAcc->SetPixelIndex( nY, nx, nByteVal & 1 ); commit 840ad0a88045021c58644404a099a3678a371020 Author: Caolán McNamara Date: Thu Feb 23 11:01:00 2017 + improve scoping Change-Id: Ic79d46da4e322a0f52981c3a3df65f7f0294fdd8 diff --git a/filter/source/graphicfilter/itiff/itiff.cxx b/filter/source/graphicfilter/itiff/itiff.cxx index 6101d20..4fdbb30 100644 --- a/filter/source/graphicfilter/itiff/itiff.cxx +++ b/filter/source/graphicfilter/itiff/itiff.cxx @@ -782,7 +782,7 @@ sal_uLong TIFFReader::GetBits( const sal_uInt8 * pSrc, sal_uLong nBitsPos, sal_u bool TIFFReader::ConvertScanline(sal_Int32 nY) { -sal_uInt32 nRed, nGreen, nBlue, ns, nVal, nByteCount; +sal_uInt32 nRed, nGreen, nBlue, ns, nVal; sal_uInt8 nByteVal; if ( nDstBitsPerPixel == 24 ) @@ -993,10 +993,11 @@ bool TIFFReader::ConvertScanline(sal_Int32 nY) case 1 : { +sal_uInt32 nByteCount = ( nImageWidth >> 3 ) + 1; + if ( bByteSwap ) { sal_Int32 nx = 0; -nByteCount = ( nImageWidth >> 3 ) + 1; while ( --nByteCount ) { nByteVal = *pt++; @@ -1029,7 +1030,6 @@ bool TIFFReader::ConvertScanline(sal_Int32 nY) else { sal_Int32 nx = 7; -nByteCount = ( nImageWidth >> 3 ) + 1; while ( --nByteCount ) { nByteVal = *pt++; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: 3 commits - filter/source i18npool/inc i18npool/source include/svx svx/source
filter/source/config/cache/filtercache.cxx |4 ++-- filter/source/config/cache/filtercache.hxx |4 ++-- i18npool/inc/localedata.hxx|2 +- i18npool/source/localedata/localedata.cxx |4 +--- include/svx/unoshape.hxx | 10 +- svx/source/unodraw/shapeimpl.hxx |2 +- svx/source/unodraw/tableshape.cxx |4 +--- svx/source/unodraw/unoshap3.cxx| 28 +--- 8 files changed, 22 insertions(+), 36 deletions(-) New commits: commit 773ec34047ea5e94720debb42a2115958665b24c Author: Caolán McNamaraDate: Sat Jan 14 11:06:02 2017 + coverity#1398585 Uncaught exception and coverity#1398587 Uncaught exception coverity#1398588 Uncaught exception coverity#1398589 Uncaught exception coverity#1398590 Uncaught exception coverity#1398592 Uncaught exception Change-Id: I603fc492df9215e0d67419640afc3d6a2af28c10 diff --git a/include/svx/unoshape.hxx b/include/svx/unoshape.hxx index 8bf31b5..bc3d0aa5 100644 --- a/include/svx/unoshape.hxx +++ b/include/svx/unoshape.hxx @@ -697,7 +697,7 @@ class Svx3DCubeObject : public SvxShape { protected: // override these for special property handling in subcasses. Return true if property is handled -virtual bool setPropertyValueImpl( const OUString& rName, const SfxItemPropertySimpleEntry* pProperty, const css::uno::Any& rValue ) throw(css::beans::UnknownPropertyException, css::beans::PropertyVetoException, css::lang::IllegalArgumentException, css::lang::WrappedTargetException, css::uno::RuntimeException) override; +virtual bool setPropertyValueImpl( const OUString& rName, const SfxItemPropertySimpleEntry* pProperty, const css::uno::Any& rValue ) throw(css::beans::UnknownPropertyException, css::beans::PropertyVetoException, css::lang::IllegalArgumentException, css::lang::WrappedTargetException, css::uno::RuntimeException, std::exception) override; virtual bool getPropertyValueImpl( const OUString& rName, const SfxItemPropertySimpleEntry* pProperty, css::uno::Any& rValue ) throw(css::beans::UnknownPropertyException, css::lang::WrappedTargetException, css::uno::RuntimeException, std::exception) override; public: @@ -717,7 +717,7 @@ public: Svx3DSphereObject( SdrObject* pObj ) throw(); protected: // override these for special property handling in subcasses. Return true if property is handled -virtual bool setPropertyValueImpl( const OUString& rName, const SfxItemPropertySimpleEntry* pProperty, const css::uno::Any& rValue ) throw(css::beans::UnknownPropertyException, css::beans::PropertyVetoException, css::lang::IllegalArgumentException, css::lang::WrappedTargetException, css::uno::RuntimeException) override; +virtual bool setPropertyValueImpl( const OUString& rName, const SfxItemPropertySimpleEntry* pProperty, const css::uno::Any& rValue ) throw(css::beans::UnknownPropertyException, css::beans::PropertyVetoException, css::lang::IllegalArgumentException, css::lang::WrappedTargetException, css::uno::RuntimeException, std::exception) override; virtual bool getPropertyValueImpl( const OUString& rName, const SfxItemPropertySimpleEntry* pProperty, css::uno::Any& rValue ) throw(css::beans::UnknownPropertyException, css::lang::WrappedTargetException, css::uno::RuntimeException, std::exception) override; virtual ~Svx3DSphereObject() throw() override; @@ -733,7 +733,7 @@ class Svx3DLatheObject : public SvxShape { protected: // override these for special property handling in subcasses. Return true if property is handled -virtual bool setPropertyValueImpl( const OUString& rName, const SfxItemPropertySimpleEntry* pProperty, const css::uno::Any& rValue ) throw(css::beans::UnknownPropertyException, css::beans::PropertyVetoException, css::lang::IllegalArgumentException, css::lang::WrappedTargetException, css::uno::RuntimeException) override; +virtual bool setPropertyValueImpl( const OUString& rName, const SfxItemPropertySimpleEntry* pProperty, const css::uno::Any& rValue ) throw(css::beans::UnknownPropertyException, css::beans::PropertyVetoException, css::lang::IllegalArgumentException, css::lang::WrappedTargetException, css::uno::RuntimeException, std::exception) override; virtual bool getPropertyValueImpl( const OUString& rName, const SfxItemPropertySimpleEntry* pProperty, css::uno::Any& rValue ) throw(css::beans::UnknownPropertyException, css::lang::WrappedTargetException, css::uno::RuntimeException, std::exception) override; public: @@ -753,7 +753,7 @@ public: Svx3DExtrudeObject( SdrObject* pObj ) throw(); protected: // override these for special property handling in subcasses. Return true if property is handled -virtual bool setPropertyValueImpl( const OUString& rName, const SfxItemPropertySimpleEntry* pProperty, const css::uno::Any& rValue ) throw(css::beans::UnknownPropertyException,
[Libreoffice-commits] core.git: 3 commits - filter/source
filter/source/xslt/import/spreadsheetml/spreadsheetml2ooo.xsl | 18 +- 1 file changed, 9 insertions(+), 9 deletions(-) New commits: commit b68ed302830fd1c44212eeb6c23d5a08b7dc97ec Author: David TardonDate: Wed Nov 2 19:30:20 2016 +0100 check only Column elements when computing column index Change-Id: I4856227c05e97daefbae7e98c0e9d70f84e1a2b4 diff --git a/filter/source/xslt/import/spreadsheetml/spreadsheetml2ooo.xsl b/filter/source/xslt/import/spreadsheetml/spreadsheetml2ooo.xsl index 2916dc1..00b3cc9 100644 --- a/filter/source/xslt/import/spreadsheetml/spreadsheetml2ooo.xsl +++ b/filter/source/xslt/import/spreadsheetml/spreadsheetml2ooo.xsl @@ -5122,18 +5122,18 @@ + select="preceding-sibling::ss:Column[@ss:Index][last()]"/> + select="set:intersection(preceding-sibling::ss:Column, $recent-index/following-sibling::ss:Column)"/> - + commit 6f3642986f819430c16c8c804ac62aab47778245 Author: David Tardon Date: Wed Nov 2 19:29:23 2016 +0100 check only Row elements when computing row index Change-Id: I3bd1b0749f8889cbd1d92a0edfa84d754e888f03 diff --git a/filter/source/xslt/import/spreadsheetml/spreadsheetml2ooo.xsl b/filter/source/xslt/import/spreadsheetml/spreadsheetml2ooo.xsl index 41b37e9..2916dc1 100644 --- a/filter/source/xslt/import/spreadsheetml/spreadsheetml2ooo.xsl +++ b/filter/source/xslt/import/spreadsheetml/spreadsheetml2ooo.xsl @@ -5255,15 +5255,15 @@ - + - + - + commit 30e2171b6eac8e373e31f20de4a0cee6d5d64a08 Author: David Tardon Date: Wed Nov 2 19:26:45 2016 +0100 rhbz#1390776 check only Row elements when computing row index Change-Id: Ic5ef3971829597170acfdc0606b3c0f16c42be04 diff --git a/filter/source/xslt/import/spreadsheetml/spreadsheetml2ooo.xsl b/filter/source/xslt/import/spreadsheetml/spreadsheetml2ooo.xsl index 6ee9114..41b37e9 100644 --- a/filter/source/xslt/import/spreadsheetml/spreadsheetml2ooo.xsl +++ b/filter/source/xslt/import/spreadsheetml/spreadsheetml2ooo.xsl @@ -5960,15 +5960,15 @@ - + - + - + ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: 3 commits - filter/source
filter/source/config/cache/basecontainer.cxx |7 +++ filter/source/config/cache/basecontainer.hxx |4 +++- filter/source/config/cache/filtercache.cxx | 12 ++-- filter/source/config/cache/filtercache.hxx |9 - 4 files changed, 16 insertions(+), 16 deletions(-) New commits: commit 46410f7e5b79cf42aa52d7a81fe4608c34601ce6 Author: David TardonDate: Tue May 3 15:09:55 2016 +0200 use unique_ptr Change-Id: I28615a645e6e4763bb03362a90da93a818985a78 diff --git a/filter/source/config/cache/basecontainer.cxx b/filter/source/config/cache/basecontainer.cxx index 0049b43..2c193f3 100644 --- a/filter/source/config/cache/basecontainer.cxx +++ b/filter/source/config/cache/basecontainer.cxx @@ -36,7 +36,7 @@ namespace filter{ BaseContainer::BaseContainer() : BaseLock ( ) -, m_pFlushCache(nullptr ) +, m_pFlushCache() , m_eType() , m_lListener (m_aLock) { @@ -120,7 +120,7 @@ FilterCache* BaseContainer::impl_getWorkingCache() const // SAFE -> ::osl::ResettableMutexGuard aLock(m_aLock); if (m_pFlushCache) -return m_pFlushCache; +return m_pFlushCache.get(); else return ::get(); // <- SAFE @@ -471,8 +471,7 @@ void SAL_CALL BaseContainer::flush() css::uno::makeAny(ex)); } -delete m_pFlushCache; -m_pFlushCache = nullptr; +m_pFlushCache.reset(); css::uno::Reference< css::util::XRefreshable > xRefreshBroadcaster = m_xRefreshBroadcaster; diff --git a/filter/source/config/cache/basecontainer.hxx b/filter/source/config/cache/basecontainer.hxx index 9c0f924..95589b2b 100644 --- a/filter/source/config/cache/basecontainer.hxx +++ b/filter/source/config/cache/basecontainer.hxx @@ -19,6 +19,8 @@ #ifndef INCLUDED_FILTER_SOURCE_CONFIG_CACHE_BASECONTAINER_HXX #define INCLUDED_FILTER_SOURCE_CONFIG_CACHE_BASECONTAINER_HXX +#include + #include "filtercache.hxx" #include #include @@ -87,7 +89,7 @@ class BaseContainer : public BaseLock m_rCache listen on the global configuration, where m_pFlushCache write its data. m_rCache update itself automatically. */ -FilterCache* m_pFlushCache; +std::unique_ptr m_pFlushCache; /** @short specify, which sub container of the used filter cache must be wrapped by this container interface. */ diff --git a/filter/source/config/cache/filtercache.cxx b/filter/source/config/cache/filtercache.cxx index 3da7a12..dc7e4b3 100644 --- a/filter/source/config/cache/filtercache.cxx +++ b/filter/source/config/cache/filtercache.cxx @@ -43,6 +43,8 @@ #include #include +#include + #include #include #include @@ -116,12 +118,12 @@ FilterCache::~FilterCache() } -FilterCache* FilterCache::clone() const +std::unique_ptr FilterCache::clone() const { // SAFE -> -- ::osl::ResettableMutexGuard aLock(m_aLock); -FilterCache* pClone = new FilterCache(); +auto pClone = o3tl::make_unique(); // Don't copy the configuration access points here. // They will be created on demand inside the cloned instance, @@ -143,7 +145,7 @@ FilterCache* FilterCache::clone() const pClone->m_lChangedFrameLoaders = m_lChangedFrameLoaders; pClone->m_lChangedContentHandlers= m_lChangedContentHandlers; -return pClone; +return std::move(pClone); // <- SAFE -- } diff --git a/filter/source/config/cache/filtercache.hxx b/filter/source/config/cache/filtercache.hxx index 4f8b063..98005e5 100644 --- a/filter/source/config/cache/filtercache.hxx +++ b/filter/source/config/cache/filtercache.hxx @@ -20,6 +20,8 @@ #ifndef INCLUDED_FILTER_SOURCE_CONFIG_CACHE_FILTERCACHE_HXX #define INCLUDED_FILTER_SOURCE_CONFIG_CACHE_FILTERCACHE_HXX +#include + #include "cacheitem.hxx" #include #include @@ -292,11 +294,8 @@ class FilterCache : public BaseLock All internal structures will be copied here. But the internal used configuration (update) access wont be copied. The cloned instance contains a different one. - -@note The cloned instance is created on the heap. The user of this instance -has to remove it later. */ -FilterCache* clone() const; +std::unique_ptr clone() const; /** @short copy the cache content or rClone back to this instance. commit 750935fddb07650967066e00b663f0ab79f820b6 Author: David Tardon Date: Tue May 3 15:04:10 2016 +0200 drop obsolete comment Change-Id: Iad565ccd92b4518ee57f10b65ca4d8ca0730474d diff --git a/filter/source/config/cache/filtercache.cxx b/filter/source/config/cache/filtercache.cxx index 6f5616d..3da7a12 100644 --- a/filter/source/config/cache/filtercache.cxx +++
[Libreoffice-commits] core.git: 3 commits - filter/source forms/source framework/inc framework/source
filter/source/svg/svgexport.cxx | 46 ++-- filter/source/svg/svgfilter.hxx | 14 +- filter/source/svg/svgwriter.cxx |4 filter/source/svg/svgwriter.hxx |5 filter/source/xsltdialog/xmlfiltertabpagebasic.cxx|4 filter/source/xsltdialog/xmlfiltertabpagebasic.hxx|2 filter/source/xsltdialog/xmlfiltertabpagexslt.cxx |4 filter/source/xsltdialog/xmlfiltertabpagexslt.hxx |2 forms/source/component/FormComponent.cxx |4 forms/source/component/GroupManager.cxx |5 forms/source/component/GroupManager.hxx |2 forms/source/inc/FormComponent.hxx|2 forms/source/runtime/formoperations.cxx | 16 +- forms/source/runtime/formoperations.hxx |4 forms/source/xforms/pathexpression.cxx|8 - forms/source/xforms/pathexpression.hxx|2 framework/inc/classes/fwktabwindow.hxx|4 framework/inc/threadhelp/gate.hxx | 10 - framework/inc/uielement/toolbarmanager.hxx|2 framework/source/classes/fwktabwindow.cxx |4 framework/source/fwe/classes/addonsoptions.cxx| 54 +++--- framework/source/uiconfiguration/globalsettings.cxx |8 - framework/source/uiconfiguration/uicategorydescription.cxx| 16 -- framework/source/uiconfiguration/windowstateconfiguration.cxx |8 - framework/source/uielement/toolbarmanager.cxx |6 - framework/source/uielement/uicommanddescription.cxx | 22 +--- 26 files changed, 84 insertions(+), 174 deletions(-) New commits: commit 13e894bb522f17d530922abb8e6b787fb83091f7 Author: Noel GrandinDate: Mon Jan 11 13:13:44 2016 +0200 loplugin:unusedmethods unused return value in framework Change-Id: I6e02f34702ba59a961c3fec3d025e775f4e26760 diff --git a/framework/inc/classes/fwktabwindow.hxx b/framework/inc/classes/fwktabwindow.hxx index a13ed54..6fdea7a 100644 --- a/framework/inc/classes/fwktabwindow.hxx +++ b/framework/inc/classes/fwktabwindow.hxx @@ -114,10 +114,10 @@ public: voidAddEventListener( const Link & rEventListener ); voidRemoveEventListener( const Link & rEventListener ); -FwkTabPage* AddTabPage( sal_Int32 nIndex, const css::uno::Sequence< css::beans::NamedValue >& rProperties ); +voidAddTabPage( sal_Int32 nIndex, const css::uno::Sequence< css::beans::NamedValue >& rProperties ); voidActivatePage( sal_Int32 nIndex ); voidRemovePage( sal_Int32 nIndex ); -virtual voidResize() override; +virtual voidResize() override; }; } // namespace framework diff --git a/framework/inc/threadhelp/gate.hxx b/framework/inc/threadhelp/gate.hxx index cb4a3fb..9ba5db8 100644 --- a/framework/inc/threadhelp/gate.hxx +++ b/framework/inc/threadhelp/gate.hxx @@ -108,17 +108,13 @@ class Gate : private boost::noncopyable @seealsomethod open() @param "pTimeOut", optional parameter to wait a certain time -@return true, if wait was successful (gate was opened) -false, if condition has an error or timeout was reached! -@onerrorWe return false. *//*-*/ -bool wait(const TimeValue* pTimeOut = nullptr) +void wait(const TimeValue* pTimeOut = nullptr) { // We must safe access to our internal member! ::osl::ClearableMutexGuard aLock( m_aAccessLock ); // If gate not closed - caller can pass it. -bool bSuccessful = true; if( m_bClosed ) { // Then we must release used access lock - @@ -126,10 +122,8 @@ class Gate : private boost::noncopyable // and if we hold the access lock nobody else can use this object without a deadlock! aLock.clear(); // Wait for opening gate... -bSuccessful = ( m_aPassage.wait( pTimeOut ) == ::osl::Condition::result_ok ); +m_aPassage.wait( pTimeOut ); } - -return bSuccessful; } // private member diff --git a/framework/inc/uielement/toolbarmanager.hxx b/framework/inc/uielement/toolbarmanager.hxx index 90f66ed..cd912f1 100644 --- a/framework/inc/uielement/toolbarmanager.hxx +++ b/framework/inc/uielement/toolbarmanager.hxx @@ -146,7 +146,7 @@ class ToolBarManager : public
[Libreoffice-commits] core.git: 3 commits - filter/source
filter/source/svg/svgexport.cxx | 431 filter/source/svg/svgfilter.cxx |2 filter/source/svg/svgfilter.hxx |2 3 files changed, 181 insertions(+), 254 deletions(-) New commits: commit 7485ea8b917c1e4da7982611c70b0f3d0a46b27a Author: Marco CecchettiDate: Mon Dec 7 18:24:50 2015 +0100 svg-export: fix wrong conflict resolution Change-Id: Ibf3d054558c1fbf208b6d1a4683d52837b2bc183 Reviewed-on: https://gerrit.libreoffice.org/20447 Reviewed-by: Andras Timar Tested-by: Andras Timar diff --git a/filter/source/svg/svgexport.cxx b/filter/source/svg/svgexport.cxx index 7005d92..ce31b26 100644 --- a/filter/source/svg/svgexport.cxx +++ b/filter/source/svg/svgexport.cxx @@ -889,7 +889,7 @@ bool SVGFilter::implExportDocument() } // #i124608# export a given object selection, so no MasterPage export at all -if (!mbExportSelection) +if (!mbExportShapeSelection) implExportMasterPages( mMasterPageTargets, 0, mMasterPageTargets.size() - 1 ); implExportDrawPages( mSelectedPages, 0, nLastPage ); commit 59cd3f4ddb88ef1326166902ffe61d6050bfcd99 Author: Marco Cecchetti Date: Wed Dec 2 17:57:57 2015 +0100 svg export: no more an experimental feature Removed experimental feature check. Single slide exporting works as for multi slides exporting. Conflicts: filter/source/svg/svgexport.cxx Change-Id: I3b4f100f5ab9c76896e7f52d65ec27c364216c21 diff --git a/filter/source/svg/svgexport.cxx b/filter/source/svg/svgexport.cxx index 6824d95..7005d92 100644 --- a/filter/source/svg/svgexport.cxx +++ b/filter/source/svg/svgexport.cxx @@ -716,17 +716,14 @@ bool SVGFilter::implExportDocument() bool bRet = false; sal_Int32nLastPage = mSelectedPages.getLength() - 1; -SvtMiscOptions aMiscOptions; -const bool bExperimentalMode = aMiscOptions.IsExperimentalMode(); - -mbSinglePage = ((nLastPage == 0) || !bExperimentalMode) && !comphelper::LibreOfficeKit::isActive(); +mbSinglePage = (nLastPage == 0); mnVisiblePage = -1; const Reference< XPropertySet > xDefaultPagePropertySet( mxDefaultPage, UNO_QUERY ); const Reference< XExtendedDocumentHandler > xExtDocHandler( mpSVGExport->GetDocHandler(), UNO_QUERY ); // #i124608# -mbExportSelection = mbSinglePage && maShapeSelection.is() && maShapeSelection->getCount(); +mbExportShapeSelection = mbSinglePage && maShapeSelection.is() && maShapeSelection->getCount(); if(xDefaultPagePropertySet.is()) { @@ -734,7 +731,7 @@ bool SVGFilter::implExportDocument() xDefaultPagePropertySet->getPropertyValue( "Height" ) >>= nDocHeight; } -if(mbExportSelection) +if(mbExportShapeSelection) { // #i124608# create BoundRange and set nDocX, nDocY, nDocWidth and nDocHeight basegfx::B2DRange aShapeRange; @@ -794,7 +791,7 @@ bool SVGFilter::implExportDocument() // instead of centered. #define _SVG_WRITE_EXTENTS #ifdef _SVG_WRITE_EXTENTS -if( mbSinglePage ) +if( !mbPresentation ) { aAttr = OUString::number( nDocWidth * 0.01 ) + "mm"; mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, "width", aAttr ); @@ -805,7 +802,7 @@ bool SVGFilter::implExportDocument() #endif // #i124608# set viewBox explicitely to the exported content -if (mbExportSelection) +if (mbExportShapeSelection) { aAttr = OUString::number(nDocX) + " " + OUString::number(nDocY) + " "; } @@ -854,11 +851,10 @@ bool SVGFilter::implExportDocument() if( implLookForFirstVisiblePage() ) // OK! We found at least one visible page. { -if( !mbSinglePage ) +if( mbPresentation ) { implGenerateMetaData(); -if( bExperimentalMode ) -implExportAnimations(); +implExportAnimations(); } else { @@ -897,7 +893,7 @@ bool SVGFilter::implExportDocument() implExportMasterPages( mMasterPageTargets, 0, mMasterPageTargets.size() - 1 ); implExportDrawPages( mSelectedPages, 0, nLastPage ); -if( !mbSinglePage ) +if( mbPresentation ) { implGenerateScript(); } @@ -1488,7 +1484,7 @@ bool SVGFilter::implExportMasterPages( const std::vector< Reference< XDrawPage > // When the exported slides are more than one we wrap master page elements // with a svg element. -OUString aContainerTag = (mbSinglePage) ? OUString( "g" ) : OUString( "defs" ); +OUString aContainerTag = (!mbPresentation) ? OUString( "g" ) : OUString( "defs" ); SvXMLElementExport aContainerElement( *mpSVGExport, XML_NAMESPACE_NONE, aContainerTag,
[Libreoffice-commits] core.git: 3 commits - filter/source svx/source vcl/source
filter/source/msfilter/escherex.cxx |1 - svx/source/dialog/srchdlg.cxx |8 vcl/source/glyphs/graphite_layout.cxx |2 +- 3 files changed, 1 insertion(+), 10 deletions(-) New commits: commit 3fd63b98d18dc9de8b37edced8ae74e4d70b929c Author: Stephan BergmannDate: Mon Sep 14 08:25:48 2015 +0200 loplugin:implicitboolconversion Change-Id: Ib9f2b44c16e43841d560ac18ff82efd54888b9d7 diff --git a/vcl/source/glyphs/graphite_layout.cxx b/vcl/source/glyphs/graphite_layout.cxx index f1a0999..07d19cf 100644 --- a/vcl/source/glyphs/graphite_layout.cxx +++ b/vcl/source/glyphs/graphite_layout.cxx @@ -154,7 +154,7 @@ GraphiteLayout::fillFrom(gr_segment * pSegment, ImplLayoutArgs , float fSc if (firstChar < mnMinCharPos || firstChar >= mnEndCharPos) continue; // handle reordered clusters. Presumes reordered glyphs have monotonic opposite char index until the cluster base. -bool isReordered = (nextBaseSlot && ((bRtl ^ (gr_slot_before(nextBaseSlot) < firstChar - mnSegCharOffset)) +bool isReordered = (nextBaseSlot && ((bRtl != (gr_slot_before(nextBaseSlot) < firstChar - mnSegCharOffset)) || gr_slot_before(nextBaseSlot) == firstChar - mnSegCharOffset)); if (clusterStart >= 0 && !isReordered) // we hit the base (end) of a reordered cluster { commit 2c6a260b12bea4f7024ad39acf90d42cff3e173e Author: Stephan Bergmann Date: Fri Sep 11 17:51:52 2015 +0200 clang-analyzer-deadcode.DeadStores ...ever since the code block's inception with 8037c7164c747ea240b563af39a11f4f6bf037ef "#119860# fix bent connector's type lost when save .ppt file" Change-Id: I6afa201a83c588cc8b280a99cb75c2267b962efc diff --git a/filter/source/msfilter/escherex.cxx b/filter/source/msfilter/escherex.cxx index fa693fc..d3033b5 100644 --- a/filter/source/msfilter/escherex.cxx +++ b/filter/source/msfilter/escherex.cxx @@ -2296,7 +2296,6 @@ bool EscherPropertyContainer::CreateConnectorProperties( rShapeType = ( sal_uInt16 )( ESCHER_ShpInst_BentConnector2 + nAdjCount); for ( sal_Int32 i = 0 ; i < nAdjCount; ++ i) AddOpt( (sal_uInt16) ( ESCHER_Prop_adjustValue+i) , lcl_GetConnectorAdjustValue( aPoly, i ) ); -bRetValue = true; } sal_Int32 nAngle=0; if (lcl_GetAngle(aPoly,rShapeFlags,nAngle )) commit c2e546c5837943466f2addfafc0d8aedc4c8e041 Author: Stephan Bergmann Date: Fri Sep 11 17:43:36 2015 +0200 clang-analyzer-deadcode.DeadStores The if block had been disabled ever since c7c85ab76a60be56ebc51657aa30fa84eb2ddf84 "INTEGRATION: CWS pbfinal01," but that has probably become irrelevant at least since b80e865d369b4d94f29ac6dcc27379d3c6e72ada "Convert find & replace dialog to .ui" introduced SvxSearchDialog::ShowOptionalControls_Impl (called a few lines above the original if block), which (using a slightly different logic to determine bDrawApp) shows/hides m_pRegExpBtn and m_pLayoutBtn anyway. Change-Id: Iaf2c1d8ef1b4e3155d7c4109f15be86d738ba074 diff --git a/svx/source/dialog/srchdlg.cxx b/svx/source/dialog/srchdlg.cxx index 5c85a13..3dd2321 100644 --- a/svx/source/dialog/srchdlg.cxx +++ b/svx/source/dialog/srchdlg.cxx @@ -804,7 +804,6 @@ void SvxSearchDialog::Init_Impl( bool bSearchPattern ) ShowOptionalControls_Impl(); -bool bDraw = false; if ( pSearchItem->GetAppFlag() == SvxSearchApp::CALC ) { m_pCalcGrid->Show(); @@ -864,7 +863,6 @@ void SvxSearchDialog::Init_Impl( bool bSearchPattern ) m_pFormatBtn->Hide(); m_pNoFormatBtn->Hide(); m_pAttributeBtn->Hide(); -bDraw = true; } else { @@ -887,12 +885,6 @@ void SvxSearchDialog::Init_Impl( bool bSearchPattern ) } } -if ( false && !bDraw ) //! -{ -m_pRegExpBtn->Show(); -m_pLayoutBtn->Show(); -} - // similarity search? if ( ( nModifyFlag & MODIFY_SIMILARITY ) == 0 ) m_pSimilarityBox->Check( pSearchItem->IsLevenshtein() ); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: 3 commits - filter/source formula/source sw/source
filter/source/msfilter/msdffimp.cxx |9 +++-- formula/source/ui/dlg/formula.cxx |3 +-- sw/source/core/doc/DocumentLinksAdministrationManager.cxx |2 -- 3 files changed, 8 insertions(+), 6 deletions(-) New commits: commit d60b265d0e364a8c0581eca10d61faa6f29c9ef5 Author: Caolán McNamara caol...@redhat.com Date: Mon Aug 3 15:04:22 2015 +0100 coverity#1314995 Logically dead code Change-Id: I3ff55ee78927f46e337d56eeebeaebec87b604be diff --git a/sw/source/core/doc/DocumentLinksAdministrationManager.cxx b/sw/source/core/doc/DocumentLinksAdministrationManager.cxx index cb872c4..d838226 100644 --- a/sw/source/core/doc/DocumentLinksAdministrationManager.cxx +++ b/sw/source/core/doc/DocumentLinksAdministrationManager.cxx @@ -97,8 +97,6 @@ namespace { if (::sw::mark::DdeBookmark* const pBkmk = dynamic_cast ::sw::mark::DdeBookmark*(ppMark-get())) { -if (!pBkmk) -return NULL; if ( (bCaseSensitive (pBkmk-GetName() == sNameLc)) || (!bCaseSensitive GetAppCharClass().lowercase(pBkmk-GetName()) == sNameLc) commit 5c578d4f9764890644bf88270273d6d5703e8225 Author: Caolán McNamara caol...@redhat.com Date: Mon Aug 3 15:02:37 2015 +0100 coverity#1309048 Unchecked return value Change-Id: If005f622bc76445f3a6becb26280abe40ee77e26 diff --git a/formula/source/ui/dlg/formula.cxx b/formula/source/ui/dlg/formula.cxx index ad3cbe4..95d112c 100644 --- a/formula/source/ui/dlg/formula.cxx +++ b/formula/source/ui/dlg/formula.cxx @@ -748,8 +748,7 @@ void FormulaDlg_Impl::MakeTree(IStructHelper* _pTree,SvTreeListEntry* pParent,Fo { OUString aCellResult; OUString aEquals( = ); -CalcValue( = + aResult, aCellResult); -if (aCellResult != aResult) // cell is a formula, print subformula +if (CalcValue( = + aResult, aCellResult) aCellResult != aResult) // cell is a formula, print subformula _pTree-InsertEntry(aResult + aEquals + aCellResult,pParent,STRUCT_END,0,_pToken); else _pTree-InsertEntry(aResult,pParent,STRUCT_END,0,_pToken); commit bb870b7e8c009b3379750b990eaff142cec183b8 Author: Caolán McNamara caol...@redhat.com Date: Mon Aug 3 15:01:05 2015 +0100 coverity#1157790 Division or modulo by float zero Change-Id: I98ada1d4ccae0b804a6a083cdd0ab185c556ad71 diff --git a/filter/source/msfilter/msdffimp.cxx b/filter/source/msfilter/msdffimp.cxx index 05fd7ea..7cc9010 100644 --- a/filter/source/msfilter/msdffimp.cxx +++ b/filter/source/msfilter/msdffimp.cxx @@ -4579,8 +4579,13 @@ SdrObject* SvxMSDffManager::ImportShape( const DffRecordHeader rHd, SvStream r Size( (sal_Int32)( aLogicRect.GetWidth() * fXScale ), (sal_Int32)( aLogicRect.GetHeight() * fYScale ) ) ); // creating the text frame - scaling into (0,0),(21600,21600) destination coordinate system -double fTextFrameScaleX = (double)21600 / (double)aPolyBoundRect.GetWidth(); -double fTextFrameScaleY = (double)21600 / (double)aPolyBoundRect.GetHeight(); +double fTextFrameScaleX = 0.0; +double fTextFrameScaleY = 0.0; +if (aPolyBoundRect.GetWidth()) +fTextFrameScaleX = (double)21600 / (double)aPolyBoundRect.GetWidth(); +if (aPolyBoundRect.GetHeight()) +fTextFrameScaleY = (double)21600 / (double)aPolyBoundRect.GetHeight(); + sal_Int32 nLeft = (sal_Int32)(( aPolyPieRect.Left() - aPolyBoundRect.Left() ) * fTextFrameScaleX ); sal_Int32 nTop = (sal_Int32)(( aPolyPieRect.Top() - aPolyBoundRect.Top() ) * fTextFrameScaleY ); sal_Int32 nRight = (sal_Int32)(( aPolyPieRect.Right() - aPolyBoundRect.Left() ) * fTextFrameScaleX ); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: 3 commits - filter/source oox/source
filter/source/msfilter/escherex.cxx | 91 oox/source/export/shapes.cxx|4 - 2 files changed, 2 insertions(+), 93 deletions(-) New commits: commit 2181f936c88811d5b6eb6081355a99a727261a8f Author: Andras Timar andras.ti...@collabora.com Date: Sat Jun 13 11:46:47 2015 +0200 no need to check for pShape here Change-Id: I6de2da7d2f17a14ddbe7e70651a416a01f49164b diff --git a/oox/source/export/shapes.cxx b/oox/source/export/shapes.cxx index 7db7c58..158de6b 100644 --- a/oox/source/export/shapes.cxx +++ b/oox/source/export/shapes.cxx @@ -512,7 +512,7 @@ ShapeExport ShapeExport::WriteCustomShape( Reference XShape xShape ) { WritePolyPolygon( tools::PolyPolygon( pShape-GetLineGeometry(true) ) ); } -else if (bCustGeom pShape) +else if (bCustGeom) { WriteCustomGeometry( xShape ); } commit 98a1065499edfe595f479e4fab41c0183fc5d5d2 Author: Andras Timar andras.ti...@collabora.com Date: Sat Jun 13 11:43:30 2015 +0200 amend comment Change-Id: I45a452a7dbab35ab96c04336b35857f58a0af0c5 diff --git a/oox/source/export/shapes.cxx b/oox/source/export/shapes.cxx index f3f57c4..7db7c58 100644 --- a/oox/source/export/shapes.cxx +++ b/oox/source/export/shapes.cxx @@ -494,7 +494,7 @@ ShapeExport ShapeExport::WriteCustomShape( Reference XShape xShape ) // we export non-primitive shapes to custom geometry // we also export non-ooxml shapes which have handles/equations to custom geometry, because // we cannot convert ODF equations to DrawingML equations. TODO: see what binary DOC export filter does. -// but our WritePolyPolygon() function is incomplete, therefore we use a blacklist +// but our WritePolyPolygon()/WriteCustomGeometry() functions are incomplete, therefore we use a blacklist // we use a whitelist for shapes where mapping to MSO preset shape is not optimal bool bCustGeom = true; if( sShapeType == ooxml-non-primitive ) commit 6f1eb0b8ef674eab193498d569c6534c393258f5 Author: Andras Timar andras.ti...@collabora.com Date: Sat Jun 13 11:40:23 2015 +0200 remove unused code Change-Id: If9b7870673a47b78457f6e22ee0cfa7e3a68372a diff --git a/filter/source/msfilter/escherex.cxx b/filter/source/msfilter/escherex.cxx index 1e298dc..b3dbfde 100644 --- a/filter/source/msfilter/escherex.cxx +++ b/filter/source/msfilter/escherex.cxx @@ -1776,7 +1776,6 @@ tools::PolyPolygon EscherPropertyContainer::GetPolyPolygon( const ::com::sun::st OUString sPolyPolygonBezier ( PolyPolygonBezier ); OUString sPolyPolygon ( PolyPolygon ); OUString sPolygon ( Polygon ); -OUString sCustomShapeGeometry ( CustomShapeGeometry ); if ( aAny = aXPropSet ) { @@ -1785,8 +1784,6 @@ tools::PolyPolygon EscherPropertyContainer::GetPolyPolygon( const ::com::sun::st bHasProperty = EscherPropertyValueHelper::GetPropertyValue( aAny, aXPropSet, sPolyPolygon, true ); if ( !bHasProperty ) bHasProperty = EscherPropertyValueHelper::GetPropertyValue( aAny, aXPropSet, sPolygon, true ); -if ( !bHasProperty ) -bHasProperty = EscherPropertyValueHelper::GetPropertyValue( aAny, aXPropSet, sCustomShapeGeometry, true ); if ( bHasProperty ) aRetPolyPoly = GetPolyPolygon( aAny ); } @@ -1912,94 +1909,6 @@ tools::PolyPolygon EscherPropertyContainer::GetPolyPolygon( const ::com::sun::st } } } -else if ( rAny.getValueType() == cppu::UnoTypeuno::Sequence beans::PropertyValue ::get() ) -{ -uno::Sequence beans::PropertyValue const * pGeometrySeq = -static_castuno::Sequence beans::PropertyValue const *(rAny.getValue()); - -if ( pGeometrySeq ) -{ -for( int i = 0; i pGeometrySeq-getLength(); ++i ) -{ -const beans::PropertyValue rProp = (*pGeometrySeq)[ i ]; -if ( rProp.Name == Path ) -{ -uno::Sequencebeans::PropertyValue aPathProp; -rProp.Value = aPathProp; - -uno::Sequencedrawing::EnhancedCustomShapeParameterPair aPairs; -uno::Sequencedrawing::EnhancedCustomShapeSegment aSegments; -for (int j = 0; j aPathProp.getLength(); ++j ) -{ -const beans::PropertyValue rPathProp = aPathProp[j]; -if (rPathProp.Name == Coordinates) -rPathProp.Value = aPairs; -else if (rPathProp.Name == Segments) -rPathProp.Value = aSegments; -} - -aPolygon = Polygon( aPairs.getLength() ); -for( int j = 0; j aPairs.getLength(); ++j ) -{ -aPolygon[j] = Point( aPairs[j].First.Value.getsal_Int32(),
[Libreoffice-commits] core.git: 3 commits - filter/source include/vcl vcl/source
filter/source/pdf/impdialog.cxx |7 +++ filter/source/pdf/impdialog.hrc |4 filter/source/pdf/impdialog.src | 10 ++ filter/source/pdf/pdfexport.cxx |2 +- include/vcl/pdfwriter.hxx |5 - vcl/source/gdi/pdfwriter_impl.cxx | 16 ++-- 6 files changed, 40 insertions(+), 4 deletions(-) New commits: commit d8a8ff8177df628636d80c4dc1d8f597f6677dfc Author: Tor Lillqvist t...@collabora.com Date: Wed Dec 3 14:02:34 2014 +0200 fdo#83939: Set error code if signing failed Change-Id: I45f1077c744e20a369a73bf0b83c8dba04ddcda7 diff --git a/vcl/source/gdi/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx index 5f77f88..f018615 100644 --- a/vcl/source/gdi/pdfwriter_impl.cxx +++ b/vcl/source/gdi/pdfwriter_impl.cxx @@ -6984,7 +6984,13 @@ bool PDFWriterImpl::emit() #if !defined(ANDROID) !defined(IOS) if (m_nSignatureObject != -1) // if document is signed, emit sigdict -CHECK_RETURN( emitSignature() ); +{ +if( !emitSignature() ) +{ +m_aErrors.insert( PDFWriter::Error_Signature_Failed ); +return false; +} +} #endif // emit trailer @@ -6992,7 +6998,13 @@ bool PDFWriterImpl::emit() #if !defined(ANDROID) !defined(IOS) if (m_nSignatureObject != -1) // finalize the signature -CHECK_RETURN( finalizeSignature() ); +{ +if( !finalizeSignature() ) +{ +m_aErrors.insert( PDFWriter::Error_Signature_Failed ); +return false; +} +} #endif m_aFile.close(); commit 1fe9ee73a758603ee0e1465931352c41ef8bd999 Author: Tor Lillqvist t...@collabora.com Date: Wed Dec 3 14:01:58 2014 +0200 fdo#83939: Add new error code for failed PDF signing, and handle it Change-Id: Ide6dc06d33faea795272d9d32fc028ac8d023c5a diff --git a/filter/source/pdf/impdialog.cxx b/filter/source/pdf/impdialog.cxx index 20e0350..b024d17 100644 --- a/filter/source/pdf/impdialog.cxx +++ b/filter/source/pdf/impdialog.cxx @@ -1496,6 +1496,13 @@ ImplErrorDialog::ImplErrorDialog(const std::set vcl::PDFWriter::ErrorCode rE m_pErrors-SetEntryData( nPos, new OUString( PDFFilterResId( STR_WARN_TRANSP_CONVERTED ) ) ); } break; +case vcl::PDFWriter::Error_Signature_Failed: +{ +sal_uInt16 nPos = m_pErrors-InsertEntry( OUString( PDFFilterResId( STR_ERR_SIGNATURE_FAILED ) ), +aErrImg ); +m_pErrors-SetEntryData( nPos, new OUString( PDFFilterResId( STR_ERR_PDF_EXPORT_ABORTED ) ) ); +} +break; default: break; } diff --git a/filter/source/pdf/impdialog.hrc b/filter/source/pdf/impdialog.hrc index d55d590..57f1045 100644 --- a/filter/source/pdf/impdialog.hrc +++ b/filter/source/pdf/impdialog.hrc @@ -19,6 +19,9 @@ #include filter.hrc +#define STR_ERR_SIGNATURE_FAILED(RID_PDF_DIALOG_START + 0) +#define STR_ERR_PDF_EXPORT_ABORTED (RID_PDF_DIALOG_START + 1) + #define STR_WARN_PASSWORD_PDFA (RID_PDF_DIALOG_START + 6) //strings for PDF security, user password management @@ -39,5 +42,6 @@ #define IMG_ERR (RID_PDF_DIALOG_START + 18) //ATTENTION: maximum allowed value is (RID_PDF_DIALOG_START + 19) +//(see filter/inc/filter.hrc) /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/filter/source/pdf/impdialog.src b/filter/source/pdf/impdialog.src index 8bb0512..53ba8f2 100644 --- a/filter/source/pdf/impdialog.src +++ b/filter/source/pdf/impdialog.src @@ -78,6 +78,16 @@ String STR_WARN_TRANSP_CONVERTED_SHORT Text [en-US] = Transparencies removed; }; +String STR_ERR_SIGNATURE_FAILED +{ +Text [en-US] = Signature generation failed; +}; + +String STR_ERR_PDF_EXPORT_ABORTED +{ +Text [en-US] = PDF export aborted; +}; + Bitmap IMG_WARN { File = ballgreen_7.png; diff --git a/include/vcl/pdfwriter.hxx b/include/vcl/pdfwriter.hxx index 880e2fa..5b4b35d 100644 --- a/include/vcl/pdfwriter.hxx +++ b/include/vcl/pdfwriter.hxx @@ -216,7 +216,10 @@ public: // transparent objects were converted to a bitmap in order // to removetransparencies from the output -Warning_Transparency_Converted +Warning_Transparency_Converted, + +// signature generation failed +Error_Signature_Failed, }; struct VCL_DLLPUBLIC AnyWidget commit 840f75065918c4584fa9159fdc90242b5374ab37 Author: Tor Lillqvist t...@collabora.com Date: Wed Dec 3 14:00:38 2014 +0200 fdo#83939: Check return value from pPDFWriter-Emit() Change-Id: Id492b1b6b9d534276c155b1e46953d098ce8b969 diff --git a/filter/source/pdf/pdfexport.cxx b/filter/source/pdf/pdfexport.cxx index ffa9e42..9e83456 100644 --- a/filter/source/pdf/pdfexport.cxx +++ b/filter/source/pdf/pdfexport.cxx @@ -914,7 +914,7 @@ bool PDFExport::Export( const OUString rFile, const Sequence PropertyValue
[Libreoffice-commits] core.git: 3 commits - filter/source sal/rtl
filter/source/xmlfilterdetect/filterdetect.cxx |7 ++- sal/rtl/ustring.cxx| 24 +--- 2 files changed, 19 insertions(+), 12 deletions(-) New commits: commit ba08fe174660dc4abdda0aec02dc52b9c7fdb7b5 Author: Michael Stahl mst...@redhat.com Date: Thu Nov 6 18:32:35 2014 +0100 filter: use more appropriate conversion from ASCII for arbitrary input ... with unknown encoding, mapping non-ASCII chars to something that doesn't cause trouble (in FilterDetect::detect()). Change-Id: Ibf2a2e2fd7c0c00e55042d2ccad173fab7a1b0bd diff --git a/filter/source/xmlfilterdetect/filterdetect.cxx b/filter/source/xmlfilterdetect/filterdetect.cxx index a6f0089..b4d614f 100644 --- a/filter/source/xmlfilterdetect/filterdetect.cxx +++ b/filter/source/xmlfilterdetect/filterdetect.cxx @@ -115,7 +115,12 @@ OUString SAL_CALL FilterDetect::detect( com::sun::star::uno::Sequence com::sun: } if ( nUniPos == 3 || ( nUniPos == 0 !bTryUtf16 ) ) // UTF-8 or non-Unicode -resultString = OStringToOUString( read_uInt8s_ToOString( *pInStream, nSize ), RTL_TEXTENCODING_UTF8 ); +{ +OString const str(read_uInt8s_ToOString(*pInStream, nSize)); +resultString = OUString(str.getStr(), str.getLength(), +RTL_TEXTENCODING_ASCII_US, + RTL_TEXTTOUNICODE_FLAGS_UNDEFINED_DEFAULT|RTL_TEXTTOUNICODE_FLAGS_MBUNDEFINED_DEFAULT|RTL_TEXTTOUNICODE_FLAGS_INVALID_DEFAULT); +} else if ( nUniPos == 2 || bTryUtf16 ) // UTF-16 resultString = read_uInt16s_ToOUString( *pInStream, nSize ); commit aaccd8560e555d7e3cf062ca3672b77702397a70 Author: Michael Stahl mst...@redhat.com Date: Thu Nov 6 18:31:24 2014 +0100 sal: it is impossible to have non-ASCII char here ...because rtl_ImplGetFastUTF8UnicodeLen has already checked that. Change-Id: I17f2b80f374073934a8f0b1a97099d4dec89ce4e diff --git a/sal/rtl/ustring.cxx b/sal/rtl/ustring.cxx index 1d30dcc..3e4f5c3 100644 --- a/sal/rtl/ustring.cxx +++ b/sal/rtl/ustring.cxx @@ -696,10 +696,7 @@ retry: pBuffer = (*ppThis)-buffer; do { -/* Check ASCII range */ -SAL_WARN_IF( ((unsigned char)*pStr) 127, rtl.string, -rtl_string2UString_status() - UTF8 test encoding is wrong ); - +assert(((unsigned char)*pStr) = 127); *pBuffer = *pStr; pBuffer++; pStr++; commit 5936a64c2aa275992ce231183b35711d8da74ace Author: Michael Stahl mst...@redhat.com Date: Thu Nov 6 18:27:25 2014 +0100 sal: do not ignore conversion flags for RTL_TEXTENCODING_ASCII_US Keep the fast path fast, fall back to the text encoder in case there's a fly in the ointment. Change-Id: I94507856a7f3170f770adb741aa1e282d0d2400c diff --git a/sal/rtl/ustring.cxx b/sal/rtl/ustring.cxx index c7622bd..1d30dcc 100644 --- a/sal/rtl/ustring.cxx +++ b/sal/rtl/ustring.cxx @@ -641,23 +641,28 @@ static void rtl_string2UString_status( rtl_uString** ppThis, return; } pBuffer = (*ppThis)-buffer; +sal_Int32 nLenCopy(nLen); +const sal_Char *pStrCopy(pStr); do { /* Check ASCII range */ -SAL_WARN_IF( ((unsigned char)*pStr) 127, rtl.string, -rtl_string2UString_status() - Found char 127 and RTL_TEXTENCODING_ASCII_US is specified ); +if (static_castunsigned char(*pStrCopy) 127) +{ +rtl_uString_release(*ppThis); +goto retry; // cancel loop - try again with the converter +} -*pBuffer = *pStr; +*pBuffer = *pStrCopy; pBuffer++; -pStr++; -nLen--; +pStrCopy++; +nLenCopy--; } -while ( nLen ); +while (nLenCopy); if (pInfo != NULL) { *pInfo = 0; } } -else +retry: { rtl_uString*pTemp; rtl_uString*pTemp2 = NULL; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: 3 commits - filter/source sal/Module_sal.mk vcl/win
filter/source/xsltfilter/LibXSLTTransformer.cxx |2 +- sal/Module_sal.mk |2 +- vcl/win/source/window/salframe.cxx |2 +- 3 files changed, 3 insertions(+), 3 deletions(-) New commits: commit 845e8427fce66ad26a6b31219b9e1f13e7256c3f Author: Tor Lillqvist t...@collabora.com Date: Tue Jul 8 11:25:42 2014 +0300 Include algorithm for std::min() and max() Change-Id: I88a590344292b4adf562ca83f5072d543b5924ad diff --git a/filter/source/xsltfilter/LibXSLTTransformer.cxx b/filter/source/xsltfilter/LibXSLTTransformer.cxx index de259dd..d0d850f 100644 --- a/filter/source/xsltfilter/LibXSLTTransformer.cxx +++ b/filter/source/xsltfilter/LibXSLTTransformer.cxx @@ -8,7 +8,7 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ - +#include algorithm #include cstdio #include cstring #include list commit b139eefeef9cfe3dd45228cd2b73d0cfd08d9bf3 Author: Tor Lillqvist t...@collabora.com Date: Tue Jul 8 11:13:46 2014 +0300 Bypass CppunitTest_sal_osl_security with VS2013 for now, hangs Change-Id: I8500b0cc4e541c96124425b713ba96226ff4715d diff --git a/sal/Module_sal.mk b/sal/Module_sal.mk index 139ca5e..2cfbaee 100644 --- a/sal/Module_sal.mk +++ b/sal/Module_sal.mk @@ -40,7 +40,7 @@ $(eval $(call gb_Module_add_check_targets,sal,\ CppunitTest_sal_osl_file) \ $(if $(filter TRUE,$(DISABLE_DYNLOADING)),,CppunitTest_sal_osl_module) \ CppunitTest_sal_osl_old_test_file \ - CppunitTest_sal_osl_security \ + $(if $(filter-out MSC-120,$(COM)-$(VCVER)),CppunitTest_sal_osl_security) \ CppunitTest_sal_osl_thread \ CppunitTest_sal_rtl_alloc \ CppunitTest_sal_rtl_process \ commit eee44c951c104da342d55fd4de634efd51ae59ae Author: Tor Lillqvist t...@collabora.com Date: Tue Jul 8 10:17:48 2014 +0300 Fix some OUString construction error with VS2013 A bit unclear to me whether the code really did what was intended with earlier VS versions either. VS2013 said: error C2664: 'rtl::OUString::OUString(const sal_uInt32 *,sal_Int32)' : cannot convert argument 1 from 'const char *' to 'const rtl::OUString ' Reason: cannot convert from 'const char *' to 'const rtl::OUString' No constructor could take the source type, or constructor overload resolution was ambiguous Change-Id: Ie23d8382515064062a3ed46418d9d4a977b35d28 diff --git a/vcl/win/source/window/salframe.cxx b/vcl/win/source/window/salframe.cxx index 9cd8fa2..e2620aa 100644 --- a/vcl/win/source/window/salframe.cxx +++ b/vcl/win/source/window/salframe.cxx @@ -4441,7 +4441,7 @@ static int ImplMenuChar( HWND, WPARAM wParam, LPARAM lParam ) { int nRet = MNC_IGNORE; HMENU hMenu = (HMENU) lParam; -OUString aMnemonic( + (sal_Unicode) LOWORD(wParam) ); +OUString aMnemonic( + OUString((sal_Unicode) LOWORD(wParam)) ); aMnemonic = aMnemonic.toAsciiLowerCase(); // we only have ascii mnemonics // search the mnemonic in the current menu ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: 3 commits - filter/source
filter/source/graphicfilter/icgm/chart.hxx | 50 + filter/source/graphicfilter/itiff/lzwdecom.cxx | 14 +-- filter/source/msfilter/eschesdo.cxx| 30 --- 3 files changed, 70 insertions(+), 24 deletions(-) New commits: commit dfc39fcdbf2ded137d4c40869a5c4473a45a1a6c Author: Caolán McNamara caol...@redhat.com Date: Fri Apr 11 20:49:57 2014 +0100 coverity#707837 Uninitialized scalar field Change-Id: Icce1d2cd9abfebcf26e916c4c79341b617e97b2e diff --git a/filter/source/msfilter/eschesdo.cxx b/filter/source/msfilter/eschesdo.cxx index 6c1d7ef..5e0cb08 100644 --- a/filter/source/msfilter/eschesdo.cxx +++ b/filter/source/msfilter/eschesdo.cxx @@ -61,22 +61,26 @@ using namespace ::com::sun::star::style; #define EES_MAP_FRACTION 1440 // 1440 dpi ImplEESdrWriter::ImplEESdrWriter( EscherEx rEx ) -: -mpEscherEx ( rEx ), -maMapModeSrc( MAP_100TH_MM ), -// PowerPoint: 576 dpi, WinWord: 1440 dpi, Excel: 1440 dpi -maMapModeDest( MAP_INCH, Point(), Fraction( 1, EES_MAP_FRACTION ), Fraction( 1, EES_MAP_FRACTION ) ), -mpPicStrm ( NULL ), -mpHostAppData ( NULL ), -mnPagesWritten ( 0 ), -mnShapeMasterTitle ( 0 ), -mnShapeMasterBody ( 0 ), -mbStatusIndicator ( sal_False ), -mbStatus( sal_False ) +: mpEscherEx(rEx) +, maMapModeSrc(MAP_100TH_MM) +// PowerPoint: 576 dpi, WinWord: 1440 dpi, Excel: 1440 dpi +, maMapModeDest( MAP_INCH, Point(), Fraction( 1, EES_MAP_FRACTION ), Fraction( 1, EES_MAP_FRACTION ) ) +, mpPicStrm(NULL) +, mpHostAppData(NULL) +, mnPagesWritten(0) +, mnShapeMasterTitle(0) +, mnShapeMasterBody(0) +, mnIndices(0) +, mnOutlinerCount(0) +, mnPrevTextStyle(0) +, mnStatMaxValue(0) +, mnEffectCount(0) +, mbIsTitlePossible(false) +, mbStatusIndicator(false) +, mbStatus(false) { } - Point ImplEESdrWriter::ImplMapPoint( const Point rPoint ) { return OutputDevice::LogicToLogic( rPoint, maMapModeSrc, maMapModeDest ); commit 2c2b3a16bd34408000a8c623a2de764c698a7291 Author: Caolán McNamara caol...@redhat.com Date: Fri Apr 11 20:45:09 2014 +0100 coverity#707834 Uninitialized scalar field Change-Id: I405b981c9234a662cf1d305ad437482d10cbf432 diff --git a/filter/source/graphicfilter/itiff/lzwdecom.cxx b/filter/source/graphicfilter/itiff/lzwdecom.cxx index 0d7970d..cb8abaa 100644 --- a/filter/source/graphicfilter/itiff/lzwdecom.cxx +++ b/filter/source/graphicfilter/itiff/lzwdecom.cxx @@ -23,7 +23,16 @@ #define MAX_TABLE_SIZE 4096 LZWDecompressor::LZWDecompressor() -: pOutBufData(NULL) +: pIStream(NULL) +, nTableSize(0) +, bEOIFound(false) +, bInvert(false) +, bFirst(true) +, nOldCode(0) +, pOutBufData(NULL) +, nOutBufDataLen(0) +, nInputBitsBuf(0) +, nInputBitsBufSize(0) { sal_uInt16 i; @@ -35,9 +44,6 @@ LZWDecompressor::LZWDecompressor() pTable[i].nDataCount=1; pTable[i].nData=(sal_uInt8)i; } -pIStream=NULL; -bFirst = sal_True; -nOldCode = 0; } commit d30ee7f7cefdefd9eb6b5c7763482d4fbcdb6b7c Author: Caolán McNamara caol...@redhat.com Date: Fri Apr 11 20:37:10 2014 +0100 coverity#707812 Uninitialized scalar field Change-Id: I04e65d6c0124a2f370ae006bbaa991d5e7753e12 diff --git a/filter/source/graphicfilter/icgm/chart.hxx b/filter/source/graphicfilter/icgm/chart.hxx index ca8c190..e91660e 100644 --- a/filter/source/graphicfilter/icgm/chart.hxx +++ b/filter/source/graphicfilter/icgm/chart.hxx @@ -91,7 +91,7 @@ typedef struct TextEntry TextAttribute* pAttribute; } TextEntry; -typedef struct ZoneOption +struct ZoneOption { charnOverTitle; charnOverBody; @@ -105,18 +105,43 @@ typedef struct ZoneOption charnFFillc_Title; charnFFillc_Body; charnFFillc_Foot; -} ZoneOption; +ZoneOption() +: nOverTitle(0) +, nOverBody(0) +, nOverFoot(0) +, nFStyle_Title(0) +, nFStyle_Body(0) +, nFStyle_Foot(0) +, nFOutc_Title(0) +, nFOutc_Body(0) +, nFOutc_Foot(0) +, nFFillc_Title(0) +, nFFillc_Body(0) +, nFFillc_Foot(0) +{ +} +}; -typedef struct BulletOption +struct BulletOption { charnBType; charnBSize; charnBColor; -sal_Int16 nBStart; +sal_Int16 nBStart; double nTMargin; double nBSpace; charnCPlace; -} BulletOption; +BulletOption() +: nBType(0) +, nBSize(0) +, nBColor(0) +, nBStart(0) +, nTMargin(0) +, nBSpace(0) +, nCPlace(0) +{ +} +}; typedef struct BulDef { @@ -131,7 +156,7 @@
[Libreoffice-commits] core.git: 3 commits - filter/source vcl/source
filter/source/config/fragments/types/svg_Scalable_Vector_Graphics.xcu |2 filter/source/svg/svgfilter.cxx | 115 -- filter/source/svg/svgfilter.hxx |3 filter/source/svg/svgimport.cxx | 47 ++ vcl/source/filter/graphicfilter.cxx | 176 +- 5 files changed, 211 insertions(+), 132 deletions(-) New commits: commit 4f7aa27c6297453a348137bb99d1a28e3dfc5619 Author: Tomaž Vajngerl tomaz.vajng...@collabora.com Date: Sun Mar 2 22:06:13 2014 +0100 fdo#75487 Add support for svgz to SvgFilter and co. Draw can open a svg file directly as a document not only as a picture (which is handled by graphicfilter in vcl). This commit adds support to also open svgz files by decompressing the stream first. Change-Id: I241e695076b380735dc9b9fc27f5416fff68f6ab diff --git a/filter/source/svg/svgfilter.cxx b/filter/source/svg/svgfilter.cxx index ce6d93e..e94ba85 100644 --- a/filter/source/svg/svgfilter.cxx +++ b/filter/source/svg/svgfilter.cxx @@ -40,6 +40,11 @@ #include com/sun/star/drawing/framework/ResourceId.hpp #include comphelper/processfactory.hxx +#include unotools/mediadescriptor.hxx +#include unotools/ucbstreamhelper.hxx +#include unotools/streamwrap.hxx +#include tools/zcodec.hxx + #include osl/mutex.hxx #include svgfilter.hxx @@ -47,9 +52,10 @@ using namespace ::com::sun::star; - -// - SVGFilter - - +namespace +{ +static const char constFilterName[] = svg_Scalable_Vector_Graphics; +} SVGFilter::SVGFilter( const Reference XComponentContext rxCtx ) : mxContext( rxCtx ), @@ -62,12 +68,9 @@ SVGFilter::SVGFilter( const Reference XComponentContext rxCtx ) : mbPresentation( sal_False ), mbExportAll( sal_False ), mpObjects( NULL ) - { } - - SVGFilter::~SVGFilter() { DBG_ASSERT( mpSVGDoc == NULL, mpSVGDoc not destroyed ); @@ -77,8 +80,6 @@ SVGFilter::~SVGFilter() DBG_ASSERT( mpObjects == NULL, mpObjects not destroyed ); } - - sal_Bool SAL_CALL SVGFilter::filter( const Sequence PropertyValue rDescriptor ) throw (RuntimeException, std::exception) { @@ -242,70 +243,102 @@ sal_Bool SAL_CALL SVGFilter::filter( const Sequence PropertyValue rDescripto return bRet; } - - void SAL_CALL SVGFilter::cancel( ) throw (RuntimeException, std::exception) { } - - void SAL_CALL SVGFilter::setSourceDocument( const Reference XComponent xDoc ) throw (IllegalArgumentException, RuntimeException, std::exception) { mxSrcDoc = xDoc; } - - void SAL_CALL SVGFilter::setTargetDocument( const Reference XComponent xDoc ) throw (::com::sun::star::lang::IllegalArgumentException, RuntimeException, std::exception) { mxDstDoc = xDoc; } - - -OUString SAL_CALL SVGFilter::detect( Sequence PropertyValue io_rDescriptor ) throw (RuntimeException, std::exception) +bool SAL_CALL SVGFilter::isStreamGZip(uno::Referenceio::XInputStream xInput) { -uno::Reference io::XInputStream xInput; +uno::Referenceio::XSeekable xSeek(xInput, uno::UNO_QUERY); +if(xSeek.is()) +xSeek-seek(0); -const beans::PropertyValue* pAttribs = io_rDescriptor.getConstArray(); -const sal_Int32 nAttribs = io_rDescriptor.getLength(); -for( sal_Int32 i = 0; i nAttribs; i++ ) +uno::Sequencesal_Int8 aBuffer(2); +const sal_uInt64 nBytes = xInput-readBytes(aBuffer, 2); +if (nBytes == 2) { -if ( pAttribs[i].Name == InputStream ) -pAttribs[i].Value = xInput; +const sal_Int8* pBuffer = aBuffer.getConstArray(); +if (pBuffer[0] == (sal_Int8)0x1F pBuffer[1] == (sal_Int8)0x8B) +return true; } +return false; +} -if( !xInput.is() ) -return OUString(); - -uno::Reference io::XSeekable xSeek( xInput, uno::UNO_QUERY ); -if( xSeek.is() ) -xSeek-seek( 0 ); +bool SAL_CALL SVGFilter::isStreamSvg(uno::Referenceio::XInputStream xInput) +{ +uno::Referenceio::XSeekable xSeek(xInput, uno::UNO_QUERY); +if(xSeek.is()) +xSeek-seek(0); -// read the first 1024 bytes check a few magic string -// constants (heuristically) const sal_Int32 nLookAhead = 1024; -uno::Sequence sal_Int8 aBuf( nLookAhead ); -const sal_uInt64 nBytes=xInput-readBytes(aBuf, nLookAhead); -const sal_Int8* const pBuf=aBuf.getConstArray(); +uno::Sequencesal_Int8 aBuffer(nLookAhead); +const sal_uInt64 nBytes = xInput-readBytes(aBuffer, nLookAhead); +const sal_Int8* pBuffer = aBuffer.getConstArray(); sal_Int8 aMagic1[] = {'', 's', 'v', 'g'}; -if( std::search(pBuf, pBuf+nBytes, -aMagic1, aMagic1+sizeof(aMagic1)/sizeof(*aMagic1)) != pBuf+nBytes ) -return OUString(svg_Scalable_Vector_Graphics); +sal_Int32 aMagic1Size = sizeof(aMagic1) / sizeof(*aMagic1); + +if (std::search(pBuffer, pBuffer + nBytes,
[Libreoffice-commits] core.git: 3 commits - filter/source i18nutil/source include/i18nutil include/tools sfx2/source sw/source tools/source UnoControls/inc UnoControls/source
UnoControls/inc/basecontrol.hxx|6 - UnoControls/source/base/basecontrol.cxx| 12 +-- UnoControls/source/controls/OConnectionPointHelper.cxx | 10 +- UnoControls/source/controls/framecontrol.cxx |8 +- UnoControls/source/controls/progressbar.cxx|4 - UnoControls/source/controls/progressmonitor.cxx| 26 +++--- UnoControls/source/inc/OConnectionPointHelper.hxx |2 UnoControls/source/inc/progressbar.hxx |4 - UnoControls/source/inc/progressmonitor.hxx |6 - filter/source/msfilter/svdfppt.cxx |6 - i18nutil/source/utility/casefolding.cxx|2 i18nutil/source/utility/unicode.cxx|4 - i18nutil/source/utility/widthfolding.cxx | 10 +- include/i18nutil/unicode.hxx | 18 ++-- include/i18nutil/widthfolding.hxx |4 - include/tools/bigint.hxx | 40 +- include/tools/ref.hxx |4 - include/tools/rtti.hxx | 18 ++-- include/tools/stream.hxx |2 sfx2/source/appl/lnkbase2.cxx |2 sw/source/core/docnode/swbaslnk.cxx|2 tools/source/generic/bigint.cxx| 66 - 22 files changed, 128 insertions(+), 128 deletions(-) New commits: commit 736b3970e7a49e0b11997602703852a7a5c0fdc3 Author: Stephan Bergmann sberg...@redhat.com Date: Tue Feb 18 07:20:00 2014 +0100 i18nutil: sal_Bool - bool Change-Id: Ic4a198d737692734ae3fbc096f370a3aa0667c5b diff --git a/i18nutil/source/utility/casefolding.cxx b/i18nutil/source/utility/casefolding.cxx index c0f58d3..cbe7ea9 100644 --- a/i18nutil/source/utility/casefolding.cxx +++ b/i18nutil/source/utility/casefolding.cxx @@ -108,7 +108,7 @@ Mapping casefolding::getValue(const sal_Unicode* str, sal_Int32 pos, sal_Int32 return dummy; } -inline sal_Bool SAL_CALL +inline bool SAL_CALL is_ja_voice_sound_mark(sal_Unicode current, sal_Unicode next) { sal_Unicode c = 0; diff --git a/i18nutil/source/utility/unicode.cxx b/i18nutil/source/utility/unicode.cxx index ff92805..edea198 100644 --- a/i18nutil/source/utility/unicode.cxx +++ b/i18nutil/source/utility/unicode.cxx @@ -378,7 +378,7 @@ unicode::getUnicodeDirection( const sal_Unicode ch ) { bit(UnicodeType::PARAGRAPH_SEPARATOR) #define IsType(func, mask) \ -sal_Bool SAL_CALL func( const sal_Unicode ch) {\ +bool SAL_CALL func( const sal_Unicode ch) {\ return (bit(getUnicodeType(ch)) (mask)) != 0;\ } @@ -389,7 +389,7 @@ IsType(unicode::isSpace, SPACEMASK) #define CONTROLSPACEbit(0x09)|bit(0x0a)|bit(0x0b)|bit(0x0c)|bit(0x0d)|\ bit(0x1c)|bit(0x1d)|bit(0x1e)|bit(0x1f) -sal_Bool SAL_CALL unicode::isWhiteSpace( const sal_Unicode ch) { +bool SAL_CALL unicode::isWhiteSpace( const sal_Unicode ch) { return (ch != 0xa0 isSpace(ch)) || (ch = 0x1F (bit(ch) (CONTROLSPACE))); } diff --git a/i18nutil/source/utility/widthfolding.cxx b/i18nutil/source/utility/widthfolding.cxx index a7ecb98..2d3fcb1 100644 --- a/i18nutil/source/utility/widthfolding.cxx +++ b/i18nutil/source/utility/widthfolding.cxx @@ -41,7 +41,7 @@ sal_Unicode widthfolding::decompose_ja_voiced_sound_marksChar2Char (sal_Unicode /** * Decompose Japanese specific voiced and semi-voiced sound marks. */ -OUString widthfolding::decompose_ja_voiced_sound_marks (const OUString inStr, sal_Int32 startPos, sal_Int32 nCount, Sequence sal_Int32 offset, sal_Bool useOffset ) +OUString widthfolding::decompose_ja_voiced_sound_marks (const OUString inStr, sal_Int32 startPos, sal_Int32 nCount, Sequence sal_Int32 offset, bool useOffset ) { // Create a string buffer which can hold nCount * 2 + 1 characters. // Its size may become double of nCount. @@ -103,7 +103,7 @@ oneToOneMapping widthfolding::getfull2halfTable(void) /** * Compose Japanese specific voiced and semi-voiced sound marks. */ -OUString widthfolding::compose_ja_voiced_sound_marks (const OUString inStr, sal_Int32 startPos, sal_Int32 nCount, Sequence sal_Int32 offset, sal_Bool useOffset, sal_Int32 nFlags ) +OUString widthfolding::compose_ja_voiced_sound_marks (const OUString inStr, sal_Int32 startPos, sal_Int32 nCount, Sequence sal_Int32 offset, bool useOffset, sal_Int32 nFlags ) { // Create a string buffer which can hold nCount + 1 characters. // Its size may become equal to nCount or smaller. @@ -157,14 +157,14 @@ OUString widthfolding::compose_ja_voiced_sound_marks (const OUString inStr, sal // 0 addresses a code point regarding 0x3099 or 0x309b (voiced sound mark), // 1 is 0x309a or 0x309c (semi-voiced sound mark) int i = int(previousChar - 0x3040); // i acts as an index of array - sal_Bool bCompose =
[Libreoffice-commits] core.git: 3 commits - filter/source oox/source sw/qa sw/source
filter/source/msfilter/escherex.cxx |2 oox/source/export/drawingml.cxx | 55 ++ sw/qa/extras/ooxmlexport/data/nested-text-frames.odt |binary sw/qa/extras/ooxmlexport/ooxmlexport.cxx | 12 + sw/qa/extras/ooxmlimport/data/floating-tables-anchor.docx |binary sw/qa/extras/ooxmlimport/ooxmlimport.cxx | 15 + sw/source/core/unocore/unotext.cxx| 22 +- sw/source/filter/ww8/docxattributeoutput.cxx | 112 +++--- sw/source/filter/ww8/docxattributeoutput.hxx |4 9 files changed, 130 insertions(+), 92 deletions(-) New commits: commit c7c761455fbdece36c4fb7cfb9bdd4495e80ddba Author: Zolnai Tamás tamas.zol...@collabora.com Date: Sun Feb 16 17:37:13 2014 +0100 drawingML export: make WritePolyPolygon robuster Make sure a:cubicBezTo conatins three a:pt elements. escherex: It seems a cubic bezier curve last point has a POLY_NORMAL flag and not POLY_CONTROL. Change-Id: Id6dc2160c7ae171a720e4a1aa9161cef2b3b9413 diff --git a/filter/source/msfilter/escherex.cxx b/filter/source/msfilter/escherex.cxx index 25a853a..a6423fc 100644 --- a/filter/source/msfilter/escherex.cxx +++ b/filter/source/msfilter/escherex.cxx @@ -1969,7 +1969,7 @@ PolyPolygon EscherPropertyContainer::GetPolyPolygon( const ::com::sun::star::uno { aPolygon.SetFlags( nPointIndex, POLY_CONTROL); aPolygon.SetFlags( nPointIndex+1, POLY_CONTROL); -aPolygon.SetFlags( nPointIndex+2, POLY_CONTROL); +aPolygon.SetFlags( nPointIndex+2, POLY_NORMAL); nPointIndex += 3; break; } diff --git a/oox/source/export/drawingml.cxx b/oox/source/export/drawingml.cxx index d03a0d8..c4e79a4 100644 --- a/oox/source/export/drawingml.cxx +++ b/oox/source/export/drawingml.cxx @@ -1793,7 +1793,6 @@ void DrawingML::WritePolyPolygon( const PolyPolygon rPolyPolygon ) const Polygon rPoly = rPolyPolygon[ i ]; Rectangle aRect( rPoly.GetBoundRect() ); -sal_Bool bBezier = sal_False; mpFS-startElementNS( XML_a, XML_path, XML_w, I64S( aRect.GetWidth() ), @@ -1812,46 +1811,36 @@ void DrawingML::WritePolyPolygon( const PolyPolygon rPolyPolygon ) mpFS-endElementNS( XML_a, XML_moveTo ); } -sal_Int32 nCounter = 0 ; for( sal_uInt16 j = 1; j rPoly.GetSize(); j ++ ) { enum PolyFlags flags = rPoly.GetFlags(j); -if( flags == POLY_CONTROL !bBezier ) +if( flags == POLY_CONTROL ) { -mpFS-startElementNS( XML_a, XML_cubicBezTo, FSEND ); -bBezier = sal_True; -} -else if( flags == POLY_NORMAL !bBezier ) -{ -mpFS-startElementNS( XML_a, XML_lnTo, FSEND ); -++nCounter ; -} +// a:cubicBezTo can only contain 3 a:pt elements, so we need to make sure of this +if( j+2 rPoly.GetSize() rPoly.GetFlags(j+1) == POLY_CONTROL rPoly.GetFlags(j+2) != POLY_CONTROL ) +{ -mpFS-singleElementNS( XML_a, XML_pt, - XML_x, I64S( rPoly[j].X() - aRect.Left() ), - XML_y, I64S( rPoly[j].Y() - aRect.Top() ), - FSEND ); +mpFS-startElementNS( XML_a, XML_cubicBezTo, FSEND ); +for( sal_uInt8 k = 0; k = 2; ++k ) +{ +mpFS-singleElementNS( XML_a, XML_pt, + XML_x, I64S( rPoly[j+k].X() - aRect.Left() ), + XML_y, I64S( rPoly[j+k].Y() - aRect.Top() ), + FSEND ); -if( ( flags == POLY_NORMAL || flags == POLY_SYMMTR || j == rPoly.GetSize() - 1) bBezier ) -{ -mpFS-endElementNS( XML_a, XML_cubicBezTo ); -bBezier = sal_False; +} +mpFS-endElementNS( XML_a, XML_cubicBezTo ); +j += 2; +} } -else if( flags == POLY_NORMAL !bBezier ) -mpFS-endElementNS( XML_a, XML_lnTo ); - -/* ( j % 3 == 0 ) will fail to address the iterations - that have been dedicated to XML_lnTo in case if the - flag is POLY_NORMAL. - Similarly the sequence would go wrong if we do not - make the flag bBezier as false after ending the element. -*/ -else if( bBezier ( ( j -
[Libreoffice-commits] core.git: 3 commits - filter/source hwpfilter/source include/sal lotuswordpro/source odk/examples offapi/com reportbuilder/java sd/source svx/source sw/inc sw/source vcl/source
filter/source/flash/swfwriter1.cxx |2 +- filter/source/graphicfilter/eps/eps.cxx |2 +- hwpfilter/source/hpara.h |2 +- include/sal/types.h |4 ++-- lotuswordpro/source/filter/LotusWordProImportFilter.cxx |2 +- lotuswordpro/source/filter/lwpframelayout.cxx|2 +- odk/examples/java/Text/HardFormatting.java |4 ++-- offapi/com/sun/star/drawing/DocumentSettings.idl |2 +- reportbuilder/java/org/libreoffice/report/pentaho/smil.css |2 +- reportbuilder/java/org/libreoffice/report/pentaho/svg.css|2 +- reportbuilder/java/org/libreoffice/report/pentaho/xsl-fo.css |2 +- sd/source/core/sdpage.cxx|2 +- svx/source/gengal/gengal.cxx |2 +- sw/inc/doc.hxx |2 +- sw/inc/expfld.hxx|6 +++--- sw/inc/fesh.hxx |2 +- sw/inc/fldbas.hxx|2 +- sw/inc/paratr.hxx|2 +- sw/inc/swtypes.hxx |4 ++-- sw/source/core/inc/frame.hxx |2 +- sw/source/core/layout/dbg_lay.cxx|6 +++--- sw/source/core/layout/layact.cxx |2 +- sw/source/core/text/widorp.cxx |2 +- sw/source/filter/ww8/ww8par.hxx |2 +- sw/source/filter/ww8/ww8par4.cxx |2 +- sw/source/ui/fldui/fldvar.cxx|2 +- sw/source/ui/uiview/formatclipboard.cxx |2 +- sw/source/ui/uno/unotxdoc.cxx|2 +- vcl/source/app/settings.cxx |2 +- vcl/source/window/status.cxx |2 +- 30 files changed, 37 insertions(+), 37 deletions(-) New commits: commit 9bbb7ca9f730217f872462086493ba281ad399f8 Author: Julien Nabet serval2...@yahoo.fr Date: Thu Feb 6 22:41:09 2014 +0100 Typo: formating - formatting Change-Id: If4aba89909a3ef049a756182c37d8a5d6812ae70 diff --git a/filter/source/flash/swfwriter1.cxx b/filter/source/flash/swfwriter1.cxx index c787275..d5c07a6 100644 --- a/filter/source/flash/swfwriter1.cxx +++ b/filter/source/flash/swfwriter1.cxx @@ -1298,7 +1298,7 @@ bool Writer::Impl_writeFilling( SvtGraphicFill rFilling ) /* CL: The idea was to export page fields as text fields that get theire string from a variable set with actionscript by each page. This didn't - work out since the formating is always wrong when text follows the + work out since the formatting is always wrong when text follows the page number field since pages greater one may require more space than page 1 */ diff --git a/filter/source/graphicfilter/eps/eps.cxx b/filter/source/graphicfilter/eps/eps.cxx index 0528316..e818bd0 100644 --- a/filter/source/graphicfilter/eps/eps.cxx +++ b/filter/source/graphicfilter/eps/eps.cxx @@ -50,7 +50,7 @@ using namespace ::com::sun::star::uno; #define PS_LINESIZE 70 // maximum number of characters a line in the output -#define PS_NONE 0 // formating mode: action which is inserted behind the output +#define PS_NONE 0 // formatting mode: action which is inserted behind the output #define PS_SPACE1 #define PS_RET 2 #define PS_WRAP 4 diff --git a/hwpfilter/source/hpara.h b/hwpfilter/source/hpara.h index 3ace278..c33d51d 100644 --- a/hwpfilter/source/hpara.h +++ b/hwpfilter/source/hpara.h @@ -64,7 +64,7 @@ struct LineInfo hunit sx; /* internal */ hunit psx;/* internal */ hunit pex;/* internal */ -// for formating +// for formatting hunit height_sp; unsigned shortsoftbreak; // column, page, section diff --git a/include/sal/types.h b/include/sal/types.h index 11d62ae..8668cd5 100644 --- a/include/sal/types.h +++ b/include/sal/types.h @@ -30,8 +30,8 @@ extern C { #endif #if defined ( __MINGW32__ ) !defined ( __USE_MINGW_ANSI_STDIO ) -/* Define to use the C99 formating string for coherence reasons. - * In mingw-w64 some functions are ported to the ms formating string +/* Define to use the C99 formatting string for coherence reasons. + * In mingw-w64 some functions are ported to the ms formatting string * some are not yet. This is the only way to make the formatting * strings work all the time */ diff --git
[Libreoffice-commits] core.git: 3 commits - filter/source include/oox oox/source sw/qa
filter/source/msfilter/escherex.cxx | 14 ++-- include/oox/drawingml/textparagraphproperties.hxx|4 + oox/source/drawingml/textbodycontext.cxx |1 oox/source/drawingml/textcharacterpropertiescontext.cxx | 17 oox/source/drawingml/textparagraphpropertiescontext.cxx | 21 ++ sw/qa/extras/ooxmlimport/data/dml-groupshape-capitalization.docx |binary sw/qa/extras/ooxmlimport/data/dml-groupshape-paraadjust.docx |binary sw/qa/extras/ooxmlimport/ooxmlimport.cxx | 35 ++ 8 files changed, 85 insertions(+), 7 deletions(-) New commits: commit 07eb648d82a4a26b4b6c7fa78aa2d22ccbd0593d Author: Zolnai Tamás tamas.zol...@collabora.com Date: Tue Feb 4 18:10:03 2014 +0100 Remove some extra break Change-Id: I55405c748d67101ecef8ef8a52037a26bc52b9f6 diff --git a/filter/source/msfilter/escherex.cxx b/filter/source/msfilter/escherex.cxx index 293aead..6a8ea7f 100644 --- a/filter/source/msfilter/escherex.cxx +++ b/filter/source/msfilter/escherex.cxx @@ -1961,8 +1961,10 @@ PolyPolygon EscherPropertyContainer::GetPolyPolygon( const ::com::sun::star::uno switch( aSegments[ j ].Command ) { case drawing::EnhancedCustomShapeSegmentCommand::UNKNOWN: break; -case drawing::EnhancedCustomShapeSegmentCommand::MOVETO : nPointIndex++; break; -case drawing::EnhancedCustomShapeSegmentCommand::LINETO : nPointIndex++; break; +case drawing::EnhancedCustomShapeSegmentCommand::MOVETO : +case drawing::EnhancedCustomShapeSegmentCommand::LINETO : +nPointIndex++; +break; case drawing::EnhancedCustomShapeSegmentCommand::CURVETO : { aPolygon.SetFlags( nPointIndex, POLY_CONTROL); @@ -1994,10 +1996,10 @@ PolyPolygon EscherPropertyContainer::GetPolyPolygon( const ::com::sun::star::uno case drawing::EnhancedCustomShapeSegmentCommand::ARCANGLETO : nPointIndex += 2; break; -case drawing::EnhancedCustomShapeSegmentCommand::DARKEN : break; -case drawing::EnhancedCustomShapeSegmentCommand::DARKENLESS : break; -case drawing::EnhancedCustomShapeSegmentCommand::LIGHTEN : break; -case drawing::EnhancedCustomShapeSegmentCommand::LIGHTENLESS : break; +case drawing::EnhancedCustomShapeSegmentCommand::DARKEN : +case drawing::EnhancedCustomShapeSegmentCommand::DARKENLESS : +case drawing::EnhancedCustomShapeSegmentCommand::LIGHTEN : +case drawing::EnhancedCustomShapeSegmentCommand::LIGHTENLESS : break; } } commit a468e386695f470f65616adde4673aa43a562c51 Author: Zolnai Tamás tamas.zol...@collabora.com Date: Wed Feb 5 10:06:40 2014 +0100 drawingML import: paragraph adjustment inside group shape Change-Id: I875cb1f12c9f81d329d7fe9cd3aa32a4cd818573 diff --git a/include/oox/drawingml/textparagraphproperties.hxx b/include/oox/drawingml/textparagraphproperties.hxx index 8014929..2ed69f9 100644 --- a/include/oox/drawingml/textparagraphproperties.hxx +++ b/include/oox/drawingml/textparagraphproperties.hxx @@ -94,6 +94,9 @@ public: boost::optional sal_Int32getParaLeftMargin(){ return moParaLeftMargin; } boost::optional sal_Int32getFirstLineIndentation(){ return moFirstLineIndentation; } +boost::optional sal_Int16getParaAdjust() { return moParaAdjust; } +voidsetParaAdjust( sal_Int16 nParaAdjust ) { moParaAdjust = nParaAdjust; } + voidapply( const TextParagraphProperties rSourceProps ); voidpushToPropSet( const ::oox::core::XmlFilterBase* pFilterBase, const ::com::sun::star::uno::Reference ::com::sun::star::beans::XPropertySet xPropSet, @@ -118,6 +121,7 @@ protected: TextSpacing maParaBottomMargin; boost::optional sal_Int32 moParaLeftMargin; boost::optional sal_Int32 moFirstLineIndentation; +boost::optional sal_Int16 moParaAdjust; sal_Int16 mnLevel; }; diff --git a/oox/source/drawingml/textbodycontext.cxx b/oox/source/drawingml/textbodycontext.cxx index
[Libreoffice-commits] core.git: 3 commits - filter/source oox/source sc/source
filter/source/msfilter/eschesdo.cxx |2 ++ oox/source/export/chartexport.cxx| 11 +++ sc/source/filter/excel/xecontent.cxx |4 ++-- 3 files changed, 11 insertions(+), 6 deletions(-) New commits: commit 86b9f03c3f754f7b753893ff2772f6b17bf3de3c Author: Markus Mohrhard markus.mohrh...@googlemail.com Date: Sun Dec 8 00:05:59 2013 +0100 fix infinite loop during export Change-Id: I75bfafbc7343aaddbbc5c7433e28b5d4154177dc diff --git a/filter/source/msfilter/eschesdo.cxx b/filter/source/msfilter/eschesdo.cxx index af2a954..ca78c69 100644 --- a/filter/source/msfilter/eschesdo.cxx +++ b/filter/source/msfilter/eschesdo.cxx @@ -101,6 +101,8 @@ void ImplEESdrWriter::ImplFlipBoundingBox( ImplEESdrObject rObj, EscherProperty // for position calculations, we normalize the angle between 0 and 90 degrees if ( nAngle 0 ) nAngle = ( 36000 + nAngle ) % 36000; +if ( nAngle % 18000 == 0 ) +nAngle = 0; while ( nAngle 9000 ) nAngle = ( 18000 - ( nAngle % 18000 ) ); commit fab6109465409e009a3b2daa469b9360fe8f68c3 Author: Markus Mohrhard markus.mohrh...@googlemail.com Date: Sun Dec 8 00:05:33 2013 +0100 fix OOXML validation error with conditional formatting Change-Id: I737b3f5bf140a0cf80fac6cae243922882cca018 diff --git a/sc/source/filter/excel/xecontent.cxx b/sc/source/filter/excel/xecontent.cxx index 3cee5e6..e977e46 100644 --- a/sc/source/filter/excel/xecontent.cxx +++ b/sc/source/filter/excel/xecontent.cxx @@ -811,10 +811,10 @@ const char* GetOperatorString(ScConditionMode eMode, bool bFrmla2) pRet = notBetween; break; case SC_COND_DUPLICATE: -pRet = duplicateValues; +pRet = NULL; break; case SC_COND_NOTDUPLICATE: -pRet = uniqueValues; +pRet = NULL; break; case SC_COND_DIRECT: break; commit b2f7859fc2835d151fd6970a1233ea4f8768dbe1 Author: Markus Mohrhard markus.mohrh...@googlemail.com Date: Sat Dec 7 23:49:36 2013 +0100 fix validation error in OOXML chart export Change-Id: I750b33054ea0ee6202c0046a9f3947ab8bf44cd6 diff --git a/oox/source/export/chartexport.cxx b/oox/source/export/chartexport.cxx index 680e19b..3768cd3 100644 --- a/oox/source/export/chartexport.cxx +++ b/oox/source/export/chartexport.cxx @@ -1244,10 +1244,13 @@ void ChartExport::exportLineChart( Reference chart2::XChartType xChartType ) if( GetProperty( xPropSet, SymbolType ) ) mAny = nSymbolType; -const char* marker = nSymbolType == ::com::sun::star::chart::ChartSymbolType::NONE? 0:1; -pFS-singleElement( FSNS( XML_c, XML_marker ), -XML_val, marker, -FSEND ); +if( !mbIs3DChart ) +{ +const char* marker = nSymbolType == ::com::sun::star::chart::ChartSymbolType::NONE? 0:1; +pFS-singleElement( FSNS( XML_c, XML_marker ), +XML_val, marker, +FSEND ); +} exportAxesId( nAttachedAxis ); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: 3 commits - filter/source sw/source
filter/source/msfilter/escherex.cxx | 18 ++ filter/source/msfilter/svdfppt.cxx | 10 ++ sw/source/filter/ww8/ww8par.cxx | 13 +++-- 3 files changed, 27 insertions(+), 14 deletions(-) New commits: commit c6ba5edabc427bfddd850b1e8e586d5e440246c2 Author: Xisco Fauli aniste...@gmail.com Date: Mon Apr 1 23:01:59 2013 +0200 Related to #120039: Remove RTL_CONSTASCII_USTRINGPARAM Change-Id: Idc6bae019e972ad512158c71376f7995ab8cf2db diff --git a/filter/source/msfilter/escherex.cxx b/filter/source/msfilter/escherex.cxx index 880cc51..6449ba8 100644 --- a/filter/source/msfilter/escherex.cxx +++ b/filter/source/msfilter/escherex.cxx @@ -1455,33 +1455,27 @@ sal_Bool EscherPropertyContainer::CreateGraphicProperties( if ( eBitmapMode == ::com::sun::star::drawing::BitmapMode_REPEAT ) { sal_Int32 nSizeX = 0,nSizeY = 0,nOffsetX = 0,nOffsetY = 0,nPosOffsetX = 0,nPosOffsetY = 0; -if ( EscherPropertyValueHelper::GetPropertyValue( aAny, rXPropSet, -String( RTL_CONSTASCII_USTRINGPARAM( FillBitmapSizeX ) ), sal_True ) ) +if ( EscherPropertyValueHelper::GetPropertyValue( aAny, rXPropSet, FillBitmapSizeX, sal_True ) ) { aAny = nSizeX; } -if ( EscherPropertyValueHelper::GetPropertyValue( aAny, rXPropSet, -String( RTL_CONSTASCII_USTRINGPARAM( FillBitmapSizeY ) ), sal_True ) ) +if ( EscherPropertyValueHelper::GetPropertyValue( aAny, rXPropSet, FillBitmapSizeY, sal_True ) ) { aAny = nSizeY; } -if ( EscherPropertyValueHelper::GetPropertyValue( aAny, rXPropSet, -String( RTL_CONSTASCII_USTRINGPARAM( FillBitmapOffsetX ) ), sal_True ) ) +if ( EscherPropertyValueHelper::GetPropertyValue( aAny, rXPropSet, FillBitmapOffsetX, sal_True ) ) { aAny = nOffsetX; } -if ( EscherPropertyValueHelper::GetPropertyValue( aAny, rXPropSet, -String( RTL_CONSTASCII_USTRINGPARAM( FillBitmapOffsetY ) ), sal_True ) ) +if ( EscherPropertyValueHelper::GetPropertyValue( aAny, rXPropSet, FillBitmapOffsetY, sal_True ) ) { aAny = nOffsetY; } -if ( EscherPropertyValueHelper::GetPropertyValue( aAny, rXPropSet, -String( RTL_CONSTASCII_USTRINGPARAM( FillBitmapPositionOffsetX ) ), sal_True ) ) +if ( EscherPropertyValueHelper::GetPropertyValue( aAny, rXPropSet, FillBitmapPositionOffsetX, sal_True ) ) { aAny = nPosOffsetX; } -if ( EscherPropertyValueHelper::GetPropertyValue( aAny, rXPropSet, -String( RTL_CONSTASCII_USTRINGPARAM( FillBitmapPositionOffsetY ) ), sal_True ) ) +if ( EscherPropertyValueHelper::GetPropertyValue( aAny, rXPropSet, FillBitmapPositionOffsetY, sal_True ) ) { aAny = nPosOffsetY; } commit 638678893657aaf90a3b6e1a6c4d3fb3fc28e954 Author: Lei De Bin le...@apache.org Date: Wed Jul 4 05:46:06 2012 + Fix #119510# - fix some invalid FLY_AT_PARA case: The width should be automatically re-sized, then for the horizontal alignment left is better than right. Found by: yan ji Patch by: Lei De Bin Review by: Chen Zuo Jun Conflicts: sw/source/filter/ww8/ww8par.cxx Change-Id: I584b81bf2f32e8ae41bd761f760672a33d1bfd73 diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx index 621bdbb..f78da7b 100644 --- a/sw/source/filter/ww8/ww8par.cxx +++ b/sw/source/filter/ww8/ww8par.cxx @@ -57,6 +57,7 @@ #include fmthdft.hxx #include fmtcntnt.hxx #include fmtcnct.hxx +#include fmtanchr.hxx #include fmtpdsc.hxx #include ftninfo.hxx #include fmtftn.hxx @@ -1892,9 +1893,17 @@ void SwWW8ImplReader::Read_HdFtTextAsHackedFrame(long nStart, long nLen, SwFlyFrmFmt *pFrame = rDoc.MakeFlySection(FLY_AT_PARA, pPaM-GetPoint()); -pFrame-SetFmtAttr(SwFmtFrmSize(ATT_MIN_SIZE, nPageWidth, MINLAY)); +SwFmtAnchor aAnch( pFrame-GetAnchor() ); +aAnch.SetType( FLY_AT_PARA ); +pFrame-SetFmtAttr( aAnch ); +SwFmtFrmSize aSz(ATT_MIN_SIZE, nPageWidth, MINLAY); +SwFrmSize eFrmSize = ATT_MIN_SIZE; +if( eFrmSize != aSz.GetWidthSizeType() ) +aSz.SetWidthSizeType( eFrmSize ); +pFrame-SetFmtAttr(aSz); pFrame-SetFmtAttr(SwFmtSurround(SURROUND_THROUGHT)); -pFrame-SetFmtAttr(SwFmtHoriOrient(0, text::HoriOrientation::RIGHT)); //iFOO +pFrame-SetFmtAttr(SwFmtHoriOrient(0, text::HoriOrientation::LEFT)); //iFOO + // #i43427# - send frame for header/footer into background.
[Libreoffice-commits] core.git: 3 commits - filter/source
filter/source/msfilter/svdfppt.cxx |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) New commits: commit a9f03c1ad14890f2cd02ebfc1c2adfe9c2b55259 Author: Xisco Fauli aniste...@gmail.com Date: Mon Apr 1 23:18:03 2013 +0200 Related to 119875: Remove RTL_CONSTASCII_USTRINGPARAM Change-Id: I86461c14b5b73c3c7473b48bff70fd27f640ba59 diff --git a/filter/source/msfilter/svdfppt.cxx b/filter/source/msfilter/svdfppt.cxx index d65254ba..6071eb6 100644 --- a/filter/source/msfilter/svdfppt.cxx +++ b/filter/source/msfilter/svdfppt.cxx @@ -7275,8 +7275,8 @@ void ApplyCellAttributes( const SdrObject* pObj, Reference XCell xCell ) //set textHorizontalAdjust and TextWritingMode attr const sal_Int32 eHA(((const SdrTextLeftDistItem)pObj-GetMergedItem(SDRATTR_TEXT_HORZADJUST)).GetValue()); const SvxFrameDirection eDirection = (const SvxFrameDirection)((( const SvxFrameDirectionItem)pObj-GetMergedItem(EE_PARA_WRITINGDIR)).GetValue()); -static const rtl::OUString sHorizontalAdjust( RTL_CONSTASCII_USTRINGPARAM( TextHorizontalAdjust ) ); -static const rtl::OUString sWritingMode( RTL_CONSTASCII_USTRINGPARAM(TextWritingMode) ); +static const rtl::OUString sHorizontalAdjust( TextHorizontalAdjust ); +static const rtl::OUString sWritingMode( TextWritingMode ); xPropSet-setPropertyValue( sHorizontalAdjust , Any( eHA ) ); if ( eDirection == FRMDIR_VERT_TOP_RIGHT ) {//vertical writing commit 460e17a1c7dae290ae9375e78820ec1257fe3942 Author: Sun Ying suny...@apache.org Date: Thu Aug 16 02:13:43 2012 + #119875# fix vertical text direction in table cell change when save .ppt file Reported by: Li Feng Wang Patch by: Ying Sun Review by: Jian Yuan Li diff --git a/filter/source/msfilter/svdfppt.cxx b/filter/source/msfilter/svdfppt.cxx index 200e7b4..d65254ba 100644 --- a/filter/source/msfilter/svdfppt.cxx +++ b/filter/source/msfilter/svdfppt.cxx @@ -7272,6 +7272,16 @@ void ApplyCellAttributes( const SdrObject* pObj, Reference XCell xCell ) eVA = drawing::TextVerticalAdjust_BOTTOM; xPropSet-setPropertyValue( sTextVerticalAdjust, Any( eVA ) ); +//set textHorizontalAdjust and TextWritingMode attr +const sal_Int32 eHA(((const SdrTextLeftDistItem)pObj-GetMergedItem(SDRATTR_TEXT_HORZADJUST)).GetValue()); +const SvxFrameDirection eDirection = (const SvxFrameDirection)((( const SvxFrameDirectionItem)pObj-GetMergedItem(EE_PARA_WRITINGDIR)).GetValue()); +static const rtl::OUString sHorizontalAdjust( RTL_CONSTASCII_USTRINGPARAM( TextHorizontalAdjust ) ); +static const rtl::OUString sWritingMode( RTL_CONSTASCII_USTRINGPARAM(TextWritingMode) ); +xPropSet-setPropertyValue( sHorizontalAdjust , Any( eHA ) ); +if ( eDirection == FRMDIR_VERT_TOP_RIGHT ) +{//vertical writing +xPropSet-setPropertyValue( sWritingMode , Any( ::com::sun::star::text::WritingMode_TB_RL ) ); +} SfxItemSet aSet( pObj-GetMergedItemSet() ); XFillStyle eFillStyle(((XFillStyleItem)pObj-GetMergedItem( XATTR_FILLSTYLE )).GetValue()); ::com::sun::star::drawing::FillStyle eFS( com::sun::star::drawing::FillStyle_NONE ); commit a9d8b4dfc103b991de6c4d99914a39acef93ad23 Author: Xisco Fauli aniste...@gmail.com Date: Mon Apr 1 23:14:21 2013 +0200 Revert Reported by: Li Feng Wang This reverts commit e518ef52bbda3449130f51dbbf6f0a60bb76298f. diff --git a/filter/source/msfilter/svdfppt.cxx b/filter/source/msfilter/svdfppt.cxx index d65254ba..200e7b4 100644 --- a/filter/source/msfilter/svdfppt.cxx +++ b/filter/source/msfilter/svdfppt.cxx @@ -7272,16 +7272,6 @@ void ApplyCellAttributes( const SdrObject* pObj, Reference XCell xCell ) eVA = drawing::TextVerticalAdjust_BOTTOM; xPropSet-setPropertyValue( sTextVerticalAdjust, Any( eVA ) ); -//set textHorizontalAdjust and TextWritingMode attr -const sal_Int32 eHA(((const SdrTextLeftDistItem)pObj-GetMergedItem(SDRATTR_TEXT_HORZADJUST)).GetValue()); -const SvxFrameDirection eDirection = (const SvxFrameDirection)((( const SvxFrameDirectionItem)pObj-GetMergedItem(EE_PARA_WRITINGDIR)).GetValue()); -static const rtl::OUString sHorizontalAdjust( RTL_CONSTASCII_USTRINGPARAM( TextHorizontalAdjust ) ); -static const rtl::OUString sWritingMode( RTL_CONSTASCII_USTRINGPARAM(TextWritingMode) ); -xPropSet-setPropertyValue( sHorizontalAdjust , Any( eHA ) ); -if ( eDirection == FRMDIR_VERT_TOP_RIGHT ) -{//vertical writing -xPropSet-setPropertyValue( sWritingMode , Any( ::com::sun::star::text::WritingMode_TB_RL ) ); -} SfxItemSet aSet( pObj-GetMergedItemSet() ); XFillStyle eFillStyle(((XFillStyleItem)pObj-GetMergedItem( XATTR_FILLSTYLE )).GetValue()); ::com::sun::star::drawing::FillStyle eFS(
[Libreoffice-commits] core.git: 3 commits - filter/source oox/source toolkit/source
filter/source/msfilter/escherex.cxx|5 + oox/source/drawingml/customshapeproperties.cxx |5 ++--- toolkit/source/controls/tree/treedatamodel.cxx |4 ++-- 3 files changed, 5 insertions(+), 9 deletions(-) New commits: commit 9cc04cb09590cd00395244f81bbf6c3292b99c2b Author: Julien Nabet serval2...@yahoo.fr Date: Sat Mar 30 16:20:06 2013 +0100 Prefer prefix ++/-- operators for non-primitive types + convert while loop in for loop Change-Id: I615e2c724481047b557a4da9bb0753ec6eaecb90 diff --git a/oox/source/drawingml/customshapeproperties.cxx b/oox/source/drawingml/customshapeproperties.cxx index 48173b7..aab5cc4 100644 --- a/oox/source/drawingml/customshapeproperties.cxx +++ b/oox/source/drawingml/customshapeproperties.cxx @@ -169,8 +169,8 @@ void CustomShapeProperties::pushToPropSet( const ::oox::core::FilterBase /* rFi uno::Sequence com::sun::star::drawing::EnhancedCustomShapeAdjustmentValue aAdjustmentSeq; if ( aGeoPropSeq[ i ].Value = aAdjustmentSeq ) { -std::vector CustomShapeGuide ::const_iterator aIter( maAdjustmentGuideList.begin() ); -while( aIter != maAdjustmentGuideList.end() ) +for (std::vector CustomShapeGuide ::const_iterator aIter( maAdjustmentGuideList.begin() ), aEnd(maAdjustmentGuideList.end()); + aIter != aEnd; ++aIter) { if ( (*aIter).maName.getLength() 3 ) { @@ -190,7 +190,6 @@ void CustomShapeProperties::pushToPropSet( const ::oox::core::FilterBase /* rFi aAdjustmentVal.Name = (*aIter).maName; aAdjustmentSeq[ 0 ] = aAdjustmentVal; } -aIter++; } aGeoPropSeq[ i ].Value = aAdjustmentSeq; xPropSet-setPropertyValue( sCustomShapeGeometry, Any( aGeoPropSeq ) ); commit c34a5ec1a60510871bf62ab380536d82078bb53d Author: Julien Nabet serval2...@yahoo.fr Date: Sat Mar 30 16:12:46 2013 +0100 Prefer prefix ++/-- operators for non-primitive types Change-Id: Ibf5004c1e66edac10ec6392577fe26ea2aaed330 diff --git a/toolkit/source/controls/tree/treedatamodel.cxx b/toolkit/source/controls/tree/treedatamodel.cxx index 43e26c4..90fe37d 100644 --- a/toolkit/source/controls/tree/treedatamodel.cxx +++ b/toolkit/source/controls/tree/treedatamodel.cxx @@ -423,7 +423,7 @@ void SAL_CALL MutableTreeNode::insertChildByIndex( sal_Int32 nChildIndex, const TreeNodeVector::iterator aIter( maChildren.begin() ); while( (nChildIndex-- 0) (aIter != maChildren.end()) ) -aIter++; +++aIter; maChildren.insert( aIter, xImpl ); xImpl-setParent( this ); @@ -443,7 +443,7 @@ void SAL_CALL MutableTreeNode::removeChildByIndex( sal_Int32 nChildIndex ) throw { TreeNodeVector::iterator aIter( maChildren.begin() ); while( nChildIndex-- (aIter != maChildren.end()) ) -aIter++; +++aIter; if( aIter != maChildren.end() ) { commit bca67a76b00ec7234b6a414a9772c9a7cacd8fd7 Author: Julien Nabet serval2...@yahoo.fr Date: Sat Mar 30 15:55:54 2013 +0100 Prefer prefix ++/-- operators for non-primitive types + convert while loop into for loop Change-Id: I64c2379c28d3c1074ed17129152568371680db19 diff --git a/filter/source/msfilter/escherex.cxx b/filter/source/msfilter/escherex.cxx index 0f99932..9c9d727 100644 --- a/filter/source/msfilter/escherex.cxx +++ b/filter/source/msfilter/escherex.cxx @@ -4523,13 +4523,10 @@ void EscherEx::InsertAtCurrentPos( sal_uInt32 nBytes, bool bExpandEndOfAtom ) else mpOutStrm-SeekRel( nSize ); } -std::vector sal_uInt32 ::iterator aIter( mOffsets.begin() ); -std::vector sal_uInt32 ::iterator aEnd( mOffsets.end() ); -while( aIter != aEnd ) +for (std::vector sal_uInt32 ::iterator aIter( mOffsets.begin() ), aEnd( mOffsets.end() ); aIter != aEnd ; ++aIter) { if ( *aIter nCurPos ) *aIter += nBytes; -aIter++; } mpOutStrm-Seek( STREAM_SEEK_TO_END ); nSource = mpOutStrm-Tell(); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: 3 commits - filter/source
filter/source/msfilter/msdffimp.cxx | 31 +++ 1 file changed, 15 insertions(+), 16 deletions(-) New commits: commit 5278c7770a350771a96780c0e0d7a0bdae0d55b9 Author: Andre Fischer a...@apache.org Date: Tue Jul 10 10:01:05 2012 + #i119872# Fixed import of custom shapes from PPT. Reported by: Li Feng Wang Patch by: Jianyuan Li Review by: Andre Fischer diff --git a/filter/source/msfilter/msdffimp.cxx b/filter/source/msfilter/msdffimp.cxx index cf760ef..6a98e71 100644 --- a/filter/source/msfilter/msdffimp.cxx +++ b/filter/source/msfilter/msdffimp.cxx @@ -2243,23 +2243,24 @@ void DffPropertyReader::ApplyCustomShapeGeometryAttributes( SvStream rIn, SfxIt { rIn nTmp; nCommand = EnhancedCustomShapeSegmentCommand::UNKNOWN; -nCnt = (sal_Int16)( nTmp 0xfff ); -switch( nTmp 12 ) +nCnt = (sal_Int16)( nTmp 0x1fff );//Last 13 bits for segment points number +switch( nTmp 13 )//First 3 bits for command type { case 0x0: nCommand = EnhancedCustomShapeSegmentCommand::LINETO; if ( !nCnt ) nCnt = 1; break; -case 0x1: nCommand = EnhancedCustomShapeSegmentCommand::LINETO; if ( !nCnt ) nCnt = 1; break; // seems to the relative lineto -case 0x4: nCommand = EnhancedCustomShapeSegmentCommand::MOVETO; if ( !nCnt ) nCnt = 1; break; -case 0x2: nCommand = EnhancedCustomShapeSegmentCommand::CURVETO; if ( !nCnt ) nCnt = 1; break; -case 0x3: nCommand = EnhancedCustomShapeSegmentCommand::CURVETO; if ( !nCnt ) nCnt = 1; break; // seems to be the relative curveto -case 0x8: nCommand = EnhancedCustomShapeSegmentCommand::ENDSUBPATH; nCnt = 0; break; -case 0x6: nCommand = EnhancedCustomShapeSegmentCommand::CLOSESUBPATH; nCnt = 0; break; -case 0xa: -case 0xb: +case 0x1: nCommand = EnhancedCustomShapeSegmentCommand::CURVETO; if ( !nCnt ) nCnt = 1; break; +case 0x2: nCommand = EnhancedCustomShapeSegmentCommand::MOVETO; if ( !nCnt ) nCnt = 1; break; +case 0x3: nCommand = EnhancedCustomShapeSegmentCommand::CLOSESUBPATH; nCnt = 0; break; +case 0x4: nCommand = EnhancedCustomShapeSegmentCommand::ENDSUBPATH; nCnt = 0; break; +case 0x5: +case 0x6: { -switch ( ( nTmp 8 ) 0xf ) +switch ( ( nTmp 8 ) 0x1f )//5 bits next to command type is for path escape type { case 0x0: { +//It is msopathEscapeExtension which is transformed into LINETO. +//If issue happens, I think this part can be comment so that it will be taken as unknow command. +//When export, origin data will be export without any change. nCommand = EnhancedCustomShapeSegmentCommand::LINETO; if ( !nCnt ) nCnt = 1; commit c789d126aacda9c5d2ccf3c51d669b1796180f66 Author: Andre Fischer a...@apache.org Date: Fri Jul 6 12:07:22 2012 + #i119887# Fixing import of shadow direction. Reported by: Li Feng Wang Patch by: Jianyuan Li Review by: Andre Fischer diff --git a/filter/source/msfilter/msdffimp.cxx b/filter/source/msfilter/msdffimp.cxx index 96b69b7..cf760ef 100644 --- a/filter/source/msfilter/msdffimp.cxx +++ b/filter/source/msfilter/msdffimp.cxx @@ -2604,15 +2604,13 @@ void DffPropertyReader::ApplyAttributes( SvStream rIn, SfxItemSet rSet, DffObj { sal_Int32 nVal = static_cast sal_Int32 ( GetPropertyValue( DFF_Prop_shadowOffsetX ) ); rManager.ScaleEmu( nVal ); -if ( nVal ) -rSet.Put( SdrShadowXDistItem( nVal ) ); +rSet.Put( SdrShadowXDistItem( nVal ) ); } if ( IsProperty( DFF_Prop_shadowOffsetY ) ) { sal_Int32 nVal = static_cast sal_Int32 ( GetPropertyValue( DFF_Prop_shadowOffsetY ) ); rManager.ScaleEmu( nVal ); -if ( nVal ) -rSet.Put( SdrShadowYDistItem( nVal ) ); +rSet.Put( SdrShadowYDistItem( nVal ) ); } if ( IsProperty( DFF_Prop_fshadowObscured ) ) { commit cf4260b85213b263f78c51d33557176c813989ef Author: Andre Fischer a...@apache.org Date: Mon Jul 9 11:04:52 2012 + #i119888# Fixed import of gradient colored shapes from PPT. Reported by: Li Feng Wang Patch by: Jianyuan Li Review by: Andre Fischer diff --git
[Libreoffice-commits] core.git: 3 commits - filter/source sc/Library_scd.mk sc/source sc/util
filter/source/config/fragments/types/calc_MS_Excel_40.xcu | 2 filter/source/config/fragments/types/calc_MS_Excel_40_VorlageTemplate.xcu | 2 filter/source/config/fragments/types/calc_MS_Excel_5095.xcu | 2 filter/source/config/fragments/types/calc_MS_Excel_5095_VorlageTemplate.xcu | 2 filter/source/config/fragments/types/calc_MS_Excel_95.xcu | 2 filter/source/config/fragments/types/calc_MS_Excel_95_VorlageTemplate.xcu | 2 filter/source/config/fragments/types/calc_MS_Excel_97.xcu | 2 filter/source/config/fragments/types/calc_MS_Excel_97_VorlageTemplate.xcu | 2 sc/Library_scd.mk | 1 sc/source/ui/unoobj/detreg.cxx | 66 +--- sc/source/ui/unoobj/exceldetect.cxx | 162 ++ sc/source/ui/unoobj/exceldetect.hxx | 46 ++ sc/source/ui/unoobj/scdetect.cxx| 7 sc/source/ui/unoobj/scdetect.hxx| 7 sc/util/scd.component | 3 15 files changed, 253 insertions(+), 55 deletions(-) New commits: commit fed4f58030db4e9afd83044201b06d437345fc3f Author: Kohei Yoshida kohei.yosh...@gmail.com Date: Tue Feb 5 01:21:45 2013 -0500 Use the new excel format detector for all binary excel types. But I have yet to implement the detection of Excel 4.0... Separating detection services like this will make the overall type detection process a little more reliable. It's actually not a good idea to use a single type detection service for a multitude of file format types... Change-Id: I2914c179ac939a031b84e8d37de891a5043851e6 diff --git a/filter/source/config/fragments/types/calc_MS_Excel_40.xcu b/filter/source/config/fragments/types/calc_MS_Excel_40.xcu index 1506f7e..b99cfc4 100644 --- a/filter/source/config/fragments/types/calc_MS_Excel_40.xcu +++ b/filter/source/config/fragments/types/calc_MS_Excel_40.xcu @@ -16,7 +16,7 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . -- node oor:name=calc_MS_Excel_40 oor:op=replace -prop oor:name=DetectServicevaluecom.sun.star.comp.calc.FormatDetector/value/prop +prop oor:name=DetectServicevaluecom.sun.star.comp.calc.ExcelBiffFormatDetector/value/prop prop oor:name=URLPattern/ prop oor:name=Extensionsvaluexls xlw xlc xlm/value/prop prop oor:name=MediaTypevalueapplication/vnd.ms-excel/value/prop diff --git a/filter/source/config/fragments/types/calc_MS_Excel_40_VorlageTemplate.xcu b/filter/source/config/fragments/types/calc_MS_Excel_40_VorlageTemplate.xcu index ed9ccb2..69304a7 100644 --- a/filter/source/config/fragments/types/calc_MS_Excel_40_VorlageTemplate.xcu +++ b/filter/source/config/fragments/types/calc_MS_Excel_40_VorlageTemplate.xcu @@ -16,7 +16,7 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . -- node oor:name=calc_MS_Excel_40_VorlageTemplate oor:op=replace -prop oor:name=DetectServicevaluecom.sun.star.comp.calc.FormatDetector/value/prop +prop oor:name=DetectServicevaluecom.sun.star.comp.calc.ExcelBiffFormatDetector/value/prop prop oor:name=URLPattern/ prop oor:name=Extensionsvaluexlt/value/prop prop oor:name=MediaTypevalueapplication/vnd.ms-excel/value/prop diff --git a/filter/source/config/fragments/types/calc_MS_Excel_5095.xcu b/filter/source/config/fragments/types/calc_MS_Excel_5095.xcu index b1f7a87..c1e5371 100644 --- a/filter/source/config/fragments/types/calc_MS_Excel_5095.xcu +++ b/filter/source/config/fragments/types/calc_MS_Excel_5095.xcu @@ -16,7 +16,7 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . -- node oor:name=calc_MS_Excel_5095 oor:op=replace -prop oor:name=DetectServicevaluecom.sun.star.comp.calc.FormatDetector/value/prop +prop oor:name=DetectServicevaluecom.sun.star.comp.calc.ExcelBiffFormatDetector/value/prop prop oor:name=URLPattern/ prop oor:name=Extensionsvaluexls xlc xlm xlw/value/prop prop oor:name=MediaTypevalueapplication/vnd.ms-excel/value/prop diff --git a/filter/source/config/fragments/types/calc_MS_Excel_5095_VorlageTemplate.xcu b/filter/source/config/fragments/types/calc_MS_Excel_5095_VorlageTemplate.xcu index b14111f..ead4b04 100644 --- a/filter/source/config/fragments/types/calc_MS_Excel_5095_VorlageTemplate.xcu +++ b/filter/source/config/fragments/types/calc_MS_Excel_5095_VorlageTemplate.xcu @@ -16,7 +16,7 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . -- node oor:name=calc_MS_Excel_5095_VorlageTemplate oor:op=replace -prop