basic/qa/basic_coverage/test_Property.GetSet.bas
| 1
basic/qa/basic_coverage/test_With.bas
| 19
basic/qa/basic_coverage/test_format_function.bas
| 27
basic/source/comp/loops.cxx
| 15
basic/source/comp/parser.cxx
| 6
basic/source/sbx/sbxscan.cxx
| 1
bridges/source/cpp_uno/shared/vtablefactory.cxx
| 1
chart2/source/controller/main/ChartController_Window.cxx
| 2
codemaker/source/cppumaker/dumputils.cxx
| 3
connectivity/source/commontools/ConnectionWrapper.cxx
| 24
connectivity/source/cpool/ZConnectionWrapper.cxx
| 24
connectivity/source/cpool/ZConnectionWrapper.hxx
| 9
connectivity/source/drivers/hsqldb/HConnection.cxx
| 8
connectivity/source/inc/hsqldb/HConnection.hxx
| 9
cui/inc/tipoftheday.hrc
| 2
dbaccess/source/core/dataaccess/SharedConnection.cxx
| 11
dbaccess/source/core/dataaccess/SharedConnection.hxx
| 28
dbaccess/source/core/dataaccess/connection.cxx
| 42
dbaccess/source/core/dataaccess/connection.hxx
| 17
dbaccess/source/core/dataaccess/databasedocument.cxx
| 8
dbaccess/source/core/dataaccess/databasedocument.hxx
| 5
dbaccess/source/core/dataaccess/documentdefinition.cxx
| 4
dbaccess/source/core/dataaccess/documentdefinition.hxx
| 4
dbaccess/source/core/inc/TableDeco.hxx
| 2
dbaccess/source/filter/xml/dbloader2.cxx
| 2
dbaccess/source/ui/browser/brwctrlr.cxx
| 27
dbaccess/source/ui/browser/brwview.cxx
| 11
dbaccess/source/ui/inc/CollectionView.hxx
| 4
dbaccess/source/ui/inc/brwview.hxx
| 5
desktop/source/lib/init.cxx
| 183 +-
dev/null
|binary
drawinglayer/source/primitive2d/polygonprimitive2d.cxx
| 4
external/libpng/0001-ACES-AP0-adjusted-fixes.patch.1
| 47
external/libpng/UnpackedTarball_libpng.mk
| 4
extras/source/autocorr/lang/en-AU/DocumentList.xml
| 1
extras/source/autocorr/lang/en-GB/DocumentList.xml
| 1
extras/source/autocorr/lang/en-US/DocumentList.xml
| 1
extras/source/autocorr/lang/en-ZA/DocumentList.xml
| 1
extras/source/autocorr/lang/ja/DocumentList.xml
| 1
extras/source/autocorr/lang/ko/DocumentList.xml
| 1
extras/source/autocorr/lang/zh-TW/DocumentList.xml
| 1
extras/source/templates/presnt/Blueprint_Plans/META-INF/manifest.xml
| 8
extras/source/templates/presnt/Blueprint_Plans/Pictures/Blueprint_Plans-second-bg-4-3.svg
| 651 ++++++++
extras/source/templates/presnt/Blueprint_Plans/Pictures/Blueprint_Plans-second-bg-wide.svg
| 166 +-
extras/source/templates/presnt/Blueprint_Plans/meta.xml
| 4
extras/source/templates/presnt/Blueprint_Plans/styles.xml
| 25
extras/source/templates/presnt/Candy/content.xml
| 87 -
extras/source/templates/presnt/Candy/styles.xml
| 34
extras/source/templates/presnt/Grey_Elegant/styles.xml
| 20
extras/source/templates/presnt/Yellow_Idea/styles.xml
| 28
extras/template_files.mk
| 8
filter/source/graphicfilter/icgm/bitmap.cxx
| 3
filter/source/msfilter/eschesdo.cxx
| 15
filter/source/msfilter/eschesdo.hxx
| 5
filter/source/xsltdialog/xmlfiltertestdialog.cxx
| 4
filter/source/xsltdialog/xmlfiltertestdialog.hxx
| 3
forms/source/xforms/binding.hxx
| 2
forms/source/xforms/computedexpression.hxx
| 2
forms/source/xforms/datatyperepository.hxx
| 6
forms/source/xforms/model.hxx
| 5
forms/source/xforms/model_ui.cxx
| 1
forms/source/xforms/pathexpression.hxx
| 2
forms/source/xforms/submission.hxx
| 2
fpicker/source/office/commonpicker.hxx
| 6
fpicker/source/office/contentenumeration.cxx
| 4
fpicker/source/office/fileview.cxx
| 4
fpicker/source/office/foldertree.cxx
| 2
fpicker/source/office/foldertree.hxx
| 3
fpicker/source/office/fpsmartcontent.hxx
| 3
helpcontent2
| 2
hwpfilter/source/hcode.cxx
| 2
icon-themes/colibre/help/warning_large.png
|binary
icon-themes/colibre_dark_svg/res/locked.svg
| 1
icon-themes/colibre_dark_svg/res/unlocked.svg
| 44
icon-themes/colibre_svg/res/locked.svg
| 1
icon-themes/colibre_svg/res/unlocked.svg
| 5
include/connectivity/ConnectionWrapper.hxx
| 18
include/dbaccess/genericcontroller.hxx
| 3
include/svx/gridctrl.hxx
| 4
include/svx/relfld.hxx
| 18
include/svx/sdr/table/tablecontroller.hxx
| 3
include/svx/xpoly.hxx
| 2
include/unotools/streamwrap.hxx
| 4
include/vcl/BitmapAlphaClampFilter.hxx
| 5
officecfg/registry/schema/org/openoffice/Office/Calc.xcs
| 8
officecfg/registry/schema/org/openoffice/Office/Writer.xcs
| 53
package/inc/ZipFile.hxx
| 2
package/inc/ZipPackage.hxx
| 13
package/inc/ZipPackageStream.hxx
| 25
package/source/zipapi/ZipFile.cxx
| 31
package/source/zippackage/ZipPackage.cxx
| 48
package/source/zippackage/ZipPackageStream.cxx
| 40
qadevOOo/tests/java/ifc/sdbcx/_XRowLocate.java
| 16
reportdesign/source/core/api/ReportDefinition.cxx
| 19
reportdesign/source/core/inc/Group.hxx
| 4
reportdesign/source/ui/inc/DataProviderHandler.hxx
| 7
reportdesign/source/ui/inc/ReportController.hxx
| 3
sc/Library_sc.mk
| 1
sc/UIConfig_scalc.mk
| 1
sc/inc/dispuno.hxx
| 3
sc/inc/document.hxx
| 2
sc/inc/inputopt.hxx
| 3
sc/inc/macromgr.hxx
| 4
sc/inc/sc.hrc
| 3
sc/source/core/tool/inputopt.cxx
| 8
sc/source/core/tool/interpr2.cxx
| 3
sc/source/ui/app/scmod.cxx
| 10
sc/source/ui/docshell/docsh.cxx
| 13
sc/source/ui/docshell/docsh4.cxx
| 4
sc/source/ui/docshell/macromgr.cxx
| 4
sc/source/ui/inc/onlyactivesheetsaveddlg.hxx
| 36
sc/source/ui/inc/tabvwsh.hxx
| 5
sc/source/ui/inc/tpview.hxx
| 2
sc/source/ui/miscdlgs/onlyactivesheetsaveddlg.cxx
| 49
sc/source/ui/optdlg/tpview.cxx
| 19
sc/source/ui/vba/vbarange.cxx
| 6
sc/source/ui/vba/vbarange.hxx
| 8
sc/source/ui/vba/vbaworksheet.cxx
| 5
sc/source/ui/vba/vbaworksheet.hxx
| 3
sc/source/ui/view/dbfunc.cxx
| 8
sc/source/ui/view/tabvwsha.cxx
| 3
sc/source/ui/view/tabvwshh.cxx
| 7
sc/uiconfig/scalc/ui/onlyactivesheetsaveddialog.ui
| 146 +
sc/uiconfig/scalc/ui/scgeneralpage.ui
| 35
sd/inc/drawdoc.hxx
| 4
sd/source/core/drawdoc2.cxx
| 10
sd/source/filter/grf/sdgrffilter.cxx
| 9
sd/source/ui/animations/CustomAnimationPane.cxx
| 8
sd/source/ui/animations/SlideTransitionPane.cxx
| 1
sd/source/ui/annotations/annotationmanager.cxx
| 5
sd/source/ui/annotations/annotationmanagerimpl.hxx
| 3
sd/source/ui/dlg/PhotoAlbumDialog.cxx
| 5
sd/source/ui/docshell/docshel4.cxx
| 9
sd/source/ui/framework/tools/FrameworkHelper.cxx
| 13
sd/source/ui/inc/CustomAnimationPane.hxx
| 3
sd/source/ui/inc/SlideTransitionPane.hxx
| 4
sd/source/ui/inc/TableDesignPane.hxx
| 3
sd/source/ui/inc/framework/FrameworkHelper.hxx
| 3
sd/source/ui/inc/unomodel.hxx
| 6
sd/source/ui/inc/unopage.hxx
| 5
sd/source/ui/presenter/PresenterPreviewCache.cxx
| 17
sd/source/ui/sidebar/DocumentHelper.cxx
| 4
sd/source/ui/sidebar/LayoutMenu.cxx
| 5
sd/source/ui/sidebar/LayoutMenu.hxx
| 3
sd/source/ui/slideshow/PaneHider.cxx
| 8
sd/source/ui/slideshow/slideshowimpl.cxx
| 15
sd/source/ui/slideshow/slideshowimpl.hxx
| 2
sd/source/ui/slidesorter/cache/SlsGenericPageCache.cxx
| 1
sd/source/ui/slidesorter/cache/SlsPageCacheManager.cxx
| 2
sd/source/ui/slidesorter/controller/SlsListener.cxx
| 25
sd/source/ui/slidesorter/controller/SlsSelectionFunction.cxx
| 2
sd/source/ui/slidesorter/controller/SlsSelectionManager.cxx
| 9
sd/source/ui/slidesorter/controller/SlsSlotManager.cxx
| 5
sd/source/ui/slidesorter/inc/cache/SlsCacheContext.hxx
| 3
sd/source/ui/slidesorter/inc/cache/SlsPageCacheManager.hxx
| 4
sd/source/ui/slidesorter/view/SlsViewCacheContext.cxx
| 2
sd/source/ui/slidesorter/view/SlsViewCacheContext.hxx
| 2
sd/source/ui/table/TableDesignPane.cxx
| 21
sd/source/ui/unoidl/unomodel.cxx
| 6
sd/source/ui/unoidl/unopage.cxx
| 9
sd/source/ui/view/ViewShellBase.cxx
| 30
sd/source/ui/view/drviews2.cxx
| 5
sd/source/ui/view/drviews3.cxx
| 51
sd/source/ui/view/drviews4.cxx
| 5
sd/source/ui/view/viewshel.cxx
| 7
sfx2/inc/notebookbar/NotebookbarTabControl.hxx
| 3
sfx2/qa/cppunit/test_misc.cxx
| 31
sfx2/source/appl/workwin.cxx
| 5
sfx2/source/dialog/StyleList.cxx
| 14
sfx2/source/dialog/filedlghelper.cxx
| 28
sfx2/source/dialog/filedlgimpl.hxx
| 3
sfx2/source/doc/docfile.cxx
| 5
sfx2/source/doc/doctemplates.cxx
| 2
sfx2/source/doc/printhelper.cxx
| 7
sfx2/source/doc/sfxbasemodel.cxx
| 39
sfx2/source/inc/workwin.hxx
| 2
sfx2/source/view/sfxbasecontroller.cxx
| 4
slideshow/source/engine/slide/slideimpl.cxx
| 162 +-
solenv/clang-format/excludelist
| 1
svl/source/numbers/zformat.cxx
| 10
svx/source/dialog/docrecovery.cxx
| 10
svx/source/dialog/swframeexample.cxx
| 2
svx/source/engine3d/scene3d.cxx
| 6
svx/source/form/fmundo.cxx
| 4
svx/source/inc/docrecovery.hxx
| 4
svx/source/inc/fmundo.hxx
| 3
svx/source/table/tablecontroller.cxx
| 4
svx/source/xml/xmleohlp.cxx
| 2
svx/source/xml/xmlgrhlp.cxx
| 4
svx/source/xoutdev/_xpoly.cxx
| 174 +-
sw/inc/IDocumentFieldsAccess.hxx
| 2
sw/inc/PostItMgr.hxx
| 2
sw/inc/doc.hxx
| 9
sw/inc/swmodule.hxx
| 3
sw/inc/unoframe.hxx
| 3
sw/inc/unostyle.hxx
| 7
sw/inc/unotxdoc.hxx
| 3
sw/inc/viewsh.hxx
| 2
sw/qa/core/accessibilitycheck/AccessibilityCheckTest.cxx
| 58
sw/qa/core/accessibilitycheck/data/DeleteHeader.odt
|binary
sw/qa/core/accessibilitycheck/data/PageCharParaStyles.odt
|binary
sw/qa/extras/autocorrect/autocorrect.cxx
| 126 +
sw/qa/extras/layout/data/tdf161810.fodt
| 204 ++
sw/qa/extras/layout/layout3.cxx
| 35
sw/qa/extras/ooxmlexport/data/tdf131728.docx
|binary
sw/qa/extras/ooxmlexport/data/tdf61000.docx
|binary
sw/qa/extras/ooxmlexport/ooxmlexport20.cxx
| 18
sw/qa/extras/ooxmlexport/ooxmlexport21.cxx
| 17
sw/qa/extras/tiledrendering2/data/signed-doc.odt
|binary
sw/qa/extras/tiledrendering2/tiledrendering2.cxx
| 21
sw/qa/uitest/options/optionsDialog.py
| 30
sw/source/core/access/AccessibilityCheck.cxx
| 762 ++++++++--
sw/source/core/access/acccontext.cxx
| 16
sw/source/core/access/acccontext.hxx
| 8
sw/source/core/access/acchypertextdata.cxx
| 8
sw/source/core/access/acchypertextdata.hxx
| 8
sw/source/core/access/accmap.cxx
| 7
sw/source/core/access/accnotextframe.hxx
| 3
sw/source/core/access/accpara.cxx
| 4
sw/source/core/bastyp/init.cxx
| 6
sw/source/core/doc/DocumentContentOperationsManager.cxx
| 6
sw/source/core/doc/DocumentFieldsManager.cxx
| 9
sw/source/core/doc/DocumentStylePoolManager.cxx
| 27
sw/source/core/doc/doc.cxx
| 65
sw/source/core/doc/docedt.cxx
| 7
sw/source/core/doc/docruby.cxx
| 1
sw/source/core/docnode/threadmanager.hxx
| 4
sw/source/core/edit/acorrect.cxx
| 4
sw/source/core/inc/DocumentFieldsManager.hxx
| 2
sw/source/core/layout/objectformattertxtfrm.cxx
| 4
sw/source/core/text/atrstck.cxx
| 2
sw/source/core/text/itradj.cxx
| 11
sw/source/core/undo/undobj.cxx
| 10
sw/source/core/unocore/unoidx.cxx
| 20
sw/source/core/unocore/unotbl.cxx
| 36
sw/source/core/view/viewsh.cxx
| 4
sw/source/filter/ww8/rtfexport.cxx
| 30
sw/source/ui/config/optpage.cxx
| 97 +
sw/source/ui/envelp/mailmrge.cxx
| 2
sw/source/ui/vba/vbacolumns.cxx
| 6
sw/source/ui/vba/vbarows.cxx
| 6
sw/source/uibase/app/appopt.cxx
| 12
sw/source/uibase/config/cfgitems.cxx
| 14
sw/source/uibase/config/usrpref.cxx
| 38
sw/source/uibase/inc/cfgitems.hxx
| 13
sw/source/uibase/inc/optpage.hxx
| 12
sw/source/uibase/inc/unodispatch.hxx
| 3
sw/source/uibase/inc/unomod.hxx
| 6
sw/source/uibase/inc/usrpref.hxx
| 28
sw/source/uibase/uiview/view.cxx
| 10
sw/source/uibase/uno/unotxdoc.cxx
| 11
sw/source/writerfilter/dmapper/DomainMapper.cxx
| 4
sw/source/writerfilter/dmapper/DomainMapper_Impl.cxx
| 51
sw/source/writerfilter/dmapper/DomainMapper_Impl.hxx
| 3
sw/uiconfig/swriter/ui/viewoptionspage.ui
| 293 +++
translations
| 2
unoxml/CppunitTest_unoxml_rdftest.mk
| 3
unoxml/qa/complex/unoxml/RDFRepositoryTest.java
| 333 ----
unoxml/qa/unit/data/example.rdf
| 44
unoxml/qa/unit/rdftest.cxx
| 273 +++
unoxml/source/dom/document.cxx
| 12
unoxml/source/dom/document.hxx
| 4
unoxml/source/dom/elementlist.cxx
| 13
unoxml/source/dom/elementlist.hxx
| 3
vcl/qt5/QtFilePicker.cxx
| 33
vcl/qt5/QtInstance.cxx
| 2
vcl/qt5/QtTimer.cxx
| 6
vcl/qt5/QtWidget.cxx
| 4
vcl/source/components/dtranscomp.cxx
| 1
vcl/source/control/roadmapwizard.cxx
| 20
winaccessibility/Library_uacccom.mk
| 1
winaccessibility/source/UAccCOM/AccActionBase.cxx
| 2
winaccessibility/source/UAccCOM/AccComponent.cxx
| 103 +
winaccessibility/source/UAccCOM/AccComponent.h
| 43
winaccessibility/source/UAccCOM/AccComponentBase.cxx
| 214 --
winaccessibility/source/UAccCOM/AccComponentBase.h
| 63
winaccessibility/source/UAccCOM/AccEditableText.cxx
| 3
winaccessibility/source/UAccCOM/AccHyperLink.cxx
| 2
winaccessibility/source/UAccCOM/AccHypertext.cxx
| 3
winaccessibility/source/UAccCOM/AccImage.cxx
| 2
winaccessibility/source/UAccCOM/AccTable.cxx
| 2
winaccessibility/source/UAccCOM/AccTextBase.cxx
| 2
winaccessibility/source/UAccCOM/AccValue.cxx
| 23
winaccessibility/source/UAccCOM/AccValue.h
| 7
wizards/source/scriptforge/python/scriptforge.py
| 22
xmloff/source/text/XMLFootnoteConfigurationImportContext.cxx
| 4
xmloff/source/text/txtdropi.cxx
| 4
xmloff/source/xforms/xformsexport.cxx
| 2
xmlsecurity/inc/digitalsignaturesdialog.hxx
| 2
xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx
| 57
290 files changed, 4778 insertions(+), 2053 deletions(-)
New commits:
commit 08b8585f66073d90e5e11db9b8b3fbcbdaf2adc2
Author: Caolán McNamara <[email protected]>
AuthorDate: Tue Sep 17 10:45:14 2024 +0100
Commit: Caolán McNamara <[email protected]>
CommitDate: Tue Sep 17 17:19:50 2024 +0200
cid#1608165 Overflowed constant
Change-Id: Ie360d3c479e639c3b97ab532d5f0778809ca2d44
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173549
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <[email protected]>
diff --git a/sd/source/ui/slidesorter/controller/SlsSelectionFunction.cxx
b/sd/source/ui/slidesorter/controller/SlsSelectionFunction.cxx
index e57a82ec8150..24f62aa23090 100644
--- a/sd/source/ui/slidesorter/controller/SlsSelectionFunction.cxx
+++ b/sd/source/ui/slidesorter/controller/SlsSelectionFunction.cxx
@@ -1154,7 +1154,7 @@ void NormalModeHandler::RangeSelect (const
model::SharedPageDescriptor& rpDescri
// page. This way the PageSelector will recognize it again as
// anchor (the first selected page after a DeselectAllPages()
// becomes the anchor.)
- const sal_uInt16 nStep ((nAnchorIndex < nOtherIndex) ? +1 : -1);
+ const sal_Int16 nStep ((nAnchorIndex < nOtherIndex) ? +1 : -1);
sal_uInt16 nIndex (nAnchorIndex);
while (true)
{
commit f145e82a0f088fe3fa0b69ea205568d96affd9e7
Author: Caolán McNamara <[email protected]>
AuthorDate: Tue Sep 17 10:35:29 2024 +0100
Commit: Caolán McNamara <[email protected]>
CommitDate: Tue Sep 17 17:19:39 2024 +0200
cid#1608224 Overflowed constant
Change-Id: I6a76e85754120ef0bc9d3b357a622d312362a72c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173548
Tested-by: Caolán McNamara <[email protected]>
Reviewed-by: Caolán McNamara <[email protected]>
diff --git a/sw/source/core/doc/DocumentContentOperationsManager.cxx
b/sw/source/core/doc/DocumentContentOperationsManager.cxx
index 047210fb3631..ce7bb41149dc 100644
--- a/sw/source/core/doc/DocumentContentOperationsManager.cxx
+++ b/sw/source/core/doc/DocumentContentOperationsManager.cxx
@@ -2327,7 +2327,8 @@ bool DocumentContentOperationsManager::DelFullPara(
SwPaM& rPam )
// What's with Flys?
{
// If there are FlyFrames left, delete these too
- for( size_t n = 0; n < m_rDoc.GetSpzFrameFormats()->size(); ++n )
+ size_t n = 0;;
+ while (n < m_rDoc.GetSpzFrameFormats()->size())
{
sw::SpzFrameFormat* pFly = (*m_rDoc.GetSpzFrameFormats())[n];
const SwFormatAnchor* pAnchor = &pFly->GetAnchor();
@@ -2341,8 +2342,9 @@ bool DocumentContentOperationsManager::DelFullPara(
SwPaM& rPam )
aRg.aStart <= *pAnchorNode && *pAnchorNode <=
aRg.aEnd.GetNode() )
{
m_rDoc.getIDocumentLayoutAccess().DelLayoutFormat( pFly );
- --n;
+ continue;
}
+ ++n;
}
}
commit 086941f0e60c4a41b84cad9c67ad24f8a70133fc
Author: Caolán McNamara <[email protected]>
AuthorDate: Tue Sep 17 10:31:08 2024 +0100
Commit: Caolán McNamara <[email protected]>
CommitDate: Tue Sep 17 17:19:16 2024 +0200
cid#1608244 Overflowed constant
Change-Id: Ia96ff4eb0840c6136cb6cd0eefee1cc487bce355
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173547
Tested-by: Caolán McNamara <[email protected]>
Reviewed-by: Caolán McNamara <[email protected]>
diff --git a/xmloff/source/text/XMLFootnoteConfigurationImportContext.cxx
b/xmloff/source/text/XMLFootnoteConfigurationImportContext.cxx
index a9657038c7f0..8de2cb40a6a7 100644
--- a/xmloff/source/text/XMLFootnoteConfigurationImportContext.cxx
+++ b/xmloff/source/text/XMLFootnoteConfigurationImportContext.cxx
@@ -176,9 +176,9 @@ void XMLFootnoteConfigurationImportContext::SetAttribute(
sal_Int32 nElement,
case XML_ELEMENT(TEXT, XML_OFFSET): // for backwards compatibility
with SRC630 & earlier
{
sal_Int32 nTmp;
- if (::sax::Converter::convertNumber(nTmp, rValue, 0,
SAL_MAX_UINT16))
+ if (::sax::Converter::convertNumber(nTmp, rValue, 0,
SAL_MAX_INT16))
{
- nOffset = static_cast<sal_uInt16>(nTmp);
+ nOffset = static_cast<sal_Int16>(nTmp);
}
break;
}
commit b8ef51bc0130f2832b86214dc6ce6315faae325c
Author: Caolán McNamara <[email protected]>
AuthorDate: Tue Sep 17 10:24:33 2024 +0100
Commit: Caolán McNamara <[email protected]>
CommitDate: Tue Sep 17 17:19:00 2024 +0200
cid#1608322 silence Overflowed constant
Change-Id: I23229d2bb29c926f9840f11b09ebc591f1b0047f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173544
Tested-by: Caolán McNamara <[email protected]>
Reviewed-by: Caolán McNamara <[email protected]>
diff --git a/sw/source/core/doc/docedt.cxx b/sw/source/core/doc/docedt.cxx
index 98b53aa05457..a627e8de57b9 100644
--- a/sw/source/core/doc/docedt.cxx
+++ b/sw/source/core/doc/docedt.cxx
@@ -105,7 +105,8 @@ void RestFlyInRange( SaveFlyArr & rArr, const SwPosition&
rStartPos,
void SaveFlyInRange( const SwNodeRange& rRg, SaveFlyArr& rArr )
{
sw::SpzFrameFormats& rSpzs =
*rRg.aStart.GetNode().GetDoc().GetSpzFrameFormats();
- for(sw::FrameFormats<sw::SpzFrameFormat*>::size_type n = 0; n <
rSpzs.size(); ++n )
+ sw::FrameFormats<sw::SpzFrameFormat*>::size_type n = 0;
+ while (n < rSpzs.size())
{
auto pSpz = rSpzs[n];
SwFormatAnchor const*const pAnchor = &pSpz->GetAnchor();
@@ -126,8 +127,10 @@ void SaveFlyInRange( const SwNodeRange& rRg, SaveFlyArr&
rArr )
SwFormatAnchor aAnchor( pSpz->GetAnchor() );
aAnchor.SetAnchor(nullptr);
pSpz->SetFormatAttr(aAnchor);
- rSpzs.erase( rSpzs.begin() + n-- );
+ rSpzs.erase( rSpzs.begin() + n );
+ continue;
}
+ ++n;
}
sw::CheckAnchoredFlyConsistency(rRg.aStart.GetNode().GetDoc());
}
commit b289d5f5cbd9d138832bb8871543763e728c8135
Author: Caolán McNamara <[email protected]>
AuthorDate: Tue Sep 17 10:15:54 2024 +0100
Commit: Caolán McNamara <[email protected]>
CommitDate: Tue Sep 17 17:18:34 2024 +0200
cid#1608561 Overflowed constant
Change-Id: I3115263da1c76f635d544e41c3cf96e068b34324
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173543
Tested-by: Caolán McNamara <[email protected]>
Reviewed-by: Caolán McNamara <[email protected]>
diff --git a/codemaker/source/cppumaker/dumputils.cxx
b/codemaker/source/cppumaker/dumputils.cxx
index 2a3e809e70f3..37e3ce629862 100644
--- a/codemaker/source/cppumaker/dumputils.cxx
+++ b/codemaker/source/cppumaker/dumputils.cxx
@@ -71,7 +71,8 @@ bool dumpNamespaceClose(
}
void dumpTypeIdentifier(FileStream & out, std::u16string_view entityName) {
- out << entityName.substr(entityName.rfind('.') + 1);
+ std::u16string_view::size_type pos = entityName.rfind('.');
+ out << entityName.substr((pos != std::u16string_view::npos) ? pos + 1 : 0);
}
}
commit 0810f7d891a8b94bd77d02d7bb1efd2a3f9440fc
Author: Caolán McNamara <[email protected]>
AuthorDate: Tue Sep 17 10:13:50 2024 +0100
Commit: Caolán McNamara <[email protected]>
CommitDate: Tue Sep 17 17:18:22 2024 +0200
cid#1608578 Overflowed constant
Change-Id: Id7f5b94208f75a0fdc8ebb769b5a8265312c0995
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173542
Tested-by: Caolán McNamara <[email protected]>
Reviewed-by: Caolán McNamara <[email protected]>
diff --git a/xmloff/source/text/txtdropi.cxx b/xmloff/source/text/txtdropi.cxx
index a076fcc8fff1..896da4eed561 100644
--- a/xmloff/source/text/txtdropi.cxx
+++ b/xmloff/source/text/txtdropi.cxx
@@ -68,9 +68,9 @@ void XMLTextDropCapImportContext::ProcessAttrs(
case XML_ELEMENT(STYLE, XML_DISTANCE):
if (GetImport().GetMM100UnitConverter().convertMeasureToCore(
- nTmp, aIter.toView(), 0, SAL_MAX_UINT16 ))
+ nTmp, aIter.toView(), 0, SAL_MAX_INT16 ))
{
- aFormat.Distance = static_cast<sal_uInt16>(nTmp);
+ aFormat.Distance = static_cast<sal_Int16>(nTmp);
}
break;
commit cf6dd625a440e250dc7edf13d03d7a8734a5ea7d
Author: Caolán McNamara <[email protected]>
AuthorDate: Tue Sep 17 09:22:51 2024 +0100
Commit: Caolán McNamara <[email protected]>
CommitDate: Tue Sep 17 17:18:02 2024 +0200
ofz#71606 use better upstream solution
Change-Id: I088db3a8defd4cddee657c25d35724932339b983
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173541
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <[email protected]>
diff --git a/external/libpng/0001-ACES-AP0-adjusted-fixes.patch.1
b/external/libpng/0001-ACES-AP0-adjusted-fixes.patch.1
new file mode 100644
index 000000000000..af8b53554ebc
--- /dev/null
+++ b/external/libpng/0001-ACES-AP0-adjusted-fixes.patch.1
@@ -0,0 +1,47 @@
+From e06f9a3bece6130212b244ac4e1a1d316990f3c0 Mon Sep 17 00:00:00 2001
+From: John Bowler <[email protected]>
+Date: Mon, 16 Sep 2024 17:30:38 -0700
+Subject: [PATCH] ACES AP0 adjusted fixes
+
+The subtracts in PNG_XYZ_from_xy might be producing integer overflow
+with some valid but extreme xy values. This re-introduces the previous
+checks but with less limited bounds; sufficient I believe to accomodate
+any reasonable set of endpoints.
+
+This is a temporary fix since it outlaws valid PNG cHRM chunks; the only
+valid approaches are not to check or to using floating point arithmetic
+internally.
+
+Signed-off-by: John Bowler <[email protected]>
+---
+ png.c | 14 ++++++++++++++
+ 1 file changed, 14 insertions(+)
+
+diff --git a/png.c b/png.c
+index 500daea5f..5d6db2974 100644
+--- a/png.c
++++ b/png.c
+@@ -1289,6 +1289,20 @@ png_XYZ_from_xy(png_XYZ *XYZ, const png_xy *xy)
+ png_fixed_point red_inverse, green_inverse, blue_scale;
+ png_fixed_point left, right, denominator;
+
++ /* Check xy and, implicitly, z. Note that wide gamut color spaces
typically
++ * have end points with 0 tristimulus values (these are impossible end
++ * points, but they are used to cover the possible colors). We check
++ * xy->whitey against 5, not 0, to avoid a possible integer overflow.
++ */
++ if (xy->redx < -PNG_FP_1 || xy->redx > 2*PNG_FP_1) return 1;
++ if (xy->redy < -PNG_FP_1 || xy->redy > 2*PNG_FP_1) return 1;
++ if (xy->greenx < -PNG_FP_1 || xy->greenx > 2*PNG_FP_1) return 1;
++ if (xy->greeny < -PNG_FP_1 || xy->greeny > 2*PNG_FP_1) return 1;
++ if (xy->bluex < -PNG_FP_1 || xy->bluex > 2*PNG_FP_1) return 1;
++ if (xy->bluey < -PNG_FP_1 || xy->bluey > 2*PNG_FP_1) return 1;
++ if (xy->whitex < -PNG_FP_1 || xy->whitex > 2*PNG_FP_1) return 1;
++ if (xy->whitey < -PNG_FP_1 || xy->whitey > 2*PNG_FP_1) return 1;
++
+ /* The reverse calculation is more difficult because the original
tristimulus
+ * value had 9 independent values (red,green,blue)x(X,Y,Z) however only 8
+ * derived values were recorded in the cHRM chunk;
+--
+2.46.0
+
diff --git a/external/libpng/UnpackedTarball_libpng.mk
b/external/libpng/UnpackedTarball_libpng.mk
index dca4e4b5cfe9..af17418daa6f 100644
--- a/external/libpng/UnpackedTarball_libpng.mk
+++ b/external/libpng/UnpackedTarball_libpng.mk
@@ -15,4 +15,8 @@ $(eval $(call gb_UnpackedTarball_add_files,libpng,.,\
external/libpng/configs/pnglibconf.h \
))
+$(eval $(call gb_UnpackedTarball_add_patches,libpng,\
+ external/libpng/0001-ACES-AP0-adjusted-fixes.patch.1 \
+))
+
# vim: set noet sw=4 ts=4:
diff --git a/vcl/source/filter/png/PngImageReader.cxx
b/vcl/source/filter/png/PngImageReader.cxx
index 6f8c6ff669bb..e64343dd0070 100644
--- a/vcl/source/filter/png/PngImageReader.cxx
+++ b/vcl/source/filter/png/PngImageReader.cxx
@@ -394,7 +394,10 @@ bool reader(SvStream& rStream, Graphic& rGraphic,
png_set_read_fn(pPng, &rStream, lclReadStream);
- png_set_crc_action(pPng, PNG_CRC_ERROR_QUIT, PNG_CRC_WARN_DISCARD);
+ if (!bFuzzing)
+ png_set_crc_action(pPng, PNG_CRC_ERROR_QUIT, PNG_CRC_WARN_DISCARD);
+ else
+ png_set_crc_action(pPng, PNG_CRC_QUIET_USE, PNG_CRC_QUIET_USE);
png_set_sig_bytes(pPng, PNG_SIGNATURE_SIZE);
@@ -773,6 +776,7 @@ BinaryDataContainer getMsGifChunk(SvStream& rStream)
// try to get it using libpng.
// https://en.wikipedia.org/wiki/Portable_Network_Graphics#File_format
// Each chunk is: 4 bytes length, 4 bytes type, <length> bytes, 4 bytes crc
+ bool ignoreCrc = comphelper::IsFuzzing();
for (;;)
{
sal_uInt32 length(0), type(0), crc(0);
@@ -805,7 +809,7 @@ BinaryDataContainer getMsGifChunk(SvStream& rStream)
return {};
computedCrc = rtl_crc32(computedCrc, chunk.getData(),
chunk.getSize());
rStream.ReadUInt32(crc);
- if (crc != computedCrc)
+ if (!ignoreCrc && crc != computedCrc)
continue; // invalid chunk, ignore
return chunk;
}
commit 22daa770c2bc5d7105f1477410f2410f5a15b487
Author: Caolán McNamara <[email protected]>
AuthorDate: Tue Sep 17 09:06:26 2024 +0100
Commit: Caolán McNamara <[email protected]>
CommitDate: Tue Sep 17 17:17:54 2024 +0200
these can be const
Change-Id: Id560175cc69162b362e8f96b2dc0255118387f8f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173539
Tested-by: Caolán McNamara <[email protected]>
Reviewed-by: Caolán McNamara <[email protected]>
diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index 6a23f17911f2..ad8787c5173b 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -7924,7 +7924,7 @@ static void preloadData()
std::cerr << "Preloading local dictionaries: ";
css::uno::Reference<linguistic2::XSupportedLocales>
xSpellLocales(xSpellChecker, css::uno::UNO_QUERY_THROW);
uno::Sequence< css::lang::Locale > aLocales = xSpellLocales->getLocales();
- for (auto& it : aLocales)
+ for (const auto& it : aLocales)
{
std::cerr << LanguageTag::convertToBcp47(it) << " ";
css::beans::PropertyValues aNone;
@@ -7945,7 +7945,7 @@ static void preloadData()
css::uno::Reference<linguistic2::XSupportedLocales>
xThesLocales(xSpellChecker, css::uno::UNO_QUERY_THROW);
aLocales = xThesLocales->getLocales();
std::cerr << "Preloading local thesauri: ";
- for (auto& it : aLocales)
+ for (const auto& it : aLocales)
{
std::cerr << LanguageTag::convertToBcp47(it) << " ";
css::beans::PropertyValues aNone;
commit 1f9d39b4b518eb6316d822c63d7b9b456de9e1c0
Author: Caolán McNamara <[email protected]>
AuthorDate: Mon Sep 16 12:55:33 2024 +0100
Commit: Caolán McNamara <[email protected]>
CommitDate: Tue Sep 17 17:17:39 2024 +0200
Output what languages are handled by LanguageTool
to explain the absence of languages that are listed by 'Preloading'
because the languages handled by a remote LanguageTool are removed
from the languages handled with local data.
Change-Id: I203657f68a7b9399e39ebf9ab9447c7ae56efe68
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173448
Reviewed-by: Miklos Vajna <[email protected]>
Tested-by: Jenkins CollaboraOffice <[email protected]>
(cherry picked from commit c5fc86e770901eb90356cb31d4ac71ac7dad9ce6)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173538
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <[email protected]>
diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index cf6088164730..6a23f17911f2 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -1020,8 +1020,10 @@ void hideSidebar()
SetLastExceptionMsg(u"No view shell or sidebar"_ustr);
}
-void setLanguageToolConfig()
+css::uno::Sequence<css::lang::Locale> setLanguageToolConfig()
{
+ css::uno::Sequence<css::lang::Locale> aLTLocales;
+
const char* pEnabled = ::getenv("LANGUAGETOOL_ENABLED");
const char* pBaseUrlString = ::getenv("LANGUAGETOOL_BASEURL");
@@ -1034,7 +1036,7 @@ void setLanguageToolConfig()
OUString aEnabled = OStringToOUString(pEnabled, RTL_TEXTENCODING_UTF8);
if (aEnabled != "true")
- return;
+ return aLTLocales;
OUString aBaseUrl = OStringToOUString(pBaseUrlString,
RTL_TEXTENCODING_UTF8);
try
{
@@ -1062,6 +1064,11 @@ void setLanguageToolConfig()
}
batch->commit();
+ uno::Reference<linguistic2::XProofreader> xGC(
+
xContext->getServiceManager()->createInstanceWithContext(u"org.openoffice.lingu.LanguageToolGrammarChecker"_ustr,
xContext),
+ uno::UNO_QUERY_THROW);
+ uno::Reference<linguistic2::XSupportedLocales> xSuppLoc(xGC,
uno::UNO_QUERY_THROW);
+
css::uno::Reference<css::linguistic2::XLinguServiceManager2>
xLangSrv =
css::linguistic2::LinguServiceManager::create(xContext);
if (xLangSrv.is())
@@ -1072,11 +1079,6 @@ void setLanguageToolConfig()
Sequence<OUString> aEmpty;
Sequence<css::lang::Locale> aLocales =
xSpell->getLocales();
- uno::Reference<linguistic2::XProofreader> xGC(
-
xContext->getServiceManager()->createInstanceWithContext(u"org.openoffice.lingu.LanguageToolGrammarChecker"_ustr,
xContext),
- uno::UNO_QUERY_THROW);
- uno::Reference<linguistic2::XSupportedLocales>
xSuppLoc(xGC, uno::UNO_QUERY_THROW);
-
for (int itLocale = 0; itLocale < aLocales.getLength();
itLocale++)
{
// turn off spell checker if LanguageTool supports the
locale already
@@ -1086,12 +1088,16 @@ void setLanguageToolConfig()
}
}
}
+
+ aLTLocales = xSuppLoc->getLocales();
}
catch(uno::Exception const& rException)
{
SAL_WARN("lok", "Failed to set LanguageTool API settings: " <<
rException.Message);
}
}
+
+ return aLTLocales;
}
} // end anonymous namespace
@@ -7900,7 +7906,14 @@ static void preloadData()
std::cerr << "
";
// setup LanguageTool config before spell checking init
- setLanguageToolConfig();
+ css::uno::Sequence<css::lang::Locale> aLTLocales = setLanguageToolConfig();
+ if (aLTLocales.getLength())
+ {
+ std::cerr << "Remote linguistic service languages: ";
+ for (auto &it : std::as_const(aLTLocales))
+ std::cerr << LanguageTag::convertToBcp47(it) << " ";
+ std::cerr << "
";
+ }
// preload all available dictionaries
linguistic2::DictionaryList::create(comphelper::getProcessComponentContext());
@@ -7908,7 +7921,7 @@ static void preloadData()
css::linguistic2::LinguServiceManager::create(comphelper::getProcessComponentContext());
css::uno::Reference<linguistic2::XSpellChecker>
xSpellChecker(xLngSvcMgr->getSpellChecker());
- std::cerr << "Preloading dictionaries: ";
+ std::cerr << "Preloading local dictionaries: ";
css::uno::Reference<linguistic2::XSupportedLocales>
xSpellLocales(xSpellChecker, css::uno::UNO_QUERY_THROW);
uno::Sequence< css::lang::Locale > aLocales = xSpellLocales->getLocales();
for (auto& it : aLocales)
@@ -7931,7 +7944,7 @@ static void preloadData()
css::uno::Reference<linguistic2::XThesaurus>
xThesaurus(xLngSvcMgr->getThesaurus());
css::uno::Reference<linguistic2::XSupportedLocales>
xThesLocales(xSpellChecker, css::uno::UNO_QUERY_THROW);
aLocales = xThesLocales->getLocales();
- std::cerr << "Preloading thesauri: ";
+ std::cerr << "Preloading local thesauri: ";
for (auto& it : aLocales)
{
std::cerr << LanguageTag::convertToBcp47(it) << " ";
commit 0bf27ee5226496f844361e2c8cc0fbf625ec1466
Author: Caolán McNamara <[email protected]>
AuthorDate: Mon Sep 16 13:20:28 2024 +0100
Commit: Caolán McNamara <[email protected]>
CommitDate: Tue Sep 17 17:17:30 2024 +0200
move setLanguageToolConfig out of extern "C" zone
no logic change here
Change-Id: I29153a11e1b841fa078d29a6431cd5af1179672e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173450
Tested-by: Jenkins CollaboraOffice <[email protected]>
Reviewed-by: Miklos Vajna <[email protected]>
(cherry picked from commit 26e433e0e3c6dfbf2569c3b6f0a14249dc4d0c1f)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173537
Reviewed-by: Caolán McNamara <[email protected]>
Tested-by: Caolán McNamara <[email protected]>
diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index 9cc65b4b9e68..cf6088164730 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -796,6 +796,11 @@ static int lcl_getViewId(std::string_view payload)
return 0;
}
+// Wonder global state ...
+static uno::Reference<css::uno::XComponentContext> xContext;
+static uno::Reference<css::lang::XMultiServiceFactory> xSFactory;
+static uno::Reference<css::lang::XMultiComponentFactory> xFactory;
+
namespace {
std::string extractCertificate(const std::string & certificate)
@@ -1015,6 +1020,80 @@ void hideSidebar()
SetLastExceptionMsg(u"No view shell or sidebar"_ustr);
}
+void setLanguageToolConfig()
+{
+ const char* pEnabled = ::getenv("LANGUAGETOOL_ENABLED");
+ const char* pBaseUrlString = ::getenv("LANGUAGETOOL_BASEURL");
+
+ if (pEnabled && pBaseUrlString)
+ {
+ const char* pUsername = ::getenv("LANGUAGETOOL_USERNAME");
+ const char* pApikey = ::getenv("LANGUAGETOOL_APIKEY");
+ const char* pSSLVerification =
::getenv("LANGUAGETOOL_SSL_VERIFICATION");
+ const char* pRestProtocol = ::getenv("LANGUAGETOOL_RESTPROTOCOL");
+
+ OUString aEnabled = OStringToOUString(pEnabled, RTL_TEXTENCODING_UTF8);
+ if (aEnabled != "true")
+ return;
+ OUString aBaseUrl = OStringToOUString(pBaseUrlString,
RTL_TEXTENCODING_UTF8);
+ try
+ {
+ using LanguageToolCfg =
officecfg::Office::Linguistic::GrammarChecking::LanguageTool;
+ auto batch(comphelper::ConfigurationChanges::create());
+
+ LanguageToolCfg::BaseURL::set(aBaseUrl, batch);
+ LanguageToolCfg::IsEnabled::set(true, batch);
+ if (pSSLVerification)
+ {
+ OUString aSSLVerification =
OStringToOUString(pSSLVerification, RTL_TEXTENCODING_UTF8);
+ LanguageToolCfg::SSLCertVerify::set(aSSLVerification ==
"true", batch);
+ }
+ if (pRestProtocol)
+ {
+ OUString aRestProtocol = OStringToOUString(pRestProtocol,
RTL_TEXTENCODING_UTF8);
+ LanguageToolCfg::RestProtocol::set(aRestProtocol, batch);
+ }
+ if (pUsername && pApikey)
+ {
+ OUString aUsername = OStringToOUString(pUsername,
RTL_TEXTENCODING_UTF8);
+ OUString aApiKey = OStringToOUString(pApikey,
RTL_TEXTENCODING_UTF8);
+ LanguageToolCfg::Username::set(aUsername, batch);
+ LanguageToolCfg::ApiKey::set(aApiKey, batch);
+ }
+ batch->commit();
+
+ css::uno::Reference<css::linguistic2::XLinguServiceManager2>
xLangSrv =
+ css::linguistic2::LinguServiceManager::create(xContext);
+ if (xLangSrv.is())
+ {
+ css::uno::Reference<css::linguistic2::XSpellChecker> xSpell =
xLangSrv->getSpellChecker();
+ if (xSpell.is())
+ {
+ Sequence<OUString> aEmpty;
+ Sequence<css::lang::Locale> aLocales =
xSpell->getLocales();
+
+ uno::Reference<linguistic2::XProofreader> xGC(
+
xContext->getServiceManager()->createInstanceWithContext(u"org.openoffice.lingu.LanguageToolGrammarChecker"_ustr,
xContext),
+ uno::UNO_QUERY_THROW);
+ uno::Reference<linguistic2::XSupportedLocales>
xSuppLoc(xGC, uno::UNO_QUERY_THROW);
+
+ for (int itLocale = 0; itLocale < aLocales.getLength();
itLocale++)
+ {
+ // turn off spell checker if LanguageTool supports the
locale already
+ if (xSuppLoc->hasLocale(aLocales[itLocale]))
+ xLangSrv->setConfiguredServices(
+ SN_SPELLCHECKER, aLocales[itLocale], aEmpty);
+ }
+ }
+ }
+ }
+ catch(uno::Exception const& rException)
+ {
+ SAL_WARN("lok", "Failed to set LanguageTool API settings: " <<
rException.Message);
+ }
+ }
+}
+
} // end anonymous namespace
// Could be anonymous in principle, but for the unit testing purposes, we
@@ -2704,11 +2783,6 @@ void setFormatSpecificFilterData(std::u16string_view
sFormat, comphelper::Sequen
} // anonymous namespace
-// Wonder global state ...
-static uno::Reference<css::uno::XComponentContext> xContext;
-static uno::Reference<css::lang::XMultiServiceFactory> xSFactory;
-static uno::Reference<css::lang::XMultiComponentFactory> xFactory;
-
static LibreOfficeKitDocument* lo_documentLoad(LibreOfficeKit* pThis, const
char* pURL)
{
return lo_documentLoadWithOptions(pThis, pURL, nullptr);
@@ -7798,8 +7872,6 @@ static void preLoadShortCutAccelerators()
batch->commit();
}
-void setLanguageToolConfig();
-
/// Used only by LibreOfficeKit when used by Online to pre-initialize
static void preloadData()
{
@@ -8057,80 +8129,6 @@ void setDeeplConfig()
}
}
-void setLanguageToolConfig()
-{
- const char* pEnabled = ::getenv("LANGUAGETOOL_ENABLED");
- const char* pBaseUrlString = ::getenv("LANGUAGETOOL_BASEURL");
-
- if (pEnabled && pBaseUrlString)
- {
- const char* pUsername = ::getenv("LANGUAGETOOL_USERNAME");
- const char* pApikey = ::getenv("LANGUAGETOOL_APIKEY");
- const char* pSSLVerification =
::getenv("LANGUAGETOOL_SSL_VERIFICATION");
- const char* pRestProtocol = ::getenv("LANGUAGETOOL_RESTPROTOCOL");
-
- OUString aEnabled = OStringToOUString(pEnabled, RTL_TEXTENCODING_UTF8);
- if (aEnabled != "true")
- return;
- OUString aBaseUrl = OStringToOUString(pBaseUrlString,
RTL_TEXTENCODING_UTF8);
- try
- {
- using LanguageToolCfg =
officecfg::Office::Linguistic::GrammarChecking::LanguageTool;
- auto batch(comphelper::ConfigurationChanges::create());
-
- LanguageToolCfg::BaseURL::set(aBaseUrl, batch);
- LanguageToolCfg::IsEnabled::set(true, batch);
- if (pSSLVerification)
- {
- OUString aSSLVerification =
OStringToOUString(pSSLVerification, RTL_TEXTENCODING_UTF8);
- LanguageToolCfg::SSLCertVerify::set(aSSLVerification ==
"true", batch);
- }
- if (pRestProtocol)
- {
- OUString aRestProtocol = OStringToOUString(pRestProtocol,
RTL_TEXTENCODING_UTF8);
- LanguageToolCfg::RestProtocol::set(aRestProtocol, batch);
- }
- if (pUsername && pApikey)
- {
- OUString aUsername = OStringToOUString(pUsername,
RTL_TEXTENCODING_UTF8);
- OUString aApiKey = OStringToOUString(pApikey,
RTL_TEXTENCODING_UTF8);
- LanguageToolCfg::Username::set(aUsername, batch);
- LanguageToolCfg::ApiKey::set(aApiKey, batch);
- }
- batch->commit();
-
- css::uno::Reference<css::linguistic2::XLinguServiceManager2>
xLangSrv =
- css::linguistic2::LinguServiceManager::create(xContext);
- if (xLangSrv.is())
- {
- css::uno::Reference<css::linguistic2::XSpellChecker> xSpell =
xLangSrv->getSpellChecker();
- if (xSpell.is())
- {
- Sequence<OUString> aEmpty;
- Sequence<css::lang::Locale> aLocales =
xSpell->getLocales();
-
- uno::Reference<linguistic2::XProofreader> xGC(
-
xContext->getServiceManager()->createInstanceWithContext(u"org.openoffice.lingu.LanguageToolGrammarChecker"_ustr,
xContext),
- uno::UNO_QUERY_THROW);
- uno::Reference<linguistic2::XSupportedLocales>
xSuppLoc(xGC, uno::UNO_QUERY_THROW);
-
- for (int itLocale = 0; itLocale < aLocales.getLength();
itLocale++)
- {
- // turn off spell checker if LanguageTool supports the
locale already
- if (xSuppLoc->hasLocale(aLocales[itLocale]))
- xLangSrv->setConfiguredServices(
- SN_SPELLCHECKER, aLocales[itLocale], aEmpty);
- }
- }
- }
- }
- catch(uno::Exception const& rException)
- {
- SAL_WARN("lok", "Failed to set LanguageTool API settings: " <<
rException.Message);
- }
- }
-}
-
}
static int lo_initialize(LibreOfficeKit* pThis, const char* pAppPath, const
char* pUserProfileUrl)
commit b9a70d822ce54fc6976542a48ff938a1adc6661d
Author: Xisco Fauli <[email protected]>
AuthorDate: Mon Sep 16 17:32:43 2024 +0200
Commit: Xisco Fauli <[email protected]>
CommitDate: Tue Sep 17 17:15:25 2024 +0200
unoxml: move checkSPARQL from Java to CppUnittest
Change-Id: Id8adaec00b9920966c91471fdd32720337a8c414
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173462
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <[email protected]>
diff --git a/unoxml/qa/complex/unoxml/RDFRepositoryTest.java
b/unoxml/qa/complex/unoxml/RDFRepositoryTest.java
index 987e8dc5f5f7..d6b4ec2c06ec 100644
--- a/unoxml/qa/complex/unoxml/RDFRepositoryTest.java
+++ b/unoxml/qa/complex/unoxml/RDFRepositoryTest.java
@@ -63,8 +63,6 @@ public class RDFRepositoryTest
XURI baz;
XURI uint;
XURI rdfslabel;
- XURI manifest;
- XURI uuid;
XURI base;
XBlankNode blank;
XLiteral lit;
@@ -113,11 +111,6 @@ public class RDFRepositoryTest
rdfslabel = URI.create(xContext, rdfs + "label");
assertNotNull("rdfslabel", rdfslabel);
- manifest = URI.create(xContext, "manifest:manifest"); //FIXME
- assertNotNull("manifest", manifest);
- uuid = URI.create(xContext,
- "urn:uuid:224ab023-77b8-4396-a75a-8cecd85b81e3");
- assertNotNull("uuid", uuid);
base = URI.create(xContext, "base-uri:"); //FIXME
assertNotNull("base", base);
} catch (Exception e) {
@@ -344,98 +337,6 @@ public class RDFRepositoryTest
}
}
- @Test
- public void checkSPARQL()
- {
- try {
-
- System.out.println("Checking SPARQL queries...");
-
- XInputStream xIn = new
StreamSimulator(TestDocument.getUrl("example.rdf"), true, param);
- xRep.importGraph(FileFormat.RDF_XML, xIn, manifest, base);
-
- String query;
- query = "SELECT ?p WHERE { ?p rdf:type pkg:Package . }";
- XQuerySelectResult result = xRep.querySelect(mkNss() + query);
- assertTrue("query: package-id
" + query,
- eq(result, new String[] { "p" },
- new XNode[][] { { uuid } }));
-
- query = "SELECT ?part ?path FROM <" + manifest +
- "> WHERE { ?pkg rdf:type pkg:Package . ?pkg pkg:hasPart ?part ."
- + " ?part pkg:path ?path . ?part rdf:type odf:ContentFile. }";
- result = xRep.querySelect(mkNss() + query);
- assertTrue("query: contentfile",
- eq(result, new String[] { "part", "path" },
- new XNode[][] { { BlankNode.create(xContext, "whatever"),
- Literal.create(xContext, "content.xml") } }));
-
- query = "SELECT ?pkg ?path FROM <" + toS(manifest) + "> WHERE { "
- + "?pkg rdf:type pkg:Package . ?pkg pkg:hasPart ?part . "
- + "?part pkg:path ?path . ?part rdf:type odf:ContentFile. }";
- result = xRep.querySelect(mkNss() + query);
- assertTrue("query: contentfile
" + query,
- eq(result, new String[] { "pkg", "path" },
- new XNode[][] { { uuid ,
- Literal.create(xContext, "content.xml") } }));
-
- query = "SELECT ?part ?path FROM <" + toS(manifest) + "> WHERE { "
- + "?pkg rdf:type pkg:Package . ?pkg pkg:hasPart ?part . "
- + "?part pkg:path ?path . ?part rdf:type odf:StylesFile. }";
- result = xRep.querySelect(mkNss() + query);
- assertTrue("query: stylesfile
" + query,
- eq(result, new String[] { "part", "path" },
- new XNode[][] { }));
-
- query = "SELECT ?part ?path FROM <" + toS(manifest) + "> WHERE { "
- + "?pkg rdf:type pkg:Package . ?pkg pkg:hasPart ?part . "
- + "?part pkg:path ?path . ?part rdf:type odf:MetadataFile. }";
- result = xRep.querySelect(mkNss() + query);
- assertTrue("query: metadatafile
" + query,
- eq(result, new String[] { "part", "path" },
- new XNode[][] { {
- URI.create(xContext,
"http://hospital-employee/doctor"),
- Literal.create(xContext,
- "meta/hospital/doctor.rdf") } }));
-
-//FIXME redland BUG
- String uri = "uri:example-element-2";
- query = "SELECT ?path ?idref FROM <" + toS(manifest) + "> WHERE {
"
- + "<" + toS(uuid) + "> pkg:hasPart ?part . "
- + "?part pkg:path ?path ; "
- + " rdf:type ?type ; "
- + " pkg:hasPart <" + uri + "> . "
- + "<" + uri + "> "
- + " pkg:idref ?idref . "
- + " FILTER (?type = odf:ContentFile || ?type = odf:StylesFile)"
- + " }";
- result = xRep.querySelect(mkNss() + query);
- assertTrue("query: example-element-2
" + query,
- eq(result, new String[] { "path", "idref" },
- new XNode[][] { {
- Literal.create(xContext, "content.xml"),
- Literal.create(xContext, "ID_B") } }));
-
- // CONSTRUCT result triples have no graph!
- Statement x_PkgFooLit = new Statement(uuid, foo, lit, null);
- query = "CONSTRUCT { ?pkg <" + toS(foo) + "> \"" +
- lit.getStringValue() + "\" } FROM <" + toS(manifest) +
- "> WHERE { ?pkg rdf:type pkg:Package . } ";
- XEnumeration xResultEnum = xRep.queryConstruct(mkNss() + query);
- assertTrue("query: construct
" + query,
- eq(xResultEnum, new Statement[] { x_PkgFooLit }));
-
- query = "ASK { ?pkg rdf:type pkg:Package . }";
- boolean bResult = xRep.queryAsk(mkNss() + query);
- assertTrue("query: ask
" + query, bResult);
-
- System.out.println("...done");
-
- } catch (Exception e) {
- report(e);
- }
- }
-
// utilities -------------------------------------------------------------
public void report(Exception e) {
@@ -468,32 +369,6 @@ public class RDFRepositoryTest
return c.toArray(new Statement[c.size()]);
}
- static XNode[][] toSeqs(XEnumeration i_Enum) throws Exception
- {
- java.util.Collection<XNode[]> c = new java.util.ArrayList<XNode[]>();
- while (i_Enum.hasMoreElements()) {
- XNode[] s = (XNode[]) i_Enum.nextElement();
- c.add(s);
- }
- return c.toArray(new XNode[c.size()][]);
- }
-
- private static class BindingComp implements java.util.Comparator<XNode[]>
- {
- public int compare(XNode[] left, XNode[] right)
- {
- if (left.length != right.length)
- {
- throw new RuntimeException();
- }
- for (int i = 0; i < left.length; ++i) {
- int eq =
left[i].getStringValue().compareTo(right[i].getStringValue());
- if (eq != 0) return eq;
- }
- return 0;
- }
- }
-
private static class StmtComp implements java.util.Comparator<Statement>
{
public int compare(Statement left, Statement right)
@@ -599,88 +474,6 @@ public class RDFRepositoryTest
}
}
- static boolean eq(XQuerySelectResult i_Result,
- String[] i_Vars, XNode[][] i_Bindings) throws Exception
- {
- String[] vars = i_Result.getBindingNames();
- XEnumeration iter = i_Result;
- XNode[][] bindings = toSeqs(iter);
- if (bindings.length != i_Bindings.length) {
- System.out.println("binding lengths differ: " + i_Bindings.length +
- " vs " + bindings.length );
- return false;
- }
- if (vars.length != i_Vars.length) {
- // ignore for empty result: it is unclear to me whether SPARQL
- // spec requires returning the variables in this case,
- // and evidently newer rasqal versions don't
- if (0 != i_Bindings.length || 0 != vars.length)
- {
- System.out.println("var lengths differ: expected "
- + i_Vars.length + " but got " + vars.length);
- return false;
- }
- } else {
- for (int i = 0; i < i_Vars.length; ++i) {
- if (!vars[i].equals(i_Vars[i])) {
- System.out.println("variable names differ: " +
- vars[i] + " != " + i_Vars[i]);
- return false;
- }
- }
- }
- java.util.Arrays.sort(bindings, new BindingComp());
- java.util.Arrays.sort(i_Bindings, new BindingComp());
- for (int i = 0; i < i_Bindings.length; ++i) {
- if (i_Bindings[i].length != i_Vars.length) {
- System.out.println("TEST ERROR!");
- throw new Exception();
- }
- if (bindings[i].length != i_Vars.length) {
- System.out.println("binding length and var length differ");
- return false;
- }
- for (int j = 0; j < i_Vars.length; ++j) {
- if (!eq(bindings[i][j], i_Bindings[i][j])) {
- System.out.println("bindings differ: " +
- toS(bindings[i][j]) + " != " + toS(i_Bindings[i][j]));
- return false;
- }
- }
- }
- return true;
- }
-
- static String mkNamespace(String i_prefix, String i_namespace)
- {
- return "PREFIX " + i_prefix + ": <" + i_namespace + ">
";
- }
-
- static String mkNss()
- {
- String namespaces = mkNamespace("rdf",
- "http://www.w3.org/1999/02/22-rdf-syntax-ns#");
- namespaces += mkNamespace("pkg",
- "http://docs.oasis-open.org/opendocument/meta/package/common#");
- namespaces += mkNamespace("odf",
- "http://docs.oasis-open.org/opendocument/meta/package/odf#");
- return namespaces;
- }
-
- // useful when debugging
- static void dumpRepo(XDocumentRepository xRep) throws Exception
- {
- XEnumeration xEnum = xRep.getStatements(null, null, null);
- while (xEnum.hasMoreElements())
- {
- Statement s = (Statement) xEnum.nextElement();
- System.out.println("STATEMENT IN: " + toS(s.Graph)
- + "
S: " + toS(s.Subject)
- + "
P: " + toS(s.Predicate)
- + "
O: " + toS(s.Object));
- }
- }
-
private XMultiServiceFactory getMSF()
{
return UnoRuntime.queryInterface(XMultiServiceFactory.class,
connection.getComponentContext().getServiceManager());
diff --git a/unoxml/qa/unit/data/example.rdf b/unoxml/qa/unit/data/example.rdf
new file mode 100644
index 000000000000..d20a75ba2b10
--- /dev/null
+++ b/unoxml/qa/unit/data/example.rdf
@@ -0,0 +1,44 @@
+<?xml version="1.0"?>
+<!--
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+-->
+<rdf:RDF
+ xmlns:pkg="http://docs.oasis-open.org/opendocument/meta/package/common#"
+ xmlns:odf="http://docs.oasis-open.org/opendocument/meta/package/odf#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
+<pkg:Package rdf:about="urn:uuid:224ab023-77b8-4396-a75a-8cecd85b81e3">
+ <pkg:hasPart>
+ <odf:ContentFile pkg:path="content.xml">
+ <pkg:hasPart>
+ <odf:Element rdf:about="uri:example-element-1"
+ pkg:idref="ID_A"/>
+ </pkg:hasPart>
+ <pkg:hasPart>
+ <odf:Element rdf:about="uri:example-element-2"
+ pkg:idref="ID_B"/>
+ </pkg:hasPart>
+ </odf:ContentFile>
+ </pkg:hasPart>
+ <pkg:hasPart>
+ <odf:MetadataFile rdf:about="http://hospital-employee/doctor"
+ pkg:path="meta/hospital/doctor.rdf">
+ <rdf:type rdf:resource="http://medical-employee/data"/>
+ <rdf:type rdf:resource="http://www.w3.org/2006/vcard/ns#"/>
+ </odf:MetadataFile>
+ </pkg:hasPart>
+</pkg:Package>
+</rdf:RDF>
diff --git a/unoxml/qa/unit/rdftest.cxx b/unoxml/qa/unit/rdftest.cxx
index 7e3b93e60875..b20b914f28d5 100644
--- a/unoxml/qa/unit/rdftest.cxx
+++ b/unoxml/qa/unit/rdftest.cxx
@@ -190,6 +190,145 @@ CPPUNIT_TEST_FIXTURE(RDFStreamTest, testRDFa)
CPPUNIT_ASSERT_EQUAL(sal_uInt32(0), xResult.First.size());
CPPUNIT_ASSERT(!xResult.Second);
}
+
+CPPUNIT_TEST_FIXTURE(RDFStreamTest, testSPARQL)
+{
+ const uno::Reference<uno::XComponentContext>
xContext(comphelper::getProcessComponentContext(),
+
css::uno::UNO_SET_THROW);
+ const uno::Reference<com::sun::star::ucb::XSimpleFileAccess> xFileAccess(
+ xContext->getServiceManager()->createInstanceWithContext(
+ u"com.sun.star.ucb.SimpleFileAccess"_ustr, xContext),
+ uno::UNO_QUERY_THROW);
+ const uno::Reference<io::XInputStream> xInputStream(
+
xFileAccess->openFileRead(m_directories.getURLFromSrc(u"/unoxml/qa/unit/data/example.rdf")),
+ uno::UNO_SET_THROW);
+ uno::Reference<rdf::XRepository> xRepo = rdf::Repository::create(xContext);
+ uno::Reference<rdf::XDocumentRepository> xDocRepo(xRepo, uno::UNO_QUERY);
+ CPPUNIT_ASSERT(xDocRepo);
+
+ uno::Reference<css::rdf::XURI> xManifest = rdf::URI::create(xContext,
"manifest:manifest");
+ uno::Reference<css::rdf::XURI> xBase = rdf::URI::create(xContext,
"base-uri:");
+ uno::Reference<css::rdf::XURI> xFoo = rdf::URI::create(xContext,
"uri:foo");
+ uno::Reference<css::rdf::XURI> xBar = rdf::URI::create(xContext,
"uri:bar");
+
+ xDocRepo->importGraph(rdf::FileFormat::RDF_XML, xInputStream, xManifest,
xBase);
+
+ OUString sNss("PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
"
+ "PREFIX pkg:
<http://docs.oasis-open.org/opendocument/meta/package/common#>
"
+ "PREFIX odf:
<http://docs.oasis-open.org/opendocument/meta/package/odf#>
");
+
+ // 1. query: package-id
+ OUString sQuery("SELECT ?p WHERE { ?p rdf:type pkg:Package . }");
+ uno::Reference<rdf::XQuerySelectResult> aResult =
xDocRepo->querySelect(sNss + sQuery);
+ uno::Sequence<OUString> aBindings = aResult->getBindingNames();
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1), aBindings.getLength());
+ CPPUNIT_ASSERT_EQUAL(OUString("p"), aBindings[0]);
+
+ uno::Sequence<uno::Reference<rdf::XNode>> aNode;
+ css::uno::fromAny(aResult->nextElement(), &aNode);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1), aNode.getLength());
+
CPPUNIT_ASSERT_EQUAL(OUString("urn:uuid:224ab023-77b8-4396-a75a-8cecd85b81e3"),
+ aNode[0]->getStringValue());
+
+ CPPUNIT_ASSERT(!aResult->hasMoreElements());
+
+ // 2. query: contentfile
+ sQuery = "SELECT ?part ?path FROM <manifest:manifest> WHERE { ?pkg
rdf:type pkg:Package . ?pkg "
+ "pkg:hasPart ?part . ?part "
+ "pkg:path ?path . ?part rdf:type odf:ContentFile. }";
+ aResult = xDocRepo->querySelect(sNss + sQuery);
+ aBindings = aResult->getBindingNames();
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(2), aBindings.getLength());
+ CPPUNIT_ASSERT_EQUAL(OUString("part"), aBindings[0]);
+ CPPUNIT_ASSERT_EQUAL(OUString("path"), aBindings[1]);
+
+ css::uno::fromAny(aResult->nextElement(), &aNode);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(2), aNode.getLength());
+ CPPUNIT_ASSERT(!aNode[0]->getStringValue().isEmpty());
+ CPPUNIT_ASSERT_EQUAL(OUString("content.xml"), aNode[1]->getStringValue());
+
+ CPPUNIT_ASSERT(!aResult->hasMoreElements());
+
+ // 3. query: contentfile
+ sQuery = "SELECT ?pkg ?path FROM <manifest:manifest> WHERE { ?pkg rdf:type
pkg:Package . ?pkg "
+ "pkg:hasPart ?part . ?part pkg:path ?path . ?part rdf:type
odf:ContentFile. }";
+ aResult = xDocRepo->querySelect(sNss + sQuery);
+ aBindings = aResult->getBindingNames();
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(2), aBindings.getLength());
+ CPPUNIT_ASSERT_EQUAL(OUString("pkg"), aBindings[0]);
+ CPPUNIT_ASSERT_EQUAL(OUString("path"), aBindings[1]);
+
+ css::uno::fromAny(aResult->nextElement(), &aNode);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(2), aNode.getLength());
+
CPPUNIT_ASSERT_EQUAL(OUString("urn:uuid:224ab023-77b8-4396-a75a-8cecd85b81e3"),
+ aNode[0]->getStringValue());
+ CPPUNIT_ASSERT_EQUAL(OUString("content.xml"), aNode[1]->getStringValue());
+
+ CPPUNIT_ASSERT(!aResult->hasMoreElements());
+
+ // 4. query: stylesfile
+ sQuery = "SELECT ?part ?path FROM <manifest:manifest> WHERE { ?pkg
rdf:type pkg:Package . ?pkg "
+ "pkg:hasPart ?part . ?part pkg:path ?path . ?part rdf:type
odf:StylesFile. }";
+ aResult = xDocRepo->querySelect(sNss + sQuery);
+ aBindings = aResult->getBindingNames();
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(0), aBindings.getLength());
+
+ CPPUNIT_ASSERT(!aResult->hasMoreElements());
+
+ // 5. query: metadatafile
+ sQuery = "SELECT ?part ?path FROM <manifest:manifest> WHERE { ?pkg
rdf:type pkg:Package . ?pkg "
+ "pkg:hasPart ?part . ?part pkg:path ?path . ?part rdf:type
odf:MetadataFile. }";
+ aResult = xDocRepo->querySelect(sNss + sQuery);
+ aBindings = aResult->getBindingNames();
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(2), aBindings.getLength());
+ CPPUNIT_ASSERT_EQUAL(OUString("part"), aBindings[0]);
+ CPPUNIT_ASSERT_EQUAL(OUString("path"), aBindings[1]);
+
+ css::uno::fromAny(aResult->nextElement(), &aNode);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(2), aNode.getLength());
+ CPPUNIT_ASSERT_EQUAL(OUString("http://hospital-employee/doctor"),
aNode[0]->getStringValue());
+ CPPUNIT_ASSERT_EQUAL(OUString("meta/hospital/doctor.rdf"),
aNode[1]->getStringValue());
+
+ CPPUNIT_ASSERT(!aResult->hasMoreElements());
+
+ //FIXME redland BUG
+ // 6. query: metadatafile
+ sQuery = "SELECT ?path ?idref FROM <manifest:manifest> WHERE { "
+ "<urn:uuid:224ab023-77b8-4396-a75a-8cecd85b81e3> pkg:hasPart
?part . ?part pkg:path "
+ "?path ; rdf:type ?type ; pkg:hasPart <uri:example-element-2> .
"
+ "<uri:example-element-2> pkg:idref ?idref . FILTER (?type =
odf:ContentFile || "
+ "?type = odf:StylesFile) }";
+ aResult = xDocRepo->querySelect(sNss + sQuery);
+ aBindings = aResult->getBindingNames();
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(2), aBindings.getLength());
+ CPPUNIT_ASSERT_EQUAL(OUString("path"), aBindings[0]);
+ CPPUNIT_ASSERT_EQUAL(OUString("idref"), aBindings[1]);
+
+ css::uno::fromAny(aResult->nextElement(), &aNode);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(2), aNode.getLength());
+ CPPUNIT_ASSERT_EQUAL(OUString("content.xml"), aNode[0]->getStringValue());
+ CPPUNIT_ASSERT_EQUAL(OUString("ID_B"), aNode[1]->getStringValue());
+
+ CPPUNIT_ASSERT(!aResult->hasMoreElements());
+
+ // 7. query: construct
+ sQuery = "CONSTRUCT { ?pkg <uri:foo> \"I am the literal\" } FROM
<manifest:manifest> WHERE { "
+ "?pkg rdf:type pkg:Package . } ";
+ uno::Reference<container::XEnumeration> aResultEnum =
xDocRepo->queryConstruct(sNss + sQuery);
+
+ rdf::Statement aStatement =
aResultEnum->nextElement().get<rdf::Statement>();
+
+
CPPUNIT_ASSERT_EQUAL(OUString("urn:uuid:224ab023-77b8-4396-a75a-8cecd85b81e3"),
+ aStatement.Subject->getStringValue());
+ CPPUNIT_ASSERT_EQUAL(OUString("uri:foo"),
aStatement.Predicate->getStringValue());
+ CPPUNIT_ASSERT_EQUAL(OUString("I am the literal"),
aStatement.Object->getStringValue());
+
+ CPPUNIT_ASSERT(!aResultEnum->hasMoreElements());
+
+ // 8. query: ask
+ sQuery = "ASK { ?pkg rdf:type pkg:Package . }";
+ CPPUNIT_ASSERT(xDocRepo->queryAsk(sNss + sQuery));
+}
}
CPPUNIT_PLUGIN_IMPLEMENT();
commit c600065569bba3c2bbbaceba0b7998f8ad9ec8f9
Author: Xisco Fauli <[email protected]>
AuthorDate: Tue Sep 17 02:02:38 2024 +0200
Commit: Xisco Fauli <[email protected]>
CommitDate: Tue Sep 17 17:15:01 2024 +0200
unoxml: move checkRDFa from Java to CppUnittest
Change-Id: Ife5cd7398bdbacbd8189c8451dab6351590052e4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173484
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <[email protected]>
diff --git a/unoxml/CppunitTest_unoxml_rdftest.mk
b/unoxml/CppunitTest_unoxml_rdftest.mk
index e4e12e9864d4..a42ba472f9be 100644
--- a/unoxml/CppunitTest_unoxml_rdftest.mk
+++ b/unoxml/CppunitTest_unoxml_rdftest.mk
@@ -27,8 +27,11 @@ $(eval $(call gb_CppunitTest_use_libraries,unoxml_rdftest, \
cppuhelper \
sal \
sax \
+ subsequenttest \
test \
+ tl \
unotest \
+ utl \
))
$(eval $(call gb_CppunitTest_use_configuration,unoxml_rdftest))
diff --git a/unoxml/qa/complex/unoxml/RDFRepositoryTest.java
b/unoxml/qa/complex/unoxml/RDFRepositoryTest.java
index a24e159af40b..987e8dc5f5f7 100644
--- a/unoxml/qa/complex/unoxml/RDFRepositoryTest.java
+++ b/unoxml/qa/complex/unoxml/RDFRepositoryTest.java
@@ -436,101 +436,6 @@ public class RDFRepositoryTest
}
}
- @Test public void checkRDFa()
- {
- try {
- System.out.println("Checking RDFa gunk...");
-
- String content = "behold, for I am the content.";
- XTextRange xTR = new TestRange(content);
- XMetadatable xM = (XMetadatable) xTR;
-
- Pair<Statement[], Boolean> result =
- xRep.getStatementRDFa((XMetadatable)xTR);
- assertTrue("RDFa: get: not empty (initial)",
- 0 == result.First.length);
-
- try {
- xRep.setStatementRDFa(foo, new XURI[] {}, xM, "", null);
- fail("RDFa: set: no predicate");
- } catch (IllegalArgumentException e) {
- // ignore
- }
-
- try {
- xRep.setStatementRDFa(foo, new XURI[] {bar}, null, "", null);
- fail("RDFa: set: null");
- } catch (IllegalArgumentException e) {
- // ignore
- }
-
- XLiteral trlit = Literal.create(xContext, content);
- Statement x_FooBarTRLit = new Statement(foo, bar, trlit, null);
- xRep.setStatementRDFa(foo, new XURI[] { bar }, xM, "", null);
-
- result = xRep.getStatementRDFa((XMetadatable)xTR);
- assertTrue("RDFa: get: without content",
- !result.Second && (1 == result.First.length)
- && eq(result.First[0], x_FooBarTRLit));
-
- //FIXME: do this?
- xTR.setString(lit.getStringValue());
-/*
- Statement xFooBarLit = new Statement(foo, bar, lit, null);
- result = xRep.getStatementRDFa((XMetadatable)xTR);
- assertTrue("RDFa: get: change",
- eq((Statement)result.First, xFooBarLit) && null ==
result.Second);
-*/
-
- Statement x_FooBarLittype = new Statement(foo, bar, littype, null);
- xRep.setStatementRDFa(foo, new XURI[] { bar }, xM, "42", uint);
-
- result = xRep.getStatementRDFa((XMetadatable)xTR);
- assertTrue("RDFa: get: with content",
- result.Second &&
- (1 == result.First.length) &&
- eq(result.First[0], x_FooBarLittype));
-
- //FIXME: do this?
- xTR.setString(content);
-/*
- Statement xFooLabelTRLit = new Statement(foo, rdfslabel, trlit,
null);
- result = xRep.getStatementRDFa((XMetadatable)xTR);
- assertTrue("RDFa: get: change (label)",
- eq((Statement)result.First, xFooBarLittype) &&
- eq((Statement)result.Second, xFooLabelTRLit));
-*/
-
- xRep.removeStatementRDFa((XMetadatable)xTR);
-
- result = xRep.getStatementRDFa((XMetadatable)xTR);
- assertTrue("RDFa: get: not empty (removed)",
- 0 == result.First.length);
-
- xRep.setStatementRDFa(foo, new XURI[] { foo, bar, baz }, xM,
- "", null);
-
- Statement x_FooFooTRLit = new Statement(foo, foo, trlit, null);
- Statement x_FooBazTRLit = new Statement(foo, baz, trlit, null);
- result = xRep.getStatementRDFa((XMetadatable) xTR);
- assertTrue("RDFa: get: without content (multiple predicates,
reinsert)",
- !result.Second &&
- eq(result.First, new Statement[] {
- x_FooFooTRLit, x_FooBarTRLit, x_FooBazTRLit }));
-
- xRep.removeStatementRDFa((XMetadatable)xTR);
-
- result = xRep.getStatementRDFa((XMetadatable) xTR);
- assertTrue("RDFa: get: not empty (re-removed)",
- 0 == result.First.length);
-
- System.out.println("...done");
-
- } catch (Exception e) {
- report(e);
- }
- }
-
// utilities -------------------------------------------------------------
public void report(Exception e) {
@@ -776,37 +681,6 @@ public class RDFRepositoryTest
}
}
- private class TestRange implements XTextRange, XMetadatable, XServiceInfo
- {
- private String m_Stream;
- String m_XmlId;
- String m_Text;
- TestRange(String i_Str) { m_Text = i_Str; }
-
- public String getStringValue() { return ""; }
- public String getNamespace() { return ""; }
- public String getLocalName() { return ""; }
-
- public StringPair getMetadataReference()
- { return new StringPair(m_Stream, m_XmlId); }
- public void setMetadataReference(StringPair i_Ref)
- throws IllegalArgumentException
- { m_Stream = i_Ref.First; m_XmlId = i_Ref.Second; }
- public void ensureMetadataReference()
- { m_Stream = "content.xml"; m_XmlId = "42"; }
-
- public String getImplementationName() { return null; }
- public String[] getSupportedServiceNames() { return null; }
- public boolean supportsService(String i_Svc)
- { return i_Svc.equals("com.sun.star.text.Paragraph"); }
-
- public XText getText() { return null; }
- public XTextRange getStart() { return null; }
- public XTextRange getEnd() { return null; }
- public String getString() { return m_Text; }
- public void setString(String i_Str) { m_Text = i_Str; }
- }
-
private XMultiServiceFactory getMSF()
{
return UnoRuntime.queryInterface(XMultiServiceFactory.class,
connection.getComponentContext().getServiceManager());
diff --git a/unoxml/qa/unit/rdftest.cxx b/unoxml/qa/unit/rdftest.cxx
index 4595d78f5215..7e3b93e60875 100644
--- a/unoxml/qa/unit/rdftest.cxx
+++ b/unoxml/qa/unit/rdftest.cxx
@@ -7,7 +7,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
-#include <test/bootstrapfixture.hxx>
+#include <test/unoapi_test.hxx>
#include <comphelper/processfactory.hxx>
@@ -16,6 +16,7 @@
#include <com/sun/star/rdf/XDocumentRepository.hpp>
#include <com/sun/star/rdf/XRepository.hpp>
#include <com/sun/star/rdf/FileFormat.hpp>
+#include <com/sun/star/rdf/Literal.hpp>
#include <com/sun/star/rdf/Repository.hpp>
#include <com/sun/star/rdf/URI.hpp>
#include <com/sun/star/text/XTextDocument.hpp>
@@ -25,8 +26,13 @@ using namespace com::sun::star;
namespace
{
-class RDFStreamTest : public test::BootstrapFixture
+class RDFStreamTest : public UnoApiTest
{
+public:
+ RDFStreamTest()
+ : UnoApiTest(u"/unoxml/qa/unit/data/"_ustr)
+ {
+ }
};
CPPUNIT_TEST_FIXTURE(RDFStreamTest, testCVE_2012_0037)
@@ -60,6 +66,130 @@ CPPUNIT_TEST_FIXTURE(RDFStreamTest, testCVE_2012_0037)
CPPUNIT_ASSERT_EQUAL(OUString("uri:bar"),
aStatement.Predicate->getStringValue());
CPPUNIT_ASSERT_EQUAL(OUString("EVIL"),
aStatement.Object->getStringValue());
}
+
+CPPUNIT_TEST_FIXTURE(RDFStreamTest, testRDFa)
+{
+ mxComponent = loadFromDesktop(u"private:factory/swriter"_ustr);
+ uno::Reference<text::XTextDocument> xTextDocument(mxComponent,
uno::UNO_QUERY);
+ uno::Reference<container::XEnumerationAccess>
xParaEnumAccess(xTextDocument->getText(),
+
uno::UNO_QUERY);
+ uno::Reference<container::XEnumeration> xParaEnum =
xParaEnumAccess->createEnumeration();
+ uno::Reference<text::XTextRange> xTextRange(xParaEnum->nextElement(),
uno::UNO_QUERY);
+
+ xTextRange->setString(u"behold, for I am the content."_ustr);
+
+ uno::Reference<rdf::XDocumentMetadataAccess>
xDocumentMetadataAccess(mxComponent,
+
uno::UNO_QUERY);
+ uno::Reference<rdf::XRepository> xRepo =
xDocumentMetadataAccess->getRDFRepository();
+ uno::Reference<rdf::XDocumentRepository> xDocRepo(xRepo, uno::UNO_QUERY);
+ CPPUNIT_ASSERT(xDocRepo);
+
+ uno::Reference<rdf::XMetadatable> xMeta(xTextRange, uno::UNO_QUERY);
+
+ // 1. RDFa: get: not empty (initial)
+ ::beans::Pair<uno::Sequence<rdf::Statement>, sal_Bool> xResult
+ = xDocRepo->getStatementRDFa(xMeta);
+ CPPUNIT_ASSERT_EQUAL(sal_uInt32(0), xResult.First.size());
+ CPPUNIT_ASSERT(!xResult.Second);
+
+ uno::Reference<uno::XComponentContext> xContext = getComponentContext();
+ uno::Reference<css::rdf::XURI> xFoo = rdf::URI::create(xContext,
"uri:foo");
+ uno::Reference<css::rdf::XURI> xBar = rdf::URI::create(xContext,
"uri:bar");
+ uno::Reference<css::rdf::XURI> xBaz = rdf::URI::create(xContext,
"uri:baz");
+ uno::Reference<css::rdf::XURI> xInt = rdf::URI::create(xContext,
"uri:int");
+ css::uno::Sequence<uno::Reference<rdf::XURI>> xURI{};
+
+ // 2. RDFa: set: no predicate
+ try
+ {
+ xDocRepo->setStatementRDFa(xFoo, xURI, xMeta, OUString(), nullptr);
+ CPPUNIT_FAIL("expected IllegalArgumentException");
+ }
+ catch (css::lang::IllegalArgumentException&)
+ {
+ }
+
+ css::uno::Sequence<uno::Reference<rdf::XURI>> xURI2{ xBar };
+
+ // 3. RDFa: set: null
+ try
+ {
+ xDocRepo->setStatementRDFa(xFoo, xURI2, nullptr, OUString(), nullptr);
+ CPPUNIT_FAIL("expected IllegalArgumentException");
+ }
+ catch (css::lang::IllegalArgumentException&)
+ {
+ }
+
+ xDocRepo->setStatementRDFa(xFoo, xURI2, xMeta, OUString(), nullptr);
+
+ // 4. RDFa: get: without content
+ xResult = xDocRepo->getStatementRDFa(xMeta);
+ CPPUNIT_ASSERT_EQUAL(sal_uInt32(1), xResult.First.size());
+ CPPUNIT_ASSERT(!xResult.Second);
+
+ rdf::Statement aStatement = xResult.First[0];
+ CPPUNIT_ASSERT_EQUAL(OUString("uri:foo"),
aStatement.Subject->getStringValue());
+ CPPUNIT_ASSERT_EQUAL(OUString("uri:bar"),
aStatement.Predicate->getStringValue());
+ CPPUNIT_ASSERT_EQUAL(OUString("behold, for I am the content."),
+ aStatement.Object->getStringValue());
+
+ xDocRepo->setStatementRDFa(xFoo, xURI2, xMeta, u"42"_ustr, xInt);
+
+ // 5. RDFa: get: with content
+ xResult = xDocRepo->getStatementRDFa(xMeta);
+ CPPUNIT_ASSERT_EQUAL(sal_uInt32(1), xResult.First.size());
+ CPPUNIT_ASSERT(xResult.Second);
+
+ aStatement = xResult.First[0];
+ CPPUNIT_ASSERT_EQUAL(OUString("uri:foo"),
aStatement.Subject->getStringValue());
+ CPPUNIT_ASSERT_EQUAL(OUString("uri:bar"),
aStatement.Predicate->getStringValue());
+
+ uno::Reference<css::rdf::XLiteral> xLitType
+ = rdf::Literal::createWithType(xContext, "42", xInt);
+ CPPUNIT_ASSERT_EQUAL(xLitType->getStringValue(),
aStatement.Object->getStringValue());
+
+ xDocRepo->removeStatementRDFa(xMeta);
+
+ // 6. RDFa: get: not empty (removed)
+ xResult = xDocRepo->getStatementRDFa(xMeta);
+ CPPUNIT_ASSERT_EQUAL(sal_uInt32(0), xResult.First.size());
+ CPPUNIT_ASSERT(xResult.Second);
+
+ css::uno::Sequence<uno::Reference<rdf::XURI>> xURI3{ xFoo, xBar, xBaz };
+
+ xDocRepo->setStatementRDFa(xFoo, xURI3, xMeta, OUString(), nullptr);
+
+ // 7. RDFa: get: without content (multiple predicates, reinsert)
+ xResult = xDocRepo->getStatementRDFa(xMeta);
+ CPPUNIT_ASSERT_EQUAL(sal_uInt32(3), xResult.First.size());
+ CPPUNIT_ASSERT(!xResult.Second);
+
+ aStatement = xResult.First[0];
+ CPPUNIT_ASSERT_EQUAL(OUString("uri:foo"),
aStatement.Subject->getStringValue());
+ CPPUNIT_ASSERT_EQUAL(OUString("uri:baz"),
aStatement.Predicate->getStringValue());
+ CPPUNIT_ASSERT_EQUAL(OUString("behold, for I am the content."),
+ aStatement.Object->getStringValue());
+
+ aStatement = xResult.First[1];
+ CPPUNIT_ASSERT_EQUAL(OUString("uri:foo"),
aStatement.Subject->getStringValue());
+ CPPUNIT_ASSERT_EQUAL(OUString("uri:bar"),
aStatement.Predicate->getStringValue());
+ CPPUNIT_ASSERT_EQUAL(OUString("behold, for I am the content."),
+ aStatement.Object->getStringValue());
+
+ aStatement = xResult.First[2];
+ CPPUNIT_ASSERT_EQUAL(OUString("uri:foo"),
aStatement.Subject->getStringValue());
+ CPPUNIT_ASSERT_EQUAL(OUString("uri:foo"),
aStatement.Predicate->getStringValue());
+ CPPUNIT_ASSERT_EQUAL(OUString("behold, for I am the content."),
+ aStatement.Object->getStringValue());
+
+ xDocRepo->removeStatementRDFa(xMeta);
+
+ // 8. RDFa: get: not empty (re-removed)
+ xResult = xDocRepo->getStatementRDFa(xMeta);
+ CPPUNIT_ASSERT_EQUAL(sal_uInt32(0), xResult.First.size());
+ CPPUNIT_ASSERT(!xResult.Second);
+}
}
CPPUNIT_PLUGIN_IMPLEMENT();
commit 1ce7c354024ec348459ec137797b5351cbaf27dd
Author: Marco Cecchetti <[email protected]>
AuthorDate: Sun Jul 7 22:59:07 2024 +0200
Commit: Miklos Vajna <[email protected]>
CommitDate: Tue Sep 17 16:58:44 2024 +0200
lok: sd: slideshow render improvements
Changed the slide layer message layout.
Sometime some text field layer was missing.
Try to skip empty layers.
Change-Id: I52f00e637da7ab705a1fcb52a70af88cf619c8f7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173540
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <[email protected]>
diff --git a/slideshow/source/engine/slide/slideimpl.cxx
b/slideshow/source/engine/slide/slideimpl.cxx
index a4ff70043b05..ce1043719168 100644
--- a/slideshow/source/engine/slide/slideimpl.cxx
+++ b/slideshow/source/engine/slide/slideimpl.cxx
@@ -141,6 +141,13 @@ OUString getPlaceholderType(std::u16string_view sShapeType)
return aType;
}
+void appendImageInfoPlaceholder(tools::JsonWriter& rJsonWriter)
+{
+ auto aContentNode = rJsonWriter.startNode("content");
+ rJsonWriter.put("type", "%IMAGETYPE%");
+ rJsonWriter.put("checksum", "%IMAGECHECKSUM%");
+}
+
class LOKSlideRenderer
{
public:
@@ -219,6 +226,9 @@ private:
bool mbMasterPageRenderingDone;
bool mbDrawPageRenderingDone;
bool mbSlideRenderingDone;
+ bool mbIsPageNumberVisible;
+ bool mbIsDateTimeVisible;
+ bool mbIsFooterVisible;
ShapeSharedPtr mpDPLastAnimatedShape;
OUString msLastPlaceholder;
@@ -250,6 +260,9 @@ LOKSlideRenderer::LOKSlideRenderer(const Size& rViewSize,
const Size& rSlideSize
mbMasterPageRenderingDone(false),
mbDrawPageRenderingDone(false),
mbSlideRenderingDone(false),
+ mbIsPageNumberVisible(true),
+ mbIsDateTimeVisible(true),
+ mbIsFooterVisible(true),
mbIsBitmapLayer(false)
{
uno::Reference< drawing::XMasterPageTarget > xMasterPageTarget(
mxDrawPage, uno::UNO_QUERY );
@@ -270,6 +283,34 @@ LOKSlideRenderer::LOKSlideRenderer(const Size& rViewSize,
const Size& rSlideSize
xPropSet->getPropertyValue("IsBackgroundObjectsVisible") >>=
bBackgroundObjectsVisibility;
mbTextFieldsRenderingDone = mbMasterPageRenderingDone =
!bBackgroundObjectsVisibility;
+ // try to skip empty layer
+ if (bBackgroundObjectsVisibility)
+ {
+ xPropSet->getPropertyValue("IsPageNumberVisible") >>=
mbIsPageNumberVisible;
+ xPropSet->getPropertyValue("IsDateTimeVisible") >>=
mbIsDateTimeVisible;
+ xPropSet->getPropertyValue("IsFooterVisible") >>=
mbIsFooterVisible;
+ if (mbIsDateTimeVisible)
+ {
+ bool bDateTimeFixed = true; // default: fixed
+ xPropSet->getPropertyValue("IsDateTimeFixed") >>=
bDateTimeFixed;
+ if (bDateTimeFixed)
+ {
+ OUString sDateTimeText;
+ xPropSet->getPropertyValue("DateTimeText") >>=
sDateTimeText;
+ mbIsDateTimeVisible = !sDateTimeText.isEmpty();
+ }
+ }
+ if (mbIsFooterVisible)
+ {
+ OUString sFooterText;
+ xPropSet->getPropertyValue("FooterText") >>= sFooterText;
+ mbIsFooterVisible = !sFooterText.isEmpty();
+ }
+
+ mbTextFieldsRenderingDone =
+ !mbIsPageNumberVisible && !mbIsDateTimeVisible &&
!mbIsFooterVisible;
+ }
+
if (!mbTextFieldsRenderingDone)
{
mpTFShapesFunctor
@@ -287,11 +328,22 @@ LOKSlideRenderer::LOKSlideRenderer(const Size& rViewSize,
const Size& rSlideSize
mpMPShapesFunctor->setMasterPageObjectsOnly(true);
}
- mpShapesFunctor = std::make_shared<ShapeImporter>(mxDrawPage,
mxDrawPage, mxDrawPagesSupplier,
- mrContext, 0, /*
shape num starts at 0 */
- false);
+ uno::Reference<drawing::XShapes> const xShapes(mxDrawPage,
uno::UNO_QUERY_THROW);
+ if (xShapes.is())
+ {
+ mbDrawPageRenderingDone = xShapes->getCount() == 0;
+ }
+
+ if (!mbDrawPageRenderingDone)
+ {
+ mpShapesFunctor
+ = std::make_shared<ShapeImporter>(mxDrawPage, mxDrawPage,
mxDrawPagesSupplier,
+ mrContext, 0, /* shape num
starts at 0 */
+ false);
+ }
}
- collectAnimatedShapes();
+ if (!mbDrawPageRenderingDone)
+ collectAnimatedShapes();
}
void LOKSlideRenderer::renderBackground(unsigned char* pBuffer)
@@ -349,8 +401,8 @@ void LOKSlideRenderer::renderBackgroundImpl(VirtualDevice&
rDevice)
tools::JsonWriter aJsonWriter;
aJsonWriter.put("group", "Background");
- std::string sLayerId = GetInterfaceHash(mxDrawPage) + ".0";
- aJsonWriter.put("id", sLayerId);
+ std::string sSlideHash = GetInterfaceHash(mxDrawPage);
+ aJsonWriter.put("slideHash", sSlideHash);
ShapeSharedPtr const& rBGShape(mpMPShapesFunctor->importBackgroundShape());
mpLayerManager->addShape(rBGShape);
@@ -365,7 +417,7 @@ void LOKSlideRenderer::renderBackgroundImpl(VirtualDevice&
rDevice)
// json
mbIsBitmapLayer = true;
aJsonWriter.put("type", "bitmap");
- aJsonWriter.put("checksum", std::to_string(nChecksum));
+ appendImageInfoPlaceholder(aJsonWriter);
msLastJsonMessage = aJsonWriter.finishAndGetAsOString();
maJsonMsgList.push_back(msLastJsonMessage);
@@ -379,21 +431,19 @@ void
LOKSlideRenderer::renderBackgroundImpl(VirtualDevice& rDevice)
void LOKSlideRenderer::renderMasterPageImpl(VirtualDevice& rDevice)
{
- if (mpMPShapesFunctor->isImportDone())
- mbMasterPageRenderingDone = true;
-
- if (mbMasterPageRenderingDone)
- return;
-
- tools::JsonWriter aJsonWriter;
- aJsonWriter.put("group", "MasterPage");
- std::string sLayerId = GetInterfaceHash(mxMasterPage) + "." +
std::to_string(mnMPLayerIndex);
- aJsonWriter.put("id", sLayerId);
-
if (!msLastPlaceholder.isEmpty())
{
+ tools::JsonWriter aJsonWriter;
+ aJsonWriter.put("group", "MasterPage");
+ aJsonWriter.put("slideHash", GetInterfaceHash(mxDrawPage));
+ aJsonWriter.put("index", mnMPLayerIndex);
+
aJsonWriter.put("type", "placeholder");
- aJsonWriter.put("placeholderId", msLastPlaceholder);
+ {
+ auto aContentNode = aJsonWriter.startNode("content");
+ aJsonWriter.put("type", msLastPlaceholder);
+ }
+
msLastPlaceholder = "";
msLastJsonMessage = aJsonWriter.finishAndGetAsOString();
maJsonMsgList.push_back(msLastJsonMessage);
@@ -401,6 +451,17 @@ void LOKSlideRenderer::renderMasterPageImpl(VirtualDevice&
rDevice)
return;
}
+ if (mpMPShapesFunctor->isImportDone())
+ mbMasterPageRenderingDone = true;
+
+ if (mbMasterPageRenderingDone)
+ return;
+
+ tools::JsonWriter aJsonWriter;
+ aJsonWriter.put("group", "MasterPage");
+ aJsonWriter.put("slideHash", GetInterfaceHash(mxDrawPage));
+ aJsonWriter.put("index", mnMPLayerIndex);
+
bool bDoRendering = false;
while (!mpMPShapesFunctor->isImportDone())
{
@@ -428,7 +489,10 @@ void LOKSlideRenderer::renderMasterPageImpl(VirtualDevice&
rDevice)
else
{
aJsonWriter.put("type", "placeholder");
- aJsonWriter.put("placeholderId", sPlaceholderType);
+ {
+ auto aContentNode = aJsonWriter.startNode("content");
+ aJsonWriter.put("type", sPlaceholderType);
+ }
}
bDoRendering = false;
msLastJsonMessage = aJsonWriter.finishAndGetAsOString();
@@ -463,6 +527,11 @@ void LOKSlideRenderer::renderTextFieldsImpl(VirtualDevice&
rDevice)
OUString sPlaceholderType = getPlaceholderType(sShapeType);
if (!sPlaceholderType.isEmpty())
{
+ if ((!mbIsPageNumberVisible && sPlaceholderType ==
"SlideNumber") ||
+ (!mbIsDateTimeVisible && sPlaceholderType == "DateTime") ||
+ (!mbIsFooterVisible && sPlaceholderType == "Footer"))
+ continue;
+
mpLayerManager->addShape(rShape);
// render and collect bitmap
@@ -470,16 +539,17 @@ void
LOKSlideRenderer::renderTextFieldsImpl(VirtualDevice& rDevice)
BitmapEx aBitmapEx(rDevice.GetBitmapEx(Point(0, 0),
rDevice.GetOutputSizePixel()));
BitmapChecksum nChecksum = aBitmapEx.GetChecksum();
maBitmapMap[nChecksum] = aBitmapEx;
+ mbIsBitmapLayer = true;
// json
- OUString sLayerId =
OUString::fromUtf8(GetInterfaceHash(mxMasterPage)) + "." + sPlaceholderType;
tools::JsonWriter aJsonWriter;
aJsonWriter.put("group", "TextFields");
- aJsonWriter.put("id", sLayerId);
- mbIsBitmapLayer = true;
- aJsonWriter.put("type", "bitmap");
- aJsonWriter.put("checksum", std::to_string(nChecksum));
-
+ aJsonWriter.put("slideHash", GetInterfaceHash(mxDrawPage));
+ {
+ auto aContentNode = aJsonWriter.startNode("content");
+ aJsonWriter.put("type", sPlaceholderType);
+ appendImageInfoPlaceholder(aJsonWriter);
+ }
msLastJsonMessage = aJsonWriter.finishAndGetAsOString();
maJsonMsgList.push_back(msLastJsonMessage);
@@ -504,7 +574,7 @@ void LOKSlideRenderer::renderLayerImpl(VirtualDevice&
rDevice, tools::JsonWriter
// json
mbIsBitmapLayer = true;
rJsonWriter.put("type", "bitmap");
- rJsonWriter.put("checksum", std::to_string(nChecksum));
+ appendImageInfoPlaceholder(rJsonWriter);
// clean up
rDevice.Erase();
@@ -513,19 +583,13 @@ void LOKSlideRenderer::renderLayerImpl(VirtualDevice&
rDevice, tools::JsonWriter
void LOKSlideRenderer::renderDrawPageImpl(VirtualDevice& rDevice)
{
- if (mpShapesFunctor->isImportDone())
- mbDrawPageRenderingDone = true;
-
- if (mbDrawPageRenderingDone)
- return;
-
- tools::JsonWriter aJsonWriter;
- aJsonWriter.put("group", "DrawPage");
- std::string sLayerId = GetInterfaceHash(mxDrawPage) + "." +
std::to_string(mnDPLayerIndex);
- aJsonWriter.put("id", sLayerId);
-
if (mpDPLastAnimatedShape)
{
+ tools::JsonWriter aJsonWriter;
+ aJsonWriter.put("group", "DrawPage");
+ aJsonWriter.put("slideHash", GetInterfaceHash(mxDrawPage));
+ aJsonWriter.put("index", mnDPLayerIndex);
+
renderAnimatedShapeImpl(rDevice, mpDPLastAnimatedShape, aJsonWriter);
mpDPLastAnimatedShape.reset();
msLastJsonMessage = aJsonWriter.finishAndGetAsOString();
@@ -534,6 +598,17 @@ void LOKSlideRenderer::renderDrawPageImpl(VirtualDevice&
rDevice)
return;
}
+ if (mpShapesFunctor->isImportDone())
+ mbDrawPageRenderingDone = true;
+
+ if (mbDrawPageRenderingDone)
+ return;
+
+ tools::JsonWriter aJsonWriter;
+ aJsonWriter.put("group", "DrawPage");
+ aJsonWriter.put("slideHash", GetInterfaceHash(mxDrawPage));
+ aJsonWriter.put("index", mnDPLayerIndex);
+
bool bDoRendering = false;
while (!mpShapesFunctor->isImportDone())
{
@@ -582,17 +657,14 @@ void
LOKSlideRenderer::renderAnimatedShapeImpl(VirtualDevice& rDevice,
{
rJsonWriter.put("type", "animated");
+ auto aContentNode = rJsonWriter.startNode("content");
std::string sShapeId = GetInterfaceHash(pShape->getXShape());
- rJsonWriter.put("shapeHash", sShapeId);
+ rJsonWriter.put("hash", sShapeId);
bool bIsInitVisible = maAnimatedShapeVisibilityMap.at(sShapeId);
rJsonWriter.put("initVisible", bIsInitVisible);
- auto aData = rJsonWriter.startNode("data");
- if (bIsInitVisible)
- {
- mpLayerManager->addShape(pShape);
- renderLayerImpl(rDevice, rJsonWriter);
- }
+ mpLayerManager->addShape(pShape);
+ renderLayerImpl(rDevice, rJsonWriter);
}
void LOKSlideRenderer::renderImpl(LayerGroupType eLayersSet, unsigned char*
pBuffer)
commit 8dba09031bac4744f489bfa23be3c669640b0c93
Author: Xisco Fauli <[email protected]>
AuthorDate: Tue Sep 17 09:35:57 2024 +0200
Commit: Xisco Fauli <[email protected]>
CommitDate: Tue Sep 17 15:26:37 2024 +0200
sc: use SAL_RET_MAYBENULL() in GetViewBindings
Change-Id: I67e3e7921869a22d2bf6ce713fd581a9c3881aa6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173521
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <[email protected]>
diff --git a/sc/inc/document.hxx b/sc/inc/document.hxx
index f5f2c3487c75..43a08fcdc7b0 100644
--- a/sc/inc/document.hxx
+++ b/sc/inc/document.hxx
@@ -1173,7 +1173,7 @@ public:
@return true = DDE link found and matrix set. */
bool SetDdeLinkResultMatrix( size_t nDdePos, const ScMatrixRef&
pResults );
- SfxBindings* GetViewBindings();
+ SAL_RET_MAYBENULL SfxBindings* GetViewBindings();
ScDocShell* GetDocumentShell() const { return
mpShell; }
SC_DLLPUBLIC ScDrawLayer* GetDrawLayer() { return mpDrawLayer.get();
}
SC_DLLPUBLIC const ScDrawLayer* GetDrawLayer() const { return
mpDrawLayer.get(); }
commit 9286ac87abe4eeaf878585bdc5bb4fee40f950cc
Author: Kira Tubo <[email protected]>
AuthorDate: Mon Sep 16 19:04:46 2024 -0700
Commit: Heiko Tietze <[email protected]>
CommitDate: Tue Sep 17 15:22:58 2024 +0200
Related tdf#161657 Define default Comments style attributes
* Line spacing = Single
* Indents/Margins = 0
* Top/Bottom spacing = 0
* Font color = COL_AUTO
* Highlight = None (COL_TRANSPARENT)
Change-Id: Idd0d4d896a0cc6021c99c7c13280ef6e18ae2602
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173507
Tested-by: Jenkins
Reviewed-by: Heiko Tietze <[email protected]>
diff --git a/sw/source/core/doc/DocumentStylePoolManager.cxx
b/sw/source/core/doc/DocumentStylePoolManager.cxx
index a92a19cd5dd4..15f463dd29c2 100644
--- a/sw/source/core/doc/DocumentStylePoolManager.cxx
+++ b/sw/source/core/doc/DocumentStylePoolManager.cxx
@@ -1015,15 +1015,26 @@ SwTextFormatColl*
DocumentStylePoolManager::GetTextCollFromPool( sal_uInt16 nId,
{
SetAllScriptItem(aSet, SvxFontHeightItem(PT_10, 100,
RES_CHRATR_FONTSIZE));
- auto const aIndent(o3tl::convert(0.1, o3tl::Length::cm,
o3tl::Length::twip));
- SvxTextLeftMarginItem const leftMargin(aIndent,
RES_MARGIN_TEXTLEFT);
- SvxRightMarginItem const rightMargin(aIndent,
RES_MARGIN_RIGHT);
- aSet.Put(leftMargin);
- aSet.Put(rightMargin);
+ // Left margin (i.e. Before text indent)
+ aSet.Put(SvxTextLeftMarginItem (0, RES_MARGIN_TEXTLEFT));
+
+ // Right margin (i.e. After text indent)
+ aSet.Put(SvxRightMarginItem(0, RES_MARGIN_RIGHT));
+
+ // First line indent
+ aSet.Put(SvxFirstLineIndentItem(0, RES_MARGIN_FIRSTLINE));
+
+ // Top/bottom spacing (i.e. Above/Below paragraph spacing)
+ aSet.Put(SvxULSpaceItem(0, 0, RES_UL_SPACE));
+
+ // Line spacing = SINGLE
+ aSet.Put(SvxLineSpacingItem(0, RES_PARATR_LINESPACING));
+
+ // Font color
+ aSet.Put(SvxColorItem(COL_AUTO, RES_CHRATR_COLOR));
- auto const aSpacing(o3tl::convert(0.1, o3tl::Length::cm,
o3tl::Length::twip));
- SvxULSpaceItem topSpacing( aSpacing, 0, RES_UL_SPACE );
- aSet.Put(topSpacing);
+ // Highlight color = NONE
+ aSet.Put(SvxBrushItem(COL_TRANSPARENT, RES_CHRATR_HIGHLIGHT));
}
break;
commit b6d8c6e6fe23628596ceb537b1bab9219d909d80
Author: Caolán McNamara <[email protected]>
AuthorDate: Mon Sep 16 10:07:35 2024 +0100
Commit: Caolán McNamara <[email protected]>
CommitDate: Tue Sep 17 15:16:29 2024 +0200
cid#1607476 Overflowed return value
Change-Id: I38c72db66e47b0e09a53413457f167159c599202
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173524
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <[email protected]>
diff --git a/hwpfilter/source/hcode.cxx b/hwpfilter/source/hcode.cxx
index d97387c54efe..82930d0ba466 100644
--- a/hwpfilter/source/hcode.cxx
+++ b/hwpfilter/source/hcode.cxx
@@ -430,7 +430,7 @@ static hchar s_hh2ks(hchar hh)
return sal::static_int_cast<hchar>(tblhhtg_ks[hh - HCA_TG]);
}
hh -= HCA_KSS;
- idx = hh / 0x60 + 161;
+ idx = sal::static_int_cast<hchar>(hh / 0x60 + 161);
i = hh % 0x60 + 160;
if (idx == 170)
idx += 2;
commit d3959ecab9a12d947db4904aa71a39dc9ec37476
Author: Caolán McNamara <[email protected]>
AuthorDate: Sun Sep 1 14:59:42 2024 +0100
Commit: Caolán McNamara <[email protected]>
CommitDate: Tue Sep 17 15:16:22 2024 +0200
cid#1606987 silence Overflowed integer argument
Change-Id: I77380d12a5d51c3debb1365a5fc9b57c33299eb8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173523
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <[email protected]>
diff --git a/bridges/source/cpp_uno/shared/vtablefactory.cxx
b/bridges/source/cpp_uno/shared/vtablefactory.cxx
index 8d139091b4fc..10db7cc505a7 100644
--- a/bridges/source/cpp_uno/shared/vtablefactory.cxx
+++ b/bridges/source/cpp_uno/shared/vtablefactory.cxx
@@ -67,6 +67,7 @@ extern "C" void * allocExec(
#if defined FREEBSD || defined NETBSD || defined OPENBSD || defined DRAGONFLY
|| defined HAIKU
pagesize = getpagesize();
#else
+ // coverity[ tainted_data_return : FALSE ] version 2023.12.2
pagesize = sysconf(_SC_PAGESIZE);
#endif
#elif defined _WIN32
commit d7d094b46149a6c2472a6e8966f88daefd644d88
Author: Olivier Hallot <[email protected]>
AuthorDate: Tue Sep 17 09:44:05 2024 -0300
Commit: Gerrit Code Review <[email protected]>
CommitDate: Tue Sep 17 14:44:05 2024 +0200
Update git submodules
* Update helpcontent2 from branch 'master'
to 614dd5fba24a70bc5b5a4cb43eb431fc4dacd3c0
- tdf#162607 disambiguate hid2file.js, InsertAuthor
+ moved insert author to shared/
+ Document access command, delete old command paths
Change-Id: Ic2ce72a47f842b6bdaf8cdb7469beaded3f43f06
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/173483
Tested-by: Jenkins
Reviewed-by: Olivier Hallot <[email protected]>
diff --git a/helpcontent2 b/helpcontent2
index f7b6ce514594..614dd5fba24a 160000
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit f7b6ce51459426167f1f17ea209ba38707788673
+Subproject commit 614dd5fba24a70bc5b5a4cb43eb431fc4dacd3c0
commit 2e01d101ac9e62d5b91059a93b2d2bac681d84c6
Author: Caolán McNamara <[email protected]>
AuthorDate: Sun Sep 1 12:41:50 2024 +0100
Commit: Caolán McNamara <[email protected]>
CommitDate: Tue Sep 17 14:36:10 2024 +0200
cid#1608367 silence Overflowed return value
Change-Id: If60d9607678ac9193923cad63895d654b8283ae4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173522
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <[email protected]>
diff --git a/svl/source/numbers/zformat.cxx b/svl/source/numbers/zformat.cxx
index e66542f2d445..31991e8c20b5 100644
--- a/svl/source/numbers/zformat.cxx
+++ b/svl/source/numbers/zformat.cxx
@@ -1466,16 +1466,10 @@ namespace {
sal_Unicode toUniChar(sal_uInt8 n)
{
- sal_Unicode c;
if (n < 10)
- {
- c = '0' + n;
- }
+ return static_cast<sal_Unicode>('0' + n);
else
- {
- c = 'A' + n - 10;
- }
- return c;
+ return static_cast<sal_Unicode>('A' + n - 10);
}
bool IsCombiningSymbol( OUStringBuffer& rStringBuffer, sal_Int32 nPos )
commit 7de90affa22668cf140f61aae44bcc4042f02555
Author: Caolán McNamara <[email protected]>
AuthorDate: Thu Aug 29 21:08:20 2024 +0100
Commit: Caolán McNamara <[email protected]>
CommitDate: Tue Sep 17 14:35:58 2024 +0200
cid#1608226 Overflowed integer argument
and
cid#1607920 Overflowed integer argument
cid#1606589 Overflowed integer argument
cid#1606576 Overflowed integer argument
Change-Id: I2b1c0e871e7f7a913e0f14128fb13fc04d993ca1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173520
Reviewed-by: Caolán McNamara <[email protected]>
Tested-by: Jenkins
diff --git a/vcl/source/control/roadmapwizard.cxx
b/vcl/source/control/roadmapwizard.cxx
index 7f359aa967dc..d1f199967c39 100644
--- a/vcl/source/control/roadmapwizard.cxx
+++ b/vcl/source/control/roadmapwizard.cxx
@@ -246,6 +246,7 @@ namespace vcl
sal_Int32 nCurrentStatePathIndex =
RoadmapWizardImpl::getStateIndexInPath( getCurrentState(), rActivePath );
if (nCurrentStatePathIndex < 0)
return;
+ assert(nCurrentStatePathIndex >= 0 &&
o3tl::make_unsigned(nCurrentStatePathIndex) < rActivePath.size());
// determine up to which index (in the new path) we have to display
the items
RoadmapTypes::ItemIndex nUpperStepBoundary =
static_cast<RoadmapTypes::ItemIndex>(rActivePath.size());
@@ -335,6 +336,7 @@ namespace vcl
sal_Int32 nCurrentStatePathIndex =
RoadmapWizardImpl::getStateIndexInPath( getCurrentState(), rActivePath );
if (nCurrentStatePathIndex < 0)
return;
+ assert(nCurrentStatePathIndex >= 0 &&
o3tl::make_unsigned(nCurrentStatePathIndex) < rActivePath.size());
// determine up to which index (in the new path) we have to display
the items
RoadmapTypes::ItemIndex nUpperStepBoundary =
static_cast<RoadmapTypes::ItemIndex>(rActivePath.size());
@@ -439,8 +441,9 @@ namespace vcl
nCurrentStatePathIndex = RoadmapWizardImpl::getStateIndexInPath(
_nCurrentState, aActivePathPos->second );
DBG_ASSERT( nCurrentStatePathIndex != -1,
"RoadmapWizard::determineNextState: ehm - how can we travel if there is no
(valid) active path?" );
- if ( nCurrentStatePathIndex == -1 )
+ if (nCurrentStatePathIndex < 0)
return WZS_INVALID_STATE;
+ assert(nCurrentStatePathIndex >= 0 &&
o3tl::make_unsigned(nCurrentStatePathIndex) < aActivePathPos->second.size());
sal_Int32 nNextStateIndex = nCurrentStatePathIndex + 1;
@@ -467,8 +470,9 @@ namespace vcl
nCurrentStatePathIndex = RoadmapWizardImpl::getStateIndexInPath(
_nCurrentState, aActivePathPos->second );
DBG_ASSERT( nCurrentStatePathIndex != -1,
"RoadmapWizard::determineNextState: ehm - how can we travel if there is no
(valid) active path?" );
- if ( nCurrentStatePathIndex == -1 )
+ if (nCurrentStatePathIndex < 0)
return WZS_INVALID_STATE;
+ assert(nCurrentStatePathIndex >= 0 &&
o3tl::make_unsigned(nCurrentStatePathIndex) < aActivePathPos->second.size());
sal_Int32 nNextStateIndex = nCurrentStatePathIndex + 1;
commit 0a2e0a069f6d864f566067f75f6d2e75cbaeae7e
Author: Olivier Hallot <[email protected]>
AuthorDate: Tue Sep 17 09:30:51 2024 -0300
Commit: Gerrit Code Review <[email protected]>
CommitDate: Tue Sep 17 14:30:51 2024 +0200
Update git submodules
* Update helpcontent2 from branch 'master'
to f7b6ce51459426167f1f17ea209ba38707788673
- tdf#162607 disambiguate hid2file.js, Select Row/Col
+ deleted singleton pages not a target
+ deleted embed how-to-get not used anymore.
Change-Id: I3e93b758fcd7d87f8c37a0ae47ffe39fc794d0c7
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/173482
Tested-by: Jenkins
Reviewed-by: Olivier Hallot <[email protected]>
diff --git a/helpcontent2 b/helpcontent2
index 301f67b6b028..f7b6ce514594 160000
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit 301f67b6b028ba0b0acf0d590c7ced1e4b142356
+Subproject commit f7b6ce51459426167f1f17ea209ba38707788673
commit 1eb2dcf15a752c7732252046795cae445fbc01f9
Author: Caolán McNamara <[email protected]>
AuthorDate: Mon Sep 16 10:24:11 2024 +0100
Commit: Caolán McNamara <[email protected]>
CommitDate: Tue Sep 17 14:14:44 2024 +0200
cid#1608289 silence Overflowed constant
Change-Id: Ia42be7ae929767dbb02cecd0f87d6b3a994b8f90
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173517
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <[email protected]>
diff --git a/svx/source/engine3d/scene3d.cxx b/svx/source/engine3d/scene3d.cxx
index 5e55fa7c81c8..9f84aad3395e 100644
--- a/svx/source/engine3d/scene3d.cxx
+++ b/svx/source/engine3d/scene3d.cxx
@@ -401,7 +401,8 @@ void E3dScene::removeAllNonSelectedObjects()
{
E3DModifySceneSnapRectUpdater aUpdater(this);
- for(size_t a = 0; a < GetObjCount(); ++a)
+ size_t a = 0;
+ while (a < GetObjCount())
{
SdrObject* pObj = GetObj(a);
@@ -434,9 +435,10 @@ void E3dScene::removeAllNonSelectedObjects()
if(bRemoveObject)
{
NbcRemoveObject(pObj->GetOrdNum());
- a--;
+ continue;
}
}
+ ++a;
}
}
commit 08e9e422fd55bea1d77f1a0df65f6ff4a977778b
Author: Christian Lohmaier <[email protected]>
AuthorDate: Tue Sep 17 13:54:31 2024 +0200
Commit: Gerrit Code Review <[email protected]>
CommitDate: Tue Sep 17 13:54:31 2024 +0200
Update git submodules
* Update translations from branch 'master'
to 42ecd2971a60e08485dbafbace2f2ed7245cd48c
- update translations for master
and force-fix errors using pocheck
Change-Id: Ic6577d3caf2dfad168da2a61b78bf2bc26e5d361
diff --git a/translations b/translations
index fdf5842af432..42ecd2971a60 160000
--- a/translations
+++ b/translations
@@ -1 +1 @@
-Subproject commit fdf5842af43208afc5a3d4feb0bb2b26c96e50ca
+Subproject commit 42ecd2971a60e08485dbafbace2f2ed7245cd48c
commit b72068ba689af7f292eca707df5765fda8109fb5
Author: Ilmari Lauhakangas <[email protected]>
AuthorDate: Tue Sep 17 08:51:01 2024 +0300
Commit: Ilmari Lauhakangas <[email protected]>
CommitDate: Tue Sep 17 13:48:45 2024 +0200
tdf#162990 Colibre (and Dark) SVG: fix unlocked icon and add locked icon
Change-Id: Ic2121cdddc5bafb38b5082f4ba6e6774670a1543
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173509
Reviewed-by: Heiko Tietze <[email protected]>
Reviewed-by: Rafael Lima <[email protected]>
Tested-by: Jenkins
diff --git a/icon-themes/colibre_dark_svg/res/locked.svg
b/icon-themes/colibre_dark_svg/res/locked.svg
new file mode 100644
index 000000000000..9bdb7c7e20cf
--- /dev/null
+++ b/icon-themes/colibre_dark_svg/res/locked.svg
@@ -0,0 +1 @@
+<svg viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><path
d="m12.011518
4.8005225c0-2.2187334-1.784636-4.0355225-4.0194531-4.0355225-2.2348159
0-4.0194525 1.8167891-4.0194525
4.0355225v1.3666105c-.9968244.1446999-1.736404.9807439-1.736404
2.0258003v4.9841107c-.016078 1.141522.9003577 2.057956 2.0579603
2.057956h7.4118713c1.141525 0 2.05796-.916434
2.05796-2.074034v-4.9841108c0-1.0450555-.755657-1.8650223-1.736403-2.0257998v-1.3505329zm-3.6014292
8.1031995c0 .225089-.1768571.418023-.4180239.418023-.2090109
0-.4019452-.192934-.4019452-.418023v-2.106189c-.4823341-.192933-.8360458-.627033-.8360458-1.173678
0-.6913441.5627226-1.2379883 1.237991-1.2379883s1.237992.5627223 1.237992
1.2379883c0 .562722-.3537121.996822-.8199681
1.173678zm-2.9743956-6.7687438v-1.3344557c0-1.4309223 1.1254465-2.5563669
2.5402945-2.5563669 1.4309248 0 2.5563713 1.1254446 2.5563713
2.5563669v1.3344557z" fill="#fff" stroke-width=".160778"/></svg>
\ No newline at end of file
diff --git a/icon-themes/colibre_dark_svg/res/unlocked.svg
b/icon-themes/colibre_dark_svg/res/unlocked.svg
index af033231c4fa..bd5bce15201d 100644
--- a/icon-themes/colibre_dark_svg/res/unlocked.svg
+++ b/icon-themes/colibre_dark_svg/res/unlocked.svg
@@ -1,43 +1 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<svg
- width="1200pt"
- height="1200pt"
- version="1.1"
- viewBox="0 0 1200 1200"
- id="svg1"
- sodipodi:docname="noun-unlock-89647.svg"
- inkscape:export-filename="unlocked.png"
- inkscape:export-xdpi="15.36"
- inkscape:export-ydpi="15.36"
- inkscape:version="1.3.2 (091e20ef0f, 2023-11-25, custom)"
- xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
- xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
- xmlns="http://www.w3.org/2000/svg"
- xmlns:svg="http://www.w3.org/2000/svg">
- <defs
- id="defs1" />
- <sodipodi:namedview
- id="namedview1"
- pagecolor="#505050"
- bordercolor="#ffffff"
- borderopacity="1"
- inkscape:showpageshadow="0"
- inkscape:pageopacity="0"
- inkscape:pagecheckerboard="1"
- inkscape:deskcolor="#505050"
- inkscape:document-units="pt"
- showgrid="false"
- inkscape:zoom="0.695625"
- inkscape:cx="799.28122"
- inkscape:cy="800"
- inkscape:window-width="3440"
- inkscape:window-height="1326"
- inkscape:window-x="0"
- inkscape:window-y="40"
- inkscape:window-maximized="1"
- inkscape:current-layer="svg1" />
- <path
- d="m404.4 499.2-32.398-102c-15.602-45.602-13.199-92.398 9.6016-136.8
22.801-40.801 60-73.199 106.8-87.602 44.398-15.602 93.602-10.801 135.6 13.199
43.199 21.602 73.199 58.801 88.801 104.4 9.6016 26.398 34.801 40.801 63.602
32.398 27.602-8.3984 44.398-37.199
36-64.801-24-70.801-73.199-129.6-141.6-165.6-66-33.602-142.8-40.801-214.8-18-73.199
22.801-132 73.199-168 140.4-33.602 64.801-39.602 142.8-18 214.8l24
75.602c-58.801 20.398-102 74.398-102 139.2v349.2c0 81.602 64.801 145.2 145.2
145.2h519.6c78 0 145.2-63.602
145.2-145.2l-0.003906-350.39c0-79.199-67.199-145.2-145.2-145.2h-452.4zm223.2
477.6c0 15.602-12 28.801-26.398 28.801-15.602
0-30-12-30-28.801l-0.003906-150c-34.801-12-58.801-43.199-58.801-82.801 0-45.602
39.602-85.199 88.801-85.199 45.602 0 84 39.602 84 85.199 0 39.602-24
70.801-57.602 82.801z"
- id="path1"
- style="fill:#ffffff;fill-opacity:1" />
-</svg>
+<svg viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><path d="m5.258804
6.6465415-.4610917-1.3696505c-.2220492-.612341-.1878495-1.240715.136651-1.8369425.3245062-.5478736.8539257-.9829121
1.5199882-1.1763147.6318765-.2095028 1.332153-.1450352
1.9298725.1772354.6148125.2900704 1.0417755.7895765 1.2638245
1.4018773.136651.3544708.4952915.5478735.9051895.4350385.392835-.1127733.631877-.4995061.512356-.8701442-.34157-.9507118-1.041775-1.7402614-2.015265-2.2236674-.9393185-.4512057-2.032344-.54787345-3.057055-.2417029-1.0417753.3061705-1.878637.982912-2.3909925
1.8852832-.478227.8701441-.5636196 1.9175103-.2561778 2.8843223l.3415704
1.0151795c-.8368616.273903-1.4516741.999012-1.4516741 1.8691695v4.689038c0
1.095746.9222543 1.949737 2.0665007 1.949737h7.3949993c1.110103 0
2.0665-.854044
2.0665-1.949737l-.000057-4.7050175c0-1.0634795-.956382-1.949737-2.0665-1.949737h-6.438602zm3.1766045
6.4131855c0 .209503-.1707855.386738-.375699.386738-.2220495
0-.426963-.161135-.426963-.386738l-.0
00057-2.014192c-.4952915-.161135-.8368615-.580073-.8368615-1.1118465
0-.612341.5636195-1.1440475 1.2638245-1.1440475.649012 0 1.195496.5317735
1.195496 1.1440475 0 .5317735-.34157.9507115-.819797 1.1118465z" fill="#fff"
stroke-width=".013824"/></svg>
\ No newline at end of file
diff --git a/icon-themes/colibre_svg/res/locked.svg
b/icon-themes/colibre_svg/res/locked.svg
new file mode 100644
index 000000000000..f809b339c918
--- /dev/null
+++ b/icon-themes/colibre_svg/res/locked.svg
@@ -0,0 +1 @@
+<svg viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><path
d="m12.011518
4.8005222c0-2.2187333-1.784637-4.0355222-4.0194525-4.0355222-2.234816
0-4.0194534 1.8167889-4.0194534
4.0355222v1.3666113c-.9968244.1447-1.7364038.9807445-1.7364038
2.0258v4.9841115c-.016078 1.141522.9003576 2.057955 2.0579601
2.057955h7.4118716c1.141524 0 2.05796-.916433
2.05796-2.074033v-4.9841115c0-1.0450555-.755657-1.865022-1.736404-2.0258v-1.3505333zm-3.6014295
8.1031998c0 .225089-.176856.418023-.418023.418023-.209012
0-.4019455-.192934-.4019455-.418023v-2.106188c-.4823345-.192934-.8360465-.627034-.8360465-1.1736785
0-.6913445.5627235-1.237989 1.237992-1.237989.675268 0 1.2379915.5627225
1.2379915 1.237989 0 .5627225-.353712.9968225-.8199685
1.1736785zm-2.9743955-6.768744v-1.3344558c0-1.4309222 1.125447-2.5563666
2.5402945-2.5563666 1.4309255 0 2.5563715 1.1254444 2.5563715
2.5563666v1.3344558z" stroke-width=".160778"/></svg>
\ No newline at end of file
diff --git a/icon-themes/colibre_svg/res/unlocked.svg
b/icon-themes/colibre_svg/res/unlocked.svg
index fb22c1bf8e5c..8914e0138044 100644
--- a/icon-themes/colibre_svg/res/unlocked.svg
+++ b/icon-themes/colibre_svg/res/unlocked.svg
@@ -1,4 +1 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<svg width="1200pt" height="1200pt" version="1.1" viewBox="0 0 1200 1200"
xmlns="http://www.w3.org/2000/svg">
- <path d="m404.4 499.2-32.398-102c-15.602-45.602-13.199-92.398 9.6016-136.8
22.801-40.801 60-73.199 106.8-87.602 44.398-15.602 93.602-10.801 135.6 13.199
43.199 21.602 73.199 58.801 88.801 104.4 9.6016 26.398 34.801 40.801 63.602
32.398 27.602-8.3984 44.398-37.199
36-64.801-24-70.801-73.199-129.6-141.6-165.6-66-33.602-142.8-40.801-214.8-18-73.199
22.801-132 73.199-168 140.4-33.602 64.801-39.602 142.8-18 214.8l24
75.602c-58.801 20.398-102 74.398-102 139.2v349.2c0 81.602 64.801 145.2 145.2
145.2h519.6c78 0 145.2-63.602
145.2-145.2l-0.003906-350.39c0-79.199-67.199-145.2-145.2-145.2h-452.4zm223.2
477.6c0 15.602-12 28.801-26.398 28.801-15.602
0-30-12-30-28.801l-0.003906-150c-34.801-12-58.801-43.199-58.801-82.801 0-45.602
39.602-85.199 88.801-85.199 45.602 0 84 39.602 84 85.199 0 39.602-24
70.801-57.602 82.801z"/>
-</svg>
-e
... etc. - the rest is truncated