[Libreoffice-commits] core.git: 2 commits - include/vcl sc/source vcl/source
Szymon KÅos (via logerrit)
logerrit at kemper.freedesktop.org
Wed Dec 9 13:09:34 UTC 2020
include/vcl/toolkit/svtabbx.hxx | 2 ++
sc/source/ui/view/gridwin.cxx | 27 +++++++++++++--------------
vcl/source/treelist/svtabbx.cxx | 34 ++++++++++++++++++++++++++++++++++
3 files changed, 49 insertions(+), 14 deletions(-)
New commits:
commit ab224c4196b61c222fbf74a0dfbc57aab9859977
Author: Szymon Kłos <szymon.klos at collabora.com>
AuthorDate: Fri Dec 4 15:14:03 2020 +0100
Commit: Szymon Kłos <szymon.klos at collabora.com>
CommitDate: Wed Dec 9 14:09:01 2020 +0100
pivot table: fix interactions in online
Single clicks were identified as double so
clicks in the pivot table caused to create
new tables or other unwanted behaviour.
In case cursor is over pivot table - require
real double click.
Change-Id: I6ca9af9ff9dbe5a1e00f2b57753ce4f8f298288d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107225
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
Reviewed-by: Szymon Kłos <szymon.klos at collabora.com>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107405
Tested-by: Jenkins
diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx
index 418e73554096..654554a17dbe 100644
--- a/sc/source/ui/view/gridwin.cxx
+++ b/sc/source/ui/view/gridwin.cxx
@@ -2089,23 +2089,26 @@ void ScGridWindow::MouseButtonUp( const MouseEvent& rMEvt )
pView->ResetBrushDocument(); // invalidates pBrushDoc pointer
}
+ Point aPos = rMEvt.GetPosPixel();
+ SCCOL nPosX;
+ SCROW nPosY;
+ SCTAB nTab = mrViewData.GetTabNo();
+ mrViewData.GetPosFromPixel( aPos.X(), aPos.Y(), eWhich, nPosX, nPosY );
+ ScDPObject* pDPObj = rDoc.GetDPAtCursor( nPosX, nPosY, nTab );
+
+ bool bInDataPilotTable = (pDPObj != nullptr);
+
// double click (only left button)
// in the tiled rendering case, single click works this way too
bool bIsTiledRendering = comphelper::LibreOfficeKit::isActive();
bool bDouble = ( rMEvt.GetClicks() == 2 && rMEvt.IsLeft() );
- if ((bDouble || bIsTiledRendering)
+ if ((bDouble || (bIsTiledRendering && !bInDataPilotTable))
&& !bRefMode
&& (nMouseStatus == SC_GM_DBLDOWN || (bIsTiledRendering && nMouseStatus != SC_GM_URLDOWN))
&& !pScMod->IsRefDialogOpen())
{
// data pilot table
- Point aPos = rMEvt.GetPosPixel();
- SCCOL nPosX;
- SCROW nPosY;
- SCTAB nTab = mrViewData.GetTabNo();
- mrViewData.GetPosFromPixel( aPos.X(), aPos.Y(), eWhich, nPosX, nPosY );
- ScDPObject* pDPObj = rDoc.GetDPAtCursor( nPosX, nPosY, nTab );
if ( pDPObj && pDPObj->GetSaveData()->GetDrillDown() )
{
ScAddress aCellPos( nPosX, nPosY, mrViewData.GetTabNo() );
@@ -2221,9 +2224,7 @@ void ScGridWindow::MouseButtonUp( const MouseEvent& rMEvt )
if (isTiledRendering && pViewShell &&
(pViewShell->isLOKMobilePhone() || pViewShell->isLOKTablet()))
{
- Point aPos = rMEvt.GetPosPixel();
- SCCOL nPosX;
- SCROW nPosY;
+ aPos = rMEvt.GetPosPixel();
mrViewData.GetPosFromPixel( aPos.X(), aPos.Y(), eWhich, nPosX, nPosY );
auto pForTabView = dynamic_cast<const ScTabViewShell *>(pViewShell);
OString aCursor = pForTabView->GetViewData().describeCellCursorAt(nPosX, nPosY);
@@ -2276,10 +2277,8 @@ void ScGridWindow::MouseButtonUp( const MouseEvent& rMEvt )
uno::Reference< script::vba::XVBAEventProcessor > xVbaEvents = rDoc.GetVbaEventProcessor();
if( xVbaEvents.is() ) try
{
- Point aPos = rMEvt.GetPosPixel();
- SCCOL nPosX;
- SCROW nPosY;
- SCTAB nTab = mrViewData.GetTabNo();
+ aPos = rMEvt.GetPosPixel();
+ nTab = mrViewData.GetTabNo();
mrViewData.GetPosFromPixel( aPos.X(), aPos.Y(), eWhich, nPosX, nPosY );
OUString sURL;
ScRefCellValue aCell;
commit 2a0a670a7bae450bd9d783c7def3d3641647404d
Author: Szymon Kłos <szymon.klos at collabora.com>
AuthorDate: Mon Dec 7 08:39:54 2020 +0100
Commit: Szymon Kłos <szymon.klos at collabora.com>
CommitDate: Wed Dec 9 14:08:50 2020 +0100
jsdialog: dump all columns in treeview
Change-Id: Ia3fbf1c87b49e367c2ff077eee7734540e96b50b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107333
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
Reviewed-by: Szymon Kłos <szymon.klos at collabora.com>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107463
Tested-by: Jenkins
diff --git a/include/vcl/toolkit/svtabbx.hxx b/include/vcl/toolkit/svtabbx.hxx
index 971ef5eb4047..38c1b18d50d1 100644
--- a/include/vcl/toolkit/svtabbx.hxx
+++ b/include/vcl/toolkit/svtabbx.hxx
@@ -213,6 +213,8 @@ public:
virtual tools::Rectangle GetFieldCharacterBounds(sal_Int32 _nRow,sal_Int32 _nColumnPos,sal_Int32 nIndex) override;
virtual sal_Int32 GetFieldIndexAtPoint(sal_Int32 _nRow,sal_Int32 _nColumnPos,const Point& _rPoint) override;
+
+ virtual void DumpAsPropertyTree(tools::JsonWriter& rJsonWriter) override;
};
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/source/treelist/svtabbx.cxx b/vcl/source/treelist/svtabbx.cxx
index fdae20554120..816acb66a46c 100644
--- a/vcl/source/treelist/svtabbx.cxx
+++ b/vcl/source/treelist/svtabbx.cxx
@@ -49,10 +49,30 @@ static void lcl_DumpEntryAndSiblings(tools::JsonWriter& rJsonWriter,
{
auto aNode = rJsonWriter.startStruct();
+ // simple listbox value
const SvLBoxItem* pIt = pEntry->GetFirstItem(SvLBoxItemType::String);
if (pIt)
rJsonWriter.put("text", static_cast<const SvLBoxString*>(pIt)->GetText());
+ // column based data
+ {
+ auto aColumns = rJsonWriter.startArray("columns");
+
+ for (size_t i = 0; i < pEntry->ItemCount(); i++)
+ {
+ SvLBoxItem& rItem = pEntry->GetItem(i);
+ if (rItem.GetType() == SvLBoxItemType::String)
+ {
+ const SvLBoxString* pStringItem = dynamic_cast<const SvLBoxString*>(&rItem);
+ if (pStringItem)
+ {
+ auto aColumn = rJsonWriter.startStruct();
+ rJsonWriter.put("text", pStringItem->GetText());
+ }
+ }
+ }
+ }
+
if (bCheckButtons)
{
SvButtonState eCheckState = pTabListBox->GetCheckButtonState(pEntry);
@@ -547,6 +567,20 @@ sal_uLong SvHeaderTabListBox::Insert( SvTreeListEntry* pEntry, sal_uLong nRootPo
return nPos;
}
+void SvHeaderTabListBox::DumpAsPropertyTree(tools::JsonWriter& rJsonWriter)
+{
+ SvTabListBox::DumpAsPropertyTree(rJsonWriter);
+
+ auto aHeaders = rJsonWriter.startArray("headers");
+
+ HeaderBar* pHeaderBar = GetHeaderBar();
+ for(sal_uInt16 i = 0; i < pHeaderBar->GetItemCount(); i++)
+ {
+ auto aNode = rJsonWriter.startStruct();
+ rJsonWriter.put("text", pHeaderBar->GetItemText(pHeaderBar->GetItemId(i)));
+ }
+}
+
IMPL_LINK_NOARG(SvHeaderTabListBox, ScrollHdl_Impl, SvTreeListBox*, void)
{
m_pImpl->m_pHeaderBar->SetOffset( -GetXOffset() );
More information about the Libreoffice-commits
mailing list