summaryrefslogtreecommitdiff
path: root/sfx2
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2018-11-05 21:01:23 +0000
committerCaolán McNamara <caolanm@redhat.com>2018-11-19 14:05:41 +0100
commit5e0c3fd7a42f93489a3d59a83bad2a72de1af63c (patch)
treef0f6fa97722200d82d3d04c5da5fd0ec594e272c /sfx2
parent6fe56989cfe0c4aa58cd8532db9cfdb5116f2a73 (diff)
weld TreeView
a) use GtkTreeStores for GtkTreeViews b) ironically can't store GtkTreeStore contents in .ui apparently c) set show_expanders for all non-trees and unconverted cases d) on-demand subtrees Change-Id: I3c1036a222daba2c129b1a22ffeb3fe35005ae31 Reviewed-on: https://gerrit.libreoffice.org/63558 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sfx2')
-rw-r--r--sfx2/source/appl/appserv.cxx10
-rw-r--r--sfx2/source/doc/saveastemplatedlg.cxx1
-rw-r--r--sfx2/source/doc/templatedlg.cxx1
-rw-r--r--sfx2/uiconfig/ui/loadtemplatedialog.ui4
-rw-r--r--sfx2/uiconfig/ui/newstyle.ui2
-rw-r--r--sfx2/uiconfig/ui/saveastemplatedlg.ui7
-rw-r--r--sfx2/uiconfig/ui/templatecategorydlg.ui7
7 files changed, 12 insertions, 20 deletions
diff --git a/sfx2/source/appl/appserv.cxx b/sfx2/source/appl/appserv.cxx
index 2a95052903f2..10e2f1776730 100644
--- a/sfx2/source/appl/appserv.cxx
+++ b/sfx2/source/appl/appserv.cxx
@@ -1229,17 +1229,17 @@ void SfxApplication::MiscState_Impl(SfxItemSet &rSet)
#ifndef DISABLE_DYNLOADING
-typedef rtl_uString* (*basicide_choose_macro)(void*, void*, sal_Bool);
+typedef rtl_uString* (*basicide_choose_macro)(void*, void*, void*, sal_Bool);
extern "C" { static void thisModule() {} }
#else
-extern "C" rtl_uString* basicide_choose_macro(void*, void*, sal_Bool);
+extern "C" rtl_uString* basicide_choose_macro(void*, void*, void*, sal_Bool);
#endif
-static OUString ChooseMacro( const Reference< XModel >& rxLimitToDocument, const Reference< XFrame >& xDocFrame, bool bChooseOnly )
+static OUString ChooseMacro(weld::Window* pParent, const Reference<XModel>& rxLimitToDocument, const Reference<XFrame>& xDocFrame, bool bChooseOnly)
{
#ifndef DISABLE_DYNLOADING
osl::Module aMod;
@@ -1258,7 +1258,7 @@ static OUString ChooseMacro( const Reference< XModel >& rxLimitToDocument, const
#endif
// call basicide_choose_macro in basctl
- rtl_uString* pScriptURL = pSymbol( rxLimitToDocument.get(), xDocFrame.get(), bChooseOnly );
+ rtl_uString* pScriptURL = pSymbol(pParent, rxLimitToDocument.get(), xDocFrame.get(), bChooseOnly);
OUString aScriptURL( pScriptURL );
rtl_uString_release( pScriptURL );
return aScriptURL;
@@ -1493,7 +1493,7 @@ void SfxApplication::OfaExec_Impl( SfxRequest& rReq )
}
Reference <XFrame> xFrame(GetRequestFrame(rReq));
- rReq.SetReturnValue(SfxStringItem(rReq.GetSlot(), ChooseMacro(xLimitToModel, xFrame, bChooseOnly)));
+ rReq.SetReturnValue(SfxStringItem(rReq.GetSlot(), ChooseMacro(rReq.GetFrameWeld(), xLimitToModel, xFrame, bChooseOnly)));
rReq.Done();
}
break;
diff --git a/sfx2/source/doc/saveastemplatedlg.cxx b/sfx2/source/doc/saveastemplatedlg.cxx
index a7af9dda560e..2b7dad5dd377 100644
--- a/sfx2/source/doc/saveastemplatedlg.cxx
+++ b/sfx2/source/doc/saveastemplatedlg.cxx
@@ -44,6 +44,7 @@ SfxSaveAsTemplateDialog::SfxSaveAsTemplateDialog(weld::Window* pParent, const un
, mnRegionPos(0)
, m_xModel(rModel)
{
+ m_xLBCategory->append_text(SfxResId(STR_CATEGORY_NONE));
initialize();
SetCategoryLBEntries(msCategories);
diff --git a/sfx2/source/doc/templatedlg.cxx b/sfx2/source/doc/templatedlg.cxx
index 2d0776b7f69c..c78cf5b002ac 100644
--- a/sfx2/source/doc/templatedlg.cxx
+++ b/sfx2/source/doc/templatedlg.cxx
@@ -1328,6 +1328,7 @@ SfxTemplateCategoryDialog::SfxTemplateCategoryDialog(weld::Window* pParent)
, mxCreateLabel(m_xBuilder->weld_label("create_label"))
, mxOKButton(m_xBuilder->weld_button("ok"))
{
+ mxLBCategory->append_text(SfxResId(STR_CATEGORY_NONE));
mxNewCategoryEdit->connect_changed(LINK(this, SfxTemplateCategoryDialog, NewCategoryEditHdl));
mxLBCategory->set_size_request(mxLBCategory->get_approximate_digit_width() * 32,
mxLBCategory->get_height_rows(8));
diff --git a/sfx2/uiconfig/ui/loadtemplatedialog.ui b/sfx2/uiconfig/ui/loadtemplatedialog.ui
index 43298345224d..5c3fecf13ac0 100644
--- a/sfx2/uiconfig/ui/loadtemplatedialog.ui
+++ b/sfx2/uiconfig/ui/loadtemplatedialog.ui
@@ -2,7 +2,7 @@
<!-- Generated with glade 3.20.2 -->
<interface domain="sfx">
<requires lib="gtk+" version="3.18"/>
- <object class="GtkListStore" id="liststore1">
+ <object class="GtkTreeStore" id="liststore1">
<columns>
<!-- column-name text -->
<column type="gchararray"/>
@@ -10,7 +10,7 @@
<column type="gchararray"/>
</columns>
</object>
- <object class="GtkListStore" id="liststore2">
+ <object class="GtkTreeStore" id="liststore2">
<columns>
<!-- column-name text -->
<column type="gchararray"/>
diff --git a/sfx2/uiconfig/ui/newstyle.ui b/sfx2/uiconfig/ui/newstyle.ui
index bd22a8762eda..9761b0047d7c 100644
--- a/sfx2/uiconfig/ui/newstyle.ui
+++ b/sfx2/uiconfig/ui/newstyle.ui
@@ -2,7 +2,7 @@
<!-- Generated with glade 3.22.1 -->
<interface domain="sfx">
<requires lib="gtk+" version="3.18"/>
- <object class="GtkListStore" id="liststore1">
+ <object class="GtkTreeStore" id="liststore1">
<columns>
<!-- column-name text -->
<column type="gchararray"/>
diff --git a/sfx2/uiconfig/ui/saveastemplatedlg.ui b/sfx2/uiconfig/ui/saveastemplatedlg.ui
index 9362b981a5f2..8566b32d2555 100644
--- a/sfx2/uiconfig/ui/saveastemplatedlg.ui
+++ b/sfx2/uiconfig/ui/saveastemplatedlg.ui
@@ -2,16 +2,11 @@
<!-- Generated with glade 3.20.0 -->
<interface domain="sfx">
<requires lib="gtk+" version="3.18"/>
- <object class="GtkListStore" id="categorylist">
+ <object class="GtkTreeStore" id="categorylist">
<columns>
<!-- column-name gchararray1 -->
<column type="gchararray"/>
</columns>
- <data>
- <row>
- <col id="0" translatable="yes" context="saveastemplatedlg|categorylist">None</col>
- </row>
- </data>
</object>
<object class="GtkDialog" id="SaveAsTemplateDialog">
<property name="can_focus">False</property>
diff --git a/sfx2/uiconfig/ui/templatecategorydlg.ui b/sfx2/uiconfig/ui/templatecategorydlg.ui
index 106c5a1a03cb..7641e4ebd702 100644
--- a/sfx2/uiconfig/ui/templatecategorydlg.ui
+++ b/sfx2/uiconfig/ui/templatecategorydlg.ui
@@ -2,18 +2,13 @@
<!-- Generated with glade 3.20.0 -->
<interface domain="sfx">
<requires lib="gtk+" version="3.18"/>
- <object class="GtkListStore" id="categorylist">
+ <object class="GtkTreeStore" id="categorylist">
<columns>
<!-- column-name text -->
<column type="gchararray"/>
<!-- column-name id -->
<column type="gchararray"/>
</columns>
- <data>
- <row>
- <col id="0" translatable="yes" context="templatecategorydlg|categorylist">None</col>
- </row>
- </data>
</object>
<object class="GtkDialog" id="TemplatesCategoryDialog">
<property name="can_focus">False</property>