path: root/sw
AgeCommit message (Collapse)AuthorFilesLines
2 dayssw content controls, picture: add insert UIMiklos Vajna13-15/+112
- handle the picture case in SwWrtShell::InsertContentControl(): insert a placeholder bitmap & create content control around the as-char image - expose this as a new .uno:InsertPictureContentControl command - add the new uno command to the default & MS-compatible menus - rename the SwWrtShell::Insert() overload taking a Graphic to make this a bit more readable Change-Id: I289d6b6a9cd622c585b6cf0ec0c91d6b51ad81ac Reviewed-on: Reviewed-by: Miklos Vajna <> Tested-by: Jenkins
2 dayssw: fix crash in SwHeaderFooterWin::IsEmptyHeaderFooter()Miklos Vajna1-0/+5
Crashreport signature: Fatal signal received: SIGSEGV code: 1 for address: 0x0 program/../program/ SwPageFrame::GetPageDesc() const sw/source/core/inc/pagefrm.hxx:144 program/../program/ SwHeaderFooterWin::IsEmptyHeaderFooter() const sw/source/uibase/docvw/HeaderFooterWin.cxx:403 program/../program/ SwHeaderFooterWin::ShowAll(bool) sw/source/uibase/docvw/HeaderFooterWin.cxx:273 program/../program/ SwFrameControl::ShowAll(bool) sw/source/uibase/inc/FrameControl.hxx:49 Change-Id: I3c1a6f46c7a15c2ca1a3db69a14d49abbea8c879 Reviewed-on: Tested-by: Jenkins Reviewed-by: Miklos Vajna <>
2 dayssw content controls, picture: add DOCX filterMiklos Vajna2-1/+41
Map Picture UNO property on content controls to: <w:sdt> <w:sdtPr> <w:picture/> ... And do the opposite on import. Change-Id: I5b164f796f194f5fc4bb30d7a30e053e577ed92d Reviewed-on: Reviewed-by: Miklos Vajna <> Tested-by: Jenkins
3 daysnew loplugin:unnecessary lockingNoel Grandin6-23/+3
off by default, since each warning needs careful inspection Change-Id: I805c1d1cdde531a1afdc76e87b22f879fc3c9753 Reviewed-on: Tested-by: Jenkins Reviewed-by: Noel Grandin <>
3 daystdf#149018 "Object" -> "OLE Object" in Menu and Dialog labelsSeth Chaiklin2-4/+4
As a step toward internal UI labeling consistency, this patch focused on dialogs, menus, toolbars that involve OLE Objects, which can be defined as embedded objects that use the Properties dialog in sw/uiconfig/swriter/ui/objectdialog.ui. One reason for the change is to distinguish these objects from the generic term "object", which is also used for Shapes and Textboxes. The label "Object" is changed to "OLE Object", where appropriate, which will align the menu and dialog labels with the one that appears in Navigator and Toolbar. Also changed "Objects" to "OLE objects" for the Statistics field. Changed "OLE-object" to "OLE Object" - again for consistency. Changed "Type" tab label to "Position and Size" in Object Dialog, to keep consistency with tdf#138844 Change-Id: Iba54c30fd83489631a9be546d6efc9365bdbefd3 Reviewed-on: Tested-by: Jenkins Reviewed-by: Seth Chaiklin <>
3 daystdf#138844 rename "Type" and "Image" tabs in Image Properties dialogSeth Chaiklin2-3/+3
Change the Tab label in Image Properties dialog. "Type -> "Position and Size" To keep consistency in appearance across related dialogs, made same change for the Frame dialog in this patch, and for Object dialog in Change the Tab label in Image Properties dialog. "Image -> "Rotation" Not found in the related dialogs. Change-Id: I57a3fbd45f84513e55e71896a141201bef000507 Reviewed-on: Tested-by: Jenkins Reviewed-by: Seth Chaiklin <>
3 dayssw_fieldmarkhide: fix wrong handling of SwInsText for fieldmarksMichael Stahl7-21/+74
For redlines, typically DocumentContentOperationsManager::InsertString() will insert text, and it explicitly removes any redlines on the text that has been inserted, hence it is always visible - so effectively the sw::MergedPara is updated correctly. However for fieldmarks the situation is different, if the insertion happens inside of the part that is hidden in the layout, then it must not be inserted into the sw::MergedPara. Try to figure out which part(s) of a fieldmark the insertion position is in and ignore the inserted text as appropriate in SwTextFrame::SwClientNotify(). Change-Id: Ic5066b20e9609f50438ca64ac7d2cbd09baeef23 Reviewed-on: Tested-by: Jenkins Reviewed-by: Michael Stahl <>
3 dayssw: fix assert in SwModule::Notify()Michael Stahl1-1/+1
Apparently it happens when loading a 0-byte file that the SfxObjectShell is still in IsLoading() stage when close() is called. This then causes the SfxEventHintId::LoadFinished event to be emitted during close(), which is not a situation the assert was intended for. Change-Id: I60a260ca1c1e6cbf9502832ba6622de2628763e7 Reviewed-on: Tested-by: Jenkins Reviewed-by: Michael Stahl <>
3 daysremove using namespace css in justify.hxx.Mark Hung1-1/+0
Change-Id: I22b582ed88d43ef5299443914dd28b8db61d1b70 Reviewed-on: Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <>
3 dayssw content controls, dropdown: disable NOP buttons in the property dialogMiklos Vajna3-0/+45
Rename, delete, move up & move down does nothing initially, disable the buttons when their event handler would just do an early return to make this less confusing. Change-Id: I4cfb9750d07b4686440c05901ef72e8ce4de961e Reviewed-on: Tested-by: Jenkins Reviewed-by: Miklos Vajna <>
3 dayssw content controls, picture: replace placeholder image on clickMiklos Vajna5-3/+96
Previous content control types (rich text, checkbox, dropdown) had the cursor somewhere in the content control and click selected the content control in the placeholder case. The picture case is somewhat different: the content control has a single as-char image, and by the time SwWrtShell::GotoContentControl() is invoked, the picture frame is already selected. All we have to do here is to trigger the file picker to select a replacement and then insert that image to replace the already selected frame's bitmap. Change-Id: Id3ad94ed8f7e13b0ebc2f57327bb8c0b1e374a86 Reviewed-on: Tested-by: Jenkins Reviewed-by: Miklos Vajna <>
3 daystdf#148132: Revert "n#758883 dmapper: paragraph-level..."Vasily Melenchuk4-6/+37
Seems original problem is no longer reprodicible with recent builds but ovewriting of numbering style params with inline values leads to another problems. Removing this mechanics do some impact on RTF filter: it tries to modify numbering styles, so this was also corrected. It is not ideal yet but looks better in support numbering char properties different from paragraph ones. This reverts commit 2123ede032ca64f696ef54af4ad3238974ca2b5d. Change-Id: If8c79d6191de13b2f09c128b59d17efcfdb1a4ea Reviewed-on: Reviewed-by: Michael Stahl <> Reviewed-by: Miklos Vajna <> Tested-by: Jenkins
3 daystdf#148720 sw DOCX: fix jumbled group textbox regressionAttila Bakos (NISZ)3-0/+64
Left-aligned group shape was synced to the textbox, resulting jumbled positions after DOCX export/import. To fix it, set horizontal orientation of the textbox back to NONE. Regression from commit 2951cbdf3a6e2b62461665546b47e1d253fcb834 "tdf#143574 OOXML export/import of textboxes in group shapes". Change-Id: I02ee79862344f3495846091e3eef27c24d8ef162 Reviewed-on: Tested-by: László Németh <> Reviewed-by: László Németh <>
4 daysFix typosAndrea Gelmini2-2/+2
Change-Id: Ie90f36439bb6ca23c45d1b75494ec1955b35513f Reviewed-on: Tested-by: Julien Nabet <> Reviewed-by: Julien Nabet <>
4 daysno need to take a lock when returning static dataNoel Grandin1-1/+0
Change-Id: I8d836c4a919056e8b600549f82b0d5dee9ab1a47 Reviewed-on: Tested-by: Jenkins Reviewed-by: Noel Grandin <>
4 daystdf#148455 docx import/export: improvements to lvlOverrideVasily Melenchuk4-0/+33
On save LO was just emitting w:lvlOverride to actual level where override does happen. But MS Word won't accept override for next level if there are no overrides for previous ones. For example, if we are overriding level 3 we should also emit empty lvlOverride for levels 0-2. Provided fix did cause some problems on DOCX import: overrides were applied to current level, but in this context current != actual level where override did happen. Change-Id: Ia00dd9a5990f7f122027e8126f411642c32da189 Reviewed-on: Tested-by: Jenkins Tested-by: Gabor Kelemen <> Reviewed-by: Thorsten Behrens <>
4 daystdf#149017 fix space distribution in SwFntObj::DrawText()Mark Hung4-61/+128
- Fix logic problem for the last element. - Some glyphs may be made of many sal_Unicode ( ex. Unicode IVS ), take care ( fix ) of the following case a) 1 as the second glyph b) n-1 as the previous glyph. c) nCnt-1 as the last glyph. - Move the code to justify.cxx and its own namespace. Change-Id: Ice2236a54e8290a489fb2d887a326ccc4768213e Reviewed-on: Tested-by: Jenkins Reviewed-by: Mark Hung <>
4 daysExtend loplugin:redundantcast to trivial reinterpret_cast from T to itselfStephan Bergmann2-5/+5
Change-Id: I7c0be7b435d6b5f97bdd40484023584146638d70 Reviewed-on: Tested-by: Jenkins Reviewed-by: Stephan Bergmann <>
4 daysfix CID#1504441 for SwFntObj.Mark Hung1-0/+2
Change-Id: Ia5dfb07e2c3e980f6fd8664f648ef96aa2c0d345 Reviewed-on: Tested-by: Jenkins Reviewed-by: Caolán McNamara <>
5 dayssw: remove images from sample documentXisco Fauli1-0/+0
It was added in 7d20dc2ca69711c61fb1593ad85ccdef282c978d "sw: fix assert in SwObjectFormatterTextFrame" and it contains more than 300kbs of images which are not needed Change-Id: Ib2599baf7b83f83cba45492eccf1f5704aea39e5 Change-Id: I7ecdd5ba7e1251ed334924a3f75f275415d298e4 Reviewed-on: Tested-by: Jenkins Reviewed-by: Xisco Fauli <>
5 dayssw HTML export: avoid pixel height when height is scale and width is relativeMiklos Vajna2-6/+78
Commit b17180a84cb4561b8a7bbf9e2281c91fffd56f87 (write out image size in html export for 'keep ratio' images, 2021-06-29) changed the sw HTML export to write the layout size of images in case one dimension is "keep ratio" and the other is some more concrete value. This is useful in case that other dimension is a fixed value, because "keep ratio" on the UI only means to keep the ratio as the size changes, it does not mean that the ratio will be the original ratio of the bitmap. However, it's problematic to write this layout size of the "keep ratio" dimension when the other dimension is relative, as this will mean the image's aspect ratio will change if the user resizes the browser window. Fix the problem by extending the way we write the "height" and "width" of fly frames: 1) Write a percentage in case of relative sizes 2) Write an explicit "auto" (or just omit the attribute in XHTML mode) in case the size is "keep ratio" and the other dimension is a relative size 3) Write the layout size in other cases (fixed size or "keep ratio", but the other dimension is a fixed size) Note that HTML itself has no concept of relative sizes where 100% is not the parent's size (e.g. page, not paragraph) and also has no concept of keeping an aspect ratio which is not the aspect ratio of the bitmap, so those cases remain unchanged. Change-Id: Ic5c7dc4d697160eff81e960a2f7d335fb78ab7c0 Reviewed-on: Reviewed-by: Miklos Vajna <> Tested-by: Jenkins
5 daystdf#147220 sw_redlinehide: update frames in ReplaceRangeImpl()Michael Stahl2-0/+43
Change-Id: Ie5d62eaec01a3b06ff1bd6070510384641ea7ad3 Reviewed-on: Tested-by: Jenkins Reviewed-by: Michael Stahl <>
5 dayssw: fix assert in SwObjectFormatterTextFrameCaolán McNamara3-1/+9
sw/source/core/layout/objectformattertxtfrm.cxx:237: virtual bool SwObjectFormatterTextFrame::DoFormatObj(SwAnchoredObject&, bool): Assertion `GetPageFrame().GetPhyPageNum() == GetPgNumOfCollected(nIdx)' failed. The problem is that there are multiple (9) flys on text frame 324. In the loop in CalcContent(), frame 324 starts out on page 13, then with the first/second fly moves to page 12, then with the 3rd fly moves forward to page 13 - but the pPageFrame that is passed to SwObjectFormatter::FormatObj() was fetched outside of the loop. (regression from commit c799de145f7e289f31e3669646e5bd12814e6c5e and commit 533a998e540b0f04068c876dde0e74adc3f79c93) Change-Id: Iae573900b4b6558634bfed161e5c95bd5ba27151 Reviewed-on: Tested-by: Jenkins Reviewed-by: Michael Stahl <>
5 daystdf#148461 sw_redlinehide: fix assert in SwContentNode::DelFrames()Michael Stahl1-0/+6
The assert(pMerged->pFirstNode->GetIndex() <= i) is intended for when frames are really deleted, but CheckParaRedlineMerge() calls it while the now-outdated MergedPara is still on the frame, but the nodes already have new flags; assign a dummy node in this situation. Change-Id: I23fbfdb6901e6e15abf92913aa252e59877bc280 Reviewed-on: Tested-by: Jenkins Reviewed-by: Michael Stahl <>
5 daystdf#148869 sw_redlinehide: fix SwView::ExecSpellPopup()Michael Stahl1-2/+8
How could i forget that MovePara(GoCurrPara, fnParaStart) will move to a previous paragraph when it's already at the start of the current one, it's so intuitive. (regression from commit d814941b31b4f9cc8b6e9bd4ddc5188015529707) Change-Id: Ief9bcd42b7ea78feef50ac42bc93580c29c080b2 Reviewed-on: Tested-by: Michael Stahl <> Reviewed-by: Michael Stahl <>
5 daystdf#65067 Remove excessive spacing from Formula objectsRafael Lima1-1/+1
As described in bugs tdf#65067, tdf#103816, tdf#149052 and a few other duplicates, Formula objects in Writer receive 2 unnecessary spacings: 1) From the "Formula" frame style, which has a Left/Right internal spacing of 0.2cm 2) From the Math formula editor itself, that adds an additional 1pt of internal spacing (left/right) In MS Word the default behavior is setting all of these spaces to zero, which makes the formula flow better alongside text in paragraphs. Therefore, this patch set both of these spaces to Zero so that Formula objects in Writer behave similarly as Formulas in MS Word. Change-Id: Iedcef7124afed6b799f85bcefe37016c8fd972e2 Reviewed-on: Tested-by: Jenkins Reviewed-by: Heiko Tietze <> Reviewed-by: Mike Kaganski <>
5 dayssw content controls, picture: add doc model & UNO APIMiklos Vajna8-0/+74
This is meant to be a content control (providing rich text), which is also a picture placeholder field. Add a new Picture property to track this type, this way the click handler will be able to present a file picker when showing the placeholder. Change-Id: Ibbd3720fc94d0f17654ec813821d218166c76424 Reviewed-on: Reviewed-by: Miklos Vajna <> Tested-by: Jenkins
6 dayssw: document SwEditShell::InsertTable()Miklos Vajna1-0/+5
How it interacts with SwCursorShell::MoveTable() is far from trivial. Change-Id: I04c9123c0b39192df43fe32984d66852102ebd1d Reviewed-on: Tested-by: Jenkins Reviewed-by: Miklos Vajna <>
6 daysFix a UITest on WindowsMike Kaganski1-1/+2
Change-Id: I943a7696fd896c8709fdcd25bce650dd80244daf Reviewed-on: Tested-by: Jenkins Reviewed-by: Mike Kaganski <>
6 daysFix a UITest on WindowsMike Kaganski1-1/+1
Change-Id: Ieb6d04e344b1d875f2661833e17f64930681e528 Reviewed-on: Tested-by: Jenkins Reviewed-by: Mike Kaganski <>
6 dayssw content controls, dropdown: edit list items: add modify and deleteMiklos Vajna5-71/+192
Modify is really similar to insert, just we pre-fill the list item properties dialog with old data. Also allow moving items up / down, and eliminate a not needed frame in the inner dialog, which would assert when using the gen backend. With this, the content control dialog is quite complete for dropdowns. Change-Id: I26e77dd881f0a0eea44d2a6137f76fd29ab32fc5 Reviewed-on: Reviewed-by: Miklos Vajna <> Tested-by: Jenkins
6 daystdf#137748 make keyboard accelerators functional in Statistics dialogSeth Chaiklin1-0/+9
Make the keyboard accelerators in the Statistics tab of the File - Properties dialog select the text of the fields that they label. Change-Id: I61a93e227ed1e457355dc971dc4864ab4419a770 Reviewed-on: Tested-by: Jenkins Reviewed-by: Caolán McNamara <>
6 daysMake media object delete when it is cutJim Raykowski1-1/+1
Change-Id: Id586e015e42c23aa455d6f1a5dc42fbda492d2a7 Reviewed-on: Tested-by: Jenkins Reviewed-by: Jim Raykowski <>
6 daysRelated: tdf#137748 "Update" should have use-underlineCaolán McNamara1-0/+1
Change-Id: I8303cd8d2cabd8888797758870480483661d8801 Reviewed-on: Reviewed-by: Adolfo Jayme Barrientos <> Tested-by: Jenkins
6 dayssw content controls, dropdown: edit list items in the properties dialogMiklos Vajna13-5/+547
- add a weld::TreeView to show existing display name - value pairs - add a button to add a new list item, together with a new SwContentControlListItemDlg to specify the list item properties + write the changed list back to the doc model Change-Id: I9243be84eb0af65437eccfb48c6780787609bc68 Reviewed-on: Reviewed-by: Miklos Vajna <> Tested-by: Jenkins
6 dayssw: prefix members of SwMSDffManager, SwWW8FltControlStack, ...Miklos Vajna3-66/+66
... SwWW8FltRefStack and SwWW8ReferencedFltEndStack See tdf#94879 for motivation. Change-Id: I93ac7230bc383433d7232c5d14ed98339620316f Reviewed-on: Reviewed-by: Miklos Vajna <> Tested-by: Jenkins
6 daysstd::stable_sort() where libc++ debug mode breaks a unittestLuboš Luňák2-2/+2
Libc++ debug has a feature that randomizes equal elements during sort, which normally wouldn't make a difference, but some tests rely on specific order of tested data. The ones failing without this include: CppunitTest_sw_ooxmlexport testMsoPosition CppunitTest_sw_xhtmlexport testTdf66305 CppunitTest_sw_ww8export testCommentExport Change-Id: Id49846939a264150cc82091718ffe6b904d7130e Reviewed-on: Tested-by: Jenkins Reviewed-by: Luboš Luňák <>
7 daystdf#149049 related: fix media object inserts twice in WriterJim Raykowski1-0/+2
Change-Id: Id7a7b845e0255086eb877d21699ddb0b80cc47c1 Reviewed-on: Tested-by: Jenkins Tested-by: Caolán McNamara <> Reviewed-by: Caolán McNamara <>
8 daysRelated tdf#149072: avoid warning "misuse of method"Julien Nabet1-2/+3
complete warning log: <SwTextFormatColl::GetAssignedOutlineStyleLevel()> - misuse of method part of bt when opening attachment of tdf#149072 0 SwTextFormatColl::GetAssignedOutlineStyleLevel() const (this=0x77064d0) at sw/source/core/doc/fmtcol.cxx:608 1 0x00007f8a52aa7941 in sw::(anonymous namespace)::HeaderCheck::check(SwNode*) (this=0xa457630, pCurrent=0x7705e98) at sw/source/core/access/AccessibilityCheck.cxx:622 2 0x00007f8a52a9a6a3 in sw::AccessibilityCheck::check() (this=0x7ffe4a14ab10) at sw/source/core/access/AccessibilityCheck.cxx:947 3 0x00007f8a53ed2ad7 in SwDocShell::runAccessibilityCheck() (this=0x74ef0e0) at sw/source/uibase/app/docst.cxx:1559 4 0x00007f8a16e7fdec in ImpPDFTabDialog::OkHdl(weld::Button&) (this=0xa0e9990) at filter/source/pdf/impdialog.cxx:324 5 0x00007f8a16e7fb2d in ImpPDFTabDialog::LinkStubOkHdl(void*, weld::Button&) (instance=0xa0e9990, data=...) at filter/source/pdf/impdialog.cxx:317 Change-Id: I2ed50f14eff01babd47ada3831c0a051fc767dbe Reviewed-on: Tested-by: Jenkins Reviewed-by: Julien Nabet <>
8 daystdf#121740 cache hashcode in SequenceAsHashMapNoel Grandin1-10/+14
shaves 2% off load time Change-Id: I5bd4eabf61205df21a27d2822acd2676a7732a3d Reviewed-on: Tested-by: Noel Grandin <> Reviewed-by: Noel Grandin <>
8 daysPartially resolve: tdf#149010 rename section "Names" -> "Accessibility"Seth Chaiklin1-1/+1
Change-Id: I2f9f38ae79f0f05b42e6f209d504c5f8a5896ed3 Reviewed-on: Tested-by: Jenkins Reviewed-by: Adolfo Jayme Barrientos <>
9 daystdf#149074 SvHeaderTabListBox not handling lack of preset column widths wellCaolán McNamara1-0/+1
Change-Id: Ibd33fe5c5168850eca1bdc7242afc38ed08b5fa2 Reviewed-on: Tested-by: Jenkins Reviewed-by: Caolán McNamara <>
9 dayssw content controls, dropdown: add an initial properties dialogMiklos Vajna27-27/+329
- read the doc model: show if a content control is a placeholder or not - work with a shared pointer in the dialog, which avoids lifetime issues in case the content control we edit in one view gets deleted in an other view - write the doc model: set the placeholder mode of the content control based on the checkbox state and mark the doc as modified if any widget is touched when pressing OK - handle command state: allow this dialog only inside content controls Change-Id: Ie0b9075ccd3450dd403cc7f8bbf93fc04de3b234 Reviewed-on: Reviewed-by: Miklos Vajna <> Tested-by: Jenkins
9 daysadd SvStream::ReadLine(OStringBuffer... to reduce OString allocationNoel Grandin3-3/+3
and use it where possible Change-Id: I3efc7a642f73661ce606c917c0323ba9948521c6 Reviewed-on: Tested-by: Jenkins Reviewed-by: Noel Grandin <>
9 dayssw content controls, dropdown: add LOK APIMiklos Vajna4-0/+136
- expose the available list items in a new "items" key of the LOK_CALLBACK_CONTENT_CONTROL callback - add a new lok::Document::sendContentControlEvent() function to be able to select a list item from the current drop-down - add a new listbox to the gtktiledviewer toolbar to select a content control list item when the cursor is inside a dropdown - add tests for the array API of tools::JsonWriter Change-Id: I47f1333a7815d67952f7c20a9cba1b248886f6dd Reviewed-on: Reviewed-by: Miklos Vajna <> Tested-by: Jenkins
10 daysCppunitTest_sw_layoutwriter: use more SwParaPortion::dumpAsXml()Miklos Vajna1-117/+265
See commit feeed3e762cf077fbd9cf48f82e949365108ccc1 (CppunitTest_sw_layoutwriter: avoid some a11y-based layout testing, 2022-04-07) for motivation. Change-Id: Ie52b96e1d7a5e5e2d55d9f68f7756e21b86ea9b6 Reviewed-on: Tested-by: Jenkins Reviewed-by: Miklos Vajna <>
10 daystdf#104930 aligning CTL text with hanging baseline.Mark Hung10-2/+55
1. SwTextSizeInfo::GetHangingBaseline() calls SwFont::GetHangingBaseline() to obtain the hanging baseline value. Only CTL script handled, it always return 0 for other two scripts. Eventually Outdev::GetFontMetric() and TextMetric::GetHangingBaseline() are called to obtain the hanging baseline value from vcl. 2. SwTextFormatter::CalcAscent() sets the baseline value for the portion via SwTextSizeInfo::GetHangingBaseline(). 3. SwTextFormatter::InsertPortion() sets the maximum baseline value for the whole line. 4. SwTextCursor::AdjustBaseLine() calculates the new baseline in case hanging baseline is available. Change-Id: I1aae7a34dfc953227b7873fc8e3af5cc7e2fbbff Reviewed-on: Tested-by: Jenkins Reviewed-by: Mark Hung <>
10 dayssw content controls: fixes for the ending dummy charMiklos Vajna13-3/+196
- make sure the DOC/RTF export doesn't write the dummy char as-is - let "enter" only insert a linebreak while inside a content control, to ensure that the starting and ending dummy char stays inside the same text node - let deletion of the dummy character at the end behave the same as the start dummy character: if trying to delete that single character, then just move the cursor, don't delete it - reject document insertion in the middle of a content control, similar to input fields Change-Id: I9b54ef50261e6b17f38eadadacfe1e1111199e96 Reviewed-on: Tested-by: Jenkins Reviewed-by: Miklos Vajna <>
10 dayssw: fix crash in SwDrawShell::Execute()Miklos Vajna1-0/+5
Crashreport signature: SwDrawShell::Execute(SfxRequest&) [clone .cold] include/svx/svdhdl.hxx:194 SfxDispatcher::Call_Impl(SfxShell&, SfxSlot const&, SfxRequest&, bool) sfx2/source/control/dispatch.cxx:255 which is a bit tricky to read (probably due to LTO), but what happens here is that the handle index is user input and we look at index up in a list without error handling. This is a problem since commit 7eed711a6115bf892c998cbd73a2c5b706c6f99d (Extended MoveShapeHandle command for Anchors as well, 2021-05-24), which assumed that handle indexes and the handle list can't get out of sync. Fix the problem similar to what commit 48beccf52413981d3d1c525a81a2c57048abe261 (sw: fix crash in SwView::Execute(), 2021-09-03) did at SID_MOVE_SHAPE_HANDLE handler for Writer images (this one is for Draw shapes). This fix just makes sure we don't crash, there may be some deeper reason why the handle index is out of sync with the handle list in the first place. Change-Id: I8f3a25d74082984cedce09362a690f24d7236ba6 Reviewed-on: Tested-by: Jenkins Reviewed-by: Miklos Vajna <>
10 dayssw content controls, dropdown: add insert UIMiklos Vajna14-4/+87
- introduce a SwContentControlListItem::ToString() that tries to use the display text of the list item, otherwise falls back to its value and use it while building the dropdown widget and when inserting selected list item - handle the dropdown case in SwWrtShell::InsertContentControl() - expose this as a new .uno:InsertDropdownContentControl command - mention the new and all previous content control commands in the MS-compatible forms menu as well Change-Id: I075f77933c1466b5258357d5a661e173c34de34f Reviewed-on: Reviewed-by: Miklos Vajna <> Tested-by: Jenkins