tdf#166068: support paste-special slot for notes pane
start handling the paste special slot: supporting at least RICHTEXT, HTML, HTML_SIMPLE, EDITENGINE_ODF_TEXT_FLAT which should be trivial to handle for the notes area. Change-Id: If508e81f81b213d829efef59220196b18252dec4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/183917 Tested-by: Jenkins Reviewed-by: Sarper Akdemir <sarper.akdemir@allotropia.de>
This commit is contained in:
@@ -28,6 +28,11 @@ interface NotesPanelView
|
||||
ExecMethod = FuSupport ;
|
||||
StateMethod = GetMenuState ;
|
||||
]
|
||||
SID_PASTE_SPECIAL // ole : no, status : ?
|
||||
[
|
||||
ExecMethod = FuTemporary ;
|
||||
StateMethod = GetMenuState ;
|
||||
]
|
||||
SID_DELETE // ole : no, status : ?
|
||||
[
|
||||
ExecMethod = FuSupport ;
|
||||
|
||||
@@ -30,6 +30,7 @@
|
||||
#include <editeng/unolingu.hxx>
|
||||
#include <framework/FrameworkHelper.hxx>
|
||||
#include <fubullet.hxx>
|
||||
#include <fuinsert.hxx>
|
||||
#include <fuchar.hxx>
|
||||
#include <fucushow.hxx>
|
||||
#include <fuexpand.hxx>
|
||||
@@ -812,6 +813,15 @@ void NotesPanelViewShell::FuTemporary(SfxRequest& rReq)
|
||||
rReq.Ignore();
|
||||
}
|
||||
break;
|
||||
|
||||
case SID_PASTE_SPECIAL:
|
||||
{
|
||||
SetCurrentFunction(FuInsertClipboard::Create(this, GetActiveWindow(),
|
||||
mpNotesPanelView.get(), GetDoc(), rReq));
|
||||
Cancel();
|
||||
rReq.Ignore();
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
if (HasCurrentFunction())
|
||||
|
||||
@@ -59,6 +59,7 @@
|
||||
#include <sdmod.hxx>
|
||||
#include <sdresid.hxx>
|
||||
#include <strings.hrc>
|
||||
#include <NotesPanelViewShell.hxx>
|
||||
#include <SlideSorterViewShell.hxx>
|
||||
#include <unomodel.hxx>
|
||||
#include <ViewClipboard.hxx>
|
||||
@@ -1437,7 +1438,8 @@ bool View::InsertData( const TransferableDataHelper& rDataHelper,
|
||||
::tools::Rectangle aRect(pOLV->GetOutputArea());
|
||||
Point aPos(pOLV->GetWindow()->PixelToLogic(maDropPos));
|
||||
|
||||
if (aRect.Contains(aPos) || (!bDrag && IsTextEdit()))
|
||||
if (aRect.Contains(aPos) || (!bDrag && IsTextEdit())
|
||||
|| dynamic_cast<sd::NotesPanelViewShell*>(mpViewSh))
|
||||
{
|
||||
pOLV->Read(*xStm, EETextFormat::Html, mpDocSh->GetHeaderAttributes());
|
||||
bReturn = true;
|
||||
@@ -1465,7 +1467,8 @@ bool View::InsertData( const TransferableDataHelper& rDataHelper,
|
||||
::tools::Rectangle aRect( pOLV->GetOutputArea() );
|
||||
Point aPos( pOLV->GetWindow()->PixelToLogic( maDropPos ) );
|
||||
|
||||
if( aRect.Contains( aPos ) || ( !bDrag && IsTextEdit() ) )
|
||||
if (aRect.Contains(aPos) || (!bDrag && IsTextEdit())
|
||||
|| dynamic_cast<sd::NotesPanelViewShell*>(mpViewSh))
|
||||
{
|
||||
// mba: clipboard always must contain absolute URLs (could be from alien source)
|
||||
pOLV->Read( *xStm, EETextFormat::Xml, mpDocSh->GetHeaderAttributes() );
|
||||
@@ -1497,7 +1500,8 @@ bool View::InsertData( const TransferableDataHelper& rDataHelper,
|
||||
::tools::Rectangle aRect(pOLV->GetOutputArea());
|
||||
Point aPos(pOLV->GetWindow()->PixelToLogic(maDropPos));
|
||||
|
||||
if (aRect.Contains(aPos) || (!bDrag && IsTextEdit()))
|
||||
if (aRect.Contains(aPos) || (!bDrag && IsTextEdit())
|
||||
|| dynamic_cast<sd::NotesPanelViewShell*>(mpViewSh))
|
||||
{
|
||||
// mba: clipboard always must contain absolute URLs (could be from alien source)
|
||||
pOLV->Read(*pHtmlStream, EETextFormat::Html, mpDocSh->GetHeaderAttributes());
|
||||
@@ -1532,7 +1536,8 @@ bool View::InsertData( const TransferableDataHelper& rDataHelper,
|
||||
::tools::Rectangle aRect( pOLV->GetOutputArea() );
|
||||
Point aPos( pOLV->GetWindow()->PixelToLogic( maDropPos ) );
|
||||
|
||||
if( aRect.Contains( aPos ) || ( !bDrag && IsTextEdit() ) )
|
||||
if (aRect.Contains(aPos) || (!bDrag && IsTextEdit())
|
||||
|| dynamic_cast<sd::NotesPanelViewShell*>(mpViewSh))
|
||||
{
|
||||
// mba: clipboard always must contain absolute URLs (could be from alien source)
|
||||
pOLV->Read( *xStm, EETextFormat::Rtf, mpDocSh->GetHeaderAttributes() );
|
||||
|
||||
Reference in New Issue
Block a user