summaryrefslogtreecommitdiff
path: root/sd
AgeCommit message (Collapse)Author
2023-01-17XUnoTUnnel->dynamic_cast in sd::ViewTabBarNoel Grandin
Change-Id: I0aae59685986f07e74a15ef7e7261de808b20c47 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145639 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-01-17XUnoTunnel->dynamic_cast in sd::DrawControllerNoel Grandin
Just past the concrete type down through a couple of layers, rather than using a generic type and then casting Change-Id: I7ba6c83463f3db7176b72cb7e764d3659706ae78 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145638 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-01-17tdf#152991 sd: fix oversized rectangle of edited embedded objectTünde Tóth
The embedded object became unusably oversized after editing, because it was not possible to minimize it by the mouse. Now the object keeps its original size to avoid of the UX problem. Note: losing the original zoom of the OLE content is still a problem. Change-Id: I8b7a2f2a84324bf4de2358ecb5fec5c1f7349155 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145454 Reviewed-by: László Németh <nemeth@numbertext.org> Tested-by: László Németh <nemeth@numbertext.org>
2023-01-17XUnoTunnel->dynamic_cast in ViewShellWrapperNoel Grandin
Change-Id: I204bbfc67a6c60723d8ebb21424ac5c184f9b2cc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145641 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-01-17XUnoTunnel->dynamic_cast in sd::framework::PaneNoel Grandin
Change-Id: I3e6408af0b57bd3b714551c42a31b5b0aabaf3a0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145640 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-01-13support theme color for lines + oox support + testsTomaž Vajngerl
Extended XLineColor to handle model::ThemeColor which then maps to the newly added LineColorThemeData property. Extended oox import and export to map the scheme color elements to and from ThemeColor. Added a new test to check the theme line color in impress shapes. Change-Id: I23ecc18c88b5b47608c9110f5681f189d02e2f36 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145071 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2023-01-13XUnoTunnel->dynamic_cast in TransferableHelperNoel Grandin
which leads us to find that we can skip all the dynamic_cast'ing altogether in SwView_Impl Change-Id: I8914f78df6bfdd743df370c0017d5b8521863594 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145483 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-01-13XUnoTunnel->dynamic_cast in VCLXDeviceNoel Grandin
Change-Id: I9fa06600d3b9a2172a1818f89a3b9c06d65c8c54 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145467 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-01-13introduce {Char,Fill}ColorThemeReference which uses XThemeColorTomaž Vajngerl
Adds a unified UNO property for theme colors *ColorTheme (CharColorTheme and FillColorTheme) which uses XThemeColor, that replaces the properties *Theme, *TintOrShade, *LumOff, *LumMod. The properties are still present for backwards compatibility and to keep ODF support working in tests as that needs a bigger change. Reactor the code and tests to accomodate for this change. Change-Id: If7983decb4ba528b49fe7b5968aa9efc696a9efc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144783 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2023-01-12introduce docmodel comp., model::ThemeColor, use it in SvxColorItemTomaž Vajngerl
Added a new component docmodel, that has the document model types, which only depend on other basic components. This is needed so the types can be used in every relevant component - xmloff, oox, svx, editeng,... Introduces model::ThemeColor, which is a class used to store the theme color data, including transformations (svx::Transformation). For UNO use XThemeColor is added, and the implementation UnoThemeColor which wraps svx::ThemeColor, so it can be tranported around. Reactor all the code and tests to accomodate for this change. Change-Id: I7ce6752cdfaf5e4d3b8e4d90314afa469dd65cfc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144847 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2023-01-12tsan:lock-order-inversion in MasterPageObserverNoel Grandin
simply the initialisation using a function local static Change-Id: Ib5b42dccd69e79822b10ab357c357003b35f9d0d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145340 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-01-12tsan:lock-order-inversion in FrameworkHelperNoel Grandin
simplify initialisation using a regular mutex, which avoids the global mutex and thus a potential lock ordering issue Change-Id: Ic32afb827aa0b6aae41b8680d7f7329fbe6bc1ae Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145341 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-01-11rename BitmapEx::GetAlpha to GetAlphaMaskNoel Grandin
to ease the reading of code related to an upcoming patch to convert transparency to alpha, since there is already a GetAlpha in Color. Change-Id: I1af0f8f6dd94acfe4673c8556c7aff6c20da3f7a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145209 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-01-05Revert all the recent loplugin:unocast changesStephan Bergmann
...as obsoleted by ef533553559fe09b4afab651fc692885d1acf4ed "Rudimentary support for dynamic_cast on UNO proxy objects". This reverts all of: 4cfcc9ac37b90ce64c8402a41eb4638adb185b5c "loplugin:unocast (framework::Desktop)" 03efbf72f4ddf7a84aa8aabef348331bd4b75e8a "loplugin:unocast (vclcanvas::TextLayout)" 80099fdd51a69eaa6c36ca88ef772810e4a777fa "loplugin:unocast (SalGtkXWindow)" cc147f576d8687fb79c77d47d41dc4ba1678a469 "loplugin:unocast (sdext::presenter::CachablePresenterView)" 40db42be1d8fd0f9c6c8c5ba3767ddb9ee2034c2 "loplugin:unocast (vclcanvas::CanvasFont)" 2d1e7995eae29e2826449eb5179f5fae181794a5 "loplugin:unocast (CairoColorSpace)" 4c0bbe4bd97636207cf71a6aa120c67698891da9 "loplugin:unocast (canvas::ParametricPolyPolygon)" 89803666621c07d1b1ac9d3bd883f0ca192a91a0 "loplugin:unocast (vclcanas::CanvasBitmap)" d5e0c2c8db71878d21c2a7255af08cf5f9a6dd04 "loplugin:unocast (sfx2::DigitalSignatures)" c0c4519e0d5b555f59bbc04cc616454edfd1f4ce "loplugin:unocast (VCLXAccessibleComponent)" feb8b833a6245d42400f42a0bc789dc84594ee6f "loplugin:unocast (VCLXDialog)" 1fa58cc6cc9c3849753342a5d9a6ddfa461b5e66 "loplugin:unocast (VCLXMultiPage)" f481f036deb1b1b46f3038074c4659f3a91b9c6c "loplugin:unocast (DocumentSettingsSerializer)" 73df933f5fa5932f94e5a1b338a3eda00a9ce354 "loplugin:unocast (css::embed::EmbeddedUpdate)" 420165ab0ef03c0467f9d17f504de2d2fc78f0e6 "loplugin:unocast (canvas::tools' StandardColorSpace, StandardNoAlphaColorSpace)" 9abe8ee067e6c00f19d8a13346d53c4641c27166 "loplugin:unocast (MutableTreeNode)" 9f3022ceb036f23b4b0994c3e2fbd1001bff225a "loplugin:unocast (VCLXTabPage)" 1be70dda02c12a60778b7607cff2520ae1aa611e "loplugin:unocast (vcl::unotools::VclCanvasBitmap)" d6a70bb641b96e8e5616448c2378131ed62658b4 "loplugin:unocast (basegfx::unotools::UnoPolyPolygon)" 5a14f009e6782c077463c8cbb8e9cea3d7950107 "loplugin:unocast (xmlsecurity::Certificate)" 99009c9535dfa3e0d838989ccc7d84bfa2320ff4 "loplugin:unocast (sd::Annotation)" 0c7585c5fa78887e5459885ed744e8044fd76137 "loplugin:unocast (sd::TextApiObject)" 24e14afd1bfcaed6c200ab081973fba7e47267ca "loplugin:unocast (SignatureVerifierImpl)" 1a7ad0c10d286ce9ae2700ceb2fd50eed1fb43a4 "loplugin:unocast (pcr::PropertyEventTranslation)" a97e2d2702d9a6f37775ccee2c08c4f3b2479c4b "loplugin:unocast (RangePageBreaks)" 19dfdf86ad1f5b08041d8b7a9f196caf881231ab "iloplugin:unocast (pcr::OFormattedNumericControl)" f9785ea595fd8e911f6370e836fa579225b9e571 "loplugin:unocast (frm::OInterfaceContainer)" 5e5f40a4a92a31b0932c690219d002fcf18598cf "loplugin:unocast (ScVbaShapes)" 27b35b2c215b4832d4378ec3a7ecbba926552d06 "loplugin:unocast (ScVbaShapeRange)" cb3108f860065928552a86cf8acc4b3a95718ecf "cid#1517812 Dereference null return value" feba0ddb1521d1142560fe54b7d7696ee910237f "loplugin:unocast (weld::TransportAsXWindow)" 4d6c23216559eb48f9943bb49d6e475a6d64ba15 "loplugin:unocast (oox::ForumlaImExportBase)" 4844c096a8ab6a9a620c410a0949d4499f12a504 "loplugin:unocast (cairocanvas::SurfaceProvider)" 9a0b523e0a84d403b9092176ccec4b3e3efe42d0 "loplugin:unocast (cairocanvas::CanvasBitmap)" 8a5648d8e59b4b007dbbf3824777c19a21efc61e "loplugin:unocast (cairocanvas::TextLayout)" 28c27a0623bc78a0590858f97d03b620985bc84c "loplugin:unocast (cairocanvas::CanvasFont)" 53bc223cb3288e32a417696ee61c29e5f01f209d "loplugin:unocast (cairocanvas::RepaintTarget)" 5f70b0b9f6bc4ab145ddbd9155590ed4a3b1b9ec "loplugin:unocast (SvXMLImport)" 068187a898cdd2e26e9b16c348ecc1ed2dee3f29 "loplugin:unocast (VCLXWindow)" 88b4f966202717cd4ad38a30a8eda22c3e69ed35 "loplugin:unocast (sfx2::sidebar::SidebarController)" f1b7a69b280aefe2f1b3b0f32193494fd765f2bd "loplugin:unocast (SvxLineStyleToolBoxControl)" ba76f0ba7e8de4d2953739c952004b7d9af47197 "loplugin:unocast (i18npool::Calendar_gregorian)" 840154daf934d8df52ead1cb7acd798c4d30f007 "loplugin:unocast (framework::AddonsToolBarWrapper)" b0e9c4c5f063cefa9557810e3349bdb9c7493091 "loplugin:unocast (GrammarCheckingIterator)" 8ee6cfc9655ce9de4617cea1a0d9cb9d7a4fbfac "loplugin:unocast (ucb::ucp::ext::Content)" 5b8cd77c112bc8c0e92b8fec215c3c8e802bbc0a "loplugin:unocast (basic::SfxScriptLibraryContainer)" 9e73ff9fce12e102bb3c3cea8d8bb96c88f2c9ad "loplugin:unocast (sdext::presenter::PresenterNotesView)" a98acca8fbc38d3fd5600ae5056a8e42b6d8a40d "loplugin:unocast (SelectionChangeHandler)" c0b59ad6e35b0cb0dea0821e95f95569739078c1 "Consistently use comphelper::getSomethingImpl<I>(aIdentifier, this)" 276e3ccbdd3259ec3daf8a1a98fa7f406b14e21c "loplugin:unocast (vclcanvas::RepaintTarget)" Change-Id: I37c73e3422a5154bf6cb647640d2d3f23db8bc34 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145063 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-01-04tdf#149588 pptx import: transparency at SolidFillAttila Szűcs
When copied color (RGB) property from text content to shape, copy alpha component as well. (If text color have alpha component) Change-Id: Ib86c48ab7b2d3c5f9491a2211b05e90b2c2ea10f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145031 Tested-by: Jenkins Reviewed-by: Andras Timar <andras.timar@collabora.com>
2023-01-04Related: tdf#150339 remove SID_ATTR_COLOR_STRCaolán McNamara
re: https://gerrit.libreoffice.org/c/core/+/144866 "ColorString is not needed anymore (we used that in LOK previously)." Change-Id: I50a2f0e2ad254afb8ede33b05c89ae40bfeb4d3b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144967 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2023-01-02Resolves: tdf#150339 two arguments called "Color"Caolán McNamara
from around: commit 780d83771af89e6b27b3618d9c033c3fb29ba803 Date: Mon Nov 4 17:17:58 2019 +0100 jsdialogs: .uno:Color with string argument and: commit 1144712bb99cfb699e73b473ee44351c50a35613 Date: Mon Oct 28 10:19:50 2019 +0100 jsdialogs: make possible to set .uno:BackgroundColor in Writer SvxColorItem Color SID_ATTR_CHAR_COLOR (SfxStringItem Color SID_ATTR_COLOR_STR, SvxColorItem Color SID_ATTR_CHAR_COLOR,... ^^^^^ ^^^^^ rename the most recently added to "ColorString" Change-Id: I9e00be60c768af124be7df800df4b26df83b5267 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144866 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-12-26svx: rename ThemeColorType enum values, use enum instead of indexTomaž Vajngerl
Change-Id: I81c1553205365c4076562474078b3b0aa834b249 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143990 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2022-12-22loplugin:unocast (DocumentSettingsSerializer)Stephan Bergmann
(See the upcoming commit introducing that loplugin:unocast on why such dynamic_casts from UNO types are dangerous.) Change-Id: I803f62085264511976ed9bb0744ee301de2a7dab Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144754 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-12-22loplugin:unocast (sd::Annotation)Stephan Bergmann
(See the upcoming commit introducing that loplugin:unocast on why such dynamic_casts from UNO types are dangerous.) Change-Id: Id600e83ae94409914b20a2a2620031ce340a9390 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144698 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-12-22loplugin:unocast (sd::TextApiObject)Stephan Bergmann
(See the upcoming commit introducing that loplugin:unocast on why such dynamic_casts from UNO types are dangerous.) The odd implementation of TextApiObject::getImplementation had been effectively like that ever since the code's introduction in 5d431414afa79d392fe6a885940c559236c25aa2 "CWS-TOOLING: integrate CWS impressnotes01", for no obvious reason. And as it can be reduced to a single comphelper::getFromUnoTunnel call, drop the function and directly call that at the (single) call site. Change-Id: If50a81cf8bee0dddbdfb5e6b5516c24a03e858e9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144699 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-12-21tdf#152606: sd_export_tests: Add unittestXisco Fauli
Change-Id: Ib34a5d312228570b05a84884189f7bd0b45af522 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144650 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2022-12-21tdf#152612 Add Duplicate page item to Pagepane context menuRoman Kuznetsov
Change-Id: I49a889202c5a291b0da9eb970b838b657af2313a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144596 Tested-by: Jenkins Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org>
2022-12-20loplugin:unocast (weld::TransportAsXWindow)Stephan Bergmann
(See the upcoming commit introducing that loplugin:unocast on why such dynamic_casts from UNO types are dangerous.) On macOS, where we implicitly use -fvisibility-inlines-hidden-static-local-var since <https://github.com/llvm/llvm-project/commit/d46f2c51e4c849683434bb5a0fb6164957474b8f> "Make -fvisibility-inlines-hidden apply to static local variables in inline functions on Darwin", the static id local var in weld::TransportAsXWindow::getUnoTunnelId cannot be in an inline function implicitly hidden via -fvisibility-inlines-hidden. Explicitly marking the function as VCL_DLLPUBLIC would help, but would in turn cause MSVC error 2487 ("member of a dll interface class may not be declared with dll interface"). So just make the function non-inline in a new vcl/source/window/weldutils.cxx (which would arguably be the best approach for the whole class, anyway). Change-Id: Ib5615f6aae19346ea05b8b85ff77c0e5ea860994 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144331 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-12-19tdf#152295 sw sd UI: don't reset tiled image size by Area tabTibor Nagy
The background tiling images become larger when opening and closing Area tab: reopening the image properties in the Area tab shows that the Width and Height got reset to the original values of the image. Regression from commit 686349476e03f951f4a9ff9755b9f71951b64ea5 "[GSoC] Move all fill style tabs inside area tab". Change-Id: Ibc4dfd73dedd81b1b7fe17574198dd4999aab967 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143819 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
2022-12-19tdf#152070 PPTX import: fix offset of tile background imageTibor Nagy
by using bitmap image sizes instead of the original ones. Change-Id: Id6f2777bf6803bca7252878203a12ab796ac33dc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143766 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
2022-12-19tdf#152436 PPTX export regression: fix lost shape at missing objectTünde Tóth
If the object is missing, it's still possible to keep its shape by exporting its preview graphic, as before the regression. Regression from commit adc042f95d3dbd65b778260025d59283146916e5 "tdf#124333 PPTX import: fix Z-order of embedded OLE objects". Change-Id: Ib2fd00f53a80572cfc9acaefea55015780c57da8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144040 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
2022-12-19tdf#152434 PPTX import: fix lost shapes with connectorsTibor Nagy
Regression from commit eec48130271188cab63665acedbabf1ff5e850a2 "tdf#148926 tdf#151678 PPTX import: position of standard connector - part1". Change-Id: Ib9381403f7c0edf9a06e3d98965067a51b4797d8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144000 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
2022-12-19tdf#152335 PPTX export: fix 3D shape properties of the shape in themeTibor Nagy
The shapes got extra 3D shape properties by the default template, which caused visible difference in MSO. Follow-up to commit I02f1edea84b50dbb9b0e0a59b6062a29894afde4 (tdf#152186 PPTX export: fix shadow of the shape in theme) Follow-up to commit 25e9766e9b87342b6f1b29dc146d5f33e12157a7 (tdf#92222 PPTX export: fix line width of the shape in theme) Change-Id: I84f931e45e7656c456fe910cbb5e09aabeb8924f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143516 Reviewed-by: László Németh <nemeth@numbertext.org> Tested-by: László Németh <nemeth@numbertext.org>
2022-12-17Improve extended tip for Impress page printOlivier Hallot
Change-Id: Id8b695b189acdbc300b1119df12e9924cc9f18f7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143920 Tested-by: Jenkins Reviewed-by: Olivier Hallot <olivier.hallot@libreoffice.org>
2022-12-16check SfxObjectShell::Current()Caolán McNamara
SfxObjectShell::Current() can return null, it's based on the equally vile SfxViewFrame::Current() Change-Id: Ia5c7783680e9d8e5d3075078f16a2c15cb6f7a47 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144339 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-12-16sd: check SfxViewFrame::Current()Caolán McNamara
SfxViewFrame::Current() is a festering wound, these ones look like they were safe anyway, so no need to backport. But with enough checked static analysis will kick in to flag new unchecked ones. Change-Id: Ife81c0e5fc508d8eb30808884c61b8e8c6723890 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144279 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-12-16likely fix for frequent mpGradientItem->GetName() crashCaolán McNamara
crash report id: ec5a64d7-b354-457e-92a3-1bd51208e7c7 Change-Id: Ie64993190baa5e3ea9228214bea1ee4d82044c51 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144282 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-12-16sd: check SfxViewFrame::Current()Caolán McNamara
these ones look potentially worth backporting Change-Id: I6153b0f9ead7caef9f228a5724f51823bcf87c07 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144280 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-12-15sd: fix null deref in ModifyPageUndoAction::Undo/RedoXisco Fauli
See https://crashreport.libreoffice.org/stats/signature/SfxViewFrame::GetDispatcher() Change-Id: Iaf14ad8fd5dab878ea5e3d6997371c2d8a4beac6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144241 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Jenkins
2022-12-14sd: Improve reaction to slow zoom gestures in ViewShellPovilas Kanapickas
The current implementation will ignore slow zoom gestures because each event may result in zoom change of less than 1% which will be truncated to zero during floating-point -> integer conversion. Storing accumulated amount and changing the zoom level once a whole integer quantity is accumulated solves this problem. Change-Id: If27a88d7695d0eed241dada5a09b25b2cb577841 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143751 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2022-12-12SdModelTestBase: remove duplicated templateXisco Fauli
this is already defined in include/tools/gen.hxx Change-Id: I6d837298491e92f942dad5cd49d8ef723a19356d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144008 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2022-12-09Fix sd encoded table style name handlingMaxim Monastirsky
Found this while looking into improving insertion of pages with tables, as SdDrawDocument::InsertBookmarkAsPage uses "_" as the rename suffix for styles with identical names but a different content. This commit fixes two issues: - For import, cell styles with encoded names couldn't be found by table styles. The reason is that styles are referenced in ODF by encoded names, but at runtime by display names. Yet we were searching the cell style family by encoded names. This was already handled for sw in insertTabletemplate(), and now do the same for sd. - For export, table template names were encoded, but then referenced by tables using their non-encoded names. This is unlike the sw code that doesn't encode them, and therefore doesn't have this problem. Looking at the schema, both table:name attribute of a table template, and table:template-name attribute of a table are of type "string", which suggests that there is indeed no need to encode those names. This aligns with the fact that table templates don't have a display-name attribute. Change-Id: Ie61b6a1c95b033404ee98f3fc40d8e82434a6a6c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143839 Tested-by: Jenkins Reviewed-by: Maxim Monastirsky <momonasmon@gmail.com>
2022-12-08tdf#132293 remove unused imports from uitestBogdan B
Change-Id: I6f5b5d97dab27986a6b0046c42c20ec4d0527980 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142531 Tested-by: Jenkins Reviewed-by: Hossein <hossein@libreoffice.org>
2022-12-07tdf#151185 Make Table Design button toggle-ableRafael Lima
Change-Id: I86dfc7a6567b24cc6e9a20203625eeb09c17536c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143574 Tested-by: Jenkins Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org>
2022-12-07sd: improve handling of table styles on page pastingMaxim Monastirsky
- Remove table styles that were copied from the source document, but not actually used in the pasted pages. Same as we were doing already for graphic/cell styles. - Disable the undo record of inserted cell styles, as long as we don't have undo actions also for the table style. This prevents data loss, as otherwise the table style will be exported, but not the cell styles it uses. The difficulty with having an undo action for table styles is that once a style is removed from its family it is disposed, so we no longer able to use that style for a redo action. This was "solved" in i#120015 for graphic/cell styles, by not disposing them at all. However table styles maintain cyclic references with their cell styles, so we can't give up on disposing. I'll take the time to think on a proper solution for this (e.g. making copies of styles instead of dealing with the original ones might be an option). For now, let's just remove this unfinished undo attempt. Change-Id: Iae06273217b2d695401921a84e7edf096556530e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143749 Tested-by: Jenkins Reviewed-by: Maxim Monastirsky <momonasmon@gmail.com>
2022-12-06weld InformationDialog info dialogCaolán McNamara
Change-Id: I6a3631fe06a1b46164f01d706ecefd7252509382 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143740 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-12-06Resolves: tdf#121297 weld Presentation MinimizerCaolán McNamara
Change-Id: Ifdf1746bc9f6567a1aded233a4350f6828604c9e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143678 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-12-05Make check for complete type more explicitStephan Bergmann
When 485c9d4f0e59e13e772da8f8a7975f0ddd77c33e "Clarify the use of untools::WeakReference" introduced cppu::detail::isUnoInterfaceType and its use in the requires-clause of unotools::WeakReference::get, its commit message argued that while isUnoInterfaceType only works if the given type is complete, that would already be taken care of via the use of std::is_convertible_v in the implementation of unotools::WeakReference::get. But while std::is_convertible_v nominally requires its argument types to be complete (unless they are void, or arrays of unknown bound), typical implementations like recent libc++ or libstdc++ do not seem to enforce that (and just return false in such a case). So better make isUnoInterfaceType explicitly require that the given type is complete. Which turned up one case where it isn't at the point where unotools::WeakReference<SdrTextObj>::get is called. (And while the resulting call to dynamic_cast<SdrTextObj*>(...) in the implementation of that function would cause an error when SdrTextObj is not complete, compilers happened to instantiate that template specialization only at the end of the TU, by which time SdrTextObj happened to be a complete type in the TUs including that sd/source/ui/inc/futext.hxx. So all happened to work out OK.) Change-Id: I704b8b437fa836e290245d1727e4d356128ef63c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143667 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-12-05cid#1517256 Dereference null return valueCaolán McNamara
Change-Id: I20bcd522526d5da3dcb9f24f7ae07ad6f9465459 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143677 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-12-05Make sure bHasShadow has a valueStephan Bergmann
Change-Id: Ic955e31619799918f26d6db2d6e688decfbce6c6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143676 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-12-05tdf#152211 PPTX import: fix connector position based on line widthTibor Nagy
Thick shape line changed the connector, e.g. direction of its arrow head. Follow-up to commit d8c89fb920af747ec51ce966b5d7b65e9340afbd "tdf#151891 PPTX import: fix regression of connector position" Regression from commit cbf66ec3e60d07efb7c3cceed9b4f0fb4f0510c8 "tdf#89449 PPTX import: fix line connectors". Change-Id: I99d22409ec65e10609b1e371cc4d301fd73c7c82 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143467 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
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>