diff options
author | Tamás Zolnai <tamas.zolnai@collabora.com> | 2017-06-12 14:34:59 +0200 |
---|---|---|
committer | Tamás Zolnai <tamas.zolnai@collabora.com> | 2017-06-12 23:25:02 +0200 |
commit | 37d8ac12902506f4185e10f1de4f566dbaf53e42 (patch) | |
tree | dc5bc1519870c493ae6a00615db28d8e0c9a010d /svx/source/svdraw/svdedxv.cxx | |
parent | 93a288bd75d7caed46d6f29bf006f3d97a9602a9 (diff) |
tdf#108480: Undo from clone formating does not remove vertical alignment
In the related change:
d36aa2ba3132ce62a370b7260ca620642cbf7dbf
wrong method was used to set cell properties, which does
not handle undo actions, so use the proper function.
Other issue was related to undo handling of vertical text
alignment in general. In some cases undo actions were lost
after user clicked out of the cell. It is because vertical
alignment is not affecting the outliner and so the related
undo actions were just dropped in EndTextEdit() method.
Change-Id: I3a6a95fac711056a658a3dee616733939cd13330
Reviewed-on: https://gerrit.libreoffice.org/38699
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
Diffstat (limited to 'svx/source/svdraw/svdedxv.cxx')
-rw-r--r-- | svx/source/svdraw/svdedxv.cxx | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/svx/source/svdraw/svdedxv.cxx b/svx/source/svdraw/svdedxv.cxx index 2657375f311a..7a7ed5fc3219 100644 --- a/svx/source/svdraw/svdedxv.cxx +++ b/svx/source/svdraw/svdedxv.cxx @@ -2225,9 +2225,8 @@ void SdrObjEditView::TakeFormatPaintBrush( std::shared_ptr< SfxItemSet >& rForma if( pObj && (pObj->GetObjInventor() == SdrInventor::Default ) && (pObj->GetObjIdentifier() == OBJ_TABLE) ) { auto pTable = static_cast<const sdr::table::SdrTableObj*>(pObj); - if (pTable->getActiveCell().is()) { - SfxItemSet const & rSet = pTable->GetActiveCellItemSet(); - rFormatSet->Put(rSet); + if (mxSelectionController.is() && pTable->getActiveCell().is()) { + mxSelectionController->GetAttributes(*rFormatSet, false); } } } @@ -2375,8 +2374,8 @@ void SdrObjEditView::ApplyFormatPaintBrush( SfxItemSet& rFormatSet, bool bNoChar if( pObj && (pObj->GetObjInventor() == SdrInventor::Default) && (pObj->GetObjIdentifier() == OBJ_TABLE) ) { auto pTable = static_cast<sdr::table::SdrTableObj*>(pObj); - if (pTable->getActiveCell().is()) { - pTable->SetMergedItemSetAndBroadcastOnActiveCell(rFormatSet); + if (pTable->getActiveCell().is() && mxSelectionController.is()) { + mxSelectionController->SetAttributes(rFormatSet, false); } } } |