summaryrefslogtreecommitdiff
path: root/sd
AgeCommit message (Collapse)Author
2022-12-05sd: Don't replace table styles on page pastingMaxim Monastirsky
i.e. insert a table, and set its style to anything except default. Then right click on the page in the page pane => Copy. Right click again => Paste. The table on the first page will reset to the default table style. The problem is in SdStyleSheetPool::CopyTableStyles which attempts to replace existing styles with the pasted ones, causing the old ones to be destroyed. But in fact there's absolutely no case where we want to do anything like this. All we want is to keep the formatting of the pasted page, not to change existing styles which might be used in the rest of the document. (And if the pasted style has indeed a different formatting, it can be inserted under a different name. To be handled in a follow-up commit.) Change-Id: I7caaffc72265bb045bf21c831f2da27012e41845 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143644 Tested-by: Jenkins Reviewed-by: Maxim Monastirsky <momonasmon@gmail.com>
2022-12-05Simplify SdStyleSheetPool::CopyTableStyles a bitMaxim Monastirsky
Change-Id: Ib8bbc8f71b310c1b968f36a94e99cce6019dd6cc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143643 Tested-by: Jenkins Reviewed-by: Maxim Monastirsky <momonasmon@gmail.com>
2022-12-04cid#1517258 Dereference null return valueCaolán McNamara
Change-Id: Id8318fa1ae327f53fab61c2d3f5a73fa084771bd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143634 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-12-04cid#1517253 Dereference null return valueCaolán McNamara
Change-Id: I222dd5c220de7f0775aa2966bc36c73952605ddc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143633 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-12-04cid#1517255 Dereference null return valueCaolán McNamara
Change-Id: Idb1a7790851a3416f84e99c7fd95e12e18b449f8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143632 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-12-01ofz#53873 AbrtCaolán McNamara
Change-Id: Iff720fb92f6b385003d328b73e8ebe09da3650f3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143531 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-12-01sd: check files are loaded without any warning errorXisco Fauli
Change-Id: I76b4d657ab3c5606b137ab745f789156dfb9af44 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143523 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2022-12-01sd: sensible naming for created cell stylesMaxim Monastirsky
Instead of "user1", "user2" etc. now we have <table-style-name>-<cell-role> e.g. magenta-dark-first-row, which makes them a lot easier to identify. Change-Id: I2db5e20f5f1d46d14034acb15b0f95c58a3f7611 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143514 Tested-by: Jenkins Reviewed-by: Maxim Monastirsky <momonasmon@gmail.com>
2022-11-30CppunitTest_sd_uiimpress: fix assertsXisco Fauli
we want to check the number of shapes, not the number of pages Change-Id: If83a9be71bc796ae0cb5fe005780a78428ade9f5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143485 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2022-11-29tdf#152186 PPTX export: fix shadow of the shape in themeTibor Nagy
Placeholder line styles defined extra effectStyle, resulting bad export with shadows. Follow-up to commit 25e9766e9b87342b6f1b29dc146d5f33e12157a7 (tdf#92222 PPTX export: fix line width of the shape in theme) Change-Id: I02f1edea84b50dbb9b0e0a59b6062a29894afde4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143233 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
2022-11-29New loplugin:crosscastStephan Bergmann
...inspired by 2fa426da15a12e2a63554247e3c1c3f8c0ec5c24 "Fix dynamic_cast after splitting OutputDevice and vcl::Window class hierarchies": "Find uses of dynamic_cast that cast between unrelated classes, which is suspicious and might indicate a bug. The heuristic used to consider two classes unrelated is that neither derives from the other (directly or indirectly) and they do not both virtually derive (directly or indirectly) from a common third class. Additionally, class definitions can be attributed with SAL_LOPLUGIN_ANNOTATE("crosscast") (from sal/types.h) to suppress false warnings about known-good cases casting from or to such a class." (quoting compilerplugins/clang/crosscast.cxx) This found two additional errors, 7a82ea5c79adee70eddf74ac53347544766a91b0 "Fix presumed typo" and fc6aa9e49973c845915754caf765ff57e5b0cd59 "fix assert", and one still-open case that looks like an error, see the TODO comment in sw/source/core/unocore/unodraw.cxx. In addition to that it flagged another 102 uses of dynamic_cast as suspicious, which have all been addressed, at least for now, by marking certain classes as SAL_LOPLUGIN_ANNOTATE("crosscast"), see below. (Where this commit also adds that generic SAL_LOPLUGIN_ANNOTATE mechanism to include/sal/types.h.) However, some of those annotations might benefit from further inspection and clean up similar to recent 8858962ec09478c203d43feb58f550bb36af37bb "Introduce ParagraphProeprtiesPropertyMap", 8467aa93e2038b3030e1add94e0ca6cc4ad44032 "Replace a dynamic_cast with UNO_QUERY", a534361141d69096d896e6e0552d19f3138eeeb3 "Fold OldBasicPassword into basic::SfxScriptLibraryContainer", and 589e03fb4c3b05bf3742c0cb8b366322ffdf1fa9 "[PATCH] Replace some dynamic_cast with UNO_QUERY". * canvas/source/cairo/cairo_repainttarget.hxx RepaintTarget: > canvas/source/cairo/cairo_cachedbitmap.cxx:62:34: error: suspicious dynamic cross cast from 'com::sun::star::rendering::XCanvas *' to 'RepaintTarget *' [loplugin:crosscast] > RepaintTarget* pTarget = dynamic_cast< RepaintTarget* >(rTargetCanvas.get()); * canvas/source/cairo/cairo_surfaceprovider.hxx SurfaceProvider: > canvas/source/cairo/cairo_canvashelper.cxx:301:45: error: suspicious dynamic cross cast from 'com::sun::star::rendering::XBitmap *' to 'SurfaceProvider *' [loplugin:crosscast] > SurfaceProvider* pSurfaceProvider = dynamic_cast<SurfaceProvider*>( xBitmap.get() ); * canvas/source/vcl/repainttarget.hxx RepaintTarget: > canvas/source/vcl/cachedbitmap.cxx:73:34: error: suspicious dynamic cross cast from 'com::sun::star::rendering::XCanvas *' to 'RepaintTarget *' [loplugin:crosscast] > RepaintTarget* pTarget = dynamic_cast< RepaintTarget* >(rTargetCanvas.get()); * chart2/inc/ChartModel.hxx ChartModel: > chart2/source/controller/dialogs/dlg_ChartType_UNO.cxx:82:31: error: suspicious dynamic cross cast from 'com::sun::star::awt::XWindow *' to 'ChartModel *' [loplugin:crosscast] > ChartModel* pChartModel = dynamic_cast<ChartModel*>(rParent.get()); * chart2/source/controller/inc/TabPageNotifiable.hxx TabPageNotifiable: > chart2/source/controller/dialogs/tp_RangeChooser.cxx:70:28: error: suspicious dynamic cross cast from 'weld::DialogController *' to 'TabPageNotifiable *' [loplugin:crosscast] > , m_pTabPageNotifiable(dynamic_cast<TabPageNotifiable*>(pController)) > chart2/source/controller/dialogs/tp_DataSource.cxx:171:28: error: suspicious dynamic cross cast from 'weld::DialogController *' to 'TabPageNotifiable *' [loplugin:crosscast] > , m_pTabPageNotifiable(dynamic_cast<TabPageNotifiable*>(pController)) * include/drawinglayer/primitive2d/svggradientprimitive2d.hxx SvgGradientHelper: > drawinglayer/source/primitive2d/svggradientprimitive2d.cxx:582:59: error: suspicious dynamic cross cast from 'const BasePrimitive2D *' to 'const SvgGradientHelper *' [loplugin:crosscast] > const SvgGradientHelper* pSvgGradientHelper = dynamic_cast< const SvgGradientHelper* >(&rPrimitive); > drawinglayer/source/primitive2d/svggradientprimitive2d.cxx:819:59: error: suspicious dynamic cross cast from 'const BasePrimitive2D *' to 'const SvgGradientHelper *' [loplugin:crosscast] > const SvgGradientHelper* pSvgGradientHelper = dynamic_cast< const SvgGradientHelper* >(&rPrimitive); * include/editeng/unotext.hxx SvxUnoTextRangeBase: > writerfilter/source/dmapper/DomainMapper_Impl.cxx:7645:62: error: suspicious dynamic cross cast from 'com::sun::star::text::XTextCursor *' to 'SvxUnoTextRangeBase *' [loplugin:crosscast] > SvxUnoTextRangeBase* pDrawText = dynamic_cast<SvxUnoTextRangeBase*>(xCrsr.get()); * include/embeddedobj/embeddedupdate.hxx EmbeddedUpdate: > svtools/source/misc/embedhlp.cxx:932:35: error: suspicious dynamic cross cast from 'com::sun::star::embed::XEmbeddedObject *' to 'embed::EmbeddedUpdate *' [loplugin:crosscast] > embed::EmbeddedUpdate* pObj = dynamic_cast<embed::EmbeddedUpdate*> (GetObject().get()); * include/oox/core/contexthandler2.hxx ContextHandler2Helper: > oox/source/core/contexthandler2.cxx:183:21: error: suspicious dynamic cross cast from 'const ContextHandler2Helper' to 'const ContextHandler &' [loplugin:crosscast] > ContextHandler( dynamic_cast< ContextHandler const & >( rParent ) ), * include/oox/mathml/export.hxx FormulaExportBase: > oox/source/export/shapes.cxx:2475:42: error: suspicious dynamic cross cast from 'com::sun::star::frame::XModel *' to 'oox::FormulaExportBase *' [loplugin:crosscast] > oox::FormulaExportBase *const pMagic(dynamic_cast<oox::FormulaExportBase*>(xMathModel.get())); * include/oox/mathml/import.hxx FormulaImportBase: > oox/source/drawingml/shape.cxx:1298:25: error: suspicious dynamic cross cast from 'com::sun::star::uno::XInterface *' to 'oox::FormulaImportBase *' [loplugin:crosscast] > dynamic_cast<oox::FormulaImportBase*>(xMathModel.get())); > writerfilter/source/ooxml/OOXMLFastContextHandler.cxx:2287:38: error: suspicious dynamic cross cast from 'SfxBaseModel' to 'oox::FormulaImportBase &' [loplugin:crosscast] > oox::FormulaImportBase& import = dynamic_cast<oox::FormulaImportBase&>(dynamic_cast<SfxBaseModel&>(*component)); > writerfilter/source/rtftok/rtfdocumentimpl.cxx:2973:33: error: suspicious dynamic cross cast from 'SfxBaseModel' to 'oox::FormulaImportBase &' [loplugin:crosscast] > auto& rImport = dynamic_cast<oox::FormulaImportBase&>( > writerfilter/source/dmapper/DomainMapper_Impl.cxx:3000:53: error: suspicious dynamic cross cast from 'com::sun::star::uno::XInterface *' to 'oox::FormulaImportBase *' [loplugin:crosscast] > if( oox::FormulaImportBase* formulaimport = dynamic_cast< oox::FormulaImportBase* >( xInterface.get())) * include/sfx2/Metadatable.hxx Metadatable: > sw/source/core/doc/docbm.cxx:1837:17: error: suspicious dynamic cross cast from 'const IBookmark *const' to 'const ::sfx2::Metadatable *' [loplugin:crosscast] > dynamic_cast< ::sfx2::Metadatable const* >(pBookmark)); > sw/source/core/doc/docbm.cxx:1924:13: error: suspicious dynamic cross cast from '::sw::mark::IBookmark *const' to '::sfx2::Metadatable *' [loplugin:crosscast] > dynamic_cast< ::sfx2::Metadatable* >(pBookmark)); > sw/source/core/doc/DocumentContentOperationsManager.cxx:342:21: error: suspicious dynamic cross cast from 'const sw::mark::IMark *const' to 'const ::sfx2::Metadatable *' [loplugin:crosscast] > dynamic_cast< ::sfx2::Metadatable const* >(pMark)); > sw/source/core/doc/DocumentContentOperationsManager.cxx:344:21: error: suspicious dynamic cross cast from '::sw::mark::IMark *const' to '::sfx2::Metadatable *' [loplugin:crosscast] > dynamic_cast< ::sfx2::Metadatable * >(pNewMark)); > sw/source/core/unocore/unobkm.cxx:381:12: error: suspicious dynamic cross cast from '::sw::mark::IMark *' to '::sfx2::Metadatable *' [loplugin:crosscast] > return dynamic_cast< ::sfx2::Metadatable* >(m_pImpl->m_pRegisteredBookmark); > sw/source/core/undo/rolbck.cxx:635:13: error: suspicious dynamic cross cast from 'const ::sw::mark::IBookmark *const' to 'const ::sfx2::Metadatable *' [loplugin:crosscast] > dynamic_cast< ::sfx2::Metadatable const* >(pBookmark)); > sw/source/core/undo/rolbck.cxx:713:13: error: suspicious dynamic cross cast from '::sw::mark::IBookmark *const' to '::sfx2::Metadatable *' [loplugin:crosscast] > dynamic_cast< ::sfx2::Metadatable* >(pBookmark)); * include/sfx2/digitalsignatures.hxx DigitalSignatures: > sfx2/source/doc/docfile.cxx:3999:25: error: suspicious dynamic cross cast from 'com::sun::star::security::XDocumentDigitalSignatures *' to 'sfx2::DigitalSignatures *' [loplugin:crosscast] > auto xModelSigner = dynamic_cast<sfx2::DigitalSignatures*>(xSigner.get()); * include/sfx2/sidebar/IContextChangeReceiver.hxx IContextChangeReceiver: > sfx2/source/sidebar/SidebarPanelBase.cxx:105:11: error: suspicious dynamic cross cast from 'pointer' (aka 'PanelLayout *') to 'IContextChangeReceiver *' [loplugin:crosscast] > = dynamic_cast<IContextChangeReceiver*>(mxControl.get()); * include/sfx2/sidebar/ILayoutableWindow.hxx ILayoutableWindow: > sfx2/source/sidebar/SidebarPanelBase.cxx:164:44: error: suspicious dynamic cross cast from 'pointer' (aka 'PanelLayout *') to 'ILayoutableWindow *' [loplugin:crosscast] > ILayoutableWindow* pLayoutableWindow = dynamic_cast<ILayoutableWindow*>(mxControl.get()); * include/sfx2/sidebar/SidebarModelUpdate.hxx SidebarModelUpdate: > sfx2/source/sidebar/SidebarPanelBase.cxx:189:40: error: suspicious dynamic cross cast from 'pointer' (aka 'PanelLayout *') to 'SidebarModelUpdate *' [loplugin:crosscast] > SidebarModelUpdate* pModelUpdate = dynamic_cast<SidebarModelUpdate*>(mxControl.get()); * include/sfx2/xmldump.hxx XmlDump: > svtools/source/misc/embedhlp.cxx:290:27: error: suspicious dynamic cross cast from 'com::sun::star::util::XCloseable *' to 'sfx2::XmlDump *' [loplugin:crosscast] > auto pComponent = dynamic_cast<sfx2::XmlDump*>(mxObj->getComponent().get()); * include/svl/stylesheetuser.hxx StyleSheetUser: > sd/source/core/stlsheet.cxx:294:48: error: suspicious dynamic cross cast from 'SfxListener *' to 'svl::StyleSheetUser *' [loplugin:crosscast] > const svl::StyleSheetUser* const pUser(dynamic_cast<svl::StyleSheetUser*>(pListener)); * include/svl/undo.hxx SfxRepeatTarget: > starmath/source/action.cxx:45:5: error: suspicious dynamic cross cast from 'SfxRepeatTarget' to 'SmDocShell &' [loplugin:crosscast] > dynamic_cast< SmDocShell & >(rDocSh).SetFormat(aNewFormat); * include/svx/ipolypolygoneditorcontroller.hxx IPolyPolygonEditorController: > sd/source/ui/view/drbezob.cxx:127:22: error: suspicious dynamic cross cast from 'sd::SmartTag *' to 'IPolyPolygonEditorController *' [loplugin:crosscast] > pIPPEC = dynamic_cast< IPolyPolygonEditorController* >( mpView->getSmartTags().getSelected().get() ); > sd/source/ui/view/drbezob.cxx:216:26: error: suspicious dynamic cross cast from 'sd::SmartTag *' to 'IPolyPolygonEditorController *' [loplugin:crosscast] > pIPPEC = dynamic_cast< IPolyPolygonEditorController* >( mpView->getSmartTags().getSelected().get() ); * include/vcl/IContext.hxx IContext: > vcl/source/window/builder.cxx:3650:54: error: suspicious dynamic cross cast from 'vcl::Window *' to 'vcl::IContext *' [loplugin:crosscast] > vcl::IContext* pContextControl = dynamic_cast<vcl::IContext*>(pCurrentChild.get()); * include/vcl/ITiledRenderable.hxx ITiledRenderable: > In file included from test/source/a11y/swaccessibletestbase.cxx:10: > In file included from include/test/a11y/swaccessibletestbase.hxx:22: > include/test/a11y/accessibletestbase.hxx:54:15: error: suspicious dynamic cross cast from 'com::sun::star::lang::XComponent *' to 'vcl::ITiledRenderable *' [loplugin:crosscast] > = dynamic_cast<vcl::ITiledRenderable*>(mxDocument.get()); * include/vcl/NotebookbarContextControl.hxx NotebookbarContextControl: > vcl/source/control/notebookbar.cxx:113:33: error: suspicious dynamic cross cast from 'vcl::Window *' to 'NotebookbarContextControl *' [loplugin:crosscast] > pContextContainer = dynamic_cast<NotebookbarContextControl*>(m_pUIBuilder->get<Window>(OUStringToOString(aName, RTL_TEXTENCODING_UTF8))); * include/vcl/gdimetafiletools.hxx MetafileAccessor: > vcl/source/gdi/impgraph.cxx:716:61: error: suspicious dynamic cross cast from 'drawinglayer::primitive2d::BasePrimitive2D *' to 'const MetafileAccessor *' [loplugin:crosscast] > const MetafileAccessor* pMetafileAccessor = dynamic_cast< const MetafileAccessor* >(pUnoPrimitive->getBasePrimitive2D().get()); * include/vcl/syswin.hxx VclBuilderContainer: > vcl/source/app/salvtables.cxx:7465:11: error: suspicious dynamic cross cast from 'vcl::Window *' to 'VclBuilderContainer *' [loplugin:crosscast] > = dynamic_cast<VclBuilderContainer*>(m_aOwnedToplevel.get())) * include/vcl/toolkit/field.hxx NumericFormatter: > vcl/source/window/builder.cxx:583:37: error: suspicious dynamic cross cast from 'vcl::Window *' to 'NumericFormatter *' [loplugin:crosscast] > NumericFormatter *pTarget = dynamic_cast<NumericFormatter*>(get(elem.m_sID)); * include/vcl/transfer.hxx DragSourceHelper: > svx/source/sdr/contact/sdrmediawindow.cxx:163:47: error: suspicious dynamic cross cast from 'vcl::Window *' to 'DragSourceHelper *' [loplugin:crosscast] > DragSourceHelper* pDragSourceHelper = dynamic_cast< DragSourceHelper* >( pWindow ); * include/vcl/transfer.hxx DropTargetHelper: > svx/source/sdr/contact/sdrmediawindow.cxx:126:47: error: suspicious dynamic cross cast from 'vcl::Window *' to 'DropTargetHelper *' [loplugin:crosscast] > DropTargetHelper* pDropTargetHelper = dynamic_cast< DropTargetHelper* >( pWindow ); > svx/source/sdr/contact/sdrmediawindow.cxx:145:47: error: suspicious dynamic cross cast from 'vcl::Window *' to 'DropTargetHelper *' [loplugin:crosscast] > DropTargetHelper* pDropTargetHelper = dynamic_cast< DropTargetHelper* >( pWindow ); * include/vcl/wizardmachine.hxx IWizardPageController: > vcl/source/control/wizardmachine.cxx:1274:46: error: suspicious dynamic cross cast from 'BuilderPage *' to 'IWizardPageController *' [loplugin:crosscast] > IWizardPageController* pController = dynamic_cast<IWizardPageController*>(pCurrentPage); * include/xmloff/settingsstore.hxx DocumentSettingsSerializer: > xmloff/source/draw/sdxmlimp.cxx:540:15: error: suspicious dynamic cross cast from 'com::sun::star::beans::XPropertySet *' to 'DocumentSettingsSerializer *' [loplugin:crosscast] > pFilter = dynamic_cast<DocumentSettingsSerializer *>(xProps.get()); > xmloff/source/draw/sdxmlexp.cxx:2474:41: error: suspicious dynamic cross cast from 'com::sun::star::beans::XPropertySet *' to 'DocumentSettingsSerializer *' [loplugin:crosscast] > DocumentSettingsSerializer *pFilter(dynamic_cast<DocumentSettingsSerializer *>(xProps.get())); * include/xmloff/xmlimp.hxx SvXMLImport: > sdext/source/pdfimport/sax/emitcontext.cxx:45:37: error: suspicious dynamic cross cast from 'com::sun::star::xml::sax::XDocumentHandler *' to 'SvXMLImport *' [loplugin:crosscast] > if (SvXMLImport *pFastHandler = dynamic_cast<SvXMLImport*>(m_xDocHdl.get())) > writerperfect/source/common/DocumentHandler.cxx:118:37: error: suspicious dynamic cross cast from 'com::sun::star::xml::sax::XDocumentHandler *' to 'SvXMLImport *' [loplugin:crosscast] > if (SvXMLImport* pFastHandler = dynamic_cast<SvXMLImport*>(mxHandler.get())) * reportdesign/inc/RptObject.hxx OObjectBase: > reportdesign/source/ui/report/ViewsWindow.cxx:843:53: error: suspicious dynamic cross cast from 'SdrObject *' to 'OObjectBase *' [loplugin:crosscast] > OObjectBase* pObjBase = dynamic_cast<OObjectBase*>(pObj); > reportdesign/source/core/sdr/ReportUndoFactory.cxx:30:25: error: suspicious dynamic cross cast from 'SdrObject *' to 'OObjectBase *' [loplugin:crosscast] > OObjectBase* pObj = dynamic_cast<OObjectBase*>(&rObject); > reportdesign/source/core/sdr/RptPage.cxx:62:29: error: suspicious dynamic cross cast from 'SdrObject *' to 'OObjectBase *' [loplugin:crosscast] > OObjectBase* pObj = dynamic_cast<OObjectBase*>(GetObj(i)); > reportdesign/source/core/sdr/RptPage.cxx:77:30: error: suspicious dynamic cross cast from 'SdrObject *' to 'OObjectBase *' [loplugin:crosscast] > OObjectBase* pBase = dynamic_cast<OObjectBase*>(GetObj(nPos)); > reportdesign/source/core/sdr/RptPage.cxx:116:28: error: suspicious dynamic cross cast from 'SdrObject *' to 'OObjectBase *' [loplugin:crosscast] > OObjectBase* pObject = dynamic_cast< OObjectBase* >(SdrObject::getSdrObjectFromXShape( _xObject )); > reportdesign/source/core/sdr/RptPage.cxx:184:32: error: suspicious dynamic cross cast from 'SdrObject *' to 'OObjectBase *' [loplugin:crosscast] > OObjectBase* pObjectBase = dynamic_cast< OObjectBase* >( pObj ); > reportdesign/source/core/sdr/ReportDrawPage.cxx:60:29: error: suspicious dynamic cross cast from 'SdrObject *' to 'OObjectBase *' [loplugin:crosscast] > OObjectBase* pBaseObj = dynamic_cast<OObjectBase*>(pObj); > reportdesign/source/ui/report/dlgedfunc.cxx:455:25: error: suspicious dynamic cross cast from 'SdrObject *' to 'OObjectBase *' [loplugin:crosscast] > OObjectBase* pObj = dynamic_cast<OObjectBase*>(_pOverlappedObj); > reportdesign/source/ui/report/SectionView.cxx:177:37: error: suspicious dynamic cross cast from 'SdrObject' to 'OObjectBase &' [loplugin:crosscast] > OObjectBase& rBaseObj = dynamic_cast<OObjectBase&>(*pObj); > reportdesign/source/ui/report/ReportSection.cxx:338:29: error: suspicious dynamic cross cast from 'SdrObject *' to 'OObjectBase *' [loplugin:crosscast] > OObjectBase* pObj = dynamic_cast<OObjectBase*>(pSdrObject); > reportdesign/source/ui/report/ReportSection.cxx:513:38: error: suspicious dynamic cross cast from 'SdrObject' to 'OObjectBase &' [loplugin:crosscast] > OObjectBase& rBase = dynamic_cast<OObjectBase&>(*pObject); > reportdesign/source/ui/report/ReportSection.cxx:644:33: error: suspicious dynamic cross cast from 'SdrObject *' to 'OObjectBase *' [loplugin:crosscast] > OObjectBase* pObj = dynamic_cast<OObjectBase*>(pDlgEdObj); > reportdesign/source/ui/report/ReportSection.cxx:663:35: error: suspicious dynamic cross cast from 'const SdrObject *' to 'const OObjectBase *' [loplugin:crosscast] > const OObjectBase* pObj = dynamic_cast<const OObjectBase*>(pDlgEdObj); > reportdesign/source/ui/report/propbrw.cxx:286:33: error: suspicious dynamic cross cast from 'SdrObject *' to 'OObjectBase *' [loplugin:crosscast] > OObjectBase* pObj = dynamic_cast<OObjectBase*>(pCurrent); > reportdesign/source/ui/report/ViewsWindow.cxx:843:53: error: suspicious dynamic cross cast from 'SdrObject *' to 'OObjectBase *' [loplugin:crosscast] > OObjectBase* pObjBase = dynamic_cast<OObjectBase*>(pObj); * sc/source/ui/inc/IAnyRefDialog.hxx IAnyRefDialog: > sc/source/ui/app/scmod.cxx:1607:42: error: suspicious dynamic cross cast from 'element_type *' (aka 'SfxDialogController *') to 'IAnyRefDialog *' [loplugin:crosscast] > IAnyRefDialog* pRefDlg = dynamic_cast<IAnyRefDialog*>(pChildWnd->GetController().get()); > sc/source/ui/app/scmod.cxx:1646:42: error: suspicious dynamic cross cast from 'element_type *' (aka 'SfxDialogController *') to 'IAnyRefDialog *' [loplugin:crosscast] > IAnyRefDialog* pRefDlg = dynamic_cast<IAnyRefDialog*>(pChildWnd->GetController().get()); > sc/source/ui/app/scmod.cxx:1697:42: error: suspicious dynamic cross cast from 'element_type *' (aka 'SfxDialogController *') to 'IAnyRefDialog *' [loplugin:crosscast] > IAnyRefDialog* pRefDlg = dynamic_cast<IAnyRefDialog*>(pChildWnd->GetController().get()); > sc/source/ui/app/scmod.cxx:1766:42: error: suspicious dynamic cross cast from 'element_type *' (aka 'SfxDialogController *') to 'IAnyRefDialog *' [loplugin:crosscast] > IAnyRefDialog* pRefDlg = dynamic_cast<IAnyRefDialog*>(pChildWnd->GetController().get()); > sc/source/ui/app/scmod.cxx:1813:42: error: suspicious dynamic cross cast from 'element_type *' (aka 'SfxDialogController *') to 'IAnyRefDialog *' [loplugin:crosscast] > IAnyRefDialog* pRefDlg = dynamic_cast<IAnyRefDialog*>(pChildWnd->GetController().get()); > sc/source/ui/app/scmod.cxx:1853:38: error: suspicious dynamic cross cast from 'element_type *' (aka 'SfxDialogController *') to 'IAnyRefDialog *' [loplugin:crosscast] > IAnyRefDialog* pRefDlg = dynamic_cast<IAnyRefDialog*>(pChildWnd->GetController().get()); > sc/source/ui/view/tabview3.cxx:470:30: error: suspicious dynamic cross cast from 'element_type *' (aka 'SfxDialogController *') to 'IAnyRefDialog *' [loplugin:crosscast] > IAnyRefDialog* pRefDlg = dynamic_cast<IAnyRefDialog*>(xDlgController.get()); > sc/source/ui/view/tabview3.cxx:2053:42: error: suspicious dynamic cross cast from 'element_type *' (aka 'SfxDialogController *') to 'IAnyRefDialog *' [loplugin:crosscast] > IAnyRefDialog* pRefDlg = dynamic_cast<IAnyRefDialog*>(pChildWnd->GetController().get()); > sc/source/ui/view/tabvwsh4.cxx:210:46: error: suspicious dynamic cross cast from 'element_type *' (aka 'SfxDialogController *') to 'IAnyRefDialog *' [loplugin:crosscast] > IAnyRefDialog* pRefDlg = dynamic_cast<IAnyRefDialog*>(pController.get()); * sd/source/filter/eppt/epptbase.hxx PPTExBulletProvider: > sd/source/filter/eppt/pptx-epptbase.cxx:497:74: error: suspicious dynamic cross cast from 'PPTWriterBase *' to 'PPTExBulletProvider *' [loplugin:crosscast] > maStyleSheetList.emplace_back( new PPTExStyleSheet( nDefaultTab, dynamic_cast<PPTExBulletProvider*>(this) ) ); * sdext/source/presenter/PresenterViewFactory.hxx CachablePresenterView: > sdext/source/presenter/PresenterViewFactory.cxx:218:36: error: suspicious dynamic cross cast from 'com::sun::star::drawing::framework::XResource *' to 'CachablePresenterView *' [loplugin:crosscast] > CachablePresenterView* pView = dynamic_cast<CachablePresenterView*>(rxView.get()); > sdext/source/presenter/PresenterViewFactory.cxx:274:23: error: suspicious dynamic cross cast from 'com::sun::star::drawing::framework::XView *' to 'CachablePresenterView *' [loplugin:crosscast] > = dynamic_cast<CachablePresenterView*>(iView->second.first.get()); > sdext/source/presenter/PresenterViewFactory.cxx:325:40: error: suspicious dynamic cross cast from 'com::sun::star::drawing::framework::XView *' to 'CachablePresenterView *' [loplugin:crosscast] > CachablePresenterView* pView = dynamic_cast<CachablePresenterView*>(xView.get()); * slideshow/source/inc/cursormanager.hxx CursorManager: > slideshow/source/engine/slide/userpaintoverlay.cxx:449:49: error: suspicious dynamic cross cast from 'CursorManager' to 'Slide &' [loplugin:crosscast] > dynamic_cast<Slide&>(rContext.mrCursorManager), * svx/source/inc/celltypes.hxx TableDesignUser: > svx/source/table/tabledesign.cxx:267:38: error: suspicious dynamic cross cast from 'com::sun::star::util::XModifyListener *' to 'TableDesignUser *' [loplugin:crosscast] > TableDesignUser* pUser = dynamic_cast< TableDesignUser* >( it.next().get() ); * svx/source/inc/tablemodel.hxx ICellRange: > svx/source/table/tablemodel.cxx:285:26: error: suspicious dynamic cross cast from 'com::sun::star::table::XCellRange *' to 'ICellRange *' [loplugin:crosscast] > ICellRange* pRange = dynamic_cast< ICellRange* >( rRange.get() ); * sw/inc/IDocumentUndoRedo.hxx IDocumentUndoRedo: > sw/source/uibase/shells/drwtxtsh.cxx:585:38: error: suspicious dynamic cross cast from 'SfxUndoManager *' to 'IDocumentUndoRedo *' [loplugin:crosscast] > auto* pUndoManager = dynamic_cast<IDocumentUndoRedo*>(GetUndoManager()); * sw/inc/IMark.hxx IFieldmark: > sw/source/core/doc/docbm.cxx:1415:15: error: suspicious dynamic cross cast from 'sw::mark::MarkBase *const' to 'IFieldmark *' [loplugin:crosscast] > : dynamic_cast<IFieldmark*>(*pFieldmark); > sw/source/core/doc/docbm.cxx:1437:16: error: suspicious dynamic cross cast from 'sw::mark::MarkBase *' to 'IFieldmark *' [loplugin:crosscast] > return dynamic_cast<IFieldmark*>(pFieldmark); > sw/source/core/doc/docbm.cxx:1570:37: error: suspicious dynamic cross cast from 'sw::mark::MarkBase *' to 'IFieldmark *' [loplugin:crosscast] > IFieldmark *pMark = dynamic_cast<IFieldmark*>(*aIter); * sw/inc/calbck.hxx BroadcastingModify: > sw/source/core/attr/swatrset.cxx:228:29: error: suspicious dynamic cross cast from 'const sw::BroadcastingModify *' to 'const sw::FormatDropDefiner *' [loplugin:crosscast] > auto pDropDefiner = dynamic_cast<const sw::FormatDropDefiner*>(pModify); > sw/source/core/txtnode/OnlineAccessibilityCheck.cxx:38:28: error: suspicious dynamic cross cast from 'SwNode *' to 'sw::BroadcastingModify *' [loplugin:crosscast] > auto* pBroadcast = dynamic_cast<sw::BroadcastingModify*>(m_pNode); * sw/inc/contentindex.hxx SwContentIndexReg: > sw/source/core/doc/DocumentRedlineManager.cxx:56:20: error: suspicious dynamic cross cast from 'SwNode *' to 'SwContentIndexReg *' [loplugin:crosscast] > assert(dynamic_cast<SwContentIndexReg*>(&pPos->GetNode()) * sw/source/core/inc/flowfrm.hxx SwFlowFrame: > sw/source/core/layout/frmtool.cxx:3044:35: error: suspicious dynamic cross cast from 'SwFrame *' to 'SwFlowFrame *' [loplugin:crosscast] > SwFlowFrame *pFlowFrame = dynamic_cast<SwFlowFrame*>(pSibling); * sw/source/uibase/inc/FrameControl.hxx ISwFrameControl: > sw/source/uibase/docvw/FrameControlsManager.cxx:283:15: error: suspicious dynamic cross cast from 'vcl::Window *' to 'ISwFrameControl *' [loplugin:crosscast] > mpIFace = dynamic_cast<ISwFrameControl *>( pWindow.get() ); * vcl/inc/IPrioritable.hxx IPrioritable: > vcl/source/control/NotebookbarPopup.cxx:40:37: error: suspicious dynamic cross cast from 'vcl::Window *' to 'vcl::IPrioritable *' [loplugin:crosscast] > vcl::IPrioritable* pChild = dynamic_cast<vcl::IPrioritable*>(GetChild(0)); > vcl/source/control/PriorityHBox.cxx:89:43: error: suspicious dynamic cross cast from 'vcl::Window *' to 'vcl::IPrioritable *' [loplugin:crosscast] > vcl::IPrioritable* pPrioritable = dynamic_cast<vcl::IPrioritable*>(pChild); > vcl/source/control/PriorityHBox.cxx:127:32: error: suspicious dynamic cross cast from 'vcl::IPrioritable *' to 'vcl::Window *' [loplugin:crosscast] > vcl::Window* pWindow = dynamic_cast<vcl::Window*>(pPrioritable); > vcl/source/control/PriorityHBox.cxx:142:32: error: suspicious dynamic cross cast from 'vcl::IPrioritable *' to 'vcl::Window *' [loplugin:crosscast] > vcl::Window* pWindow = dynamic_cast<vcl::Window*>(*pChildR); > vcl/source/control/PriorityHBox.cxx:186:43: error: suspicious dynamic cross cast from 'vcl::Window *' to 'vcl::IPrioritable *' [loplugin:crosscast] > vcl::IPrioritable* pPrioritable = dynamic_cast<vcl::IPrioritable*>(pChild); > vcl/source/window/NotebookBarAddonsMerger.cxx:128:19: error: suspicious dynamic cross cast from 'vcl::Window *' to 'vcl::IPrioritable *' [loplugin:crosscast] > = dynamic_cast<vcl::IPrioritable*>(pOptionalParent.get()); > ovcl/source/window/builder.cxx:3643:55: error: suspicious dynamic cross cast from 'vcl::Window *' to 'vcl::IPrioritable *' [loplugin:crosscast] > vcl::IPrioritable* pPrioritable = dynamic_cast<vcl::IPrioritable*>(pCurrentChild.get()); * vcl/inc/jsdialog/jsdialogbuilder.hxx BaseJSWidget: > vcl/jsdialog/executor.cxx:41:26: error: suspicious dynamic cross cast from 'weld::Widget *' to 'BaseJSWidget *' [loplugin:crosscast] > if (auto pJSWidget = dynamic_cast<BaseJSWidget*>(pWidget)) > vcl/jsdialog/executor.cxx:49:26: error: suspicious dynamic cross cast from 'weld::Widget *' to 'BaseJSWidget *' [loplugin:crosscast] > if (auto pJSWidget = dynamic_cast<BaseJSWidget*>(pWidget)) > vcl/jsdialog/executor.cxx:155:49: error: suspicious dynamic cross cast from 'weld::MenuButton *' to 'BaseJSWidget *' [loplugin:crosscast] > BaseJSWidget* pMenuButton = dynamic_cast<BaseJSWidget*>(pButton); * vcl/inc/unx/x11/x11gdiimpl.h X11GraphicsImpl: > vcl/unx/generic/gdi/salgdi.cxx:387:36: error: suspicious dynamic cross cast from 'pointer' (aka 'SalGraphicsImpl *') to 'X11GraphicsImpl *' [loplugin:crosscast] > if( X11GraphicsImpl* x11Impl = dynamic_cast< X11GraphicsImpl* >( mxImpl.get())) * xmlsecurity/inc/certificate.hxx Certificate: > xmlsecurity/source/helper/documentsignaturemanager.cxx:334:33: error: suspicious dynamic cross cast from 'com::sun::star::security::XCertificate *' to 'xmlsecurity::Certificate *' [loplugin:crosscast] > if (auto pCertificate = dynamic_cast<xmlsecurity::Certificate*>(xCert.get())) > xmlsecurity/source/helper/documentsignaturemanager.cxx:381:33: error: suspicious dynamic cross cast from 'com::sun::star::security::XCertificate *' to 'xmlsecurity::Certificate *' [loplugin:crosscast] > if (auto pCertificate = dynamic_cast<xmlsecurity::Certificate*>(xCert.get())) > xmlsecurity/source/component/documentdigitalsignatures.cxx:688:28: error: suspicious dynamic cross cast from 'com::sun::star::security::XCertificate *' to 'xmlsecurity::Certificate *' [loplugin:crosscast] > auto pAuthor = dynamic_cast<xmlsecurity::Certificate*>(xAuthor.get()); > xmlsecurity/source/component/documentdigitalsignatures.cxx:689:26: error: suspicious dynamic cross cast from 'com::sun::star::security::XCertificate *' to 'xmlsecurity::Certificate *' [loplugin:crosscast] > auto pCert = dynamic_cast<xmlsecurity::Certificate*>(xCert.get()); > xmlsecurity/qa/unit/signing/signing.cxx:130:29: error: suspicious dynamic cross cast from 'com::sun::star::security::XCertificate *' to 'xmlsecurity::Certificate *' [loplugin:crosscast] > auto pCertificate = dynamic_cast<xmlsecurity::Certificate*>(xCertificate.get()); Change-Id: If4f9efd8c012d0f650fe670450cf7ac0c8978036 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143458 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-11-29tdf#152152 DOCX export: fix lost WDP images in artistic effectsTünde Tóth
Handling of WDP image counter was incorrect if the document contains embedded documents, overwriting WDP images with the other ones. See also commit 55b1d635350cb76ee3e19e90c938eedd38ac3342 "tdf#152153 DOCX export: fix lost images at embedded documents" and commit cf2dc247ff5f726238856e9b46a4926a30430e14 "DOCX export: image deduplication and clean up" and commit b5f6a5cfc517ecd8aa6ba96471d854b07b92ebaa "ooxml: Do not repeat wdp files in artistic effects". Change-Id: Ia26784519f6d514ee8c90c7a91a367feeba140b5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143235 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
2022-11-29sd: remove unused includesXisco Fauli
Change-Id: Iecf41f8b09c9b0e5d411af6a4fdf84a1288e4043 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143464 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2022-11-29sd: test exporting to odg with password protectionXisco Fauli
Change-Id: I45da629f86a965dae016d4860720174b8bb7f183 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143462 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2022-11-29sd: test exporting to odp/pptx with password protectionXisco Fauli
exporting to ppt with password protection is not supported Change-Id: Ic04c0046b91b76688c947bb4ae3b3cf90046080c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143459 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2022-11-29SdModelTestBase: introduce createSdImpressDoc and createSdDrawDocXisco Fauli
it turned out shadow-blur.odg is instead a presentation file Change-Id: Ifcf3f7a76dd823bea4937927888648008ef6206d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143457 Tested-by: Xisco Fauli <xiscofauli@libreoffice.org> Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2022-11-29sd: replace hardcoded table styles with xml fileMaxim Monastirsky
Including a new set of default styles, provided by Rafael Lima. Some ui tests had to be modified, because the new borders are thicker. If you intend to edit the xml file, please keep in mind the following requirements: 1) There should be a table template called "default". It's applied to newly inserted tables. 2) There should be a cell style called "default". It's used for new table styles. 3) Please make all cell styles inherit from "default" (directly or indirectly), unless you intend to specify font names in them. "default" has its font names filled programmatically based on officecfg/registry/data/org/openoffice/VCL.xcu. 4) Whenever possible please use <style:table-cell-properties> for cell properties, instead of the incorrect <style:paragraph-properties> and <loext:graphic-properties> we currently use for export. See tdf#72238 and tdf#72239. Change-Id: I73dd4492fefb65b1870238aec7dc64f8076f6e95 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141825 Tested-by: Jenkins Reviewed-by: Maxim Monastirsky <momonasmon@gmail.com>
2022-11-28[PATCH] Replace some dynamic_cast with UNO_QUERYStephan Bergmann
Change-Id: I59ad7246cee84bd63784477e1fefda708ac35dd9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143413 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-11-28tdf#67866 sc,sd: PDF/UA export: set language in CatalogMichael Stahl
sw already does this, and it's recommended in https://www.w3.org/WAI/GL/WCAG20-TECHS/PDF16.html Change-Id: I0ce36442ec1b223c40f53fac3683ad7bb0e2bc6f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143307 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2022-11-28tdf#132293 remove unused imports from uitestBogdan B
Change-Id: I7690db426741fdc46cd2632f2db98ad75361261f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142617 Tested-by: Jenkins Reviewed-by: Kevin Suo <suokunlong@126.com>
2022-11-25SimplificationMike Kaganski
Change-Id: Ib72d4eb95879f94efad3834b1334099990e76f1b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143303 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2022-11-25sd: better detection of user defined cell stylesMaxim Monastirsky
Cell style might be used for several table roles at once, or even in several table styles (esp. after new/clone actions). But when we're editing a style, we want just a single place to be changed. The initial solution was to check if the style is user defined. The problem is that if we change the built-in styles set, then documents created with the old styles will have their once built-in styles turned into user defined. In such case we might still attempt to edit a shared style, which is unintended. So try harder, and check also that the style isn't used twice and that there is no other styles inheriting from it. Change-Id: I67d8c61b15161c9d839e97f7a31a1349a7e2613c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143288 Tested-by: Jenkins Reviewed-by: Maxim Monastirsky <momonasmon@gmail.com>
2022-11-24tdf#152069 tdf#108356 PPTX export: fix missing tile propertiesTibor Nagy
of background image patterns defined by a:tile. Note: factor "3.6" comes from EMU. Change-Id: I5da532ff9ad63fd6c236a58933a31dcd96cf5156 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142913 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
2022-11-24loplugin:unusedfields make some fields privateNoel Grandin
this is one of the secondary analyses this plugin performs Change-Id: I022b9eda994acbd25714025b666194266e896640 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143215 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-11-24Remove some unused includesMiklos Vajna
Mostly com/sun/star/frame/Desktop.hpp is unused after inheriting from UnoApiTest. Change-Id: Ifba307353a11a14e033a230a291314bee86b51c8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143190 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2022-11-23rename SetFocusedPageFromCurrentPage instead SetFocusedPageToCurrentPageCaolán McNamara
which is a bit misleading Change-Id: Ifd986c0bda8311453b17ed08d2aeab5b09665a04 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143185 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-11-23Resolves: tdf#145491 make sure focused page is selected after undo/redoCaolán McNamara
Change-Id: I269315556624c48373815640605a93c91a4c9819 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143184 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-11-23tdf#92222 PPTX export: fix line width of the shape in themeTibor Nagy
Change shape line width values of minimal office theme to the correct 0.5, 1, 1.5 pt (from 0.7, 2, 3 pt). Change-Id: Ied7ad2e29daed9130df8b8c8d8baf5342f1c75da Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142427 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
2022-11-23Fix loplugin:redundantcast check for same-type dynamic_castStephan Bergmann
...when the target type is a reference type and the source and target type have different cv qualifiers. (And fix the fallout. And make the tests cover that somewhat more exhaustively; and while at it also test that the plugin can cope with dynamic_cast to void pointers, which is the only legitimate case where a dynamic_cast can involve types that are not (pointers or references to) non-class types.) Change-Id: Ia568ddb5dbc4a84c275db172791c345d95964857 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143133 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-11-22lok: draw Math in-place widget in sdMike Kaganski
Change-Id: If874c0227ec724fa5b1517080db252e64f9597c5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143121 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2022-11-22tdf#138111: Fix apparent copy-paste error in ApiNameMap for sd style "A0"Kevin Suo
As introduced in commit 99102d4263189d347c7a7d0df8fd782e8c4c8ad5. Change-Id: Iece8595a401df7bd5a514244d4a4fc825a49f9de Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142819 Tested-by: Jenkins Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org>
2022-11-22End text edit mode before changing a table styleMaxim Monastirsky
Because we now support text attributes in styles, and their visualization will not update when in edit mode. Change-Id: I117812442b07476a84b9bd887fa2380ec4581283 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143101 Tested-by: Jenkins Reviewed-by: Maxim Monastirsky <momonasmon@gmail.com>
2022-11-22tdf#135638 svx,sd: PDF/UA export: tag SdrObject shapes as Figure etc.Armin Le Grand (allotropia)
Move the code that already exists in sd class ImplRenderPaintProc to ViewObjectContact::getPrimitive2DSequence(), where it is used by all applications, and take into account the caching there, which matters for performance. Change-Id: Iabc00b7c894f042673c7217199236a05a5d67959 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142901 Tested-by: Jenkins Reviewed-by: Armin Le Grand <Armin.Le.Grand@me.com> Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2022-11-22svg export filter: text fields not handled correctlyMarco Cecchetti
New solution for fixing text field issues: - small text field are not substituted with the right content because the placeholder text span several lines - copy of standard text fields embedded in the default master page are not substitute with the right content. Change-Id: Ifc8773f1ba41f9d0fe6f6ef3982cb64a514fcec7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143045 Reviewed-by: Andras Timar <andras.timar@collabora.com> Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143051 Tested-by: Jenkins
2022-11-22loplugin:unusedfieldsNoel Grandin
Change-Id: I4a7276ffc36b4f954fe1fa39fb5666fa184e66e1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143016 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-11-21Drop comphelper::OWeakTypeObject, use cppu::WeakImplHelper<> insteadStephan Bergmann
Change-Id: Ie4152d7736ae3f2ffdd3489cd7a444e5035d2422 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143030 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-11-21qa: remove duplicated operatorsXisco Fauli
it's already defined in include/tools/color.hxx Change-Id: I26eaba4a1279fadd8669e9702b695e02871052d9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142512 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2022-11-21sd: table design editingMaxim Monastirsky
Change-Id: I75559c80da015a13ee078bdda06f6f4975fe5946 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140943 Tested-by: Jenkins Reviewed-by: Maxim Monastirsky <momonasmon@gmail.com>
2022-11-21Export modified table stylesMaxim Monastirsky
In addition to actually used styles, we want to export user defined styles, as well as built in styles that were modified. Detecting the real modification state might be challenging in some cases, e.g. when importing the style from an existing document. So for simplicity, we consider a style as "modified" if at least one of its child cell styles is user defined. The UI for modifying cell styles will be implemented in such a way that built in styles will never be modified themselves. Instead, a user defined style will be created on the fly, with the corresponding built in style set as its parent, and only that new style will be modified. It is still possible to modify built in cell styles via the UNO API, but such styles won't be exported unless actually used in the document. Change-Id: Ic73eb460fd024f23016553e134397e07259f5c90 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143011 Tested-by: Jenkins Reviewed-by: Maxim Monastirsky <momonasmon@gmail.com>
2022-11-21Fix typoAndrea Gelmini
Change-Id: Ie1ed42bed5ff91dd39136be11bf365e737853c6c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143021 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Julien Nabet <serval2412@yahoo.fr>
2022-11-21loplugin:unusedfields start removing unused weld fieldsNoel Grandin
Change-Id: If736ff669ffe24c3dd111c26285c19fc65806a3d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142946 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-11-21tdf#149803 tdf#128150 PPTX: export UseBgFill of custom shapesTibor Nagy
Fixing tdf#128150 the UseBgFill property of shapes can be saved to PPTX, but not in the case of custom shapes. Follow-up to commits c4cf2e82e8d0aaef9b1daedc033d6edf647e5284 (tdf#128150 Add OOXML import/export for "use background fill"), commit 50394abcc36a73c0205e6cb69d925c66c25f81f2, (tdf#128150 Implement/add SlideBackgroundFill visualization") and commit 9c2c48f14535e58cad0453fef584400ee703aecc "tdf#128150 xmloff: ODF import/export of fill-use-slide-background". Change-Id: Ib88f236d2533ef71ea66718d380e83d9a0685c3e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142489 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
2022-11-21tdf#145359 related: SdNavigator dndJim Raykowski
This is an enhancement patch that provides drag and drop capability within the Navigator page object tree to allow arranging object navigation order and grouping of objects. Change-Id: I76996cd909765fb3503cf077566bec267b7705e2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142640 Tested-by: Jenkins Reviewed-by: Jim Raykowski <raykowj@gmail.com>
2022-11-19lok: masterpage: don't switch page on mode changeSzymon Kłos
Go back to the last used page when closing MasterPage. There was a bug when one user was in MasterPage mode and other switched page - then on close we opened other user page. Change-Id: I02f3b36429a62b855b215803d6684b3382228326 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142740 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Ashod Nakashian <ash@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142967 Tested-by: Jenkins Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
2022-11-19lok: masterpage: don't remove old cacheSzymon Kłos
In multi user view when switching between MasterPage and Page mode it was failing to find cache because it was removed by other views. We need that to allow invalidation after master page changed something. Change-Id: I070345b0fe6942965aece5bf729ceb37b7d99397 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142697 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Ashod Nakashian <ash@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142965 Tested-by: Jenkins Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
2022-11-19Simplify a bitMike Kaganski
Change-Id: I776259d8a79464b536fe90da8b25801d73ced9a1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142952 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2022-11-18AddWindowToPaintView -> AddDeviceToPaintViewMike Kaganski
... and likewise DeleteWindowFromPaintView -> DeleteDeviceFromPaintView because they add/delete output devices, not windows, ever since commit 53fd4bb47c53cbb62a542c847ed38238e7b3e148 (INTEGRATION: CWS sdwarningsbegone (1.42.34); FILE MERGED, Dec 12 18:19:15 2006) And use references instead of pointers, because they are dereferenced unconditionally. Change-Id: I67d5841babaec040aa5308e95f333948eb0dde2d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142945 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2022-11-18Fix dynamic_cast after splitting OutputDevice and vcl::Window class hierarchiesMike Kaganski
... in commit 9090dc1f3b27195f5defd35586ac79357992be21 (split OutputDevice from Window, May 17, 2021), which I desribed in tdf#152103. Change-Id: I07d2be9a74939ad6a65bb9537bf7390ed4fca6a2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142942 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2022-11-18rename IsStarSymbol to IsOpenSymbolCaolán McNamara
Change-Id: If525ba9826f5bc2d860233cbabf58d1d290be054 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142936 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-11-18Improve English in recent translatable stringsAdolfo Jayme Barrientos
Change-Id: I5d2b035ebb35c9bc32fc6cbe96685148e9c155a1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142832 Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com> Tested-by: Jenkins