sc/source/ui/drawfunc/drtxtob.cxx | 4 +++- sd/source/ui/view/drviews7.cxx | 1 + sw/source/uibase/shells/drwtxtex.cxx | 7 +++++-- 3 files changed, 9 insertions(+), 3 deletions(-)
New commits: commit c47100e478301085ffb1e71bed41b9e5c39377fd Author: Oliver Specht <[email protected]> AuthorDate: Tue Nov 21 17:32:23 2023 +0100 Commit: Thorsten Behrens <[email protected]> CommitDate: Fri Nov 24 15:55:50 2023 +0100 tdf#158294 HTML simple format also added to paste special toolbox adds the format HTML simple to the paste special toolbox controller in impress and with draw text selection in calc and writer Change-Id: Ibdca5d3cd5ab4640320cff3b03b30f6575e8fec8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159791 Tested-by: Jenkins Tested-by: Gabor Kelemen <[email protected]> Reviewed-by: Thorsten Behrens <[email protected]> diff --git a/sc/source/ui/drawfunc/drtxtob.cxx b/sc/source/ui/drawfunc/drtxtob.cxx index 78bafa27f63e..189ae2793a10 100644 --- a/sc/source/ui/drawfunc/drtxtob.cxx +++ b/sc/source/ui/drawfunc/drtxtob.cxx @@ -183,7 +183,7 @@ void ScDrawTextObjectBar::Execute( SfxRequest &rReq ) if (nFormat == SotClipboardFormatId::STRING) pOutView->Paste(); else - pOutView->PasteSpecial(); + pOutView->PasteSpecial(nFormat); } } break; @@ -532,6 +532,8 @@ void ScDrawTextObjectBar::GetClipState( SfxItemSet& rSet ) aFormats.AddClipbrdFormat( SotClipboardFormatId::RTF ); if ( aDataHelper.HasFormat( SotClipboardFormatId::RICHTEXT ) ) aFormats.AddClipbrdFormat( SotClipboardFormatId::RICHTEXT ); + if (aDataHelper.HasFormat(SotClipboardFormatId::HTML_SIMPLE)) + aFormats.AddClipbrdFormat(SotClipboardFormatId::HTML_SIMPLE); rSet.Put( aFormats ); } diff --git a/sd/source/ui/view/drviews7.cxx b/sd/source/ui/view/drviews7.cxx index a238ec7fd04b..845bc956ed1b 100644 --- a/sd/source/ui/view/drviews7.cxx +++ b/sd/source/ui/view/drviews7.cxx @@ -153,6 +153,7 @@ static ::std::unique_ptr<SvxClipboardFormatItem> GetSupportedClipboardFormats ( case SotClipboardFormatId::NETSCAPE_BOOKMARK: case SotClipboardFormatId::STRING: case SotClipboardFormatId::HTML: + case SotClipboardFormatId::HTML_SIMPLE: case SotClipboardFormatId::RTF: case SotClipboardFormatId::RICHTEXT: case SotClipboardFormatId::EDITENGINE_ODF_TEXT_FLAT: diff --git a/sw/source/uibase/shells/drwtxtex.cxx b/sw/source/uibase/shells/drwtxtex.cxx index 3d7eecab6f07..a94016747ee8 100644 --- a/sw/source/uibase/shells/drwtxtex.cxx +++ b/sw/source/uibase/shells/drwtxtex.cxx @@ -1113,7 +1113,7 @@ void SwDrawTextShell::ExecClpbrd(SfxRequest const &rReq) if (nFormat == SotClipboardFormatId::STRING) pOLV->Paste(); else - pOLV->PasteSpecial(); + pOLV->PasteSpecial(nFormat); } break; @@ -1138,7 +1138,8 @@ void SwDrawTextShell::StateClpbrd(SfxItemSet &rSet) TransferableDataHelper aDataHelper( TransferableDataHelper::CreateFromSystemClipboard( &GetView().GetEditWin() ) ); const bool bPaste = aDataHelper.HasFormat( SotClipboardFormatId::STRING ) || aDataHelper.HasFormat( SotClipboardFormatId::RTF ) || - aDataHelper.HasFormat( SotClipboardFormatId::RICHTEXT ); + aDataHelper.HasFormat( SotClipboardFormatId::RICHTEXT ) || + aDataHelper.HasFormat( SotClipboardFormatId::HTML_SIMPLE); SfxWhichIter aIter(rSet); sal_uInt16 nWhich = aIter.FirstWhich(); @@ -1171,6 +1172,8 @@ void SwDrawTextShell::StateClpbrd(SfxItemSet &rSet) aFormats.AddClipbrdFormat( SotClipboardFormatId::RTF ); if ( aDataHelper.HasFormat( SotClipboardFormatId::RICHTEXT ) ) aFormats.AddClipbrdFormat( SotClipboardFormatId::RICHTEXT ); + if (aDataHelper.HasFormat(SotClipboardFormatId::HTML_SIMPLE)) + aFormats.AddClipbrdFormat(SotClipboardFormatId::HTML_SIMPLE); rSet.Put( aFormats ); }
