summaryrefslogtreecommitdiffstats
path: root/editeng/source/outliner
diff options
context:
space:
mode:
authorMaxim Monastirsky <momonasmon@gmail.com>2018-09-02 14:00:50 +0300
committerMaxim Monastirsky <momonasmon@gmail.com>2018-09-02 15:34:17 +0200
commita201c5c8c3e7ea14001b5634f330dbce2b1f4314 (patch)
treea53e09e18f79b12bfb452b3b05bd3d30dc704267 /editeng/source/outliner
parenttdf#104354 writerfilter: rewrite Autospacing (diff)
downloadcore-a201c5c8c3e7ea14001b5634f330dbce2b1f4314.tar.gz
core-a201c5c8c3e7ea14001b5634f330dbce2b1f4314.zip
tdf#112935 Paste as Unformatted doesn't work in shapes and comments
The shapes and comments code in sw and sc assumes that OutlinerView::Paste does paste as unformatted text, and OutlinerView::PasteSpecial does paste as formatted, similar to the corresponding methods of EditView, which it's supposed to call internally. But the reality is that OutlinerView::Paste just calls PasteSpecial, with a comment "HACK(SD does not call PasteSpecial)". All this situation goes back to "initial import" commits. This commit changes OutlinerView::Paste to paste as unformatted (by default). Call sites that were using it, but apparently wanted formatted output, were changed to an explicit PasteSpecial call. Change-Id: I1d7472039fb9fe09810260a199e216ec95765b10 Reviewed-on: https://gerrit.libreoffice.org/59904 Tested-by: Jenkins Reviewed-by: Maxim Monastirsky <momonasmon@gmail.com>
Diffstat (limited to 'editeng/source/outliner')
-rw-r--r--editeng/source/outliner/outlvw.cxx12
1 files changed, 8 insertions, 4 deletions
diff --git a/editeng/source/outliner/outlvw.cxx b/editeng/source/outliner/outlvw.cxx
index b51cbbbbfb40..f86f707c4c35 100644
--- a/editeng/source/outliner/outlvw.cxx
+++ b/editeng/source/outliner/outlvw.cxx
@@ -669,12 +669,12 @@ void OutlinerView::Cut()
}
}
-void OutlinerView::Paste()
+void OutlinerView::PasteSpecial()
{
- PasteSpecial(); // HACK(SD does not call PasteSpecial)
+ Paste( true );
}
-void OutlinerView::PasteSpecial()
+void OutlinerView::Paste( bool bUseSpecial )
{
if ( !ImpCalcSelectedPages( false ) || pOwner->ImpCanDeleteSelectedPages( this ) )
{
@@ -682,7 +682,11 @@ void OutlinerView::PasteSpecial()
pOwner->pEditEngine->SetUpdateMode( false );
pOwner->bPasting = true;
- pEditView->PasteSpecial();
+
+ if ( bUseSpecial )
+ pEditView->PasteSpecial();
+ else
+ pEditView->Paste();
if ( pOwner->ImplGetOutlinerMode() == OutlinerMode::OutlineObject )
{