summaryrefslogtreecommitdiff
path: root/sw/source/filter/ww8/ww8graf.cxx
AgeCommit message (Collapse)AuthorFilesLines
2024-03-06tdf#160049 doc import: use margins with left/right HoriOrientRelationJustin Luth1-0/+6
No interesting existing unit tests. make CppunitTest_sw_ww8export4 \ CPPUNIT_TEST_NAME=testTdf160049_anchorMargin Change-Id: Ib855d9f35db9e0f47aff18400b69a990cd1ad5ca Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164444 Tested-by: Jenkins Reviewed-by: Justin Luth <jluth@mail.com> Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2024-02-18ITEM: Rename for more control over SlotID usagesArmin Le Grand (allotropia)1-2/+2
Change-Id: I51585f1c15984a066262023184f668662853d20f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163556 Tested-by: Jenkins Reviewed-by: Armin Le Grand <Armin.Le.Grand@me.com>
2023-10-02tdf#146619 Recheck include/s* with IWYUGabor Kelemen1-0/+1
Change-Id: Ia0a6330278b044f448c9928362308aadc8fc9a20 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156989 Tested-by: Jenkins Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
2023-06-06tdf#135710 doc import: force page center on inline imagesJustin Luth1-2/+6
Relative anchoring is irrelevant for inline images, so it is safe to do this in terms of writer layout. The benefit is clearly seen when the user changes from inline to anchored. In ODT format, that results in a centered image in the paragraph, while in DOC it was anchored somehow to a character and didn't lay out nicely at all after the transition. So this is mainly just side-stepping a layout issue in Writer (because checking the properties and hitting OK shifted the image). Change-Id: I6ff7a191d78bc1597ee9f053e02f161565a27174 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152683 Tested-by: Jenkins Reviewed-by: Justin Luth <jluth@mail.com>
2023-06-06tdf#135709 doc import: force dynamic wrap on inline imagesJustin Luth1-1/+5
Wrapping is irrelevant for inline images, so it is safe to do this in terms of writer layout. The benefit is clearly seen when the user changes from inline to anchored. In all other formats, that results in Parallel wrapping, but in DOC format the text "disappears" behind the image since it wraps through. Change-Id: Ia4827814f9c9a3b8865bf8d0d72552b2b44a0207 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152682 Tested-by: Jenkins Reviewed-by: Justin Luth <jluth@mail.com>
2023-05-30tdf#140508 doc import: auto-contour for textboxesJustin Luth1-5/+16
This fixes a 6.3.1 regression. The problem was that contour was turned off despite settings indicating that it should be on. An earlier patchset contains the results of a make sw.check assert. make CppunitTest_sw_ww8export3 CPPUNIT_TEST_NAME=testTdf79186_noLayoutInCell Change-Id: Ib3df022a1430649b271083f343b470798f4a08c0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152398 Reviewed-by: Justin Luth <jluth@mail.com> Tested-by: Jenkins
2023-03-07no need to allocate these separatelyNoel Grandin1-2/+2
they are all one or two words in size Change-Id: I9a0f971d72c998c26e567c6abc2f9fe2a734207e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148338 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-02-08editeng: remove SvxLRSpaceItem::nTxtLeftMichael Stahl1-1/+1
Several parts of SvxLRSpaceItem appear to maintain an invariant of the 3 members nTxtLeft/nLeftMargin/nFirstLineOffset: nLeftMargin is either equal to nTxtLeft if nFirstLineOffset is positive, otherwise equal to nTxtLeft + nFirstLineOffset. But not every part maintains it: there are functions SetLeftValue() and SetLeft() which simply write into nLeftMargin regardless, and a constructor that takes 3 separate numbers without any checks. The constructor calls violate the invariant in 2 ways: nTxtLeft is simply set to 0 (many cases), and one case in OutlineView::OutlineView() that sets nTxtLeft to 2000 but the other 2 at 0. Another odd thing is that the UNO services that expose SvxLRSpaceItem either expose a property for MID_L_MARGIN or for MID_TXT_LMARGIN but never both. It looks like there are 2 distinct usages of SvxLRSpaceItem: for anything that's applied to paragraphs, all 3 members are used; for anything else, nTxtLeft is unused. Try to simplify this by removing the nTxtLeft member, instead GetTextLeft() simply calculates it. Also assert in SetLeftValue()/SetLeft() that nFirstLineOffset is 0. Change-Id: Ida900c6ff04ef78e92e8914beda1cc731a695b06 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146643 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2022-11-02tdf#54857 elide more dynamic_castNoel Grandin1-2/+2
Change-Id: I42bef355eeef15e3733a5ee57b0569887cfa5e84 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142183 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-10-05tdf#148806 doc import: remove 2003 SetObjectShell(nullptr) hackJustin Luth1-10/+0
This was preventing doc event-macros from round-tripping. Its original purpose was to "fix" doc->sxw export. We no longer export to sxw, and the OOo bug doc exports fine to ODT. Change-Id: I3a22db1b3bf9eaa2d64ac963f0c41892ba604e8d --- https://bz.apache.org/ooo/show_bug.cgi?id=20540 --- caolanm 2003-10-20 14:43:31 UTC Setting a target for this bug, fixed for 2.0 in portlaoisefilterteam16, and for 1.1.1 in droghedafilterteam15 MIB->CMC: The document contains a Draw 4.0 OLE object, and the problem is the import of that object in the Word filter. During the import, the object's storage is copied into the document storage (in SvxMSDffManager::CreateSdrOLEFromStorage, msdffimp.cxx, 5117). It now is contained in the document storage in the 3.o format, but it is not in the child list of SvPersist. Some time later, SvxMSDffManager::ImportGraphic calls a SdrOLE2Obj::SetModel, that again calls SdrOLE2Obj::Connect. This method notices that the object is not in the persist child list, and for that reasdon call SvPersist::Move to add it to the list (svdoole2.cxx, 374). Move converts the object into the OOo 1.0 format. The destination storage is the object's storage, so the 1.0 format is added to the existing 3.0 format, and the object storage remains an OLE strorage and does not get a package. This situation is not permitted and cannot be saved in the SXW format. Change-Id: I24e55e5d47c3a7d10d6609ddbf9cc2374a47a37b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140950 Tested-by: Jenkins Reviewed-by: Justin Luth <jluth@mail.com> Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2022-08-29ref-count SdrObjectNoel Grandin1-68/+63
Which means we can get rid of the majestic hack of ScCaptionPtr Previously, SdrObject was manually managed, and the ownership passed around in very complicated fashion. Notes: (*) SvxShape has a strong reference to SdrObject, where previously it had a weak reference. It is now strong since otherwise the SdrObject will go away very eagerly. (*) SdrObject still has a weak reference to SvxShape (*) In the existing places that an SdrObject is being deleted, we now just clear the reference (*) instead of SwVirtFlyDrawObj removing itself from the page that contains inside it's destructor, make the call site do the removing from the page. (*) Needed to take the SolarMutex in UndoManagerHelper_Impl::impl_clear because this can be called from UNO (e.g. sfx2_complex JUnit test) and the SdrObjects need the SolarMutex when destructing. (*) handle a tricky situation with SwDrawVirtObj in the SwDrawModel destructor because the existing code wants mpDrawObj in SwAnchoredObject to be sometimes owning, sometimes not, which results in a cycle with the new code. Change-Id: I4d79df1660e386388e5d51030653755bca02a163 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138837 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-08-12clang-tidy modernize-pass-by-value in swNoel Grandin1-2/+3
Change-Id: I9a3b33595e34a264baeede33672a0c090ae85157 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138134 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-08-05sw: rename to unique name SwFrameFormat::SetFormatName()Michael Stahl1-4/+4
Change-Id: I3058a3ade6bdedf0575c10783a4811d7768ac183 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137812 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2022-07-20tdf#139759 doc import: import comment highlight/shadeJustin Luth1-1/+6
Round-tripping depends on earlier commits for this bug. These two attributes are SvxColorItems in EditEng, but SvxBrushItems in Writer. So direct mapping doesn't work. Although it might be a highlight, LO doesn't have such a silly duplicate thing in the editeng code. So just map this as the same thing used for normal char background. As of LO 7.x, we default to exporting as char background anyway, so highlight is on the way out in LO. P.S. Highlight is one of 17-ish colors. It is the background button in the Char panel in MS Word. Background is on Word's Para panel (even though it is a character property), and so it can fairly easily be removed in MS Word. Change-Id: Id25879d90ba4a0eeff2d6afed030fc029d1c1039 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137239 Reviewed-by: Justin Luth <jluth@mail.com> Tested-by: Justin Luth <jluth@mail.com> Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2022-06-02std::move SfxPoolItem into SfxItemSet where possibleNoel Grandin1-1/+1
found with the help of a temporary loplugin (which i have put into the store/ folder) Change-Id: Ide40d09bef6993ace50039a8fd0439b7e29c09a6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135288 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-03-09use SfxItemSet::GetItemIfSet in sw/.../ww8Noel Grandin1-6/+5
Change-Id: I304b0cfbb191254db5176049696e5a3f6666f271 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131235 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-03-02remove writerhelper::ItemGetNoel Grandin1-1/+1
the TypedWhichId template methods on SfxItemSet supercede this Change-Id: I9c6240657a7c98fad93399f9ce17c370acd125c2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130803 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-02-09related tdf#79186 filter: value is more than just LayoutInCellJustin Luth1-21/+9
nGroupShapeBooleanProperties contains 16 shape properties and 16 flags to indicate whether they are to be used or not. Up till now, only fLayoutInCell has been used by LO, but it handles far more than that, so lets change the code (now that we have the documentation for it) to make it clear that this could be useful for further compatibility fixes. There is no need to determine whether the setting has been provided or not - since a zero default indicates everything in this bit-set should be ignored. The naming and the if clause in ww8graf.cxx suggests that reverse engineering didn't really grasp how this worked, so I took the liberty of removing all of that awkwardness, and verified that at least several associated document from the OOo Apache bugtracker still worked. =============================================================== https://docs.microsoft.com/en-us/openspecs/office_file_formats /ms-odraw/a0ae6aa5-16e4-4550-87a2-b8ca180c7fd7 fLayoutInCell (1 bit): A bit that specifies whether this shape is displayed inside a table cell. If fUsefLayoutInCell equals 0x0, this value MUST be ignored. The default value for this property is 0x1. Change-Id: I82f80123a7419a83737b796f253406576732b6c7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129657 Tested-by: Jenkins Reviewed-by: Justin Luth <jluth@mail.com>
2022-02-06We know the length hereMike Kaganski1-3/+3
Change-Id: I0b8898551ac964711250832057af61e3064ef0c7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129554 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2022-01-29used TypedWhichId in the constructor of various svx *Item classesNoel Grandin1-1/+2
to act as an extra check that we have the association of Item and TypedWhichId annotations correct. (*) requires that I add an upcasting constructor to TypedWhichId (*) Make the field dialog stuff in writer use a new item id FN_FIELD_DIALOG_DOC_PROPS instead of abusing the existing SID_DOCINFO Change-Id: Ica4aea930c80124609a063768c9af5a189df1c27 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129098 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-01-07remove E3D_INVENTOR_FLAG and convert SdrObjKind to scoped enumNoel Grandin1-8/+8
We don't need E3D_INVENTOR_FLAG, we can just check if the SdrObjKind is in the right range. Which exposes some dodgy code in DrawViewShell::GetMenuStateSel SfxItemState::DEFAULT == rSet.GetItemState( OBJ_TITLETEXT ) || SfxItemState::DEFAULT == rSet.GetItemState( OBJ_OUTLINETEXT ) || which has been there ever since commit f47a9d9db3d06927380bb79b04bb6d4721a92d2b Date: Mon Sep 18 16:07:07 2000 +0000 initial import just remove that. In SwFEShell::ImpEndCreate() move some logic around to avoid using an out-of-range SdrObjKind value Change-Id: I4620bfe61aca8f7415503debe3c84bfe5f4368a0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127763 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-12-14Stream::Tell returns sal_uInt64Noel Grandin1-2/+2
Change-Id: I02e49d4f59c17a9868c4111ac91b5dd2715e689c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126630 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-11-23O[U]String::replaceAt overloads that take string_viewNoel Grandin1-2/+2
which results in lots of nice string_view improvements picked up by the plugins Change-Id: Ib0ec3887816b3d4436d003b739d9814f83e244b2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125657 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-10-10use SfxItemSetFixed in swNoel Grandin1-6/+6
Change-Id: I69e188d7599b7fc439f613cec0a0967ccb748b7e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123313 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-09-26ofz#39150 avoid Timeout with large editengine stringsCaolán McNamara1-0/+6
Change-Id: I06413377120420acf132fcbe1a6a9866bdb7ccd2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122612 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-09-18ofz#35787 Avoid timeout when fuzzingCaolán McNamara1-0/+6
Change-Id: Ia506200f91dcf165dab951d240cb529f1a0d8034 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122302 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-08-16pass OutlinerParaObject around by valueNoel Grandin1-7/+7
since it uses o3tl::cow_wrapper, so it is really just a wrapper around a pointer, no point in allocating it on the heap Remove assert in SdrText::SetOutlinerParaObject, which was bogus anyhow, because it was comparing pointers, not deep equality. And since we are now being more efficient and avoiding copying of the internal data in OutlinerParaObject, we hit this assert. Change-Id: I6dbfaab5ee2ca05b2001baf63110041e469df9c5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120510 Tested-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-07-19Move svl::Items to include/svl/whichranges.hxx, and unify its usageMike Kaganski1-4/+4
... in WhichRangesContainer and SfxItemSet ctors. Now it's not needed to explicitly use 'value' in WhichRangesContainer's ctor, or create an instance for use in SfxItemSet ctor (svl::Items is already defined as a template value of corresponding type). Instead of WhichRangesContainer Foo(svl::Items<1, 2>::value); SfxItemSet Bar(rItemPool, svl::Items<1, 2>{}); now use: WhichRangesContainer Foo(svl::Items<1, 2>); SfxItemSet Bar(rItemPool, svl::Items<1, 2>); Change-Id: I4681d952b6442732025e5a26768098878907a238 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119157 Tested-by: Mike Kaganski <mike.kaganski@collabora.com> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-07-01ofz#30657 Timeout, ignore duplicate images when fuzzingCaolán McNamara1-1/+10
Change-Id: I4471379ad60a96f63ff53a441b801d48197b021c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118216 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-06-21ofz#34898 TimeoutCaolán McNamara1-6/+16
we expect the editengine to be able to select a preexisting range of text to convert into the symbol char, typically range is of length 1 Change-Id: I13f56e716a00e243bf1c578580dc0ba31755e581 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117522 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-06-12Backgrd -> BackgroundNoel Grandin1-3/+3
Change-Id: I55bccacfe6c6b44570a24e9f5125e40a1a83d6ea Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117073 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-05-31sw: prefix members of HTMLEndPosLst, SwFltStackEntry, SwFltTOX and ...Miklos Vajna1-2/+2
... SwHTMLNumRuleInfo See tdf#94879 for motivation. Change-Id: Ie091511f7b2fff3949295c310045631676879655 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116421 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2021-05-28no need to allocate these SfxItemSet on the heapNoel Grandin1-2/+3
use std::optional where the code needs to control the lifetime of the object explicitly Change-Id: Ia550ce051360f68911abc68c945a97d62a637b06 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116291 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-05-21sw: replace most static_cast<sal_uInt16>() calls with o3tl::narrowing()Miklos Vajna1-4/+4
o3tl::narrowing() is a better way to handle this, as that way the integer conversion is still implicit, which allows detecting integer truncation at runtime (with suitable compiler flags). Change-Id: I499abda3be6943e8c111c56df390e72939586221 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115948 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2021-05-19fix leak in SwWW8ImplReader::Read_GrafLayerNoel Grandin1-1/+1
Change-Id: I898c2380f1b7505c608ef0a865e1b7ca6c6dce25 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115778 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-04-20ofz#33433 Heap-Buffer-overflowCaolán McNamara1-2/+1
since... commit 531993161d6fe8065436191666cc88d7c4c20749 Date: Mon Apr 12 08:13:53 2021 +0200 cid#1476017 Read_GrafLayer's subfunction params are never null Change-Id: Ic4fe55d92abbb0ba90abc70668fd6a837511240f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114307 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-04-19cid#1476017 Read_GrafLayer's subfunction params are never nullJustin Luth1-303/+277
A more comprehensive backtrack of pRecord shows that it was never null in this context (and might as well do the same for any other never-null-variables in these sub-functions). I also took pains to (most of the time) clang-format the lines that I modified. I'm not sure how some subfunctions (like SetAttributesAtGrfNode) get away with no errors when they are passed a pointer, but never check if it exists. Perhaps if you use it without ever checking it accepts that? Change-Id: Iaaacd142310340d1f54af4eb61d856d61df0dd50 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113990 Tested-by: Jenkins Tested-by: Justin Luth <justin_luth@sil.org> Reviewed-by: Justin Luth <justin_luth@sil.org>
2021-04-10cid#1476017 Dereference after null checkCaolán McNamara1-3/+3
Change-Id: Icd991bb20dc3aa96041f6a432bddf1bb2775f371 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113907 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-04-09tdf#120768 doc import: z-order background shapes behind othersJustin Luth1-0/+3
Interestingly, there were NO ww8export examples where a background item was attempting to insert itself after a foreground one. I think GENERALLY the order of shapes in a DOC file format is from bottom to top - and so it just worked by accident. Change-Id: If5226b4ad071455d1e3c30e334676cc5932a1064 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113837 Tested-by: Justin Luth <justin_luth@sil.org> Reviewed-by: Justin Luth <justin_luth@sil.org>
2021-03-11rename GrafikCtor to GraphicCtorNoel1-5/+5
Change-Id: Ib9f4665a9b77e0d90070060f635466a046058431 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112266 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-01-13transparency->alpha in GraphicAttrNoel1-1/+1
Change-Id: I1fe9311871724ff8b7b8960f5dba6e890198565c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109211 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-01-12transparency->alpha in tools::ColorNoel1-3/+3
this just changes the Get/Set methods, the constructor and internal representation of Color is not changed. Change-Id: Idb6e07cc08bbaa5bd55b6bd4b585e648aef507b6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109074 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-01-10static_cast after dynamic_castNoel Grandin1-5/+6
Change-Id: I3792ddadad9582a7e6f4740829c081d9571ddaff Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109049 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-01-02introduce Degree100 strong_int typeNoel1-2/+2
Change-Id: I78f837a1340be0ca5c49097f543a481b7b43a632 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108367 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-12-29loplugin:stringviewparam: operator +Stephan Bergmann1-2/+2
Change-Id: I044dd21b63d7eb03224675584fa143009c6b6008 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108418 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-11-12Revert "remove Fraction::operator tools::Long()"Noel Grandin1-1/+1
This reverts commit 48b667a7e7d25f835f95df89162a7849d6972531. Reason for revert: some discussion required Change-Id: Ia0990d280837fb68b7ddc9f472ec78b1467b4311 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105540 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-11-12remove Fraction::operator tools::Long()Noel1-1/+1
which was added in commit 331e2e5ed3bf4e0b2c1fab3b7bca836170317827 Author: Noel Grandin <noel.grandin@collabora.co.uk> Date: Thu Sep 14 08:49:52 2017 +0200 long->sal_Int32 in Fraction presumably to make the change impact less code. Instead, update the call sites to reflect the actual bitwidth of the data we will be receiving. Change-Id: If2a678b1cf534f39cb8cb249757462be53658309 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105607 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-11-06make SdrObject Identifiers SdrObjKind enum membersCaolán McNamara1-3/+3
with unique values so that, e.g. if (pObj->GetObjIdentifier() == OBJ_LINE) is only true if pObj is a SdrPathObj and not a E3dScene Change-Id: I30c91e57eb27141390c644dec42e2a4bee96edf0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105374 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-10-20use tools::Long in swNoel1-25/+25
Change-Id: I44be72b3a9b14823ec37a3c799cffb4fb4d6e1de Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104527 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-10-10we throw away the original of the cloneCaolán McNamara1-3/+1
so we can take ownership of the original instead Change-Id: I2399aa77b22e606008a5aed2bc73361e13b68455 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104174 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>