[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.4' - 2 commits - sc/qa sc/source vcl/source vcl/unx
Szymon KÅos (via logerrit)
logerrit at kemper.freedesktop.org
Mon Nov 30 17:28:22 UTC 2020
sc/qa/uitest/autofilter/autofilter.py | 2
sc/source/ui/cctrl/checklistmenu.cxx | 4 -
vcl/source/app/salvtables.cxx | 2
vcl/unx/gtk3/gtk3gtkinst.cxx | 124 ----------------------------------
4 files changed, 4 insertions(+), 128 deletions(-)
New commits:
commit 754032d6c7c2037fee05e28cf581e06ad2ab9d5a
Author: Szymon Kłos <szymon.klos at collabora.com>
AuthorDate: Mon Nov 30 16:10:24 2020 +0100
Commit: Szymon Kłos <szymon.klos at collabora.com>
CommitDate: Mon Nov 30 18:28:03 2020 +0100
Fix build
Change-Id: I960682851c978fe16c559230a7db4e3c62227fad
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106896
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
Reviewed-by: Szymon Kłos <szymon.klos at collabora.com>
diff --git a/vcl/source/app/salvtables.cxx b/vcl/source/app/salvtables.cxx
index db5b3d97d6f1..5b4a76a1c8ec 100644
--- a/vcl/source/app/salvtables.cxx
+++ b/vcl/source/app/salvtables.cxx
@@ -3603,7 +3603,7 @@ void SalInstanceTreeView::hide()
void SalInstanceTreeView::insert(const weld::TreeIter* pParent, int pos, const OUString* pStr, const OUString* pId,
const OUString* pIconName, VirtualDevice* pImageSurface,
- const OUString* pExpanderName, bool bChildrenOnDemand, weld::TreeIter* pRet)
+ const OUString* /*pExpanderName*/, bool bChildrenOnDemand, weld::TreeIter* pRet)
{
do_insert(pParent, pos, pStr, pId, pIconName, pImageSurface,
bChildrenOnDemand, pRet, false);
diff --git a/vcl/unx/gtk3/gtk3gtkinst.cxx b/vcl/unx/gtk3/gtk3gtkinst.cxx
index 7729d0ab082b..72177d63e1f9 100644
--- a/vcl/unx/gtk3/gtk3gtkinst.cxx
+++ b/vcl/unx/gtk3/gtk3gtkinst.cxx
@@ -8009,84 +8009,6 @@ struct CompareGtkTreePath
}
};
-int get_height_row(GtkTreeView* pTreeView, GList* pColumns)
-{
- gint nMaxRowHeight = 0;
- for (GList* pEntry = g_list_first(pColumns); pEntry; pEntry = g_list_next(pEntry))
- {
- GtkTreeViewColumn* pColumn = GTK_TREE_VIEW_COLUMN(pEntry->data);
- GList *pRenderers = gtk_cell_layout_get_cells(GTK_CELL_LAYOUT(pColumn));
- for (GList* pRenderer = g_list_first(pRenderers); pRenderer; pRenderer = g_list_next(pRenderer))
- {
- GtkCellRenderer* pCellRenderer = GTK_CELL_RENDERER(pRenderer->data);
- gint nRowHeight;
- gtk_cell_renderer_get_preferred_height(pCellRenderer, GTK_WIDGET(pTreeView), nullptr, &nRowHeight);
- nMaxRowHeight = std::max(nMaxRowHeight, nRowHeight);
- }
- g_list_free(pRenderers);
- }
- return nMaxRowHeight;
-}
-
-int get_height_row_separator(GtkTreeView* pTreeView)
-{
- gint nVerticalSeparator;
- gtk_widget_style_get(GTK_WIDGET(pTreeView), "vertical-separator", &nVerticalSeparator, nullptr);
- return nVerticalSeparator;
-}
-
-int get_height_rows(GtkTreeView* pTreeView, GList* pColumns, int nRows)
-{
- gint nMaxRowHeight = get_height_row(pTreeView, pColumns);
- gint nVerticalSeparator = get_height_row_separator(pTreeView);
- return (nMaxRowHeight * nRows) + (nVerticalSeparator * (nRows + 1));
-}
-
-int get_height_rows(int nRowHeight, int nSeparatorHeight, int nRows)
-{
- return (nRowHeight * nRows) + (nSeparatorHeight * (nRows + 1));
-}
-
-tools::Rectangle get_row_area(GtkTreeView* pTreeView, GList* pColumns, GtkTreePath* pPath)
-{
- tools::Rectangle aRet;
-
- GdkRectangle aRect;
- for (GList* pEntry = g_list_last(pColumns); pEntry; pEntry = g_list_previous(pEntry))
- {
- GtkTreeViewColumn* pColumn = GTK_TREE_VIEW_COLUMN(pEntry->data);
- gtk_tree_view_get_cell_area(pTreeView, pPath, pColumn, &aRect);
- aRet.Union(tools::Rectangle(aRect.x, aRect.y, aRect.x + aRect.width, aRect.y + aRect.height));
- }
-
- return aRet;
-}
-
-struct GtkTreeRowReferenceDeleter
-{
- void operator()(GtkTreeRowReference* p) const
- {
- gtk_tree_row_reference_free(p);
- }
-};
-
-bool separator_function(GtkTreePath* path, const std::vector<std::unique_ptr<GtkTreeRowReference, GtkTreeRowReferenceDeleter>>& rSeparatorRows)
-{
- bool bFound = false;
- for (auto& a : rSeparatorRows)
- {
- GtkTreePath* seppath = gtk_tree_row_reference_get_path(a.get());
- if (seppath)
- {
- bFound = gtk_tree_path_compare(path, seppath) == 0;
- gtk_tree_path_free(seppath);
- }
- if (bFound)
- break;
- }
- return bFound;
-}
-
void tree_store_set(GtkTreeModel* pTreeModel, GtkTreeIter *pIter, ...)
{
va_list args;
@@ -8245,7 +8167,6 @@ private:
gint m_nExpanderToggleCol;
gint m_nExpanderImageCol;
gint m_nIdCol;
- int m_nPendingVAdjustment;
gulong m_nChangedSignalId;
gulong m_nRowActivatedSignalId;
gulong m_nTestExpandRowSignalId;
@@ -8574,8 +8495,6 @@ private:
bRet = !bRet;
m_Setter(m_pTreeModel, &iter, nCol, bRet, -1);
- gint depth;
-
set(iter, m_aToggleTriStateMap[nCol], false);
signal_toggled(iter_col(GtkInstanceTreeIter(iter), to_external_model(nCol)));
@@ -8759,48 +8678,6 @@ private:
return pThis->signal_key_press(pEvent);
}
- void set_font_color(const GtkTreeIter& iter, const Color& rColor)
- {
- if (rColor == COL_AUTO)
- m_Setter(m_pTreeModel, const_cast<GtkTreeIter*>(&iter), m_nIdCol + 1, nullptr, -1);
- else
- {
- GdkRGBA aColor{rColor.GetRed()/255.0, rColor.GetGreen()/255.0, rColor.GetBlue()/255.0, 0};
- m_Setter(m_pTreeModel, const_cast<GtkTreeIter*>(&iter), m_nIdCol + 1, &aColor, -1);
- }
- }
-
- int get_expander_size() const
- {
- gint nExpanderSize;
- gint nHorizontalSeparator;
-
- gtk_widget_style_get(GTK_WIDGET(m_pTreeView),
- "expander-size", &nExpanderSize,
- "horizontal-separator", &nHorizontalSeparator,
- nullptr);
-
- return nExpanderSize + (nHorizontalSeparator/ 2);
- }
-
- void real_vadjustment_set_value(int value)
- {
- disable_notify_events();
- gtk_adjustment_set_value(m_pVAdjustment, value);
- enable_notify_events();
- }
-
- static gboolean setAdjustmentCallback(GtkWidget*, GdkFrameClock*, gpointer widget)
- {
- GtkInstanceTreeView* pThis = static_cast<GtkInstanceTreeView*>(widget);
- if (pThis->m_nPendingVAdjustment != -1)
- {
- pThis->real_vadjustment_set_value(pThis->m_nPendingVAdjustment);
- pThis->m_nPendingVAdjustment = -1;
- }
- return false;
- }
-
bool iter_next(weld::TreeIter& rIter, bool bOnlyExpanded) const
{
GtkInstanceTreeIter& rGtkIter = static_cast<GtkInstanceTreeIter&>(rIter);
@@ -8856,7 +8733,6 @@ public:
, m_nImageCol(-1)
, m_nExpanderToggleCol(-1)
, m_nExpanderImageCol(-1)
- , m_nPendingVAdjustment(-1)
, m_nChangedSignalId(g_signal_connect(gtk_tree_view_get_selection(pTreeView), "changed",
G_CALLBACK(signalChanged), this))
, m_nRowActivatedSignalId(g_signal_connect(pTreeView, "row-activated", G_CALLBACK(signalRowActivated), this))
commit 6404a9f872f0af265fa9975fec66e247870ba6e0
Author: Szymon Kłos <szymon.klos at collabora.com>
AuthorDate: Thu Nov 12 10:41:22 2020 +0100
Commit: Szymon Kłos <szymon.klos at collabora.com>
CommitDate: Mon Nov 30 18:27:49 2020 +0100
Fix uitests for autofilter menu
Change-Id: Ifd7d39f787d7530da62fbe479e7b70f656a67911
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106893
Tested-by: Szymon Kłos <szymon.klos at collabora.com>
Reviewed-by: Szymon Kłos <szymon.klos at collabora.com>
diff --git a/sc/qa/uitest/autofilter/autofilter.py b/sc/qa/uitest/autofilter/autofilter.py
index 47b94a6807bc..3c76f072a565 100644
--- a/sc/qa/uitest/autofilter/autofilter.py
+++ b/sc/qa/uitest/autofilter/autofilter.py
@@ -80,7 +80,7 @@ class AutofilterTest(UITestCase):
xFloatWindow = self.xUITest.getFloatWindow()
xCheckListMenu = xFloatWindow.getChild("check_list_menu")
- xTreeList = xCheckListMenu.getChild("check_list_box")
+ xTreeList = xCheckListMenu.getChild("check_tree_box")
self.assertEqual(2, len(xTreeList.getChildren()))
self.assertTrue(get_state_as_dict(xTreeList.getChild('0'))['IsSelected'])
diff --git a/sc/source/ui/cctrl/checklistmenu.cxx b/sc/source/ui/cctrl/checklistmenu.cxx
index ad82d5f8618b..5d76250bed14 100644
--- a/sc/source/ui/cctrl/checklistmenu.cxx
+++ b/sc/source/ui/cctrl/checklistmenu.cxx
@@ -136,8 +136,8 @@ void ScCheckListMenuControl::addMenuItem(const OUString& rText, Action* pAction)
void ScCheckListMenuControl::addSeparator()
{
- MenuItemData aItem;
- maMenuItems.emplace_back(std::move(aItem));
+ //MenuItemData aItem;
+ //maMenuItems.emplace_back(std::move(aItem));
//mxMenu->append_separator("separator" + OUString::number(maMenuItems.size()));
}
More information about the Libreoffice-commits
mailing list