[Libreoffice-commits] core.git: 3 commits - configure.ac distro-configs/LibreOfficeiOS.conf ios/CustomTarget_iOS_setup.mk solenv/bin vcl/source
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Tue Nov 6 08:39:03 UTC 2018
configure.ac | 1
distro-configs/LibreOfficeiOS.conf | 2
ios/CustomTarget_iOS_setup.mk | 2
solenv/bin/native-code.py | 150 +++++++++++++++++++++++++++++++++++++
vcl/source/window/builder.cxx | 21 -----
5 files changed, 156 insertions(+), 20 deletions(-)
New commits:
commit d6cd273c59c976c085d68e9f171a09bf018b0039
Author: Tor Lillqvist <tml at collabora.com>
AuthorDate: Tue Nov 6 10:17:10 2018 +0200
Commit: Tor Lillqvist <tml at collabora.com>
CommitDate: Tue Nov 6 10:37:47 2018 +0200
Add function to map custom widget name to its function to native-code.py
Use that function in the dialog builder instead of having explicit
code in there to check the names.
For now this simply uses a manually curated list of custom widgets. I
used some command line tools to extract the names of custom widgets
used in our .ui files, and then filtered out some I guess (hope) will
not be needed in a mobile app.
For this to work the custom widgets need to have unique names.
Currently that is not the case. Unless I did some mistake, there is
just one case of duplicate name, NotebookbarTabControl, which exists
both in the sfx and vcl libraries. (I simply filtered out that one,
too, for now.)
Change-Id: I29bbf6dfef2b3bde03acfc322495d051a7f275a8
diff --git a/solenv/bin/native-code.py b/solenv/bin/native-code.py
index 6cf298c20dc0..b7f397af4011 100755
--- a/solenv/bin/native-code.py
+++ b/solenv/bin/native-code.py
@@ -396,6 +396,138 @@ constructor_map = {
'writer' : writer_constructor_list,
}
+custom_widgets = [
+ 'ArgEdit',
+ 'AutoCompleteMultiListBox',
+ 'AutoCorrEdit',
+ 'BookmarksBox',
+ 'CaptionComboBox',
+ 'CategoryListBox',
+ 'ClassificationEditView',
+ 'ColorConfigCtrl',
+ 'ColumnEdit',
+ 'CommandCategoryListBox',
+ 'ConditionEdit',
+ 'ContentListBox',
+ 'ContextVBox',
+ 'CuiCustomMultilineEdit',
+ 'CustomAnimationList',
+ 'CustomPropertiesControl',
+ 'DataTreeListBox',
+ 'DriverListControl',
+ 'DropdownBox',
+ 'EditBox',
+ 'EmojiView',
+ 'ExtBoxWithBtns',
+ 'ExtensionBox',
+ 'FEdit',
+ 'FontNameBox',
+ 'FontSizeBox',
+ 'FontStyleBox',
+ 'FormattedField',
+ 'FormulaListBox',
+ 'GalleryPreview',
+ 'IndexBox',
+ 'IndexBox',
+ 'IntellectualPropertyPartEdit',
+ 'LightButton',
+ 'LookUpComboBox',
+ 'MacroEventListBox',
+ 'ManagedMenuButton',
+ 'MultiLineEditSyntaxHighlight',
+ 'NumFormatListBox',
+ 'OFileURLControl',
+ 'OptionalBox',
+ 'PageNumberListBox',
+ 'PaperSizeListBox',
+ 'PriorityHBox',
+ 'PriorityMergedHBox',
+ 'PropertyControl',
+ 'RecentDocsView',
+ 'RefButton',
+ 'RefEdit',
+ 'ReplaceEdit',
+ 'ReturnActionEdit',
+ 'RowEdit',
+ 'RubyEdit',
+ 'RubyPreview',
+ 'RubyRadioButton',
+ 'SFTreeListBox',
+ 'SameContentListBox',
+ 'ScAutoFmtPreview',
+ 'ScCondFormatList',
+ 'ScCsvTableBox',
+ 'ScCursorRefEdit',
+ 'ScDPFunctionListBox',
+ 'ScDataTableView',
+ 'ScDoubleField',
+ 'ScEditWindow',
+ 'ScPivotLayoutTreeList',
+ 'ScPivotLayoutTreeListData',
+ 'ScPivotLayoutTreeListLabel',
+ 'ScRefButtonEx',
+ 'SdPageObjsTLB',
+ 'SearchBox',
+ 'SearchResultsBox',
+ 'SelectionListBox',
+ 'SentenceEditWindow',
+ 'SeriesListBox',
+ 'SfxAccCfgTabListBox',
+ 'SfxConfigFunctionListBox',
+ 'SfxConfigGroupListBox',
+ 'ShowNupOrderWindow',
+ 'ShowNupOrderWindow',
+ 'SidebarDialControl',
+ 'SidebarToolBox',
+ 'SmallButton',
+ 'SpacingListBox',
+ 'StatusBar',
+ 'StructListBox',
+ 'SuggestionDisplay',
+ 'SuggestionEdit',
+ 'SvSimpleTableContainer',
+ 'SvTabListBox',
+ 'SvTreeListBox',
+ 'SvtFileView',
+ 'SvtIconChoiceCtrl',
+ 'SvtURLBox',
+ 'Svx3DPreviewControl',
+ 'SvxCharViewControl',
+ 'SvxCheckListBox',
+ 'SvxColorListBox',
+ 'SvxColorValueSet',
+ 'SvxDictEdit',
+ 'SvxFillAttrBox',
+ 'SvxFillTypeBox',
+ 'SvxFontPrevWindow',
+ 'SvxHlmarkTreeLBox',
+ 'SvxHyperURLBox',
+ 'SvxLanguageBox',
+ 'SvxLanguageComboBox',
+ 'SvxLightCtl3D',
+ 'SvxNoSpaceEdit',
+ 'SvxPathControl',
+ 'SvxRelativeField',
+ 'SvxSwFrameExample',
+ 'SvxTextEncodingBox',
+ 'SvxTextEncodingBox',
+ 'SwAddressPreview',
+ 'SwCaptionPreview',
+ 'SwFieldRefTreeListBox',
+ 'SwGlTreeListBox',
+ 'SwGlossaryGroupTLB',
+ 'SwIdxTreeListBox',
+ 'SwMarkPreview',
+ 'SwNavHelpToolBox',
+ 'SwTokenWindow',
+ 'TableValueSet',
+ 'TemplateDefaultView',
+ 'TemplateLocalView',
+ 'TemplateSearchView',
+ 'ThesaurusAlternativesCtrl',
+ 'ValueSet',
+ ]
+
def get_constructor_guard(constructor):
if type(full_constructor_map[constructor]) is bool:
return None
@@ -501,6 +633,24 @@ for constructor in sorted(full_constructor_map.keys()):
if constructor_guard:
print ('#endif')
+print ('')
+for entry in sorted(custom_widgets):
+ print ('void make' + entry + '();')
+print ('static struct { const char *name; void(*func)(); } custom_widgets[] = {')
+for entry in sorted(custom_widgets):
+ print (' { "make' + entry + '", make' + entry + ' },')
+print ('};')
+print ('')
+print ("""
+void (*lo_get_custom_widget_func(const char* name))()
+{
+ for (int i = 0; i < sizeof(custom_widgets) / sizeof(custom_widgets[0]); i++)
+ if (strcmp(name, custom_widgets[i].name) == 0)
+ return custom_widgets[i].func;
+ return nullptr;
+}
+""")
+
print ("""
const lib_to_factory_mapping *
lo_get_factory_map(void)
diff --git a/vcl/source/window/builder.cxx b/vcl/source/window/builder.cxx
index b4c38ca77d30..e3c317099000 100644
--- a/vcl/source/window/builder.cxx
+++ b/vcl/source/window/builder.cxx
@@ -1490,12 +1490,7 @@ void VclBuilder::preload()
}
#if defined DISABLE_DYNLOADING && !HAVE_FEATURE_DESKTOP
-
-VCL_BUILDER_FACTORY_EXTERN(CustomPropertiesControl);
-VCL_BUILDER_FACTORY_EXTERN(RefButton);
-VCL_BUILDER_FACTORY_EXTERN(RefEdit);
-VCL_BUILDER_FACTORY_EXTERN(ScRefButtonEx);
-
+extern "C" VclBuilder::customMakeWidget lo_get_custom_widget_func(const char* name);
#endif
VclPtr<vcl::Window> VclBuilder::makeObject(vcl::Window *pParent, const OString &name, const OString &id,
@@ -2051,18 +2046,8 @@ VclPtr<vcl::Window> VclBuilder::makeObject(vcl::Window *pParent, const OString &
else
pFunction = reinterpret_cast<customMakeWidget>(aI->second->getFunctionSymbol(sFunction));
#elif !HAVE_FEATURE_DESKTOP
- if (false)
- ; // Just so that all the other condition line pairs look the same
- else if (sFunction == "makeCustomPropertiesControl")
- pFunction = makeCustomPropertiesControl;
- else if (sFunction == "makeRefButton")
- pFunction = makeRefButton;
- else if (sFunction == "makeRefEdit")
- pFunction = makeRefEdit;
- else if (sFunction == "makeScRefButtonEx")
- pFunction = makeScRefButtonEx;
-
- SAL_WARN_IF(!pFunction, "vcl.layout", "Missing case for " << sFunction);
+ pFunction = lo_get_custom_widget_func(sFunction.toUtf8().getStr());
+ SAL_WARN_IF(!pFunction, "vcl.layout", "Could not find " << sFunction);
assert(pFunction);
#else
pFunction = reinterpret_cast<customMakeWidget>(osl_getFunctionSymbol((oslModule) RTLD_DEFAULT, sFunction.pData));
commit de016544e7fd243d7f922b06c7fd11aadd9f0324
Author: Tor Lillqvist <tml at collabora.com>
AuthorDate: Mon Nov 5 23:02:46 2018 +0200
Commit: Tor Lillqvist <tml at collabora.com>
CommitDate: Tue Nov 6 10:37:47 2018 +0200
Don't default to only tango for iOS
It doesn't have all the images that dialogs need, for instance the
vcl/res/radio1.png.
Change-Id: If7839fecb2358846b92d46a47cce3b97f7556711
diff --git a/configure.ac b/configure.ac
index 7419886bcad8..f6ba4a013d94 100644
--- a/configure.ac
+++ b/configure.ac
@@ -664,7 +664,6 @@ darwin*) # Mac OS X or iOS
enable_postgresql_sdbc=no
enable_extension_integration=no
enable_report_builder=no
- with_theme="tango"
with_ppds=no
if test "$enable_ios_simulator" = "yes"; then
host=x86_64-apple-darwin
diff --git a/distro-configs/LibreOfficeiOS.conf b/distro-configs/LibreOfficeiOS.conf
index 038dd1586fc2..92bc968a9f76 100644
--- a/distro-configs/LibreOfficeiOS.conf
+++ b/distro-configs/LibreOfficeiOS.conf
@@ -7,6 +7,8 @@
--without-java
--without-junit
+--with-theme=colibre tango
+
--with-build-platform-configure-options=--with-system-jpeg=no
--with-macosx-version-min-required=10.11
commit 1a6caadcfb86aad9bfee6fd066f9697511592128
Author: Tor Lillqvist <tml at collabora.com>
AuthorDate: Mon Nov 5 23:37:30 2018 +0200
Commit: Tor Lillqvist <tml at collabora.com>
CommitDate: Tue Nov 6 10:37:47 2018 +0200
The image zipfiles should be in share/config, it seems
Change-Id: I6f4cf36509c2fedf7bed346a07080fe0c67716a2
diff --git a/ios/CustomTarget_iOS_setup.mk b/ios/CustomTarget_iOS_setup.mk
index 33ac39045e4a..07c6c6f2fd42 100644
--- a/ios/CustomTarget_iOS_setup.mk
+++ b/ios/CustomTarget_iOS_setup.mk
@@ -62,7 +62,7 @@ $(IOSGEN)/native-code.h: $(BUILDDIR)/config_host.mk \
cp $(INSTDIR)/share/filter/oox-drawingml-cs-presets $(IOSRES)/filter
cp $(INSTDIR)/share/filter/vml-shape-types $(IOSRES)/filter
cp -R $(INSTDIR)/share/registry $(IOSRES)
- cp $(INSTDIR)/share/config/*zip $(IOSRES)/config
+ cp $(INSTDIR)/share/config/*zip $(IOSRES)/share/config
cp $(SRCDIR)/ios/welcome.odt $(IOSRES)
# Set up rc (the "inifile", fundamentalrc, unorc, bootstraprc and versionrc.
More information about the Libreoffice-commits
mailing list