[Libreoffice-commits] core.git: Branch 'libreoffice-7-1' - sw/source
sw/source/core/layout/paintfrm.cxx |4 1 file changed, 4 insertions(+) New commits: commit 093392709e8f50fe4484977b61dfe47b5ed8968a Author: Justin Luth AuthorDate: Mon Sep 20 15:25:01 2021 +0200 Commit: Xisco Fauli CommitDate: Tue Sep 21 10:26:50 2021 +0200 Revert "tdf#99492 sw layout: always paint merged cell grids" This reverts LO 7.1 commit c016fe2b5918d6e53113e100b1126076b6e1a6a3. This failed for two reasons. 1.) If it is not a solid color (like a graphic for example) then the graphic is going to be repeated in each cell. 2.) This is NOT actually repainting the visible cell's background. It is painting the hidden cell - which MIGHT be different from the visible cell (in the case of a solid color). Since this will require a completely different approach, I am just reverting this. Thanks Mike for finding an example document that shows the flaws. Change-Id: Icdc21e09118e7c33ac9f7ede23c913b95ad69c93 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122366 Tested-by: Jenkins Reviewed-by: Justin Luth (cherry picked from commit eb830ad284f245165b6ab5e8647d48834622f2d5) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122281 (cherry picked from commit 20672741eded49de01e8b7bc660e115f404203aa) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122286 Reviewed-by: Xisco Fauli diff --git a/sw/source/core/layout/paintfrm.cxx b/sw/source/core/layout/paintfrm.cxx index 12536c52a054..61cb0fc8e25c 100644 --- a/sw/source/core/layout/paintfrm.cxx +++ b/sw/source/core/layout/paintfrm.cxx @@ -6194,6 +6194,10 @@ void SwFrame::PaintSwFrameBackground( const SwRect , const SwPageFrame *pP return; } +// nothing to do for covered table cells: +if( IsCellFrame() && IsCoveredCell() ) +return; + SwViewShell *pSh = gProp.pSGlobalShell; // #i16816# tagged pdf support
[Libreoffice-commits] core.git: Branch 'libreoffice-7-1' - sw/source
sw/source/uibase/dbui/mailmergetoolbarcontrols.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 270f7e1e86542ad6d50a44e096e1e77a30a8d0d6 Author: Caolán McNamara AuthorDate: Fri Sep 10 13:58:13 2021 +0100 Commit: Caolán McNamara CommitDate: Mon Sep 13 17:11:31 2021 +0200 Resolves: tdf#143777 Exclude recipient is always greyed out Change-Id: I6ce94fad6ba518457665ae6d6b473cfe6f80849f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121883 Tested-by: Jenkins Reviewed-by: Caolán McNamara diff --git a/sw/source/uibase/dbui/mailmergetoolbarcontrols.cxx b/sw/source/uibase/dbui/mailmergetoolbarcontrols.cxx index 00f9a079fbb7..827b2aef1b0c 100644 --- a/sw/source/uibase/dbui/mailmergetoolbarcontrols.cxx +++ b/sw/source/uibase/dbui/mailmergetoolbarcontrols.cxx @@ -386,7 +386,7 @@ void MMExcludeEntryController::statusChanged(const frame::FeatureStateEvent& rEv } else { -m_xExcludeCheckbox->set_sensitive(false); +m_xExcludeCheckbox->set_sensitive(true); m_xExcludeCheckbox->set_active(xConfigItem->IsRecordExcluded(xConfigItem->GetResultSetPosition())); } }
[Libreoffice-commits] core.git: Branch 'libreoffice-7-1' - sw/source
sw/source/uibase/shells/textsh1.cxx |4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) New commits: commit 16186a8bed2d241b1dd5711637b9d4c07ca0e1e4 Author: Caolán McNamara AuthorDate: Mon Aug 23 16:55:27 2021 +0100 Commit: Caolán McNamara CommitDate: Tue Aug 24 12:52:49 2021 +0200 rhbz#1996735 SwEditShell::GetCorrection can return null Though the exact steps to reproduce are unknown. From the text seen in the backtrace the language is possibly Finnish in which case voikko is probably the spellchecking backend in use. Change-Id: I9b3186e4699946235ccc161575bba7d4a3820565 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120879 Reviewed-by: Michael Stahl Tested-by: Jenkins diff --git a/sw/source/uibase/shells/textsh1.cxx b/sw/source/uibase/shells/textsh1.cxx index 7ebde86a383c..416982ada3a9 100644 --- a/sw/source/uibase/shells/textsh1.cxx +++ b/sw/source/uibase/shells/textsh1.cxx @@ -1500,7 +1500,9 @@ void SwTextShell::Execute(SfxRequest ) else if (sApplyText == "Spelling") { SwRect aToFill; -uno::Reference< linguistic2::XSpellAlternatives > xSpellAlt( rWrtSh.GetCorrection(nullptr, aToFill) ); +uno::Reference xSpellAlt(rWrtSh.GetCorrection(nullptr, aToFill)); +if (!xSpellAlt.is()) +return; uno::Reference< linguistic2::XDictionary > xDictionary = LinguMgr::GetIgnoreAllList(); OUString sWord(xSpellAlt->getWord()); linguistic::DictionaryError nAddRes = linguistic::AddEntryToDic( xDictionary,
[Libreoffice-commits] core.git: Branch 'libreoffice-7-1' - sw/source
sw/source/filter/ww8/ww8par.cxx |3 --- sw/source/filter/ww8/ww8par.hxx |3 +-- sw/source/filter/ww8/ww8par2.cxx |1 - 3 files changed, 1 insertion(+), 6 deletions(-) New commits: commit b888acd3c9b37c831b65c5d8aff98026046b2595 Author: Caolán McNamara AuthorDate: Tue Aug 17 09:15:13 2021 +0100 Commit: Xisco Fauli CommitDate: Tue Aug 17 15:59:26 2021 +0200 Resolves: tdf#142003 tracked changes in footnotes offset in .doc import Reverts: commit e71d05eaa9a8c9e628b256f3e889b85ac11ed474 Author: Caolán McNamara Date: Fri Apr 27 15:42:26 2018 +0100 ofz#8038 defer subdocument redlining to end of parse like main document Change-Id: Ie8d7a98c7927dcba53228ebcd991d715d8faabe7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120563 Tested-by: Jenkins Reviewed-by: Caolán McNamara (cherry picked from commit b5870d727685ec10447e8ae446ada895250fec2e) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120581 Reviewed-by: Xisco Fauli diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx index d72f51d240f6..2caf356dc5d6 100644 --- a/sw/source/filter/ww8/ww8par.cxx +++ b/sw/source/filter/ww8/ww8par.cxx @@ -2090,7 +2090,6 @@ void WW8ReaderSave::Restore( SwWW8ImplReader* pRdr ) pRdr->m_xCtrlStck = std::move(mxOldStck); pRdr->m_xRedlineStack->closeall(*pRdr->m_pPaM->GetPoint()); -pRdr->m_aFrameRedlines.emplace(std::move(pRdr->m_xRedlineStack)); pRdr->m_xRedlineStack = std::move(mxOldRedlines); pRdr->DeleteAnchorStack(); @@ -5381,8 +5380,6 @@ ErrCode SwWW8ImplReader::CoreLoad(WW8Glossary const *pGloss) // are updated m_aExtraneousParas.delete_all_from_doc(); m_xRedlineStack->closeall(*m_pPaM->GetPoint()); -while (!m_aFrameRedlines.empty()) -m_aFrameRedlines.pop(); // For i120928,achieve the graphics from the special bookmark with is for graphic bullet { diff --git a/sw/source/filter/ww8/ww8par.hxx b/sw/source/filter/ww8/ww8par.hxx index 07beb3592bff..9626adf3767f 100644 --- a/sw/source/filter/ww8/ww8par.hxx +++ b/sw/source/filter/ww8/ww8par.hxx @@ -1105,8 +1105,7 @@ private: This stack is for redlines, because their sequence of discovery can be out of order of their order of insertion into the document. */ -std::stack> m_aFrameRedlines; //inside frames, tables, etc -std::unique_ptr m_xRedlineStack;//main document +std::unique_ptr m_xRedlineStack; /* This stack is for fields that get referenced later, e.g. BookMarks and TOX. diff --git a/sw/source/filter/ww8/ww8par2.cxx b/sw/source/filter/ww8/ww8par2.cxx index bf5a27528b6e..ad64bb616bd1 100644 --- a/sw/source/filter/ww8/ww8par2.cxx +++ b/sw/source/filter/ww8/ww8par2.cxx @@ -2750,7 +2750,6 @@ void WW8TabDesc::MoveOutsideTable() void WW8TabDesc::FinishSwTable() { m_pIo->m_xRedlineStack->closeall(*m_pIo->m_pPaM->GetPoint()); -m_pIo->m_aFrameRedlines.emplace(std::move(m_pIo->m_xRedlineStack)); m_pIo->m_xRedlineStack = std::move(mxOldRedlineStack); WW8DupProperties aDup(m_pIo->m_rDoc,m_pIo->m_xCtrlStck.get());
[Libreoffice-commits] core.git: Branch 'libreoffice-7-1' - sw/source
sw/source/uibase/shells/drawdlg.cxx |9 ++--- sw/source/uibase/shells/drwbassh.cxx |2 ++ 2 files changed, 8 insertions(+), 3 deletions(-) New commits: commit 6fc0b5ce07eee825d6f8a2741dfe1fa7a9238bea Author: Caolán McNamara AuthorDate: Mon Aug 16 15:32:07 2021 +0100 Commit: Adolfo Jayme Barrientos CommitDate: Tue Aug 17 15:16:35 2021 +0200 tdf#143778 these async callbacks expect to have SdrModel::IsChanged of false when they are entered. They are adapted from the original non-async SwDrawShell::ExecDrawDlg where the start of SwDrawShell::ExecDrawDlg has... bool bChanged = pDoc->IsChanged(); pDoc->SetChanged(false); and the end has if (pDoc->IsChanged()) GetShell().SetModified(); else if (bChanged) pDoc->SetChanged(); and before async dialogs the start and end happened before and after the dialog appeared and disappeared. The intent seems to be unset the sdrmodel-changed and restore its original state if the dialogs caused nothing to happen and to explicitly set SetModified on the document if something did. Now the async dialogs callback happens after SwDrawShell::ExecDrawDlg has ended and so the callbacks start with SdrModel::IsChanged at its original value (restored by the end of ExecDrawDlg), not the "false" they were originally written to expect. For simplicity set the SdrModel IsChanged to false at the start of the callbacks and continue to restore to the passed in bChanged state if there was no changes by the callback. Change-Id: I671b35acab6d1b391fa7e6590c09f8be135449b0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120548 Tested-by: Jenkins Reviewed-by: Caolán McNamara (cherry picked from commit c64f221fc2e22ffa60c4d78240893f7f04531b3e) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120576 Reviewed-by: Adolfo Jayme Barrientos diff --git a/sw/source/uibase/shells/drawdlg.cxx b/sw/source/uibase/shells/drawdlg.cxx index 114b7f33b055..c80f4960f657 100644 --- a/sw/source/uibase/shells/drawdlg.cxx +++ b/sw/source/uibase/shells/drawdlg.cxx @@ -115,6 +115,8 @@ void SwDrawShell::ExecDrawDlg(SfxRequest& rReq) pDlg->StartExecuteAsync([bChanged, bHasMarked, pDoc, pDlg, pSh, pView, this]( sal_Int32 nResult){ +pDoc->SetChanged(false); + if (nResult == RET_OK) { pSh->StartAction(); @@ -168,6 +170,8 @@ void SwDrawShell::ExecDrawDlg(SfxRequest& rReq) pDlg->StartExecuteAsync([bChanged, bHasMarked, pDoc, pDlg, pSh, pView, this]( sal_Int32 nResult){ +pDoc->SetChanged(false); + if (nResult == RET_OK) { pSh->StartAction(); @@ -210,9 +214,8 @@ void SwDrawShell::ExecDrawDlg(SfxRequest& rReq) if (pDoc->IsChanged()) GetShell().SetModified(); -else -if (bChanged) -pDoc->SetChanged(); +else if (bChanged) +pDoc->SetChanged(); } namespace diff --git a/sw/source/uibase/shells/drwbassh.cxx b/sw/source/uibase/shells/drwbassh.cxx index f901f32cc15d..274a60c52028 100644 --- a/sw/source/uibase/shells/drwbassh.cxx +++ b/sw/source/uibase/shells/drwbassh.cxx @@ -235,6 +235,8 @@ void SwDrawBaseShell::Execute(SfxRequest const ) pDlg->StartExecuteAsync([bCaption, bChanged, pDlg, pFrameFormat, pSdrView, pSh, , this]( sal_Int32 nResult){ +pSdrView->GetModel()->SetChanged(false); + if (nResult == RET_OK) { SwFormatVertOrient aVOrientFinal(pFrameFormat->GetFormatAttr(RES_VERT_ORIENT));
[Libreoffice-commits] core.git: Branch 'libreoffice-7-1' - sw/source
sw/source/uibase/sidebar/PageStylesPanel.cxx |6 ++ 1 file changed, 6 insertions(+) New commits: commit 420fa261a1bb5db9c6367cd4bbf9984c79b296cc Author: Caolán McNamara AuthorDate: Fri Aug 13 09:44:09 2021 +0100 Commit: Adolfo Jayme Barrientos CommitDate: Mon Aug 16 08:37:58 2021 +0200 tdf#139811 trigger layout when content changes in writer styles panel of page deck which is similar to the draw case of tdf#143795. Doing this always in PanelLayout::queue_resize might make the most sense rather than these manual triggers, but do it this way initially for a safe backport. Change-Id: I4bd2e9cb9d52b66a73cd0615406052e19e6e8b51 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120369 Tested-by: Jenkins Reviewed-by: Adolfo Jayme Barrientos diff --git a/sw/source/uibase/sidebar/PageStylesPanel.cxx b/sw/source/uibase/sidebar/PageStylesPanel.cxx index 1815466c1df9..64260077a54c 100644 --- a/sw/source/uibase/sidebar/PageStylesPanel.cxx +++ b/sw/source/uibase/sidebar/PageStylesPanel.cxx @@ -27,6 +27,7 @@ #include #include #include "PageStylesPanel.hxx" +#include #include #include #include @@ -249,6 +250,11 @@ void PageStylesPanel::Update() default: break; } + +// Need to do a relayouting, otherwise the panel size is not updated after show / hide controls +sfx2::sidebar::Panel* pPanel = dynamic_cast(GetParent()); +if (pPanel) +pPanel->TriggerDeckLayouting(); } Color const & PageStylesPanel::GetColorSetOrDefault()
[Libreoffice-commits] core.git: Branch 'libreoffice-7-1' - sw/source
sw/source/filter/html/css1atr.cxx |4 +++- sw/source/filter/html/htmltabw.cxx |9 ++--- sw/source/filter/html/wrthtml.hxx |2 +- 3 files changed, 10 insertions(+), 5 deletions(-) New commits: commit 5c705fbd9e4d231fed87b7e8ac06d8b7d4c6891f Author: Caolán McNamara AuthorDate: Thu Aug 12 12:55:30 2021 +0100 Commit: Adolfo Jayme Barrientos CommitDate: Fri Aug 13 13:02:38 2021 +0200 Resolves: tdf#132739 two style tags where there should be just one Change-Id: Id9c8c8cc8c5ffdd21ba79ff39a6279cf2ddc8025 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120360 Tested-by: Jenkins Reviewed-by: Adolfo Jayme Barrientos diff --git a/sw/source/filter/html/css1atr.cxx b/sw/source/filter/html/css1atr.cxx index 7b1a5cc19be3..c401d95a788f 100644 --- a/sw/source/filter/html/css1atr.cxx +++ b/sw/source/filter/html/css1atr.cxx @@ -2113,10 +2113,12 @@ void SwHTMLWriter::OutCSS1_TableFrameFormatOptions( const SwFrameFormat& rFrameF Strm().WriteChar( '\"' ); } -void SwHTMLWriter::OutCSS1_TableCellBorderHack(SwFrameFormat const& rFrameFormat) +void SwHTMLWriter::OutCSS1_TableCellBordersAndBG(SwFrameFormat const& rFrameFormat, const SvxBrushItem *pBrushItem) { SwCSS1OutMode const aMode( *this, CSS1_OUTMODE_STYLE_OPT_ON|CSS1_OUTMODE_ENCODE|CSS1_OUTMODE_TABLEBOX, nullptr ); +if (pBrushItem) +OutCSS1_SvxBrush(*this, *pBrushItem, Css1Background::Table, nullptr); OutCSS1_SvxBox(*this, rFrameFormat.GetBox()); if (!m_bFirstCSS1Property) { diff --git a/sw/source/filter/html/htmltabw.cxx b/sw/source/filter/html/htmltabw.cxx index 4c83319747b7..63812a9b3ef6 100644 --- a/sw/source/filter/html/htmltabw.cxx +++ b/sw/source/filter/html/htmltabw.cxx @@ -424,11 +424,14 @@ void SwHTMLWrtTable::OutTableCell( SwHTMLWriter& rWrt, // Avoid non-CSS version in the ReqIF case. rWrt.OutBackground( pBrushItem, false ); -if( rWrt.m_bCfgOutStyles ) -OutCSS1_TableBGStyleOpt( rWrt, *pBrushItem ); +if (!rWrt.m_bCfgOutStyles) +pBrushItem = nullptr; } -rWrt.OutCSS1_TableCellBorderHack(*pBox->GetFrameFormat()); +// tdf#132739 with rWrt.m_bCfgOutStyles of true bundle the brush item css +// properties into the same "style" tag as the borders so there is only one +// style tag +rWrt.OutCSS1_TableCellBordersAndBG(*pBox->GetFrameFormat(), pBrushItem); sal_uInt32 nNumFormat = 0; double nValue = 0.0; diff --git a/sw/source/filter/html/wrthtml.hxx b/sw/source/filter/html/wrthtml.hxx index ab282ba652ff..f82325ee50ae 100644 --- a/sw/source/filter/html/wrthtml.hxx +++ b/sw/source/filter/html/wrthtml.hxx @@ -484,7 +484,7 @@ public: void writeFrameFormatOptions(HtmlWriter& aHtml, const SwFrameFormat& rFrameFormat, const OUString& rAltText, HtmlFrmOpts nFrameOpts); void OutCSS1_TableFrameFormatOptions( const SwFrameFormat& rFrameFormat ); -void OutCSS1_TableCellBorderHack(const SwFrameFormat& rFrameFormat); +void OutCSS1_TableCellBordersAndBG(const SwFrameFormat& rFrameFormat, const SvxBrushItem *pBrushItem); void OutCSS1_SectionFormatOptions( const SwFrameFormat& rFrameFormat, const SwFormatCol *pCol ); void OutCSS1_FrameFormatOptions( const SwFrameFormat& rFrameFormat, HtmlFrmOpts nFrameOpts, const SdrObject *pSdrObj=nullptr,
[Libreoffice-commits] core.git: Branch 'libreoffice-7-1' - sw/source
sw/source/ui/dialog/uiregionsw.cxx |1 - 1 file changed, 1 deletion(-) New commits: commit c35282c8f9c06b7804101dddc5a5d3c8dec267d2 Author: Caolán McNamara AuthorDate: Tue Aug 3 11:19:46 2021 +0100 Commit: Adolfo Jayme Barrientos CommitDate: Sun Aug 8 12:29:13 2021 +0200 tdf#143626 "protect" always shown checked for sections linked to file Change-Id: I8a403a25ae5c5e3b6183ba559b0224f2886eb925 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119862 Tested-by: Jenkins Reviewed-by: Adolfo Jayme Barrientos diff --git a/sw/source/ui/dialog/uiregionsw.cxx b/sw/source/ui/dialog/uiregionsw.cxx index 843083c99eb4..d9ba3fcbb9ab 100644 --- a/sw/source/ui/dialog/uiregionsw.cxx +++ b/sw/source/ui/dialog/uiregionsw.cxx @@ -952,7 +952,6 @@ IMPL_LINK(SwEditRegionDlg, UseFileHdl, weld::ToggleButton&, rButton, void) if( bFile ) { m_xProtectCB->set_state(TRISTATE_TRUE); -ChangeProtectHdl(*m_xProtectCB); m_xFileNameED->grab_focus(); }
[Libreoffice-commits] core.git: Branch 'libreoffice-7-1' - sw/source sw/uiconfig
sw/source/ui/index/cnttab.cxx|5 +++-- sw/uiconfig/swriter/ui/assignstylesdialog.ui |1 + 2 files changed, 4 insertions(+), 2 deletions(-) New commits: commit 660a8eae3c5d92f08bf72342f41fd97249099ab5 Author: Caolán McNamara AuthorDate: Thu Aug 5 11:18:45 2021 +0100 Commit: Adolfo Jayme Barrientos CommitDate: Sat Aug 7 01:34:17 2021 +0200 Resolves: tdf#143720 treeview not resizing to fill available space Change-Id: I041c3a743b8624f49bfe57e8a4469535e334e5dc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120068 Tested-by: Jenkins Reviewed-by: Adolfo Jayme Barrientos diff --git a/sw/source/ui/index/cnttab.cxx b/sw/source/ui/index/cnttab.cxx index bcabdc6aabbb..23b14d20e410 100644 --- a/sw/source/ui/index/cnttab.cxx +++ b/sw/source/ui/index/cnttab.cxx @@ -513,7 +513,8 @@ SwAddStylesDlg_Impl::SwAddStylesDlg_Impl(weld::Window* pParent, aWidths.push_back(m_xHeaderTree->get_pixel_size(sTitle).Width() + nPadding); } m_xHeaderTree->set_column_fixed_widths(aWidths); -auto nWidth = std::accumulate(aWidths.begin(), aWidths.end(), 0); +auto nWidth = std::accumulate(aWidths.begin(), aWidths.end(), + Application::GetSettings().GetStyleSettings().GetScrollBarSize()); m_xHeaderTree->set_size_request(nWidth, m_xHeaderTree->get_height_rows(15)); int nRow(0); @@ -576,7 +577,7 @@ SwAddStylesDlg_Impl::SwAddStylesDlg_Impl(weld::Window* pParent, IMPL_LINK(SwAddStylesDlg_Impl, TreeSizeAllocHdl, const Size&, rSize, void) { -auto nWidth = rSize.Width(); +auto nWidth = rSize.Width() - Application::GetSettings().GetStyleSettings().GetScrollBarSize(); std::vector aWidths; aWidths.push_back(0); diff --git a/sw/uiconfig/swriter/ui/assignstylesdialog.ui b/sw/uiconfig/swriter/ui/assignstylesdialog.ui index 33902bf15a0e..51c846eb27c5 100644 --- a/sw/uiconfig/swriter/ui/assignstylesdialog.ui +++ b/sw/uiconfig/swriter/ui/assignstylesdialog.ui @@ -186,6 +186,7 @@ True False start +True 12
[Libreoffice-commits] core.git: Branch 'libreoffice-7-1' - sw/source
sw/source/core/crsr/crsrsh.cxx |1 + sw/source/core/inc/wrong.hxx |1 + sw/source/core/text/wrong.cxx |4 ++-- 3 files changed, 4 insertions(+), 2 deletions(-) New commits: commit 41b49f16e7c90c52eeb063f1c4f0ece9b35b51bc Author: Julien Nabet AuthorDate: Wed Jul 21 22:36:54 2021 +0200 Commit: Noel Grandin CommitDate: Fri Jul 23 10:46:10 2021 +0200 tdf#143464: fix SmartTag management by putting back missing information in lcl_FillRecognizerData Regression from e98711c14db9348f4d3f7d0f5bbde9276a3e73bc loplugin:unusedfields in sw (2018-12-12) Change-Id: I2e99df1a712915851c30c018a1f7279756da72de Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119346 Tested-by: Jenkins Reviewed-by: Noel Grandin (cherry picked from commit 717ec99667f5a9ab570f1c8581e2d7a0241c32f6) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119263 Reviewed-by: Michael Stahl (cherry picked from commit 6d799778945e5481a50ffdbb908a188f6ec77aae) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119264 diff --git a/sw/source/core/crsr/crsrsh.cxx b/sw/source/core/crsr/crsrsh.cxx index 861c1f4ea714..b422acded3eb 100644 --- a/sw/source/core/crsr/crsrsh.cxx +++ b/sw/source/core/crsr/crsrsh.cxx @@ -3667,6 +3667,7 @@ static void lcl_FillRecognizerData( std::vector< OUString >& rSmartTagTypes, if ( pArea ) { rSmartTagTypes.push_back( pArea->maType ); +aStringKeyMaps.push_back( pArea->mxPropertyBag ); } } } diff --git a/sw/source/core/inc/wrong.hxx b/sw/source/core/inc/wrong.hxx index ac1e2a4db165..c0e394d0c9c6 100644 --- a/sw/source/core/inc/wrong.hxx +++ b/sw/source/core/inc/wrong.hxx @@ -67,6 +67,7 @@ class SwWrongArea { public: OUString maType; +css::uno::Reference< css::container::XStringKeyMap > mxPropertyBag; sal_Int32 mnPos; sal_Int32 mnLen; SwWrongList* mpSubList; diff --git a/sw/source/core/text/wrong.cxx b/sw/source/core/text/wrong.cxx index 5a70c7be9507..ba9c2052fff6 100644 --- a/sw/source/core/text/wrong.cxx +++ b/sw/source/core/text/wrong.cxx @@ -29,7 +29,7 @@ SwWrongArea::SwWrongArea( const OUString& rType, WrongListType listType, css::uno::Reference< css::container::XStringKeyMap > const & xPropertyBag, sal_Int32 nPos, sal_Int32 nLen) -: maType(rType), mnPos(nPos), mnLen(nLen), mpSubList(nullptr) +: maType(rType), mxPropertyBag(xPropertyBag), mnPos(nPos), mnLen(nLen), mpSubList(nullptr) { mColor = getWrongAreaColor(listType, xPropertyBag); mLineType = getWrongAreaLineType(listType, xPropertyBag); @@ -40,7 +40,7 @@ SwWrongArea::SwWrongArea( const OUString& rType, sal_Int32 nPos, sal_Int32 nLen, SwWrongList* pSubList) -: maType(rType), mnPos(nPos), mnLen(nLen), mpSubList(pSubList), mLineType(WRONGAREA_NONE) +: maType(rType), mxPropertyBag(xPropertyBag), mnPos(nPos), mnLen(nLen), mpSubList(pSubList), mLineType(WRONGAREA_NONE) { if (pSubList != nullptr) { ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-7-1' - sw/source
sw/source/uibase/shells/textsh1.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 1721cc19fc6d5bd587642a13919e004d4636d7f2 Author: Miklos Vajna AuthorDate: Fri Jul 16 09:09:52 2021 +0200 Commit: Xisco Fauli CommitDate: Mon Jul 19 15:54:41 2021 +0200 sw: xDictionary may be an empty reference in SID_SPELLCHECK_IGNORE_ALL Seen in a crashreport: handleFatalSignal ./common/SigUtil.cpp:255 /lib/x86_64-linux-gnu/libpthread.so.0 __restore_rt ??:? program/../program/libswlo.so SwTextShell::Execute(SfxRequest&) sw/source/uibase/shells/textsh1.cxx:1496 Change-Id: I709f361a1396abbb07cea06509afc41bb5f5c9a3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119067 Reviewed-by: Miklos Vajna Tested-by: Jenkins (cherry picked from commit 801b607fc6b3890eb36d310074f1a68db9ae1f5e) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119173 Reviewed-by: Michael Stahl (cherry picked from commit 426c6ee3b4dfe64d07e7e01eefd1d16defa913bf) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119176 Reviewed-by: Xisco Fauli diff --git a/sw/source/uibase/shells/textsh1.cxx b/sw/source/uibase/shells/textsh1.cxx index a41c9e9d3d9c..7ebde86a383c 100644 --- a/sw/source/uibase/shells/textsh1.cxx +++ b/sw/source/uibase/shells/textsh1.cxx @@ -1505,7 +1505,7 @@ void SwTextShell::Execute(SfxRequest ) OUString sWord(xSpellAlt->getWord()); linguistic::DictionaryError nAddRes = linguistic::AddEntryToDic( xDictionary, sWord, false, OUString() ); -if (linguistic::DictionaryError::NONE != nAddRes && !xDictionary->getEntry(sWord).is()) +if (linguistic::DictionaryError::NONE != nAddRes && xDictionary.is() && !xDictionary->getEntry(sWord).is()) { SvxDicError(rWrtSh.GetView().GetFrameWeld(), nAddRes); } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-7-1' - sw/source
sw/source/core/text/inftxt.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit e9014226d5ef3db2e2b40ab86f50e41256142641 Author: Eike Rathke AuthorDate: Fri Jul 16 11:50:39 2021 +0200 Commit: Caolán McNamara CommitDate: Sat Jul 17 20:48:01 2021 +0200 Fix lang::Locale.Language usage, tdf#128191 follow-up Using plain lang::Locale.Language is always wrong, it may even be 'qlt' for a more complex language tag. As the InfoBar message is "Please install the hyphenation package for locale “%1”." actually use the BCP 47 language tag of that character/paragraph attribution. Spotted in https://ask.libreoffice.org/en/question/280102/install-the-hyphenation-package-for-locale-ka/ https://ask.libreoffice.org/en/question/238764/error-message-reads-install-the-hyphenation-package-for-locale-zh/ Change-Id: I5805d4d711989a9d0260940666d3eb33eae830af Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119020 Reviewed-by: Eike Rathke Tested-by: Jenkins (cherry picked from commit 64f885a6c9d51999b737c0f61bc3a7fa311a5a94) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119032 Reviewed-by: Caolán McNamara diff --git a/sw/source/core/text/inftxt.cxx b/sw/source/core/text/inftxt.cxx index ac0b61f29a79..20120767266c 100644 --- a/sw/source/core/text/inftxt.cxx +++ b/sw/source/core/text/inftxt.cxx @@ -1501,7 +1501,7 @@ bool SwTextFormatInfo::IsHyphenate() const pShell->AppendInfoBarWhenReady( "hyphenationmissing", SwResId(STR_HYPH_MISSING), SwResId(STR_HYPH_MISSING_DETAIL) -.replaceFirst("%1", g_pBreakIt->GetLocale(eTmp).Language), +.replaceFirst("%1", LanguageTag::convertToBcp47( g_pBreakIt->GetLocale(eTmp))), InfobarType::WARNING); } } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-7-1' - sw/source
sw/source/core/edit/edtab.cxx | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) New commits: commit 5ea8b62575eca6527310c9f51a418f3fae420e66 Author: Caolán McNamara AuthorDate: Fri Dec 11 09:03:51 2020 + Commit: Michael Stahl CommitDate: Fri Jul 9 11:20:08 2021 +0200 cid#1470585 Dereference null return value Change-Id: If2a3eae843753a06d2f3fa9ac31acc9470cb6982 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107584 Tested-by: Jenkins Reviewed-by: Caolán McNamara (cherry picked from commit 2c0930f19e269348a2aadc0ffe69ff23d04d7cc1) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118616 Reviewed-by: Michael Stahl diff --git a/sw/source/core/edit/edtab.cxx b/sw/source/core/edit/edtab.cxx index b598e4754a70..03e951e2509c 100644 --- a/sw/source/core/edit/edtab.cxx +++ b/sw/source/core/edit/edtab.cxx @@ -148,17 +148,19 @@ bool SwEditShell::TextToTable( const SwInsertTableOptions& rInsTableOpts, bool SwEditShell::TableToText( sal_Unicode cCh ) { SwWait aWait( *GetDoc()->GetDocShell(), true ); -bool bRet = false; SwPaM* pCursor = GetCursor(); const SwTableNode* pTableNd = GetDoc()->IsIdxInTable( pCursor->GetPoint()->nNode ); +if (!pTableNd) +return false; + if( IsTableMode() ) { ClearMark(); pCursor = GetCursor(); } -else if( !pTableNd || pCursor->GetNext() != pCursor ) -return bRet; +else if (pCursor->GetNext() != pCursor) +return false; // TL_CHART2: // tell the charts about the table to be deleted and have them use their own data @@ -177,7 +179,7 @@ bool SwEditShell::TableToText( sal_Unicode cCh ) //Modified for bug #i119954# Application crashed if undo/redo convert nest table to text StartUndo(); -bRet = ConvertTableToText( pTableNd, cCh ); +bool bRet = ConvertTableToText( pTableNd, cCh ); EndUndo(); //End for bug #i119954# pCursor->GetPoint()->nNode = aTabIdx; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-7-1' - sw/source
sw/source/core/view/viewsh.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 99a5de001d635db05a92f8889d1703024205cc75 Author: Caolán McNamara AuthorDate: Tue Dec 1 14:13:50 2020 + Commit: Michael Stahl CommitDate: Fri Jul 9 11:13:57 2021 +0200 cid#1470368 Unchecked dynamic_cast Change-Id: Ie67501aea8df37e894edfecf75e2338709535253 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106986 Tested-by: Caolán McNamara Reviewed-by: Caolán McNamara (cherry picked from commit 52a69f41e992efa2abc2e2e94414a2547df71329) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118620 Tested-by: Jenkins Reviewed-by: Michael Stahl diff --git a/sw/source/core/view/viewsh.cxx b/sw/source/core/view/viewsh.cxx index 2f4aee28b52b..c53be1dea5b7 100644 --- a/sw/source/core/view/viewsh.cxx +++ b/sw/source/core/view/viewsh.cxx @@ -2155,7 +2155,7 @@ IsCursorInFieldmarkHidden(SwPaM const& rCursor, sw::FieldmarkMode const eMode) if (*rCursor.GetPoint() < (**iter).GetMarkEnd()) { SwPosition const sepPos(sw::mark::FindFieldSep( -*dynamic_cast(*iter))); +dynamic_cast(**iter))); if (eMode == sw::FieldmarkMode::ShowResult) { if (*rCursor.GetPoint() <= sepPos ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-7-1' - sw/source
sw/source/uibase/uiview/uivwimp.cxx |2 ++ 1 file changed, 2 insertions(+) New commits: commit f7b14acbccc496aae0d7d07b3ba3ca1b35af2ae2 Author: Noel Grandin AuthorDate: Fri Jul 2 11:19:39 2021 +0200 Commit: Noel Grandin CommitDate: Tue Jul 6 21:06:46 2021 +0200 fix potential use-after-free in SwClipboardChangeListener we think we're seeing this in COOL Change-Id: I29a287b032158076a99a836d98113d1623ebef99 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118277 Tested-by: Jenkins Reviewed-by: Noel Grandin (cherry picked from commit 558dface96fbc5f487b16cfa1bf3c3ea20776331) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118431 diff --git a/sw/source/uibase/uiview/uivwimp.cxx b/sw/source/uibase/uiview/uivwimp.cxx index b607ccf9b256..0173f3fdc5a4 100644 --- a/sw/source/uibase/uiview/uivwimp.cxx +++ b/sw/source/uibase/uiview/uivwimp.cxx @@ -287,6 +287,8 @@ SwClipboardChangeListener::~SwClipboardChangeListener() void SAL_CALL SwClipboardChangeListener::disposing( const EventObject& /*rEventObject*/ ) { +SolarMutexGuard aGuard; +pView = nullptr; // so we don't touch the view if changedContents somehow fires afterwards } void SAL_CALL SwClipboardChangeListener::changedContents( const css::datatransfer::clipboard::ClipboardEvent& rEventObject ) ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-7-1' - sw/source
sw/source/core/docnode/ndtbl.cxx |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) New commits: commit dd4d221f77501eb36c816ade48869d385462f18c Author: Bjoern Michaelsen AuthorDate: Sun Jul 4 11:58:07 2021 +0200 Commit: Xisco Fauli CommitDate: Mon Jul 5 14:12:22 2021 +0200 tdf#140506: fix repeated table header switching this fixes regression from f899c28f210c6565b7227d7665d449f194d2af8e, which asssumed all frames to be listening to the Notifier of the format. That is not (yet) the case. Change-Id: Ib684842c571823eeb72824196ccfdb1df8179e85 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118370 Tested-by: Jenkins Reviewed-by: Michael Stahl (cherry picked from commit 25e09087d8e2c5cecca1d548c69a263c7bf8b7ca) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118418 diff --git a/sw/source/core/docnode/ndtbl.cxx b/sw/source/core/docnode/ndtbl.cxx index acca43916522..13ea311ea84f 100644 --- a/sw/source/core/docnode/ndtbl.cxx +++ b/sw/source/core/docnode/ndtbl.cxx @@ -2897,9 +2897,9 @@ void SwDoc::SetRowsToRepeat( SwTable , sal_uInt16 nSet ) std::make_unique(rTable, rTable.GetRowsToRepeat(), nSet) ); } +rTable.SetRowsToRepeat(nSet); const SwMsgPoolItem aChg(RES_TBLHEADLINECHG); -rTable.SetRowsToRepeat( nSet ); - rTable.GetFrameFormat()->GetNotifier().Broadcast(sw::LegacyModifyHint(, )); +rTable.GetFrameFormat()->CallSwClientNotify(sw::LegacyModifyHint(, )); getIDocumentState().SetModified(); } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-7-1' - sw/source
sw/source/core/doc/htmltbl.cxx |2 - sw/source/core/inc/tabfrm.hxx|3 +- sw/source/core/layout/tabfrm.cxx | 49 +-- 3 files changed, 45 insertions(+), 9 deletions(-) New commits: commit 35a0bfa7bf52ca713ea8e57cd982d16723be920d Author: Michael Stahl AuthorDate: Fri Jun 18 19:49:46 2021 +0200 Commit: Xisco Fauli CommitDate: Tue Jun 22 09:35:29 2021 +0200 tdf#116501 sw: layout: check for flys in SwTabFrame::ShouldBwdMoved() On loading, this hits loop control warn:legacy.osl:580715:580715:sw/source/core/layout/layact.cxx:543: LoopControl_1 in SwLayAction::InternalAction This is because there's a fly frame 404 anchored at the last text frame 353 on page 2 inside the nested table 347. ShouldBwdMoved() sees that there is space on the bottom of page 2 and hence the follow flow row joined, but then it immediately splits again in the same way as before due to the fly with WrapTextMode_NONE. But then the outer table's cell 273 (upper of 347) is invalidated again, hence the loop. Try to check for overlapping flys in SwTabFrame::ShouldBwdMoved() by reusing CalcFlyOffsets(), which is ... not quite ideal, but perhaps better than copy-pasting half of it to a new function. This should have less side effects than the previous fix, but a problem remains that clicking on the shape on bottom of page 2 causes the layout to go wonky, but that was also the case with previous fix. Note there's a check of SwLayouter::DoesRowContainMovedFwdFrame() there already, but that doesn't help because it will only detect when the fly itself was moved forward, but in this case the fly remains on the page. Also likely it wouldn't be a good idea to move a text frame forward if the only thing of it that fits on a page is an anchored fly (i.e. its follow has mnOffset=0) because that can be intentional. Change-Id: I0376f7dcb784c006990336233c97f5093aaccb77 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117473 Tested-by: Jenkins Tested-by: László Németh Reviewed-by: László Németh (cherry picked from commit f1439db62eb36ef5fbc9111b87dc4e0f24b3cb86) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117602 Reviewed-by: Xisco Fauli diff --git a/sw/source/core/doc/htmltbl.cxx b/sw/source/core/doc/htmltbl.cxx index 31edb6dff0bc..dd0011bfacad 100644 --- a/sw/source/core/doc/htmltbl.cxx +++ b/sw/source/core/doc/htmltbl.cxx @@ -363,7 +363,7 @@ sal_uInt16 SwHTMLTableLayout::GetBrowseWidthByTabFrame( SwTwips nUpperDummy = 0; tools::Long nRightOffset = 0, nLeftOffset = 0; -rTabFrame.CalcFlyOffsets( nUpperDummy, nLeftOffset, nRightOffset ); +rTabFrame.CalcFlyOffsets(nUpperDummy, nLeftOffset, nRightOffset, nullptr); nWidth -= (nLeftOffset + nRightOffset); return static_cast(std::min(nWidth, SwTwips(SAL_MAX_UINT16))); diff --git a/sw/source/core/inc/tabfrm.hxx b/sw/source/core/inc/tabfrm.hxx index 7e302473a421..34010d96a9c3 100644 --- a/sw/source/core/inc/tabfrm.hxx +++ b/sw/source/core/inc/tabfrm.hxx @@ -203,7 +203,8 @@ public: bool CalcFlyOffsets( SwTwips& rUpper, tools::Long& rLeftOffset, -tools::Long& rRightOffset ) const; +tools::Long& rRightOffset, +SwTwips * pSpaceBelowBottom) const; SwTwips CalcHeightOfFirstContentLine() const; diff --git a/sw/source/core/layout/tabfrm.cxx b/sw/source/core/layout/tabfrm.cxx index 05069534af8d..d639e4d18d74 100644 --- a/sw/source/core/layout/tabfrm.cxx +++ b/sw/source/core/layout/tabfrm.cxx @@ -2730,7 +2730,8 @@ static bool IsNextOnSamePage(SwPageFrame const& rPage, /// Calculate the offsets arising because of FlyFrames bool SwTabFrame::CalcFlyOffsets( SwTwips& rUpper, tools::Long& rLeftOffset, - tools::Long& rRightOffset ) const + tools::Long& rRightOffset, + SwTwips *const pSpaceBelowBottom) const { bool bInvalidatePrtArea = false; const SwPageFrame *pPage = FindPageFrame(); @@ -2750,9 +2751,16 @@ bool SwTabFrame::CalcFlyOffsets( SwTwips& rUpper, tools::Long nPrtPos = aRectFnSet.GetTop(getFrameArea()); nPrtPos = aRectFnSet.YInc( nPrtPos, rUpper ); SwRect aRect( getFrameArea() ); -tools::Long nYDiff = aRectFnSet.YDiff( aRectFnSet.GetTop(getFramePrintArea()), rUpper ); -if( nYDiff > 0 ) -aRectFnSet.AddBottom( aRect, -nYDiff ); +if (pSpaceBelowBottom) +{ // set to space below table frame +aRectFnSet.SetTopAndHeight(aRect, aRectFnSet.GetBottom(aRect), *pSpaceBelowBottom); +} +else +{ +tools::Long nYDiff = aRectFnSet.YDiff( aRectFnSet.GetTop(getFramePrintArea()), rUpper ); +if (nYDiff > 0) +
[Libreoffice-commits] core.git: Branch 'libreoffice-7-1' - sw/source
sw/source/core/inc/layact.hxx|5 - sw/source/core/inc/tabfrm.hxx| 10 -- sw/source/core/layout/layact.cxx | 20 +--- sw/source/core/layout/tabfrm.cxx |6 ++ 4 files changed, 3 insertions(+), 38 deletions(-) New commits: commit 0f026c6e7186ef57e5806348a320f8383dfb7dc7 Author: Michael Stahl AuthorDate: Wed Jun 16 15:34:40 2021 +0200 Commit: Xisco Fauli CommitDate: Tue Jun 22 09:34:39 2021 +0200 Revert "tdf#116501 fix freezing at embedded text tables" This reverts commit 91b2239783dc716bd71ce7962bfd7e341dfe4175. This breaks documents that have many nested tables. For example Eclipse BIRT generates reports with tables nested 8 levels deep, they run into the counter in no time and, ironically, one goes into a layout loop because of this counter. Change-Id: I7451d01787903bbc60b305da3dc72f8259175e97 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117472 Tested-by: Jenkins Reviewed-by: Michael Stahl (cherry picked from commit ee042a371e98cdcc59848f0b953f1ce545e18e31) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117601 Reviewed-by: Xisco Fauli diff --git a/sw/source/core/inc/layact.hxx b/sw/source/core/inc/layact.hxx index 71484e00da5f..6680949b3eff 100644 --- a/sw/source/core/inc/layact.hxx +++ b/sw/source/core/inc/layact.hxx @@ -97,11 +97,6 @@ class SwLayAction // OD 14.04.2003 #106346# - new flag for content formatting on interrupt. boolmbFormatContentOnInterrupt; -// for loop control by disabling in-row splitting within embedded tables -const SwPageFrame *m_pCurPage; -sal_uInt16 m_nTabLevel; // embedding level -sal_uInt32 m_nCallCount; // calling FormatLayoutTab on the same page - void PaintContent( const SwContentFrame *, const SwPageFrame *, const SwRect , tools::Long nOldBottom ); bool PaintWithoutFlys( const SwRect &, const SwContentFrame *, diff --git a/sw/source/core/inc/tabfrm.hxx b/sw/source/core/inc/tabfrm.hxx index d0eb807297a1..7e302473a421 100644 --- a/sw/source/core/inc/tabfrm.hxx +++ b/sw/source/core/inc/tabfrm.hxx @@ -84,8 +84,6 @@ class SwTabFrame: public SwLayoutFrame, public SwFlowFrame bool m_bInRecalcLowerRow : 1; -bool m_bSplitRowDisabled : 1; // loop control - /** * Split() splits the Frame at the specified position: a Follow is * created and constructed and inserted directly after this. @@ -177,14 +175,6 @@ public: { m_bInRecalcLowerRow = bNew; } -bool IsSplitRowDisabled() const -{ -return m_bSplitRowDisabled; -} -void SetSplitRowDisabled() -{ -m_bSplitRowDisabled = true; -} // #i26945# bool IsConsiderObjsForMinCellHeight() const diff --git a/sw/source/core/layout/layact.cxx b/sw/source/core/layout/layact.cxx index c613507a5142..87b76cc6b4ca 100644 --- a/sw/source/core/layout/layact.cxx +++ b/sw/source/core/layout/layact.cxx @@ -262,10 +262,7 @@ SwLayAction::SwLayAction( SwRootFrame *pRt, SwViewShellImp *pI ) : m_nStartTicks( std::clock() ), m_nInputType( VclInputFlags::NONE ), m_nEndPage( USHRT_MAX ), -m_nCheckPageNum( USHRT_MAX ), -m_pCurPage( nullptr ), -m_nTabLevel( 0 ), -m_nCallCount( 0 ) +m_nCheckPageNum( USHRT_MAX ) { m_bPaintExtraData = ::IsExtraData( m_pImp->GetShell()->GetDoc() ); m_bPaint = m_bComplete = m_bWaitAllowed = m_bCheckPages = true; @@ -293,7 +290,6 @@ void SwLayAction::Reset() m_bPaint = m_bComplete = m_bWaitAllowed = m_bCheckPages = true; m_bInput = m_bAgain = m_bNextCycle = m_bCalcLayout = m_bIdle = m_bReschedule = m_bUpdateExpFields = m_bBrowseActionStop = false; -m_pCurPage = nullptr; } bool SwLayAction::RemoveEmptyBrowserPages() @@ -1184,12 +1180,6 @@ bool SwLayAction::IsShortCut( SwPageFrame * ) // introduce support for vertical layout bool SwLayAction::FormatLayout( OutputDevice *pRenderContext, SwLayoutFrame *pLay, bool bAddRect ) { -// save page for loop control -if( pLay->IsPageFrame() && static_cast(pLay) != m_pCurPage ) -{ -m_nCallCount = 0; -m_pCurPage = static_cast(pLay); -} OSL_ENSURE( !IsAgain(), "Attention to the invalid page." ); if ( IsAgain() ) return false; @@ -1371,13 +1361,6 @@ bool SwLayAction::FormatLayout( OutputDevice *pRenderContext, SwLayoutFrame *pLa { if ( pLow->IsTabFrame() ) { -// loop control for embedded tables -if ( m_nTabLevel > 0 && ++m_nCallCount > 50 ) { -static_cast(pLow)->SetSplitRowDisabled(); -} - -++m_nTabLevel; - // Remember what was the next of the lower. Formatting may move it to the previous // page, in which case it looses its next. pNext = pLow->GetNext(); @@ -1394,7 +1377,6 @@ bool
[Libreoffice-commits] core.git: Branch 'libreoffice-7-1' - sw/source
sw/source/filter/ww8/ww8par.cxx | 32 +--- 1 file changed, 17 insertions(+), 15 deletions(-) New commits: commit d7dd13fdc23b535b98da01ba11a695f18378c07f Author: Caolán McNamara AuthorDate: Sun Jun 20 17:42:14 2021 +0100 Commit: Michael Stahl CommitDate: Mon Jun 21 10:54:15 2021 +0200 ofz#34221 avoid OOM Change-Id: I1987d39ea8ff195b397b0ee3fb0e45f9bfbfb572 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117516 Tested-by: Jenkins Reviewed-by: Michael Stahl diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx index b98b8bda7f42..d72f51d240f6 100644 --- a/sw/source/filter/ww8/ww8par.cxx +++ b/sw/source/filter/ww8/ww8par.cxx @@ -6091,23 +6091,25 @@ const OUString* SwWW8ImplReader::GetAnnotationAuthor(sal_uInt16 nIdx) m_pAtnNames.reset(new std::vector); SvStream& rStrm = *m_pTableStream; -tools::Long nOldPos = rStrm.Tell(); -rStrm.Seek( m_xWwFib->m_fcGrpStAtnOwners ); - -tools::Long nRead = 0, nCount = m_xWwFib->m_lcbGrpStAtnOwners; -while (nRead < nCount && rStrm.good()) +auto nOldPos = rStrm.Tell(); +bool bValidPos = checkSeek(rStrm, m_xWwFib->m_fcGrpStAtnOwners); +if (bValidPos) { -if( m_bVer67 ) -{ -m_pAtnNames->push_back(read_uInt8_PascalString(rStrm, -RTL_TEXTENCODING_MS_1252)); -nRead += m_pAtnNames->rbegin()->getLength() + 1; // Length + sal_uInt8 count -} -else +tools::Long nRead = 0, nCount = m_xWwFib->m_lcbGrpStAtnOwners; +while (nRead < nCount && rStrm.good()) { -m_pAtnNames->push_back(read_uInt16_PascalString(rStrm)); -// Unicode: double the length + sal_uInt16 count -nRead += (m_pAtnNames->rbegin()->getLength() + 1)*2; +if( m_bVer67 ) +{ +m_pAtnNames->push_back(read_uInt8_PascalString(rStrm, +RTL_TEXTENCODING_MS_1252)); +nRead += m_pAtnNames->rbegin()->getLength() + 1; // Length + sal_uInt8 count +} +else +{ +m_pAtnNames->push_back(read_uInt16_PascalString(rStrm)); +// Unicode: double the length + sal_uInt16 count +nRead += (m_pAtnNames->rbegin()->getLength() + 1)*2; +} } } rStrm.Seek( nOldPos ); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-7-1' - sw/source
sw/source/uibase/docvw/edtwin.cxx | 13 - 1 file changed, 12 insertions(+), 1 deletion(-) New commits: commit f3adb19b4e4f4e26aee50ce1d7cbc7a916253c04 Author: Caolán McNamara AuthorDate: Fri Jun 18 15:46:20 2021 +0100 Commit: Caolán McNamara CommitDate: Sat Jun 19 22:18:11 2021 +0200 tdf#142852 forward surrounding-text requests to an active drawing editengine when present. As we do for related CommandEventId::[StartExtTextInput/EndExtTextInput] Change-Id: Ie5b57c8a8a1a258efc2be079a2674b1ca620dc9d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117421 Tested-by: Jenkins Tested-by: Justin Luth Reviewed-by: Justin Luth Reviewed-by: Caolán McNamara diff --git a/sw/source/uibase/docvw/edtwin.cxx b/sw/source/uibase/docvw/edtwin.cxx index bb0e735ec66f..b5e8ec1a6099 100644 --- a/sw/source/uibase/docvw/edtwin.cxx +++ b/sw/source/uibase/docvw/edtwin.cxx @@ -6434,8 +6434,12 @@ void SwEditWin::SetUseInputLanguage( bool bNew ) OUString SwEditWin::GetSurroundingText() const { -OUString sReturn; SwWrtShell& rSh = m_rView.GetWrtShell(); + +if (rSh.HasDrawView() && rSh.GetDrawView()->IsTextEdit()) +return rSh.GetDrawView()->GetTextEditOutlinerView()->GetSurroundingText(); + +OUString sReturn; if( rSh.HasSelection() && !rSh.IsMultiSelection() && rSh.IsSelOnePara() ) rSh.GetSelectedText( sReturn, ParaBreakType::ToOnlyCR ); else if( !rSh.HasSelection() ) @@ -6467,6 +6471,10 @@ OUString SwEditWin::GetSurroundingText() const Selection SwEditWin::GetSurroundingTextSelection() const { SwWrtShell& rSh = m_rView.GetWrtShell(); + +if (rSh.HasDrawView() && rSh.GetDrawView()->IsTextEdit()) +return rSh.GetDrawView()->GetTextEditOutlinerView()->GetSurroundingTextSelection(); + if( rSh.HasSelection() ) { OUString sReturn; @@ -6502,6 +6510,9 @@ bool SwEditWin::DeleteSurroundingText(const Selection& rSelection) { SwWrtShell& rSh = m_rView.GetWrtShell(); +if (rSh.HasDrawView() && rSh.GetDrawView()->IsTextEdit()) +return rSh.GetDrawView()->GetTextEditOutlinerView()->DeleteSurroundingText(rSelection); + if (rSh.HasSelection()) return false; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-7-1' - sw/source
sw/source/uibase/shells/tabsh.cxx | 16 ++-- 1 file changed, 10 insertions(+), 6 deletions(-) New commits: commit b76d3943b09c129393d7aa763dbb3322218726db Author: Caolán McNamara AuthorDate: Wed Jun 9 16:55:14 2021 +0100 Commit: Michael Stahl CommitDate: Fri Jun 11 10:49:19 2021 +0200 tdf#142721 restore SwShellTableCursor if the orig selection was a single cell where the previous attempt of commit 4d52d2bc81f9d27472fe368785912a530489d046 tdf#142165 restore a SwShellTableCursor if the orig selection described that so that we are operating on the same selection that existed when the dialog was originally launched wasn't sufficient to restore a single cell selection. we continue to need to avoid the assert of commit 6db71f70a3b200d4074f6cda8ce445e9861d3296 tdf#140977 drop possible table-cursor before setting the new one and support the multi-selection of commit e08b446e46f56e15af58fdd4396afba1a316f9e5 tdf#140257 duplicate entire PaM ring when making copy and support not scrolling to a different location on changing a table page break style of commit 9c61732677d038e32b73fc9fb883aced14c0febf tdf#135916 just set the target table as selection and keep making it possible to remove a page break on a table of commit 81f91196b98af38e29af451b86c26a893a109abc tdf#135636 the selection at dialog-launch time is lost by dialog-apply time all of which is necessitated by commit c3a085d22742f88e91ff92f319a26d6e8d1d9a98 lokdialog: Convert the Table -> Properties... to async exec. Though; since 4d52d2bc81f9d27472fe368785912a530489d046 where we started using rSh.GetTableCrs if IsTableMode() then in practice 6db71f70a3b200d4074f6cda8ce445e9861d3296 probably cannot arise. The scenario of rSh.IsTableMode() changing between launch of the dialog and applying the result of the dialog is presumably maybe theoretically possible in e.g. an online scenario, but not in the normal user case, but handled here anyway. Change-Id: I12f0b6bc7e0e2f5bad45a88007bf6fe2cd3d3b0b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116896 Tested-by: Jenkins Reviewed-by: Michael Stahl diff --git a/sw/source/uibase/shells/tabsh.cxx b/sw/source/uibase/shells/tabsh.cxx index 549e4e14327c..82c382b6fe36 100644 --- a/sw/source/uibase/shells/tabsh.cxx +++ b/sw/source/uibase/shells/tabsh.cxx @@ -596,18 +596,22 @@ void SwTableShell::Execute(SfxRequest ) auto pRequest = std::make_shared(rReq); rReq.Ignore(); // the 'old' request is not relevant any more -SwPaM* pCursor = rSh.IsTableMode() ? rSh.GetTableCrs() : rSh.GetCursor(); // tdf#142165 use table cursor if in table mode +const bool bTableMode = rSh.IsTableMode(); +SwPaM* pCursor = bTableMode ? rSh.GetTableCrs() : rSh.GetCursor(); // tdf#142165 use table cursor if in table mode auto vCursors = CopyPaMRing(*pCursor); // tdf#135636 make a copy to use at later apply -pDlg->StartExecuteAsync([pDlg, pRequest, pTableRep, , , vCursors](sal_Int32 nResult){ +pDlg->StartExecuteAsync([pDlg, pRequest, pTableRep, , , vCursors, bTableMode](sal_Int32 nResult){ if (RET_OK == nResult) { -if (rSh.IsTableMode()) // tdf#140977 drop possible table-cursor before setting the new one -rSh.TableCursorToCursor(); +if (!bTableMode && rSh.IsTableMode()) // tdf#140977 drop current table-cursor if setting a replacement +rSh.TableCursorToCursor();// non-table one -// tdf#135636 set the table selected at dialog launch as current selection +// tdf#135636 set the selection at dialog launch as current selection rSh.SetSelection(*vCursors->front()); // UpdateCursor() will be called which in the case // of a table selection should recreate a - // SwShellTableCursor + // SwShellTableCursor if the selection is more than a single cell + +if (bTableMode && !rSh.IsTableMode()) // tdf#142721 ensure the new selection is a SwShellTableCursor in +rSh.SelTableBox();// the case of of a single cell const SfxItemSet* pOutSet = pDlg->GetOutputItemSet(); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-7-1' - sw/source
sw/source/uibase/dbui/dbtree.cxx |2 ++ 1 file changed, 2 insertions(+) New commits: commit c4767868f1ee024efdd672cb21de9e3258c56694 Author: Caolán McNamara AuthorDate: Fri May 21 16:46:23 2021 +0100 Commit: Adolfo Jayme Barrientos CommitDate: Sat May 22 19:31:14 2021 +0200 tdf#142294 drop placeholder on-demand node on directly populating node Initially there's a entry to indicate the load-on-demand state. It needs to be there for the expander indicator to be drawn/shown when there are no "real" entries yet. Typically the user clicks on the expander, the expansion remove the entry and calls the provided expander-callback which has the change to populate the node. Here RequestingChildrenHdl is the expander-callback (set via connect_expanding) and populates the node like it should. But then there are two places where it is called directly outside the expander-callback so it merrily appends entries into the node, but because it's called outside the expander-callback the entry was never removed which is then a problem because of the resulting inconsistency. Change-Id: Ie7d034e3f41832591438127c82eba85deb610952 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115952 Tested-by: Jenkins Reviewed-by: Adolfo Jayme Barrientos diff --git a/sw/source/uibase/dbui/dbtree.cxx b/sw/source/uibase/dbui/dbtree.cxx index 96088dd2611c..75e654388832 100644 --- a/sw/source/uibase/dbui/dbtree.cxx +++ b/sw/source/uibase/dbui/dbtree.cxx @@ -341,6 +341,7 @@ void SwDBTreeList::Select(const OUString& rDBName, const OUString& rTableName, c } if (!m_xTreeView->iter_has_child(*xParent)) { +m_xTreeView->set_children_on_demand(*xParent, false); // tdf#142294 drop placeholder on-demand node RequestingChildrenHdl(*xParent); // If successful, it will be expanded in a call to scroll_to_row for its children } @@ -362,6 +363,7 @@ void SwDBTreeList::Select(const OUString& rDBName, const OUString& rTableName, c { if (!m_xTreeView->iter_has_child(*xParent)) { +m_xTreeView->set_children_on_demand(*xParent, false); // tdf#142294 drop placeholder on-demand node RequestingChildrenHdl(*xParent); m_xTreeView->expand_row(*xParent); } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-7-1' - sw/source
sw/source/core/text/frmform.cxx | 10 +- 1 file changed, 9 insertions(+), 1 deletion(-) New commits: commit 512da58e5ce822744e4d0b8139595baf1c623035 Author: Michael Stahl AuthorDate: Fri May 21 12:20:28 2021 +0200 Commit: Caolán McNamara CommitDate: Fri May 21 16:45:44 2021 +0200 sw: layout: fix footnote UAF on tdf132248-3.odt (also, tdf134127-1.odt) Text frame 12 gets a follow 137 which gets a follow 138, and there's a footnote at index 95. When 138 is created, its mnOffest is 63 in SwTextFrame::SplitFrame() so 138 gets its mbFootnote set and the footnote frame mpReference points to 138 but then SwTextFrame::FormatAdjust() moves one line back and sets the offset of 138 to 96. Then SwTextFrame::CalcFollow() clears 138's mbFootnote due to lack of footnotes starting from 96. Later frame 138 is joined, but because its mbFootnote is false, the footnote's mpReference continues to point to it, which leads to UAF in SwFootnoteFrame::GetRef(). What's missing is that at the time when the offset of 138 is adjusted, RemoveFootnote() must be called, as is already the case in another branch of SwTextFrame::FormatAdjust(), since CVS initial import. Not sure why this started to crash in crashtesting relatively recently. Change-Id: Ic46019d34ff90d24d0f23effe8a6d54d6f197a71 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115910 Tested-by: Jenkins Reviewed-by: Michael Stahl (cherry picked from commit 95a716f12a0dacdd5d80a6f3d98eadcc2f079fcf) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115843 Reviewed-by: Caolán McNamara diff --git a/sw/source/core/text/frmform.cxx b/sw/source/core/text/frmform.cxx index 731ecdc324bf..ac9c2f95da05 100644 --- a/sw/source/core/text/frmform.cxx +++ b/sw/source/core/text/frmform.cxx @@ -986,7 +986,7 @@ bool SwTextFrame::CalcPreps() return bRet; } -// We rewire the footnotes and the character bound objects +// Move the as-character objects - footnotes must be moved by RemoveFootnote! void SwTextFrame::ChangeOffset( SwTextFrame* pFrame, TextFrameIndex nNew ) { if( pFrame->GetOffset() < nNew ) @@ -1081,6 +1081,7 @@ void SwTextFrame::FormatAdjust( SwTextFormatter , // need to create a Follow. // We also need to do this if the whole mass of text remains in the Master, // because a hard line break could necessitate another line (without text mass)! +TextFrameIndex const nOld(nEnd); nEnd = rLine.GetEnd(); if( GetFollow() ) { @@ -1106,6 +1107,13 @@ void SwTextFrame::FormatAdjust( SwTextFormatter , // for the paragraph mark. nNew |= 1; } +// move footnotes if the follow is kept - if RemoveFootnote() is +// called in next format iteration, it will be with the *new* +// offset so no effect! +if (nNew && nOld < nEnd) +{ +RemoveFootnote(nOld, nEnd - nOld); +} ChangeOffset( GetFollow(), nEnd ); GetFollow()->ManipOfst( nEnd ); } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-7-1' - sw/source
sw/source/uibase/shells/tabsh.cxx |8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) New commits: commit 7cfae0ade31a5469331f5b0288e22aed6ec2fcc1 Author: Caolán McNamara AuthorDate: Mon May 17 14:48:20 2021 +0100 Commit: Adolfo Jayme Barrientos CommitDate: Mon May 17 18:25:09 2021 +0200 tdf#142165 restore a SwShellTableCursor if the orig selection described that so that we are operating on the same selection that existed when the dialog was originally launched we need to avoid the assert of commit 6db71f70a3b200d4074f6cda8ce445e9861d3296 tdf#140977 drop possible table-cursor before setting the new one and support the multi-selection of commit e08b446e46f56e15af58fdd4396afba1a316f9e5 tdf#140257 duplicate entire PaM ring when making copy and support not scrolling to a different location on changing a table page break style of commit 9c61732677d038e32b73fc9fb883aced14c0febf tdf#135916 just set the target table as selection and keep making it possible to remove aa page break on a table of commit 81f91196b98af38e29af451b86c26a893a109abc tdf#135636 the selection at dialog-launch time is lost by dialog-apply time all of which is necessitated by commit c3a085d22742f88e91ff92f319a26d6e8d1d9a98 lokdialog: Convert the Table -> Properties... to async exec. Change-Id: Ide5f953e63da46a8750e85d623310af0062b048b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115522 Tested-by: Jenkins Reviewed-by: Adolfo Jayme Barrientos diff --git a/sw/source/uibase/shells/tabsh.cxx b/sw/source/uibase/shells/tabsh.cxx index 036274546d04..549e4e14327c 100644 --- a/sw/source/uibase/shells/tabsh.cxx +++ b/sw/source/uibase/shells/tabsh.cxx @@ -596,14 +596,18 @@ void SwTableShell::Execute(SfxRequest ) auto pRequest = std::make_shared(rReq); rReq.Ignore(); // the 'old' request is not relevant any more -auto vCursors = CopyPaMRing(*rSh.GetCursor()); // tdf#135636 make a copy to use at later apply +SwPaM* pCursor = rSh.IsTableMode() ? rSh.GetTableCrs() : rSh.GetCursor(); // tdf#142165 use table cursor if in table mode +auto vCursors = CopyPaMRing(*pCursor); // tdf#135636 make a copy to use at later apply pDlg->StartExecuteAsync([pDlg, pRequest, pTableRep, , , vCursors](sal_Int32 nResult){ if (RET_OK == nResult) { if (rSh.IsTableMode()) // tdf#140977 drop possible table-cursor before setting the new one rSh.TableCursorToCursor(); -rSh.SetSelection(*vCursors->front()); // tdf#135636 set the table selected at dialog launch as current selection +// tdf#135636 set the table selected at dialog launch as current selection +rSh.SetSelection(*vCursors->front()); // UpdateCursor() will be called which in the case + // of a table selection should recreate a + // SwShellTableCursor const SfxItemSet* pOutSet = pDlg->GetOutputItemSet(); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-7-1' - sw/source
sw/source/core/access/accnotextframe.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit b129ce4426d460963ace6c9e69c4b44e2a3615c2 Author: Bjoern Michaelsen AuthorDate: Sun May 9 01:30:40 2021 +0200 Commit: Caolán McNamara CommitDate: Wed May 12 18:34:22 2021 +0200 tdf#141307: adapt null-check - if we check pNd for nullptr, we need to expect it to be nullptr - in that case we shouldnt use the pointer before the null check Change-Id: Ia9d11abe32fac10f36fdbfcefeadd51891f1834e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115264 Tested-by: Jenkins Reviewed-by: Bjoern Michaelsen (cherry picked from commit b0ae5fd236663f7e81af06a567ade8a2a745) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115287 Reviewed-by: Caolán McNamara diff --git a/sw/source/core/access/accnotextframe.cxx b/sw/source/core/access/accnotextframe.cxx index 3dfed9ea3303..d8f37887b4a4 100644 --- a/sw/source/core/access/accnotextframe.cxx +++ b/sw/source/core/access/accnotextframe.cxx @@ -63,11 +63,11 @@ SwAccessibleNoTextFrame::SwAccessibleNoTextFrame( msDesc() { const SwNoTextNode* pNd = GetNoTextNode(); -StartListening(const_cast(pNd)->GetNotifier()); // #i73249# // consider new attributes Title and Description if( pNd ) { +StartListening(const_cast(pNd)->GetNotifier()); msTitle = pNd->GetTitle(); msDesc = pNd->GetDescription(); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-7-1' - sw/source
sw/source/uibase/uiview/view.cxx |4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) New commits: commit 8ca83e3801ee8e6359159ab4c222eedbf76e63dc Author: Mike Kaganski AuthorDate: Tue May 11 20:58:50 2021 +0200 Commit: Mike Kaganski CommitDate: Wed May 12 06:16:55 2021 +0200 Revert "tdf#141015: Show Mail Merge toolbar when DBData has data source" This reverts commit 346153f08c907739ca310934ad45814379971027. It seems to create more problems than expected, and there's no way to remove DB association other than editing document XML. Change-Id: I93171f17c01e231abbcfa9a816fdadce83c983ec Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115283 Tested-by: Jenkins Reviewed-by: Mike Kaganski (cherry picked from commit 2009af1c0fb4fead653dd7688347c15d74eaa1b0) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115286 diff --git a/sw/source/uibase/uiview/view.cxx b/sw/source/uibase/uiview/view.cxx index 3e10ab192e5a..ff6f2bc82349 100644 --- a/sw/source/uibase/uiview/view.cxx +++ b/sw/source/uibase/uiview/view.cxx @@ -439,9 +439,7 @@ void SwView::SelectShell() } // Show Mail Merge toolbar initially for documents with Database fields -if (!m_bInitOnceCompleted -&& (GetWrtShell().IsAnyDatabaseFieldInDoc() -|| !GetWrtShell().GetDBData().sDataSource.isEmpty())) +if (!m_bInitOnceCompleted && GetWrtShell().IsAnyDatabaseFieldInDoc()) ShowUIElement("private:resource/toolbar/mailmerge"); // Activate the toolbar to the new selection which also was active last time. ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-7-1' - sw/source
sw/source/core/layout/objectformattertxtfrm.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit dcea18e66e61c6f411b9bf6498a0ffc374161484 Author: Michael Stahl AuthorDate: Fri May 7 17:42:51 2021 +0200 Commit: Caolán McNamara CommitDate: Sat May 8 20:42:36 2021 +0200 tdf#138518 sw: layout: unbreak fdo80206-1.doc The 7 flys on the para on page 3 create ~15 extra pages with one paragraph each. Argh! One of the bPageHasFlysAnchoredBelowThis checks was inverted. How dumb of me. (regression from c799de145f7e289f31e3669646e5bd12814e6c5e) Still doesn't look good but now it looks same as in 7.0. Change-Id: Ib10c46f48746362d8d679c147ddc8b85157be508 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115242 Reviewed-by: Michael Stahl Tested-by: Jenkins (cherry picked from commit 59d96acec8c4d9e472daa3e2c287b3a754e01817) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115206 Reviewed-by: Caolán McNamara diff --git a/sw/source/core/layout/objectformattertxtfrm.cxx b/sw/source/core/layout/objectformattertxtfrm.cxx index 153a90799d50..14cf0e9c66b5 100644 --- a/sw/source/core/layout/objectformattertxtfrm.cxx +++ b/sw/source/core/layout/objectformattertxtfrm.cxx @@ -412,7 +412,7 @@ bool SwObjectFormatterTextFrame::DoFormatObjs() } if ( bInsert ) { -if (bPageHasFlysAnchoredBelowThis) +if (!bPageHasFlysAnchoredBelowThis) { SwLayouter::InsertMovedFwdFrame(rDoc, mrAnchorTextFrame, pAnchorPageFrame->GetPhyPageNum()); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-7-1' - sw/source
sw/source/core/layout/flycnt.cxx|3 +- sw/source/core/layout/objectformattertxtfrm.cxx | 27 ++-- sw/source/core/layout/objectformattertxtfrm.hxx |2 - 3 files changed, 19 insertions(+), 13 deletions(-) New commits: commit 7eb12f8a09dd67168ba42058b99d8ab58a5c7b0a Author: Michael Stahl AuthorDate: Thu May 6 18:20:14 2021 +0200 Commit: Caolán McNamara CommitDate: Fri May 7 17:45:50 2021 +0200 tdf#138518 sw: layout: fix assert on ooo43913-1.doc Assertion `rAnchoredObjPage.GetPhyPageNum() == _nFromPageNum' failed. Because not only the fly's anchor frame moves forward in FormatAnchorFrameForCheckMoveFwd(), but also the fly itself, apparently because it's in a table: 0 SwAnchoredObject::SetPageFrame(SwPageFrame*) (this=0x5a1d3d8, _pNewPageFrame=0x8cfbeb0) at sw/source/core/layout/anchoredobject.cxx:162 1 SwPageFrame::MoveFly(SwFlyFrame*, SwPageFrame*) (this=0x8cbd8c0, pToMove=0x5a1d280, pDest=0x8cfbeb0) at sw/source/core/layout/flylay.cxx:985 2 lcl_ArrangeLowers(SwLayoutFrame*, tools::Long, bool) (pLay=0x8cf80c0, lYStart=179488, bInva=false) at sw/source/core/layout/tabfrm.cxx:5000 3 SwCellFrame::Format(OutputDevice*, SwBorderAttrs const*) (this=0x8cf80c0, pAttrs=0x8ce78c0) at sw/source/core/layout/tabfrm.cxx:5359 4 SwLayoutFrame::MakeAll(OutputDevice*) (this=0x8cf80c0) at sw/source/core/layout/calcmove.cxx:1036 5 SwFrame::PrepareMake(OutputDevice*) (this=0x8cf80c0, pRenderContext=0x5b7fcf0) at sw/source/core/layout/calcmove.cxx:375 6 SwFrame::Calc(OutputDevice*) const (this=0x8cf80c0, pRenderContext=0x5b7fcf0) at sw/source/core/layout/trvlfrm.cxx:1792 7 SwFrame::MakePos() (this=0x8cebdb0) at sw/source/core/layout/calcmove.cxx:627 8 SwTextFrame::MakePos() (this=0x8cebdb0) at sw/source/core/text/frmform.cxx:340 9 SwContentFrame::MakeAll(OutputDevice*) (this=0x8cebdb0) at sw/source/core/layout/calcmove.cxx:1412 10 SwFrame::PrepareMake(OutputDevice*) (this=0x8cebdb0, pRenderContext=0x5b7fcf0) at sw/source/core/layout/calcmove.cxx:286 11 SwFrame::Calc(OutputDevice*) const (this=0x8cebdb0, pRenderContext=0x5b7fcf0) at sw/source/core/layout/trvlfrm.cxx:1792 12 SwTextFrame::CalcFollow(o3tl::strong_int) (this=0x5ae2c60, nTextOfst=...) at sw/source/core/text/frmform.cxx:279 13 SwTextFrame::AdjustFollow_(SwTextFormatter&, o3tl::strong_int, o3tl::strong_int, unsigned char) (this=0x5ae2c60, rLine=..., nOffset=..., nEnd=..., nMode=1 '\001') at sw/source/core/text/frmform.cxx:611 14 SwTextFrame::FormatAdjust(SwTextFormatter&, WidowsAndOrphans&, o3tl::strong_int, bool) (this=0x5ae2c60, rLine=..., rFrameBreak=..., nStrLen=..., bDummy=false) at sw/source/core/text/frmform.cxx:1166 15 SwTextFrame::Format_(SwTextFormatter&, SwTextFormatInfo&, bool) (this=0x5ae2c60, rLine=..., rInf=..., bAdjust=false) at sw/source/core/text/frmform.cxx:1613 16 SwTextFrame::Format_(OutputDevice*, SwParaPortion*) (this=0x5ae2c60, pRenderContext=0x5b7fcf0, pPara=0x8d07490) at sw/source/core/text/frmform.cxx:1720 17 SwTextFrame::Format(OutputDevice*, SwBorderAttrs const*) (this=0x5ae2c60, pRenderContext=0x5b7fcf0) at sw/source/core/text/frmform.cxx:1910 18 SwContentFrame::MakeAll(OutputDevice*) (this=0x5ae2c60) at sw/source/core/layout/calcmove.cxx:1525 19 SwFrame::PrepareMake(OutputDevice*) (this=0x5ae2f80, pRenderContext=0x5b7fcf0) at sw/source/core/layout/calcmove.cxx:321 20 SwFrame::Calc(OutputDevice*) const (this=0x5ae2f80, pRenderContext=0x5b7fcf0) at sw/source/core/layout/trvlfrm.cxx:1792 21 SwObjectFormatterTextFrame::FormatAnchorFrameAndItsPrevs(SwTextFrame&) (_rAnchorTextFrame=...) at sw/source/core/layout/objectformattertxtfrm.cxx:905 22 SwObjectFormatterTextFrame::FormatAnchorFrameForCheckMoveFwd() (this=0x8ce5720) at sw/source/core/layout/objectformattertxtfrm.cxx:919 23 SwObjectFormatterTextFrame::DoFormatObjs() (this=0x8ce5720) at sw/source/core/layout/objectformattertxtfrm.cxx:368 24 SwObjectFormatter::FormatObjsAtFrame(SwFrame&, SwPageFrame const&, SwLayAction*) (_rAnchorFrame=..., _rPageFrame=..., _pLayAction=0x0) at sw/source/core/layout/objectformatter.cxx:160 25 SwContentFrame::CalcLowers(SwLayoutFrame&, SwLayoutFrame const&, long, bool) (rLay=..., rDontLeave=..., nBottom=192048, bSkipRowSpanCells=true) at sw/source/core/layout/tabfrm.cxx:1534 26 lcl_RecalcRow(SwRowFrame&, tools::Long) (rRow=..., nBottom=192048) at sw/source/core/layout/tabfrm.cxx:1653 27 SwTabFrame::MakeAll(OutputDevice*) (this=0x8cf5f80, pRenderContext=0x5b7fcf0) at sw/source/core/layout/tabfrm.cxx:2425 It looks like the _nFromPageNum is always from the SwObjectFormatter::mrPageFrame anyway because that's a precondition of the mpPgNumAndTypeOfAnchors->Collect() being called, so just rely on that to get the correct page. (regression from c799de145f7e289f31e3669646e5bd12814e6c5e)
[Libreoffice-commits] core.git: Branch 'libreoffice-7-1' - sw/source
sw/source/core/inc/layact.hxx| 23 +- sw/source/core/layout/layact.cxx | 60 +-- sw/source/core/view/viewsh.cxx |1 3 files changed, 48 insertions(+), 36 deletions(-) New commits: commit b33148071ae6256845352f8625e58b1ab95be41c Author: Luke Deller AuthorDate: Fri Apr 9 09:08:37 2021 +1000 Commit: Miklos Vajna CommitDate: Mon May 3 12:27:34 2021 +0200 tdf#141556 Fix 100% CPU usage in Writer idle loop Do not interrupt the idle layout processing unnecessarily, because if it is continually interrupted before making enough progress then it will keep resuming at the same page, never finishing, constantly using CPU. This is achieved with two changes: - Revert "tdf#123583 use TaskStopwatch for Writer Idle loop" (commit 383032c50a3e3354f04200ce984a47ab9d2c5c67) which introduced a stopwatch timer to interrupt idle processing every 50ms. This reversion restores the previous behaviour where idle processing is interrupted only when there is an input event. - Filter out TIMER events so that they do not interrupt the idle loop; this fixes both tdf#123583 and tdf#141556 Conflicts: sw/source/core/inc/layact.hxx sw/source/core/layout/layact.cxx Change-Id: Ic989631e5f32199209d64b66b72059253fc0167a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113825 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski Reviewed-by: Miklos Vajna (cherry picked from commit 0fedac18214a6025401c4c426466a5166553e8ec) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114944 diff --git a/sw/source/core/inc/layact.hxx b/sw/source/core/inc/layact.hxx index 433d4b70e59a..71484e00da5f 100644 --- a/sw/source/core/inc/layact.hxx +++ b/sw/source/core/inc/layact.hxx @@ -22,7 +22,6 @@ #include #include -#include #include #include @@ -57,7 +56,6 @@ class SwLayAction { SwRootFrame *m_pRoot; SwViewShellImp *m_pImp; // here the action logs in and off -TaskStopwatch* m_pWatch; // For the sake of optimization, so that the tables stick a bit better to // the Cursor when hitting return/backspace in front of one. @@ -76,6 +74,7 @@ class SwLayAction std::clock_t m_nStartTicks; // The Action's starting time; if too much time passes the // WaitCursor can be enabled via CheckWaitCursor() +VclInputFlags m_nInputType; // Which input should terminate processing sal_uInt16 m_nEndPage;// StatBar control sal_uInt16 m_nCheckPageNum; // CheckPageDesc() was delayed if != USHRT_MAX // check from this page onwards @@ -85,8 +84,9 @@ class SwLayAction bool m_bCalcLayout;// Complete reformatting? bool m_bAgain; // For the automatically repeated Action if Pages are deleted bool m_bNextCycle; // Reset on the first invalid Page +bool m_bInput; // For terminating processing on input +bool m_bIdle; // True if the LayAction was triggered by the Idler bool m_bReschedule;// Call Reschedule depending on Progress? -bool m_bInterrupt; // For termination the layouting bool m_bCheckPages;// Run CheckPageDescs() or delay it bool m_bUpdateExpFields; // Is set if, after Formatting, we need to do another round for ExpField bool m_bBrowseActionStop; // Terminate Action early (as per bInput) and leave the rest to the Idler @@ -124,26 +124,33 @@ class SwLayAction bool RemoveEmptyBrowserPages(); +inline void CheckIdleEnd(); + public: -SwLayAction(SwRootFrame *pRt, SwViewShellImp *pImp, TaskStopwatch* pWatch = nullptr); +SwLayAction( SwRootFrame *pRt, SwViewShellImp *pImp ); ~SwLayAction(); +void SetIdle( bool bNew ) { m_bIdle = bNew; } void SetCheckPages ( bool bNew ) { m_bCheckPages = bNew; } void SetBrowseActionStop( bool bNew ) { m_bBrowseActionStop = bNew; } void SetNextCycle ( bool bNew ) { m_bNextCycle = bNew; } bool IsWaitAllowed()const { return m_bWaitAllowed; } bool IsNextCycle() const { return m_bNextCycle; } +bool IsInput() const { return m_bInput; } bool IsPaint() const { return m_bPaint; } +bool IsIdle() const { return m_bIdle; } bool IsReschedule() const { return m_bReschedule; } -bool IsIdle() const { return m_pWatch != nullptr; } -bool IsPaintExtraData() const { return m_bPaintExtraData; } -bool IsInterrupt(); +bool IsPaintExtraData() const { return m_bPaintExtraData;} +bool IsInterrupt() const { return IsInput(); } + +VclInputFlags GetInputType()const { return m_nInputType; } // adjusting Action to the wanted
[Libreoffice-commits] core.git: Branch 'libreoffice-7-1' - sw/source
sw/source/core/txtnode/txtedt.cxx |8 1 file changed, 8 insertions(+) New commits: commit f85ed126774a06643e5529c799cd60489984c32c Author: Michael Stahl AuthorDate: Fri Apr 30 15:31:54 2021 +0200 Commit: Thorsten Behrens CommitDate: Sun May 2 10:17:54 2021 +0200 sw: speed up DoIdleJobs(WORD_COUNT) SwTextNode::CountWords() has early returns that don't clear the WordCountDirty flag, for nodes that don't contain any plain text. This speeds things up considerably for tdf135116-1.odt, which didn't finish the idle jobs after 5 minutes in an optimized 7.1 build, because the time slice tends to expire iterating nodes in word-count before it can make progress. With this it does ~25 WORD_COUNT pages and then ~90 AUTOCOMPLETE_WORDS pages per idle, sending OnLayoutFinished after 13-14 seconds. jmux just pointed me to commit 0fedac18214a6025401c4c426466a5166553e8ec which is not in 7.1 today and may have improved the performance here. Change-Id: I5e9651da3a173649c49fc36edefb23298dfd6bc4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114936 Tested-by: Jenkins Reviewed-by: Michael Stahl (cherry picked from commit 4184569b963877c2a488ff05766654b9db194798) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114919 Reviewed-by: Thorsten Behrens diff --git a/sw/source/core/txtnode/txtedt.cxx b/sw/source/core/txtnode/txtedt.cxx index cc66f68ed23e..61e1101fb330 100644 --- a/sw/source/core/txtnode/txtedt.cxx +++ b/sw/source/core/txtnode/txtedt.cxx @@ -2022,6 +2022,10 @@ bool SwTextNode::CountWords( SwDocStat& rStat, if( nStt == nEnd && !bCountNumbering) { // unnumbered empty node or empty selection +if (bCountAll) +{ +SetWordCountDirty( false ); // reset flag to speed up DoIdleJob +} return false; } @@ -2050,6 +2054,10 @@ bool SwTextNode::CountWords( SwDocStat& rStat, if (aExpandText.isEmpty() && !bCountNumbering) { +if (bCountAll) +{ +SetWordCountDirty( false ); // reset flag to speed up DoIdleJob +} return false; } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-7-1' - sw/source
sw/source/uibase/docvw/edtdd.cxx |5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) New commits: commit a559e6e6574b84c061fb5a90291276819f3b0c33 Author: Caolán McNamara AuthorDate: Wed Apr 28 17:19:30 2021 +0100 Commit: Michael Stahl CommitDate: Thu Apr 29 11:29:31 2021 +0200 tdf#116384 only drag hyperlink if user's not currently setting the selection which is what writer does for normal text. Under gtk its common on selecting by dragging the mouse over a hyperlink for one or two letters of the hyperlink to get selected before that selection then gets dragged as dnd. Under gen StartDragWidth is 2 by default so the drag kicks in before enough text has been selected for writer to select anything, but under gtk gtk-dnd-drag-threshold is used for StartDragWidth and that is 8 by default making it easy to select one or two characters before the gesture is recognized as a possible drag. it seems sane to do the same as for normal text and not dnd if the user is still using the mouse to set a selection Change-Id: I971d429acaf8a5a656c5ce58f52632979b94e40a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114726 Tested-by: Jenkins Reviewed-by: Michael Stahl diff --git a/sw/source/uibase/docvw/edtdd.cxx b/sw/source/uibase/docvw/edtdd.cxx index 31594da032af..a9d80375b51e 100644 --- a/sw/source/uibase/docvw/edtdd.cxx +++ b/sw/source/uibase/docvw/edtdd.cxx @@ -83,7 +83,8 @@ void SwEditWin::StartDrag( sal_Int8 /*nAction*/, const Point& rPosPixel ) bool bStart = false, bDelSelect = false; SdrObject *pObj = nullptr; Point aDocPos( PixelToLogic( rPosPixel ) ); -if ( !rSh.IsInSelect() && rSh.TestCurrPam( aDocPos, true)) +const bool bInSelect = rSh.IsInSelect(); +if (!bInSelect && rSh.TestCurrPam(aDocPos, true)) //We are not selecting and aren't at a selection bStart = true; else if ( !g_bFrameDrag && rSh.IsSelFrameMode() && @@ -109,7 +110,7 @@ void SwEditWin::StartDrag( sal_Int8 /*nAction*/, const Point& rPosPixel ) else rSh.UnlockPaint(); } -else +else if (!bInSelect)// tdf#116384 only drag hyperlink if user's not currently setting the selection { SwContentAtPos aSwContentAtPos( IsAttrAtPos::InetAttr ); bStart = rSh.GetContentAtPos( aDocPos, ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-7-1' - sw/source
sw/source/uibase/docvw/edtwin.cxx |6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) New commits: commit 0011c032afb96b2b3cfa63f88565e01c84d03512 Author: Jan-Marek Glogowski AuthorDate: Sun Apr 25 11:06:11 2021 +0200 Commit: Xisco Fauli CommitDate: Tue Apr 27 09:27:24 2021 +0200 tdf#141887 SW don't crash on missing SwWrtShell The code assumes that SwEditWin::Command can just be called, while there is still an m_rView.GetWrtShell(), which is at least not true, if you have an IM in pre-selection and close the Writer window via Window decoration. Change-Id: I67d5f1f917e9b2180037babb8c70c72d75c4a7ae Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114624 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski (cherry picked from commit 9a1c4a10b08ccb8d874a85a2cd984fd71f08c022) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114604 Reviewed-by: Xisco Fauli diff --git a/sw/source/uibase/docvw/edtwin.cxx b/sw/source/uibase/docvw/edtwin.cxx index 9ad8275b7b1b..bb0e735ec66f 100644 --- a/sw/source/uibase/docvw/edtwin.cxx +++ b/sw/source/uibase/docvw/edtwin.cxx @@ -5346,15 +5346,15 @@ void SwEditWin::LoseFocus() void SwEditWin::Command( const CommandEvent& rCEvt ) { -SwWrtShell = m_rView.GetWrtShell(); - -if ( !m_rView.GetViewFrame() ) +if (!m_rView.GetViewFrame() || isDisposed()) { // If ViewFrame dies shortly, no popup anymore! Window::Command(rCEvt); return; } +SwWrtShell = m_rView.GetWrtShell(); + // The command event is send to the window after a possible context // menu from an inplace client has been closed. Now we have the chance // to deactivate the inplace client without any problem regarding parent ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-7-1' - sw/source
sw/source/core/unocore/unocrsrhelper.cxx |8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) New commits: commit d1ac603b006a14c3cf8c8f852eb481a27e3c46fa Author: Mike Kaganski AuthorDate: Tue Apr 27 05:38:32 2021 +0300 Commit: Xisco Fauli CommitDate: Tue Apr 27 09:21:20 2021 +0200 tdf#141924: SwFormatAutoFormat::GetStyleHandle may return nullptr Change-Id: Id1b6fe687f5b328fa0743036a287bacfefe5e5fb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114685 Tested-by: Mike Kaganski Reviewed-by: Mike Kaganski Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114687 Tested-by: Jenkins Reviewed-by: Xisco Fauli diff --git a/sw/source/core/unocore/unocrsrhelper.cxx b/sw/source/core/unocore/unocrsrhelper.cxx index 0186b5f9613f..8c09a63113fa 100644 --- a/sw/source/core/unocore/unocrsrhelper.cxx +++ b/sw/source/core/unocore/unocrsrhelper.cxx @@ -312,17 +312,19 @@ static uno::Any GetParaListAutoFormat(SwTextNode const& rNode) { return uno::Any(); } -SfxItemSet const& rSet(*pFormat->GetStyleHandle()); +const auto pSet(pFormat->GetStyleHandle()); +if (!pSet) +return {}; SfxItemPropertySet const& rPropSet(*aSwMapProvider.GetPropertySet(PROPERTY_MAP_CHAR_AUTO_STYLE)); SfxItemPropertyMap const& rMap(rPropSet.getPropertyMap()); std::vector props; // have to iterate the map, not the item set? for (auto const& rEntry : rMap.getPropertyEntries()) { -if (rPropSet.getPropertyState(rEntry, rSet) == PropertyState_DIRECT_VALUE) +if (rPropSet.getPropertyState(rEntry, *pSet) == PropertyState_DIRECT_VALUE) { Any value; -rPropSet.getPropertyValue(rEntry, rSet, value); +rPropSet.getPropertyValue(rEntry, *pSet, value); props.emplace_back(rEntry.sName, value); } } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-7-1' - sw/source
sw/source/core/layout/flycnt.cxx| 18 ++- sw/source/core/layout/objectformattertxtfrm.cxx | 142 ++-- sw/source/core/layout/objectformattertxtfrm.hxx |9 + 3 files changed, 152 insertions(+), 17 deletions(-) New commits: commit 8feac9601cfe35ee0966776bab15d122206f154e Author: Michael Stahl AuthorDate: Thu Apr 22 13:43:07 2021 +0200 Commit: Thorsten Behrens CommitDate: Fri Apr 23 17:04:27 2021 +0200 tdf#138518 sw: layout: avoid moving flys forward prematurely (regression from b9ef71476fd70bc13f50ebe80390e0730d1b7afb "tdf#134298 sw: layout: remove left-over page frame without content") When updating the 3rd ToX, the change to remove empty page frames causes one page frame to be deleted. On the subsequent layout, things generally move backward, but there are some fly-related hiccups; the first problem is visible on page 7. Commit eb85de8e6b61fb3fcb6c03ae0145f7fe5478bccf "sw: layout: if fly's anchor moves forward, move fly off SwPageFrame" helps quite a bit, but not completely; now the first problem happens on page 54, when SwTextFrame 1261 and its fly 3132 are formatted. Frame 1261 moves forward to page 55, and then SwObjectFormatterTextFrame::CheckMovedFwdCondition() returns true and so SwMovedFwdFramesByObjPos::Insert() is called to prevent frame 1261 from moving back to page 54. But the reason why it moved forward is that there are 3 flys on page 54 that are anchored on frames in the next-chain of 1261, namely 1275, 1283 and 1284; if these flys weren't on the page then 1261 would fit. While the move forward cannot be easily prevented in the situation, it's possible to avoid the entry into the SwMovedFwdFramesByObjPos map, by detecting that there are flys on the page that would should forward *before* the current one does. With this fix and the above mentioned commit to get the flys off the page, frame 1261 will eventually move back to page 54 again. Change-Id: I83e44d65a0b889a49a313b0cd8b08efce4c3afa7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114478 Tested-by: Jenkins Reviewed-by: Michael Stahl (cherry picked from commit c799de145f7e289f31e3669646e5bd12814e6c5e) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114521 Reviewed-by: Thorsten Behrens diff --git a/sw/source/core/layout/flycnt.cxx b/sw/source/core/layout/flycnt.cxx index bcc75a032e31..2656e800fd3f 100644 --- a/sw/source/core/layout/flycnt.cxx +++ b/sw/source/core/layout/flycnt.cxx @@ -427,9 +427,11 @@ void SwFlyAtContentFrame::MakeAll(vcl::RenderContext* pRenderContext) // sal_uInt32 nToPageNum( 0 ); bool bDummy( false ); +bool bPageHasFlysAnchoredBelowThis(false); if ( SwObjectFormatterTextFrame::CheckMovedFwdCondition( *this, GetPageFrame()->GetPhyPageNum(), -bAnchoredAtMaster, nToPageNum, bDummy ) ) +bAnchoredAtMaster, nToPageNum, bDummy, +bPageHasFlysAnchoredBelowThis) ) { bConsiderWrapInfluenceDueToMovedFwdAnchor = true; // mark anchor text frame @@ -442,14 +444,22 @@ void SwFlyAtContentFrame::MakeAll(vcl::RenderContext* pRenderContext) rDoc, *pAnchorTextFrame, nAnchorFrameToPageNum ) ) { if ( nAnchorFrameToPageNum < nToPageNum ) -SwLayouter::RemoveMovedFwdFrame( rDoc, *pAnchorTextFrame ); +{ +if (!bPageHasFlysAnchoredBelowThis) +{ +SwLayouter::RemoveMovedFwdFrame(rDoc, *pAnchorTextFrame); +} +} else bInsert = false; } if ( bInsert ) { -SwLayouter::InsertMovedFwdFrame( rDoc, *pAnchorTextFrame, - nToPageNum ); +if (!bPageHasFlysAnchoredBelowThis) +{ +SwLayouter::InsertMovedFwdFrame(rDoc, *pAnchorTextFrame, +nToPageNum); +} } } } diff --git a/sw/source/core/layout/objectformattertxtfrm.cxx b/sw/source/core/layout/objectformattertxtfrm.cxx index 98e374a7e5fb..005f14902079 100644 --- a/sw/source/core/layout/objectformattertxtfrm.cxx +++ b/sw/source/core/layout/objectformattertxtfrm.cxx @@ -30,6 +30,7 @@ #include #include #include +#include #include #include #include @@ -233,11 +234,13 @@ bool SwObjectFormatterTextFrame::DoFormatObj( SwAnchoredObject& _rAnchoredObj,
[Libreoffice-commits] core.git: Branch 'libreoffice-7-1' - sw/source
sw/source/core/inc/flyfrms.hxx|1 + sw/source/core/layout/pagechg.cxx |5 + 2 files changed, 6 insertions(+) New commits: commit c79b92edfb5e650fff76688998cf4f0bbd08d2a4 Author: Michael Stahl AuthorDate: Tue Apr 20 12:45:36 2021 +0200 Commit: Thorsten Behrens CommitDate: Fri Apr 23 17:03:42 2021 +0200 tdf#138785 sw: fix mis-positioned as-char flys when deleting empty page When SwFrame::CheckPageDescs() deletes an empty page in the middle of the document, which happens during SetRedlineFlags() here, the SwFlyInContentFrame::maFrameArea is moved in lcl_MoveAllLowers(), but the SwFlyInContentFrame::m_aRefPoint stays unchanged. Because the formatting occurs only after the redline mode is reset, the position of the SwFlyInContentFrame when it is formatted is exactly the same as its (stale) m_aRefPoint, so the setting of (updated) maFrameArea is skipped in SwAsCharAnchoredObjectPosition::CalcPosition(), so the fly ends up a page above where it should be. So keep m_aRefPoint consistent with maFrameArea in lcl_MoveAllLowers(). (regression from b9ef71476fd70bc13f50ebe80390e0730d1b7afb) Change-Id: If1b421daa0d71718d89d9772f5c0d9e367e76845 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114332 Tested-by: Jenkins Reviewed-by: Michael Stahl (cherry picked from commit e656cf2a71e738c282abcd0d610e724b955f274a) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114520 Reviewed-by: Thorsten Behrens diff --git a/sw/source/core/inc/flyfrms.hxx b/sw/source/core/inc/flyfrms.hxx index 66e0b27e0655..ff07cc11a6d4 100644 --- a/sw/source/core/inc/flyfrms.hxx +++ b/sw/source/core/inc/flyfrms.hxx @@ -228,6 +228,7 @@ public: //see layact.cxx void AddRefOfst( tools::Long nOfst ) { m_aRef.AdjustY( nOfst ); } +void AddRefOfst(Point const& rOfst) { m_aRef += rOfst; } // #i26791# virtual void MakeObjPos() override; diff --git a/sw/source/core/layout/pagechg.cxx b/sw/source/core/layout/pagechg.cxx index a40b9d18bdcc..cd44bbb525c2 100644 --- a/sw/source/core/layout/pagechg.cxx +++ b/sw/source/core/layout/pagechg.cxx @@ -2007,6 +2007,11 @@ static void lcl_MoveAllLowerObjs( SwFrame* pFrame, const Point& rOffset ) if ( auto pFlyFrame = dynamic_cast( pAnchoredObj ) ) { lcl_MoveAllLowers( pFlyFrame, rOffset ); +// tdf#138785 update position specific to as-char flys +if (pFlyFrame->IsFlyInContentFrame()) +{ + static_cast(pFlyFrame)->AddRefOfst(rOffset); +} pFlyFrame->NotifyDrawObj(); // --> let the active embedded object be moved SwFrame* pLower = pFlyFrame->Lower(); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-7-1' - sw/source
sw/source/ui/dbui/addresslistdialog.cxx |6 +- 1 file changed, 5 insertions(+), 1 deletion(-) New commits: commit 99ca6b660fd911e9e60b63ae286c588aedfb01d0 Author: Gabor Kelemen AuthorDate: Wed Apr 7 17:42:36 2021 +0200 Commit: Xisco Fauli CommitDate: Tue Apr 20 21:40:31 2021 +0200 tdf#141538 Make Remove button work in Select Address List dialog ... of the Mail Merge Wizard with non-GTK3 backends This works around the different return value of TreeView::get_selected_text() Change-Id: Id7542f8e73731ffe5d133703f0bd0d0ebf26b89f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113747 Tested-by: Jenkins Tested-by: László Németh Reviewed-by: László Németh (cherry picked from commit a258d42c77c3ce65a9455d08dc6106310222bc7b) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114181 Reviewed-by: Xisco Fauli diff --git a/sw/source/ui/dbui/addresslistdialog.cxx b/sw/source/ui/dbui/addresslistdialog.cxx index 11c95bc0b478..da49d4ce9576 100644 --- a/sw/source/ui/dbui/addresslistdialog.cxx +++ b/sw/source/ui/dbui/addresslistdialog.cxx @@ -51,6 +51,7 @@ #include #include #include +#include using namespace ::com::sun::star; using namespace ::com::sun::star::uno; @@ -303,8 +304,11 @@ IMPL_LINK_NOARG(SwAddressListDialog, RemoveHdl_Impl, weld::Button&, void) if (xQuery->run() != RET_YES) return; +// tdf#141538: Split content of TreeView row to make removal work on non-GTK vclplugs +std::vector aSplitColumns = comphelper::string::split(m_xListLB->get_selected_text(), '\t'); + // Remove data source connection -SwDBManager::RevokeDataSource(m_xListLB->get_selected_text()); +SwDBManager::RevokeDataSource(aSplitColumns.front()); // Remove item from the list m_xListLB->remove(nEntry); // If this was the last item, disable the Remove & Edit buttons and enable Create ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-7-1' - sw/source
sw/source/core/frmedt/feshview.cxx |8 1 file changed, 8 insertions(+) New commits: commit 4ee3d213e8d3c4afdc3714b50def117dfe5c8023 Author: Jeff Huang AuthorDate: Mon Apr 12 14:16:02 2021 +0800 Commit: Xisco Fauli CommitDate: Mon Apr 19 09:10:59 2021 +0200 tdf#141525 Fix "Line with Arrow/Circle" insertion error. When you insert "Line with Arrow/Circle" from "Lines and Arrows", it will show "Line Starts with Arrow" instead of "Line with Arrow/Circle". This patch can fix this issue. (This issue exists at least since 6.3 series.) Change-Id: I827b9582951fe359d89245970e73d63f7697553f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113963 Tested-by: Jenkins Reviewed-by: Mark Hung (cherry picked from commit 2b498e380a91a536d177376e854cf3a6e2fb0b35) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114179 Reviewed-by: Po-Yen Huang Reviewed-by: Xisco Fauli diff --git a/sw/source/core/frmedt/feshview.cxx b/sw/source/core/frmedt/feshview.cxx index 767e4e7f16e8..439d99e9e2d7 100644 --- a/sw/source/core/frmedt/feshview.cxx +++ b/sw/source/core/frmedt/feshview.cxx @@ -1004,6 +1004,14 @@ void SwFEShell::SetLineEnds(SfxItemSet& rAttr, SdrObject const & rObj, sal_uInt1 // and again, for the still missing ends switch (nSlotId) { +case SID_LINE_ARROW_CIRCLE: +{ +// circle end +rAttr.Put(XLineEndItem(SvxResId(RID_SVXSTR_CIRCLE), aCircle)); +rAttr.Put(XLineEndWidthItem(nWidth)); +} +break; + case SID_LINE_CIRCLE_ARROW: { // circle start ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-7-1' - sw/source writerfilter/source
sw/source/uibase/dochdl/swdtflvr.cxx |6 -- writerfilter/source/rtftok/rtfdocumentimpl.cxx |6 -- 2 files changed, 4 insertions(+), 8 deletions(-) New commits: commit ef7ecb85645c68aeec2585240fa72e322e424020 Author: Mike Kaganski AuthorDate: Tue Apr 6 14:52:02 2021 +0300 Commit: Xisco Fauli CommitDate: Wed Apr 7 08:38:36 2021 +0200 tdf#136740: reimplement the fix using existing m_bIsNewDoc This reimplements the fix from commit d7c4d0d4ea83481693af3645a03b03b53e456f60. The unit test from commit a90a324aa590a94a4091fbfadea67e0b0203767c still passes. Change-Id: I84c61fa68b9bee679a8e82ef7b8f164297bacb5a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113665 Tested-by: Jenkins Reviewed-by: Mike Kaganski (cherry picked from commit 7fc2cafbba36db25e7d0083cea162d2df08611b5) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113646 Reviewed-by: Xisco Fauli diff --git a/sw/source/uibase/dochdl/swdtflvr.cxx b/sw/source/uibase/dochdl/swdtflvr.cxx index 8caa6c50c358..894d9049bcfd 100644 --- a/sw/source/uibase/dochdl/swdtflvr.cxx +++ b/sw/source/uibase/dochdl/swdtflvr.cxx @@ -32,7 +32,6 @@ #include #include #include -#include #include #include #include @@ -2101,11 +2100,6 @@ bool SwTransferable::PasteFileContent( TransferableDataHelper& rData, rSh.SetChgLnk( Link() ); const SwPosition& rInsPos = *rSh.GetCursor()->Start(); - -// Reader might need to know if we are pasting into an existing document, or initializing -// a new document; e.g. initializing document setting could be skipped when pasting. -css::uno::ContextLayer layer(comphelper::NewFlagContext("InPasteFromClipboard")); - SwReader aReader(*pStream, OUString(), OUString(), *rSh.GetCursor()); rSh.SaveTableBoxContent( ); diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.cxx b/writerfilter/source/rtftok/rtfdocumentimpl.cxx index 3cc89508c71c..a6bca50007ce 100644 --- a/writerfilter/source/rtftok/rtfdocumentimpl.cxx +++ b/writerfilter/source/rtftok/rtfdocumentimpl.cxx @@ -22,7 +22,6 @@ #include #include #include -#include #include #include #include @@ -267,7 +266,7 @@ RTFDocumentImpl::RTFDocumentImpl(uno::Reference const& x , m_pMapperStream(nullptr) , m_aDefaultState(this) , m_bSkipUnknown(false) -, m_bFirstRun(!comphelper::IsContextFlagActive("InPasteFromClipboard")) +, m_bFirstRun(true) , m_bFirstRunException(false) , m_bNeedPap(true) , m_bNeedCr(false) @@ -372,6 +371,9 @@ void RTFDocumentImpl::resolveSubstream(std::size_t nPos, Id nId, OUString const& void RTFDocumentImpl::outputSettingsTable() { +// tdf#136740: do not change trarget document settings when pasting +if (!m_bIsNewDoc) +return; writerfilter::Reference::Pointer_t pProp = new RTFReferenceProperties(m_aSettingsTableAttributes, m_aSettingsTableSprms); RTFReferenceTable::Entries_t aSettingsTableEntries; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-7-1' - sw/source writerfilter/source
sw/source/uibase/dochdl/swdtflvr.cxx |6 ++ writerfilter/source/rtftok/rtfdocumentimpl.cxx |3 ++- 2 files changed, 8 insertions(+), 1 deletion(-) New commits: commit 6d9d8c5a1abaf4ce2672406e2c04d68da5bb2cf7 Author: Mike Kaganski AuthorDate: Mon Apr 5 19:19:44 2021 +0300 Commit: Xisco Fauli CommitDate: Tue Apr 6 22:52:17 2021 +0200 tdf#136740: Do not initialize document settings when pasting When pasting from clipboard, the document already has the defaults set, and pasted text must not change those defaults. When pasting RTF, RTFDocumentImpl::outputSettingsTable does the document settings initialization, and is called from RTFDocumentImpl::checkFirstRun when m_bFirstRun is true. Other defaults are set in the latter function, too. This makes m_bFirstRun false when RTFDocumentImpl is created in the context of a paste operation. Alternatively, checking the context could be made when deciding if to apply specific settings. Change-Id: Ide1eabbef1d04a4fa2f1ca14846b8e404f2a0cb1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113613 Tested-by: Jenkins Reviewed-by: Mike Kaganski (cherry picked from commit d7c4d0d4ea83481693af3645a03b03b53e456f60) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113634 Reviewed-by: Xisco Fauli diff --git a/sw/source/uibase/dochdl/swdtflvr.cxx b/sw/source/uibase/dochdl/swdtflvr.cxx index 894d9049bcfd..8caa6c50c358 100644 --- a/sw/source/uibase/dochdl/swdtflvr.cxx +++ b/sw/source/uibase/dochdl/swdtflvr.cxx @@ -32,6 +32,7 @@ #include #include #include +#include #include #include #include @@ -2100,6 +2101,11 @@ bool SwTransferable::PasteFileContent( TransferableDataHelper& rData, rSh.SetChgLnk( Link() ); const SwPosition& rInsPos = *rSh.GetCursor()->Start(); + +// Reader might need to know if we are pasting into an existing document, or initializing +// a new document; e.g. initializing document setting could be skipped when pasting. +css::uno::ContextLayer layer(comphelper::NewFlagContext("InPasteFromClipboard")); + SwReader aReader(*pStream, OUString(), OUString(), *rSh.GetCursor()); rSh.SaveTableBoxContent( ); diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.cxx b/writerfilter/source/rtftok/rtfdocumentimpl.cxx index 9977306b90f0..3cc89508c71c 100644 --- a/writerfilter/source/rtftok/rtfdocumentimpl.cxx +++ b/writerfilter/source/rtftok/rtfdocumentimpl.cxx @@ -22,6 +22,7 @@ #include #include #include +#include #include #include #include @@ -266,7 +267,7 @@ RTFDocumentImpl::RTFDocumentImpl(uno::Reference const& x , m_pMapperStream(nullptr) , m_aDefaultState(this) , m_bSkipUnknown(false) -, m_bFirstRun(true) +, m_bFirstRun(!comphelper::IsContextFlagActive("InPasteFromClipboard")) , m_bFirstRunException(false) , m_bNeedPap(true) , m_bNeedCr(false) ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-7-1' - sw/source
sw/source/core/docnode/section.cxx | 44 ++--- 1 file changed, 17 insertions(+), 27 deletions(-) New commits: commit 296c1b3b7e2fca6d54e3e61684d70d12f7989624 Author: Bjoern Michaelsen AuthorDate: Sun Nov 22 10:47:20 2020 +0100 Commit: Xisco Fauli CommitDate: Wed Mar 31 16:26:26 2021 +0200 tdf#140863: section.cxx: Remove remaining SwClientNotifyCalls Change-Id: I569c5952a7491c37c677ad6b6d5f803a50b2e701 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106341 Tested-by: Jenkins Reviewed-by: Bjoern Michaelsen (cherry picked from commit 5fc6a601d7a1978db291fd0f7dcec638a7c25651) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113361 Reviewed-by: Michael Stahl Tested-by: Xisco Fauli diff --git a/sw/source/core/docnode/section.cxx b/sw/source/core/docnode/section.cxx index a3dad1262b23..00adf5a40f47 100644 --- a/sw/source/core/docnode/section.cxx +++ b/sw/source/core/docnode/section.cxx @@ -66,13 +66,6 @@ using namespace ::com::sun::star; namespace { - -void lcl_SwClientNotify(sw::BroadcastingModify& rModify, const SfxPoolItem* pOldNew) -{ -const sw::LegacyModifyHint aHint(pOldNew, pOldNew); -rModify.SwClientNotifyCall(rModify, aHint); -} - class SwIntrnlSectRefLink : public SwBaseLink { SwSectionFormat& m_rSectFormat; @@ -318,8 +311,8 @@ void SwSection::ImplSetHiddenFlag(bool const bTmpHidden, bool const bCondition) // This should be shown by the bHiddenFlag. // Tell all Children that they are hidden -SwMsgPoolItem aMsgItem( RES_SECTION_HIDDEN ); -lcl_SwClientNotify(*pFormat, ); +const SwMsgPoolItem aMsgItem( RES_SECTION_HIDDEN ); +pFormat->CallSwClientNotify(sw::LegacyModifyHint(, )); // Delete all Frames pFormat->DelFrames(); @@ -333,8 +326,8 @@ void SwSection::ImplSetHiddenFlag(bool const bTmpHidden, bool const bCondition) if( !pParentSect || !pParentSect->IsHiddenFlag() ) { // Tell all Children that the Parent is not hidden anymore -SwMsgPoolItem aMsgItem( RES_SECTION_NOT_HIDDEN ); -lcl_SwClientNotify(*pFormat, ); +const SwMsgPoolItem aMsgItem( RES_SECTION_NOT_HIDDEN ); +pFormat->CallSwClientNotify(sw::LegacyModifyHint(, )); pFormat->MakeFrames(); } @@ -719,8 +712,8 @@ void SwSectionFormat::DelFrames() SwContentNode* pCNd = GetDoc()->GetNodes().GoNextSection( , true, false ); if( pCNd ) { -const SfxPoolItem& rItem = pCNd->GetSwAttrSet().Get( RES_PAGEDESC ); -lcl_SwClientNotify(*pCNd, ); +const SfxPoolItem& rItem = pCNd->GetSwAttrSet().Get(RES_PAGEDESC); +pCNd->CallSwClientNotify(sw::LegacyModifyHint(, )); } } @@ -945,22 +938,19 @@ void SwSectionFormat::UpdateParent() bIsHidden = pPS->IsHiddenFlag(); } SwIterator aIter(*this); -for(SwSectionFormat* pLast = aIter.First(); pLast; pLast = aIter.Next()) -{ -if(!pProtect->IsContentProtected() != !pSection->IsProtectFlag()) -lcl_SwClientNotify(*static_cast(pLast), static_cast(pProtect)); +if(!pProtect->IsContentProtected() != !pSection->IsProtectFlag()) +CallSwClientNotify(sw::LegacyModifyHint(pProtect, pProtect)); -// edit in readonly sections -if(!pEditInReadonly->GetValue() != !pSection->IsEditInReadonlyFlag()) -lcl_SwClientNotify(*static_cast(pLast), static_cast(pEditInReadonly)); +// edit in readonly sections +if(!pEditInReadonly->GetValue() != !pSection->IsEditInReadonlyFlag()) +CallSwClientNotify(sw::LegacyModifyHint(pEditInReadonly, pEditInReadonly)); -if(bIsHidden == pSection->IsHiddenFlag()) -{ -SwMsgPoolItem aMsgItem( static_cast(bIsHidden -? RES_SECTION_HIDDEN -: RES_SECTION_NOT_HIDDEN ) ); -lcl_SwClientNotify(*static_cast(pLast), ); -} +if(bIsHidden == pSection->IsHiddenFlag()) +{ +SwMsgPoolItem aMsgItem(static_cast(bIsHidden +? RES_SECTION_HIDDEN +: RES_SECTION_NOT_HIDDEN)); +CallSwClientNotify(sw::LegacyModifyHint(, )); } } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-7-1' - sw/source
sw/source/core/edit/autofmt.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 0dba9eddafc7ba2c22554538a1324ee75ddb565e Author: Julien Nabet AuthorDate: Sun Mar 7 10:40:42 2021 +0100 Commit: Michael Stahl CommitDate: Tue Mar 30 11:32:54 2021 +0200 sw fr_FR AutoCorrect: fix crash using "Apply and Edit changes" Bad calling of SvxAutoCorrect::FnAddNonBrkSpace() in French documents, see tdf#140849 for a similar problem. Change-Id: I19b964fb8fe437c7f98342a873a456ffded75d82 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112120 (cherry picked from commit df41967a29c4f8243d1df2d9b23d7c41d4a13819) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112731 Tested-by: Michael Stahl Reviewed-by: Michael Stahl diff --git a/sw/source/core/edit/autofmt.cxx b/sw/source/core/edit/autofmt.cxx index 2a40b90d448f..060e8b2889b4 100644 --- a/sw/source/core/edit/autofmt.cxx +++ b/sw/source/core/edit/autofmt.cxx @@ -2184,7 +2184,7 @@ void SwAutoFormat::AutoCorrect(TextFrameIndex nPos) continue; // do not check further } -if ( m_aFlags.bAddNonBrkSpace ) +if ( m_aFlags.bAddNonBrkSpace && nPos < TextFrameIndex(pText->getLength()) ) { SetRedlineText( STR_AUTOFMTREDL_NON_BREAK_SPACE ); pATst->FnAddNonBrkSpace(aACorrDoc, *pText, sal_Int32(nPos), eLang, bNbspRunNext); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-7-1' - sw/source
sw/source/uibase/utlui/glbltree.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 995dde17ee9a2249e0e2d3bc704294583b9ff7b1 Author: Caolán McNamara AuthorDate: Mon Mar 29 14:17:31 2021 +0100 Commit: Michael Stahl CommitDate: Tue Mar 30 11:22:59 2021 +0200 tdf#140556 master document view not launching subdocument from context menu Change-Id: I0ae61e51266ae050e340c1af99e0dd6a481e6ff9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113281 Tested-by: Jenkins Reviewed-by: Michael Stahl diff --git a/sw/source/uibase/utlui/glbltree.cxx b/sw/source/uibase/utlui/glbltree.cxx index 925753c35345..f17faed8c960 100644 --- a/sw/source/uibase/utlui/glbltree.cxx +++ b/sw/source/uibase/utlui/glbltree.cxx @@ -610,7 +610,7 @@ void SwGlobalTree::ExecuteContextMenuAction(const OString& rSelectedPopupEntry) pCont = nullptr; bUpdateHard = true; } -else if (rSelectedPopupEntry == "edit") +else if (rSelectedPopupEntry == "editcontent") { OSL_ENSURE(pCont, "edit without entry ? " ); if (pCont) ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-7-1' - sw/source
sw/source/ui/misc/outline.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit ebbf550f7087b173bdcf600a02bb87c0b655e787 Author: Noel Grandin AuthorDate: Sat Mar 13 18:12:24 2021 +0200 Commit: Noel Grandin CommitDate: Tue Mar 23 12:30:07 2021 +0100 tdf#140590 Writer crash in Tools>Chapter Numbering and an assert in vcl to catch it a little higher up the stack. Change-Id: Iaa2e70f901f93ca9f678118e4f5a8bc1b6eda20a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112459 Tested-by: Jenkins Reviewed-by: Noel Grandin Signed-off-by: Xisco Fauli Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112866 diff --git a/sw/source/ui/misc/outline.cxx b/sw/source/ui/misc/outline.cxx index e9b147f4d343..a7004880ad0c 100644 --- a/sw/source/ui/misc/outline.cxx +++ b/sw/source/ui/misc/outline.cxx @@ -92,7 +92,7 @@ void SwNumNamesDlg::SetUserNames(const OUString *pList[]) nSelect++; } } -m_xFormBox->select(nSelect); +m_xFormBox->select(std::min(nSelect, static_cast(m_xFormBox->n_children() - 1))); SelectHdl(*m_xFormBox); } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-7-1' - sw/source
sw/source/core/inc/UndoTable.hxx |2 +- sw/source/core/undo/untbl.cxx|8 ++-- 2 files changed, 7 insertions(+), 3 deletions(-) New commits: commit b18bffb5b4948bbdaece90a68a4c9341ad9df084 Author: Miklos Vajna AuthorDate: Thu Mar 18 20:59:36 2021 +0100 Commit: Xisco Fauli CommitDate: Tue Mar 23 10:54:19 2021 +0100 Related: tdf#133933 sw: fix assertion failure in the SwIndexReg dtor Make sure that by the time we delete a text node, no SwIndexes point to us. Change-Id: I9248a2ebe529e5a0aab0e37bf676e669b9bddb1d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112698 Tested-by: Jenkins Reviewed-by: Miklos Vajna (cherry picked from commit e782937228479054336b564a4c34697a12530469) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112950 Reviewed-by: Michael Stahl diff --git a/sw/source/core/inc/UndoTable.hxx b/sw/source/core/inc/UndoTable.hxx index 15bb1dc85bea..472f9fdd65d5 100644 --- a/sw/source/core/inc/UndoTable.hxx +++ b/sw/source/core/inc/UndoTable.hxx @@ -273,7 +273,7 @@ class SwUndoTableCpyTable : public SwUndo //b6341295: When redlining is active, PrepareRedline has to create the //redlining attributes for the new and the old table cell content static std::unique_ptr PrepareRedline( SwDoc* pDoc, const SwTableBox& rBox, -const SwPosition& rPos, bool& rJoin, bool bRedo ); +SwPosition& rPos, bool& rJoin, bool bRedo ); public: SwUndoTableCpyTable(const SwDoc& rDoc); diff --git a/sw/source/core/undo/untbl.cxx b/sw/source/core/undo/untbl.cxx index a07d8cb7df69..85a797d5f509 100644 --- a/sw/source/core/undo/untbl.cxx +++ b/sw/source/core/undo/untbl.cxx @@ -2501,7 +2501,7 @@ void SwUndoTableCpyTable::RedoImpl(::sw::UndoRedoContext & rContext) // Otherwise aInsIdx has been moved during the Undo operation if( pEntry->bJoin ) { -SwPaM const& rLastPam = +SwPaM& rLastPam = rContext.GetCursorSupplier().GetCurrentShellCursor(); pUndo = PrepareRedline( , rBox, *rLastPam.GetPoint(), pEntry->bJoin, true ); @@ -2616,7 +2616,7 @@ void SwUndoTableCpyTable::AddBoxAfter( const SwTableBox& rBox, const SwNodeIndex // rJoin is true if Redo() is calling and the content has already been merged std::unique_ptr SwUndoTableCpyTable::PrepareRedline( SwDoc* pDoc, const SwTableBox& rBox, -const SwPosition& rPos, bool& rJoin, bool bRedo ) +SwPosition& rPos, bool& rJoin, bool bRedo ) { std::unique_ptr pUndo; // b62341295: Redline for copying tables @@ -2640,6 +2640,10 @@ std::unique_ptr SwUndoTableCpyTable::PrepareRedline( SwDoc* pDoc, const if( !bRedo && rPos.nNode.GetNode().GetTextNode() ) { // Try to merge, if not called by Redo() rJoin = true; + +// Park this somewhere else so nothing points to the to-be-deleted node. +rPos.nContent.Assign(pText, 0); + pText->JoinNext(); } } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-7-1' - sw/source
sw/source/uibase/uiview/view.cxx |4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) New commits: commit b3c94568e25990b1f6b3df1f7919acecdca3ffd2 Author: Mike Kaganski AuthorDate: Sun Mar 14 12:08:25 2021 +0300 Commit: Xisco Fauli CommitDate: Wed Mar 17 21:14:14 2021 +0100 tdf#141015: Show Mail Merge toolbar when DBData has data source Change-Id: I74ea06b47d851d979103599526ae970035854dae Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112465 Tested-by: Jenkins Reviewed-by: Mike Kaganski (cherry picked from commit 346153f08c907739ca310934ad45814379971027) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112514 Reviewed-by: Xisco Fauli diff --git a/sw/source/uibase/uiview/view.cxx b/sw/source/uibase/uiview/view.cxx index ff6f2bc82349..3e10ab192e5a 100644 --- a/sw/source/uibase/uiview/view.cxx +++ b/sw/source/uibase/uiview/view.cxx @@ -439,7 +439,9 @@ void SwView::SelectShell() } // Show Mail Merge toolbar initially for documents with Database fields -if (!m_bInitOnceCompleted && GetWrtShell().IsAnyDatabaseFieldInDoc()) +if (!m_bInitOnceCompleted +&& (GetWrtShell().IsAnyDatabaseFieldInDoc() +|| !GetWrtShell().GetDBData().sDataSource.isEmpty())) ShowUIElement("private:resource/toolbar/mailmerge"); // Activate the toolbar to the new selection which also was active last time. ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-7-1' - sw/source
sw/source/uibase/dbui/dbtree.cxx | 13 - 1 file changed, 12 insertions(+), 1 deletion(-) New commits: commit 69ff121dbee216ed2e4d47207db1d3715bbe0f85 Author: Mike Kaganski AuthorDate: Sun Mar 14 14:33:34 2021 +0300 Commit: Xisco Fauli CommitDate: Wed Mar 17 19:34:09 2021 +0100 tdf#141012: do not try to expand the node if RequestingChildrenHdl failed Just select the database node itself, so that it's still obvious which database is associated with this document. After selecting this node when initializing the tab, another call to SwDBTreeList::Select will be made, so make sure to handle empty table and column names. Change-Id: Ie1d1bd445e18d5900910c780a24102b4dde5c787 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112467 Tested-by: Jenkins Reviewed-by: Mike Kaganski (cherry picked from commit 351edb44eb0548f7e56464de42c1758a1f5e4ab4) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112515 Reviewed-by: Xisco Fauli diff --git a/sw/source/uibase/dbui/dbtree.cxx b/sw/source/uibase/dbui/dbtree.cxx index 9b23f2a4f457..96088dd2611c 100644 --- a/sw/source/uibase/dbui/dbtree.cxx +++ b/sw/source/uibase/dbui/dbtree.cxx @@ -332,14 +332,25 @@ void SwDBTreeList::Select(const OUString& rDBName, const OUString& rTableName, c { if (rDBName == m_xTreeView->get_text(*xParent)) { +if (rTableName.isEmpty() && rColumnName.isEmpty()) +{ +// Just select the database node, do not expand +m_xTreeView->scroll_to_row(*xParent); +m_xTreeView->select(*xParent); +return; +} if (!m_xTreeView->iter_has_child(*xParent)) { RequestingChildrenHdl(*xParent); -m_xTreeView->expand_row(*xParent); +// If successful, it will be expanded in a call to scroll_to_row for its children } std::unique_ptr xChild(m_xTreeView->make_iterator(xParent.get())); if (!m_xTreeView->iter_children(*xChild)) +{ +m_xTreeView->scroll_to_row(*xParent); +m_xTreeView->select(*xParent); continue; +} do { if (rTableName == m_xTreeView->get_text(*xChild)) ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-7-1' - sw/source
sw/source/uibase/utlui/content.cxx | 61 + 1 file changed, 42 insertions(+), 19 deletions(-) New commits: commit b250a748e6b28ea79e153ae9136fe2930ac9c3d8 Author: Mike Kaganski AuthorDate: Tue Mar 9 12:59:41 2021 +0300 Commit: Xisco Fauli CommitDate: Wed Mar 17 19:32:20 2021 +0100 tdf#40427: use node index as position, not Y position on screen As mentioned in comment to SwContent::nYPosition in sw/source/uibase/inc/swcont.hxx: some subclasses appear to use this for a tools/gen.hxx-style geometric Y position, while e.g. SwOutlineContent wants to store the index in its subtree Abusing the nYPosition to store vertical position *on screen* gives wrong results when a following section is positioned on screen higher than a previous section - e.g., when multiple-page view is active. So just use the section's node as Y position of the Navigator entry. When the section is inside a fly frame, use the frame's anchor node. Change-Id: I6caf26aeb19d845129dc837138c37f42bbc18655 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112197 Tested-by: Jenkins Reviewed-by: Mike Kaganski (cherry picked from commit 4caf4403c1b862e7ccca94b9caee31394d019732) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112226 Reviewed-by: Xisco Fauli diff --git a/sw/source/uibase/utlui/content.cxx b/sw/source/uibase/utlui/content.cxx index 3129d7ee572f..87f526a17996 100644 --- a/sw/source/uibase/utlui/content.cxx +++ b/sw/source/uibase/utlui/content.cxx @@ -262,6 +262,26 @@ namespace return false; } + +// Gets "YPos" for SwRegionContent, i.e. a number used to sort sections in Navigator's list +tools::Long getYPosForSection(const SwNodeIndex& rNodeIndex) +{ +sal_uLong nIndex = rNodeIndex.GetIndex(); +if (rNodeIndex.GetNodes().GetEndOfExtras().GetIndex() >= nIndex) +{ +// Not a node of BodyText +// Are we in a fly? +if (const auto pFlyFormat = rNodeIndex.GetNode().GetFlyFormat()) +{ +// Get node index of anchor +if (auto pSwPosition = pFlyFormat->GetAnchor().GetContentAnchor()) +{ +nIndex = getYPosForSection(pSwPosition->nNode); +} +} +} +return static_cast(nIndex); +} } // end of anonymous namespace SwContentType::SwContentType(SwWrtShell* pShell, ContentTypeId nType, sal_uInt8 nLevel) : @@ -354,18 +374,20 @@ void SwContentType::Init(bool* pbInvalidateWindow) pOldMember = std::move(m_pMember); m_pMember.reset( new SwContentArr ); } -const Point aNullPt; m_nMemberCount = m_pWrtShell->GetSectionFormatCount(); for(size_t i = 0; i < m_nMemberCount; ++i) { -const SwSectionFormat* pFormat; -SectionType eTmpType; -if( (pFormat = _pWrtShell->GetSectionFormat(i))->IsInNodesArr() && -(eTmpType = pFormat->GetSection()->GetType()) != SectionType::ToxContent -&& SectionType::ToxHeader != eTmpType ) +const SwSectionFormat* pFormat = _pWrtShell->GetSectionFormat(i); +if (!pFormat->IsInNodesArr()) +continue; +const SwSection* pSection = pFormat->GetSection(); +if (SectionType eTmpType = pSection->GetType(); +eTmpType == SectionType::ToxContent || eTmpType == SectionType::ToxHeader) +continue; +const SwNodeIndex* pNodeIndex = pFormat->GetContent().GetContentIdx(); +if (pNodeIndex) { -const OUString& rSectionName = -pFormat->GetSection()->GetSectionName(); +const OUString& rSectionName = pSection->GetSectionName(); sal_uInt8 nLevel = 0; SwSectionFormat* pParentFormat = pFormat->GetParent(); while(pParentFormat) @@ -375,8 +397,7 @@ void SwContentType::Init(bool* pbInvalidateWindow) } std::unique_ptr pCnt(new SwRegionContent(this, rSectionName, -nLevel, -pFormat->FindLayoutRect( false, ).Top())); +nLevel, getYPosForSection(*pNodeIndex))); SwPtrMsgPoolItem aAskItem( RES_CONTENT_VISIBLE, nullptr ); if( !pFormat->GetInfo( aAskItem ) && @@ -676,17 +697,20 @@ void SwContentType::FillMemberList(bool* pbLevelOrVisibilityChanged) break; case ContentTypeId::REGION: { -const Point aNullPt; m_nMemberCount = m_pWrtShell->GetSectionFormatCount(); for(size_t i = 0; i < m_nMemberCount; ++i) { -const SwSectionFormat* pFormat; -
[Libreoffice-commits] core.git: Branch 'libreoffice-7-1' - sw/source
sw/source/core/doc/notxtfrm.cxx | 52 1 file changed, 1 insertion(+), 51 deletions(-) New commits: commit 8926d9282fe84793ce909471b5caec3583fd3ec9 Author: Xisco Fauli AuthorDate: Thu Mar 11 12:42:47 2021 +0100 Commit: Caolán McNamara CommitDate: Tue Mar 16 17:56:13 2021 +0100 Revert "tdf#114076: Expand ClipRange to next PixelBound" ... and "tdf#124272 use ClipRegion's geometry if not a rectangle" This commit reverts c1230cede19ae3633e51c7ca780cb34d9dbaa20f and 362c1cf2bd580f6dc8bf27bdcd79174111bc1b5c tdf#114076, or any of its duplicates, is not reproducible in master if c1230cede19ae3633e51c7ca780cb34d9dbaa20f ("tdf#114076: Expand ClipRange to next PixelBound") is reverted. (Tested on Linux and Windows) So, if we revert it, we no longer need 362c1cf2bd580f6dc8bf27bdcd79174111bc1b5c ("tdf#124272 use ClipRegion's geometry if not a rectangle"), which was a follow-up fix for a regression introduced by the first commit. This also fixes tdf#129085 and all the duplicates, which were introduced by the follow-up commit. I plan to add the unittests in a different commit Change-Id: Ie4328c15b24b521127c1b653bd621bfc92ac39cf Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112340 Tested-by: Jenkins Reviewed-by: Xisco Fauli Signed-off-by: Xisco Fauli Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112398 Reviewed-by: Armin Le Grand diff --git a/sw/source/core/doc/notxtfrm.cxx b/sw/source/core/doc/notxtfrm.cxx index 8bf008297233..f6fc53990bee 100644 --- a/sw/source/core/doc/notxtfrm.cxx +++ b/sw/source/core/doc/notxtfrm.cxx @@ -974,59 +974,9 @@ void paintGraphicUsingPrimitivesHelper( if(0 != aClip.count()) { -// tdf#114076: Expand ClipRange to next PixelBound -// Do this by going to basegfx::B2DRange, adding a -// single pixel size and using floor/ceil to go to -// full integer (as needed for pixels). Also need -// to go back to basegfx::B2DPolyPolygon for the -// creation of the needed MaskPrimitive2D. -// The general problem is that Writer is scrolling -// using blitting the unchanged parts, this forces -// this part of the scroll to pixel coordinate steps, -// while the ViewTransformation for paint nowadays has -// a sub-pixel precision. This results in an offset -// up to one pixel in radius. To solve this for now, -// we need to expand to the next outer pixel bound. -// Hopefully in the future we will someday be able to -// stay on the full available precision, but this -// will need a change in the repaint/scroll paradigm. -const basegfx::B2DRange aClipRange(aClip.getB2DRange()); -const basegfx::B2DVector aSinglePixelXY(rOutputDevice.GetInverseViewTransformation() * basegfx::B2DVector(1.0, 1.0)); -const basegfx::B2DRange aExpandedClipRange( -floor(aClipRange.getMinX() - aSinglePixelXY.getX()), -floor(aClipRange.getMinY() - aSinglePixelXY.getY()), -ceil(aClipRange.getMaxX() + aSinglePixelXY.getX()), -ceil(aClipRange.getMaxY() + aSinglePixelXY.getY())); - -// create the enclosing rectangle as polygon -basegfx::B2DPolyPolygon aTarget(basegfx::utils::createPolygonFromRect(aExpandedClipRange)); - -// tdf#124272 the fix above (tdf#114076) was too rough - the -// clip region used may be a PolyPolygon. In that case that -// PolyPolygon would have to be scaled to mentioned PixelBounds. -// Since that is not really possible geometrically (would need -// more some 'grow in outside direction' but with unequal grow -// values in all directions - just maaany problems -// involved), use a graphical trick: The topology of the -// PolyPolygon uses the standard FillRule, so adding the now -// guaranteed to be bigger or equal bounding (enclosing) -// rectangle twice as polygon will expand the BoundRange, but -// not change the geometry visualization at all -if(!rOutputDevice.GetClipRegion().IsRectangle()) -{ -// double the outer rectangle range polygon to have it -// included twice -aTarget.append(aTarget.getB2DPolygon(0)); - -// add the original clip 'inside' (due to being smaller -// or equal). That PolyPolygon may have an unknown number -// of polygons (>=1) -aTarget.append(aClip); -} - drawinglayer::primitive2d::MaskPrimitive2D* pNew( new drawinglayer::primitive2d::MaskPrimitive2D( -
[Libreoffice-commits] core.git: Branch 'libreoffice-7-1' - sw/source
sw/source/uibase/shells/tabsh.cxx |3 +++ 1 file changed, 3 insertions(+) New commits: commit f71efcdc4c8525bdf93becfc66b57bccd47f88c4 Author: Caolán McNamara AuthorDate: Fri Mar 12 12:57:57 2021 + Commit: Adolfo Jayme Barrientos CommitDate: Fri Mar 12 19:53:27 2021 +0100 tdf#140977 drop possible table-cursor before setting the new one Change-Id: I3d278af77886af3413b4a15464c8a52caa9a8e02 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112310 Tested-by: Jenkins Reviewed-by: Adolfo Jayme Barrientos diff --git a/sw/source/uibase/shells/tabsh.cxx b/sw/source/uibase/shells/tabsh.cxx index 34d98f61edd9..036274546d04 100644 --- a/sw/source/uibase/shells/tabsh.cxx +++ b/sw/source/uibase/shells/tabsh.cxx @@ -600,6 +600,9 @@ void SwTableShell::Execute(SfxRequest ) pDlg->StartExecuteAsync([pDlg, pRequest, pTableRep, , , vCursors](sal_Int32 nResult){ if (RET_OK == nResult) { +if (rSh.IsTableMode()) // tdf#140977 drop possible table-cursor before setting the new one +rSh.TableCursorToCursor(); + rSh.SetSelection(*vCursors->front()); // tdf#135636 set the table selected at dialog launch as current selection const SfxItemSet* pOutSet = pDlg->GetOutputItemSet(); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-7-1' - sw/source
sw/source/uibase/config/StoredChapterNumbering.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit db05fd646fce8f41a1056761ccf6bc716cda3b77 Author: Noel Grandin AuthorDate: Tue Mar 9 18:59:16 2021 +0200 Commit: Michael Stahl CommitDate: Fri Mar 12 10:48:29 2021 +0100 tdf#140590 Crash in Save-As dialog in Tools>Chapter Numbering This would only affect assert builds. The assert condition here did not match the condition in createFastChildContext several lines below. Bug since this code was introduced in commit 1535f39388223de53e4b923c6f7bb71ee32c1858 Date: Fri Nov 7 19:11:11 2014 +0100 sw: store Outline Numbering as ODF fragment instead of SfxPoolItems Change-Id: I3f6a0b91e3c17f4ca358a75116481fc38c01e94e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112233 Tested-by: Jenkins Reviewed-by: Noel Grandin (cherry picked from commit 677a18c2e16c5c1ae6be8d30e1a967f41fbf67a0) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112303 Reviewed-by: Michael Stahl diff --git a/sw/source/uibase/config/StoredChapterNumbering.cxx b/sw/source/uibase/config/StoredChapterNumbering.cxx index eb97b1cbcee9..07e68841ed93 100644 --- a/sw/source/uibase/config/StoredChapterNumbering.cxx +++ b/sw/source/uibase/config/StoredChapterNumbering.cxx @@ -320,7 +320,7 @@ public: virtual void SAL_CALL endFastElement(sal_Int32 /*Element*/) override { -assert(m_Contexts.size() < SwChapterNumRules::nMaxRules); +assert(m_Contexts.size() <= SwChapterNumRules::nMaxRules); for (auto iter = m_Contexts.begin(); iter != m_Contexts.end(); ++iter) { uno::Reference const xRule( ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-7-1' - sw/source
sw/source/core/doc/docdraw.cxx |2 ++ sw/source/uibase/utlui/content.cxx | 17 +++-- 2 files changed, 17 insertions(+), 2 deletions(-) New commits: commit b23a3518fd60be26607a1e8e50ddb821d63cc0b6 Author: Jim Raykowski AuthorDate: Sun Feb 28 17:10:12 2021 -0900 Commit: Xisco Fauli CommitDate: Tue Mar 9 22:16:33 2021 +0100 tdf#140661 Give shapes names when ungrouping if they don't already have Change-Id: I8242a697980e4f661a914998792ae9efdb090915 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111725 Tested-by: Jenkins Reviewed-by: Jim Raykowski (cherry picked from commit 1c3e170d56d3cad1e7729f839fa63f607b62e4e3) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112215 Reviewed-by: Xisco Fauli diff --git a/sw/source/core/doc/docdraw.cxx b/sw/source/core/doc/docdraw.cxx index c070519cfbf9..4468e648a8a2 100644 --- a/sw/source/core/doc/docdraw.cxx +++ b/sw/source/core/doc/docdraw.cxx @@ -329,6 +329,8 @@ void SwDoc::UnGroupSelection( SdrView& rDrawView ) // #i36010# - set layout direction of the position pFormat->SetPositionLayoutDir( text::PositionLayoutDir::PositionInLayoutDirOfAnchor ); +if (pSubObj->GetName().isEmpty()) +pSubObj->SetName(pFormat->GetName()); pFormatsAndObjs[i].emplace_back( pFormat, pSubObj ); if( bUndo ) diff --git a/sw/source/uibase/utlui/content.cxx b/sw/source/uibase/utlui/content.cxx index 641ee44bc6d3..3129d7ee572f 100644 --- a/sw/source/uibase/utlui/content.cxx +++ b/sw/source/uibase/utlui/content.cxx @@ -3193,8 +3193,21 @@ void SwContentTree::UpdateTracking() { SdrObject* pSelected = pSdrView->GetMarkedObjectByIndex(0); OUString aName(pSelected->GetName()); -lcl_SelectByContentTypeAndName(this, *m_xTreeView, - SwResId(STR_CONTENT_TYPE_DRAWOBJECT), aName); +if (!aName.isEmpty()) +lcl_SelectByContentTypeAndName(this, *m_xTreeView, + SwResId(STR_CONTENT_TYPE_DRAWOBJECT), aName); +else +{ +// clear treeview selections +m_xTreeView->unselect_all(); +Select(); +} +} +else +{ +// clear treeview selections +m_xTreeView->unselect_all(); +Select(); } return; } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-7-1' - sw/source
sw/source/core/layout/newfrm.cxx |4 +--- sw/source/core/view/viewsh.cxx |9 + 2 files changed, 2 insertions(+), 11 deletions(-) New commits: commit 9bc548e1c7da69c3f886b5925df3df4f78cd6239 Author: Michael Stahl AuthorDate: Mon Mar 1 12:47:53 2021 +0100 Commit: Xisco Fauli CommitDate: Tue Mar 2 13:08:43 2021 +0100 Revert "sw_fieldmarkhide: init fieldmark mode from options" This reverts commit c0864f26f3143ea81c65d3826fae32a8fd54c531. Revert "sw_fieldmarkhide: toggle mode depending on View->Field Names" This reverts commit c74a2fd835474caf311be10703c985e2f916a83b. Currently no time to fix the remaining bugs, for example tdf#138771 tdf#139638 tdf#139737 Change-Id: I800c5c8df10c02ac8be6234141e7c58d73915cd9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111758 Tested-by: Jenkins Reviewed-by: Michael Stahl (cherry picked from commit 70dd95aabd11b2146e2556c1da87da4a22d6f7b5) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111779 Reviewed-by: Xisco Fauli diff --git a/sw/source/core/layout/newfrm.cxx b/sw/source/core/layout/newfrm.cxx index 0431299cdd72..cd527d13903c 100644 --- a/sw/source/core/layout/newfrm.cxx +++ b/sw/source/core/layout/newfrm.cxx @@ -414,9 +414,7 @@ SwRootFrame::SwRootFrame( SwFrameFormat *pFormat, SwViewShell * pSh ) : mbCallbackActionEnabled ( false ), mbLayoutFreezed ( false ), mbHideRedlines(pFormat->GetDoc()->GetDocumentRedlineManager().IsHideRedlines()), -m_FieldmarkMode(pSh->GetViewOptions()->IsFieldName() -? sw::FieldmarkMode::ShowCommand -: sw::FieldmarkMode::ShowResult), +m_FieldmarkMode(sw::FieldmarkMode::ShowBoth), mnBrowseWidth(MIN_BROWSE_WIDTH), mpTurbo( nullptr ), mpLastPage( nullptr ), diff --git a/sw/source/core/view/viewsh.cxx b/sw/source/core/view/viewsh.cxx index acf81134ba6b..f99dd73c7b5e 100644 --- a/sw/source/core/view/viewsh.cxx +++ b/sw/source/core/view/viewsh.cxx @@ -2214,16 +2214,9 @@ void SwViewShell::ImplApplyViewOptions( const SwViewOption ) // - fieldnames apply or not ... // ( - SwEndPortion must _no_ longer be generated. ) // - Of course, the screen is something completely different than the printer ... +bReformat = bReformat || mpOpt->IsFieldName() != rOpt.IsFieldName(); bool const isToggleFieldNames(mpOpt->IsFieldName() != rOpt.IsFieldName()); -if (mpOpt->IsFieldName() != rOpt.IsFieldName()) -{ -GetLayout()->SetFieldmarkMode( rOpt.IsFieldName() -? sw::FieldmarkMode::ShowCommand -: sw::FieldmarkMode::ShowResult ); -bReformat = true; -} - // The map mode is changed, minima/maxima will be attended by UI if( mpOpt->GetZoom() != rOpt.GetZoom() && !IsPreview() ) { ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-7-1' - sw/source
sw/source/uibase/inc/basesh.hxx |8 +++- sw/source/uibase/shells/basesh.cxx | 12 sw/source/uibase/shells/tabsh.cxx |6 +++--- sw/source/uibase/shells/textsh1.cxx |6 +++--- 4 files changed, 25 insertions(+), 7 deletions(-) New commits: commit 75d8743ba840307d409ad0df67347e3ae5e60425 Author: Caolán McNamara AuthorDate: Wed Feb 10 16:37:11 2021 + Commit: Xisco Fauli CommitDate: Thu Feb 11 15:31:43 2021 +0100 tdf#140257 duplicate entire PaM ring when making copy tdf#134439, tdf#135636 are the motivation behind copying the PaM, but multiselections require multiple PaMs Change-Id: I9f95eb6c62ac0e61053298d4e4dbe386f5686275 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110681 Tested-by: Jenkins Reviewed-by: Xisco Fauli diff --git a/sw/source/uibase/inc/basesh.hxx b/sw/source/uibase/inc/basesh.hxx index b4426137fe9d..6e924a62cde1 100644 --- a/sw/source/uibase/inc/basesh.hxx +++ b/sw/source/uibase/inc/basesh.hxx @@ -24,10 +24,12 @@ #include #include #include - #include +#include #include +#include +class SwPaM; class SwWrtShell; class SwView; class SfxItemSet; @@ -110,6 +112,10 @@ public: static voidSetFrameMode( FlyMode eMode, SwWrtShell *pShell ); // with update! static void SetFrameMode_( FlyMode eMode ) { eFrameMode = eMode; } static FlyMode GetFrameMode() { return eFrameMode; } + +// duplicate rOrig and rOrig's multi-selection Ring so the first element of the returned +// vector can be used equivalently to rOrig to affect the same selections +static std::shared_ptr>> CopyPaMRing(SwPaM& rOrig); }; #endif diff --git a/sw/source/uibase/shells/basesh.cxx b/sw/source/uibase/shells/basesh.cxx index e0af002ba981..359dea043183 100644 --- a/sw/source/uibase/shells/basesh.cxx +++ b/sw/source/uibase/shells/basesh.cxx @@ -3039,4 +3039,16 @@ void SwBaseShell::ExecField( SfxRequest const & rReq ) } } +std::shared_ptr>> SwBaseShell::CopyPaMRing(SwPaM& rOrig) +{ +auto vCursors = std::make_shared>>(); +vCursors->emplace_back(std::make_unique(rOrig, nullptr)); +for (auto& rCursor : rOrig.GetRingContainer()) +{ +if ( != ) +vCursors->emplace_back(std::make_unique(rCursor, vCursors->front().get())); +} +return vCursors; +} + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/uibase/shells/tabsh.cxx b/sw/source/uibase/shells/tabsh.cxx index 247d5b4955d6..34d98f61edd9 100644 --- a/sw/source/uibase/shells/tabsh.cxx +++ b/sw/source/uibase/shells/tabsh.cxx @@ -596,11 +596,11 @@ void SwTableShell::Execute(SfxRequest ) auto pRequest = std::make_shared(rReq); rReq.Ignore(); // the 'old' request is not relevant any more -auto xPaM(std::make_shared(*rSh.GetCursor(), nullptr)); // tdf#135636 make a copy to use at later apply -pDlg->StartExecuteAsync([pDlg, pRequest, pTableRep, , , xPaM](sal_Int32 nResult){ +auto vCursors = CopyPaMRing(*rSh.GetCursor()); // tdf#135636 make a copy to use at later apply +pDlg->StartExecuteAsync([pDlg, pRequest, pTableRep, , , vCursors](sal_Int32 nResult){ if (RET_OK == nResult) { -rSh.SetSelection(*xPaM); // tdf#135636 set the table selected at dialog launch as current selection +rSh.SetSelection(*vCursors->front()); // tdf#135636 set the table selected at dialog launch as current selection const SfxItemSet* pOutSet = pDlg->GetOutputItemSet(); diff --git a/sw/source/uibase/shells/textsh1.cxx b/sw/source/uibase/shells/textsh1.cxx index b7d3d60f2d97..a41c9e9d3d9c 100644 --- a/sw/source/uibase/shells/textsh1.cxx +++ b/sw/source/uibase/shells/textsh1.cxx @@ -1079,8 +1079,8 @@ void SwTextShell::Execute(SfxRequest ) auto pRequest = std::make_shared(rReq); rReq.Ignore(); // the 'old' request is not relevant any more -auto xPaM(std::make_shared(*pPaM, nullptr)); // tdf#134439 make a copy to use at later apply -pDlg->StartExecuteAsync([pDlg, , pRequest, nDefDist, xPaM](sal_Int32 nResult){ +auto vCursors = CopyPaMRing(*pPaM); // tdf#134439 make a copy to use at later apply +pDlg->StartExecuteAsync([pDlg, , pRequest, nDefDist, vCursors](sal_Int32 nResult){ if (nResult == RET_OK) { // Apply defaults if necessary. @@ -1110,7 +1110,7 @@ void SwTextShell::Execute(SfxRequest ) pSet->Put(SfxStringItem(FN_DROP_CHAR_STYLE_NAME, sCharStyleName)); } -sw_ParagraphDialogResult(pSet, rWrtSh, *pRequest, xPaM.get()); +sw_ParagraphDialogResult(pSet, rWrtSh, *pRequest,
[Libreoffice-commits] core.git: Branch 'libreoffice-7-1' - sw/source
sw/source/core/unocore/unomap.cxx |1 + 1 file changed, 1 insertion(+) New commits: commit d803e27ab9fd779720bcf970834d74b41ab90f65 Author: Maxim Monastirsky AuthorDate: Mon Feb 1 16:14:44 2021 +0200 Commit: Michael Stahl CommitDate: Wed Feb 10 10:32:50 2021 +0100 tdf#139529 Fix incomplete DisplayName property for table styles Commit 4dc823990ab217cb9d07a0555d3015d43380fdf5 ("tdf#107852 Support DisplayName property for table styles") only handled the getPropertyValue method, which isn't enough to make it work with introspection, as used from Basic or the new dev docking panel. Change-Id: Ia4d90ab6030585dc469c0b274bef4b988ce647c1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110468 Tested-by: Jenkins Reviewed-by: Maxim Monastirsky (cherry picked from commit 9933c3631b5bd9d7b47d0d12c5a7dd292cf1944f) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110568 Reviewed-by: Michael Stahl diff --git a/sw/source/core/unocore/unomap.cxx b/sw/source/core/unocore/unomap.cxx index 0ae02dedefed..fc8d3713c4a2 100644 --- a/sw/source/core/unocore/unomap.cxx +++ b/sw/source/core/unocore/unomap.cxx @@ -1492,6 +1492,7 @@ const SfxItemPropertyMapEntry* SwUnoPropertyMapProvider::GetPropertyMapEntries(s { u"" UNO_NAME_TABLE_FIRST_ROW_START_COLUMN, 0, cppu::UnoType::get(), PROPERTY_NONE, 0 }, { u"" UNO_NAME_TABLE_LAST_ROW_END_COLUMN,0, cppu::UnoType::get(), PROPERTY_NONE, 0 }, { u"" UNO_NAME_TABLE_LAST_ROW_START_COLUMN, 0, cppu::UnoType::get(), PROPERTY_NONE, 0 }, +{ u"" UNO_NAME_DISPLAY_NAME, 0, cppu::UnoType::get(), PropertyAttribute::READONLY, 0 }, { u"", 0, css::uno::Type(), 0, 0 } }; m_aMapEntriesArr[nPropertyId] = aTableStyleMap; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-7-1' - sw/source
sw/source/uibase/docvw/SidebarTxtControl.cxx | 25 - 1 file changed, 16 insertions(+), 9 deletions(-) New commits: commit e79c5801bb1b9db74a8819bc1f6f214382211191 Author: Caolán McNamara AuthorDate: Fri Feb 5 15:32:19 2021 + Commit: Adolfo Jayme Barrientos CommitDate: Mon Feb 8 02:43:00 2021 +0100 print struck-through 'deleted' comments with change-tracking enabled in print comments in margins, the strike-through lines were missing in the print out previous to this Change-Id: I7f7f06d29b5f035a1e4996e1d89ce2b198b7a15c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110444 Tested-by: Jenkins Reviewed-by: Adolfo Jayme Barrientos diff --git a/sw/source/uibase/docvw/SidebarTxtControl.cxx b/sw/source/uibase/docvw/SidebarTxtControl.cxx index fde45169248d..d8c43c9efd70 100644 --- a/sw/source/uibase/docvw/SidebarTxtControl.cxx +++ b/sw/source/uibase/docvw/SidebarTxtControl.cxx @@ -141,15 +141,22 @@ void SidebarTextControl::Draw(OutputDevice* pDev, const Point& rPt, DrawFlags) if ( mrSidebarWin.GetLayoutStatus()==SwPostItHelper::DELETED ) { -SetLineColor(mrSidebarWin.GetChangeColor()); -pDev->DrawLine( PixelToLogic( GetPosPixel(), pDev->GetMapMode() ), - PixelToLogic( GetPosPixel() + -Point( GetSizePixel().Width(), - GetSizePixel().Height() ), pDev->GetMapMode() ) ); -pDev->DrawLine( PixelToLogic( GetPosPixel() + -Point( GetSizePixel().Width(),0), pDev->GetMapMode() ), - PixelToLogic( GetPosPixel() + -Point( 0, GetSizePixel().Height() ), pDev->GetMapMode() ) ); +pDev->Push(PushFlags::LINECOLOR); + +pDev->SetLineColor(mrSidebarWin.GetChangeColor()); +Point aBottomRight(rPt); +aBottomRight.Move(aSize); +pDev->DrawLine(rPt, aBottomRight); + +Point aTopRight(rPt); +aTopRight.Move(Size(aSize.Width(), 0)); + +Point aBottomLeft(rPt); +aBottomLeft.Move(Size(0, aSize.Height())); + +pDev->DrawLine(aTopRight, aBottomLeft); + +pDev->Pop(); } } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-7-1' - sw/source
sw/source/uibase/docvw/edtwin.cxx | 12 1 file changed, 12 insertions(+) New commits: commit c071a7a312b14cee49cb779b02ac4a227a9fee66 Author: Caolán McNamara AuthorDate: Fri Jan 29 11:38:48 2021 + Commit: Michael Stahl CommitDate: Mon Feb 1 12:26:55 2021 +0100 don't scroll to cursor during GetSurroundingText lock against scrolling to cursor if the IM requests the surrounding text around the cursor seen on launching a menu from a sidebar comment's menubutton in writer if the cursor is a scroll-off page position in the main document Change-Id: I325004987f576df65188629bf6fb63e0ed0be9bd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110135 Tested-by: Jenkins Reviewed-by: Michael Stahl diff --git a/sw/source/uibase/docvw/edtwin.cxx b/sw/source/uibase/docvw/edtwin.cxx index 67e0c6782943..9ad8275b7b1b 100644 --- a/sw/source/uibase/docvw/edtwin.cxx +++ b/sw/source/uibase/docvw/edtwin.cxx @@ -6440,6 +6440,9 @@ OUString SwEditWin::GetSurroundingText() const rSh.GetSelectedText( sReturn, ParaBreakType::ToOnlyCR ); else if( !rSh.HasSelection() ) { +bool bUnLockView = !rSh.IsViewLocked(); +rSh.LockView(true); + SwPosition *pPos = rSh.GetCursor()->GetPoint(); const sal_Int32 nPos = pPos->nContent.GetIndex(); @@ -6453,6 +6456,9 @@ OUString SwEditWin::GetSurroundingText() const pPos->nContent = nPos; rSh.ClearMark(); rSh.HideCursor(); + +if (bUnLockView) +rSh.LockView(false); } return sReturn; @@ -6469,6 +6475,9 @@ Selection SwEditWin::GetSurroundingTextSelection() const } else { +bool bUnLockView = !rSh.IsViewLocked(); +rSh.LockView(true); + // Return the position of the visible cursor in the sentence // around the visible cursor. SwPosition *pPos = rSh.GetCursor()->GetPoint(); @@ -6482,6 +6491,9 @@ Selection SwEditWin::GetSurroundingTextSelection() const rSh.ClearMark(); rSh.ShowCursor(); +if (bUnLockView) +rSh.LockView(false); + return Selection( nPos - nStartPos, nPos - nStartPos ); } } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-7-1' - sw/source
sw/source/uibase/index/toxmgr.cxx | 17 - 1 file changed, 4 insertions(+), 13 deletions(-) New commits: commit 9d980309f19aacb0d6a658e6ac6ca5f14d8994fe Author: Michael Stahl AuthorDate: Wed Jan 27 15:41:40 2021 +0100 Commit: Caolán McNamara CommitDate: Fri Jan 29 18:29:49 2021 +0100 sw: fix SwTOXMgr::UpdateOrInsertTOX() for user-defined The main problem is that when editing an existing user-defined index, the "Create From" changes aren't applied, because it does pCurTOX->SetCreate() and not pNewTOX->SetCreate(). But that wasn't obvious as the function is obviosly very confused about its 3 different TOX variables. pTOX is just used at the end, so just move it there. pCurTOX can be const. Then there is an odd condition on pSh->HasSelection() which ends up doing DelRight() but fortunately it's dead code since commit e9da29679bce3b544add9233a4aca2b19b78da1a #i97572# cleared the selection already. The pNewTOX = pCurTOX there seems pointless because pNewTOX is already a copy of *pCurTOX. Change-Id: I1e9c8178e314a188a50272410fbe566e4a566742 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110021 Tested-by: Jenkins Reviewed-by: Michael Stahl (cherry picked from commit 960e88835e0b2f7ff5fc57393b74017198c314e3) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110063 Reviewed-by: Caolán McNamara diff --git a/sw/source/uibase/index/toxmgr.cxx b/sw/source/uibase/index/toxmgr.cxx index 4e7e65f9c4d0..fe4885830ffa 100644 --- a/sw/source/uibase/index/toxmgr.cxx +++ b/sw/source/uibase/index/toxmgr.cxx @@ -269,13 +269,9 @@ bool SwTOXMgr::UpdateOrInsertTOX(const SwTOXDescription& rDesc, { SwWait aWait( *pSh->GetView().GetDocShell(), true ); bool bRet = true; -const SwTOXBase* pCurTOX = ppBase && *ppBase ? *ppBase : pSh->GetCurTOX(); -SwTOXBase* pTOX = const_cast(pCurTOX); +const SwTOXBase *const pCurTOX = ppBase && *ppBase ? *ppBase : pSh->GetCurTOX(); -SwTOXBase * pNewTOX = nullptr; - -if (pTOX) -pNewTOX = new SwTOXBase(*pTOX); +SwTOXBase * pNewTOX = pCurTOX ? new SwTOXBase(*pCurTOX) : nullptr; TOXTypes eCurTOXType = rDesc.GetTOXType(); if(pCurTOX && !ppBase && pSh->HasSelection()) @@ -330,7 +326,7 @@ bool SwTOXMgr::UpdateOrInsertTOX(const SwTOXDescription& rDesc, } else { -const_cast( pCurTOX )->SetCreate(rDesc.GetContentOptions()); +pNewTOX->SetCreate(rDesc.GetContentOptions()); } pNewTOX->SetLevelFromChapter(rDesc.IsLevelFromChapter()); } @@ -385,12 +381,6 @@ bool SwTOXMgr::UpdateOrInsertTOX(const SwTOXDescription& rDesc, TOX_AUTHORITIES == eCurTOXType ? SwTOXElement::Mark : SwTOXElement::NONE, pType->GetTypeName()); } -else -{ -if((!ppBase || !(*ppBase)) && pSh->HasSelection()) -pSh->DelRight(); -pNewTOX = const_cast(pCurTOX); -} pNewTOX->SetFromObjectNames(rDesc.IsCreateFromObjectNames()); pNewTOX->SetOLEOptions(rDesc.GetOLEOptions()); } @@ -437,6 +427,7 @@ bool SwTOXMgr::UpdateOrInsertTOX(const SwTOXDescription& rDesc, pDoc->GetIDocumentUndoRedo().StartUndo(SwUndoId::TOXCHANGE, nullptr); } +SwTOXBase *const pTOX = const_cast(pCurTOX); pDoc->ChangeTOX(*pTOX, *pNewTOX); pTOX->DisableKeepExpression(); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-7-1' - sw/source
sw/source/core/crsr/pam.cxx |8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) New commits: commit 041ecabb7bf6ad15c2cdcf228cb9dc82b2d16837 Author: Michael Stahl AuthorDate: Wed Jan 27 13:21:35 2021 +0100 Commit: Caolán McNamara CommitDate: Thu Jan 28 11:12:00 2021 +0100 sw_fieldmarkhide: adjust SwPaM::HasReadonlySel() to the fact that... ... there is, in fact, an else branch. D'oh. (regression from f8da730bd66d5d6d3e49935573b3223c06baffbe) Change-Id: I378b0a78a4ccc9a0e7fa9a6bf2e1ecb456133bed Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110012 Tested-by: Jenkins Reviewed-by: Michael Stahl (cherry picked from commit e65376ecd6e4356686927a5daeb845faf1fc4a42) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109985 Reviewed-by: Caolán McNamara diff --git a/sw/source/core/crsr/pam.cxx b/sw/source/core/crsr/pam.cxx index 684b6e5eae72..fe3f41a9a76c 100644 --- a/sw/source/core/crsr/pam.cxx +++ b/sw/source/core/crsr/pam.cxx @@ -730,9 +730,11 @@ bool SwPaM::HasReadonlySel( bool bFormView ) const const bool bAtStartA = (pA != nullptr) && (pA->GetMarkStart() == *GetPoint()); const bool bAtStartB = (pB != nullptr) && (pB->GetMarkStart() == *GetMark()); -if (!bRet && -// allow editing all fields in generic mode - !officecfg::Office::Common::Filter::Microsoft::Import::ForceImportWWFieldsAsGenericFields::get(comphelper::getProcessComponentContext())) +if (officecfg::Office::Common::Filter::Microsoft::Import::ForceImportWWFieldsAsGenericFields::get(comphelper::getProcessComponentContext())) +{ +; // allow editing all fields in generic mode +} +else if (!bRet) { bool bUnhandledMark = pA && pA->GetFieldname( ) == ODF_UNHANDLED; // Unhandled fieldmarks case shouldn't be edited manually to avoid breaking anything ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-7-1' - sw/source
sw/source/uibase/app/swmodul1.cxx |4 ++-- sw/source/uibase/uno/unotxdoc.cxx |4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) New commits: commit a845ba982c742d9a4b9b427ea38b96a0f5989ad4 Author: Tor Lillqvist AuthorDate: Thu Jan 14 23:50:39 2021 +0200 Commit: Caolán McNamara CommitDate: Wed Jan 27 20:44:39 2021 +0100 Fix errors in produced JSON introduced with the switch to JsonWriter GetRedlineAuthorInfo() should produce a JSON array and not an object with empty strings as keys, which is incorrect JSON. The code in Collabora Online expects an array, see Document::getViewColors() in kit/Kit.cpp. Producing the wrong kind of data leads to Poco throwing an exception: Assertion violation: !_key.empty() [in file "src/ParseHandler.cpp", line 64] Also SwXTextDocument::getPostIts() should produce a JSON array. Change-Id: I1ab0653ca1eaa3c466d31b1f068ba5937a04e43e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109316 Tested-by: Jenkins Reviewed-by: Tor Lillqvist Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109475 Reviewed-by: Caolán McNamara diff --git a/sw/source/uibase/app/swmodul1.cxx b/sw/source/uibase/app/swmodul1.cxx index 53cbe772da6d..3cd4c81893ea 100644 --- a/sw/source/uibase/app/swmodul1.cxx +++ b/sw/source/uibase/app/swmodul1.cxx @@ -437,10 +437,10 @@ static Color lcl_GetAuthorColor(std::size_t nPos) /// Returns a JSON representation of a redline author. void SwModule::GetRedlineAuthorInfo(tools::JsonWriter& rJsonWriter) { -auto authorsNode = rJsonWriter.startNode("authors"); +auto authorsNode = rJsonWriter.startArray("authors"); for (std::size_t nAuthor = 0; nAuthor < m_pAuthorNames.size(); ++nAuthor) { -auto authorNode = rJsonWriter.startNode(""); +auto authorNode = rJsonWriter.startStruct(); rJsonWriter.put("index", static_cast(nAuthor)); rJsonWriter.put("name", m_pAuthorNames[nAuthor]); rJsonWriter.put("color", sal_uInt32(lcl_GetAuthorColor(nAuthor))); diff --git a/sw/source/uibase/uno/unotxdoc.cxx b/sw/source/uibase/uno/unotxdoc.cxx index bd56d0c7dcb4..4362d09044ec 100644 --- a/sw/source/uibase/uno/unotxdoc.cxx +++ b/sw/source/uibase/uno/unotxdoc.cxx @@ -3329,7 +3329,7 @@ void SwXTextDocument::getRulerState(tools::JsonWriter& rJsonWriter) void SwXTextDocument::getPostIts(tools::JsonWriter& rJsonWriter) { SolarMutexGuard aGuard; -auto commentsNode = rJsonWriter.startNode("comments"); +auto commentsNode = rJsonWriter.startArray("comments"); for (auto const& sidebarItem : *m_pDocShell->GetView()->GetPostItMgr()) { sw::annotation::SwAnnotationWin* pWin = sidebarItem->mpPostIt.get(); @@ -3355,7 +3355,7 @@ void SwXTextDocument::getPostIts(tools::JsonWriter& rJsonWriter) } const OString sRects = comphelper::string::join("; ", aRects); -auto commentNode = rJsonWriter.startNode(""); +auto commentNode = rJsonWriter.startStruct(); rJsonWriter.put("id", pField->GetPostItId()); rJsonWriter.put("parent", pWin->CalcParent()); rJsonWriter.put("author", pField->GetPar1()); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-7-1' - sw/source
sw/source/filter/ww8/docxattributeoutput.cxx |7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) New commits: commit f2b04cd11cda4d9828e5af1a4160c08bab45496e Author: Justin Luth AuthorDate: Mon Jan 25 08:28:35 2021 +0300 Commit: Xisco Fauli CommitDate: Mon Jan 25 13:49:15 2021 +0100 Revert "sw: DOCX export: don't export numPr to style from outline numrule" This reverts 7.1 commit 9e455724e50bf512683b1cddfeb7493e047c19ae. to fix regression bugs tdf#138780 and tdf#139089 Change-Id: I2a5bbcd990a6648667342cc989160582e0367f09 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109864 Tested-by: Justin Luth Tested-by: Xisco Fauli Reviewed-by: Justin Luth Reviewed-by: Xisco Fauli (cherry picked from commit 32d11fb200d45cdacb973b625488d0b8bbee6d81) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109872 Tested-by: Jenkins diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx index fd304e9f4fe9..f2cdc7e9cdf2 100644 --- a/sw/source/filter/ww8/docxattributeoutput.cxx +++ b/sw/source/filter/ww8/docxattributeoutput.cxx @@ -8610,7 +8610,7 @@ void DocxAttributeOutput::ParaHyphenZone( const SvxHyphenZoneItem& rHyphenZone ) FSNS( XML_w, XML_val ), OString::boolean( !rHyphenZone.IsHyphen() ) ); } -void DocxAttributeOutput::ParaNumRule_Impl(const SwTextNode*, sal_Int32 nLvl, sal_Int32 nNumId) +void DocxAttributeOutput::ParaNumRule_Impl( const SwTextNode* pTextNd, sal_Int32 nLvl, sal_Int32 nNumId ) { if ( USHRT_MAX == nNumId ) return; @@ -8619,9 +8619,8 @@ void DocxAttributeOutput::ParaNumRule_Impl(const SwTextNode*, sal_Int32 nLvl, sa const SwNumRule* pRule = nNumId > 0 && nNumId <= nTableSize ? (*m_rExport.m_pUsedNumTable)[nNumId-1] : nullptr; const bool bOutlineRule = pRule && pRule->IsOutlineRule(); -// Do not export outline rules (Chapter Numbering) as paragraph properties, -// neither as style properties - there's w:outlineLvl for that. -if (!bOutlineRule) +// Do not export outline rules (Chapter Numbering) as paragraph properties, only as style properties. +if ( !pTextNd || !bOutlineRule ) { m_pSerializer->startElementNS(XML_w, XML_numPr); m_pSerializer->singleElementNS(XML_w, XML_ilvl, ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-7-1' - sw/source
sw/source/core/crsr/pam.cxx |6 +- 1 file changed, 5 insertions(+), 1 deletion(-) New commits: commit fe2e79391957e684719adb21561242af197845b3 Author: Michael Stahl AuthorDate: Fri Jan 15 16:24:45 2021 +0100 Commit: Thorsten Behrens CommitDate: Wed Jan 20 17:25:17 2021 +0100 sw_fieldmarkhide: allow editing all fieldmarks if ... ForceImportWWFieldsAsGenericFields is set. Not sure what restrictions it needs. Change-Id: I8b8e61fb320d5c2b66d5ff332517759b53e68817 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109378 Tested-by: Jenkins Reviewed-by: Michael Stahl (cherry picked from commit f8da730bd66d5d6d3e49935573b3223c06baffbe) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109518 Reviewed-by: Thorsten Behrens diff --git a/sw/source/core/crsr/pam.cxx b/sw/source/core/crsr/pam.cxx index 55775a358826..684b6e5eae72 100644 --- a/sw/source/core/crsr/pam.cxx +++ b/sw/source/core/crsr/pam.cxx @@ -23,6 +23,8 @@ #include #include +#include + #include #include #include @@ -728,7 +730,9 @@ bool SwPaM::HasReadonlySel( bool bFormView ) const const bool bAtStartA = (pA != nullptr) && (pA->GetMarkStart() == *GetPoint()); const bool bAtStartB = (pB != nullptr) && (pB->GetMarkStart() == *GetMark()); -if (!bRet) +if (!bRet && +// allow editing all fields in generic mode + !officecfg::Office::Common::Filter::Microsoft::Import::ForceImportWWFieldsAsGenericFields::get(comphelper::getProcessComponentContext())) { bool bUnhandledMark = pA && pA->GetFieldname( ) == ODF_UNHANDLED; // Unhandled fieldmarks case shouldn't be edited manually to avoid breaking anything ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-7-1' - sw/source
sw/source/uibase/dbui/dbtree.cxx |6 -- 1 file changed, 4 insertions(+), 2 deletions(-) New commits: commit 6c580008d397f5f5f4a0bfd879308018b5d2a54f Author: Justin Luth AuthorDate: Wed Jan 13 21:27:56 2021 +0300 Commit: Xisco Fauli CommitDate: Tue Jan 19 11:45:55 2021 +0100 tdf#119610 tdf#112634: Don't show broken connections - RevB This changes LO 6.0 commit 75a881829f19439245cdb859fc16d59461992f79 to use a light-weight check to see if a database exists. The previous way made a connection, which is extremely expensive if there is a password, or if network traffic needs to timeout, etc. And if there are multiple registered databases like that... Change-Id: I980cb6979cfc7cae8f1251f3459718192459aaee Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109242 Tested-by: Jenkins Reviewed-by: Justin Luth (cherry picked from commit 647c9de0338350c1b5eff4b9adf08bd06930e36b) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109402 Reviewed-by: Xisco Fauli diff --git a/sw/source/uibase/dbui/dbtree.cxx b/sw/source/uibase/dbui/dbtree.cxx index 4dee21a4ed0c..9b23f2a4f457 100644 --- a/sw/source/uibase/dbui/dbtree.cxx +++ b/sw/source/uibase/dbui/dbtree.cxx @@ -157,8 +157,10 @@ void SwDBTreeList::InitTreeList() OUString aImg(RID_BMP_DB); for (const OUString& rDBName : std::as_const(aDBNames)) { -Reference xConnection = pImpl->GetConnection(rDBName); -if (xConnection.is()) +// If this database has a password or a (missing) remote connection, +// then it might take a long time or spam for unnecessary credentials. +// Just check that it basically exists to weed out any broken/obsolete registrations. +if (SwDBManager::getDataSourceAsParent(Reference(), rDBName).is()) { m_xTreeView->insert(nullptr, -1, , nullptr, nullptr, nullptr, true, m_xScratchIter.get()); m_xTreeView->set_image(*m_xScratchIter, aImg); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-7-1' - sw/source
sw/source/ui/config/optpage.cxx |2 ++ sw/source/uibase/inc/optpage.hxx |1 + 2 files changed, 3 insertions(+) New commits: commit 157b30d9b50c7c164648f72a34f87aff5a3a1d26 Author: Heiko Tietze AuthorDate: Mon Jan 18 12:13:26 2021 +0100 Commit: Xisco Fauli CommitDate: Tue Jan 19 11:20:45 2021 +0100 Resolves tdf#139521 - Hide image anchor option in Writer Web mode Change-Id: Ic5298069fcabbd2c72eb43fdf270b69c53570298 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109523 Tested-by: Jenkins Reviewed-by: Heiko Tietze Reviewed-by: Xisco Fauli diff --git a/sw/source/ui/config/optpage.cxx b/sw/source/ui/config/optpage.cxx index 5820f260886e..26ae3fb628bd 100644 --- a/sw/source/ui/config/optpage.cxx +++ b/sw/source/ui/config/optpage.cxx @@ -1214,6 +1214,7 @@ SwShdwCursorOptionsTabPage::SwShdwCursorOptionsTabPage(weld::Container* pPage, w , m_xOnOffCB(m_xBuilder->weld_check_button("cursoronoff")) , m_xDirectCursorFillMode(m_xBuilder->weld_combo_box("cxDirectCursorFillMode")) , m_xCursorProtFrame(m_xBuilder->weld_frame("crsrprotframe")) +, m_xImageFrame(m_xBuilder->weld_frame("frmImage")) , m_xCursorInProtCB(m_xBuilder->weld_check_button("cursorinprot")) , m_xDefaultAnchorType(m_xBuilder->weld_combo_box("cxDefaultAnchor")) , m_xMathBaselineAlignmentCB(m_xBuilder->weld_check_button("mathbaseline")) @@ -1246,6 +1247,7 @@ SwShdwCursorOptionsTabPage::SwShdwCursorOptionsTabPage(weld::Container* pPage, w m_xDirectCursorFillMode->hide(); m_xCursorProtFrame->hide(); m_xCursorInProtCB->hide(); +m_xImageFrame->hide(); } SwShdwCursorOptionsTabPage::~SwShdwCursorOptionsTabPage() diff --git a/sw/source/uibase/inc/optpage.hxx b/sw/source/uibase/inc/optpage.hxx index 93a84bbb2758..31be1cc611e9 100644 --- a/sw/source/uibase/inc/optpage.hxx +++ b/sw/source/uibase/inc/optpage.hxx @@ -238,6 +238,7 @@ class SwShdwCursorOptionsTabPage : public SfxTabPage std::unique_ptr m_xDirectCursorFillMode; std::unique_ptr m_xCursorProtFrame; +std::unique_ptr m_xImageFrame; std::unique_ptr m_xCursorInProtCB; std::unique_ptr m_xDefaultAnchorType; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-7-1' - sw/source
sw/source/core/edit/autofmt.cxx | 11 +++ 1 file changed, 7 insertions(+), 4 deletions(-) New commits: commit 4ef34f805c5682594a76802fff98889bd6052c3c Author: Justin Luth AuthorDate: Fri Jan 15 20:32:43 2021 +0300 Commit: Michael Stahl CommitDate: Mon Jan 18 13:47:49 2021 +0100 tdf#136704 sw autofmt: prevent crash if no nextNode The second GetNextNode() was a nullptr that was being dereferenced. Now, when enter is pressed after some text followed by a colon, that line is made into a heading3, and the new blank line is properly using the text body paragraph style. Change-Id: If10dc85e490ac57fc150b3d541f5033dfd5293bb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109413 Tested-by: Jenkins Reviewed-by: Justin Luth Reviewed-by: Michael Stahl (cherry picked from commit fea7b531a4c9e8326a64426325b16585675a) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109519 diff --git a/sw/source/core/edit/autofmt.cxx b/sw/source/core/edit/autofmt.cxx index bd0cfc1972fb..2a40b90d448f 100644 --- a/sw/source/core/edit/autofmt.cxx +++ b/sw/source/core/edit/autofmt.cxx @@ -1896,11 +1896,14 @@ void SwAutoFormat::BuildHeadLine( sal_uInt16 nLvl ) JoinPrevPara(); DeleteLeadingTrailingBlanks( true, false ); -const SwTextFrame *const pNextFrame = GetNextNode(false); -(void)DeleteJoinCurNextPara(pNextFrame, true); - +const SwTextFrame* pNextFrame = GetNextNode(false); +if (pNextFrame->GetNext()) +{ +(void)DeleteJoinCurNextPara(pNextFrame, true); +pNextFrame = GetNextNode(false); +} m_aDelPam.DeleteMark(); -m_aDelPam.GetPoint()->nNode = *GetNextNode(false)->GetTextNodeForParaProps(); +m_aDelPam.GetPoint()->nNode = *pNextFrame->GetTextNodeForParaProps(); m_aDelPam.GetPoint()->nContent.Assign( m_aDelPam.GetContentNode(), 0 ); m_pDoc->SetTextFormatColl( m_aDelPam, ); } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-7-1' - sw/source
sw/source/core/doc/DocumentContentOperationsManager.cxx |3 ++- sw/source/core/txtnode/ndtxt.cxx|2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) New commits: commit d01fb1a86ead0ce6441906838878835b299a3dfb Author: Michael Stahl AuthorDate: Thu Dec 10 11:22:13 2020 +0100 Commit: Xisco Fauli CommitDate: Fri Jan 15 18:20:58 2021 +0100 tdf#134101, tdf#134626 sw: fix UBSan warning about deleted SwTextFormatColl sw/source/core/txtnode/ndtxt.cxx:5254:17: runtime error: downcast of address 0x612000a321c0 which does not point to an object of type 'const SwTextFormatColl' 0x612000a321c0: note: object is of type 'SwFormat' 00 00 00 00 50 4c 3c fa bb 7f 00 00 80 b8 ba 05 50 61 00 00 c0 81 5f 02 20 61 00 00 c0 b6 b0 00 ^~~ vptr for 'SwFormat' 0 in SwTextNode::TriggerNodeUpdate(sw::LegacyModifyHint const&) at sw/source/core/txtnode/ndtxt.cxx:5254:17 1 in SwTextNode::SwClientNotify(SwModify const&, SfxHint const&) at sw/source/core/txtnode/ndtxt.cxx:5306:9 2 in SwClient::SwClientNotifyCall(SwModify const&, SfxHint const&) at sw/inc/calbck.hxx:161:80 3 in SwFormat::~SwFormat() at sw/source/core/attr/format.cxx:240:22 4 in SwFormatColl::~SwFormatColl() at sw/inc/fmtcol.hxx:35:26 5 in SwTextFormatColl::~SwTextFormatColl() at sw/inc/fmtcol.hxx:56:20 6 in SwTextFormatColl::~SwTextFormatColl() at sw/inc/fmtcol.hxx:56:20 7 in SwDoc::DelTextFormatColl(unsigned long, bool) at sw/source/core/doc/docfmt.cxx:983:5 8 in SwDoc::DelTextFormatColl(SwTextFormatColl const*, bool) at sw/source/core/doc/docfmt.cxx:991:5 9 in SwUndoTextFormatCollCreate::Delete() at sw/source/core/undo/SwUndoFmt.cxx:203:12 10 in SwUndoFormatCreate::UndoImpl(sw::UndoRedoContext&) at sw/source/core/undo/SwUndoFmt.cxx:61:9 11 in SwUndo::UndoWithContext(SfxUndoContext&) at sw/source/core/undo/undobj.cxx:235:5 Any SwUndoFormatCreate that is added during CopyImplImpl() must go before SwUndoCopyDoc on the undo stack. SwNodes::CopyNodes() is pretty much the only thing of substance there that runs with Undo enabled; CopyBookmarks() and lcl_DeleteRedlines() and CopyFlyInFlyImpl() have it disabled. Let's see if the fix is really this simple... Change-Id: I4d586923f91a02861e9a4bd40d22701ceb0a0499 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107522 Tested-by: Jenkins Reviewed-by: Michael Stahl (cherry picked from commit b4365b985178e1866c74afd757a104aad1d405a9) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109333 Reviewed-by: Xisco Fauli diff --git a/sw/source/core/doc/DocumentContentOperationsManager.cxx b/sw/source/core/doc/DocumentContentOperationsManager.cxx index c103d4893c1c..9329356eea7c 100644 --- a/sw/source/core/doc/DocumentContentOperationsManager.cxx +++ b/sw/source/core/doc/DocumentContentOperationsManager.cxx @@ -4724,7 +4724,6 @@ bool DocumentContentOperationsManager::CopyImplImpl(SwPaM& rPam, SwPosition& rPo if (rDoc.GetIDocumentUndoRedo().DoesUndo()) { pUndo = new SwUndoCpyDoc(*pCopyPam); -rDoc.GetIDocumentUndoRedo().AppendUndo( std::unique_ptr(pUndo) ); pFlysAtInsPos = pUndo->GetFlysAnchoredAt(); } else @@ -5151,6 +5150,8 @@ bool DocumentContentOperationsManager::CopyImplImpl(SwPaM& rPam, SwPosition& rPo // If Undo is enabled, store the inserted area if (rDoc.GetIDocumentUndoRedo().DoesUndo()) { +// append it after styles have been copied when copying nodes +rDoc.GetIDocumentUndoRedo().AppendUndo( std::unique_ptr(pUndo) ); pUndo->SetInsertRange(*pCopyPam, true, nDeleteTextNodes); } diff --git a/sw/source/core/txtnode/ndtxt.cxx b/sw/source/core/txtnode/ndtxt.cxx index ec6a0081667c..1c457429dd04 100644 --- a/sw/source/core/txtnode/ndtxt.cxx +++ b/sw/source/core/txtnode/ndtxt.cxx @@ -5251,6 +5251,8 @@ void SwTextNode::TriggerNodeUpdate(const sw::LegacyModifyHint& rHint) && GetRegisteredIn() == static_cast(pNewValue)->pChangedFormat && GetNodes().IsDocNodes() ) { +assert(dynamic_cast(static_cast(pOldValue)->pChangedFormat)); +assert(dynamic_cast(static_cast(pNewValue)->pChangedFormat)); ChgTextCollUpdateNum( static_cast(static_cast(pOldValue)->pChangedFormat), static_cast(static_cast(pNewValue)->pChangedFormat) ); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-7-1' - sw/source
sw/source/core/crsr/crsrsh.cxx |2 ++ 1 file changed, 2 insertions(+) New commits: commit d21b5b132976474338e57506fb04a2e9b294db9d Author: Tamás Zolnai AuthorDate: Tue Jan 12 16:00:46 2021 +0100 Commit: Xisco Fauli CommitDate: Thu Jan 14 09:28:19 2021 +0100 tdf#139566: Fix select all (table + text) when document window looses focus. Without setting mbSelectAll properly the selection cursor is converted to a SwShellTableCursor, which can't handle if a selection is extended outside of the table. Change-Id: Ibd43097ac782b9fc02ff818d3911ebcd20efbd21 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109185 Tested-by: Jenkins CollaboraOffice Reviewed-by: Tamás Zolnai Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109205 Tested-by: Jenkins (cherry picked from commit 68b1ae7b493eea4d77f36a0c8566ca0224f04798) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109123 Reviewed-by: Xisco Fauli diff --git a/sw/source/core/crsr/crsrsh.cxx b/sw/source/core/crsr/crsrsh.cxx index 1aba8c3ac22f..701e2f16a7e9 100644 --- a/sw/source/core/crsr/crsrsh.cxx +++ b/sw/source/core/crsr/crsrsh.cxx @@ -2430,6 +2430,8 @@ void SwCursorShell::ShellLoseFocus() void SwCursorShell::ShellGetFocus() { +comphelper::FlagRestorationGuard g(mbSelectAll, StartsWithTable() && ExtendedSelectedAll()); + m_bHasFocus = true; if( !m_bBasicHideCursor && VisArea().Width() ) { ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-7-1' - sw/source
sw/source/core/access/accdoc.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 9176d828cb84bb6f74712972f1f21e2f446c5e9d Author: Julien Nabet AuthorDate: Sun Jan 10 15:42:31 2021 +0100 Commit: Michael Stahl CommitDate: Tue Jan 12 11:04:53 2021 +0100 Related tdf#123632: fix crash in accdoc (sw) Make sure to use gtk3 rendering - Open https://bugs.documentfoundation.org/attachment.cgi?id=149492 - Click F5 to open the navigator - Go to Images - Try double click the third and last image at least 15 times -> crash, here's part of bt: Thread 1 "soffice.bin" received signal SIGSEGV, Segmentation fault. SwFrame::IsInTab (this=0x0) at sw/source/core/inc/frame.hxx:938 938 if ( mbInfInvalid ) (gdb) bt 0 SwFrame::IsInTab() const (this=0x0) at sw/source/core/inc/frame.hxx:938 1 0x7fd7e78caf9c in SwAccessibleDocument::getExtendedAttributes() (this=0x7e4e090) at sw/source/core/access/accdoc.cxx:596 2 0x7fd7e78cbf9d in non-virtual thunk to SwAccessibleDocument::getExtendedAttributes() () at sw/source/core/access/accdoc.cxx:708 3 0x7fd7f18f90ad in attribute_set_new_from_extended_attributes(com::sun::star::uno::Reference const&) (rExtendedAttributes=uno::Reference to (SwAccessibleDocument *) 0x7e4e180) at vcl/unx/gtk3/a11y/gtk3atktextattributes.cxx:1229 4 0x7fd7f19113f3 in wrapper_get_attributes(_AtkObject*) (atk_obj=0x7df37d0) at vcl/unx/gtk3/a11y/gtk3atkwrapper.cxx:394 I put "Related" because I don't know if it corresponds to the initial bug but I used the attached file of the bugtracker Change-Id: Ief9fda9f7bcf277d18490169eee2e43fb046a1bf Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109051 Tested-by: Jenkins Reviewed-by: Michael Stahl (cherry picked from commit 003b45624788610fba98e3f3334f99140017e472) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109001 diff --git a/sw/source/core/access/accdoc.cxx b/sw/source/core/access/accdoc.cxx index cf59efdb21ce..3d85bd99658c 100644 --- a/sw/source/core/access/accdoc.cxx +++ b/sw/source/core/access/accdoc.cxx @@ -583,7 +583,7 @@ uno::Any SAL_CALL SwAccessibleDocument::getExtendedAttributes() { if (!(pCurrTextFrame->IsInTab() || pCurrTextFrame->IsInFootnote())) { -while( pTextFrame != pCurrTextFrame ) +while( pTextFrame && pTextFrame != pCurrTextFrame ) { //check header/footer pFrame = pTextFrame; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-7-1' - sw/source
sw/source/filter/xml/xmltbli.cxx |4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) New commits: commit 2569211290f460b4401a85f0540e965807bc5a34 Author: Eike Rathke AuthorDate: Wed Jan 6 15:02:05 2021 +0100 Commit: Xisco Fauli CommitDate: Thu Jan 7 10:52:12 2021 +0100 Resolves: tdf#139126 DBL_MAX is a valid value, just not for Writer Restore the old side effect behaviour where "1.79769313486232E+308" was not converted back to DBL_MAX, Writer doesn't check cell value after import for this "special value", *cough*. Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108875 Tested-by: Jenkins Reviewed-by: Eike Rathke (cherry picked from commit 0e37ded8d4aea25e5d9f7325fba0597f509147bc) Conflicts: sw/source/filter/xml/xmltbli.cxx Change-Id: I31cf598d5f91d1f727d5f1f0e936a3505ea1b9e0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108916 Tested-by: Jenkins Reviewed-by: Xisco Fauli diff --git a/sw/source/filter/xml/xmltbli.cxx b/sw/source/filter/xml/xmltbli.cxx index 560e568c5f8e..518a0eec75e7 100644 --- a/sw/source/filter/xml/xmltbli.cxx +++ b/sw/source/filter/xml/xmltbli.cxx @@ -498,8 +498,10 @@ SwXMLTableCellContext_Impl::SwXMLTableCellContext_Impl( break; case XML_TOK_TABLE_VALUE: { +// Writer wrongly uses DBL_MAX to flag error but fails to +// check for it after import, so check that here, tdf#139126. double fTmp; -if (::sax::Converter::convertDouble(fTmp, rValue)) +if (::sax::Converter::convertDouble(fTmp, rValue) && fTmp < DBL_MAX) { m_fValue = fTmp; m_bHasValue = true; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-7-1' - sw/source sw/uiconfig
sw/source/ui/fldui/flddb.cxx |2 +- sw/source/ui/fldui/flddinf.cxx|4 ++-- sw/source/ui/fldui/flddok.cxx |4 ++-- sw/source/ui/fldui/fldfunc.cxx|2 +- sw/source/ui/fldui/fldref.cxx |6 +++--- sw/source/ui/fldui/fldvar.cxx |2 +- sw/uiconfig/swriter/ui/flddocinfopage.ui |2 +- sw/uiconfig/swriter/ui/flddocumentpage.ui |2 +- 8 files changed, 12 insertions(+), 12 deletions(-) New commits: commit b6178d47ec1ec2cdd91727fe5fd792f6248d0222 Author: Kevin Suo AuthorDate: Fri Dec 18 19:42:29 2020 +0800 Commit: Adolfo Jayme Barrientos CommitDate: Tue Jan 5 00:30:04 2021 +0100 tdf#130275: Fields dialog is too tall ...which makes the OK/Cancel buttons invisible under small displays. This commit changed the height of these widgets. Also I did some tweats to the UI file and the width so that the edit dialog of these fields looks nicer (at least on my display). Change-Id: I9f39727afd566d75db525c5a5cafe2eabb66d7ea (cherry picked from commit f6903d55d46037b15e3f4d09d15e4aa349d5582e) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108024 Reviewed-by: Noel Grandin Reviewed-by: Adolfo Jayme Barrientos Tested-by: Jenkins diff --git a/sw/source/ui/fldui/flddb.cxx b/sw/source/ui/fldui/flddb.cxx index 99a7d5f05b3b..e2097cb77291 100644 --- a/sw/source/ui/fldui/flddb.cxx +++ b/sw/source/ui/fldui/flddb.cxx @@ -52,7 +52,7 @@ SwFieldDBPage::SwFieldDBPage(weld::Container* pPage, weld::DialogController* pCo m_xFormatLB->make_sorted(); auto nWidth = m_xTypeLB->get_approximate_digit_width() * FIELD_COLUMN_WIDTH; -auto nHeight = m_xTypeLB->get_height_rows(14); +auto nHeight = m_xTypeLB->get_height_rows(10); m_xTypeLB->set_size_request(nWidth, nHeight); m_xDatabaseTLB->set_size_request(nWidth*2, nHeight); diff --git a/sw/source/ui/fldui/flddinf.cxx b/sw/source/ui/fldui/flddinf.cxx index 9bb8e08cf737..35d4b5a00ae4 100644 --- a/sw/source/ui/fldui/flddinf.cxx +++ b/sw/source/ui/fldui/flddinf.cxx @@ -63,9 +63,9 @@ SwFieldDokInfPage::SwFieldDokInfPage(weld::Container* pPage, weld::DialogControl FillFieldSelect(*m_xSelectionLB); auto nWidth = m_xTypeTLB->get_approximate_digit_width() * FIELD_COLUMN_WIDTH; -auto nHeight = m_xTypeTLB->get_height_rows(20); +auto nHeight = m_xTypeTLB->get_height_rows(10); m_xTypeTLB->set_size_request(nWidth, nHeight); -m_xFormatLB->get_widget().set_size_request(nWidth, nHeight); +m_xFormatLB->get_widget().set_size_request(nWidth * 2, nHeight); m_xSelectionLB->set_size_request(nWidth, nHeight); //enable 'active' language selection diff --git a/sw/source/ui/fldui/flddok.cxx b/sw/source/ui/fldui/flddok.cxx index 5c6bc57e70aa..7164c4ff2692 100644 --- a/sw/source/ui/fldui/flddok.cxx +++ b/sw/source/ui/fldui/flddok.cxx @@ -53,11 +53,11 @@ SwFieldDokPage::SwFieldDokPage(weld::Container* pPage, weld::DialogController* p m_xFormatLB->make_sorted(); auto nWidth = m_xTypeLB->get_approximate_digit_width() * FIELD_COLUMN_WIDTH; -auto nHeight = m_xTypeLB->get_height_rows(20); +auto nHeight = m_xTypeLB->get_height_rows(10); m_xTypeLB->set_size_request(nWidth, nHeight); m_xSelectionLB->set_size_request(nWidth, nHeight); -m_xFormatLB->set_size_request(nWidth, nHeight); +m_xFormatLB->set_size_request(nWidth * 2, nHeight); m_xSelectionLB->connect_row_activated(LINK(this, SwFieldDokPage, TreeViewInsertHdl)); m_xFormatLB->connect_row_activated(LINK(this, SwFieldDokPage, TreeViewInsertHdl)); diff --git a/sw/source/ui/fldui/fldfunc.cxx b/sw/source/ui/fldui/fldfunc.cxx index c2e6cbef2572..9e61530b172a 100644 --- a/sw/source/ui/fldui/fldfunc.cxx +++ b/sw/source/ui/fldui/fldfunc.cxx @@ -68,7 +68,7 @@ SwFieldFuncPage::SwFieldFuncPage(weld::Container* pPage, weld::DialogController* m_xListItemsLB->get_height_rows(5)); auto nWidth = m_xTypeLB->get_approximate_digit_width() * FIELD_COLUMN_WIDTH; -auto nHeight = m_xTypeLB->get_height_rows(20); +auto nHeight = m_xTypeLB->get_height_rows(10); m_xTypeLB->set_size_request(nWidth, nHeight); m_xFormatLB->set_size_request(nWidth, nHeight); diff --git a/sw/source/ui/fldui/fldref.cxx b/sw/source/ui/fldui/fldref.cxx index 6c92d6f4d07a..6cd7cc6e6720 100644 --- a/sw/source/ui/fldui/fldref.cxx +++ b/sw/source/ui/fldui/fldref.cxx @@ -82,10 +82,10 @@ SwFieldRefPage::SwFieldRefPage(weld::Container* pPage, weld::DialogController* p auto nHeight = m_xTypeLB->get_height_rows(8); auto nWidth = m_xTypeLB->get_approximate_digit_width() * FIELD_COLUMN_WIDTH; -m_xTypeLB->set_size_request(nWidth, nHeight); -m_xFormatLB->set_size_request(nWidth, nHeight); +m_xTypeLB->set_size_request(nWidth * 1.33, nHeight); +m_xFormatLB->set_size_request(nWidth * 1.33, nHeight); m_xSelection->set_size_request(nWidth * 2,
[Libreoffice-commits] core.git: Branch 'libreoffice-7-1' - sw/source
sw/source/filter/xml/xmlimp.cxx | 10 ++ 1 file changed, 10 insertions(+) New commits: commit abc2a0563d33726c10c6cc10c1b879d635453b61 Author: Georgy Litvinov AuthorDate: Fri Dec 25 16:22:37 2020 +0100 Commit: Xisco Fauli CommitDate: Mon Jan 4 21:51:44 2021 +0100 Missing last para style when inserting text from odt file tdf#138879 Change-Id: Ief235e98f3de02350b6403a1ea8ecf6361571789 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108285 Tested-by: Noel Grandin Reviewed-by: Noel Grandin (cherry picked from commit 83ff5b784e910f06c9d8384ac73a1c0bda0551d5) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108590 Reviewed-by: Georgy Litvinov Reviewed-by: Xisco Fauli Tested-by: Jenkins diff --git a/sw/source/filter/xml/xmlimp.cxx b/sw/source/filter/xml/xmlimp.cxx index 0a7934c8b303..bfd7ef37d004 100644 --- a/sw/source/filter/xml/xmlimp.cxx +++ b/sw/source/filter/xml/xmlimp.cxx @@ -824,6 +824,16 @@ void SwXMLImport::endDocument() if( pCurrNd->CanJoinNext( >nNode )) { SwTextNode* pNextNd = pPos->nNode.GetNode().GetTextNode(); + +SwNode *pLastPar = pDoc->GetNodes()[nNodeIdx -2]; +if ( !pLastPar->IsTextNode() ) { +pLastPar = pDoc->GetNodes()[nNodeIdx -1]; +} +if ( pLastPar->IsTextNode() ) +{ + pNextNd->ChgFormatColl(pLastPar->GetTextNode()->GetTextColl()); +} + pPos->nContent.Assign( pNextNd, 0 ); pPaM->SetMark(); pPaM->DeleteMark(); pNextNd->JoinPrev(); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-7-1' - sw/source
sw/source/ui/misc/titlepage.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit e7a9d06d7d9f8dcad48c55df35de10d8e1196c56 Author: Julien Nabet AuthorDate: Fri Dec 25 10:46:51 2020 +0100 Commit: Xisco Fauli CommitDate: Mon Jan 4 18:48:15 2021 +0100 tdf#139218: Title Page: fix "Reset page number", put default at 1 Change-Id: Ic3758d8eeeb1818e3be3ca5d815fa601a34e8dd9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108279 Tested-by: Jenkins Reviewed-by: Julien Nabet (cherry picked from commit b905937211154b0e923312641f09629e68ed7901) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108294 Reviewed-by: Xisco Fauli diff --git a/sw/source/ui/misc/titlepage.cxx b/sw/source/ui/misc/titlepage.cxx index bba63c73c264..149c8f4a8046 100644 --- a/sw/source/ui/misc/titlepage.cxx +++ b/sw/source/ui/misc/titlepage.cxx @@ -201,10 +201,10 @@ SwTitlePageDlg::SwTitlePageDlg(weld::Window *pParent) m_xDocumentStartRB->connect_toggled(aStartPageHdl); m_xPageStartRB->connect_toggled(aStartPageHdl); +m_xRestartNumberingNF->set_value(nResetPage); if (bMaybeResetNumbering && nResetPage > 0) { m_xRestartNumberingCB->set_active(true); -m_xRestartNumberingNF->set_value(nResetPage); } m_xRestartNumberingNF->set_sensitive(m_xRestartNumberingCB->get_active()); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-7-1' - sw/source
sw/source/uibase/inc/inputwin.hxx |8 1 file changed, 8 insertions(+) New commits: commit f00fbd068a3b98b4c2ab98aea01ed6a2ff1b8009 Author: Caolán McNamara AuthorDate: Tue Dec 22 14:14:39 2020 + Commit: Caolán McNamara CommitDate: Wed Dec 23 15:03:57 2020 +0100 tdf#138457 Cursor position wrong when using functions in a writer table Change-Id: I70156d8492afbab2c5993e1627a024ef8e07c492 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108175 Tested-by: Jenkins Reviewed-by: Caolán McNamara diff --git a/sw/source/uibase/inc/inputwin.hxx b/sw/source/uibase/inc/inputwin.hxx index 08dcea729fce..ab18e2118cc3 100644 --- a/sw/source/uibase/inc/inputwin.hxx +++ b/sw/source/uibase/inc/inputwin.hxx @@ -74,7 +74,15 @@ public: void replace_selection(const OUString& rText) { +int nStartPos, nEndPos; +m_xWidget->get_selection_bounds(nStartPos, nEndPos); +if (nStartPos > nEndPos) +std::swap(nStartPos, nEndPos); + m_xWidget->replace_selection(rText); + +nStartPos = nStartPos + rText.getLength(); +m_xWidget->select_region(nStartPos, nStartPos); } void select_region(int nStartPos, int nEndPos) ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-7-1' - sw/source
sw/source/filter/ww8/wrtw8nds.cxx | 22 +- 1 file changed, 17 insertions(+), 5 deletions(-) New commits: commit b5a02acda8396c108e21e72fc830cc41a0bc890c Author: Regényi Balázs AuthorDate: Mon Dec 21 09:35:47 2020 +0100 Commit: Caolán McNamara CommitDate: Mon Dec 21 21:58:39 2020 +0100 tdf#138986 Fix DOC export of LinkDisplayName The LinkedDisplayName could be empty what caused an assert. tdf#138986 regression from commit: bda05ba1736b74727872579b65b3fa14e3d8 (tdf#41466 DOCX import: fix VML v:shape/v:textbox) Change-Id: I166a7e4c1defc201d0563a961b28ecb6c6be500c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108077 Tested-by: Jenkins Reviewed-by: Caolán McNamara (cherry picked from commit f80dcee922428fa564b4779b1f81ad087db937ae) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108008 diff --git a/sw/source/filter/ww8/wrtw8nds.cxx b/sw/source/filter/ww8/wrtw8nds.cxx index fc75ac5ff02a..77cdab41e879 100644 --- a/sw/source/filter/ww8/wrtw8nds.cxx +++ b/sw/source/filter/ww8/wrtw8nds.cxx @@ -149,6 +149,22 @@ static ww::eField lcl_getFieldId(const IFieldmark*const pFieldmark) return ww::eUNKNOWN; } +static OUString +lcl_getLinkChainName(const uno::Reference& rPropertySet, + const uno::Reference& rPropertySetInfo) +{ +OUString sLinkChainName; +if (rPropertySetInfo->hasPropertyByName("LinkDisplayName")) +{ +rPropertySet->getPropertyValue("LinkDisplayName") >>= sLinkChainName; +if (!sLinkChainName.isEmpty()) +return sLinkChainName; +} +if (rPropertySetInfo->hasPropertyByName("ChainName")) +rPropertySet->getPropertyValue("ChainName") >>= sLinkChainName; +return sLinkChainName; +} + MSWordAttrIter::MSWordAttrIter( MSWordExportBase& rExport ) : pOld( rExport.m_pChpIter ), m_rExport( rExport ) { @@ -637,7 +653,6 @@ bool SwWW8AttrIter::HasFlysAt(sal_Int32 nSwPos) const FlyProcessingState SwWW8AttrIter::OutFlys(sal_Int32 nSwPos) { // collection point to first gather info about all of the potentially linked textboxes: to be analyzed later. -OUString sLinkChainName; ww8::FrameIter linkedTextboxesIter = maFlyIter; while ( linkedTextboxesIter != maFlyFrames.end() ) { @@ -654,10 +669,7 @@ FlyProcessingState SwWW8AttrIter::OutFlys(sal_Int32 nSwPos) { MSWordExportBase::LinkedTextboxInfo aLinkedTextboxInfo; -if( xPropertySetInfo->hasPropertyByName("LinkDisplayName") ) -xPropertySet->getPropertyValue("LinkDisplayName") >>= sLinkChainName; -else if( xPropertySetInfo->hasPropertyByName("ChainName") ) -xPropertySet->getPropertyValue("ChainName") >>= sLinkChainName; +const OUString sLinkChainName = lcl_getLinkChainName(xPropertySet, xPropertySetInfo); if( xPropertySetInfo->hasPropertyByName("ChainNextName") ) xPropertySet->getPropertyValue("ChainNextName") >>= aLinkedTextboxInfo.sNextChain; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-7-1' - sw/source
sw/source/filter/ww8/wrtw8nds.cxx |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) New commits: commit d6fe7099092ed74b3a2580e0d95ed9229e262212 Author: Justin Luth AuthorDate: Sat Aug 8 16:05:07 2020 +0300 Commit: Xisco Fauli CommitDate: Thu Dec 17 13:41:32 2020 +0100 tdf#135329 revert sw MS export: prevent skipping at-char anchors ...because Step 2 solved the problem, and I don't want to mask any future issues that miss an anchor position. This reverts LO 7.1 commit d4045509e58180768368db7a77479fc027ff7c42 tdf#135329 sw MS export: prevent skipping at-char anchors This patch is step 1 - write out bypassed flies. Step 2 - don't bypass fly positions. Change-Id: I5246ea531897de493eb050625cebcdcc2488605b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100390 Tested-by: Justin Luth Reviewed-by: Justin Luth (cherry picked from commit 9a8126262a8afba46efbfac5160b5f8cf13c9bd6) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107386 Tested-by: Jenkins Reviewed-by: Xisco Fauli diff --git a/sw/source/filter/ww8/wrtw8nds.cxx b/sw/source/filter/ww8/wrtw8nds.cxx index 407c5182e997..fc75ac5ff02a 100644 --- a/sw/source/filter/ww8/wrtw8nds.cxx +++ b/sw/source/filter/ww8/wrtw8nds.cxx @@ -708,7 +708,8 @@ FlyProcessingState SwWW8AttrIter::OutFlys(sal_Int32 nSwPos) const SwPosition = maFlyIter->GetPosition(); const sal_Int32 nPos = rAnchor.nContent.GetIndex(); -if ( nPos > nSwPos ) +assert(nPos >= nSwPos && "a fly must get flagged as a nextAttr/CurrentPos"); +if ( nPos != nSwPos ) return FLY_NOT_PROCESSED ; // We haven't processed the fly const SdrObject* pSdrObj = maFlyIter->GetFrameFormat().FindRealSdrObject(); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-7-1' - sw/source
sw/source/uibase/docvw/AnnotationWin2.cxx | 11 ++- 1 file changed, 6 insertions(+), 5 deletions(-) New commits: commit 47a5000822588b695f514866fd8cca48fb2d1ac3 Author: Caolán McNamara AuthorDate: Thu Dec 10 13:14:18 2020 + Commit: Caolán McNamara CommitDate: Thu Dec 10 17:11:38 2020 +0100 fix printing of 'margins in comment' mangled since... commit c200aa27ee4a0f5a89af6e970c2c22580029eded Author: Caolán McNamara Date: Thu May 21 15:54:15 2020 +0100 remove Size arg from Window::Draw and depend on GetSizePixel which was a real monday-morning commit that bizarrely dropped drawing of the date/resolved widgets entirely and failed to notice that the PixelToLogic call in SwPostItMgr::DrawNotesForPage was originally called on the input pPostIt, not the output pDev Change-Id: I73b87f5889ef13018bcc43f97cd65169a3b77a65 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107493 Tested-by: Jenkins Reviewed-by: Caolán McNamara diff --git a/sw/source/uibase/docvw/AnnotationWin2.cxx b/sw/source/uibase/docvw/AnnotationWin2.cxx index 4b1e7c70836c..4e17e799e46d 100644 --- a/sw/source/uibase/docvw/AnnotationWin2.cxx +++ b/sw/source/uibase/docvw/AnnotationWin2.cxx @@ -273,7 +273,7 @@ void SwAnnotationWin::SetCursorLogicPosition(const Point& rPosition, bool bPoint void SwAnnotationWin::Draw(OutputDevice* pDev, const Point& rPt, DrawFlags nInFlags) { -Size aSz = pDev->PixelToLogic(GetSizePixel()); +Size aSz = PixelToLogic(GetSizePixel()); if (mpMetadataAuthor->IsVisible() ) { @@ -300,6 +300,7 @@ void SwAnnotationWin::Draw(OutputDevice* pDev, const Point& rPt, DrawFlags nInFl aPos += rPt; vcl::Font aFont( mpMetadataDate->GetSettings().GetStyleSettings().GetLabelFont() ); mpMetadataDate->SetControlFont( aFont ); +mpMetadataDate->Draw(pDev, aPos, nInFlags); mpMetadataDate->SetControlFont( aOrigFont ); } @@ -310,13 +311,11 @@ void SwAnnotationWin::Draw(OutputDevice* pDev, const Point& rPt, DrawFlags nInFl aPos += rPt; vcl::Font aFont( mpMetadataResolved->GetSettings().GetStyleSettings().GetLabelFont() ); mpMetadataResolved->SetControlFont( aFont ); +mpMetadataResolved->Draw(pDev, aPos, nInFlags); mpMetadataResolved->SetControlFont( aOrigFont ); } -Size aOrigSize(mpSidebarTextControl->GetSizePixel()); -mpSidebarTextControl->SetSizePixel(aSz); mpSidebarTextControl->Draw(pDev, rPt, nInFlags); -mpSidebarTextControl->SetSizePixel(aOrigSize); const drawinglayer::geometry::ViewInformation2D aNewViewInfos; std::unique_ptr pProcessor( @@ -332,6 +331,8 @@ void SwAnnotationWin::Draw(OutputDevice* pDev, const Point& rPt, DrawFlags nInFl if (!mpVScrollbar->IsVisible()) return; +// if there is a scrollbar shown, draw "..." to indicate the comment isn't +// completely shown vcl::Font aOrigFont(mpMetadataDate->GetControlFont()); Color aOrigBg( mpMetadataDate->GetControlBackground() ); OUString sOrigText(mpMetadataDate->GetText()); @@ -343,7 +344,7 @@ void SwAnnotationWin::Draw(OutputDevice* pDev, const Point& rPt, DrawFlags nInFl mpMetadataDate->SetControlFont( aFont ); mpMetadataDate->SetControlBackground( Color(0xFF) ); mpMetadataDate->SetText("..."); -aOrigSize = mpMetadataDate->GetSizePixel(); +Size aOrigSize = mpMetadataDate->GetSizePixel(); mpMetadataDate->SetSizePixel(mpMenuButton->GetSizePixel()); mpMetadataDate->Draw(pDev, aPos, nInFlags); mpMetadataDate->SetSizePixel(aOrigSize); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-7-1' - sw/source
sw/source/uibase/dochdl/swdtflvr.cxx |4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) New commits: commit 3c5a084d95e370ce671efc5848f65169b0fdfe2e Author: Caolán McNamara AuthorDate: Wed Dec 9 09:11:58 2020 + Commit: Caolán McNamara CommitDate: Wed Dec 9 11:57:12 2020 +0100 uninit_member Change-Id: Idd42a139dabf74ee20afa8b6fb3c9ec25c7b0b19 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107389 Tested-by: Jenkins Reviewed-by: Caolán McNamara diff --git a/sw/source/uibase/dochdl/swdtflvr.cxx b/sw/source/uibase/dochdl/swdtflvr.cxx index 9fa684a1b0fc..a8fc9344d944 100644 --- a/sw/source/uibase/dochdl/swdtflvr.cxx +++ b/sw/source/uibase/dochdl/swdtflvr.cxx @@ -244,7 +244,9 @@ SwTransferable::SwTransferable( SwWrtShell& rSh ) : m_pWrtShell( ), m_pCreatorView( nullptr ), m_pOrigGraphic( nullptr ), -m_eBufferType( TransferBufferType::NONE ) +m_eBufferType( TransferBufferType::NONE ), +m_bOldIdle(false), +m_bCleanUp(false) { rSh.GetView().AddTransferable(*this); SwDocShell* pDShell = rSh.GetDoc()->GetDocShell(); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-7-1' - sw/source
sw/source/core/layout/frmtool.cxx |9 - 1 file changed, 8 insertions(+), 1 deletion(-) New commits: commit 11143ad626132b2c4b5468226894b99f920803bd Author: Michael Stahl AuthorDate: Mon Dec 7 20:00:32 2020 +0100 Commit: Thorsten Behrens CommitDate: Tue Dec 8 00:27:19 2020 +0100 sw: layout: SwFlyNotify should invalidate a content or tab frame The problem happens during layout for a temporary mail merge document, but that is probably incidental. (The SwRootFrame is the 2nd one out of 3 being createed, the one for the target document.) The problem is that a text frame with a fly moves backward, and ~SwFlyNotify() invalidates the position of the next frame, but the next frame is a section frame, and this does not encourage the text frame inside the section frame to move backward at a later time, which leads to general user unhappiness. So invalidate the lower of the section frame too. Change-Id: I14fa20a279979c029c468f5c6f2e5ecad4ccd240 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107360 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt (cherry picked from commit c797fc768152a57f6cc7fb9dd447138e4b0629ee) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107310 Reviewed-by: Thorsten Behrens diff --git a/sw/source/core/layout/frmtool.cxx b/sw/source/core/layout/frmtool.cxx index fc70c019dfa2..8590af6aa2a4 100644 --- a/sw/source/core/layout/frmtool.cxx +++ b/sw/source/core/layout/frmtool.cxx @@ -677,9 +677,16 @@ SwFlyNotify::~SwFlyNotify() if ( pFly->IsFlyAtContentFrame() ) { SwFrame *pNxt = pFly->AnchorFrame()->FindNext(); -if ( pNxt ) +while (pNxt) { pNxt->InvalidatePos(); +if (!pNxt->IsSctFrame()) +{ +break; +} +// invalidating pos of a section frame doesn't have much +// effect, so try again with its lower +pNxt = static_cast(pNxt)->Lower(); } } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-7-1' - sw/source
sw/source/uibase/dochdl/swdtflvr.cxx |2 ++ 1 file changed, 2 insertions(+) New commits: commit 9869f2d46b163ec81858bad55373e8d4e7a7d02a Author: Noel Grandin AuthorDate: Thu Dec 3 14:57:17 2020 +0200 Commit: Noel Grandin CommitDate: Fri Dec 4 20:20:27 2020 +0100 fix SEGV in CppunitTest_sw_core_undo on Windows when something else changed the clipboard concurrently CppunitTest_sw_core_undo Change-Id: Ie0d21ed77ac38bfe2ca55e5b001e3fd09ac05493 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107159 Tested-by: Jenkins Reviewed-by: Noel Grandin (cherry picked from commit 7898eddf919a30f03a2224adbc16db4ce4bac8e5) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107196 diff --git a/sw/source/uibase/dochdl/swdtflvr.cxx b/sw/source/uibase/dochdl/swdtflvr.cxx index da8c13e04caa..9fa684a1b0fc 100644 --- a/sw/source/uibase/dochdl/swdtflvr.cxx +++ b/sw/source/uibase/dochdl/swdtflvr.cxx @@ -314,6 +314,8 @@ static SwDoc& lcl_GetDoc(SwDocFac & rDocFac) void SwTransferable::ObjectReleased() { SwModule *pMod = SW_MOD(); +if (!pMod) +return; if( this == pMod->m_pDragDrop ) pMod->m_pDragDrop = nullptr; else if( this == pMod->m_pXSelection ) ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-7-1' - sw/source
sw/source/core/crsr/FormFieldButton.cxx |9 - sw/source/core/inc/FormFieldButton.hxx |2 +- 2 files changed, 5 insertions(+), 6 deletions(-) New commits: commit c7bf00e09d37b6d30f267b6971ff6dbeafb47aff Author: Caolán McNamara AuthorDate: Thu Dec 3 10:21:23 2020 + Commit: Caolán McNamara CommitDate: Thu Dec 3 14:23:37 2020 +0100 show form dropdown on mouse press not release otherwise clicking on on the button when the dropdown is shown will cause a new dropdown to appear, not just dismiss the original Change-Id: Id417c8135d41797e00ed0f785c5ca91adf44e287 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107106 Tested-by: Jenkins Reviewed-by: Caolán McNamara diff --git a/sw/source/core/crsr/FormFieldButton.cxx b/sw/source/core/crsr/FormFieldButton.cxx index 43d8ff6e07e9..65412b3f558b 100644 --- a/sw/source/core/crsr/FormFieldButton.cxx +++ b/sw/source/core/crsr/FormFieldButton.cxx @@ -56,19 +56,18 @@ void FormFieldButton::CalcPosAndSize(const SwRect& rPortionPaintArea) } } -void FormFieldButton::MouseButtonUp(const MouseEvent&) +void FormFieldButton::MouseButtonDown(const MouseEvent&) { assert(GetParent()); -Point aPixPos = GetPosPixel(); -aPixPos.AdjustY(GetSizePixel().Height()); - // sets m_pFieldPopup InitPopup(); m_pFieldPopup->SetPopupModeEndHdl(LINK(this, DropDownFormFieldButton, FieldPopupModeEndHdl)); -tools::Rectangle aRect(GetParent()->OutputToScreenPixel(aPixPos), Size(0, 0)); +Size aSize = GetSizePixel(); +Point aPos(GetParent()->OutputToScreenPixel(GetPosPixel())); +tools::Rectangle aRect(aPos, aSize); m_pFieldPopup->StartPopupMode(aRect, FloatWinPopupFlags::Down | FloatWinPopupFlags::GrabFocus); Invalidate(); } diff --git a/sw/source/core/inc/FormFieldButton.hxx b/sw/source/core/inc/FormFieldButton.hxx index 265d0bafb713..93a7079651fb 100644 --- a/sw/source/core/inc/FormFieldButton.hxx +++ b/sw/source/core/inc/FormFieldButton.hxx @@ -32,7 +32,7 @@ public: void CalcPosAndSize(const SwRect& rPortionPaintArea); -virtual void MouseButtonUp(const MouseEvent& rMEvt) override; +virtual void MouseButtonDown(const MouseEvent& rMEvt) override; DECL_LINK(FieldPopupModeEndHdl, FloatingWindow*, void); virtual void Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect) override; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-7-1' - sw/source
sw/source/core/txtnode/ndtxt.cxx | 11 --- 1 file changed, 4 insertions(+), 7 deletions(-) New commits: commit b1acda00fecb2d158c4cb4b0c36add34caebc84b Author: Caolán McNamara AuthorDate: Tue Nov 17 12:51:32 2020 + Commit: Xisco Fauli CommitDate: Tue Dec 1 12:04:27 2020 +0100 tdf#134626 assertion in ~SwTextNode taking the simplest example of... http://bugs.documentfoundation.org/attachment.cgi?id=167361 a) on ctrl+v paste into the new document: DocumentContentOperationsManager::CopyImplImpl is called and that (at "Also copy all format templates") causes SwTextNode::ChgTextCollUpdateNum to call rDoc.GetNodes().UpdateOutlineNode(*this) so the new paragraph is now set as an outline node of the document DocNodes that seems perfectly reasonable b) ctrl+v again no new paragraph, text appended to node of a) c) ctrl+z SwUndoSaveContent::MoveToUndoNds is called and rNodes.MakeTextNode is called to make a new TextNode to move the content into. The SwNodes the TextNode is created in are rNds = rDoc.GetUndoManager().GetUndoNodes(), i.e. the undo nodes. MakeTextNode calls... SwTextNode *pNode = new SwTextNode( rWhere, pColl, nullptr ) and the SwTextNode ctor unconditionally does... GetNodes().UpdateOutlineNode(*this); so its set as an outline node in those undo SwNodes In SwNodes::MakeTextNode right after the SwTextNode *pNode = new SwTextNode( rWhere, pColl, nullptr ) call we have... // call method only for the document nodes array if ( IsDocNodes() ) UpdateOutlineNode(*pNode); That seems odd, because we have *already* unconditionally called UpdateOutlineNode in the SwTextNode ctor. d) ctrl+z The SwTextFormatColl is destroyed and SwTextNode::TriggerNodeUpdate is called for the TextNode of a) and is updated. It is also called for the TextNode of c) but due to... // #125329# - assure that text node is in document nodes array if ( !rDoc.IsInDtor() && () == () ) c is *not* updated, so on eventual dtor of c the assert fires. Change-Id: I56f9b00dd4665fd44359a01baef66c82937c2781 --- If the conditional UpdateOutlineNode call in SwNodes::MakeTextNode is the right thing to do where only TextNodes in the DocNodes should be updated, then presumably the equivalent call in the SwTextNode ctor should be also conditional, making that MakeTextNode call redundant in any case. ChgTextCollUpdateNum always calls rDoc.GetNodes().UpdateOutlineNode(*this); which suggests that the SwTextNode::ChgFormatColl function should rely on that to call UpdateOutlineNode and not call it directly to also avoid a UpdateOutlineNode in the undo nodes Change-Id: Iedc3fb4d41c24dbbe41fbac259abe41d3757be09 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106011 Tested-by: Jenkins Tested-by: Xisco Fauli Reviewed-by: Michael Stahl (cherry picked from commit 138cf950dcdc8a1240452cad6867e197279f42b0) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106936 Reviewed-by: Xisco Fauli diff --git a/sw/source/core/txtnode/ndtxt.cxx b/sw/source/core/txtnode/ndtxt.cxx index e4cd823d74e0..ec6a0081667c 100644 --- a/sw/source/core/txtnode/ndtxt.cxx +++ b/sw/source/core/txtnode/ndtxt.cxx @@ -111,10 +111,6 @@ SwTextNode *SwNodes::MakeTextNode( const SwNodeIndex & rWhere, SwNodeIndex aIdx( *pNode ); -// call method only for the document nodes array -if ( IsDocNodes() ) -UpdateOutlineNode(*pNode); - // if there is no layout or it is in a hidden section, MakeFrames is not needed const SwSectionNode* pSectNd; if (!bNewFrames || @@ -221,7 +217,10 @@ SwTextNode::SwTextNode( const SwNodeIndex , SwTextFormatColl *pTextColl, } AddToList(); } -GetNodes().UpdateOutlineNode(*this); + +// call method only for the document nodes array +if (GetNodes().IsDocNodes()) +GetNodes().UpdateOutlineNode(*this); m_bNotifiable = true; @@ -3925,8 +3924,6 @@ SwFormatColl* SwTextNode::ChgFormatColl( SwFormatColl *pNewColl ) ChgTextCollUpdateNum( pOldColl, static_cast(pNewColl) ); } -GetNodes().UpdateOutlineNode(*this); - return pOldColl; } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-7-1' - sw/source
sw/source/uibase/utlui/content.cxx | 28 ++-- 1 file changed, 26 insertions(+), 2 deletions(-) New commits: commit d5e786d78d2f72a39f02746d6e0faa04da72c60a Author: Jim Raykowski AuthorDate: Fri Mar 13 23:24:47 2020 -0800 Commit: Xisco Fauli CommitDate: Mon Nov 30 11:14:34 2020 +0100 tdf#131218 Assure standard mode at shell before goto content Also resolves tdf#133039 This is a copy of SwPostItMgr::AssureStdModeAtShell with an addition of EnterStdMode used when not in frame mode and no object is selected. It makes focus on content, from Navigator goto content, work as expected for all content types. Change-Id: Id23ea8f603b7f5d90f1e23f1eb82db292c71c499 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90487 Tested-by: Jenkins Reviewed-by: Jim Raykowski (cherry picked from commit f7e2f5bca938aa916830e07895d2da6820282055) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106818 Reviewed-by: Xisco Fauli diff --git a/sw/source/uibase/utlui/content.cxx b/sw/source/uibase/utlui/content.cxx index 2ac47cd7efb7..641ee44bc6d3 100644 --- a/sw/source/uibase/utlui/content.cxx +++ b/sw/source/uibase/utlui/content.cxx @@ -4269,9 +4269,34 @@ void SwContentTree::EditEntry(const weld::TreeIter& rEntry, EditEntryMode nMode) } } +static void lcl_AssureStdModeAtShell(SwWrtShell* pWrtShell) +{ +// deselect any drawing or frame and leave editing mode +SdrView* pSdrView = pWrtShell->GetDrawView(); +if (pSdrView && pSdrView->IsTextEdit() ) +{ +bool bLockView = pWrtShell->IsViewLocked(); +pWrtShell->LockView(true); +pWrtShell->EndTextEdit(); +pWrtShell->LockView(bLockView); +} + +if (pWrtShell->IsSelFrameMode() || pWrtShell->IsObjSelected()) +{ +pWrtShell->UnSelectFrame(); +pWrtShell->LeaveSelFrameMode(); +pWrtShell->GetView().LeaveDrawCreate(); +pWrtShell->EnterStdMode(); +pWrtShell->DrawSelChanged(); +pWrtShell->GetView().StopShellTimer(); +} +else +pWrtShell->EnterStdMode(); +} + void SwContentTree::GotoContent(const SwContent* pCnt) { -m_pActiveShell->EnterStdMode(); +lcl_AssureStdModeAtShell(m_pActiveShell); bool bSel = false; switch(pCnt->GetParent()->GetType()) @@ -4328,7 +4353,6 @@ void SwContentTree::GotoContent(const SwContent* pCnt) } break; case ContentTypeId::POSTIT: -m_pActiveShell->GetView().GetPostItMgr()->AssureStdModeAtShell(); m_pActiveShell->GotoFormatField(*static_cast(pCnt)->GetPostIt()); break; case ContentTypeId::DRAWOBJECT: ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-7-1' - sw/source
sw/source/core/doc/docbm.cxx |7 --- 1 file changed, 4 insertions(+), 3 deletions(-) New commits: commit fd596591b385a8b03459a7dd3f79e65a59f530f4 Author: Michael Stahl AuthorDate: Thu Nov 26 19:55:27 2020 +0100 Commit: Michael Stahl CommitDate: Fri Nov 27 12:50:19 2020 +0100 sw_fieldmarkhide: fix getFieldMarkFor() to return innermost field ... like it's supposed to; if it finds the outer field and then the next field is inside but ends *before* the rPos then the loop is erroneously terminated. Change-Id: Ic5e469d1c05cecd7feca275dc1689af2c40567f3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106710 Tested-by: Jenkins Reviewed-by: Michael Stahl (cherry picked from commit 6a11f94ab366e1d736e97e31e908e86aa5d8b533) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106689 diff --git a/sw/source/core/doc/docbm.cxx b/sw/source/core/doc/docbm.cxx index 406685c58691..c71178e1f005 100644 --- a/sw/source/core/doc/docbm.cxx +++ b/sw/source/core/doc/docbm.cxx @@ -1405,10 +1405,11 @@ namespace sw::mark return nullptr; auto pFieldmark(*itFieldmark); for ( ; itFieldmark != m_vFieldmarks.end() -&& (**itFieldmark).IsCoveringPosition(rPos); ++itFieldmark) +&& (**itFieldmark).GetMarkStart() <= rPos; ++itFieldmark) { // find the innermost fieldmark -if (pFieldmark->GetMarkStart() < (**itFieldmark).GetMarkStart() -|| (**itFieldmark).GetMarkEnd() < pFieldmark->GetMarkEnd()) +if (rPos < (**itFieldmark).GetMarkEnd() +&& (pFieldmark->GetMarkStart() < (**itFieldmark).GetMarkStart() +|| (**itFieldmark).GetMarkEnd() < pFieldmark->GetMarkEnd())) { pFieldmark = *itFieldmark; } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-7-1' - sw/source
sw/source/core/text/redlnitr.cxx |7 --- 1 file changed, 4 insertions(+), 3 deletions(-) New commits: commit f9ba4668d857e8d3576d11c2d64317a4e42081d4 Author: Caolán McNamara AuthorDate: Wed Nov 25 10:10:56 2020 + Commit: Caolán McNamara CommitDate: Wed Nov 25 14:54:51 2020 +0100 crashtesting: null deref on load of ooo72915-2.odt since... commit aacaa2aa91f705d64b929b5cff2872f160021b9f Date: Tue Nov 3 22:11:59 2020 +0100 sw_fieldmarkhide: let CheckParaRedlineMerge() hide fieldmarks HideIterator finds the next delete redline or fieldmark, whichever is closer. Change-Id: Ibe4373255356d9fe235f787c5672e72ae7032f85 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106522 Tested-by: Jenkins Reviewed-by: Caolán McNamara diff --git a/sw/source/core/text/redlnitr.cxx b/sw/source/core/text/redlnitr.cxx index a79ce4878a89..3a6a2749f8a4 100644 --- a/sw/source/core/text/redlnitr.cxx +++ b/sw/source/core/text/redlnitr.cxx @@ -134,11 +134,12 @@ public: sal_Unicode const magic(m_eFieldmarkMode == sw::FieldmarkMode::ShowResult ? CH_TXT_ATR_FIELDSTART : CH_TXT_ATR_FIELDSEP); -sal_Int32 const nPos(m_pEndPos->nNode.GetNode().GetTextNode()->GetText().indexOf( -magic, m_pEndPos->nContent.GetIndex())); +SwTextNode* pTextNode = m_pEndPos->nNode.GetNode().GetTextNode(); +sal_Int32 const nPos = pTextNode ? pTextNode->GetText().indexOf( +magic, m_pEndPos->nContent.GetIndex()) : -1; if (nPos != -1) { - m_oNextFieldmarkHide.emplace(*m_pEndPos->nNode.GetNode().GetTextNode(), nPos); +m_oNextFieldmarkHide.emplace(*pTextNode, nPos); sw::mark::IFieldmark const*const pFieldmark( m_eFieldmarkMode == sw::FieldmarkMode::ShowResult ? m_rIDMA.getFieldmarkAt(*m_oNextFieldmarkHide) ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-7-1' - sw/source
sw/source/uibase/shells/drwbassh.cxx |7 ++- 1 file changed, 2 insertions(+), 5 deletions(-) New commits: commit 7c21121f7caa8667d86fc1946ef2a337c5b15da9 Author: Attila Bakos (NISZ) AuthorDate: Tue Nov 3 15:05:00 2020 +0100 Commit: Xisco Fauli CommitDate: Tue Nov 24 21:10:03 2020 +0100 tdf#137546 sw: fix text position at textbox alignment Follow-up of commit 06fd06597796d9e92117602245f3968c93707708 (tdf#124430 Writer Editing: Fix textbox aligning). Testing: 1. Insert a shape. Choose menu item "Add Text Box" of its local menu, and write a short text in it. 2. Choose menu item "Align->Right" of the local menu of the shape. The textbox is aligned to the right margin and before the fix, text position had changed slightly within the shape. (Only moving the textbox fixed it.) Change-Id: I758e0f65c8b51e09ac15a96e19819cb3ad3beacb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105253 Tested-by: László Németh Reviewed-by: László Németh (cherry picked from commit 3347d71b23595919e167bd49932675e77cbbdbbb) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106449 Tested-by: Jenkins Reviewed-by: Xisco Fauli diff --git a/sw/source/uibase/shells/drwbassh.cxx b/sw/source/uibase/shells/drwbassh.cxx index 65f95858a480..f901f32cc15d 100644 --- a/sw/source/uibase/shells/drwbassh.cxx +++ b/sw/source/uibase/shells/drwbassh.cxx @@ -443,7 +443,8 @@ void SwDrawBaseShell::Execute(SfxRequest const ) if ( bAlignPossible ) { const SdrMarkList& rMarkList = pSdrView->GetMarkedObjectList(); -if ( rMarkList.GetMarkCount() == 1 ) +if (rMarkList.GetMarkCount() == 1 +&& !SwTextBoxHelper::hasTextFrame(rMarkList.GetMark(0)->GetMarkedSdrObj())) { sal_Int16 nHorizOrient = -1, nVertOrient = -1; @@ -479,8 +480,6 @@ void SwDrawBaseShell::Execute(SfxRequest const ) SwFormatHoriOrient aHOrient(pFrameFormat->GetFormatAttr(RES_HORI_ORIENT)); aHOrient.SetHoriOrient( nHorizOrient ); pFrameFormat->SetFormatAttr(aHOrient); -if (auto pTxFrm = SwTextBoxHelper::getOtherTextBoxFormat(pFrameFormat, RES_DRAWFRMFMT)) -pTxFrm->SetFormatAttr(aHOrient); pSh->EndAction(); } @@ -492,8 +491,6 @@ void SwDrawBaseShell::Execute(SfxRequest const ) SwFormatVertOrient aVOrient(pFrameFormat->GetFormatAttr(RES_VERT_ORIENT)); aVOrient.SetVertOrient( nVertOrient ); pFrameFormat->SetFormatAttr(aVOrient); -if (auto pTxFrm = SwTextBoxHelper::getOtherTextBoxFormat(pFrameFormat, RES_DRAWFRMFMT)) -pTxFrm->SetFormatAttr(aVOrient); pSh->EndAction(); } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits