[Libreoffice-commits] core.git: include/xmlsecurity vcl/qa xmlsecurity/source
include/xmlsecurity/pdfio/pdfdocument.hxx | 17 + vcl/qa/cppunit/pdfexport/data/tdf105461.odp |binary vcl/qa/cppunit/pdfexport/pdfexport.cxx | 50 xmlsecurity/source/pdfio/pdfdocument.cxx| 26 +++--- 4 files changed, 80 insertions(+), 13 deletions(-) New commits: commit 4e203ca3915e0cee2e7e02b95e78b3f5a8870098 Author: Miklos Vajna Date: Fri Feb 24 17:14:23 2017 +0100 tdf#105461 vcl: add text highlight textcase Fails with commit ee32c7d8083ae1449d6b379034be92995c142da9 (tdf#105461 PDF export: handle text fill color, 2017-02-01) reverted. Change-Id: I3628a16d0810e3be3fb352340d06cdba472dcd3f Reviewed-on: https://gerrit.libreoffice.org/34621 Reviewed-by: Miklos Vajna Tested-by: Jenkins diff --git a/include/xmlsecurity/pdfio/pdfdocument.hxx b/include/xmlsecurity/pdfio/pdfdocument.hxx index 0b27014..5a8ea6c 100644 --- a/include/xmlsecurity/pdfio/pdfdocument.hxx +++ b/include/xmlsecurity/pdfio/pdfdocument.hxx @@ -80,6 +80,8 @@ public: void SetDictionary(PDFDictionaryElement* pDictionaryElement); void SetArray(PDFArrayElement* pArrayElement); void SetStream(PDFStreamElement* pStreamElement); +/// Access to the stream of the object, if it has any. +PDFStreamElement* GetStream() const; PDFArrayElement* GetArray() const; /// Parse objects stored in this object stream. void ParseStoredObjects(); @@ -88,6 +90,21 @@ public: void SetStreamBuffer(std::unique_ptr& pStreamBuffer); }; +/// Stream object: a byte array with a known length. +class XMLSECURITY_DLLPUBLIC PDFStreamElement : public PDFElement +{ +size_t m_nLength; +sal_uInt64 m_nOffset; +/// The byte array itself. +SvMemoryStream m_aMemory; + +public: +explicit PDFStreamElement(size_t nLength); +bool Read(SvStream& rStream) override; +sal_uInt64 GetOffset() const; +SvMemoryStream& GetMemory(); +}; + /// Name object: a key string. class XMLSECURITY_DLLPUBLIC PDFNameElement : public PDFElement { diff --git a/vcl/qa/cppunit/pdfexport/data/tdf105461.odp b/vcl/qa/cppunit/pdfexport/data/tdf105461.odp new file mode 100644 index 000..9c86a3b Binary files /dev/null and b/vcl/qa/cppunit/pdfexport/data/tdf105461.odp differ diff --git a/vcl/qa/cppunit/pdfexport/pdfexport.cxx b/vcl/qa/cppunit/pdfexport/pdfexport.cxx index 949ef61..1c665b8 100644 --- a/vcl/qa/cppunit/pdfexport/pdfexport.cxx +++ b/vcl/qa/cppunit/pdfexport/pdfexport.cxx @@ -19,6 +19,7 @@ #include #include #include +#include using namespace ::com::sun::star; @@ -39,11 +40,14 @@ public: #if HAVE_FEATURE_PDFIUM /// Tests that a pdf image is roundtripped back to PDF as a vector format. void testTdf106059(); +/// Tests that text highlight from Impress is not lost. +void testTdf105461(); #endif CPPUNIT_TEST_SUITE(PdfExportTest); #if HAVE_FEATURE_PDFIUM CPPUNIT_TEST(testTdf106059); +CPPUNIT_TEST(testTdf105461); #endif CPPUNIT_TEST_SUITE_END(); }; @@ -100,6 +104,52 @@ void PdfExportTest::testTdf106059() // This dictionary key was missing, so the XObject wasn't a reference one. CPPUNIT_ASSERT(pReferenceXObject->Lookup("Ref")); } + +void PdfExportTest::testTdf105461() +{ +// Import the bugdoc and export as PDF. +OUString aURL = m_directories.getURLFromSrc(DATA_DIRECTORY) + "tdf105461.odp"; +mxComponent = loadFromDesktop(aURL); +CPPUNIT_ASSERT(mxComponent.is()); + +uno::Reference xStorable(mxComponent, uno::UNO_QUERY); +utl::TempFile aTempFile; +aTempFile.EnableKillingFile(); +utl::MediaDescriptor aMediaDescriptor; +aMediaDescriptor["FilterName"] <<= OUString("impress_pdf_Export"); +xStorable->storeToURL(aTempFile.GetURL(), aMediaDescriptor.getAsConstPropertyValueList()); + +// Parse the export result. +xmlsecurity::pdfio::PDFDocument aDocument; +SvFileStream aStream(aTempFile.GetURL(), StreamMode::READ); +CPPUNIT_ASSERT(aDocument.Read(aStream)); + +// The document has one page. +std::vector aPages = aDocument.GetPages(); +CPPUNIT_ASSERT_EQUAL(static_cast(1), aPages.size()); + +// The page has a stream. +xmlsecurity::pdfio::PDFObjectElement* pContents = aPages[0]->LookupObject("Contents"); +CPPUNIT_ASSERT(pContents); +xmlsecurity::pdfio::PDFStreamElement* pStream = pContents->GetStream(); +CPPUNIT_ASSERT(pStream); +SvMemoryStream& rObjectStream = pStream->GetMemory(); +// Uncompress it. +SvMemoryStream aUncompressed; +ZCodec aZCodec; +aZCodec.BeginCompression(); +rObjectStream.Seek(0); +aZCodec.Decompress(rObjectStream, aUncompressed); +CPPUNIT_ASSERT(aZCodec.EndCompression()); + +// Make sure there is a filled rectangle inside. +OString aFilledRectangle("re f*"); +auto pStart = static_cast(aUncompressed.GetData()); +const char* pEnd = pStart + aUncompressed.GetSize(); +auto it = std::search(pStart, pEnd, aFilledRectangle.g
Re: OUString name
On 02/26/2017 11:05 PM, Chris Sherlock wrote: This may seem like a silly question, but what does the "OU" in OUString stand for? Is it OpenOffice.org Unicode String? I /think/ "O" is the silly urge to prefix "object classes" (whatever that is) with "O" (compare with "I" for "interfaces"). "U" definitely is "Unicode" (to distinguish from char-based OString). ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice
Weekly QA Report (W08-2017)
Hello, What have happened in QA in the last 7 days? * 112 have been created, of which, 34 are still unconfirmed ( Total Unconfirmed bugs: 467 ) Link: http://tinyurl.com/gooaael * 753 comments have been written. == STATUS CHANGED == * 7 bugs have been changed to 'ASSIGNED'. Link: http://tinyurl.com/jett93g Done by: Miklos Vajna ( 1 ), Muhammet Kara ( 1 ), Laurent BP ( 1 ), charan ( 1 ), Bartosz ( 1 ), Adolfo Jayme ( 1 ), Andrea Mussap ( 1 ) * 1 bug has been changed to 'CLOSED'. Link: http://tinyurl.com/hma58xp Done by: Eike Rathke ( 1 ) * 28 bugs have been changed to 'NEEDINFO'. Link: http://tinyurl.com/z5y66jx Done by: Xisco Faulí ( 17 ), V Stuart Foote ( 2 ), Julien Nabet ( 2 ), Jacques Guilleron ( 2 ), Buovjaga ( 1 ), Regina Henschel ( 1 ), Muhammet Kara ( 1 ), m.a.riosv ( 1 ), tommy27 ( 1 ) * 37 bugs have been changed to 'NEW'. Link: http://tinyurl.com/jgkfmde Done by: Xisco Faulí ( 14 ), V Stuart Foote ( 3 ), Buovjaga ( 3 ), Jacques Guilleron ( 3 ), Heiko Tietze ( 2 ), Samuel Mehrbrodt (CIB) ( 2 ), robert ( 1 ), Pranav Kant ( 1 ), Yousuf Philips (jay) ( 1 ), Pedro ( 1 ), Paolo Benvenuto ( 1 ), OfficeUser ( 1 ), Muhammet Kara ( 1 ), Laurent BP ( 1 ), Harald Koester ( 1 ), Cor Nouws ( 1 ) * 1 bug has been changed to 'REOPENED'. Link: http://tinyurl.com/hnf69xh Done by: joshas ( 1 ) * 26 bugs have been changed to 'RESOLVED DUPLICATE'. Link: http://tinyurl.com/hd5ls6t Done by: Xisco Faulí ( 4 ), Buovjaga ( 3 ), Khaled Hosny ( 3 ), Aron Budea ( 3 ), V Stuart Foote ( 2 ), m.a.riosv ( 2 ), Luis ( 2 ), Timur ( 2 ), Heiko Tietze ( 1 ), robert ( 1 ), Jacques Guilleron ( 1 ), Caolán McNamara ( 1 ), Katarina Behrens (CIB) ( 1 ) * 28 bugs have been changed to 'RESOLVED FIXED'. Link: http://tinyurl.com/j767vop Done by: Winfried Donkers ( 5 ), Caolán McNamara ( 4 ), Xisco Faulí ( 2 ), Miklos Vajna ( 2 ), Samuel Mehrbrodt (CIB) ( 2 ), Justin L ( 2 ), Adolfo Jayme ( 2 ), V Stuart Foote ( 1 ), Julien Nabet ( 1 ), CommodusTheTyrant ( 1 ), Eric Owens ( 1 ), m.a.riosv ( 1 ), Khaled Hosny ( 1 ), David Tardon ( 1 ), Tonipez ( 1 ), Katarina Behrens (CIB) ( 1 ) * 1 bug has been changed to 'RESOLVED INSUFFICIENTDATA'. Link: http://tinyurl.com/z2fa343 Done by: Julien Nabet ( 1 ) * 1 bug has been changed to 'RESOLVED MOVED'. Link: http://tinyurl.com/het88gr Done by: Dennis Roczek ( 1 ) * 6 bugs have been changed to 'RESOLVED NOTABUG'. Link: http://tinyurl.com/z33hc7r Done by: Xisco Faulí ( 1 ), William Oprandi ( 1 ), V Stuart Foote ( 1 ), Buovjaga ( 1 ), Heiko Tietze ( 1 ), m.a.riosv ( 1 ) * 1 bug has been changed to 'RESOLVED NOTOURBUG'. Link: http://tinyurl.com/hc39oxm Done by: Heiko Tietze ( 1 ) * 2 bugs have been changed to 'RESOLVED WONTFIX'. Link: http://tinyurl.com/hacnano Done by: Heiko Tietze ( 1 ), Justin L ( 1 ) * 13 bugs have been changed to 'RESOLVED WORKSFORME'. Link: http://tinyurl.com/jn8oszv Done by: Xisco Faulí ( 2 ), Julien Nabet ( 2 ), Buovjaga ( 1 ), tmacalp ( 1 ), Heiko Tietze ( 1 ), Alain H Romedenne ( 1 ), m.a.riosv ( 1 ), Luis ( 1 ), Justin L ( 1 ), tommy27 ( 1 ), Aron Budea ( 1 ) * 20 bugs have been changed to 'UNCONFIRMED'. Link: http://tinyurl.com/jgdd8c6 Done by: CommodusTheTyrant ( 3 ), Pavel ( 2 ), Terrence ( 1 ), V Stuart Foote ( 1 ), Dmitry ( 1 ), JMM ( 1 ), Aprax ( 1 ), pegrego ( 1 ), Nima Az ( 1 ), Roman ( 1 ), Jeremy M ( 1 ), Jorge Albarenque ( 1 ), Jean-Baptiste Faure ( 1 ), David Chamberlin ( 1 ), centmillediables2-libreoffice ( 1 ), Simone ( 1 ), Adrian Greeman ( 1 ) * 6 bugs have been changed to 'VERIFIED FIXED'. Link: http://tinyurl.com/hn83rw9 Done by: Buovjaga ( 2 ), Aron Budea ( 2 ), Julien Nabet ( 1 ), Timur ( 1 ) == KEYWORDS ADDED == * 'bibisectRequest' has been added to 5 bugs. Link: http://tinyurl.com/jmdf5dw Done by: Xisco Faulí ( 2 ), Buovjaga ( 1 ), Eike Rathke ( 1 ), Aron Budea ( 1 ) * 'bibisected' has been added to 16 bugs. Link: http://tinyurl.com/j6w5hnh Done by: Xisco Faulí ( 11 ), Aron Budea ( 4 ), Jan-Marek Glogowski ( 1 ) * 'bisected' has been added to 15 bugs. Link: http://tinyurl.com/j3hwo3l Done by: Xisco Faulí ( 8 ), Aron Budea ( 5 ), Jean-Baptiste Faure ( 1 ), Caolán McNamara ( 1 ) * 'dataLoss' has been added to 2 bugs. Link: http://tinyurl.com/jbmpths Done by: Aron Budea ( 2 ) * 'easyHack' has been added to 2 bugs. Link: http://tinyurl.com/hhm6pww Done by: Heiko Tietze ( 1 ), tommy27 ( 1 ) * 'filter:docx' has been added to 4 bugs. Link: http://tinyurl.com/gqlw4pr Done by: Aron Budea ( 2 ), V Stuart Foote ( 1 ), Justin L ( 1 ) * 'filter:odt' has been added to 1 bugs. Link: http://tinyurl.com/juz8as6 Done by: Roman ( 1 ) * 'filter:pdf' has been added to 1 bugs. Link: http://tinyurl.com/z4cvuf9 Done by: Xisco Faulí ( 1 ) * 'filter:ppt' has been added to 1 bugs. Li
[Libreoffice-commits] core.git: vcl/source
vcl/source/gdi/svmconverter.cxx | 26 +- 1 file changed, 9 insertions(+), 17 deletions(-) New commits: commit e577882476f141d94cede91224805d7a6b009cf7 Author: Caolán McNamara Date: Mon Feb 27 09:02:41 2017 + ofz#695 leak in ImplConvertFromSVM1 Change-Id: Ida0d97d9a4e5dfeaf091927c38fa9552a1b87ef6 diff --git a/vcl/source/gdi/svmconverter.cxx b/vcl/source/gdi/svmconverter.cxx index eae296f..b1e3be8 100644 --- a/vcl/source/gdi/svmconverter.cxx +++ b/vcl/source/gdi/svmconverter.cxx @@ -33,6 +33,7 @@ #include "svmconverter.hxx" #include +#include // Inlines void ImplReadRect( SvStream& rIStm, Rectangle& rRect ) @@ -505,7 +506,7 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf ) } LineInfoaLineInfo( LineStyle::NONE, 0 ); -::std::stack< LineInfo* >aLIStack; +std::stack> aLIStack; ScopedVclPtrInstance< VirtualDevice > aFontVDev; rtl_TextEncodingeActualCharSet = osl_getThreadTextEncoding(); boolbFatLine = false; @@ -1163,7 +1164,7 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf ) case GDI_PUSH_ACTION: { -aLIStack.push( new LineInfo( aLineInfo ) ); +aLIStack.push(o3tl::make_unique(aLineInfo)); rMtf.AddAction( new MetaPushAction( PushFlags::ALL ) ); // #106172# Track font relevant data in shadow VDev @@ -1174,20 +1175,18 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf ) case GDI_POP_ACTION: { -LineInfo* pLineInfo; -if (aLIStack.empty()) -pLineInfo = nullptr; -else +std::unique_ptr xLineInfo; +if (!aLIStack.empty()) { -pLineInfo = aLIStack.top(); +xLineInfo = std::move(aLIStack.top()); aLIStack.pop(); } // restore line info -if( pLineInfo ) +if (xLineInfo) { -aLineInfo = *pLineInfo; -delete pLineInfo; +aLineInfo = *xLineInfo; +xLineInfo.reset(); bFatLine = ( LineStyle::NONE != aLineInfo.GetStyle() ) && !aLineInfo.IsDefault(); } @@ -1389,13 +1388,6 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf ) } } -// cleanup push-pop stack if necessary -while( !aLIStack.empty() ) -{ -delete aLIStack.top(); -aLIStack.pop(); -} - rIStm.SetEndian( nOldFormat ); } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: sw/CppunitTest_sw_odfimport.mk sw/inc sw/qa sw/source sw/uiconfig sw/UIConfig_swriter.mk
sw/CppunitTest_sw_odfimport.mk |2 sw/UIConfig_swriter.mk |3 sw/inc/helpid.h |3 sw/qa/extras/odfimport/odfimport.cxx |4 sw/source/uibase/inc/olmenu.hxx | 16 +++ sw/source/uibase/lingu/olmenu.cxx| 113 +++ sw/source/uibase/lingu/olmenu.hrc|9 -- sw/source/uibase/lingu/olmenu.src| 90 -- sw/uiconfig/swriter/ui/spellmenu.ui | 142 +++ 9 files changed, 240 insertions(+), 142 deletions(-) New commits: commit 0107e13069f12cb8a27353e2028bb7513da524e8 Author: Caolán McNamara Date: Sat Feb 25 14:57:01 2017 + convert spell menu to .ui This reverts commit 73f2944618e637762125fabd214b09b4fa50fb90. Change-Id: I89869d1670cf71e932ccd4dbface30c730d9 diff --git a/sw/CppunitTest_sw_odfimport.mk b/sw/CppunitTest_sw_odfimport.mk index 4c249d5..36a16db 100644 --- a/sw/CppunitTest_sw_odfimport.mk +++ b/sw/CppunitTest_sw_odfimport.mk @@ -85,6 +85,6 @@ $(eval $(call gb_CppunitTest_use_components,sw_odfimport,\ xmloff/util/xo \ )) -$(eval $(call gb_CppunitTest_use_configuration,sw_odfimport)) +$(eval $(call gb_CppunitTest_use_instdir_configuration,sw_odfimport)) # vim: set noet sw=4 ts=4: diff --git a/sw/UIConfig_swriter.mk b/sw/UIConfig_swriter.mk index 95495a2..8d51e8c 100644 --- a/sw/UIConfig_swriter.mk +++ b/sw/UIConfig_swriter.mk @@ -242,8 +242,9 @@ $(eval $(call gb_UIConfig_add_uifiles,modules/swriter,\ sw/uiconfig/swriter/ui/pagefooterpanel \ sw/uiconfig/swriter/ui/sidebarwrap \ sw/uiconfig/swriter/ui/sidebarstylepresets \ -sw/uiconfig/swriter/ui/sidebartheme \ + sw/uiconfig/swriter/ui/sidebartheme \ sw/uiconfig/swriter/ui/sortdialog \ + sw/uiconfig/swriter/ui/spellmenu \ sw/uiconfig/swriter/ui/splittable \ sw/uiconfig/swriter/ui/statisticsinfopage \ sw/uiconfig/swriter/ui/stringinput \ diff --git a/sw/inc/helpid.h b/sw/inc/helpid.h index 559d40c..f06dac6 100644 --- a/sw/inc/helpid.h +++ b/sw/inc/helpid.h @@ -99,9 +99,6 @@ #define HID_MN_READONLY_LOADGRAPHIC "SW_HID_MN_READONLY_LOADGRAPHIC" #define HID_MN_READONLY_GRAPHICOFF "SW_HID_MN_READONLY_GRAPHICOFF" -#define HID_LINGU_ADD_WORD "SW_HID_LINGU_ADD_WORD" -#define HID_LINGU_IGNORE_WORD "SW_HID_LINGU_IGNORE_WORD" -#define HID_LINGU_SPELLING_DLG "SW_HID_LINGU_SPELLING_DLG" #define HID_LINGU_AUTOCORR "SW_HID_LINGU_AUTOCORR" #define HID_LINGU_REPLACE "SW_HID_LINGU_REPLACE" #define HID_SMARTTAG_MAIN "SW_HID_SMARTTAG_MAIN"// SMARTTAGS diff --git a/sw/qa/extras/odfimport/odfimport.cxx b/sw/qa/extras/odfimport/odfimport.cxx index 3aae776..9572e7f 100644 --- a/sw/qa/extras/odfimport/odfimport.cxx +++ b/sw/qa/extras/odfimport/odfimport.cxx @@ -663,8 +663,8 @@ DECLARE_ODFIMPORT_TEST(testSpellmenuRedline, "spellmenu-redline.odt") // Make sure that if we show the spellcheck popup menu (for the current // document, which contains redlines), then the last two entries will be // always 'go to next/previous change'. -CPPUNIT_ASSERT_EQUAL(sal_uInt16(FN_REDLINE_NEXT_CHANGE), rMenu.GetItemId(rMenu.GetItemCount() - 2)); -CPPUNIT_ASSERT_EQUAL(sal_uInt16(FN_REDLINE_PREV_CHANGE), rMenu.GetItemId(rMenu.GetItemCount() - 1)); +CPPUNIT_ASSERT_EQUAL(OString("next"), rMenu.GetItemIdent(rMenu.GetItemId(rMenu.GetItemCount() - 2))); +CPPUNIT_ASSERT_EQUAL(OString("prev"), rMenu.GetItemIdent(rMenu.GetItemId(rMenu.GetItemCount() - 1))); } DECLARE_ODFIMPORT_TEST(testAnnotationFormatting, "annotation-formatting.odt") diff --git a/sw/source/uibase/inc/olmenu.hxx b/sw/source/uibase/inc/olmenu.hxx index af1156b..a2077cd 100644 --- a/sw/source/uibase/inc/olmenu.hxx +++ b/sw/source/uibase/inc/olmenu.hxx @@ -25,6 +25,7 @@ #include #include +#include #include #include @@ -35,7 +36,20 @@ class SwWrtShell; class SW_DLLPUBLIC SwSpellPopup { -ScopedVclPtrInstance m_xPopupMenu; +VclBuilder m_aBuilder; +VclPtr m_xPopupMenu; +sal_uInt16 m_nIgnoreWordId; +sal_uInt16 m_nAddMenuId; +sal_uInt16 m_nAddId; +sal_uInt16 m_nSpellDialogId; +sal_uInt16 m_nCorrectMenuId; +sal_uInt16 m_nCorrectDialogId; +sal_uInt16 m_nLangSelectionMenuId; +sal_uInt16 m_nLangParaMenuId; +sal_uInt16 m_nRedlineAcceptId; +sal_uInt16 m_nRedlineRejectId; +sal_uInt16 m_nRedlineNextId; +sal_uInt16 m_nRedlinePrevId; SwWrtShell* m_pSh; css::uno::Sequence< css::uno::Reference< css::linguistic2::XDictionary > > m_aDics; css::uno::Reference< css::linguistic2::XSpellAlternatives > m_xSpellAlt; diff --git a/sw/source/uibase/lingu/olmenu.cxx b/sw/source/uibas
[Libreoffice-commits] core.git: vcl/source
vcl/source/bitmap/bitmapscalesuper.cxx | 59 - 1 file changed, 36 insertions(+), 23 deletions(-) New commits: commit 29108b656576d66e336b4bbe623556b4a82fef81 Author: Caolán McNamara Date: Sun Feb 26 21:10:38 2017 + fall back to unthreaded scaling if threaded scaling fails Change-Id: I916bdca4976bcc39d4342dacc9d0aea9a711e1f1 Reviewed-on: https://gerrit.libreoffice.org/34660 Tested-by: Jenkins Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara diff --git a/vcl/source/bitmap/bitmapscalesuper.cxx b/vcl/source/bitmap/bitmapscalesuper.cxx index ae540e5..15aa67e 100644 --- a/vcl/source/bitmap/bitmapscalesuper.cxx +++ b/vcl/source/bitmap/bitmapscalesuper.cxx @@ -989,43 +989,56 @@ bool BitmapScaleSuper::filter(Bitmap& rBitmap) // We work hard when there is a large destination image, or // A large source image. bool bHorizontalWork = pReadAccess->Width() > 512 || pWriteAccess->Width() > 512; +bool bUseThreads = true; static bool bDisableThreadedScaling = getenv ("VCL_NO_THREAD_SCALE"); if ( bDisableThreadedScaling || !bHorizontalWork || nEndY - nStartY < SCALE_THREAD_STRIP ) { SAL_INFO("vcl.gdi", "Scale in main thread"); -pScaleRangeFn( aContext, nStartY, nEndY ); +bUseThreads = false; } -else + +if (bUseThreads) { -// partition and queue work -comphelper::ThreadPool &rShared = comphelper::ThreadPool::getSharedOptimalPool(); -std::shared_ptr pTag = comphelper::ThreadPool::createThreadTaskTag(); -sal_uInt32 nThreads = rShared.getWorkerCount(); -assert( nThreads > 0 ); -sal_uInt32 nStrips = ((nEndY - nStartY) + SCALE_THREAD_STRIP - 1) / SCALE_THREAD_STRIP; -sal_uInt32 nStripsPerThread = nStrips / nThreads; -SAL_INFO("vcl.gdi", "Scale in " << nStrips << " strips " << nStripsPerThread << " per thread we have " << nThreads << " CPU threads "); -long nStripY = nStartY; -for ( sal_uInt32 t = 0; t < nThreads - 1; t++ ) +try { -ScaleTask *pTask = new ScaleTask( pTag, pScaleRangeFn ); -for ( sal_uInt32 j = 0; j < nStripsPerThread; j++ ) +// partition and queue work +comphelper::ThreadPool &rShared = comphelper::ThreadPool::getSharedOptimalPool(); +std::shared_ptr pTag = comphelper::ThreadPool::createThreadTaskTag(); +sal_uInt32 nThreads = rShared.getWorkerCount(); +assert( nThreads > 0 ); +sal_uInt32 nStrips = ((nEndY - nStartY) + SCALE_THREAD_STRIP - 1) / SCALE_THREAD_STRIP; +sal_uInt32 nStripsPerThread = nStrips / nThreads; +SAL_INFO("vcl.gdi", "Scale in " << nStrips << " strips " << nStripsPerThread << " per thread we have " << nThreads << " CPU threads "); +long nStripY = nStartY; +for ( sal_uInt32 t = 0; t < nThreads - 1; t++ ) { -ScaleRangeContext aRC( &aContext, nStripY ); -pTask->push( aRC ); -nStripY += SCALE_THREAD_STRIP; +ScaleTask *pTask = new ScaleTask( pTag, pScaleRangeFn ); +for ( sal_uInt32 j = 0; j < nStripsPerThread; j++ ) +{ +ScaleRangeContext aRC( &aContext, nStripY ); +pTask->push( aRC ); +nStripY += SCALE_THREAD_STRIP; +} +rShared.pushTask( pTask ); } -rShared.pushTask( pTask ); -} -// finish any remaining bits here -pScaleRangeFn( aContext, nStripY, nEndY ); +// finish any remaining bits here +pScaleRangeFn( aContext, nStripY, nEndY ); -rShared.waitUntilDone(pTag); -SAL_INFO("vcl.gdi", "All threaded scaling tasks complete"); +rShared.waitUntilDone(pTag); +SAL_INFO("vcl.gdi", "All threaded scaling tasks complete"); +} +catch (...) +{ +SAL_WARN("vcl.gdi", "threaded bitmap scaling failed"); +bUseThreads = false; +} } +if (!bUseThreads) +pScaleRangeFn( aContext, nStartY, nEndY ); + bRet = true; } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: officecfg/registry
officecfg/registry/data/org/openoffice/Office/UI/Sidebar.xcu |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 7d21ae342dc5c4d4c3a4f3f5c2603b7b6be84d00 Author: Arnold Dumas Date: Sun Feb 26 19:35:58 2017 +0100 tdf#104507: Add a 'More Options' button to Image content panel Add a 'More Options' button to the Image content panel in the sidebar, which links to the image dialog. Change-Id: I60892f2e684c521a0830ab7a3960a243b5594c42 Reviewed-on: https://gerrit.libreoffice.org/34656 Tested-by: Jenkins Reviewed-by: Katarina Behrens diff --git a/officecfg/registry/data/org/openoffice/Office/UI/Sidebar.xcu b/officecfg/registry/data/org/openoffice/Office/UI/Sidebar.xcu index 965e8da..3739d1a 100644 --- a/officecfg/registry/data/org/openoffice/Office/UI/Sidebar.xcu +++ b/officecfg/registry/data/org/openoffice/Office/UI/Sidebar.xcu @@ -691,7 +691,7 @@ Calc, Graphic, visible ; DrawImpress, Graphic, visible ; -WriterVariants, Graphic, visible ; +WriterVariants, Graphic, visible, .uno:GraphicDialog ; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] online.git: Branch 'distro/collabora/collabora-online-2-0' - wsd/LOOLWSD.cpp
wsd/LOOLWSD.cpp |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 9cec6cd91d7d4a818f431030ac91482b460fce02 Author: Ashod Nakashian Date: Fri Feb 24 21:27:13 2017 -0500 wsd: allow more time for initial kit instance Change-Id: I141d30e0d1089521593c614be29ef5c33fd3428a Reviewed-on: https://gerrit.libreoffice.org/34639 Reviewed-by: Andras Timar Tested-by: Andras Timar diff --git a/wsd/LOOLWSD.cpp b/wsd/LOOLWSD.cpp index edc463a..3b08d2a 100644 --- a/wsd/LOOLWSD.cpp +++ b/wsd/LOOLWSD.cpp @@ -348,7 +348,7 @@ static void preForkChildren() forkChildren(numPreSpawn); // Wait until we have at least one child. -const auto timeout = std::chrono::milliseconds(CHILD_TIMEOUT_MS); +const auto timeout = std::chrono::milliseconds(CHILD_TIMEOUT_MS * 3); NewChildrenCV.wait_for(lock, timeout, []() { return !NewChildren.empty(); }); } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] online.git: Branch 'distro/collabora/collabora-online-2-0' - wsd/LOOLWSD.cpp
wsd/LOOLWSD.cpp |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 0a174b24827c900c112f06bebfc4be8772bbc3fc Author: Ashod Nakashian Date: Mon Jan 2 15:40:20 2017 -0500 wsd: correctly count outstanding spawned children Change-Id: I6e2d5c7d8fdfbcd268ef97cb1272bce76e8b69de Reviewed-on: https://gerrit.libreoffice.org/32669 Reviewed-by: Ashod Nakashian Tested-by: Ashod Nakashian (cherry picked from commit 33b72aa378d5be7badaa0a05a491b1b85327782b) Reviewed-on: https://gerrit.libreoffice.org/34638 Reviewed-by: Andras Timar Tested-by: Andras Timar diff --git a/wsd/LOOLWSD.cpp b/wsd/LOOLWSD.cpp index 3b08d2a..faa1ed8 100644 --- a/wsd/LOOLWSD.cpp +++ b/wsd/LOOLWSD.cpp @@ -309,7 +309,7 @@ static void forkChildren(const int number) const std::string aMessage = "spawn " + std::to_string(number) + "\n"; LOG_DBG("MasterToForKit: " << aMessage.substr(0, aMessage.length() - 1)); -++OutstandingForks; +OutstandingForks += number; IoUtil::writeToPipe(LOOLWSD::ForKitWritePipe, aMessage); LastForkRequestTime = std::chrono::steady_clock::now(); } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] online.git: Branch 'distro/collabora/collabora-online-2-0' - wsd/LOOLWSD.cpp
wsd/LOOLWSD.cpp | 26 +- 1 file changed, 17 insertions(+), 9 deletions(-) New commits: commit adb43e7a9c7405e176b0bb8821799678a3be496f Author: Ashod Nakashian Date: Sun Jan 1 15:42:22 2017 -0500 wsd: flag for shutdown when we fail to create forkit And say 'forkit' in the logs where we recognize it instead of the generic 'child'. Change-Id: I7628b064bb6330db145a948640e48b727def3270 Reviewed-on: https://gerrit.libreoffice.org/32619 Reviewed-by: Ashod Nakashian Tested-by: Ashod Nakashian (cherry picked from commit fb1e8eb63ae6a0b8626e6e798fa45176e4f6e713) Reviewed-on: https://gerrit.libreoffice.org/34637 Reviewed-by: Andras Timar Tested-by: Andras Timar diff --git a/wsd/LOOLWSD.cpp b/wsd/LOOLWSD.cpp index faa1ed8..a59d042 100644 --- a/wsd/LOOLWSD.cpp +++ b/wsd/LOOLWSD.cpp @@ -444,7 +444,7 @@ static std::shared_ptr getNewChild() } } -LOG_DBG("getNewChild: No live child, forking more."); +LOG_WRN("getNewChild: No available child. Sending spawn request to forkit and failing."); } while (chrono::duration_cast(chrono::steady_clock::now() - startTime).count() < CHILD_TIMEOUT_MS * 4); @@ -2072,12 +2072,12 @@ int LOOLWSD::main(const std::vector& /*args*/) { if (WIFEXITED(status)) { -LOG_INF("Child process [" << pid << "] exited with code: " << +LOG_INF("Forkit process [" << pid << "] exited with code: " << WEXITSTATUS(status) << "."); } else { -LOG_ERR("Child process [" << pid << "] " << +LOG_ERR("Forkit process [" << pid << "] " << (WCOREDUMP(status) ? "core-dumped" : "died") << " with " << SigUtil::signalName(WTERMSIG(status))); } @@ -2088,17 +2088,18 @@ int LOOLWSD::main(const std::vector& /*args*/) if (forKitPid < 0) { LOG_FTL("Failed to spawn forkit instance. Shutting down."); +SigUtil::requestShutdown(); break; } } else if (WIFSTOPPED(status) == true) { -LOG_INF("Child process [" << pid << "] stopped with " << +LOG_INF("Forkit process [" << pid << "] stopped with " << SigUtil::signalName(WSTOPSIG(status))); } else if (WIFCONTINUED(status) == true) { -LOG_INF("Child process [" << pid << "] resumed with SIGCONT."); +LOG_INF("Forkit process [" << pid << "] resumed with SIGCONT."); } else { @@ -2107,17 +2108,24 @@ int LOOLWSD::main(const std::vector& /*args*/) } else { -LOG_ERR("An unknown child process died, pid: " << pid); +LOG_ERR("An unknown child process [" << pid << "] died."); } } else if (pid < 0) { -LOG_SYS("waitpid failed."); +LOG_SYS("Forkit waitpid failed."); if (errno == ECHILD) { // No child processes. -LOG_FTL("No Forkit instance. Terminating."); -break; +// Spawn a new forkit and try to dust it off and resume. +close(ForKitWritePipe); +forKitPid = createForKit(); +if (forKitPid < 0) +{ +LOG_FTL("Failed to spawn forkit instance. Shutting down."); +SigUtil::requestShutdown(); +break; +} } } else // pid == 0, no children have died ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: vcl/source
vcl/source/outdev/map.cxx |7 --- 1 file changed, 4 insertions(+), 3 deletions(-) New commits: commit deaf847f5017bcf7bb345d691be9ae8fa0deff0e Author: Caolán McNamara Date: Mon Feb 27 09:24:31 2017 + ofz#685 floating point exception Change-Id: I22741241253a6e3dabd0afa331aef2343d5fac77 diff --git a/vcl/source/outdev/map.cxx b/vcl/source/outdev/map.cxx index c89aeb6..72d5f92 100644 --- a/vcl/source/outdev/map.cxx +++ b/vcl/source/outdev/map.cxx @@ -395,13 +395,15 @@ static long ImplPixelToLogic( long n, long nDPI, long nMapNum, long nMapDenom, long nThres ) { assert(nDPI > 0); -if (nMapNum == 0) +long nDenom = nDPI * nMapNum; +if (nDenom == 0) { return 0; } + #if (SAL_TYPES_SIZEOFLONG < 8) if( (+n < nThres) && (-n < nThres) ) -n = (2 * n * nMapDenom) / (nDPI * nMapNum); +n = (2 * n * nMapDenom) / nDenom; else #else (void) nThres; @@ -409,7 +411,6 @@ static long ImplPixelToLogic( long n, long nDPI, long nMapNum, long nMapDenom, { sal_Int64 n64 = n; n64 *= nMapDenom; -long nDenom = nDPI * nMapNum; n = (long)(2 * n64 / nDenom); } if( n < 0 ) --n; else ++n; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] online.git: Branch 'distro/collabora/collabora-online-2-0' - 2 commits - configure.ac debian/changelog loleaflet/Makefile loleaflet/po
configure.ac |2 debian/changelog |6 loleaflet/Makefile |2 loleaflet/po/help-ab.po|4 loleaflet/po/help-af.po|4 loleaflet/po/help-am.po|4 loleaflet/po/help-an.po|4 loleaflet/po/help-ar.po|4 loleaflet/po/help-as.po|4 loleaflet/po/help-ast.po |4 loleaflet/po/help-az.po|4 loleaflet/po/help-be.po|4 loleaflet/po/help-bg.po|4 loleaflet/po/help-bn.po|4 loleaflet/po/help-bn_IN.po |4 loleaflet/po/help-bo.po|4 loleaflet/po/help-br.po|4 loleaflet/po/help-brx.po |4 loleaflet/po/help-bs.po|4 loleaflet/po/help-ca.po|4 loleaflet/po/help-cs.po|4 loleaflet/po/help-cy.po| 46 - loleaflet/po/help-da.po|4 loleaflet/po/help-de.po|4 loleaflet/po/help-dgo.po |4 loleaflet/po/help-dz.po|4 loleaflet/po/help-el.po|4 loleaflet/po/help-en_GB.po |4 loleaflet/po/help-en_ZA.po |4 loleaflet/po/help-eo.po|4 loleaflet/po/help-es.po|4 loleaflet/po/help-et.po|4 loleaflet/po/help-eu.po|4 loleaflet/po/help-fa.po|4 loleaflet/po/help-fi.po|4 loleaflet/po/help-fr.po|4 loleaflet/po/help-ga.po|4 loleaflet/po/help-gd.po| 96 -- loleaflet/po/help-gl.po| 162 + loleaflet/po/help-gu.po|4 loleaflet/po/help-gug.po |4 loleaflet/po/help-he.po|4 loleaflet/po/help-hi.po|4 loleaflet/po/help-hr.po|4 loleaflet/po/help-hu.po|4 loleaflet/po/help-id.po|4 loleaflet/po/help-is.po|4 loleaflet/po/help-it.po|4 loleaflet/po/help-ja.po|4 loleaflet/po/help-jv.po|4 loleaflet/po/help-ka.po|4 loleaflet/po/help-kk.po|4 loleaflet/po/help-kl.po|4 loleaflet/po/help-km.po|4 loleaflet/po/help-kn.po|4 loleaflet/po/help-ko.po|4 loleaflet/po/help-kok.po |4 loleaflet/po/help-ks.po|4 loleaflet/po/help-ky.po|4 loleaflet/po/help-lb.po|4 loleaflet/po/help-lo.po|4 loleaflet/po/help-lt.po|4 loleaflet/po/help-lv.po|4 loleaflet/po/help-mai.po |4 loleaflet/po/help-mk.po|4 loleaflet/po/help-ml.po|4 loleaflet/po/help-mn.po|4 loleaflet/po/help-mni.po |4 loleaflet/po/help-mr.po|4 loleaflet/po/help-my.po|4 loleaflet/po/help-nb.po|4 loleaflet/po/help-ne.po| 10 loleaflet/po/help-nl.po|4 loleaflet/po/help-nn.po|4 loleaflet/po/help-nr.po|4 loleaflet/po/help-nso.po |4 loleaflet/po/help-oc.po| 183 + loleaflet/po/help-om.po|4 loleaflet/po/help-or.po|4 loleaflet/po/help-pa_IN.po |4 loleaflet/po/help-pl.po|4 loleaflet/po/help-pt.po|4 loleaflet/po/help-pt_BR.po |4 loleaflet/po/help-ro.po|4 loleaflet/po/help-ru.po| 94 -- loleaflet/po/help-rw.po|4 loleaflet/po/help-sa_IN.po |4 loleaflet/po/help-sah.po |4 loleaflet/po/help-sat.po |4 loleaflet/po/help-sd.po|4 loleaflet/po/help-si.po|4 loleaflet/po/help-sid.po |4 loleaflet/po/help-sk.po|4 loleaflet/po/help-sq.po|4 loleaflet/po/help-ss.po|4 loleaflet/po/help-st.po|4 loleaflet/po/help-sv.po| 94 -- loleaflet/po/help-sw_TZ.po |4 loleaflet/po/help-ta.po|4 loleaflet/po/help-te.po|4 loleaflet/po/help-tg.po|4 loleaflet/po/help-th.po|4 loleaflet/po/help-ti.po|4 loleaflet/po/help-tn.po|4 loleaflet/po/help-tr.po|4 loleaflet/po/help-ts.po|4 loleaflet/po/help-tt.po|4 loleaflet/po/help-ug.po|4 loleaflet/po/help-uk.po|4 loleaflet/po/help-ur.po|4 loleaflet/po/help-uz.po|4 loleaflet/po/help-ve.po|4 loleaflet/po/help-vi.po|4 loleaflet/po/help-xh.po|4 loleaflet/po/help-zh_CN.po |4 loleaflet/po/help-zh_TW.po |4 loleaflet/po/help-zu.po|4 loleaflet/po/ui-ab.po | 442 +++-- loleaflet/po/ui-af.po | 442 +++-- loleaflet/po/ui-am.po | 450 +++--- loleaflet/po/ui-an.po | 442 +++-- loleaflet/po/ui-ar.po | 480 -- loleaflet/po/ui-as.po | 442 +++-- loleaflet/po/ui-ast.po | 442 +++-- loleaflet/po/ui-az.po | 442 +++-- loleaflet/po/ui-be.po | 442 +++-- loleaflet/po/ui-bg.po | 442 +++-- loleaflet/po/ui-bn.po | 442 +++-- loleaflet/po/ui-bn_IN.po | 442 +++-- loleaflet/po/ui-bo.po | 442 +++-- loleaflet/po/ui-br.po | 442 +++-- loleaflet/po/ui-brx.po | 442 +++-- loleaflet/po/ui-bs.po | 44
[Libreoffice-commits] core.git: extensions/source
extensions/source/propctrlr/browserlistbox.cxx | 41 +++-- extensions/source/propctrlr/browserlistbox.hxx |9 +++-- extensions/source/propctrlr/pcrcommon.hxx |1 3 files changed, 25 insertions(+), 26 deletions(-) New commits: commit b7863e40bcdf8ec5c393eb065431a94168a77556 Author: Stephan Bergmann Date: Mon Feb 27 10:36:23 2017 +0100 Clean up use of integer types Change-Id: I007b8eca8249da0e3c4aa5a9d274ac4cb497799b diff --git a/extensions/source/propctrlr/browserlistbox.cxx b/extensions/source/propctrlr/browserlistbox.cxx index 27bcc34..3bc0419 100644 --- a/extensions/source/propctrlr/browserlistbox.cxx +++ b/extensions/source/propctrlr/browserlistbox.cxx @@ -455,7 +455,7 @@ namespace pcr m_aVScroll->SetPosSizePixel( aVScrollPos, aVScrollSize ); } -for ( size_t i = 0; i < m_aLines.size(); ++i ) +for ( ListBoxLines::size_type i = 0; i < m_aLines.size(); ++i ) m_aOutOfDateLines.insert( i ); // repaint @@ -548,7 +548,7 @@ namespace pcr } -void OBrowserListBox::PositionLine( sal_uInt16 _nIndex ) +void OBrowserListBox::PositionLine( ListBoxLines::size_type _nIndex ) { Size aSize(m_aLinesPlayground->GetOutputSizePixel()); Point aPos(0, m_nYOffset); @@ -573,14 +573,11 @@ namespace pcr void OBrowserListBox::UpdatePosNSize() { -for ( std::set< sal_uInt16 >::const_iterator aLoop = m_aOutOfDateLines.begin(); -aLoop != m_aOutOfDateLines.end(); -++aLoop - ) +for ( auto const & aLoop: m_aOutOfDateLines ) { -DBG_ASSERT( *aLoop < m_aLines.size(), "OBrowserListBox::UpdatePosNSize: invalid line index!" ); -if ( *aLoop < m_aLines.size() ) -PositionLine( *aLoop ); +DBG_ASSERT( aLoop < m_aLines.size(), "OBrowserListBox::UpdatePosNSize: invalid line index!" ); +if ( aLoop < m_aLines.size() ) +PositionLine( aLoop ); } m_aOutOfDateLines.clear(); } @@ -591,13 +588,13 @@ namespace pcr sal_Int32 nThumbPos = m_aVScroll->GetThumbPos(); sal_Int32 nLines = CalcVisibleLines(); -sal_uInt16 nEnd = (sal_uInt16)(nThumbPos + nLines); +ListBoxLines::size_type nEnd = nThumbPos + nLines; if (nEnd >= m_aLines.size()) -nEnd = (sal_uInt16)m_aLines.size()-1; +nEnd = m_aLines.size()-1; if ( !m_aLines.empty() ) { -for ( sal_uInt16 i = (sal_uInt16)nThumbPos; i <= nEnd; ++i ) +for ( ListBoxLines::size_type i = nThumbPos; i <= nEnd; ++i ) m_aOutOfDateLines.insert( i ); UpdatePosNSize(); } @@ -708,10 +705,10 @@ namespace pcr OSL_ENSURE( it == m_aLines.end(), "OBrowserListBox::InsertEntry: already have another line for this name!" ); ListBoxLine aNewLine( _rPropertyData.sName, pBrowserLine, _rPropertyData.xPropertyHandler ); -sal_uInt16 nInsertPos = _nPos; +ListBoxLines::size_type nInsertPos = _nPos; if ( _nPos >= m_aLines.size() ) { -nInsertPos = static_cast< sal_uInt16 >( m_aLines.size() ); +nInsertPos = m_aLines.size(); m_aLines.push_back( aNewLine ); } else @@ -728,7 +725,7 @@ namespace pcr ChangeEntry(_rPropertyData, nInsertPos); // update the positions of possibly affected lines -sal_uInt16 nUpdatePos = nInsertPos; +ListBoxLines::size_type nUpdatePos = nInsertPos; while ( nUpdatePos < m_aLines.size() ) m_aOutOfDateLines.insert( nUpdatePos++ ); UpdatePosNSize( ); @@ -790,7 +787,7 @@ namespace pcr m_nYOffset = -m_aVScroll->GetThumbPos() * m_nRowHeight; sal_Int32 nLines = CalcVisibleLines(); -sal_uInt16 nEnd = (sal_uInt16)(nThumbPos + nLines); +ListBoxLines::size_type nEnd = nThumbPos + nLines; m_aLinesPlayground->Scroll(0, -nDelta * m_nRowHeight, ScrollFlags::Children); @@ -802,7 +799,7 @@ namespace pcr } else if (-1 == nDelta) { -PositionLine((sal_uInt16)nThumbPos); +PositionLine(nThumbPos); } else if (0 != nDelta) { @@ -827,7 +824,7 @@ namespace pcr sal_Int32 nDelta = m_aVScroll->GetDelta(); m_nYOffset = -nThumbPos * m_nRowHeight; -sal_uInt16 nEnd = (sal_uInt16)(nThumbPos + CalcVisibleLines()); +ListBoxLines::size_type nEnd = nThumbPos + CalcVisibleLines(); m_aLinesPlayground->Scroll(0, -nDelta * m_nRowHeight, ScrollFlags::Children); @@ -838,7 +835,7 @@ namespace pcr } else if (nDelta==-1) { -PositionLine((sal_uInt16)nThumbPos); +PositionLine(nThumbPos); } else if (nDelta!=0 || m_aVScroll->GetType() == ScrollType::DontKnow) { @@ -10
[Libreoffice-commits] core.git: uitest/libreoffice
uitest/libreoffice/connection.py |6 -- 1 file changed, 6 deletions(-) New commits: commit 1ee316deb13a066b66dcc13e4aa7fbab87b4d9e5 Author: Markus Mohrhard Date: Mon Feb 27 00:46:50 2017 +0100 uitest: remove old test methods Change-Id: I29296c90811f9a910c505a9dcd4db7f13a6130b8 Reviewed-on: https://gerrit.libreoffice.org/34664 Tested-by: Jenkins Reviewed-by: Markus Mohrhard diff --git a/uitest/libreoffice/connection.py b/uitest/libreoffice/connection.py index 64f1dd9..94dd9fd 100644 --- a/uitest/libreoffice/connection.py +++ b/uitest/libreoffice/connection.py @@ -153,12 +153,6 @@ class PersistentConnection: conn.setUp() self.connection = conn -def preTest(self): -assert(self.connection) - -def postTest(self): -assert(self.connection) - def tearDown(self): if self.connection: try: ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: 2 commits - uitest/libreoffice
uitest/libreoffice/connection.py | 40 +++ 1 file changed, 36 insertions(+), 4 deletions(-) New commits: commit 2b0748ed1fb727cb52b5c9e423b00242d155d099 Author: Markus Mohrhard Date: Mon Feb 27 03:17:39 2017 +0100 uitest: increase the shutdown timeout Seems that under really high load 5 seconds is not enough. Change-Id: Ia0b2f7ff7bf469d188c9ceea0edc7f1d2d4002d3 Reviewed-on: https://gerrit.libreoffice.org/34666 Reviewed-by: Markus Mohrhard Tested-by: Markus Mohrhard diff --git a/uitest/libreoffice/connection.py b/uitest/libreoffice/connection.py index a2fbc20..33e93858 100644 --- a/uitest/libreoffice/connection.py +++ b/uitest/libreoffice/connection.py @@ -128,7 +128,7 @@ class OfficeConnection: DEFAULT_SLEEP = 0.1 time_ = 0 -while time_ < 5: +while time_ < 30: time_ += DEFAULT_SLEEP ret_attr = self.soffice.poll() if ret_attr is not None: commit 1ef6bf449b973962e9d9c359461107346499fb27 Author: Markus Mohrhard Date: Mon Feb 27 00:48:05 2017 +0100 uitest: document methods and pep8 fixes Change-Id: I90af25c89cb33d5dc75f73a3b4918605d47474f1 Reviewed-on: https://gerrit.libreoffice.org/34665 Tested-by: Jenkins Reviewed-by: Markus Mohrhard diff --git a/uitest/libreoffice/connection.py b/uitest/libreoffice/connection.py index 94dd9fd..a2fbc20 100644 --- a/uitest/libreoffice/connection.py +++ b/uitest/libreoffice/connection.py @@ -32,6 +32,11 @@ class OfficeConnection: self.pro = None def setUp(self): +""" Create a new connection to a LibreOffice process + +If the connection method is path the instance will be created as a +new subprocess. If the connection method is connect the instance tries +to connect to an existing instance with the specified socket string """ (method, sep, rest) = self.args["--soffice"].partition(":") if sep != ":": raise Exception("soffice parameter does not specify method") @@ -48,9 +53,18 @@ class OfficeConnection: socket = rest else: raise Exception("unsupported connection method: " + method) + +# connect to the soffice instance self.xContext = self.connect(socket) def bootstrap(self, soffice, userdir, socket): +""" Creates a new LibreOffice process + +@param soffice Path to the soffice installation +@param userdir Directory of the user profile, only one process per user + profile is possible +@param socket The socket string used for the PyUNO connection """ + argv = [soffice, "--accept=" + socket + ";urp", "-env:UserInstallation=" + userdir, "--quickstart=no", "--nofirststartwizard", @@ -69,6 +83,7 @@ class OfficeConnection: return self.pro def connect(self, socket): +""" Tries to connect to the LibreOffice instance through the specified socket""" xLocalContext = uno.getComponentContext() xUnoResolver = xLocalContext.ServiceManager.createInstanceWithContext( "com.sun.star.bridge.UnoUrlResolver", xLocalContext) @@ -86,6 +101,13 @@ class OfficeConnection: time.sleep(1) def tearDown(self): +"""Terminate a LibreOffice instance created with the path connection method. + +First tries to terminate the soffice instance through the normal +XDesktop::terminate method and waits for about 30 seconds before +considering this attempt failed. After the 30 seconds the subprocess +is terminated """ + if self.soffice: if self.xContext: try: @@ -97,10 +119,10 @@ class OfficeConnection: print("...done") except pyuno.getClass("com.sun.star.beans.UnknownPropertyException"): print("caught UnknownPropertyException while TearDown") -pass # ignore, also means disposed +pass # ignore, also means disposed except pyuno.getClass("com.sun.star.lang.DisposedException"): print("caught DisposedException while TearDown") -pass # ignore +pass # ignore else: self.soffice.terminate() @@ -145,10 +167,17 @@ class PersistentConnection: self.connection = None def getContext(self): +""" Returns the XContext corresponding to the LibreOffice instance + +This is the starting point for any PyUNO access to the LibreOffice +instance.""" return self.connection.xContext def setUp(self): -assert(not self.connection) +# don't create two connections +if self.connection: +return + conn = OfficeConnection(self.args) c
[Libreoffice-commits] core.git: sc/Module_sc.mk sc/qa sc/UITest_conditional_format.mk uitest/calc_tests
sc/Module_sc.mk |4 + sc/UITest_conditional_format.mk | 15 sc/qa/uitest/conditional_format/tdf105411.py | 35 ++ sc/qa/uitest/conditional_format/tdf105466.py | 31 + sc/qa/uitest/conditional_format/tdf96453.py | 89 +++ uitest/calc_tests/tdf105411.py | 35 -- uitest/calc_tests/tdf105466.py | 31 - uitest/calc_tests/tdf96453.py| 89 --- 8 files changed, 174 insertions(+), 155 deletions(-) New commits: commit c873f8d75a2a4bc28a13553755c6d38b0e026e11 Author: Markus Mohrhard Date: Sun Feb 19 23:56:13 2017 +0100 uitest: move all the conditional format tests into an own test Change-Id: I5673341b05c8352bc1d46f1483c265ccdc6a1cc5 Reviewed-on: https://gerrit.libreoffice.org/34667 Tested-by: Jenkins Reviewed-by: Markus Mohrhard diff --git a/sc/Module_sc.mk b/sc/Module_sc.mk index 0ff41df..274e3e5 100644 --- a/sc/Module_sc.mk +++ b/sc/Module_sc.mk @@ -137,4 +137,8 @@ $(eval $(call gb_Module_add_screenshot_targets,sc,\ CppunitTest_sc_screenshots \ )) +$(eval $(call gb_Module_add_uicheck_targets,sc,\ + UITest_conditional_format \ +)) + # vim: set noet sw=4 ts=4: diff --git a/sc/UITest_conditional_format.mk b/sc/UITest_conditional_format.mk new file mode 100644 index 000..4bc05b0 --- /dev/null +++ b/sc/UITest_conditional_format.mk @@ -0,0 +1,15 @@ +# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*- +# +# This file is part of the LibreOffice project. +# +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. +# + +$(eval $(call gb_UITest_UITest,conditional_format)) + +$(eval $(call gb_UITest_add_modules,conditional_format,$(SRCDIR)/sc/qa/uitest,\ + conditional_format/ \ +)) +# vim: set noet sw=4 ts=4: diff --git a/sc/qa/uitest/__init__.py b/sc/qa/uitest/__init__.py new file mode 100644 index 000..e69de29 diff --git a/sc/qa/uitest/conditional_format/__init__.py b/sc/qa/uitest/conditional_format/__init__.py new file mode 100644 index 000..e69de29 diff --git a/uitest/calc_tests/tdf105411.py b/sc/qa/uitest/conditional_format/tdf105411.py similarity index 100% rename from uitest/calc_tests/tdf105411.py rename to sc/qa/uitest/conditional_format/tdf105411.py diff --git a/uitest/calc_tests/tdf105466.py b/sc/qa/uitest/conditional_format/tdf105466.py similarity index 100% rename from uitest/calc_tests/tdf105466.py rename to sc/qa/uitest/conditional_format/tdf105466.py diff --git a/uitest/calc_tests/tdf96453.py b/sc/qa/uitest/conditional_format/tdf96453.py similarity index 100% rename from uitest/calc_tests/tdf96453.py rename to sc/qa/uitest/conditional_format/tdf96453.py ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: 2 commits - include/vcl offapi/com uitest/impress_tests vcl/source
include/vcl/uitest/uitest.hxx |2 ++ offapi/com/sun/star/ui/test/XUITest.idl |2 ++ uitest/impress_tests/drawinglayer.py|4 vcl/source/uitest/uitest.cxx| 10 ++ vcl/source/uitest/uno/uitest_uno.cxx|8 5 files changed, 22 insertions(+), 4 deletions(-) New commits: commit aa10a19c8e56a51654bcb26f718f6e7187159c72 Author: Markus Mohrhard Date: Mon Feb 27 04:04:26 2017 +0100 uitest: add a specific method for executing dialogs This allows us to split the parts that need to run async and the ones that can run synchronous. This will reduce the number of signals that we need. Change-Id: I9c9f3df3422cc66d28d66e0638e212b39c743e33 Reviewed-on: https://gerrit.libreoffice.org/34669 Tested-by: Jenkins Reviewed-by: Markus Mohrhard diff --git a/include/vcl/uitest/uitest.hxx b/include/vcl/uitest/uitest.hxx index 9f226b8..53a0490 100644 --- a/include/vcl/uitest/uitest.hxx +++ b/include/vcl/uitest/uitest.hxx @@ -21,6 +21,8 @@ public: static void executeCommand(const OUString& rCommand); +static void executeDialog(const OUString& rCommand); + static std::unique_ptr getFocusTopWindow(); }; diff --git a/offapi/com/sun/star/ui/test/XUITest.idl b/offapi/com/sun/star/ui/test/XUITest.idl index 87a0912..89da44c 100644 --- a/offapi/com/sun/star/ui/test/XUITest.idl +++ b/offapi/com/sun/star/ui/test/XUITest.idl @@ -18,6 +18,8 @@ interface XUITest { void executeCommand([in] string command); +void executeDialog([in] string command); + XUIObject getTopFocusWindow(); }; diff --git a/vcl/source/uitest/uitest.cxx b/vcl/source/uitest/uitest.cxx index d876479..4484975 100644 --- a/vcl/source/uitest/uitest.cxx +++ b/vcl/source/uitest/uitest.cxx @@ -26,6 +26,16 @@ void UITest::executeCommand(const OUString& rCommand) SAL_WARN_IF(!bSuccess, "vcl.uitest", "failed to execute command: " << rCommand); } +void UITest::executeDialog(const OUString& rCommand) +{ +bool bSuccess = comphelper::dispatchCommand( +rCommand, +{{"SynchronMode", -1, css::uno::Any(false), + css::beans::PropertyState_DIRECT_VALUE}}); + +SAL_WARN_IF(!bSuccess, "vcl.uitest", "failed to execute dialog command: " << rCommand); +} + std::unique_ptr UITest::getFocusTopWindow() { ImplSVData* pSVData = ImplGetSVData(); diff --git a/vcl/source/uitest/uno/uitest_uno.cxx b/vcl/source/uitest/uno/uitest_uno.cxx index aad296e..c5a15a4 100644 --- a/vcl/source/uitest/uno/uitest_uno.cxx +++ b/vcl/source/uitest/uno/uitest_uno.cxx @@ -40,6 +40,8 @@ public: void SAL_CALL executeCommand(const OUString& rCommand) override; +void SAL_CALL executeDialog(const OUString& rCommand) override; + css::uno::Reference SAL_CALL getTopFocusWindow() override; OUString SAL_CALL getImplementationName() override; @@ -61,6 +63,12 @@ void SAL_CALL UITestUnoObj::executeCommand(const OUString& rCommand) UITest::executeCommand(rCommand); } +void SAL_CALL UITestUnoObj::executeDialog(const OUString& rCommand) +{ +SolarMutexGuard aGuard; +UITest::executeDialog(rCommand); +} + css::uno::Reference SAL_CALL UITestUnoObj::getTopFocusWindow() { SolarMutexGuard aGuard; commit 2a285790535c0ae4c2d791c8f8c44038203d82b7 Author: Markus Mohrhard Date: Mon Feb 27 04:02:48 2017 +0100 uitest: remove old debug sleep statements Change-Id: I3ee755325cbf506b785b962c06c777ca45c025d3 Reviewed-on: https://gerrit.libreoffice.org/34668 Tested-by: Jenkins Reviewed-by: Markus Mohrhard diff --git a/uitest/impress_tests/drawinglayer.py b/uitest/impress_tests/drawinglayer.py index 0c7a254..d6a8920 100644 --- a/uitest/impress_tests/drawinglayer.py +++ b/uitest/impress_tests/drawinglayer.py @@ -30,8 +30,6 @@ class ImpressDrawinglayerTest(UITestCase): print(get_state_as_dict(xDrawinglayerObject)) xDrawinglayerObject.executeAction("MOVE", mkPropertyValues({"X": "1000", "Y":"1000"})) -time.sleep(10) - self.ui_test.close_doc() def test_resize_object(self): @@ -49,8 +47,6 @@ class ImpressDrawinglayerTest(UITestCase): print(get_state_as_dict(xDrawinglayerObject)) xDrawinglayerObject.executeAction("RESIZE", mkPropertyValues({"X": "500", "Y":"4000", "FRAC_X": "0.5", "FRAC_Y": "0.5"})) -time.sleep(5) - self.ui_test.close_doc() # vim: set shiftwidth=4 softtabstop=4 expandtab: ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: uitest/uitest
uitest/uitest/test.py |6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) New commits: commit c9326537872e1f6b90a418ee2d7c7ffcf27b9c43 Author: Markus Mohrhard Date: Mon Feb 27 04:05:59 2017 +0100 uitest: use the new dialog method in the python code Change-Id: I252310bc453450236b5b7de0ef292cfbba7ea64a Reviewed-on: https://gerrit.libreoffice.org/34670 Tested-by: Jenkins Reviewed-by: Markus Mohrhard diff --git a/uitest/uitest/test.py b/uitest/uitest/test.py index 3122329..2de8b31 100644 --- a/uitest/uitest/test.py +++ b/uitest/uitest/test.py @@ -66,7 +66,7 @@ class UITest(object): def execute_dialog_through_command(self, command): with EventListener(self._xContext, "DialogExecute") as event: -self._xUITest.executeCommand(command) +self._xUITest.executeDialog(command) time_ = 0 while time_ < 30: if event.executed: @@ -138,13 +138,13 @@ class UITest(object): def close_doc(self): with EventListener(self._xContext, ["DialogExecute", "OnViewClosed"] ) as event: -self._xUITest.executeCommand(".uno:CloseDoc") +self._xUITest.executeDialog(".uno:CloseDoc") time_ = 0 while time_ < 30: if event.hasExecuted("DialogExecute"): xCloseDlg = self._xUITest.getTopFocusWindow() xNoBtn = xCloseDlg.getChild("discard") -self.close_dialog_through_button(xNoBtn); +xNoBtn.executeAction("CLICK", tuple()) return elif event.hasExecuted("OnViewClosed"): return ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: uitest/uitest
uitest/uitest/test.py | 23 ++- 1 file changed, 22 insertions(+), 1 deletion(-) New commits: commit 48c8675b030ec597f3f7430963841901dbececff Author: Markus Mohrhard Date: Mon Feb 27 04:07:01 2017 +0100 uitest: handle crash reporter dialog correctly during start-up Change-Id: I1db54ad2ad38642ac84211fd6d6505e171fc4423 Reviewed-on: https://gerrit.libreoffice.org/34671 Tested-by: Jenkins Reviewed-by: Markus Mohrhard diff --git a/uitest/uitest/test.py b/uitest/uitest/test.py index 2de8b31..e171492 100644 --- a/uitest/uitest/test.py +++ b/uitest/uitest/test.py @@ -8,6 +8,9 @@ import time import threading from uitest.config import DEFAULT_SLEEP +from uitest.uihelper.common import get_state_as_dict + +from com.sun.star.uno import RuntimeException from libreoffice.uno.eventlistener import EventListener @@ -105,9 +108,27 @@ class UITest(object): time.sleep(DEFAULT_SLEEP) raise DialogNotExecutedException(action) +def _handle_crash_reporter(self): +xCrashReportDlg = self._xUITest.getTopFocusWindow() +state = get_state_as_dict(xCrashReportDlg) +print(state) +if state['ID'] == "CrashReportDialog": +print("found a crash reporter") +xCancelBtn = xCrashReportDlg.getChild("btn_cancel") +self.close_dialog_through_button(xCancelBtn) +else: +raise RuntimeException("not a crashreporter") + def create_doc_in_start_center(self, app): xStartCenter = self._xUITest.getTopFocusWindow() -xBtn = xStartCenter.getChild(app + "_all") +try: +xBtn = xStartCenter.getChild(app + "_all") +except RuntimeException: +print("Handled crash reporter") +self._handle_crash_reporter() +xStartCenter = self._xUITest.getTopFocusWindow() +xBtn = xStartCenter.getChild(app + "_all") + with EventListener(self._xContext, "OnNew") as event: xBtn.executeAction("CLICK", tuple()) time_ = 0 ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: 2 commits - uitest/writer_tests vcl/source
uitest/writer_tests/tdf79236.py |2 +- vcl/source/uitest/uitest.cxx|2 +- 2 files changed, 2 insertions(+), 2 deletions(-) New commits: commit 418a0aec0074749e30071c5ac735829acb15134e Author: Markus Mohrhard Date: Mon Feb 27 04:10:03 2017 +0100 uitest: execute commands in synchronous mode Change-Id: I88ccbc63a02a8a873419874d220b94cf23c46e88 Reviewed-on: https://gerrit.libreoffice.org/34673 Tested-by: Jenkins Reviewed-by: Markus Mohrhard diff --git a/vcl/source/uitest/uitest.cxx b/vcl/source/uitest/uitest.cxx index 4484975..4132018 100644 --- a/vcl/source/uitest/uitest.cxx +++ b/vcl/source/uitest/uitest.cxx @@ -20,7 +20,7 @@ void UITest::executeCommand(const OUString& rCommand) { bool bSuccess = comphelper::dispatchCommand( rCommand, -{{"SynchronMode", -1, css::uno::Any(false), +{{"SynchronMode", -1, css::uno::Any(true), css::beans::PropertyState_DIRECT_VALUE}}); SAL_WARN_IF(!bSuccess, "vcl.uitest", "failed to execute command: " << rCommand); commit 42122e1e59718bec549e63f4b073aa1821182d71 Author: Markus Mohrhard Date: Mon Feb 27 04:09:10 2017 +0100 uitest: use correct method to close a dialog Change-Id: Ib62cc9465bb874d48b4e294a6f18d98de04a5518 Reviewed-on: https://gerrit.libreoffice.org/34672 Tested-by: Jenkins Reviewed-by: Markus Mohrhard diff --git a/uitest/writer_tests/tdf79236.py b/uitest/writer_tests/tdf79236.py index 10e9b74..8585e48 100644 --- a/uitest/writer_tests/tdf79236.py +++ b/uitest/writer_tests/tdf79236.py @@ -93,7 +93,7 @@ class tdf79236(UITestCase): xTopSpnBtn.executeAction("DOWN", tuple()) xOkBtn = xParagraphDlg.getChild("ok") -xOkBtn.executeAction("CLICK", tuple()) +self.ui_test.close_dialog_through_button(xOkBtn) self.assertEqual(document.CurrentSelection.getByIndex(0).ParaLeftMargin, 0) self.assertEqual(document.CurrentSelection.getByIndex(0).ParaRightMargin, 0) ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
Re: how to check if my local copy of translations is really up-to-date?
Le 26/02/2017 à 22:18, jbfa...@libreoffice.org a écrit : [...] I did that to check that the string is translated in Pootle and that the translation is in the po files in my local copy. Argh! I searched the string in Pootle, not the keyID. And surprinsingly, these tooltips and the contextual menu do not show their keyID in the UI. A priori that is a bug too. For the tooltip "Zoom level. Right-click to change zoom level or click to open Zoom dialog.", the keyID is FMUcP. Best regards. JBF -- Seuls des formats ouverts peuvent assurer la pérennité de vos documents. Disclaimer: my Internet Provider being located in France, each of our exchanges over Internet will be scanned by French spying services. ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice
[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-5.1' - 14 commits - basctl/source configure.ac filter/source forms/source hwpfilter/source sc/source svl/source svx/source sw/source vcl/sou
basctl/source/basicide/moduldlg.cxx |4 - configure.ac|2 filter/source/graphicfilter/itiff/itiff.cxx | 20 +++-- forms/source/misc/InterfaceContainer.cxx| 16 ++-- hwpfilter/source/hiodev.cxx |8 +- sc/source/core/data/dpoutput.cxx| 112 +--- sc/source/ui/navipi/navipi.cxx | 28 +-- svl/source/numbers/zformat.cxx | 11 ++ svx/source/accessibility/charmapacc.cxx | 29 --- svx/source/inc/charmapacc.hxx |1 sw/source/filter/ww8/ww8graf2.cxx | 27 +- sw/source/uibase/docvw/PostItMgr.cxx|2 vcl/source/window/dialog.cxx|2 vcl/source/window/menu.cxx |2 14 files changed, 178 insertions(+), 86 deletions(-) New commits: commit 496438dbe45c4ef94c57a6bbc1d4fa286182efee Author: Andras Timar Date: Mon Feb 27 11:25:40 2017 +0100 Bump version to 5.1-20 Change-Id: I0d8c1307cd17871da3c23a2a5092b2c6fe2a820a diff --git a/configure.ac b/configure.ac index a9ff02b..b1b6ee0 100644 --- a/configure.ac +++ b/configure.ac @@ -9,7 +9,7 @@ dnl in order to create a configure script. # several non-alphanumeric characters, those are split off and used only for the # ABOUTBOXPRODUCTVERSIONSUFFIX in openoffice.lst. Why that is necessary, no idea. -AC_INIT([Collabora Office],[5.1.10.19],[],[],[https://collaboraoffice.com/]) +AC_INIT([Collabora Office],[5.1.10.20],[],[],[https://collaboraoffice.com/]) AC_PREREQ([2.59]) commit ae9a093683fc5176a0b6dfd848bcd2901a45b601 Author: Noel Grandin Date: Fri Feb 24 11:24:46 2017 +0200 better fix for tdf#103830 the first fix in commit 3a404ea870f1eed86f9765447ce0a364d39ae8f8 did not take into account that this a multimap, not a map. Thanks to Aron Budea for spotting that. Change-Id: I86d2d2a9d6cb08fd3cee3965a5b787d5691f0352 Reviewed-on: https://gerrit.libreoffice.org/34604 Tested-by: Jenkins Reviewed-by: Noel Grandin (cherry picked from commit e146741ec96292ef092c6eebfd7fe18fa5ca3cc0) Reviewed-on: https://gerrit.libreoffice.org/34606 (cherry picked from commit 46885644fe87a6e9f86a79b7fd1eafbe3ea0e5a6) Reviewed-on: https://gerrit.libreoffice.org/34611 (cherry picked from commit 1f3ce5a00b2a85374204f3f05433d3cfd3292fe7) diff --git a/forms/source/misc/InterfaceContainer.cxx b/forms/source/misc/InterfaceContainer.cxx index 383030b..2a679be 100644 --- a/forms/source/misc/InterfaceContainer.cxx +++ b/forms/source/misc/InterfaceContainer.cxx @@ -679,13 +679,15 @@ throw (css::uno::RuntimeException, std::exception) { if (evt.PropertyName == PROPERTY_NAME) { ::osl::MutexGuard aGuard( m_rMutex ); -OInterfaceMap::iterator i = m_aMap.find(::comphelper::getString(evt.OldValue)); -if (i != m_aMap.end() && i->second == evt.Source) -{ -css::uno::Reference xCorrectType(i->second); -m_aMap.erase(i); -m_aMap.insert(::std::pair >(::comphelper::getString(evt.NewValue),xCorrectType)); -} +auto range = m_aMap.equal_range(::comphelper::getString(evt.OldValue)); +for (auto it = range.first; it != range.second; ++it) +if (it->second == evt.Source) +{ +css::uno::Reference xCorrectType(it->second); +m_aMap.erase(it); +m_aMap.insert(::std::pair >(::comphelper::getString(evt.NewValue),xCorrectType)); +break; +} } } commit 3196278cb0dba5d6cee22ffac86d00c6e96949c0 Author: Caolán McNamara Date: Thu Feb 23 12:17:33 2017 + ofz: don't loop endlessly on failed skip (cherry picked from commit a438651d2b94f14a2a0e54024f69280917df37b5) Change-Id: Ibc105d8156e1b1ddf22948fb02165f8d03b4cfd5 Reviewed-on: https://gerrit.libreoffice.org/34608 Tested-by: Jenkins Reviewed-by: Michael Stahl (cherry picked from commit 0215845ddae1d0bb060a44d2cac0cf0f723024a5) diff --git a/hwpfilter/source/hiodev.cxx b/hwpfilter/source/hiodev.cxx index b6195f0..74936b2 100644 --- a/hwpfilter/source/hiodev.cxx +++ b/hwpfilter/source/hiodev.cxx @@ -248,8 +248,12 @@ int HStreamIODev::skipBlock(int size) else{ int remain = size; while(remain){ - if( remain > BUFSIZE ) - remain -= GZREAD(rBuf, BUFSIZE); + if( remain > BUFSIZE ) { + int read = GZREAD(rBuf, BUFSIZE); + remain -= read; + if (read != BUFSIZE) + break; + } else{ remain -= GZREAD(rBuf, remain); break; commit 39bd07d63f9ca3a0bcff96051dd234e9fe6af381 Author: Noel Grandin Date: Fri Feb 24 09:28:19 2
[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-5.3' - 2 commits - distro-configs/CPWin32.conf distro-configs/CPWin32-MPL.conf instsetoo_native/util
distro-configs/CPWin32-MPL.conf |1 - distro-configs/CPWin32.conf |1 - instsetoo_native/util/openoffice.lst.in |2 +- 3 files changed, 1 insertion(+), 3 deletions(-) New commits: commit 9952fedd1d2ec196ef8ddb59817101b833e70ec4 Author: Andras Timar Date: Mon Feb 27 02:49:33 2017 -0800 remove obsoleted option from CP configs Change-Id: I3c50f07053420b799db491ad828b819fdd2a64de diff --git a/distro-configs/CPWin32-MPL.conf b/distro-configs/CPWin32-MPL.conf index 6accaed..60cd5d9 100644 --- a/distro-configs/CPWin32-MPL.conf +++ b/distro-configs/CPWin32-MPL.conf @@ -4,7 +4,6 @@ --with-theme=tango --without-help --with-myspell-dicts ---without-system-mesa-headers --without-system-postgresql --without-junit --without-helppack-integration diff --git a/distro-configs/CPWin32.conf b/distro-configs/CPWin32.conf index de46331..e8bd314 100644 --- a/distro-configs/CPWin32.conf +++ b/distro-configs/CPWin32.conf @@ -1,6 +1,5 @@ --with-vendor=Collabora --with-branding=icon-themes/galaxy/brand_cp ---without-system-mesa-headers --without-system-postgresql --without-junit --without-helppack-integration commit a0196536857cae8000b9b17856090f87a65556b8 Author: Andras Timar Date: Mon Feb 27 02:49:01 2017 -0800 s/LibreOffice/CollaboraOffice/ Change-Id: I25537b15a806cd904f0d436d7144c59d66f13632 diff --git a/instsetoo_native/util/openoffice.lst.in b/instsetoo_native/util/openoffice.lst.in index b858b29..77343f3 100644 --- a/instsetoo_native/util/openoffice.lst.in +++ b/instsetoo_native/util/openoffice.lst.in @@ -39,7 +39,7 @@ Globals } } -LibreOffice +CollaboraOffice { Settings { ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: sw/inc sw/source
sw/inc/fmtcol.hxx |2 +- sw/source/core/docnode/node.cxx |2 +- sw/source/filter/xml/xmlfmt.cxx |2 +- sw/source/uibase/chrdlg/ccoll.cxx |2 +- 4 files changed, 4 insertions(+), 4 deletions(-) New commits: commit b06a7b1298537d2b0e4ea9adb32f262af357ecf1 Author: Gulsah Kose Date: Sun Feb 26 15:54:50 2017 +0300 Fix typo footenote -> footnote Change-Id: Iee166416aaca627e55f25a25ed69f468fa2e510d Signed-off-by: Gulsah Kose Reviewed-on: https://gerrit.libreoffice.org/34653 Tested-by: Jenkins Reviewed-by: Julien Nabet diff --git a/sw/inc/fmtcol.hxx b/sw/inc/fmtcol.hxx index da39308..1f707cd 100644 --- a/sw/inc/fmtcol.hxx +++ b/sw/inc/fmtcol.hxx @@ -164,7 +164,7 @@ enum class Master_CollCondition PARA_IN_TABLEHEAD, PARA_IN_TABLEBODY, PARA_IN_SECTION, -PARA_IN_FOOTENOTE, +PARA_IN_FOOTNOTE, PARA_IN_FOOTER, PARA_IN_HEADER, PARA_IN_ENDNOTE diff --git a/sw/source/core/docnode/node.cxx b/sw/source/core/docnode/node.cxx index 31a68ef..758a7c4 100644 --- a/sw/source/core/docnode/node.cxx +++ b/sw/source/core/docnode/node.cxx @@ -1836,7 +1836,7 @@ bool SwContentNode::IsAnyCondition( SwCollCondition& rTmp ) const case SwFlyStartNode:nCond = Master_CollCondition::PARA_IN_FRAME; break; case SwFootnoteStartNode: { -nCond = Master_CollCondition::PARA_IN_FOOTENOTE; +nCond = Master_CollCondition::PARA_IN_FOOTNOTE; const SwFootnoteIdxs& rFootnoteArr = rNds.GetDoc()->GetFootnoteIdxs(); const SwTextFootnote* pTextFootnote; const SwNode* pSrchNd = pSttNd; diff --git a/sw/source/filter/xml/xmlfmt.cxx b/sw/source/filter/xml/xmlfmt.cxx index fdcd4e4..685e7bc 100644 --- a/sw/source/filter/xml/xmlfmt.cxx +++ b/sw/source/filter/xml/xmlfmt.cxx @@ -156,7 +156,7 @@ SwXMLConditionParser_Impl::SwXMLConditionParser_Impl( const OUString& rInp ) : else if( IsXMLToken( sFunc, XML_FOOTER ) && !bHasSub ) nCondition = Master_CollCondition::PARA_IN_FOOTER; else if( IsXMLToken( sFunc, XML_FOOTNOTE ) && !bHasSub ) -nCondition = Master_CollCondition::PARA_IN_FOOTENOTE; +nCondition = Master_CollCondition::PARA_IN_FOOTNOTE; else if( IsXMLToken( sFunc, XML_HEADER ) && !bHasSub ) nCondition = Master_CollCondition::PARA_IN_HEADER; else if( IsXMLToken( sFunc, XML_LIST_LEVEL) && diff --git a/sw/source/uibase/chrdlg/ccoll.cxx b/sw/source/uibase/chrdlg/ccoll.cxx index f2ab69e..cad9eaf 100644 --- a/sw/source/uibase/chrdlg/ccoll.cxx +++ b/sw/source/uibase/chrdlg/ccoll.cxx @@ -103,7 +103,7 @@ const CommandStruct SwCondCollItem::aCmds[] = { Master_CollCondition::PARA_IN_TABLEBODY,0 }, { Master_CollCondition::PARA_IN_FRAME,0 }, { Master_CollCondition::PARA_IN_SECTION, 0 }, -{ Master_CollCondition::PARA_IN_FOOTENOTE,0 }, +{ Master_CollCondition::PARA_IN_FOOTNOTE, 0 }, { Master_CollCondition::PARA_IN_ENDNOTE, 0 }, { Master_CollCondition::PARA_IN_HEADER, 0 }, { Master_CollCondition::PARA_IN_FOOTER, 0 }, ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: sw/qa
sw/qa/python/check_fields.py |9 + sw/qa/python/check_index.py|9 + sw/qa/python/check_table.py|9 + sw/qa/python/get_expression.py |9 + sw/qa/python/set_expression.py |9 + sw/qa/python/var_fields.py |9 + 6 files changed, 54 insertions(+) New commits: commit 30a76153fce5fdf578f408828651faab351e5b18 Author: Bjoern Michaelsen Date: Thu Feb 23 15:25:13 2017 +0100 add missing modeline etc. boilerplate Change-Id: I32782945c46762f1fd4edde7453f7fca200c9cd2 Reviewed-on: https://gerrit.libreoffice.org/34662 Reviewed-by: Björn Michaelsen Tested-by: Björn Michaelsen diff --git a/sw/qa/python/check_fields.py b/sw/qa/python/check_fields.py index 257be61..ff02ec0 100644 --- a/sw/qa/python/check_fields.py +++ b/sw/qa/python/check_fields.py @@ -1,3 +1,12 @@ +#! /usr/bin/env python +# -*- tab-width: 4; indent-tabs-mode: nil; py-indent-offset: 4 -*- +# +# This file is part of the LibreOffice project. +# +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. +# import unittest from org.libreoffice.unotest import UnoInProcess diff --git a/sw/qa/python/check_index.py b/sw/qa/python/check_index.py index 80414f6..a39cfba 100644 --- a/sw/qa/python/check_index.py +++ b/sw/qa/python/check_index.py @@ -1,3 +1,12 @@ +#! /usr/bin/env python +# -*- tab-width: 4; indent-tabs-mode: nil; py-indent-offset: 4 -*- +# +# This file is part of the LibreOffice project. +# +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. +# import unittest import unohelper from org.libreoffice.unotest import UnoInProcess diff --git a/sw/qa/python/check_table.py b/sw/qa/python/check_table.py index 3f9f6b3..04d15ea 100644 --- a/sw/qa/python/check_table.py +++ b/sw/qa/python/check_table.py @@ -1,3 +1,12 @@ +#! /usr/bin/env python +# -*- tab-width: 4; indent-tabs-mode: nil; py-indent-offset: 4 -*- +# +# This file is part of the LibreOffice project. +# +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. +# import math import unittest from org.libreoffice.unotest import UnoInProcess diff --git a/sw/qa/python/get_expression.py b/sw/qa/python/get_expression.py index 0b2dfe8..7462db6 100644 --- a/sw/qa/python/get_expression.py +++ b/sw/qa/python/get_expression.py @@ -1,3 +1,12 @@ +#! /usr/bin/env python +# -*- tab-width: 4; indent-tabs-mode: nil; py-indent-offset: 4 -*- +# +# This file is part of the LibreOffice project. +# +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. +# import unittest from org.libreoffice.unotest import UnoInProcess diff --git a/sw/qa/python/set_expression.py b/sw/qa/python/set_expression.py index 8e42002..7bcc20d 100644 --- a/sw/qa/python/set_expression.py +++ b/sw/qa/python/set_expression.py @@ -1,3 +1,12 @@ +#! /usr/bin/env python +# -*- tab-width: 4; indent-tabs-mode: nil; py-indent-offset: 4 -*- +# +# This file is part of the LibreOffice project. +# +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. +# import unittest from org.libreoffice.unotest import UnoInProcess diff --git a/sw/qa/python/var_fields.py b/sw/qa/python/var_fields.py index 1391e42..c2af7a4 100644 --- a/sw/qa/python/var_fields.py +++ b/sw/qa/python/var_fields.py @@ -1,3 +1,12 @@ +#! /usr/bin/env python +# -*- tab-width: 4; indent-tabs-mode: nil; py-indent-offset: 4 -*- +# +# This file is part of the LibreOffice project. +# +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. +# import unittest import os from org.libreoffice.unotest import UnoInProcess ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: sw/inc sw/source
sw/inc/dcontact.hxx |3 ++- sw/source/core/draw/dcontact.cxx | 16 +++- 2 files changed, 9 insertions(+), 10 deletions(-) New commits: commit ecd77363e0c7760a9d8fd6e3e8dac8099305bb91 Author: Bjoern Michaelsen Date: Sun Feb 26 23:39:25 2017 +0100 own the SwFlyDrawObj by SwFlyDrawContact w/ unique_ptr - the code claimed this ownership before - however it still tried to do stuff in SetMaster(..), which leads to at least memory leaking, if not worse - abort there for now - SetMaster() likely needs to be removed from the base-class proper soon as not all derived classes can possible implement it. Change-Id: Id241b9330e6f98a126949a9236c60a8783cf8ea8 Reviewed-on: https://gerrit.libreoffice.org/34663 Tested-by: Jenkins Reviewed-by: Björn Michaelsen diff --git a/sw/inc/dcontact.hxx b/sw/inc/dcontact.hxx index 36f2410..e7a34d1 100644 --- a/sw/inc/dcontact.hxx +++ b/sw/inc/dcontact.hxx @@ -25,6 +25,7 @@ #include #include #include +#include #include "calbck.hxx" #include @@ -189,7 +190,7 @@ public: class SW_DLLPUBLIC SwFlyDrawContact final : public SwContact { private: -SwFlyDrawObj* mpMasterObj; +std::unique_ptr mpMasterObj; void SwClientNotify(const SwModify&, const SfxHint& rHint) override; diff --git a/sw/source/core/draw/dcontact.cxx b/sw/source/core/draw/dcontact.cxx index 178705e..5fcde7d 100644 --- a/sw/source/core/draw/dcontact.cxx +++ b/sw/source/core/draw/dcontact.cxx @@ -442,12 +442,12 @@ void SwContact::SwClientNotify(const SwModify& rMod, const SfxHint& rHint) } -SwFlyDrawContact::SwFlyDrawContact( SwFlyFrameFormat *pToRegisterIn, SdrModel * ) : -SwContact( pToRegisterIn ) +SwFlyDrawContact::SwFlyDrawContact( SwFlyFrameFormat *pToRegisterIn, SdrModel * ) +: SwContact( pToRegisterIn ) +, mpMasterObj(new SwFlyDrawObj) { // #i26791# - class contains the 'master' // drawing object of type on its own. -mpMasterObj = new SwFlyDrawObj; mpMasterObj->SetOrdNum( 0xFFFE ); mpMasterObj->SetUserCall( this ); } @@ -459,7 +459,6 @@ SwFlyDrawContact::~SwFlyDrawContact() mpMasterObj->SetUserCall( nullptr ); if ( mpMasterObj->GetPage() ) mpMasterObj->GetPage()->RemoveObject( mpMasterObj->GetOrdNum() ); -delete mpMasterObj; } } @@ -484,18 +483,17 @@ SwAnchoredObject* SwFlyDrawContact::GetAnchoredObj(SdrObject *const pSdrObj) const SdrObject* SwFlyDrawContact::GetMaster() const { -return mpMasterObj; +return mpMasterObj.get(); } SdrObject* SwFlyDrawContact::GetMaster() { -return mpMasterObj; +return mpMasterObj.get(); } -void SwFlyDrawContact::SetMaster( SdrObject* _pNewMaster ) +void SwFlyDrawContact::SetMaster( SdrObject* ) { -assert(dynamic_cast(_pNewMaster) != nullptr); -mpMasterObj = static_cast(_pNewMaster); +std::abort(); // this should never be called SwFlyDrawContact is owning its "Master" } /** ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: vcl/qa
vcl/qa/cppunit/complextext.cxx |5 - 1 file changed, 4 insertions(+), 1 deletion(-) New commits: commit 0d9a6aa1b9debc2ca4bd1cbf6d089047267575f5 Author: Khaled Hosny Date: Mon Feb 27 13:07:31 2017 +0200 Stop the spam Change-Id: I3e6297f4789bdf398e5eb2a3cec5df6e8b770b5d diff --git a/vcl/qa/cppunit/complextext.cxx b/vcl/qa/cppunit/complextext.cxx index 1cb09e0..4b0d243 100644 --- a/vcl/qa/cppunit/complextext.cxx +++ b/vcl/qa/cppunit/complextext.cxx @@ -59,9 +59,12 @@ void VclComplexTextTest::testArabic() CPPUNIT_ASSERT_EQUAL(13L, pOutDev->GetTextHeight()); // exact bounding rectangle, not essentially the same as text width/height +#if defined(MACOSX) || defined(_WIN32) +// FIXME: fails on some Linux tinderboxes, might be a FreeType issue. Rectangle aBoundRect; pOutDev->GetTextBoundRect(aBoundRect, aOneTwoThree); CPPUNIT_ASSERT_EQUAL(Rectangle(0, 1, 71, 15), aBoundRect); +#endif // normal orientation Rectangle aInput; @@ -75,7 +78,7 @@ void VclComplexTextTest::testArabic() // Check that we did do the rotation ... #if 0 -// FIXME: This seems to be wisthful thinking, GetTextRect() does not take +// FIXME: This seems to be wishful thinking, GetTextRect() does not take // rotation into account. fprintf( stderr, "%ld %ld %ld %ld\n", aRect.GetWidth(), aRect.GetHeight(), ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-5-3' - hwpfilter/qa
hwpfilter/qa/cppunit/data/fail/skipblock-1.hwp |binary hwpfilter/qa/cppunit/test_hwpfilter.cxx| 16 2 files changed, 4 insertions(+), 12 deletions(-) New commits: commit bc873190b708ae2f403be11f337fa0facaec557d Author: Caolán McNamara Date: Fri Feb 24 15:16:27 2017 + hwpfilter needs a new filter for each document setUp is called just once at the start of the sequence of loads so we're reusing the previous import state which isn't what this filter expects This reverts commit 0af436083e12516eb9251d4cc6f594f80ed06d3d. Change-Id: Iae355ed6099086fd3cc1c79203786017507d4ed4 (cherry picked from commit 3cc3dc176e00062d8395d9f3d83b49ab24542a61) Reviewed-on: https://gerrit.libreoffice.org/34619 Tested-by: Jenkins Reviewed-by: Michael Stahl diff --git a/hwpfilter/qa/cppunit/data/fail/skipblock-1.hwp b/hwpfilter/qa/cppunit/data/fail/skipblock-1.hwp new file mode 100644 index 000..8fd8e7a Binary files /dev/null and b/hwpfilter/qa/cppunit/data/fail/skipblock-1.hwp differ diff --git a/hwpfilter/qa/cppunit/test_hwpfilter.cxx b/hwpfilter/qa/cppunit/test_hwpfilter.cxx index f497d12..040c98e 100644 --- a/hwpfilter/qa/cppunit/test_hwpfilter.cxx +++ b/hwpfilter/qa/cppunit/test_hwpfilter.cxx @@ -24,7 +24,6 @@ namespace , public test::BootstrapFixture { public: -virtual void setUp() override; virtual bool load(const OUString &, const OUString &rURL, const OUString &, @@ -35,26 +34,19 @@ namespace CPPUNIT_TEST_SUITE(HwpFilterTest); CPPUNIT_TEST(test); CPPUNIT_TEST_SUITE_END(); -private: -uno::Reference m_xFilter; }; -void HwpFilterTest::setUp() -{ -test::BootstrapFixture::setUp(); - - m_xFilter.set(m_xSFactory->createInstance("com.sun.comp.hwpimport.HwpImportFilter"), - uno::UNO_QUERY_THROW); -} - bool HwpFilterTest::load(const OUString &, const OUString &rURL, const OUString &, SfxFilterFlags, SotClipboardFormatId, unsigned int) { +uno::Reference xFilter(m_xSFactory->createInstance("com.sun.comp.hwpimport.HwpImportFilter"), + uno::UNO_QUERY_THROW); + uno::Sequence< beans::PropertyValue > aDescriptor(1); aDescriptor[0].Name = "URL"; aDescriptor[0].Value <<= rURL; -return m_xFilter->filter(aDescriptor); +return xFilter->filter(aDescriptor); } void HwpFilterTest::test() ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-5-2' - hwpfilter/qa
hwpfilter/qa/cppunit/data/fail/skipblock-1.hwp |binary hwpfilter/qa/cppunit/test_hwpfilter.cxx| 16 2 files changed, 4 insertions(+), 12 deletions(-) New commits: commit ce9aecee57f8b852cbae8e4e24ee7fd2efabf44b Author: Caolán McNamara Date: Fri Feb 24 15:16:27 2017 + hwpfilter needs a new filter for each document setUp is called just once at the start of the sequence of loads so we're reusing the previous import state which isn't what this filter expects This reverts commit 0af436083e12516eb9251d4cc6f594f80ed06d3d. Change-Id: Iae355ed6099086fd3cc1c79203786017507d4ed4 (cherry picked from commit 3cc3dc176e00062d8395d9f3d83b49ab24542a61) Reviewed-on: https://gerrit.libreoffice.org/34620 Tested-by: Jenkins Reviewed-by: Michael Stahl diff --git a/hwpfilter/qa/cppunit/data/fail/skipblock-1.hwp b/hwpfilter/qa/cppunit/data/fail/skipblock-1.hwp new file mode 100644 index 000..8fd8e7a Binary files /dev/null and b/hwpfilter/qa/cppunit/data/fail/skipblock-1.hwp differ diff --git a/hwpfilter/qa/cppunit/test_hwpfilter.cxx b/hwpfilter/qa/cppunit/test_hwpfilter.cxx index f497d12..040c98e 100644 --- a/hwpfilter/qa/cppunit/test_hwpfilter.cxx +++ b/hwpfilter/qa/cppunit/test_hwpfilter.cxx @@ -24,7 +24,6 @@ namespace , public test::BootstrapFixture { public: -virtual void setUp() override; virtual bool load(const OUString &, const OUString &rURL, const OUString &, @@ -35,26 +34,19 @@ namespace CPPUNIT_TEST_SUITE(HwpFilterTest); CPPUNIT_TEST(test); CPPUNIT_TEST_SUITE_END(); -private: -uno::Reference m_xFilter; }; -void HwpFilterTest::setUp() -{ -test::BootstrapFixture::setUp(); - - m_xFilter.set(m_xSFactory->createInstance("com.sun.comp.hwpimport.HwpImportFilter"), - uno::UNO_QUERY_THROW); -} - bool HwpFilterTest::load(const OUString &, const OUString &rURL, const OUString &, SfxFilterFlags, SotClipboardFormatId, unsigned int) { +uno::Reference xFilter(m_xSFactory->createInstance("com.sun.comp.hwpimport.HwpImportFilter"), + uno::UNO_QUERY_THROW); + uno::Sequence< beans::PropertyValue > aDescriptor(1); aDescriptor[0].Name = "URL"; aDescriptor[0].Value <<= rURL; -return m_xFilter->filter(aDescriptor); +return xFilter->filter(aDescriptor); } void HwpFilterTest::test() ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] cppunit.git: cppunit.spec.in
cppunit.spec.in |8 1 file changed, 4 insertions(+), 4 deletions(-) New commits: commit b8f6a1115e2dc798b5e762f5738803a5208400c2 Author: dennisroczek Date: Sat Feb 25 21:05:24 2017 + fix typo: documention --> documentation Change-Id: I58762dfb08c6f85ccb11d0b634c738606cd6379f Reviewed-on: https://gerrit.libreoffice.org/34649 Reviewed-by: Michael Stahl Tested-by: Michael Stahl diff --git a/cppunit.spec.in b/cppunit.spec.in index 1f87e0c..c041d10 100644 --- a/cppunit.spec.in +++ b/cppunit.spec.in @@ -15,7 +15,7 @@ CppUnit is the C++ port of the famous JUnit framework for unit testing. Test output is in XML for automatic testing and GUI based for supervised tests. %package doc -Summary: HTML formatted API documention for Log for C++ +Summary: HTML formatted API documentation for Log for C++ Group: Development/Libraries Requires: %name = %version @@ -53,12 +53,12 @@ rm -rf $RPM_BUILD_ROOT %post -p /sbin/ldconfig %postun -p /sbin/ldconfig - + %files doc %doc doc/html/* %changelog -* Mon Jul 4 2005 Patrice Dumas -- update using the fedora template +* Mon Jul 4 2005 Patrice Dumas +- update using the fedora template * Sat Apr 14 2001 Bastiaan Bakker - Initial release ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-5-2' - sd/source
sd/source/filter/eppt/pptx-epptooxml.cxx | 11 +-- 1 file changed, 9 insertions(+), 2 deletions(-) New commits: commit ed22f8b84ed0b5286af406c87c674f34fe8439c1 Author: Matúš Kukan Date: Sat Feb 11 16:24:37 2017 +0100 tdf#104222: Put expensive debug code behind #if again dump_pset calls very expensive SdGenericDrawPage::getPropertyValue doing something with GDIMetaFiles. (regression from 5c7ce42dfc35d9cceef5f05a96e813b4e3913d38) (cherry picked from commit 9cbe69f1950115e47af693bd78fc78f96f9b508e) Change-Id: If39e9a451c87754343d77c8a1f840153c6b9de80 Reviewed-on: https://gerrit.libreoffice.org/34651 Tested-by: Jenkins Reviewed-by: Michael Stahl diff --git a/sd/source/filter/eppt/pptx-epptooxml.cxx b/sd/source/filter/eppt/pptx-epptooxml.cxx index 32f7171..fb98a6e 100644 --- a/sd/source/filter/eppt/pptx-epptooxml.cxx +++ b/sd/source/filter/eppt/pptx-epptooxml.cxx @@ -92,7 +92,10 @@ using ::com::sun::star::container::XIndexAccess; using ::sax_fastparser::FSHelperPtr; -void dump_pset(Reference< XPropertySet > rXPropSet); +#if OSL_DEBUG_LEVEL > 1 +void dump_pset(Reference< XPropertySet > const & rXPropSet); +#endif + #define IDS(x) OString(OStringLiteral(#x " ") + OString::number( mnShapeIdMax++ )).getStr() namespace oox { @@ -1789,7 +1792,9 @@ void PowerPointExport::ImplWritePPTXLayout( sal_Int32 nOffset, sal_uInt32 nMaste Reference< beans::XPropertySet > xPropSet( xSlide, uno::UNO_QUERY ); xPropSet->setPropertyValue( "Layout", makeAny( short( aLayoutInfo[ nOffset ].nType ) ) ); +#if OSL_DEBUG_LEVEL > 1 dump_pset(xPropSet); +#endif mXPagePropSet.set( xSlide, UNO_QUERY ); mXShapes.set( xSlide, UNO_QUERY ); @@ -2334,7 +2339,8 @@ SAL_DLLPUBLIC_EXPORT void* SAL_CALL sdfilt_component_getFactory( const sal_Char* } #endif -void dump_pset(Reference< XPropertySet > rXPropSet) +#if OSL_DEBUG_LEVEL > 1 +void dump_pset(Reference< XPropertySet > const & rXPropSet) { Reference< XPropertySetInfo > info = rXPropSet->getPropertySetInfo (); Sequence< beans::Property > props = info->getProperties (); @@ -2361,5 +2367,6 @@ void dump_pset(Reference< XPropertySet > rXPropSet) SAL_WARN("sd.eppt", "??? "); } } +#endif /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-5-3' - sd/source
sd/source/filter/eppt/pptx-epptooxml.cxx |7 +++ 1 file changed, 7 insertions(+) New commits: commit bc3b23f9c07aa2916c648abf1ca8c2af297250d4 Author: Matúš Kukan Date: Sat Feb 11 16:24:37 2017 +0100 tdf#104222: Put expensive debug code behind #if again dump_pset calls very expensive SdGenericDrawPage::getPropertyValue doing something with GDIMetaFiles. (regression from 5c7ce42dfc35d9cceef5f05a96e813b4e3913d38) (cherry picked from commit 9cbe69f1950115e47af693bd78fc78f96f9b508e) Change-Id: If39e9a451c87754343d77c8a1f840153c6b9de80 Reviewed-on: https://gerrit.libreoffice.org/34643 Reviewed-by: Michael Stahl Tested-by: Michael Stahl diff --git a/sd/source/filter/eppt/pptx-epptooxml.cxx b/sd/source/filter/eppt/pptx-epptooxml.cxx index 8069c7a..03ddcd0 100644 --- a/sd/source/filter/eppt/pptx-epptooxml.cxx +++ b/sd/source/filter/eppt/pptx-epptooxml.cxx @@ -93,7 +93,10 @@ using ::com::sun::star::container::XIndexAccess; using ::sax_fastparser::FSHelperPtr; +#if OSL_DEBUG_LEVEL > 1 void dump_pset(Reference< XPropertySet > const & rXPropSet); +#endif + #define IDS(x) OString(OStringLiteral(#x " ") + OString::number( mnShapeIdMax++ )).getStr() namespace oox { @@ -1788,7 +1791,9 @@ void PowerPointExport::ImplWritePPTXLayout( sal_Int32 nOffset, sal_uInt32 nMaste Reference< beans::XPropertySet > xPropSet( xSlide, uno::UNO_QUERY ); xPropSet->setPropertyValue( "Layout", makeAny( short( aLayoutInfo[ nOffset ].nType ) ) ); +#if OSL_DEBUG_LEVEL > 1 dump_pset(xPropSet); +#endif mXPagePropSet.set( xSlide, UNO_QUERY ); mXShapes.set( xSlide, UNO_QUERY ); @@ -2329,6 +2334,7 @@ SAL_DLLPUBLIC_EXPORT void* SAL_CALL sdfilt_component_getFactory( const sal_Char* } +#if OSL_DEBUG_LEVEL > 1 void dump_pset(Reference< XPropertySet > const & rXPropSet) { Reference< XPropertySetInfo > info = rXPropSet->getPropertySetInfo (); @@ -2356,5 +2362,6 @@ void dump_pset(Reference< XPropertySet > const & rXPropSet) SAL_INFO("sd.eppt", "??? "); } } +#endif /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: RepositoryExternal.mk
RepositoryExternal.mk |1 + 1 file changed, 1 insertion(+) New commits: commit 65866961cf0893c92ad5d8a960e29fd2c559c52c Author: Samuel Mehrbrodt Date: Fri Feb 24 16:54:36 2017 +0100 gpg4libre: Add libgpg-error to include path Change-Id: I7e87b2ecc107c91f9fcb9f385a8cace65776fc25 Reviewed-on: https://gerrit.libreoffice.org/34622 Reviewed-by: Samuel Mehrbrodt Tested-by: Samuel Mehrbrodt diff --git a/RepositoryExternal.mk b/RepositoryExternal.mk index 650c1b7..0e1e6a6 100644 --- a/RepositoryExternal.mk +++ b/RepositoryExternal.mk @@ -3421,6 +3421,7 @@ define gb_LinkTarget__use_gpgmepp $(call gb_LinkTarget_set_include,$(1),\ -I$(call gb_UnpackedTarball_get_dir,gpgme)/lang/cpp/src \ -I$(call gb_UnpackedTarball_get_dir,gpgme)/src \ + $$(GPG_ERROR_CFLAGS) \ $$(INCLUDE) \ ) $(call gb_LinkTarget_add_libs,$(1),\ ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: sw/source
sw/source/core/inc/frmtool.hxx|6 +++--- sw/source/core/layout/frmtool.cxx |2 +- 2 files changed, 4 insertions(+), 4 deletions(-) New commits: commit 74f6850a8ecd839ef76b6eef704fff408d3e639e Author: Miklos Vajna Date: Mon Feb 27 09:14:41 2017 +0100 sw: prefix members of SwLayNotify Change-Id: I40df0def8da88ba2c5719508a9df390e1d391fac diff --git a/sw/source/core/inc/frmtool.hxx b/sw/source/core/inc/frmtool.hxx index a94dc26..b6b56e0 100644 --- a/sw/source/core/inc/frmtool.hxx +++ b/sw/source/core/inc/frmtool.hxx @@ -190,14 +190,14 @@ public: class SwLayNotify : public SwFrameNotify { -bool bLowersComplete; +bool m_bLowersComplete; public: SwLayNotify( SwLayoutFrame *pLayFrame ); ~SwLayNotify(); -void SetLowersComplete( bool b ) { bLowersComplete = b; } -bool IsLowersComplete() { return bLowersComplete; } +void SetLowersComplete( bool b ) { m_bLowersComplete = b; } +bool IsLowersComplete() { return m_bLowersComplete; } }; class SwFlyNotify : public SwLayNotify diff --git a/sw/source/core/layout/frmtool.cxx b/sw/source/core/layout/frmtool.cxx index b2c88d2..e9e6535 100644 --- a/sw/source/core/layout/frmtool.cxx +++ b/sw/source/core/layout/frmtool.cxx @@ -410,7 +410,7 @@ SwFrameNotify::~SwFrameNotify() SwLayNotify::SwLayNotify( SwLayoutFrame *pLayFrame ) : SwFrameNotify( pLayFrame ), -bLowersComplete( false ) +m_bLowersComplete( false ) { } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-5-3' - jvmfwk/plugins
jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx | 10 ++ 1 file changed, 10 insertions(+) New commits: commit 90c7d328f3fca95f140affb5dd83622ae3b988c9 Author: Stephan Bergmann Date: Fri Feb 24 17:00:28 2017 +0100 Make JVM -Xrunjdwp option work on macOS I hope loading the jvm library as SAL_LOADMODULE_GLOBAL has no negative consequences (at least, there is prior art in the LINUX case already). Change-Id: If18b65bd96f7205fdf9fd41389e64e786c15af16 (cherry picked from commit f21994e7a240563283b7a17dcb435ce7c5156b60) Reviewed-on: https://gerrit.libreoffice.org/34676 Reviewed-by: Michael Stahl Tested-by: Jenkins diff --git a/jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx b/jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx index 5053fda..63791bc 100644 --- a/jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx +++ b/jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx @@ -670,6 +670,16 @@ javaPluginError jfw_plugin_startJavaVirtualMachine( osl::Module moduleRt; #if defined(LINUX) if (!moduleRt.load(sRuntimeLib, SAL_LOADMODULE_GLOBAL | SAL_LOADMODULE_NOW)) +#elif defined MACOSX +// Must be SAL_LOADMODULE_GLOBAL when e.g. specifying a +// -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=8000 option to +// JDK 1.8.0_121 at least, as JNI_CreateJavaVM -> Threads::create_vm -> +// JvmtiExport::post_vm_initialized -> cbEarlyVMInit -> initialize -> +// util_initialize -> sun.misc.VMSupport.getAgentProperties -> +// Java_sun_misc_VMSupport_initAgentProperties -> +// JDK_FindJvmEntry("JVM_INitAgentProperties") -> +// dlsym(RTLD_DEFAULT, "JVM_INitAgentProperties"): +if (!moduleRt.load(sRuntimeLib, SAL_LOADMODULE_GLOBAL)) #else #if defined(_WIN32) do_msvcr_magic(sRuntimeLib.pData); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: framework/source
framework/source/uiconfiguration/moduleuiconfigurationmanager.cxx |9 - 1 file changed, 4 insertions(+), 5 deletions(-) New commits: commit f058cedb5f166766448477138980bb32849a7605 Author: Stephan Bergmann Date: Mon Feb 27 12:55:25 2017 +0100 loplugin:loopvartoosmall Change-Id: I05874c22883a98f09c9231c0e0ff0dff93e2d643 diff --git a/framework/source/uiconfiguration/moduleuiconfigurationmanager.cxx b/framework/source/uiconfiguration/moduleuiconfigurationmanager.cxx index 9950342..5cd3fc0 100644 --- a/framework/source/uiconfiguration/moduleuiconfigurationmanager.cxx +++ b/framework/source/uiconfiguration/moduleuiconfigurationmanager.cxx @@ -1067,11 +1067,10 @@ void SAL_CALL ModuleUIConfigurationManager::reset() aGuard.clear(); // Notify our listeners -sal_uInt32 k = 0; -for ( k = 0; k < aRemoveEventNotifyContainer.size(); k++ ) -implts_notifyContainerListener( aRemoveEventNotifyContainer[k], NotifyOp_Remove ); -for ( k = 0; k < aReplaceEventNotifyContainer.size(); k++ ) -implts_notifyContainerListener( aReplaceEventNotifyContainer[k], NotifyOp_Replace ); +for ( auto const & k: aRemoveEventNotifyContainer ) +implts_notifyContainerListener( k, NotifyOp_Remove ); +for ( auto const & k: aReplaceEventNotifyContainer ) +implts_notifyContainerListener( k, NotifyOp_Replace ); } catch ( const css::lang::IllegalArgumentException& ) { ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: hwpfilter/source
hwpfilter/source/hcode.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit e74152d0744ebc63612dcfc0d375671eebf35141 Author: Stephan Bergmann Date: Mon Feb 27 12:56:06 2017 +0100 loplugin:loopvartoosmall Change-Id: If630131272b5ed4c589ed76be340a4107632c461 diff --git a/hwpfilter/source/hcode.cxx b/hwpfilter/source/hcode.cxx index e9a088c..41fb6d3 100644 --- a/hwpfilter/source/hcode.cxx +++ b/hwpfilter/source/hcode.cxx @@ -1304,7 +1304,7 @@ char *hcolor2str(uchar color, uchar shade, char *buf, bool bIsChar) ::std::string urltounix(const char *src) { ::std::string ret; -unsigned int i = 0; +std::size_t i = 0; if( src[0] == 'C' && src[1] == ':' && src[2] == '\\' ) // Home Dir { ret.append("file://"); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: i18npool/source
i18npool/source/localedata/LocaleNode.cxx | 26 +++--- i18npool/source/nativenumber/nativenumbersupplier.cxx |3 -- 2 files changed, 12 insertions(+), 17 deletions(-) New commits: commit 1b3de9b6cde3a24b489fa3b42f53e9225666138a Author: Stephan Bergmann Date: Mon Feb 27 12:57:23 2017 +0100 loplugin:loopvartoosmall Change-Id: I1842a5e047e4566371b62511ad5b56d466e717da diff --git a/i18npool/source/localedata/LocaleNode.cxx b/i18npool/source/localedata/LocaleNode.cxx index b411e38..eaf50e0 100644 --- a/i18npool/source/localedata/LocaleNode.cxx +++ b/i18npool/source/localedata/LocaleNode.cxx @@ -1349,9 +1349,8 @@ void LCCollationNode::generateCode (const OFileWriter &of) const } sal_Int16 nbOfCollations = 0; sal_Int16 nbOfCollationOptions = 0; -sal_Int16 j; -for ( j = 0; j < getNumberOfChildren(); j++ ) { +for ( sal_Int32 j = 0; j < getNumberOfChildren(); j++ ) { LocaleNode * currNode = getChildAt (j); if( currNode->getName() == "Collator" ) { @@ -1385,7 +1384,7 @@ void LCCollationNode::generateCode (const OFileWriter &of) const of.writeAsciiString(";\n\n"); of.writeAsciiString("\nstatic const sal_Unicode* LCCollatorArray[] = {\n"); -for(j = 0; j < nbOfCollations; j++) { +for(sal_Int16 j = 0; j < nbOfCollations; j++) { of.writeAsciiString("\tCollatorID"); of.writeInt(j); of.writeAsciiString(",\n"); @@ -1401,7 +1400,7 @@ void LCCollationNode::generateCode (const OFileWriter &of) const of.writeAsciiString("};\n\n"); of.writeAsciiString("static const sal_Unicode* collationOptions[] = {"); -for( j=0; jgetName() == "IndexKey" ) { @@ -1501,7 +1499,7 @@ void LCIndexNode::generateCode (const OFileWriter &of) const of.writeAsciiString(";\n\n"); of.writeAsciiString("\nstatic const sal_Unicode* IndexArray[] = {\n"); -for(i = 0; i < nbOfIndexs; i++) { +for(sal_Int16 i = 0; i < nbOfIndexs; i++) { of.writeAsciiString("\tIndexID"); of.writeInt(i); of.writeAsciiString(",\n"); @@ -1529,7 +1527,7 @@ void LCIndexNode::generateCode (const OFileWriter &of) const of.writeAsciiString(";\n\n"); of.writeAsciiString("static const sal_Unicode* UnicodeScriptArray[] = {"); -for( i=0; igetAttr().getValueByName("default"); bool bDefault = of.writeDefaultParameter("Currency", str, nbOfCurrencies); @@ -1999,7 +1996,7 @@ void LCCurrencyNode::generateCode (const OFileWriter &of) const of.writeInt(nbOfCurrencies); of.writeAsciiString(";\n\n"); of.writeAsciiString("static const sal_Unicode* currencies[] = {\n"); -for(i = 0; i < nbOfCurrencies; i++) { +for(sal_Int16 i = 0; i < nbOfCurrencies; i++) { of.writeAsciiString("\tcurrencyID"); of.writeInt(i); of.writeAsciiString(",\n"); @@ -2039,9 +2036,8 @@ void LCTransliterationNode::generateCode (const OFileWriter &of) const } sal_Int16 nbOfModules = 0; OUString str; -sal_Int16 i; -for ( i = 0; i < getNumberOfChildren(); i++,nbOfModules++) { +for ( sal_Int32 i = 0; i < getNumberOfChildren(); i++,nbOfModules++) { LocaleNode * transNode = getChildAt (i); str = transNode->getAttr().getValueByIndex(0); of.writeParameter("Transliteration", str, nbOfModules); @@ -2051,7 +2047,7 @@ void LCTransliterationNode::generateCode (const OFileWriter &of) const of.writeAsciiString(";\n\n"); of.writeAsciiString("\nstatic const sal_Unicode* LCTransliterationsArray[] = {\n"); -for( i = 0; i < nbOfModules; i++) { +for( sal_Int16 i = 0; i < nbOfModules; i++) { of.writeAsciiString("\tTransliteration"); of.writeInt(i); of.writeAsciiString(",\n"); diff --git a/i18npool/source/nativenumber/nativenumbersupplier.cxx b/i18npool/source/nativenumber/nativenumbersupplier.cxx index 01ef7dc..43c81b5 100644 --- a/i18npool/source/nativenumber/nativenumbersupplier.cxx +++ b/i18npool/source/nativenumber/nativenumbersupplier.cxx @@ -97,9 +97,8 @@ bool SAL_CALL AsciiToNative_numberMaker(const sal_Unicode *str, sal_Int32 begin, sal_Unicode multiChar = (multiChar_index == -1 ? 0 : number->multiplierChar[multiChar_index]); if ( len <= number->multiplierExponent[number->exponentCount-1] ) { if (number->multiplierExponent[number->exponentCount-1] > 1) { -sal_Int16 i; bool bNotZero = false; -for (i = 0; i < len; i++, begin++) { +for (sal_Int32 i = 0; i < len; i++, begin++) { if (bNotZero || str[begin] != NUMBER_ZERO) { dst[count] = numberChar[str[begin] - NUMBER_ZERO]; if (useOffset) ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: l10ntools/source
l10ntools/source/export.cxx |5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) New commits: commit 431708c5eb27e6fa3675d17246891d717c0713ec Author: Stephan Bergmann Date: Mon Feb 27 13:00:55 2017 +0100 loplugin:loopvartoosmall Change-Id: I580639aecc4cf6a214a7aaba3bbe92f7459856d5 diff --git a/l10ntools/source/export.cxx b/l10ntools/source/export.cxx index 47f46a8..37f0d64 100644 --- a/l10ntools/source/export.cxx +++ b/l10ntools/source/export.cxx @@ -347,8 +347,7 @@ void Export::Execute( int nToken, const char * pToken ) sal_uInt16 nOpen = 0; sal_uInt16 nClose = 0; bool bReadOver1 = false; -sal_uInt16 i = 0; -for ( i = 0; i < sToken.getLength(); i++ ) { +for ( sal_Int32 i = 0; i < sToken.getLength(); i++ ) { if ( sToken[i] == '"' ) bReadOver1 = !bReadOver1; if ( !bReadOver1 && ( sToken[i] == '{' )) @@ -356,7 +355,7 @@ void Export::Execute( int nToken, const char * pToken ) } bReadOver1 = false; -for ( i = 0; i < sToken.getLength(); i++ ) { +for ( sal_Int32 i = 0; i < sToken.getLength(); i++ ) { if ( sToken[i] == '"' ) bReadOver1 = !bReadOver1; if ( !bReadOver1 && ( sToken[i] == '}' )) ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: sot/source
sot/source/sdstor/stgelem.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 377efdcea0687f5b79e92874db15171043b3de97 Author: Stephan Bergmann Date: Mon Feb 27 13:01:37 2017 +0100 loplugin:loopvartoosmall Change-Id: I3ada4fc8c8ebcf04962be03c048fb87bc0d6dbf8 diff --git a/sot/source/sdstor/stgelem.cxx b/sot/source/sdstor/stgelem.cxx index 12ed731..0fb80c4 100644 --- a/sot/source/sdstor/stgelem.cxx +++ b/sot/source/sdstor/stgelem.cxx @@ -323,7 +323,7 @@ bool StgEntry::SetName( const OUString& rName ) m_aName = m_aName.copy(0, nMaxLegalStr); } -sal_uInt16 i; +sal_Int32 i; for( i = 0; i < rName.getLength() && i <= nMaxLegalStr; i++ ) { m_nName[ i ] = rName[ i ]; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: sw/source
sw/source/filter/xml/xmlimpit.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit e36f0860f00af139a8fa94d36302f7b0c56383fe Author: Justin Luth Date: Wed Jan 18 15:52:33 2017 +0300 tdf#77111 odt import: treat PAGEDESC_PAGENUMOFFSET==0 as auto Ever since 2010 commit 7edaf190 zeroes have been saved as XML_AUTO. Ever since 2014 commit c2ccd20c, a numoffset of zero is no longer considered to be auto (for MS compatibility) but is still treated as auto during xml export. Thus, any older documents that had been saved with a zero should still xml import as auto instead of as 0. Change-Id: I1a0df32a8e2f1b30b2bedbf4c9bb07ebec239637 Reviewed-on: https://gerrit.libreoffice.org/33267 Tested-by: Jenkins Reviewed-by: Justin Luth Reviewed-by: Michael Stahl diff --git a/sw/source/filter/xml/xmlimpit.cxx b/sw/source/filter/xml/xmlimpit.cxx index 1dc92ac..500b456 100644 --- a/sw/source/filter/xml/xmlimpit.cxx +++ b/sw/source/filter/xml/xmlimpit.cxx @@ -786,7 +786,7 @@ bool SvXMLImportItemMapper::PutXMLValue( sal_Int32 nVal; bOk = ::sax::Converter::convertNumber( nVal, rValue, 0, USHRT_MAX); -if( bOk ) +if( bOk && nVal > 0 ) rPageDesc.SetNumOffset( (sal_uInt16)nVal ); } } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: 2 commits - sdext/source svl/source
sdext/source/minimizer/configurationaccess.cxx |3 +-- sdext/source/minimizer/optimizerdialogcontrols.cxx | 10 -- svl/source/numbers/zforlist.cxx|5 ++--- 3 files changed, 7 insertions(+), 11 deletions(-) New commits: commit 5d84a5a591ff353fbd386be5f1f4192e5606897f Author: Stephan Bergmann Date: Mon Feb 27 13:03:10 2017 +0100 loplugin:loopvartoosmall Change-Id: I2e80e15ded19e09853ec16f9876e425a88cf910e diff --git a/svl/source/numbers/zforlist.cxx b/svl/source/numbers/zforlist.cxx index c9dab53..9266c43 100644 --- a/svl/source/numbers/zforlist.cxx +++ b/svl/source/numbers/zforlist.cxx @@ -2800,7 +2800,6 @@ OUString SvNumberFormatter::GenerateFormat(sal_uInt32 nIndex, eLnge = IniLnge; } short eType = GetType(nIndex); -sal_uInt16 i; ImpGenerateCL(eLnge); // create new standard formats if necessary utl::DigitGroupingIterator aGrouping( xLocaleData->getDigitGrouping()); @@ -2833,7 +2832,7 @@ OUString SvNumberFormatter::GenerateFormat(sal_uInt32 nIndex, } else { -for (i = 0; i < nLeadingZeros; i++) +for (sal_uInt16 i = 0; i < nLeadingZeros; i++) { if (bThousand && i > 0 && i == aGrouping.getPos()) { @@ -2845,7 +2844,7 @@ OUString SvNumberFormatter::GenerateFormat(sal_uInt32 nIndex, if ( bThousand ) { sal_Int32 nDigits = (eType == css::util::NumberFormat::SCIENTIFIC) ? 3*((nLeadingZeros-1)/3 + 1) : nDigitsInFirstGroup + 1; -for (i = nLeadingZeros; i < nDigits; i++) +for (sal_Int32 i = nLeadingZeros; i < nDigits; i++) { if ( i % nDigitsInFirstGroup == 0 ) sString.insert(0, rThSep); commit 36a5d940e7b95cf96e23bcd6dc70c28ce52db2b1 Author: Stephan Bergmann Date: Mon Feb 27 13:02:26 2017 +0100 loplugin:loopvartoosmall Change-Id: Id2771f413798ed9ceb76e9c4dd3113633d4e481e diff --git a/sdext/source/minimizer/configurationaccess.cxx b/sdext/source/minimizer/configurationaccess.cxx index dd39419..efd9252 100644 --- a/sdext/source/minimizer/configurationaccess.cxx +++ b/sdext/source/minimizer/configurationaccess.cxx @@ -251,7 +251,6 @@ void ConfigurationAccess::SaveConfiguration() do { int i; -unsigned int k; Reference xRoot( OpenConfiguration( false ), UNO_QUERY_THROW ); // storing the last used settings @@ -267,7 +266,7 @@ void ConfigurationAccess::SaveConfiguration() for( i = 0; i < aElements.getLength(); i++ ) xNameContainer->removeByName( aElements[ i ] ); -for( k = 1; k < maSettings.size(); k++ ) +for( std::vector::size_type k = 1; k < maSettings.size(); k++ ) { OptimizerSettings& rSettings( maSettings[ k ] ); OUString aElementName( "Template" + OUString::number( k ) ); diff --git a/sdext/source/minimizer/optimizerdialogcontrols.cxx b/sdext/source/minimizer/optimizerdialogcontrols.cxx index 45c54a9..647cbc3 100644 --- a/sdext/source/minimizer/optimizerdialogcontrols.cxx +++ b/sdext/source/minimizer/optimizerdialogcontrols.cxx @@ -377,14 +377,13 @@ void OptimizerDialog::InitNavigationBar() void OptimizerDialog::UpdateControlStatesPage0() { -sal_uInt32 i; short nSelectedItem = -1; Sequence< OUString > aItemList; const std::vector< OptimizerSettings >& rList( GetOptimizerSettings() ); if ( rList.size() > 1 ) // the first session in the list is the actual one -> skipping first one { aItemList.realloc( rList.size() - 1 ); -for ( i = 1; i < rList.size(); i++ ) +for ( std::vector::size_type i = 1; i < rList.size(); i++ ) { aItemList[ i - 1 ] = rList[ i ].maName; if ( nSelectedItem < 0 ) @@ -598,13 +597,12 @@ void OptimizerDialog::UpdateControlStatesPage4() } setControlProperty( "ComboBox0Pg4", "Enabled", Any( false ) ); -sal_uInt32 w; Sequence< OUString > aItemList; const std::vector< OptimizerSettings >& rList( GetOptimizerSettings() ); if ( rList.size() > 1 ) // the first session in the list is the actual one -> skipping first one { aItemList.realloc( rList.size() - 1 ); -for ( w = 1; w < rList.size(); w++ ) +for ( std::vector::size_type w = 1; w < rList.size(); w++ ) aItemList[ w - 1 ] = rList[ w ].maName; } setControlProperty( "ComboBox0Pg4", "StringItemList", Any( aItemList ) ); @@ -613,7 +611,7 @@ void OptimizerDialog::UpdateControlStatesPage4() bool bSaveSettingsEnabled = true; if ( rList.size() > 1 ) // the first session in the list is the actual one -> skipping first one { -for ( w = 1; w < rList.size(); w++ ) +for ( std::vector::size_type w = 1; w < rList.size(); w++ ) { if ( rList[ w ] == rList[ 0 ] )
Re: how to check if my local copy of translations is really up-to-date?
Hi Jean-Baptiste, *, On Sun, Feb 26, 2017 at 10:18 PM, wrote: > Le 24.02.2017 13:09, Christian Lohmaier a écrit : >> >> >> So to be clear: >> source/fr/svx/source/stbctrls.po has the translation in your checkout, >> but in LibreOffice UI it is still untranslated? > > > Yes. The bug 106082 has been confirmed on LO 5.2.6.1, at least for French > and Italian. > > Today I bisected the bug on the 5.2 branch (less commits to test), and the > first bad commit is: > > commit 3687612a93813449cfc68ce5ece3b785560b2e58 > My C++ (non-)knowledge does not allow me to detect what change in this > commit triggered the bug. Ah!, good catch. It is the way the po files are processed/generated. It is picky about the syntax. In this case, the } ; is the problem. This will make the po-parsing/translation processing add the next identifier to the context of all strings that follow, making them not match anymore.. Fix is easy enough. (won't have the new string "Could not load all SmartArts….", but will have all the strings that are in pootle) ciao Christian ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice
[Libreoffice-commits] core.git: svx/source
svx/source/stbctrls/stbctrls.src |3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) New commits: commit 9eaa17e6bb35a2cb71ec59c96ea4a39466789667 Author: Christian Lohmaier Date: Mon Feb 27 13:11:19 2017 +0100 tdf#106082 fix missing statusbar translations (l10ntool is picky about syntax) having the ; on a separate line made all strings following that have the string-ID of the next unit, altering the msgctx and thus translations wouldn't apply anymore Change-Id: Ia1e3c36a9d2a57725c90e6c3f33de99bed85ec41 diff --git a/svx/source/stbctrls/stbctrls.src b/svx/source/stbctrls/stbctrls.src index 7d4f6b6d7..033cfba 100644 --- a/svx/source/stbctrls/stbctrls.src +++ b/svx/source/stbctrls/stbctrls.src @@ -116,8 +116,7 @@ String RID_SVXSTR_DOC_LOAD String RID_SVXSTR_FIT_SLIDE { Text [ en-US ] = "Fit slide to current window."; -} -; +}; String RID_SVXSTR_WARN_MISSING_SMARTART { ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-5-3' - svx/source
svx/source/stbctrls/stbctrls.src |3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) New commits: commit 4717dafe916d81f1c70ea0c51cb1342624116422 Author: Christian Lohmaier Date: Mon Feb 27 13:11:19 2017 +0100 tdf#106082 fix missing statusbar translations (l10ntool is picky about syntax) having the ; on a separate line made all strings following that have the string-ID of the next unit, altering the msgctx and thus translations wouldn't apply anymore Change-Id: Ia1e3c36a9d2a57725c90e6c3f33de99bed85ec41 (cherry picked from commit 9eaa17e6bb35a2cb71ec59c96ea4a39466789667) diff --git a/svx/source/stbctrls/stbctrls.src b/svx/source/stbctrls/stbctrls.src index 0801afc..6c3a739 100644 --- a/svx/source/stbctrls/stbctrls.src +++ b/svx/source/stbctrls/stbctrls.src @@ -119,8 +119,7 @@ String RID_SVXSTR_DOC_LOAD String RID_SVXSTR_FIT_SLIDE { Text [ en-US ] = "Fit slide to current window."; -} -; +}; String RID_SVXSTR_WARN_MISSING_SMARTART { ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-5-3-1' - svx/source
svx/source/stbctrls/stbctrls.src |3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) New commits: commit 331c747cdd61192d1584a2016c927aabb465d7b3 Author: Christian Lohmaier Date: Mon Feb 27 13:11:19 2017 +0100 tdf#106082 fix missing statusbar translations (l10ntool is picky about syntax) having the ; on a separate line made all strings following that have the string-ID of the next unit, altering the msgctx and thus translations wouldn't apply anymore Change-Id: Ia1e3c36a9d2a57725c90e6c3f33de99bed85ec41 (cherry picked from commit 9eaa17e6bb35a2cb71ec59c96ea4a39466789667) (cherry picked from commit 4717dafe916d81f1c70ea0c51cb1342624116422) diff --git a/svx/source/stbctrls/stbctrls.src b/svx/source/stbctrls/stbctrls.src index 0801afc..6c3a739 100644 --- a/svx/source/stbctrls/stbctrls.src +++ b/svx/source/stbctrls/stbctrls.src @@ -119,8 +119,7 @@ String RID_SVXSTR_DOC_LOAD String RID_SVXSTR_FIT_SLIDE { Text [ en-US ] = "Fit slide to current window."; -} -; +}; String RID_SVXSTR_WARN_MISSING_SMARTART { ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-5-2' - svx/source
svx/source/stbctrls/stbctrls.src |3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) New commits: commit 558c3d3c83c85c4392eae491165143736477216b Author: Christian Lohmaier Date: Mon Feb 27 13:11:19 2017 +0100 tdf#106082 fix missing statusbar translations (l10ntool is picky about syntax) having the ; on a separate line made all strings following that have the string-ID of the next unit, altering the msgctx and thus translations wouldn't apply anymore Change-Id: Ia1e3c36a9d2a57725c90e6c3f33de99bed85ec41 (cherry picked from commit 9eaa17e6bb35a2cb71ec59c96ea4a39466789667) diff --git a/svx/source/stbctrls/stbctrls.src b/svx/source/stbctrls/stbctrls.src index 2be3e63..6ffb182 100644 --- a/svx/source/stbctrls/stbctrls.src +++ b/svx/source/stbctrls/stbctrls.src @@ -119,8 +119,7 @@ String RID_SVXSTR_DOC_LOAD String RID_SVXSTR_FIT_SLIDE { Text [ en-US ] = "Fit slide to current window."; -} -; +}; String RID_SVXSTR_WARN_MISSING_SMARTART { ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: svtools/uiconfig
svtools/uiconfig/ui/addresstemplatedialog.ui |1 + svtools/uiconfig/ui/wizarddialog.ui |1 + 2 files changed, 2 insertions(+) New commits: commit e8147b4b7107cc2fdb68a76deb3d30296a67434d Author: heiko tietze Date: Sun Feb 26 11:49:37 2017 +0100 tdf#105299 Dialogs must not be resizable Patch doesnt solve the issue but makes the wizard dialog HIG compliant Change-Id: Ib45b49671bc247ad2bce072e4cc4260ed551ef7c Reviewed-on: https://gerrit.libreoffice.org/34652 Tested-by: Jenkins Reviewed-by: Adolfo Jayme Barrientos diff --git a/svtools/uiconfig/ui/addresstemplatedialog.ui b/svtools/uiconfig/ui/addresstemplatedialog.ui index db80bae..0b9caeb 100644 --- a/svtools/uiconfig/ui/addresstemplatedialog.ui +++ b/svtools/uiconfig/ui/addresstemplatedialog.ui @@ -4,6 +4,7 @@ False +False 6 Templates: Address Book Assignment dialog diff --git a/svtools/uiconfig/ui/wizarddialog.ui b/svtools/uiconfig/ui/wizarddialog.ui index 4bc79ae..73e89d2 100644 --- a/svtools/uiconfig/ui/wizarddialog.ui +++ b/svtools/uiconfig/ui/wizarddialog.ui @@ -4,6 +4,7 @@ False +False ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-5-2-6' - svx/source
svx/source/stbctrls/stbctrls.src |3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) New commits: commit 000fee9930159d1bdd362b0db7b8332615e06dd4 Author: Christian Lohmaier Date: Mon Feb 27 13:11:19 2017 +0100 tdf#106082 fix missing statusbar translations (l10ntool is picky about syntax) having the ; on a separate line made all strings following that have the string-ID of the next unit, altering the msgctx and thus translations wouldn't apply anymore Change-Id: Ia1e3c36a9d2a57725c90e6c3f33de99bed85ec41 (cherry picked from commit 9eaa17e6bb35a2cb71ec59c96ea4a39466789667) (cherry picked from commit 558c3d3c83c85c4392eae491165143736477216b) diff --git a/svx/source/stbctrls/stbctrls.src b/svx/source/stbctrls/stbctrls.src index 2be3e63..6ffb182 100644 --- a/svx/source/stbctrls/stbctrls.src +++ b/svx/source/stbctrls/stbctrls.src @@ -119,8 +119,7 @@ String RID_SVXSTR_DOC_LOAD String RID_SVXSTR_FIT_SLIDE { Text [ en-US ] = "Fit slide to current window."; -} -; +}; String RID_SVXSTR_WARN_MISSING_SMARTART { ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: oox/source
oox/source/vml/vmlshape.cxx |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) New commits: commit 597fd6c8c281381f2205a6d4dd7920ce0079ef7d Author: Stephan Bergmann Date: Mon Feb 27 13:48:10 2017 +0100 Probably better to restrict the sequence size ...to any elements actually written. Was like that ever since the code's introduction in d3ffe3ed3fa1b80c7e54439673029e105940db80 "fdo#67737 : fix for flip not being imported & rendered correctly". Change-Id: I460c1c7c578bd7e53cc2e868da0b7aeb5f19194f diff --git a/oox/source/vml/vmlshape.cxx b/oox/source/vml/vmlshape.cxx index 9c2f427..e90ee90 100644 --- a/oox/source/vml/vmlshape.cxx +++ b/oox/source/vml/vmlshape.cxx @@ -800,7 +800,8 @@ Reference< XShape > SimpleShape::implConvertAndInsert( const Reference< XShapes // The associated properties "PROP_MirroredX" and "PROP_MirroredY" have to be set here so that direction change will occur internally. if (bFlipX || bFlipY) { -css::uno::Sequence< css::beans::PropertyValue > aPropSequence (2); +css::uno::Sequence< css::beans::PropertyValue > aPropSequence ( +bFlipX && bFlipY ? 2 : 1); int nPropertyIndex = 0; if (bFlipX) { ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] help.git: Changes to 'refs/tags/cp-5.1-20'
Tag 'cp-5.1-20' created by Andras Timar at 2017-02-27 13:05 + cp-5.1-20 Changes since libreoffice-5-1-branch-point-11: --- 0 files changed --- ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] dictionaries.git: Changes to 'refs/tags/cp-5.1-20'
Tag 'cp-5.1-20' created by Andras Timar at 2017-02-27 13:05 + cp-5.1-20 Changes since cp-5.1-17: Andras Timar (1): tdf#105396 update German dictionaries --- de/README_extension_owner.txt | 11 de/README_hyph_de.txt |5 de/README_thesaurus.txt |4 de/de_AT_frami.aff|4 de/de_AT_frami.dic|12602 - de/de_CH_frami.aff|4 de/de_CH_frami.dic|12460 - de/de_DE_frami.aff|4 de/de_DE_frami.dic|12574 - de/description.xml|2 de/hyph_de_AT.dic |74431 +++- de/hyph_de_CH.dic |74429 +++- de/hyph_de_DE.dic |74427 +++- de/th_de_CH_v2.dat|95202 ++--- de/th_de_DE_v2.dat|95282 ++ 15 files changed, 360559 insertions(+), 90882 deletions(-) --- ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] translations.git: Changes to 'refs/tags/cp-5.1-20'
Tag 'cp-5.1-20' created by Andras Timar at 2017-02-27 13:05 + cp-5.1-20 Changes since cp-5.1-9-2: --- 0 files changed --- ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Changes to 'refs/tags/cp-5.1-20'
Tag 'cp-5.1-20' created by Andras Timar at 2017-02-27 13:05 + cp-5.1-20 Changes since cp-5.1-18-169: --- 0 files changed --- ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: xmlsecurity/source
xmlsecurity/source/pdfio/pdfdocument.cxx |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) New commits: commit a9a9b8155f65421fa8cb2bf108b847f212462f4f Author: Miklos Vajna Date: Mon Feb 27 12:31:07 2017 +0100 xmlsecurity PDF verify: fix parsing of nested dictionaries This is triggered by an upcoming unit test for tdf#105093. Change-Id: I3c8e8662fcadaea1f6e19bf6194d8159916f368b Reviewed-on: https://gerrit.libreoffice.org/34678 Reviewed-by: Miklos Vajna Tested-by: Jenkins diff --git a/xmlsecurity/source/pdfio/pdfdocument.cxx b/xmlsecurity/source/pdfio/pdfdocument.cxx index 5017448..6ffe711 100644 --- a/xmlsecurity/source/pdfio/pdfdocument.cxx +++ b/xmlsecurity/source/pdfio/pdfdocument.cxx @@ -2974,7 +2974,7 @@ size_t PDFDictionaryElement::Parse(const std::vector< std::unique_ptrm_aItems); +i = PDFDictionaryElement::Parse(rElements, pDictionary, pDictionary->m_aItems); rDictionary[aName] = pDictionary; aName.clear(); } @@ -2987,7 +2987,7 @@ size_t PDFDictionaryElement::Parse(const std::vector< std::unique_ptrSetDictionaryLength(pEndDictionary->GetLocation() - nDictionaryOffset); -nRet = nIndex; +nRet = i; break; } } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: tools/source
tools/source/ref/pstm.cxx | 12 +--- 1 file changed, 1 insertion(+), 11 deletions(-) New commits: commit b100342d42a15a3aed79d6f23ecfd0b56e4a86bf Author: Stephan Bergmann Date: Mon Feb 27 14:25:42 2017 +0100 Remove odd check that writeUInt32 indeed writes four bytes If you look at the oldest available version of SvPersistStream::WriteDummyLen in 8ab086b6cc054501bfbf7ef6fa509c393691e860 "initial import", it looks like there was an issue with whetever earlier way was used to reserve a four-byte space in the stream with "Sun sp" (whatever that shall mean). Change-Id: I861a445ae72f1ced502f70917707336eb5dddf04 diff --git a/tools/source/ref/pstm.cxx b/tools/source/ref/pstm.cxx index 4bd0d80..3a7435d 100644 --- a/tools/source/ref/pstm.cxx +++ b/tools/source/ref/pstm.cxx @@ -244,17 +244,7 @@ void SvPersistStream::WriteCompressed( SvStream & rStm, sal_uInt32 nVal ) */ sal_uInt32 SvPersistStream::WriteDummyLen() { -#ifdef DBG_UTIL -sal_uInt32 nPos = Tell(); -#endif -sal_uInt32 n0 = 0; -WriteUInt32( n0 ); // Because of Sun sp -// Don't assert on stream error -#ifdef DBG_UTIL -DBG_ASSERT( GetError() != SVSTREAM_OK - || (sizeof( sal_uInt32 ) == Tell() -nPos), -"No 4 byte as length parameter" ); -#endif +WriteUInt32( 0 ); return Tell(); } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: framework/inc framework/source
framework/inc/uielement/menubarmanager.hxx| 20 ++- framework/source/uielement/menubarmanager.cxx | 33 +- 2 files changed, 10 insertions(+), 43 deletions(-) New commits: commit 1683fae27e9019731534190964491b88b68b7a6e Author: Stephan Bergmann Date: Mon Feb 27 14:32:33 2017 +0100 Use WeakImplHelper to implement MenuBarManager Change-Id: I3a30bc86796a7ad24616cb11ae10b6886e09c1e9 diff --git a/framework/inc/uielement/menubarmanager.hxx b/framework/inc/uielement/menubarmanager.hxx index 040bb06..7c363dc 100644 --- a/framework/inc/uielement/menubarmanager.hxx +++ b/framework/inc/uielement/menubarmanager.hxx @@ -51,7 +51,7 @@ #include #include #include -#include +#include #include #include #include @@ -68,12 +68,13 @@ typedef std::unordered_map< OUString, PopupControllerEntry, OUStringHash > Popup class AddonMenu; class AddonPopupMenu; -class MenuBarManager : public css::frame::XStatusListener, - public css::frame::XFrameActionListener , - public css::ui::XUIConfigurationListener , - public css::lang::XComponent , - public css::awt::XSystemDependentMenuPeer , - public ::cppu::OWeakObject +class MenuBarManager: +public cppu::WeakImplHelper< +css::frame::XStatusListener, +css::frame::XFrameActionListener, +css::ui::XUIConfigurationListener, +css::lang::XComponent, +css::awt::XSystemDependentMenuPeer> { protected: MenuBarManager( @@ -96,11 +97,6 @@ class MenuBarManager : public css::frame::XStatusListener , virtual ~MenuBarManager() override; -// XInterface -virtual void SAL_CALL acquire() throw() override; -virtual void SAL_CALL release() throw() override; -virtual css::uno::Any SAL_CALL queryInterface( const css::uno::Type & rType ) override; - // XComponent virtual void SAL_CALL dispose() override; virtual void SAL_CALL addEventListener( const css::uno::Reference< css::lang::XEventListener >& xListener ) override; diff --git a/framework/source/uielement/menubarmanager.cxx b/framework/source/uielement/menubarmanager.cxx index 989943e..26bf92e 100644 --- a/framework/source/uielement/menubarmanager.cxx +++ b/framework/source/uielement/menubarmanager.cxx @@ -126,8 +126,7 @@ MenuBarManager::MenuBarManager( const Reference< XDispatchProvider >& rDispatchProvider, const OUString& rModuleIdentifier, Menu* pMenu, bool bDelete, bool bHasMenuBar ): -OWeakObject() -, m_bDisposed( false ) +m_bDisposed( false ) , m_bRetrieveImages( false ) , m_bAcceleratorCfg( false ) , m_bModuleIdentified( false ) @@ -148,8 +147,7 @@ MenuBarManager::MenuBarManager( const Reference< XURLTransformer >& _xURLTransformer, Menu* pAddonMenu, bool popup): -OWeakObject() -, m_bDisposed( false ) +m_bDisposed( false ) , m_bRetrieveImages( true ) , m_bAcceleratorCfg( false ) , m_bModuleIdentified( false ) @@ -163,33 +161,6 @@ MenuBarManager::MenuBarManager( Init(rFrame,pAddonMenu, popup); } -Any SAL_CALL MenuBarManager::queryInterface( const Type & rType ) -{ -Any a = ::cppu::queryInterface( -rType , -(static_cast< css::frame::XStatusListener* >(this)), -(static_cast< css::frame::XFrameActionListener* >(this)), -(static_cast< css::ui::XUIConfigurationListener* >(this)), -(static_cast< XEventListener* >(static_cast(this))), -(static_cast< XComponent* >(this)), -(static_cast< css::awt::XSystemDependentMenuPeer* >(this))); - -if ( a.hasValue() ) -return a; - -return OWeakObject::queryInterface( rType ); -} - -void SAL_CALL MenuBarManager::acquire() throw() -{ -OWeakObject::acquire(); -} - -void SAL_CALL MenuBarManager::release() throw() -{ -OWeakObject::release(); -} - Any SAL_CALL MenuBarManager::getMenuHandle( const Sequence< sal_Int8 >& /*ProcessId*/, sal_Int16 SystemType ) { SolarMutexGuard aSolarGuard; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: idl/inc
idl/inc/globals.hxx |1 - 1 file changed, 1 deletion(-) New commits: commit 9058b7075de432c6b135928878b9c93acda660b0 Author: Stephan Bergmann Date: Mon Feb 27 14:36:07 2017 +0100 Remove unused forward declaration Change-Id: I1ca1bd56289ea1005b76dd387ef7610ff1b0a3db diff --git a/idl/inc/globals.hxx b/idl/inc/globals.hxx index ccd413c..d427424 100644 --- a/idl/inc/globals.hxx +++ b/idl/inc/globals.hxx @@ -22,7 +22,6 @@ #include -class SvClassManager; struct SvGlobalHashNames { SvStringHashEntry* MM_module; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: 3 commits - lotuswordpro/source sw/inc sw/source
lotuswordpro/source/filter/lwpfilter.cxx | 14 +++- sw/inc/breakit.hxx | 34 ++ sw/source/core/bastyp/breakit.cxx| 35 +++ 3 files changed, 38 insertions(+), 45 deletions(-) New commits: commit 87847bb8b87b80f338bc010d413ce2c9f912e6ec Author: Caolán McNamara Date: Mon Feb 27 13:22:01 2017 + ofz: fix leak Change-Id: I631ea0012f8e999f14aa08b42f28d6115a73d084 diff --git a/lotuswordpro/source/filter/lwpfilter.cxx b/lotuswordpro/source/filter/lwpfilter.cxx index 0389ee3..f2fe380 100644 --- a/lotuswordpro/source/filter/lwpfilter.cxx +++ b/lotuswordpro/source/filter/lwpfilter.cxx @@ -101,7 +101,7 @@ using namespace ::com::sun::star; #include "bento.hxx" using namespace OpenStormBento; #include "explode.hxx" - bool Decompress(SvStream *pCompressed, SvStream * & pOutDecompressed) +bool Decompress(SvStream *pCompressed, SvStream * & pOutDecompressed) { pCompressed->Seek(0); std::unique_ptr aDecompressed(new SvMemoryStream(4096, 4096)); @@ -110,10 +110,14 @@ using namespace OpenStormBento; aDecompressed->WriteBytes(buffer, 16); std::unique_ptr aLwpStream(new LwpSvStream(pCompressed)); -LtcBenContainer* pBentoContainer; -sal_uLong ulRet = BenOpenContainer(aLwpStream.get(), &pBentoContainer); -if (ulRet != BenErr_OK) -return false; +std::unique_ptr pBentoContainer; +{ +OpenStormBento::LtcBenContainer* pTmp(nullptr); +sal_uLong ulRet = BenOpenContainer(aLwpStream.get(), &pTmp); +pBentoContainer.reset(pTmp); +if (ulRet != BenErr_OK) +return false; +} std::unique_ptr aWordProData(pBentoContainer->FindValueStreamWithPropertyName("WordProData")); commit 7f335799b34f3454649f0045bdab6f98baa84ed8 Author: Caolán McNamara Date: Mon Feb 27 10:07:03 2017 + OSL_ENSURE->assert Change-Id: I21edad9865717674217d2d10b9ec2a689d9d65f9 diff --git a/sw/source/core/bastyp/breakit.cxx b/sw/source/core/bastyp/breakit.cxx index 69436e2..5e7a22c 100644 --- a/sw/source/core/bastyp/breakit.cxx +++ b/sw/source/core/bastyp/breakit.cxx @@ -56,13 +56,13 @@ SwBreakIt::SwBreakIt( const uno::Reference & rxContext ) : m_xContext(rxContext) , aForbiddenLang(LANGUAGE_DONTKNOW) { -OSL_ENSURE( m_xContext.is(), "SwBreakIt: no MultiServiceFactory" ); +assert(m_xContext.is() && "SwBreakIt: no MultiServiceFactory"); } void SwBreakIt::createBreakIterator() const { -if ( m_xContext.is() && !xBreak.is() ) -xBreak.set( i18n::BreakIterator::create(m_xContext) ); +if (!xBreak.is()) +xBreak.set(i18n::BreakIterator::create(m_xContext)); } void SwBreakIt::GetLocale_( const LanguageType aLang ) @@ -83,7 +83,7 @@ void SwBreakIt::GetLocale_( const LanguageTag& rLanguageTag ) void SwBreakIt::GetForbidden_( const LanguageType aLang ) { -LocaleDataWrapper aWrap( m_xContext, GetLanguageTag( aLang ) ); +LocaleDataWrapper aWrap(m_xContext, GetLanguageTag(aLang)); aForbiddenLang = aLang; m_xForbidden.reset(new i18n::ForbiddenCharacters(aWrap.getForbiddenCharacters())); commit 8e89aa77056c4b233c24ad3a93c6d4a8159fcf16 Author: Caolán McNamara Date: Mon Feb 27 10:05:33 2017 + use std::unique_ptr Change-Id: I3f00cd66a0a8aa0571733caf4db4d16dfd102683 diff --git a/sw/inc/breakit.hxx b/sw/inc/breakit.hxx index 2978f44..6b92d80 100644 --- a/sw/inc/breakit.hxx +++ b/sw/inc/breakit.hxx @@ -35,8 +35,8 @@ class SW_DLLPUBLIC SwBreakIt css::uno::Reference< css::uno::XComponentContext > m_xContext; mutable css::uno::Reference< css::i18n::XBreakIterator > xBreak; -LanguageTag * m_pLanguageTag; ///< language tag of the current locale -css::i18n::ForbiddenCharacters * m_pForbidden; +std::unique_ptr m_xLanguageTag; ///< language tag of the current locale +std::unique_ptr m_xForbidden; LanguageType aForbiddenLang; ///< language of the current forbiddenChar struct @@ -50,9 +50,7 @@ class SW_DLLPUBLIC SwBreakIt SwBreakIt& operator=(SwBreakIt const&) = delete; // private (see @ Create_, Delete_). -explicit SwBreakIt( -const css::uno::Reference< css::uno::XComponentContext > & rxContext); -~SwBreakIt(); +explicit SwBreakIt(const css::uno::Reference & rxContext); public: // private (see @ source/core/bastyp/init.cxx). @@ -71,9 +69,9 @@ public: const css::lang::Locale& GetLocale( const LanguageType aLang ) { -if( !m_pLanguageTag || m_pLanguageTag->getLanguageType() != aLang ) -GetLocale_( aLang ); -return m_pLanguageTag->getLocale(); +if (!m_xLanguageTag || m_xLanguageTag->getLanguageType() != aLang) +GetLocale_(aLang); +return m_xLanguageTag->getLocale(); } const css::lang::Locale& GetLocale( const LanguageTag& rLanguageTag ) @@ -82,16 +80,16 @@ public: // because here the LanguageT
[Libreoffice-commits] core.git: Branch 'libreoffice-5-2-6' - sd/source
sd/source/ui/sidebar/SlideBackground.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 6580b64f3ca8992713ccaf02fb95f6993195969d Author: Markus Mohrhard Date: Thu Feb 23 00:32:12 2017 +0100 fix crash in the sidebar code The check should be for xPanel and not xPanels. See http://crashreport.libreoffice.org/stats/signature/sfx2::sidebar::Panel::GetTitleBar() Change-Id: I745d6d8abbfc68e86ed812460faa551867ddec43 Reviewed-on: https://gerrit.libreoffice.org/34560 Tested-by: Jenkins Reviewed-by: Markus Mohrhard (cherry picked from commit 0407200401358d3d565438800f55b61fc1a61794) Reviewed-on: https://gerrit.libreoffice.org/34564 Reviewed-by: Katarina Behrens (cherry picked from commit 95396dbcaf035655f1102480c146e6cbc9f44d70) Reviewed-on: https://gerrit.libreoffice.org/34625 Reviewed-by: Christian Lohmaier Tested-by: Katarina Behrens diff --git a/sd/source/ui/sidebar/SlideBackground.cxx b/sd/source/ui/sidebar/SlideBackground.cxx index dfe65a2..473cd94 100644 --- a/sd/source/ui/sidebar/SlideBackground.cxx +++ b/sd/source/ui/sidebar/SlideBackground.cxx @@ -335,7 +335,7 @@ void SlideBackground::SetPanelTitle( const OUString& rTitle ) return; Reference xPanel ( xPanels->getByName("SlideBackgroundPanel"), uno::UNO_QUERY); -if ( !xPanels.is() ) +if ( !xPanel.is() ) return; xPanel->setTitle( rTitle ); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] online.git: Branch 'private/Ashod/nonblocking' - 6 commits - net/Socket.hpp net/SslSocket.hpp wsd/FileServer.cpp wsd/FileServer.hpp wsd/LOOLWSD.cpp
net/Socket.hpp | 21 ++- net/SslSocket.hpp |2 - wsd/FileServer.cpp | 94 ++--- wsd/FileServer.hpp | 32 +++--- wsd/LOOLWSD.cpp| 15 +--- 5 files changed, 97 insertions(+), 67 deletions(-) New commits: commit 5244650ca327b8803a5469715ffdd0ac339d1aab Author: Ashod Nakashian Date: Mon Feb 27 08:55:42 2017 -0500 nb: shutdown socket after file-serving Change-Id: Ibe0b33f371d46e62637f570265fcdf9c8bf60b2d diff --git a/net/Socket.hpp b/net/Socket.hpp index 78cfb66..a5966aa 100644 --- a/net/Socket.hpp +++ b/net/Socket.hpp @@ -55,6 +55,13 @@ public: /// Returns the OS native socket fd. int getFD() const { return _fd; } +/// Shutdown the socket. +/// TODO: Support separate read/write shutdown. +virtual void shutdown() +{ +::shutdown(_fd, SHUT_RDWR); +} + /// Return a mask of events we should be polling for virtual int getPollEvents() = 0; diff --git a/net/SslSocket.hpp b/net/SslSocket.hpp index 0f43869..ada6568 100644 --- a/net/SslSocket.hpp +++ b/net/SslSocket.hpp @@ -55,7 +55,7 @@ public: } /// Shutdown the TLS/SSL connection properly. -void shutdown() +void shutdown() override { if (SSL_shutdown(_ssl) == 0) { diff --git a/wsd/LOOLWSD.cpp b/wsd/LOOLWSD.cpp index 617e0db..19ac013 100644 --- a/wsd/LOOLWSD.cpp +++ b/wsd/LOOLWSD.cpp @@ -2760,6 +2760,7 @@ private: LOG_DBG("FileServer request: " << request.getURI()); auto socket = _socket.lock(); FileServerRequestHandler::handleRequest(request, socket); +socket->shutdown(); } void handleAdminRequest(const Poco::Net::HTTPRequest& request) @@ -2789,6 +2790,7 @@ private: auto socket = _socket.lock(); socket->send(oss.str()); +socket->shutdown(); LOG_INF("Sent discovery.xml successfully."); } @@ -2804,6 +2806,7 @@ private: auto socket = _socket.lock(); HttpHelper::sendFile(socket, faviconPath, mimeType); +socket->shutdown(); } void handleWopiDiscoveryRequest(const Poco::Net::HTTPRequest& request) @@ -2853,6 +2856,7 @@ private: auto socket = _socket.lock(); socket->send(oss.str()); +socket->shutdown(); LOG_INF("Sent discovery.xml successfully."); } commit 8b753ecfae4d57ce490abc1f4aa40d6b57b10234 Author: Ashod Nakashian Date: Mon Feb 27 08:55:10 2017 -0500 nb: handle socket poll exceptions and remove socket Change-Id: Ibdee316f102d6606c38470e5ccacd2a7bd7ea7ce diff --git a/net/Socket.hpp b/net/Socket.hpp index 6542448..78cfb66 100644 --- a/net/Socket.hpp +++ b/net/Socket.hpp @@ -207,8 +207,18 @@ public: { if (_pollFds[i].revents) { -if (_pollSockets[i]->handlePoll(newNow, _pollFds[i].revents) == -Socket::HandleResult::SOCKET_CLOSED) +Socket::HandleResult res = Socket::HandleResult::SOCKET_CLOSED; +try +{ +res = _pollSockets[i]->handlePoll(newNow, _pollFds[i].revents); +} +catch (const std::exception& exc) +{ +LOG_ERR("Error while handling poll for socket #" << +_pollFds[i].fd << ": " << exc.what()); +} + +if (res == Socket::HandleResult::SOCKET_CLOSED) { LOG_DBG("Removing client #" << _pollFds[i].fd); _pollSockets.erase(_pollSockets.begin() + i); commit bf45b86f8236c7399d481ee4862f9143617b126a Author: Ashod Nakashian Date: Mon Feb 27 08:40:44 2017 -0500 nb: set the Date in http header Change-Id: I71e3388c1f204135c6dc72ad27890bffe53792b3 diff --git a/wsd/FileServer.cpp b/wsd/FileServer.cpp index 563ffe3..01d2473 100644 --- a/wsd/FileServer.cpp +++ b/wsd/FileServer.cpp @@ -180,7 +180,7 @@ void FileServerRequestHandler::handleRequest(const HTTPRequest& request, const s // Unauthorized. std::ostringstream oss; oss << "HTTP/1.1 401\r\n" -<< "Last-Modified: " << Poco::DateTimeFormatter::format(Poco::Timestamp(), Poco::DateTimeFormat::HTTP_FORMAT) << "\r\n" +<< "Date: " << Poco::DateTimeFormatter::format(Poco::Timestamp(), Poco::DateTimeFormat::HTTP_FORMAT) << "\r\n" << "User-Agent: LOOLWSD WOPI Agent\r\n" << "Content-Length: 0\r\n" << "WWW-Authenticate: Basic realm=\"online\"\r\n" @@ -194,7 +194,7 @@ void FileServerRequestHandler::handleRequest(const HTTPRequest& request, const s // TODO return some 403 page? std::ostringstream oss; oss << "HTTP/1.1 403\r\n" -<< "Last-Modified: " << Poco::DateTimeFormatter::format(Poco::Timestamp(), Poco::DateTimeFormat::HTTP_FORMAT) << "\r\n" +<< "Date: " << Poco::DateTim
[Libreoffice-commits] core.git: android/source
android/source/AndroidManifest.xml |2 android/source/res/values/strings.xml |4 - android/source/src/java/org/libreoffice/storage/IDocumentProvider.java |7 + android/source/src/java/org/libreoffice/storage/external/ExtsdDocumentsProvider.java |5 + android/source/src/java/org/libreoffice/storage/external/LegacyExtSDDocumentsProvider.java |6 + android/source/src/java/org/libreoffice/storage/external/OTGDocumentsProvider.java |7 + android/source/src/java/org/libreoffice/storage/local/LocalDocumentsProvider.java |5 + android/source/src/java/org/libreoffice/storage/owncloud/OwnCloudProvider.java |5 + android/source/src/java/org/libreoffice/ui/LibreOfficeUIActivity.java | 39 ++ 9 files changed, 78 insertions(+), 2 deletions(-) New commits: commit 5ada20b3588f76cad5b7f39442147fca3d63bec7 Author: brainbreaker Date: Sun Feb 26 02:27:43 2017 +0530 Improve the Document Provider UX This commit improves the user experience of different Document Providers in the app. In case ext sd card is not present, the option is disabled in Navigation Menu. If the device does not support USB OTG, the option is disabled. LibreOfficeUIActivity registers a broadcast receiver in onCreate which detects if a USB device is connected and directs the user to Settings page to configure it. In case of errors in configuration in any case, user is directed to Settings activity after appropriate toast. Change-Id: I680f78a679e2071ce8330c8168d7aa4e95041723 Reviewed-on: https://gerrit.libreoffice.org/34650 Tested-by: Jenkins Reviewed-by: Aleksandar StefanoviÄ diff --git a/android/source/AndroidManifest.xml b/android/source/AndroidManifest.xml index 7e35208..601f478 100644 --- a/android/source/AndroidManifest.xml +++ b/android/source/AndroidManifest.xml @@ -4,6 +4,8 @@ + + diff --git a/android/source/res/values/strings.xml b/android/source/res/values/strings.xml index ff4a183..9832d8b 100644 --- a/android/source/res/values/strings.xml +++ b/android/source/res/values/strings.xml @@ -65,12 +65,13 @@ External SD OTG device (experimental) Remote server +USB connected, configure your device. Cannot connect to ownCloud server. Check your configuration. Cannot log into ownCloud server. Check your configuration. Unspecified error connecting to ownCloud server. Check your configuration and/or try later. -Invalid root file. Check your configuration. +Invalid root file. Check your sd card configuration. Invalid root file. Check your external sd card and/or configuration. Invalid root file. Check your OTG device and/or configuration. @@ -118,5 +119,4 @@ NO - diff --git a/android/source/src/java/org/libreoffice/storage/IDocumentProvider.java b/android/source/src/java/org/libreoffice/storage/IDocumentProvider.java index edb026f..2b0460a 100644 --- a/android/source/src/java/org/libreoffice/storage/IDocumentProvider.java +++ b/android/source/src/java/org/libreoffice/storage/IDocumentProvider.java @@ -54,4 +54,11 @@ public interface IDocumentProvider { * @return Unique ID for a document provider instance. */ int getId(); + +/** + * Checks if the Document Provider is available or not. + * + * @return A boolean value based on provider availability. + */ +boolean checkProviderAvailability(); } diff --git a/android/source/src/java/org/libreoffice/storage/external/ExtsdDocumentsProvider.java b/android/source/src/java/org/libreoffice/storage/external/ExtsdDocumentsProvider.java index abbfca9..4ce77f0 100644 --- a/android/source/src/java/org/libreoffice/storage/external/ExtsdDocumentsProvider.java +++ b/android/source/src/java/org/libreoffice/storage/external/ExtsdDocumentsProvider.java @@ -148,6 +148,11 @@ public class ExtsdDocumentsProvider implements IExternalDocumentProvider, } @Override +public boolean checkProviderAvailability() { +return Environment.getExternalStorageState().equals(Environment.MEDIA_MOUNTED) && Environment.isExternalStorageRemovable(); +} + +@Override public void onSharedPreferenceChanged(SharedPreferences preferences, String key) { if (key.equals(DocumentProviderSettingsActivity.KEY_PREF_EXTERNAL_SD_PATH_URI)) { rootPathURI = preferences.getString(key, ""); diff --git a/android/source/src/java/org/libreoffice/storage/external/LegacyExtSDDocumentsProvider.java b/android/source/src/java/org/libreoffice/storage/external/LegacyExtSDDocumentsProvider.java index 0ded177..1ac3440 100644 --- a/android/source/src/java/org/libreoffice/storage/external/LegacyExtSDDocumentsProvider.java +++ b/android/s
[Libreoffice-commits] core.git: Branch 'libreoffice-5-2-6' - sc/source
sc/source/ui/undo/undoblk3.cxx |8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) New commits: commit 06a3f692dc853f1762927370dcc34bc50273273d Author: Eike Rathke Date: Fri Feb 17 23:54:21 2017 +0100 Resolves: tdf#105667 forget target area's caption pointer in Merge Undo It's the same that was copied to the Undo document, so don't delete the caption. (cherry picked from commit a627c44026fcf883918f84bddd1c3b745e1f898c) Change-Id: Ib89870ed6e392c4271de2f416c78d42135922609 Reviewed-on: https://gerrit.libreoffice.org/34386 Reviewed-by: Christian Lohmaier Reviewed-by: Kohei Yoshida Tested-by: Markus Mohrhard Reviewed-by: Markus Mohrhard diff --git a/sc/source/ui/undo/undoblk3.cxx b/sc/source/ui/undo/undoblk3.cxx index 3072d0c..ff43c28 100644 --- a/sc/source/ui/undo/undoblk3.cxx +++ b/sc/source/ui/undo/undoblk3.cxx @@ -701,7 +701,13 @@ void ScUndoMerge::DoChange( bool bUndo ) const // undo -> copy back deleted contents if (bUndo && mpUndoDoc) { -rDoc.DeleteAreaTab( aRange, InsertDeleteFlags::CONTENTS|InsertDeleteFlags::NOCAPTIONS ); +// If there are note captions to be deleted during Undo they were +// kept or moved during the merge and copied to the Undo document +// without cloning the caption. Forget the target area's caption +// pointer that is identical to the one in the Undo document +// instead of deleting it. +rDoc.DeleteAreaTab( aRange, +InsertDeleteFlags::CONTENTS | InsertDeleteFlags::NOCAPTIONS | InsertDeleteFlags::FORGETCAPTIONS ); mpUndoDoc->CopyToDocument( aRange, InsertDeleteFlags::ALL|InsertDeleteFlags::NOCAPTIONS, false, &rDoc ); } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: vcl/source
vcl/source/control/tabctrl.cxx |3 +++ 1 file changed, 3 insertions(+) New commits: commit 4d73a7227f4f341aece7ab3376823f70a3e87d71 Author: Szymon KÅos Date: Mon Feb 27 12:35:49 2017 +0100 tdf#102779 Notebookbar: extra space for small tab labels Change-Id: I2cd7be7ef49552acd84aa4b5042955dcb18f328f Reviewed-on: https://gerrit.libreoffice.org/34679 Tested-by: Jenkins Reviewed-by: Szymon KÅos diff --git a/vcl/source/control/tabctrl.cxx b/vcl/source/control/tabctrl.cxx index 2a6470d..7e8145d 100644 --- a/vcl/source/control/tabctrl.cxx +++ b/vcl/source/control/tabctrl.cxx @@ -2397,6 +2397,9 @@ bool NotebookbarTabControl::ImplPlaceTabs( long nWidth ) nLinePosAry[nLines] = nPos; } +if( !it->maText.isEmpty() && aSize.getWidth() < 100) +aSize.Width() = 100; + Rectangle aNewRect( Point( nX, nY ), aSize ); if ( mbSmallInvalidate && (it->maRect != aNewRect) ) mbSmallInvalidate = false; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
Re: how to check if my local copy of translations is really up-to-date?
Hi Christian, *, Le 27/02/2017 à 13:09, Christian Lohmaier a écrit : [...] Ah!, good catch. It is the way the po files are processed/generated. It is picky about the syntax. In this case, the } ; is the problem. This will make the po-parsing/translation processing add the next identifier to the context of all strings that follow, making them not match anymore.. Thank you very much, it's fixed now in my builds for 5.3.2.0.0+ and 5.2.7.0.0+. I will build the master next night. I guess that this fix solves the problem with the keyID that are not shown in these tooltips. Best regards. JBF -- Seuls des formats ouverts peuvent assurer la pérennité de vos documents. Disclaimer: my Internet Provider being located in France, each of our exchanges over Internet will be scanned by French spying services. ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice
[Libreoffice-commits] core.git: lotuswordpro/source
lotuswordpro/source/filter/lwpidxmgr.cxx | 60 ++- lotuswordpro/source/filter/lwpidxmgr.hxx |8 ++-- 2 files changed, 24 insertions(+), 44 deletions(-) New commits: commit b06e2b7ef157affa71fe60f4b064f67b11024213 Author: Caolán McNamara Date: Mon Feb 27 14:24:37 2017 + ofz: fix leak Change-Id: I00e73eabb34ae98088a8e88d0c8677bf236a5e09 diff --git a/lotuswordpro/source/filter/lwpidxmgr.cxx b/lotuswordpro/source/filter/lwpidxmgr.cxx index ff7fc21..640c42f 100644 --- a/lotuswordpro/source/filter/lwpidxmgr.cxx +++ b/lotuswordpro/source/filter/lwpidxmgr.cxx @@ -73,30 +73,13 @@ const sal_uInt8 LwpIndexManager::MAXOBJECTIDS = 255; LwpIndexManager::LwpIndexManager() -:m_nKeyCount(0), m_nLeafCount(0) +: m_nKeyCount(0) +, m_nLeafCount(0) { - m_TempVec.resize( LwpIndexManager::MAXOBJECTIDS ); } -LwpIndexManager::~LwpIndexManager() -{ -//Clear m_ObjectKeys -std::vector::iterator it; - -for( it = m_ObjectKeys.begin(); it != m_ObjectKeys.end(); ++it ) -{ -LwpKey* pKey = *it; -if( pKey ) -{ -delete pKey; -pKey = nullptr; -} -} -m_ObjectKeys.clear(); -} - /** * @descr Read all index records, VO_ROOTLEAFOBJINDEX, VO_ROOTOBJINDEX, VO_LEAFOBJINDEX */ @@ -159,21 +142,20 @@ void LwpIndexManager::ReadRootData(LwpObjectStream* pObjStrm) if (KeyCount) { //read object keys -LwpKey* akey = new LwpKey; -akey->id.Read(pObjStrm); +LwpKey akey; +akey.id.Read(pObjStrm); m_RootObjs.push_back(akey); sal_uInt16 k = 0; for (k = 1; k < KeyCount; k++) { -akey = new LwpKey; -akey->id.ReadCompressed(pObjStrm, m_RootObjs[k-1]->id); +akey.id.ReadCompressed(pObjStrm, m_RootObjs[k-1].id); m_RootObjs.push_back(akey); } for (k = 0; k < KeyCount; k++) -m_RootObjs[k]->offset = pObjStrm->QuickReaduInt32(); +m_RootObjs[k].offset = pObjStrm->QuickReaduInt32(); //read leaf index offset for (k = 0; k < m_nLeafCount; k++) @@ -193,25 +175,24 @@ void LwpIndexManager::ReadObjIndexData(LwpObjectStream* pObjStrm) sal_uInt16 KeyCount = pObjStrm->QuickReaduInt16(); sal_uInt16 LeafCount = KeyCount + 1; -std::vector vObjIndexs; +std::vector vObjIndexs; if(KeyCount) { -LwpKey* akey = new LwpKey; -akey->id.Read(pObjStrm); +LwpKey akey; +akey.id.Read(pObjStrm); vObjIndexs.push_back(akey); sal_uInt16 k = 0; for (k = 1; k < KeyCount; k++) { -akey = new LwpKey; -akey->id.ReadCompressed(pObjStrm, vObjIndexs[k-1]->id); +akey.id.ReadCompressed(pObjStrm, vObjIndexs[k-1].id); vObjIndexs.push_back(akey); } for (k = 0; k < KeyCount; k++) -vObjIndexs[k]->offset = pObjStrm->QuickReaduInt32(); +vObjIndexs[k].offset = pObjStrm->QuickReaduInt32(); for (k = 0; k < LeafCount; k++) m_TempVec.at(k) = pObjStrm->QuickReaduInt32(); @@ -281,20 +262,19 @@ void LwpIndexManager::ReadLeafData( LwpObjectStream *pObjStrm ) if(KeyCount) { -LwpKey* akey = new LwpKey; +LwpKey akey; //read object keys: id & offset -akey->id.Read(pObjStrm); +akey.id.Read(pObjStrm); m_ObjectKeys.push_back(akey); for (sal_uInt16 k = 1; k < KeyCount; k++) { -akey = new LwpKey; -akey->id.ReadCompressed(pObjStrm, m_ObjectKeys.at(m_nKeyCount+k-1)->id); +akey.id.ReadCompressed(pObjStrm, m_ObjectKeys.at(m_nKeyCount+k-1).id); m_ObjectKeys.push_back(akey); } for (sal_uInt16 j = 0; j < KeyCount; j++) -m_ObjectKeys.at(m_nKeyCount+j)->offset = pObjStrm->QuickReaduInt32(); +m_ObjectKeys.at(m_nKeyCount+j).offset = pObjStrm->QuickReaduInt32(); } m_nKeyCount += KeyCount; } @@ -326,17 +306,17 @@ sal_uInt32 LwpIndexManager::GetObjOffset( LwpObjectID objid ) { M = (L + U) >> 1; -if (objid.GetLow() > m_ObjectKeys[M]->id.GetLow()) +if (objid.GetLow() > m_ObjectKeys[M].id.GetLow()) L = M + 1; -else if (objid.GetLow() < m_ObjectKeys[M]->id.GetLow()) +else if (objid.GetLow() < m_ObjectKeys[M].id.GetLow()) U = M; -else if (objid.GetHigh() > m_ObjectKeys[M]->id.GetHigh()) +else if (objid.GetHigh() > m_ObjectKeys[M].id.GetHigh()) L = M + 1; -else if (objid.GetHigh() < m_ObjectKeys[M]->id.GetHigh()) +else if (objid.GetHigh() < m_ObjectKeys[M].id.GetHigh()) U = M; else { -return(m_ObjectKeys[M]->offset); +return(m_ObjectKeys[M].offset); } } return BAD_OFFSET; diff --git a/lotuswordp
[Libreoffice-commits] online.git: Branch 'private/Ashod/nonblocking' - net/WebSocketHandler.hpp
net/WebSocketHandler.hpp |4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) New commits: commit c803fb129d9a00d41ed8132e93029cfe2d6c5a4f Author: Michael Meeks Date: Mon Feb 27 14:34:48 2017 + Add debug, and set the 'fin' bit on messages as we send them. diff --git a/net/WebSocketHandler.hpp b/net/WebSocketHandler.hpp index d76e6aa..d4b6073 100644 --- a/net/WebSocketHandler.hpp +++ b/net/WebSocketHandler.hpp @@ -116,6 +116,8 @@ public: socket->_inBuffer.erase(socket->_inBuffer.begin(), socket->_inBuffer.begin() + headerLen + payloadLen); // FIXME: fin, aggregating payloads into _wsPayload etc. +LOG_TRC("Incoming WebSocket message code " << code << " fin? " << fin << " payload length " << _wsPayload.size()); + handleMessage(fin, code, _wsPayload); _wsPayload.clear(); } @@ -132,7 +134,7 @@ public: if (socket == nullptr) return 0; // no socket == connection closed. -bool fin = false; +bool fin = true; bool mask = false; auto lock = socket->getWriteLock(); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: include/filter
include/filter/msfilter/svdfppt.hxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 1866335fe6b59ce7943b6e5f934a3592ac81ae8a Author: Stephan Bergmann Date: Mon Feb 27 15:36:24 2017 +0100 Clean up use of integer types Change-Id: Idf47d1511aff3cdb7c139671173a97e405b6078e diff --git a/include/filter/msfilter/svdfppt.hxx b/include/filter/msfilter/svdfppt.hxx index c853a16..36227d0 100644 --- a/include/filter/msfilter/svdfppt.hxx +++ b/include/filter/msfilter/svdfppt.hxx @@ -535,7 +535,7 @@ protected: PptColorSchemeAtom aPageColors; ::std::vector< SdHyperlinkEntry* > aHyperList; sal_uInt32* pPersistPtr; -sal_uLong nPersistPtrAnz; +sal_uInt32 nPersistPtrAnz; const PPTStyleSheet*pPPTStyleSheet; // this is the current stylesheet; const PPTStyleSheet*pDefaultSheet; // this is a sheet we are using if no masterpage can be found, but that should ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: lotuswordpro/source
lotuswordpro/source/filter/lwpsilverbullet.cxx | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) New commits: commit 299a1ef9f2197f253ac887bac46d6e0dcd0d6378 Author: Caolán McNamara Date: Mon Feb 27 15:05:20 2017 + ofz: fix leak Change-Id: I7f490335efef71b13aae66e9467cd74429509d7d diff --git a/lotuswordpro/source/filter/lwpsilverbullet.cxx b/lotuswordpro/source/filter/lwpsilverbullet.cxx index 4446aed..b837023 100644 --- a/lotuswordpro/source/filter/lwpsilverbullet.cxx +++ b/lotuswordpro/source/filter/lwpsilverbullet.cxx @@ -107,7 +107,7 @@ void LwpSilverBullet::Read() */ void LwpSilverBullet::RegisterStyle() { -XFListStyle* pListStyle = new XFListStyle(); +std::unique_ptr xListStyle(new XFListStyle()); XFStyleManager* pXFStyleManager = LwpGlobalMgr::GetInstance()->GetXFStyleManager(); GetBulletPara(); @@ -146,11 +146,11 @@ void LwpSilverBullet::RegisterStyle() } //set numbering format into the style-list. -pListStyle->SetListNumber(nPos, aFmt, pParaNumber->GetStart()+1); +xListStyle->SetListNumber(nPos, aFmt, pParaNumber->GetStart()+1); if (bCumulative && nPos > 1) { -pListStyle->SetDisplayLevel(nPos, nDisplayLevel); +xListStyle->SetDisplayLevel(nPos, nDisplayLevel); } } @@ -166,18 +166,18 @@ void LwpSilverBullet::RegisterStyle() aSuffix = aParaNumbering.pSuffix->GetText(); } -pListStyle->SetListBullet(nPos, GetNumCharByStyleID(pParaNumber), +xListStyle->SetListBullet(nPos, GetNumCharByStyleID(pParaNumber), "Times New Roman", aPrefix, aSuffix); } -pListStyle->SetListPosition(nPos, 0.0, 0.635, 0.0); +xListStyle->SetListPosition(nPos, 0.0, 0.635, 0.0); aParaNumbering.clear(); } } } //add style-list to style manager. -m_strStyleName = pXFStyleManager->AddStyle(pListStyle).m_pStyle->GetStyleName(); +m_strStyleName = pXFStyleManager->AddStyle(xListStyle.release()).m_pStyle->GetStyleName(); } /** ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: lotuswordpro/source
lotuswordpro/source/filter/lwppagelayout.cxx | 16 +++- 1 file changed, 7 insertions(+), 9 deletions(-) New commits: commit aee31a4e8fa6c6f49f70945c5675085d938651ef Author: Caolán McNamara Date: Mon Feb 27 15:32:28 2017 + ofz: fix leak Change-Id: I682b4e2750658efded5f4167d4f7026ed5fac8dc diff --git a/lotuswordpro/source/filter/lwppagelayout.cxx b/lotuswordpro/source/filter/lwppagelayout.cxx index 2d95ac7..078ea71 100644 --- a/lotuswordpro/source/filter/lwppagelayout.cxx +++ b/lotuswordpro/source/filter/lwppagelayout.cxx @@ -919,23 +919,21 @@ void LwpFooterLayout::Read() void LwpFooterLayout::RegisterStyle(XFPageMaster* pm1) { -XFFooterStyle* pFooterStyle = new XFFooterStyle(); +std::unique_ptr xFooterStyle(new XFFooterStyle()); //Modify page bottom margin //page bottom margin: from bottom of footer to the bottom edge double bottom = GetMarginsValue(MARGIN_BOTTOM); pm1->SetMargins(-1, -1, -1, bottom); -ParseMargins(pFooterStyle); -ParseBorder(pFooterStyle); -ParseShadow(pFooterStyle); -ParseBackGround(pFooterStyle); -// ParseBackColor(pFooterStyle); +ParseMargins(xFooterStyle.get()); +ParseBorder(xFooterStyle.get()); +ParseShadow(xFooterStyle.get()); +ParseBackGround(xFooterStyle.get()); -ParseWaterMark(pFooterStyle); -//End by +ParseWaterMark(xFooterStyle.get()); -pm1->SetFooterStyle(pFooterStyle); +pm1->SetFooterStyle(xFooterStyle.release()); } void LwpFooterLayout::ParseMargins(XFFooterStyle* pFooterStyle) ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: include/xmlsecurity vcl/qa xmlsecurity/source
include/xmlsecurity/pdfio/pdfdocument.hxx | 33 ++ vcl/qa/cppunit/pdfexport/data/tdf105093.odp |binary vcl/qa/cppunit/pdfexport/pdfexport.cxx | 50 xmlsecurity/source/pdfio/pdfdocument.cxx| 36 ++-- 4 files changed, 88 insertions(+), 31 deletions(-) New commits: commit 64bac5c0f005afd46bbf402c5d548e2ee6c9e5c4 Author: Miklos Vajna Date: Mon Feb 27 14:29:03 2017 +0100 tdf#105093 vcl PDF export: add embedded video testcase Fails with commit 4ad249af88d15f2c8a09f0721a59d82718fcc201 (tdf#105093 sd PDF export: handle embedded videos, 2017-01-04) reverted. Change-Id: I413ec9a5da3c0783541dcd28fb9a62dd896f955b Reviewed-on: https://gerrit.libreoffice.org/34681 Reviewed-by: Miklos Vajna Tested-by: Jenkins diff --git a/include/xmlsecurity/pdfio/pdfdocument.hxx b/include/xmlsecurity/pdfio/pdfdocument.hxx index 5a8ea6c..5f64b65 100644 --- a/include/xmlsecurity/pdfio/pdfdocument.hxx +++ b/include/xmlsecurity/pdfio/pdfdocument.hxx @@ -90,6 +90,37 @@ public: void SetStreamBuffer(std::unique_ptr& pStreamBuffer); }; +/// Array object: a list. +class XMLSECURITY_DLLPUBLIC PDFArrayElement : public PDFElement +{ +/// Location after the '[' token. +sal_uInt64 m_nOffset = 0; +std::vector m_aElements; +public: +PDFArrayElement(); +bool Read(SvStream& rStream) override; +void PushBack(PDFElement* pElement); +const std::vector& GetElements(); +}; + +/// Reference object: something with a unique ID. +class XMLSECURITY_DLLPUBLIC PDFReferenceElement : public PDFElement +{ +PDFDocument& m_rDoc; +int m_fObjectValue; +int m_fGenerationValue; + +public: +PDFReferenceElement(PDFDocument& rDoc, int fObjectValue, int fGenerationValue); +bool Read(SvStream& rStream) override; +/// Assuming the reference points to a number object, return its value. +double LookupNumber(SvStream& rStream) const; +/// Lookup referenced object, without assuming anything about its contents. +PDFObjectElement* LookupObject(); +int GetObjectValue() const; +int GetGenerationValue() const; +}; + /// Stream object: a byte array with a known length. class XMLSECURITY_DLLPUBLIC PDFStreamElement : public PDFElement { @@ -146,6 +177,8 @@ public: const std::map& GetItems() const; /// Looks up an object which is only referenced in this dictionary. PDFObjectElement* LookupObject(const OString& rDictionaryKey); +/// Looks up an element which is contained in this dictionary. +PDFElement* LookupElement(const OString& rDictionaryKey); }; enum class TokenizeMode diff --git a/vcl/qa/cppunit/pdfexport/data/tdf105093.odp b/vcl/qa/cppunit/pdfexport/data/tdf105093.odp new file mode 100644 index 000..82ce29c Binary files /dev/null and b/vcl/qa/cppunit/pdfexport/data/tdf105093.odp differ diff --git a/vcl/qa/cppunit/pdfexport/pdfexport.cxx b/vcl/qa/cppunit/pdfexport/pdfexport.cxx index 1c665b8..af6e86b 100644 --- a/vcl/qa/cppunit/pdfexport/pdfexport.cxx +++ b/vcl/qa/cppunit/pdfexport/pdfexport.cxx @@ -42,12 +42,15 @@ public: void testTdf106059(); /// Tests that text highlight from Impress is not lost. void testTdf105461(); +/// Tests that embedded video from Impress is not exported as a linked one. +void testTdf105093(); #endif CPPUNIT_TEST_SUITE(PdfExportTest); #if HAVE_FEATURE_PDFIUM CPPUNIT_TEST(testTdf106059); CPPUNIT_TEST(testTdf105461); +CPPUNIT_TEST(testTdf105093); #endif CPPUNIT_TEST_SUITE_END(); }; @@ -150,6 +153,53 @@ void PdfExportTest::testTdf105461() // This failed, stream contained no filled rectangle. CPPUNIT_ASSERT(it != pEnd); } + +void PdfExportTest::testTdf105093() +{ +// Import the bugdoc and export as PDF. +OUString aURL = m_directories.getURLFromSrc(DATA_DIRECTORY) + "tdf105093.odp"; +mxComponent = loadFromDesktop(aURL); +CPPUNIT_ASSERT(mxComponent.is()); + +uno::Reference xStorable(mxComponent, uno::UNO_QUERY); +utl::TempFile aTempFile; +aTempFile.EnableKillingFile(); +utl::MediaDescriptor aMediaDescriptor; +aMediaDescriptor["FilterName"] <<= OUString("impress_pdf_Export"); +xStorable->storeToURL(aTempFile.GetURL(), aMediaDescriptor.getAsConstPropertyValueList()); + +// Parse the export result. +xmlsecurity::pdfio::PDFDocument aDocument; +SvFileStream aStream(aTempFile.GetURL(), StreamMode::READ); +CPPUNIT_ASSERT(aDocument.Read(aStream)); + +// The document has one page. +std::vector aPages = aDocument.GetPages(); +CPPUNIT_ASSERT_EQUAL(static_cast(1), aPages.size()); + +// Get page annotations. +auto pAnnots = dynamic_cast(aPages[0]->Lookup("Annots")); +CPPUNIT_ASSERT(pAnnots); +CPPUNIT_ASSERT_EQUAL(static_cast(1), pAnnots->GetElements().size()); +auto pAnnotReference = dynamic_cast(pAnnots->GetElements()[0]); +CPPUNIT_ASSERT(pAnnotReference); +xmlsecurity::pdfio::
[Libreoffice-commits] core.git: Branch 'feature/pivotcharts' - 2 commits - sc/inc sc/source
sc/inc/PivotChartDataSequence.hxx | 11 + sc/source/ui/unoobj/PivotChartDataProvider.cxx | 145 ++--- sc/source/ui/unoobj/PivotChartDataSequence.cxx | 32 +++-- 3 files changed, 69 insertions(+), 119 deletions(-) New commits: commit 269f174df0a396294669e0b10cd7f73897c987d0 Author: Tomaž Vajngerl Date: Mon Feb 27 16:43:10 2017 +0100 pivotcharts: set the correct number format for categories Change-Id: I54980c3fbf37816c77fee549fe8b9728ae76ba28 diff --git a/sc/inc/PivotChartDataSequence.hxx b/sc/inc/PivotChartDataSequence.hxx index c6655bb..6f4cc7c 100644 --- a/sc/inc/PivotChartDataSequence.hxx +++ b/sc/inc/PivotChartDataSequence.hxx @@ -51,25 +51,29 @@ struct PivotChartItem double m_fValue; OUString m_aString; bool m_bIsValue; +sal_uInt32 m_nNumberFormat; explicit PivotChartItem() : m_fValue(0.0) , m_aString() , m_bIsValue(true) +, m_nNumberFormat(0) { rtl::math::setNan(&m_fValue); } -explicit PivotChartItem(double fValue) +explicit PivotChartItem(double fValue, sal_uInt32 nNumberFormat) : m_fValue(fValue) , m_aString() , m_bIsValue(true) +, m_nNumberFormat(nNumberFormat) {} explicit PivotChartItem(OUString const & rString) : m_fValue(0.0) , m_aString(rString) , m_bIsValue(false) +, m_nNumberFormat(0) { rtl::math::setNan(&m_fValue); } diff --git a/sc/source/ui/unoobj/PivotChartDataProvider.cxx b/sc/source/ui/unoobj/PivotChartDataProvider.cxx index c5b9e40..520244c 100644 --- a/sc/source/ui/unoobj/PivotChartDataProvider.cxx +++ b/sc/source/ui/unoobj/PivotChartDataProvider.cxx @@ -279,6 +279,7 @@ uno::Reference PivotChartDataProvider::createPivotCha sheet::DataPilotFieldOrientation_HIDDEN)); long nDimPos = ScUnoHelpFunctions::GetLongProperty(xDimProp, SC_UNO_DP_POSITION); +sal_Int32 nNumberFormat = ScUnoHelpFunctions::GetLongProperty(xDimProp, SC_UNO_DP_NUMBERFO); if (eDimOrient != sheet::DataPilotFieldOrientation_HIDDEN) { @@ -337,17 +338,29 @@ uno::Reference PivotChartDataProvider::createPivotCha if (rMember.Flags & sheet::MemberResultFlags::HASMEMBER || rMember.Flags & sheet::MemberResultFlags::CONTINUE) { -OUString sValue; -if (!(rMember.Flags & sheet::MemberResultFlags::CONTINUE)) -sValue = rMember.Caption; +std::unique_ptr pItem; + +double fValue = rMember.Value; + +if (rtl::math::isNan(fValue)) +{ +OUString sValue; +if (!(rMember.Flags & sheet::MemberResultFlags::CONTINUE)) +sValue = rMember.Caption; +pItem.reset(new PivotChartItem(sValue)); +} +else +{ +pItem.reset(new PivotChartItem(fValue, nNumberFormat)); +} if (size_t(nDimPos) >= m_aCategoriesColumnOrientation.size()) m_aCategoriesColumnOrientation.resize(nDimPos + 1); - m_aCategoriesColumnOrientation[nDimPos].push_back(PivotChartItem(sValue)); + m_aCategoriesColumnOrientation[nDimPos].push_back(*pItem); if (size_t(nDimPos) >= m_aCategoriesRowOrientation[i].size()) m_aCategoriesRowOrientation[i].resize(nDimPos + 1); - m_aCategoriesRowOrientation[i][nDimPos] = PivotChartItem(sValue); + m_aCategoriesRowOrientation[i][nDimPos] = *pItem; i++; } @@ -393,7 +406,7 @@ uno::Reference PivotChartDataProvider::createPivotCha if (nIndex >= aDataRowVector.size()) aDataRowVector.resize(nIndex + 1); - aDataRowVector[nIndex].push_back(PivotChartItem(rDataResult.Flags ? rDataResult.Value : fNan)); + aDataRowVector[nIndex
[Libreoffice-commits] core.git: include/sfx2 sfx2/source
include/sfx2/classificationhelper.hxx |3 include/sfx2/infobar.hxx | 40 +++- include/sfx2/viewfrm.hxx |8 - sfx2/source/dialog/infobar.cxx| 150 -- sfx2/source/view/classificationhelper.cxx | 54 -- sfx2/source/view/sfxbasecontroller.cxx|2 sfx2/source/view/viewfrm.cxx | 19 --- 7 files changed, 125 insertions(+), 151 deletions(-) New commits: commit bd8c68c99cce51a3368d8ddfd6e11dccb72d8f49 Author: heiko tietze Date: Sun Feb 19 12:41:01 2017 +0100 tdf#105829 Infobar design, tdf#102785 Font issue Only one constructor to append an infobar Colors defined at one place in infobar.cxx based on InfoBarType Icons as an additional attribute of the notification Change-Id: I4dc85c2b4ef0b7eafc139290b3b4ee21636da6ec Reviewed-on: https://gerrit.libreoffice.org/34426 Tested-by: Jenkins Reviewed-by: Heiko Tietze diff --git a/include/sfx2/classificationhelper.hxx b/include/sfx2/classificationhelper.hxx index 18dd351..3ad53c6 100644 --- a/include/sfx2/classificationhelper.hxx +++ b/include/sfx2/classificationhelper.hxx @@ -17,6 +17,7 @@ #include #include +#include class SfxObjectShell; class SfxViewFrame; @@ -66,7 +67,7 @@ public: void SetBACName(const OUString& rName, SfxClassificationPolicyType eType); /// If GetImpactScale() and GetImpactLevel*() will return something meaningful. bool HasImpactLevel(); -basegfx::BColor GetImpactLevelColor(); +InfoBarType GetImpactLevelType(); /// Larger value means more confidential. sal_Int32 GetImpactLevel(); /// Comparing the GetImpactLevel() result is only meaningful when the impact scale is the same. diff --git a/include/sfx2/infobar.hxx b/include/sfx2/infobar.hxx index 3043a2f..d78aed2 100644 --- a/include/sfx2/infobar.hxx +++ b/include/sfx2/infobar.hxx @@ -18,6 +18,13 @@ #include #include +enum class InfoBarType { +Info, +Success, +Warning, +Danger +}; + /** SfxChildWindow for positioning the InfoBar in the view. */ class SFX2_DLLPUBLIC SfxInfoBarContainerChild : public SfxChildWindow @@ -43,25 +50,24 @@ class SfxInfoBarWindow : public vcl::Window { private: OUString m_sId; -VclPtr m_pMessage; -VclPtr m_pCloseBtn; +VclPtrm_pImage; +VclPtr m_pMessage; +VclPtrm_pCloseBtn; std::vector< VclPtr > m_aActionBtns; -basegfx::BColorm_aBackgroundColor; -basegfx::BColorm_aForegroundColor; public: SfxInfoBarWindow( vcl::Window* parent, const OUString& sId, const OUString& sMessage, - const basegfx::BColor* pBackgroundColor, - const basegfx::BColor* pForegroundColor, - const basegfx::BColor* pMessageColor, - WinBits nMessageStyle ); + InfoBarType infoBarType, + WinBits nMessageStyle); virtual ~SfxInfoBarWindow( ) override; virtual void dispose() override; const OUString& getId() const { return m_sId; } virtual void Paint( vcl::RenderContext& rRenderContext, const Rectangle& ) override; virtual void Resize( ) override; +basegfx::BColorm_aBackgroundColor; +basegfx::BColorm_aForegroundColor; /** Add button to Infobar. * Infobar takes ownership of the button so the button is @@ -73,14 +79,6 @@ class SfxInfoBarWindow : public vcl::Window DECL_LINK( CloseHandler, Button*, void ); }; - -enum class InfoBarType { -Info, -Success, -Warning, -Danger -}; - class SfxInfoBarContainerWindow : public vcl::Window { private: @@ -94,14 +92,8 @@ class SfxInfoBarContainerWindow : public vcl::Window VclPtr appendInfoBar(const OUString& sId, const OUString& sMessage, -InfoBarType aInfoBarType, -WinBits nMessageStyle); -VclPtr appendInfoBar(const OUString& sId, -const OUString& sMessage, -const basegfx::BColor* pBackgroundColor, -const basegfx::BColor* pForegroundColor, -const basegfx::BColor* pMessageColor, -WinBits nMessageStyle); +InfoBarType ibType, +WinBits nMessageStyle = WB_LEFT|WB_VCENTER); VclPtr getInfoBar(const OUString& sId); void removeInfoBar(VclPtr const & pInfoBar
[Libreoffice-commits] core.git: Branch 'feature/pivotcharts' - sc/inc sc/source
sc/inc/PivotChartDataProvider.hxx |5 sc/source/ui/unoobj/PivotChartDataProvider.cxx | 207 - 2 files changed, 109 insertions(+), 103 deletions(-) New commits: commit ddb88bbbe04f52206d71f4184d6f5863579cf422 Author: Tomaž Vajngerl Date: Mon Feb 27 16:59:11 2017 +0100 pivotcharts: extract and simplify pivot table data collection Change-Id: I49b0c4d06c3401f07ab3d2857213b12f109f0d8b diff --git a/sc/inc/PivotChartDataProvider.hxx b/sc/inc/PivotChartDataProvider.hxx index e92f847..d1139a5 100644 --- a/sc/inc/PivotChartDataProvider.hxx +++ b/sc/inc/PivotChartDataProvider.hxx @@ -29,7 +29,7 @@ #include #include -#include "dpsave.hxx" +#include "dpobject.hxx" #include #include @@ -140,6 +140,8 @@ private: css::uno::Reference& rContext, std::vector>& rOutLabeledSequences); +void collectPivotTableData(ScDPObject* pDPObject); + ScDocument*m_pDocument; OUString m_sPivotTableName; SfxItemPropertySet m_aPropSet; @@ -147,6 +149,7 @@ private: std::vector> m_aCategoriesColumnOrientation; std::vector> m_aCategoriesRowOrientation; +std::vector> m_aLabels; std::vector> m_aValueListeners; }; diff --git a/sc/source/ui/unoobj/PivotChartDataProvider.cxx b/sc/source/ui/unoobj/PivotChartDataProvider.cxx index 520244c..8d9b3e1 100644 --- a/sc/source/ui/unoobj/PivotChartDataProvider.cxx +++ b/sc/source/ui/unoobj/PivotChartDataProvider.cxx @@ -36,8 +36,6 @@ #include #include "dpobject.hxx" -#include "dpsave.hxx" -#include "pivot.hxx" #include "hints.hxx" @@ -244,27 +242,11 @@ uno::Reference PivotChartDataProvider::createPivotCha return xDataSource; } -uno::Reference PivotChartDataProvider::createPivotChartDataSource(OUString const & aRangeRepresentation) +void PivotChartDataProvider::collectPivotTableData(ScDPObject* pDPObject) { -m_aCategoriesColumnOrientation.clear(); -m_aCategoriesRowOrientation.clear(); - -uno::Reference xDataSource; -std::vector> aLabeledSequences; - -uno::Reference xContext(comphelper::getProcessComponentContext()); -if (!xContext.is()) -return xDataSource; - -ScDPCollection* pDPCollection = m_pDocument->GetDPCollection(); -ScDPObject* pDPObject = pDPCollection->GetByName(m_sPivotTableName); - uno::Reference xDimensionsSupplier(pDPObject->GetSource()); -uno::Reference xDPResults(xDimensionsSupplier, uno::UNO_QUERY); uno::Reference xDims = new ScNameToIndexAccess(xDimensionsSupplier->getDimensions()); -std::vector> m_aLabels; - for (long nDim = 0; nDim < xDims->getCount(); nDim++) { uno::Reference xDim = ScUnoHelpFunctions::AnyToInterface(xDims->getByIndex(nDim)); @@ -272,110 +254,131 @@ uno::Reference PivotChartDataProvider::createPivotCha uno::Reference xDimName(xDim, uno::UNO_QUERY); uno::Reference xDimSupp(xDim, uno::UNO_QUERY); -if (xDimProp.is() && xDimSupp.is()) -{ -sheet::DataPilotFieldOrientation eDimOrient = sheet::DataPilotFieldOrientation( -ScUnoHelpFunctions::GetEnumProperty(xDimProp, SC_UNO_DP_ORIENTATION, - sheet::DataPilotFieldOrientation_HIDDEN)); +if (!xDimProp.is() || !xDimSupp.is()) +continue; -long nDimPos = ScUnoHelpFunctions::GetLongProperty(xDimProp, SC_UNO_DP_POSITION); -sal_Int32 nNumberFormat = ScUnoHelpFunctions::GetLongProperty(xDimProp, SC_UNO_DP_NUMBERFO); +sheet::DataPilotFieldOrientation eDimOrient = sheet::DataPilotFieldOrientation( +ScUnoHelpFunctions::GetEnumProperty(xDimProp, SC_UNO_DP_ORIENTATION, + sheet::DataPilotFieldOrientation_HIDDEN)); -if (eDimOrient != sheet::DataPilotFieldOrientation_HIDDEN) -{ -uno::Reference xHiers = new ScNameToIndexAccess(xDimSupp->getHierarchies()); -long nHierarchy = ScUnoHelpFunctions::GetLongProperty(xDimProp, SC_UNO_DP_USEDHIERARCHY); -if (nHierarchy >= xHiers->getCount()) -nHierarchy = 0; +long nDimPos = ScUnoHelpFunctions::GetLongProperty(xDimProp, SC_UNO_DP_POSITION); +sal_Int32 nNumberFormat = ScUnoHelpFunctions::GetLongProperty(xDimProp, SC_UNO_DP_NUMBERFO); + +if (eDimOrient == sheet::DataPilotFieldOrientation_HIDDEN) +continue; +uno::Reference xHiers = new ScNameToIndexAccess(xDimSupp->getHierarchies()); +long nHierarchy = ScUnoHelpFunctions::GetLongProperty(xDimProp, SC_UNO_DP_USEDHIERARCHY); +if (nHierarchy >= xHiers->getCount()) +nHierarchy = 0; + +uno::Reference xHier = ScUnoHelpFunctions::AnyToInterface(xHiers->getByIndex(nHierarchy)); + +uno::Reference xHierSupp(xHier, uno::UNO_QUERY); + +if (!xHierSupp.is()) +continue; -
[Libreoffice-commits] core.git: lotuswordpro/source
lotuswordpro/source/filter/lwpidxmgr.cxx | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) New commits: commit 7e07b144554691d4bbb3eb5e821aa0f1a36d1f32 Author: Caolán McNamara Date: Mon Feb 27 16:02:49 2017 + ofz: fix leak Change-Id: Icf0e75d0e213c4562f4ee57df0537d394031645b diff --git a/lotuswordpro/source/filter/lwpidxmgr.cxx b/lotuswordpro/source/filter/lwpidxmgr.cxx index 640c42f..7c03e87 100644 --- a/lotuswordpro/source/filter/lwpidxmgr.cxx +++ b/lotuswordpro/source/filter/lwpidxmgr.cxx @@ -88,19 +88,19 @@ void LwpIndexManager::Read(LwpSvStream* pStrm) //Read index obj LwpObjectHeader ObjHdr; ObjHdr.Read(*pStrm); -LwpObjectStream* pObjStrm = new LwpObjectStream(pStrm, ObjHdr.IsCompressed(), -static_cast(ObjHdr.GetSize()) ); +std::unique_ptr xObjStrm(new LwpObjectStream(pStrm, ObjHdr.IsCompressed(), +static_cast(ObjHdr.GetSize(; if( ObjHdr.GetTag() == VO_ROOTLEAFOBJINDEX ) { -ReadLeafData(pObjStrm); -ReadTimeTable(pObjStrm); -delete pObjStrm; +ReadLeafData(xObjStrm.get()); +ReadTimeTable(xObjStrm.get()); +xObjStrm.reset(); } else { -ReadRootData(pObjStrm); -delete pObjStrm; +ReadRootData(xObjStrm.get()); +xObjStrm.reset(); for (sal_uInt16 k = 0; k < m_nLeafCount; k++) { ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'refs/notes/commits' - f7/ce97f232160a0871fb6613517de339597f178f
f7/ce97f232160a0871fb6613517de339597f178f |1 + 1 file changed, 1 insertion(+) New commits: commit 26eb644cf5c4989cda7d632f95f8951d69554b14 Author: Caolán McNamara Date: Mon Feb 27 16:03:54 2017 + Notes added by 'git notes add' diff --git a/f7/ce97f232160a0871fb6613517de339597f178f b/f7/ce97f232160a0871fb6613517de339597f178f new file mode 100644 index 000..8e5c182 --- /dev/null +++ b/f7/ce97f232160a0871fb6613517de339597f178f @@ -0,0 +1 @@ +ignore: aoo ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'refs/notes/commits' - 10/ed4af8c2574ce6ca79a8b97e203cf9197dd6f8
10/ed4af8c2574ce6ca79a8b97e203cf9197dd6f8 |1 + 1 file changed, 1 insertion(+) New commits: commit eec62eb7a964f5e304774f27cea1ae17ac5eae00 Author: Caolán McNamara Date: Mon Feb 27 16:04:53 2017 + Notes added by 'git notes add' diff --git a/10/ed4af8c2574ce6ca79a8b97e203cf9197dd6f8 b/10/ed4af8c2574ce6ca79a8b97e203cf9197dd6f8 new file mode 100644 index 000..d579e6e --- /dev/null +++ b/10/ed4af8c2574ce6ca79a8b97e203cf9197dd6f8 @@ -0,0 +1 @@ +prefer: 624840542bb3943393c3a616254899789bb044b4 ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'refs/notes/commits' - 68/925500cc6652505a7f529a72fabbb9ad513e15
68/925500cc6652505a7f529a72fabbb9ad513e15 |1 + 1 file changed, 1 insertion(+) New commits: commit f505dce2ae543ea0a9d16d20fc68c9a65eea1fc8 Author: Caolán McNamara Date: Mon Feb 27 16:06:16 2017 + Notes added by 'git notes add' diff --git a/68/925500cc6652505a7f529a72fabbb9ad513e15 b/68/925500cc6652505a7f529a72fabbb9ad513e15 new file mode 100644 index 000..8e5c182 --- /dev/null +++ b/68/925500cc6652505a7f529a72fabbb9ad513e15 @@ -0,0 +1 @@ +ignore: aoo ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: lotuswordpro/source
lotuswordpro/source/filter/lwpfribmark.cxx | 30 + lotuswordpro/source/filter/lwpfribmark.hxx |4 +-- 2 files changed, 16 insertions(+), 18 deletions(-) New commits: commit 8eae0f2ee89558bdc00069ccea2679ff941b6307 Author: Caolán McNamara Date: Mon Feb 27 16:43:48 2017 + fix leak Change-Id: Ie352e9b7fe52d41492141ebba9b5d332960dadd5 diff --git a/lotuswordpro/source/filter/lwpfribmark.cxx b/lotuswordpro/source/filter/lwpfribmark.cxx index a71a392..a37d254 100644 --- a/lotuswordpro/source/filter/lwpfribmark.cxx +++ b/lotuswordpro/source/filter/lwpfribmark.cxx @@ -146,27 +146,25 @@ void LwpFribBookMark::RegisterStyle(LwpFoundry* pFoundry) LwpBookmarkMgr* pMarkMgr = pGlobal->GetLwpBookmarkMgr(); if (type == MARKER_START) { -XFBookmarkStart* pMarkStart = new XFBookmarkStart; -pMarkStart->SetDivision(sDivision); -pMarkStart->SetName(name); -pMarkMgr->AddXFBookmarkStart(name,pMarkStart);//add to map -m_pStart = pMarkStart; +rtl::Reference xMarkStart(new XFBookmarkStart); +xMarkStart->SetDivision(sDivision); +xMarkStart->SetName(name); +pMarkMgr->AddXFBookmarkStart(name, xMarkStart.get());//add to map +m_xStart = xMarkStart; } else if(type == MARKER_END) { -XFBookmarkEnd* pMarkEnd = new XFBookmarkEnd; -pMarkEnd->SetDivision(sDivision); -pMarkEnd->SetName(name); -pMarkMgr->AddXFBookmarkEnd(name,pMarkEnd); //add to map -m_pEnd = pMarkEnd; +rtl::Reference xMarkEnd(new XFBookmarkEnd); +xMarkEnd->SetDivision(sDivision); +xMarkEnd->SetName(name); +pMarkMgr->AddXFBookmarkEnd(name, xMarkEnd.get()); //add to map +m_xEnd = xMarkEnd; } } LwpFribBookMark::LwpFribBookMark(LwpPara* pPara ) : LwpFrib(pPara) , m_nType(0) -, m_pStart(nullptr) -, m_pEnd(nullptr) { } @@ -185,13 +183,13 @@ void LwpFribBookMark::XFConvert(XFContentContainer* pXFPara) { sal_uInt8 type = GetType(); -if (type == MARKER_START && m_pStart) +if (type == MARKER_START && m_xStart) { -pXFPara->Add(m_pStart); +pXFPara->Add(m_xStart.get()); } -else if(type == MARKER_END && m_pEnd) +else if(type == MARKER_END && m_xEnd) { -pXFPara->Add(m_pEnd); +pXFPara->Add(m_xEnd.get()); } } diff --git a/lotuswordpro/source/filter/lwpfribmark.hxx b/lotuswordpro/source/filter/lwpfribmark.hxx index a534f8f..45f7aee 100644 --- a/lotuswordpro/source/filter/lwpfribmark.hxx +++ b/lotuswordpro/source/filter/lwpfribmark.hxx @@ -95,8 +95,8 @@ public: private: sal_uInt8 m_nType; LwpObjectID m_objMarker; -XFBookmarkStart* m_pStart; -XFBookmarkEnd* m_pEnd; +rtl::Reference m_xStart; +rtl::Reference m_xEnd; }; class LwpFribField : public LwpFrib ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] online.git: Branch 'libreoffice-5-3' - loleaflet/po
loleaflet/po/help-ab.po|4 loleaflet/po/help-af.po|4 loleaflet/po/help-am.po|4 loleaflet/po/help-an.po|4 loleaflet/po/help-ar.po|4 loleaflet/po/help-as.po|4 loleaflet/po/help-ast.po |4 loleaflet/po/help-az.po|4 loleaflet/po/help-be.po|4 loleaflet/po/help-bg.po|4 loleaflet/po/help-bn.po|4 loleaflet/po/help-bn_IN.po |4 loleaflet/po/help-bo.po|4 loleaflet/po/help-br.po|4 loleaflet/po/help-brx.po |4 loleaflet/po/help-bs.po|4 loleaflet/po/help-ca.po|4 loleaflet/po/help-cs.po|4 loleaflet/po/help-cy.po| 46 - loleaflet/po/help-da.po|4 loleaflet/po/help-de.po|4 loleaflet/po/help-dgo.po |4 loleaflet/po/help-dz.po|4 loleaflet/po/help-el.po|4 loleaflet/po/help-en_GB.po |4 loleaflet/po/help-en_ZA.po |4 loleaflet/po/help-eo.po|4 loleaflet/po/help-es.po|4 loleaflet/po/help-et.po|4 loleaflet/po/help-eu.po|4 loleaflet/po/help-fa.po|4 loleaflet/po/help-fi.po|4 loleaflet/po/help-fr.po|4 loleaflet/po/help-ga.po|4 loleaflet/po/help-gd.po| 96 -- loleaflet/po/help-gl.po| 162 + loleaflet/po/help-gu.po|4 loleaflet/po/help-gug.po |4 loleaflet/po/help-he.po|4 loleaflet/po/help-hi.po|4 loleaflet/po/help-hr.po| 147 +--- loleaflet/po/help-hu.po|4 loleaflet/po/help-id.po|4 loleaflet/po/help-is.po|4 loleaflet/po/help-it.po|4 loleaflet/po/help-ja.po|4 loleaflet/po/help-jv.po|4 loleaflet/po/help-ka.po|4 loleaflet/po/help-kk.po|4 loleaflet/po/help-kl.po|4 loleaflet/po/help-km.po|4 loleaflet/po/help-kn.po|4 loleaflet/po/help-ko.po|4 loleaflet/po/help-kok.po |4 loleaflet/po/help-ks.po|4 loleaflet/po/help-ky.po|4 loleaflet/po/help-lb.po|4 loleaflet/po/help-lo.po|4 loleaflet/po/help-lt.po|4 loleaflet/po/help-lv.po|4 loleaflet/po/help-mai.po |4 loleaflet/po/help-mk.po|4 loleaflet/po/help-ml.po|4 loleaflet/po/help-mn.po|4 loleaflet/po/help-mni.po |4 loleaflet/po/help-mr.po|4 loleaflet/po/help-my.po|4 loleaflet/po/help-nb.po|4 loleaflet/po/help-ne.po| 10 loleaflet/po/help-nl.po|4 loleaflet/po/help-nn.po|4 loleaflet/po/help-nr.po|4 loleaflet/po/help-nso.po |4 loleaflet/po/help-oc.po| 183 + loleaflet/po/help-om.po|4 loleaflet/po/help-or.po|4 loleaflet/po/help-pa_IN.po |4 loleaflet/po/help-pl.po|4 loleaflet/po/help-pt.po|4 loleaflet/po/help-pt_BR.po |4 loleaflet/po/help-ro.po|4 loleaflet/po/help-ru.po| 94 -- loleaflet/po/help-rw.po|4 loleaflet/po/help-sa_IN.po |4 loleaflet/po/help-sah.po |4 loleaflet/po/help-sat.po |4 loleaflet/po/help-sd.po|4 loleaflet/po/help-si.po|4 loleaflet/po/help-sid.po |4 loleaflet/po/help-sk.po|4 loleaflet/po/help-sq.po|4 loleaflet/po/help-ss.po|4 loleaflet/po/help-st.po|4 loleaflet/po/help-sv.po| 94 -- loleaflet/po/help-sw_TZ.po |4 loleaflet/po/help-ta.po|4 loleaflet/po/help-te.po|4 loleaflet/po/help-tg.po|4 loleaflet/po/help-th.po|4 loleaflet/po/help-ti.po|4 loleaflet/po/help-tn.po|4 loleaflet/po/help-tr.po|4 loleaflet/po/help-ts.po|4 loleaflet/po/help-tt.po|4 loleaflet/po/help-ug.po|4 loleaflet/po/help-uk.po|4 loleaflet/po/help-ur.po|4 loleaflet/po/help-uz.po|4 loleaflet/po/help-ve.po|4 loleaflet/po/help-vi.po|4 loleaflet/po/help-xh.po|4 loleaflet/po/help-zh_CN.po |4 loleaflet/po/help-zh_TW.po |4 loleaflet/po/help-zu.po|4 loleaflet/po/ui-ab.po | 442 +++-- loleaflet/po/ui-af.po | 442 +++-- loleaflet/po/ui-am.po | 450 +++-- loleaflet/po/ui-an.po | 442 +++-- loleaflet/po/ui-ar.po | 480 -- loleaflet/po/ui-as.po | 442 +++-- loleaflet/po/ui-ast.po | 442 +++-- loleaflet/po/ui-az.po | 442 +++-- loleaflet/po/ui-be.po | 442 +++-- loleaflet/po/ui-bg.po | 442 +++-- loleaflet/po/ui-bn.po | 442 +++-- loleaflet/po/ui-bn_IN.po | 442 +++-- loleaflet/po/ui-bo.po | 442 +++-- loleaflet/po/ui-br.po | 442 +++-- loleaflet/po/ui-brx.po | 442 +++-- loleaflet/po/ui-bs.po | 442 +++-- loleaflet/po/ui-ca.po | 772 --- loleaflet/po/ui-cs.po |
[Libreoffice-commits] core.git: sc/source
sc/source/ui/view/tabview3.cxx | 347 - 1 file changed, 174 insertions(+), 173 deletions(-) New commits: commit 54cc53d3849a1a9158797b355b5e775305b34000 Author: Tomaž Vajngerl Date: Mon Feb 27 17:08:42 2017 +0100 sc: make tabview3 more readable - add some curly-braces - join consecutive if statements - declare variables inside for statement Change-Id: I369452cdd684f71a7bd30b5dc072831b982ee1b3 Reviewed-on: https://gerrit.libreoffice.org/34686 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl diff --git a/sc/source/ui/view/tabview3.cxx b/sc/source/ui/view/tabview3.cxx index 343ec37..6904b23 100644 --- a/sc/source/ui/view/tabview3.cxx +++ b/sc/source/ui/view/tabview3.cxx @@ -179,12 +179,13 @@ void ScTabView::UpdateAutoFillMark() ScRange aMarkRange; bool bMarked = (aViewData.GetSimpleArea( aMarkRange ) == SC_MARK_SIMPLE); -sal_uInt16 i; -for (i=0; i<4; i++) +for (sal_uInt16 i = 0; i < 4; i++) +{ if (pGridWin[i] && pGridWin[i]->IsVisible()) pGridWin[i]->UpdateAutoFillMark( bMarked, aMarkRange ); +} -for (i=0; i<2; i++) +for (sal_uInt16 i = 0; i < 2; i++) { if (pColBar[i] && pColBar[i]->IsVisible()) pColBar[i]->SetMark( bMarked, aMarkRange.aStart.Col(), aMarkRange.aEnd.Col() ); @@ -206,33 +207,32 @@ void ScTabView::FakeButtonUp( ScSplitPos eWhich ) void ScTabView::HideAllCursors() { for (VclPtr & pWin : pGridWin) -if (pWin) -if (pWin->IsVisible()) -{ -vcl::Cursor* pCur = pWin->GetCursor(); -if (pCur) -if (pCur->IsVisible()) -pCur->Hide(); -pWin->HideCursor(); -} +{ +if (pWin && pWin->IsVisible()) +{ +vcl::Cursor* pCur = pWin->GetCursor(); +if (pCur && pCur->IsVisible()) +pCur->Hide(); +pWin->HideCursor(); +} +} } void ScTabView::ShowAllCursors() { for (VclPtr & pWin : pGridWin) -if (pWin) -if (pWin->IsVisible()) -{ -pWin->ShowCursor(); - -pWin->CursorChanged(); -} +{ +if (pWin && pWin->IsVisible()) +{ +pWin->ShowCursor(); +pWin->CursorChanged(); +} +} } void ScTabView::ShowCursor() { pGridWin[aViewData.GetActivePart()]->ShowCursor(); - pGridWin[aViewData.GetActivePart()]->CursorChanged(); } @@ -788,9 +788,11 @@ void ScTabView::TestHintWindow() } } -for (VclPtr & pWin : pGridWin) -if ( pWin && pWin->IsVisible() ) -pWin->UpdateListValPos( bListValButton, aListValPos ); +for (VclPtr const & pWin : pGridWin) +{ +if (pWin && pWin->IsVisible()) +pWin->UpdateListValPos(bListValButton, aListValPos); +} } bool ScTabView::HasHintWindow() const @@ -847,18 +849,16 @@ void ScTabView::AlignToCursor( SCsCOL nCurX, SCsROW nCurY, ScFollowMode eMode, ScVSplitPos eActiveY = WhichV(eActive); bool bHFix = (aViewData.GetHSplitMode() == SC_SPLIT_FIX); bool bVFix = (aViewData.GetVSplitMode() == SC_SPLIT_FIX); -if (bHFix) -if (eActiveX == SC_SPLIT_LEFT && nCurX >= (SCsCOL)aViewData.GetFixPosX()) -{ -ActivatePart( (eActiveY==SC_SPLIT_TOP) ? SC_SPLIT_TOPRIGHT : SC_SPLIT_BOTTOMRIGHT ); -eActiveX = SC_SPLIT_RIGHT; -} -if (bVFix) -if (eActiveY == SC_SPLIT_TOP && nCurY >= (SCsROW)aViewData.GetFixPosY()) -{ -ActivatePart( (eActiveX==SC_SPLIT_LEFT) ? SC_SPLIT_BOTTOMLEFT : SC_SPLIT_BOTTOMRIGHT ); -eActiveY = SC_SPLIT_BOTTOM; -} +if (bHFix && eActiveX == SC_SPLIT_LEFT && nCurX >= (SCsCOL)aViewData.GetFixPosX()) +{ +ActivatePart( (eActiveY==SC_SPLIT_TOP) ? SC_SPLIT_TOPRIGHT : SC_SPLIT_BOTTOMRIGHT ); +eActiveX = SC_SPLIT_RIGHT; +} +if (bVFix && eActiveY == SC_SPLIT_TOP && nCurY >= (SCsROW)aViewData.GetFixPosY()) +{ +ActivatePart( (eActiveX==SC_SPLIT_LEFT) ? SC_SPLIT_BOTTOMLEFT : SC_SPLIT_BOTTOMRIGHT ); +eActiveY = SC_SPLIT_BOTTOM; +} // actual align @@ -1853,8 +1853,10 @@ void ScTabView::SetTabNo( SCTAB nTab, bool bNew, bool bExtendSelection, bool bSa if ( bRefMode ) // hide EditView if necessary (after aViewData.SetTabNo !) { for (VclPtr & pWin : pGridWin) +{ if (pWin && pWin->IsVisible()) pWin->UpdateEditViewPos(); +} } TabChanged(bSameTabButMoved); // DrawView @@ -1917,8 +1919,10 @@ void ScTabView::SetTabNo( SCTAB nTab, bool bNew, bool bExtendSelection, bool bSa // Form Layer must know the visible area of the new sheet // that is why MapMode must al
[Libreoffice-commits] core.git: lotuswordpro/source
lotuswordpro/source/filter/lwpparastyle.cxx | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) New commits: commit f641638b7724d129609814c6bb33cf4921caec69 Author: Caolán McNamara Date: Mon Feb 27 17:09:21 2017 + fix leak Change-Id: I00438178582bd4c78bffeca18067abeb667b8367 diff --git a/lotuswordpro/source/filter/lwpparastyle.cxx b/lotuswordpro/source/filter/lwpparastyle.cxx index ac3aa0d..49c899f 100644 --- a/lotuswordpro/source/filter/lwpparastyle.cxx +++ b/lotuswordpro/source/filter/lwpparastyle.cxx @@ -666,23 +666,23 @@ void LwpParaStyle::RegisterStyle() if (!m_pFoundry) throw std::runtime_error("missing Foundry"); -XFParaStyle* pStyle = new XFParaStyle(); +std::unique_ptr xStyle(new XFParaStyle()); //Set name OUString styleName = GetName().str(); -pStyle->SetStyleName(styleName); +xStyle->SetStyleName(styleName); //Create font LwpFontManager& rFontMgr = m_pFoundry->GetFontManger(); rtl::Reference pFont = rFontMgr.CreateFont(m_nFinalFontID); -pStyle->SetFont(pFont); +xStyle->SetFont(pFont); //Set other paragraph properties... -Apply(pStyle); +Apply(xStyle.get()); //Add style LwpStyleManager* pStyleMgr = m_pFoundry->GetStyleManager(); -pStyleMgr->AddStyle(GetObjectID(), pStyle); +pStyleMgr->AddStyle(GetObjectID(), xStyle.release()); } LwpAlignmentOverride* LwpParaStyle::GetAlignment() ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: dbaccess/source
dbaccess/source/ui/querydesign/QueryDesignView.cxx|6 +++--- dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx |2 +- dbaccess/source/ui/querydesign/SelectionBrowseBox.hxx |2 +- 3 files changed, 5 insertions(+), 5 deletions(-) New commits: commit 451d37279571b36e63ef34c4f6cc940a7dbda804 Author: Stephan Bergmann Date: Mon Feb 27 18:09:13 2017 +0100 OSelectionBrowseBox::AddGroupBy parameter _nCurrentPos is unused ...since ef40dde69e7fff331b7e31460638703a2c82bc9d "INTEGRATION: CWS dba30d" Change-Id: I2dbd73bd77f71cbf88768dcc2dc4a38f65b84eef diff --git a/dbaccess/source/ui/querydesign/QueryDesignView.cxx b/dbaccess/source/ui/querydesign/QueryDesignView.cxx index 8463687..f601556 100644 --- a/dbaccess/source/ui/querydesign/QueryDesignView.cxx +++ b/dbaccess/source/ui/querydesign/QueryDesignView.cxx @@ -2371,7 +2371,7 @@ namespace if ( eOk == (eErrorCode = FillDragInfo(_pView,pArgument,aDragInfo)) ) { aDragInfo->SetGroupBy(true); -_pSelectionBrw->AddGroupBy(aDragInfo,i); +_pSelectionBrw->AddGroupBy(aDragInfo); } } else if(SQL_ISRULE(pArgument, general_set_fct ) && @@ -2379,7 +2379,7 @@ namespace eOk == FillDragInfo(_pView,pParamRef,aDragInfo)) { aDragInfo->SetGroupBy(true); -_pSelectionBrw->AddGroupBy( aDragInfo, i ); +_pSelectionBrw->AddGroupBy( aDragInfo ); } else if( SQL_ISRULE(pArgument, set_fct_spec ) ) { @@ -2395,7 +2395,7 @@ namespace aDragInfo->SetFunctionType(FKT_OTHER); aDragInfo->SetGroupBy(true); aDragInfo->SetVisible(false); -_pSelectionBrw->AddGroupBy( aDragInfo, i ); +_pSelectionBrw->AddGroupBy( aDragInfo ); } else eErrorCode = eColumnNotFound; diff --git a/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx b/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx index 9994c52..b0d0581 100644 --- a/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx +++ b/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx @@ -1629,7 +1629,7 @@ void OSelectionBrowseBox::CheckFreeColumns(sal_uInt16& _rColumnPosition) } } -void OSelectionBrowseBox::AddGroupBy( const OTableFieldDescRef& rInfo , sal_uInt32 /*_nCurrentPos*/) +void OSelectionBrowseBox::AddGroupBy( const OTableFieldDescRef& rInfo ) { Reference< XConnection> xConnection = static_cast(getDesignView()->getController()).getConnection(); if(!xConnection.is()) diff --git a/dbaccess/source/ui/querydesign/SelectionBrowseBox.hxx b/dbaccess/source/ui/querydesign/SelectionBrowseBox.hxx index 9366ecf..6c66c83 100644 --- a/dbaccess/source/ui/querydesign/SelectionBrowseBox.hxx +++ b/dbaccess/source/ui/querydesign/SelectionBrowseBox.hxx @@ -92,7 +92,7 @@ namespace dbaui // AddGroupBy:: inserts a field with function == grouping. If the fields already exists and uses an aggregate function, // the flag is not set -voidAddGroupBy( const OTableFieldDescRef& rInfo,sal_uInt32 _nCurrentPos); +voidAddGroupBy( const OTableFieldDescRef& rInfo ); voidAddCondition( const OTableFieldDescRef& rInfo, const OUString& rValue, const sal_uInt16 nLevel, ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: chart2/source
chart2/source/view/charttypes/VSeriesPlotter.cxx | 208 +++ 1 file changed, 71 insertions(+), 137 deletions(-) New commits: commit a57a890f286d9f63d0c2a1d23f7fac7092681a63 Author: Tomaž Vajngerl Date: Mon Feb 27 17:12:54 2017 +0100 chart: use c++11 for-statement in VSeriesPlotter This makes the code much more readable.. Change-Id: Ic9078daffeba28984749c61d059701b3cdcca8bd Reviewed-on: https://gerrit.libreoffice.org/34687 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl diff --git a/chart2/source/view/charttypes/VSeriesPlotter.cxx b/chart2/source/view/charttypes/VSeriesPlotter.cxx index 9b4b3fa..bd17a54 100644 --- a/chart2/source/view/charttypes/VSeriesPlotter.cxx +++ b/chart2/source/view/charttypes/VSeriesPlotter.cxx @@ -118,11 +118,9 @@ VDataSeriesGroup::~VDataSeriesGroup() void VDataSeriesGroup::deleteSeries() { //delete all data series help objects: -std::vector< VDataSeries* >::const_iterator aIter = m_aSeriesVector.begin(); -const std::vector< VDataSeries* >::const_iterator aEnd = m_aSeriesVector.end(); -for( ; aIter != aEnd; ++aIter ) +for (VDataSeries* pSeries : m_aSeriesVector) { -delete *aIter; +delete pSeries; } m_aSeriesVector.clear(); } @@ -158,17 +156,13 @@ VSeriesPlotter::VSeriesPlotter( const uno::Reference& xChartTypeMode VSeriesPlotter::~VSeriesPlotter() { //delete all data series help objects: -std::vector< std::vector< VDataSeriesGroup > >::iterator aZSlotIter = m_aZSlots.begin(); -const std::vector< std::vector< VDataSeriesGroup > >::const_iterator aZSlotEnd = m_aZSlots.end(); -for( ; aZSlotIter != aZSlotEnd; ++aZSlotIter ) +for (std::vector & rGroupVector : m_aZSlots) { -std::vector< VDataSeriesGroup >::iterator aXSlotIter = aZSlotIter->begin(); -const std::vector< VDataSeriesGroup >::const_iterator aXSlotEnd = aZSlotIter->end(); -for( ; aXSlotIter != aXSlotEnd; ++aXSlotIter ) +for (VDataSeriesGroup & rGroup : rGroupVector) { -aXSlotIter->deleteSeries(); +rGroup.deleteSeries(); } -aZSlotIter->clear(); +rGroupVector.clear(); } m_aZSlots.clear(); @@ -271,23 +265,13 @@ drawing::Direction3D VSeriesPlotter::getPreferredDiagramAspectRatio() const void VSeriesPlotter::releaseShapes() { -std::vector< std::vector< VDataSeriesGroup > >::iterator aZSlotIter = m_aZSlots.begin(); -const std::vector< std::vector< VDataSeriesGroup > >::const_iterator aZSlotEnd = m_aZSlots.end(); -for( ; aZSlotIter != aZSlotEnd; ++aZSlotIter ) +for (std::vector const & rGroupVector : m_aZSlots) { -std::vector< VDataSeriesGroup >::iterator aXSlotIter = aZSlotIter->begin(); -const std::vector< VDataSeriesGroup >::const_iterator aXSlotEnd = aZSlotIter->end(); -for( ; aXSlotIter != aXSlotEnd; ++aXSlotIter ) +for (VDataSeriesGroup const & rGroup : rGroupVector) { -std::vector< VDataSeries* >* pSeriesList = &(aXSlotIter->m_aSeriesVector); - -std::vector< VDataSeries* >::iterator aSeriesIter = pSeriesList->begin(); -const std::vector< VDataSeries* >::const_iterator aSeriesEnd = pSeriesList->end(); - //iterate through all series in this x slot -for( ; aSeriesIter != aSeriesEnd; ++aSeriesIter ) +for (VDataSeries* pSeries : rGroup.m_aSeriesVector) { -VDataSeries* pSeries( *aSeriesIter ); pSeries->releaseShapes(); } } @@ -1651,12 +1635,10 @@ sal_Int32 VDataSeriesGroup::getPointCount() const return m_nMaxPointCount; sal_Int32 nRet = 0; -std::vector< VDataSeries* >::const_iterator aSeriesIter = m_aSeriesVector.begin(); -const std::vector< VDataSeries* >::const_iterator aSeriesEnd = m_aSeriesVector.end(); -for( ; aSeriesIter != aSeriesEnd; ++aSeriesIter) +for (VDataSeries* pSeries : m_aSeriesVector) { -sal_Int32 nPointCount = (*aSeriesIter)->getTotalPointCount(); +sal_Int32 nPointCount = pSeries->getTotalPointCount(); if( nPointCount>nRet ) nRet = nPointCount; } @@ -1670,10 +1652,10 @@ sal_Int32 VDataSeriesGroup::getPointCount() const sal_Int32 VDataSeriesGroup::getAttachedAxisIndexForFirstSeries() const { sal_Int32 nRet = 0; -std::vector< VDataSeries* >::const_iterator aSeriesIter = m_aSeriesVector.begin(); -const std::vector< VDataSeries* >::const_iterator aSeriesEnd = m_aSeriesVector.end(); -if( aSeriesIter != aSeriesEnd ) +std::vector::const_iterator aSeriesIter = m_aSeriesVector.begin(); + +if (aSeriesIter != m_aSeriesVector.end()) nRet = (*aSeriesIter)->getAttachedAxisIndex(); return nRet; @@ -1681,20 +1663,16 @@ sal_Int32 VDataSeriesGroup::getAttachedAxisI
[Libreoffice-commits] core.git: lotuswordpro/source
lotuswordpro/source/filter/lwppagelayout.cxx | 28 +-- 1 file changed, 14 insertions(+), 14 deletions(-) New commits: commit 6fd8f380423e7e3d711cb240957e81142fd11d6f Author: Caolán McNamara Date: Mon Feb 27 17:37:17 2017 + fix leak Change-Id: If7f710aa62cea43e2c59d91e136daba9650b3912 diff --git a/lotuswordpro/source/filter/lwppagelayout.cxx b/lotuswordpro/source/filter/lwppagelayout.cxx index 078ea71..8a10267 100644 --- a/lotuswordpro/source/filter/lwppagelayout.cxx +++ b/lotuswordpro/source/filter/lwppagelayout.cxx @@ -312,30 +312,30 @@ void LwpPageLayout::ParseFootNoteSeparator(XFPageMaster * pm1) */ void LwpPageLayout::RegisterStyle() { -XFPageMaster* pm1 = new XFPageMaster(); -m_pXFPageMaster = pm1; +std::unique_ptr xpm1(new XFPageMaster()); +m_pXFPageMaster = xpm1.get(); -ParseGeometry( pm1 ); +ParseGeometry(xpm1.get()); //Does not process LayoutScale, for watermark is not supported in SODC. -ParseWaterMark( pm1); -ParseMargins( pm1); -ParseColumns(pm1); -ParseBorders(pm1); -ParseShadow(pm1); -// ParseBackColor(pm1); -ParseBackGround(pm1); -ParseFootNoteSeparator(pm1); -pm1->SetTextDir(GetTextDirection()); +ParseWaterMark(xpm1.get()); +ParseMargins(xpm1.get()); +ParseColumns(xpm1.get()); +ParseBorders(xpm1.get()); +ParseShadow(xpm1.get()); +ParseBackGround(xpm1.get()); +ParseFootNoteSeparator(xpm1.get()); +xpm1->SetTextDir(GetTextDirection()); LwpUseWhen* pUseWhen = GetUseWhen(); if(IsComplex() ||( pUseWhen && pUseWhen->IsUseOnAllOddPages())) { -pm1->SetPageUsage(enumXFPageUsageMirror); +xpm1->SetPageUsage(enumXFPageUsageMirror); } //Add the page master to stylemanager XFStyleManager* pXFStyleManager = LwpGlobalMgr::GetInstance()->GetXFStyleManager(); -m_pXFPageMaster = pm1 = static_cast(pXFStyleManager->AddStyle(pm1).m_pStyle); +XFPageMaster* pm1 = static_cast(pXFStyleManager->AddStyle(xpm1.release()).m_pStyle); +m_pXFPageMaster = pm1; OUString pmname = pm1->GetStyleName(); //Add master page ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: 3 commits - ios/experimental oox/inc oox/Library_oox.mk oox/source
ios/experimental/TiledLibreOffice/TiledLibreOffice.xcodeproj/project.pbxproj | 4 oox/Library_oox.mk | 2 oox/inc/drawingml/fillpropertiesgroupcontext.hxx | 248 -- oox/inc/drawingml/misccontexts.hxx | 248 ++ oox/inc/drawingml/textparagraphproperties.hxx| 2 oox/inc/pch/precompiled_oox.hxx | 2 oox/source/drawingml/customshapeproperties.cxx | 2 oox/source/drawingml/diagram/datamodelcontext.cxx| 2 oox/source/drawingml/effectpropertiescontext.cxx | 2 oox/source/drawingml/fillpropertiesgroupcontext.cxx | 384 -- oox/source/drawingml/graphicshapecontext.cxx | 12 oox/source/drawingml/linepropertiescontext.cxx | 2 oox/source/drawingml/misccontexts.cxx| 384 ++ oox/source/drawingml/shape.cxx | 25 oox/source/drawingml/shapecontext.cxx| 2 oox/source/drawingml/shapepropertiescontext.cxx | 3 oox/source/drawingml/table/tablebackgroundstylecontext.cxx | 2 oox/source/drawingml/table/tablecellcontext.cxx | 2 oox/source/drawingml/table/tablestylecellstylecontext.cxx| 2 oox/source/drawingml/themeelementscontext.cxx| 2 oox/source/ppt/backgroundproperties.cxx | 3 oox/source/ppt/pptgraphicshapecontext.cxx| 2 oox/source/ppt/pptshapecontext.cxx | 2 oox/source/ppt/pptshapepropertiescontext.cxx | 2 24 files changed, 670 insertions(+), 671 deletions(-) New commits: commit 58da79fd02d6f2b49ccd03d9b5a984a231e1cd52 Author: Tor Lillqvist Date: Mon Feb 27 18:54:50 2017 +0200 Rename misleadingly named include file fillpropertiesgroupcontext.hxx There is nothing called FillPropertiesGroupContext. Rename the file to "misccontexts.hxx" as I could not come up with some more specific name that would describe the collection of classes defined in it. Rename the corresponding cxx file, too. Change-Id: I44db1db8c63c8e897774597b46a237a214aacedf diff --git a/ios/experimental/TiledLibreOffice/TiledLibreOffice.xcodeproj/project.pbxproj b/ios/experimental/TiledLibreOffice/TiledLibreOffice.xcodeproj/project.pbxproj index 392f6c6..cffc1e3 100644 --- a/ios/experimental/TiledLibreOffice/TiledLibreOffice.xcodeproj/project.pbxproj +++ b/ios/experimental/TiledLibreOffice/TiledLibreOffice.xcodeproj/project.pbxproj @@ -312,7 +312,7 @@ BE55B11C18DB67A900950228 /* effectpropertiescontext.cxx */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = effectpropertiescontext.cxx; path = ../../../oox/source/drawingml/effectpropertiescontext.cxx; sourceTree = SOURCE_ROOT; }; BE55B11D18DB67A900950228 /* embeddedwavaudiofile.cxx */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = embeddedwavaudiofile.cxx; path = ../../../oox/source/drawingml/embeddedwavaudiofile.cxx; sourceTree = SOURCE_ROOT; }; BE55B11E18DB67A900950228 /* fillproperties.cxx */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = fillproperties.cxx; path = ../../../oox/source/drawingml/fillproperties.cxx; sourceTree = SOURCE_ROOT; }; - BE55B11F18DB67A900950228 /* fillpropertiesgroupcontext.cxx */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = fillpropertiesgroupcontext.cxx; path = ../../../oox/source/drawingml/fillpropertiesgroupcontext.cxx; sourceTree = SOURCE_ROOT; }; + BE55B11F18DB67A900950228 /* misccontexts.cxx */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = misccontexts.cxx; path = ../../../oox/source/drawingml/misccontexts.cxx; sourceTree = SOURCE_ROOT; }; BE55B12018DB67A900950228 /* graphicshapecontext.cxx */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = graphicshapecontext.cxx; path = ../../../oox/source/drawingml/graphicshapecontext.cxx; sourceTree = SOURCE_ROOT; }; BE55B12118DB67A900950228 /* guidcontext.cxx */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = guidcontext.cxx; path = ../../../oox/source/drawingml/guidcontext.cxx; sourceTree = SOURCE_ROOT; }; BE55B12218DB67A900950228 /* hyperlinkcontext.cxx */ = {isa = PBX
[Libreoffice-commits] core.git: vcl/qa vcl/source
vcl/qa/cppunit/pdfexport/data/tdf106206.odt |binary vcl/qa/cppunit/pdfexport/pdfexport.cxx | 54 vcl/source/gdi/pdfwriter_impl.cxx |5 ++ 3 files changed, 58 insertions(+), 1 deletion(-) New commits: commit e7ad8039175bc50b56b4c07ce0b9d8fed629 Author: Miklos Vajna Date: Mon Feb 27 16:38:54 2017 +0100 tdf#106206 PDF export: fix unexpected /Im0 in page contents stream The early return should just skip the code that's specific to pdf images, not everything. Change-Id: Ia9e02b05051a085a9fdf2f690c21f9ffccb7bf4d Reviewed-on: https://gerrit.libreoffice.org/34685 Reviewed-by: Miklos Vajna Tested-by: Jenkins diff --git a/vcl/qa/cppunit/pdfexport/data/tdf106206.odt b/vcl/qa/cppunit/pdfexport/data/tdf106206.odt new file mode 100644 index 000..3581157 Binary files /dev/null and b/vcl/qa/cppunit/pdfexport/data/tdf106206.odt differ diff --git a/vcl/qa/cppunit/pdfexport/pdfexport.cxx b/vcl/qa/cppunit/pdfexport/pdfexport.cxx index af6e86b..edd63e6 100644 --- a/vcl/qa/cppunit/pdfexport/pdfexport.cxx +++ b/vcl/qa/cppunit/pdfexport/pdfexport.cxx @@ -44,6 +44,8 @@ public: void testTdf105461(); /// Tests that embedded video from Impress is not exported as a linked one. void testTdf105093(); +/// Tests export of non-PDF images. +void testTdf106206(); #endif CPPUNIT_TEST_SUITE(PdfExportTest); @@ -51,6 +53,7 @@ public: CPPUNIT_TEST(testTdf106059); CPPUNIT_TEST(testTdf105461); CPPUNIT_TEST(testTdf105093); +CPPUNIT_TEST(testTdf106206); #endif CPPUNIT_TEST_SUITE_END(); }; @@ -200,6 +203,57 @@ void PdfExportTest::testTdf105093() // This key was missing, the embedded video was handled as a linked one. CPPUNIT_ASSERT(pFileSpec->LookupElement("EF")); } + +void PdfExportTest::testTdf106206() +{ +// Import the bugdoc and export as PDF. +OUString aURL = m_directories.getURLFromSrc(DATA_DIRECTORY) + "tdf106206.odt"; +mxComponent = loadFromDesktop(aURL); +CPPUNIT_ASSERT(mxComponent.is()); + +uno::Reference xStorable(mxComponent, uno::UNO_QUERY); +utl::TempFile aTempFile; +aTempFile.EnableKillingFile(); +utl::MediaDescriptor aMediaDescriptor; +aMediaDescriptor["FilterName"] <<= OUString("writer_pdf_Export"); +xStorable->storeToURL(aTempFile.GetURL(), aMediaDescriptor.getAsConstPropertyValueList()); + +// Parse the export result. +xmlsecurity::pdfio::PDFDocument aDocument; +SvFileStream aStream(aTempFile.GetURL(), StreamMode::READ); +CPPUNIT_ASSERT(aDocument.Read(aStream)); + +// The document has one page. +std::vector aPages = aDocument.GetPages(); +CPPUNIT_ASSERT_EQUAL(static_cast(1), aPages.size()); + +// The page has a stream. +xmlsecurity::pdfio::PDFObjectElement* pContents = aPages[0]->LookupObject("Contents"); +CPPUNIT_ASSERT(pContents); +xmlsecurity::pdfio::PDFStreamElement* pStream = pContents->GetStream(); +CPPUNIT_ASSERT(pStream); +SvMemoryStream& rObjectStream = pStream->GetMemory(); +// Uncompress it. +SvMemoryStream aUncompressed; +ZCodec aZCodec; +aZCodec.BeginCompression(); +rObjectStream.Seek(0); +aZCodec.Decompress(rObjectStream, aUncompressed); +CPPUNIT_ASSERT(aZCodec.EndCompression()); + +// Make sure there is an image reference there. +OString aImage("/Im"); +auto pStart = static_cast(aUncompressed.GetData()); +const char* pEnd = pStart + aUncompressed.GetSize(); +auto it = std::search(pStart, pEnd, aImage.getStr(), aImage.getStr() + aImage.getLength()); +CPPUNIT_ASSERT(it != pEnd); + +// And also that it's not an invalid one. +OString aInvalidImage("/Im0"); +it = std::search(pStart, pEnd, aInvalidImage.getStr(), aInvalidImage.getStr() + aInvalidImage.getLength()); +// This failed, object #0 was referenced. +CPPUNIT_ASSERT(bool(it == pEnd)); +} #endif CPPUNIT_TEST_SUITE_REGISTRATION(PdfExportTest); diff --git a/vcl/source/gdi/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx index 054b7a3..fc9443c 100644 --- a/vcl/source/gdi/pdfwriter_impl.cxx +++ b/vcl/source/gdi/pdfwriter_impl.cxx @@ -11252,6 +11252,10 @@ bool PDFWriterImpl::writeBitmapObject( BitmapEmit& rObject, bool bMask ) void PDFWriterImpl::createEmbeddedFile(const Graphic& rGraphic, ReferenceXObjectEmit& rEmit, sal_Int32 nBitmapObject) { +// The bitmap object is always a valid identifier, even if the graphic has +// no pdf data. +rEmit.m_nBitmapObject = nBitmapObject; + if (!rGraphic.getPdfData().hasElements()) return; @@ -11262,7 +11266,6 @@ void PDFWriterImpl::createEmbeddedFile(const Graphic& rGraphic, ReferenceXObject rEmit.m_nFormObject = createObject(); rEmit.m_nEmbeddedObject = m_aEmbeddedFiles.back().m_nObject; -rEmit.m_nBitmapObject = nBitmapObject; rEmit.m_aPixelSize = rGraphic.GetBitmap().GetPrefSize(); } _
[Libreoffice-commits] core.git: sc/inc sc/source
sc/inc/postit.hxx | 15 +++- sc/source/core/data/postit.cxx | 133 ++--- 2 files changed, 84 insertions(+), 64 deletions(-) New commits: commit 8d6afde106f3b9ba4eab0fa00cb6ddd28494a258 Author: Eike Rathke Date: Mon Feb 27 19:50:07 2017 +0100 rework ScCaptionPtr to have a distinct head element Not only saves a pointer per list element, but future versions could hold a document pointer and/or drawing layer's draw page as well. Change-Id: I85e05981239223bec88c47f2ebe4c22e50cd9a0d diff --git a/sc/inc/postit.hxx b/sc/inc/postit.hxx index ea4a43d..ad671fb 100644 --- a/sc/inc/postit.hxx +++ b/sc/inc/postit.hxx @@ -72,11 +72,18 @@ public: oslInterlockedCount getRefs() const; private: -ScCaptionPtr* mpHead; ///< points to the "master" entry -mutable ScCaptionPtr* mpNext; ///< next in list -SdrCaptionObj* mpCaption; ///< the caption object, managed by head master -mutable oslInterlockedCount mnRefs; ///< use count, managed by head master +struct Head +{ +ScCaptionPtr* mpFirst;///< first in list +oslInterlockedCount mnRefs; ///< use count +}; + +Head* mpHead; ///< points to the "master" entry +mutable ScCaptionPtr* mpNext; ///< next in list +SdrCaptionObj*mpCaption;///< the caption object, managed by head master + +void newHead(); //< Allocate a new Head and init. void incRef() const; bool decRef() const;//< @returns if the last reference was decremented. void decRefAndDestroy();//< Destroys caption object if the last reference was decremented. diff --git a/sc/source/core/data/postit.cxx b/sc/source/core/data/postit.cxx index b3edcf8..747eb68 100644 --- a/sc/source/core/data/postit.cxx +++ b/sc/source/core/data/postit.cxx @@ -445,34 +445,50 @@ ScNoteCaptionCreator::ScNoteCaptionCreator( ScDocument& rDoc, const ScAddress& r ScCaptionPtr::ScCaptionPtr() : -mpHead(nullptr), mpNext(nullptr), mpCaption(nullptr), mnRefs(0) +mpHead(nullptr), mpNext(nullptr), mpCaption(nullptr) { } ScCaptionPtr::ScCaptionPtr( SdrCaptionObj* p ) : -mpHead( p ? this : nullptr ), mpNext(nullptr), mpCaption(p), mnRefs( p ? 1 : 0 ) +mpHead(nullptr), mpNext(nullptr), mpCaption(p) { +if (p) +{ +newHead(); +} } ScCaptionPtr::ScCaptionPtr( const ScCaptionPtr& r ) : -mpHead(nullptr), mpNext(nullptr), mpCaption(nullptr), mnRefs(0) +mpHead(nullptr), mpNext(nullptr), mpCaption(nullptr) { assign( r, false); } +void ScCaptionPtr::newHead() +{ +assert(!mpHead); +mpHead = new Head; +mpHead->mpFirst = this; +mpHead->mnRefs = 1; +} + void ScCaptionPtr::assign( const ScCaptionPtr& r, bool bAssignment ) { if (mpCaption == r.mpCaption) +{ +// Two lists for the same caption is bad. +assert(!mpCaption || mpHead == r.mpHead); +assert(!mpCaption); // assigning same caption pointer within same list is weird +// Nullptr captions are not inserted to the list, so nothing to do here +// if both are. return; +} // Let's find some weird usage. -// Though assigning some other of the same list to head may syntactically -// be valid, why would we do that? -assert(r.mpHead != this); -// Same for assigning head to some other. -assert(mpHead != &r); -// And any other of the same list. -assert(mpHead != r.mpHead); +// Assigning without head doesn't make sense unless it is a nullptr caption. +assert(r.mpHead || !r.mpCaption); +// Same captions were caught above, so here different heads must be present. +assert(r.mpHead != mpHead); r.incRef(); if (bAssignment) @@ -483,7 +499,6 @@ void ScCaptionPtr::assign( const ScCaptionPtr& r, bool bAssignment ) mpCaption = r.mpCaption; // That head is this' master. mpHead = r.mpHead; -mnRefs = 0; // Insert into list. mpNext = r.mpNext; r.mpNext = this; @@ -491,54 +506,62 @@ void ScCaptionPtr::assign( const ScCaptionPtr& r, bool bAssignment ) void ScCaptionPtr::removeFromList() { -if (!mpHead && !mpNext && !mpCaption && !mnRefs) +if (!mpHead && !mpNext && !mpCaption) return; -ScCaptionPtr* pNewHead = (mpHead == this ? mpNext : nullptr); -ScCaptionPtr* pThat = (mpHead == this ? mpNext : mpHead); // do not replace on self if head -while (pThat && pThat->mpNext != this) +#if OSL_DEBUG_LEVEL > 0 +oslInterlockedCount nCount = 0; +#endif +ScCaptionPtr* pThat = (mpHead ? mpHead->mpFirst : nullptr); +while (pThat && pThat != this && pThat->mpNext != this) { // Use the walk to check consistency on the fly. +assert(pThat->mpHead == mpHead);// all belong to the same +assert(pThat->mpHead || !pThat->mpNext);// next with
[Libreoffice-commits] core.git: Branch 'libreoffice-5-2' - translations
translations |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 0863aae1ad6ee4065958873b055816833e49a702 Author: Christian Lohmaier Date: Mon Feb 27 19:38:15 2017 +0100 Updated core Project: translations fe3157b664e542f274f3db40b8d7ce9bd7787f0b update translations for 5.2.6 rc2 and force-fix errors using pocheck Change-Id: Ib30266e43b5df250e445e0825c9787bbf7e82dae (cherry picked from commit ba420d944fbb1ebafef661d8d03436d3cad1ffb4) diff --git a/translations b/translations index 32afdd6..fe3157b 16 --- a/translations +++ b/translations @@ -1 +1 @@ -Subproject commit 32afdd6686035642b40686437ce3baf9455dd244 +Subproject commit fe3157b664e542f274f3db40b8d7ce9bd7787f0b ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] translations.git: Branch 'libreoffice-5-2' - source/br source/ca source/de source/es source/gd source/hu source/kk source/nb source/nl source/nn source/oc source/pl source/pt sou
source/br/cui/uiconfig/ui.po | 15 +-- source/br/extras/source/autocorr/emoji.po | 32 source/br/sc/uiconfig/scalc/ui.po | 13 +-- source/br/scp2/source/ooo.po | 12 +-- source/br/sd/source/core.po| 12 +-- source/br/vcl/source/src.po| 10 +- source/ca/extras/source/autocorr/emoji.po | 12 +-- source/ca/helpcontent2/source/text/shared/01.po| 10 +- source/ca/officecfg/registry/data/org/openoffice/Office/UI.po |8 +- source/ca/sc/source/ui/src.po |8 +- source/de/cui/source/dialogs.po|8 +- source/de/dbaccess/source/sdbtools/resource.po |8 +- source/de/helpcontent2/source/text/sbasic/guide.po |8 +- source/de/helpcontent2/source/text/sbasic/shared.po| 16 ++-- source/de/helpcontent2/source/text/sbasic/shared/02.po | 10 +- source/de/helpcontent2/source/text/scalc/00.po | 10 +- source/de/helpcontent2/source/text/scalc/01.po | 24 +++--- source/de/helpcontent2/source/text/scalc/04.po | 10 +- source/de/helpcontent2/source/text/scalc/guide.po | 12 +-- source/de/helpcontent2/source/text/sdraw/04.po |8 +- source/de/helpcontent2/source/text/shared.po |8 +- source/de/helpcontent2/source/text/shared/01.po| 10 +- source/de/helpcontent2/source/text/shared/02.po|8 +- source/de/helpcontent2/source/text/shared/04.po| 10 +- source/de/helpcontent2/source/text/shared/explorer/database.po |8 +- source/de/helpcontent2/source/text/shared/guide.po | 12 +-- source/de/helpcontent2/source/text/shared/optionen.po |8 +- source/de/helpcontent2/source/text/simpress/02.po | 10 +- source/de/helpcontent2/source/text/simpress/04.po | 18 ++-- source/de/helpcontent2/source/text/simpress/guide.po | 24 +++--- source/de/helpcontent2/source/text/smath/guide.po | 10 +- source/de/helpcontent2/source/text/swriter.po | 10 +- source/de/helpcontent2/source/text/swriter/01.po |8 +- source/de/helpcontent2/source/text/swriter/04.po | 10 +- source/de/helpcontent2/source/text/swriter/guide.po| 20 ++--- source/de/helpcontent2/source/text/swriter/librelogo.po|8 +- source/de/instsetoo_native/inc_openoffice/windows/msi_languages.po |8 +- source/de/sc/source/ui/src.po | 12 +-- source/es/cui/uiconfig/ui.po | 10 +- source/es/helpcontent2/source/text/schart/01.po| 16 ++-- source/es/helpcontent2/source/text/shared/guide.po |6 - source/es/helpcontent2/source/text/shared/optionen.po |8 +- source/es/helpcontent2/source/text/simpress/01.po | 10 +- source/es/officecfg/registry/data/org/openoffice/Office/UI.po | 10 +- source/es/sd/source/ui/app.po |6 - source/es/svx/source/stbctrls.po |8 +- source/es/sw/uiconfig/swriter/ui.po|8 -- source/gd/officecfg/registry/data/org/openoffice/Office/UI.po |8 +- source/gd/svx/source/dialog.po |8 +- source/gd/svx/source/tbxctrls.po | 10 +- source/hu/scp2/source/ooo.po | 12 +-- source/kk/officecfg/registry/data/org/openoffice/Office/UI.po | 24 +++--- source/nb/helpcontent2/source/text/swriter/01.po | 10 +- source/nb/helpcontent2/source/text/swriter/guide.po| 10 +- source/nl/formula/source/core/resource.po |4 - source/nl/helpcontent2/source/text/scalc/01.po | 12 +-- source/nl/helpcontent2/source/text/scalc/guide.po |6 - source/nl/helpcontent2/source/text/sdraw/guide.po |8 +- source/nl/helpcontent2/source/text/shared/00.po| 26 +++--- source/nl/helpcontent2/source/text/shared/guide.po |6 - source/nl/helpcontent2/source/text/shared/optionen.po | 10 +- source/nl/helpcontent2/source/text/simpress/00.po | 16 ++-- source/nl/helpcontent2/source/text/simpress/01.po | 36 - source/nl/helpcontent2/source/tex
[Libreoffice-commits] translations.git: Branch 'libreoffice-5-2-6' - 2 commits - source/br source/ca source/de source/es source/gd source/hu source/kk source/nb source/nl source/nn source/oc source/pl
source/br/cui/uiconfig/ui.po | 15 +-- source/br/extras/source/autocorr/emoji.po | 32 source/br/sc/uiconfig/scalc/ui.po | 13 +-- source/br/scp2/source/ooo.po | 12 +-- source/br/sd/source/core.po| 12 +-- source/br/vcl/source/src.po| 10 +- source/ca/extras/source/autocorr/emoji.po | 12 +-- source/ca/helpcontent2/source/text/shared/01.po| 10 +- source/ca/officecfg/registry/data/org/openoffice/Office/UI.po |8 +- source/ca/sc/source/ui/src.po |8 +- source/de/cui/source/dialogs.po|8 +- source/de/dbaccess/source/sdbtools/resource.po |8 +- source/de/helpcontent2/source/text/sbasic/guide.po |8 +- source/de/helpcontent2/source/text/sbasic/shared.po| 16 ++-- source/de/helpcontent2/source/text/sbasic/shared/02.po | 10 +- source/de/helpcontent2/source/text/scalc/00.po | 10 +- source/de/helpcontent2/source/text/scalc/01.po | 24 +++--- source/de/helpcontent2/source/text/scalc/04.po | 10 +- source/de/helpcontent2/source/text/scalc/guide.po | 12 +-- source/de/helpcontent2/source/text/sdraw/04.po |8 +- source/de/helpcontent2/source/text/shared.po |8 +- source/de/helpcontent2/source/text/shared/01.po| 10 +- source/de/helpcontent2/source/text/shared/02.po|8 +- source/de/helpcontent2/source/text/shared/04.po| 10 +- source/de/helpcontent2/source/text/shared/explorer/database.po |8 +- source/de/helpcontent2/source/text/shared/guide.po | 12 +-- source/de/helpcontent2/source/text/shared/optionen.po |8 +- source/de/helpcontent2/source/text/simpress/02.po | 10 +- source/de/helpcontent2/source/text/simpress/04.po | 18 ++-- source/de/helpcontent2/source/text/simpress/guide.po | 24 +++--- source/de/helpcontent2/source/text/smath/guide.po | 10 +- source/de/helpcontent2/source/text/swriter.po | 10 +- source/de/helpcontent2/source/text/swriter/01.po |8 +- source/de/helpcontent2/source/text/swriter/04.po | 10 +- source/de/helpcontent2/source/text/swriter/guide.po| 20 ++--- source/de/helpcontent2/source/text/swriter/librelogo.po|8 +- source/de/instsetoo_native/inc_openoffice/windows/msi_languages.po |8 +- source/de/sc/source/ui/src.po | 12 +-- source/es/cui/uiconfig/ui.po | 10 +- source/es/helpcontent2/source/text/schart/01.po| 16 ++-- source/es/helpcontent2/source/text/shared/guide.po |6 - source/es/helpcontent2/source/text/shared/optionen.po |8 +- source/es/helpcontent2/source/text/simpress/01.po | 10 +- source/es/officecfg/registry/data/org/openoffice/Office/UI.po | 10 +- source/es/sd/source/ui/app.po |6 - source/es/svx/source/stbctrls.po |8 +- source/es/sw/uiconfig/swriter/ui.po|8 -- source/gd/officecfg/registry/data/org/openoffice/Office/UI.po |8 +- source/gd/svx/source/dialog.po |8 +- source/gd/svx/source/tbxctrls.po | 10 +- source/hu/scp2/source/ooo.po | 12 +-- source/kk/officecfg/registry/data/org/openoffice/Office/UI.po | 24 +++--- source/nb/helpcontent2/source/text/swriter/01.po | 10 +- source/nb/helpcontent2/source/text/swriter/guide.po| 10 +- source/nl/formula/source/core/resource.po |4 - source/nl/helpcontent2/source/text/scalc/01.po | 12 +-- source/nl/helpcontent2/source/text/scalc/guide.po |6 - source/nl/helpcontent2/source/text/sdraw/guide.po |8 +- source/nl/helpcontent2/source/text/shared/00.po| 26 +++--- source/nl/helpcontent2/source/text/shared/guide.po |6 - source/nl/helpcontent2/source/text/shared/optionen.po | 10 +- source/nl/helpcontent2/source/text/simpress/00.po | 16 ++-- source/nl/helpcontent2/source/text/simpress/01.po | 36 - source/nl/helpcontent2/source/tex
[Libreoffice-commits] core.git: Branch 'libreoffice-5-2-6' - translations
translations |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit d826c34d9a0ea796baba2612d56262f3cc015287 Author: Christian Lohmaier Date: Mon Feb 27 19:38:15 2017 +0100 Updated core Project: translations 963f4bd7a7ad2283ff09f844722a523d98dbc1db update translations for 5.2.6 rc2 and force-fix errors using pocheck Change-Id: Ib30266e43b5df250e445e0825c9787bbf7e82dae (cherry picked from commit ba420d944fbb1ebafef661d8d03436d3cad1ffb4) (cherry picked from commit fe3157b664e542f274f3db40b8d7ce9bd7787f0b) diff --git a/translations b/translations index be9990d..963f4bd 16 --- a/translations +++ b/translations @@ -1 +1 @@ -Subproject commit be9990d1825a8c3782f4cdd8c0ccffd2b5d1157b +Subproject commit 963f4bd7a7ad2283ff09f844722a523d98dbc1db ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: sd/source
sd/source/core/drawdoc3.cxx |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) New commits: commit 871e686802b901e1a7220c1739b5857f4fdbf6e3 Author: Stephan Bergmann Date: Mon Feb 27 20:47:58 2017 +0100 Better fix not causing unrelated loplugin:loopvartoosmall ...for e7aab255c1595c8cc54e0eab3d8d1059fb3d00f1 "warning C4018: '<' : signed/unsigned mismatch" Change-Id: I9a91244f2136e2cd31c480511e3b08c721b478e4 diff --git a/sd/source/core/drawdoc3.cxx b/sd/source/core/drawdoc3.cxx index 0836603..aade5d7 100644 --- a/sd/source/core/drawdoc3.cxx +++ b/sd/source/core/drawdoc3.cxx @@ -408,7 +408,7 @@ bool SdDrawDocument::InsertBookmarkAsPage( } const sal_uInt16 nSdPageCount = GetSdPageCount(PageKind::Standard); -const sal_uInt32 nBMSdPageCount = pBookmarkDoc->GetSdPageCount(PageKind::Standard); +const sal_uInt16 nBMSdPageCount = pBookmarkDoc->GetSdPageCount(PageKind::Standard); const sal_uInt16 nMPageCount = GetMasterPageCount(); if (nSdPageCount==0 || nBMSdPageCount==0 || nMPageCount==0) @@ -932,7 +932,7 @@ bool SdDrawDocument::InsertBookmarkAsPage( { try { -for(sal_uInt32 p = nInsertPos; p < (nInsertPos + nBMSdPageCount); p++) +for(sal_uInt32 p = nInsertPos; p < sal_uInt32(nInsertPos) + sal_uInt32(nBMSdPageCount); p++) { SdPage *pPg = static_cast( GetPage(p) ); for(size_t i = 0; pPg && (i < pPg->GetObjCount()); ++i) ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] online.git: loleaflet/dist
loleaflet/dist/toolbar/toolbar.js |5 - 1 file changed, 4 insertions(+), 1 deletion(-) New commits: commit b4704ffdc3c79b00479a00d7fd19a6aa9c064e68 Author: Henry Castro Date: Mon Feb 27 16:17:17 2017 -0400 loleaflet: fix insert annotation in the toolbar diff --git a/loleaflet/dist/toolbar/toolbar.js b/loleaflet/dist/toolbar/toolbar.js index 714c6ed..6fe0696 100644 --- a/loleaflet/dist/toolbar/toolbar.js +++ b/loleaflet/dist/toolbar/toolbar.js @@ -250,6 +250,9 @@ function onClick(id, item, subItem) { else if (id === 'presentation' && map.getDocType() === 'presentation') { map.fire('fullscreen'); } + else if (id === 'insertannotation') { + map.insertComment(); + } else if (id === 'insertpage') { map.insertPage(); } @@ -515,7 +518,7 @@ $(function () { {type: 'break', id: 'incdecindent'}, {type: 'html', id: 'inserttable-html', html: ''}, {type: 'button', id: 'inserttable', img: 'inserttable', hint: _('Insert table')}, - {type: 'button', id: 'insertannotation', img: 'annotation', hint: _('Insert comment'), uno: 'InsertAnnotation'}, + {type: 'button', id: 'insertannotation', img: 'annotation', hint: _('Insert comment')}, {type: 'button', id: 'insertgraphic', img: 'insertgraphic', hint: _('Insert graphic')}, {type: 'button', id: 'specialcharacter', img: 'specialcharacter', hint: _('Special Character')}, {type: 'html', id: 'right'}, ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: basic/qa
basic/qa/cppunit/test_vba.cxx |1 basic/qa/vba_tests/chr.vb | 71 ++ 2 files changed, 72 insertions(+) New commits: commit b5c83cf676541d367ea4d0ce0c5531160f2b215b Author: ZdenÄk Crhonek Date: Fri Feb 10 21:07:11 2017 +0100 add VBA CHR() test case Change-Id: I9e7aefdd0309fd4f209fba6fb4f698b098856d01 Reviewed-on: https://gerrit.libreoffice.org/34133 Tested-by: Jenkins Reviewed-by: Eike Rathke diff --git a/basic/qa/cppunit/test_vba.cxx b/basic/qa/cppunit/test_vba.cxx index e493c20..cff9b06 100644 --- a/basic/qa/cppunit/test_vba.cxx +++ b/basic/qa/cppunit/test_vba.cxx @@ -55,6 +55,7 @@ void VBATest::testMiscVBAFunctions() "format.vb", "replace.vb", "stringplusdouble.vb", +"chr.vb", #ifndef WIN32 // missing 64bit Currency marshalling. "win32compat.vb", // windows compatibility hooks. #endif diff --git a/basic/qa/vba_tests/chr.vb b/basic/qa/vba_tests/chr.vb new file mode 100644 index 000..9c19784 --- /dev/null +++ b/basic/qa/vba_tests/chr.vb @@ -0,0 +1,71 @@ +Option VBASupport 1 +Option Explicit +Dim passCount As Integer +Dim failCount As Integer +Dim result As String + +Function doUnitTest() As String +result = verify_testCHR() +If failCount <> 0 And passCount > 0 Then +doUnitTest = result +Else +doUnitTest = "OK" +End If +End Function + + + +Function verify_testCHR() As String + +passCount = 0 +failCount = 0 + +result = "Test Results" & Chr$(10) & "" & Chr$(10) + +Dim testName As String +Dim TestDateTime As Date +Dim TestStr As String +Dim str1, str2 As String +testName = "Test CHR function" +On Error GoTo errorHandler + +str2 = "W" +str1 = Chr(87) +TestLog_ASSERT str1 = str2, "the return CHR is: " & str1 + +str2 = "i" +str1 = Chr(105) +TestLog_ASSERT str1 = str2, "the return CHR is: " & str1 + +str2 = "#" +str1 = Chr(35) +TestLog_ASSERT str1 = str2, "the return CHR is: " & str1 + +result = result & Chr$(10) & "Tests passed: " & passCount & Chr$(10) & "Tests failed: " & failCount & Chr$(10) +verify_testCHR = result + +Exit Function +errorHandler: +TestLog_ASSERT (False), testName & ": hit error handler" +End Function + +Sub TestLog_ASSERT(assertion As Boolean, Optional testId As String, Optional testComment As String) + +If assertion = True Then +passCount = passCount + 1 +Else +Dim testMsg As String +If Not IsMissing(testId) Then +testMsg = testMsg + " : " + testId +End If +If Not IsMissing(testComment) And Not (testComment = "") Then +testMsg = testMsg + " (" + testComment + ")" +End If + +result = result & Chr$(10) & " Failed: " & testMsg +failCount = failCount + 1 +End If + +End Sub + + ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: sc/inc sc/source
sc/inc/postit.hxx |3 -- sc/source/core/data/postit.cxx | 56 ++--- 2 files changed, 31 insertions(+), 28 deletions(-) New commits: commit d5d220b47416660b2f8cc370b2d2d1baf11c77ec Author: Eike Rathke Date: Mon Feb 27 22:24:14 2017 +0100 move assign() into operator=() and add the relevant bits to copy-ctor Change-Id: Iac606a8e5e4fc9beb019d95d2a05f0ab9d9dad34 diff --git a/sc/inc/postit.hxx b/sc/inc/postit.hxx index ad671fb..f7c10da 100644 --- a/sc/inc/postit.hxx +++ b/sc/inc/postit.hxx @@ -88,9 +88,6 @@ private: bool decRef() const;//< @returns if the last reference was decremented. void decRefAndDestroy();//< Destroys caption object if the last reference was decremented. -/** Operations common to ctor and assignment operator, maintaining the lists. */ -void assign( const ScCaptionPtr& r, bool bAssignment ); - /** Remove from current list and close gap. Usually there are only very few instances, so maintaining a doubly diff --git a/sc/source/core/data/postit.cxx b/sc/source/core/data/postit.cxx index 747eb68..e7004e7 100644 --- a/sc/source/core/data/postit.cxx +++ b/sc/source/core/data/postit.cxx @@ -459,21 +459,28 @@ ScCaptionPtr::ScCaptionPtr( SdrCaptionObj* p ) : } ScCaptionPtr::ScCaptionPtr( const ScCaptionPtr& r ) : -mpHead(nullptr), mpNext(nullptr), mpCaption(nullptr) +mpHead(r.mpHead), mpCaption(r.mpCaption) { -assign( r, false); +if (r.mpCaption) +{ +assert(r.mpHead); +r.incRef(); +// Insert into list. +mpNext = r.mpNext; +r.mpNext = this; +} +else +{ +assert(!r.mpHead); +mpNext = nullptr; +} } -void ScCaptionPtr::newHead() +ScCaptionPtr& ScCaptionPtr::operator=( const ScCaptionPtr& r ) { -assert(!mpHead); -mpHead = new Head; -mpHead->mpFirst = this; -mpHead->mnRefs = 1; -} +if (this == &r) +return *this; -void ScCaptionPtr::assign( const ScCaptionPtr& r, bool bAssignment ) -{ if (mpCaption == r.mpCaption) { // Two lists for the same caption is bad. @@ -481,7 +488,7 @@ void ScCaptionPtr::assign( const ScCaptionPtr& r, bool bAssignment ) assert(!mpCaption); // assigning same caption pointer within same list is weird // Nullptr captions are not inserted to the list, so nothing to do here // if both are. -return; +return *this; } // Let's find some weird usage. @@ -491,17 +498,25 @@ void ScCaptionPtr::assign( const ScCaptionPtr& r, bool bAssignment ) assert(r.mpHead != mpHead); r.incRef(); -if (bAssignment) -{ -decRefAndDestroy(); -removeFromList(); -} +decRefAndDestroy(); +removeFromList(); + mpCaption = r.mpCaption; // That head is this' master. mpHead = r.mpHead; // Insert into list. mpNext = r.mpNext; r.mpNext = this; + +return *this; +} + +void ScCaptionPtr::newHead() +{ +assert(!mpHead); +mpHead = new Head; +mpHead->mpFirst = this; +mpHead->mnRefs = 1; } void ScCaptionPtr::removeFromList() @@ -666,15 +681,6 @@ void ScCaptionPtr::clear() mpCaption = nullptr; } -ScCaptionPtr& ScCaptionPtr::operator=( const ScCaptionPtr& r ) -{ -if (this == &r) -return *this; - -assign( r, true); -return *this; -} - struct ScCaptionInitData { ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: sw/source
sw/source/core/crsr/findattr.cxx |6 +++--- sw/source/core/inc/pamtyp.hxx|6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) New commits: commit 56dda82ff71c68f8bca1917fa6d642e26449a1d3 Author: Stephan Bergmann Date: Mon Feb 27 22:51:07 2017 +0100 Clean up use of integer types Change-Id: Ia3c3e8b6c1988561284d91545e98e4939973c4b9 diff --git a/sw/source/core/crsr/findattr.cxx b/sw/source/core/crsr/findattr.cxx index 73b5777..ba17536 100644 --- a/sw/source/core/crsr/findattr.cxx +++ b/sw/source/core/crsr/findattr.cxx @@ -90,7 +90,7 @@ bool CmpAttr( const SfxPoolItem& rItem1, const SfxPoolItem& rItem2 ) return rItem1 == rItem2; } -const SwTextAttr* GetFrwrdTextHint( const SwpHints& rHtsArr, sal_uInt16& rPos, +const SwTextAttr* GetFrwrdTextHint( const SwpHints& rHtsArr, size_t& rPos, sal_Int32 nContentPos ) { while( rPos < rHtsArr.Count() ) @@ -103,7 +103,7 @@ const SwTextAttr* GetFrwrdTextHint( const SwpHints& rHtsArr, sal_uInt16& rPos, return nullptr; // invalid text attribute } -const SwTextAttr* GetBkwrdTextHint( const SwpHints& rHtsArr, sal_uInt16& rPos, +const SwTextAttr* GetBkwrdTextHint( const SwpHints& rHtsArr, size_t& rPos, sal_Int32 nContentPos ) { while( rPos > 0 ) @@ -163,7 +163,7 @@ static bool lcl_Search( const SwTextNode& rTextNd, SwPaM& rPam, const SwTextAttr *pTextHt = nullptr; bool bForward = &fnMove == &fnMoveForward; -sal_uInt16 nPos = bForward ? 0 : rTextNd.GetSwpHints().Count(); +size_t nPos = bForward ? 0 : rTextNd.GetSwpHints().Count(); sal_Int32 nContentPos = rPam.GetPoint()->nContent.GetIndex(); while( nullptr != ( pTextHt=(*fnMove.fnGetHint)(rTextNd.GetSwpHints(),nPos,nContentPos))) diff --git a/sw/source/core/inc/pamtyp.hxx b/sw/source/core/inc/pamtyp.hxx index 9b5bd95..bd472f8 100644 --- a/sw/source/core/inc/pamtyp.hxx +++ b/sw/source/core/inc/pamtyp.hxx @@ -34,8 +34,8 @@ void GoStartDoc( SwPosition*); void GoEndDoc( SwPosition*); void GoStartSection( SwPosition*); void GoEndSection( SwPosition*); -const SwTextAttr* GetFrwrdTextHint( const SwpHints&, sal_uInt16&, sal_Int32 ); -const SwTextAttr* GetBkwrdTextHint( const SwpHints&, sal_uInt16&, sal_Int32 ); +const SwTextAttr* GetFrwrdTextHint( const SwpHints&, size_t&, sal_Int32 ); +const SwTextAttr* GetBkwrdTextHint( const SwpHints&, size_t&, sal_Int32 ); bool GoNext(SwNode* pNd, SwIndex * pIdx, sal_uInt16 nMode ); bool GoPrevious(SwNode* pNd, SwIndex * pIdx, sal_uInt16 nMode ); @@ -48,7 +48,7 @@ typedef SwContentNode* (*GoNds)( SwNodeIndex*, bool ); typedef void (*GoDoc)( SwPosition* ); typedef void (*GoSection)( SwPosition* ); typedef bool (SwPosition:: *CmpOp)( const SwPosition& ) const; -typedef const SwTextAttr* (*GetHint)( const SwpHints&, sal_uInt16&, sal_Int32 ); +typedef const SwTextAttr* (*GetHint)( const SwpHints&, size_t&, sal_Int32 ); typedef bool (utl::TextSearch:: *SearchText)( const OUString&, sal_Int32*, sal_Int32*, css::util::SearchResult* ); typedef void (*MvSection)( SwNodeIndex * ); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-5-2' - sw/source
sw/source/filter/xml/xmlimpit.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 1f87318abb50e164aa4125747493c5ee02e8687c Author: Justin Luth Date: Wed Jan 18 15:52:33 2017 +0300 tdf#77111 odt import: treat PAGEDESC_PAGENUMOFFSET==0 as auto Ever since 2010 commit 7edaf190 zeroes have been saved as XML_AUTO. Ever since 2014 commit c2ccd20c, a numoffset of zero is no longer considered to be auto (for MS compatibility) but is still treated as auto during xml export. Thus, any older documents that had been saved with a zero should still xml import as auto instead of as 0. Change-Id: I1a0df32a8e2f1b30b2bedbf4c9bb07ebec239637 Reviewed-on: https://gerrit.libreoffice.org/33267 Tested-by: Jenkins Reviewed-by: Justin Luth Reviewed-by: Michael Stahl (cherry picked from commit e36f0860f00af139a8fa94d36302f7b0c56383fe) Reviewed-on: https://gerrit.libreoffice.org/34695 diff --git a/sw/source/filter/xml/xmlimpit.cxx b/sw/source/filter/xml/xmlimpit.cxx index ed7fb7c..8125c19 100644 --- a/sw/source/filter/xml/xmlimpit.cxx +++ b/sw/source/filter/xml/xmlimpit.cxx @@ -787,7 +787,7 @@ bool SvXMLImportItemMapper::PutXMLValue( sal_Int32 nVal; bOk = ::sax::Converter::convertNumber( nVal, rValue, 0, USHRT_MAX); -if( bOk ) +if( bOk && nVal > 0 ) rPageDesc.SetNumOffset( (sal_uInt16)nVal ); } } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-5-3' - sw/source
sw/source/filter/xml/xmlimpit.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit ae225329435cb49e61e3c9fc76129aa4e334598a Author: Justin Luth Date: Wed Jan 18 15:52:33 2017 +0300 tdf#77111 odt import: treat PAGEDESC_PAGENUMOFFSET==0 as auto Ever since 2010 commit 7edaf190 zeroes have been saved as XML_AUTO. Ever since 2014 commit c2ccd20c, a numoffset of zero is no longer considered to be auto (for MS compatibility) but is still treated as auto during xml export. Thus, any older documents that had been saved with a zero should still xml import as auto instead of as 0. Change-Id: I1a0df32a8e2f1b30b2bedbf4c9bb07ebec239637 Reviewed-on: https://gerrit.libreoffice.org/33267 Tested-by: Jenkins Reviewed-by: Justin Luth Reviewed-by: Michael Stahl (cherry picked from commit e36f0860f00af139a8fa94d36302f7b0c56383fe) Reviewed-on: https://gerrit.libreoffice.org/34694 diff --git a/sw/source/filter/xml/xmlimpit.cxx b/sw/source/filter/xml/xmlimpit.cxx index bb0f51e..058c951 100644 --- a/sw/source/filter/xml/xmlimpit.cxx +++ b/sw/source/filter/xml/xmlimpit.cxx @@ -786,7 +786,7 @@ bool SvXMLImportItemMapper::PutXMLValue( sal_Int32 nVal; bOk = ::sax::Converter::convertNumber( nVal, rValue, 0, USHRT_MAX); -if( bOk ) +if( bOk && nVal > 0 ) rPageDesc.SetNumOffset( (sal_uInt16)nVal ); } } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] online.git: Branch 'libreoffice-5-3' - 4 commits - common/FileUtil.cpp common/IoUtil.cpp kit/ChildSession.cpp kit/ForKit.cpp test/UnitPrefork.cpp
common/FileUtil.cpp |7 +++ common/IoUtil.cpp|1 + kit/ChildSession.cpp |7 +-- kit/ForKit.cpp |4 ++-- test/UnitPrefork.cpp |6 ++ 5 files changed, 17 insertions(+), 8 deletions(-) New commits: commit 17f11cce5d9b2272bc5325ea8d6377a9f4a4f9ca Author: Jan Holesovsky Date: Tue Feb 21 19:55:04 2017 +0100 We should be able to run with 5G of free space just fine. Change-Id: Ie5df96388eeaa0ddf1a41564ec7d52c283e6b1bb (cherry picked from commit 7eff2294d938d0e14db50a385ab9e226c14f7c77) Signed-off-by: Andras Timar diff --git a/common/FileUtil.cpp b/common/FileUtil.cpp index ea55548..72afa65 100644 --- a/common/FileUtil.cpp +++ b/common/FileUtil.cpp @@ -195,8 +195,15 @@ namespace FileUtil if (statfs(path.c_str(), &sfs) == -1) return true; +// we should be able to run just OK with 5GB +constexpr int64_t ENOUGH_SPACE = int64_t(5)*1024*1024*1024; + +if (static_cast(sfs.f_bavail) * sfs.f_bsize > ENOUGH_SPACE) +return true; + if (static_cast(sfs.f_bavail) / sfs.f_blocks <= 0.05) return false; + return true; } commit 969382ca85543ad90d2c6eca1d1dd2f7c2cb581b Author: Michael Meeks Date: Sat Dec 3 23:02:11 2016 + UnitPrefork: bump timeouts. (cherry picked from commit a2ff6528bbc1070f8f099efc221ecb1e5dd37ca6) Signed-off-by: Andras Timar diff --git a/test/UnitPrefork.cpp b/test/UnitPrefork.cpp index 93d4adb..137ac97 100644 --- a/test/UnitPrefork.cpp +++ b/test/UnitPrefork.cpp @@ -49,9 +49,7 @@ public: _childDirty(0) { setHasKitHooks(); -#ifdef TEST_DIRTY_NUMBERS -setTimeout(100 * 1000); -#endif +setTimeout(60 * 1000); } virtual void preSpawnCount(int &numPrefork) override @@ -103,7 +101,7 @@ public: LOG_INF("Getting memory of child #" << i + 1 << " of " << _childSockets.size()); _childSockets[i]->sendFrame("unit-memdump: \n", sizeof("unit-memdump: \n")); -if (_cv.wait_for(lock, std::chrono::milliseconds(5 * 1000)) == std::cv_status::timeout) +if (_cv.wait_for(lock, std::chrono::milliseconds(10 * 1000)) == std::cv_status::timeout) { _failure = "Timed out waiting for child to respond to unit-memdump."; std::cerr << _failure << std::endl; commit 33b6f4a325b6b989458640113012daeeeb58eebc Author: Jan Holesovsky Date: Thu Dec 1 12:25:16 2016 +0100 Don't send setpart: to text documents, it will always jump to the 1st page. Change-Id: I809f2ba493329174a33f99d63eec2c60b38acb05 (cherry picked from commit 2b13cfa1a7f4b7b3f472b1e7c36c3a6b9606e134) Signed-off-by: Andras Timar diff --git a/kit/ChildSession.cpp b/kit/ChildSession.cpp index 5e364ae..d2b8915 100644 --- a/kit/ChildSession.cpp +++ b/kit/ChildSession.cpp @@ -109,8 +109,11 @@ bool ChildSession::_handleInput(const char *buffer, int length) // Notify all views about updated view info _docManager.notifyViewInfo(viewIds); -sendTextFrame("curpart: part=" + std::to_string(curPart)); -sendTextFrame("setpart: part=" + std::to_string(curPart)); +if (getLOKitDocument()->getDocumentType() != LOK_DOCTYPE_TEXT) +{ +sendTextFrame("curpart: part=" + std::to_string(curPart)); +sendTextFrame("setpart: part=" + std::to_string(curPart)); +} //TODO: Is the order of these important? for (const auto& pair : _lastDocEvents) commit e740421fa2012764aa6c220b7c418f419d32cc89 Author: Ashod Nakashian Date: Mon Nov 28 20:34:18 2016 -0500 loolwsd: terminate forkit when wsd dies When we the pipe with wsd is closed we assume wsd has died and we terminate too. WSD can fork us anew, if it's still alive. Change-Id: I669ed717db973b50498a6bc08e1fca59c6563443 Reviewed-on: https://gerrit.libreoffice.org/31337 Reviewed-by: Ashod Nakashian Tested-by: Ashod Nakashian (cherry picked from commit 7a4250b90e4273f73ab5ab94c35728aeba9f0d63) Signed-off-by: Andras Timar diff --git a/common/IoUtil.cpp b/common/IoUtil.cpp index 6ae507c..1250066 100644 --- a/common/IoUtil.cpp +++ b/common/IoUtil.cpp @@ -322,6 +322,7 @@ int PipeReader::readLine(std::string& line, } else if (pipe.revents & (POLLERR | POLLHUP | POLLNVAL)) { +LOG_FTL("Pipe closed."); return -1; } } diff --git a/kit/ForKit.cpp b/kit/ForKit.cpp index 4680c4d..b727817 100644 --- a/kit/ForKit.cpp +++ b/kit/ForKit.cpp @@ -75,9 +75,9 @@ public: if (ready <= 0) { // Termination is done via SIGTERM, which breaks the wait. -if (TerminationFlag) +if (ready < 0) { -if (ready < 0) +if (TerminationFlag) { LOG_INF("Poll