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

New commits:
commit 5894e546ac20198acf011842c4b49972a6b9f70e
Author:     Gülşah Köse <[email protected]>
AuthorDate: Tue Oct 14 14:43:45 2025 +0300
Commit:     Miklos Vajna <[email protected]>
CommitDate: Fri Oct 17 14:07:44 2025 +0200

    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]>

diff --git a/sd/source/ui/view/sdview.cxx b/sd/source/ui/view/sdview.cxx
index 4ae79b48177e..dbf1b4022163 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