[Libreoffice-commits] core.git: qadevOOo/tests
qadevOOo/tests/java/ifc/accessibility/_XAccessibleAction.java |6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) New commits: commit b70c2e2a4c9e42b6d7fd891e6bcef1a6510d4f63 Author: Julien Nabet Date: Sat Jan 13 22:56:55 2018 +0100 Typo: Unexepected->Unexpected Change-Id: Id87b14e8cca80c7cc03ff9977fac3effc6f61a52 Reviewed-on: https://gerrit.libreoffice.org/47847 Tested-by: Jenkins Reviewed-by: Julien Nabet diff --git a/qadevOOo/tests/java/ifc/accessibility/_XAccessibleAction.java b/qadevOOo/tests/java/ifc/accessibility/_XAccessibleAction.java index 9150a3ac0a39..d83b231ebe66 100644 --- a/qadevOOo/tests/java/ifc/accessibility/_XAccessibleAction.java +++ b/qadevOOo/tests/java/ifc/accessibility/_XAccessibleAction.java @@ -67,7 +67,7 @@ public class _XAccessibleAction extends lib.MultiMethodTest { log.println("Did action: "+act); res &= act ; } catch (com.sun.star.lang.IndexOutOfBoundsException ioe) { -log.println("Unexepected exception -- FAILED"); +log.println("Unexpected exception -- FAILED"); res &= false; } @@ -102,7 +102,7 @@ public class _XAccessibleAction extends lib.MultiMethodTest { log.println("Found action: "+desc); res &= desc!=null ; } catch (com.sun.star.lang.IndexOutOfBoundsException ioe) { -log.println("Unexepected exception -- FAILED"); +log.println("Unexpected exception -- FAILED"); res &= false; } } @@ -140,7 +140,7 @@ public class _XAccessibleAction extends lib.MultiMethodTest { } res &= true; } catch (com.sun.star.lang.IndexOutOfBoundsException ioe) { -log.println("Unexepected exception -- FAILED"); +log.println("Unexpected exception -- FAILED"); res &= 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/doc/docredln.cxx | 14 ++ 1 file changed, 14 insertions(+) New commits: commit 39dd42b5aa34d0960cdab0c9fd967d4ae5cc6801 Author: Tamás Zolnai Date: Sun Jan 14 00:16:26 2018 +0100 lok: Tile not invalidated with certain changes Calling FillRects caused this issue, which updates text area, so the invalidation, runing after that call, won't now where was the old text. We call invalidation here on the whole frame not only on the rects where the actual text is. Change-Id: I23db4b9579aa5710540b5d241506726630219b02 Reviewed-on: https://gerrit.libreoffice.org/47848 Tested-by: Jenkins Reviewed-by: Tamás Zolnai diff --git a/sw/source/core/doc/docredln.cxx b/sw/source/core/doc/docredln.cxx index e2c061f004ac..d073d21f5cb5 100644 --- a/sw/source/core/doc/docredln.cxx +++ b/sw/source/core/doc/docredln.cxx @@ -393,6 +393,20 @@ void SwRedlineTable::LOKRedlineNotification(RedlineNotification nType, SwRangeRe aRedline.put("textRange", sRects.getStr()); lcl_LOKInvalidateStartEndFrames(aCursor); + +// When this notify method is called text invalidation is not done yet +// Calling FillRects updates the text area so invalidation will not run on the correct rects +// So we need to do an own invalidation here. It invalidates text frames continging the redlining +SwDoc* pDoc = pRedline->GetDoc(); +SwViewShell* pSh; +if( pDoc && !pDoc->IsInDtor() && +nullptr != ( pSh = pDoc->getIDocumentLayoutAccess().GetCurrentViewShell()) ) +{ +for(SwNodeIndex nIdx = pStartPos->nNode; nIdx <= pEndPos->nNode; ++nIdx) +{ +pSh->InvalidateWindows( nIdx.GetNode().GetContentNode()->FindLayoutRect() ); +} +} } boost::property_tree::ptree aTree; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
CppCheck Report Update
A new cppcheck report is available at : http://dev-builds.libreoffice.org/cppcheck_reports/master/ Note: The script generating this report was run at : 2018-14-01_02:34:11 with user buildslave at host vm140 as /home/buildslave/source/dev-tools/cppcheck/cppcheck-report.sh -s /home/buildslave/source/libo-core -c /home/buildslave/source/cppcheck -w /home/buildslave/tmp/www It can be found and improved here: https://gerrit.libreoffice.org/gitweb?p=dev-tools.git;a=blob;f=cppcheck/cppcheck-report.sh ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice
[Libreoffice-commits] core.git: odk/examples sc/source
odk/examples/java/Spreadsheet/SCalc.java |2 +- sc/source/filter/inc/xlstyle.hxx |2 +- 2 files changed, 2 insertions(+), 2 deletions(-) New commits: commit facfc2951ea9f4745edd4a6fb1cf97697f33f40a Author: Julien Nabet Date: Sat Jan 13 22:41:53 2018 +0100 Typo: syles->styles Change-Id: Ia93306eda5e09cc9cae62fc43c472d266ec03bfa Reviewed-on: https://gerrit.libreoffice.org/47846 Tested-by: Jenkins Reviewed-by: Julien Nabet diff --git a/odk/examples/java/Spreadsheet/SCalc.java b/odk/examples/java/Spreadsheet/SCalc.java index b251656c7250..5772ab31b9a9 100644 --- a/odk/examples/java/Spreadsheet/SCalc.java +++ b/odk/examples/java/Spreadsheet/SCalc.java @@ -38,7 +38,7 @@ // Step 2: open an empty calc document // Step 3: create cell styles // Step 4: get the sheet an insert some data -// Step 5: apply the created cell syles +// Step 5: apply the created cell styles // Step 6: insert a 3D Chart diff --git a/sc/source/filter/inc/xlstyle.hxx b/sc/source/filter/inc/xlstyle.hxx index 4b8dd97109d4..1e20c5c396d8 100644 --- a/sc/source/filter/inc/xlstyle.hxx +++ b/sc/source/filter/inc/xlstyle.hxx @@ -146,7 +146,7 @@ const sal_uInt32 EXC_XFID_NOTFOUND = 0x; const sal_uInt16 EXC_XF_LOCKED = 0x0001; const sal_uInt16 EXC_XF_HIDDEN = 0x0002; const sal_uInt16 EXC_XF_STYLE = 0x0004; -const sal_uInt16 EXC_XF_STYLEPARENT = 0x0FFF; /// Syles don't have a parent. +const sal_uInt16 EXC_XF_STYLEPARENT = 0x0FFF; /// Styles don't have a parent. const sal_uInt16 EXC_XF_LINEBREAK = 0x0008; /// Automatic line break. const sal_uInt16 EXC_XF_SHRINK = 0x0010; /// Shrink to fit into cell. ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: chart2/source
chart2/source/controller/main/ChartController.cxx |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) New commits: commit d28e10b095b4ee0986fbe86170928bf077da04b9 Author: Vasily Melenchuk Date: Fri Jan 12 13:27:08 2018 +0300 Replacing newly written deprecated OSL_ENSURE by SAL_WARN_IF. It was mentioned at https://gerrit.libreoffice.org/44605 but that patch was already merged. Change-Id: I0b75bb3d23406d7e25fe4c0e0a2f26f3e69d37c5 Reviewed-on: https://gerrit.libreoffice.org/47811 Tested-by: Jenkins Reviewed-by: Markus Mohrhard diff --git a/chart2/source/controller/main/ChartController.cxx b/chart2/source/controller/main/ChartController.cxx index 430c560dead2..b2b8dbdc9720 100644 --- a/chart2/source/controller/main/ChartController.cxx +++ b/chart2/source/controller/main/ChartController.cxx @@ -1359,12 +1359,12 @@ void ChartController::executeDispatch_SourceData() // Ask parent document to create new data provider css::uno::Reference< com::sun::star::chart2::XDataProviderAccess > xCreatorDoc( rModel.getParent(), uno::UNO_QUERY ); -OSL_ENSURE( xCreatorDoc.is(), "Invalid XDataProviderAccess" ); +SAL_WARN_IF( !xCreatorDoc.is(), "chart2.main", "Invalid XDataProviderAccess" ); if ( xCreatorDoc.is() ) { uno::Reference< data::XDataProvider > xDataProvider = xCreatorDoc->createDataProvider(); -OSL_ENSURE( xCreatorDoc.is(), "Data provider was not created" ); +SAL_WARN_IF( !xDataProvider.is(), "chart2.main", "Data provider was not created" ); if ( xDataProvider.is() ) { rModel.attachDataProvider(xDataProvider); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: sc/source
sc/source/ui/docshell/arealink.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 315be3a276b01e88c794da1dbc6252a8b803d269 Author: Caolán McNamara Date: Fri Jan 12 10:48:59 2018 + VclPtr, missing dispose Change-Id: I790cd8be0d461d4c82c9b1c64e334bd37115dcaf Reviewed-on: https://gerrit.libreoffice.org/47801 Tested-by: Jenkins Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara diff --git a/sc/source/ui/docshell/arealink.cxx b/sc/source/ui/docshell/arealink.cxx index a2eb8f095163..b3a6b7ca3d61 100644 --- a/sc/source/ui/docshell/arealink.cxx +++ b/sc/source/ui/docshell/arealink.cxx @@ -88,7 +88,7 @@ void ScAreaLink::Edit(vcl::Window* pParent, const Link& /* rEn ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create(); OSL_ENSURE(pFact, "ScAbstractFactory create fail!"); -VclPtr pDlg = pFact->CreateScLinkedAreaDlg(pParent); +ScopedVclPtr pDlg(pFact->CreateScLinkedAreaDlg(pParent)); OSL_ENSURE(pDlg, "Dialog create fail!"); pDlg->InitFromOldLink( aFileName, aFilterName, aOptions, aSourceArea, GetRefreshDelay() ); pImpl->m_pDialog = pDlg; ___ 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/lwptablelayout.cxx | 34 +++--- lotuswordpro/source/filter/lwptablelayout.hxx |6 ++-- 2 files changed, 13 insertions(+), 27 deletions(-) New commits: commit ba2c3bb1e63b4cc40c4379dde314eb005f0c4c10 Author: Caolán McNamara Date: Sat Jan 13 15:00:47 2018 + ofz#5288 Direct-leak Change-Id: I4abbae86d66e111f5d5deee3a596aeae4cb7 Reviewed-on: https://gerrit.libreoffice.org/47839 Tested-by: Jenkins Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara diff --git a/lotuswordpro/source/filter/lwptablelayout.cxx b/lotuswordpro/source/filter/lwptablelayout.cxx index 17a418e6c9d6..0a3078cf697a 100644 --- a/lotuswordpro/source/filter/lwptablelayout.cxx +++ b/lotuswordpro/source/filter/lwptablelayout.cxx @@ -71,7 +71,6 @@ #include #include -#include #include #include #include @@ -415,20 +414,7 @@ LwpTableLayout::LwpTableLayout(LwpObjectHeader const &objHdr, LwpSvStream* pStrm , m_nRows(0) , m_nCols(0) , m_pDefaultCellLayout(nullptr) -, m_pColumns(nullptr) { -m_CellsMap.clear(); -} - -LwpTableLayout::~LwpTableLayout() -{ -m_CellsMap.clear(); - -if (m_pColumns) -{ -delete [] m_pColumns; -m_pColumns = nullptr; -} } /** @@ -533,7 +519,7 @@ OUString LwpTableLayout::GetColumnWidth(sal_uInt16 nCol) return m_DefaultColumnStyleName; } -LwpColumnLayout * pCol = m_pColumns[nCol]; +LwpColumnLayout * pCol = m_aColumns[nCol]; if (pCol) { return pCol->GetStyleName(); @@ -553,12 +539,12 @@ void LwpTableLayout::RegisterColumns() sal_uInt16 nCols = m_nCols; -m_pColumns = new LwpColumnLayout *[nCols]; +m_aColumns.resize(nCols); std::unique_ptr pWidthCalculated( new bool[nCols] ); for(sal_uInt16 i=0;iGetWidth(); @@ -577,7 +563,7 @@ void LwpTableLayout::RegisterColumns() { throw std::range_error("corrupt LwpTableLayout"); } -m_pColumns[nColId] = pColumnLayout; +m_aColumns[nColId] = pColumnLayout; if (!pColumnLayout->IsJustifiable()) { pWidthCalculated[nColId] = true; @@ -593,10 +579,10 @@ void LwpTableLayout::RegisterColumns() if (nJustifiableColumn == 0 && nCols != 0) { nJustifiableColumn ++; -if (m_pColumns[nCols - 1]) +if (m_aColumns[nCols - 1]) { pWidthCalculated[nCols-1] = false; -dTableWidth += m_pColumns[nCols-1]->GetWidth(); +dTableWidth += m_aColumns[nCols-1]->GetWidth(); } else { @@ -620,18 +606,18 @@ void LwpTableLayout::RegisterColumns() sal_uInt16 i=0; for( i=0;iSetFoundry(m_pFoundry); +m_aColumns[i]->SetFoundry(m_pFoundry); if(!pWidthCalculated[i]) { // justifiable register style with calculated value -m_pColumns[i]->SetStyleName(m_DefaultColumnStyleName); +m_aColumns[i]->SetStyleName(m_DefaultColumnStyleName); } else { // not justifiable register style with original value -m_pColumns[i]->RegisterStyle(m_pColumns[i]->GetWidth()); +m_aColumns[i]->RegisterStyle(m_aColumns[i]->GetWidth()); } } } diff --git a/lotuswordpro/source/filter/lwptablelayout.hxx b/lotuswordpro/source/filter/lwptablelayout.hxx index ef80dd5ac0e6..700c16647472 100644 --- a/lotuswordpro/source/filter/lwptablelayout.hxx +++ b/lotuswordpro/source/filter/lwptablelayout.hxx @@ -62,6 +62,7 @@ #define INCLUDED_LOTUSWORDPRO_SOURCE_FILTER_LWPTABLELAYOUT_HXX #include "lwplayout.hxx" +#include #include #include @@ -88,7 +89,6 @@ class LwpTableLayout: public LwpLayout { public: LwpTableLayout(LwpObjectHeader const &objHdr, LwpSvStream* pStrm); -virtual ~LwpTableLayout() override; virtual LWP_LAYOUT_TYPE GetLayoutType () override { return LWP_TABLE_LAYOUT;} LwpObjectID& GetColumnLayoutHead(){return m_ColumnLayout;} void RegisterStyle() override; @@ -123,9 +123,9 @@ private: OUString m_DefaultRowStyleName; // wordpro cell map -std::vector m_WordProCellsMap; +std::vector m_WordProCellsMap; // column vector -LwpColumnLayout ** m_pColumns; +std::vector m_aColumns; public: void XFConvert(XFContentContainer* pCont) override; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: sfx2/source
sfx2/source/dialog/infobar.cxx | 22 ++ 1 file changed, 10 insertions(+), 12 deletions(-) New commits: commit de1b926fa294273caefb29a507e117b8487e882b Author: Caolán McNamara Date: Fri Jan 12 16:57:18 2018 + Foreground colors adjusted to comply with WCAG 2.0 level AAA requiring a contrast of 7:1 Change-Id: I71edc354f3f9a3d534452bb378743d1f9639a08f Reviewed-on: https://gerrit.libreoffice.org/47825 Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara diff --git a/sfx2/source/dialog/infobar.cxx b/sfx2/source/dialog/infobar.cxx index ea466d4c374f..67c24f3e41b3 100644 --- a/sfx2/source/dialog/infobar.cxx +++ b/sfx2/source/dialog/infobar.cxx @@ -36,27 +36,25 @@ const long INFO_BAR_BASE_HEIGHT = 40; void GetInfoBarColors(InfoBarType ibType, BColor& rBackgroundColor, BColor& rForegroundColor, BColor& rMessageColor) { +rMessageColor = basegfx::BColor(0.0, 0.0, 0.0); + switch (ibType) { -case InfoBarType::Info: // blue; #00529B/0,82,155; #BDE5F8/189,229,248 +case InfoBarType::Info: // blue; #004785/0,71,133; #BDE5F8/189,229,248 rBackgroundColor = basegfx::BColor(0.741, 0.898, 0.973); -rForegroundColor = basegfx::BColor(0.0, 0.322, 0.608); -rMessageColor = basegfx::BColor(0.0, 0.322, 0.608); +rForegroundColor = basegfx::BColor(0.0, 0.278, 0.522); break; -case InfoBarType::Success: // green; #4F8A10/79,138,16; #DFF2BF/223,242,191 +case InfoBarType::Success: // green; #32550C/50,85,12; #DFF2BF/223,242,191 rBackgroundColor = basegfx::BColor(0.874,0.949,0.749); -rForegroundColor = basegfx::BColor(0.31,0.541,0.063); -rMessageColor = basegfx::BColor(0.31,0.541,0.063); +rForegroundColor = basegfx::BColor(0.196,0.333,0.047); break; -case InfoBarType::Warning: // orange; #9F6000/159,96,0; #FEEFB3/254,239,179 +case InfoBarType::Warning: // orange; #704300/112,67,0; #FEEFB3/254,239,179 rBackgroundColor = basegfx::BColor(0.996,0.937,0.702); -rForegroundColor = basegfx::BColor(0.623,0.376,0.0); -rMessageColor = basegfx::BColor(0.623,0.376,0.0); +rForegroundColor = basegfx::BColor(0.439,0.263,0.0); break; -case InfoBarType::Danger: // red; #D8000C/216,0,12; #FFBABA/255,186,186 +case InfoBarType::Danger: // red; #7A0006/122,0,6; #FFBABA/255,186,186 rBackgroundColor = basegfx::BColor(1.0,0.729,0.729); -rForegroundColor = basegfx::BColor(0.847,0.0,0.047); -rMessageColor = basegfx::BColor(0.847,0.0,0.047); +rForegroundColor = basegfx::BColor(0.478,0.0,0.024); break; }//switch ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: sc/source
sc/source/ui/navipi/navipi.cxx |6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) New commits: commit cfa0b631d00f1c17d15646ddcf78093b7f4df03b Author: Markus Mohrhard Date: Thu Jan 11 22:42:07 2018 +0100 shapes provide their name through the container::XNamed interface, tdf#114932 This is actually a problem introduced by 1c80246e5ff8aeb3e05384d86766a56aa878c7be and not by 5ee141ee2fb77c3cc452ac656235d7e83e15072c as mentioned in the bug report. Change-Id: I5f4032c13cf5eac3e515ada10b9bfa87598da438 Reviewed-on: https://gerrit.libreoffice.org/47841 Tested-by: Jenkins Reviewed-by: Markus Mohrhard diff --git a/sc/source/ui/navipi/navipi.cxx b/sc/source/ui/navipi/navipi.cxx index a9e650230473..46fc019c6618 100644 --- a/sc/source/ui/navipi/navipi.cxx +++ b/sc/source/ui/navipi/navipi.cxx @@ -809,9 +809,9 @@ void ScNavigatorDlg::UpdateSelection() uno::Reference< drawing::XShape > xShape; if( xIndexAccess->getByIndex(0) >>= xShape ) { -uno::Reference< beans::XPropertySet > xProps( xShape, uno::UNO_QUERY_THROW ); -OUString sName; -if( ( xProps->getPropertyValue("Name") >>= sName ) && !sName.isEmpty() ) +uno::Reference< container::XNamed > xNamed( xShape, uno::UNO_QUERY_THROW ); +OUString sName = xNamed->getName(); +if (!sName.isEmpty()) { aLbEntries->SelectEntryByName( ScContentId::DRAWING, sName ); } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'feature/gtk3_kde5' - configure.ac
configure.ac |4 1 file changed, 4 insertions(+) New commits: commit a8f901f6bb2bd0d34d98d4ca23b6cf39c93cbd47 Author: Rene Engelhard Date: Sat Jan 13 16:02:52 2018 + check for boost/process/child.hpp in configure.ac if --enable-gtk3-kde5 Change-Id: Idcd2931415558b41f94eb12a01f350f1ab53d134 diff --git a/configure.ac b/configure.ac index 3a85253eef6c..8393a4335e44 100644 --- a/configure.ac +++ b/configure.ac @@ -8686,6 +8686,10 @@ if test "$with_system_boost" = "yes"; then [AC_MSG_ERROR(boost/shared_ptr.hpp not found. install boost)], []) AC_CHECK_HEADER(boost/spirit/include/classic_core.hpp, [], [AC_MSG_ERROR(boost/spirit/include/classic_core.hpp not found. install boost >= 1.36)], []) +if test "x$enable_gtk3_kde5" = "xyes"; then +AC_CHECK_HEADER(boost/process/child.hpp, [], + [AC_MSG_ERROR(boost/process/child.hpp not found. install boost >= 1.64)], []) +fi CXXFLAGS=$save_CXXFLAGS AC_LANG_POP([C++]) # this is in m4/ax_boost_base.m4 ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: basegfx/source
basegfx/source/polygon/b3dpolygon.cxx | 96 +- 1 file changed, 27 insertions(+), 69 deletions(-) New commits: commit f8fc4f4f4e0a5ccbdae4f6d39c80a3533e4ce507 Author: Noel Grandin Date: Thu Jan 11 16:02:55 2018 +0200 loplugin:useuniqueptr in ImplB3DPolygon Change-Id: I9aae095702246d1b0fca5282874de5e0a0efcd60 Reviewed-on: https://gerrit.libreoffice.org/47792 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/basegfx/source/polygon/b3dpolygon.cxx b/basegfx/source/polygon/b3dpolygon.cxx index ed564228e0fb..0a78614f4320 100644 --- a/basegfx/source/polygon/b3dpolygon.cxx +++ b/basegfx/source/polygon/b3dpolygon.cxx @@ -706,15 +706,15 @@ class ImplB3DPolygon // The BColor vector. This vectors are created on demand // and may be zero. -BColorArray*mpBColors; +std::unique_ptrmpBColors; // The Normals vector. This vectors are created on demand // and may be zero. -NormalsArray3D* mpNormals; +std::unique_ptr mpNormals; // The TextureCoordinates vector. This vectors are created on demand // and may be zero. -TextureCoordinate2D*mpTextureCoordinates; +std::unique_ptrmpTextureCoordinates; // The calculated plane normal. mbPlaneNormalValid says if it's valid. ::basegfx::B3DVectormaPlaneNormal; @@ -761,17 +761,17 @@ public: // complete initialization using copy if(rToBeCopied.mpBColors && rToBeCopied.mpBColors->isUsed()) { -mpBColors = new BColorArray(*rToBeCopied.mpBColors); +mpBColors.reset( new BColorArray(*rToBeCopied.mpBColors) ); } if(rToBeCopied.mpNormals && rToBeCopied.mpNormals->isUsed()) { -mpNormals = new NormalsArray3D(*rToBeCopied.mpNormals); +mpNormals.reset( new NormalsArray3D(*rToBeCopied.mpNormals) ); } if(rToBeCopied.mpTextureCoordinates && rToBeCopied.mpTextureCoordinates->isUsed()) { -mpTextureCoordinates = new TextureCoordinate2D(*rToBeCopied.mpTextureCoordinates); +mpTextureCoordinates.reset( new TextureCoordinate2D(*rToBeCopied.mpTextureCoordinates) ); } } @@ -787,59 +787,35 @@ public: // complete initialization using partly copy if(rToBeCopied.mpBColors && rToBeCopied.mpBColors->isUsed()) { -mpBColors = new BColorArray(*rToBeCopied.mpBColors, nIndex, nCount); +mpBColors.reset( new BColorArray(*rToBeCopied.mpBColors, nIndex, nCount) ); if(!mpBColors->isUsed()) { -delete mpBColors; -mpBColors = nullptr; +mpBColors.reset(); } } if(rToBeCopied.mpNormals && rToBeCopied.mpNormals->isUsed()) { -mpNormals = new NormalsArray3D(*rToBeCopied.mpNormals, nIndex, nCount); +mpNormals.reset( new NormalsArray3D(*rToBeCopied.mpNormals, nIndex, nCount) ); if(!mpNormals->isUsed()) { -delete mpNormals; -mpNormals = nullptr; +mpNormals.reset(); } } if(rToBeCopied.mpTextureCoordinates && rToBeCopied.mpTextureCoordinates->isUsed()) { -mpTextureCoordinates = new TextureCoordinate2D(*rToBeCopied.mpTextureCoordinates, nIndex, nCount); +mpTextureCoordinates.reset( new TextureCoordinate2D(*rToBeCopied.mpTextureCoordinates, nIndex, nCount) ); if(!mpTextureCoordinates->isUsed()) { -delete mpTextureCoordinates; -mpTextureCoordinates = nullptr; +mpTextureCoordinates.reset(); } } } -~ImplB3DPolygon() -{ -if(mpBColors) -{ -delete mpBColors; -mpBColors = nullptr; -} - -if(mpNormals) -{ -delete mpNormals; -mpNormals = nullptr; -} - -if(mpTextureCoordinates) -{ -delete mpTextureCoordinates; -mpTextureCoordinates = nullptr; -} -} - sal_uInt32 count() const { return maPoints.count(); @@ -1018,7 +994,7 @@ public: { if(!rValue.equalZero()) { -mpBColors = new BColorArray(maPoints.count()); +mpBColors.reset( new BColorArray(maPoints.count()) ); mpBColors->setBColor(nIndex, rValue); } } @@ -1028,8 +1004,7 @@ public: if(!mpBColors->isUsed()) { -delete mpBColors; -mpBColors = nullptr; +mpBColors.reset(); } } } @@ -1041,11 +1016,7 @@ public:
[Libreoffice-commits] core.git: lotuswordpro/source
lotuswordpro/source/filter/lwpgrfobj.cxx |4 1 file changed, 4 insertions(+) New commits: commit 0ebbcec217a9774874f8880171474e0dc710f27a Author: Caolán McNamara Date: Sat Jan 13 14:41:04 2018 + ofz#5281 Divide-by-zero Change-Id: I8ce33727901def27b12981281de6cb011e9f14f3 diff --git a/lotuswordpro/source/filter/lwpgrfobj.cxx b/lotuswordpro/source/filter/lwpgrfobj.cxx index 6e737a2fba16..5bcc918187d2 100644 --- a/lotuswordpro/source/filter/lwpgrfobj.cxx +++ b/lotuswordpro/source/filter/lwpgrfobj.cxx @@ -557,6 +557,8 @@ void LwpGraphicObject::CreateGrafObject() bool sal_bCropped = false; if (fSclGrafWidth > fDisFrameWidth) { +if (fXRatio == 0.0) +throw o3tl::divide_by_zero(); fClipWidth = (fSclGrafWidth-fDisFrameWidth ) / 2 / fXRatio; sal_bCropped = true; } @@ -564,6 +566,8 @@ void LwpGraphicObject::CreateGrafObject() // need vertical crop? if (fSclGrafHeight > fDisFrameHeight) { +if (fYRatio == 0.0) +throw o3tl::divide_by_zero(); fClipHeight = (fSclGrafHeight-fDisFrameHeight ) / 2 / fYRatio; sal_bCropped = true; } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: include/sfx2 sc/inc sc/source
include/sfx2/infobar.hxx |2 sc/inc/strings.hrc |2 sc/source/ui/docshell/docsh4.cxx | 91 --- sc/source/ui/inc/docsh.hxx |2 4 files changed, 62 insertions(+), 35 deletions(-) New commits: commit ff5cb6cb34e42b290affc75703a93de1d24d0bc6 Author: Caolán McNamara Date: Fri Jan 12 16:12:59 2018 + turn update links warning dialog into an infobar Change-Id: Ib53c21d9ea76af11ed9af2115af7cd617c0f149b Reviewed-on: https://gerrit.libreoffice.org/47823 Tested-by: Jenkins Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara diff --git a/include/sfx2/infobar.hxx b/include/sfx2/infobar.hxx index 23953a1a7bf7..ac8c43e75b4b 100644 --- a/include/sfx2/infobar.hxx +++ b/include/sfx2/infobar.hxx @@ -46,7 +46,7 @@ class SFX2_DLLPUBLIC SfxInfoBarContainerChild : public SfxChildWindow /** Class representing a single InfoBar to be added in a SfxInfoBarContainerWindow. */ -class SfxInfoBarWindow : public vcl::Window +class SFX2_DLLPUBLIC SfxInfoBarWindow : public vcl::Window { private: OUString m_sId; diff --git a/sc/inc/strings.hrc b/sc/inc/strings.hrc index 5491a39eedbf..2d3ad92c3c6b 100644 --- a/sc/inc/strings.hrc +++ b/sc/inc/strings.hrc @@ -328,6 +328,8 @@ #define STR_ZTEST_Z_CRITICAL_ONE_TAIL NC_("STR_ZTEST_Z_CRITICAL_ONE_TAIL", "z Critical one-tail") #define STR_ZTEST_P_TWO_TAIL NC_("STR_ZTEST_P_TWO_TAIL", "P (Z<=z) two-tail") #define STR_ZTEST_Z_CRITICAL_TWO_TAIL NC_("STR_ZTEST_Z_CRITICAL_TWO_TAIL", "z Critical two-tail") +/*infobar for allowing links to update or not*/ +#define STR_ENABLE_CONTENT NC_("STR_ENABLE_CONTENT", "Enable Content") #endif diff --git a/sc/source/ui/docshell/docsh4.cxx b/sc/source/ui/docshell/docsh4.cxx index 9534919842b7..a847445f6051 100644 --- a/sc/source/ui/docshell/docsh4.cxx +++ b/sc/source/ui/docshell/docsh4.cxx @@ -32,6 +32,7 @@ using namespace ::com::sun::star; #include #include #include +#include #include #include #include @@ -112,6 +113,40 @@ using namespace ::com::sun::star; #include #include +void ScDocShell::ReloadAllLinks() +{ +aDocument.SetLinkFormulaNeedingCheck(false); +getEmbeddedObjectContainer().setUserAllowsLinkUpdate(true); + +ReloadTabLinks(); +aDocument.UpdateExternalRefLinks(GetActiveDialogParent()); + +bool bAnyDde = aDocument.GetDocLinkManager().updateDdeOrOleOrWebServiceLinks(GetActiveDialogParent()); + +if (bAnyDde) +{ +// calculate formulas and paint like in the TrackTimeHdl +aDocument.TrackFormulas(); +Broadcast(SfxHint(SfxHintId::ScDataChanged)); + +// Should FID_DATACHANGED become asynchronous some time +// (e.g., with Invalidate at Window), an update needs to be forced here. +} + +aDocument.UpdateAreaLinks(); +} + +IMPL_LINK_NOARG( ScDocShell, ReloadAllLinksHdl, Button*, void ) +{ +ReloadAllLinks(); + +ScTabViewShell* pViewSh = GetBestViewShell(); +SfxViewFrame* pViewFrame = pViewSh ? pViewSh->GetFrame() : nullptr; +if (pViewFrame) +pViewFrame->RemoveInfoBar("enablecontent"); +SAL_WARN_IF(!pViewFrame, "sc", "expected there to be a ViewFrame"); +} + void ScDocShell::Execute( SfxRequest& rReq ) { const SfxItemSet* pReqArgs = rReq.GetArgs(); @@ -408,14 +443,10 @@ void ScDocShell::Execute( SfxRequest& rReq ) break; case SID_UPDATETABLINKS: { -comphelper::EmbeddedObjectContainer& rEmbeddedObjectContainer = getEmbeddedObjectContainer(); -rEmbeddedObjectContainer.setUserAllowsLinkUpdate(true); - ScDocument& rDoc = GetDocument(); ScLkUpdMode nSet = rDoc.GetLinkMode(); -sal_uInt16 nDlgRet=RET_NO; if(nSet==LM_UNKNOWN) { ScAppOptions aAppOptions=SC_MOD()->GetAppOptions(); @@ -441,43 +472,35 @@ void ScDocShell::Execute( SfxRequest& rReq ) nSet = LM_NEVER; } -if(nSet==LM_ON_DEMAND) +if (nSet == LM_ALWAYS) { -ScopedVclPtrInstance aBox( GetActiveDialogParent(), MessBoxStyle::YesNo | MessBoxStyle::DefaultYes, - ScGlobal::GetRscString(STR_RELOAD_TABLES) ); - -nDlgRet=aBox->Execute(); +ReloadAllLinks(); +rReq.Done(); } - -if (nDlgRet == RET_YES || nSet==LM_ALWAYS) +else if (nSet == LM_NEVER) { -ReloadTabLinks(); -aDocument.UpdateExternalRefLinks(GetActiveDialogParent()); - -bool bAnyDde = aDocument.GetDocLinkManager().updateDdeOrOleOrWebServiceLinks(GetActiveDialogParent()); - -
[Libreoffice-commits] core.git: Branch 'private/swe/libreoffice-5-2+backports' - chart2/source offapi/com offapi/UnoApi_offapi.mk sc/inc sc/source
chart2/source/controller/dialogs/Strings.src|2 +- chart2/source/controller/main/ChartController.cxx | 10 +- chart2/source/controller/main/ControllerCommandDispatch.cxx |2 +- offapi/UnoApi_offapi.mk |2 +- offapi/com/sun/star/chart2/XDataProviderAccess.idl |6 -- sc/inc/docuno.hxx |6 +++--- sc/source/ui/unoobj/docuno.cxx |6 +++--- 7 files changed, 18 insertions(+), 16 deletions(-) New commits: commit 1b607acd8bfb895d821cda09128eb24a8e2ad80b Author: Vasily Melenchuk Date: Fri Jan 12 12:20:17 2018 +0300 tdf#113572: later upstream changes backport Change-Id: I0cb73fb9299edbbd06f311a68a6534ad83b05728 Reviewed-on: https://gerrit.libreoffice.org/47790 Reviewed-by: Thorsten Behrens Tested-by: Thorsten Behrens diff --git a/chart2/source/controller/dialogs/Strings.src b/chart2/source/controller/dialogs/Strings.src index 96f7f5598b2a..4567764656a4 100644 --- a/chart2/source/controller/dialogs/Strings.src +++ b/chart2/source/controller/dialogs/Strings.src @@ -36,7 +36,7 @@ String STR_DLG_STEPPED_LINE_PROPERTIES String STR_DLG_REMOVE_DATA_TABLE { -Text [ en-US ] = "Do you want to delete data table and switch to data ranges?" ; +Text [ en-US ] = "This chart currently contains an internal data table. Do you want to proceed, deleting the internal data table, and set a new data range?" ; }; String STR_PAGE_CHARTTYPE diff --git a/chart2/source/controller/main/ChartController.cxx b/chart2/source/controller/main/ChartController.cxx index f87f5c74f798..c19edd0bd471 100644 --- a/chart2/source/controller/main/ChartController.cxx +++ b/chart2/source/controller/main/ChartController.cxx @@ -66,7 +66,7 @@ #include #include #include -#include +#include #include #include @@ -1407,7 +1407,7 @@ void ChartController::executeDispatch_SourceData() { // Check if we will able to create data provider later Reference< lang::XServiceInfo > xParentServiceInfo( rModel.getParent(), uno::UNO_QUERY ); -if ( !xParentServiceInfo.is() || !xParentServiceInfo->supportsService("com.sun.star.chart2.XDataProviderCreator") ) +if ( !xParentServiceInfo.is() || !xParentServiceInfo->supportsService("com.sun.star.chart2.XDataProviderAccess") ) return; SolarMutexGuard aSolarGuard; @@ -1422,14 +1422,14 @@ void ChartController::executeDispatch_SourceData() rModel.removeDataProviders(); // Ask parent document to create new data provider -css::uno::Reference< com::sun::star::chart2::XDataProviderCreator > xCreatorDoc( +css::uno::Reference< com::sun::star::chart2::XDataProviderAccess > xCreatorDoc( rModel.getParent(), uno::UNO_QUERY ); -OSL_ENSURE( xCreatorDoc.is(), "Invalid XDataProviderCreator" ); +SAL_WARN_IF( !xCreatorDoc.is(), "chart2.main", "Invalid XDataProviderAccess" ); if ( xCreatorDoc.is() ) { uno::Reference< data::XDataProvider > xDataProvider = xCreatorDoc->createDataProvider(); -OSL_ENSURE( xCreatorDoc.is(), "Data provider was not created" ); +SAL_WARN_IF( !xDataProvider.is(), "chart2.main", "Data provider was not created" ); if ( xDataProvider.is() ) { rModel.attachDataProvider(xDataProvider); diff --git a/chart2/source/controller/main/ControllerCommandDispatch.cxx b/chart2/source/controller/main/ControllerCommandDispatch.cxx index 63e56bdeb156..cb0fb6f4a8ba 100644 --- a/chart2/source/controller/main/ControllerCommandDispatch.cxx +++ b/chart2/source/controller/main/ControllerCommandDispatch.cxx @@ -554,7 +554,7 @@ void ControllerCommandDispatch::updateCommandAvailability() OSL_ENSURE(xParentServiceInfo.is(), "Invalid XServiceInfo"); if ( xParentServiceInfo.is() ) { -bCanCreateDataProvider = xParentServiceInfo->supportsService("com.sun.star.chart2.XDataProviderCreator"); +bCanCreateDataProvider = xParentServiceInfo->supportsService("com.sun.star.chart2.XDataProviderAccess"); } } } diff --git a/offapi/UnoApi_offapi.mk b/offapi/UnoApi_offapi.mk index 4b040db1d6e1..16015ebb772e 100644 --- a/offapi/UnoApi_offapi.mk +++ b/offapi/UnoApi_offapi.mk @@ -2030,7 +2030,7 @@ $(eval $(call gb_UnoApi_add_idlfiles,offapi,com/sun/star/chart2,\ XCoordinateSystem \ XCoordinateSystemContainer \ XDataInterpreter \ - XDataProviderCreator \ + XDataProviderAccess \ XDataSeries \ XDataSeriesContainer \ XDefaultSizeTransmitter \ diff --git a/offapi/com/sun/star/chart2/XDataProviderCreator.idl b/offapi/com/sun/star/chart2/XDataProviderAccess.idl similarity index 90% rename from offapi/com/sun/star/chart2/XDataProviderCreator.idl rename to
[Libreoffice-commits] core.git: xmlsecurity/qa
xmlsecurity/qa/unit/signing/data/encryptedGPG.odt |binary xmlsecurity/qa/unit/signing/data/pubring.gpg |binary xmlsecurity/qa/unit/signing/data/secring.gpg |binary xmlsecurity/qa/unit/signing/data/trustdb.gpg |binary xmlsecurity/qa/unit/signing/signing.cxx | 13 + 5 files changed, 13 insertions(+) New commits: commit 8242c22f84cef1bbc8c385875b2da4713b542329 Author: Thorsten Behrens Date: Sat Jan 13 04:17:37 2018 +0100 gpg4libre: add initial unit test for encryption Load encrypted document w/ password-less key, don't fail. Change-Id: Id782dd865878ae7b8a60c7c80821b1370f6ac7e7 Reviewed-on: https://gerrit.libreoffice.org/47831 Reviewed-by: Thorsten Behrens Tested-by: Thorsten Behrens diff --git a/xmlsecurity/qa/unit/signing/data/encryptedGPG.odt b/xmlsecurity/qa/unit/signing/data/encryptedGPG.odt new file mode 100644 index ..9490a0ce58c5 Binary files /dev/null and b/xmlsecurity/qa/unit/signing/data/encryptedGPG.odt differ diff --git a/xmlsecurity/qa/unit/signing/data/pubring.gpg b/xmlsecurity/qa/unit/signing/data/pubring.gpg index 40a8d53fb401..007ea98afd55 100644 Binary files a/xmlsecurity/qa/unit/signing/data/pubring.gpg and b/xmlsecurity/qa/unit/signing/data/pubring.gpg differ diff --git a/xmlsecurity/qa/unit/signing/data/secring.gpg b/xmlsecurity/qa/unit/signing/data/secring.gpg index d98950c22ecd..f7626df5aee3 100644 Binary files a/xmlsecurity/qa/unit/signing/data/secring.gpg and b/xmlsecurity/qa/unit/signing/data/secring.gpg differ diff --git a/xmlsecurity/qa/unit/signing/data/trustdb.gpg b/xmlsecurity/qa/unit/signing/data/trustdb.gpg index c86bb02f3d79..1966b5374cfb 100644 Binary files a/xmlsecurity/qa/unit/signing/data/trustdb.gpg and b/xmlsecurity/qa/unit/signing/data/trustdb.gpg differ diff --git a/xmlsecurity/qa/unit/signing/signing.cxx b/xmlsecurity/qa/unit/signing/signing.cxx index 4d67cf429d1e..6efb6f02e029 100644 --- a/xmlsecurity/qa/unit/signing/signing.cxx +++ b/xmlsecurity/qa/unit/signing/signing.cxx @@ -106,6 +106,8 @@ public: void testODFBrokenStreamGPG(); /// Test a typical broken ODF signature where the XML dsig hash is corrupted. void testODFBrokenDsigGPG(); +/// Test loading an encrypted ODF document +void testODFEncryptedGPG(); #endif CPPUNIT_TEST_SUITE(SigningTest); CPPUNIT_TEST(testDescription); @@ -134,6 +136,7 @@ public: CPPUNIT_TEST(testODFUntrustedGoodGPG); CPPUNIT_TEST(testODFBrokenStreamGPG); CPPUNIT_TEST(testODFBrokenDsigGPG); +CPPUNIT_TEST(testODFEncryptedGPG); #endif CPPUNIT_TEST_SUITE_END(); @@ -732,6 +735,16 @@ void SigningTest::testODFBrokenDsigGPG() CPPUNIT_ASSERT(pObjectShell); CPPUNIT_ASSERT_EQUAL(static_cast(SignatureState::BROKEN), static_cast(pObjectShell->GetDocumentSignatureState())); } + +void SigningTest::testODFEncryptedGPG() +{ +createDoc(m_directories.getURLFromSrc(DATA_DIRECTORY) + "encryptedGPG.odt"); +SfxBaseModel* pBaseModel = dynamic_cast(mxComponent.get()); +CPPUNIT_ASSERT(pBaseModel); +SfxObjectShell* pObjectShell = pBaseModel->GetObjectShell(); +CPPUNIT_ASSERT(pObjectShell); +} + #endif void SigningTest::registerNamespaces(xmlXPathContextPtr& pXmlXpathCtx) ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: package/inc package/source
package/inc/ZipPackageEntry.hxx|1 + package/inc/ZipPackageFolder.hxx |2 ++ package/inc/ZipPackageStream.hxx |1 + package/source/zipapi/ZipFile.cxx |9 - package/source/zippackage/ZipPackage.cxx |7 +-- package/source/zippackage/ZipPackageFolder.cxx | 10 ++ package/source/zippackage/ZipPackageStream.cxx |3 +-- 7 files changed, 24 insertions(+), 9 deletions(-) New commits: commit 39805f65189cd0085fe8f1071ae75cdec450c65e Author: Thorsten Behrens Date: Thu Jan 11 23:47:24 2018 +0100 tdf#114550 don't use PBKDF2 in package for gpg encryption No need to derive password-based key, simply skip rtl_digest_PBKDF2 for the gpg4libre case. Also pass down PBKDF2 iteration count from ZipPackage, which knows about GPG encryption, instead of just always setting it in package stream. We otherwise needlessly iterate session key also for gpg encrypted storages. Change-Id: Ic96b2193f8541bbd109795fb9c0212a0a10c7344 Reviewed-on: https://gerrit.libreoffice.org/47783 Tested-by: Jenkins Reviewed-by: Thorsten Behrens diff --git a/package/inc/ZipPackageEntry.hxx b/package/inc/ZipPackageEntry.hxx index 300b5f25ea67..5e0064f9bf7e 100644 --- a/package/inc/ZipPackageEntry.hxx +++ b/package/inc/ZipPackageEntry.hxx @@ -69,6 +69,7 @@ public: std::vector < css::uno::Sequence < css::beans::PropertyValue > > &rManList, ZipOutputStream & rZipOut, const css::uno::Sequence < sal_Int8 >& rEncryptionKey, +sal_Int32 nPBKDF2IterationCount, const rtlRandomPool &rRandomPool ) = 0; void clearParent() diff --git a/package/inc/ZipPackageFolder.hxx b/package/inc/ZipPackageFolder.hxx index 0fad51f72ba2..1f65b2ca297e 100644 --- a/package/inc/ZipPackageFolder.hxx +++ b/package/inc/ZipPackageFolder.hxx @@ -73,6 +73,7 @@ public: std::vector < css::uno::Sequence < css::beans::PropertyValue > > &rManList, ZipOutputStream & rZipOut, const css::uno::Sequence < sal_Int8 >& rEncryptionKey, +sal_Int32 nPBKDF2IterationCount, const rtlRandomPool &rRandomPool ) override; // Recursive functions @@ -82,6 +83,7 @@ public: std::vector < css::uno::Sequence < css::beans::PropertyValue > > &rManList, ZipOutputStream & rZipOut, const css::uno::Sequence< sal_Int8 > &rEncryptionKey, +sal_Int32 nPBKDF2IterationCount, const rtlRandomPool & rRandomPool) const; // XNameContainer diff --git a/package/inc/ZipPackageStream.hxx b/package/inc/ZipPackageStream.hxx index b691370bf7e0..014898115517 100644 --- a/package/inc/ZipPackageStream.hxx +++ b/package/inc/ZipPackageStream.hxx @@ -133,6 +133,7 @@ public: std::vector < css::uno::Sequence < css::beans::PropertyValue > > &rManList, ZipOutputStream & rZipOut, const css::uno::Sequence < sal_Int8 >& rEncryptionKey, +sal_Int32 nPBKDF2IterationCount, const rtlRandomPool &rRandomPool ) override; void setZipEntryOnLoading( const ZipEntry &rInEntry); diff --git a/package/source/zipapi/ZipFile.cxx b/package/source/zipapi/ZipFile.cxx index 3d4abb65a8f9..1d10a56aaf9c 100644 --- a/package/source/zipapi/ZipFile.cxx +++ b/package/source/zipapi/ZipFile.cxx @@ -170,7 +170,14 @@ uno::Reference< xml::crypto::XCipherContext > ZipFile::StaticGetCipher( const un } uno::Sequence< sal_Int8 > aDerivedKey( xEncryptionData->m_nDerivedKeySize ); -if ( rtl_Digest_E_None != rtl_digest_PBKDF2( reinterpret_cast< sal_uInt8* >( aDerivedKey.getArray() ), +if ( !xEncryptionData->m_nIterationCount && + xEncryptionData->m_nDerivedKeySize == xEncryptionData->m_aKey.getLength() ) +{ +// gpg4libre: no need to derive key, m_aKey is already +// usable as symmetric session key +aDerivedKey = xEncryptionData->m_aKey; +} +else if ( rtl_Digest_E_None != rtl_digest_PBKDF2( reinterpret_cast< sal_uInt8* >( aDerivedKey.getArray() ), aDerivedKey.getLength(), reinterpret_cast< const sal_uInt8 * > (xEncryptionData->m_aKey.getConstArray() ), xEncryptionData->m_aKey.getLength(), diff --git a/package/source/zippackage/ZipPackage.cxx b/package/source/zippackage/ZipPackage.cxx index 967e0eded056..2a918c8df630 100644 --- a/package/source/zippackage/ZipPackage.cxx +++ b/package/source/zippackage/ZipPackage.cxx @@ -287,6 +287,7 @@ void ZipPackage::parseManifest()
[Libreoffice-commits] core.git: package/source
package/source/zipapi/XUnbufferedStream.cxx |5 - 1 file changed, 4 insertions(+), 1 deletion(-) New commits: commit 6df0c7bc230a424f5aefe583b591df70c6273b6f Author: Thorsten Behrens Date: Thu Jan 11 23:38:35 2018 +0100 tdf#114550 recognize sym key & init vec as valid f/ decrypt Otherwise package code would _only_ try to decrypt for salt and iteration count present, which does not make sense for gpg. Change-Id: Ie366f086a3c14d6b54b91b4edee8cfef1a42c44b Reviewed-on: https://gerrit.libreoffice.org/47782 Tested-by: Jenkins Reviewed-by: Thorsten Behrens diff --git a/package/source/zipapi/XUnbufferedStream.cxx b/package/source/zipapi/XUnbufferedStream.cxx index 162bab6d7580..d20b46195c3a 100644 --- a/package/source/zipapi/XUnbufferedStream.cxx +++ b/package/source/zipapi/XUnbufferedStream.cxx @@ -78,7 +78,10 @@ XUnbufferedStream::XUnbufferedStream( if (mnZipSize < 0) throw ZipIOException("The stream seems to be broken!"); -bool bHaveEncryptData = rData.is() && rData->m_aSalt.getLength() && rData->m_aInitVector.getLength() && rData->m_nIterationCount != 0; +bool bHaveEncryptData = rData.is() && rData->m_aInitVector.getLength() && +((rData->m_aSalt.getLength() && rData->m_nIterationCount != 0) + || + rData->m_aKey.getLength()); bool bMustDecrypt = nStreamMode == UNBUFF_STREAM_DATA && bHaveEncryptData && bIsEncrypted; if ( bMustDecrypt ) ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: comphelper/source
comphelper/source/misc/storagehelper.cxx |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) New commits: commit eea58228eabec225cfec49932ae0c7b0d79fdc7f Author: Thorsten Behrens Date: Thu Jan 11 23:35:54 2018 +0100 tdf#114550 use 32 bit random session key for gpg encryption Otherwise we'd need to pointlessly spread it to 32 bit down the road for AES. Change-Id: I7303be71fd855aa454d07fcae04d7f42e3c9cd9c Reviewed-on: https://gerrit.libreoffice.org/47781 Reviewed-by: Thorsten Behrens Tested-by: Thorsten Behrens diff --git a/comphelper/source/misc/storagehelper.cxx b/comphelper/source/misc/storagehelper.cxx index dd52b7f6181a..c312b397974f 100644 --- a/comphelper/source/misc/storagehelper.cxx +++ b/comphelper/source/misc/storagehelper.cxx @@ -448,8 +448,8 @@ uno::Sequence< beans::NamedValue > OStorageHelper::CreateGpgPackageEncryptionDat rtlRandomPool aRandomPool = rtl_random_createPool(); -// get 16 random chars out of it -uno::Sequence < sal_Int8 > aVector(16); +// get 32 random chars out of it +uno::Sequence < sal_Int8 > aVector(32); rtl_random_getBytes( aRandomPool, aVector.getArray(), aVector.getLength() ); rtl_random_destroyPool(aRandomPool); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: comphelper/source include/comphelper package/source sfx2/source
comphelper/source/misc/docpasswordhelper.cxx | 96 +++ include/comphelper/docpasswordhelper.hxx |3 package/source/xstor/xstorage.cxx|4 - package/source/zippackage/ZipPackage.cxx | 55 ++- sfx2/source/appl/appopen.cxx |9 ++ 5 files changed, 164 insertions(+), 3 deletions(-) New commits: commit ca6f3d7a56a3a028618413a811775328449264bf Author: Thorsten Behrens Date: Thu Dec 14 13:23:04 2017 +0100 gpg4libre: open encrypted files also via gpg Adds code to sfx2 and package to try gpg4libre for extracting session keys, and use them in turn to decrypt odf storage. Change-Id: I1f626143e6c8443b4ad0c4fc5bdbd5ab8d56a451 Reviewed-on: https://gerrit.libreoffice.org/47780 Tested-by: Jenkins Reviewed-by: Thorsten Behrens diff --git a/comphelper/source/misc/docpasswordhelper.cxx b/comphelper/source/misc/docpasswordhelper.cxx index 13ab45f043af..81e1e996816f 100644 --- a/comphelper/source/misc/docpasswordhelper.cxx +++ b/comphelper/source/misc/docpasswordhelper.cxx @@ -17,17 +17,28 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ +#include + #include #include +#include #include #include +#include #include #include #include #include +#if HAVE_FEATURE_GPGME +# include +# include +# include +# include +#endif + using ::com::sun::star::uno::Sequence; using ::com::sun::star::uno::Exception; using ::com::sun::star::uno::Reference; @@ -418,6 +429,91 @@ Sequence< sal_Int8 > DocPasswordHelper::GetXLHashAsSequence( return (eResult == DocPasswordVerifierResult::OK) ? aEncData : uno::Sequence< beans::NamedValue >(); } +/*static*/ uno::Sequence< css::beans::NamedValue > +DocPasswordHelper::decryptGpgSession( +const uno::Sequence< uno::Sequence< beans::NamedValue > >& rGpgProperties ) +{ +#if HAVE_FEATURE_GPGME +if ( !rGpgProperties.hasElements() ) +return uno::Sequence< beans::NamedValue >(); + +uno::Sequence< beans::NamedValue > aEncryptionData(1); +std::unique_ptr ctx; +GpgME::initializeLibrary(); +GpgME::Error err = GpgME::checkEngine(GpgME::OpenPGP); +if (err) +throw uno::RuntimeException("The GpgME library failed to initialize for the OpenPGP protocol."); + +ctx.reset( GpgME::Context::createForProtocol(GpgME::OpenPGP) ); +if (ctx == nullptr) +throw uno::RuntimeException("The GpgME library failed to initialize for the OpenPGP protocol."); +ctx->setArmor(false); + +const uno::Sequence < beans::NamedValue > *pSequence = rGpgProperties.getConstArray(); +const sal_Int32 nLength = rGpgProperties.getLength(); +for ( sal_Int32 i = 0; i < nLength ; i++, pSequence++ ) +{ +const beans::NamedValue *pValues = pSequence->getConstArray(); +if ( pSequence->getLength() == 3 ) +{ +// take CipherValue and try to decrypt that - stop after +// the first successful decryption + +// ctx is setup now, let's decrypt the lot! +uno::Sequence < sal_Int8 > aVector; +pValues[2].Value >>= aVector; + +GpgME::Data cipher( +reinterpret_cast(aVector.getConstArray()), +size_t(aVector.getLength()), false); +GpgME::Data plain; + +GpgME::DecryptionResult crypt_res = ctx->decrypt( +cipher, plain); + +// NO_SECKEY -> skip +// BAD_PASSPHRASE -> retry? + +off_t result = plain.seek(0,SEEK_SET); +(void) result; +assert(result == 0); +int len=0, curr=0; char buf; +while( (curr=plain.read(&buf, 1)) ) +len += curr; + +if(crypt_res.error() || !len) +continue; // can't use this key, take next one + +uno::Sequence < sal_Int8 > aKeyValue(len); +result = plain.seek(0,SEEK_SET); +assert(result == 0); +if( plain.read(aKeyValue.getArray(), len) != len ) +throw uno::RuntimeException("The GpgME library failed to read the encrypted value."); + +SAL_INFO("comphelper.crypto", "Extracted gpg session key of length: " << len); + +aEncryptionData[0].Name = PACKAGE_ENCRYPTIONDATA_SHA256UTF8; +aEncryptionData[0].Value <<= aKeyValue; +break; +} +} + +if ( aEncryptionData[0].Value.hasValue() ) +{ +uno::Sequence< beans::NamedValue > aContainer(2); +aContainer[0].Name = "GpgInfos"; +aContainer[0].Value <<= rGpgProperties; +aContainer[1].Name = "EncryptionKey"; +aContainer[1].Value <<= aEncryptionData; + +return aContainer; +} +#else +(void)rGpgProperties; +#endif +return uno::Sequence< beans::NamedValue >(); +} + } // namespace comphelper /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/include/comphelper/
[Libreoffice-commits] core.git: package/source
package/source/manifest/ManifestImport.cxx | 172 - package/source/manifest/ManifestImport.hxx | 25 2 files changed, 196 insertions(+), 1 deletion(-) New commits: commit d17bff6e0324dfa013681efd7e0107d3cd5ad2be Author: Thorsten Behrens Date: Sun Dec 10 23:40:00 2017 +0100 gpg4libre: import PGP encryption manifest Change-Id: Iadd7f8f1194299cb50907d8594114c89c668ebd0 Reviewed-on: https://gerrit.libreoffice.org/46462 Reviewed-by: Thorsten Behrens Tested-by: Thorsten Behrens diff --git a/package/source/manifest/ManifestImport.cxx b/package/source/manifest/ManifestImport.cxx index 5ecd8c1cffcd..98a9d61128b5 100644 --- a/package/source/manifest/ManifestImport.cxx +++ b/package/source/manifest/ManifestImport.cxx @@ -34,6 +34,7 @@ using namespace std; ManifestImport::ManifestImport( vector < Sequence < PropertyValue > > & rNewManVector ) : bIgnoreEncryptData( false ) +, bPgpEncryption ( false ) , nDerivedKeySize( 0 ) , rManVector ( rNewManVector ) @@ -57,6 +58,17 @@ ManifestImport::ManifestImport( vector < Sequence < PropertyValue > > & rNewManV , sChecksumAttribute( ATTRIBUTE_CHECKSUM ) , sChecksumTypeAttribute( ATTRIBUTE_CHECKSUM_TYPE ) +, sKeyInfoElement ( ELEMENT_ENCRYPTED_KEYINFO ) +, sManifestKeyInfoElement ( ELEMENT_MANIFEST_KEYINFO ) +, sEncryptedKeyElement ( ELEMENT_ENCRYPTEDKEY ) +, sEncryptionMethodElement ( ELEMENT_ENCRYPTIONMETHOD ) +, sPgpDataElement ( ELEMENT_PGPDATA ) +, sPgpKeyIDElement ( ELEMENT_PGPKEYID ) +, sPGPKeyPacketElement ( ELEMENT_PGPKEYPACKET ) +, sAlgorithmAttribute ( ATTRIBUTE_ALGORITHM ) +, sCipherDataElement( ELEMENT_CIPHERDATA ) +, sCipherValueElement ( ELEMENT_CIPHERVALUE ) + , sFullPathProperty ( "FullPath" ) , sMediaTypeProperty( "MediaType" ) , sVersionProperty ( "Version" ) @@ -126,6 +138,80 @@ void ManifestImport::doFileEntry(StringHashMap &rConvertedAttribs) } } +void ManifestImport::doKeyInfoEntry(StringHashMap &) +{ +} + +void ManifestImport::doEncryptedKey(StringHashMap &) +{ +aKeyInfoSequence.clear(); +aKeyInfoSequence.resize(3); +} + +void ManifestImport::doEncryptionMethod(StringHashMap &rConvertedAttribs) +{ +OUString aString = rConvertedAttribs[sAlgorithmAttribute]; +if ( aKeyInfoSequence.size() != 3 + || aString != "http://www.w3.org/2001/04/xmlenc#rsa-oaep-mgf1p"; ) +{ +bIgnoreEncryptData = true; +} +} + +void ManifestImport::doEncryptedKeyInfo(StringHashMap &) +{ +} + +void ManifestImport::doEncryptedCipherData(StringHashMap &) +{ +} + +void ManifestImport::doEncryptedPgpData(StringHashMap &) +{ +} + +void ManifestImport::doEncryptedCipherValue() +{ +if ( aKeyInfoSequence.size() == 3 ) +{ +aKeyInfoSequence[2].Name = "CipherValue"; +uno::Sequence < sal_Int8 > aDecodeBuffer; +::sax::Converter::decodeBase64(aDecodeBuffer, aCurrentCharacters); +aKeyInfoSequence[2].Value <<= aDecodeBuffer; +aCurrentCharacters = ""; // consumed +} +else +bIgnoreEncryptData = true; +} + +void ManifestImport::doEncryptedKeyId() +{ +if ( aKeyInfoSequence.size() == 3 ) +{ +aKeyInfoSequence[0].Name = "KeyId"; +uno::Sequence < sal_Int8 > aDecodeBuffer; +::sax::Converter::decodeBase64(aDecodeBuffer, aCurrentCharacters); +aKeyInfoSequence[0].Value <<= aDecodeBuffer; +aCurrentCharacters = ""; // consumed +} +else +bIgnoreEncryptData = true; +} + +void ManifestImport::doEncryptedKeyPacket() +{ +if ( aKeyInfoSequence.size() == 3 ) +{ +aKeyInfoSequence[1].Name = "KeyPacket"; +uno::Sequence < sal_Int8 > aDecodeBuffer; +::sax::Converter::decodeBase64(aDecodeBuffer, aCurrentCharacters); +aKeyInfoSequence[1].Value <<= aDecodeBuffer; +aCurrentCharacters = ""; // consumed +} +else +bIgnoreEncryptData = true; +} + void ManifestImport::doEncryptionData(StringHashMap &rConvertedAttribs) { // If this element exists, then this stream is encrypted and we need @@ -214,6 +300,9 @@ void ManifestImport::doKeyDerivation(StringHashMap &rConvertedAttribs) aSequence[PKG_MNFST_DERKEYSIZE].Name = sDerivedKeySizeProperty; aSequence[PKG_MNFST_DERKEYSIZE].Value <<= nDerivedKeySize; +} else if ( bPgpEncryption ) { +if ( aString != "PGP" ) +bIgnoreEncryptData = true; } else bIgnoreEncryptData = true; } @@ -250,6 +339,8 @@ void SAL_CALL ManifestImport::startElement( const OUString& aName, const uno::Re case 2: { if (aConvertedName == sFileEntryElement) //manifest:file-entry doFileEntry(aConvertedAttribs); +else if (aConvertedName == sM
[Libreoffice-commits] core.git: 2 commits - ios/LibreOfficeLight ios/README
ios/LibreOfficeLight/LibreOfficeLight.xcodeproj/project.pbxproj |2 ios/README | 39 +++--- 2 files changed, 16 insertions(+), 25 deletions(-) New commits: commit 3c8ebbdca744d87fcc42f97b76e04cef5a7b5c1f Author: jan Iversen Date: Sat Jan 13 14:26:21 2018 +0100 iOS, debugged callback Callback now calls the swift function. It is time to see if we can do without the thread queue. Change-Id: If9a76c884ca7e5018243ae3f4bee20b61dbba40d diff --git a/ios/LibreOfficeLight/LibreOfficeLight.xcodeproj/project.pbxproj b/ios/LibreOfficeLight/LibreOfficeLight.xcodeproj/project.pbxproj index 650895263ca6..a0b303ce58a4 100644 --- a/ios/LibreOfficeLight/LibreOfficeLight.xcodeproj/project.pbxproj +++ b/ios/LibreOfficeLight/LibreOfficeLight.xcodeproj/project.pbxproj @@ -58,6 +58,7 @@ 397275391E77D9F1006ACDCC /* LibreOfficeLight.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = LibreOfficeLight.entitlements; sourceTree = ""; }; 3975A8C91FBD70EE00A87B3A /* LibreOfficeKit.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = LibreOfficeKit.h; path = ../../include/LibreOfficeKit/LibreOfficeKit.h; sourceTree = ""; }; 397868D71E59A3EA007F9248 /* en */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = en; path = en.lproj/LaunchScreen.xib; sourceTree = ""; }; + 397A9624200937990073F066 /* init.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = init.cxx; path = ../../desktop/source/lib/init.cxx; sourceTree = ""; }; 397E08FA1E597BD8001374E0 /* LibreOfficeLight.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = LibreOfficeLight.app; sourceTree = BUILT_PRODUCTS_DIR; }; 397E08FD1E597BD8001374E0 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = AppDelegate.swift; path = LibreOfficeLight/AppDelegate.swift; sourceTree = SOURCE_ROOT; }; 397E09021E597BD8001374E0 /* en */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = en; path = en.lproj/Main.storyboard; sourceTree = ""; }; @@ -114,6 +115,7 @@ 3956B72D1FAB3DBF00BF5DE4 /* extra */ = { isa = PBXGroup; children = ( + 397A9624200937990073F066 /* init.cxx */, 39E950521FC9842000D82C49 /* source */, 3975A8C91FBD70EE00A87B3A /* LibreOfficeKit.h */, ); commit f64ae9b0ba80dec1e3e16502debc947f30c31bf4 Author: jan Iversen Date: Sat Jan 13 10:30:38 2018 +0100 iOS, updated README Changed README to reflect dylib, and new structure Change-Id: I4230eed75572c0c0eefc059e284bfe92d5d9c506 diff --git a/ios/README b/ios/README index 6ad40d2ef8a4..a5433cc99a36 100644 --- a/ios/README +++ b/ios/README @@ -1,8 +1,5 @@ iOS app and LibreOfficeKit. --- LibreOfficeKit -prelink all LO libraries into one to facilitate easier linking - -- LibreOfficeLight a swift based UI, very much work in progress @@ -26,35 +23,27 @@ the 3 configurations of LO first, and then link against those. Due to the multiple workdirs a separate work directories are needed as follows: (names/locations can be changes, they are "linked" together by running autogen.sh) ./core - libreoffice git clone (name can be changed) - ./ios-arm64 - workdir for production, autogen.input: -standard + -#--enable-debug -#--enable-ios-simulator ---host=arm64-apple-darwin - ./ios-arm64-debug - workdir for debug on device, autogen.input: -standard + ---enable-debug -#--enable-ios-simulator ---host=arm64-apple-darwin - ./ios-simulator - workdir for simulator-debug, autogen.input: -standard + ---enable-debug ---enable-ios-simulator -#--host=arm64-apple-darwin + ./ios-arm64 - workdir for production + ./ios-arm64-debug - workdir for debug on device + ./ios-simulator - workdir for simulator-debug -- Steps to generate 1) copy ./core/distro-configs/LibreOfficeiOS.conf to autogen.input in ./ios-arm64, ./ios-arm64-debug, ./ios-simulator - Correct as per above, add your local setup (e.g. location of tarballs) + Correct as defined in the conf file, + add your local setup (e.g. location of tarballs) 2) run ../core/autogen.sh in ios-arm64, ios-arm64-debug and ios-simulator 3) run make in ios-arm64, ios-arm64-debug and ios-simulator this will generate core/loApp.xcconfig which prepares
[Libreoffice-commits] core.git: Branch 'libreoffice-6-0' - comphelper/source include/comphelper package/inc package/source sfx2/source xmlsecurity/qa
comphelper/source/misc/docpasswordhelper.cxx | 96 comphelper/source/misc/storagehelper.cxx |4 include/comphelper/docpasswordhelper.hxx |3 package/inc/ZipPackageEntry.hxx |1 package/inc/ZipPackageFolder.hxx |2 package/inc/ZipPackageStream.hxx |1 package/source/manifest/ManifestImport.cxx| 172 +- package/source/manifest/ManifestImport.hxx| 25 +++ package/source/xstor/xstorage.cxx |4 package/source/zipapi/XUnbufferedStream.cxx |5 package/source/zipapi/ZipFile.cxx |9 + package/source/zippackage/ZipPackage.cxx | 62 +++ package/source/zippackage/ZipPackageFolder.cxx| 10 - package/source/zippackage/ZipPackageStream.cxx|3 sfx2/source/appl/appopen.cxx |9 + xmlsecurity/qa/unit/signing/data/encryptedGPG.odt |binary xmlsecurity/qa/unit/signing/data/pubring.gpg |binary xmlsecurity/qa/unit/signing/data/secring.gpg |binary xmlsecurity/qa/unit/signing/data/trustdb.gpg |binary xmlsecurity/qa/unit/signing/signing.cxx | 13 + 20 files changed, 403 insertions(+), 16 deletions(-) New commits: commit 01c7a60c051ac4562e3a317dde3c29c507f3f40b Author: Thorsten Behrens Date: Sun Dec 10 23:40:00 2017 +0100 tdf#114550: load back PGP encrypted files This squashes the following commits from master: gpg4libre: import PGP encryption manifest Change-Id: Iadd7f8f1194299cb50907d8594114c89c668ebd0 gpg4libre: open encrypted files also via gpg Change-Id: I1f626143e6c8443b4ad0c4fc5bdbd5ab8d56a451 tdf#114550 use 32 bit random session key for gpg encryption Change-Id: I7303be71fd855aa454d07fcae04d7f42e3c9cd9c tdf#114550 recognize sym key & init vec as valid f/ decrypt Change-Id: Ie366f086a3c14d6b54b91b4edee8cfef1a42c44b tdf#114550 don't use PBKDF2 in package for gpg encryption Change-Id: Ic96b2193f8541bbd109795fb9c0212a0a10c7344 gpg4libre: add initial unit test for encryption Change-Id: Id782dd865878ae7b8a60c7c80821b1370f6ac7e7 Change-Id: Id77b67a275bf91614ab62b65fdc69e4872247ffc Reviewed-on: https://gerrit.libreoffice.org/47784 Tested-by: Jenkins Reviewed-by: Katarina Behrens Reviewed-by: Thorsten Behrens diff --git a/comphelper/source/misc/docpasswordhelper.cxx b/comphelper/source/misc/docpasswordhelper.cxx index 7d761bb9c740..81fe3bc5268c 100644 --- a/comphelper/source/misc/docpasswordhelper.cxx +++ b/comphelper/source/misc/docpasswordhelper.cxx @@ -17,11 +17,15 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ +#include + #include #include +#include #include #include +#include #include #include @@ -29,6 +33,13 @@ #include #include +#if HAVE_FEATURE_GPGME +# include +# include +# include +# include +#endif + using ::com::sun::star::uno::Sequence; using ::com::sun::star::uno::Exception; using ::com::sun::star::uno::Reference; @@ -420,6 +431,91 @@ Sequence< sal_Int8 > DocPasswordHelper::GetXLHashAsSequence( return (eResult == DocPasswordVerifierResult::OK) ? aEncData : uno::Sequence< beans::NamedValue >(); } +/*static*/ uno::Sequence< css::beans::NamedValue > +DocPasswordHelper::decryptGpgSession( +const uno::Sequence< uno::Sequence< beans::NamedValue > >& rGpgProperties ) +{ +#if HAVE_FEATURE_GPGME +if ( !rGpgProperties.hasElements() ) +return uno::Sequence< beans::NamedValue >(); + +uno::Sequence< beans::NamedValue > aEncryptionData(1); +std::unique_ptr ctx; +GpgME::initializeLibrary(); +GpgME::Error err = GpgME::checkEngine(GpgME::OpenPGP); +if (err) +throw uno::RuntimeException("The GpgME library failed to initialize for the OpenPGP protocol."); + +ctx.reset( GpgME::Context::createForProtocol(GpgME::OpenPGP) ); +if (ctx == nullptr) +throw uno::RuntimeException("The GpgME library failed to initialize for the OpenPGP protocol."); +ctx->setArmor(false); + +const uno::Sequence < beans::NamedValue > *pSequence = rGpgProperties.getConstArray(); +const sal_Int32 nLength = rGpgProperties.getLength(); +for ( sal_Int32 i = 0; i < nLength ; i++, pSequence++ ) +{ +const beans::NamedValue *pValues = pSequence->getConstArray(); +if ( pSequence->getLength() == 3 ) +{ +// take CipherValue and try to decrypt that - stop after +// the first successful decryption + +// ctx is setup now, let's decrypt the lot! +uno::Sequence < sal_Int8 > aVector; +pValues[2].Value >>= aVector; + +GpgME::Data cipher( +reinterpret_cast(aVector.getConstArray()), +size_t(aVector.getLength()), false); +GpgME::Data plain; + +GpgME::Decrypti
[Libreoffice-commits] help.git: source/text
source/text/sbasic/shared/03120301.xhp |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 7ffe2eafbaa401f4bdea26d7b41f357567544afc Author: Mike Kaganski Date: Sat Jan 13 07:53:18 2018 +0100 That isn't specific to Calc In fact, target (text/shared/01/05020301) is in text/shared, module is BASIC. Change-Id: I7341688b1f04733b7ff7b79e5930e3e6b6955add Reviewed-on: https://gerrit.libreoffice.org/47833 Reviewed-by: Adolfo Jayme Barrientos Tested-by: Adolfo Jayme Barrientos diff --git a/source/text/sbasic/shared/03120301.xhp b/source/text/sbasic/shared/03120301.xhp index a1f53eae1..f6c139af9 100644 --- a/source/text/sbasic/shared/03120301.xhp +++ b/source/text/sbasic/shared/03120301.xhp @@ -93,7 +93,7 @@ End Sub -Number format codes in Calc +Number format codes ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: helpcontent2
helpcontent2 |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 87b735dfb6c222698a73e51d555bd85fbc95af8c Author: Mike Kaganski Date: Sat Jan 13 07:53:18 2018 +0100 Updated core Project: help 7ffe2eafbaa401f4bdea26d7b41f357567544afc That isn't specific to Calc In fact, target (text/shared/01/05020301) is in text/shared, module is BASIC. Change-Id: I7341688b1f04733b7ff7b79e5930e3e6b6955add Reviewed-on: https://gerrit.libreoffice.org/47833 Reviewed-by: Adolfo Jayme Barrientos Tested-by: Adolfo Jayme Barrientos diff --git a/helpcontent2 b/helpcontent2 index 2575baa6d1f2..7ffe2eafbaa4 16 --- a/helpcontent2 +++ b/helpcontent2 @@ -1 +1 @@ -Subproject commit 2575baa6d1f20327dc943b1cc73ff4252f6cbfe6 +Subproject commit 7ffe2eafbaa401f4bdea26d7b41f357567544afc ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: sw/qa sw/source
sw/qa/extras/uiwriter/data/tdf113481-IVS.odt |binary sw/qa/extras/uiwriter/uiwriter.cxx | 33 + sw/source/uibase/wrtsh/delete.cxx| 42 +++ 3 files changed, 75 insertions(+) New commits: commit 8c7915eb9693f7c385308ec2b76b1d5b582bceed Author: Mark Hung Date: Thu Nov 9 23:53:19 2017 +0800 tdf#113481 Let backspace delete complete CJK ideograph IVS. If the character to be deleted is in CJK script and is a Unicode variance selector, delete the complete IVS if the base character is a CJK unified ideograph. Change-Id: I5d29664d5e964fc685110333f8109b0bfa8e0955 Reviewed-on: https://gerrit.libreoffice.org/44555 Tested-by: Jenkins Reviewed-by: Mark Hung diff --git a/sw/qa/extras/uiwriter/data/tdf113481-IVS.odt b/sw/qa/extras/uiwriter/data/tdf113481-IVS.odt new file mode 100644 index ..1d4a13929d37 Binary files /dev/null and b/sw/qa/extras/uiwriter/data/tdf113481-IVS.odt differ diff --git a/sw/qa/extras/uiwriter/uiwriter.cxx b/sw/qa/extras/uiwriter/uiwriter.cxx index e8bc2ea51aae..7319c80a6835 100644 --- a/sw/qa/extras/uiwriter/uiwriter.cxx +++ b/sw/qa/extras/uiwriter/uiwriter.cxx @@ -292,6 +292,7 @@ public: void testTdf113790(); void testTdf108048(); void testTdf114306(); +void testTdf113481(); CPPUNIT_TEST_SUITE(SwUiWriterTest); CPPUNIT_TEST(testReplaceForward); @@ -464,6 +465,7 @@ public: CPPUNIT_TEST(testTdf113790); CPPUNIT_TEST(testTdf108048); CPPUNIT_TEST(testTdf114306); +CPPUNIT_TEST(testTdf113481); CPPUNIT_TEST_SUITE_END(); private: @@ -5668,6 +5670,37 @@ void SwUiWriterTest::testTdf108048() CPPUNIT_ASSERT_EQUAL(sal_uInt16(6), nPageNumber); } +void SwUiWriterTest::testTdf113481() +{ +SwDoc* pDoc = createDoc("tdf113481-IVS.odt"); +SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell(); + +// One backspace should completely remove the CJK ideograph varation sequence +pWrtShell->EndPara(); +// Before: U+8FBA U+E0102. After: empty +pWrtShell->DelLeft(); +const uno::Reference< text::XTextRange > xPara1 = getParagraph(1); +CPPUNIT_ASSERT_EQUAL(sal_Int32(0), xPara1->getString().getLength()); + +// In case that weak script is treated as CJK script, remove one character. +pWrtShell->Down(false); +pWrtShell->EndPara(); +// Before: U+4E2D U+2205 U+FE00. After: U+4E2D U+2205 +pWrtShell->DelLeft(); +const uno::Reference< text::XTextRange > xPara2 = getParagraph(2); +CPPUNIT_ASSERT_EQUAL(sal_Int32(2), xPara2->getString().getLength()); +CPPUNIT_ASSERT_EQUAL(u'\x2205', xPara2->getString()[1]); + +// Characters of other scripts, remove one character. +pWrtShell->Down(false); +pWrtShell->EndPara(); +// Before: U+1820 U+180B. After: U+1820 +pWrtShell->DelLeft(); +const uno::Reference< text::XTextRange > xPara3 = getParagraph(3); +CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xPara3->getString().getLength()); +CPPUNIT_ASSERT_EQUAL(u'\x1820', xPara3->getString()[0]); +} + CPPUNIT_TEST_SUITE_REGISTRATION(SwUiWriterTest); CPPUNIT_PLUGIN_IMPLEMENT(); diff --git a/sw/source/uibase/wrtsh/delete.cxx b/sw/source/uibase/wrtsh/delete.cxx index 6c2a7d04d272..2f0be3984c85 100644 --- a/sw/source/uibase/wrtsh/delete.cxx +++ b/sw/source/uibase/wrtsh/delete.cxx @@ -42,6 +42,25 @@ inline void SwWrtShell::CloseMark( bool bOkFlag ) EndAllAction(); } +namespace { + +inline bool isUnicodeVariationSequenceSelector( sal_uInt32 nCode ) +{ +return ( nCode >= 0xFE00 && nCode <= 0xFE0F ) // Variation Selectors block +|| ( nCode >= 0xE0100 && nCode <= 0xE01EF );// Variation Selectors Supplement block +} + +// Return if the chracter might be a base character of a CJK ideographic varaiation sequence +inline bool isCJKIVSCharacters( sal_uInt32 nCode ) +{ +return ( nCode >= 0x4E00 && nCode <= 0x9FFF ) // CJK Unified Ideographs +|| ( nCode >= 0x3400 && nCode <= 0x4DBF ) // CJK Unified Ideographs Extension A +|| ( nCode >= 0x2 && nCode <= 0x2A6DF );// CJK Unified Ideographs Extension B +} + +} + + // #i23725# bool SwWrtShell::TryRemoveIndent() { @@ -222,6 +241,29 @@ long SwWrtShell::DelLeft() OpenMark(); SwCursorShell::Left(1, CRSR_SKIP_CHARS); +if (SvtScriptType::ASIAN == GetScriptType()) +{ +sal_uInt32 nCode = GetChar(false); +if ( rtl::isSurrogate( nCode ) ) +{ +OUString sStr = GetSelText(); +sal_Int32 nIndex = 0; +nCode = sStr.iterateCodePoints( &nIndex ); +} + +if ( isUnicodeVariationSequenceSelector( nCode ) ) +{ +SwCursorShell::Push(); +SwCursorShell::Left(1, CRSR_SKIP_CHARS); +OUString sStr = GetSelText(); +sal_Int32 nIndex = 0; +nCode = sStr.iterateCodePoints( &
[Libreoffice-commits] core.git: include/svx svx/source svx/uiconfig
include/svx/ClassificationDialog.hxx |1 svx/source/dialog/ClassificationDialog.cxx | 33 ++--- svx/uiconfig/ui/classificationdialog.ui| 167 + 3 files changed, 92 insertions(+), 109 deletions(-) New commits: commit 085852e2e2779de1712cf18b5e67740cb7a4bcb6 Author: Tomaž Vajngerl Date: Sat Dec 2 14:18:09 2017 +0900 tdf#114901 TSCP various advanced TSCP dialog changes - rename "Part" to "License" - change Markings from Combo to List box - minimize whitespace - move bold and sign paragraph under text area as it is fixed - remove bold in paragraph dialog Change-Id: I7ec20460d02d3611a1da325eb7d3de3aef10f03f Reviewed-on: https://gerrit.libreoffice.org/47632 Reviewed-by: Tomaž Vajngerl Tested-by: Tomaž Vajngerl diff --git a/include/svx/ClassificationDialog.hxx b/include/svx/ClassificationDialog.hxx index a9ec24c99d45..14b1607cf7b7 100644 --- a/include/svx/ClassificationDialog.hxx +++ b/include/svx/ClassificationDialog.hxx @@ -66,7 +66,6 @@ private: DECL_LINK(SelectToolboxHdl, ToolBox*, void); DECL_LINK(SelectClassificationHdl, ListBox&, void); DECL_LINK(SelectMarkingHdl, ListBox&, void); -DECL_LINK(LoseFocusMarkingHdl, Control&, void); DECL_LINK(SelectIPPartNumbersHdl, ListBox&, void); DECL_LINK(SelectRecentlyUsedHdl, ListBox&, void); DECL_LINK(SelectIPPartHdl, ListBox&, void); diff --git a/svx/source/dialog/ClassificationDialog.cxx b/svx/source/dialog/ClassificationDialog.cxx index fa5be8da164d..7e8097e7e120 100644 --- a/svx/source/dialog/ClassificationDialog.cxx +++ b/svx/source/dialog/ClassificationDialog.cxx @@ -180,7 +180,7 @@ ClassificationDialog::ClassificationDialog(vcl::Window* pParent, const bool bPer get(m_pClassificationListBox, "classificationCB"); get(m_pInternationalClassificationListBox, "internationalClassificationCB"); get(m_pMarkingLabel, "markingLabel"); -get(m_pMarkingListBox, "markingCB"); +get(m_pMarkingListBox, "markingLB"); get(m_pIntellectualPropertyPartNumberListBox, "intellectualPropertyPartNumberLB"); get(m_pIntellectualPropertyPartListBox, "intellectualPropertyPartLB"); get(m_pIntellectualPropertyPartAddButton, "intellectualPropertyPartAddButton"); @@ -190,7 +190,15 @@ ClassificationDialog::ClassificationDialog(vcl::Window* pParent, const bool bPer m_pSignButton->SetClickHdl(LINK(this, ClassificationDialog, ButtonClicked)); m_pSignButton->Show(m_bPerParagraph); -m_pToolBox->SetSelectHdl(LINK(this, ClassificationDialog, SelectToolboxHdl)); +// no need for BOLD if we do paragraph classification +if (m_bPerParagraph) +{ +m_pToolBox->Show(false); +} +else +{ +m_pToolBox->SetSelectHdl(LINK(this, ClassificationDialog, SelectToolboxHdl)); +} m_pIntellectualPropertyPartAddButton->SetClickHdl(LINK(this, ClassificationDialog, ButtonClicked)); @@ -206,9 +214,9 @@ ClassificationDialog::ClassificationDialog(vcl::Window* pParent, const bool bPer if (!maHelper.GetMarkings().empty()) { -m_pMarkingListBox->setMaxWidthChars(20); -m_pMarkingListBox->SetSelectHdl(LINK(this, ClassificationDialog, SelectMarkingHdl)); -m_pMarkingListBox->SetLoseFocusHdl(LINK(this, ClassificationDialog, LoseFocusMarkingHdl)); +m_pMarkingListBox->setMaxWidthChars(10); +m_pMarkingListBox->SetDropDownLineCount(4); +m_pMarkingListBox->SetDoubleClickHdl(LINK(this, ClassificationDialog, SelectMarkingHdl)); for (const OUString& rName : maHelper.GetMarkings()) m_pMarkingListBox->InsertEntry(rName); @@ -220,7 +228,7 @@ ClassificationDialog::ClassificationDialog(vcl::Window* pParent, const bool bPer } m_pIntellectualPropertyPartNumberListBox->SetDropDownLineCount(5); -m_pIntellectualPropertyPartNumberListBox->setMaxWidthChars(20); +m_pIntellectualPropertyPartNumberListBox->setMaxWidthChars(10); m_pIntellectualPropertyPartNumberListBox->SetDoubleClickHdl(LINK(this, ClassificationDialog, SelectIPPartNumbersHdl)); for (const OUString& rName : maHelper.GetIntellectualPropertyPartNumbers()) m_pIntellectualPropertyPartNumberListBox->InsertEntry(rName); @@ -621,22 +629,13 @@ IMPL_LINK(ClassificationDialog, SelectClassificationHdl, ListBox&, rBox, void) m_nCurrentSelectedCategory = nSelected; } -IMPL_LINK_NOARG(ClassificationDialog, LoseFocusMarkingHdl, Control&, void) -{ -if (m_nInsertMarkings >= 0) -{ -const OUString aString = maHelper.GetMarkings()[m_nInsertMarkings]; -insertField(ClassificationType::MARKING, aString, aString); -m_nInsertMarkings = -1; -} -} - IMPL_LINK(ClassificationDialog, SelectMarkingHdl, ListBox&, rBox, void) { sal_Int32 nSelected = rBox.GetSelectedEntryPos(); if (nSelected >= 0) { -m_nInsertMarkings = nSelected; +const OUString aString = maHelper.GetMarkings()[
[Libreoffice-commits] core.git: svl/source
svl/source/fsstor/oinputstreamcontainer.cxx|7 +-- svl/source/fsstor/oinputstreamcontainer.hxx|3 ++- svl/source/fsstor/ostreamcontainer.cxx |7 +-- svl/source/fsstor/ostreamcontainer.hxx |3 ++- svl/source/numbers/supservs.cxx| 14 -- svl/source/numbers/supservs.hxx|3 ++- svl/source/passwordcontainer/passwordcontainer.cxx | 14 +++--- svl/source/passwordcontainer/passwordcontainer.hxx |2 +- 8 files changed, 16 insertions(+), 37 deletions(-) New commits: commit e5404aef868f21ac15e8255892e2171a9377cb47 Author: Noel Grandin Date: Fri Jan 12 08:21:51 2018 +0200 loplugin:useuniqueptr in svl Change-Id: I89aa05b3c59ca3ad680d35899400957a399ccf0e Reviewed-on: https://gerrit.libreoffice.org/47795 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/svl/source/fsstor/oinputstreamcontainer.cxx b/svl/source/fsstor/oinputstreamcontainer.cxx index d64c52de01ea..c7ff2e015e1c 100644 --- a/svl/source/fsstor/oinputstreamcontainer.cxx +++ b/svl/source/fsstor/oinputstreamcontainer.cxx @@ -36,11 +36,6 @@ OFSInputStreamContainer::OFSInputStreamContainer( const uno::Reference< io::XInp OFSInputStreamContainer::~OFSInputStreamContainer() { -if ( m_pListenersContainer ) -{ -delete m_pListenersContainer; -m_pListenersContainer = nullptr; -} } uno::Sequence< uno::Type > SAL_CALL OFSInputStreamContainer::getTypes() @@ -267,7 +262,7 @@ void SAL_CALL OFSInputStreamContainer::addEventListener( const uno::Reference< l throw lang::DisposedException(); if ( !m_pListenersContainer ) -m_pListenersContainer = new ::comphelper::OInterfaceContainerHelper2( m_aMutex ); +m_pListenersContainer.reset( new ::comphelper::OInterfaceContainerHelper2( m_aMutex ) ); m_pListenersContainer->addInterface( xListener ); } diff --git a/svl/source/fsstor/oinputstreamcontainer.hxx b/svl/source/fsstor/oinputstreamcontainer.hxx index 130f8120f9fd..9d9a17a79302 100644 --- a/svl/source/fsstor/oinputstreamcontainer.hxx +++ b/svl/source/fsstor/oinputstreamcontainer.hxx @@ -29,6 +29,7 @@ #include #include +#include class OFSInputStreamContainer : public cppu::WeakImplHelper < css::io::XInputStream ,css::embed::XExtendedStorageStream > @@ -43,7 +44,7 @@ class OFSInputStreamContainer : public cppu::WeakImplHelper < css::io::XInputStr bool m_bDisposed; -::comphelper::OInterfaceContainerHelper2* m_pListenersContainer; // list of listeners +std::unique_ptr<::comphelper::OInterfaceContainerHelper2> m_pListenersContainer; // list of listeners public: explicit OFSInputStreamContainer( const css::uno::Reference < css::io::XInputStream >& xStream ); diff --git a/svl/source/fsstor/ostreamcontainer.cxx b/svl/source/fsstor/ostreamcontainer.cxx index 8b22d3bec84f..d4c97b0b6f94 100644 --- a/svl/source/fsstor/ostreamcontainer.cxx +++ b/svl/source/fsstor/ostreamcontainer.cxx @@ -56,11 +56,6 @@ OFSStreamContainer::OFSStreamContainer( const uno::Reference < io::XStream >& xS OFSStreamContainer::~OFSStreamContainer() { -if ( m_pListenersContainer ) -{ -delete m_pListenersContainer; -m_pListenersContainer = nullptr; -} } // XInterface @@ -259,7 +254,7 @@ void SAL_CALL OFSStreamContainer::addEventListener( const uno::Reference< lang:: throw lang::DisposedException(); if ( !m_pListenersContainer ) -m_pListenersContainer = new ::comphelper::OInterfaceContainerHelper2( m_aMutex ); +m_pListenersContainer.reset(new ::comphelper::OInterfaceContainerHelper2( m_aMutex )); m_pListenersContainer->addInterface( xListener ); } diff --git a/svl/source/fsstor/ostreamcontainer.hxx b/svl/source/fsstor/ostreamcontainer.hxx index e0668a5bcd5e..a631817d05ba 100644 --- a/svl/source/fsstor/ostreamcontainer.hxx +++ b/svl/source/fsstor/ostreamcontainer.hxx @@ -33,6 +33,7 @@ #include #include #include +#include class OFSStreamContainer : public cppu::OWeakObject, public css::lang::XTypeProvider, @@ -56,7 +57,7 @@ class OFSStreamContainer : public cppu::OWeakObject, bool m_bInputClosed; bool m_bOutputClosed; -::comphelper::OInterfaceContainerHelper2* m_pListenersContainer; // list of listeners +std::unique_ptr<::comphelper::OInterfaceContainerHelper2> m_pListenersContainer; // list of listeners ::cppu::OTypeCollection* m_pTypeCollection; public: diff --git a/svl/source/numbers/supservs.cxx b/svl/source/numbers/supservs.cxx index c0724ce0cc57..9a287a75c148 100644 --- a/svl/source/numbers/supservs.cxx +++ b/svl/source/numbers/supservs.cxx @@ -46,11 +46,6 @@ SvNumberFormatsSupplierServiceObject::SvNumberFormatsSupplierServiceObject(const SvNumberFormatsSupplierServiceObject::~SvNumberFormatsSupplierServiceObject() { -
[Libreoffice-commits] core.git: idlc/inc idlc/source
idlc/inc/astsequence.hxx |7 +-- idlc/inc/fehelper.hxx| 10 ++ idlc/source/astdump.cxx |2 +- 3 files changed, 4 insertions(+), 15 deletions(-) New commits: commit 37464a0fb7f3bafe72126e65d34f2c15377a3964 Author: Noel Grandin Date: Thu Jan 11 16:03:46 2018 +0200 loplugin:useuniqueptr in idlc Change-Id: Iccc50462ca115546422824b6814abf16a029f005 Reviewed-on: https://gerrit.libreoffice.org/47793 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/idlc/inc/astsequence.hxx b/idlc/inc/astsequence.hxx index 20dac9b4fdc0..1a7a2073f763 100644 --- a/idlc/inc/astsequence.hxx +++ b/idlc/inc/astsequence.hxx @@ -29,11 +29,6 @@ public: , m_pMemberType(pMemberType) , m_pRelativName(nullptr) {} -virtual ~AstSequence() override -{ -if ( m_pRelativName ) -delete m_pRelativName; -} AstType const * getMemberType() const { return m_pMemberType; } @@ -44,7 +39,7 @@ public: virtual const sal_Char* getRelativName() const override; private: AstType const * m_pMemberType; -mutable OString* m_pRelativName; +mutable std::unique_ptr m_pRelativName; }; #endif // INCLUDED_IDLC_INC_ASTSEQUENCE_HXX diff --git a/idlc/inc/fehelper.hxx b/idlc/inc/fehelper.hxx index 11668e6946be..be401defcaa1 100644 --- a/idlc/inc/fehelper.hxx +++ b/idlc/inc/fehelper.hxx @@ -46,16 +46,10 @@ public: NodeType nodeType, OString* pName, OString const * pInherits, std::vector< OString > const * typeParameters); -~FeInheritanceHeader() -{ -if ( m_pName ) -delete m_pName; -} - NodeType getNodeType() const { return m_nodeType; } OString* getName() -{ return m_pName; } +{ return m_pName.get(); } AstDeclaration* getInherits() { return m_pInherits; } @@ -66,7 +60,7 @@ private: void initializeInherits(OString const * pinherits); NodeTypem_nodeType; -OString* m_pName; +std::unique_ptr m_pName; AstDeclaration* m_pInherits; std::vector< OString > m_typeParameters; }; diff --git a/idlc/source/astdump.cxx b/idlc/source/astdump.cxx index 945060bce392..7b869b7564dc 100644 --- a/idlc/source/astdump.cxx +++ b/idlc/source/astdump.cxx @@ -411,7 +411,7 @@ const sal_Char* AstSequence::getRelativName() const { if ( !m_pRelativName ) { -m_pRelativName = new OString("[]"); +m_pRelativName.reset( new OString("[]") ); AstDeclaration const * pType = resolveTypedefs( m_pMemberType ); *m_pRelativName += pType->getRelativName(); } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: sal/osl
sal/osl/w32/security.cxx | 41 - 1 file changed, 8 insertions(+), 33 deletions(-) New commits: commit 9acf3da78a5146c5af557967eabd0c47bf54d466 Author: Chris Sherlock Date: Mon Jan 1 00:49:25 2018 +1100 sal: remove no longer needed CheckTokenMembership_Stub CheckTokenMembership_Stub was added in commit ce20f0702 because there was a problem with patching/replacing UWINAPI on Windows ME. To resolve this, CheckTokenMembership was not exported to stay compatible which is no longer an issue. Change-Id: I654a5f5ececa918f844eca541942b9d552fcfa7f Reviewed-on: https://gerrit.libreoffice.org/47217 Tested-by: Jenkins Reviewed-by: Thorsten Behrens diff --git a/sal/osl/w32/security.cxx b/sal/osl/w32/security.cxx index 0c086cd5c7bf..986afc83412e 100644 --- a/sal/osl/w32/security.cxx +++ b/sal/osl/w32/security.cxx @@ -192,31 +192,6 @@ oslSecurityError SAL_CALL osl_loginUserOnFileServer(rtl_uString *strUserName, return ret; } -static BOOL WINAPI CheckTokenMembership_Stub( HANDLE TokenHandle, PSID SidToCheck, PBOOL IsMember ) -{ -typedef BOOL (WINAPI *CheckTokenMembership_PROC)( HANDLE, PSID, PBOOL ); - -static HMODULE hModule = nullptr; -static CheckTokenMembership_PROCpCheckTokenMembership = nullptr; - -if ( !hModule ) -{ -/* SAL is always linked against ADVAPI32 so we can rely on that it is already mapped */ -hModule = GetModuleHandleW( L"ADVAPI32.DLL" ); - -pCheckTokenMembership = reinterpret_cast(GetProcAddress( hModule, "CheckTokenMembership" )); -} - -if ( pCheckTokenMembership ) -return pCheckTokenMembership( TokenHandle, SidToCheck, IsMember ); -else -{ -SetLastError( ERROR_CALL_NOT_IMPLEMENTED ); -return FALSE; -} - -} - sal_Bool SAL_CALL osl_isAdministrator(oslSecurity Security) { if (Security != nullptr) @@ -245,21 +220,21 @@ sal_Bool SAL_CALL osl_isAdministrator(oslSecurity Security) if (AllocateAndInitializeSid(&siaNtAuthority, 2, - SECURITY_BUILTIN_DOMAIN_RID, - DOMAIN_ALIAS_RID_ADMINS, - 0, 0, 0, 0, 0, 0, - &psidAdministrators)) + SECURITY_BUILTIN_DOMAIN_RID, + DOMAIN_ALIAS_RID_ADMINS, + 0, 0, 0, 0, 0, 0, + &psidAdministrators)) { -BOOLfSuccess = FALSE; +BOOL fSuccess = FALSE; -if ( CheckTokenMembership_Stub( hImpersonationToken, psidAdministrators, &fSuccess ) && fSuccess ) +if (CheckTokenMembership(hImpersonationToken, psidAdministrators, &fSuccess) && fSuccess) bSuccess = true; FreeSid(psidAdministrators); } -if ( hImpersonationToken ) -CloseHandle( hImpersonationToken ); +if (hImpersonationToken) +CloseHandle(hImpersonationToken); return bSuccess; } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: store/source
store/source/storpage.hxx | 12 +++- 1 file changed, 3 insertions(+), 9 deletions(-) New commits: commit fa09d724b4c3309ce2961ad6b9cd11ade5753f33 Author: Chris Sherlock Date: Sun Dec 31 00:47:36 2017 +1100 store: remove unnecessary comments in storpage.hxx Change-Id: Ic515c916826d58f89893d2d0d58b65b80c7b83be Reviewed-on: https://gerrit.libreoffice.org/47196 Tested-by: Jenkins Reviewed-by: Thorsten Behrens diff --git a/store/source/storpage.hxx b/store/source/storpage.hxx index 3458c256c174..8b4785a21ce3 100644 --- a/store/source/storpage.hxx +++ b/store/source/storpage.hxx @@ -38,8 +38,6 @@ class OStoreDirectoryPageObject; class OStorePageManager : public store::OStorePageBIOS { public: -/** Construction. - */ OStorePageManager(); /** Initialization (two-phase construction). @@ -85,13 +83,9 @@ public: virtual bool isKindOf (sal_uInt32 nTypeId) override; protected: -/** Destruction. -*/ virtual ~OStorePageManager() override; private: -/** Implementation. -*/ typedef OStorePageBIOSbase; typedef OStorePageManager self; @@ -117,11 +111,11 @@ private: /** DirectoryPage I/O (managed). */ -storeError load_dirpage_Impl ( // @@@ => private: iget() @@@ +storeError load_dirpage_Impl( const OStorePageKey &rKey, OStoreDirectoryPageObject &rPage); -storeError save_dirpage_Impl ( // @@@ => private: iget(), rebuild() @@@ +storeError save_dirpage_Impl( const OStorePageKey &rKey, OStoreDirectoryPageObject &rPage); @@ -142,7 +136,7 @@ private: inline bool OStorePageManager::isValid() const { -return base::isValid() /* @@@ NYI && (m_aRoot.is()) */; +return base::isValid(); } template<> inline OStorePageManager* ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: sc/source
sc/source/ui/view/editsh.cxx | 12 +--- 1 file changed, 1 insertion(+), 11 deletions(-) New commits: commit 4393ca834641599281c8feb4259228b90cb4499b Author: Jim Raykowski Date: Tue Jan 2 18:30:50 2018 -0900 tdf#106611 make click on status bar insert/overwrite field work Change-Id: Ife8f9126a0249a8abe4e9fbe00917a784288c8e7 Reviewed-on: https://gerrit.libreoffice.org/47290 Tested-by: Jenkins Reviewed-by: Thorsten Behrens diff --git a/sc/source/ui/view/editsh.cxx b/sc/source/ui/view/editsh.cxx index 2b08da9db8ca..bb0496966d4e 100644 --- a/sc/source/ui/view/editsh.cxx +++ b/sc/source/ui/view/editsh.cxx @@ -187,6 +187,7 @@ void ScEditShell::Execute( SfxRequest& rReq ) switch ( nSlot ) { +case SID_ATTR_INSERT: case FID_INS_CELL_CONTENTS: // Insert taste, while defined as Acc bIsInsertMode = !pTableView->IsInsertMode(); pTableView->SetInsertMode( bIsInsertMode ); @@ -195,17 +196,6 @@ void ScEditShell::Execute( SfxRequest& rReq ) rBindings.Invalidate( SID_ATTR_INSERT ); break; -case SID_ATTR_INSERT: -if ( pReqArgs ) -{ -bIsInsertMode = static_cast(pReqArgs->Get(nSlot)).GetValue(); -pTableView->SetInsertMode( bIsInsertMode ); -if (pTopView) -pTopView->SetInsertMode( bIsInsertMode ); -rBindings.Invalidate( SID_ATTR_INSERT ); -} -break; - case SID_THES: { OUString aReplaceText; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: sc/source
sc/source/ui/drawfunc/fuins1.cxx |3 +++ 1 file changed, 3 insertions(+) New commits: commit 3e9bea4dcb6b780a3ef720858bb5dca92b065a39 Author: Samuel Mehrbrodt Date: Thu Dec 14 21:14:09 2017 +0100 tdf#86739 Anchor inserted images to cell by default As Calc is all about cells, many users expect images to be also anchored to cells, not the page. This is in preparation for tdf#98931 where we also want to keep images attached to their cell when users sort the cells. Change-Id: I5ba19f2524504ec018990c60098900d99e0db1c9 Reviewed-on: https://gerrit.libreoffice.org/46488 Tested-by: Jenkins Reviewed-by: Thorsten Behrens diff --git a/sc/source/ui/drawfunc/fuins1.cxx b/sc/source/ui/drawfunc/fuins1.cxx index 36cecff0384a..3672faf98788 100644 --- a/sc/source/ui/drawfunc/fuins1.cxx +++ b/sc/source/ui/drawfunc/fuins1.cxx @@ -164,6 +164,9 @@ static void lcl_InsertGraphic( const Graphic& rGraphic, OUString aName = pLayer->GetNewGraphicName(); // "Graphics" pObj->SetName(aName); +// Anchor images to cell by default, tdf#86739 +ScDrawLayer::SetCellAnchoredFromPosition(*pObj, *(rData.GetDocument()), rData.GetTabNo()); + // don't select if from (dispatch) API, to allow subsequent cell operations SdrInsertFlags nInsOptions = bApi ? SdrInsertFlags::DONTMARK : SdrInsertFlags::NONE; pView->InsertObjectAtView( pObj, *pPV, nInsOptions ); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: sysui/desktop
sysui/desktop/apparmor/program.soffice.bin | 30 +++-- 1 file changed, 20 insertions(+), 10 deletions(-) New commits: commit 35ad7482af49ab80d348b619b6d420ee170d3e5d Author: Olivier Tilloy Date: Mon Jan 8 16:59:17 2018 +0100 tdf#114915 Apparmor profile update (invalid comments syntax) The apparmor profile parser doesn't interpret # as a comment when on the same line as a variable assignment. Ensure that comments are on their own line, above the actual assignment. Change-Id: If10bb05f11b0e9026746db2e271113f30da5cbef Reviewed-on: https://gerrit.libreoffice.org/47605 Tested-by: Jenkins Reviewed-by: Thorsten Behrens diff --git a/sysui/desktop/apparmor/program.soffice.bin b/sysui/desktop/apparmor/program.soffice.bin index ff2c4b08cd4b..9c7ec3c2a3f7 100644 --- a/sysui/desktop/apparmor/program.soffice.bin +++ b/sysui/desktop/apparmor/program.soffice.bin @@ -23,12 +23,18 @@ #Some obscure ones we're excluded (mostly input) #Generic -@{libreoffice_ext} = [tT][xX][tT] #.txt -@{libreoffice_ext} += {,f,F}[oO][dDtT][tTsSpPbBgGfF] #All the open document format -@{libreoffice_ext} += [xX][mMsS][lL] #.xml and xsl -@{libreoffice_ext} += [pP][dD][fF] #.pdf -@{libreoffice_ext} += [uU][oO][fFtTsSpP] #Unified office format -@{libreoffice_ext} += {,x,X}[hH][tT][mM]{,l,L} #(x)htm(l) +#.txt +@{libreoffice_ext} = [tT][xX][tT] +#All the open document format +@{libreoffice_ext} += {,f,F}[oO][dDtT][tTsSpPbBgGfF] +#.xml and xsl +@{libreoffice_ext} += [xX][mMsS][lL] +#.pdf +@{libreoffice_ext} += [pP][dD][fF] +#Unified office format +@{libreoffice_ext} += [uU][oO][fFtTsSpP] +#(x)htm(l) +@{libreoffice_ext} += {,x,X}[hH][tT][mM]{,l,L} #Images @{libreoffice_ext} += [jJ][pP][gG] @@ -45,15 +51,19 @@ #Calc @{libreoffice_ext} += [xX][lL][sSwWtT]{,x,X} -@{libreoffice_ext} += [dD][iIbB][fF] #.dif dbf -@{libreoffice_ext} += [cCtT][sS][vV] #.tsv .csv +#.dif dbf +@{libreoffice_ext} += [dD][iIbB][fF] +#.tsv .csv +@{libreoffice_ext} += [cCtT][sS][vV] @{libreoffice_ext} += [sS][lL][kK] #Impress/Draw @{libreoffice_ext} += [pP][pP][tTsS]{,x,X} @{libreoffice_ext} += [pP][oO][tT]{,m,M} -@{libreoffice_ext} += [sS][wW][fF] #Flash -@{libreoffice_ext} += [pP][sS][dD] #Photoshop +#Flash +@{libreoffice_ext} += [sS][wW][fF] +#Photoshop +@{libreoffice_ext} += [pP][sS][dD] #Math @{libreoffice_ext} += [mM][mM][lL] ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: android/source
android/source/res/menu/main.xml | 12 +- android/source/src/java/org/libreoffice/InvalidationHandler.java |9 +-- 2 files changed, 14 insertions(+), 7 deletions(-) New commits: commit 5f4c120dd4dcc96329a4b0bcd72d76fb37b42fed Author: Mert Tümer Date: Mon Jan 8 11:42:16 2018 +0300 tdf#96790 search function in non experimental mode The patch was sent for the ULAKBIM/Pardus project. Signed-off-by: Mert Tümer Change-Id: I4e2ecc25eee6535b7d8a89800aaa8135cf517889 Reviewed-on: https://gerrit.libreoffice.org/47568 Tested-by: Jenkins Reviewed-by: Thorsten Behrens diff --git a/android/source/res/menu/main.xml b/android/source/res/menu/main.xml index 0b34d8b5ffac..9a4384af6fd5 100644 --- a/android/source/res/menu/main.xml +++ b/android/source/res/menu/main.xml @@ -31,17 +31,19 @@ android:orderInCategory="100" app:showAsAction="always"/> - + + + https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits