[Libreoffice-commits] core.git: sw/source
sw/source/uibase/utlui/content.cxx |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) New commits: commit 3250c27b86d420d4891e1f83d8b11fb2a7d0 Author: Jim Raykowski AuthorDate: Sat Sep 22 10:03:36 2018 -0800 Commit: Jim Raykowski CommitDate: Sun Oct 7 08:54:51 2018 +0200 tdf#119900 Fix Navigator Content Navigation View Headings focus Change-Id: I884ae9d1f13646782f56a982d3d8dc0bc3aacee0 Reviewed-on: https://gerrit.libreoffice.org/60906 Tested-by: Jenkins Reviewed-by: Jim Raykowski diff --git a/sw/source/uibase/utlui/content.cxx b/sw/source/uibase/utlui/content.cxx index 91b1024aa9d8..a12b334dddc9 100644 --- a/sw/source/uibase/utlui/content.cxx +++ b/sw/source/uibase/utlui/content.cxx @@ -2108,7 +2108,6 @@ bool SwContentTree::HasContentChanged() const SwOutlineNodes::size_type nActPos = GetWrtShell()->GetOutlinePos(MAXLEVEL); SvTreeListEntry* pFirstEntry = First(); -SelectAll(false); while( nullptr != (pFirstEntry = Next(pFirstEntry)) ) { assert(dynamic_cast(static_cast(pFirstEntry->GetUserData(; @@ -2120,6 +2119,8 @@ bool SwContentTree::HasContentChanged() MakeVisible(pFirstEntry); } } +else +Select(pFirstEntry, false); } } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
CppCheck Report Update
A new cppcheck report is available at : http://dev-builds.libreoffice.org/cppcheck_reports/master/ Note: The script generating this report was run at : 2018-07-10 02:41:01 with user buildslave at host vm140 as /home/buildslave/source/dev-tools/cppcheck/cppcheck-report.sh -s /home/buildslave/source/libo-core -c /home/buildslave/source/cppcheck -w /home/buildslave/tmp/www It can be found and improved here: https://gerrit.libreoffice.org/gitweb?p=dev-tools.git;a=blob;f=cppcheck/cppcheck-report.sh ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice
[Libreoffice-commits] online.git: Changes to 'private/mmeeks/cursors'
New branch 'private/mmeeks/cursors' available with the following commits: commit ba4df21b4232e5c21397b5824c64b1b595743c13 Author: Michael Meeks Date: Sat Oct 6 23:17:13 2018 +0100 Hide other view cursors on zoom. Change-Id: I9e953f841b5c526b499f9170aef9b2682011947e commit 1c39bb118c44fcac58073eaad72ca25e797eeb42 Author: Michael Meeks Date: Sat Oct 6 23:01:56 2018 +0100 cursor simplify. Don't show cursor when graphics are selected either. Change-Id: I0a604d73bd1818317a2b04d8bdd392d1d6472627 commit df4d942cbc67d2e9b4aa9180560721361acf4fe1 Author: Michael Meeks Date: Sat Oct 6 22:37:50 2018 +0100 First attempt to simplify cursor visibility. Removes race conditions between kit messages and browser. Avoid storing old state wherever possible. Change-Id: I56aa57df22a4190881c8d197df8445ca542d4fc1 ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: basctl/source editeng/inc editeng/source include/editeng sd/source svx/source sw/inc
basctl/source/inc/baside3.hxx |6 -- editeng/inc/eerdll2.hxx |1 + editeng/inc/pch/precompiled_editeng.hxx |1 - editeng/source/editeng/editattr.cxx |5 + editeng/source/editeng/editdbg.cxx |4 +--- editeng/source/editeng/editdoc.cxx |9 +++-- editeng/source/editeng/editeng.cxx |4 +--- editeng/source/editeng/editobj.cxx |3 --- editeng/source/editeng/editsel.cxx |3 --- editeng/source/editeng/editundo.cxx |3 --- editeng/source/editeng/editview.cxx |3 --- editeng/source/editeng/edtspell.cxx |4 editeng/source/editeng/eehtml.cxx |4 +--- editeng/source/editeng/eeobj.cxx|3 --- editeng/source/editeng/eerdll.cxx |5 + editeng/source/editeng/eertfpar.cxx |3 --- editeng/source/editeng/impedit.cxx |5 - editeng/source/editeng/impedit2.cxx |6 +- editeng/source/editeng/impedit3.cxx |2 -- editeng/source/editeng/impedit4.cxx |2 -- editeng/source/editeng/impedit5.cxx |3 --- editeng/source/editeng/textconv.cxx |4 include/editeng/splwrap.hxx |1 + sd/source/ui/animations/CustomAnimationPane.hxx |1 - sd/source/ui/framework/factories/FullScreenPane.cxx |1 - sd/source/ui/table/TableDesignPane.hxx |2 -- svx/source/dialog/ctredlin.cxx |1 - svx/source/inc/filtnav.hxx |3 --- svx/source/inc/fmexpl.hxx |6 -- svx/source/inc/tbxform.hxx |4 svx/source/tbxctrls/extrusioncontrols.hxx |5 - sw/inc/pch/precompiled_sw.hxx |1 - sw/inc/pch/precompiled_swui.hxx |1 - 33 files changed, 11 insertions(+), 98 deletions(-) New commits: commit 6dacf9ec5455bdad82e78470a1a7cb6d2271bec7 Author: Caolán McNamara AuthorDate: Sat Oct 6 20:24:52 2018 +0100 Commit: Caolán McNamara CommitDate: Sat Oct 6 22:24:33 2018 +0200 drop some now unnecessary includes Change-Id: Idb41ddc0ff01333bac6cfce8bdd5e80c3c101de9 Reviewed-on: https://gerrit.libreoffice.org/61478 Tested-by: Jenkins Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara diff --git a/basctl/source/inc/baside3.hxx b/basctl/source/inc/baside3.hxx index 0277d9cba92e..e48c135f4480 100644 --- a/basctl/source/inc/baside3.hxx +++ b/basctl/source/inc/baside3.hxx @@ -23,13 +23,7 @@ #include "layout.hxx" #include "bastypes.hxx" #include "propbrw.hxx" - #include -#include -#include -#include -#include - #include class Printer; diff --git a/editeng/inc/eerdll2.hxx b/editeng/inc/eerdll2.hxx index 96f90ac8453e..2ce9c120b81c 100644 --- a/editeng/inc/eerdll2.hxx +++ b/editeng/inc/eerdll2.hxx @@ -23,6 +23,7 @@ #include #include #include +#include class SfxPoolItem; class VirtualDevice; diff --git a/editeng/inc/pch/precompiled_editeng.hxx b/editeng/inc/pch/precompiled_editeng.hxx index c441fe1ff4ec..1b7178567675 100644 --- a/editeng/inc/pch/precompiled_editeng.hxx +++ b/editeng/inc/pch/precompiled_editeng.hxx @@ -99,7 +99,6 @@ #include #include #include -#include #include #include #include diff --git a/editeng/source/editeng/editattr.cxx b/editeng/source/editeng/editattr.cxx index 516ca28f9946..41b6a0db9bcd 100644 --- a/editeng/source/editeng/editattr.cxx +++ b/editeng/source/editeng/editattr.cxx @@ -17,10 +17,7 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ - -#include -#include -#include +#include #include #include diff --git a/editeng/source/editeng/editdbg.cxx b/editeng/source/editeng/editdbg.cxx index 28e9b4d53a6f..7daf8b965bf7 100644 --- a/editeng/source/editeng/editdbg.cxx +++ b/editeng/source/editeng/editdbg.cxx @@ -19,10 +19,8 @@ #include -#include -#include -#include #include +#include #include #include diff --git a/editeng/source/editeng/editdoc.cxx b/editeng/source/editeng/editdoc.cxx index 37cf24dee476..00e2698d7317 100644 --- a/editeng/source/editeng/editdoc.cxx +++ b/editeng/source/editeng/editdoc.cxx @@ -17,11 +17,6 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#include -#include -#include -#include - #include #include #include @@ -64,9 +59,11 @@ #include #include +#include #include #include -#include +#include +#include using namespace ::com::sun::star; diff --git a/editeng/source/editeng/editeng.cxx b/editeng/source/editeng/editeng.cxx index e082645a0d59..c78d53fb9123 100644 --- a/editeng/source/editeng/editeng.cxx +++ b/editeng/source/editen
[Libreoffice-commits] core.git: filter/Library_flash.mk filter/source filter/uiconfig forms/source
filter/Library_flash.mk |1 filter/source/flash/impswfdialog.cxx | 87 +-- filter/source/flash/impswfdialog.hxx | 38 --- filter/source/flash/swfdialog.cxx| 19 + filter/source/pdf/impdialog.hxx |8 -- filter/source/pdf/pdfdialog.cxx |1 filter/uiconfig/ui/impswfdialog.ui | 35 ++ forms/source/richtext/richtextvclcontrol.hxx |1 8 files changed, 59 insertions(+), 131 deletions(-) New commits: commit 0e257f8c07de253c0a1d4e63dfdf0383bd658fab Author: Caolán McNamara AuthorDate: Sat Oct 6 19:53:54 2018 +0100 Commit: Caolán McNamara CommitDate: Sat Oct 6 21:58:26 2018 +0200 weld ImpSWFDialog Change-Id: I0650ab2b95eddde0337b1d65e957a58083d993bf Reviewed-on: https://gerrit.libreoffice.org/61477 Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara diff --git a/filter/Library_flash.mk b/filter/Library_flash.mk index ccf161b011e0..7abba3682a56 100644 --- a/filter/Library_flash.mk +++ b/filter/Library_flash.mk @@ -28,7 +28,6 @@ $(eval $(call gb_Library_use_libraries,flash,\ vcl \ utl \ tl \ - tk \ i18nlangtag \ comphelper \ basegfx \ diff --git a/filter/source/flash/impswfdialog.cxx b/filter/source/flash/impswfdialog.cxx index ea920709901a..b12febde0cb5 100644 --- a/filter/source/flash/impswfdialog.cxx +++ b/filter/source/flash/impswfdialog.cxx @@ -24,83 +24,58 @@ using namespace com::sun::star::uno; using namespace com::sun::star::beans; -ImpSWFDialog::ImpSWFDialog( vcl::Window* pParent, Sequence< PropertyValue >& rFilterData ) : -ModalDialog( pParent, "ImpSWFDialog", "filter/ui/impswfdialog.ui" ), - -maConfigItem( "Office.Common/Filter/Flash/Export/", &rFilterData ) +ImpSWFDialog::ImpSWFDialog(weld::Window* pParent, Sequence< PropertyValue >& rFilterData) +: GenericDialogController(pParent, "filter/ui/impswfdialog.ui", "ImpSWFDialog") +, maConfigItem("Office.Common/Filter/Flash/Export/", &rFilterData) +, mxNumFldQuality(m_xBuilder->weld_spin_button("quality")) +, mxCheckExportAll(m_xBuilder->weld_check_button("exportall")) +, mxCheckExportBackgrounds(m_xBuilder->weld_check_button("exportbackgrounds")) +, mxCheckExportBackgroundObjects(m_xBuilder->weld_check_button("exportbackgroundobjects")) +, mxCheckExportSlideContents(m_xBuilder->weld_check_button("exportslidecontents")) +, mxCheckExportSound(m_xBuilder->weld_check_button("exportsound")) +, mxCheckExportOLEAsJPEG(m_xBuilder->weld_check_button("exportoleasjpeg")) +, mxCheckExportMultipleFiles(m_xBuilder->weld_check_button("exportmultiplefiles")) { -get(mpNumFldQuality,"quality"); -get(mpCheckExportAll,"exportall"); -get(mpCheckExportMultipleFiles,"exportmultiplefiles"); -get(mpCheckExportBackgrounds,"exportbackgrounds"); -get(mpCheckExportBackgroundObjects,"exportbackgroundobjects"); -get(mpCheckExportSlideContents,"exportslidecontents"); -get(mpCheckExportSound,"exportsound"); -get(mpCheckExportOLEAsJPEG,"exportoleasjpeg"); - const sal_uLong nCompressMode = maConfigItem.ReadInt32( "CompressMode", 75 ); -mpNumFldQuality->SetValue( nCompressMode ); +mxNumFldQuality->set_value(nCompressMode); -mpCheckExportAll->Check(); -mpCheckExportSlideContents->Check(); -mpCheckExportSound->Check(); +mxCheckExportAll->set_active(true); +mxCheckExportSlideContents->set_active(true); +mxCheckExportSound->set_active(true); -mpCheckExportAll->SetToggleHdl( LINK( this, ImpSWFDialog, OnToggleCheckbox ) ); +mxCheckExportAll->connect_toggled(LINK(this, ImpSWFDialog, OnToggleCheckbox)); -mpCheckExportBackgrounds->Disable(); -mpCheckExportBackgroundObjects->Disable(); -mpCheckExportSlideContents->Disable(); +mxCheckExportBackgrounds->set_sensitive(false); +mxCheckExportBackgroundObjects->set_sensitive(false); +mxCheckExportSlideContents->set_sensitive(false); } - ImpSWFDialog::~ImpSWFDialog() { -disposeOnce(); } - -void ImpSWFDialog::dispose() -{ -mpNumFldQuality.clear(); -mpCheckExportAll.clear(); -mpCheckExportBackgrounds.clear(); -mpCheckExportBackgroundObjects.clear(); -mpCheckExportSlideContents.clear(); -mpCheckExportSound.clear(); -mpCheckExportOLEAsJPEG.clear(); -mpCheckExportMultipleFiles.clear(); -maConfigItem.WriteModifiedConfig(); -ModalDialog::dispose(); -} - - Sequence< PropertyValue > ImpSWFDialog::GetFilterData() { -sal_Int32 nCompressMode = static_cast(mpNumFldQuality->GetValue()); +sal_Int32 nCompressMode = static_cast(mxNumFldQuality->get_value()); maConfigItem.WriteInt32( "CompressMode" , nCompressMode ); -maConfigItem.WriteBool( "ExportAll", mpCheckExportAll->IsChecked() ); -maConfigItem.WriteBool( "ExportBackgrounds", mpCheckExportBackgrounds->IsChecked() ); -maConfig
[Libreoffice-commits] core.git: include/svx svx/source svx/uiconfig sw/source
include/svx/fontworkgallery.hxx | 22 - svx/source/tbxctrls/fontworkgallery.cxx | 73 +-- svx/source/toolbars/fontworkbar.cxx | 23 - svx/uiconfig/ui/fontworkgallerydialog.ui | 35 -- sw/source/uibase/uiview/viewdraw.cxx | 21 ++-- 5 files changed, 81 insertions(+), 93 deletions(-) New commits: commit b8633c58dc7fa43076abeeb7e53a931d92119f26 Author: Caolán McNamara AuthorDate: Sat Oct 6 16:27:16 2018 +0100 Commit: Caolán McNamara CommitDate: Sat Oct 6 21:58:10 2018 +0200 weld FontWorkGalleryDialog Change-Id: I6a3a2b445d6f79d0c259c69176e1b23de1ff05d3 Reviewed-on: https://gerrit.libreoffice.org/61474 Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara diff --git a/include/svx/fontworkgallery.hxx b/include/svx/fontworkgallery.hxx index 5699f1791cfc..58ff23d34698 100644 --- a/include/svx/fontworkgallery.hxx +++ b/include/svx/fontworkgallery.hxx @@ -27,6 +27,7 @@ #include #include #include +#include #include @@ -59,31 +60,30 @@ public: sal_Int32 getScale() const; }; -class SAL_WARN_UNUSED SVX_DLLPUBLIC FontWorkGalleryDialog : public ModalDialog +class SAL_WARN_UNUSED SVX_DLLPUBLIC FontWorkGalleryDialog : public weld::GenericDialogController { -VclPtrmpCtlFavorites; -VclPtrmpOKButton; - sal_uInt16 mnThemeId; - SdrView*mpSdrView; -DECL_LINK( DoubleClickFavoriteHdl, ValueSet*, void ); -DECL_LINK( ClickOKHdl, Button*, void ); - SdrObject** mppSdrObject; SdrModel* mpDestModel; +std::vector maFavoritesHorizontal; + +SvtValueSet maCtlFavorites; +std::unique_ptr mxCtlFavorites; +std::unique_ptr mxOKButton; + voidinitFavorites(sal_uInt16 nThemeId); voidinsertSelectedFontwork(); voidfillFavorites(sal_uInt16 nThemeId); -std::vector< BitmapEx> maFavoritesHorizontal; +DECL_LINK(DoubleClickFavoriteHdl, SvtValueSet*, void); +DECL_LINK(ClickOKHdl, weld::Button&, void ); public: -FontWorkGalleryDialog( SdrView* pView, vcl::Window* pParent ); +FontWorkGalleryDialog(weld::Window* pParent, SdrView* pView); virtual ~FontWorkGalleryDialog() override; -virtual void dispose() override; // SJ: if the SdrObject** is set, the SdrObject is not inserted into the page when executing the dialog void SetSdrObjectRef( SdrObject**, SdrModel* pModel ); diff --git a/svx/source/tbxctrls/fontworkgallery.cxx b/svx/source/tbxctrls/fontworkgallery.cxx index e5e40c9e06a8..65243aad0fc2 100644 --- a/svx/source/tbxctrls/fontworkgallery.cxx +++ b/svx/source/tbxctrls/fontworkgallery.cxx @@ -65,25 +65,25 @@ namespace svx const int nColCount = 4; const int nLineCount = 4; -FontWorkGalleryDialog::FontWorkGalleryDialog( SdrView* pSdrView, vcl::Window* pParent ) : -ModalDialog(pParent, "FontworkGalleryDialog", "svx/ui/fontworkgallerydialog.ui" ), -mnThemeId ( 0x ), -mpSdrView ( pSdrView ), -mppSdrObject( nullptr ), -mpDestModel ( nullptr ) -{ -get(mpOKButton, "ok"); -get(mpCtlFavorites, "ctlFavorites"); -Size aSize(LogicToPixel(Size(200, 200), MapMode(MapUnit::MapAppFont))); -mpCtlFavorites->set_width_request(aSize.Width()); -mpCtlFavorites->set_height_request(aSize.Height()); - -mpCtlFavorites->SetDoubleClickHdl( LINK( this, FontWorkGalleryDialog, DoubleClickFavoriteHdl ) ); -mpOKButton->SetClickHdl( LINK( this, FontWorkGalleryDialog, ClickOKHdl ) ); - -mpCtlFavorites->SetColCount( nColCount ); -mpCtlFavorites->SetLineCount( nLineCount ); -mpCtlFavorites->SetExtraSpacing( 3 ); +FontWorkGalleryDialog::FontWorkGalleryDialog(weld::Window* pParent, SdrView* pSdrView) +: GenericDialogController(pParent, "svx/ui/fontworkgallerydialog.ui", "FontworkGalleryDialog") +, mnThemeId(0x) +, mpSdrView(pSdrView) +, mppSdrObject(nullptr) +, mpDestModel(nullptr) +, maCtlFavorites(m_xBuilder->weld_scrolled_window("ctlFavoriteswin")) +, mxCtlFavorites(new weld::CustomWeld(*m_xBuilder, "ctlFavorites", maCtlFavorites)) +, mxOKButton(m_xBuilder->weld_button("ok")) +{ +Size aSize(maCtlFavorites.GetDrawingArea()->get_ref_device().LogicToPixel(Size(200, 200), MapMode(MapUnit::MapAppFont))); +mxCtlFavorites->set_size_request(aSize.Width(), aSize.Height()); + +maCtlFavorites.SetDoubleClickHdl( LINK( this, FontWorkGalleryDialog, DoubleClickFavoriteHdl ) ); +mxOKButton->connect_clicked(LINK(this, FontWorkGalleryDialog, ClickOKHdl)); + +maCtlFavorites.SetColCount( nColCount ); +maCtlFavorites.SetLineCount( nLineCount ); +maCtlFavorites.SetExtraSpacing( 3 ); initFavorites( GALLERY_THEME_FONTWORK ); fillFavorites( GALLERY_THEME_FONTWORK ); @@ -91,14 +91,6 @@ FontWorkGalleryDialog::FontWorkGalleryDialog( SdrView* pSdrView, vcl::Window*
[Libreoffice-commits] core.git: 2 commits - sc/source
sc/source/ui/drawfunc/fuconarc.cxx |8 sc/source/ui/drawfunc/fuconcustomshape.cxx |8 sc/source/ui/drawfunc/fuconpol.cxx | 10 +- sc/source/ui/drawfunc/fuconrec.cxx | 24 sc/source/ui/drawfunc/fuconuno.cxx |6 +++--- sc/source/ui/drawfunc/fupoor.cxx |2 +- sc/source/ui/drawfunc/futext.cxx | 11 +-- sc/source/ui/inc/fuconarc.hxx |2 +- sc/source/ui/inc/fuconcustomshape.hxx |2 +- sc/source/ui/inc/fuconpol.hxx |2 +- sc/source/ui/inc/fuconrec.hxx |2 +- sc/source/ui/inc/fuconuno.hxx |2 +- sc/source/ui/inc/fupoor.hxx|3 ++- sc/source/ui/inc/futext.hxx|2 +- sc/source/ui/inc/undodraw.hxx |2 +- sc/source/ui/undo/undobase.cxx |2 +- sc/source/ui/view/tabvwsh2.cxx |4 ++-- 17 files changed, 46 insertions(+), 46 deletions(-) New commits: commit 7aa30262d543ed87d673264d6f51146694120d94 Author: Noel Grandin AuthorDate: Fri Oct 5 13:31:03 2018 +0200 Commit: Noel Grandin CommitDate: Sat Oct 6 21:56:38 2018 +0200 return unique_ptr from CreateDefaultObject in sc/ Change-Id: I8981050aeadc1efe907e7e9a47d18dc3c72956c2 Reviewed-on: https://gerrit.libreoffice.org/61439 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/sc/source/ui/drawfunc/fuconarc.cxx b/sc/source/ui/drawfunc/fuconarc.cxx index 356968b30068..6d22c749bf89 100644 --- a/sc/source/ui/drawfunc/fuconarc.cxx +++ b/sc/source/ui/drawfunc/fuconarc.cxx @@ -116,20 +116,20 @@ void FuConstArc::Deactivate() } // Create default drawing objects via keyboard -SdrObject* FuConstArc::CreateDefaultObject(const sal_uInt16 nID, const tools::Rectangle& rRectangle) +SdrObjectUniquePtr FuConstArc::CreateDefaultObject(const sal_uInt16 nID, const tools::Rectangle& rRectangle) { // case SID_DRAW_ARC: // case SID_DRAW_PIE: // case SID_DRAW_CIRCLECUT: -SdrObject* pObj = SdrObjFactory::MakeNewObject( +SdrObjectUniquePtr pObj(SdrObjFactory::MakeNewObject( *pDrDoc, pView->GetCurrentObjInventor(), -pView->GetCurrentObjIdentifier()); +pView->GetCurrentObjIdentifier())); if(pObj) { -if(dynamic_cast( pObj) != nullptr) +if(dynamic_cast( pObj.get() ) != nullptr) { tools::Rectangle aRect(rRectangle); diff --git a/sc/source/ui/drawfunc/fuconcustomshape.cxx b/sc/source/ui/drawfunc/fuconcustomshape.cxx index d59c93379ad1..c2169a1863a2 100644 --- a/sc/source/ui/drawfunc/fuconcustomshape.cxx +++ b/sc/source/ui/drawfunc/fuconcustomshape.cxx @@ -129,17 +129,17 @@ void FuConstCustomShape::Deactivate() } // Create default drawing objects via keyboard -SdrObject* FuConstCustomShape::CreateDefaultObject(const sal_uInt16 /* nID */, const tools::Rectangle& rRectangle) +SdrObjectUniquePtr FuConstCustomShape::CreateDefaultObject(const sal_uInt16 /* nID */, const tools::Rectangle& rRectangle) { -SdrObject* pObj = SdrObjFactory::MakeNewObject( +SdrObjectUniquePtr pObj(SdrObjFactory::MakeNewObject( *pDrDoc, pView->GetCurrentObjInventor(), -pView->GetCurrentObjIdentifier()); +pView->GetCurrentObjIdentifier())); if( pObj ) { tools::Rectangle aRectangle( rRectangle ); -SetAttributes( pObj ); +SetAttributes( pObj.get() ); if ( SdrObjCustomShape::doConstructOrthogonal( aCustomShape ) ) ImpForceQuadratic( aRectangle ); pObj->SetLogicRect( aRectangle ); diff --git a/sc/source/ui/drawfunc/fuconpol.cxx b/sc/source/ui/drawfunc/fuconpol.cxx index 7e806e051596..8f2a7506e8ec 100644 --- a/sc/source/ui/drawfunc/fuconpol.cxx +++ b/sc/source/ui/drawfunc/fuconpol.cxx @@ -173,7 +173,7 @@ void FuConstPolygon::Deactivate() } // Create default drawing objects via keyboard -SdrObject* FuConstPolygon::CreateDefaultObject(const sal_uInt16 nID, const tools::Rectangle& rRectangle) +SdrObjectUniquePtr FuConstPolygon::CreateDefaultObject(const sal_uInt16 nID, const tools::Rectangle& rRectangle) { // case SID_DRAW_XPOLYGON: // case SID_DRAW_XPOLYGON_NOFILL: @@ -184,14 +184,14 @@ SdrObject* FuConstPolygon::CreateDefaultObject(const sal_uInt16 nID, const tools // case SID_DRAW_FREELINE: // case SID_DRAW_FREELINE_NOFILL: -SdrObject* pObj = SdrObjFactory::MakeNewObject( +SdrObjectUniquePtr pObj(SdrObjFactory::MakeNewObject( *pDrDoc, pView->GetCurrentObjInventor(), -pView->GetCurrentObjIdentifier()); +pView->GetCurrentObjIdentifier())); if(pObj) { -if(dynamic_cast( pObj) != nullptr) +if(dynamic_cast( pObj.get() ) != nullptr) { basegfx::B2DPolyPolygon aPoly; @@ -271,7 +271,7 @@ SdrObject* FuConstPolygon::CreateDefaultObject(const sal_uInt16 nID, con
[Libreoffice-commits] core.git: sw/inc sw/source sw/uiconfig
sw/inc/swabstdlg.hxx |4 +-- sw/source/ui/dialog/swdlgfact.cxx | 16 +++-- sw/source/ui/dialog/swdlgfact.hxx | 13 --- sw/source/ui/dochdl/selglos.cxx| 29 +++-- sw/source/uibase/dochdl/gloshdl.cxx| 10 sw/source/uibase/inc/gloshdl.hxx |4 +-- sw/source/uibase/inc/selglos.hxx | 23 +++ sw/source/uibase/shells/textglos.cxx |2 - sw/uiconfig/swriter/ui/insertautotextdialog.ui | 23 --- 9 files changed, 66 insertions(+), 58 deletions(-) New commits: commit 692c4f4d2c5995660baf747f2d15929896f6e992 Author: Caolán McNamara AuthorDate: Sat Oct 6 17:57:35 2018 +0100 Commit: Caolán McNamara CommitDate: Sat Oct 6 20:55:30 2018 +0200 weld SwSelGlossaryDlg Change-Id: I8d8b4a3b7ed461275eb4af86f3fd7709bab30586 Reviewed-on: https://gerrit.libreoffice.org/61476 Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara diff --git a/sw/inc/swabstdlg.hxx b/sw/inc/swabstdlg.hxx index 6673fdef64ac..8478b77b990f 100644 --- a/sw/inc/swabstdlg.hxx +++ b/sw/inc/swabstdlg.hxx @@ -402,9 +402,9 @@ public: virtual VclPtr CreateSwAutoMarkDialog(vcl::Window *pParent, SwWrtShell &rSh) = 0; -virtual VclPtr CreateSwSelGlossaryDlg(const OUString &rShortName) = 0; +virtual VclPtr CreateSwSelGlossaryDlg(weld::Window *pParent, const OUString &rShortName) = 0; -virtual VclPtr CreateSwSortingDialog(weld::Window * pParent, SwWrtShell &rSh) = 0; +virtual VclPtr CreateSwSortingDialog(weld::Window *pParent, SwWrtShell &rSh) = 0; virtual VclPtr CreateSwTableHeightDialog(weld::Window *pParent, SwWrtShell &rSh) = 0; virtual VclPtr CreateSwColumnDialog(weld::Window *pParent, SwWrtShell &rSh) = 0; virtual VclPtr CreateSplitTableDialog(weld::Window* pParent, SwWrtShell &rSh) = 0; diff --git a/sw/source/ui/dialog/swdlgfact.cxx b/sw/source/ui/dialog/swdlgfact.cxx index 4ad47f91a41b..e8eb7119af93 100644 --- a/sw/source/ui/dialog/swdlgfact.cxx +++ b/sw/source/ui/dialog/swdlgfact.cxx @@ -172,7 +172,10 @@ short AbstractSwLabDlg_Impl::Execute() return m_xDlg->execute(); } -IMPL_ABSTDLG_BASE(AbstractSwSelGlossaryDlg_Impl); +short AbstractSwSelGlossaryDlg_Impl::Execute() +{ +return m_xDlg->run(); +} short AbstractSwAutoFormatDlg_Impl::Execute() { @@ -415,17 +418,17 @@ Printer * AbstractSwLabDlg_Impl::GetPrt() void AbstractSwSelGlossaryDlg_Impl::InsertGlos(const OUString &rRegion, const OUString &rGlosName) { -pDlg->InsertGlos( rRegion, rGlosName ); +m_xDlg->InsertGlos( rRegion, rGlosName ); } sal_Int32 AbstractSwSelGlossaryDlg_Impl::GetSelectedIdx() const { -return pDlg->GetSelectedIdx(); +return m_xDlg->GetSelectedIdx(); } void AbstractSwSelGlossaryDlg_Impl::SelectEntryPos(sal_Int32 nIdx) { -pDlg->SelectEntryPos( nIdx ); +m_xDlg->SelectEntryPos( nIdx ); } SwTableAutoFormat* AbstractSwAutoFormatDlg_Impl::FillAutoFormatOfIndex() const @@ -889,10 +892,9 @@ VclPtr SwAbstractDialogFactory_Impl::CreateSplitTableD return VclPtr::Create(o3tl::make_unique(pParent, rSh)); } -VclPtr SwAbstractDialogFactory_Impl::CreateSwSelGlossaryDlg(const OUString &rShortName) +VclPtr SwAbstractDialogFactory_Impl::CreateSwSelGlossaryDlg(weld::Window *pParent, const OUString &rShortName) { -VclPtr pDlg = VclPtr::Create(nullptr, rShortName); -return VclPtr::Create(pDlg); +return VclPtr::Create(o3tl::make_unique(pParent, rShortName)); } VclPtr SwAbstractDialogFactory_Impl::CreateSwAutoFormatDlg(weld::Window* pParent, diff --git a/sw/source/ui/dialog/swdlgfact.hxx b/sw/source/ui/dialog/swdlgfact.hxx index 208d423fc3c7..6471d1864c4c 100644 --- a/sw/source/ui/dialog/swdlgfact.hxx +++ b/sw/source/ui/dialog/swdlgfact.hxx @@ -342,7 +342,14 @@ public: class AbstractSwSelGlossaryDlg_Impl : public AbstractSwSelGlossaryDlg { -DECL_ABSTDLG_BASE(AbstractSwSelGlossaryDlg_Impl,SwSelGlossaryDlg) +protected: +std::unique_ptr m_xDlg; +public: +explicit AbstractSwSelGlossaryDlg_Impl(std::unique_ptr p) +: m_xDlg(std::move(p)) +{ +} +virtual short Execute() override; virtual void InsertGlos(const OUString &rRegion, const OUString &rGlosName) override;// inline virtual sal_Int32 GetSelectedIdx() const override; // inline virtual void SelectEntryPos(sal_Int32 nIdx) override; // inline @@ -609,8 +616,8 @@ public: const OString& sDefPage = OString()) override; virtual VclPtr CreateSwAutoMarkDialog(vcl::Window *pParent, SwWrtShell &rSh) override; -virtual VclPtr CreateSwSelGlossaryDlg(const OUString &rShortName) override; -virtual VclPtr CreateSwSortingDialog(weld::Window * pParent, SwWrtShell &rSh) override; +virtual VclPtr CreateSwSelGlossaryDlg(weld::Window *pParent, const OUString &
[Libreoffice-commits] core.git: cui/source dbaccess/source include/sfx2 include/svtools include/svx sc/source sfx2/source svx/source sw/source
cui/source/dialogs/colorpicker.cxx |9 + cui/source/dialogs/pastedlg.cxx |5 - cui/source/inc/acccfg.hxx|1 - cui/source/inc/cuigrfflt.hxx |7 +-- cui/source/inc/dlgname.hxx |6 -- cui/source/inc/hlmarkwn.hxx |1 - cui/source/inc/insdlg.hxx|9 - cui/source/inc/numpages.hxx |1 - cui/source/options/optbasic.hxx |1 - dbaccess/source/ui/inc/CollectionView.hxx|1 + include/sfx2/filedlghelper.hxx |5 ++--- include/sfx2/viewsh.hxx |2 -- include/svtools/fileview.hxx |1 - include/svx/ClassificationEditView.hxx |1 - include/svx/fmsearch.hxx |6 -- include/svx/galctrl.hxx |1 - include/svx/hexcolorcontrol.hxx |4 sc/source/ui/inc/autofmt.hxx |1 - sfx2/source/appl/opengrf.cxx |1 + svx/source/dialog/ClassificationEditView.cxx |1 + svx/source/form/databaselocationinput.cxx|3 +-- sw/source/core/crsr/viscrs.cxx |1 - sw/source/uibase/inc/unotools.hxx|1 - sw/source/uibase/utlui/gloslst.cxx |1 - 24 files changed, 8 insertions(+), 62 deletions(-) New commits: commit 1dc6a3aeec6d0f67990c2e18c31f094fc3edeba7 Author: Caolán McNamara AuthorDate: Sat Oct 6 16:04:45 2018 +0100 Commit: Caolán McNamara CommitDate: Sat Oct 6 20:55:11 2018 +0200 drop some now unnecessary include Change-Id: I9db3d9a172a41c70ed343efd76f4c7c8f88b3a3f Reviewed-on: https://gerrit.libreoffice.org/61471 Tested-by: Jenkins Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara diff --git a/cui/source/dialogs/colorpicker.cxx b/cui/source/dialogs/colorpicker.cxx index e11a70acbbce..6375a9a68f91 100644 --- a/cui/source/dialogs/colorpicker.cxx +++ b/cui/source/dialogs/colorpicker.cxx @@ -29,17 +29,10 @@ #include #include #include -#include -#include -#include -#include -#include -#include #include -#include #include -#include #include +#include #include #include #include diff --git a/cui/source/dialogs/pastedlg.cxx b/cui/source/dialogs/pastedlg.cxx index 7b70ed34fa0a..b0acc4b8f2ee 100644 --- a/cui/source/dialogs/pastedlg.cxx +++ b/cui/source/dialogs/pastedlg.cxx @@ -23,11 +23,6 @@ #include #include #include -#include -#include -#include -#include -#include #include #include #include diff --git a/cui/source/inc/acccfg.hxx b/cui/source/inc/acccfg.hxx index 0e96110ea7de..a1614b160d30 100644 --- a/cui/source/inc/acccfg.hxx +++ b/cui/source/inc/acccfg.hxx @@ -33,7 +33,6 @@ #include #include -#include #include #include #include diff --git a/cui/source/inc/cuigrfflt.hxx b/cui/source/inc/cuigrfflt.hxx index b2e1c3d59ad4..9355419bd996 100644 --- a/cui/source/inc/cuigrfflt.hxx +++ b/cui/source/inc/cuigrfflt.hxx @@ -20,14 +20,9 @@ #ifndef INCLUDED_CUI_SOURCE_INC_CUIGRFFLT_HXX #define INCLUDED_CUI_SOURCE_INC_CUIGRFFLT_HXX -#include -#include -#include -#include -#include -#include #include #include +#include #include #include #include diff --git a/cui/source/inc/dlgname.hxx b/cui/source/inc/dlgname.hxx index 4ac036ff6c10..83b42d409e07 100644 --- a/cui/source/inc/dlgname.hxx +++ b/cui/source/inc/dlgname.hxx @@ -19,12 +19,6 @@ #ifndef INCLUDED_CUI_SOURCE_INC_DLGNAME_HXX #define INCLUDED_CUI_SOURCE_INC_DLGNAME_HXX - -#include -#include -#include -#include -#include #include /// Dialog for editing a name diff --git a/cui/source/inc/hlmarkwn.hxx b/cui/source/inc/hlmarkwn.hxx index 518ac7ce7e8b..e07dde7792c6 100644 --- a/cui/source/inc/hlmarkwn.hxx +++ b/cui/source/inc/hlmarkwn.hxx @@ -21,7 +21,6 @@ #define INCLUDED_CUI_SOURCE_INC_HLMARKWN_HXX #include -#include #include #include #include diff --git a/cui/source/inc/insdlg.hxx b/cui/source/inc/insdlg.hxx index fadddf94d570..892386c2d89b 100644 --- a/cui/source/inc/insdlg.hxx +++ b/cui/source/inc/insdlg.hxx @@ -24,18 +24,9 @@ #include #include -#include -#include -#include -#include -#include -#include #include -#include #include -class VclFrame; - class INetURLObject; class InsertObjectDialog_Impl : public weld::GenericDialogController diff --git a/cui/source/inc/numpages.hxx b/cui/source/inc/numpages.hxx index 4da0aae75e2e..24a0fccc556a 100644 --- a/cui/source/inc/numpages.hxx +++ b/cui/source/inc/numpages.hxx @@ -33,7 +33,6 @@ #include #include #include -#include #define MN_GALLERY_ENTRY 100 diff --git a/cui/source/options/optbasic.hxx b/cui/source/options/optbasic.hxx index 9e2774643da0..4981c89d5e90 100644 --- a/cui/source/options/optbasic.hxx +++ b/cui/source/options/optbasic.hxx @@ -21,7 +21,6 @@ #define INCLUDED_CUI_SOURCE_OPTIONS_OPTBASIC_HXX #include -#include #inclu
[Libreoffice-commits] core.git: include/toolkit solenv/clang-format toolkit/inc toolkit/source
solenv/clang-format/blacklist |2 +- toolkit/source/awt/scrollabledialog.cxx |2 +- toolkit/source/awt/vclxcontainer.cxx|2 +- toolkit/source/awt/vclxtoolkit.cxx |2 +- toolkit/source/awt/vclxwindows.cxx |2 +- 5 files changed, 5 insertions(+), 5 deletions(-) New commits: commit fca8704954c9e38719ac0158ba66edd8d85522ed Author: Caolán McNamara AuthorDate: Sat Oct 6 16:08:50 2018 +0100 Commit: Caolán McNamara CommitDate: Sat Oct 6 20:54:55 2018 +0200 make scrollabledialog.hxx a private header Change-Id: I16c68436c35568867677c33f70ef48287bc9e8ac Reviewed-on: https://gerrit.libreoffice.org/61470 Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara diff --git a/solenv/clang-format/blacklist b/solenv/clang-format/blacklist index 22ca1d639ca1..16dc194b4dce 100644 --- a/solenv/clang-format/blacklist +++ b/solenv/clang-format/blacklist @@ -7659,7 +7659,6 @@ include/test/util/xsearchable.hxx include/test/xmldiff.hxx include/test/xmltesttools.hxx include/toolkit/awt/animatedimagespeer.hxx -include/toolkit/awt/scrollabledialog.hxx include/toolkit/awt/vclxaccessiblecomponent.hxx include/toolkit/awt/vclxbitmap.hxx include/toolkit/awt/vclxcontainer.hxx @@ -16674,6 +16673,7 @@ toolkit/inc/helper/accessibilityclient.hxx toolkit/inc/helper/imagealign.hxx toolkit/inc/helper/tkresmgr.hxx toolkit/inc/helper/btndlg.hxx +toolkit/inc/helper/scrollabledialog.hxx toolkit/inc/helper/unopropertyarrayhelper.hxx toolkit/inc/helper/unowrapper.hxx toolkit/source/awt/animatedimagespeer.cxx diff --git a/include/toolkit/awt/scrollabledialog.hxx b/toolkit/inc/helper/scrollabledialog.hxx similarity index 100% rename from include/toolkit/awt/scrollabledialog.hxx rename to toolkit/inc/helper/scrollabledialog.hxx diff --git a/toolkit/source/awt/scrollabledialog.cxx b/toolkit/source/awt/scrollabledialog.cxx index 3751ad5f29b9..fe0da4118e3f 100644 --- a/toolkit/source/awt/scrollabledialog.cxx +++ b/toolkit/source/awt/scrollabledialog.cxx @@ -17,7 +17,7 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#include +#include #include #include diff --git a/toolkit/source/awt/vclxcontainer.cxx b/toolkit/source/awt/vclxcontainer.cxx index 27be3f5e6c98..708f2e6ed420 100644 --- a/toolkit/source/awt/vclxcontainer.cxx +++ b/toolkit/source/awt/vclxcontainer.cxx @@ -27,7 +27,7 @@ #include #include #include -#include +#include #include diff --git a/toolkit/source/awt/vclxtoolkit.cxx b/toolkit/source/awt/vclxtoolkit.cxx index 737bdc529554..d65bf794dc88 100644 --- a/toolkit/source/awt/vclxtoolkit.cxx +++ b/toolkit/source/awt/vclxtoolkit.cxx @@ -124,10 +124,10 @@ #include #include #include -#include #include #include +#include #include #if defined(_WIN32) diff --git a/toolkit/source/awt/vclxwindows.cxx b/toolkit/source/awt/vclxwindows.cxx index 504dfa8e8a78..f56d8b224056 100644 --- a/toolkit/source/awt/vclxwindows.cxx +++ b/toolkit/source/awt/vclxwindows.cxx @@ -18,7 +18,7 @@ */ #include -#include +#include #include #include #include ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: chart2/source dbaccess/Library_dbmm.mk dbaccess/source extensions/Library_dbp.mk extensions/source filter/Library_flash.mk filter/source include/svtools svtools/source
chart2/source/controller/dialogs/dlg_ChartType_UNO.cxx |5 +++-- chart2/source/controller/inc/dlg_ChartType_UNO.hxx |2 +- dbaccess/Library_dbmm.mk|1 + dbaccess/source/ext/macromigration/macromigrationwizard.cxx |5 +++-- dbaccess/source/ext/macromigration/macromigrationwizard.hxx |2 +- dbaccess/source/ui/inc/unosqlmessage.hxx|2 +- dbaccess/source/ui/uno/AdvancedSettingsDlg.cxx |7 --- dbaccess/source/ui/uno/DBTypeWizDlg.cxx |5 +++-- dbaccess/source/ui/uno/DBTypeWizDlg.hxx |2 +- dbaccess/source/ui/uno/DBTypeWizDlgSetup.cxx|5 +++-- dbaccess/source/ui/uno/DBTypeWizDlgSetup.hxx|2 +- dbaccess/source/ui/uno/TableFilterDlg.cxx |5 +++-- dbaccess/source/ui/uno/TableFilterDlg.hxx |2 +- dbaccess/source/ui/uno/UserSettingsDlg.cxx |5 +++-- dbaccess/source/ui/uno/UserSettingsDlg.hxx |2 +- dbaccess/source/ui/uno/admindlg.cxx |5 +++-- dbaccess/source/ui/uno/admindlg.hxx |2 +- dbaccess/source/ui/uno/composerdialogs.cxx |5 +++-- dbaccess/source/ui/uno/composerdialogs.hxx |2 +- dbaccess/source/ui/uno/copytablewizard.cxx |7 --- dbaccess/source/ui/uno/textconnectionsettings_uno.cxx |7 --- dbaccess/source/ui/uno/unoDirectSql.cxx |4 +++- dbaccess/source/ui/uno/unoDirectSql.hxx |2 +- dbaccess/source/ui/uno/unosqlmessage.cxx|6 +++--- extensions/Library_dbp.mk |1 + extensions/source/abpilot/unodialogabp.cxx |5 +++-- extensions/source/abpilot/unodialogabp.hxx |2 +- extensions/source/dbpilots/unoautopilot.hxx |5 +++-- extensions/source/propctrlr/MasterDetailLinkDialog.cxx | 12 ++-- extensions/source/propctrlr/MasterDetailLinkDialog.hxx |2 +- extensions/source/propctrlr/controlfontdialog.cxx |4 ++-- extensions/source/propctrlr/controlfontdialog.hxx |2 +- extensions/source/propctrlr/pcrunodialogs.cxx |6 +++--- extensions/source/propctrlr/pcrunodialogs.hxx |2 +- filter/Library_flash.mk |1 + filter/source/flash/swfdialog.cxx |5 +++-- filter/source/flash/swfdialog.hxx |2 +- filter/source/pdf/pdfdialog.cxx |4 ++-- filter/source/pdf/pdfdialog.hxx |2 +- include/svtools/genericunodialog.hxx|2 +- svtools/source/filter/exportdialog.hxx |7 --- svtools/source/uno/addrtempuno.cxx |6 -- svtools/source/uno/genericunodialog.cxx |9 + svtools/source/uno/wizard/unowizard.cxx |7 --- svx/source/form/xfm_addcondition.cxx|5 +++-- svx/source/inc/xfm_addcondition.hxx |2 +- 46 files changed, 97 insertions(+), 88 deletions(-) New commits: commit 8a63cdd32c4eb348cb6625b4be6739fe391cb0b4 Author: Caolán McNamara AuthorDate: Sat Oct 6 15:54:11 2018 +0100 Commit: Caolán McNamara CommitDate: Sat Oct 6 20:54:24 2018 +0200 make OGenericUnoDialog take an awt::XWindow Change-Id: I7c63397d0579306f4ade1947ce5bf9e1866bf876 Reviewed-on: https://gerrit.libreoffice.org/61469 Tested-by: Jenkins Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara diff --git a/chart2/source/controller/dialogs/dlg_ChartType_UNO.cxx b/chart2/source/controller/dialogs/dlg_ChartType_UNO.cxx index 78497a0d8a1b..c9f3c57565e7 100644 --- a/chart2/source/controller/dialogs/dlg_ChartType_UNO.cxx +++ b/chart2/source/controller/dialogs/dlg_ChartType_UNO.cxx @@ -21,6 +21,7 @@ #include #include #include +#include namespace chart { @@ -67,9 +68,9 @@ void ChartTypeUnoDlg::implInitialize(const uno::Any& _rValue) else ChartTypeUnoDlg_BASE::implInitialize(_rValue); } -svt::OGenericUnoDialog::Dialog ChartTypeUnoDlg::createDialog(vcl::Window* _pParent) +svt::OGenericUnoDialog::Dialog ChartTypeUnoDlg::createDialog(const css::uno::Reference& rParent) { -return svt::OGenericUnoDialog::Dialog(VclPtr::Create(_pParent, m_xChartModel)); +return svt::OGenericUnoDialog::Dialog(VclPtr::Create(VCLUnoHelper::GetWindow(rParent), m_xChartModel)); } uno::Reference SAL_CALL ChartTypeUnoDlg::getPropertySetInfo() { diff --git a/chart2/source/controller/inc/dlg_ChartType_UNO.hxx b/chart2/source/controller/inc/dlg_ChartType_UNO.hxx index 465d66748903..bc6c211205bc
[Libreoffice-commits] core.git: basegfx/source include/basegfx vcl/headless vcl/source vcl/unx vcl/win
basegfx/source/tools/systemdependentdata.cxx | 47 include/basegfx/utils/systemdependentdata.hxx | 12 +++ vcl/headless/svpgdi.cxx | 18 vcl/source/app/svdata.cxx |4 - vcl/unx/generic/gdi/gdiimpl.cxx | 14 +++ vcl/win/gdi/gdiimpl.cxx | 96 +++--- vcl/win/gdi/salbmp.cxx| 88 +++ 7 files changed, 236 insertions(+), 43 deletions(-) New commits: commit e650279db77281fe98aaff28e31c2269611c31e4 Author: Armin Le Grand AuthorDate: Wed Oct 3 15:55:29 2018 +0200 Commit: Armin Le Grand CommitDate: Sat Oct 6 20:31:22 2018 +0200 Support estimateUsageInBytes for SystemDependentData Change-Id: I6074035ed8f90e452915e9ecffdbe9363375e126 Reviewed-on: https://gerrit.libreoffice.org/61306 Tested-by: Jenkins Reviewed-by: Armin Le Grand diff --git a/basegfx/source/tools/systemdependentdata.cxx b/basegfx/source/tools/systemdependentdata.cxx index 4153d35f7d55..c727462c7191 100644 --- a/basegfx/source/tools/systemdependentdata.cxx +++ b/basegfx/source/tools/systemdependentdata.cxx @@ -8,6 +8,7 @@ */ #include +#include namespace basegfx { @@ -62,7 +63,8 @@ namespace basegfx { SystemDependentData::SystemDependentData( SystemDependentDataManager& rSystemDependentDataManager) -: mrSystemDependentDataManager(rSystemDependentDataManager) +: mrSystemDependentDataManager(rSystemDependentDataManager), +mnCalculatedCycles(0) { } @@ -70,6 +72,49 @@ namespace basegfx { } +sal_uInt32 SystemDependentData::calculateCombinedHoldCyclesInSeconds() const +{ +if(0 == mnCalculatedCycles) +{ +const sal_Int64 nBytes(estimateUsageInBytes()); +const sal_uInt32 nSeconds(getHoldCyclesInSeconds()); + +// default is Seconds (minimal is one) +sal_uInt32 nResult(0 == nSeconds ? 1 : nSeconds); + +if(0 != nBytes) +{ +// use sqrt to get some curved shape. With a default of 60s we get +// a single second at 3600 byte. To get close to 10mb, multiply by +// a corresponding scaling factor +const double fScaleToMB(3600.0 / (1024.0 * 1024.0 * 10.0)); + +// also use a multiplier to move the start point higer +const double fMultiplierSeconds(10.0); + +// calculate +nResult = static_cast((fMultiplierSeconds * nSeconds) / sqrt(nBytes * fScaleToMB)); + +// minimal value is 1 +if(nResult < 1) +{ +nResult = 1; +} + +// maximal value is nSeconds +if(nResult > nSeconds) +{ +nResult = nSeconds; +} +} + +// set locally (once, on-demand created, non-zero) +const_cast(this)->mnCalculatedCycles = nResult < 1 ? 1 : nResult; +} + +return mnCalculatedCycles; +} + sal_uInt32 SystemDependentData::getHoldCyclesInSeconds() const { // default implementation returns 60(s) diff --git a/include/basegfx/utils/systemdependentdata.hxx b/include/basegfx/utils/systemdependentdata.hxx index 920a55043870..d5cc8d645eb6 100644 --- a/include/basegfx/utils/systemdependentdata.hxx +++ b/include/basegfx/utils/systemdependentdata.hxx @@ -89,6 +89,12 @@ namespace basegfx // a single, globally used one, but not necessarily SystemDependentDataManager& mrSystemDependentDataManager; +// Buffered CalculatedCycles, result of estimations using +// getHoldCyclesInSeconds and estimateUsageInBytes, executed +// using getHoldCyclesInSeconds. StartValue is 0 to detect +// not-yet-calculated state +sal_uInt32 mnCalculatedCycles; + public: SystemDependentData( SystemDependentDataManager& rSystemDependentDataManager); @@ -103,6 +109,12 @@ namespace basegfx // using getSystemDependentDataManager() SystemDependentDataManager& getSystemDependentDataManager() { return mrSystemDependentDataManager; } +// Calculate HoldCyclesInSeconds based on using +// getHoldCyclesInSeconds and estimateUsageInBytes, the +// result is crated once on-demand and buffered in +// mnCalculatedCycles +sal_uInt32 calculateCombinedHoldCyclesInSeconds() const; + // Number of cycles a SystemDependentDataManager should/might // hold this instance in seconds - does not have to be used, // but should be. Default implementation returns 60(s). Override to diff --git a/vcl/headless/svpgdi.cxx b/vcl/headless/svpgdi.cxx index b1f622904b5f..e42eb3ed3eaa 100644 --- a/vcl/headless/svpgdi.cxx +++ b/vcl/headless/svpgdi.cxx
[Libreoffice-commits] core.git: vcl/inc vcl/unx
vcl/inc/unx/glyphcache.hxx | 35 --- vcl/unx/generic/gdi/cairotextrender.cxx|4 - vcl/unx/generic/glyphs/freetype_glyphcache.cxx | 19 -- vcl/unx/generic/glyphs/glyphcache.cxx | 79 - vcl/unx/generic/print/genpspgraphics.cxx |3 5 files changed, 20 insertions(+), 120 deletions(-) New commits: commit dd36db168c658ebe588396255ad61363cc4ea7af Author: Jan-Marek Glogowski AuthorDate: Thu Oct 4 13:25:06 2018 + Commit: Jan-Marek Glogowski CommitDate: Sat Oct 6 20:13:28 2018 +0200 UNX use font cache based glyph rect cache Drop the special / duplicate glyph rect bound cache implementation for Freetype fonts. The GlyphCache class now looks a lot like the ImplFontCache class. The lru handling for Freetype fonts is based on the byte / memory size, including the glyth bound-rect caching. Using the new common cache is effectivly removing the bound-rects from this accounting, so the garbage collection won't free them anymore. Change-Id: Ie53226596ee2287e1059a74885f52c3d64bbccaa Reviewed-on: https://gerrit.libreoffice.org/61377 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski diff --git a/vcl/inc/unx/glyphcache.hxx b/vcl/inc/unx/glyphcache.hxx index 446acc2944af..9fe3bd3dc7cf 100644 --- a/vcl/inc/unx/glyphcache.hxx +++ b/vcl/inc/unx/glyphcache.hxx @@ -41,7 +41,6 @@ class FreetypeFont; class FreetypeFontInstance; class FreetypeFontInfo; -class GlyphData; class FontConfigFontOptions; class PhysicalFontCollection; class FreetypeFont; @@ -71,13 +70,6 @@ public: voidClearFontOptions(); private: -friend class FreetypeFont; -// used by FreetypeFont class only -voidAddedGlyph( GlyphData& ); -voidRemovingGlyph(); -voidUsingGlyph( GlyphData const & ); - -private: voidInitFreetype(); voidGarbageCollect(); FreetypeFont* CreateFont(LogicalFontInstance* pLogicalFont); @@ -92,32 +84,12 @@ private: FontListmaFontList; static constexpr sal_uLong gnMaxSize = 150; // max overall cache size in bytes mutable sal_uLong mnBytesUsed; -mutable longmnLruIndex; -mutable int mnGlyphCount; FreetypeFont* mpCurrentGCFont; FontInfoListm_aFontInfoList; sal_IntPtr m_nMaxFontId; }; -class GlyphData -{ -public: -GlyphData() : mnLruValue(0) {} - -const tools::Rectangle&GetBoundRect() const{ return maBoundRect; } -voidSetBoundRect(tools::Rectangle r) { maBoundRect = r; } - -voidSetLruValue( int n ) const { mnLruValue = n; } -longGetLruValue() const { return mnLruValue;} - -private: -tools::Rectangle maBoundRect; - -// used by GlyphCache for cache LRU algorithm -mutable longmnLruValue; -}; - class VCL_DLLPUBLIC FreetypeFont final { public: @@ -139,7 +111,7 @@ public: const FontCharMapRefGetFontCharMap() const; boolGetFontCapabilities(vcl::FontCapabilities &) const; -const tools::Rectangle&GetGlyphBoundRect(const GlyphItem& rGlyph); +boolGetGlyphBoundRect(const GlyphItem&, tools::Rectangle&); boolGetGlyphOutline(const GlyphItem& rGlyph, basegfx::B2DPolyPolygon&) const; boolGetAntialiasAdvice() const; @@ -156,15 +128,10 @@ private: longRelease() const; sal_uLong GetByteCount() const { return mnBytesUsed; } -voidInitGlyphData(const GlyphItem&, GlyphData&) const; -voidGarbageCollect( long ); voidReleaseFromGarbageCollect(); voidApplyGlyphTransform(bool bVertical, FT_Glyph) const; -typedef std::unordered_map GlyphList; -mutable GlyphList maGlyphList; - rtl::Reference mpFontInstance; // used by GlyphCache for cache LRU algorithm diff --git a/vcl/unx/generic/gdi/cairotextrender.cxx b/vcl/unx/generic/gdi/cairotextrender.cxx index 11d4e94592c4..40e1c5a8db3b 100644 --- a/vcl/unx/generic/gdi/cairotextrender.cxx +++ b/vcl/unx/generic/gdi/cairotextrender.cxx @@ -451,7 +451,9 @@ bool CairoTextRender::GetGlyphBoundRect(const GlyphItem& rGlyph, tools::Rectangl if( !pSF ) return false; -tools::Rectangle aRect = pSF->GetGlyphBoundRect(rGlyph); +tools::Rectangle aRect; +if (!pSF->GetGlyphBoundRect(rGlyph, aRect)) +return false; if ( pSF->mnCos != 0x1 && pSF->mnSin != 0 ) { diff --git a/vcl/unx/generic/glyphs/freetype_glyphcache.cxx b/vcl/unx/generic/glyphs/freetype_glyphcache.cxx
Re: Unittest fail because of 125% screen resolution on Windows 10
Hi Oliver, Oliver Brinzing schrieb am 06-Oct-18 um 17:03: Hi Regina, if I set my PC to 100% screen resolution, the unit tests work. If I set my PC to 125%, unit tests fail. 125% results in 120dpi, that is below the threshold for scaling. if have win10 with 125% (120DPI / 1920x1080) and can build lo master without build breaks: /cygdrive/d/sources/libo-core/autogen.sh \ --with-external-tar=/cygdrive/d/sources/lo-externalsrc \ --with-junit=/cygdrive/d/sources/junit-4.10.jar \ --with-ant-home=/cygdrive/d/sources/apache-ant-1.9.5 \ --with-jdk-home=/cygdrive/d/Programme/Java/jdk1.8.0x64 \ --enable-pch --disable-ccache --enable-debug --enable-64-bit /opt/lo/bin/make gb_COLOR=1 gb_TITLES=1 2>&1 | tee build.log Do you run unittests after building? Yes, I start with 'make build-nocheck'. I see the problem when then using 'make sw.check' and 'make sc.check' for example. Kind regards Regina ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice
[Libreoffice-commits] core.git: vcl/inc vcl/quartz
vcl/inc/quartz/salgdi.h |2 +- vcl/quartz/ctfonts.cxx |6 +- 2 files changed, 6 insertions(+), 2 deletions(-) New commits: commit 2f182faaf08542e381a1aee4544b47c4cd7c0b92 Author: Jan-Marek Glogowski AuthorDate: Thu Oct 4 15:54:53 2018 + Commit: Jan-Marek Glogowski CommitDate: Sat Oct 6 18:30:15 2018 +0200 OSX use font cache based glyph rect cache Change-Id: Ia9bf718f1158c68971511688fe5af3e335d841ba Reviewed-on: https://gerrit.libreoffice.org/61386 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski diff --git a/vcl/inc/quartz/salgdi.h b/vcl/inc/quartz/salgdi.h index 24b5268493de..0fb20bb490cc 100644 --- a/vcl/inc/quartz/salgdi.h +++ b/vcl/inc/quartz/salgdi.h @@ -85,7 +85,7 @@ public: ~CoreTextStyle() override; void GetFontMetric( ImplFontMetricDataRef const & ); -bool GetGlyphBoundRect(const GlyphItem&, tools::Rectangle&) const; +bool GetGlyphBoundRect(const GlyphItem&, tools::Rectangle&); bool GetGlyphOutline(const GlyphItem&, basegfx::B2DPolyPolygon&) const; CFMutableDictionaryRef GetStyleDict( void ) const { return mpStyleDict; } diff --git a/vcl/quartz/ctfonts.cxx b/vcl/quartz/ctfonts.cxx index 6ceec8a0295d..65b3a85f5a43 100644 --- a/vcl/quartz/ctfonts.cxx +++ b/vcl/quartz/ctfonts.cxx @@ -137,8 +137,11 @@ void CoreTextStyle::GetFontMetric( ImplFontMetricDataRef const & rxFontMetric ) rxFontMetric->SetMinKashida(GetKashidaWidth()); } -bool CoreTextStyle::GetGlyphBoundRect(const GlyphItem& rGlyph, tools::Rectangle& rRect ) const +bool CoreTextStyle::GetGlyphBoundRect(const GlyphItem& rGlyph, tools::Rectangle& rRect ) { +if (GetCachedGlyphBoundRect(rGlyph.maGlyphId, rRect)) +return true; + CGGlyph nCGGlyph = rGlyph.maGlyphId; CTFontRef aCTFontRef = static_cast(CFDictionaryGetValue( mpStyleDict, kCTFontAttributeName )); @@ -156,6 +159,7 @@ bool CoreTextStyle::GetGlyphBoundRect(const GlyphItem& rGlyph, tools::Rectangle& long xMax = ceil(aCGRect.origin.x + aCGRect.size.width); long yMax = ceil(aCGRect.origin.y + aCGRect.size.height); rRect = tools::Rectangle(xMin, -yMax, xMax, -yMin); +CacheGlyphBoundRect(rGlyph.maGlyphId, rRect); return true; } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
Christopher Peddle license statement
All of my past & future contributions to LibreOffice may be licensed under the MPLv2/LGPLv3+ dual license. ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice
Re: Unittest fail because of 125% screen resolution on Windows 10
Hi Regina, > if I set my PC to 100% screen resolution, the unit tests work. If I set my PC to 125%, unit tests > fail. 125% results in 120dpi, that is below the threshold for scaling. if have win10 with 125% (120DPI / 1920x1080) and can build lo master without build breaks: /cygdrive/d/sources/libo-core/autogen.sh \ --with-external-tar=/cygdrive/d/sources/lo-externalsrc \ --with-junit=/cygdrive/d/sources/junit-4.10.jar \ --with-ant-home=/cygdrive/d/sources/apache-ant-1.9.5 \ --with-jdk-home=/cygdrive/d/Programme/Java/jdk1.8.0x64 \ --enable-pch --disable-ccache --enable-debug --enable-64-bit /opt/lo/bin/make gb_COLOR=1 gb_TITLES=1 2>&1 | tee build.log Do you run unittests after building? Regards Oliver ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice
[Libreoffice-commits] core.git: include/o3tl o3tl/qa vcl/inc vcl/source
include/o3tl/lru_map.hxx |7 --- o3tl/qa/test-lru_map.cxx | 20 vcl/inc/impfontcache.hxx |3 ++- vcl/source/font/fontcache.cxx | 40 4 files changed, 46 insertions(+), 24 deletions(-) New commits: commit 16a338e173083954a9932a3a4005f172309c784e Author: Jan-Marek Glogowski AuthorDate: Fri Oct 5 17:08:49 2018 +0200 Commit: Jan-Marek Glogowski CommitDate: Sat Oct 6 16:23:44 2018 +0200 Convert ImplFontCache to use o3tl::lru_map We still do our own cleanup of the LRU map, as we can't drop any fonts in use. Change-Id: I8ec5c6ce8f80893635621357e9085950e7010f5b Reviewed-on: https://gerrit.libreoffice.org/61455 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski diff --git a/include/o3tl/lru_map.hxx b/include/o3tl/lru_map.hxx index 79e81293a858..003da59551b5 100644 --- a/include/o3tl/lru_map.hxx +++ b/include/o3tl/lru_map.hxx @@ -31,7 +31,7 @@ namespace o3tl * for most of the operations with a combination unordered map and linked list. * **/ -template> +template, class KeyEqual = std::equal_to> class lru_map final { public: @@ -42,7 +42,7 @@ private: typedef typename list_t::iterator list_iterator_t; typedef typename list_t::const_iterator list_const_iterator_t; -typedef std::unordered_map map_t; +typedef std::unordered_map map_t; typedef typename map_t::iterator map_iterator_t; typedef typename map_t::const_iterator map_const_iterator_t; @@ -65,8 +65,9 @@ public: typedef list_iterator_t iterator; typedef list_const_iterator_t const_iterator; +// a size of 0 effectively disables the LRU cleanup code lru_map(size_t nMaxSize) -: mMaxSize(nMaxSize) +: mMaxSize(nMaxSize ? nMaxSize : std::min(mLruMap.max_size(), mLruList.max_size())) {} void insert(key_value_pair_t& rPair) diff --git a/o3tl/qa/test-lru_map.cxx b/o3tl/qa/test-lru_map.cxx index 7a4886d3be3e..a7f9777e2c5f 100644 --- a/o3tl/qa/test-lru_map.cxx +++ b/o3tl/qa/test-lru_map.cxx @@ -28,6 +28,7 @@ public: void testLruRemoval(); void testCustomHash(); void testRemoveIf(); +void testNoAutoCleanup(); CPPUNIT_TEST_SUITE(lru_map_test); CPPUNIT_TEST(testBaseUsage); @@ -36,6 +37,7 @@ public: CPPUNIT_TEST(testLruRemoval); CPPUNIT_TEST(testCustomHash); CPPUNIT_TEST(testRemoveIf); +CPPUNIT_TEST(testNoAutoCleanup); CPPUNIT_TEST_SUITE_END(); }; @@ -289,6 +291,24 @@ void lru_map_test::testRemoveIf() CPPUNIT_ASSERT_EQUAL(size_t(0), lru.size()); } +void lru_map_test::testNoAutoCleanup() +{ +o3tl::lru_map lru(0); +CPPUNIT_ASSERT_EQUAL(size_t(0), lru.size()); +lru.insert({0,0}); +lru.insert({1,1}); +CPPUNIT_ASSERT_EQUAL(size_t(2), lru.size()); +lru.insert({0,0}); +CPPUNIT_ASSERT_EQUAL(size_t(2), lru.size()); + +int i = 0; +for (auto &rPair : lru) +{ +CPPUNIT_ASSERT_EQUAL(i, rPair.first); +++i; +} +} + CPPUNIT_TEST_SUITE_REGISTRATION(lru_map_test); /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/vcl/inc/impfontcache.hxx b/vcl/inc/impfontcache.hxx index c96994300176..ee39883f2199 100644 --- a/vcl/inc/impfontcache.hxx +++ b/vcl/inc/impfontcache.hxx @@ -69,7 +69,8 @@ private: // cache of recently used font instances struct IFSD_Equal { bool operator()( const FontSelectPattern&, const FontSelectPattern& ) const; }; struct IFSD_Hash { size_t operator()( const FontSelectPattern& ) const; }; -typedef std::unordered_map, IFSD_Hash, IFSD_Equal> FontInstanceList; +typedef o3tl::lru_map, IFSD_Hash, IFSD_Equal> FontInstanceList; +typedef FontInstanceList::key_value_pair_t FontInstanceListPair; LogicalFontInstance* mpLastHitCacheEntry; ///< keeps the last hit cache entry FontInstanceList maFontInstanceList; diff --git a/vcl/source/font/fontcache.cxx b/vcl/source/font/fontcache.cxx index 0db997fe510f..2b2e062ecea0 100644 --- a/vcl/source/font/fontcache.cxx +++ b/vcl/source/font/fontcache.cxx @@ -85,13 +85,14 @@ bool ImplFontCache::IFSD_Equal::operator()(const FontSelectPattern& rA, const Fo ImplFontCache::ImplFontCache() : mpLastHitCacheEntry( nullptr ) +, maFontInstanceList(0) // The cache limit is set by the rough number of characters needed to read your average Asian newspaper. , m_aBoundRectCache(3000) {} ImplFontCache::~ImplFontCache() { -for (auto & rLFI : maFontInstanceList) +for (const auto & rLFI : maFontInstanceList) rLFI.second->mpFontCache = nullptr; } @@ -115,7 +116,7 @@ rtl::Reference ImplFontCache::GetFontInstance( PhysicalFont pFontInstance = mpLastHitCacheEntry; else { -FontInstanceList::iterator it = maFontInstanceList.find( aFontSelData ); +FontInstanceList::const_iterator it = maFontInstanceList.find( aFontSelData ); if( it != maFontInstanceList.end() )
Hamish McIntyre-Bhatty license statement
Hello, All of my past & future contributions to LibreOffice may be licensed under the MPLv2/LGPLv3+ dual license. I'm new to collaborative development, and my primary language is Python, so I may need some help getting started, but I'll do my best. Looking forward to working with you all :-). Hamish ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice
[Libreoffice-commits] core.git: vcl/win
vcl/win/gdi/salfont.cxx | 19 --- 1 file changed, 4 insertions(+), 15 deletions(-) New commits: commit 01a782d2ceb741d20721b44d26d862d80b47d226 Author: Jan-Marek Glogowski AuthorDate: Thu Oct 4 14:05:30 2018 +0200 Commit: Jan-Marek Glogowski CommitDate: Sat Oct 6 15:19:38 2018 +0200 tdf#119829 use font cache based glyph rect cache The current glyph cache on Windows didn't work for multiple fonts and had to be manually invalidated on font change. The new glyph rect cache is coupled to the font cache and will invalidate all cached glyph rects, if a cached font is released. So switch to the new cache on Windows. Change-Id: Ic641f78e2e664dc0ad52e595d5fdfb6ef611eb3f Reviewed-on: https://gerrit.libreoffice.org/61278 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski diff --git a/vcl/win/gdi/salfont.cxx b/vcl/win/gdi/salfont.cxx index ba205d1c8d74..a93141ff83e5 100644 --- a/vcl/win/gdi/salfont.cxx +++ b/vcl/win/gdi/salfont.cxx @@ -60,11 +60,6 @@ using namespace vcl; -// GetGlyphOutlineW() seems to be a little slow, and doesn't seem to do its own caching (tested on Windows10). -// TODO include the font as part of the cache key, then we won't need to clear it on font change -// The cache limit is set by the rough number of characters needed to read your average Asian newspaper. -static o3tl::lru_map g_BoundRectCache(3000); - static const int MAXFONTHEIGHT = 2048; static inline FIXED FixedFromDouble( double d ) @@ -846,8 +841,6 @@ HFONT WinSalGraphics::ImplDoSetFont(FontSelectPattern const & i_rFont, float& o_rFontScale, HFONT& o_rOldFont) { -// clear the cache on font change -g_BoundRectCache.clear(); HFONT hNewFont = nullptr; LOGFONTW aLogFont; @@ -1335,16 +1328,12 @@ void WinSalGraphics::ClearDevFontCache() bool WinSalGraphics::GetGlyphBoundRect(const GlyphItem& rGlyph, tools::Rectangle& rRect) { -auto it = g_BoundRectCache.find(rGlyph.maGlyphId); -if (it != g_BoundRectCache.end()) -{ -rRect = it->second; -return true; -} - rtl::Reference pFont = mpWinFontEntry[rGlyph.mnFallbackLevel]; assert(pFont.is()); +if (pFont.is() && pFont->GetCachedGlyphBoundRect(rGlyph.maGlyphId, rRect)) +return true; + HDC hDC = getHDC(); HFONT hFont = static_cast(GetCurrentObject(hDC, OBJ_FONT)); float fFontScale = 1.0; @@ -1379,7 +1368,7 @@ bool WinSalGraphics::GetGlyphBoundRect(const GlyphItem& rGlyph, tools::Rectangle rRect.SetTop(static_cast( fFontScale * rRect.Top() )); rRect.SetBottom(static_cast( fFontScale * rRect.Bottom() ) + 1); -g_BoundRectCache.insert({rGlyph.maGlyphId, rRect}); +pFont->CacheGlyphBoundRect(rGlyph.maGlyphId, rRect); return true; } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: include/o3tl o3tl/qa vcl/inc vcl/source
include/o3tl/lru_map.hxx | 27 ++- o3tl/qa/test-lru_map.cxx | 55 +++ vcl/inc/fontinstance.hxx |6 vcl/inc/impfontcache.hxx | 48 +- vcl/source/font/fontcache.cxx| 38 ++ vcl/source/font/fontinstance.cxx | 13 + 6 files changed, 179 insertions(+), 8 deletions(-) New commits: commit 612339e574293b248c44cc04a4fae0c77a64ad53 Author: Jan-Marek Glogowski AuthorDate: Thu Oct 4 14:03:07 2018 +0200 Commit: Jan-Marek Glogowski CommitDate: Sat Oct 6 15:17:52 2018 +0200 Add a glyph-bound-rect cache to the font cache This way the font cache can correctly invalidate the cached glyph rects when a font is dropped from the cache. Change-Id: I050866099742334f01cac1b872228a017ddb5e9b Reviewed-on: https://gerrit.libreoffice.org/61371 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski diff --git a/include/o3tl/lru_map.hxx b/include/o3tl/lru_map.hxx index 015120e31cb3..79e81293a858 100644 --- a/include/o3tl/lru_map.hxx +++ b/include/o3tl/lru_map.hxx @@ -34,8 +34,10 @@ namespace o3tl template> class lru_map final { -private: +public: typedef typename std::pair key_value_pair_t; + +private: typedef std::list list_t; typedef typename list_t::iterator list_iterator_t; typedef typename list_t::const_iterator list_const_iterator_t; @@ -58,6 +60,7 @@ private: mLruList.pop_back(); } } + public: typedef list_iterator_t iterator; typedef list_const_iterator_t const_iterator; @@ -126,6 +129,28 @@ public: } } +// reverse-iterates the list removing all items matching the predicate +template +void remove_if(UnaryPredicate pred) +{ +auto it = mLruList.rbegin(); +while (it != mLruList.rend()) +{ +if (pred(*it)) +{ +mLruMap.erase(it->first); +it = decltype(it){ mLruList.erase(std::next(it).base()) }; +} +else +++it; +} +} + +const list_const_iterator_t begin() const +{ +return mLruList.cbegin(); +} + const list_const_iterator_t end() const { return mLruList.cend(); diff --git a/o3tl/qa/test-lru_map.cxx b/o3tl/qa/test-lru_map.cxx index 096b21ec5189..7a4886d3be3e 100644 --- a/o3tl/qa/test-lru_map.cxx +++ b/o3tl/qa/test-lru_map.cxx @@ -27,6 +27,7 @@ public: void testReplaceValue(); void testLruRemoval(); void testCustomHash(); +void testRemoveIf(); CPPUNIT_TEST_SUITE(lru_map_test); CPPUNIT_TEST(testBaseUsage); @@ -34,6 +35,7 @@ public: CPPUNIT_TEST(testReplaceValue); CPPUNIT_TEST(testLruRemoval); CPPUNIT_TEST(testCustomHash); +CPPUNIT_TEST(testRemoveIf); CPPUNIT_TEST_SUITE_END(); }; @@ -234,6 +236,59 @@ void lru_map_test::testCustomHash() CPPUNIT_ASSERT_EQUAL(13, lru.find(TestClassKey(2,1))->second); } +void lru_map_test::testRemoveIf() +{ +typedef o3tl::lru_map IntMap; +typedef IntMap::key_value_pair_t IntMapPair; +struct limit_except : public std::exception {}; + +IntMap lru(6); +int i = 0; +for (; i < 8; i++) +lru.insert({i, i}); +CPPUNIT_ASSERT_EQUAL(size_t(6), lru.size()); +// now contains 7..2 + +// remove everything < 4 from the back +try +{ +lru.remove_if([] (IntMapPair const& rPair) { +if (rPair.first >= 4) +throw limit_except(); +return true; +}); +CPPUNIT_ASSERT(false); // not reached +} +catch (limit_except) +{ +// contains 7..4 +CPPUNIT_ASSERT_EQUAL(size_t(4), lru.size()); +} + +// remove all even numbers +lru.remove_if([] (IntMapPair const& rPair) { return (0 == rPair.first % 2); }); +CPPUNIT_ASSERT_EQUAL(size_t(2), lru.size()); +// contains 7, 5 + +lru.insert({5, 5}); +// contains 5, 7 + +i = 5; +for (auto &rPair : lru) +{ +CPPUNIT_ASSERT_EQUAL(i, rPair.first); +i += 2; +} + +// remove the first item +lru.remove_if([] (IntMapPair const& rPair) { return (rPair.first == 5); }); +CPPUNIT_ASSERT_EQUAL(size_t(1), lru.size()); + +// remove the only item +lru.remove_if([] (IntMapPair const& rPair) { return (rPair.first == 7); }); +CPPUNIT_ASSERT_EQUAL(size_t(0), lru.size()); +} + CPPUNIT_TEST_SUITE_REGISTRATION(lru_map_test); /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/vcl/inc/fontinstance.hxx b/vcl/inc/fontinstance.hxx index 597c747553ac..b3b67c8a9079 100644 --- a/vcl/inc/fontinstance.hxx +++ b/vcl/inc/fontinstance.hxx @@ -25,6 +25,9 @@ #include #include +#include +#include + #include #include @@ -67,6 +70,9 @@ public: // TODO: make data members private const PhysicalFontFace* GetFontFace() const { return m_pFontFace.get(); }
[Libreoffice-commits] core.git: scripting/source
scripting/source/provider/ProviderCache.cxx | 11 --- 1 file changed, 4 insertions(+), 7 deletions(-) New commits: commit 4435135e68f7d1024875defc3df18de183607048 Author: Mike Kaganski AuthorDate: Sat Oct 6 12:27:44 2018 +0200 Commit: Mike Kaganski CommitDate: Sat Oct 6 13:54:29 2018 +0200 Use range-based loop Change-Id: I5c1233f53ca5c9f4322ecf7a832880399d6fec5e Reviewed-on: https://gerrit.libreoffice.org/61463 Tested-by: Jenkins Reviewed-by: Mike Kaganski diff --git a/scripting/source/provider/ProviderCache.cxx b/scripting/source/provider/ProviderCache.cxx index 4e3b0230efa9..eeaac5fd44eb 100644 --- a/scripting/source/provider/ProviderCache.cxx +++ b/scripting/source/provider/ProviderCache.cxx @@ -88,16 +88,13 @@ ProviderCache::getAllProviders() ::osl::Guard< osl::Mutex > aGuard( m_mutex ); Sequence < Reference< provider::XScriptProvider > > providers ( m_hProviderDetailsCache.size() ); -ProviderDetails_hash::iterator h_itEnd = m_hProviderDetailsCache.end(); -ProviderDetails_hash::iterator h_it = m_hProviderDetailsCache.begin(); // should assert if size !> 0 if ( !m_hProviderDetailsCache.empty() ) { sal_Int32 providerIndex = 0; -sal_Int32 index = 0; -for ( index = 0; h_it != h_itEnd; ++h_it, index++ ) +for (auto& rDetail : m_hProviderDetailsCache) { -Reference< provider::XScriptProvider > xScriptProvider = h_it->second.provider; +Reference xScriptProvider = rDetail.second.provider; if ( xScriptProvider.is() ) { providers[ providerIndex++ ] = xScriptProvider; @@ -107,7 +104,7 @@ ProviderCache::getAllProviders() // create provider try { -xScriptProvider = createProvider( h_it->second ); +xScriptProvider = createProvider(rDetail.second); providers[ providerIndex++ ] = xScriptProvider; } catch ( const Exception& ) @@ -117,7 +114,7 @@ ProviderCache::getAllProviders() } } -if ( providerIndex < index ) +if (providerIndex < providers.getLength()) { providers.realloc( providerIndex ); } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: include/svl svl/source
include/svl/broadcast.hxx |1 svl/source/notify/broadcast.cxx | 74 +--- 2 files changed, 33 insertions(+), 42 deletions(-) New commits: commit 97dac306e6b4c26f67307e6b3bb0c2b2b470a09a Author: Noel Grandin AuthorDate: Sat Oct 6 12:31:22 2018 +0200 Commit: Noel Grandin CommitDate: Sat Oct 6 13:27:42 2018 +0200 try to fix SvtBroadcaster on macOS this reverts commit a20ec3b5cd691ae18f0d87d045673ce3a06579c6 fix iterator invalidation assert and commit 4a290888580474f9542f185091bb2a6fcf4e9a53 SvtBroadcaster unify the normal and PrepareForDestruction paths no idea what is going on, I suspect that std::vector is re-allocating its data buffer despite having called reserve() Change-Id: I681ae5fca4578240a2a0dc0af51ff06d919f9099 Reviewed-on: https://gerrit.libreoffice.org/61464 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/include/svl/broadcast.hxx b/include/svl/broadcast.hxx index 27181e03294e..b4c8be5f9ac0 100644 --- a/include/svl/broadcast.hxx +++ b/include/svl/broadcast.hxx @@ -82,6 +82,7 @@ private: /// Indicate that this broadcaster will be destructed (we indicate this on all ScColumn's broadcasters during the ScTable destruction, eg.) bool mbAboutToDie:1; +bool mbDisposing:1; mutable bool mbNormalized:1; mutable bool mbDestNormalized:1; }; diff --git a/svl/source/notify/broadcast.cxx b/svl/source/notify/broadcast.cxx index bef049a84c5c..626a48a332e9 100644 --- a/svl/source/notify/broadcast.cxx +++ b/svl/source/notify/broadcast.cxx @@ -40,8 +40,9 @@ void SvtBroadcaster::Normalize() const void SvtBroadcaster::Add( SvtListener* p ) { -assert(!mbAboutToDie && "called inside my own destructor / after PrepareForDestruction()?"); -if (mbAboutToDie) +assert(!mbDisposing && "called inside my own destructor?"); +assert(!mbAboutToDie && "called after PrepareForDestruction()?"); +if (mbDisposing || mbAboutToDie) return; // only reset mbNormalized if we are going to become unsorted if (!maListeners.empty() && maListeners.back() > p) @@ -51,12 +52,13 @@ void SvtBroadcaster::Add( SvtListener* p ) void SvtBroadcaster::Remove( SvtListener* p ) { +if (mbDisposing) +return; + if (mbAboutToDie) { -// only reset mbDestNormalized if we are going to become unsorted -if (!maDestructedListeners.empty() && maDestructedListeners.back() > p) -mbDestNormalized = false; maDestructedListeners.push_back(p); +mbDestNormalized = false; return; } @@ -73,13 +75,14 @@ void SvtBroadcaster::Remove( SvtListener* p ) ListenersGone(); } -SvtBroadcaster::SvtBroadcaster() : mbAboutToDie(false), mbNormalized(true), mbDestNormalized(true) {} +SvtBroadcaster::SvtBroadcaster() : mbAboutToDie(false), mbDisposing(false), mbNormalized(true), mbDestNormalized(true) {} SvtBroadcaster::SvtBroadcaster( const SvtBroadcaster &rBC ) : -mbAboutToDie(false), +mbAboutToDie(false), mbDisposing(false), mbNormalized(true), mbDestNormalized(true) { -assert(!rBC.mbAboutToDie && "copying an object marked with PrepareForDestruction() / that is in it's destructor?"); +assert(!rBC.mbAboutToDie && "copying an object marked with PrepareForDestruction()?"); +assert(!rBC.mbDisposing && "copying an object that is in it's destructor?"); rBC.Normalize(); // so that insert into ourself is in-order, and therefore we do not need to Normalize() maListeners.reserve(rBC.maListeners.size()); @@ -89,54 +92,41 @@ SvtBroadcaster::SvtBroadcaster( const SvtBroadcaster &rBC ) : SvtBroadcaster::~SvtBroadcaster() { -PrepareForDestruction(); - -Normalize(); - -{ -auto dest(maDestructedListeners.data()); -SfxHint aHint(SfxHintId::Dying); -for (ListenersType::iterator it(maListeners.begin()); it != maListeners.end(); ++it) -{ -auto destEnd(dest + maDestructedListeners.size()); -// skip the destructed ones -while (dest != destEnd && (*dest < *it)) -++dest; - -if (dest == destEnd || *dest != *it) -(*it)->Notify(aHint); -} -} +mbDisposing = true; +Broadcast( SfxHint(SfxHintId::Dying) ); Normalize(); // now when both lists are sorted, we can linearly unregister all // listeners, with the exception of those that already asked to be removed // during their own destruction +ListenersType::const_iterator dest(maDestructedListeners.begin()); +for (ListenersType::iterator it(maListeners.begin()); it != maListeners.end(); ++it) { -auto dest(maDestructedListeners.data()); -for (ListenersType::iterator it(maListeners.begin()); it != maListeners.end(); ++it) -{ -auto destEnd(dest + maDestructedListeners.size()); -
[Libreoffice-commits] core.git: include/svx sc/source
include/svx/svdobj.hxx |1 sc/source/filter/excel/xiescher.cxx | 66 ++-- sc/source/filter/inc/xiescher.hxx | 32 - 3 files changed, 50 insertions(+), 49 deletions(-) New commits: commit 792f85dcc45951a05027d082ce5ac1aef103f453 Author: Noel Grandin AuthorDate: Fri Oct 5 12:50:07 2018 +0200 Commit: Noel Grandin CommitDate: Sat Oct 6 12:34:48 2018 +0200 introduce SdrObjectUniquePtr typedef Change-Id: I00106a7be04d473e2ee60ef6165bebc4148f954b Reviewed-on: https://gerrit.libreoffice.org/61438 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/include/svx/svdobj.hxx b/include/svx/svdobj.hxx index 76fc5e04f850..fabf904b2da0 100644 --- a/include/svx/svdobj.hxx +++ b/include/svx/svdobj.hxx @@ -1041,6 +1041,7 @@ struct SVX_DLLPUBLIC SdrObjectFreeOp SdrObject::Free(obj); } }; +typedef std::unique_ptr< SdrObject, SdrObjectFreeOp > SdrObjectUniquePtr; struct SdrObjCreatorParams { diff --git a/sc/source/filter/excel/xiescher.cxx b/sc/source/filter/excel/xiescher.cxx index 41de97379ebc..be28c903a7ca 100644 --- a/sc/source/filter/excel/xiescher.cxx +++ b/sc/source/filter/excel/xiescher.cxx @@ -418,9 +418,9 @@ std::size_t XclImpDrawObjBase::GetProgressSize() const return DoGetProgressSize(); } -SdrObjectPtr XclImpDrawObjBase::CreateSdrObject( XclImpDffConverter& rDffConv, const tools::Rectangle& rAnchorRect, bool bIsDff ) const +SdrObjectUniquePtr XclImpDrawObjBase::CreateSdrObject( XclImpDffConverter& rDffConv, const tools::Rectangle& rAnchorRect, bool bIsDff ) const { -SdrObjectPtr xSdrObj; +SdrObjectUniquePtr xSdrObj; if( bIsDff && !mbCustomDff ) { rDffConv.Progress( GetProgressSize() ); @@ -796,7 +796,7 @@ std::size_t XclImpDrawObjBase::DoGetProgressSize() const return 1; } -SdrObjectPtr XclImpDrawObjBase::DoCreateSdrObj( XclImpDffConverter& rDffConv, const tools::Rectangle& ) const +SdrObjectUniquePtr XclImpDrawObjBase::DoCreateSdrObj( XclImpDffConverter& rDffConv, const tools::Rectangle& ) const { rDffConv.Progress( GetProgressSize() ); return nullptr; @@ -1012,7 +1012,7 @@ std::size_t XclImpGroupObj::DoGetProgressSize() const return XclImpDrawObjBase::DoGetProgressSize() + maChildren.GetProgressSize(); } -SdrObjectPtr XclImpGroupObj::DoCreateSdrObj( XclImpDffConverter& rDffConv, const tools::Rectangle& /*rAnchorRect*/ ) const +SdrObjectUniquePtr XclImpGroupObj::DoCreateSdrObj( XclImpDffConverter& rDffConv, const tools::Rectangle& /*rAnchorRect*/ ) const { std::unique_ptr xSdrObj( new SdrObjGroup( @@ -1065,7 +1065,7 @@ void XclImpLineObj::DoReadObj5( XclImpStream& rStrm, sal_uInt16 nNameLen, sal_uI ReadMacro5( rStrm, nMacroSize ); } -SdrObjectPtr XclImpLineObj::DoCreateSdrObj( XclImpDffConverter& rDffConv, const tools::Rectangle& rAnchorRect ) const +SdrObjectUniquePtr XclImpLineObj::DoCreateSdrObj( XclImpDffConverter& rDffConv, const tools::Rectangle& rAnchorRect ) const { ::basegfx::B2DPolygon aB2DPolygon; switch( mnStartPoint ) @@ -1088,7 +1088,7 @@ SdrObjectPtr XclImpLineObj::DoCreateSdrObj( XclImpDffConverter& rDffConv, const aB2DPolygon.append( ::basegfx::B2DPoint( rAnchorRect.Right(), rAnchorRect.Top() ) ); break; } -SdrObjectPtr xSdrObj( +SdrObjectUniquePtr xSdrObj( new SdrPathObj( *GetDoc().GetDrawLayer(), OBJ_LINE, @@ -1205,9 +1205,9 @@ void XclImpRectObj::DoReadObj5( XclImpStream& rStrm, sal_uInt16 nNameLen, sal_uI ReadMacro5( rStrm, nMacroSize ); } -SdrObjectPtr XclImpRectObj::DoCreateSdrObj( XclImpDffConverter& rDffConv, const tools::Rectangle& rAnchorRect ) const +SdrObjectUniquePtr XclImpRectObj::DoCreateSdrObj( XclImpDffConverter& rDffConv, const tools::Rectangle& rAnchorRect ) const { -SdrObjectPtr xSdrObj( +SdrObjectUniquePtr xSdrObj( new SdrRectObj( *GetDoc().GetDrawLayer(), rAnchorRect)); @@ -1221,9 +1221,9 @@ XclImpOvalObj::XclImpOvalObj( const XclImpRoot& rRoot ) : { } -SdrObjectPtr XclImpOvalObj::DoCreateSdrObj( XclImpDffConverter& rDffConv, const tools::Rectangle& rAnchorRect ) const +SdrObjectUniquePtr XclImpOvalObj::DoCreateSdrObj( XclImpDffConverter& rDffConv, const tools::Rectangle& rAnchorRect ) const { -SdrObjectPtr xSdrObj( +SdrObjectUniquePtr xSdrObj( new SdrCircObj( *GetDoc().GetDrawLayer(), OBJ_CIRC, @@ -1265,7 +1265,7 @@ void XclImpArcObj::DoReadObj5( XclImpStream& rStrm, sal_uInt16 nNameLen, sal_uIn ReadMacro5( rStrm, nMacroSize ); } -SdrObjectPtr XclImpArcObj::DoCreateSdrObj( XclImpDffConverter& rDffConv, const tools::Rectangle& rAnchorRect ) const +SdrObjectUniquePtr XclImpArcObj::DoCreateSdrObj( XclImpDffConverter& rDffConv, const tools::Rectangle& rAnchorRect ) const { tools::Rectangle aNewRect = rAnchorRect; long nStartAngle = 0; @@ -1299,
[Libreoffice-commits] core.git: sc/source
sc/source/ui/docshell/docsh5.cxx |4 ++-- sc/source/ui/inc/undotab.hxx | 28 ++-- sc/source/ui/undo/undotab.cxx| 34 +++--- sc/source/ui/view/viewfun2.cxx |4 ++-- 4 files changed, 33 insertions(+), 37 deletions(-) New commits: commit 1f969657a64abc14cb8d1a5428a4da519d7cf6d8 Author: Noel Grandin AuthorDate: Fri Oct 5 11:06:43 2018 +0200 Commit: Noel Grandin CommitDate: Sat Oct 6 12:33:17 2018 +0200 use more std::unique_ptr in ScUndoMoveTab and ScUndoCopyTab Change-Id: Id69d87369d2a73b00e4ed6159047eef3135722e1 Reviewed-on: https://gerrit.libreoffice.org/61432 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/sc/source/ui/docshell/docsh5.cxx b/sc/source/ui/docshell/docsh5.cxx index 58a9ead66043..79710f264618 100644 --- a/sc/source/ui/docshell/docsh5.cxx +++ b/sc/source/ui/docshell/docsh5.cxx @@ -937,7 +937,7 @@ bool ScDocShell::MoveTable( SCTAB nSrcTab, SCTAB nDestTab, bool bCopy, bool bRec unique_ptr< vector > pSrcList(new vector(1, nSrcTab)); unique_ptr< vector > pDestList(new vector(1, nDestTab)); GetUndoManager()->AddUndoAction( -new ScUndoCopyTab(this, pSrcList.release(), pDestList.release())); +new ScUndoCopyTab(this, std::move(pSrcList), std::move(pDestList))); } bool bVbaEnabled = m_aDocument.IsInVBAMode(); @@ -1004,7 +1004,7 @@ bool ScDocShell::MoveTable( SCTAB nSrcTab, SCTAB nDestTab, bool bCopy, bool bRec unique_ptr< vector > pSrcList(new vector(1, nSrcTab)); unique_ptr< vector > pDestList(new vector(1, nDestTab)); GetUndoManager()->AddUndoAction( -new ScUndoMoveTab(this, pSrcList.release(), pDestList.release())); +new ScUndoMoveTab(this, std::move(pSrcList), std::move(pDestList))); } Broadcast( ScTablesHint( SC_TAB_MOVED, nSrcTab, nDestTab ) ); diff --git a/sc/source/ui/inc/undotab.hxx b/sc/source/ui/inc/undotab.hxx index 468e70d84c1d..31866fb6a9cc 100644 --- a/sc/source/ui/inc/undotab.hxx +++ b/sc/source/ui/inc/undotab.hxx @@ -146,10 +146,10 @@ class ScUndoMoveTab: public ScSimpleUndo public: ScUndoMoveTab( ScDocShell* pNewDocShell, -::std::vector* pOldTabs, -::std::vector* pNewTabs, -::std::vector< OUString>* pOldNames = nullptr, -::std::vector< OUString>* pNewNames = nullptr ); +std::unique_ptr> pOldTabs, +std::unique_ptr> pNewTabs, +std::unique_ptr> pOldNames = nullptr, +std::unique_ptr> pNewNames = nullptr ); virtual ~ScUndoMoveTab() override; @@ -161,10 +161,10 @@ public: virtual OUString GetComment() const override; private: -std::shared_ptr< ::std::vector > mpOldTabs; -std::shared_ptr< ::std::vector > mpNewTabs; -std::shared_ptr< ::std::vector< OUString> > mpOldNames; -std::shared_ptr< ::std::vector< OUString> > mpNewNames; +std::unique_ptr< ::std::vector > mpOldTabs; +std::unique_ptr< ::std::vector > mpNewTabs; +std::unique_ptr< ::std::vector< OUString> > mpOldNames; +std::unique_ptr< ::std::vector< OUString> > mpNewNames; void DoChange( bool bUndo ) const; }; @@ -174,9 +174,9 @@ class ScUndoCopyTab: public ScSimpleUndo public: ScUndoCopyTab( ScDocShell* pNewDocShell, -::std::vector* pOldTabs, -::std::vector* pNewTabs, -::std::vector< OUString>* pNewNames = nullptr ); +std::unique_ptr> pOldTabs, +std::unique_ptr> pNewTabs, +std::unique_ptr> pNewNames = nullptr ); virtual ~ScUndoCopyTab() override; @@ -188,9 +188,9 @@ public: virtual OUString GetComment() const override; private: -std::shared_ptr< ::std::vector > mpOldTabs; -std::shared_ptr< ::std::vector > mpNewTabs; -std::shared_ptr< ::std::vector< OUString> > mpNewNames; +std::unique_ptr< ::std::vector > mpOldTabs; +std::unique_ptr< ::std::vector > mpNewTabs; +std::unique_ptr< ::std::vector< OUString> > mpNewNames; std::unique_ptr pDrawUndo; void DoChange() const; diff --git a/sc/source/ui/undo/undotab.cxx b/sc/source/ui/undo/undotab.cxx index 0cef12f8bd5e..aff057b84354 100644 --- a/sc/source/ui/undo/undotab.cxx +++ b/sc/source/ui/undo/undotab.cxx @@ -462,19 +462,16 @@ bool ScUndoRenameTab::CanRepeat(SfxRepeatTarget& /* rTarget */) const } ScUndoMoveTab::ScUndoMoveTab( -ScDocShell* pNewDocShell, vector* pOldTabs, vector* pNewTabs, -vector* pOldNames, vector* pNewNames) : +ScDocShell* pNewDocShell, std::unique_ptr> pOldT
Re: CppunitTest_sc_filters_test now failing on Jenkins_MacOSX
attempted fix on its way with https://gerrit.libreoffice.org/61464 no idea what std::vector is doing to make this unreliable on macOS only ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice
[Libreoffice-commits] core.git: compilerplugins/clang
compilerplugins/clang/useuniqueptr.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 54d82085ccf1ad5f7c2a9b92ffa23db6725640af Author: Andrea Gelmini AuthorDate: Sat Oct 6 11:40:13 2018 +0200 Commit: Julien Nabet CommitDate: Sat Oct 6 12:15:01 2018 +0200 Fix typo Change-Id: I822fa325d37955583a21e4d7ce2e79a4d5b02fc5 Reviewed-on: https://gerrit.libreoffice.org/61462 Reviewed-by: Julien Nabet Tested-by: Julien Nabet diff --git a/compilerplugins/clang/useuniqueptr.cxx b/compilerplugins/clang/useuniqueptr.cxx index 72f74aa445a9..c416d4be9ad1 100644 --- a/compilerplugins/clang/useuniqueptr.cxx +++ b/compilerplugins/clang/useuniqueptr.cxx @@ -603,7 +603,7 @@ void UseUniquePtr::CheckLoopDelete(const FunctionDecl* functionDecl, const CXXDe // SdrUndo stuff if (fn == SRCDIR "/svx/source/svdraw/svdundo.cxx") return; -// TODO the lazydelete stuff should probably just be ripped out altogether nowthat we have VclPtr +// TODO the lazydelete stuff should probably just be ripped out altogether now that we have VclPtr if (fn == SRCDIR "/vcl/source/helper/lazydelete.cxx") return; // linked list ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: solenv/clang-format vcl/headless vcl/inc vcl/Library_vcl.mk vcl/Library_vclplug_gen.mk vcl/qt5 vcl/unx
solenv/clang-format/blacklist |3 vcl/Library_vcl.mk |2 vcl/Library_vclplug_gen.mk |1 vcl/headless/svpgdi.cxx |8 ++ vcl/headless/svpglyphcache.cxx | 62 vcl/inc/qt5/Qt5Data.hxx |1 vcl/inc/unx/gendata.hxx | 73 +-- vcl/inc/unx/glyphcache.hxx |2 vcl/inc/unx/x11/xrender_peer.hxx|6 - vcl/qt5/Qt5Data.cxx |1 vcl/unx/generic/app/gendata.cxx | 29 +-- vcl/unx/generic/app/saldisp.cxx | 25 ++ vcl/unx/generic/fontmanager/fontmanager.cxx | 20 - vcl/unx/generic/gdi/gcach_xpeer.cxx | 104 vcl/unx/generic/gdi/gdiimpl.cxx |2 vcl/unx/generic/gdi/salgdi.cxx |2 vcl/unx/generic/gdi/salgdi2.cxx |2 vcl/unx/generic/gdi/x11cairotextrender.cxx |4 - vcl/unx/generic/gdi/xrender_peer.cxx|2 vcl/unx/generic/glyphs/glyphcache.cxx |9 +- 20 files changed, 119 insertions(+), 239 deletions(-) New commits: commit 8fdb37119f6db7f7fa5af1644e15347f17e5968e Author: Jan-Marek Glogowski AuthorDate: Fri Oct 5 10:25:43 2018 + Commit: Jan-Marek Glogowski CommitDate: Sat Oct 6 12:06:30 2018 +0200 Add GlyphCache instance to GenericUnixSalData This gets rid of some statics and drops some duplicate code: - the X11 based GlyphCache => gone - the svp version of the GlyphCache => gone - the "normal" GlyphCache - the PrintFontManager And while at it move the implementation into its own file gendata.cxx. Change-Id: I9063139c9482f5f37285505f389cf5f32c02426b Reviewed-on: https://gerrit.libreoffice.org/61454 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski diff --git a/solenv/clang-format/blacklist b/solenv/clang-format/blacklist index 30f9befd1586..22ca1d639ca1 100644 --- a/solenv/clang-format/blacklist +++ b/solenv/clang-format/blacklist @@ -17641,7 +17641,6 @@ vcl/inc/unx/desktops.hxx vcl/inc/unx/fc_fontoptions.hxx vcl/inc/unx/fontmanager.hxx vcl/inc/unx/freetype_glyphcache.hxx -vcl/inc/unx/gendata.hxx vcl/inc/unx/gendisp.hxx vcl/inc/unx/geninst.h vcl/inc/unx/genprn.h @@ -17691,6 +17690,7 @@ vcl/inc/unx/wmadaptor.hxx vcl/inc/unx/x11/x11gdiimpl.h vcl/inc/unx/x11/x11sys.hxx vcl/inc/unx/x11/xlimits.hxx +vcl/inc/unx/x11/xrender_peer.hxx vcl/inc/unx/x11_cursors/ase_curs.h vcl/inc/unx/x11_cursors/ase_mask.h vcl/inc/unx/x11_cursors/asn_curs.h @@ -18319,7 +18319,6 @@ vcl/unx/generic/gdi/salvd.cxx vcl/unx/generic/gdi/x11cairotextrender.cxx vcl/unx/generic/gdi/x11cairotextrender.hxx vcl/unx/generic/gdi/xrender_peer.cxx -vcl/unx/generic/gdi/xrender_peer.hxx vcl/unx/generic/glyphs/freetype_glyphcache.cxx vcl/unx/generic/glyphs/glyphcache.cxx vcl/unx/generic/print/bitmap_gfx.cxx diff --git a/vcl/Library_vcl.mk b/vcl/Library_vcl.mk index e75ff64b2b34..ca04103ac8cc 100644 --- a/vcl/Library_vcl.mk +++ b/vcl/Library_vcl.mk @@ -454,7 +454,7 @@ vcl_headless_code= \ vcl_headless_freetype_code=\ vcl/headless/svpprn \ vcl/headless/svptext \ -vcl/headless/svpglyphcache \ +vcl/unx/generic/app/gendata \ vcl/unx/generic/gdi/cairotextrender \ vcl/unx/generic/glyphs/freetype_glyphcache \ vcl/unx/generic/glyphs/glyphcache \ diff --git a/vcl/Library_vclplug_gen.mk b/vcl/Library_vclplug_gen.mk index 0e1c39c15766..328b259bf05a 100644 --- a/vcl/Library_vclplug_gen.mk +++ b/vcl/Library_vclplug_gen.mk @@ -92,7 +92,6 @@ $(eval $(call gb_Library_add_exception_objects,vclplug_gen,\ vcl/unx/generic/dtrans/X11_transferable \ vcl/unx/generic/gdi/cairo_xlib_cairo \ vcl/unx/generic/gdi/x11cairotextrender \ -vcl/unx/generic/gdi/gcach_xpeer \ vcl/unx/generic/gdi/gdiimpl \ vcl/unx/generic/gdi/openglx11cairotextrender \ vcl/unx/generic/gdi/salbmp \ diff --git a/vcl/headless/svpgdi.cxx b/vcl/headless/svpgdi.cxx index e12c7a32c8bd..b1f622904b5f 100644 --- a/vcl/headless/svpgdi.cxx +++ b/vcl/headless/svpgdi.cxx @@ -38,6 +38,7 @@ #include #include #include +#include #if ENABLE_CAIRO_CANVAS # if defined CAIRO_VERSION && CAIRO_VERSION < CAIRO_VERSION_ENCODE(1, 10, 0) @@ -2109,4 +2110,11 @@ bool SvpSalGraphics::supportsOperation(OutDevSupportType eType) const return false; } +GlyphCache& SvpSalGraphics::getPlatformGlyphCache() +{ +GenericUnixSalData* const pSalData(GetGenericUnixSalData()); +assert(pSalData); +return *pSalData->GetGlyphCache(); +} + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/vcl/headless/svpglyphcache.cxx b/vcl/headless/svpglyphcache.cxx deleted file mode 100644 index c303cb86b164.. --- a/vcl/headless/svpglyphcache.cxx +++ /dev/null @@ -1,62 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -
[Libreoffice-commits] core.git: vcl/inc vcl/unx
vcl/inc/unx/freetype_glyphcache.hxx| 20 -- vcl/inc/unx/glyphcache.hxx |9 -- vcl/unx/generic/glyphs/freetype_glyphcache.cxx | 35 +++-- vcl/unx/generic/glyphs/glyphcache.cxx | 33 +-- 4 files changed, 24 insertions(+), 73 deletions(-) New commits: commit ede39d78282484650796456327a35a879a475cef Author: Jan-Marek Glogowski AuthorDate: Fri Oct 5 08:25:40 2018 + Commit: Jan-Marek Glogowski CommitDate: Sat Oct 6 12:04:40 2018 +0200 UNX merge FreetypeManager into GlyphCache Change-Id: I736cc60af6d0c91623a25843bd9ff8fcdd9e8e90 Reviewed-on: https://gerrit.libreoffice.org/61453 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski diff --git a/vcl/inc/unx/freetype_glyphcache.hxx b/vcl/inc/unx/freetype_glyphcache.hxx index 3e27aa6592ad..3a6a64fb929e 100644 --- a/vcl/inc/unx/freetype_glyphcache.hxx +++ b/vcl/inc/unx/freetype_glyphcache.hxx @@ -86,26 +86,6 @@ private: FontCharMapRef mxFontCharMap; }; -class FreetypeManager -{ -public: -FreetypeManager(); -~FreetypeManager(); - -voidAddFontFile( const OString& rNormalizedName, -int nFaceNum, sal_IntPtr nFontId, const FontAttributes&); -voidAnnounceFonts( PhysicalFontCollection* ) const; -voidClearFontList(); - -FreetypeFont* CreateFont(LogicalFontInstance* pLogicalFont); - -private: -typedef std::unordered_map> FontList; -FontListmaFontList; - -sal_IntPtr mnMaxFontId; -}; - class FreetypeFontFace : public PhysicalFontFace { private: diff --git a/vcl/inc/unx/glyphcache.hxx b/vcl/inc/unx/glyphcache.hxx index 9d0be13e3a6d..561029b67bbd 100644 --- a/vcl/inc/unx/glyphcache.hxx +++ b/vcl/inc/unx/glyphcache.hxx @@ -38,7 +38,7 @@ #include -class FreetypeManager; +class FreetypeFont; class FreetypeFontInstance; class FreetypeFontInfo; class GlyphData; @@ -68,7 +68,6 @@ public: FreetypeFont* CacheFont(LogicalFontInstance* pFontInstance); voidUncacheFont( FreetypeFont& ); voidClearFontCache(); -voidInvalidateAllGlyphs(); voidClearFontOptions(); private: @@ -79,13 +78,16 @@ private: voidUsingGlyph( GlyphData const & ); private: +voidInitFreetype(); voidGarbageCollect(); +FreetypeFont* CreateFont(LogicalFontInstance* pLogicalFont); // the GlyphCache's FontList matches a font request to a serverfont instance // the FontList key's mpFontData member is reinterpreted as integer font id struct IFSD_Equal{ bool operator()( const rtl::Reference&, const rtl::Reference& ) const; }; struct IFSD_Hash{ size_t operator()( const rtl::Reference& ) const; }; typedef std::unordered_map,std::unique_ptr,IFSD_Hash,IFSD_Equal > FontList; +typedef std::unordered_map> FontInfoList; FontListmaFontList; static constexpr sal_uLong gnMaxSize = 150; // max overall cache size in bytes @@ -94,7 +96,8 @@ private: mutable int mnGlyphCount; FreetypeFont* mpCurrentGCFont; -std::unique_ptr mpFtManager; +FontInfoListm_aFontInfoList; +sal_IntPtr m_nMaxFontId; }; class GlyphData diff --git a/vcl/unx/generic/glyphs/freetype_glyphcache.cxx b/vcl/unx/generic/glyphs/freetype_glyphcache.cxx index 4a65c2b4b6b4..cfc91deb07e0 100644 --- a/vcl/unx/generic/glyphs/freetype_glyphcache.cxx +++ b/vcl/unx/generic/glyphs/freetype_glyphcache.cxx @@ -86,8 +86,6 @@ static int nDefaultPrioEmbedded= 2; static int nDefaultPrioAutoHint= 1; static int nDefaultPrioAntiAlias = 1; -// FreetypeManager - FreetypeFontFile::FreetypeFontFile( const OString& rNativeFileName ) : maNativeFileName( rNativeFileName ), mpFileMap( nullptr ), @@ -260,8 +258,7 @@ void FreetypeFontInfo::AnnounceFont( PhysicalFontCollection* pFontCollection ) pFontCollection->Add( pFD ); } -FreetypeManager::FreetypeManager() -: mnMaxFontId( 0 ) +void GlyphCache::InitFreetype() { /*FT_Error rcFT =*/ FT_Init_FreeType( &aLibFT ); @@ -291,42 +288,32 @@ FT_Face FreetypeFont::GetFtFace() const return maFaceFT; } -FreetypeManager::~FreetypeManager() -{ -ClearFontList(); -} - -void FreetypeManager::AddFontFile( const OString& rNormalizedName, +void GlyphCache::AddFontFile( const OString& rNormalizedName, int nFaceNum, sal_IntPtr nFontId, const FontAttributes& rDevFontAttr) { if( rNormalizedName.isEmpty() ) return; -if( maFontList.find( nFontId ) != maFontList.end() ) +if( m_aFontInfoList.find( nFontId ) != m_aFontInfoList.end() ) return; FreetypeFontInfo* pFontInfo = new FreetypeFontInfo( rDevFo
[Libreoffice-commits] core.git: sd/qa sw/qa
sd/qa/unit/export-tests-ooxml2.cxx |2 +- sw/qa/core/macros-test.cxx |2 +- 2 files changed, 2 insertions(+), 2 deletions(-) New commits: commit 2b3bd14c566e97044b50bb81d8d61bc6bb0fd37b Author: Jan-Marek Glogowski AuthorDate: Fri Oct 5 23:00:44 2018 + Commit: Jan-Marek Glogowski CommitDate: Sat Oct 6 10:37:57 2018 +0200 Quieten compiler warning Change-Id: I96d66d09a911d393e7f618e539b9eab5c3d740f9 Reviewed-on: https://gerrit.libreoffice.org/61450 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski diff --git a/sd/qa/unit/export-tests-ooxml2.cxx b/sd/qa/unit/export-tests-ooxml2.cxx index 046c9f0734a2..116663fd2d57 100644 --- a/sd/qa/unit/export-tests-ooxml2.cxx +++ b/sd/qa/unit/export-tests-ooxml2.cxx @@ -1889,7 +1889,7 @@ static inline double getAdjustmentValue( uno::Reference& xS if (aIterator != aGeomPropVec.end()) { uno::Sequence aAdjustment; -double fResult; +double fResult = 0.0; aIterator->Value >>= aAdjustment; aAdjustment[0].Value >>= fResult; return fResult; diff --git a/sw/qa/core/macros-test.cxx b/sw/qa/core/macros-test.cxx index 2f9f8beff3c8..ac00e300fc59 100644 --- a/sw/qa/core/macros-test.cxx +++ b/sw/qa/core/macros-test.cxx @@ -594,7 +594,7 @@ void SwMacrosTest::setUp() // which is a private symbol to us, gets called m_xWriterComponent = getMultiServiceFactory()->createInstance("com.sun.star.comp.Writer.TextDocument"); -CPPUNIT_ASSERT_MESSAGE("no calc component!", m_xWriterComponent.is()); +CPPUNIT_ASSERT_MESSAGE("no writer component!", m_xWriterComponent.is()); mxDesktop = css::frame::Desktop::create( comphelper::getComponentContext(getMultiServiceFactory()) ); } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: vcl/inc vcl/win
vcl/inc/win/saldata.hxx |4 ++-- vcl/inc/win/winlayout.hxx | 37 +++-- vcl/win/gdi/winlayout.cxx | 16 3 files changed, 29 insertions(+), 28 deletions(-) New commits: commit 7d8a756164dda3b5b08eef68a2925fa4704c33ab Author: Jan-Marek Glogowski AuthorDate: Fri Oct 5 09:41:32 2018 + Commit: Jan-Marek Glogowski CommitDate: Sat Oct 6 10:06:44 2018 +0200 WIN rename GlyphCache to OpenGLGlyphCache The Windows-backend based GlyphCache is OpenGL specific, so reflect that by renaming it. Change-Id: I1034bfde14792f0b6a807f8e938742556a31fcfb Reviewed-on: https://gerrit.libreoffice.org/61452 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski diff --git a/vcl/inc/win/saldata.hxx b/vcl/inc/win/saldata.hxx index ae43b12af4ab..d036ffb30a23 100644 --- a/vcl/inc/win/saldata.hxx +++ b/vcl/inc/win/saldata.hxx @@ -38,7 +38,7 @@ class WinSalFrame; class WinSalVirtualDevice; class WinSalPrinter; namespace vcl { class Font; } -struct GlobalGlyphCache; +struct GlobalOpenGLGlyphCache; struct HDCCache; struct TempFontItem; class TextOutRenderer; @@ -121,7 +121,7 @@ public: std::unique_ptr m_pD2DWriteTextOutRenderer; // tdf#107205 need 2 instances because D2DWrite can't rotate text std::unique_ptr m_pExTextOutRenderer; -std::unique_ptr m_pGlobalGlyphCache; +std::unique_ptr m_pGlobalOpenGLGlyphCache; std::unique_ptr m_pTextureCache; }; diff --git a/vcl/inc/win/winlayout.hxx b/vcl/inc/win/winlayout.hxx index b08a5d0ab78f..036c1d3bcbbd 100644 --- a/vcl/inc/win/winlayout.hxx +++ b/vcl/inc/win/winlayout.hxx @@ -58,48 +58,48 @@ struct OpenGLGlyphDrawElement } }; -class GlyphCache; +class OpenGLGlyphCache; -struct GlobalGlyphCache +struct GlobalOpenGLGlyphCache { -GlobalGlyphCache() +GlobalOpenGLGlyphCache() : maPackedTextureAtlas(2048, 2048) {} PackedTextureAtlasManager maPackedTextureAtlas; -std::unordered_set maGlyphCaches; +std::unordered_set maOpenGLGlyphCaches; -static GlobalGlyphCache * get(); +static GlobalOpenGLGlyphCache * get(); }; -class GlyphCache +class OpenGLGlyphCache { private: std::unordered_map maOpenGLTextureCache; public: -GlyphCache() +OpenGLGlyphCache() { -GlobalGlyphCache::get()->maGlyphCaches.insert(this); +GlobalOpenGLGlyphCache::get()->maOpenGLGlyphCaches.insert(this); } -~GlyphCache() +~OpenGLGlyphCache() { -GlobalGlyphCache::get()->maGlyphCaches.erase(this); +GlobalOpenGLGlyphCache::get()->maOpenGLGlyphCaches.erase(this); } static bool ReserveTextureSpace(OpenGLGlyphDrawElement& rElement, int nWidth, int nHeight) { -GlobalGlyphCache* pGlobalGlyphCache = GlobalGlyphCache::get(); -rElement.maTexture = pGlobalGlyphCache->maPackedTextureAtlas.Reserve(nWidth, nHeight); +GlobalOpenGLGlyphCache* pGlobalOpenGLGlyphCache = GlobalOpenGLGlyphCache::get(); +rElement.maTexture = pGlobalOpenGLGlyphCache->maPackedTextureAtlas.Reserve(nWidth, nHeight); if (!rElement.maTexture) return false; -std::vector aTextureIDs = pGlobalGlyphCache->maPackedTextureAtlas.ReduceTextureNumber(8); +std::vector aTextureIDs = pGlobalOpenGLGlyphCache->maPackedTextureAtlas.ReduceTextureNumber(8); if (!aTextureIDs.empty()) { -for (auto& pGlyphCache: pGlobalGlyphCache->maGlyphCaches) +for (auto& pOpenGLGlyphCache: pGlobalOpenGLGlyphCache->maOpenGLGlyphCaches) { -pGlyphCache->RemoveTextures(aTextureIDs); +pOpenGLGlyphCache->RemoveTextures(aTextureIDs); } } return true; @@ -150,8 +150,6 @@ class WinFontInstance : public LogicalFontInstance public: virtual ~WinFontInstance() override; -bool CacheGlyphToAtlas(HDC hDC, HFONT hFont, int nGlyphIndex, SalGraphics& rGraphics); -GlyphCache& GetGlyphCache() { return maGlyphCache; } bool hasHScale() const; void SetGraphics(WinSalGraphics*); @@ -166,6 +164,9 @@ public: const WinFontFace * GetFontFace() const { return static_cast(LogicalFontInstance::GetFontFace()); } +bool CacheGlyphToAtlas(HDC hDC, HFONT hFont, int nGlyphIndex, SalGraphics& rGraphics); +OpenGLGlyphCache& GetOpenGLGlyphCache() { return maOpenGLGlyphCache; } + private: explicit WinFontInstance(const WinFontFace&, const FontSelectPattern&); @@ -174,7 +175,7 @@ private: WinSalGraphics *m_pGraphics; HFONT m_hFont; float m_fScale; -GlyphCache maGlyphCache; +OpenGLGlyphCache maOpenGLGlyphCache; }; class TextOutRenderer diff --git a/vcl/win/gdi/winlayout.cxx b/vcl/win/gdi/winlayout.cxx index 84cc3600de3b..35303fc5c8a5 100644 --- a/vcl/win/gdi/winlayout.cxx +++ b/vcl/win/gdi/winlayout.cxx @@ -48,12 +48,12 @@ #include #include -GlobalGlyphCache * GlobalGlyphCache::get() { +Global
[Libreoffice-commits] core.git: android/source
android/source/res/values/arrays.xml | 22 +- android/source/res/values/strings.xml | 14 ++ android/source/res/xml/libreoffice_preferences.xml | 14 +++--- android/source/src/java/org/libreoffice/FormattingController.java |8 +-- android/source/src/java/org/libreoffice/LibreOfficeMainActivity.java | 20 - android/source/src/java/org/libreoffice/UNOCommandsController.java |2 android/source/src/java/org/libreoffice/storage/external/DirectoryBrowserFragment.java |2 7 files changed, 49 insertions(+), 33 deletions(-) New commits: commit 897b393ee516f1d731996ac9058edb828d1f8caf Author: Mert Tumer AuthorDate: Tue Sep 18 15:56:39 2018 +0300 Commit: Tomaž Vajngerl CommitDate: Sat Oct 6 09:27:33 2018 +0200 Extract hardcoded strings to string resource file on Android Viewer Change-Id: Ie2276ac162062e7365c9605f98fe03e5011ba6cb Signed-off-by: Mert Tumer Reviewed-on: https://gerrit.libreoffice.org/60688 Reviewed-by: Tomaž Vajngerl Tested-by: Tomaž Vajngerl diff --git a/android/source/res/values/arrays.xml b/android/source/res/values/arrays.xml index 671424bfd13b..f2326764aa76 100644 --- a/android/source/res/values/arrays.xml +++ b/android/source/res/values/arrays.xml @@ -30,19 +30,19 @@ 1 -Everything -Documents -Spreadsheets -Presentations -Drawings +@string/filter_everything +@string/filter_documents +@string/filter_spreadsheets +@string/filter_presentations +@string/filter_drawings -A-Z -Z-A -Oldest First -Newest First -Largest First -Smallest First +@string/sort_az +@string/sort_za +@string/sort_oldest +@string/sort_newest +@string/sort_largest +@string/sort_smallest diff --git a/android/source/res/values/strings.xml b/android/source/res/values/strings.xml index 17e52316bdb4..457d10b40af8 100644 --- a/android/source/res/values/strings.xml +++ b/android/source/res/values/strings.xml @@ -211,4 +211,18 @@ Parent Value Export To PDF Print +Character +Paragraph +Insert +Style +OK +Cancel +Unable to go further. +Current UNO command +Select how to order files: A-Z, by size or by date. +View files as a grid or in a list. +File explorer layout +File Order +Default File Filter +Set which file filter should be used by default. diff --git a/android/source/res/xml/libreoffice_preferences.xml b/android/source/res/xml/libreoffice_preferences.xml index 2b3d9dde2f57..3bc04d769278 100644 --- a/android/source/res/xml/libreoffice_preferences.xml +++ b/android/source/res/xml/libreoffice_preferences.xml @@ -4,22 +4,24 @@ android:title="@string/pref_category_explorer" android:key="PREF_CATEGORY_EXPLORER"> +android:title="@string/pref_sort_title" +android:entries="@array/SortModeNames" +android:entryValues="@array/SortModeStringValues"/> +android:summary="@string/pref_viewmode_summary" /> https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits