tdf#103706: tdf#142857: sw: context aware paste for clone format

Introduces selection aware pasting for Writer's Clone Format
where paragraph properties are applied when the selection
contains a whole paragraph or there's no selection at all (i.e.
clone format applied with just a left click - without drag).

Change-Id: I9f3eedb4544bf53dabed4bb659ce2e44313a692a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155107
Tested-by: Jenkins
Reviewed-by: Sarper Akdemir <sarper.akdemir.extern@allotropia.de>
This commit is contained in:
Sarper Akdemir
2023-08-29 11:06:37 +02:00
parent e9bb17369d
commit 7b5327ffcb
+4 -1
View File
@@ -5102,7 +5102,10 @@ void SwEditWin::MouseButtonUp(const MouseEvent& rMEvt)
SwWrtShell& rWrtShell = m_rView.GetWrtShell();
SfxStyleSheetBasePool* pPool=nullptr;
bool bNoCharacterFormats = false;
bool bNoParagraphFormats = false;
// Paste paragraph properties if the selection contains a whole paragraph or
// there was no selection at all (i.e. just a left click)
bool bNoParagraphFormats = rSh.HasSelection() && rSh.IsSelOnePara() && !rSh.IsSelFullPara();
{
SwDocShell* pDocSh = m_rView.GetDocShell();
if(pDocSh)