[Libreoffice-commits] core.git: sw/qa sw/source
sw/qa/extras/rtfexport/rtfexport.cxx | 70 ++- sw/qa/extras/rtfimport/rtfimport.cxx | 56 sw/source/filter/rtf/swparrtf.cxx|2 - 3 files changed, 109 insertions(+), 19 deletions(-) New commits: commit 40eca147d11a0563eab6450cb94f0b5704c88fcc Author: Miklos Vajna Date: Mon Apr 3 09:20:07 2017 +0200 sw: indentation fixes Change-Id: I81076414ee335f34bb687f93e89d65343d2f3c57 diff --git a/sw/qa/extras/rtfexport/rtfexport.cxx b/sw/qa/extras/rtfexport/rtfexport.cxx index 9dba6712a039..76a82593aafb 100644 --- a/sw/qa/extras/rtfexport/rtfexport.cxx +++ b/sw/qa/extras/rtfexport/rtfexport.cxx @@ -93,7 +93,14 @@ public: } }; -namespace com { namespace sun { namespace star { namespace awt { +namespace com +{ +namespace sun +{ +namespace star +{ +namespace awt +{ std::ostream& operator<<(std::ostream& rStrm, GradientStyle n) { @@ -101,9 +108,19 @@ std::ostream& operator<<(std::ostream& rStrm, GradientStyle n) return rStrm; } -} } } } +} +} +} +} -namespace com { namespace sun { namespace star { namespace drawing { +namespace com +{ +namespace sun +{ +namespace star +{ +namespace drawing +{ std::ostream& operator<<(std::ostream& rStrm, FillStyle n) { @@ -111,9 +128,19 @@ std::ostream& operator<<(std::ostream& rStrm, FillStyle n) return rStrm; } -} } } } +} +} +} +} -namespace com { namespace sun { namespace star { namespace style { +namespace com +{ +namespace sun +{ +namespace star +{ +namespace style +{ std::ostream& operator<<(std::ostream& rStrm, PageStyleLayout n) { @@ -121,9 +148,19 @@ std::ostream& operator<<(std::ostream& rStrm, PageStyleLayout n) return rStrm; } -} } } } +} +} +} +} -namespace com { namespace sun { namespace star { namespace text { +namespace com +{ +namespace sun +{ +namespace star +{ +namespace text +{ std::ostream& operator<<(std::ostream& rStrm, TextContentAnchorType n) { @@ -131,9 +168,19 @@ std::ostream& operator<<(std::ostream& rStrm, TextContentAnchorType n) return rStrm; } -} } } } +} +} +} +} -namespace com { namespace sun { namespace star { namespace table { +namespace com +{ +namespace sun +{ +namespace star +{ +namespace table +{ std::ostream& operator<<(std::ostream& rStrm, ShadowLocation n) { @@ -141,7 +188,10 @@ std::ostream& operator<<(std::ostream& rStrm, ShadowLocation n) return rStrm; } -} } } } +} +} +} +} DECLARE_RTFEXPORT_TEST(testZoom, "zoom.rtf") { diff --git a/sw/qa/extras/rtfimport/rtfimport.cxx b/sw/qa/extras/rtfimport/rtfimport.cxx index 191fc7a2664b..28c96fb690d3 100644 --- a/sw/qa/extras/rtfimport/rtfimport.cxx +++ b/sw/qa/extras/rtfimport/rtfimport.cxx @@ -63,7 +63,14 @@ #include -namespace com { namespace sun { namespace star { namespace beans { +namespace com +{ +namespace sun +{ +namespace star +{ +namespace beans +{ std::ostream& operator<<(std::ostream& rStrm, PropertyState n) { @@ -71,8 +78,18 @@ std::ostream& operator<<(std::ostream& rStrm, PropertyState n) return rStrm; } -} } } } -namespace com { namespace sun { namespace star { namespace style { +} +} +} +} +namespace com +{ +namespace sun +{ +namespace star +{ +namespace style +{ std::ostream& operator<<(std::ostream& rStrm, BreakType n) { @@ -90,8 +107,18 @@ std::ostream& operator<<(std::ostream& rStrm, ParagraphAdjust n) return rStrm; } -} } } } -namespace com { namespace sun { namespace star { namespace drawing { +} +} +} +} +namespace com +{ +namespace sun +{ +namespace star +{ +namespace drawing +{ std::ostream& operator<<(std::ostream& rStrm, FillStyle n) { @@ -99,8 +126,18 @@ std::ostream& operator<<(std::ostream& rStrm, FillStyle n) return rStrm; } -} } } } -namespace com { namespace sun { namespace star { namespace text { +} +} +} +} +namespace com +{ +namespace sun +{ +namespace star +{ +namespace text +{ std::ostream& operator<<(std::ostream& rStrm, TextContentAnchorType n) { @@ -113,7 +150,10 @@ std::ostream& operator<<(std::ostream& rStrm, WrapTextMode n) return rStrm; } -} } } } +} +} +} +} class Test : public SwModelTestBase { diff --git a/sw/source/filter/rtf/swparrtf.cxx b/sw/source/filter/rtf/swparrtf.cxx index cdcff0f3d0ab..d1186a7f9755 100644 --- a/sw/source/filter/rtf/swparrtf.cxx +++ b/sw/source/filter/rtf/swparrtf.cxx @@ -158,7 +158,7 @@ extern "C" SAL_DLLPUBLIC_EXPORT Reader* SAL_CALL ImportRTF() return new SwRTFReader; } -extern "C" SAL_DLLPUBLIC_EXPORT bool SAL_CALL TestImportRTF(SvStream &rStream) +extern "C" SAL_DLLPUBLIC_EXPORT bool SAL_CALL TestImportRTF(SvStream& rStream) { SwGlobals::ensure(); ___ 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/ui/chrdlg/chardlg.cxx |2 ++ 1 file changed, 2 insertions(+) New commits: commit 8533e21ecf8d94caebfdb3df088e462bb790f986 Author: Oliver Specht Date: Fri Mar 31 14:46:15 2017 +0200 tdf#106897: preset visited/unvisited character style in ListBox Change-Id: I9bfa2b8a50340a6b09d8cc50e5313dc45a518472 Reviewed-on: https://gerrit.libreoffice.org/35973 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt diff --git a/sw/source/ui/chrdlg/chardlg.cxx b/sw/source/ui/chrdlg/chardlg.cxx index 5eb7cbce9f60..e357175c216a 100644 --- a/sw/source/ui/chrdlg/chardlg.cxx +++ b/sw/source/ui/chrdlg/chardlg.cxx @@ -167,6 +167,8 @@ SwCharURLPage::SwCharURLPage(vcl::Window* pParent, const SfxItemSet& rCoreSet) SwView *pView = ::GetActiveView(); ::FillCharStyleListBox(*m_pVisitedLB, pView->GetDocShell()); ::FillCharStyleListBox(*m_pNotVisitedLB, pView->GetDocShell()); + m_pVisitedLB->SelectEntryPos(m_pVisitedLB->GetEntryPos(reinterpret_cast(RES_POOLCHR_INET_VISIT))); + m_pNotVisitedLB->SelectEntryPos(m_pNotVisitedLB->GetEntryPos(reinterpret_cast(RES_POOLCHR_INET_NORMAL))); std::unique_ptr pList( new TargetList ); const SfxFrame& rFrame = pView->GetViewFrame()->GetFrame(); ___ 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/ui/index/cnttab.cxx | 234 ++-- sw/source/uibase/inc/swuicnttab.hxx | 40 +++--- 2 files changed, 137 insertions(+), 137 deletions(-) New commits: commit 92fbd5a325a462aadfefae2023e99712716de7db Author: Miklos Vajna Date: Mon Apr 3 09:20:44 2017 +0200 sw: prefix members of SwTokenWindow Change-Id: Iab538d4e4943559dc09dc1e947217b0db697620f Reviewed-on: https://gerrit.libreoffice.org/36039 Reviewed-by: Miklos Vajna Tested-by: Jenkins diff --git a/sw/source/ui/index/cnttab.cxx b/sw/source/ui/index/cnttab.cxx index af9ae83a0aff..abb17ee90f7a 100644 --- a/sw/source/ui/index/cnttab.cxx +++ b/sw/source/ui/index/cnttab.cxx @@ -2680,11 +2680,11 @@ OUString SwTOXEntryTabPage::GetLevelHelp(sal_uInt16 nLevel) const SwTokenWindow::SwTokenWindow(vcl::Window* pParent) : VclHBox(pParent) -, pForm(nullptr) -, nLevel(0) -, bValid(false) -, sCharStyle(SW_RESSTR(STR_CHARSTYLE)) -, pActiveCtrl(nullptr) +, m_pForm(nullptr) +, m_nLevel(0) +, m_bValid(false) +, m_sCharStyle(SW_RESSTR(STR_CHARSTYLE)) +, m_pActiveCtrl(nullptr) , m_pParent(nullptr) { m_pUIBuilder.reset(new VclBuilder(this, getUIRootDir(), @@ -2699,18 +2699,18 @@ SwTokenWindow::SwTokenWindow(vcl::Window* pParent) sal_uInt32 nTextId = STR_BUTTON_TEXT_START + i; if( STR_TOKEN_ENTRY_TEXT == nTextId ) nTextId = STR_TOKEN_ENTRY; -aButtonTexts[i] = SW_RESSTR(nTextId); +m_aButtonTexts[i] = SW_RESSTR(nTextId); sal_uInt32 nHelpId = STR_BUTTON_HELP_TEXT_START + i; if(STR_TOKEN_HELP_ENTRY_TEXT == nHelpId) nHelpId = STR_TOKEN_HELP_ENTRY; -aButtonHelpTexts[i] = SW_RESSTR(nHelpId); +m_aButtonHelpTexts[i] = SW_RESSTR(nHelpId); } -accessibleName = SW_RESSTR(STR_STRUCTURE); -sAdditionalAccnameString1 = SW_RESSTR(STR_ADDITIONAL_ACCNAME_STRING1); -sAdditionalAccnameString2 = SW_RESSTR(STR_ADDITIONAL_ACCNAME_STRING2); -sAdditionalAccnameString3 = SW_RESSTR(STR_ADDITIONAL_ACCNAME_STRING3); +m_sAccessibleName = SW_RESSTR(STR_STRUCTURE); +m_sAdditionalAccnameString1 = SW_RESSTR(STR_ADDITIONAL_ACCNAME_STRING1); +m_sAdditionalAccnameString2 = SW_RESSTR(STR_ADDITIONAL_ACCNAME_STRING2); +m_sAdditionalAccnameString3 = SW_RESSTR(STR_ADDITIONAL_ACCNAME_STRING3); Link aLink(LINK(this, SwTokenWindow, ScrollHdl)); m_pLeftScrollWin->SetClickHdl(aLink); @@ -2723,11 +2723,11 @@ void SwTokenWindow::setAllocation(const Size &rAllocation) { VclHBox::setAllocation(rAllocation); -if (aControlList.empty()) +if (m_aControlList.empty()) return; Size aControlSize(m_pCtrlParentWin->GetSizePixel()); -for (VclPtr const & pControl : aControlList) +for (VclPtr const & pControl : m_aControlList) { Size aSize(pControl->GetSizePixel()); aSize.Height() = aControlSize.Height(); @@ -2743,18 +2743,18 @@ SwTokenWindow::~SwTokenWindow() void SwTokenWindow::dispose() { -for (VclPtr & pControl : aControlList) +for (VclPtr & pControl : m_aControlList) { pControl->SetGetFocusHdl( Link() ); pControl->SetLoseFocusHdl( Link() ); pControl.disposeAndClear(); } -aControlList.clear(); +m_aControlList.clear(); disposeBuilder(); m_pLeftScrollWin.clear(); m_pCtrlParentWin.clear(); m_pRightScrollWin.clear(); -pActiveCtrl.clear(); +m_pActiveCtrl.clear(); m_pParent.clear(); VclHBox::dispose(); } @@ -2762,25 +2762,25 @@ void SwTokenWindow::dispose() void SwTokenWindow::SetForm(SwForm& rForm, sal_uInt16 nL) { SetActiveControl(nullptr); -bValid = true; +m_bValid = true; -if(pForm) +if(m_pForm) { -for (ctrl_iterator iter = aControlList.begin(); iter != aControlList.end(); ++iter) +for (ctrl_iterator iter = m_aControlList.begin(); iter != m_aControlList.end(); ++iter) iter->disposeAndClear(); //apply current level settings to the form -for (auto it = aControlList.begin(); it != aControlList.end(); ++it) +for (auto it = m_aControlList.begin(); it != m_aControlList.end(); ++it) it->disposeAndClear(); -aControlList.clear(); +m_aControlList.clear(); } -nLevel = nL; -pForm = &rForm; +m_nLevel = nL; +m_pForm = &rForm; //now the display -if(nLevel < MAXLEVEL || rForm.GetTOXType() == TOX_AUTHORITIES) +if(m_nLevel < MAXLEVEL || rForm.GetTOXType() == TOX_AUTHORITIES) { // #i21237# -SwFormTokens aPattern = pForm->GetPattern(nLevel + 1); +SwFormTokens aPattern = m_pForm->GetPattern(m_nLevel + 1); SwFormTokens::iterator aIt = aPattern.begin(); bool bLastWasText = false; //assure alternating text - code - text @@ -2842,21 +2842,21 @@ void SwTokenWindow::SetForm(SwForm& rForm, sal_uInt16 nL) void SwTokenWindow::Set
New Defects reported by Coverity Scan for LibreOffice
Hi, Please find the latest report on new defect(s) introduced to LibreOffice found with Coverity Scan. 10 new defect(s) introduced to LibreOffice found with Coverity Scan. 18 defect(s), reported by Coverity Scan earlier, were marked fixed in the recent build analyzed by Coverity Scan. New defect(s) Reported-by: Coverity Scan Showing 10 of 10 defect(s) ** CID 1403739:(TAINTED_SCALAR) /filter/source/graphicfilter/ipict/ipict.cxx: 952 in PictReader::ReadPixMapEtc(Bitmap &, bool, bool, tools::Rectangle *, tools::Rectangle *, bool, bool)() /filter/source/graphicfilter/ipict/ipict.cxx: 1096 in PictReader::ReadPixMapEtc(Bitmap &, bool, bool, tools::Rectangle *, tools::Rectangle *, bool, bool)() /filter/source/graphicfilter/ipict/ipict.cxx: 1143 in PictReader::ReadPixMapEtc(Bitmap &, bool, bool, tools::Rectangle *, tools::Rectangle *, bool, bool)() /filter/source/graphicfilter/ipict/ipict.cxx: 1143 in PictReader::ReadPixMapEtc(Bitmap &, bool, bool, tools::Rectangle *, tools::Rectangle *, bool, bool)() /filter/source/graphicfilter/ipict/ipict.cxx: 1143 in PictReader::ReadPixMapEtc(Bitmap &, bool, bool, tools::Rectangle *, tools::Rectangle *, bool, bool)() /filter/source/graphicfilter/ipict/ipict.cxx: 1143 in PictReader::ReadPixMapEtc(Bitmap &, bool, bool, tools::Rectangle *, tools::Rectangle *, bool, bool)() /filter/source/graphicfilter/ipict/ipict.cxx: 1143 in PictReader::ReadPixMapEtc(Bitmap &, bool, bool, tools::Rectangle *, tools::Rectangle *, bool, bool)() /filter/source/graphicfilter/ipict/ipict.cxx: 1143 in PictReader::ReadPixMapEtc(Bitmap &, bool, bool, tools::Rectangle *, tools::Rectangle *, bool, bool)() /filter/source/graphicfilter/ipict/ipict.cxx: 1112 in PictReader::ReadPixMapEtc(Bitmap &, bool, bool, tools::Rectangle *, tools::Rectangle *, bool, bool)() *** CID 1403739:(TAINTED_SCALAR) /filter/source/graphicfilter/ipict/ipict.cxx: 952 in PictReader::ReadPixMapEtc(Bitmap &, bool, bool, tools::Rectangle *, tools::Rectangle *, bool, bool)() 946 return 0x; 947 } 948 949 if ( ( pAcc = initBitmap(aBitmap, nWidth, nHeight, nDstBitCount, aPalette) ) == nullptr ) 950 return 0x; 951 >>> CID 1403739:(TAINTED_SCALAR) >>> Using tainted variable "nHeight" as a loop boundary. 952 for (sal_uInt16 ny = 0; ny < nHeight; ++ny) 953 { 954 sal_uInt16 nx = 0; 955 if ( nRowBytes < 8 || nPackType == 1 ) 956 { 957 for (size_t i = 0; i < nWidth; ++i) /filter/source/graphicfilter/ipict/ipict.cxx: 1096 in PictReader::ReadPixMapEtc(Bitmap &, bool, bool, tools::Rectangle *, tools::Rectangle *, bool, bool)() 1090 if (nHeight > pPict->remainingSize() / nByteCountSize) 1091 return 0x; 1092 1093 if ( ( pAcc = initBitmap(aBitmap, nWidth, nHeight, nDstBitCount, aPalette) ) == nullptr ) 1094 return 0x; 1095 >>> CID 1403739:(TAINTED_SCALAR) >>> Passing tainted variable "static_cast(nWidth) * nCmpCount" to a >>> tainted sink. 1096 std::unique_ptr pScanline(new sal_uInt8[static_cast(nWidth) * nCmpCount]); 1097 for (sal_uInt16 ny = 0; ny < nHeight; ++ny) 1098 { 1099 nSrcBitsPos = pPict->Tell(); 1100 if ( nRowBytes > 250 ) 1101 { /filter/source/graphicfilter/ipict/ipict.cxx: 1143 in PictReader::ReadPixMapEtc(Bitmap &, bool, bool, tools::Rectangle *, tools::Rectangle *, bool, bool)() 1137 pScanline[ i++ ] = nDat; 1138 } 1139 } 1140 sal_uInt8* pTmp = pScanline.get(); 1141 if ( nCmpCount == 4 ) 1142 pTmp += nWidth; >>> CID 1403739:(TAINTED_SCALAR) >>> Using tainted variable "nWidth" as a loop boundary. 1143 for (sal_uInt16 nx = 0; nx < nWidth; pTmp++) 1144 pAcc->SetPixel( ny, nx++, BitmapColor( *pTmp, pTmp[ nWidth ], pTmp[ 2 * nWidth ] ) ); 1145 nDataSize += (sal_uLong)nByteCount; 1146 pPict->Seek( nSrcBitsPos + (sal_uLong)nByteCount ); 1147 } 1148 } /filter/source/graphicfilter/ipict/ipict.cxx: 1143 in PictReader::ReadPixMapEtc(Bitmap &, bool, bool, tools::Rectangle *, tools::Rectangle *, bool, bool)() 1137 pScanline[ i++ ] = nDat; 1138 } 1139 } 1140 sal_uInt8* pTmp = pScanline.get(); 1141 if ( nCmpCount == 4 ) 1142
[Libreoffice-commits] core.git: filter/source
filter/source/graphicfilter/itiff/itiff.cxx | 224 +--- 1 file changed, 106 insertions(+), 118 deletions(-) New commits: commit f2b52c8597b51813761048f43d60d94a661ca58d Author: Caolán McNamara Date: Mon Apr 3 10:12:22 2017 +0100 coverity#1403736 Unintentional integer overflow Change-Id: I3902dda8f7b420ea3f5e7e8c5d50a47b7e762918 diff --git a/filter/source/graphicfilter/itiff/itiff.cxx b/filter/source/graphicfilter/itiff/itiff.cxx index b5c63d2c2adb..68d838482d67 100644 --- a/filter/source/graphicfilter/itiff/itiff.cxx +++ b/filter/source/graphicfilter/itiff/itiff.cxx @@ -56,52 +56,52 @@ private: pAlphaMask; BitmapWriteAccess* pMaskAcc; -sal_uLong nOrigPos; // start position in pTIFF -sal_uLong nEndOfFile; // end of file position in pTIFF +sal_uInt64 nOrigPos; // start position in pTIFF +sal_uInt64 nEndOfFile; // end of file position in pTIFF sal_uInt16 nDataType; // Data taken from the TIFF tags: -boolbByteSwap; // sal_True if bits 0..7 -> 7..0 should get converted ( FILLORDER = 2 ); +boolbByteSwap; // sal_True if bits 0..7 -> 7..0 should get converted ( FILLORDER = 2 ); -sal_uLong nNewSubFile; -sal_uLong nSubFile; +sal_uInt32 nNewSubFile; +sal_uInt32 nSubFile; sal_Int32 nImageWidth;// picture width in pixels sal_Int32 nImageLength; // picture height in pixels sal_uInt32 nBitsPerSample; // bits per pixel per layer -sal_uLong nCompression; // kind of compression -sal_uLong nPhotometricInterpretation; -sal_uLong nThresholding; -sal_uLong nCellWidth; -sal_uLong nCellLength; -sal_uLong nFillOrder; -sal_uLong* pStripOffsets; // field of offsets to the Bitmap-Data-"Strips" -sal_uLong nNumStripOffsets; // size of the field above -sal_uLong nOrientation; +sal_uInt32 nCompression; // kind of compression +sal_uInt32 nPhotometricInterpretation; +sal_uInt32 nThresholding; +sal_uInt32 nCellWidth; +sal_uInt32 nCellLength; +sal_uInt32 nFillOrder; +sal_uInt64* pStripOffsets; // field of offsets to the Bitmap-Data-"Strips" +sal_uInt32 nNumStripOffsets; // size of the field above +sal_uInt32 nOrientation; sal_uInt32 nSamplesPerPixel; // number of layers -sal_uLong nRowsPerStrip; // if it's not compressed: number of rows per Strip -sal_uLong* pStripByteCounts; // if compressed (in a certain way): size of the strips -sal_uLong nNumStripByteCounts;// number of entries in the field above -sal_uLong nMinSampleValue; -sal_uLong nMaxSampleValue; +sal_uInt32 nRowsPerStrip; // if it's not compressed: number of rows per Strip +sal_uInt32* pStripByteCounts; // if compressed (in a certain way): size of the strips +sal_uInt32 nNumStripByteCounts;// number of entries in the field above +sal_uInt32 nMinSampleValue; +sal_uInt32 nMaxSampleValue; double fXResolution; // X-resolution or 0.0 double fYResolution; // Y-resolution or 0.0 -sal_uLong nPlanarConfiguration; -sal_uLong nGroup3Options; -sal_uLong nGroup4Options; -sal_uLong nResolutionUnit;// unit of fX/YResolution: 1=unknown, 2(default)=inch, 3=cm -sal_uLong nPredictor; +sal_uInt32 nPlanarConfiguration; +sal_uInt32 nGroup3Options; +sal_uInt32 nGroup4Options; +sal_uInt32 nResolutionUnit;// unit of fX/YResolution: 1=unknown, 2(default)=inch, 3=cm +sal_uInt32 nPredictor; std::unique_ptr xColorMap;// color palette -sal_uLong nNumColors; // number of colors within the color palette +sal_uInt32 nNumColors; // number of colors within the color palette sal_uInt32 nPlanes;// number of layers within the Tiff file -sal_uLong nStripsPerPlane
[Libreoffice-commits] core.git: idl/source
idl/source/objects/slot.cxx |1 + 1 file changed, 1 insertion(+) New commits: commit aa434253d2c5694b074fd774752f5407b8d491d1 Author: Caolán McNamara Date: Mon Apr 3 10:18:44 2017 +0100 coverity#1403731 Explicit null dereferenced Change-Id: I6025e6d4307aa8a6e4b6338d62bc597dace0ac9e diff --git a/idl/source/objects/slot.cxx b/idl/source/objects/slot.cxx index 27302f3c645e..ff0760d7addc 100644 --- a/idl/source/objects/slot.cxx +++ b/idl/source/objects/slot.cxx @@ -548,6 +548,7 @@ void SvMetaSlot::WriteSlot( const OString& rShellName, sal_uInt16 nCount, } } +assert(pNextSlot); rOutStm.WriteCharPtr( "&a" ).WriteOString( rShellName ).WriteCharPtr( "Slots_Impl[" ) .WriteOString( OString::number(pNextSlot->GetListPos()) ) ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: 2 commits - cui/source include/sfx2 sfx2/source sw/source
cui/source/tabpages/swpossizetabpage.cxx |1 include/sfx2/bindings.hxx|8 +-- sfx2/source/control/bindings.cxx | 65 --- sw/source/ui/frmdlg/wrap.cxx |2 4 files changed, 32 insertions(+), 44 deletions(-) New commits: commit ed6c5a4908edb7d4ab075127b710a92e2abc753f Author: Caolán McNamara Date: Mon Apr 3 09:45:34 2017 +0100 coverity#440972 Dereference before null check Change-Id: If4a1da1859dbdf19a7084341003fd6c41700971f Reviewed-on: https://gerrit.libreoffice.org/36040 Tested-by: Jenkins Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara diff --git a/include/sfx2/bindings.hxx b/include/sfx2/bindings.hxx index ee9463358ab0..283864368b5c 100644 --- a/include/sfx2/bindings.hxx +++ b/include/sfx2/bindings.hxx @@ -105,12 +105,10 @@ private: SfxCallMode nCall, const SfxPoolItem **pInternalArgs, bool bGlobalOnly=false); SAL_DLLPRIVATE void SetSubBindings_Impl( SfxBindings* ); SAL_DLLPRIVATE void UpdateSlotServer_Impl(); // Update SlotServer -SAL_DLLPRIVATE SfxItemSet* CreateSet_Impl( SfxStateCache* &pCache, -const SfxSlot* &pRealSlot, -const SfxSlotServer**, -SfxFoundCacheArr_Impl& ); +SAL_DLLPRIVATE SfxItemSet* CreateSet_Impl(SfxStateCache& rCache, const SfxSlot* &pRealSlot, + const SfxSlotServer**, SfxFoundCacheArr_Impl&); SAL_DLLPRIVATE std::size_t GetSlotPos( sal_uInt16 nId, std::size_t nStartSearchAt = 0 ); -SAL_DLLPRIVATE void Update_Impl( SfxStateCache* pCache ); +SAL_DLLPRIVATE void Update_Impl(SfxStateCache& rCache); static SAL_DLLPRIVATE void UpdateControllers_Impl( const SfxFoundCache_Impl& rFound, const SfxPoolItem *pItem, diff --git a/sfx2/source/control/bindings.cxx b/sfx2/source/control/bindings.cxx index bd64b8942679..dff88933905e 100644 --- a/sfx2/source/control/bindings.cxx +++ b/sfx2/source/control/bindings.cxx @@ -86,12 +86,12 @@ struct SfxFoundCache_Impl { sal_uInt16 nWhichId; // If available: Which-Id, else: nSlotId const SfxSlot* pSlot; // Pointer to -SfxStateCache* pCache;// Pointer to StatusCache, if possible NULL +SfxStateCache& rCache;// Pointer to StatusCache -SfxFoundCache_Impl(sal_uInt16 nW, const SfxSlot *pS, SfxStateCache *pC ): -nWhichId(nW), -pSlot(pS), -pCache(pC) +SfxFoundCache_Impl(sal_uInt16 nW, const SfxSlot *pS, SfxStateCache& rC) +: nWhichId(nW) +, pSlot(pS) +, rCache(rC) {} }; @@ -296,16 +296,12 @@ void SfxBindings::HidePopupCtrls_Impl( bool bHide ) pImpl->ePopupAction = SfxPopupAction::DELETE; } - -void SfxBindings::Update_Impl -( -SfxStateCache* pCache // The up to date SfxStatusCache -) +void SfxBindings::Update_Impl(SfxStateCache& rCache /*The up to date SfxStatusCache*/) { -if( pCache->GetDispatch().is() && pCache->GetItemLink() ) +if (rCache.GetDispatch().is() && rCache.GetItemLink()) { -pCache->SetCachedState(true); -if ( !pCache->GetInternalController() ) +rCache.SetCachedState(true); +if (!rCache.GetInternalController()) return; } @@ -317,7 +313,7 @@ void SfxBindings::Update_Impl const SfxSlot *pRealSlot = nullptr; const SfxSlotServer* pMsgServer = nullptr; SfxFoundCacheArr_Impl aFound; -SfxItemSet *pSet = CreateSet_Impl( pCache, pRealSlot, &pMsgServer, aFound ); +SfxItemSet *pSet = CreateSet_Impl(rCache, pRealSlot, &pMsgServer, aFound); bool bUpdated = false; if ( pSet ) { @@ -341,17 +337,13 @@ void SfxBindings::Update_Impl delete pSet; } -if ( !bUpdated && pCache ) +if (!bUpdated) { -// When pCache == NULL and no SlotServer -// (for example due to locked Dispatcher! ), -// obviously do not try to update -SfxFoundCache_Impl aFoundCache(0, pRealSlot, pCache ); +SfxFoundCache_Impl aFoundCache(0, pRealSlot, rCache); UpdateControllers_Impl( aFoundCache, nullptr, SfxItemState::DISABLED); } } - void SfxBindings::InvalidateSlotsInMap_Impl() { InvalidateSlotMap::const_iterator pIter = pImpl->m_aInvalidateSlots.begin(); @@ -418,7 +410,7 @@ void SfxBindings::Update return; } -Update_Impl(pCache); +Update_Impl(*pCache); } pImpl->bAllDirty = false; @@ -1166,7 +1158,7 @@ void SfxBindings::UpdateSlotServer_Impl() SfxItemSet* SfxBindings::CreateSet_Impl ( -SfxStateCache*& pCache, // in: Status-Cache from nId +SfxStateCache& rCache, // in: Status-Cache from nId const SfxSlot*& pRealSlot, // out: RealSlo
[Libreoffice-commits] core.git: reportdesign/source sdext/source slideshow/source stoc/source svtools/source
reportdesign/source/core/api/ReportComponent.cxx |1 - reportdesign/source/core/inc/ReportControlModel.hxx |3 ++- reportdesign/source/core/inc/ReportHelperImpl.hxx |4 ++-- reportdesign/source/core/sdr/RptObject.cxx| 11 ++- reportdesign/source/ui/inspection/GeometryHandler.cxx |4 ++-- reportdesign/source/ui/report/ReportController.cxx|7 --- sdext/source/minimizer/optimizerdialogcontrols.cxx|2 +- sdext/source/pdfimport/tree/drawtreevisiting.cxx |2 +- slideshow/source/engine/shapes/viewshape.cxx |2 +- stoc/source/corereflection/crbase.cxx |2 +- stoc/source/corereflection/crefl.cxx |2 +- svtools/source/misc/langtab.cxx |2 +- 12 files changed, 22 insertions(+), 20 deletions(-) New commits: commit 5d0e485e827057eee9fb2c997685690b710e7f34 Author: Noel Grandin Date: Mon Apr 3 11:02:38 2017 +0200 use actual UNO enums in reportdesign..svtools Change-Id: Idcd916382b87f8542dc6b5cdcb5ecb01d6947203 Reviewed-on: https://gerrit.libreoffice.org/36043 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/reportdesign/source/core/api/ReportComponent.cxx b/reportdesign/source/core/api/ReportComponent.cxx index f66e5e97d52f..3c6c4baac61d 100644 --- a/reportdesign/source/core/api/ReportComponent.cxx +++ b/reportdesign/source/core/api/ReportComponent.cxx @@ -29,7 +29,6 @@ #include "ReportControlModel.hxx" #include #include -#include #include #include #include diff --git a/reportdesign/source/core/inc/ReportControlModel.hxx b/reportdesign/source/core/inc/ReportControlModel.hxx index 6df1c5a25484..b60aca183a3a 100644 --- a/reportdesign/source/core/inc/ReportControlModel.hxx +++ b/reportdesign/source/core/inc/ReportControlModel.hxx @@ -27,6 +27,7 @@ #include #include #include +#include #include #include @@ -35,7 +36,7 @@ namespace reportdesign { struct OFormatProperties { -::sal_Int16 nAlign; +css::style::ParagraphAdjust nAlign; css::awt::FontDescriptoraFontDescriptor; css::awt::FontDescriptor aAsianFontDescriptor; css::awt::FontDescriptor aComplexFontDescriptor; diff --git a/reportdesign/source/core/inc/ReportHelperImpl.hxx b/reportdesign/source/core/inc/ReportHelperImpl.hxx index bc92f1167ae7..67d59ba2703a 100644 --- a/reportdesign/source/core/inc/ReportHelperImpl.hxx +++ b/reportdesign/source/core/inc/ReportHelperImpl.hxx @@ -226,12 +226,12 @@ void SAL_CALL clazz::setCharScaleWidth(::sal_Int16 the_value) \ sal_Int16 SAL_CALL clazz::getParaAdjust() \ { \ ::osl::MutexGuard aGuard(m_aMutex); \ -return varName.nAlign; \ +return (sal_Int16)varName.nAlign; \ } \ \ void SAL_CALL clazz::setParaAdjust( sal_Int16 _align ) \ { \ -set(PROPERTY_PARAADJUST,_align,varName.nAlign); \ + set(PROPERTY_PARAADJUST,(css::style::ParagraphAdjust)_align,varName.nAlign); \ } \ \ awt::FontDescriptor SAL_CALL clazz::getFontDescriptor() \ diff --git a/reportdesign/source/core/sdr/RptObject.cxx b/reportdesign/source/core/sdr/RptObject.cxx index ed7426783038..92ee82a45587 100644 --- a/reportdesign/source/core/sdr/RptObject.cxx +++ b/reportdesign/source/core/sdr/RptObject.cxx @@ -187,29 +187,30 @@ namespace { sal_Int16 nTextAlign = 0; lhs >>= nTextAlign; +style::ParagraphAdjust eAdjust; switch(nTextAlign) { case awt::TextAlign::LEFT: -nTextAlign = style::ParagraphAdjust_LEFT; +eAdjust = style::ParagraphAdjust_LEFT; break; case awt::TextAlign::CENTER: -nTextAlign = style::ParagraphAdjust_CENTER; +eAdjust = style::ParagraphAdjust_CENTER; break; case awt::TextAlign::RIGHT: -nTextAlign = style::ParagraphAdjust_RIGHT; +eAdjust = style::ParagraphAdjust_RIGHT; break; default: OSL_FAIL("Illegal text alignment value!"); break; } -aRet <<= (style::ParagraphAdjust)nTextAlign; +aRet <<= eAdjust; } else { sal_Int16 nTextAlign = 0; sal_Int16 eParagraphAdjust = 0; lhs >>= eParagraphAdjust; -switch(eParagraphAdjust) +switch((style::ParagraphAdjust)eParagraphAdjust) { case style::ParagraphAdjust_LEFT: case style::ParagraphAdjust_BLOCK: diff --git a
[Libreoffice-commits] online.git: net/Ssl.cpp wsd/LOOLWSD.cpp
net/Ssl.cpp |8 wsd/LOOLWSD.cpp |3 +++ 2 files changed, 7 insertions(+), 4 deletions(-) New commits: commit a9389687a416ae8b2fa755a6f473629f35d0bd43 Author: Jan Holesovsky Date: Mon Apr 3 11:39:09 2017 +0200 Don't try to clean up after a runtime error. We don't know in what state we are... Change-Id: I8d144000ba684ca23ff67977959c95b31de34367 diff --git a/net/Ssl.cpp b/net/Ssl.cpp index 74f606cf..d6d13575 100644 --- a/net/Ssl.cpp +++ b/net/Ssl.cpp @@ -78,7 +78,7 @@ SslContext::SslContext(const std::string& certFilePath, if (errCode != 1) { std::string msg = getLastErrorMsg(); -throw std::runtime_error(std::string("Cannot load CA file/directory at ") + caFilePath + ": " + msg); +throw std::runtime_error(std::string("Cannot load CA file/directory at ") + caFilePath + " (" + msg + ")"); } } @@ -88,7 +88,7 @@ SslContext::SslContext(const std::string& certFilePath, if (errCode != 1) { std::string msg = getLastErrorMsg(); -throw std::runtime_error(std::string("Error loading private key from file ") + keyFilePath + ": " + msg); +throw std::runtime_error(std::string("Error loading private key from file ") + keyFilePath + " (" + msg + ")"); } } @@ -97,8 +97,8 @@ SslContext::SslContext(const std::string& certFilePath, errCode = SSL_CTX_use_certificate_chain_file(_ctx, certFilePath.c_str()); if (errCode != 1) { -std::string errMsg = getLastErrorMsg(); -throw std::runtime_error(std::string("Error loading certificate from file ") + certFilePath + ": " + errMsg); +std::string msg = getLastErrorMsg(); +throw std::runtime_error(std::string("Error loading certificate from file ") + certFilePath + " (" + msg + ")"); } } diff --git a/wsd/LOOLWSD.cpp b/wsd/LOOLWSD.cpp index 6b2d633b..a47a3511 100644 --- a/wsd/LOOLWSD.cpp +++ b/wsd/LOOLWSD.cpp @@ -2517,6 +2517,9 @@ int LOOLWSD::main(const std::vector& /*args*/) try { returnValue = innerMain(); +} catch (const std::runtime_error& e) { +LOG_FTL(e.what()); +throw; } catch (...) { cleanup(); throw; ___ 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-1' - net/Ssl.cpp wsd/LOOLWSD.cpp
net/Ssl.cpp |8 wsd/LOOLWSD.cpp |3 +++ 2 files changed, 7 insertions(+), 4 deletions(-) New commits: commit 220ac3b04d5aa488954db8b3b43c7448b182de2d Author: Jan Holesovsky Date: Mon Apr 3 11:39:09 2017 +0200 Don't try to clean up after a runtime error. We don't know in what state we are... Change-Id: I8d144000ba684ca23ff67977959c95b31de34367 diff --git a/net/Ssl.cpp b/net/Ssl.cpp index 74f606cf..d6d13575 100644 --- a/net/Ssl.cpp +++ b/net/Ssl.cpp @@ -78,7 +78,7 @@ SslContext::SslContext(const std::string& certFilePath, if (errCode != 1) { std::string msg = getLastErrorMsg(); -throw std::runtime_error(std::string("Cannot load CA file/directory at ") + caFilePath + ": " + msg); +throw std::runtime_error(std::string("Cannot load CA file/directory at ") + caFilePath + " (" + msg + ")"); } } @@ -88,7 +88,7 @@ SslContext::SslContext(const std::string& certFilePath, if (errCode != 1) { std::string msg = getLastErrorMsg(); -throw std::runtime_error(std::string("Error loading private key from file ") + keyFilePath + ": " + msg); +throw std::runtime_error(std::string("Error loading private key from file ") + keyFilePath + " (" + msg + ")"); } } @@ -97,8 +97,8 @@ SslContext::SslContext(const std::string& certFilePath, errCode = SSL_CTX_use_certificate_chain_file(_ctx, certFilePath.c_str()); if (errCode != 1) { -std::string errMsg = getLastErrorMsg(); -throw std::runtime_error(std::string("Error loading certificate from file ") + certFilePath + ": " + errMsg); +std::string msg = getLastErrorMsg(); +throw std::runtime_error(std::string("Error loading certificate from file ") + certFilePath + " (" + msg + ")"); } } diff --git a/wsd/LOOLWSD.cpp b/wsd/LOOLWSD.cpp index f3a644c1..f15583bd 100644 --- a/wsd/LOOLWSD.cpp +++ b/wsd/LOOLWSD.cpp @@ -2517,6 +2517,9 @@ int LOOLWSD::main(const std::vector& /*args*/) try { returnValue = innerMain(); +} catch (const std::runtime_error& e) { +LOG_FTL(e.what()); +throw; } catch (...) { cleanup(); throw; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
Weekly QA Report (W13-2017)
Hello, What have happened in QA in the last 7 days? * 110 have been created, of which, 33 are still unconfirmed ( Total Unconfirmed bugs: 466 ) Link: http://tinyurl.com/krnpdle * 1016 comments have been written. == STATUS CHANGED == * 12 bugs have been changed to 'ASSIGNED'. Link: http://tinyurl.com/mneuug8 Done by: Julien Nabet ( 4 ), Bartosz ( 2 ), Winfried Donkers ( 1 ), Miklos Vajna ( 1 ), Vitaliy ( 1 ), qarkai ( 1 ), g.araminowicz ( 1 ), filippo.giacche ( 1 ) * 48 bugs have been changed to 'NEEDINFO'. Link: http://tinyurl.com/ko9jkyz Done by: Xisco Faulí ( 27 ), carlos.deambroggio ( 8 ), Buovjaga ( 6 ), V Stuart Foote ( 2 ), m.a.riosv ( 1 ), Justin L ( 1 ), Alex Thurgood ( 1 ), MarjaE ( 1 ), Caolán McNamara ( 1 ) * 42 bugs have been changed to 'NEW'. Link: http://tinyurl.com/l7j5utw Done by: Buovjaga ( 12 ), Xisco Faulí ( 5 ), carlos.deambroggio ( 5 ), V Stuart Foote ( 4 ), Heiko Tietze ( 2 ), harisaicharan111.challa ( 2 ), Jacques Guilleron ( 2 ), snowboard975 ( 1 ), Julien Nabet ( 1 ), proulxmichel0 ( 1 ), Olivier Hallot ( 1 ), m.a.riosv ( 1 ), Terrence Enger ( 1 ), Krzysztof Borowiak ( 1 ), Jean-Baptiste Faure ( 1 ), tommy27 ( 1 ), Arnaud Versini ( 1 ) * 3 bugs have been changed to 'REOPENED'. Link: http://tinyurl.com/m8suwup Done by: ge.huber ( 1 ), Alexander Nolting ( 1 ), Katarina Behrens (CIB) ( 1 ) * 19 bugs have been changed to 'RESOLVED DUPLICATE'. Link: http://tinyurl.com/mwt5l4u Done by: Xisco Faulí ( 4 ), V Stuart Foote ( 3 ), Buovjaga ( 3 ), Bartosz ( 2 ), Aron Budea ( 2 ), Heiko Tietze ( 1 ), Khaled Hosny ( 1 ), jorojmaqui ( 1 ), Alex Thurgood ( 1 ), Jacques Guilleron ( 1 ) * 48 bugs have been changed to 'RESOLVED FIXED'. Link: http://tinyurl.com/ky4llwc Done by: Samuel Mehrbrodt (CIB) ( 12 ), Caolán McNamara ( 8 ), Adolfo Jayme ( 4 ), Miklos Vajna ( 3 ), Michael Meeks ( 2 ), Kü ( 2 ), Gülşah Köse ( 2 ), Stefan Grotz ( 1 ), Jean-Sebastien Bevilacqua ( 1 ), Pranav Kant ( 1 ), Oliver Specht (CIB) ( 1 ), László Németh ( 1 ), Michael Stahl ( 1 ), Mike Kaganski ( 1 ), Mark Hung ( 1 ), Kohei Yoshida ( 1 ), Khaled Hosny ( 1 ), Justin L ( 1 ), Jean-Baptiste Faure ( 1 ), Andrzej ( 1 ), David Tardon ( 1 ), admiral.soruk ( 1 ) * 56 bugs have been changed to 'RESOLVED INSUFFICIENTDATA'. Link: http://tinyurl.com/ltsr5r6 Done by: qa-admin ( 56 ) * 4 bugs have been changed to 'RESOLVED INVALID'. Link: http://tinyurl.com/mktyryb Done by: V Stuart Foote ( 2 ), Mark Hung ( 1 ), Jean-Baptiste Faure ( 1 ) * 6 bugs have been changed to 'RESOLVED NOTABUG'. Link: http://tinyurl.com/lksoa8x Done by: Xisco Faulí ( 3 ), Buovjaga ( 2 ), m.a.riosv ( 1 ) * 1 bug has been changed to 'RESOLVED NOTOURBUG'. Link: http://tinyurl.com/mm5gc8q Done by: V Stuart Foote ( 1 ) * 3 bugs have been changed to 'RESOLVED WONTFIX'. Link: http://tinyurl.com/lo9u3rt Done by: Buovjaga ( 1 ), Heiko Tietze ( 1 ), Jan Holesovsky ( 1 ) * 25 bugs have been changed to 'RESOLVED WORKSFORME'. Link: http://tinyurl.com/mbsvvf5 Done by: V Stuart Foote ( 3 ), Heiko Tietze ( 3 ), Xisco Faulí ( 2 ), Volga ( 2 ), GUTH Christophe ( 2 ), Wolf VanZandt ( 1 ), Winfried Donkers ( 1 ), Buovjaga ( 1 ), Thomas Lendo ( 1 ), Samuel Mehrbrodt (CIB) ( 1 ), Manuel ( 1 ), Jean-Baptiste Faure ( 1 ), yehuda ( 1 ), Bartosz ( 1 ), Dio Oktarianos Putra ( 1 ), Bob Daniel ( 1 ), birquito ( 1 ), ajay.chenampara ( 1 ) * 9 bugs have been changed to 'UNCONFIRMED'. Link: http://tinyurl.com/mhxo5bw Done by: David Lochrin ( 2 ), Buovjaga ( 1 ), Telesto ( 1 ), Yousuf Philips (jay) ( 1 ), Johnny_M ( 1 ), James B. Byrne ( 1 ), Aron Budea ( 1 ), larry.fin...@lwfinger.net ( 1 ) * 1 bug has been changed to 'VERIFIED WORKSFORME'. Link: http://tinyurl.com/zm835l2 Done by: Aron Budea ( 1 ) == KEYWORDS ADDED == * 'bibisectRequest' has been added to 3 bugs. Link: http://tinyurl.com/lc9q9oa Done by: Buovjaga ( 1 ), Jacques Guilleron ( 1 ), Aron Budea ( 1 ) * 'bibisected' has been added to 9 bugs. Link: http://tinyurl.com/n8xvqj4 Done by: Xisco Faulí ( 5 ), raal ( 2 ), Aron Budea ( 2 ) * 'bisected' has been added to 8 bugs. Link: http://tinyurl.com/lesmd67 Done by: Xisco Faulí ( 4 ), raal ( 2 ), Aron Budea ( 2 ) * 'corruptProfile' has been added to 1 bugs. Link: http://tinyurl.com/l4j4wcj Done by: Lloyd ( 1 ) * 'dataLoss' has been added to 2 bugs. Link: http://tinyurl.com/l9nu69d Done by: Buovjaga ( 1 ), Lloyd ( 1 ) * 'filter:doc' has been added to 2 bugs. Link: http://tinyurl.com/m7jgena Done by: Xisco Faulí ( 2 ) * 'filter:docx' has been added to 3 bugs. Link: http://tinyurl.com/jvprwzn Done by: Buovjaga ( 2 ), Aron Budea ( 1 ) * 'filter:pdf' has been added to 1 bugs. Link: http://tinyurl.com/lrhxgdh Done by: V Stuart Foote ( 1 ) * 'filter:ppt' has been added to 2 bugs. Link: http://tinyurl.com/m
[Libreoffice-commits] online.git: loleaflet/src
loleaflet/src/layer/marker/Annotation.js |5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) New commits: commit 6c25b36022a3ca31252e57775482af1fabac0fd3 Author: Jan Holesovsky Date: Mon Apr 3 12:04:50 2017 +0200 Re-introduce the Save button back to the comment creation. Change-Id: I9e45051f2e867a0af8ab5aab2eb244d4f3449761 diff --git a/loleaflet/src/layer/marker/Annotation.js b/loleaflet/src/layer/marker/Annotation.js index 72835031..a39d78f9 100644 --- a/loleaflet/src/layer/marker/Annotation.js +++ b/loleaflet/src/layer/marker/Annotation.js @@ -156,7 +156,8 @@ L.Annotation = L.Layer.extend({ this._nodeReplyText = L.DomUtil.create(tagTextArea, classTextArea, this._nodeReply); buttons = L.DomUtil.create(tagDiv, empty, this._nodeModify); - L.DomEvent.on(this._nodeModifyText, 'blur', this._onLostFocus, this); + L.DomEvent.on(this._nodeModifyText, 'blur', this._onSaveComment, this); + this._createButton(buttons, _(' Save '), this._onSaveComment); this._createButton(buttons, cancel, this._onCancelClick); buttons = L.DomUtil.create(tagDiv, empty, this._nodeReply); this._createButton(buttons, _('Reply'), this._onReplyClick); @@ -182,7 +183,7 @@ L.Annotation = L.Layer.extend({ this._map.fire('AnnotationCancel', {annotation: this}); }, - _onLostFocus: function (e) { + _onSaveComment: function (e) { L.DomEvent.stopPropagation(e); this._data.text = this._contentText.innerHTML = this._nodeModifyText.value; this.show(); ___ 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-1' - loleaflet/src
loleaflet/src/layer/marker/Annotation.js |5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) New commits: commit 37b5f9c4f24de816d5cf5d4b9310bf5ba501929d Author: Jan Holesovsky Date: Mon Apr 3 12:04:50 2017 +0200 Re-introduce the Save button back to the comment creation. Change-Id: I9e45051f2e867a0af8ab5aab2eb244d4f3449761 diff --git a/loleaflet/src/layer/marker/Annotation.js b/loleaflet/src/layer/marker/Annotation.js index 72835031..a39d78f9 100644 --- a/loleaflet/src/layer/marker/Annotation.js +++ b/loleaflet/src/layer/marker/Annotation.js @@ -156,7 +156,8 @@ L.Annotation = L.Layer.extend({ this._nodeReplyText = L.DomUtil.create(tagTextArea, classTextArea, this._nodeReply); buttons = L.DomUtil.create(tagDiv, empty, this._nodeModify); - L.DomEvent.on(this._nodeModifyText, 'blur', this._onLostFocus, this); + L.DomEvent.on(this._nodeModifyText, 'blur', this._onSaveComment, this); + this._createButton(buttons, _(' Save '), this._onSaveComment); this._createButton(buttons, cancel, this._onCancelClick); buttons = L.DomUtil.create(tagDiv, empty, this._nodeReply); this._createButton(buttons, _('Reply'), this._onReplyClick); @@ -182,7 +183,7 @@ L.Annotation = L.Layer.extend({ this._map.fire('AnnotationCancel', {annotation: this}); }, - _onLostFocus: function (e) { + _onSaveComment: function (e) { L.DomEvent.stopPropagation(e); this._data.text = this._contentText.innerHTML = this._nodeModifyText.value; this.show(); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: test/source testtools/source toolkit/source ucb/source uui/source vbahelper/source
test/source/sheet/xspreadsheets2.cxx |2 +- testtools/source/bridgetest/bridgetest.cxx |2 +- toolkit/source/awt/vclxtoolkit.cxx |6 +++--- toolkit/source/awt/vclxwindow.cxx|3 +-- toolkit/source/helper/formpdfexport.cxx |2 +- ucb/source/ucp/webdav-neon/webdavcontent.cxx |8 uui/source/iahndl-authentication.cxx |2 +- uui/source/iahndl-ioexceptions.cxx | 16 vbahelper/source/vbahelper/vbafontbase.cxx |4 ++-- vbahelper/source/vbahelper/vbashape.cxx |2 +- 10 files changed, 23 insertions(+), 24 deletions(-) New commits: commit d68927c7fd4346311dce58e6059186633996d68b Author: Noel Grandin Date: Mon Apr 3 11:00:58 2017 +0200 use actual UNO enums in test..vbahelper Change-Id: I2e38462045efedc31903589a3fa4e6f62d74d8de Reviewed-on: https://gerrit.libreoffice.org/36042 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/test/source/sheet/xspreadsheets2.cxx b/test/source/sheet/xspreadsheets2.cxx index 2c831c447174..76e2a05c6fea 100644 --- a/test/source/sheet/xspreadsheets2.cxx +++ b/test/source/sheet/xspreadsheets2.cxx @@ -275,7 +275,7 @@ void XSpreadsheets2::testImportCellStyle() sal_Int32 aVertJustify = 0; CPPUNIT_ASSERT(xCellStyleProp->getPropertyValue(aProperty) >>= aVertJustify); -CPPUNIT_ASSERT_MESSAGE("New style: VertJustify not set", aVertJustify == table::CellVertJustify_CENTER); +CPPUNIT_ASSERT_MESSAGE("New style: VertJustify not set", (table::CellVertJustify)aVertJustify == table::CellVertJustify_CENTER); } uno::Reference< sheet::XSpreadsheetDocument> XSpreadsheets2::getDoc(const OUString& aFileBase, uno::Reference< lang::XComponent >& xComp) diff --git a/testtools/source/bridgetest/bridgetest.cxx b/testtools/source/bridgetest/bridgetest.cxx index fede2dbfe426..f2c0d7544a78 100644 --- a/testtools/source/bridgetest/bridgetest.cxx +++ b/testtools/source/bridgetest/bridgetest.cxx @@ -1011,7 +1011,7 @@ uno_Sequence* cloneSequence(const uno_Sequence* val, const Type& type) sal_Int8* pBufCur = buf.get(); uno_Sequence* retSeq = nullptr; -switch (pTdElem->eTypeClass) +switch ((TypeClass)pTdElem->eTypeClass) { case TypeClass_SEQUENCE: { diff --git a/toolkit/source/awt/vclxtoolkit.cxx b/toolkit/source/awt/vclxtoolkit.cxx index 97eba0fde320..44122b1e6494 100644 --- a/toolkit/source/awt/vclxtoolkit.cxx +++ b/toolkit/source/awt/vclxtoolkit.cxx @@ -551,7 +551,7 @@ namespace { css::awt::MessageBoxType_WARNINGBOX, RTL_CONSTASCII_STRINGPARAM("warningbox") }, { css::awt::MessageBoxType_ERRORBOX, RTL_CONSTASCII_STRINGPARAM("errorbox") }, { css::awt::MessageBoxType_QUERYBOX, RTL_CONSTASCII_STRINGPARAM("querybox") }, -{ css::awt::MessageBoxType_MAKE_FIXED_SIZE, nullptr, 0 } +{ css::awt::MessageBoxType::MessageBoxType_MAKE_FIXED_SIZE, nullptr, 0 } }; bool lcl_convertMessageBoxType( @@ -559,7 +559,7 @@ namespace css::awt::MessageBoxType eType ) { const MessageBoxTypeInfo *pMap = aMessageBoxTypeInfo; -css::awt::MessageBoxType eVal = css::awt::MessageBoxType_MAKE_FIXED_SIZE; +css::awt::MessageBoxType eVal = css::awt::MessageBoxType::MessageBoxType_MAKE_FIXED_SIZE; while ( pMap->pName ) { @@ -572,7 +572,7 @@ namespace pMap++; } -return ( eVal != css::awt::MessageBoxType_MAKE_FIXED_SIZE ); +return ( eVal != css::awt::MessageBoxType::MessageBoxType_MAKE_FIXED_SIZE ); } } diff --git a/toolkit/source/awt/vclxwindow.cxx b/toolkit/source/awt/vclxwindow.cxx index bc68c5eee713..48a1ed1a7f93 100644 --- a/toolkit/source/awt/vclxwindow.cxx +++ b/toolkit/source/awt/vclxwindow.cxx @@ -76,7 +76,6 @@ using ::com::sun::star::style::VerticalAlignment; using ::com::sun::star::style::VerticalAlignment_TOP; using ::com::sun::star::style::VerticalAlignment_MIDDLE; using ::com::sun::star::style::VerticalAlignment_BOTTOM; -using ::com::sun::star::style::VerticalAlignment_MAKE_FIXED_SIZE; namespace WritingMode2 = ::com::sun::star::text::WritingMode2; @@ -1727,7 +1726,7 @@ void VCLXWindow::setProperty( const OUString& PropertyName, const css::uno::Any& break; case BASEPROPERTY_VERTICALALIGN: { -VerticalAlignment eAlign = VerticalAlignment_MAKE_FIXED_SIZE; +VerticalAlignment eAlign = css::style::VerticalAlignment::VerticalAlignment_MAKE_FIXED_SIZE; WinBits nStyle = pWindow->GetStyle(); nStyle &= ~(WB_TOP|WB_VCENTER|WB_BOTTOM); if ( !bVoid ) diff --git a/toolkit/source/helper/formpdfexport.cxx b/toolkit/source/helper/formpdfexport.cxx index 0503a57edd23..e1cf60ff6e07 100644 --- a/toolkit/source/helper/formpdfexport.cxx +++ b/toolkit/source/helper/formpdfexport.cxx @@ -382,7 +382,7 @@ namespace toolkitform OUString sVertAlign
[Libreoffice-commits] core.git: vcl/osx vcl/source vcl/unx winaccessibility/source writerfilter/source writerperfect/qa xmlscript/source xmlsecurity/qa xmlsecurity/source
vcl/osx/a11ytextattributeswrapper.mm |4 ++-- vcl/source/app/unohelp.cxx |4 ++-- vcl/source/gdi/lineinfo.cxx|2 +- vcl/source/gdi/svmconverter.cxx|4 ++-- vcl/unx/gtk/a11y/atktextattributes.cxx |6 +++--- winaccessibility/source/UAccCOM/MAccessible.cxx|3 +-- writerfilter/source/dmapper/DomainMapper.cxx |2 +- writerfilter/source/dmapper/DomainMapper_Impl.cxx |2 +- writerfilter/source/dmapper/GraphicImport.cxx |4 ++-- writerfilter/source/dmapper/PropertyMap.cxx|4 ++-- writerfilter/source/rtftok/rtfdocumentimpl.cxx |2 +- writerfilter/source/rtftok/rtfsdrimport.cxx|2 +- writerperfect/qa/unit/SpreadsheetImportTest.cxx| 10 ++ xmlscript/source/xmldlg_imexp/xmldlg_export.cxx|2 +- xmlscript/source/xmldlg_imexp/xmldlg_import.cxx|2 +- xmlsecurity/qa/unit/pdfsigning/pdfsigning.cxx |2 +- xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx |2 +- 17 files changed, 33 insertions(+), 24 deletions(-) New commits: commit 0fe6f1a196b70f0ba4c948389b2ef9b1e77187b8 Author: Noel Grandin Date: Mon Apr 3 10:55:16 2017 +0200 use actual UNO enums in vcl..xmlsecurity Change-Id: Id862544f27ebcbe8363f93dc83192d0f0cddb5cc Reviewed-on: https://gerrit.libreoffice.org/36041 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/vcl/osx/a11ytextattributeswrapper.mm b/vcl/osx/a11ytextattributeswrapper.mm index 090f429df30f..4a7de4824b17 100644 --- a/vcl/osx/a11ytextattributeswrapper.mm +++ b/vcl/osx/a11ytextattributeswrapper.mm @@ -141,7 +141,7 @@ using namespace ::com::sun::star::uno; +(int)convertItalicStyle:(PropertyValue)property { int italicStyle = NSUnitalicFontMask; -sal_Int16 value = property.Value.get< ::css_awt::FontSlant>(); +::css_awt::FontSlant value = property.Value.get< ::css_awt::FontSlant>(); if ( value == ::css_awt::FontSlant_ITALIC ) { italicStyle = NSItalicFontMask; } @@ -279,7 +279,7 @@ SAL_WNODEPRECATED_DECLARATIONS_PUSH // 'NSJustifiedTextAlignment' is deprecated: first deprecated in macOS 10.12 // 'NSLeftTextAlignment' is deprecated: first deprecated in macOS 10.12 // 'NSRightTextAlignment' is deprecated: first deprecated in macOS 10.12 -switch(alignment) { +switch((css::style::ParagraphAdjust)alignment) { case css::style::ParagraphAdjust_RIGHT : textAlignment = [NSNumber numberWithInteger:NSRightTextAlignment]; break; case css::style::ParagraphAdjust_CENTER: textAlignment = [NSNumber numberWithInteger:NSCenterTextAlignment] ; break; case css::style::ParagraphAdjust_BLOCK : textAlignment = [NSNumber numberWithInteger:NSJustifiedTextAlignment]; break; diff --git a/vcl/source/app/unohelp.cxx b/vcl/source/app/unohelp.cxx index e47d69ba9594..413f470cac56 100644 --- a/vcl/source/app/unohelp.cxx +++ b/vcl/source/app/unohelp.cxx @@ -192,7 +192,7 @@ css::awt::FontSlant vcl::unohelper::ConvertFontSlant(FontItalic eItalic) eRet = css::awt::FontSlant_DONTKNOW; break; case FontItalic_FORCE_EQUAL_SIZE: -eRet = css::awt::FontSlant_MAKE_FIXED_SIZE; +eRet = css::awt::FontSlant::FontSlant_MAKE_FIXED_SIZE; break; } return eRet; @@ -223,7 +223,7 @@ FontItalic vcl::unohelper::ConvertFontSlant(css::awt::FontSlant eSlant) //there is no vcl reverse normal eRet = ITALIC_NORMAL; break; -case css::awt::FontSlant_MAKE_FIXED_SIZE: +case css::awt::FontSlant::FontSlant_MAKE_FIXED_SIZE: eRet = FontItalic_FORCE_EQUAL_SIZE; break; } diff --git a/vcl/source/gdi/lineinfo.cxx b/vcl/source/gdi/lineinfo.cxx index a82d82cf2103..095254f4193e 100644 --- a/vcl/source/gdi/lineinfo.cxx +++ b/vcl/source/gdi/lineinfo.cxx @@ -216,7 +216,7 @@ SvStream& WriteLineInfo( SvStream& rOStm, const LineInfo& rLineInfo ) rOStm.WriteUInt16( static_cast(rLineInfo.mpImplLineInfo->meLineJoin) ); // since version4 -rOStm.WriteUInt16( rLineInfo.mpImplLineInfo->meLineCap ); +rOStm.WriteUInt16( (sal_uInt16)rLineInfo.mpImplLineInfo->meLineCap ); return rOStm; } diff --git a/vcl/source/gdi/svmconverter.cxx b/vcl/source/gdi/svmconverter.cxx index 08428e876fc2..049479961bef 100644 --- a/vcl/source/gdi/svmconverter.cxx +++ b/vcl/source/gdi/svmconverter.cxx @@ -1586,7 +1586,7 @@ sal_uLong SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf, { rOStm.WriteInt16( GDI_LINECAP_ACTION ); rOStm.WriteInt32( 6 ); -rOStm.WriteInt16( rInfo.GetLineCap() ); +rOStm.WriteInt16( (sal_Int16)rI
[Libreoffice-commits] core.git: configure.ac
configure.ac |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 11a0863509f9ae14f31b660d60f9667516466783 Author: jan Iversen Date: Mon Apr 3 13:15:29 2017 +0200 iOS update to allow iOS SDK 10.3 added 10.3 SDK to configure.ac Change-Id: I2bd287cada37e595ee25a5a1bfc535daeeb247a9 diff --git a/configure.ac b/configure.ac index 49ffc7f4b232..af0ffd882039 100644 --- a/configure.ac +++ b/configure.ac @@ -2984,7 +2984,7 @@ if test $_os = iOS; then xcode_developer=`xcode-select -print-path` current_sdk_ver=10.2 -for sdkver in 10.2 10.1 10.0 9.3; do +for sdkver in 10.3 10.2 10.1 10.0 9.3; do t=$xcode_developer/Platforms/$platform.platform/Developer/SDKs/$platform$sdkver.sdk if test -d $t; then ios_sdk=$sdkver ___ 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/ww8/ww8glsy.cxx |1 sw/source/filter/ww8/ww8graf2.cxx | 22 +++ sw/source/filter/ww8/ww8par.cxx | 12 +--- sw/source/filter/ww8/ww8par.hxx |4 - sw/source/filter/ww8/ww8par2.cxx |8 +- sw/source/filter/ww8/ww8par4.cxx |4 - sw/source/filter/ww8/ww8par6.cxx | 105 ++ 7 files changed, 76 insertions(+), 80 deletions(-) New commits: commit fb5331971379f7d71413364e9d62f8264033ac67 Author: Caolán McNamara Date: Mon Apr 3 11:13:13 2017 +0100 ofz: fix leak Change-Id: I93a7b2f77713db5c51734263b78ffc69c899987b diff --git a/sw/source/filter/ww8/ww8glsy.cxx b/sw/source/filter/ww8/ww8glsy.cxx index 9f34feac6787..5ac6101ff948 100644 --- a/sw/source/filter/ww8/ww8glsy.cxx +++ b/sw/source/filter/ww8/ww8glsy.cxx @@ -32,6 +32,7 @@ #include #include "ww8glsy.hxx" #include "ww8par.hxx" +#include "ww8par2.hxx" WW8Glossary::WW8Glossary(tools::SvRef &refStrm, sal_uInt8 nVersion, SotStorage *pStg) diff --git a/sw/source/filter/ww8/ww8graf2.cxx b/sw/source/filter/ww8/ww8graf2.cxx index 0c560bebe297..d0d332759d0f 100644 --- a/sw/source/filter/ww8/ww8graf2.cxx +++ b/sw/source/filter/ww8/ww8graf2.cxx @@ -356,13 +356,13 @@ SwFlyFrameFormat* SwWW8ImplReader::MakeGrafNotInContent(const WW8PicDesc& rPD, // Vertical shift through line spacing sal_Int32 nNetHeight = nHeight + rPD.nCT + rPD.nCB; -if( m_pSFlyPara->nLineSpace && m_pSFlyPara->nLineSpace > nNetHeight ) -m_pSFlyPara->nYPos = -(sal_uInt16)( m_pSFlyPara->nYPos + m_pSFlyPara->nLineSpace - nNetHeight ); +if (m_xSFlyPara->nLineSpace && m_xSFlyPara->nLineSpace > nNetHeight) +m_xSFlyPara->nYPos = +(sal_uInt16)( m_xSFlyPara->nYPos + m_xSFlyPara->nLineSpace - nNetHeight ); -WW8FlySet aFlySet(*this, m_pWFlyPara, m_pSFlyPara, true); +WW8FlySet aFlySet(*this, m_xWFlyPara.get(), m_xSFlyPara.get(), true); -SwFormatAnchor aAnchor(m_pSFlyPara->eAnchor); +SwFormatAnchor aAnchor(m_xSFlyPara->eAnchor); aAnchor.SetAnchor(m_pPaM->GetPoint()); aFlySet.Put(aAnchor); @@ -401,8 +401,8 @@ SwFrameFormat* SwWW8ImplReader::MakeGrafInContent(const WW8_PIC& rPic, // Resize the frame to the size of the picture if graphic is inside a frame // (only if auto-width) -if( m_pSFlyPara ) -m_pSFlyPara->BoxUpWidth( rPD.nWidth ); +if (m_xSFlyPara) +m_xSFlyPara->BoxUpWidth( rPD.nWidth ); return pFlyFormat; } @@ -433,7 +433,7 @@ SwFrameFormat* SwWW8ImplReader::ImportGraf1(WW8_PIC& rPic, SvStream* pSt, aGrfSet.Put( aCrop ); } -if( m_pWFlyPara && m_pWFlyPara->bGrafApo ) +if (m_xWFlyPara && m_xWFlyPara->bGrafApo) pRet = MakeGrafNotInContent(aPD,pGraph,aFileName,aGrfSet); else pRet = MakeGrafInContent(rPic,aPD,pGraph,aFileName,aGrfSet); @@ -589,11 +589,11 @@ SwFrameFormat* SwWW8ImplReader::ImportGraf(SdrTextObj* pTextObj, // A graphic of this type in this location is always // inline, and uses the pic in the same module as ww6 // graphics. -if (m_pWFlyPara && m_pWFlyPara->bGrafApo) +if (m_xWFlyPara && m_xWFlyPara->bGrafApo) { -WW8FlySet aFlySet(*this, m_pWFlyPara, m_pSFlyPara, true); +WW8FlySet aFlySet(*this, m_xWFlyPara.get(), m_xSFlyPara.get(), true); -SwFormatAnchor aAnchor(m_pSFlyPara->eAnchor); +SwFormatAnchor aAnchor(m_xSFlyPara->eAnchor); aAnchor.SetAnchor(m_pPaM->GetPoint()); aFlySet.Put(aAnchor); diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx index f86a2c263a2d..5fa0270e53da 100644 --- a/sw/source/filter/ww8/ww8par.cxx +++ b/sw/source/filter/ww8/ww8par.cxx @@ -2040,8 +2040,8 @@ WW8ReaderSave::WW8ReaderSave(SwWW8ImplReader* pRdr ,WW8_CP nStartCp) : mpOldAnchorStck(pRdr->m_pAnchorStck), mpOldRedlines(pRdr->m_pRedlineStack), mpOldPlcxMan(pRdr->m_pPlcxMan), -mpWFlyPara(pRdr->m_pWFlyPara), -mpSFlyPara(pRdr->m_pSFlyPara), +mpWFlyPara(pRdr->m_xWFlyPara.release()), +mpSFlyPara(pRdr->m_xSFlyPara.release()), mpPreviousNumPaM(pRdr->m_pPreviousNumPaM), mpPrevNumRule(pRdr->m_pPrevNumRule), mpTableDesc(pRdr->m_pTableDesc), @@ -2065,8 +2065,6 @@ WW8ReaderSave::WW8ReaderSave(SwWW8ImplReader* pRdr ,WW8_CP nStartCp) : = pRdr->m_bHasBorder = false; pRdr->m_bFirstPara = true; pRdr->m_nInTable = 0; -pRdr->m_pWFlyPara = nullptr; -pRdr->m_pSFlyPara = nullptr; pRdr->m_pPreviousNumPaM = nullptr; pRdr->m_pPrevNumRule = nullptr; pRdr->m_pTableDesc = nullptr; @@ -2097,8 +2095,8 @@ WW8ReaderSave::WW8ReaderSave(SwWW8ImplReader* pRdr ,WW8_CP nStartCp) : void WW8ReaderSave::Restore( SwWW8ImplReader* pRdr ) { -pRdr->m_pWFlyPara = mpWFlyPara; -
[Libreoffice-commits] online.git: etc/cert.pem etc/key.pem
etc/cert.pem | 40 etc/key.pem | 50 +- 2 files changed, 45 insertions(+), 45 deletions(-) New commits: commit bb332a9b97a8444ac954770463b9f333fa278e48 Author: Andras Timar Date: Mon Apr 3 14:16:19 2017 +0200 new SSL key and cert for testing Change-Id: I9446bfc7905e5980de6aaa36ca72f206e2c558a2 diff --git a/etc/cert.pem b/etc/cert.pem index 6c1b46d8..a0a2a296 100644 --- a/etc/cert.pem +++ b/etc/cert.pem @@ -1,35 +1,35 @@ -BEGIN CERTIFICATE- -MIIGKzCCBBOgAwIBAgICEAEwDQYJKoZIhvcNAQELBQAwgZ4xCzAJBgNVBAYTAkdC +MIIGKzCCBBOgAwIBAgICEAswDQYJKoZIhvcNAQELBQAwgZ4xCzAJBgNVBAYTAkdC MRAwDgYDVQQIDAdFbmdsYW5kMSMwIQYDVQQKDBpDb2xsYWJvcmEgUHJvZHVjdGl2 aXR5IEx0ZDEtMCsGA1UEAwwkQ29sbGFib3JhIENsb3VkU3VpdGUgSW50ZXJtZWRp YXRlIENBMSkwJwYJKoZIhvcNAQkBFhphbmRyYXMudGltYXJAY29sbGFib3JhLmNv -bTAeFw0xNjAzMjMxNDEyNThaFw0xNzA0MDIxNDEyNThaMIGXMQswCQYDVQQGEwJH +bTAeFw0xNzA0MDMxMjEzNTVaFw0xODA0MTMxMjEzNTVaMIGXMQswCQYDVQQGEwJH QjEQMA4GA1UECAwHRW5nbGFuZDESMBAGA1UEBwwJQ2FtYnJpZGdlMSMwIQYDVQQK DBpDb2xsYWJvcmEgUHJvZHVjdGl2aXR5IEx0ZDESMBAGA1UEAwwJbG9jYWxob3N0 MSkwJwYJKoZIhvcNAQkBFhphbmRyYXMudGltYXJAY29sbGFib3JhLmNvbTCCASIw -DQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMfuRmqCY/bU3Kjb+SzjoyYIlVdX -tcjBWaKZKthruI0eBoHvuepdn6D85kMBjUd/Q1G6I3dRttN8oMlEKDmRSkpTzyaM -FSeiHd8oJsJTnWW4MNG3sJNOnVk7PXJ58P9fUdituxblcbVsJzInMdqyOFPItTpH -N/1bOf2LnW4fUeqqztdV4AoEYPPepQFO6vXYX8dHHLGrKBDvL5o8QW++5q/6Cl/0 -5k3CTcTdhSEcdCY8e4dhL6Vc2ZTrCaVvQe1qKPjToO9q8QG/P9KAP5GFPuVhyEJ+ -JtSBtBxDOuWIbEUX+18pmleu1nkqxFt79mkCfZ32TVIM16Dj0rDpC3KJAEkCAwEA +DQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBANAKVQT9gmeBxYf/9eHexQ481jKq ++rd7V+W9E4YPGHLmc6VJjojRFqE7VuXsQ1jvsEuB0XMyfkwm5VNMXfb9JFuRjZAT +JdRlnf80+gBfXdme6GqjeBH/+Dm+6CEiV70UVRtspY+bMzdmkfwc6QFhbb1sTKyt +FlhUg6OYdb3FKXk0o9ew1AcFyOsZIpW7UyCGEo3NC1I5SY4iwk4hwDYOY+opj2QC +k1cQQ8CWpoonEvnwmUUbQ81W8diS7fMFqMouC8CFFKdqS1YafVlUUI8gDZOqvHC5 +ubBBMGL8IQi/YpaCzA0T9DLeF4lb/+9X6yeV8LCnFuh5UIabjMWj0OgNFLcCAwEA AaOCAXYwggFyMAkGA1UdEwQCMAAwEQYJYIZIAYb4QgEBBAQDAgZAMDMGCWCGSAGG +EIBDQQmFiRPcGVuU1NMIEdlbmVyYXRlZCBTZXJ2ZXIgQ2VydGlmaWNhdGUwHQYD -VR0OBBYEFM7LGIsKGwXkjGIYTNPcWP1EKGjDMIHYBgNVHSMEgdAwgc2AFGkzufPW +VR0OBBYEFG4G7H4ECGBDbPK+0t8dmQpYWl9oMIHYBgNVHSMEgdAwgc2AFGkzufPW sHudzeh4tNd7xL54la5soYGwpIGtMIGqMQswCQYDVQQGEwJHQjEQMA4GA1UECAwH RW5nbGFuZDESMBAGA1UEBwwJQ2FtYnJpZGdlMSMwIQYDVQQKDBpDb2xsYWJvcmEg UHJvZHVjdGl2aXR5IEx0ZDElMCMGA1UEAwwcQ29sbGFib3JhIENsb3VkU3VpdGUg Um9vdCBDQTEpMCcGCSqGSIb3DQEJARYaYW5kcmFzLnRpbWFyQGNvbGxhYm9yYS5j b22CAhAAMA4GA1UdDwEB/wQEAwIFoDATBgNVHSUEDDAKBggrBgEFBQcDATANBgkq -hkiG9w0BAQsFAAOCAgEAqNIqhQzF8iBqG5uPAd5utabhp/W8Hn/7JX75zzd2smaV -qSCvFaUXi6uxB84M5Dx8XClc7xgWZN0uktwzBEjxDIX3MOabTA+Tu+30uyxe2FWv -d/0pfd1dE10F5IF12i33W/ZqmW0GCGnvwPETnAWd0GZ2RuBGy8z3pdlnjHpDgvny -WkWymFrKH5fKq6mrNuntbuhS1YNLqbYtfWOxG08rQcfMbbtd+e03Nklfa9f0M//M -VKHNUA81fgtrebPkGsfuqWHBO7VRseWJL/ge+7XOfBZ0H3N9C0896wvmxNRCKoCc -6pgrpYIsAcaYRD35UHVFLAR6A25IazmHQOeVbguxEMTXOJpeilXfRJl0pdi6B2sh -qobbhi2Psg+AKYzIcXLoVQ+NjwNdyyj1rE/slc0bPIWAOyJgsteKrV+UrlMkdzlp -Ob4BSpWIdxhgeoSnl4/j2FJB5M3+wJ0QCR3Hg4VK7GZIs2oyvFN56OPoS8PpJaNO -UXFS+L4rjDTQ6BMvxbpVmkEaAbzbuu4BYbEry3CdDuG5/lC/TnSSA58bJ65JRrjz -XWgC1TuKdlt32lskT8zRQ6Mdxh+150sfSGsRTBS0Qj89DnOpgzwvdoyfe6wCujQD -/aLk38qLCZClpsF2KDpEerz4nVkviDr+hX1IlMr8uRMHVy37y8vPGd1XTiEZBa0= +hkiG9w0BAQsFAAOCAgEAiv0KpnjXckgOwhceNrhUqfjaw5neolwyGEZ4gypn8E/g +rKFOCstiL/sqw7nWcvK/guLvRwGj596KdTdX9yvIb3F/Q7PYy1VVHKKNcfyM4mgi +QEKjGG98thTuGdtEluW+0gxRG3Piko6M9A4GXmRmeq8lq0fxSAvosDrSGO3iqRdZ +f6/Oc3a1tBC+TwTxxOYOKN6EMKcEZpusPv/0+vaMbMvoMA7EJQq+AnuT6/jjXmmh +89RGi9PxUohXwinY3VBTfY7qmWRJe2DUFpmSBdpk7cgttsmInff7bhM80ADGXTDQ +AoPUgAh+vNpDBbjKsZbk71G+xVfJBmqdI+siM977TjbYbVuhVHvq9c/nmW0NXngL +9TW8Q4kzDZvFpEAtnIaloqT5sHDfr8w4yyOi5miHl1wCkbw9h0TSMunItJ6NwXNO +O0iq45qQw9Wks9Z0g/jRM3dbRZNsRPgYqOtRxNvZ9owdr75CUscMOA21sG8YCXAI +8iOqu85YDPVsjhS0u3Mi2YTiVIX6I4noytTuYuzO4Popm1JdLBukVsNTvgRlOD03 +SbmrMCDFtw6+CEKsApjavrBA0iCIxuzUYnVjMtd6KitxoCZ/9zmm20rNIt+OPcLg +XsiVguECIdSGyFIoEhjWEhgqPpOpSw/kx8s51zHEF9MvheImkHM4Cwd+M1n33a4= -END CERTIFICATE- diff --git a/etc/key.pem b/etc/key.pem index a280f1c0..93452dff 100644 --- a/etc/key.pem +++ b/etc/key.pem @@ -1,27 +1,27 @@ -BEGIN RSA PRIVATE KEY- -MIIEowIBAAKCAQEAx+5GaoJj9tTcqNv5LOOjJgiVV1e1yMFZopkq2Gu4jR4Gge+5 -6l2foPzmQwGNR39DUbojd1G203ygyUQoOZFKSlPPJowVJ6Id3ygmwlOdZbgw0bew -k06dWTs9cnnw/19R2K27FuVxtWwnMicx2rI4U8i1Okc3/Vs5/Yudbh9R6qrO11Xg -CgRg896lAU7q9dhfx0ccsasoEO8vmjxBb77mr/oKX/TmTcJNxN2FIRx0Jjx7h2Ev -pVzZlOsJpW9B7Woo+NOg72rxAb8/0oA/kYU+5WHIQn4m1IG0HEM65YhsRRf7Xyma -V67WeSrEW3v2aQJ9nfZNUgzXoOPSsOkLcokASQIDAQABAoIBAAJUqMV9F6U8/gWJ -6vG3BaPf3b3S6++XMXBP0MwNFW2vt+uz27r7tGywBg8p6Xe36BT/0oIFldgJT+aI -wN9K7k7Hg1azs1tu7GI5mZoSV3dkGk2XkptlAziTFDhNa53Ogqm//LpbmmO/CwXu -pwohob54TISNZ/2wHpDyG7e47b+KkO3cP1BaARqafcSVSnGSNshSJoTEUQQKpzUU -UfB2vYdTTYQc2yDGFLimbV4TvhiBqqO/4k8ppL16UVetrPeBrpQhdxByAn537FfL -whB8XwS80NroqcjAGRTq738zoAW8H8N9dzXHRQPoAINVkxTOErEUPEWXT6RXxN84 -pogI+7ECgYEA8H/esIBWJx
[Libreoffice-commits] core.git: sw/source
sw/source/core/layout/laycache.cxx | 61 - 1 file changed, 53 insertions(+), 8 deletions(-) New commits: commit 8a5374f2fdbd1e15c107133f55930cbc431edbd5 Author: Michael Stahl Date: Mon Apr 3 14:28:56 2017 +0200 tdf#106237 sw: do some basic sanity checking on layout-cache The bugdoc, with claimed generator AOO4.1.1 on Windows, contains a bogus layout-cache: debug:26706:1: nType P nIndex 29 2147483647 debug:26706:1: nType P nIndex 66 2147483647 debug:26706:1: nType P nIndex 105 2147483647 debug:26706:1: nType P nIndex 142 2147483647 debug:26706:1: nType P nIndex 178 2147483647 debug:26706:1: nType P nIndex 205 2147483647 debug:26706:1: nType P nIndex 229 2147483647 debug:26706:1: nType T nIndex 314 65535 Due to a loop-control this causes incorrect pagination if CalcLayout() is called only once. It should look like this: debug:26765:1: nType T nIndex 382 65535 debug:26765:1: nType T nIndex 790 65535 In this case we can easily detect that the indexes and types in the layout-cache are bogus by checking against the node types, so do that in SwLayHelper::SwLayHelper(). Change-Id: I7091af49a8c29bf0a11ceff0be9ba84b1f710fdb diff --git a/sw/source/core/layout/laycache.cxx b/sw/source/core/layout/laycache.cxx index 8a5beb52f327..b74f2bb163aa 100644 --- a/sw/source/core/layout/laycache.cxx +++ b/sw/source/core/layout/laycache.cxx @@ -454,6 +454,51 @@ SwActualSection::SwActualSection( SwActualSection *pUp, } } +namespace { + +bool sanityCheckLayoutCache(SwLayCacheImpl const& rCache, +SwNodes const& rNodes, sal_uLong nNodeIndex) +{ +auto const nStartOfContent(rNodes.GetEndOfContent().StartOfSectionNode()->GetIndex()); +nNodeIndex -= nStartOfContent; +auto const nMaxIndex(rNodes.GetEndOfContent().GetIndex() - nStartOfContent); +for (sal_uInt16 nIndex = 0; nIndex < rCache.size(); ++nIndex) +{ +auto const nBreakIndex(rCache.GetBreakIndex(nIndex)); +if (nBreakIndex < nNodeIndex || nMaxIndex <= nBreakIndex) +{ +SAL_WARN("sw.core.layout", +"invalid node index in layout-cache: " << nBreakIndex); +return false; +} +auto const nBreakType(rCache.GetBreakType(nIndex)); +switch (nBreakType) +{ +case SW_LAYCACHE_IO_REC_PARA: +if (!rNodes[nBreakIndex + nStartOfContent]->IsTextNode()) +{ +SAL_WARN("sw.core.layout", +"invalid node of type 'P' in layout-cache"); +return false; +} +break; +case SW_LAYCACHE_IO_REC_TABLE: +if (!rNodes[nBreakIndex + nStartOfContent]->IsTableNode()) +{ +SAL_WARN("sw.core.layout", +"invalid node of type 'T' in layout-cache"); +return false; +} +break; +default: +assert(false); // Read shouldn't have inserted that +} +} +return true; +} + +} // namespace + /** helper class, which utilizes the layout cache information * to distribute the document content to the right pages. * It's used by the InsertCnt_(..)-function. @@ -478,19 +523,19 @@ SwLayHelper::SwLayHelper( SwDoc *pD, SwFrame* &rpF, SwFrame* &rpP, SwPageFrame* pImpl = pDoc->GetLayoutCache() ? pDoc->GetLayoutCache()->LockImpl() : nullptr; if( pImpl ) { -nMaxParaPerPage = 1000; -nStartOfContent = pDoc->GetNodes().GetEndOfContent().StartOfSectionNode() - ->GetIndex(); -nNodeIndex -= nStartOfContent; -nIndex = 0; -while( nIndex < pImpl->size() && pImpl->GetBreakIndex( nIndex ) < nNodeIndex ) +SwNodes const& rNodes(pDoc->GetNodes()); +if (sanityCheckLayoutCache(*pImpl, rNodes, nNodeIndex)) { -++nIndex; +nIndex = 0; +nStartOfContent = rNodes.GetEndOfContent().StartOfSectionNode()->GetIndex(); +nMaxParaPerPage = 1000; } -if( nIndex >= pImpl->size() ) +else { pDoc->GetLayoutCache()->UnlockImpl(); pImpl = nullptr; +nIndex = USHRT_MAX; +nStartOfContent = USHRT_MAX; } } else ___ 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/layout/laycache.cxx |6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) New commits: commit cfdc46a4bcd8aba03c7b29dfc535d66d5802f26a Author: Stephan Bergmann Date: Mon Apr 3 15:30:02 2017 +0200 loplugin:sallogareas Change-Id: Idd4f44b66e67d938a1ba2b9c7ff4be0b0009ff53 diff --git a/sw/source/core/layout/laycache.cxx b/sw/source/core/layout/laycache.cxx index b74f2bb163aa..65e8dcfc92d6 100644 --- a/sw/source/core/layout/laycache.cxx +++ b/sw/source/core/layout/laycache.cxx @@ -467,7 +467,7 @@ bool sanityCheckLayoutCache(SwLayCacheImpl const& rCache, auto const nBreakIndex(rCache.GetBreakIndex(nIndex)); if (nBreakIndex < nNodeIndex || nMaxIndex <= nBreakIndex) { -SAL_WARN("sw.core.layout", +SAL_WARN("sw.core", "invalid node index in layout-cache: " << nBreakIndex); return false; } @@ -477,7 +477,7 @@ bool sanityCheckLayoutCache(SwLayCacheImpl const& rCache, case SW_LAYCACHE_IO_REC_PARA: if (!rNodes[nBreakIndex + nStartOfContent]->IsTextNode()) { -SAL_WARN("sw.core.layout", +SAL_WARN("sw.core", "invalid node of type 'P' in layout-cache"); return false; } @@ -485,7 +485,7 @@ bool sanityCheckLayoutCache(SwLayCacheImpl const& rCache, case SW_LAYCACHE_IO_REC_TABLE: if (!rNodes[nBreakIndex + nStartOfContent]->IsTableNode()) { -SAL_WARN("sw.core.layout", +SAL_WARN("sw.core", "invalid node of type 'T' in layout-cache"); return false; } ___ 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/layout/laycache.cxx |2 +- sw/source/core/layout/layhelp.hxx |4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) New commits: commit dbaab58c1442e7f62ef0732376fe5a49840e9fd6 Author: Stephan Bergmann Date: Mon Apr 3 15:35:34 2017 +0200 loplugin:loopvartoosmall Change-Id: Ief96de6eb6f6276681130a6d16c767ab8ceaa3f1 diff --git a/sw/source/core/layout/laycache.cxx b/sw/source/core/layout/laycache.cxx index 65e8dcfc92d6..6b7d34b065a3 100644 --- a/sw/source/core/layout/laycache.cxx +++ b/sw/source/core/layout/laycache.cxx @@ -462,7 +462,7 @@ bool sanityCheckLayoutCache(SwLayCacheImpl const& rCache, auto const nStartOfContent(rNodes.GetEndOfContent().StartOfSectionNode()->GetIndex()); nNodeIndex -= nStartOfContent; auto const nMaxIndex(rNodes.GetEndOfContent().GetIndex() - nStartOfContent); -for (sal_uInt16 nIndex = 0; nIndex < rCache.size(); ++nIndex) +for (size_t nIndex = 0; nIndex < rCache.size(); ++nIndex) { auto const nBreakIndex(rCache.GetBreakIndex(nIndex)); if (nBreakIndex < nNodeIndex || nMaxIndex <= nBreakIndex) diff --git a/sw/source/core/layout/layhelp.hxx b/sw/source/core/layout/layhelp.hxx index 57c747b4c0d1..3da3a10bce10 100644 --- a/sw/source/core/layout/layhelp.hxx +++ b/sw/source/core/layout/layhelp.hxx @@ -66,9 +66,9 @@ public: bool Read( SvStream& rStream ); -sal_uLong GetBreakIndex( sal_uInt16 nIdx ) const { return mIndices[ nIdx ]; } +sal_uLong GetBreakIndex( size_t nIdx ) const { return mIndices[ nIdx ]; } sal_Int32 GetBreakOfst( size_t nIdx ) const { return aOffset[ nIdx ]; } -sal_uInt16 GetBreakType( sal_uInt16 nIdx ) const { return aType[ nIdx ]; } +sal_uInt16 GetBreakType( size_t nIdx ) const { return aType[ nIdx ]; } size_t GetFlyCount() const { return m_FlyCache.size(); } SwFlyCache& GetFlyCache( size_t nIdx ) { return m_FlyCache[ nIdx ]; } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: sot/source sw/source
sot/source/sdstor/ucbstorage.cxx | 15 --- sw/source/filter/ww8/ww8par.cxx |1 + 2 files changed, 9 insertions(+), 7 deletions(-) New commits: commit e5b0183bd8a54edcfb68fa4f3d44740a833c70ab Author: Caolán McNamara Date: Mon Apr 3 13:24:29 2017 +0100 these are file urls, so don't need ucb Change-Id: I25beaeab002db1de34be3b5f4a774bd15b71f5d3 Reviewed-on: https://gerrit.libreoffice.org/36045 Tested-by: Jenkins Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara diff --git a/sot/source/sdstor/ucbstorage.cxx b/sot/source/sdstor/ucbstorage.cxx index 3d15a40dd037..a7de41a9bb00 100644 --- a/sot/source/sdstor/ucbstorage.cxx +++ b/sot/source/sdstor/ucbstorage.cxx @@ -46,6 +46,7 @@ #include #include #include +#include #include #include #include @@ -124,8 +125,8 @@ FileStreamWrapper_Impl::~FileStreamWrapper_Impl() #endif } -if ( !m_aURL.isEmpty() ) -::utl::UCBContentHelper::Kill( m_aURL ); +if (!m_aURL.isEmpty()) +osl::File::remove(m_aURL); } @@ -227,7 +228,7 @@ void SAL_CALL FileStreamWrapper_Impl::closeInput() #if OSL_DEBUG_LEVEL > 0 --nOpenFiles; #endif -::utl::UCBContentHelper::Kill( m_aURL ); +osl::File::remove(m_aURL); m_aURL.clear(); } @@ -683,8 +684,8 @@ UCBStorageStream_Impl::~UCBStorageStream_Impl() delete m_pStream; -if ( !m_aTempURL.isEmpty() ) -::utl::UCBContentHelper::Kill( m_aTempURL ); +if (!m_aTempURL.isEmpty()) +osl::File::remove(m_aTempURL); delete m_pContent; } @@ -1125,7 +1126,7 @@ void UCBStorageStream_Impl::Revert() Free(); if ( !m_aTempURL.isEmpty() ) { -::utl::UCBContentHelper::Kill( m_aTempURL ); +osl::File::remove(m_aTempURL); m_aTempURL.clear(); } @@ -1211,7 +1212,7 @@ void UCBStorageStream_Impl::PrepareCachedForReopen( StreamMode nMode ) if ( !m_aTempURL.isEmpty() ) { -::utl::UCBContentHelper::Kill( m_aTempURL ); +osl::File::remove(m_aTempURL); m_aTempURL.clear(); } } diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx index 5fa0270e53da..85e17a57f258 100644 --- a/sw/source/filter/ww8/ww8par.cxx +++ b/sw/source/filter/ww8/ww8par.cxx @@ -6215,6 +6215,7 @@ bool SAL_CALL TestImportDOC(SvStream &rStream, const OUString &rFltName) aPaM.GetPoint()->nContent.Assign(aIdx.GetNode().GetContentNode(), 0); bool bRet = pReader->Read(*pD, OUString(), aPaM, OUString()) == 0; delete pReader; + return bRet; } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: vcl/inc vcl/ios
vcl/inc/ios/iosinst.hxx |2 +- vcl/ios/iosinst.cxx |6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) New commits: commit 605d3a2858ea585be35eb159a0fa4ce410d64ae9 Author: jan Iversen Date: Mon Apr 3 14:18:46 2017 +0200 iOS update for Rectangle Updated Rectangle to tools::Rectangle Change-Id: I1577dffe8d51ac3a33bbc2e0771b338d5fdd0220 diff --git a/vcl/inc/ios/iosinst.hxx b/vcl/inc/ios/iosinst.hxx index 0ad543c71ac2..262ef1063076 100644 --- a/vcl/inc/ios/iosinst.hxx +++ b/vcl/inc/ios/iosinst.hxx @@ -39,7 +39,7 @@ public: virtual SalSystem* CreateSalSystem() override; -void GetWorkArea( Rectangle& rRect ); +void GetWorkArea( tools::Rectangle& rRect ); SalFrame* CreateFrame( SalFrame* pParent, SalFrameStyleFlags nStyle ) override; SalFrame* CreateChildFrame( SystemParentData* pParent, SalFrameStyleFlags nStyle ) override; }; diff --git a/vcl/ios/iosinst.cxx b/vcl/ios/iosinst.cxx index f0f80f08f399..e71b71156035 100644 --- a/vcl/ios/iosinst.cxx +++ b/vcl/ios/iosinst.cxx @@ -42,9 +42,9 @@ public: virtual bool ErrorTrapPop( bool ) { return false; } }; -void IosSalInstance::GetWorkArea( Rectangle& rRect ) +void IosSalInstance::GetWorkArea( tools::Rectangle& rRect ) { -rRect = Rectangle( Point( 0, 0 ), +rRect = tools::Rectangle( Point( 0, 0 ), Size( viewWidth, viewHeight ) ); } @@ -96,7 +96,7 @@ public: SetPosSize(0, 0, viewWidth, viewHeight, SAL_FRAME_POSSIZE_WIDTH | SAL_FRAME_POSSIZE_HEIGHT); } -virtual void GetWorkArea( Rectangle& rRect ) override +virtual void GetWorkArea( tools::Rectangle& rRect ) override { IosSalInstance::getInstance()->GetWorkArea( rRect ); } ___ 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/shellio.hxx |1 + sw/source/core/txtnode/swfntcch.cxx |5 + sw/source/filter/ww8/ww8par.cxx |2 ++ 3 files changed, 8 insertions(+) New commits: commit af16eb5a225e00018d11896d4f447716d1f1124d Author: Caolán McNamara Date: Mon Apr 3 15:24:26 2017 +0100 flush writer fontcache after TestImportDOC to get around leak sanitizer Change-Id: I45f0caefc14c35476e9288705803192afb81 diff --git a/sw/inc/shellio.hxx b/sw/inc/shellio.hxx index 298f4c465647..893990b22305 100644 --- a/sw/inc/shellio.hxx +++ b/sw/inc/shellio.hxx @@ -179,6 +179,7 @@ protected: extern "C" SAL_DLLPUBLIC_EXPORT bool SAL_CALL TestImportDOC(SvStream &rStream, const OUString &rFltName); extern "C" SAL_DLLPUBLIC_EXPORT bool SAL_CALL TestImportRTF(SvStream &rStream); +SAL_DLLPUBLIC_EXPORT void FlushFontCache(); class SW_DLLPUBLIC Reader { diff --git a/sw/source/core/txtnode/swfntcch.cxx b/sw/source/core/txtnode/swfntcch.cxx index 9e938dc6bee5..58269d218431 100644 --- a/sw/source/core/txtnode/swfntcch.cxx +++ b/sw/source/core/txtnode/swfntcch.cxx @@ -60,4 +60,9 @@ SwCacheObj *SwFontAccess::NewObj( ) return new SwFontObj( m_pOwner, pShell ); } +SAL_DLLPUBLIC_EXPORT void FlushFontCache() +{ +pSwFontCache->Flush(); +} + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx index 85e17a57f258..eb75ce5f0413 100644 --- a/sw/source/filter/ww8/ww8par.cxx +++ b/sw/source/filter/ww8/ww8par.cxx @@ -6216,6 +6216,8 @@ bool SAL_CALL TestImportDOC(SvStream &rStream, const OUString &rFltName) bool bRet = pReader->Read(*pD, OUString(), aPaM, OUString()) == 0; delete pReader; +FlushFontCache(); + return bRet; } ___ 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/txtnode/swfntcch.cxx |3 +++ 1 file changed, 3 insertions(+) New commits: commit 32dad6983f81583b233d3cddb7a9de39519aa77b Author: Stephan Bergmann Date: Mon Apr 3 17:00:06 2017 +0200 loplugin:unreffun Change-Id: I7a4fe7240e43faaae3482a084b466fa87e67b6b8 diff --git a/sw/source/core/txtnode/swfntcch.cxx b/sw/source/core/txtnode/swfntcch.cxx index 58269d218431..44cabed8d600 100644 --- a/sw/source/core/txtnode/swfntcch.cxx +++ b/sw/source/core/txtnode/swfntcch.cxx @@ -17,6 +17,9 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ +#include + +#include #include #include "swfntcch.hxx" #include "fmtcol.hxx" ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: 2 commits - sw/source
sw/source/filter/ww8/ww8par.cxx |6 -- 1 file changed, 4 insertions(+), 2 deletions(-) New commits: commit 8c52dca558fc046db7480c7e483ba206b1b4df47 Author: Caolán McNamara Date: Mon Apr 3 16:01:38 2017 +0100 only convert used part of buffer Change-Id: I133a02ae1cbdb4fb32f81db7214d27c66ccd0a8b diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx index 3de315055bee..29aa054ad05a 100644 --- a/sw/source/filter/ww8/ww8par.cxx +++ b/sw/source/filter/ww8/ww8par.cxx @@ -3118,7 +3118,7 @@ bool SwWW8ImplReader::ReadPlainChars(WW8_CP& rPos, sal_Int32 nEnd, sal_Int32 nCp if (m_bRegardHindiDigits && m_bBidi && LangUsesHindiNumbers(nCTLLang)) { -for (sal_Int32 nI = 0; nI < nStrLen; ++nI, ++pBuffer) +for (sal_Int32 nI = 0; nI < nEndUsed; ++nI, ++pBuffer) *pBuffer = TranslateToHindiNumbers(*pBuffer); } commit 9b3685789b83ad052eb61bd909e37804ed00b76f Author: Caolán McNamara Date: Mon Apr 3 15:59:44 2017 +0100 don't check on every loop Change-Id: I000a887925db63b5717cc0d062d9da623415f7cc diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx index eb75ce5f0413..3de315055bee 100644 --- a/sw/source/filter/ww8/ww8par.cxx +++ b/sw/source/filter/ww8/ww8par.cxx @@ -3116,9 +3116,11 @@ bool SwWW8ImplReader::ReadPlainChars(WW8_CP& rPos, sal_Int32 nEnd, sal_Int32 nCp ? Custom8BitToUnicode(hConverter, p8Bits, nL2, pBuffer, nStrLen) : nL2; -for( sal_Int32 nI = 0; nI < nStrLen; ++nI, ++pBuffer ) -if (m_bRegardHindiDigits && m_bBidi && LangUsesHindiNumbers(nCTLLang)) +if (m_bRegardHindiDigits && m_bBidi && LangUsesHindiNumbers(nCTLLang)) +{ +for (sal_Int32 nI = 0; nI < nStrLen; ++nI, ++pBuffer) *pBuffer = TranslateToHindiNumbers(*pBuffer); +} pStr->buffer[nEndUsed] = 0; pStr->length = nEndUsed; ___ 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/gdi/pdfextoutdevdata.cxx |2 ++ 1 file changed, 2 insertions(+) New commits: commit a8caa0ef1c0b5926caa9dfc4752c6d355dea6765 Author: Miklos Vajna Date: Mon Apr 3 16:42:08 2017 +0200 vcl: avoid divide by zero in PDFExtOutDevData::HasAdequateCompression() My stub graphic import filter created a graphic with 0 data size, don't crash on that. Change-Id: Ie9b93fce1bcae04d555a0610f674603c6945a54a Reviewed-on: https://gerrit.libreoffice.org/36048 Reviewed-by: Miklos Vajna Tested-by: Jenkins diff --git a/vcl/source/gdi/pdfextoutdevdata.cxx b/vcl/source/gdi/pdfextoutdevdata.cxx index 0175d5faea91..f97f4002c871 100644 --- a/vcl/source/gdi/pdfextoutdevdata.cxx +++ b/vcl/source/gdi/pdfextoutdevdata.cxx @@ -828,6 +828,8 @@ bool PDFExtOutDevData::HasAdequateCompression( const Graphic &rGraphic, // FIXME: ideally we'd also pre-empt the DPI related scaling too. Size aSize = rGraphic.GetSizePixel(); +if (rGraphic.GetLink().GetDataSize() == 0) +return false; sal_Int32 nCurrentRatio = (100 * aSize.Width() * aSize.Height() * 4) / rGraphic.GetLink().GetDataSize(); ___ 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/layout/laycache.cxx |7 --- sw/source/core/layout/layhelp.hxx |2 +- 2 files changed, 5 insertions(+), 4 deletions(-) New commits: commit 5793364b830c88611ec62650e9820c0712d3b956 Author: Stephan Bergmann Date: Mon Apr 3 17:46:58 2017 +0200 More integer clean-up ...after dbaab58c1442e7f62ef0732376fe5a49840e9fd6 "loplugin:loopvartoosmall". Looks like SwLayHelper::nIndex only needs to be initialized to a very large value (so that 'nIndex < pImpl->size()' will be false), not USHRT_MAX exactly. Change-Id: I209faa00894783c468db1440f5663ea9e8ad3e19 diff --git a/sw/source/core/layout/laycache.cxx b/sw/source/core/layout/laycache.cxx index 6b7d34b065a3..5903b7d4a4d0 100644 --- a/sw/source/core/layout/laycache.cxx +++ b/sw/source/core/layout/laycache.cxx @@ -42,6 +42,7 @@ #include #include +#include #include using namespace ::com::sun::star; @@ -320,7 +321,7 @@ bool SwLayoutCache::CompareLayout( const SwDoc& rDoc ) const const SwRootFrame *pRootFrame = rDoc.getIDocumentLayoutAccess().GetCurrentLayout(); if( pRootFrame ) { -sal_uInt16 nIndex = 0; +size_t nIndex = 0; sal_uLong nStartOfContent = rDoc.GetNodes().GetEndOfContent(). StartOfSectionNode()->GetIndex(); const SwPageFrame* pPage = static_cast(pRootFrame->Lower()); @@ -534,13 +535,13 @@ SwLayHelper::SwLayHelper( SwDoc *pD, SwFrame* &rpF, SwFrame* &rpP, SwPageFrame* { pDoc->GetLayoutCache()->UnlockImpl(); pImpl = nullptr; -nIndex = USHRT_MAX; +nIndex = std::numeric_limits::max(); nStartOfContent = USHRT_MAX; } } else { -nIndex = USHRT_MAX; +nIndex = std::numeric_limits::max(); nStartOfContent = ULONG_MAX; } } diff --git a/sw/source/core/layout/layhelp.hxx b/sw/source/core/layout/layhelp.hxx index 3da3a10bce10..2dc49463a792 100644 --- a/sw/source/core/layout/layhelp.hxx +++ b/sw/source/core/layout/layhelp.hxx @@ -109,7 +109,7 @@ class SwLayHelper sal_uLong nMaxParaPerPage; sal_uLong nParagraphCnt; sal_uLong nStartOfContent; -sal_uInt16 nIndex; // the index in the page break array +size_t nIndex; // the index in the page break array size_t nFlyIdx; // the index in the fly cache array bool bFirst : 1; void CheckFlyCache_( SwPageFrame* pPage ); ___ 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-1' - etc/cert.pem etc/key.pem
etc/cert.pem | 40 etc/key.pem | 50 +- 2 files changed, 45 insertions(+), 45 deletions(-) New commits: commit 0e5ede55cd1f32cfbfd7dc3276b47e1014ca174a Author: Andras Timar Date: Mon Apr 3 14:16:19 2017 +0200 new SSL key and cert for testing Change-Id: I9446bfc7905e5980de6aaa36ca72f206e2c558a2 (cherry picked from commit bb332a9b97a8444ac954770463b9f333fa278e48) Signed-off-by: Andras Timar diff --git a/etc/cert.pem b/etc/cert.pem index 6c1b46d8..a0a2a296 100644 --- a/etc/cert.pem +++ b/etc/cert.pem @@ -1,35 +1,35 @@ -BEGIN CERTIFICATE- -MIIGKzCCBBOgAwIBAgICEAEwDQYJKoZIhvcNAQELBQAwgZ4xCzAJBgNVBAYTAkdC +MIIGKzCCBBOgAwIBAgICEAswDQYJKoZIhvcNAQELBQAwgZ4xCzAJBgNVBAYTAkdC MRAwDgYDVQQIDAdFbmdsYW5kMSMwIQYDVQQKDBpDb2xsYWJvcmEgUHJvZHVjdGl2 aXR5IEx0ZDEtMCsGA1UEAwwkQ29sbGFib3JhIENsb3VkU3VpdGUgSW50ZXJtZWRp YXRlIENBMSkwJwYJKoZIhvcNAQkBFhphbmRyYXMudGltYXJAY29sbGFib3JhLmNv -bTAeFw0xNjAzMjMxNDEyNThaFw0xNzA0MDIxNDEyNThaMIGXMQswCQYDVQQGEwJH +bTAeFw0xNzA0MDMxMjEzNTVaFw0xODA0MTMxMjEzNTVaMIGXMQswCQYDVQQGEwJH QjEQMA4GA1UECAwHRW5nbGFuZDESMBAGA1UEBwwJQ2FtYnJpZGdlMSMwIQYDVQQK DBpDb2xsYWJvcmEgUHJvZHVjdGl2aXR5IEx0ZDESMBAGA1UEAwwJbG9jYWxob3N0 MSkwJwYJKoZIhvcNAQkBFhphbmRyYXMudGltYXJAY29sbGFib3JhLmNvbTCCASIw -DQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMfuRmqCY/bU3Kjb+SzjoyYIlVdX -tcjBWaKZKthruI0eBoHvuepdn6D85kMBjUd/Q1G6I3dRttN8oMlEKDmRSkpTzyaM -FSeiHd8oJsJTnWW4MNG3sJNOnVk7PXJ58P9fUdituxblcbVsJzInMdqyOFPItTpH -N/1bOf2LnW4fUeqqztdV4AoEYPPepQFO6vXYX8dHHLGrKBDvL5o8QW++5q/6Cl/0 -5k3CTcTdhSEcdCY8e4dhL6Vc2ZTrCaVvQe1qKPjToO9q8QG/P9KAP5GFPuVhyEJ+ -JtSBtBxDOuWIbEUX+18pmleu1nkqxFt79mkCfZ32TVIM16Dj0rDpC3KJAEkCAwEA +DQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBANAKVQT9gmeBxYf/9eHexQ481jKq ++rd7V+W9E4YPGHLmc6VJjojRFqE7VuXsQ1jvsEuB0XMyfkwm5VNMXfb9JFuRjZAT +JdRlnf80+gBfXdme6GqjeBH/+Dm+6CEiV70UVRtspY+bMzdmkfwc6QFhbb1sTKyt +FlhUg6OYdb3FKXk0o9ew1AcFyOsZIpW7UyCGEo3NC1I5SY4iwk4hwDYOY+opj2QC +k1cQQ8CWpoonEvnwmUUbQ81W8diS7fMFqMouC8CFFKdqS1YafVlUUI8gDZOqvHC5 +ubBBMGL8IQi/YpaCzA0T9DLeF4lb/+9X6yeV8LCnFuh5UIabjMWj0OgNFLcCAwEA AaOCAXYwggFyMAkGA1UdEwQCMAAwEQYJYIZIAYb4QgEBBAQDAgZAMDMGCWCGSAGG +EIBDQQmFiRPcGVuU1NMIEdlbmVyYXRlZCBTZXJ2ZXIgQ2VydGlmaWNhdGUwHQYD -VR0OBBYEFM7LGIsKGwXkjGIYTNPcWP1EKGjDMIHYBgNVHSMEgdAwgc2AFGkzufPW +VR0OBBYEFG4G7H4ECGBDbPK+0t8dmQpYWl9oMIHYBgNVHSMEgdAwgc2AFGkzufPW sHudzeh4tNd7xL54la5soYGwpIGtMIGqMQswCQYDVQQGEwJHQjEQMA4GA1UECAwH RW5nbGFuZDESMBAGA1UEBwwJQ2FtYnJpZGdlMSMwIQYDVQQKDBpDb2xsYWJvcmEg UHJvZHVjdGl2aXR5IEx0ZDElMCMGA1UEAwwcQ29sbGFib3JhIENsb3VkU3VpdGUg Um9vdCBDQTEpMCcGCSqGSIb3DQEJARYaYW5kcmFzLnRpbWFyQGNvbGxhYm9yYS5j b22CAhAAMA4GA1UdDwEB/wQEAwIFoDATBgNVHSUEDDAKBggrBgEFBQcDATANBgkq -hkiG9w0BAQsFAAOCAgEAqNIqhQzF8iBqG5uPAd5utabhp/W8Hn/7JX75zzd2smaV -qSCvFaUXi6uxB84M5Dx8XClc7xgWZN0uktwzBEjxDIX3MOabTA+Tu+30uyxe2FWv -d/0pfd1dE10F5IF12i33W/ZqmW0GCGnvwPETnAWd0GZ2RuBGy8z3pdlnjHpDgvny -WkWymFrKH5fKq6mrNuntbuhS1YNLqbYtfWOxG08rQcfMbbtd+e03Nklfa9f0M//M -VKHNUA81fgtrebPkGsfuqWHBO7VRseWJL/ge+7XOfBZ0H3N9C0896wvmxNRCKoCc -6pgrpYIsAcaYRD35UHVFLAR6A25IazmHQOeVbguxEMTXOJpeilXfRJl0pdi6B2sh -qobbhi2Psg+AKYzIcXLoVQ+NjwNdyyj1rE/slc0bPIWAOyJgsteKrV+UrlMkdzlp -Ob4BSpWIdxhgeoSnl4/j2FJB5M3+wJ0QCR3Hg4VK7GZIs2oyvFN56OPoS8PpJaNO -UXFS+L4rjDTQ6BMvxbpVmkEaAbzbuu4BYbEry3CdDuG5/lC/TnSSA58bJ65JRrjz -XWgC1TuKdlt32lskT8zRQ6Mdxh+150sfSGsRTBS0Qj89DnOpgzwvdoyfe6wCujQD -/aLk38qLCZClpsF2KDpEerz4nVkviDr+hX1IlMr8uRMHVy37y8vPGd1XTiEZBa0= +hkiG9w0BAQsFAAOCAgEAiv0KpnjXckgOwhceNrhUqfjaw5neolwyGEZ4gypn8E/g +rKFOCstiL/sqw7nWcvK/guLvRwGj596KdTdX9yvIb3F/Q7PYy1VVHKKNcfyM4mgi +QEKjGG98thTuGdtEluW+0gxRG3Piko6M9A4GXmRmeq8lq0fxSAvosDrSGO3iqRdZ +f6/Oc3a1tBC+TwTxxOYOKN6EMKcEZpusPv/0+vaMbMvoMA7EJQq+AnuT6/jjXmmh +89RGi9PxUohXwinY3VBTfY7qmWRJe2DUFpmSBdpk7cgttsmInff7bhM80ADGXTDQ +AoPUgAh+vNpDBbjKsZbk71G+xVfJBmqdI+siM977TjbYbVuhVHvq9c/nmW0NXngL +9TW8Q4kzDZvFpEAtnIaloqT5sHDfr8w4yyOi5miHl1wCkbw9h0TSMunItJ6NwXNO +O0iq45qQw9Wks9Z0g/jRM3dbRZNsRPgYqOtRxNvZ9owdr75CUscMOA21sG8YCXAI +8iOqu85YDPVsjhS0u3Mi2YTiVIX6I4noytTuYuzO4Popm1JdLBukVsNTvgRlOD03 +SbmrMCDFtw6+CEKsApjavrBA0iCIxuzUYnVjMtd6KitxoCZ/9zmm20rNIt+OPcLg +XsiVguECIdSGyFIoEhjWEhgqPpOpSw/kx8s51zHEF9MvheImkHM4Cwd+M1n33a4= -END CERTIFICATE- diff --git a/etc/key.pem b/etc/key.pem index a280f1c0..93452dff 100644 --- a/etc/key.pem +++ b/etc/key.pem @@ -1,27 +1,27 @@ -BEGIN RSA PRIVATE KEY- -MIIEowIBAAKCAQEAx+5GaoJj9tTcqNv5LOOjJgiVV1e1yMFZopkq2Gu4jR4Gge+5 -6l2foPzmQwGNR39DUbojd1G203ygyUQoOZFKSlPPJowVJ6Id3ygmwlOdZbgw0bew -k06dWTs9cnnw/19R2K27FuVxtWwnMicx2rI4U8i1Okc3/Vs5/Yudbh9R6qrO11Xg -CgRg896lAU7q9dhfx0ccsasoEO8vmjxBb77mr/oKX/TmTcJNxN2FIRx0Jjx7h2Ev -pVzZlOsJpW9B7Woo+NOg72rxAb8/0oA/kYU+5WHIQn4m1IG0HEM65YhsRRf7Xyma -V67WeSrEW3v2aQJ9nfZNUgzXoOPSsOkLcokASQIDAQABAoIBAAJUqMV9F6U8/gWJ -6vG3BaPf3b3S6++XMXBP0MwNFW2vt+uz27r7tGywBg8p6Xe36BT/0oIFldgJT+aI -wN9K7k7Hg1azs1tu7GI5mZoSV3dkGk2XkptlAziTFDhNa53Ogqm//LpbmmO/CwXu -pwohob54TISNZ/2wHpDyG7e47b+KkO3cP1BaARqafcSVSnGSNshSJoTEUQQKpzUU -UfB2vYdTTYQc2yDGFLimbV4TvhiBqqO/4k8ppL16UVetrPeB
Having Gerrit builds for the help repo too
Hi Norbert I was told to ask you about this: I think it would be useful to set up Gerrit in a way to make builds for the help repository too. In the last few months or so the number of commits towards the help repository grew, and so did the number of build breaking mistakes. I'd like to avoid those, but only asking people to do local builds is apparently too error prone. I think building the helpcontent2 target - and a few translations* - would be sufficiently inexpensive for reaching this goal. * I swear that one of my build breaks did not show locally until I re-enabled building the translations as well. What do you think? Thanks in advance! Gabor Kelemen signature.asc Description: OpenPGP digital signature ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice
[Libreoffice-commits] core.git: include/sal sw/source
include/sal/log-areas.dox |1 + sw/source/core/layout/laycache.cxx |6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) New commits: commit 282b3e8c4d45aacae57e3542b872cdbfebcc7195 Author: Michael Stahl Date: Mon Apr 3 21:06:59 2017 +0200 sw: [loplugin:sallogareas] Change-Id: I94c552e4b2ae95f57b0c667f6072664eab570042 diff --git a/include/sal/log-areas.dox b/include/sal/log-areas.dox index d5b9934ea0a9..b28bfe61132e 100644 --- a/include/sal/log-areas.dox +++ b/include/sal/log-areas.dox @@ -474,6 +474,7 @@ certain functionality. @li @c sw @li @c sw.a11y - accessibility @li @c sw.core - Writer core +@li @c sw.layout - Writer core view: document layout @li @c sw.createcopy @li @c sw.doc @li @c sw.docappend diff --git a/sw/source/core/layout/laycache.cxx b/sw/source/core/layout/laycache.cxx index 5903b7d4a4d0..4d0e4c24bd03 100644 --- a/sw/source/core/layout/laycache.cxx +++ b/sw/source/core/layout/laycache.cxx @@ -468,7 +468,7 @@ bool sanityCheckLayoutCache(SwLayCacheImpl const& rCache, auto const nBreakIndex(rCache.GetBreakIndex(nIndex)); if (nBreakIndex < nNodeIndex || nMaxIndex <= nBreakIndex) { -SAL_WARN("sw.core", +SAL_WARN("sw.layout", "invalid node index in layout-cache: " << nBreakIndex); return false; } @@ -478,7 +478,7 @@ bool sanityCheckLayoutCache(SwLayCacheImpl const& rCache, case SW_LAYCACHE_IO_REC_PARA: if (!rNodes[nBreakIndex + nStartOfContent]->IsTextNode()) { -SAL_WARN("sw.core", +SAL_WARN("sw.layout", "invalid node of type 'P' in layout-cache"); return false; } @@ -486,7 +486,7 @@ bool sanityCheckLayoutCache(SwLayCacheImpl const& rCache, case SW_LAYCACHE_IO_REC_TABLE: if (!rNodes[nBreakIndex + nStartOfContent]->IsTableNode()) { -SAL_WARN("sw.core", +SAL_WARN("sw.layout", "invalid node of type 'T' in layout-cache"); return false; } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: editeng/source
editeng/source/editeng/eehtml.cxx |1 - 1 file changed, 1 deletion(-) New commits: commit df039e89c5d2f8f3ccfaa0001885f3e532537fb6 Author: Julien Nabet Date: Sat Apr 1 18:48:32 2017 +0200 Remove DBG_ASSERT since it's always wrong Indeed EditHTMLParser constructor calls HTMLParser constructor, the last one calls "SetSrcEncoding(RTL_TEXTENCODING_UTF8);" Change-Id: If749674c3d4f2b9f9fccbf0b99f1e7d62fd0450d Reviewed-on: https://gerrit.libreoffice.org/36011 Tested-by: Jenkins Reviewed-by: Michael Stahl diff --git a/editeng/source/editeng/eehtml.cxx b/editeng/source/editeng/eehtml.cxx index 1d8c87c59598..06db8143e594 100644 --- a/editeng/source/editeng/eehtml.cxx +++ b/editeng/source/editeng/eehtml.cxx @@ -51,7 +51,6 @@ EditHTMLParser::EditHTMLParser( SvStream& rIn, const OUString& rBaseURL, SvKeyVa nInCell(0), nDefListLevel(0) { -DBG_ASSERT( RTL_TEXTENCODING_DONTKNOW == GetSrcEncoding( ), "EditHTMLParser::EditHTMLParser: Where does the encoding come from?" ); DBG_ASSERT( !IsSwitchToUCS2(), "EditHTMLParserEditHTMLParser: Switch to UCS2?" ); // Although the real default encoding is ISO8859-1, we use MS-1252 ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: editeng/source filter/source odk/examples reportdesign/source sd/source sfx2/sdi sfx2/source starmath/sdi starmath/source svl/source svtools/source toolkit/source tools
UnoControls/source/controls/progressbar.cxx |2 - UnoControls/source/controls/statusindicator.cxx |2 - editeng/source/items/paraitem.cxx|4 +- editeng/source/items/textitem.cxx|2 - filter/source/graphicfilter/idxf/dxfblkrd.hxx|4 +- odk/examples/cpp/complextoolbarcontrols/MyListener.h |9 ++ reportdesign/source/core/sdr/ReportDrawPage.cxx |2 - sd/source/filter/eppt/epptso.cxx |2 - sd/source/ui/dlg/navigatr.cxx|2 - sd/source/ui/dlg/tpoption.cxx|2 - sd/source/ui/unoidl/unopage.cxx |2 - sd/source/ui/view/outlview.cxx |2 - sd/source/ui/view/sdview2.cxx|2 - sfx2/sdi/frmslots.sdi|2 - sfx2/source/appl/appdispatchprovider.cxx |4 +- sfx2/source/bastyp/frmhtmlw.cxx |2 - sfx2/source/control/ctrlitem.cxx |3 -- sfx2/source/control/dispatch.cxx |4 +- sfx2/source/control/objface.cxx |4 +- sfx2/source/dialog/templdlg.cxx |2 - sfx2/source/doc/objembed.cxx |2 - sfx2/source/sidebar/DeckLayouter.cxx |4 +- starmath/sdi/smslots.sdi | 26 +-- starmath/source/dialog.cxx |2 - starmath/source/visitors.cxx |2 - svl/source/items/itempool.cxx|2 - svl/source/items/itemset.cxx |2 - svtools/source/contnr/svimpbox.cxx |2 - svtools/source/control/inettbc.cxx |2 - svtools/source/dialogs/insdlg.cxx|2 - svtools/source/inc/svimpbox.hxx |4 +- svtools/source/misc/unitconv.cxx |2 - svtools/source/svhtml/htmlout.cxx|2 - svtools/source/svhtml/parhtml.cxx|2 - svtools/source/svrtf/parrtf.cxx |2 - svtools/source/uno/unoiface.cxx |2 - toolkit/source/awt/vclxtoolkit.cxx |2 - toolkit/source/controls/stdtabcontroller.cxx |2 - toolkit/source/controls/unocontrolmodel.cxx |4 +- toolkit/source/controls/unocontrols.cxx | 10 +++ tools/source/rc/resmgr.cxx |2 - tools/source/ref/errinf.cxx | 10 +++ tools/source/stream/stream.cxx |2 - writerfilter/source/dmapper/PropertyMap.cxx |2 - xmloff/source/text/txtflde.cxx |2 - 45 files changed, 75 insertions(+), 79 deletions(-) New commits: commit 6b4a149a656b29d162b2190f1849dc779cba0b0a Author: Jens Carl Date: Sat Apr 1 04:49:52 2017 + tdf#39468 Translate German comments Translate German comments and terms in UnoControls/, editeng/, filter/, odk/, reportdesign/, sd/, sfx2/, starmath/, svl/, svtools/, toolkit/, tools/, writerfilter/, and xmloff/. Change-Id: Ibc401a425ddfdf41e4e4a78600f3fbce8cfaa2b1 Reviewed-on: https://gerrit.libreoffice.org/35992 Tested-by: Jenkins Reviewed-by: Michael Stahl diff --git a/UnoControls/source/controls/progressbar.cxx b/UnoControls/source/controls/progressbar.cxx index 99ae92d97d98..ceebf816199b 100644 --- a/UnoControls/source/controls/progressbar.cxx +++ b/UnoControls/source/controls/progressbar.cxx @@ -326,7 +326,7 @@ void ProgressBar::impl_paint ( sal_Int32 nX, sal_Int32 nY, const Reference< XGra // save impossible cases DBG_ASSERT ( rGraphics.is(), "ProgressBar::paint()\nCalled with invalid Reference< XGraphics > ." ); -// This paint method ist not buffered !! +// This paint method is not buffered !! // Every request paint the completely control. ( but only, if peer exist ) if ( rGraphics.is () ) { diff --git a/UnoControls/source/controls/statusindicator.cxx b/UnoControls/source/controls/statusindicator.cxx index 5b303f2a63f5..9d3f714bc2a9 100644 --- a/UnoControls/source/controls/statusindicator.cxx +++ b/UnoControls/source/controls/statusindicator.cxx @@ -392,7 +392,7 @@ WindowDescriptor* StatusIndicator::impl_getWindowDescriptor( const css::uno::Ref void StatusIndicator::impl_paint ( sal_Int32 nX, sal_Int32 nY, const css::uno::Reference< XGraphics > & rGraphics ) { -// This paint method ist not buffered !! +// This paint method is not buffered !! // Every request paint the completely control. ( but only, if peer exist ) if ( rGraphics.is () ) { diff --git a/editeng/source/items/paraitem.cxx b/editeng/source/items/paraitem.cxx index 2e10733ff142..b9e4a7e4ec3a 100644 --- a/editeng/source/items/para
[Libreoffice-commits] core.git: sw/source
sw/source/filter/ww8/ww8par.cxx | 16 +++- 1 file changed, 15 insertions(+), 1 deletion(-) New commits: commit aec5912b1377a36c68673b175fa8e2ad7673d2fa Author: Caolán McNamara Date: Mon Apr 3 16:41:24 2017 +0100 ofz: avoid oom Change-Id: Icbd4b98e8a0a4aff967bae22f3f59248ed40598a Reviewed-on: https://gerrit.libreoffice.org/36049 Tested-by: Jenkins Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx index 29aa054ad05a..eb7d6f9663a2 100644 --- a/sw/source/filter/ww8/ww8par.cxx +++ b/sw/source/filter/ww8/ww8par.cxx @@ -2951,6 +2951,20 @@ sal_Unicode SwWW8ImplReader::TranslateToHindiNumbers(sal_Unicode nChar) return nChar; } +namespace +{ +OUString makeOUString(rtl_uString *pStr, sal_Int32 nAllocLen) +{ +//if read len was in or around that of allocated len, just reuse pStr +if (nAllocLen < pStr->length + 256) +return OUString(pStr, SAL_NO_ACQUIRE); +//otherwise copy the shorter used section to release extra mem +OUString sRet(pStr->buffer, pStr->length); +rtl_uString_release(pStr); +return sRet; +} +} + /** * Return value: true for non special chars */ @@ -3125,7 +3139,7 @@ bool SwWW8ImplReader::ReadPlainChars(WW8_CP& rPos, sal_Int32 nEnd, sal_Int32 nCp pStr->buffer[nEndUsed] = 0; pStr->length = nEndUsed; -emulateMSWordAddTextToParagraph(OUString(pStr, SAL_NO_ACQUIRE)); +emulateMSWordAddTextToParagraph(makeOUString(pStr, nStrLen)); pStr = nullptr; rPos += nL2; if (!m_aApos.back()) // a para end in apo doesn't count ___ 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/ww8/ww8par.hxx |2 +- sw/source/filter/ww8/ww8par2.cxx | 29 - sw/source/filter/ww8/ww8struc.hxx |2 +- 3 files changed, 26 insertions(+), 7 deletions(-) New commits: commit 3feabd87ad8066b45b55d61cd72684e47fd79082 Author: Caolán McNamara Date: Mon Apr 3 20:36:06 2017 +0100 ofz: check anlv text bounds Change-Id: I6288aae2d439cde6a2b95c005a2090f73e21bb7a diff --git a/sw/source/filter/ww8/ww8par.hxx b/sw/source/filter/ww8/ww8par.hxx index 69a90a6dcbc5..85f090ffa515 100644 --- a/sw/source/filter/ww8/ww8par.hxx +++ b/sw/source/filter/ww8/ww8par.hxx @@ -1537,7 +1537,7 @@ private: // the corresponding structures are: LSTF, LVLF, LFO LFOLVL void SetAnlvStrings(SwNumFormat &rNum, WW8_ANLV const &rAV, const sal_uInt8* pText, -bool bOutline); +size_t nStart, size_t nElements, bool bOutline); void SetAnld(SwNumRule* pNumR, WW8_ANLD const * pAD, sal_uInt8 nSwLevel, bool bOutLine); void SetNumOlst( SwNumRule* pNumR, WW8_OLST* pO, sal_uInt8 nSwLevel ); SwNumRule* GetStyRule(); diff --git a/sw/source/filter/ww8/ww8par2.cxx b/sw/source/filter/ww8/ww8par2.cxx index a3888a2192f3..4687920445d3 100644 --- a/sw/source/filter/ww8/ww8par2.cxx +++ b/sw/source/filter/ww8/ww8par2.cxx @@ -678,8 +678,14 @@ static void SetBaseAnlv(SwNumFormat &rNum, WW8_ANLV const &rAV, sal_uInt8 nSwLev } void SwWW8ImplReader::SetAnlvStrings(SwNumFormat &rNum, WW8_ANLV const &rAV, -const sal_uInt8* pText, bool bOutline) +const sal_uInt8* pText, size_t nStart, size_t nElements, bool bOutline) { +if (nStart > nElements) +return; + +pText += nStart; +nElements -= nStart; + bool bInsert = false; // Default rtl_TextEncoding eCharSet = m_eStructCharSet; @@ -687,13 +693,26 @@ void SwWW8ImplReader::SetAnlvStrings(SwNumFormat &rNum, WW8_ANLV const &rAV, bool bListSymbol = pF && ( pF->chs == 2 ); // Symbol/WingDings/... OUString sText; +sal_uInt32 nLen = rAV.cbTextBefore + rAV.cbTextAfter; if (m_bVer67) { -sText = OUString(reinterpret_cast(pText), rAV.cbTextBefore + rAV.cbTextAfter, eCharSet); +if (nLen > nElements) +{ +SAL_WARN("sw.ww8", "SetAnlvStrings: ignoring out of range " +<< nLen << " vs " << nElements << " max"); +return; +} +sText = OUString(reinterpret_cast(pText), nLen, eCharSet); } else { -for(sal_Int32 i = 0; i < rAV.cbTextBefore + rAV.cbTextAfter; ++i, pText += 2) +if (nLen > nElements / 2) +{ +SAL_WARN("sw.ww8", "SetAnlvStrings: ignoring out of range " +<< nLen << " vs " << nElements / 2 << " max"); +return; +} +for(sal_uInt32 i = 0; i < nLen; ++i, pText += 2) { sText += OUStringLiteral1(SVBT16ToShort(*reinterpret_cast(pText))); } @@ -778,7 +797,7 @@ void SwWW8ImplReader::SetAnld(SwNumRule* pNumR, WW8_ANLD const * pAD, sal_uInt8 m_bAktAND_fNumberAcross = 0 != pAD->fNumberAcross; WW8_ANLV const &rAV = pAD->eAnlv; SetBaseAnlv(aNF, rAV, nSwLevel);// set the base format -SetAnlvStrings(aNF, rAV, pAD->rgchAnld, bOutLine ); // set the rest +SetAnlvStrings(aNF, rAV, pAD->rgchAnld, 0, SAL_N_ELEMENTS(pAD->rgchAnld), bOutLine); // set the rest } pNumR->Set(nSwLevel, aNF); } @@ -908,7 +927,7 @@ void SwWW8ImplReader::SetNumOlst(SwNumRule* pNumR, WW8_OLST* pO, sal_uInt8 nSwLe if (!m_bVer67) nTextOfs *= 2; -SetAnlvStrings(aNF, rAV, pO->rgch + nTextOfs, true); // and apply +SetAnlvStrings(aNF, rAV, pO->rgch, nTextOfs, SAL_N_ELEMENTS(pO->rgch), true); // and apply pNumR->Set(nSwLevel, aNF); } diff --git a/sw/source/filter/ww8/ww8struc.hxx b/sw/source/filter/ww8/ww8struc.hxx index 097391dde1e2..ba7768caac0b 100644 --- a/sw/source/filter/ww8/ww8struc.hxx +++ b/sw/source/filter/ww8/ww8struc.hxx @@ -649,7 +649,7 @@ struct WW8_ANLD sal_uInt8 fNumberAcross;// 0x11 number across cells in table rows(instead of down) sal_uInt8 fRestartHdn; // 0x12 restart heading number on section boundary sal_uInt8 fSpareX; // 0x13 unused( should be 0) -sal_uInt8 rgchAnld[32]; // 0x14 characters displayed before/after autonumber +sal_uInt8 rgchAnld[32]; // 0x14 characters displayed before/after autonumber }; struct WW8_OLST ___ 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/lwpidxmgr.cxx |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) New commits: commit 9aff1789e021c29ef819ad67776bab60e995bddc Author: Caolán McNamara Date: Fri Mar 3 09:44:24 2017 + ofz#721 use vector::at to check index Change-Id: I786b5d6fb10afe3ebb8482f999115fe72ffe2d4c Reviewed-on: https://gerrit.libreoffice.org/34851 Tested-by: Jenkins Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara diff --git a/lotuswordpro/source/filter/lwpidxmgr.cxx b/lotuswordpro/source/filter/lwpidxmgr.cxx index 7c03e8733b65..df8419c7e431 100644 --- a/lotuswordpro/source/filter/lwpidxmgr.cxx +++ b/lotuswordpro/source/filter/lwpidxmgr.cxx @@ -177,7 +177,7 @@ void LwpIndexManager::ReadObjIndexData(LwpObjectStream* pObjStrm) std::vector vObjIndexs; -if(KeyCount) +if (KeyCount) { LwpKey akey; akey.id.Read(pObjStrm); @@ -200,7 +200,7 @@ void LwpIndexManager::ReadObjIndexData(LwpObjectStream* pObjStrm) for( sal_uInt16 j=0; jGetStream()->Seek(nPos); if (nPos != nActualPos) ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] online.git: 3 commits - wsd/Admin.cpp wsd/Admin.hpp wsd/AdminModel.cpp wsd/AdminModel.hpp wsd/DocumentBroker.cpp wsd/DocumentBroker.hpp wsd/LOOLWSD.cpp
wsd/Admin.cpp | 36 - wsd/Admin.hpp |5 +--- wsd/AdminModel.cpp | 60 - wsd/AdminModel.hpp | 12 - wsd/DocumentBroker.cpp |7 - wsd/DocumentBroker.hpp |3 ++ wsd/LOOLWSD.cpp|7 - 7 files changed, 97 insertions(+), 33 deletions(-) New commits: commit 0806986c8cd8147b925aeb167ff0708fac6f9725 Author: Michael Meeks Date: Mon Apr 3 18:21:20 2017 +0100 Admin model locking - major cleanup. Do everything in the Admin Model in the AdminPoll thread. Everything else can push work there safely through callbacks. diff --git a/wsd/Admin.cpp b/wsd/Admin.cpp index 4ab3d821..78da7ac1 100644 --- a/wsd/Admin.cpp +++ b/wsd/Admin.cpp @@ -57,7 +57,6 @@ void AdminSocketHandler::handleMessage(bool /* fin */, WSOpCode /* code */, return; } -std::unique_lock modelLock(_admin->getLock()); AdminModel& model = _admin->getModel(); if (tokens[0] == "auth") @@ -262,14 +261,13 @@ bool AdminSocketHandler::handleInitialRequest( Admin &admin = Admin::instance(); auto handler = std::make_shared(&admin, socketWeak, request); socket->setHandler(handler); - -{ // FIXME: weird locking around subscribe ... -std::unique_lock modelLock(admin.getLock()); -// Subscribe the websocket of any AdminModel updates -AdminModel& model = admin.getModel(); +admin.addCallback([handler, sessionId] +{ +Admin &adminIn = Admin::instance(); +AdminModel& model = adminIn.getModel(); handler->_sessionId = sessionId; model.subscribe(sessionId, handler); -} +}); return true; } @@ -293,7 +291,6 @@ Admin::Admin() : { LOG_INF("Admin ctor."); -std::unique_lock modelLock(getLock()); const auto totalMem = getTotalMemoryUsage(); LOG_TRC("Total memory used: " << totalMem); _model.addMemStats(totalMem); @@ -308,6 +305,8 @@ void Admin::pollingThread() { std::chrono::steady_clock::time_point lastCPU, lastMem; +_model.setThreadOwner(std::this_thread::get_id()); + lastCPU = std::chrono::steady_clock::now(); lastMem = lastCPU; @@ -326,7 +325,6 @@ void Admin::pollingThread() std::chrono::duration_cast(now - lastCPU).count(); if (memWait <= 0) { -std::unique_lock modelLock(getLock()); const auto totalMem = getTotalMemoryUsage(); if (totalMem != _lastTotalMemory) { @@ -349,21 +347,20 @@ void Admin::pollingThread() void Admin::addDoc(const std::string& docKey, Poco::Process::PID pid, const std::string& filename, const std::string& sessionId) { -std::unique_lock modelLock(_modelMutex); -_model.addDocument(docKey, pid, filename, sessionId); +addCallback([this, docKey, pid, filename, sessionId] + { _model.addDocument(docKey, pid, filename, sessionId); }); } void Admin::rmDoc(const std::string& docKey, const std::string& sessionId) { -std::unique_lock modelLock(_modelMutex); -_model.removeDocument(docKey, sessionId); +addCallback([this, docKey, sessionId] + { _model.removeDocument(docKey, sessionId); }); } void Admin::rmDoc(const std::string& docKey) { -std::unique_lock modelLock(_modelMutex); LOG_INF("Removing complete doc [" << docKey << "] from Admin."); -_model.removeDocument(docKey); +addCallback([this, docKey]{ _model.removeDocument(docKey); }); } void Admin::rescheduleMemTimer(unsigned interval) @@ -382,8 +379,6 @@ void Admin::rescheduleCpuTimer(unsigned interval) unsigned Admin::getTotalMemoryUsage() { -Util::assertIsLocked(_modelMutex); - // To simplify and clarify this; since load, link and pre-init all // inside the forkit - we should account all of our fixed cost of // memory to the forkit; and then count only dirty pages in the clients @@ -413,14 +408,13 @@ AdminModel& Admin::getModel() void Admin::updateLastActivityTime(const std::string& docKey) { -std::unique_lock modelLock(_modelMutex); -_model.updateLastActivityTime(docKey); +addCallback([this, docKey]{ _model.updateLastActivityTime(docKey); }); } void Admin::updateMemoryDirty(const std::string& docKey, int dirty) { -std::unique_lock modelLock(_modelMutex); -_model.updateMemoryDirty(docKey, dirty); +addCallback([this, docKey, dirty] + { _model.updateMemoryDirty(docKey, dirty); }); } void Admin::dumpState(std::ostream& os) diff --git a/wsd/Admin.hpp b/wsd/Admin.hpp index a816b636..033619a7 100644 --- a/wsd/Admin.hpp +++ b/wsd/Admin.hpp @@ -96,16 +96,15 @@ public: void rescheduleCpuTimer(unsigned interval); -std::unique_lock getLock() { return std::unique_lock(_modelMutex); } - void updateLastActivityTime(const std::string& docKey); void up
[Libreoffice-commits] core.git: Branch 'libreoffice-5-3' - comphelper/qa comphelper/source include/comphelper sw/source
comphelper/qa/string/test_string.cxx | 22 + comphelper/source/misc/string.cxx| 36 +++ include/comphelper/string.hxx|9 sw/source/filter/ascii/ascatr.cxx| 12 +++ 4 files changed, 79 insertions(+) New commits: commit 5254a7d1cbf3f62c6664299752d2788bb4f2a0b4 Author: Michael Stahl Date: Wed Mar 29 16:43:23 2017 +0200 sw: plain-text ASCII export: filter out all CH_TXT_ATR_* These control characters are Writer implementation details and should not be available via public interfaces. This filter is also used by SwXTextRange::getString(). Change-Id: If656ee3d451dbefe2f7a905e8b63a44cdb787809 (cherry picked from commit ab4f53eaad0c064d9b2ff1c2cb20560f81ade1f7) Reviewed-on: https://gerrit.libreoffice.org/35862 Tested-by: Jenkins Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara diff --git a/comphelper/qa/string/test_string.cxx b/comphelper/qa/string/test_string.cxx index 636c30587370..b36b7988489f 100644 --- a/comphelper/qa/string/test_string.cxx +++ b/comphelper/qa/string/test_string.cxx @@ -43,6 +43,7 @@ public: void testIsdigitAsciiString(); void testReverseString(); void testSplit(); +void testRemoveAny(); CPPUNIT_TEST_SUITE(TestString); CPPUNIT_TEST(testNatural); @@ -55,6 +56,7 @@ public: CPPUNIT_TEST(testIsdigitAsciiString); CPPUNIT_TEST(testReverseString); CPPUNIT_TEST(testSplit); +CPPUNIT_TEST(testRemoveAny); CPPUNIT_TEST_SUITE_END(); }; @@ -390,6 +392,26 @@ void TestString::testSplit() CPPUNIT_ASSERT_EQUAL(OUString("F1"), aRet[2]); } +void TestString::testRemoveAny() +{ +using namespace ::comphelper::string; +OUString in("abcAAAbbC"); +sal_Unicode const test1 [] = { 'a', 0 }; +CPPUNIT_ASSERT_EQUAL(OUString("bcAAAbbC"), removeAny(in, test1)); +sal_Unicode const test2 [] = { 0 }; +CPPUNIT_ASSERT_EQUAL(in, removeAny(in, test2)); +sal_Unicode const test3 [] = { 'A', 0 }; +CPPUNIT_ASSERT_EQUAL(OUString("abcbbC"), removeAny(in, test3)); +sal_Unicode const test4 [] = { 'A', 'a', 0 }; +CPPUNIT_ASSERT_EQUAL(OUString("bcbbC"), removeAny(in, test4)); +sal_Unicode const test5 [] = { 'C', 0 }; +CPPUNIT_ASSERT_EQUAL(OUString("abcAAAbb"), removeAny(in, test5)); +sal_Unicode const test6 [] = { 'X', 0 }; +CPPUNIT_ASSERT_EQUAL(in, removeAny(in, test6)); +sal_Unicode const test7 [] = { 'A', 'B', 'C', 'a', 'b', 'c', 0 }; +CPPUNIT_ASSERT_EQUAL(OUString(""), removeAny(in, test7)); +} + CPPUNIT_TEST_SUITE_REGISTRATION(TestString); } diff --git a/comphelper/source/misc/string.cxx b/comphelper/source/misc/string.cxx index db035eb22967..5ca35f9eb535 100644 --- a/comphelper/source/misc/string.cxx +++ b/comphelper/source/misc/string.cxx @@ -420,6 +420,42 @@ sal_Int32 indexOfAny(OUString const& rIn, return -1; } +OUString removeAny(OUString const& rIn, +sal_Unicode const*const pChars) +{ +OUStringBuffer buf; +bool isFound(false); +for (sal_Int32 i = 0; i < rIn.getLength(); ++i) +{ +sal_Unicode const c = rIn[i]; +bool removeC(false); +for (sal_Unicode const* pChar = pChars; *pChar; ++pChar) +{ +if (c == *pChar) +{ +removeC = true; +break; +} +} +if (removeC) +{ +if (!isFound) +{ +if (i > 0) +{ +buf.append(rIn.copy(0, i)); +} +isFound = true; +} +} +else if (isFound) +{ +buf.append(c); +} +} +return (isFound) ? buf.makeStringAndClear() : rIn; +} + OUString setToken(const OUString& rIn, sal_Int32 nToken, sal_Unicode cTok, const OUString& rNewToken) { diff --git a/include/comphelper/string.hxx b/include/comphelper/string.hxx index 8aab4f12eddf..7934a6b6d7cf 100644 --- a/include/comphelper/string.hxx +++ b/include/comphelper/string.hxx @@ -255,6 +255,15 @@ COMPHELPER_DLLPUBLIC OUString setToken(const OUString& rIn, sal_Int32 nToken, sa COMPHELPER_DLLPUBLIC sal_Int32 indexOfAny(OUString const& rIn, sal_Unicode const*const pChars, sal_Int32 const nPos); +/** Remove any of a list of code units in the string. +@param rIn OUString to search +@param pChars 0-terminated array of sal_Unicode code units to search for + +@return OUString that has all of the pChars code units removed + */ +COMPHELPER_DLLPUBLIC OUString removeAny(OUString const& rIn, +sal_Unicode const*const pChars); + /** Convert a sequence of strings to a single comma separated string. Note that no escaping of commas or anything fancy is done. diff --git a/sw/source/filter/ascii/ascatr.cxx b/sw/source/filter/ascii/ascatr.cxx index 4c0037a992c7..01c1caf673f7 100644 --- a/sw/source/filter/ascii/ascatr.cxx +++
[Libreoffice-commits] core.git: Branch 'libreoffice-5-3' - external/libcmis
external/libcmis/UnpackedTarball_cmis.mk |1 external/libcmis/libcmis-fix-google-drive-2.patch | 125 ++ 2 files changed, 126 insertions(+) New commits: commit 9700ba82ab907ae0c1ea1ca2a6e0d9a7347e Author: Szymon KÅos Date: Wed Mar 29 21:36:57 2017 +0200 tdf#98416 libcmis: Google Drive 2FA fix Change-Id: Ice6758d8e9bc0ece57e038561376e7a6d67ab616 Reviewed-on: https://gerrit.libreoffice.org/35880 Reviewed-by: David Tardon Tested-by: David Tardon (cherry picked from commit 8d1a56c206e5c2ed6c331049198bb8ebc6176171) Reviewed-on: https://gerrit.libreoffice.org/35904 Tested-by: Jenkins Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara diff --git a/external/libcmis/UnpackedTarball_cmis.mk b/external/libcmis/UnpackedTarball_cmis.mk index 8fb247fb87aa..0b76efd254a1 100644 --- a/external/libcmis/UnpackedTarball_cmis.mk +++ b/external/libcmis/UnpackedTarball_cmis.mk @@ -17,6 +17,7 @@ $(eval $(call gb_UnpackedTarball_add_patches,cmis, \ external/libcmis/libcmis-libxml2_compatibility.patch \ external/libcmis/libcmis-fix-google-drive.patch \ external/libcmis/libcmis-google-2FA-implementation.patch \ + external/libcmis/libcmis-fix-google-drive-2.patch \ external/libcmis/libcmis-sharepoint-repository-root.patch \ )) diff --git a/external/libcmis/libcmis-fix-google-drive-2.patch b/external/libcmis/libcmis-fix-google-drive-2.patch new file mode 100755 index ..7d11514d82ee --- /dev/null +++ b/external/libcmis/libcmis-fix-google-drive-2.patch @@ -0,0 +1,125 @@ +diff --git a/src/libcmis/oauth2-providers.cxx b/src/libcmis/oauth2-providers.cxx +index 74c0fec..30fedb0 100644 +--- a/src/libcmis/oauth2-providers.cxx b/src/libcmis/oauth2-providers.cxx +@@ -41,6 +41,7 @@ + #define CHALLENGE_PAGE_ACTION_LEN sizeof( CHALLENGE_PAGE_ACTION ) - 1 + #define PIN_FORM_ACTION "/signin/challenge/ipp" + #define PIN_FORM_ACTION_LEN sizeof( PIN_FORM_ACTION ) - 1 ++#define PIN_INPUT_NAME "Pin" + + using namespace std; + +@@ -80,7 +81,7 @@ string OAuth2Providers::OAuth2Gdrive( HttpSession* session, const string& authUr + // send the first get, receive the html login page + res = session->httpGetRequest( authUrl )->getStream( )->str( ); + } +-catch ( const CurlException& e ) ++catch ( const CurlException& ) + { + return string( ); + } +@@ -102,7 +103,7 @@ string OAuth2Providers::OAuth2Gdrive( HttpSession* session, const string& authUr + loginEmailRes = session->httpPostRequest ( loginEmailLink, loginEmailIs, CONTENT_TYPE ) + ->getStream( )->str( ); + } +-catch ( const CurlException& e ) ++catch ( const CurlException& ) + { + return string( ); + } +@@ -113,7 +114,7 @@ string OAuth2Providers::OAuth2Gdrive( HttpSession* session, const string& authUr + if ( !parseResponse( loginEmailRes.c_str( ), loginPasswdPost, loginPasswdLink ) ) + return string( ); + +-loginPasswdPost += "&Passwd="; ++loginPasswdPost += "Passwd="; + loginPasswdPost += string( password ); + + istringstream loginPasswdIs( loginPasswdPost ); +@@ -124,7 +125,7 @@ string OAuth2Providers::OAuth2Gdrive( HttpSession* session, const string& authUr + loginPasswdRes = session->httpPostRequest ( loginPasswdLink, loginPasswdIs, CONTENT_TYPE ) + ->getStream( )->str( ); + } +-catch ( const CurlException& e ) ++catch ( const CurlException& ) + { + return string( ); + } +@@ -152,7 +153,7 @@ string OAuth2Providers::OAuth2Gdrive( HttpSession* session, const string& authUr + } + + loginChallengeLink = "https://accounts.google.com"; + loginChallengeLink; +-loginChallengePost += "Pin="; ++loginChallengePost += string( PIN_INPUT_NAME ) + "="; + loginChallengePost += string( pin ); + + istringstream loginChallengeIs( loginChallengePost ); +@@ -163,7 +164,7 @@ string OAuth2Providers::OAuth2Gdrive( HttpSession* session, const string& authUr + loginChallengeRes = session->httpPostRequest ( loginChallengeLink, loginChallengeIs, CONTENT_TYPE ) + ->getStream( )->str( ); + } +-catch ( const CurlException& e ) ++catch ( const CurlException& ) + { + return string( ); + } +@@ -221,7 +222,7 @@ string OAuth2Providers::OAuth2Alfresco( HttpSession* session, const string& auth + { + res = session->httpGetRequest( authUrl )->getStream( )->str( ); + } +-catch ( const CurlException& e ) ++catch ( const CurlException& ) + { + return string( ); + } +@@ -247,7 +248,7 @@ string OAuth
[Libreoffice-commits] core.git: Branch 'libreoffice-5-2' - external/libcmis
external/libcmis/UnpackedTarball_cmis.mk |1 external/libcmis/libcmis-fix-google-drive-2.patch | 125 ++ 2 files changed, 126 insertions(+) New commits: commit f3049d26625e008fa11a275940998662b6d3d1d6 Author: Szymon KÅos Date: Wed Mar 29 21:36:57 2017 +0200 tdf#98416 libcmis: Google Drive 2FA fix Change-Id: Ice6758d8e9bc0ece57e038561376e7a6d67ab616 Reviewed-on: https://gerrit.libreoffice.org/35880 Reviewed-by: David Tardon Tested-by: David Tardon (cherry picked from commit 8d1a56c206e5c2ed6c331049198bb8ebc6176171) Reviewed-on: https://gerrit.libreoffice.org/35929 Tested-by: Jenkins Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara diff --git a/external/libcmis/UnpackedTarball_cmis.mk b/external/libcmis/UnpackedTarball_cmis.mk index 8fb247fb87aa..0b76efd254a1 100644 --- a/external/libcmis/UnpackedTarball_cmis.mk +++ b/external/libcmis/UnpackedTarball_cmis.mk @@ -17,6 +17,7 @@ $(eval $(call gb_UnpackedTarball_add_patches,cmis, \ external/libcmis/libcmis-libxml2_compatibility.patch \ external/libcmis/libcmis-fix-google-drive.patch \ external/libcmis/libcmis-google-2FA-implementation.patch \ + external/libcmis/libcmis-fix-google-drive-2.patch \ external/libcmis/libcmis-sharepoint-repository-root.patch \ )) diff --git a/external/libcmis/libcmis-fix-google-drive-2.patch b/external/libcmis/libcmis-fix-google-drive-2.patch new file mode 100755 index ..7d11514d82ee --- /dev/null +++ b/external/libcmis/libcmis-fix-google-drive-2.patch @@ -0,0 +1,125 @@ +diff --git a/src/libcmis/oauth2-providers.cxx b/src/libcmis/oauth2-providers.cxx +index 74c0fec..30fedb0 100644 +--- a/src/libcmis/oauth2-providers.cxx b/src/libcmis/oauth2-providers.cxx +@@ -41,6 +41,7 @@ + #define CHALLENGE_PAGE_ACTION_LEN sizeof( CHALLENGE_PAGE_ACTION ) - 1 + #define PIN_FORM_ACTION "/signin/challenge/ipp" + #define PIN_FORM_ACTION_LEN sizeof( PIN_FORM_ACTION ) - 1 ++#define PIN_INPUT_NAME "Pin" + + using namespace std; + +@@ -80,7 +81,7 @@ string OAuth2Providers::OAuth2Gdrive( HttpSession* session, const string& authUr + // send the first get, receive the html login page + res = session->httpGetRequest( authUrl )->getStream( )->str( ); + } +-catch ( const CurlException& e ) ++catch ( const CurlException& ) + { + return string( ); + } +@@ -102,7 +103,7 @@ string OAuth2Providers::OAuth2Gdrive( HttpSession* session, const string& authUr + loginEmailRes = session->httpPostRequest ( loginEmailLink, loginEmailIs, CONTENT_TYPE ) + ->getStream( )->str( ); + } +-catch ( const CurlException& e ) ++catch ( const CurlException& ) + { + return string( ); + } +@@ -113,7 +114,7 @@ string OAuth2Providers::OAuth2Gdrive( HttpSession* session, const string& authUr + if ( !parseResponse( loginEmailRes.c_str( ), loginPasswdPost, loginPasswdLink ) ) + return string( ); + +-loginPasswdPost += "&Passwd="; ++loginPasswdPost += "Passwd="; + loginPasswdPost += string( password ); + + istringstream loginPasswdIs( loginPasswdPost ); +@@ -124,7 +125,7 @@ string OAuth2Providers::OAuth2Gdrive( HttpSession* session, const string& authUr + loginPasswdRes = session->httpPostRequest ( loginPasswdLink, loginPasswdIs, CONTENT_TYPE ) + ->getStream( )->str( ); + } +-catch ( const CurlException& e ) ++catch ( const CurlException& ) + { + return string( ); + } +@@ -152,7 +153,7 @@ string OAuth2Providers::OAuth2Gdrive( HttpSession* session, const string& authUr + } + + loginChallengeLink = "https://accounts.google.com"; + loginChallengeLink; +-loginChallengePost += "Pin="; ++loginChallengePost += string( PIN_INPUT_NAME ) + "="; + loginChallengePost += string( pin ); + + istringstream loginChallengeIs( loginChallengePost ); +@@ -163,7 +164,7 @@ string OAuth2Providers::OAuth2Gdrive( HttpSession* session, const string& authUr + loginChallengeRes = session->httpPostRequest ( loginChallengeLink, loginChallengeIs, CONTENT_TYPE ) + ->getStream( )->str( ); + } +-catch ( const CurlException& e ) ++catch ( const CurlException& ) + { + return string( ); + } +@@ -221,7 +222,7 @@ string OAuth2Providers::OAuth2Alfresco( HttpSession* session, const string& auth + { + res = session->httpGetRequest( authUrl )->getStream( )->str( ); + } +-catch ( const CurlException& e ) ++catch ( const CurlException& ) + { + return string( ); + } +@@ -247,7 +248,7 @@ string OAuth
[Libreoffice-commits] core.git: sc/source
sc/source/ui/drawfunc/fuins2.cxx |8 sc/source/ui/unoobj/appluno.cxx | 22 +- sc/source/ui/unoobj/cellsuno.cxx | 327 +++ 3 files changed, 177 insertions(+), 180 deletions(-) New commits: commit 646e52adf4a84ca5beab7bae1e1fae4e793c4896 Author: Jens Carl Date: Sat Apr 1 23:58:02 2017 + tdf#39468 Translate German comments Translate German comments and terms in sc/source Change-Id: I8d1fa7c2d07512376ad186c55a13322b6219237f Reviewed-on: https://gerrit.libreoffice.org/36015 Reviewed-by: Michael Stahl Tested-by: Michael Stahl diff --git a/sc/source/ui/drawfunc/fuins2.cxx b/sc/source/ui/drawfunc/fuins2.cxx index f4859a00fe59..24ec7c723205 100644 --- a/sc/source/ui/drawfunc/fuins2.cxx +++ b/sc/source/ui/drawfunc/fuins2.cxx @@ -518,8 +518,8 @@ FuInsertChart::FuInsertChart(ScTabViewShell* pViewSh, vcl::Window* pWin, ScDrawV nToTable = static_cast(pItem)->GetValue(); else if ( dynamic_cast( pItem) != nullptr ) { -// in der idl fuer Basic steht FN_PARAM_4 als SfxBoolItem -// -> wenn gesetzt, neue Tabelle, sonst aktuelle Tabelle +// In IDL for Basic FN_PARAM_4 means SfxBoolItem +// -> if set new table, else current table if ( static_cast(pItem)->GetValue() ) nToTable = static_cast(rScDoc.GetTableCount()); @@ -534,10 +534,10 @@ FuInsertChart::FuInsertChart(ScTabViewShell* pViewSh, vcl::Window* pWin, ScDrawV rReq.AppendItem( SfxUInt16Item( FN_PARAM_4, nToTable ) ); } -// auf neue Tabelle ausgeben? +// Output on new table? if ( nToTable == rScDoc.GetTableCount() ) { -// dann los... +// Let's go... OUString aTabName; SCTAB nNewTab = rScDoc.GetTableCount(); diff --git a/sc/source/ui/unoobj/appluno.cxx b/sc/source/ui/unoobj/appluno.cxx index 1f66a019abc7..420570abfea3 100644 --- a/sc/source/ui/unoobj/appluno.cxx +++ b/sc/source/ui/unoobj/appluno.cxx @@ -42,20 +42,20 @@ using namespace com::sun::star; -// Anzahl der Funktionen, die als zuletzt benutzt gespeichert werden -//! Define mit funcpage.hxx und dwfunctr.hxx zusammenfassen !!! +// Number of last used functions, which are saved +//! Combine define with funcpage.hxx and dwfunctr.hxx !!! #define LRU_MAX 10 -// Spezial-Werte fuer Zoom -//! irgendwo zentral +// Special value for zoom +//! somewhere central #define SC_ZOOMVAL_OPTIMAL (-1) #define SC_ZOOMVAL_WHOLEPAGE(-2) #define SC_ZOOMVAL_PAGEWIDTH(-3) -// Anzahl der PropertyValues in einer Function-Description +// Number of PropertyValues in a function description #define SC_FUNCDESC_PROPCOUNT 5 -// alles ohne Which-ID, Map nur fuer PropertySetInfo +// everything without Which-ID, map only for PropertySetInfo static const SfxItemPropertyMapEntry* lcl_GetSettingsPropertyMap() { @@ -345,10 +345,10 @@ void SAL_CALL ScSpreadsheetSettings::setPropertyValue( uno::Sequence aSeq; if ( pUserList && ( aValue >>= aSeq ) ) { -// es wird direkt die "lebende" Liste veraendert, -// mehr tut ScGlobal::SetUserList auch nicht +// directly change the active list +// ScGlobal::SetUseTabCol does not do much else -pUserList->clear(); // alle Eintraege raus +pUserList->clear(); sal_uInt16 nCount = (sal_uInt16)aSeq.getLength(); const OUString* pAry = aSeq.getConstArray(); for (sal_uInt16 i=0; ipush_back(pData); } -bSaveApp = true;// Liste wird mit den App-Optionen gespeichert +bSaveApp = true;// List with App-Options are saved } } else if (aPropertyName == SC_UNONAME_PRALLSH) @@ -490,7 +490,7 @@ void SAL_CALL ScRecentFunctionsObj::setRecentFunctionIds( std::unique_ptr pFuncs(nCount ? new sal_uInt16[nCount] : nullptr); for (sal_uInt16 i=0; iGetAppOptions()); diff --git a/sc/source/ui/unoobj/cellsuno.cxx b/sc/source/ui/unoobj/cellsuno.cxx index 81f713ab645d..0c597a82934e 100644 --- a/sc/source/ui/unoobj/cellsuno.cxx +++ b/sc/source/ui/unoobj/cellsuno.cxx @@ -3005,9 +3005,9 @@ ScMemChart* ScCellRangesBase::CreateMemChart_Impl() const ScRangeListRef xChartRanges; if ( aRanges.size() == 1 ) { -// ganze Tabelle sinnvoll begrenzen (auf belegten Datenbereich) -// (nur hier, Listener werden auf den ganzen Bereich angemeldet) -//! direkt testen, ob es ein ScTableSheetObj ist? +// set useful table limit (only occupied data area) +// (only here - Listeners are registered for the whole area) +//! check immediately if a ScTableSheetObj? const ScRange* pRange = aRanges[0]; if ( pRange->aStart.Col()
[Libreoffice-commits] online.git: test/run_unit.sh.in
test/run_unit.sh.in |7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) New commits: commit 23bf026a639b357d506e5d2b867992081a1e9998 Author: Michael Meeks Date: Mon Apr 3 21:50:09 2017 +0100 old style unit tests: re-direct output to log file & add --verbose. diff --git a/test/run_unit.sh.in b/test/run_unit.sh.in index df6fb155..dc1d4021 100755 --- a/test/run_unit.sh.in +++ b/test/run_unit.sh.in @@ -13,6 +13,7 @@ enable_debug="@ENABLE_DEBUG@" jails_path="@JAILS_PATH@" lo_path="@LO_PATH@" valgrind_cmd="valgrind --tool=memcheck --trace-children=no -v --read-var-info=yes" +hide_stderr='2>/dev/null' # Note that these options are used by commands in the Makefile that # Automake generates. Don't be mislead by 'git grep' not showing any @@ -25,13 +26,14 @@ while test $# -gt 0; do --log-file) tst_log=$2; shift;; --trs-file) test_output=$2; shift;; --valgrind) valgrind=$valgrind_cmd; shift;; + --verbose) hide_stderr="";; -*) ;; # ignore esac shift done echo -echo "Running $tst" +echo "Running ${tst}" echo " $cmd_line" # drop .la suffix @@ -73,6 +75,7 @@ if test "z$tst" == "z"; then --o:child_root_path="$jails_path" \ --o:storage.filesystem[@allow]=true \ --o:logging.level=trace \ +--o:logging.file[@enable]=false \ --o:ssl.key_file_path="${abs_top_builddir}/etc/key.pem" \ --o:ssl.cert_file_path="${abs_top_builddir}/etc/cert.pem" \ --o:ssl.ca_file_path="${abs_top_builddir}/etc/ca-chain.cert.pem" \ @@ -82,7 +85,7 @@ if test "z$tst" == "z"; then oldpath=`pwd` cd "${abs_top_builddir}/test" - if ${valgrind} ./test; then + if eval ${valgrind} ./test ${hide_stderr}; then echo "Test run_test.sh passed." echo ":test-result: PASS run_test.sh" >> $oldpath/$test_output retval=0 ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
Unix-based systems not using CUPS
I have been going over our Unix printing classes to understand them better for my online book, Inside LibreOffice (found here and very much under construction - https://www.gitbook.com/book/chrissherlock1/inside-libreoffice/details) The implementation of the Unix printing subsystem is under the psp namespace, which I believe implements the psprint printing system - at least according to this document on the OpenOffice website: https://www.openoffice.org/gsl/psprint/ And I quote: > StarOffice 5.2 (and earlier) relied on a thirdparty solution for printing. > This solution could of course not be open sourced as it was a commercial > product. So when StarOffice became OpenOffice there was no printing possible > at all on the Unix platforms; just a wrapper was provided that contained > stubs fitting the missing symbols left in vcl. A new print solution was > desperately needed, so a variety of existing print solutions were examined, > the most notable of which were gnome-print and Xprint. Gnome-print did not > really fit into OpenOffice.org, since it would require to link against a huge > amount of other gnome libraries, too, which is unacceptable for > OpenOffice.org, because we want to run on many desktops. Xprint was designed > as a standard Unix print solution and has many advantages: code for the > display would work exactly the same way on the printer. A proof of concept > version was created by Martin Maher and Oisin Boydell with help from Hamburg > and the US which made it into OpenOffice.org as a temporary solution to have > minimal print support on Unix. But Xprint in its current state misses many > features that become increasingly important: fast character metric handling, > access to glyph substitution tables, easy configurability on a per user basis > just to name a few. Also one cannot really say that it has become the > standard solution for printing on Unix yet; in fact only recently it was > awakened from its long beauty sleep having its major bugs fixed so it is now > useable. > > This led to the decision that as long as there is no standard solution > scratching a sufficient number of our itches OpenOffice.org should do like > everyone else and produce its own PostScript code. Hence psprint entered the > game. PrinterInfoManager seems to be the class that does all the management. However, there is now a CUPSManager. I was wondering what other systems the PrinterInfoManager now caters for? I think it currently just uses lpr to do printing, but t I may be wrong. However, now that CUPS is pretty much standardised on mostly everything - including, it appears, on an increasing number of *BSD systems - is psprint still required for systems that are sticking with lpr? Chris Sent from my iPhone___ LibreOffice mailing list LibreOffice@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice
Re: Unix-based systems not using CUPS
On Tue, Apr 04, 2017 at 09:31:55AM +1000, Chris Sherlock wrote: > > However, now that CUPS is pretty much standardised on mostly > everything - including, it appears, on an increasing number of *BSD > systems - is psprint still required for systems that are sticking with > lpr? My understanding (and I may pretty much be wrong, the code is convoluted to death) is that most of psprint deals with printing using PostScript and when printing with PDF most of it is skipped. PDF printing is the default and not even easy to change in recent versions, but that looks like a bug. I believe we can kill PostScript printing and most of psprint with it and nothing of value will be lost. Regards, Khaled ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice
[Libreoffice-commits] core.git: starmath/inc starmath/qa starmath/source
starmath/inc/parse.hxx |4 +-- starmath/qa/cppunit/test_parse.cxx | 31 starmath/source/parse.cxx | 46 - 3 files changed, 48 insertions(+), 33 deletions(-) New commits: commit 1a1d1a86e9129ec3885610b641179b30f9bf5e79 Author: Takeshi Abe Date: Sat Mar 25 17:52:46 2017 +0900 starmath: Simplify code parsing nospace This also comes with its unit test. Change-Id: I1478bf48c5522691978e3534c9c8a9c0ddfc1e59 Reviewed-on: https://gerrit.libreoffice.org/35985 Tested-by: Jenkins Reviewed-by: Takeshi Abe diff --git a/starmath/inc/parse.hxx b/starmath/inc/parse.hxx index 43b84bab221c..4911e8516a81 100644 --- a/starmath/inc/parse.hxx +++ b/starmath/inc/parse.hxx @@ -63,7 +63,7 @@ class SmParser // grammar SmTableNode *DoTable(); voidDoLine(); -SmNode *DoExpression(); +SmNode *DoExpression(bool bUseExtraSpaces = true); SmNode *DoRelation(); SmNode *DoSum(); SmNode *DoProduct(); @@ -76,7 +76,7 @@ class SmParser SmOperNode *DoOperator(); SmNode *DoOper(); SmStructureNode *DoUnOper(); -SmNode *DoAlign(); +SmNode *DoAlign(bool bUseExtraSpaces = true); SmStructureNode *DoFontAttribut(); SmAttributNode *DoAttribut(); SmStructureNode *DoFont(); diff --git a/starmath/qa/cppunit/test_parse.cxx b/starmath/qa/cppunit/test_parse.cxx index 80da700be4cc..4e7198e5db0e 100644 --- a/starmath/qa/cppunit/test_parse.cxx +++ b/starmath/qa/cppunit/test_parse.cxx @@ -33,9 +33,11 @@ public: private: void testMinus(); +void testNospace(); CPPUNIT_TEST_SUITE(ParseTest); CPPUNIT_TEST(testMinus); +CPPUNIT_TEST(testNospace); CPPUNIT_TEST_SUITE_END(); SmDocShellRef mxDocShell; @@ -90,6 +92,35 @@ void ParseTest::testMinus() static_cast(pNode001)->GetToken().aText); } +/* + * This shows that "nospace" turns off the expression's IsUseExtraSpaces(), + * but leaves its decendants' flag on. + */ +void ParseTest::testNospace() +{ +std::unique_ptr pNode(SmParser().Parse("nospace{ nitalic d {F(x) G(x)} }")); +CPPUNIT_ASSERT_EQUAL(sal_uInt16(1), pNode->GetNumSubNodes()); +const SmNode *pNode0 = pNode->GetSubNode(0); +CPPUNIT_ASSERT(pNode0); +CPPUNIT_ASSERT_EQUAL(NLINE, pNode0->GetType()); +CPPUNIT_ASSERT_EQUAL(sal_uInt16(1), pNode0->GetNumSubNodes()); +const SmNode *pNode00 = pNode0->GetSubNode(0); +CPPUNIT_ASSERT(pNode00); +CPPUNIT_ASSERT_EQUAL(NEXPRESSION, pNode00->GetType()); +CPPUNIT_ASSERT(!static_cast(pNode00)->IsUseExtraSpaces()); +CPPUNIT_ASSERT_EQUAL(sal_uInt16(2), pNode00->GetNumSubNodes()); +const SmNode *pNode000 = pNode00->GetSubNode(0); +CPPUNIT_ASSERT(pNode000); +CPPUNIT_ASSERT_EQUAL(NFONT, pNode000->GetType()); +CPPUNIT_ASSERT_EQUAL(OUString("nitalic"), + static_cast(pNode000)->GetToken().aText); +const SmNode *pNode001 = pNode00->GetSubNode(1); +CPPUNIT_ASSERT(pNode001); +CPPUNIT_ASSERT_EQUAL(NEXPRESSION, pNode001->GetType()); +CPPUNIT_ASSERT(static_cast(pNode001)->IsUseExtraSpaces()); +CPPUNIT_ASSERT_EQUAL(sal_uInt16(2), pNode00->GetNumSubNodes()); +} + CPPUNIT_TEST_SUITE_REGISTRATION(ParseTest); } diff --git a/starmath/source/parse.cxx b/starmath/source/parse.cxx index 9e423e1a7f17..1a2418314178 100644 --- a/starmath/source/parse.cxx +++ b/starmath/source/parse.cxx @@ -963,7 +963,7 @@ SmTableNode *SmParser::DoTable() return pSNode.release(); } -SmNode *SmParser::DoAlign() +SmNode *SmParser::DoAlign(bool bUseExtraSpaces) // parse alignment info (if any), then go on with rest of expression { std::unique_ptr pSNode; @@ -979,7 +979,7 @@ SmNode *SmParser::DoAlign() return DoError(SmParseError::DoubleAlign); } -std::unique_ptr pNode(DoExpression()); +std::unique_ptr pNode(DoExpression(bUseExtraSpaces)); if (pSNode) { @@ -1017,18 +1017,8 @@ void SmParser::DoLine() m_aNodeStack.push_front(std::move(pSNode)); } -SmNode *SmParser::DoExpression() +SmNode *SmParser::DoExpression(bool bUseExtraSpaces) { -bool bUseExtraSpaces = true; -if (!m_aNodeStack.empty()) -{ -if (m_aNodeStack.front()->GetToken().eType == TNOSPACE) -{ -m_aNodeStack.pop_front(); -bUseExtraSpaces = false; -} -} - SmNodeArray RelationArray; RelationArray.push_back(DoRelation()); while (m_aCurToken.nLevel >= 4) @@ -1273,37 +1263,31 @@ SmNode *SmParser::DoTerm(bool bGroupNumberIdent) case TLGROUP : { bool bNoSpace = m_aCurToken.eType == TNOSPACE; -if (bNoSpace) // push 'no space' node and continue to parse expression -{ - m_aNodeStack.push_front(o3tl::make_unique(m_aCurToken)); +if (bNoSpace) NextToken(); -} if (m_aCurToken.eType !=
[Libreoffice-commits] online.git: loleaflet/src
loleaflet/src/layer/AnnotationManager.js | 136 +-- loleaflet/src/layer/marker/Annotation.js | 16 +++ loleaflet/src/map/Map.js |9 ++ 3 files changed, 101 insertions(+), 60 deletions(-) New commits: commit 9c4fbdd7c51fb1eef545af265075a05d8372c8a4 Author: Henry Castro Date: Mon Apr 3 22:41:29 2017 -0400 loleaflet: add a permanent overlay text selection of the annotation object Change-Id: I395f7cec22bf187532130b6755fcae58f51c73d2 diff --git a/loleaflet/src/layer/AnnotationManager.js b/loleaflet/src/layer/AnnotationManager.js index 8cf90e24..8308d485 100644 --- a/loleaflet/src/layer/AnnotationManager.js +++ b/loleaflet/src/layer/AnnotationManager.js @@ -11,7 +11,7 @@ L.AnnotationManager = L.Class.extend({ initialize: function (map) { this._map = map; this._items = []; - this._selected = {}; + this._selected = null; this._map.on('AnnotationCancel', this._onAnnotationCancel, this); this._map.on('AnnotationClick', this._onAnnotationClick, this); this._map.on('AnnotationReply', this._onAnnotationReply, this); @@ -28,7 +28,7 @@ L.AnnotationManager = L.Class.extend({ } } this._items = []; - this._selected = {}; + this._selected = null; }, // Remove only change tracking comments from the document @@ -40,15 +40,54 @@ L.AnnotationManager = L.Class.extend({ } }, + adjustComment: function(comment) { + var rectangles, color, viewId; + comment.anchorPos = L.LOUtil.stringToBounds(comment.anchorPos); + comment.anchorPix = this._map._docLayer._twipsToPixels(comment.anchorPos.min); + comment.trackchange = false; + rectangles = L.PolyUtil.rectanglesToPolygons(L.LOUtil.stringToRectangles(comment.textRange), this._map._docLayer); + viewId = this._map.getViewId(comment.author); + color = viewId >= 0 ? L.LOUtil.rgbToHex(this._map.getViewColor(viewId)) : '#43ACE8'; + if (rectangles.length > 0) { + comment.textSelected = L.polygon(rectangles, { + pointerEvents: 'none', + fillColor: color, + fillOpacity: 0.25, + weight: 2, + opacity: 0.25 + }); + } + }, + + adjustRedLine: function(redline) { + var rectangles, color, viewId; + // transform change tracking index into an id + redline.id = 'change-' + redline.index; + redline.anchorPos = L.LOUtil.stringToBounds(redline.textRange); + redline.anchorPix = this._map._docLayer._twipsToPixels(redline.anchorPos.min); + redline.trackchange = true; + redline.text = redline.comment; + rectangles = L.PolyUtil.rectanglesToPolygons(L.LOUtil.stringToRectangles(redline.textRange), this._map._docLayer); + viewId = this._map.getViewId(redline.author); + color = viewId >= 0 ? L.LOUtil.rgbToHex(this._map.getViewColor(viewId)) : '#43ACE8'; + if (rectangles.length > 0) { + redline.textSelected = L.polygon(rectangles, { + pointerEvents: 'none', + fillColor: color, + fillOpacity: 0.25, + weight: 2, + opacity: 0.25 + }); + } + }, + // Fill normal comments in the documents fill: function (comments) { var comment; this.clear(); for (var index in comments) { comment = comments[index]; - comment.anchorPos = L.LOUtil.stringToBounds(comment.anchorPos); - comment.anchorPix = this._map._docLayer._twipsToPixels(comment.anchorPos.min); - comment.trackchange = false; + this.adjustComment(comment); this._items.push(L.annotation(this._map.options.maxBounds.getSouthEast(), comment).addTo(this._map)); } this.layout(); @@ -59,11 +98,7 @@ L.AnnotationManager = L.Class.extend({ this.clearChanges(); for (var idx in redlines) { changecomment = redlines[idx]; - changecomment.id = 'change-' + changecomment.index; - changecomment.anchorPos = L.LOUtil.stringToBounds(changecomment.textRange); - changecomment.anchorPix = this._map._docLayer._twipsToPixels(changecomment.an
[Libreoffice-commits] online.git: Makefile.am
Makefile.am | 11 --- 1 file changed, 8 insertions(+), 3 deletions(-) New commits: commit 66a76f644bde3aa21f9de4e095be8c8300cbf021 Author: Ashod Nakashian Date: Mon Apr 3 21:05:36 2017 -0400 wsd: enable logging with valgrind Change-Id: I411f7de3d5764cd25af211f2dc77bf0e290adbc7 Reviewed-on: https://gerrit.libreoffice.org/36054 Reviewed-by: Ashod Nakashian Tested-by: Ashod Nakashian diff --git a/Makefile.am b/Makefile.am index 76f1dc8d..a438ff7d 100644 --- a/Makefile.am +++ b/Makefile.am @@ -226,27 +226,32 @@ run: all @JAILS_PATH@ @SYSTEMPLATE_PATH@/system_stamp --o:ssl.cert_file_path="$(abs_top_srcdir)/etc/cert.pem" \ --o:ssl.key_file_path="$(abs_top_srcdir)/etc/key.pem" \ --o:ssl.ca_file_path="$(abs_top_srcdir)/etc/ca-chain.cert.pem" \ - --o:admin_console.username=admin --o:admin_console.password=admin + --o:admin_console.username=admin --o:admin_console.password=admin \ + --o:logging.file[@enable]=false --o:logging.level=trace run-valgrind: all @JAILS_PATH@ @SYSTEMPLATE_PATH@/system_stamp @echo "Launching loolwsd under valgrind (but not forkit/loolkit, yet)" + @cp $(abs_top_srcdir)/test/data/hello.odt $(abs_top_srcdir)/test/data/hello-world.odt valgrind --tool=memcheck --trace-children=no -v --read-var-info=yes \ ./loolwsd --o:sys_template_path="@SYSTEMPLATE_PATH@" --o:lo_template_path="@LO_PATH@" \ --o:child_root_path="@JAILS_PATH@" --o:storage.filesystem[@allow]=true \ --o:ssl.cert_file_path="$(abs_top_srcdir)/etc/cert.pem" \ --o:ssl.key_file_path="$(abs_top_srcdir)/etc/key.pem" \ --o:ssl.ca_file_path="$(abs_top_srcdir)/etc/ca-chain.cert.pem" \ - --o:admin_console.username=admin --o:admin_console.password=admin + --o:admin_console.username=admin --o:admin_console.password=admin \ + --o:logging.file[@enable]=false --o:logging.level=trace run-callgrind: all @JAILS_PATH@ @SYSTEMPLATE_PATH@/system_stamp @echo "Launching loolwsd under valgrind (but not forkit/loolkit, yet)" + @cp $(abs_top_srcdir)/test/data/hello.odt $(abs_top_srcdir)/test/data/hello-world.odt valgrind --tool=callgrind --simulate-cache=yes --dump-instr=yes --num-callers=50 --error-limit=no \ ./loolwsd --o:sys_template_path="@SYSTEMPLATE_PATH@" --o:lo_template_path="@LO_PATH@" \ --o:child_root_path="@JAILS_PATH@" --o:storage.filesystem[@allow]=true \ --o:ssl.cert_file_path="$(abs_top_srcdir)/etc/cert.pem" \ --o:ssl.key_file_path="$(abs_top_srcdir)/etc/key.pem" \ --o:ssl.ca_file_path="$(abs_top_srcdir)/etc/ca-chain.cert.pem" \ - --o:admin_console.username=admin --o:admin_console.password=admin + --o:admin_console.username=admin --o:admin_console.password=admin \ + --o:logging.file[@enable]=false --o:logging.level=trace else SYSTEM_STAMP = ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] online.git: net/Ssl.cpp net/Ssl.hpp
net/Ssl.cpp | 39 ++- net/Ssl.hpp |3 ++- 2 files changed, 24 insertions(+), 18 deletions(-) New commits: commit 762ba09370800a38c5bf48b6950188a31a9d0cdf Author: Ashod Nakashian Date: Mon Apr 3 21:06:51 2017 -0400 wsd: fix SSL initialization/uninitialization error Valgrind found a number of erroneous data access during the construction and destruction of SslContext. Change-Id: Ie5072798a3660ed8acc707ba32ac196fa2d0f8af Reviewed-on: https://gerrit.libreoffice.org/36055 Reviewed-by: Ashod Nakashian Tested-by: Ashod Nakashian diff --git a/net/Ssl.cpp b/net/Ssl.cpp index d6d13575..e350257c 100644 --- a/net/Ssl.cpp +++ b/net/Ssl.cpp @@ -26,31 +26,30 @@ extern "C" }; } -std::unique_ptr SslContext::Instance; -std::vector> SslContext::Mutexes; +std::unique_ptr SslContext::Instance(nullptr); SslContext::SslContext(const std::string& certFilePath, const std::string& keyFilePath, const std::string& caFilePath) : _ctx(nullptr) { -#if OPENSSL_VERSION_NUMBER >= 0x0907000L -OPENSSL_config(nullptr); -#endif - -SSL_library_init(); -SSL_load_error_strings(); -OpenSSL_add_all_algorithms(); - const std::vector rand = Util::rng::getBytes(512); RAND_seed(&rand[0], rand.size()); // Initialize multi-threading support. for (int x = 0; x < CRYPTO_num_locks(); ++x) { -Mutexes.emplace_back(new std::mutex); +_mutexes.emplace_back(new std::mutex); } +#if OPENSSL_VERSION_NUMBER >= 0x0907000L +OPENSSL_config(nullptr); +#endif + +SSL_library_init(); +SSL_load_error_strings(); +OpenSSL_add_all_algorithms(); + CRYPTO_set_locking_callback(&SslContext::lock); CRYPTO_set_id_callback(&SslContext::id); CRYPTO_set_dynlock_create_callback(&SslContext::dynlockCreate); @@ -130,6 +129,8 @@ SslContext::~SslContext() CRYPTO_set_id_callback(0); CONF_modules_free(); + +_mutexes.clear(); } void SslContext::uninitialize() @@ -140,13 +141,17 @@ void SslContext::uninitialize() void SslContext::lock(int mode, int n, const char* /*file*/, int /*line*/) { -if (mode & CRYPTO_LOCK) -{ -Mutexes[n]->lock(); -} -else +assert(n < CRYPTO_num_locks()); +if (Instance) { -Mutexes[n]->unlock(); +if (mode & CRYPTO_LOCK) +{ +Instance->_mutexes[n]->lock(); +} +else +{ +Instance->_mutexes[n]->unlock(); +} } } diff --git a/net/Ssl.hpp b/net/Ssl.hpp index 7c13474a..b6fc0427 100644 --- a/net/Ssl.hpp +++ b/net/Ssl.hpp @@ -65,7 +65,8 @@ private: private: static std::unique_ptr Instance; -static std::vector> Mutexes; + +std::vector> _mutexes; SSL_CTX* _ctx; }; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] online.git: wsd/LOOLWSD.cpp
wsd/LOOLWSD.cpp |6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) New commits: commit 26ac97826614dc8e6f1f09199023e63fa240c31d Author: Ashod Nakashian Date: Mon Apr 3 21:07:53 2017 -0400 wsd: don't close invalid forkit pipe Change-Id: Ib66df894560ad592a7e90774897cb82b573dc77d Reviewed-on: https://gerrit.libreoffice.org/36056 Reviewed-by: Ashod Nakashian Tested-by: Ashod Nakashian diff --git a/wsd/LOOLWSD.cpp b/wsd/LOOLWSD.cpp index 1ac9efa2..19259e56 100644 --- a/wsd/LOOLWSD.cpp +++ b/wsd/LOOLWSD.cpp @@ -347,7 +347,7 @@ static int rebalanceChildren(int balance) { Util::assertIsLocked(NewChildrenMutex); -LOG_WRN("rebalance children to " << balance); +LOG_TRC("rebalance children to " << balance); // Do the cleanup first. const bool rebalance = cleanupChildren(); @@ -1182,9 +1182,9 @@ bool LOOLWSD::createForKit() ForKitProcId = -1; Admin::instance().setForKitPid(ForKitProcId); -const int oldForKitWritePipe = ForKitWritePipe; +if (ForKitWritePipe != -1) +close(ForKitWritePipe); ForKitWritePipe = -1; -close(oldForKitWritePipe); // ForKit always spawns one. ++OutstandingForks; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] online.git: net/Socket.hpp
net/Socket.hpp |7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) New commits: commit 7ca1f03770c117a316b23644306160a6a80ea583 Author: Ashod Nakashian Date: Mon Apr 3 23:13:03 2017 -0400 wsd: don't invoke onDisconnect from wrong thread ...and warn if we are in the wrong thread. This can happen when the socket is not properly closed from the poll thread and is being destroyed. Change-Id: I749c09b15d04b49038f7cee6a7a13e8f0145acff Reviewed-on: https://gerrit.libreoffice.org/36057 Reviewed-by: Ashod Nakashian Tested-by: Ashod Nakashian diff --git a/net/Socket.hpp b/net/Socket.hpp index 9cf83c49..9e06a040 100644 --- a/net/Socket.hpp +++ b/net/Socket.hpp @@ -610,7 +610,12 @@ public: LOG_DBG("StreamSocket dtor #" << getFD()); if (!_closed) -_socketHandler->onDisconnect(); +{ +if (isCorrectThread()) +_socketHandler->onDisconnect(); +else +LOG_WRN("#" << getFD() << " not properly shutdown. onDisconnect not called."); +} if (!_shutdownSignalled) { ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] online.git: net/Socket.cpp
net/Socket.cpp | 28 ++-- 1 file changed, 14 insertions(+), 14 deletions(-) New commits: commit b734284b599bb612cd8eee13e761ce42c8eb8a6a Author: Ashod Nakashian Date: Mon Apr 3 23:57:59 2017 -0400 wsd: cleanup deflating HTTP responses Change-Id: Id21bdfcb5d3e04f27b681ee9581a0ed06283d163 Reviewed-on: https://gerrit.libreoffice.org/36058 Reviewed-by: Ashod Nakashian Tested-by: Ashod Nakashian diff --git a/net/Socket.cpp b/net/Socket.cpp index bac3a741..1f6d64d0 100644 --- a/net/Socket.cpp +++ b/net/Socket.cpp @@ -205,15 +205,17 @@ namespace HttpHelper response.set("ETag", "\"" LOOLWSD_VERSION_HASH "\""); } -if(!deflate) +int bufferSize = std::min(st.st_size, (off_t)Socket::MaximumSendBufferSize); +if (st.st_size >= socket->getSendBufferSize()) { -int bufferSize = std::min(st.st_size, (off_t)Socket::MaximumSendBufferSize); -if (st.st_size >= socket->getSendBufferSize()) -{ -socket->setSocketBufferSize(bufferSize); -bufferSize = socket->getSendBufferSize(); -} +socket->setSocketBufferSize(bufferSize); +bufferSize = socket->getSendBufferSize(); +} +// Deflate is done over the full file, which can be too large. +// Skip deflating (ironically) if the file is too large. +if (!deflate || st.st_size > Socket::MaximumSendBufferSize * 10) +{ response.setContentLength(st.st_size); std::ostringstream oss; response.write(oss); @@ -246,18 +248,16 @@ namespace HttpHelper socket->send(header); std::ifstream file(path, std::ios::binary); -uLong bufferSize; -bufferSize = st.st_size; -char buf[bufferSize]; bool flush = true; do { -unsigned int a = 9; -file.read(buf, sizeof(buf)); -long unsigned int size = file.gcount(); +static const unsigned int level = 9; +char buf[st.st_size]; // FIXME: Should compress in chunks. +file.read(buf, st.st_size); +const long unsigned int size = file.gcount(); long unsigned int compSize = compressBound(size); char cbuf[compSize]; -compress2((Bytef *)&cbuf, &compSize, (Bytef *)&buf, size, a) ; +compress2((Bytef *)&cbuf, &compSize, (Bytef *)&buf, size, level); if (size > 0) socket->send(cbuf, compSize, flush); else ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] online.git: wsd/LOOLWSD.cpp
wsd/LOOLWSD.cpp | 16 +--- 1 file changed, 9 insertions(+), 7 deletions(-) New commits: commit 4a5c71c13c6c41710ef8bba70f79975c93fd86c2 Author: Ashod Nakashian Date: Tue Apr 4 00:09:12 2017 -0400 wsd: move socket to DocBroker in callback Change-Id: I23af97788d64268a822700ab16d63b970795a105 Reviewed-on: https://gerrit.libreoffice.org/36059 Reviewed-by: Ashod Nakashian Tested-by: Ashod Nakashian diff --git a/wsd/LOOLWSD.cpp b/wsd/LOOLWSD.cpp index 19259e56..9e7bc8f8 100644 --- a/wsd/LOOLWSD.cpp +++ b/wsd/LOOLWSD.cpp @@ -2080,16 +2080,18 @@ private: { // Transfer the client socket to the DocumentBroker. -// Set the ClientSession to handle Socket events. -socket->setHandler(clientSession); -LOG_DBG("Socket #" << socket->getFD() << " handler is " << clientSession->getName()); - -// Move the socket into DocBroker. -docBroker->addSocketToPoll(socket); +// Remove from current poll as we're moving ownership. socketOwnership = SocketHandlerInterface::SocketOwnership::MOVED; -docBroker->addCallback([docBroker, clientSession]() +docBroker->addCallback([docBroker, socket, clientSession]() { +// Set the ClientSession to handle Socket events. +socket->setHandler(clientSession); +LOG_DBG("Socket #" << socket->getFD() << " handler is " << clientSession->getName()); + +// Move the socket into DocBroker. +docBroker->addSocketToPoll(socket); + // Add and load the session. docBroker->addSession(clientSession); }); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] online.git: wsd/DocumentBroker.cpp
wsd/DocumentBroker.cpp | 11 ++- 1 file changed, 10 insertions(+), 1 deletion(-) New commits: commit d11b3a76d9284c23b0262abd2c48a2dc89bed571 Author: Ashod Nakashian Date: Tue Apr 4 00:11:06 2017 -0400 wsd: move correct-thread assertions Change-Id: Iba5d58d74720aaf02a372f25148047e79c89c1bd Reviewed-on: https://gerrit.libreoffice.org/36060 Reviewed-by: Ashod Nakashian Tested-by: Ashod Nakashian diff --git a/wsd/DocumentBroker.cpp b/wsd/DocumentBroker.cpp index 483e7c5e..97626af9 100644 --- a/wsd/DocumentBroker.cpp +++ b/wsd/DocumentBroker.cpp @@ -277,6 +277,8 @@ bool DocumentBroker::isAlive() const DocumentBroker::~DocumentBroker() { +assert(isCorrectThread()); + Admin::instance().rmDoc(_docKey); LOG_INF("~DocumentBroker [" << _uriPublic.toString() << @@ -630,6 +632,8 @@ void DocumentBroker::setLoaded() bool DocumentBroker::autoSave(const bool force) { +assert(isCorrectThread()); + if (_sessions.empty() || _storage == nullptr || !_isLoaded || !_childProcess->isAlive() || (!_isModified && !force)) { @@ -669,6 +673,8 @@ bool DocumentBroker::autoSave(const bool force) bool DocumentBroker::sendUnoSave(const bool dontSaveIfUnmodified) { +assert(isCorrectThread()); + LOG_INF("Autosave triggered for doc [" << _docKey << "]."); std::shared_ptr savingSession; @@ -1168,6 +1174,8 @@ void DocumentBroker::setModified(const bool value) bool DocumentBroker::forwardToChild(const std::string& viewId, const std::string& message) { +assert(isCorrectThread()); + LOG_TRC("Forwarding payload to child [" << viewId << "]: " << message); std::string msg = "child-" + viewId + ' ' + message; @@ -1242,7 +1250,7 @@ bool DocumentBroker::forwardToClient(const std::shared_ptr& payload) void DocumentBroker::childSocketTerminated() { -std::lock_guard lock(_mutex); +assert(isCorrectThread()); if (!_childProcess->isAlive()) { @@ -1338,6 +1346,7 @@ void DocumentBroker::dumpState(std::ostream& os) os << "\n public uri: " << _uriPublic.toString(); os << "\n jailed uri: " << _uriJailed.toString(); os << "\n doc key: " << _docKey; +os << "\n doc id: " << _docId; os << "\n num sessions: " << getSessionsCount(); os << "\n last editable?: " << _lastEditableSession; std::time_t t = std::chrono::system_clock::to_time_t( ___ 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-1' - 46 commits - common/Common.hpp common/FileUtil.cpp common/IoUtil.cpp common/LOOLWebSocket.hpp common/Session.cpp comm
Makefile.am | 28 +--- common/Common.hpp|6 common/FileUtil.cpp |5 common/IoUtil.cpp| 21 --- common/LOOLWebSocket.hpp | 18 -- common/Session.cpp |8 + common/Session.hpp |8 + common/Unit.hpp |7 + common/Util.cpp | 12 - configure.ac |2 kit/ChildSession.cpp |2 kit/Kit.cpp | 32 +++- kit/Kit.hpp |1 loleaflet/dist/toolbar/toolbar.js|6 loleaflet/reference.html |3 loleaflet/src/admin/AdminSocketSettings.js |4 loleaflet/src/control/Control.ContextMenu.js | 16 ++ loleaflet/src/control/Control.Menubar.js |5 loleaflet/src/control/Control.Scroll.js | 13 +- loleaflet/src/core/Socket.js |4 loleaflet/src/layer/tile/TileLayer.js| 42 +++--- loleaflet/src/map/Map.js | 14 +- net/Socket.cpp | 122 -- net/Socket.hpp | 159 +--- net/Ssl.cpp | 39 +++--- net/Ssl.hpp |3 net/WebSocketHandler.hpp | 59 +++-- test/Makefile.am |8 - test/UnitMinSocketBufferSize.cpp | 86 - test/UnitStorage.cpp | 44 -- test/helpers.hpp | 18 -- test/httpwstest.cpp | 23 --- wsd/Admin.cpp| 36 ++--- wsd/Admin.hpp|5 wsd/AdminModel.cpp | 60 - wsd/AdminModel.hpp | 12 + wsd/ClientSession.cpp| 14 +- wsd/ClientSession.hpp|6 wsd/DocumentBroker.cpp | 111 - wsd/DocumentBroker.hpp | 36 ++--- wsd/FileServer.cpp |3 wsd/LOOLWSD.cpp | 175 ++- wsd/LOOLWSD.hpp |4 wsd/reference.txt|6 44 files changed, 665 insertions(+), 621 deletions(-) New commits: commit 7f499cca85877c3dca682fb5cb83a65d567ccf06 Author: Ashod Nakashian Date: Tue Apr 4 00:11:06 2017 -0400 wsd: move correct-thread assertions Change-Id: Iba5d58d74720aaf02a372f25148047e79c89c1bd Reviewed-on: https://gerrit.libreoffice.org/36060 Reviewed-by: Ashod Nakashian Tested-by: Ashod Nakashian (cherry picked from commit d11b3a76d9284c23b0262abd2c48a2dc89bed571) diff --git a/wsd/DocumentBroker.cpp b/wsd/DocumentBroker.cpp index 483e7c5e..97626af9 100644 --- a/wsd/DocumentBroker.cpp +++ b/wsd/DocumentBroker.cpp @@ -277,6 +277,8 @@ bool DocumentBroker::isAlive() const DocumentBroker::~DocumentBroker() { +assert(isCorrectThread()); + Admin::instance().rmDoc(_docKey); LOG_INF("~DocumentBroker [" << _uriPublic.toString() << @@ -630,6 +632,8 @@ void DocumentBroker::setLoaded() bool DocumentBroker::autoSave(const bool force) { +assert(isCorrectThread()); + if (_sessions.empty() || _storage == nullptr || !_isLoaded || !_childProcess->isAlive() || (!_isModified && !force)) { @@ -669,6 +673,8 @@ bool DocumentBroker::autoSave(const bool force) bool DocumentBroker::sendUnoSave(const bool dontSaveIfUnmodified) { +assert(isCorrectThread()); + LOG_INF("Autosave triggered for doc [" << _docKey << "]."); std::shared_ptr savingSession; @@ -1168,6 +1174,8 @@ void DocumentBroker::setModified(const bool value) bool DocumentBroker::forwardToChild(const std::string& viewId, const std::string& message) { +assert(isCorrectThread()); + LOG_TRC("Forwarding payload to child [" << viewId << "]: " << message); std::string msg = "child-" + viewId + ' ' + message; @@ -1242,7 +1250,7 @@ bool DocumentBroker::forwardToClient(const std::shared_ptr& payload) void DocumentBroker::childSocketTerminated() { -std::lock_guard lock(_mutex); +assert(isCorrectThread()); if (!_childProcess->isAlive()) { @@ -1338,6 +1346,7 @@ void DocumentBroker::dumpState(std::ostream& os) os << "\n public uri: " << _uriPublic.toString(); os << "\n jailed uri: " << _uriJailed.toString(); os << "\n doc key: " << _docKey; +os << "\n doc id: " << _docId; os << "\n num sessions: " << getSessionsCount(); os << "\n last editable?: " << _lastEditableSession; std::time_t t = std::chrono::system_clock::to_time_t(
[Libreoffice-commits] core.git: codemaker/source connectivity/source cppu/qa desktop/qa desktop/source extensions/source filter/source forms/source framework/inc framework/source i18npool/qa i18npool/
codemaker/source/commoncpp/commoncpp.cxx |1 codemaker/source/cppumaker/cpputype.cxx| 958 +- connectivity/source/drivers/mozab/bootstrap/MNSFolders.cxx |2 connectivity/source/drivers/mozab/bootstrap/MNSProfileDiscover.cxx | 12 connectivity/source/drivers/postgresql/pq_tools.cxx| 30 cppu/qa/cppumaker/test_cppumaker.cxx |9 cppu/qa/test_unotype.cxx | 65 desktop/qa/desktop_lib/test_desktop_lib.cxx|9 desktop/source/lib/lokinteractionhandler.cxx |4 extensions/source/propctrlr/formcomponenthandler.cxx | 10 extensions/source/propctrlr/pushbuttonnavigation.cxx | 25 extensions/source/propctrlr/pushbuttonnavigation.hxx |3 filter/source/msfilter/escherex.cxx|2 filter/source/svg/svgexport.cxx|4 forms/source/component/DatabaseForm.cxx|6 framework/inc/uielement/uielement.hxx |6 framework/source/layoutmanager/helpers.cxx |2 framework/source/layoutmanager/helpers.hxx |2 framework/source/layoutmanager/layoutmanager.cxx |2 framework/source/layoutmanager/toolbarlayoutmanager.cxx| 116 - framework/source/services/frame.cxx|2 i18npool/qa/cppunit/test_textsearch.cxx|2 i18npool/source/inputchecker/inputsequencechecker.cxx | 11 i18npool/source/transliteration/transliterationImpl.cxx| 40 pyuno/source/module/pyuno_runtime.cxx | 45 sw/qa/extras/rtfexport/rtfexport.cxx | 70 sw/qa/extras/rtfimport/rtfimport.cxx | 56 27 files changed, 717 insertions(+), 777 deletions(-) New commits: commit 5676ced82539d9e40bde6196d2aa3b2e4c7b3fdb Author: Noel Grandin Date: Wed Feb 22 16:39:20 2017 +0200 make UNO enums scoped for internal LO code this modifies codemaker so that, for an UNO enum, we generate code that effectively looks like: #ifdef LIBO_INTERNAL_ONLY && HAVE_CX11_CONSTEXPR enum class XXX { ONE = 1 }; constexpr auto ONE = XXX_ONE; #else ...the old normal way.. #endif which means that for LO internal code, the enums are scoped. The "constexpr auto" trick acts like an alias so we don't have to use scoped naming everywhere. Change-Id: I3054ecb230e8666ce98b4a9cb87b384df5f64fb4 Reviewed-on: https://gerrit.libreoffice.org/34546 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/codemaker/source/commoncpp/commoncpp.cxx b/codemaker/source/commoncpp/commoncpp.cxx index 4f1840c54e43..a4279e3a98dd 100644 --- a/codemaker/source/commoncpp/commoncpp.cxx +++ b/codemaker/source/commoncpp/commoncpp.cxx @@ -63,7 +63,6 @@ OString scopedCppName(OString const & type, bool ns_alias) return s; } - OString translateUnoToCppType( codemaker::UnoType::Sort sort, OUString const & nucleus) { diff --git a/codemaker/source/cppumaker/cpputype.cxx b/codemaker/source/cppumaker/cpputype.cxx index 659061a8fd34..a657389d6a4d 100644 --- a/codemaker/source/cppumaker/cpputype.cxx +++ b/codemaker/source/cppumaker/cpputype.cxx @@ -46,9 +46,11 @@ #include "dumputils.hxx" #include "includes.hxx" -namespace { +namespace +{ -bool isBootstrapType(OUString const & name) { +bool isBootstrapType(OUString const & name) +{ static char const * const names[] = { "com.sun.star.beans.Property", "com.sun.star.beans.PropertyAttribute", @@ -136,8 +138,9 @@ bool isBootstrapType(OUString const & name) { "com.sun.star.uno.XReference", "com.sun.star.uno.XUnloadingPreference", "com.sun.star.uno.XWeak", -"com.sun.star.util.XMacroExpander" }; -// cf. cppuhelper/unotypes/Makefile UNOTYPES (plus missing dependencies) +"com.sun.star.util.XMacroExpander" +}; +// cf. cppuhelper/unotypes/Makefile UNOTYPES (plus missing dependencies) for (std::size_t i = 0; i < SAL_N_ELEMENTS(names); ++i) { if (name.equalsAscii(names[i])) { return true; @@ -146,7 +149,8 @@ bool isBootstrapType(OUString const & name) { return false; } -class CppuType { +class CppuType +{ public: CppuType( OUString const & name, rtl::Reference< TypeManager > const & typeMgr); @@ -166,8 +170,9 @@ public: codemaker::GeneratedTypeSet & generated, CppuOptions const & options); virtual void dumpHdlFile( -FileStream & out, codemaker::cppumaker::Includes & includes) -{ dumpH
[Libreoffice-commits] core.git: include/editeng include/svl include/vcl include/xmloff svl/source vcl/source writerfilter/source xmloff/source
include/editeng/charrotateitem.hxx |2 -- include/svl/aeitem.hxx |1 - include/vcl/imagerepository.hxx |4 include/xmloff/fasttokenhandler.hxx |3 --- svl/source/items/aeitem.cxx |7 --- vcl/source/image/ImageRepository.cxx |6 -- writerfilter/source/dmapper/NumberingManager.hxx |1 - xmloff/source/core/fasttokenhandler.cxx |7 --- 8 files changed, 31 deletions(-) New commits: commit e63116602b8f49508d0aef1dd1afe746a29cc219 Author: Noel Grandin Date: Mon Apr 3 16:19:02 2017 +0200 loplugin:unusedmethods Change-Id: I30f9b6e68a7aa73782c980749e34f8f8d40ae57b Reviewed-on: https://gerrit.libreoffice.org/36047 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/include/editeng/charrotateitem.hxx b/include/editeng/charrotateitem.hxx index 922cbdff11cb..fec33b5d4944 100644 --- a/include/editeng/charrotateitem.hxx +++ b/include/editeng/charrotateitem.hxx @@ -34,8 +34,6 @@ class EDITENG_DLLPUBLIC SvxTextRotateItem : public SfxUInt16Item { public: -static SfxPoolItem* CreateDefault(); - SvxTextRotateItem(sal_uInt16 nValue, const sal_uInt16 nId); virtual SfxPoolItem*Clone(SfxItemPool *pPool = nullptr) const override; diff --git a/include/svl/aeitem.hxx b/include/svl/aeitem.hxx index f0334fb0ca46..10aaa1f30d26 100644 --- a/include/svl/aeitem.hxx +++ b/include/svl/aeitem.hxx @@ -49,7 +49,6 @@ class SVL_DLLPUBLIC SfxAllEnumItem: public SfxAllEnumItem_Base std::size_t GetPosByValue_( sal_uInt16 nValue ) const; public: -SfxAllEnumItem(); explicitSfxAllEnumItem( sal_uInt16 nWhich); SfxAllEnumItem( sal_uInt16 nWhich, sal_uInt16 nVal ); SfxAllEnumItem( sal_uInt16 nWhich, SvStream &rStream ); diff --git a/include/vcl/imagerepository.hxx b/include/vcl/imagerepository.hxx index 5983825f4236..d7553802afe1 100644 --- a/include/vcl/imagerepository.hxx +++ b/include/vcl/imagerepository.hxx @@ -51,10 +51,6 @@ namespace vcl BitmapEx& _out_rImage, bool bSearchLanguageDependent ); - -static bool loadDefaultImage( -BitmapEx& _out_rImage -); }; diff --git a/include/xmloff/fasttokenhandler.hxx b/include/xmloff/fasttokenhandler.hxx index 4a514f568170..ca20d687ad7f 100644 --- a/include/xmloff/fasttokenhandler.hxx +++ b/include/xmloff/fasttokenhandler.hxx @@ -26,9 +26,6 @@ public: explicit TokenMap(); ~TokenMap(); -/** Returns the token identifier for the passed OUString (UTF-16) token name. */ -static sal_Int32 getTokenFromUnicode( const OUString& rUnicodeName ); - /** Returns the UTF-8 name of the passed token identifier as byte sequence. */ css::uno::Sequence< sal_Int8 > getUtf8TokenName( sal_Int32 nToken ) const { diff --git a/svl/source/items/aeitem.cxx b/svl/source/items/aeitem.cxx index d50b77d85761..819a0d61fa77 100644 --- a/svl/source/items/aeitem.cxx +++ b/svl/source/items/aeitem.cxx @@ -32,13 +32,6 @@ struct SfxAllEnumValue_Impl class SfxAllEnumValueArr : public std::vector {}; -SfxAllEnumItem::SfxAllEnumItem() : -SfxAllEnumItem_Base(0, 0), -pValues( nullptr ), -pDisabledValues( nullptr ) -{ -} - SfxAllEnumItem::SfxAllEnumItem(sal_uInt16 which, sal_uInt16 nVal): SfxAllEnumItem_Base(which, nVal), pValues( nullptr ), diff --git a/vcl/source/image/ImageRepository.cxx b/vcl/source/image/ImageRepository.cxx index 7b9255f32348..5e14a70fdb47 100644 --- a/vcl/source/image/ImageRepository.cxx +++ b/vcl/source/image/ImageRepository.cxx @@ -32,12 +32,6 @@ namespace vcl return ImageTree::get().loadImage( _rName, sIconTheme, _out_rImage, _bSearchLanguageDependent ); } -bool ImageRepository::loadDefaultImage( BitmapEx& _out_rImage) -{ -OUString sIconTheme = Application::GetSettings().GetStyleSettings().DetermineIconTheme(); -return ImageTree::get().loadDefaultImage( sIconTheme,_out_rImage); -} - } // namespace vcl /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/writerfilter/source/dmapper/NumberingManager.hxx b/writerfilter/source/dmapper/NumberingManager.hxx index cd09b3d10f9d..f2cb1d2c637e 100644 --- a/writerfilter/source/dmapper/NumberingManager.hxx +++ b/writerfilter/source/dmapper/NumberingManager.hxx @@ -86,7 +86,6 @@ public: // Getters const OUString& GetBulletChar( ) { return m_sBulletChar; }; -const css::awt::Size& GetGraphicSize( ) { return m_aGraphicSize; }; const std::shared_ptr< StyleSheetEntry >& GetParaStyle( ) { return m_pParaStyle; }; bool isOutlineNumbering() const { return m_outline; } diff --git a/xmloff/source/core/fasttokenhandler.cxx b/xmloff/source/core/fasttokenhandler.cxx index 8c60bd15520f..22a1606b44b1 100644 --- a/xmloff/source/co