[Libreoffice-commits] core.git: 2 commits - reportdesign/source
Caolán McNamara
caolanm at redhat.com
Fri Apr 14 14:46:57 UTC 2017
reportdesign/source/ui/dlg/GroupsSorting.cxx | 63 ++-------------------------
reportdesign/source/ui/dlg/GroupsSorting.src | 3 -
2 files changed, 6 insertions(+), 60 deletions(-)
New commits:
commit bde543032d44bf31dfe291995ce8cae3ab8d677a
Author: Caolán McNamara <caolanm at redhat.com>
Date: Fri Apr 14 15:46:11 2017 +0100
remove methods that were never called
Change-Id: I5a841e1cd2bcd2766e51bb5944b992b5de51c7b6
diff --git a/reportdesign/source/ui/dlg/GroupsSorting.cxx b/reportdesign/source/ui/dlg/GroupsSorting.cxx
index a471e7e15634..6bb15689d36c 100644
--- a/reportdesign/source/ui/dlg/GroupsSorting.cxx
+++ b/reportdesign/source/ui/dlg/GroupsSorting.cxx
@@ -126,9 +126,6 @@ public:
void lateInit();
bool IsDeleteAllowed( );
void DeleteRows();
- void cut();
- void copy();
- void paste();
sal_Int32 getGroupPosition(sal_Int32 _nRow) const { return _nRow != BROWSER_ENDOFSELECTION ? m_aGroupPositions[_nRow] : sal_Int32(NO_GROUP); }
@@ -798,42 +795,6 @@ void OFieldExpressionControl::DeleteRows()
Invalidate();
}
-
-void OFieldExpressionControl::cut()
-{
- copy();
- DeleteRows();
-}
-
-
-void OFieldExpressionControl::copy()
-{
-
- // set to the right row and save it
- m_pParent->SaveData( m_nDataPos );
-
- uno::Sequence<uno::Any> aClipboardList = fillSelectedGroups();
-
- if( aClipboardList.getLength() )
- {
- OGroupExchange* pData = new OGroupExchange(aClipboardList);
- uno::Reference< css::datatransfer::XTransferable> xRef = pData;
- pData->CopyToClipboard(GetParent());
- }
-}
-
-
-void OFieldExpressionControl::paste()
-{
- TransferableDataHelper aTransferData(TransferableDataHelper::CreateFromSystemClipboard(GetParent()));
- if(aTransferData.HasFormat(OGroupExchange::getReportGroupId()))
- {
- if( m_nPasteEvent )
- Application::RemoveUserEvent( m_nPasteEvent );
- m_nPasteEvent = Application::PostUserEvent( LINK(this, OFieldExpressionControl, DelayedPaste), nullptr, true );
- }
-}
-
IMPL_LINK_NOARG( OFieldExpressionControl, DelayedPaste, void*, void )
{
m_nPasteEvent = nullptr;
commit 6b55bfe5659a2160e69a8dc255caabf3cc10c437
Author: Caolán McNamara <caolanm at redhat.com>
Date: Fri Apr 14 15:44:44 2017 +0100
the context menu has only DELETE in it
Change-Id: Ib581011e4f3adda8b6f81d1c2cbdf5de5da80f55
diff --git a/reportdesign/source/ui/dlg/GroupsSorting.cxx b/reportdesign/source/ui/dlg/GroupsSorting.cxx
index eba7ab9d24e6..a471e7e15634 100644
--- a/reportdesign/source/ui/dlg/GroupsSorting.cxx
+++ b/reportdesign/source/ui/dlg/GroupsSorting.cxx
@@ -721,26 +721,12 @@ void OFieldExpressionControl::Command(const CommandEvent& rEvt)
bEnable = true;
nIndex = NextSelectedRow();
}
- aContextMenu->EnableItem( SID_DELETE, IsDeleteAllowed() && bEnable );
- switch (aContextMenu->Execute(this, rEvt.GetMousePosPixel()))
+ aContextMenu->EnableItem(SID_DELETE, IsDeleteAllowed() && bEnable);
+ if (aContextMenu->Execute(this, rEvt.GetMousePosPixel()) == SID_DELETE)
{
- case SID_CUT:
- cut();
- break;
- case SID_COPY:
- copy();
- break;
- case SID_PASTE:
- paste();
- break;
-
- case SID_DELETE:
- if( m_nDeleteEvent )
- Application::RemoveUserEvent( m_nDeleteEvent );
- m_nDeleteEvent = Application::PostUserEvent( LINK(this, OFieldExpressionControl, DelayedDelete), nullptr, true );
- break;
- default:
- break;
+ if( m_nDeleteEvent )
+ Application::RemoveUserEvent( m_nDeleteEvent );
+ m_nDeleteEvent = Application::PostUserEvent( LINK(this, OFieldExpressionControl, DelayedDelete), nullptr, true );
}
}
SAL_FALLTHROUGH;
diff --git a/reportdesign/source/ui/dlg/GroupsSorting.src b/reportdesign/source/ui/dlg/GroupsSorting.src
index 687f6ba0bdb3..21148dbd571e 100644
--- a/reportdesign/source/ui/dlg/GroupsSorting.src
+++ b/reportdesign/source/ui/dlg/GroupsSorting.src
@@ -112,8 +112,7 @@ Menu RID_GROUPSROWPOPUPMENU
MenuItem
{
Identifier = SID_DELETE ;
- Command = ".uno:Delete" ;
- Text [ en-US ] = "~Delete" ;
+ Text [ en-US ] = "~Delete FOO" ;
};
};
};
More information about the Libreoffice-commits
mailing list