sd/source/ui/view/sdview.cxx |   12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

New commits:
commit 3f6050f369889ec798d1445685f45d9f7c16ebb1
Author:     Gülşah Köse <[email protected]>
AuthorDate: Tue Oct 14 14:43:45 2025 +0300
Commit:     Caolán McNamara <[email protected]>
CommitDate: Wed Dec 3 12:17:37 2025 +0100

    cool#13193 Fix Ctrl Shift V issue on impress
    
    f0c25c751cf8e166a84b289746bce6202a40391d is merged to fix tdf#115783
    But that commit caused a bug on Impress when the we have different
    character and paragraph styles in textboxes. Commit aims to solve a
    table issue.
    
    To solve the Impress regression we should
    apply the solution only table objects
    
    I tried to write a test but it's not testable with reasonable
    amount of effort
    
    Signed-off-by: Gülşah Köse <[email protected]>
    Change-Id: I132e8257af2aadbdb816865678966b54de373ef8
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/192389
    Tested-by: Jenkins CollaboraOffice <[email protected]>
    Reviewed-by: Miklos Vajna <[email protected]>
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/194947
    Reviewed-by: Caolán McNamara <[email protected]>
    Tested-by: Jenkins

diff --git a/sd/source/ui/view/sdview.cxx b/sd/source/ui/view/sdview.cxx
index 7b98d3af55ff..218e8c1ad869 100644
--- a/sd/source/ui/view/sdview.cxx
+++ b/sd/source/ui/view/sdview.cxx
@@ -1160,11 +1160,15 @@ void View::OnBeginPasteOrDrop( PasteOrDropInfos* pInfo )
     if (!pOutliner)
         return;
 
-    // Turn character attributes of the paragraph of the insert position into
+    // Turn character attributes of the table paragraph of the insert position 
into
     // character-level attributes, so they are not lost when OnEndPasteOrDrop()
-    // sets the paragraph stylesheet.
-    SfxItemSet aSet(pOutliner->GetParaAttribs(pInfo->nStartPara));
-    pOutliner->SetCharAttribs(pInfo->nStartPara, aSet);
+    // sets the paragraph stylesheet. (tdf#115783)
+    const SdrTableObj* pTableObj = dynamic_cast<const 
SdrTableObj*>(pOutliner->GetTextObj());
+    if (pTableObj)
+    {
+        SfxItemSet aSet(pOutliner->GetParaAttribs(pInfo->nStartPara));
+        pOutliner->SetCharAttribs(pInfo->nStartPara, aSet);
+    }
 }
 
 /** this is called after a paste or drop operation, make sure that the newly 
inserted paragraphs

Reply via email to