cui/inc/widgettestdlg.hxx            |    4 
 cui/source/dialogs/widgettestdlg.cxx |   26 ++++
 cui/uiconfig/ui/widgettestdialog.ui  |  200 +++++++++++++++++++++++++++++++----
 sc/source/ui/view/gridwin4.cxx       |    9 -
 vcl/jsdialog/jsdialogbuilder.cxx     |    3 
 vcl/source/treelist/svtabbx.cxx      |   17 ++
 6 files changed, 230 insertions(+), 29 deletions(-)

New commits:
commit c10d9d194aec6f9c038f22862d2a61028d27e80e
Author:     Szymon Kłos <szymon.k...@collabora.com>
AuthorDate: Tue Jan 10 10:56:18 2023 +0100
Commit:     Andras Timar <andras.ti...@collabora.com>
CommitDate: Fri Feb 3 23:07:48 2023 +0100

    lok: adjust paint rect for in-place editing
    
    This allows to send correct cursor position (at the very end
    of the cell) when typing numbers in LOK mode.
    
    This fixes regression from:
    commit  9257486636dfe95b73e5690462ba6e8408a12166
    lok: sc: render expanded EditEngine when editing in-place
    
    Change-Id: I1f6c7ce3de7a2ba7ccbd4f9f9becd49e352cf05e
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145260
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com>
    Reviewed-by: Andras Timar <andras.ti...@collabora.com>
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145769
    Tested-by: Jenkins
    Reviewed-by: Szymon Kłos <szymon.k...@collabora.com>

diff --git a/sc/source/ui/view/gridwin4.cxx b/sc/source/ui/view/gridwin4.cxx
index 07265d4cf23e..5b41a6227b54 100644
--- a/sc/source/ui/view/gridwin4.cxx
+++ b/sc/source/ui/view/gridwin4.cxx
@@ -1176,7 +1176,9 @@ void ScGridWindow::DrawContent(OutputDevice &rDevice, 
const ScTableInfo& rTableI
                             // Get top-left offset because of margin and 
indent.
                             lcl_GetEditAreaTLOffset(nOffsetX, nOffsetY, 
ScAddress(nCol1, nRow1, nTab), mrViewData, rDoc);
                             aEditRect.AdjustLeft(nOffsetX + 1);
+                            aEditRect.AdjustRight(1);
                             aEditRect.AdjustTop(nOffsetY + 1);
+                            aEditRect.AdjustBottom(1);
 
                             // EditView has an 'output area' which is used to 
clip the 'paint area' we provide below.
                             // So they need to be in the same 
coordinates/units. This is tied to the mapmode of the gridwin
@@ -1308,13 +1310,6 @@ void ScGridWindow::DrawContent(OutputDevice &rDevice, 
const ScTableInfo& rTableI
         // paint the editeng text
         if (bIsTiledRendering)
         {
-            tools::Rectangle aEditRect(aBackground);
-            tools::Long nOffsetX = 0, nOffsetY = 0;
-            // Get top-left offset because of margin and indent.
-            lcl_GetEditAreaTLOffset(nOffsetX, nOffsetY, ScAddress(nCol1, 
nRow1, mrViewData.GetTabNo()), mrViewData, rDoc);
-            aEditRect.AdjustLeft(nOffsetX + 1);
-            aEditRect.AdjustTop(nOffsetY + 1);
-
             // EditView has an 'output area' which is used to clip the paint 
area we provide below.
             // So they need to be in the same coordinates/units. This is tied 
to the mapmode of the gridwin
             // attached to the EditView, so we have to change its mapmode too 
(temporarily). We save the
commit e68742c703fb76bede14d8c93d1f21967bf2d770
Author:     Szymon Kłos <szymon.k...@collabora.com>
AuthorDate: Wed Jan 4 15:28:34 2023 +0100
Commit:     Andras Timar <andras.ti...@collabora.com>
CommitDate: Fri Feb 3 23:06:49 2023 +0100

    jsdialog: don't export collapsed/expanded icons when empty
    
    Change-Id: Iec56c11fdba066f9b62b2d5d56ad011a821e4087
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145040
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com>
    Reviewed-by: Szymon Kłos <szymon.k...@collabora.com>
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145066
    Tested-by: Jenkins

diff --git a/vcl/source/treelist/svtabbx.cxx b/vcl/source/treelist/svtabbx.cxx
index f766cde70559..9ef0e145ed6d 100644
--- a/vcl/source/treelist/svtabbx.cxx
+++ b/vcl/source/treelist/svtabbx.cxx
@@ -75,9 +75,16 @@ static void lcl_DumpEntryAndSiblings(tools::JsonWriter& 
rJsonWriter,
                     const SvLBoxContextBmp* pBmpItem = dynamic_cast<const 
SvLBoxContextBmp*>(&rItem);
                     if (pBmpItem)
                     {
-                        auto aColumn = rJsonWriter.startStruct();
-                        rJsonWriter.put("collapsed", 
pBmpItem->GetBitmap1().GetStock());
-                        rJsonWriter.put("expanded", 
pBmpItem->GetBitmap2().GetStock());
+                        const OUString& rCollapsed = 
pBmpItem->GetBitmap1().GetStock();
+                        const OUString& rExpanded = 
pBmpItem->GetBitmap2().GetStock();
+                        if (!rCollapsed.trim().isEmpty() || 
!rExpanded.trim().isEmpty())
+                        {
+                            auto aColumn = rJsonWriter.startStruct();
+                            if (!rCollapsed.trim().isEmpty())
+                                rJsonWriter.put("collapsed", rCollapsed);
+                            if (!rExpanded.trim().isEmpty())
+                                rJsonWriter.put("expanded", rExpanded);
+                        }
                     }
                 }
             }
commit b8858b0b6ed753ff875623093f6715ac30606710
Author:     Szymon Kłos <szymon.k...@collabora.com>
AuthorDate: Thu Dec 15 13:59:15 2022 +0100
Commit:     Andras Timar <andras.ti...@collabora.com>
CommitDate: Fri Feb 3 23:06:35 2023 +0100

    jsdialog: add TreeView to TestWidgetDialog
    
    Change-Id: I5c4f70d98dd8ea03c137cd368a2c097cd866609d
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144222
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com>
    Reviewed-by: Rashesh Padia <rashesh.pa...@collabora.com>
    Reviewed-by: Szymon Kłos <szymon.k...@collabora.com>
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145067
    Tested-by: Jenkins

diff --git a/cui/inc/widgettestdlg.hxx b/cui/inc/widgettestdlg.hxx
index dabc2ee14e75..02ab7f317894 100644
--- a/cui/inc/widgettestdlg.hxx
+++ b/cui/inc/widgettestdlg.hxx
@@ -18,10 +18,14 @@ class WidgetTestDialog final : public 
weld::GenericDialogController
 private:
     std::unique_ptr<weld::Button> m_xOKButton;
     std::unique_ptr<weld::Button> m_xCancelButton;
+    std::unique_ptr<weld::TreeView> m_xTreeView;
+    std::unique_ptr<weld::TreeView> m_xTreeView2;
 
     DECL_LINK(OkHdl, weld::Button&, void);
     DECL_LINK(CancelHdl, weld::Button&, void);
 
+    void FillTreeView();
+
 public:
     WidgetTestDialog(weld::Window* pParent);
     ~WidgetTestDialog();
diff --git a/cui/source/dialogs/widgettestdlg.cxx 
b/cui/source/dialogs/widgettestdlg.cxx
index 5475151a9af2..51ecef3105d0 100644
--- a/cui/source/dialogs/widgettestdlg.cxx
+++ b/cui/source/dialogs/widgettestdlg.cxx
@@ -8,15 +8,20 @@
 */
 
 #include <widgettestdlg.hxx>
+#include <bitmaps.hlst>
 
 WidgetTestDialog::WidgetTestDialog(weld::Window* pParent)
     : GenericDialogController(pParent, "cui/ui/widgettestdialog.ui", 
"WidgetTestDialog")
 {
     m_xOKButton = m_xBuilder->weld_button("ok_btn");
     m_xCancelButton = m_xBuilder->weld_button("cancel_btn");
+    m_xTreeView = m_xBuilder->weld_tree_view("contenttree");
+    m_xTreeView2 = m_xBuilder->weld_tree_view("contenttree2");
 
     m_xOKButton->connect_clicked(LINK(this, WidgetTestDialog, OkHdl));
     m_xCancelButton->connect_clicked(LINK(this, WidgetTestDialog, CancelHdl));
+
+    FillTreeView();
 }
 
 WidgetTestDialog::~WidgetTestDialog() {}
@@ -28,4 +33,25 @@ IMPL_LINK_NOARG(WidgetTestDialog, CancelHdl, weld::Button&, 
void)
     m_xDialog->response(RET_CANCEL);
 }
 
+void WidgetTestDialog::FillTreeView()
+{
+    OUString aImage1(RID_SVXBMP_CELL_LR);
+    OUString aImage2(RID_SVXBMP_SHADOW_BOT_LEFT);
+
+    for (size_t nCount = 0; nCount < 4; nCount++)
+    {
+        OUString sText = OUString::Concat("Test ") + 
OUString::Concat(OUString::number(nCount));
+        std::unique_ptr<weld::TreeIter> xEntry = m_xTreeView->make_iterator();
+        m_xTreeView->insert(nullptr, -1, &sText, &sText, nullptr, nullptr, 
false, xEntry.get());
+        m_xTreeView->set_image(*xEntry, (nCount % 2 == 0) ? aImage1 : aImage2);
+
+        m_xTreeView2->append();
+        m_xTreeView2->set_image(nCount, (nCount % 2 == 0) ? aImage1 : aImage2);
+        m_xTreeView2->set_text(nCount, "First Column", 0);
+        m_xTreeView2->set_text(
+            nCount, OUString::Concat("Row ") + 
OUString::Concat(OUString::number(nCount)), 1);
+        m_xTreeView2->set_id(nCount, OUString::number(nCount));
+    }
+}
+
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/cui/uiconfig/ui/widgettestdialog.ui 
b/cui/uiconfig/ui/widgettestdialog.ui
index 1bf515198a73..763f74d1ec73 100644
--- a/cui/uiconfig/ui/widgettestdialog.ui
+++ b/cui/uiconfig/ui/widgettestdialog.ui
@@ -8,11 +8,8 @@
     <property name="type-hint">dialog</property>
     <child internal-child="vbox">
       <object class="GtkBox">
-        <property name="visible">True</property>
-        <property name="can-focus">False</property>
-        <property name="orientation">vertical</property>
-        <property name="spacing">5</property>
-        <child internal-child="action_area">
+      <property name="orientation">vertical</property>
+      <child internal-child="action_area">
           <object class="GtkButtonBox">
             <property name="can-focus">False</property>
             <property name="layout-style">end</property>
@@ -46,9 +43,16 @@
           <packing>
             <property name="expand">False</property>
             <property name="fill">False</property>
-            <property name="position">0</property>
+            <property name="position">1</property>
           </packing>
         </child>
+      <child>
+      <!-- n-columns=2 n-rows=2 -->
+      <object class="GtkGrid">
+        <property name="visible">True</property>
+        <property name="can-focus">False</property>
+        <property name="row-spacing">5</property>
+        <property name="column-spacing">5</property>
         <child>
           <!-- n-columns=2 n-rows=7 -->
           <object class="GtkGrid">
@@ -288,18 +292,8 @@
           <packing>
             <property name="expand">False</property>
             <property name="fill">True</property>
-            <property name="position">0</property>
-          </packing>
-        </child>
-        <child>
-          <object class="GtkSeparator">
-            <property name="visible">True</property>
-            <property name="can-focus">False</property>
-          </object>
-          <packing>
-            <property name="expand">False</property>
-            <property name="fill">True</property>
-            <property name="position">1</property>
+            <property name="left-attach">0</property>
+            <property name="top-attach">0</property>
           </packing>
         </child>
         <child>
@@ -457,11 +451,151 @@
           <packing>
             <property name="expand">False</property>
             <property name="fill">True</property>
-            <property name="position">2</property>
+            <property name="left-attach">0</property>
+            <property name="top-attach">1</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkBox" id="contentbox">
+            <property name="visible">True</property>
+            <property name="can-focus">False</property>
+            <property name="hexpand">True</property>
+            <property name="vexpand">True</property>
+            <property name="orientation">vertical</property>
+            <child>
+              <object class="GtkScrolledWindow">
+                <property name="visible">True</property>
+                <property name="can-focus">True</property>
+                <property name="hexpand">True</property>
+                <property name="vexpand">True</property>
+                <property name="shadow-type">in</property>
+                <child>
+                  <object class="GtkTreeView" id="contenttree">
+                    <property name="width-request">-1</property>
+                    <property name="visible">True</property>
+                    <property name="can-focus">True</property>
+                    <property name="receives-default">True</property>
+                    <property name="has-tooltip">True</property>
+                    <property name="hexpand">True</property>
+                    <property name="vexpand">True</property>
+                    <property name="model">liststore2</property>
+                    <property name="headers-visible">False</property>
+                    <property name="reorderable">True</property>
+                    <property name="search-column">1</property>
+                    <property name="enable-tree-lines">True</property>
+                    <child>
+                      <object class="GtkTreeViewColumn" id="treeviewcolumn0">
+                        <property name="spacing">6</property>
+                        <child>
+                          <object class="GtkCellRendererPixbuf" 
id="cellrendererpixbuf0"/>
+                          <attributes>
+                            <attribute name="sensitive">4</attribute>
+                            <attribute name="pixbuf">0</attribute>
+                          </attributes>
+                        </child>
+                        <child>
+                          <object class="GtkCellRendererText" 
id="cellrenderertext0">
+                            <property name="xalign">0</property>
+                          </object>
+                          <attributes>
+                            <attribute name="xpad">5</attribute>
+                            <attribute name="sensitive">4</attribute>
+                            <attribute name="text">1</attribute>
+                          </attributes>
+                        </child>
+                      </object>
+                    </child>
+                  </object>
+                </child>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">True</property>
+                <property name="position">0</property>
+              </packing>
+            </child>
+          </object>
+          <packing>
+            <property name="left-attach">1</property>
+            <property name="top-attach">0</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkBox" id="contentbox2">
+            <property name="visible">True</property>
+            <property name="can-focus">False</property>
+            <property name="hexpand">True</property>
+            <property name="vexpand">True</property>
+            <property name="orientation">vertical</property>
+            <child>
+              <object class="GtkScrolledWindow">
+                <property name="visible">True</property>
+                <property name="can-focus">True</property>
+                <property name="hexpand">True</property>
+                <property name="vexpand">True</property>
+                <property name="shadow-type">in</property>
+                <child>
+                  <object class="GtkTreeView" id="contenttree2">
+                    <property name="width-request">-1</property>
+                    <property name="visible">True</property>
+                    <property name="can-focus">True</property>
+                    <property name="receives-default">True</property>
+                    <property name="has-tooltip">True</property>
+                    <property name="hexpand">True</property>
+                    <property name="vexpand">True</property>
+                    <property name="model">liststore3</property>
+                    <property name="headers-visible">True</property>
+                    <property name="reorderable">True</property>
+                    <property name="search-column">1</property>
+                    <property name="enable-tree-lines">True</property>
+                    <child>
+                      <object class="GtkTreeViewColumn" id="treeviewcolumn1">
+                        <property name="resizable">True</property>
+                        <property name="spacing">6</property>
+                        <property name="title" translatable="no">Column 
1</property>
+                        <child>
+                          <object class="GtkCellRendererText" 
id="cellrenderer1"/>
+                          <attributes>
+                            <attribute name="text">0</attribute>
+                          </attributes>
+                        </child>
+                      </object>
+                    </child>
+                    <child>
+                      <object class="GtkTreeViewColumn" id="treeviewcolumn2">
+                        <property name="resizable">True</property>
+                        <property name="spacing">6</property>
+                        <property name="title" translatable="no">Column 
2</property>
+                        <child>
+                          <object class="GtkCellRendererText" 
id="cellrenderer2"/>
+                          <attributes>
+                            <attribute name="text">1</attribute>
+                          </attributes>
+                        </child>
+                      </object>
+                    </child>
+                  </object>
+                </child>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">True</property>
+                <property name="position">0</property>
+              </packing>
+            </child>
+          </object>
+          <packing>
+            <property name="left-attach">1</property>
+            <property name="top-attach">1</property>
           </packing>
         </child>
       </object>
     </child>
+    </object>
+    <packing>
+      <property name="position">0</property>
+    </packing>
+    </child>
   </object>
   <object class="GtkTextBuffer" id="textbuffer1">
     <property name="text" translatable="no">Lorem Ipsum is simply dummy text 
of the printing and typesetting industry. Lorem Ipsum has been the industry's 
standard dummy tex
@@ -473,7 +607,7 @@ t ever since the 1500s, when an unknown printer took a 
galley of type and scramb
  Ipsum passages, and more recently with desktop publishing
  software like Aldus PageMaker including versions of Lorem Ipsum.</property>
   </object>
-    <object class="GtkListStore" id="liststore1">
+  <object class="GtkListStore" id="liststore1">
     <columns>
       <!-- column-name gchararray1 -->
       <column type="gchararray"/>
@@ -496,4 +630,30 @@ t ever since the 1500s, when an unknown printer took a 
galley of type and scramb
       </row>
     </data>
   </object>
+  <object class="GtkTreeStore" id="liststore2">
+    <columns>
+      <!-- column-name expander -->
+      <column type="GdkPixbuf"/>
+      <!-- column-name text -->
+      <column type="gchararray"/>
+      <!-- column-name id -->
+      <column type="gchararray"/>
+      <!-- column-name weight -->
+      <column type="gint"/>
+      <!-- column-name sensitive -->
+      <column type="gboolean"/>
+      <!-- column-name extraindent -->
+      <column type="gint"/>
+    </columns>
+  </object>
+    <object class="GtkTreeStore" id="liststore3">
+    <columns>
+      <!-- column-name text -->
+      <column type="gchararray"/>
+      <!-- column-name text1 -->
+      <column type="gchararray"/>
+      <!-- column-name id -->
+      <column type="gchararray"/>
+    </columns>
+  </object>
 </interface>
commit 59348be621989088154ac53df77c88f69030c4fc
Author:     Szymon Kłos <szymon.k...@collabora.com>
AuthorDate: Thu Dec 15 14:22:37 2022 +0100
Commit:     Andras Timar <andras.ti...@collabora.com>
CommitDate: Fri Feb 3 23:06:19 2023 +0100

    jsdialog: dump stock images id in TreeView
    
    Change-Id: I11342e1d7963a7e4d1ef139f504fc44dd6c89d90
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144223
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com>
    Reviewed-by: Rashesh Padia <rashesh.pa...@collabora.com>
    Reviewed-by: Szymon Kłos <szymon.k...@collabora.com>
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145065
    Tested-by: Jenkins

diff --git a/vcl/source/treelist/svtabbx.cxx b/vcl/source/treelist/svtabbx.cxx
index b305e791e167..f766cde70559 100644
--- a/vcl/source/treelist/svtabbx.cxx
+++ b/vcl/source/treelist/svtabbx.cxx
@@ -70,6 +70,16 @@ static void lcl_DumpEntryAndSiblings(tools::JsonWriter& 
rJsonWriter,
                         rJsonWriter.put("text", pStringItem->GetText());
                     }
                 }
+                else if (rItem.GetType() == SvLBoxItemType::ContextBmp)
+                {
+                    const SvLBoxContextBmp* pBmpItem = dynamic_cast<const 
SvLBoxContextBmp*>(&rItem);
+                    if (pBmpItem)
+                    {
+                        auto aColumn = rJsonWriter.startStruct();
+                        rJsonWriter.put("collapsed", 
pBmpItem->GetBitmap1().GetStock());
+                        rJsonWriter.put("expanded", 
pBmpItem->GetBitmap2().GetStock());
+                    }
+                }
             }
         }
 
commit ebc77f16a49b3080d71503ae9adf546574287814
Author:     Szymon Kłos <szymon.k...@collabora.com>
AuthorDate: Thu Feb 2 11:57:48 2023 +0100
Commit:     Andras Timar <andras.ti...@collabora.com>
CommitDate: Fri Feb 3 22:56:00 2023 +0100

    jsdialog: weld all message boxes
    
    This fixes regression from:
    commit 9785cebe4cfdc296143757da6098a74b0252c618
    jsdialog: fix validation error dialog in Calc
    
    When inserting autofilter without header data
    - message box should appear
    
    Change-Id: Id5d26604a67f43700310cc0f51954b886c9de0f4
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146495
    Reviewed-by: Henry Castro <hcas...@collabora.com>
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com>

diff --git a/vcl/jsdialog/jsdialogbuilder.cxx b/vcl/jsdialog/jsdialogbuilder.cxx
index 69300b516698..f9fd939b38a8 100644
--- a/vcl/jsdialog/jsdialogbuilder.cxx
+++ b/vcl/jsdialog/jsdialogbuilder.cxx
@@ -1182,8 +1182,7 @@ weld::MessageDialog* 
JSInstanceBuilder::CreateMessageDialog(weld::Widget* pParen
     else
         SAL_WARN("vcl", "No notifier in 
JSInstanceBuilder::CreateMessageDialog");
 
-    // fallback
-    return new SalInstanceMessageDialog(xMessageDialog, nullptr, true);
+    return new JSMessageDialog(xMessageDialog, nullptr, true);
 }
 
 JSDialog::JSDialog(JSDialogSender* pSender, ::Dialog* pDialog, 
SalInstanceBuilder* pBuilder,

Reply via email to