Commit Graph
3868 Commits
Author SHA1 Message Date
Noel Grandin 5ec7c4eecf fix comparison of UIObject's inside UITests
using == to compare them doesnt work, because we return
a new one with every call to getTopFocusWindow and similar.
So add a equals() method to the UNO interface to do the comparison.

Change-Id: Ie909fe9b4e84fe07f4ca87bbebf65b56d3da8f78
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165436
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-03-28 17:17:32 +01:00
Rafał Dobrakowski 102622a07d tdf#146619 Remove unused #includes from C/C++ files
'chart2' module was cleaned.

Change-Id: Ib4cdb3c8a21d0ed47f4970894d416327df5e68a6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164864
Tested-by: Jenkins
Reviewed-by: Gabor Kelemen <gabor.kelemen.extern@allotropia.de>
2024-03-27 09:20:54 +01:00
Armin Le Grand (allotropia) d053413402 ITEM: Remove InvalidateAllItems()
I checked if this is used, but it can be replaced
using Clear() -> all. This prevents that the whole
array of Items in an ItemSet gets set to
INVALID_POOL_ITEM.

I also checked if INVALID_POOL_ITEM/IsInvalidItem
is needed at all representing SfxItemState::DONTCARE
but it is and still will need to be set for individual
Items.

At last checked if SfxItemState::UNKNOWN and
::DISABLED really need to be separate states, but
indeed there are some rare cases that need that.

To make things more consistent I also renamed
SfxItemState::DONTCARE to SfxItemState::INVALID
to better match Set/IsInvalid calls at ItemSet.

The build showed a missing UT and led to a problem
due to the hand-made ItemSet-like SearchAttrItemList.
The state 'invalid' seems to be used as 'unused'
marker. It should be changed to use SfxPoolItemHolder
and not need that. For now, set by using an own loop
to set to that state.

Change-Id: Ifc51aad60570569a1e37d3084a5e307eed47d06c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165035
Tested-by: Jenkins
Reviewed-by: Armin Le Grand <Armin.Le.Grand@me.com>
2024-03-21 21:39:57 +01:00
Kurt Nordback 9ae8e74fb3 tdf#50934: Add a pie-with-remainder-as-another-pie chart type
Implement ODF import/export for bar-of-pie and pie-of-pie types,
and add simple tests for this capability. The associated ODF tags
are implemented in the loext namespace. This also required changing
the schema.

Change-Id: Ib55ae1c5818ad810f7b962d807a9163a3d02ba17
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164436
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-03-18 07:07:24 +01:00
Julien Nabet 9661b094e1 tdf#160225, related tdf#92768: hide axis title not taken into account when...
duplicating sheet or when saving a file and reopen it.

When creating a title for an axis, "createTitle" is called.
Before tdf#92768 "support hiding title objects", when unchecking "axis title" in sidebar,
the title was removed (via "removeTitle")
But since tdf#92768, "hideTitle" is called instead.

The pb is "Visible" attribute wasn't registered in StaticTitleWrapperPropertyArray.
So when duplicating sheet after having created a title and hidden it,
when duplicating sheet, the new sheet had the title visible.
In the same way if, after having created a title and hidden it,
you save the file and reopen it, the title is displayed.

Change-Id: I980505ec02906e673dd60a60e4d9837928bf8876
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164938
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2024-03-17 11:14:23 +01:00
Caolán McNamara 218e4641c4 cid#1592990 COPY_INSTEAD_OF_MOVE
and

cid#1592991 COPY_INSTEAD_OF_MOVE

Change-Id: Ia1de5f671947ad79614a727aa70408431843b90e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164564
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-03-08 14:50:12 +01:00
Mike Kaganski 0c35808288 tdf#153706: do not add categories, when source data doesn't have them
lcl_AllOperator is used in XChartDocument::attachData implementation.
When a data without existing categories is passed there, like an XY
scatter, lcl_AllOperator used to force creation of the categories in
the target, by returning 'true' unconditionally from setsCategories.
This meant, that a new sequence of numbers starting from 1 was used
as X values, and the old X data was interpreted as an extra Y series.

This changes lcl_AllOperator::setsCategories to try to check if its
data actually contains categories. Thus, XChartDocument::attachData
will use categories either when the chart already uses categories,
and ChartDataWrapper::applyData detects that using a call to
DataSourceHelper::detectRangeSegmentation; or when the new data has
it; but not when neither had it. When it's not possible to detect if
there were categories in the new data (e.g., with user data), old
behavior is used, setting categories.

It could be an alternative to detect the chart type using
xOldDoc->getDiagram()->getDiagramType() == "com.sun.star.chart.XYDiagram"
in XChartDocument::attachData; and then decide to force the creation
or not. But it seems hackish, and not really universal: other chart
types must be tested (bubble?), no idea how to handle hypothetical
cases when applied data contains categories in case of XY chart, etc.

Change-Id: I86b34f6799c30b103f7fc6b2faf6ec255a9d137b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164298
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2024-03-03 17:22:08 +01:00
codewithvk 8c3fa629f4 Make Chart Object Properties Dialogs Async
How to reproduce it:
When double-clicking on a chart, it will now open the Chart Object Properties dialog box.

Previously synchronous, this commit updates it to be asynchronous.

Signed-off-by: codewithvk <vivek.javiya@collabora.com>
Change-Id: I54c24e0cd30d6ec8b2bfa93567e830405d2fd30c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162576
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
(cherry picked from commit 748a5a01165d40e9bcaa7bfc75b0e6f74fc5a07d)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164125
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-03-03 14:52:38 +01:00
Caolán McNamara 217d918491 Resolves: tdf#159879 Crash when closing "3D View" dialog
Change-Id: I9c116007afe9cea97b597933ad8483dce25c3707
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164295
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-03-03 14:49:35 +01:00
Caolán McNamara edc45294fd cid#1592375 COPY_INSTEAD_OF_MOVE
Change-Id: I9d110911504832d7a8a6725ca3f9040a4fd0c4c4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164010
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-02-27 12:56:19 +01:00
AkshayWarrier 8cd4cd31e9 tdf#157882 svx: Remove cap/corner styles and move arrowhead control to new row
Change-Id: Ifa38ec7ba9969627ff26abe22c58d06ec373ecb1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162403
Tested-by: Jenkins
Reviewed-by: Hossein <hossein@libreoffice.org>
2024-02-20 20:54:17 +01:00
Kurt Nordback 1cda27cf69 tdf#50934: OfPie inport from OOXML, plus initial work for export
Change-Id: Ie17b583af28d274b3e7817c646dd4f5873e03fef
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160733
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-02-19 01:29:36 +01:00
codewithvk 4965b055b5 Chart: Make Data Range Dialog Async
To reproduce the step, double-click on the chart and right-click to open the context menu, where you can see the option for data ranges.

Signed-off-by: codewithvk <vivek.javiya@collabora.com>
Change-Id: I0697d5918d35d132aa7c17f86204742017f7ff17
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163358
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
(cherry picked from commit afbb4e44478e520b866032df8f0a0a344568233e)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163402
Tested-by: Jenkins
2024-02-16 12:08:55 +01:00
Armin Le Grand (allotropia) ca3c6d468f ITEM: ItemPool Rework (I)
Driving forward the Item reworks I now take the
ItemPool in focus: It now does not hold any items
anymore and should be renamed to something like
ItemInfoProvider/ItemHelper, since it's main purpose
is to provide the Defaults for the Item functionality.

There is that SfxItemInfo, only a struct and bundling
SlotID and ItemFlags. There are also the DefaultItems,
just handled as ptrs in an array. It is/was always
error-prone to keep these in sync. Remember that it's
also necessary for the order to not only being sorted
but being increments of one with no gaps allowed in
the WhichIDs to which the Items are bound.

I now bundled that to a new class ItemInfo that joins
WhichID, SlotID, ItemFlags and the default Item. This
is a pure virtual base class, it comes in three
derivations:

(1) ItemInfoStatic:
This is supposed to be global static and hosts the
Item in a std::unique_ptr to ensure cleanup. It is
designed to be constructed once during runtime and
being shared globally. It allows the ItemPtr to be
nullptr to mark as non-static (if initial static is
not possible for some reason) but still offers the
needed data. Most cases (95%+) are of that case.
The contained Item is owned by that instance. The
flag isStaticDefault() is set at the Item.

(2) ItemInfoDynamic:
This is supposed to be used for cases where the Item
cannot be static: Mainly for SfxSetItem (that needs
a Pool itself in the contained SfxItemSet, so lifetime
is bound to that Pool), but other cases showed up in
the transition. These instances live while the Pool
lives and get destructed when the Pool goes down.
Also uses std::unique_ptr for the Item instance for
as much automated cleanup as possible, the contained
Item is owned by that instance, the instance by the
Pool. The flag isDynamicDefault() is set at the Item.

(3) ItemInfoUser:
This is used for UserDefaults that can be set for
every ItemInfo entry to 'overshadow' the default
from the 'outside'. It uses a regular Item and
the central access methods implCreateItemEntry/
implCleanupItemEntry to manage the Item instance,
thus works like a SfxPoolItemHolder. The Item
instance can be globally shared and re-used even
when the Pool goes down. Instances belong to the
Pool and are cleaned up when the Pool goes down.
This Item does not need any further flag to be
set.

The ItemInfos are organized using a class
called ItemInfoPackage:

This bundles groups of ItemInfoStatic to
functional instances. There are derivations/
implementations of this e.g. for Writer ItemPool
bundling all the needed defaults for Writer,
similar for draw/impress, Calc and other usages.

These ItemInfoPackage can be 'registered' at an
ItemPool using it's method registerItemInfoPackage.
This does all the needed stuff to setup that
group of ItemInfos at the Pool (It even sets
internal vars First/LastWhich, that info can just
be derived from the buildup ItemInfo Ptrs).

The ItemInfoPackage has methods 'size()' and
'getItemInfo(index) to allow looping over it
and deliver the infos the Pool needs. The
(forced, pure virtual) overloads of getItemInfo
in the specific implementations check for the
ItemPtr being nullptr and create a exclusive
incarnation of ItemInfoDynamic for the Pool if
needed, returning that. The Pool owns the
ItemInfoDynamic incarnations and uses the
ItemInfoStatic directly. On shutdown it cleans
up the ItemInfoDynamic as needed.

The ItemInfoUser is used by the Pool when a
UserDefault is set/used: for SetUserDefaultItem,
GetUserDefaultItem, ResetUserDefaultItem. It
is not held in a 2nd list, but directly in the
list of ItemInfo'ptrs: To keep track of this
an unordered_map is used that helds the original
ItemInfo associated with the WhichID. That way
no two lookups (as before) are needed to get the
current Pool's default for any WhichID.

The derivations of ItemInfoPackage are
encapsulated and just allow access to an
ItemInfoPackage& with a single method as
return value. All use a static local instance
of a std::array<ItemInfoStatic, FIXED_SIZE>
which constructs all ItemInfoStatic and the
static Item instances - if already possible.
Sometimes it is necessary to overload the
constructor to set some static instances
for Items later than the lib init. These are
also just marked with nullptr as Item instance.
Some need to overload getItemInfo to complete
instances of ItemInfoStatic, if needed, or
create and deliver instances of ItemInfoDynamic.

The registerItemInfoPackage also offers a
optional lambda callback: there were two cases
where local data from the Pool was needed to
incarnate the item - just add that to the
call to registerItemInfoPackage if needed,
see examples in the adapted code.

For the re-use of Items this means that now
in SfxItemSet/SfxPoolItemHolder *true* static
Items can and will be used without RefCount
directly and globally. This is also the case
for dynamic Items, with the exception of
differing Pools for SfxSetItems which cannot
be done.

Future:
That design is already prepared to allow
solving that Pool-chaining problem: currently
there are master/sub-pools and all accesses
have to traverse that structure before even
doing anything.
For the future the idea is more to 'compose'
a Pool by registering ItemInfoPackages, e.g.
for Writer pool you may start with SfxItemPool,
register the writer-specific ItemInfoPackage,
then the one for DrawingLayer (if needed) and
the one for EditEngine.
It should also be possible to get to smaller
granularities of that packages. Ideas for
new ones will emerge. We might also think
about composing Pools which can e.g. run Writer
and Chart, so allowing to use Chart *without*
OLE stuff in Writer - just ideas...

More changes:
- Adapted all stuff, cleaned up old stuff/
  definitions
- Removed FreezeIdRanges, that can be done
  once per Pool on-demand (and cannot be
  forgotten to be called)
- Merged XOutdevItemPool with SdrItemPool
  and offered a ItemInfoPackage which joins
  both needed sets of Items
- All the cleanup hassle with Pools and
  defaults cleaned up
- Adapted all access methods of the pool
  to use that new stuff. Pool chaining
  currently stays, but I use a central
  method 'getTargetPool' instead of
  recursive calling to get the correct
  Pool for the action

Change-Id: I2b8d3d4c3cc80b1d0d0b3c0f4bd90d7656b4bab7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163157
Tested-by: Jenkins
Reviewed-by: Armin Le Grand <Armin.Le.Grand@me.com>
2024-02-12 10:35:33 +01:00
Caolán McNamara 108edd58e8 cid#1591760 COPY_INSTEAD_OF_MOVE
and

cid#1591761 COPY_INSTEAD_OF_MOVE
cid#1591763 COPY_INSTEAD_OF_MOVE
cid#1591768 COPY_INSTEAD_OF_MOVE
cid#1591769 COPY_INSTEAD_OF_MOVE

Change-Id: Ia1c829f96148dc79cea02a69b3442c18d51e1288
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163162
Tested-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-02-09 14:54:36 +01:00
codewithvk b9a46c1ec2 Async Dialogs for Few Chart Properties
Updated the chart properties dialogs to work asynchronously. The changes affect the following dialogs:

Chart Type: Accessible by double-clicking on a chart to select it, then right-clicking to open the context menu. Selecting 'Chart type...' opens the dialog for modifying chart types.

Insert Axes: Triggered by double-clicking on a chart to select it, then right-clicking and choosing 'Insert/Delete Axes' from the context menu. This dialog allows users to add or remove chart axes.

Insert Titles: Opens when you double-click on a chart, right-click, and select 'Insert Titles...' from the context menu. It's used for adding titles to the chart and its axes.

Insert Trendline: For column charts, you can double-click on a column, right-click, and choose 'Insert trendline..' to open this dialog.

Insert Error Bars: In a column chart, after selecting a column, right-clicking and choosing 'Insert X Error Bars..' or 'Insert Y Error Bars..' opens the dialog for adding error bars to the chart.

Signed-off-by: codewithvk <vivek.javiya@collabora.com>
Change-Id: Id7bb8682150f2e3115420d9259c6afd41682641e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162655
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
(cherry picked from commit 71a3cfb71dddba8098d74d7bb1dd414e4696914b)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162824
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-02-06 16:43:43 +01:00
Kurt Nordback 15633d637e tdf#50934: Add a version comment, and more structure for of-pie
Change-Id: I9d7c25e47a3f4a78360f9b2deffe8650e378866d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156305
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-02-06 15:16:31 +01:00
Caolán McNamara 32b814355b use ViewShell DOCCOLOR when available for charts
Change-Id: I200538bd94d60867d84b7dc37811094b65dd9aa5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162850
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-02-04 10:30:42 +01:00
Kurt Nordback 6c45285e86 tdf#50934: Initial plumbing and infrastructure
Change-Id: I355bdc8e6d67e7cdd47e4d6eccecedc4b53ac11b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155851
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-02-02 06:03:23 +01:00
Justin Luth a77403d11a tdf#146756 pie chart2 import: use manualLayout Width for pie chart labels
... and use a compatible 1/5 width if not specified.

This patch depends on the previous oox patch
(commit 301e27cbeb)
which actually reads the width into the model.

Fixes a 7.2 regression from
commit b006834239
author Tünde Tóth on Wed Dec 16 18:26:26 2020 +0100
    tdf#138777 pie chart: improve long data label width

and is basically a re-write of 7.1's
commit 20da1a5dd3
author Tünde Tóth <toth.tunde@nisz.hu>	on Fri Oct 09 09:24:18 2020 +0200
    tdf#134978 Chart OOXML Import: fix pie chart label custom position

This is very risky, but then ANYTHING changing chart2 is risky.
There were a lot of changes made in 7.1,
and they all invited regressions.
However, our chart implementation is not in a good state,
and certainly is not very interoperable,
so it is worth taking the risk.

Anything dealing with manualLayout at this point
should have originated as a pptx,
so forcing a compatible max width should be fairly safe.

It probably isn't actually all that risky after all.

largely copied code from
commit 4223ff2be6
Author: Balazs Varga on Wed Jan 15 16:31:35 2020 +0100
    tdf#48436 Chart: add CustomLabelPosition UNO API property

Fortunately this all goes away after a round-trip
since custom label placement is lost on export to OOXML,
and that really helps to reduce the risk.

make CppunitTest_chart2_import CPPUNIT_TEST_NAME=testTdf146487

Change-Id: I9722fc6c759c15ac3924780e6fc124f02fba07e1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162590
Tested-by: Jenkins
Reviewed-by: Justin Luth <jluth@mail.com>
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2024-01-30 10:40:43 +01:00
Caolán McNamara 9126cde8cb When chart is active pass uno:ChangeTheme through to its parent frame
so theme changes can happen when chart has control of the UI

Change-Id: Id7fd17d697d5ff8c03f1f46d80894e4f69cb9b9d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162661
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-01-28 20:01:50 +01:00
Caolán McNamara 8fa1493fac Set chart outliner background to the page bg to resolve 'auto' color
Change-Id: I2498a7d49dbbd7bde017489722c3b655b6d75136
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162649
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-01-28 15:39:17 +01:00
Armin Le Grand (allotropia) 4790ef5cb5 ITEM: Cleanup some Pool stuff with Defaults
Sorted out some methods at ItemPool which process
Defaults to make more clear what is going on and
what which method is doing.

Change-Id: I2568d3e03d0a56a14b6fe4e04521e1a8e22c000b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162643
Tested-by: Jenkins
Reviewed-by: Armin Le Grand <Armin.Le.Grand@me.com>
2024-01-27 19:02:54 +01:00
Mike Kaganski 0fa827dbb2 Drop std::as_const from css::uno::Sequence iterations
Obsoleted by commit 2484de6728 (Remove
non-const Sequence::begin()/end() in internal code, 2021-10-15) and
commit fb3c04bd19 (Drop non-const
Sequence::operator[] in internal code, 2021-11-05).

Change-Id: Idbafef5d34c0d4771cbbf75b9db9712e504164cd
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162640
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2024-01-27 12:43:48 +01:00
Noel Grandin a9ee88cc47 make text-table dialog async
Change-Id: Ic24b2b935f1d539cf257194d136d901b52e00a84
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162433
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-01-24 10:51:00 +01:00
Noel Grandin 0edec42260 make object name dialog async
Change-Id: Icf81810297dc5767cedd051cf8ccdfbb101f35ec
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162395
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-01-22 19:48:44 +01:00
Noel Grandin dde1868544 object-title dialog can be used async
Change-Id: Ia5869788ccefcd17ef561bafb41da6f0d48fd54d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162394
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-01-22 19:48:35 +01:00
Noel Grandin 6a5ef1a2b0 make charmap dialog async
Change-Id: I222240dc1715604ad1e82e1062b34d116b2840f7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162367
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-01-22 19:48:14 +01:00
Noel Grandin 27f15f1d50 simplify the getters in AbstractSvx*Dialog
to look like getters elsewhere, which compose better

Change-Id: I23277910d3fb3c08fa6e839f0fbec010915e951a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162362
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-01-22 14:51:12 +01:00
Noel Grandin 0ad94d52c0 fix bug in renaming chart objects
introduced by
    commit c5bb73cae7
    Author: Kohei Yoshida <kohei.yoshida@suse.com>
    Date:   Tue Jan 31 16:03:46 2012 -0500
Get the whole thing to build after the method sig change in
SdrObject.

Change-Id: I1ca887d09857f6476980381853a9ae4946fd03e1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162364
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-01-22 12:31:20 +01:00
codewithvk 4b33e878a4 Make format condition, chart delete and pivot table error async
todo:
Make executeDlg_ObjectProperties_withoutUndoGuard dialogs to async.

Signed-off-by: codewithvk <vivek.javiya@collabora.com>
Change-Id: I9927c1008d34370b9394aaf653afb575f69f2d45
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160557
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161703
Tested-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-01-10 10:49:23 +01:00
Caolán McNamara 6342aa6c66 cid#1545370 COPY_INSTEAD_OF_MOVE
and

cid#1545364 COPY_INSTEAD_OF_MOVE
cid#1545363 COPY_INSTEAD_OF_MOVE
cid#1545344 COPY_INSTEAD_OF_MOVE
cid#1545299 COPY_INSTEAD_OF_MOVE
cid#1545287 COPY_INSTEAD_OF_MOVE
cid#1545267 COPY_INSTEAD_OF_MOVE
cid#1545256 COPY_INSTEAD_OF_MOVE
cid#1545226 COPY_INSTEAD_OF_MOVE
cid#1545500 COPY_INSTEAD_OF_MOVE
cid#1545538 COPY_INSTEAD_OF_MOVE
cid#1545618 COPY_INSTEAD_OF_MOVE
cid#1545681 COPY_INSTEAD_OF_MOVE
cid#1545750 COPY_INSTEAD_OF_MOVE
cid#1545778 COPY_INSTEAD_OF_MOVE
cid#1545785 COPY_INSTEAD_OF_MOVE
cid#1545799 COPY_INSTEAD_OF_MOVE
cid#1545847 COPY_INSTEAD_OF_MOVE
cid#1545958 COPY_INSTEAD_OF_MOVE
cid#1545963 COPY_INSTEAD_OF_MOVE
cid#1545990 COPY_INSTEAD_OF_MOVE
cid#1546013 COPY_INSTEAD_OF_MOVE
cid#1546029 COPY_INSTEAD_OF_MOVE
cid#1546079 COPY_INSTEAD_OF_MOVE
cid#1546104 COPY_INSTEAD_OF_MOVE
cid#1546127 COPY_INSTEAD_OF_MOVE
cid#1546133 COPY_INSTEAD_OF_MOVE
cid#1546155 COPY_INSTEAD_OF_MOVE
cid#1546190 COPY_INSTEAD_OF_MOVE
cid#1546216 COPY_INSTEAD_OF_MOVE
cid#1546273 COPY_INSTEAD_OF_MOVE
cid#1546315 COPY_INSTEAD_OF_MOVE
cid#1546326 COPY_INSTEAD_OF_MOVE
cid#1546387 COPY_INSTEAD_OF_MOVE

accept some reasonable suggestions

Change-Id: I7b004086d490c7618d8fe7a21a53cfa8ac1f8408
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161748
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-01-08 13:09:02 +01:00
Caolán McNamara 8ed865ffc1 crash when one user deletes a chart another has a property dialog open for
Insert a chart, user #1 select it, user #2 select it. User #1 double click
it, double click again the legend to get dialog to edit it. User #2 delete
chart, User #1 'ok'

 #0  0x00007f5365797d59 in osl::Mutex::acquire (this=<optimized out>) at include/osl/mutex.hxx:63
 #1  osl::ClearableGuard<osl::Mutex>::ClearableGuard (t=..., this=0x7ffc7ffcccf0) at include/osl/mutex.hxx:182
 #2  apphelper::LifeTimeGuard::LifeTimeGuard (rManager=..., this=0x7ffc7ffcccf0) at chart2/source/inc/LifeTime.hxx:175
 #3  chart::ChartModel::lockControllers (this=0x0) at chart2/source/model/main/ChartModel.cxx:415
 #4  0x00007f53658375ab in chart::ControllerLockGuardUNO::ControllerLockGuardUNO (this=this@entry=0x7ffc7ffcce80, xModel=...)
     at chart2/source/tools/ControllerLockGuard.cxx:34
 #5  0x00007f5364df5f34 in chart::ChartController::executeDlg_ObjectProperties_withoutUndoGuard (this=<optimized out>, rObjectCID=..., bSuccessOnUnchanged=<optimized out>)
     at chart2/source/controller/main/ChartController_Properties.cxx:797
 #6  0x00007f5364df7a5e in chart::ChartController::executeDlg_ObjectProperties (this=0x7f535401f310, rSelectedObjectCID=...)
     at chart2/source/controller/main/ChartController_Properties.cxx:707
 #7  0x00007f5364e0f497 in chart::ChartController::execute_MouseButtonUp (this=<optimized out>, rMEvt=...) at chart2/source/controller/main/ChartController_Window.cxx:924
 #8  0x00007f53760d61dc in (anonymous namespace)::LOKPostAsyncEvent (pEv=0x55e2f1b93db0) at sfx2/source/view/lokhelper.cxx:893
 #9  0x00007f53760d0977 in LokChartHelper::postMouseEvent (this=<optimized out>, nType=1, nX=<optimized out>, nY=<optimized out>, nCount=2, nButtons=1, nModifier=0, fScaleX=0.083333333333333329,
     fScaleY=0.083333333333333329) at sfx2/source/view/lokcharthelper.cxx:294

just hold a reference to the chart the dialog operates on

Change-Id: I3b05d1fc12e4df899c1a996f1029f9d3d62e87ad
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161099
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2023-12-21 15:36:31 +01:00
Noel Grandin 40cec25c21 unique_ptr to optional in chart2
Change-Id: I642f6f1fb7df9f0a7525155b22a99344a02d9cf8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160839
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-12-17 10:33:52 +01:00
Caolán McNamara de4b3a135f cid#1545970 COPY_INSTEAD_OF_MOVE
and

cid#1545957 COPY_INSTEAD_OF_MOVE
cid#1545944 COPY_INSTEAD_OF_MOVE
cid#1545939 COPY_INSTEAD_OF_MOVE
cid#1545931 COPY_INSTEAD_OF_MOVE
cid#1545926 COPY_INSTEAD_OF_MOVE
cid#1545909 COPY_INSTEAD_OF_MOVE
cid#1545899 COPY_INSTEAD_OF_MOVE
cid#1545896 COPY_INSTEAD_OF_MOVE
cid#1545894 COPY_INSTEAD_OF_MOVE
cid#1545858 COPY_INSTEAD_OF_MOVE
cid#1545823 COPY_INSTEAD_OF_MOVE
cid#1545820 COPY_INSTEAD_OF_MOVE
cid#1545819 COPY_INSTEAD_OF_MOVE
cid#1545772 COPY_INSTEAD_OF_MOVE
cid#1545749 COPY_INSTEAD_OF_MOVE
cid#1545743 COPY_INSTEAD_OF_MOVE
cid#1545739 COPY_INSTEAD_OF_MOVE
cid#1545635 COPY_INSTEAD_OF_MOVE
cid#1545603 COPY_INSTEAD_OF_MOVE
cid#1545602 COPY_INSTEAD_OF_MOVE
cid#1545592 COPY_INSTEAD_OF_MOVE
cid#1545544 COPY_INSTEAD_OF_MOVE
cid#1545532 COPY_INSTEAD_OF_MOVE
cid#1545520 COPY_INSTEAD_OF_MOVE
cid#1545512 COPY_INSTEAD_OF_MOVE
cid#1545490 COPY_INSTEAD_OF_MOVE
cid#1545483 COPY_INSTEAD_OF_MOVE
cid#1545467 COPY_INSTEAD_OF_MOVE
cid#1545461 COPY_INSTEAD_OF_MOVE
cid#1545458 COPY_INSTEAD_OF_MOVE
cid#1545428 COPY_INSTEAD_OF_MOVE
cid#1545394 COPY_INSTEAD_OF_MOVE
cid#1545385 COPY_INSTEAD_OF_MOVE
cid#1545383 COPY_INSTEAD_OF_MOVE
cid#1545366 COPY_INSTEAD_OF_MOVE
cid#1545357 COPY_INSTEAD_OF_MOVE

Change-Id: I76224326977b4067b94ca3176cad1ca6de17930a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160847
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2023-12-16 22:39:20 +01:00
Noel Grandin bc640ec911 no need to allocate this on the heap
Change-Id: I9a63c534a12ec2cf11d8820a5bbba8bca9a7c0e6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160841
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-12-16 10:44:35 +01:00
Noel Grandin dc3849eeb7 no need to allocate this on the heap
Change-Id: I89d4e680e6c8aabcc543605a0e496b3086dd2d3a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160838
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-12-16 10:44:24 +01:00
Noel Grandin 3ca3fd6eaf no need to allocate this on the heap
Change-Id: I99a41076db39b76f6dbbd5974039ee271c29eee5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160840
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-12-16 10:44:10 +01:00
Noel Grandin df9499d520 use more getFastProperty in chart2
Change-Id: Ia6511f7de33023e1e1e9e8a31ba262c7b989350c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160832
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-12-15 21:03:55 +01:00
Caolán McNamara 7dd028c0e4 cid#1545211 COPY_INSTEAD_OF_MOVE
and

cid#1545218 COPY_INSTEAD_OF_MOVE
cid#1545232 COPY_INSTEAD_OF_MOVE
cid#1545243 COPY_INSTEAD_OF_MOVE
cid#1545246 COPY_INSTEAD_OF_MOVE
cid#1545251 COPY_INSTEAD_OF_MOVE
cid#1545260 COPY_INSTEAD_OF_MOVE
cid#1545261 COPY_INSTEAD_OF_MOVE
cid#1545276 COPY_INSTEAD_OF_MOVE
cid#1545295 COPY_INSTEAD_OF_MOVE
cid#1545297 COPY_INSTEAD_OF_MOVE
cid#1545301 COPY_INSTEAD_OF_MOVE
cid#1545302 COPY_INSTEAD_OF_MOVE

Change-Id: I97ba935a4a2b8715b55ebbf6e853a66260b2eb90
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160686
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2023-12-14 12:28:46 +01:00
Julien Nabet 4eb875d956 tdf#158684: CHART XY Scatter Chart: line type "stepped" ignores parameters
Regression from 65752e6498
Date:   Fri Mar 24 10:52:13 2023 +0100
jsdialog: enable and make async chart line prop dialog

Change-Id: I1532c45ae72d2c45ace72bcc099fcc8baa265b99
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160715
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2023-12-14 08:48:48 +01:00
Caolán McNamara cb18b12953 cid#1545617 COPY_INSTEAD_OF_MOVE
and

cid#1545748 COPY_INSTEAD_OF_MOVE
cid#1545741 COPY_INSTEAD_OF_MOVE
cid#1545698 COPY_INSTEAD_OF_MOVE
cid#1545594 COPY_INSTEAD_OF_MOVE
cid#1545588 COPY_INSTEAD_OF_MOVE
cid#1545558 COPY_INSTEAD_OF_MOVE
cid#1545545 COPY_INSTEAD_OF_MOVE

Change-Id: I5dfec77a68959b9384fc71a2fc0908c5d1b42869
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160448
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2023-12-08 09:34:29 +01:00
Caolán McNamara 950d8b640a cid#1546501 COPY_INSTEAD_OF_MOVE
and

cid#1546486 COPY_INSTEAD_OF_MOVE
cid#1546485 COPY_INSTEAD_OF_MOVE
cid#1546484 COPY_INSTEAD_OF_MOVE
cid#1546482 COPY_INSTEAD_OF_MOVE

Change-Id: I53cc622f16afc0f57ffd72e3e0a6f18e390fbb83
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160443
Tested-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2023-12-08 09:33:45 +01:00
Caolán McNamara d516400618 cid#1546422 COPY_INSTEAD_OF_MOVE
and

cid#1546416 COPY_INSTEAD_OF_MOVE
cid#1546415 COPY_INSTEAD_OF_MOVE
cid#1546391 COPY_INSTEAD_OF_MOVE
cid#1546390 COPY_INSTEAD_OF_MOVE
cid#1546317 COPY_INSTEAD_OF_MOVE
cid#1546252 COPY_INSTEAD_OF_MOVE
cid#1546251 COPY_INSTEAD_OF_MOVE
cid#1546249 COPY_INSTEAD_OF_MOVE
cid#1546243 COPY_INSTEAD_OF_MOVE
cid#1546195 COPY_INSTEAD_OF_MOVE
cid#1546193 COPY_INSTEAD_OF_MOVE
cid#1546137 COPY_INSTEAD_OF_MOVE
cid#1545738 COPY_INSTEAD_OF_MOVE
cid#1545782 COPY_INSTEAD_OF_MOVE

Change-Id: I10d5091aa72b682371764b8a18cc5062e272c031
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160285
Tested-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2023-12-04 10:48:59 +01:00
Julien Nabet 288001be68 Fix warning for emscripten build
TB lo_daily_tb_linux_wasm shows:
/home/tdf/jenkins/workspace/lo_gerrit/tb/src_wasm/chart2/source/controller/main/ChartController.cxx:1557:71: warning: unused parameter 'rAccChartView' [-Wunused-parameter]
void ChartController::impl_initializeAccessible( AccessibleChartView& rAccChartView )
                                                                      ^
1 warning generated.

Change-Id: If584e6944c1d9105a7a8b7170dc1022911b57bf9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159373
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Tested-by: Jenkins
2023-11-13 14:39:38 +01:00
Stephan Bergmann bd6fb0cd3e Extended loplugin:ostr: Rewrite some O[U]StringLiteral -> O[U]String
...in include files.  This is a mix of automatic rewriting in include files and
manual fixups (mostly addressing loplugin:redundantfcast) in source files that
include those.

Change-Id: I1f3cc1e67b9cabd2e9d61a4d9e9a01e587ea35cc
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158337
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-10-23 11:04:42 +02:00
Stephan Bergmann 27aea4de84 Extended loplugin:ostr: Automatic rewrite O[U]StringLiteral: chart2
Change-Id: Ifcb57548a594cbbaf70df8d9da17cf94a96667db
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158146
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-10-19 14:05:52 +02:00
Mike Kaganski f26bf09a0e tdf#141892: Set chart view to dirty state after loading
Previously, ChartViewHelper::setViewToDirtyState was only called in
ChartModel::impl_notifyModifiedListeners during the load process of
inline charts; after commit 574eec9036,
the chart doesn't set its modified state when loading, and thus the
view did not get notified about the necessary updates.

This change introduces a hidden property in ChartDocumentWrapper,
named 'ODFImport_UpdateView', which is set in SchXMLImport dtor
to force the notification after the loading.

Change-Id: Id9d82f16d233d2172cd6808a8498822e13b21b21
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158051
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2023-10-16 18:27:49 +02:00
Sarper Akdemir 971425f9b7 fix emscripten build
Change-Id: I15df992e410f741a22d1f140b85e57a97195a5f6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157020
Tested-by: Jenkins
Reviewed-by: Sarper Akdemir <sarper.akdemir.extern@allotropia.de>
2023-09-18 19:56:50 +02:00
Szymon Kłos 359190cb6a jsdialog: fix layout of chart type dialog
directly set content area container to avoid
buttons on top of the dialog in lok case

Change-Id: I8353102f679a8f19c3041c7b4ec0b1200ed7d515
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156254
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Pranam Lashkari <lpranam@collabora.com>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156813
Tested-by: Jenkins
Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
2023-09-11 11:56:12 +02:00