[Libreoffice-commits] core.git: cui/Library_cui.mk cui/source cui/uiconfig include/sfx2 include/svx sc/source sd/source sfx2/source starmath/inc starmath/source svx/source sw/source

2023-08-29 Thread Bayram Çiçek (via logerrit)
 cui/Library_cui.mk  |1 
 cui/source/inc/cuioptgenrl.hxx  |2 
 cui/source/inc/cuitabarea.hxx   |2 
 cui/source/inc/dbregister.hxx   |2 
 cui/source/inc/optasian.hxx |3 
 cui/source/inc/optlingu.hxx |2 
 cui/source/inc/optpath.hxx  |2 
 cui/source/inc/treeopt.hxx  |   49 ++
 cui/source/options/connpooloptions.cxx  |   16 
 cui/source/options/connpooloptions.hxx  |1 
 cui/source/options/dbregister.cxx   |7 
 cui/source/options/fontsubs.cxx |   16 
 cui/source/options/fontsubs.hxx |3 
 cui/source/options/optaccessibility.cxx |   17 
 cui/source/options/optaccessibility.hxx |3 
 cui/source/options/optasian.cxx |   20 
 cui/source/options/optbasic.cxx |   17 
 cui/source/options/optbasic.hxx |3 
 cui/source/options/optchart.cxx |   16 
 cui/source/options/optchart.hxx |3 
 cui/source/options/optcolor.cxx |   12 
 cui/source/options/optcolor.hxx |2 
 cui/source/options/optctl.cxx   |   21 
 cui/source/options/optctl.hxx   |3 
 cui/source/options/optdeepl.cxx |   13 
 cui/source/options/optdeepl.hxx |2 
 cui/source/options/optfltr.cxx  |   35 +
 cui/source/options/optfltr.hxx  |4 
 cui/source/options/optgdlg.cxx  |   61 ++
 cui/source/options/optgdlg.hxx  |6 
 cui/source/options/optgenrl.cxx |   17 
 cui/source/options/opthtml.cxx  |   18 
 cui/source/options/opthtml.hxx  |2 
 cui/source/options/optinet2.cxx |   52 ++
 cui/source/options/optinet2.hxx |8 
 cui/source/options/optjava.cxx  |   21 
 cui/source/options/optjava.hxx  |2 
 cui/source/options/optjsearch.cxx   |   33 +
 cui/source/options/optjsearch.hxx   |2 
 cui/source/options/optlanguagetool.cxx  |   20 
 cui/source/options/optlanguagetool.hxx  |2 
 cui/source/options/optlingu.cxx |   13 
 cui/source/options/optopencl.cxx|   13 
 cui/source/options/optopencl.hxx|1 
 cui/source/options/optpath.cxx  |6 
 cui/source/options/optsave.cxx  |   20 
 cui/source/options/optsave.hxx  |2 
 cui/source/options/optupdt.cxx  |   25 +
 cui/source/options/optupdt.hxx  |2 
 cui/source/options/personalization.cxx  |   13 
 cui/source/options/personalization.hxx  |2 
 cui/source/options/treeopt.cxx  |  721 ++--
 cui/source/options/treeopthelper.cxx|  184 
 cui/source/tabpages/tparea.cxx  |   12 
 cui/uiconfig/ui/optionsdialog.ui|   75 ++-
 include/sfx2/printopt.hxx   |3 
 include/sfx2/tabdlg.hxx |1 
 include/svx/optgrid.hxx |2 
 sc/source/ui/inc/opredlin.hxx   |2 
 sc/source/ui/inc/tpcalc.hxx |3 
 sc/source/ui/inc/tpcompatibility.hxx|2 
 sc/source/ui/inc/tpdefaults.hxx |2 
 sc/source/ui/inc/tpformula.hxx  |2 
 sc/source/ui/inc/tpprint.hxx|2 
 sc/source/ui/inc/tpusrlst.hxx   |3 
 sc/source/ui/inc/tpview.hxx |6 
 sc/source/ui/optdlg/opredlin.cxx|   11 
 sc/source/ui/optdlg/tpcalc.cxx  |   24 +
 sc/source/ui/optdlg/tpcompatibility.cxx |   13 
 sc/source/ui/optdlg/tpdefaults.cxx  |   13 
 sc/source/ui/optdlg/tpformula.cxx   |   28 +
 sc/source/ui/optdlg/tpprint.cxx |   16 
 sc/source/ui/optdlg/tpusrlst.cxx|   16 
 sc/source/ui/optdlg/tpview.cxx  |   43 +
 sd/source/ui/dlg/prntopts.cxx   |   24 +
 sd/source/ui/dlg/tpoption.cxx   |   37 +
 sd/source/ui/inc/prntopts.hxx   |2 
 sd/source/ui/inc/tpoption.hxx   |4 
 sfx2/source/dialog/printopt.cxx |   30 +
 sfx2/source/dialog/tabdlg.cxx   |   13 
 starmath/inc/dialog.hxx |2 
 starmath/source/dialog.cxx  |   22 
 svx/source/dialog/optgrid.cxx   |   20 
 sw/source/ui/config/mailconfigpage.cxx  |   22 
 sw/source/ui/config/optcomp.cxx |   13 
 sw/source/ui/config/optload.cxx |   38 +
 sw/source/ui/config/optpage.cxx |  163 +++
 sw/source/uibase/inc/mailconfigpage.hxx |2 
 sw/source/uibase/inc/optcomp.hxx|2 
 sw/source/uibase/inc/optload.hxx|4 
 sw/source/uibase/inc/optpage.hxx|   16 
 91 files changed, 2169 insertions(+), 47 deletions(-)

New commits:
commit a4633dadb4233ad5587bd238449671d610540c81
Author: Bayram Çiçek 
AuthorDate: Fri Jun 2 08:24:25 2023 +0300
Commit: Andreas Heinisch 
CommitDate: Tue Aug 29 18:01:40 2023 +0200

tdf#49895: Add search functionality to Options dialog

- Search field added.
- Dialog names of all treeview nodes with their parent names
  were included in searching.
- Strings of labels, 

[Libreoffice-commits] core.git: cui/Library_cui.mk cui/source

2021-07-16 Thread Deb Barkley-Yeung (via logerrit)
 cui/Library_cui.mk|1 
 cui/source/dialogs/FontFeaturesDialog.cxx |   13 +--
 cui/source/inc/FontFeatures.hxx   |   17 +++
 cui/source/inc/chardlg.hxx|4 +++
 cui/source/tabpages/chardlg.cxx   |   34 ++
 cui/source/util/FontFeatures.cxx  |   30 ++
 6 files changed, 88 insertions(+), 11 deletions(-)

New commits:
commit 44db9f08077f388306ef0bf7277c93a1e5cd89b8
Author: Deb Barkley-Yeung 
AuthorDate: Sun Jun 27 23:28:50 2021 -0700
Commit: Noel Grandin 
CommitDate: Fri Jul 16 09:02:28 2021 +0200

tdf#139654 Font feature sensativity

Disable font preview's "Features..." button if there are no features

Change-Id: Ibcf6b34abe55818a3b938a65f4fd720ed724c8ee
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118965
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/cui/Library_cui.mk b/cui/Library_cui.mk
index bc4f1e50c139..fb3546b4e9ad 100644
--- a/cui/Library_cui.mk
+++ b/cui/Library_cui.mk
@@ -230,6 +230,7 @@ $(eval $(call gb_Library_add_exception_objects,cui,\
 cui/source/tabpages/tpshadow \
 cui/source/tabpages/tptrans \
 cui/source/tabpages/transfrm \
+cui/source/util/FontFeatures \
 ))
 
 # vim: set noet sw=4 ts=4:
diff --git a/cui/source/dialogs/FontFeaturesDialog.cxx 
b/cui/source/dialogs/FontFeaturesDialog.cxx
index aaa9eb86136a..4735de194255 100644
--- a/cui/source/dialogs/FontFeaturesDialog.cxx
+++ b/cui/source/dialogs/FontFeaturesDialog.cxx
@@ -11,7 +11,7 @@
 #include 
 #include 
 #include 
-#include 
+#include 
 #include 
 #include 
 
@@ -51,16 +51,7 @@ void FontFeaturesDialog::initialize()
 {
 ScopedVclPtrInstance aVDev(*Application::GetDefaultDevice(),
   DeviceFormat::DEFAULT, 
DeviceFormat::DEFAULT);
-aVDev->SetOutputSizePixel(Size(10, 10));
-
-vcl::Font aFont = aVDev->GetFont();
-aFont.SetFamilyName(m_sFontName);
-aVDev->SetFont(aFont);
-
-std::vector rFontFeatures;
-
-if (!aVDev->GetFontFeatures(rFontFeatures))
-return;
+std::vector rFontFeatures = 
getFontFeatureList(m_sFontName, *aVDev);
 
 std::unordered_set aDoneFeatures;
 std::vector rFilteredFontFeatures;
diff --git a/cui/source/inc/FontFeatures.hxx b/cui/source/inc/FontFeatures.hxx
new file mode 100755
index ..f16c11628143
--- /dev/null
+++ b/cui/source/inc/FontFeatures.hxx
@@ -0,0 +1,17 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ */
+#pragma once
+
+#include 
+#include 
+#include 
+
+std::vector getFontFeatureList(OUString const& rFontName, 
VirtualDevice& rVDev);
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
\ No newline at end of file
diff --git a/cui/source/inc/chardlg.hxx b/cui/source/inc/chardlg.hxx
index 281a86b4d826..be4db989b57d 100644
--- a/cui/source/inc/chardlg.hxx
+++ b/cui/source/inc/chardlg.hxx
@@ -101,11 +101,15 @@ private:
 std::unique_ptr m_xCTLFontTypeFT;
 std::unique_ptr m_xCTLFontFeaturesButton;
 
+//for getting FontFeatures
+ScopedVclPtrInstance m_xVDev;
+
 voidInitialize();
 const FontList* GetFontList() const;
 voidUpdatePreview_Impl();
 voidFillStyleBox_Impl(const weld::Widget& rBox);
 voidFillSizeBox_Impl(const weld::Widget& rBox);
+voidEnableFeatureButton(const weld::Widget& rNameBox);
 
 enum LanguageGroup
 {
diff --git a/cui/source/tabpages/chardlg.cxx b/cui/source/tabpages/chardlg.cxx
index 0bb9460745dd..a829ace12795 100644
--- a/cui/source/tabpages/chardlg.cxx
+++ b/cui/source/tabpages/chardlg.cxx
@@ -56,6 +56,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -209,6 +210,7 @@ SvxCharNamePage::SvxCharNamePage(weld::Container* pPage, 
weld::DialogController*
 , m_xCTLFontLanguageLB(new 
SvxLanguageBox(m_xBuilder->weld_combo_box("ctllanglb")))
 , m_xCTLFontTypeFT(m_xBuilder->weld_label("ctlfontinfo"))
 , m_xCTLFontFeaturesButton(m_xBuilder->weld_button("ctl_features_button"))
+, m_xVDev(*Application::GetDefaultDevice(), DeviceFormat::DEFAULT, 
DeviceFormat::DEFAULT)
 {
 m_xPreviewWin.reset(new weld::CustomWeld(*m_xBuilder, "preview", 
m_aPreviewWin));
 #ifdef IOS
@@ -478,6 +480,35 @@ void SvxCharNamePage::UpdatePreview_Impl()
 
 m_aPreviewWin.Invalidate();
 }
+void SvxCharNamePage::EnableFeatureButton(const weld::Widget& rNameBox)
+{
+OUString sFontName;
+weld::Button* pButton= nullptr;
+if (m_xWestFontNameLB.get() == )
+{
+sFontName = m_xWestFontNameLB->get_active_text();
+

[Libreoffice-commits] core.git: cui/Library_cui.mk cui/source cui/uiconfig cui/UIConfig_cui.mk include/vcl vcl/backendtest

2021-07-09 Thread homeboy445 (via logerrit)
 cui/Library_cui.mk|1 
 cui/UIConfig_cui.mk   |2 
 cui/source/dialogs/GraphicTestsDialog.cxx |   78 +++--
 cui/source/dialogs/ImageViewerDialog.cxx  |   24 +
 cui/source/inc/GraphicsTestsDialog.hxx|   34 ++
 cui/source/inc/ImageViewerDialog.hxx  |   20 +
 cui/uiconfig/ui/graphictestdlg.ui |  101 +-
 cui/uiconfig/ui/graphictestentry.ui   |   43 ++
 cui/uiconfig/ui/imageviewer.ui|   44 ++
 include/vcl/test/GraphicsRenderTests.hxx  |   39 +-
 vcl/backendtest/GraphicsRenderTests.cxx   |  455 --
 11 files changed, 625 insertions(+), 216 deletions(-)

New commits:
commit 3057ee8ba01535324f57978569526988664eb53a
Author: homeboy445 
AuthorDate: Tue Jun 22 16:54:34 2021 +0530
Commit: Tomaž Vajngerl 
CommitDate: Sat Jul 10 00:34:38 2021 +0200

Added support for viewing results in the VCL tests UI box

The user can now easily view the result of any VCL test
by just clicking on it - which would show them the resultant
bitmap of that corresponding test.

Change-Id: I57c0c2ab3662a9abec45ba7fc230c9299dcd9279
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117657
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl 

diff --git a/cui/Library_cui.mk b/cui/Library_cui.mk
index 345f84b7f008..bc4f1e50c139 100644
--- a/cui/Library_cui.mk
+++ b/cui/Library_cui.mk
@@ -139,6 +139,7 @@ $(eval $(call gb_Library_add_exception_objects,cui,\
 cui/source/dialogs/postdlg \
 cui/source/dialogs/QrCodeGenDialog \
 cui/source/dialogs/GraphicTestsDialog \
+cui/source/dialogs/ImageViewerDialog \
 cui/source/dialogs/scriptdlg \
 cui/source/dialogs/SignatureLineDialogBase \
 cui/source/dialogs/SignatureLineDialog \
diff --git a/cui/UIConfig_cui.mk b/cui/UIConfig_cui.mk
index 73da8e159f09..3af5d8e698e7 100644
--- a/cui/UIConfig_cui.mk
+++ b/cui/UIConfig_cui.mk
@@ -83,6 +83,8 @@ $(eval $(call gb_UIConfig_add_uifiles,cui,\
cui/uiconfig/ui/gallerytitledialog \
cui/uiconfig/ui/galleryupdateprogress \
cui/uiconfig/ui/graphictestdlg \
+   cui/uiconfig/ui/graphictestentry \
+   cui/uiconfig/ui/imageviewer \
cui/uiconfig/ui/hangulhanjaadddialog \
cui/uiconfig/ui/hangulhanjaeditdictdialog \
cui/uiconfig/ui/hangulhanjaconversiondialog \
diff --git a/cui/source/dialogs/GraphicTestsDialog.cxx 
b/cui/source/dialogs/GraphicTestsDialog.cxx
index 275d33d75886..000129444cd5 100644
--- a/cui/source/dialogs/GraphicTestsDialog.cxx
+++ b/cui/source/dialogs/GraphicTestsDialog.cxx
@@ -8,48 +8,70 @@
  */
 
 #include 
+#include 
+
+GraphicTestEntry::GraphicTestEntry(weld::Container* pParent, weld::Dialog* 
pDialog,
+   OUString aTestName, OUString aTestStatus, 
Bitmap aTestBitmap)
+: m_xBuilder(Application::CreateBuilder(pParent, 
"cui/ui/graphictestentry.ui"))
+, m_xContainer(m_xBuilder->weld_container("gptestbox"))
+, m_xTestLabel(m_xBuilder->weld_label("gptestlabel"))
+, m_xTestButton(m_xBuilder->weld_button("gptestbutton"))
+, m_xResultBitmap(aTestBitmap)
+{
+m_xParentDialog = pDialog;
+m_xTestLabel->set_label(aTestName);
+m_xTestButton->set_label(aTestStatus);
+m_xTestButton->set_tooltip_text(aTestName);
+m_xTestButton->set_background(
+aTestStatus == "PASSED"
+? COL_LIGHTGREEN
+: aTestStatus == "QUIRKY" ? COL_YELLOW
+  : aTestStatus == "FAILED" ? COL_LIGHTRED 
: COL_LIGHTGRAY);
+m_xTestButton->connect_clicked(LINK(this, GraphicTestEntry, 
HandleResultViewRequest));
+m_xContainer->show();
+}
+
+IMPL_LINK(GraphicTestEntry, HandleResultViewRequest, weld::Button&, rButton, 
void)
+{
+if (rButton.get_label() == "SKIPPED")
+{
+return;
+}
+ImageViewerDialog m_ImgVwDialog(m_xParentDialog, BitmapEx(m_xResultBitmap),
+rButton.get_tooltip_text());
+m_ImgVwDialog.run();
+}
 
 GraphicsTestsDialog::GraphicsTestsDialog(weld::Window* pParent)
 : GenericDialogController(pParent, "cui/ui/graphictestdlg.ui", 
"GraphicTestsDialog")
-, m_xResultLog(m_xBuilder->weld_text_view("gptestresults"))
+, m_xResultLog(m_xBuilder->weld_text_view("gptest_txtVW"))
 , m_xDownloadResults(m_xBuilder->weld_button("gptest_downld"))
+, m_xContainerBox(m_xBuilder->weld_box("gptest_box"))
 {
-m_xResultLog->set_text("Running tests...");
 m_xDownloadResults->connect_clicked(LINK(this, GraphicsTestsDialog, 
HandleDownloadRequest));
-runGraphicsTestandUpdateLog();
 }
 
-void GraphicsTestsDialog::runGraphicsTestandUpdateLog()
+short GraphicsTestsDialog::run()
 {
-GraphicsRenderTests TestObject;
-TestObject.run();
-OUString atemp = "--General Info--\nGraphics Backend used : " + 
TestObject.m_aCurGraphicsBackend
- + "\nPassed Tests : " + 
OUString::number(TestObject.m_aPassed.size())
-  

[Libreoffice-commits] core.git: cui/Library_cui.mk cui/source cui/uiconfig cui/UIConfig_cui.mk include/sfx2 include/vcl sfx2/sdi sfx2/source

2021-06-28 Thread homeboy445 (via logerrit)
 cui/Library_cui.mk|1 
 cui/UIConfig_cui.mk   |1 
 cui/source/dialogs/GraphicTestsDialog.cxx |   55 +++
 cui/source/factory/dlgfact.cxx|8 +
 cui/source/factory/dlgfact.hxx|3 
 cui/source/inc/GraphicsTestsDialog.hxx|   24 
 cui/source/options/optgdlg.cxx|8 +
 cui/source/options/optgdlg.hxx|2 
 cui/uiconfig/ui/graphictestdlg.ui |  113 +++
 cui/uiconfig/ui/optviewpage.ui|  146 --
 include/sfx2/sfxdlg.hxx   |2 
 include/sfx2/sfxsids.hrc  |1 
 include/vcl/test/GraphicsRenderTests.hxx  |2 
 sfx2/sdi/appslots.sdi |4 
 sfx2/sdi/sfx.sdi  |   16 +++
 sfx2/source/appl/appserv.cxx  |9 +
 16 files changed, 289 insertions(+), 106 deletions(-)

New commits:
commit df3ed584b025b8a87a8a3042a04ac8c12ebe4f26
Author: homeboy445 
AuthorDate: Thu Jun 17 17:42:41 2021 +0530
Commit: Tomaž Vajngerl 
CommitDate: Tue Jun 29 06:14:59 2021 +0200

Added a UI dialog box for running the VCL backend tests

The UI dialog box will allow the user to run the VCL graphics tests
and will allow them to view the results as well.

Change-Id: Ice289444ff425496a3e400a4c2bc06c307168c62
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117384
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl 

diff --git a/cui/Library_cui.mk b/cui/Library_cui.mk
index 6fdf446f97e9..345f84b7f008 100644
--- a/cui/Library_cui.mk
+++ b/cui/Library_cui.mk
@@ -138,6 +138,7 @@ $(eval $(call gb_Library_add_exception_objects,cui,\
 cui/source/dialogs/pastedlg \
 cui/source/dialogs/postdlg \
 cui/source/dialogs/QrCodeGenDialog \
+cui/source/dialogs/GraphicTestsDialog \
 cui/source/dialogs/scriptdlg \
 cui/source/dialogs/SignatureLineDialogBase \
 cui/source/dialogs/SignatureLineDialog \
diff --git a/cui/UIConfig_cui.mk b/cui/UIConfig_cui.mk
index c6d9d1584a66..73da8e159f09 100644
--- a/cui/UIConfig_cui.mk
+++ b/cui/UIConfig_cui.mk
@@ -82,6 +82,7 @@ $(eval $(call gb_UIConfig_add_uifiles,cui,\
cui/uiconfig/ui/gallerythemeiddialog \
cui/uiconfig/ui/gallerytitledialog \
cui/uiconfig/ui/galleryupdateprogress \
+   cui/uiconfig/ui/graphictestdlg \
cui/uiconfig/ui/hangulhanjaadddialog \
cui/uiconfig/ui/hangulhanjaeditdictdialog \
cui/uiconfig/ui/hangulhanjaconversiondialog \
diff --git a/cui/source/dialogs/GraphicTestsDialog.cxx 
b/cui/source/dialogs/GraphicTestsDialog.cxx
new file mode 100644
index ..275d33d75886
--- /dev/null
+++ b/cui/source/dialogs/GraphicTestsDialog.cxx
@@ -0,0 +1,55 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; 
fill-column: 100 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#include 
+
+GraphicsTestsDialog::GraphicsTestsDialog(weld::Window* pParent)
+: GenericDialogController(pParent, "cui/ui/graphictestdlg.ui", 
"GraphicTestsDialog")
+, m_xResultLog(m_xBuilder->weld_text_view("gptestresults"))
+, m_xDownloadResults(m_xBuilder->weld_button("gptest_downld"))
+{
+m_xResultLog->set_text("Running tests...");
+m_xDownloadResults->connect_clicked(LINK(this, GraphicsTestsDialog, 
HandleDownloadRequest));
+runGraphicsTestandUpdateLog();
+}
+
+void GraphicsTestsDialog::runGraphicsTestandUpdateLog()
+{
+GraphicsRenderTests TestObject;
+TestObject.run();
+OUString atemp = "--General Info--\nGraphics Backend used : " + 
TestObject.m_aCurGraphicsBackend
+ + "\nPassed Tests : " + 
OUString::number(TestObject.m_aPassed.size())
+ + "\nQuirky Tests : " + 
OUString::number(TestObject.m_aQuirky.size())
+ + "\nFailed Tests : " + 
OUString::number(TestObject.m_aFailed.size())
+ + "\nSkipped Tests : " + 
OUString::number(TestObject.m_aSkipped.size())
+ + "\n\n--Test Details--\n";
+OString writeResults;
+for (const class OString& tests : TestObject.m_aPassed)
+{
+writeResults += tests + " [PASSED]\n";
+}
+for (const class OString& tests : TestObject.m_aQuirky)
+{
+writeResults += tests + " [QUIRKY]\n";
+}
+for (const class OString& tests : TestObject.m_aFailed)
+{
+writeResults += tests + " [FAILED]\n";
+}
+for (const class OString& tests : TestObject.m_aSkipped)
+{
+writeResults += tests + " [SKIPPED]\n";
+}
+m_xResultLog->set_text(atemp + OStringToOUString(writeResults, 
RTL_TEXTENCODING_UTF8));
+}
+
+IMPL_STATIC_LINK_NOARG(GraphicsTestsDialog, HandleDownloadRequest, 

[Libreoffice-commits] core.git: cui/Library_cui.mk cui/source cui/uiconfig cui/UIConfig_cui.mk editeng/source include/editeng include/svx sd/qa svx/source uitest/uitest

2021-06-08 Thread Mike Kaganski (via logerrit)
 cui/Library_cui.mk  |1 
 cui/UIConfig_cui.mk |1 
 cui/source/factory/dlgfact.cxx  |5 
 cui/source/inc/TextColumnsPage.hxx  |   40 +++
 cui/source/tabpages/TextColumnsPage.cxx |   82 ++
 cui/source/tabpages/textanim.cxx|2 
 cui/uiconfig/ui/textcolumnstabpage.ui   |  111 
 cui/uiconfig/ui/textdialog.ui   |   48 
 editeng/source/editeng/editeng.cxx  |5 
 editeng/source/editeng/impedit.hxx  |5 
 editeng/source/editeng/impedit3.cxx |   14 ++
 editeng/source/outliner/outlin2.cxx |5 
 include/editeng/editeng.hxx |2 
 include/editeng/outliner.hxx|2 
 include/svx/dialogs.hrc |1 
 include/svx/strings.hrc |2 
 include/svx/svddef.hxx  |8 +
 include/svx/svdotext.hxx|3 
 sd/qa/uitest/impress_tests/textColumnsDialog.py |   53 +
 sd/qa/unit/misc-tests.cxx   |   49 
 svx/source/sdr/properties/attributeproperties.cxx   |3 
 svx/source/sdr/properties/captionproperties.cxx |1 
 svx/source/sdr/properties/circleproperties.cxx  |1 
 svx/source/sdr/properties/connectorproperties.cxx   |1 
 svx/source/sdr/properties/customshapeproperties.cxx |2 
 svx/source/sdr/properties/graphicproperties.cxx |2 
 svx/source/sdr/properties/measureproperties.cxx |1 
 svx/source/sdr/properties/textproperties.cxx|7 +
 svx/source/svdraw/svdattr.cxx   |9 +
 svx/source/svdraw/svdotext.cxx  |   10 +
 svx/source/svdraw/svdotxed.cxx  |1 
 svx/source/svdraw/svdoutl.cxx   |1 
 uitest/uitest/uihelper/guarded.py   |   14 ++
 33 files changed, 486 insertions(+), 6 deletions(-)

New commits:
commit c4f615b359be56e88e4fbf9aaaf30affb29d57e2
Author: Mike Kaganski 
AuthorDate: Sun May 23 15:40:08 2021 +0300
Commit: Mike Kaganski 
CommitDate: Tue Jun 8 14:50:33 2021 +0200

editengine-columns: Create document model and dialog page

Change-Id: I056aad9474ca18134d1f1686a53618cc9ab3d525
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116038
Tested-by: Jenkins
Reviewed-by: Mike Kaganski 

diff --git a/cui/Library_cui.mk b/cui/Library_cui.mk
index d6fa68e0d194..6fdf446f97e9 100644
--- a/cui/Library_cui.mk
+++ b/cui/Library_cui.mk
@@ -215,6 +215,7 @@ $(eval $(call gb_Library_add_exception_objects,cui,\
 cui/source/tabpages/tabstpge \
 cui/source/tabpages/textanim \
 cui/source/tabpages/textattr \
+cui/source/tabpages/TextColumnsPage \
 cui/source/tabpages/tparea \
 cui/source/tabpages/tpbitmap \
 cui/source/tabpages/tpcolor \
diff --git a/cui/UIConfig_cui.mk b/cui/UIConfig_cui.mk
index ff3c718b21d6..c6d9d1584a66 100644
--- a/cui/UIConfig_cui.mk
+++ b/cui/UIConfig_cui.mk
@@ -206,6 +206,7 @@ $(eval $(call gb_UIConfig_add_uifiles,cui,\
cui/uiconfig/ui/swpossizepage \
cui/uiconfig/ui/textattrtabpage \
cui/uiconfig/ui/textanimtabpage \
+   cui/uiconfig/ui/textcolumnstabpage \
cui/uiconfig/ui/textdialog \
cui/uiconfig/ui/textflowpage \
cui/uiconfig/ui/thesaurus \
diff --git a/cui/source/factory/dlgfact.cxx b/cui/source/factory/dlgfact.cxx
index ebfd9bfb0ea5..19b30518e426 100644
--- a/cui/source/factory/dlgfact.cxx
+++ b/cui/source/factory/dlgfact.cxx
@@ -91,6 +91,7 @@
 #include 
 #include 
 #include 
+#include 
 
 using namespace ::com::sun::star;
 using namespace ::com::sun::star::frame;
@@ -1499,6 +1500,8 @@ CreateTabPage 
AbstractDialogFactory_Impl::GetTabPageCreatorFunc( sal_uInt16 nId
 return SvxGrfCropPage::Create;
 case RID_SVXPAGE_MACROASSIGN :
 return SfxMacroTabPage::Create;
+case RID_SVXPAGE_TEXTCOLUMNS:
+return SvxTextColumnsPage::Create;
 default:
 break;
 }
@@ -1562,6 +1565,8 @@ GetTabPageRanges 
AbstractDialogFactory_Impl::GetTabPageRangesFunc( sal_uInt16 nI
 return SvxPageDescPage::GetRanges;
 case RID_SVXPAGE_ASIAN_LAYOUT:
 return SvxAsianLayoutPage::GetRanges;
+case RID_SVXPAGE_TEXTCOLUMNS:
+return SvxTextColumnsPage::GetRanges;
 default:
 break;
 }
diff --git a/cui/source/inc/TextColumnsPage.hxx 
b/cui/source/inc/TextColumnsPage.hxx
new file mode 100644
index ..6153cd27a520
--- /dev/null
+++ b/cui/source/inc/TextColumnsPage.hxx
@@ -0,0 +1,40 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; 
fill-column: 100 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * 

[Libreoffice-commits] core.git: cui/Library_cui.mk cui/source cui/uiconfig cui/UIConfig_cui.mk desktop/source include/vcl officecfg/registry solenv/sanitizers vcl/inc vcl/Library_vcl.mk vcl/win

2021-03-31 Thread Matt K (via logerrit)
 cui/Library_cui.mk |5 
 cui/UIConfig_cui.mk|6 
 cui/source/dialogs/fileextcheckdlg.cxx |   55 +++
 cui/source/factory/dlgfact.cxx |   11 
 cui/source/factory/dlgfact.hxx |6 
 cui/source/inc/fileextcheckdlg.hxx |   39 ++
 cui/source/options/optgdlg.cxx |   43 +-
 cui/source/options/optgdlg.hxx |1 
 cui/uiconfig/ui/fileextcheckdialog.ui  |  109 +++
 cui/uiconfig/ui/optgeneralpage.ui  |   15 
 desktop/source/app/app.cxx |   10 
 include/vcl/abstdlg.hxx|6 
 include/vcl/fileregistration.hxx   |   21 +
 officecfg/registry/data/org/openoffice/Office/Common.xcu   |3 
 officecfg/registry/schema/org/openoffice/Office/Common.xcs |7 
 solenv/sanitizers/ui/cui.suppr |1 
 vcl/Library_vcl.mk |1 
 vcl/inc/strings.hrc|3 
 vcl/win/app/fileregistration.cxx   |  198 +
 19 files changed, 514 insertions(+), 26 deletions(-)

New commits:
commit 6a6cd129f34220fadf5d134a2dc2c1e368acbc4f
Author: Matt K 
AuthorDate: Thu Mar 25 00:40:33 2021 -0500
Commit: Mike Kaganski 
CommitDate: Thu Apr 1 06:30:36 2021 +0200

tdf#45735 New UI dialog at app startup to check default file formats

On Windows only, and only on a non-admin installation, check on application
startup whether the file formats ".ods", ".odt", and ".odp" are registered
to be opened by LibreOffice by default.  If any of the formats are not
default, show a UI dialog informing the user which formats are not default
and ask the user to set the defaults.  If the user selects "OK" to set
defaults then the Windows UI corresponding to the user's Windows version is
opened for selecting defaults per program.  There is also a checkbox on the
dialog to select whether checking is performed on application startup.

Also, in Tools -> Options -> General, add a UI checkbox for performing this
check on application startup, and refactor the existing button "Windows
Default apps" to use the same Windows UI Launch APIs.

Change-Id: I5e7258d111ff7da8f68805e60405aec064ddcf7c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112370
Tested-by: Jenkins
Reviewed-by: Mike Kaganski 

diff --git a/cui/Library_cui.mk b/cui/Library_cui.mk
index f2df06cc5f2c..d6fa68e0d194 100644
--- a/cui/Library_cui.mk
+++ b/cui/Library_cui.mk
@@ -85,7 +85,10 @@ ifeq ($(OS),WNT)
 $(eval $(call gb_Library_use_system_win32_libs,cui,\
 advapi32 \
 shlwapi \
-ole32 \
+))
+
+$(eval $(call gb_Library_add_exception_objects,cui,\
+cui/source/dialogs/fileextcheckdlg \
 ))
 endif
 
diff --git a/cui/UIConfig_cui.mk b/cui/UIConfig_cui.mk
index 153d6fe98fda..ff3c718b21d6 100644
--- a/cui/UIConfig_cui.mk
+++ b/cui/UIConfig_cui.mk
@@ -9,6 +9,12 @@
 
 $(eval $(call gb_UIConfig_UIConfig,cui))
 
+ifeq ($(OS),WNT)
+$(eval $(call gb_UIConfig_add_uifiles,cui,\
+   cui/uiconfig/ui/fileextcheckdialog \
+))
+endif
+
 $(eval $(call gb_UIConfig_add_uifiles,cui,\
cui/uiconfig/ui/aboutdialog \
cui/uiconfig/ui/aboutconfigdialog\
diff --git a/cui/source/dialogs/fileextcheckdlg.cxx 
b/cui/source/dialogs/fileextcheckdlg.cxx
new file mode 100644
index ..732f8367436a
--- /dev/null
+++ b/cui/source/dialogs/fileextcheckdlg.cxx
@@ -0,0 +1,55 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; 
fill-column: 100 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ *   Licensed to the Apache Software Foundation (ASF) under one or more
+ *   contributor license agreements. See the NOTICE file distributed
+ *   with this work for additional information regarding copyright
+ *   ownership. The ASF licenses this file to you under the Apache
+ *   License, Version 2.0 (the "License"); you may not use this file
+ *   except in compliance with the License. You may obtain a copy of
+ *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#include 
+
+#include 
+#include 
+
+#include 
+
+FileExtCheckDialog::FileExtCheckDialog(weld::Window* pParent, const OUString& 
sTitle,
+   const OUString& sMsg)
+: GenericDialogController(pParent, "cui/ui/fileextcheckdialog.ui", 
"FileExtCheckDialog")
+, 

[Libreoffice-commits] core.git: cui/Library_cui.mk cui/source

2021-03-20 Thread homeboy445 (via logerrit)
 cui/Library_cui.mk |2 
 cui/source/dialogs/QrCodeGenDialog.cxx |   98 ++---
 cui/source/inc/QrCodeGenDialog.hxx |4 -
 3 files changed, 71 insertions(+), 33 deletions(-)

New commits:
commit cdeb5046be7f6259bd60f0951c51559edcab91c5
Author: homeboy445 
AuthorDate: Mon Mar 15 21:11:08 2021 +0530
Commit: Mike Kaganski 
CommitDate: Sat Mar 20 21:35:48 2021 +0100

tdf#139778 Switch to ZXing for generating QR code

Change-Id: Ief944266d5183bb862afe99ec6b0bdaca4956938
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112534
Tested-by: Jenkins
Tested-by: René Engelhard 
Reviewed-by: Mike Kaganski 

diff --git a/cui/Library_cui.mk b/cui/Library_cui.mk
index ff221a9cc55a..f2df06cc5f2c 100644
--- a/cui/Library_cui.mk
+++ b/cui/Library_cui.mk
@@ -73,7 +73,7 @@ $(eval $(call gb_Library_use_externals,cui,\
 libxml2 \
 orcus-parser \
 orcus \
-qrcodegen \
+zxing \
 ))
 ifeq ($(DISABLE_GUI),)
 $(eval $(call gb_Library_use_externals,cui,\
diff --git a/cui/source/dialogs/QrCodeGenDialog.cxx 
b/cui/source/dialogs/QrCodeGenDialog.cxx
index 3de87abae22b..3a82a115551d 100644
--- a/cui/source/dialogs/QrCodeGenDialog.cxx
+++ b/cui/source/dialogs/QrCodeGenDialog.cxx
@@ -17,14 +17,26 @@
 #include 
 #include 
 
-#if ENABLE_QRCODEGEN
-#if defined(SYSTEM_QRCODEGEN)
-#include 
-#else
-#include 
+#if ENABLE_ZXING
+#include 
+
+#ifdef __GNUC__
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wshadow"
 #endif
+
+#include 
+#include 
+#include 
+#include 
+#include 
+
+#ifdef __GNUC__
+#pragma GCC diagnostic pop
 #endif
 
+#endif // ENABLE_ZXING
+
 #include 
 #include 
 #include 
@@ -56,9 +68,37 @@ using namespace css::sheet;
 using namespace css::text;
 using namespace css::drawing;
 using namespace css::graphic;
-#if ENABLE_QRCODEGEN
-using namespace qrcodegen;
+namespace
+{
+#if ENABLE_ZXING
+// Implementation adapted from the answer: 
https://stackoverflow.com/questions/10789059/create-qr-code-in-vector-image/60638350#60638350
+OUString ConvertToSVGFormat(const ZXing::BitMatrix& bitmatrix)
+{
+OUStringBuffer sb;
+const int width = bitmatrix.width();
+const int height = bitmatrix.height();
+ZXing::BitArray row(width);
+sb.append("\n"
+  "http://www.w3.org/2000/svg\; version=\"1.1\" 
viewBox=\"0 0 "
+  + OUString::number(width) + " " + OUString::number(height)
+  + "\" stroke=\"none\">\n"
+"\n");
+return sb.toString();
+}
 #endif
+}
 
 QrCodeGenDialog::QrCodeGenDialog(weld::Widget* pParent, Reference 
xModel,
  bool bEditExisting)
@@ -70,7 +110,7 @@ QrCodeGenDialog::QrCodeGenDialog(weld::Widget* pParent, 
Reference xModel
   m_xBuilder->weld_radio_button("button_quartile"),
   m_xBuilder->weld_radio_button("button_high") }
 , m_xSpinBorder(m_xBuilder->weld_spin_button("edit_border"))
-#if ENABLE_QRCODEGEN
+#if ENABLE_ZXING
 , mpParent(pParent)
 #endif
 {
@@ -108,7 +148,7 @@ QrCodeGenDialog::QrCodeGenDialog(weld::Widget* pParent, 
Reference xModel
 
 short QrCodeGenDialog::run()
 {
-#if ENABLE_QRCODEGEN
+#if ENABLE_ZXING
 short nRet;
 while (true)
 {
@@ -120,7 +160,7 @@ short QrCodeGenDialog::run()
 Apply();
 break;
 }
-catch (const qrcodegen::data_too_long&)
+catch (const std::exception&)
 {
 std::unique_ptr 
xBox(Application::CreateMessageDialog(
 mpParent, VclMessageType::Warning, VclButtonsType::Ok,
@@ -139,7 +179,7 @@ short QrCodeGenDialog::run()
 
 void QrCodeGenDialog::Apply()
 {
-#if ENABLE_QRCODEGEN
+#if ENABLE_ZXING
 css::drawing::QRCode aQRCode;
 aQRCode.Payload = m_xEdittext->get_text();
 
@@ -264,43 +304,41 @@ void QrCodeGenDialog::Apply()
 
 OUString QrCodeGenDialog::GenerateQRCode(OUString aQRText, tools::Long aQRECC, 
int aQRBorder)
 {
-#if ENABLE_QRCODEGEN
-//Select ECC:: value from aQrECC
-qrcodegen::QrCode::Ecc bqrEcc = qrcodegen::QrCode::Ecc::LOW;
+#if ENABLE_ZXING
+// Associated ZXing error correction levels (0-8) to our constants 
arbitrarily.
+int bqrEcc = 1;
 
 switch (aQRECC)
 {
-case 1:
+case css::drawing::QRCodeErrorCorrection::LOW:
 {
-bqrEcc = qrcodegen::QrCode::Ecc::LOW;
+bqrEcc = 1;
 break;
 }
-case 2:
+case css::drawing::QRCodeErrorCorrection::MEDIUM:
 {
-bqrEcc = qrcodegen::QrCode::Ecc::MEDIUM;
+bqrEcc = 3;
 break;
 }
-case 3:
+case css::drawing::QRCodeErrorCorrection::QUARTILE:
 {
-bqrEcc = qrcodegen::QrCode::Ecc::QUARTILE;
+bqrEcc = 5;
 break;
 }
-case 4:
+case css::drawing::QRCodeErrorCorrection::HIGH:
 {
-bqrEcc = 

[Libreoffice-commits] core.git: cui/Library_cui.mk cui/source include/unotools unotools/source vcl/source

2020-10-28 Thread Stephan Bergmann (via logerrit)
 cui/Library_cui.mk|2 
 cui/source/dialogs/AdditionsDialog.cxx|  130 --
 cui/source/inc/AdditionsDialog.hxx|4 
 include/unotools/ucbstreamhelper.hxx  |2 
 unotools/source/ucbhelper/ucbstreamhelper.cxx |5 +
 vcl/source/graphic/GraphicLoader.cxx  |1 
 6 files changed, 53 insertions(+), 91 deletions(-)

New commits:
commit db6c7a486395304f38e9ea52951f576f34749cbc
Author: Stephan Bergmann 
AuthorDate: Wed Oct 28 13:25:25 2020 +0100
Commit: Stephan Bergmann 
CommitDate: Wed Oct 28 19:15:28 2020 +0100

Use UCB instead of cURL to download https files

Since 7dc6fc32eb618da6defb8a9f330978fa019677b8 "uitest: Check the more icons
dialog opens" started to test the AdditionsDialog code, some ASan builds 
started
to report use-after-poison from within SearchAndParseThread::execute ->
curlGet -> curl_easy_perform -> ... -> https_connecting -> ... ->
secmod_ModuleInit -> pemC_Initialize -> ..., see the comments starting at
 "tdf#133026: Tight
integration of extensions - Adding thread structure".

The exact cause for that ASan use-after-poison is not quite clear to me.  
First,
I thought it was due to liberal use of curl_easy_init (without a central
curl_global_init) in a multi-threaded process; see
 for this being 
considered
"lethal".  But then, another issue could be that most of the nss libraries 
like
instdir/program/libnss3.so (implementing the "... -> secmod_ModuleInit" 
part)
come from LO's bundled --without-system-nss while /lib64/libnsspem.so
(implementing the "pemC_Initialize -> ..." part) comes from the system, and
there could be some mismatch when mixing these (esp. if the former are built
with ASan).

So whatever the actual cause, the right fix should be to use LO's UCB 
instead of
directly calling into cURL anyway.

That required a version of utl::UcbStreamHelper::CreateStream that uses a 
given
XInteractionHandler (which may be null to indicate no interaction handling,
instead reporting all interaction requests as exceptions) instead of 
internally
creating an XInteractionHandler using the GUI, and which would cause 
deadlock
in 7dc6fc32eb618da6defb8a9f330978fa019677b8's UITest_sw_options.  (And
introducing that additional utl::UcbStreamHelper::CreateStream overload 
required
css::awt::XWindow to be a complete type now in
vcl/source/graphic/GraphicLoader.cxx, for

> include/com/sun/star/uno/Reference.h:277:18: note: in instantiation of 
variable template specialization 
'std::is_base_of_v' requested here
> std::is_base_of_v
>  ^

)

(The removed code in cui/source/dialogs/AdditionsDialog.cxx should have 
been the
last remaining use of curl in Library_cui.  Apparently,
e1e9e2aa16f08a8fd9e38db706d63e8eceeda8d1 "Kill Mozilla personas" had 
forgotten
to remove it from cui/Library_cui.mk the last time Library_cui had become
curl-free, before the introduction of the AdditionsDialog code.)

(I did not remove the #undef ABSOLUTE FIXME from
cui/source/dialogs/AdditionsDialog.cxx.
c4bee547b02fbe3d07b1e9ee203c73e48f86e6bf "tdf#133026: Additions: Better 
Search
Function" does not tell whether it had been added to mitigate a macro 
definition
from the (now removed) #include .)

Change-Id: I1fec7488d36df81c3543d12d97da1291f77712fc
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104938
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 

diff --git a/cui/Library_cui.mk b/cui/Library_cui.mk
index 1d1f0feb9ea8..ff221a9cc55a 100644
--- a/cui/Library_cui.mk
+++ b/cui/Library_cui.mk
@@ -68,8 +68,6 @@ $(eval $(call gb_Library_use_externals,cui,\
boost_headers \
$(call gb_Helper_optional,OPENCL,\
clew) \
-$(call gb_Helper_optional,DESKTOP,\
-   curl) \
 icuuc \
 icu_headers \
 libxml2 \
diff --git a/cui/source/dialogs/AdditionsDialog.cxx 
b/cui/source/dialogs/AdditionsDialog.cxx
index dd994839681a..39f841d03996 100644
--- a/cui/source/dialogs/AdditionsDialog.cxx
+++ b/cui/source/dialogs/AdditionsDialog.cxx
@@ -15,6 +15,7 @@
 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -30,7 +31,7 @@
 #include 
 #include 
 #include 
-
+#include 
 #include 
 
 #include 
@@ -40,8 +41,6 @@
 
 #include 
 
-//cURL
-#include 
 #include 
 #include 
 #include 
@@ -70,97 +69,54 @@ using namespace ::com::sun::star::uno;
 using namespace ::com::sun::star::ucb;
 using namespace ::com::sun::star::beans;
 
-#ifdef UNX
-const char kUserAgent[] = "LibreOffice AdditionsDownloader/1.0 (Linux)";
-#else
-const char kUserAgent[] = "LibreOffice AdditionsDownloader/1.0 

[Libreoffice-commits] core.git: cui/Library_cui.mk cui/source

2020-06-28 Thread Tor Lillqvist (via logerrit)
 cui/Library_cui.mk |3 ++-
 cui/source/factory/dlgfact.cxx |7 +++
 2 files changed, 9 insertions(+), 1 deletion(-)

New commits:
commit 9eb3aabbf497dba2093f4394645bad3079286cf0
Author: Tor Lillqvist 
AuthorDate: Sun Jun 28 19:57:01 2020 +0300
Commit: Tor Lillqvist 
CommitDate: Sun Jun 28 20:18:36 2020 +0200

No need for the AdditionsDialog if --disable-extensions

Change-Id: If1ed6c860256e656846a1516e8170fb0dbd20499
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97346
Tested-by: Jenkins
Reviewed-by: Tor Lillqvist 

diff --git a/cui/Library_cui.mk b/cui/Library_cui.mk
index ed1e07d5ff13..09f355776341 100644
--- a/cui/Library_cui.mk
+++ b/cui/Library_cui.mk
@@ -104,7 +104,8 @@ $(eval $(call gb_Library_add_exception_objects,cui,\
 cui/source/customize/SvxNotebookbarConfigPage \
 cui/source/customize/CustomNotebookbarGenerator \
 cui/source/dialogs/about \
-cui/source/dialogs/AdditionsDialog \
+$(call gb_Helper_optional,EXTENSIONS, \
+cui/source/dialogs/AdditionsDialog) \
 cui/source/dialogs/colorpicker \
 cui/source/dialogs/cuicharmap \
 cui/source/dialogs/cuifmsearch \
diff --git a/cui/source/factory/dlgfact.cxx b/cui/source/factory/dlgfact.cxx
index d590b570343f..a31e987202eb 100644
--- a/cui/source/factory/dlgfact.cxx
+++ b/cui/source/factory/dlgfact.cxx
@@ -17,6 +17,8 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
+#include 
+
 #include 
 #include "dlgfact.hxx"
 
@@ -1684,8 +1686,13 @@ VclPtr 
AbstractDialogFactory_Impl::CreateQrCodeGenDialo
 VclPtr 
AbstractDialogFactory_Impl::CreateAdditionsDialog(
 weld::Window* pParent)
 {
+#if HAVE_FEATURE_EXTENSIONS
 return VclPtr::Create(
 std::make_unique(pParent));
+#else
+(void) pParent;
+return VclPtr(nullptr);
+#endif
 }
 
 VclPtr
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: cui/Library_cui.mk cui/source cui/uiconfig

2019-11-16 Thread Mike Kaganski (via logerrit)
 cui/Library_cui.mk|1 
 cui/source/options/optgdlg.cxx|   39 +
 cui/source/options/optgdlg.hxx|7 +
 cui/uiconfig/ui/optgeneralpage.ui |   51 ++
 4 files changed, 98 insertions(+)

New commits:
commit ae71570ee7db0a4a9d237424ed2cc3204e86f136
Author: Mike Kaganski 
AuthorDate: Fri Nov 15 12:14:31 2019 +0300
Commit: Mike Kaganski 
CommitDate: Sat Nov 16 13:00:51 2019 +0100

tdf#44462: add a link to Windows Default apps settings applet

Add "Windows Default apps" button to Options->General to run system applet
to control file associations, in accordance to recommendation from MS [1].
On Windows 10, though, the call to LaunchAdvancedAssociationUI would only
bring a system-modal infobanner suggesting the user to go to Settings >
Apps > Default apps, as documented at [2]. Since this is what MS considers
the correct way to manage application associations, the infobanner should
be enough.

[1] https://docs.microsoft.com/en-us/windows/win32/shell/default-programs
[2] 
https://docs.microsoft.com/en-us/windows/win32/api/shobjidl/nf-shobjidl-iapplicationassociationregistrationui-launchadvancedassociationui

Change-Id: I79cccdd00afac998c028b8e151db66bbd75be985
Reviewed-on: https://gerrit.libreoffice.org/82777
Tested-by: Jenkins
Reviewed-by: Mike Kaganski 

diff --git a/cui/Library_cui.mk b/cui/Library_cui.mk
index e45e35a8f0e3..27d89ec1c3b6 100644
--- a/cui/Library_cui.mk
+++ b/cui/Library_cui.mk
@@ -87,6 +87,7 @@ ifeq ($(OS),WNT)
 $(eval $(call gb_Library_use_system_win32_libs,cui,\
 advapi32 \
 shlwapi \
+ole32 \
 ))
 endif
 
diff --git a/cui/source/options/optgdlg.cxx b/cui/source/options/optgdlg.cxx
index 3079b2c92c2c..597d75358d1c 100644
--- a/cui/source/options/optgdlg.cxx
+++ b/cui/source/options/optgdlg.cxx
@@ -81,6 +81,12 @@
 #include 
 #include 
 
+#if defined(_WIN32)
+#include 
+#include 
+#include 
+#include 
+#endif
 using namespace ::com::sun::star::uno;
 using namespace ::com::sun::star::lang;
 using namespace ::com::sun::star::beans;
@@ -248,6 +254,10 @@ OfaMiscTabPage::OfaMiscTabPage(weld::Container* pPage, 
weld::DialogController* p
 #else
 , m_xQuickLaunchCB(m_xBuilder->weld_check_button("quicklaunch"))
 #endif
+#if defined(_WIN32)
+, m_xFileAssocFrame(m_xBuilder->weld_widget("fileassoc"))
+, m_xFileAssocBtn(m_xBuilder->weld_button("assocfiles"))
+#endif
 {
 if (!lcl_HasSystemFilePicker())
 m_xFileDlgFrame->hide();
@@ -273,6 +283,11 @@ OfaMiscTabPage::OfaMiscTabPage(weld::Container* pPage, 
weld::DialogController* p
 m_xQuickStarterFrame->hide();
 #endif
 
+#if defined(_WIN32)
+m_xFileAssocFrame->show();
+m_xFileAssocBtn->connect_clicked(LINK(this, OfaMiscTabPage, 
FileAssocClick));
+#endif
+
 m_aStrDateInfo = m_xToYearFT->get_label();
 m_xYearValueField->connect_value_changed( LINK( this, OfaMiscTabPage, 
TwoFigureHdl ) );
 
@@ -427,6 +442,30 @@ IMPL_LINK_NOARG( OfaMiscTabPage, TwoFigureHdl, 
weld::SpinButton&, void )
 m_xToYearFT->set_label( aOutput );
 }
 
+#if defined(_WIN32)
+IMPL_LINK_NOARG(OfaMiscTabPage, FileAssocClick, weld::Button&, void)
+{
+const bool bUninit = SUCCEEDED(CoInitialize(nullptr));
+IApplicationAssociationRegistrationUI* pIf = nullptr;
+HRESULT res = CoCreateInstance(CLSID_ApplicationAssociationRegistrationUI, 
0,
+   CLSCTX_INPROC_SERVER, 
IID_IApplicationAssociationRegistrationUI,
+   reinterpret_cast());
+
+if (SUCCEEDED(res) && pIf)
+{
+// LaunchAdvancedAssociationUI only works for applications registered 
under
+// Software\RegisteredApplications. See 
scp2/source/ooo/registryitem_ooo.scp
+const OUString expanded = Translate::ExpandVariables("%PRODUCTNAME 
%PRODUCTVERSION");
+// This will only show "To change your default apps, go to Settings > 
Apps > Default apps"
+// on Win10; this is expected. At least this will self-document it to 
users.
+pIf->LaunchAdvancedAssociationUI(o3tl::toW(expanded.getStr()));
+pIf->Release();
+}
+if (bUninit)
+CoUninitialize();
+}
+#endif
+
 class CanvasSettings
 {
 public:
diff --git a/cui/source/options/optgdlg.hxx b/cui/source/options/optgdlg.hxx
index 5c591e7c876f..392554f6e8dd 100644
--- a/cui/source/options/optgdlg.hxx
+++ b/cui/source/options/optgdlg.hxx
@@ -54,8 +54,15 @@ private:
 std::unique_ptr m_xCrashReport;
 std::unique_ptr m_xQuickStarterFrame;
 std::unique_ptr m_xQuickLaunchCB;
+#if defined(_WIN32)
+std::unique_ptr m_xFileAssocFrame;
+std::unique_ptr m_xFileAssocBtn;
+#endif
 
 DECL_LINK(TwoFigureHdl, weld::SpinButton&, void);
+#if defined(_WIN32)
+DECL_LINK(FileAssocClick, weld::Button&, void);
+#endif
 protected:
 virtual DeactivateRC   DeactivatePage( SfxItemSet* pSet ) override;
 
diff --git 

[Libreoffice-commits] core.git: cui/Library_cui.mk cui/source cui/uiconfig cui/UIConfig_cui.mk include/vcl officecfg/registry sd/inc sd/sdi sd/source

2019-08-23 Thread Grzegorz Araminowicz (via logerrit)
 cui/Library_cui.mk   |1 
 cui/UIConfig_cui.mk  |1 
 cui/source/dialogs/DiagramDialog.cxx |   27 +++
 cui/source/factory/dlgfact.cxx   |   13 +
 cui/source/factory/dlgfact.hxx   |   21 ++
 cui/source/inc/DiagramDialog.hxx |   34 

 cui/uiconfig/ui/diagramdialog.ui |   73 
++
 include/vcl/abstdlg.hxx  |   12 +
 officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu |5 
 sd/inc/app.hrc   |1 
 sd/sdi/_drvwsh.sdi   |5 
 sd/sdi/sdraw.sdi |   17 ++
 sd/source/ui/view/drviews3.cxx   |   21 ++
 13 files changed, 231 insertions(+)

New commits:
commit 5457ddf2f529daf5962abcba76dbaeccff0de826
Author: Grzegorz Araminowicz 
AuthorDate: Sun Aug 18 16:23:51 2019 +0200
Commit: Miklos Vajna 
CommitDate: Fri Aug 23 09:53:09 2019 +0200

SmartArt: add Edit Diagram dialog

Currently it displays only text representation of diagram.

Change-Id: I3ff12c4abf2ed32f68ea9d7437905afc13279e62
Reviewed-on: https://gerrit.libreoffice.org/77873
Tested-by: Jenkins
Reviewed-by: Miklos Vajna 

diff --git a/cui/Library_cui.mk b/cui/Library_cui.mk
index 1822dc311097..f770cb08158a 100644
--- a/cui/Library_cui.mk
+++ b/cui/Library_cui.mk
@@ -110,6 +110,7 @@ $(eval $(call gb_Library_add_exception_objects,cui,\
 cui/source/dialogs/cuiimapwnd \
 cui/source/dialogs/cuitbxform \
 cui/source/dialogs/dlgname \
+cui/source/dialogs/DiagramDialog \
 cui/source/dialogs/FontFeaturesDialog \
 cui/source/dialogs/hangulhanjadlg \
 cui/source/dialogs/hldocntp \
diff --git a/cui/UIConfig_cui.mk b/cui/UIConfig_cui.mk
index e25d8fbe6a13..f953af64a954 100644
--- a/cui/UIConfig_cui.mk
+++ b/cui/UIConfig_cui.mk
@@ -48,6 +48,7 @@ $(eval $(call gb_UIConfig_add_uifiles,cui,\
cui/uiconfig/ui/croppage \
cui/uiconfig/ui/cuiimapdlg \
cui/uiconfig/ui/databaselinkdialog \
+   cui/uiconfig/ui/diagramdialog \
cui/uiconfig/ui/dimensionlinestabpage \
cui/uiconfig/ui/editdictionarydialog \
cui/uiconfig/ui/editmodulesdialog \
diff --git a/cui/source/dialogs/DiagramDialog.cxx 
b/cui/source/dialogs/DiagramDialog.cxx
new file mode 100644
index ..f93b3bbdf28b
--- /dev/null
+++ b/cui/source/dialogs/DiagramDialog.cxx
@@ -0,0 +1,27 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+* This file is part of the LibreOffice project.
+*
+* This Source Code Form is subject to the terms of the Mozilla Public
+* License, v. 2.0. If a copy of the MPL was not distributed with this
+* file, You can obtain one at http://mozilla.org/MPL/2.0/.
+*/
+
+#include 
+
+#include 
+
+DiagramDialog::DiagramDialog(weld::Window* pWindow,
+ std::shared_ptr 
pDiagramData)
+: GenericDialogController(pWindow, "cui/ui/diagramdialog.ui", 
"DiagramDialog")
+, mpDiagramData(pDiagramData)
+, mpBtnOk(m_xBuilder->weld_button("btnOk"))
+, mpBtnCancel(m_xBuilder->weld_button("btnCancel"))
+, mpTextDiagram(m_xBuilder->weld_text_view("textDiagram"))
+{
+mpTextDiagram->set_text(mpDiagramData->getString());
+}
+
+DiagramDialog::~DiagramDialog() {}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/cui/source/factory/dlgfact.cxx b/cui/source/factory/dlgfact.cxx
index 37460b879aa0..289c79ccf8be 100644
--- a/cui/source/factory/dlgfact.cxx
+++ b/cui/source/factory/dlgfact.cxx
@@ -87,6 +87,7 @@
 #include 
 #include 
 #include 
+#include 
 
 using namespace ::com::sun::star;
 using namespace ::com::sun::star::frame;
@@ -1384,6 +1385,11 @@ short AbstractTipOfTheDayDialog_Impl::Execute()
 return m_xDlg->run();
 }
 
+short AbstractDiagramDialog_Impl::Execute()
+{
+return m_xDlg->run();
+}
+
 VclPtr AbstractDialogFactory_Impl::CreateSvxMacroAssignDlg(
 weld::Window* _pParent, const Reference< XFrame >& _rxDocumentFrame, const 
bool _bUnoDialogMode,
 const Reference< XNameReplace >& _rxEvents, const sal_uInt16 
_nInitiallySelectedEvent )
@@ -1641,4 +1647,11 @@ 
AbstractDialogFactory_Impl::CreateTipOfTheDayDialog(weld::Window* pParent)
 return 
VclPtr::Create(std::make_unique(pParent));
 }
 
+VclPtr
+AbstractDialogFactory_Impl::CreateDiagramDialog(weld::Window* pParent, 
std::shared_ptr pDiagramData)
+{
+return VclPtr::Create(
+std::make_unique(pParent, pDiagramData));
+}
+
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/cui/source/factory/dlgfact.hxx b/cui/source/factory/dlgfact.hxx
index 9948e71fcf24..7d579b22ae20 

[Libreoffice-commits] core.git: cui/Library_cui.mk cui/source

2019-07-30 Thread Caolán McNamara (via logerrit)
 cui/Library_cui.mk |1 
 cui/source/inc/radiobtnbox.hxx |   53 --
 cui/source/options/optjava.cxx |1 
 cui/source/options/radiobtnbox.cxx |   86 -
 4 files changed, 141 deletions(-)

New commits:
commit f356fbd7585ab2a41bcc6554a65b8a51588d0469
Author: Caolán McNamara 
AuthorDate: Tue Jul 30 13:08:11 2019 +0100
Commit: Caolán McNamara 
CommitDate: Tue Jul 30 17:45:22 2019 +0200

drop newly unused SvxRadioButtonListBox

Change-Id: Idb80fa73fad6e4bb2a1eaa3d55d7fe90e86c8965
Reviewed-on: https://gerrit.libreoffice.org/76605
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/cui/Library_cui.mk b/cui/Library_cui.mk
index 620d3de8fa69..df4a94126a63 100644
--- a/cui/Library_cui.mk
+++ b/cui/Library_cui.mk
@@ -182,7 +182,6 @@ $(eval $(call gb_Library_add_exception_objects,cui,\
 cui/source/options/optupdt \
 $(call gb_Helper_optional,DESKTOP,\
 cui/source/options/personalization) \
-cui/source/options/radiobtnbox \
 cui/source/options/sdbcdriverenum \
 cui/source/options/securityoptions \
 cui/source/options/treeopt \
diff --git a/cui/source/inc/radiobtnbox.hxx b/cui/source/inc/radiobtnbox.hxx
deleted file mode 100644
index b9af0af621a0..
--- a/cui/source/inc/radiobtnbox.hxx
+++ /dev/null
@@ -1,53 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- *   Licensed to the Apache Software Foundation (ASF) under one or more
- *   contributor license agreements. See the NOTICE file distributed
- *   with this work for additional information regarding copyright
- *   ownership. The ASF licenses this file to you under the Apache
- *   License, Version 2.0 (the "License"); you may not use this file
- *   except in compliance with the License. You may obtain a copy of
- *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-#ifndef INCLUDED_CUI_SOURCE_INC_RADIOBTNBOX_HXX
-#define INCLUDED_CUI_SOURCE_INC_RADIOBTNBOX_HXX
-
-#include 
-
-namespace svx {
-
-// class SvxRadioButtonListBox ---
-
-class SvxRadioButtonListBox : public SvSimpleTable
-{
-using SvSimpleTable::SetTabs;
-
-private:
-Point   m_aCurMousePoint;
-
-protected:
-virtual voidMouseButtonUp( const MouseEvent& _rMEvt ) override;
-virtual voidKeyInput( const KeyEvent& rKEvt ) override;
-
-public:
-SvxRadioButtonListBox(SvSimpleTableContainer& rParent, WinBits nBits);
-
-voidHandleEntryChecked( SvTreeListEntry* _pEntry );
-
-const Point&GetCurMousePoint() const { return m_aCurMousePoint;}
-
-longGetControlColumnWidth() const;
-};
-
-} // end of namespace ::svx
-
-#endif // INCLUDED_CUI_SOURCE_INC_RADIOBTNBOX_HXX
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/cui/source/options/optjava.cxx b/cui/source/options/optjava.cxx
index 23b61e7e8184..654d96ac879a 100644
--- a/cui/source/options/optjava.cxx
+++ b/cui/source/options/optjava.cxx
@@ -29,7 +29,6 @@
 #include "optjava.hxx"
 #include 
 #include 
-#include 
 
 #include 
 #include 
diff --git a/cui/source/options/radiobtnbox.cxx 
b/cui/source/options/radiobtnbox.cxx
deleted file mode 100644
index 555232026a3e..
--- a/cui/source/options/radiobtnbox.cxx
+++ /dev/null
@@ -1,86 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- *   Licensed to the Apache Software Foundation (ASF) under one or more
- *   contributor license agreements. See the NOTICE file distributed
- *   with this work for additional information regarding copyright
- *   ownership. The ASF licenses this file to you under the Apache
- *   License, Version 2.0 (the "License"); you may not use this file
- *   except in compliance with the License. You may obtain a copy of
- *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-
-#include 
-
-#include 
-#include 
-
-namespace svx {
-
-// class SvxRadioButtonListBox 

-
-SvxRadioButtonListBox::SvxRadioButtonListBox(SvSimpleTableContainer& rParent, 
WinBits nBits)
-: SvSimpleTable(rParent, nBits)
-

[Libreoffice-commits] core.git: cui/Library_cui.mk cui/source cui/uiconfig include/editeng include/svl include/svx offapi/com offapi/UnoApi_offapi.mk RepositoryExternal.mk svx/source

2019-07-24 Thread Shubham Goyal (via logerrit)
 RepositoryExternal.mk |2 
 cui/Library_cui.mk|2 
 cui/source/dialogs/QrCodeGenDialog.cxx|  288 ++
 cui/source/inc/QrCodeGenDialog.hxx|   58 +++
 cui/uiconfig/ui/qrcodegen.ui  |  273 +
 include/editeng/unoprnms.hxx  |1 
 include/svl/solar.hrc |2 
 include/svx/svdograf.hxx  |   15 
 include/svx/unoshprp.hxx  |7 
 offapi/UnoApi_offapi.mk   |2 
 offapi/com/sun/star/drawing/GraphicObjectShape.idl|5 
 offapi/com/sun/star/drawing/QRCode.idl|   42 ++
 offapi/com/sun/star/drawing/QRCodeErrorCorrection.idl |   50 +++
 svx/source/svdraw/svdograf.cxx|   10 
 svx/source/unodraw/unoshap2.cxx   |   22 +
 15 files changed, 775 insertions(+), 4 deletions(-)

New commits:
commit 2de42b53b7c23223c38e64a75eae248d8a0cd4ec
Author: Shubham Goyal <22shub...@gmail.com>
AuthorDate: Wed Jul 3 12:15:08 2019 +0530
Commit: Samuel Mehrbrodt 
CommitDate: Thu Jul 25 07:15:10 2019 +0200

QRCode Dialog Box feature

The patch handles the created QR code as a Customized Shape (Graphic
Object)

Change-Id: I1cee6f0e7fac585de880a9ac34e3bc441a4b7390
Reviewed-on: https://gerrit.libreoffice.org/74167
Reviewed-by: Stephan Bergmann 
Tested-by: Jenkins
Reviewed-by: Mike Kaganski 
Reviewed-by: Samuel Mehrbrodt 

diff --git a/RepositoryExternal.mk b/RepositoryExternal.mk
index a66077d3bcbb..021d9a7b650e 100644
--- a/RepositoryExternal.mk
+++ b/RepositoryExternal.mk
@@ -4172,7 +4172,7 @@ gb_ExternalProject__use_qrcodegen :=
 else # !SYSTEM_QRCODEGEN
 
 define gb_LinkTarget__use_qrcodegen
-l$(call gb_LinkTarget_use_unpacked,$(1),qrcodegen)
+$(call gb_LinkTarget_use_unpacked,$(1),qrcodegen)
 $(call gb_LinkTarget_set_include,$(1),\
-I$(call gb_UnpackedTarball_get_dir,qrcodegen/cpp/)\
$$(INCLUDE) \
diff --git a/cui/Library_cui.mk b/cui/Library_cui.mk
index e3cd0c36ba4f..620d3de8fa69 100644
--- a/cui/Library_cui.mk
+++ b/cui/Library_cui.mk
@@ -73,6 +73,7 @@ $(eval $(call gb_Library_use_externals,cui,\
 libxml2 \
 orcus-parser \
 orcus \
+qrcodegen \
 ))
 ifeq ($(DISABLE_GUI),)
 $(eval $(call gb_Library_use_externals,cui,\
@@ -129,6 +130,7 @@ $(eval $(call gb_Library_add_exception_objects,cui,\
 cui/source/dialogs/screenshotannotationdlg \
 cui/source/dialogs/pastedlg \
 cui/source/dialogs/postdlg \
+cui/source/dialogs/QrCodeGenDialog \
 cui/source/dialogs/scriptdlg \
 cui/source/dialogs/SignatureLineDialogBase \
 cui/source/dialogs/SignatureLineDialog \
diff --git a/cui/source/dialogs/QrCodeGenDialog.cxx 
b/cui/source/dialogs/QrCodeGenDialog.cxx
new file mode 100644
index ..628ada1df38b
--- /dev/null
+++ b/cui/source/dialogs/QrCodeGenDialog.cxx
@@ -0,0 +1,288 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; 
fill-column: 100 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#include 
+
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+#include 
+
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+using namespace css;
+using namespace css::uno;
+using namespace css::beans;
+using namespace css::container;
+using namespace css::frame;
+using namespace css::io;
+using namespace css::lang;
+using namespace css::frame;
+using namespace css::sheet;
+using namespace css::text;
+using namespace css::drawing;
+using namespace css::graphic;
+using namespace qrcodegen;
+
+QrCodeGenDialog::QrCodeGenDialog(weld::Widget* pParent, Reference 
xModel,
+ bool bEditExisting)
+: GenericDialogController(pParent, "cui/ui/qrcodegen.ui", 
"QrCodeGenDialog")
+, m_xModel(std::move(xModel))
+, m_xEdittext(m_xBuilder->weld_entry("edit_text"))
+, m_xRadioLow(m_xBuilder->weld_radio_button("button_low"))
+, m_xRadioMedium(m_xBuilder->weld_radio_button("button_medium"))
+, m_xRadioQuartile(m_xBuilder->weld_radio_button("button_quartile"))
+, m_xRadioHigh(m_xBuilder->weld_radio_button("button_high"))
+, m_xSpinBorder(m_xBuilder->weld_spin_button("edit_border"))
+{
+maBox.AddButton(m_xRadioLow.get());
+maBox.AddButton(m_xRadioMedium.get());
+maBox.AddButton(m_xRadioQuartile.get());
+maBox.AddButton(m_xRadioHigh.get());
+
+// Set ECC to Low by Default.
+if 

[Libreoffice-commits] core.git: cui/Library_cui.mk cui/source cui/uiconfig extras/source include/cui include/sfx2 include/svx include/vcl sc/source sd/inc sd/source sfx2/source solenv/bin svx/source s

2019-06-21 Thread Caolán McNamara (via logerrit)
 cui/Library_cui.mk   |1 
 cui/source/dialogs/SpellAttrib.cxx   |  105 -
 cui/source/dialogs/SpellAttrib.hxx   |  100 -
 cui/source/dialogs/SpellDialog.cxx   | 1654 ++-
 cui/source/dialogs/cuicharmap.cxx|2 
 cui/source/factory/dlgfact.cxx   |   27 
 cui/source/factory/dlgfact.hxx   |   16 
 cui/source/factory/init.cxx  |4 
 cui/source/inc/SpellDialog.hxx   |  189 +-
 cui/uiconfig/ui/spellingdialog.ui|  159 +
 extras/source/glade/libreoffice-catalog.xml.in   |3 
 include/cui/cuicharmap.hxx   |2 
 include/sfx2/basedlgs.hxx|3 
 include/svx/ClassificationEditView.hxx   |4 
 include/svx/langbox.hxx  |2 
 include/svx/svxdlg.hxx   |6 
 include/vcl/edit.hxx |2 
 include/vcl/weld.hxx |   10 
 sc/source/ui/inc/spelleng.hxx|4 
 sc/source/ui/view/cellsh.cxx |4 
 sc/source/ui/view/spelleng.cxx   |   33 
 sd/inc/Outliner.hxx  |6 
 sd/source/ui/view/Outliner.cxx   |   20 
 sfx2/source/appl/appinit.cxx |6 
 sfx2/source/dialog/basedlgs.cxx  |   15 
 solenv/bin/native-code.py|1 
 svx/source/dialog/SpellDialogChildWindow.cxx |6 
 svx/source/dialog/rubydialog.cxx |6 
 svx/source/dialog/srchdlg.cxx|6 
 sw/source/uibase/dialog/SwSpellDialogChildWindow.cxx |9 
 vcl/source/app/salvtables.cxx|   33 
 vcl/source/control/edit.cxx  |4 
 vcl/source/edit/vclmedit.cxx |4 
 vcl/unx/gtk3/gtk3gtkinst.cxx |   50 
 34 files changed, 1369 insertions(+), 1127 deletions(-)

New commits:
commit 5261417cbb3051b812164838d19c0f748573df45
Author: Caolán McNamara 
AuthorDate: Fri Jun 14 21:56:44 2019 +0100
Commit: Caolán McNamara 
CommitDate: Fri Jun 21 21:33:30 2019 +0200

weld SpellDialog

a) use EditEngine instead of TextEngine as the former can be hosted in a
   foreign widget
b) use a SfxGrabBagItem to hold the custom spellchecking info inside the
   EditEngine
c) in longer paragraphs the current word is now auto-scrolled into view
d) rename Invalidate to InvalidateDialog

Change-Id: Ic6db019c32cdfd5f354c58ee7394fdaa040b86e1
Reviewed-on: https://gerrit.libreoffice.org/74119
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/cui/Library_cui.mk b/cui/Library_cui.mk
index b02520529fab..e3cd0c36ba4f 100644
--- a/cui/Library_cui.mk
+++ b/cui/Library_cui.mk
@@ -135,7 +135,6 @@ $(eval $(call gb_Library_add_exception_objects,cui,\
 cui/source/dialogs/SignSignatureLineDialog \
 cui/source/dialogs/sdrcelldlg \
 cui/source/dialogs/showcols \
-cui/source/dialogs/SpellAttrib \
 cui/source/dialogs/SpellDialog \
 cui/source/dialogs/splitcelldlg \
 cui/source/dialogs/srchxtra \
diff --git a/cui/source/dialogs/SpellAttrib.cxx 
b/cui/source/dialogs/SpellAttrib.cxx
deleted file mode 100644
index 9d761a55b3f1..
--- a/cui/source/dialogs/SpellAttrib.cxx
+++ /dev/null
@@ -1,105 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- *   Licensed to the Apache Software Foundation (ASF) under one or more
- *   contributor license agreements. See the NOTICE file distributed
- *   with this work for additional information regarding copyright
- *   ownership. The ASF licenses this file to you under the Apache
- *   License, Version 2.0 (the "License"); you may not use this file
- *   except in compliance with the License. You may obtain a copy of
- *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-
-#include "SpellAttrib.hxx"
-#include 
-
-using namespace svx;
-using namespace com::sun::star::linguistic2;
-using namespace com::sun::star::uno;
-
-
-SpellErrorAttrib::SpellErrorAttrib( const SpellErrorDescription& rDesc ) :
-TextAttrib(TEXTATTR_SPELL_ERROR),
-m_aSpellErrorDescription( rDesc )
-{
-}
-
-
-void SpellErrorAttrib::SetFont( vcl::Font&  ) const
-{
-//this attribute doesn't have a visual effect
-}
-
-

[Libreoffice-commits] core.git: cui/Library_cui.mk cui/source cui/uiconfig

2019-06-14 Thread Sumit Chauhan (via logerrit)
 cui/Library_cui.mk  |1 
 cui/source/customize/CustomNotebookbarGenerator.cxx |2 
 cui/source/customize/SvxNotebookbarConfigPage.cxx   |  446 
 cui/source/customize/cfg.cxx|   39 +
 cui/source/inc/CustomNotebookbarGenerator.hxx   |1 
 cui/source/inc/SvxNotebookbarConfigPage.hxx |   85 +++
 cui/source/inc/cfg.hxx  |   12 
 cui/source/inc/helpids.h|1 
 cui/uiconfig/ui/customizedialog.ui  |   59 ++
 9 files changed, 630 insertions(+), 16 deletions(-)

New commits:
commit 015dc88a595c1c92d2b724cd868aecb07199f995
Author: Sumit Chauhan 
AuthorDate: Fri May 31 14:59:54 2019 +0530
Commit: Szymon Kłos 
CommitDate: Fri Jun 14 15:17:33 2019 +0200

UI for the Notebookbar Customization tab

This patch generates the UI for the notebookbar customization tab.
Patch is working and one can show/hide the UIItem by clicking on the
checkbox.

Change-Id: I4923c57e6443474f178a72922646619f07b5ffc1
Reviewed-on: https://gerrit.libreoffice.org/73261
Tested-by: Jenkins
Reviewed-by: Szymon Kłos 
Tested-by: Szymon Kłos 

diff --git a/cui/Library_cui.mk b/cui/Library_cui.mk
index 4cf00159dcad..b02520529fab 100644
--- a/cui/Library_cui.mk
+++ b/cui/Library_cui.mk
@@ -97,6 +97,7 @@ $(eval $(call gb_Library_add_exception_objects,cui,\
 cui/source/customize/SvxConfigPageHelper \
 cui/source/customize/SvxMenuConfigPage \
 cui/source/customize/SvxToolbarConfigPage \
+cui/source/customize/SvxNotebookbarConfigPage \
 cui/source/customize/CustomNotebookbarGenerator \
 cui/source/dialogs/about \
 cui/source/dialogs/colorpicker \
diff --git a/cui/source/customize/CustomNotebookbarGenerator.cxx 
b/cui/source/customize/CustomNotebookbarGenerator.cxx
index 925f43dd0add..40fbe9012183 100644
--- a/cui/source/customize/CustomNotebookbarGenerator.cxx
+++ b/cui/source/customize/CustomNotebookbarGenerator.cxx
@@ -114,7 +114,7 @@ OUString CustomNotebookbarGenerator::getCustomizedUIPath()
 return sCustomizedUIPath;
 }
 
-static OUString getOriginalUIPath()
+OUString CustomNotebookbarGenerator::getOriginalUIPath()
 {
 OUStringBuffer aOriginalUIPathBuffer = VclBuilderContainer::getUIRootDir();
 OUString sAppName, sNotebookbarUIFileName;
diff --git a/cui/source/customize/SvxNotebookbarConfigPage.cxx 
b/cui/source/customize/SvxNotebookbarConfigPage.cxx
new file mode 100644
index ..d2ef34807920
--- /dev/null
+++ b/cui/source/customize/SvxNotebookbarConfigPage.cxx
@@ -0,0 +1,446 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ *   Licensed to the Apache Software Foundation (ASF) under one or more
+ *   contributor license agreements. See the NOTICE file distributed
+ *   with this work for additional information regarding copyright
+ *   ownership. The ASF licenses this file to you under the Apache
+ *   License, Version 2.0 (the "License"); you may not use this file
+ *   except in compliance with the License. You may obtain a copy of
+ *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#include 
+#include 
+
+#include 
+#include 
+#include 
+#include 
+
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+#include 
+#include 
+#include 
+
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+#define sTopLevelListBoxID "sTopLevelListBoxID"
+
+static OUString charToString(const char* cString)
+{
+OUStringBuffer aString;
+for (unsigned long i = 0; i < strlen(cString); i++)
+{
+aString.append(cString[i]);
+}
+return aString.makeStringAndClear();
+}
+
+static OUString getFileName(const OUString& aFileName)
+{
+if (aFileName == "notebookbar.ui")
+return "Tabbed";
+else if (aFileName == "notebookbar_compact.ui")
+return "TabbedCompact";
+else if (aFileName == "notebookbar_groupedbar_full.ui")
+return "Groupedbar";
+else if (aFileName == "notebookbar_groupedbar_compact.ui")
+return "GroupedbarCompact";
+else
+return "None";
+}
+
+SvxNotebookbarConfigPage::SvxNotebookbarConfigPage(TabPageParent pParent, 
const SfxItemSet& rSet)
+: SvxConfigPage(pParent, rSet)
+{
+m_xDescriptionFieldLb->set_visible(false);
+m_xSearchEdit->set_visible(false);
+   

[Libreoffice-commits] core.git: cui/Library_cui.mk cui/source include/sal officecfg/registry

2019-06-10 Thread Sumit Chauhan (via logerrit)
 cui/Library_cui.mk |2 
 cui/source/customize/CustomNotebookbarGenerator.cxx|  299 
++
 cui/source/inc/CustomNotebookbarGenerator.hxx  |   43 +
 include/sal/log-areas.dox  |1 
 officecfg/registry/data/org/openoffice/Office/UI/ToolbarMode.xcu   |   70 ++
 officecfg/registry/schema/org/openoffice/Office/UI/ToolbarMode.xcs |   11 
 6 files changed, 426 insertions(+)

New commits:
commit c473c5b462f33df439b4b62b394c5d7811a05c7c
Author: Sumit Chauhan 
AuthorDate: Wed May 22 01:19:21 2019 +0530
Commit: Szymon Kłos 
CommitDate: Mon Jun 10 19:18:22 2019 +0200

Using registrymodifications.xcu for storing customized uiitem data

This patch store and render the GtkToolButton/GtkMenuButton of
notebookbar*.ui show/hide property in registrymodifications.xcu.
The patch also gives a solution to copy the notebookbar*.ui
file in user directory from share directory provided file is absent
in user directory.The patch also uses libxml2 library and write i.e
change the property of uiitem(GtkToolButton/GtkMenuButton) in
notebookbar*.ui files present in user directory.

Change-Id: I518f37fc858250a04fafd2a4475e3ed03185f6ff
Reviewed-on: https://gerrit.libreoffice.org/72698
Tested-by: Jenkins
Reviewed-by: Szymon Kłos 

diff --git a/cui/Library_cui.mk b/cui/Library_cui.mk
index 2d46420c4b1a..4cf00159dcad 100644
--- a/cui/Library_cui.mk
+++ b/cui/Library_cui.mk
@@ -70,6 +70,7 @@ $(eval $(call gb_Library_use_externals,cui,\
curl) \
 icuuc \
 icu_headers \
+libxml2 \
 orcus-parser \
 orcus \
 ))
@@ -96,6 +97,7 @@ $(eval $(call gb_Library_add_exception_objects,cui,\
 cui/source/customize/SvxConfigPageHelper \
 cui/source/customize/SvxMenuConfigPage \
 cui/source/customize/SvxToolbarConfigPage \
+cui/source/customize/CustomNotebookbarGenerator \
 cui/source/dialogs/about \
 cui/source/dialogs/colorpicker \
 cui/source/dialogs/cuicharmap \
diff --git a/cui/source/customize/CustomNotebookbarGenerator.cxx 
b/cui/source/customize/CustomNotebookbarGenerator.cxx
new file mode 100644
index ..925f43dd0add
--- /dev/null
+++ b/cui/source/customize/CustomNotebookbarGenerator.cxx
@@ -0,0 +1,299 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; 
fill-column: 100 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ *   Licensed to the Apache Software Foundation (ASF) under one or more
+ *   contributor license agreements. See the NOTICE file distributed
+ *   with this work for additional information regarding copyright
+ *   ownership. The ASF licenses this file to you under the Apache
+ *   License, Version 2.0 (the "License"); you may not use this file
+ *   except in compliance with the License. You may obtain a copy of
+ *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+#define aUIItemIDLength 255
+#define aUIPropertiesCount 3
+
+using namespace css;
+
+CustomNotebookbarGenerator::CustomNotebookbarGenerator() {}
+
+static OUString lcl_activeAppName(vcl::EnumContext::Application eApp)
+{
+switch (eApp)
+{
+case vcl::EnumContext::Application::Writer:
+return OUString("ActiveWriter");
+break;
+case vcl::EnumContext::Application::Calc:
+return OUString("ActiveCalc");
+break;
+case vcl::EnumContext::Application::Impress:
+return OUString("ActiveImpress");
+break;
+case vcl::EnumContext::Application::Draw:
+return OUString("ActiveDraw");
+break;
+default:
+return OUString();
+break;
+}
+}
+
+static OUString lcl_getAppName(vcl::EnumContext::Application eApp)
+{
+switch (eApp)
+{
+case vcl::EnumContext::Application::Writer:
+return OUString("Writer");
+break;
+case vcl::EnumContext::Application::Calc:
+return OUString("Calc");
+break;
+case vcl::EnumContext::Application::Impress:
+return OUString("Impress");
+break;
+case vcl::EnumContext::Application::Draw:
+return OUString("Draw");
+break;
+default:
+return OUString();
+break;
+}
+}
+
+static OUString getAppNameRegistryPath()
+{
+vcl::EnumContext::Application eApp = vcl::EnumContext::Application::Any;
+const Reference& xFrame
+   

[Libreoffice-commits] core.git: cui/Library_cui.mk cui/source cui/uiconfig cui/UIConfig_cui.mk include/cui include/svx officecfg/registry sd/inc sd/Library_sdui.mk sd/sdi sd/source sd/uiconfig solenv/

2019-05-23 Thread Gülşah Köse (via logerrit)
 cui/Library_cui.mk   |1 
 cui/UIConfig_cui.mk  |1 
 cui/source/dialogs/cuicharmap.cxx|2 
 cui/source/factory/cuiexp.cxx|2 
 cui/source/factory/dlgfact.cxx   |2 
 cui/source/factory/dlgfact.hxx   |1 
 cui/source/factory/init.cxx  |2 
 cui/source/inc/numpages.hxx  |   22 
 cui/source/tabpages/autocdlg.cxx |2 
 cui/source/tabpages/chardlg.cxx  |2 
 cui/source/tabpages/numpages.cxx |2 
 cui/uiconfig/ui/bulletandposition.ui | 1047 
+++
 include/cui/cuicharmap.hxx   |  106 
 include/cui/cuidllapi.h  |   23 
 include/cui/numberingpreview.hxx |   31 
 include/svx/svxdlg.hxx   |   15 
 include/svx/svxids.hrc   |1 
 officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu |8 
 sd/Library_sdui.mk   |2 
 sd/inc/sdabstdlg.hxx |2 
 sd/inc/strings.hrc   |2 
 sd/sdi/_drvwsh.sdi   |6 
 sd/source/ui/dlg/BulletAndPositionDlg.cxx| 1361 
++
 sd/source/ui/dlg/sddlgfact.cxx   |   25 
 sd/source/ui/dlg/sddlgfact.hxx   |   20 
 sd/source/ui/func/fuolbull.cxx   |  302 ++
 sd/source/ui/inc/BulletAndPositionDlg.hxx|  171 +
 sd/source/ui/inc/OutlineView.hxx |2 
 sd/source/ui/inc/View.hxx|2 
 sd/source/ui/inc/drawview.hxx|3 
 sd/source/ui/inc/fuolbull.hxx|   24 
 sd/source/ui/view/drawview.cxx   |  206 -
 sd/source/ui/view/drviews2.cxx   |7 
 sd/source/ui/view/outlview.cxx   |2 
 sd/source/ui/view/sdview.cxx |2 
 sd/uiconfig/simpress/menubar/menubar.xml |1 
 solenv/sanitizers/ui/cui.suppr   |3 
 svx/sdi/svx.sdi  |   17 
 38 files changed, 3266 insertions(+), 164 deletions(-)

New commits:
commit e3015d7021e689c71c2ed8e5dd01a74d832c84f0
Author: Gülşah Köse 
AuthorDate: Wed Apr 17 20:00:18 2019 +0300
Commit: Miklos Vajna 
CommitDate: Thu May 23 10:16:30 2019 +0200

Add new customize and position merged dialog

Change-Id: I898fb0830a9f53da4a7917cb5900f082e3a9d6b7
Reviewed-on: https://gerrit.libreoffice.org/71944
Tested-by: Jenkins
Reviewed-by: Miklos Vajna 

diff --git a/cui/Library_cui.mk b/cui/Library_cui.mk
index 629da3fbc4af..2d46420c4b1a 100644
--- a/cui/Library_cui.mk
+++ b/cui/Library_cui.mk
@@ -21,6 +21,7 @@ $(eval $(call 
gb_Library_set_precompiled_header,cui,$(SRCDIR)/cui/inc/pch/precom
 
 $(eval $(call gb_Library_add_defs,cui,\
 $(if $(filter TRUE,$(ENABLE_GTK)),-DENABLE_GTK) \
+-DCUI_DLLIMPLEMENTATION \
 ))
 
 $(eval $(call gb_Library_use_custom_headers,cui,\
diff --git a/cui/UIConfig_cui.mk b/cui/UIConfig_cui.mk
index 4b087d9ca444..a20d96e6d4b0 100644
--- a/cui/UIConfig_cui.mk
+++ b/cui/UIConfig_cui.mk
@@ -32,6 +32,7 @@ $(eval $(call gb_UIConfig_add_uifiles,cui,\
cui/uiconfig/ui/borderareatransparencydialog \
cui/uiconfig/ui/borderbackgrounddialog \
cui/uiconfig/ui/borderpage \
+   cui/uiconfig/ui/bulletandposition \
cui/uiconfig/ui/breaknumberoption \
cui/uiconfig/ui/calloutdialog \
cui/uiconfig/ui/calloutpage \
diff --git a/cui/source/dialogs/cuicharmap.cxx 
b/cui/source/dialogs/cuicharmap.cxx
index 48cd29e58f37..7999aaba15a2 100644
--- a/cui/source/dialogs/cuicharmap.cxx
+++ b/cui/source/dialogs/cuicharmap.cxx
@@ -37,7 +37,7 @@
 #include 
 
 #include 
-#include 
+#include 
 #include 
 #include 
 #include 
diff --git a/cui/source/factory/cuiexp.cxx b/cui/source/factory/cuiexp.cxx
index e3c13320172f..7c46eee53c93 100644
--- a/cui/source/factory/cuiexp.cxx
+++ b/cui/source/factory/cuiexp.cxx
@@ -38,7 +38,7 @@
 #include 
 #include 
 #include 
-#include 
+#include 
 #include 
 #include 
 

[Libreoffice-commits] core.git: cui/Library_cui.mk cui/source

2018-10-08 Thread Libreoffice Gerrit user
 cui/Library_cui.mk |3 
 cui/source/options/personalization.cxx |  547 -
 2 files changed, 345 insertions(+), 205 deletions(-)

New commits:
commit 6c97feec872e82711f58cce61b7796ed594e552c
Author: Muhammet Kara 
AuthorDate: Fri Oct 5 03:35:43 2018 +0300
Commit: Muhammet Kara 
CommitDate: Mon Oct 8 09:39:28 2018 +0200

Modernize personas under-the-hood - The search

* Upgrade the used mozilla API from v1.5 to v3
* Ditch Neon for curl
* Get rid of the get-HTML-then-search-within craziness

It is much faster and smarter now:
* Fetches the search results at once in JSON format,
  instead of repetitively making http calls for each persona,
  and relying on an ever-changing HTML design
* Doesn't redownload and overwrite files each time, so it is
  much faster for the second time of the same search query

This patch handles the search part. A follow-up patch will
handle the apply part.

Change-Id: I703fc7b510799e8c205566cf5ffad2a81f12c4ea
Reviewed-on: https://gerrit.libreoffice.org/61449
Tested-by: Jenkins
Reviewed-by: Heiko Tietze 
Tested-by: Heiko Tietze 
Reviewed-by: Muhammet Kara 

diff --git a/cui/Library_cui.mk b/cui/Library_cui.mk
index 1c6185488f36..26900dec8e3a 100644
--- a/cui/Library_cui.mk
+++ b/cui/Library_cui.mk
@@ -66,8 +66,11 @@ $(eval $(call gb_Library_use_externals,cui,\
boost_headers \
$(call gb_Helper_optional,OPENCL,\
clew) \
+curl \
 icuuc \
 icu_headers \
+orcus-parser \
+orcus \
 ))
 ifeq ($(DISABLE_GUI),)
 $(eval $(call gb_Library_use_externals,cui,\
diff --git a/cui/source/options/personalization.cxx 
b/cui/source/options/personalization.cxx
index d30c1c1d2347..bbaa03e8d3a1 100644
--- a/cui/source/options/personalization.cxx
+++ b/cui/source/options/personalization.cxx
@@ -40,11 +40,131 @@
 #include 
 #include 
 
+#include 
+
+#include 
+#include 
+#include 
+
+#include 
+
 using namespace com::sun::star;
 using namespace ::com::sun::star::uno;
 using namespace ::com::sun::star::ucb;
 using namespace ::com::sun::star::beans;
 
+#ifdef UNX
+static const char kUserAgent[] = "LibreOffice PersonaDownloader/1.0 (Linux)";
+#else
+static const char kUserAgent[] = "LibreOffice PersonaDownloader/1.0 (unknown 
platform)";
+#endif
+
+struct PersonaInfo
+{
+OUString sSlug;
+OUString sName;
+OUString sPreviewURL;
+OUString sHeaderURL;
+OUString sFooterURL;
+OUString sTextColor;
+OUString sAccentColor;
+};
+
+namespace {
+
+// Callback to get the response data from server.
+size_t WriteCallback(void *ptr, size_t size,
+size_t nmemb, void *userp)
+{
+  if (!userp)
+return 0;
+
+  std::string* response = static_cast(userp);
+  size_t real_size = size * nmemb;
+  response->append(static_cast(ptr), real_size);
+  return real_size;
+}
+
+// Callback to get the response data from server to a file.
+size_t WriteCallbackFile(void *ptr, size_t size,
+size_t nmemb, void *userp)
+{
+  if (!userp)
+return 0;
+
+  SvStream* response = static_cast(userp);
+  size_t real_size = size * nmemb;
+  response->WriteBytes(ptr, real_size);
+  return real_size;
+}
+
+// Gets the content of the given URL and returns as a standard string
+std::string curlGet(const OString& rURL)
+{
+CURL* curl = curl_easy_init();
+
+if (!curl)
+return std::string();
+
+curl_easy_setopt(curl, CURLOPT_URL, rURL.getStr());
+curl_easy_setopt(curl, CURLOPT_USERAGENT, kUserAgent);
+
+std::string response_body;
+
+curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, WriteCallback);
+curl_easy_setopt(curl, CURLOPT_WRITEDATA,
+static_cast(_body));
+
+CURLcode cc = curl_easy_perform(curl);
+long http_code = 0;
+curl_easy_getinfo(curl, CURLINFO_RESPONSE_CODE, _code);
+
+if (http_code != 200)
+{
+SAL_WARN("cui.options", "Download failed. Error code: " << http_code);
+}
+
+if (cc != CURLE_OK)
+{
+SAL_WARN("cui.options", "curl error: " << cc);
+}
+
+return response_body;
+}
+
+// Downloads and saves the file at the given rURL to to a local path (sFileURL)
+void curlDownload(const OString& rURL, const OUString& sFileURL)
+{
+CURL* curl = curl_easy_init();
+SvFileStream aFile( sFileURL, StreamMode::WRITE );
+
+if (!curl)
+return;
+
+curl_easy_setopt(curl, CURLOPT_URL, rURL.getStr());
+curl_easy_setopt(curl, CURLOPT_USERAGENT, kUserAgent);
+
+curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, WriteCallbackFile);
+curl_easy_setopt(curl, CURLOPT_WRITEDATA,
+static_cast());
+
+CURLcode cc = curl_easy_perform(curl);
+long http_code = 0;
+curl_easy_getinfo(curl, CURLINFO_RESPONSE_CODE, _code);
+
+if (http_code != 200)
+{
+SAL_WARN("cui.options", "Download failed. Error code: " << 

[Libreoffice-commits] core.git: cui/Library_cui.mk cui/source cui/uiconfig extras/source include/svtools include/svx include/vcl svtools/inc svtools/source svtools/uiconfig svtools/UIConfig_svt.mk svx

2018-09-05 Thread Libreoffice Gerrit user
 cui/Library_cui.mk   |1 
 cui/source/inc/border.hxx|  133 +-
 cui/source/tabpages/border.cxx   |  869 ++-
 cui/source/tabpages/borderconn.cxx   |  291 --
 cui/source/tabpages/borderconn.hxx   |   57 -
 cui/source/tabpages/tpbitmap.cxx |1 
 cui/uiconfig/ui/borderpage.ui|  153 ++-
 extras/source/glade/libreoffice-catalog.xml.in   |3 
 include/svtools/ctrlbox.hxx  |   87 +
 include/svtools/valueset.hxx |   14 
 include/svx/colorbox.hxx |1 
 include/svx/colorwindow.hxx  |1 
 include/svx/frmsel.hxx   |   24 
 include/vcl/outdev.hxx   |3 
 include/vcl/weld.hxx |3 
 svtools/UIConfig_svt.mk  |1 
 svtools/inc/borderline.hrc   |   41 
 svtools/source/control/ctrlbox.cxx   |  298 ++
 svtools/source/control/valueset.cxx  |  140 +++
 svtools/uiconfig/ui/linewindow.ui|   54 +
 svx/source/accessibility/AccessibleFrameSelector.cxx |  442 +++--
 svx/source/dialog/frmsel.cxx |   78 -
 svx/source/inc/AccessibleFrameSelector.hxx   |  111 +-
 svx/source/inc/frmselimpl.hxx|6 
 svx/source/tbxctrls/tbcontrl.cxx |   11 
 vcl/source/app/salvtables.cxx|   11 
 vcl/source/control/button.cxx|3 
 vcl/source/outdev/rect.cxx   |6 
 vcl/source/window/builder.cxx|2 
 vcl/unx/gtk3/gtk3gtkinst.cxx |   15 
 vcl/workben/vcldemo.cxx  |2 
 31 files changed, 1647 insertions(+), 1215 deletions(-)

New commits:
commit 229483707c3ccb48d008d37f856bbeb6df199a90
Author: Caolán McNamara 
AuthorDate: Mon Sep 3 16:06:49 2018 +0100
Commit: Caolán McNamara 
CommitDate: Wed Sep 5 13:36:35 2018 +0200

weld SvxBorderTabPage

Change-Id: I33f12f160ac5fea14c9a53c3846c6d31c7fd0084
Reviewed-on: https://gerrit.libreoffice.org/59954
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/cui/Library_cui.mk b/cui/Library_cui.mk
index f2926cfe43d7..1c6185488f36 100644
--- a/cui/Library_cui.mk
+++ b/cui/Library_cui.mk
@@ -183,7 +183,6 @@ $(eval $(call gb_Library_add_exception_objects,cui,\
 cui/source/tabpages/autocdlg \
 cui/source/tabpages/backgrnd \
 cui/source/tabpages/bbdlg \
-cui/source/tabpages/borderconn \
 cui/source/tabpages/border \
 cui/source/tabpages/chardlg \
 cui/source/tabpages/connect \
diff --git a/cui/source/inc/border.hxx b/cui/source/inc/border.hxx
index e59638036e7d..80dea4edc8b0 100644
--- a/cui/source/inc/border.hxx
+++ b/cui/source/inc/border.hxx
@@ -19,12 +19,15 @@
 #ifndef INCLUDED_CUI_SOURCE_INC_BORDER_HXX
 #define INCLUDED_CUI_SOURCE_INC_BORDER_HXX
 
+#include 
 #include 
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -38,6 +41,37 @@ namespace editeng
 class SvxBorderLine;
 }
 
+class ShadowControlsWrapper
+{
+public:
+explicit ShadowControlsWrapper(SvtValueSet& rVsPos, 
weld::MetricSpinButton& rMfSize, ColorListBox& rLbColor);
+
+SvxShadowItem GetControlValue(const SvxShadowItem& rItem) const;
+void SetControlValue(const SvxShadowItem& rItem);
+
+private:
+SvtValueSet&mrVsPos;
+weld::MetricSpinButton& mrMfSize;
+ColorListBox&   mrLbColor;
+};
+
+class MarginControlsWrapper
+{
+public:
+explicit MarginControlsWrapper(weld::MetricSpinButton& rMfLeft, 
weld::MetricSpinButton& rMfRight,
+   weld::MetricSpinButton& rMfTop, 
weld::MetricSpinButton& rMfBottom);
+
+SvxMarginItem GetControlValue(const SvxMarginItem& rItem) const;
+void SetControlValue(const SvxMarginItem& rItem);
+
+bool get_value_changed_from_saved() const;
+
+private:
+weld::MetricSpinButton& mrLeftWrp;
+weld::MetricSpinButton& mrRightWrp;
+weld::MetricSpinButton& mrTopWrp;
+weld::MetricSpinButton& mrBottomWrp;
+};
 
 class SvxBorderTabPage : public SfxTabPage
 {
@@ -65,49 +99,15 @@ protected:
 virtual voidDataChanged( const DataChangedEvent& rDCEvt ) override;
 
 private:
-SvxBorderTabPage( vcl::Window* pParent, const SfxItemSet& rCoreAttrs );
-
-// Controls
-VclPtr   m_pWndPresets;
-VclPtr  m_pUserDefFT;
-VclPtr m_pFrameSel;
-
-VclPtrm_pLbLineStyle;
-VclPtrm_pLbLineColor;
-VclPtrm_pLineWidthMF;
-
-VclPtr   m_pSpacingFrame;
-VclPtr

[Libreoffice-commits] core.git: cui/Library_cui.mk cui/source cui/uiconfig cui/UIConfig_cui.mk

2018-06-16 Thread Tomaž Vajngerl
 cui/Library_cui.mk|1 
 cui/UIConfig_cui.mk   |1 
 cui/source/dialogs/FontFeaturesDialog.cxx |  233 ++
 cui/source/inc/FontFeaturesDialog.hxx |   66 
 cui/source/inc/chardlg.hxx|6 
 cui/source/tabpages/chardlg.cxx   |   47 ++
 cui/uiconfig/ui/charnamepage.ui   |  111 ++
 cui/uiconfig/ui/fontfeaturesdialog.ui |  177 ++
 8 files changed, 615 insertions(+), 27 deletions(-)

New commits:
commit 3aa8a048776bdf0d4868847baac2a72aa55cd6a3
Author: Tomaž Vajngerl 
Date:   Fri Jun 15 20:08:18 2018 +0200

tdf#58941 Manipulate with font features using FontFeatureDialog

This adds a font feature dialog activated on the Character page,
which adds a way to manipulate the available font features for the
current selected font (by adding them to the font name).

Change-Id: Icd0eda31b235d3cc8ef6eaee582fb78b4b346d78
Reviewed-on: https://gerrit.libreoffice.org/55894
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl 

diff --git a/cui/Library_cui.mk b/cui/Library_cui.mk
index 44bac812c557..7ae5435fd6ed 100644
--- a/cui/Library_cui.mk
+++ b/cui/Library_cui.mk
@@ -102,6 +102,7 @@ $(eval $(call gb_Library_add_exception_objects,cui,\
 cui/source/dialogs/cuiimapwnd \
 cui/source/dialogs/cuitbxform \
 cui/source/dialogs/dlgname \
+cui/source/dialogs/FontFeaturesDialog \
 cui/source/dialogs/hangulhanjadlg \
 cui/source/dialogs/hldocntp \
 cui/source/dialogs/hldoctp \
diff --git a/cui/UIConfig_cui.mk b/cui/UIConfig_cui.mk
index be4a3ac180a8..dd3e94bb1a9b 100644
--- a/cui/UIConfig_cui.mk
+++ b/cui/UIConfig_cui.mk
@@ -63,6 +63,7 @@ $(eval $(call gb_UIConfig_add_uifiles,cui,\
cui/uiconfig/ui/effectspage \
cui/uiconfig/ui/eventsconfigpage \
cui/uiconfig/ui/formatcellsdialog \
+   cui/uiconfig/ui/fontfeaturesdialog \
cui/uiconfig/ui/galleryapplyprogress \
cui/uiconfig/ui/galleryfilespage \
cui/uiconfig/ui/gallerygeneralpage \
diff --git a/cui/source/dialogs/FontFeaturesDialog.cxx 
b/cui/source/dialogs/FontFeaturesDialog.cxx
new file mode 100644
index ..6f9543c13109
--- /dev/null
+++ b/cui/source/dialogs/FontFeaturesDialog.cxx
@@ -0,0 +1,233 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ */
+
+#include 
+
+#include 
+#include 
+#include 
+
+using namespace css;
+
+namespace cui
+{
+FontFeaturesDialog::FontFeaturesDialog(vcl::Window* pParent, OUString const& 
rFontName)
+: ModalDialog(pParent, "FontFeaturesDialog", 
"cui/ui/fontfeaturesdialog.ui")
+, m_sFontName(rFontName)
+{
+get(m_pContentGrid, "contentGrid");
+get(m_pPreviewWindow, "preview");
+initialize();
+}
+
+FontFeaturesDialog::~FontFeaturesDialog() { disposeOnce(); }
+
+VclPtr makeEnumComboBox(vcl::Window* pParent,
+  vcl::font::FeatureDefinition const& 
rFeatureDefinition)
+{
+VclPtr aNameBox(
+VclPtr::Create(pParent, WB_TABSTOP | WB_DROPDOWN | 
WB_AUTOHSCROLL));
+aNameBox->InsertEntry(SvxResId(RID_SVXSTR_NONE));
+for (vcl::font::FeatureParameter const& rParameter : 
rFeatureDefinition.getEnumParameters())
+{
+aNameBox->InsertEntry(rParameter.getDescription());
+}
+aNameBox->EnableAutoSize(true);
+return aNameBox;
+}
+
+void FontFeaturesDialog::initialize()
+{
+ScopedVclPtrInstance aVDev(*Application::GetDefaultDevice(),
+  DeviceFormat::DEFAULT, 
DeviceFormat::DEFAULT);
+aVDev->SetOutputSizePixel(Size(10, 10));
+
+vcl::Font aFont = aVDev->GetFont();
+aFont.SetFamilyName(m_sFontName);
+aVDev->SetFont(aFont);
+
+std::vector rFontFeatures;
+
+if (!aVDev->GetFontFeatures(rFontFeatures))
+return;
+
+vcl::font::FeatureParser aParser(m_sFontName);
+std::unordered_map aExistingFeatures = 
aParser.getFeaturesMap();
+
+std::unordered_set aDoneFeatures;
+
+sal_Int32 i = 0;
+for (vcl::font::Feature const& rFontFeature : rFontFeatures)
+{
+sal_uInt32 nFontFeatureCode = rFontFeature.m_aID.m_aFeatureCode;
+
+if (aDoneFeatures.find(nFontFeatureCode) != aDoneFeatures.end())
+continue;
+
+aDoneFeatures.insert(nFontFeatureCode);
+
+vcl::font::FeatureDefinition aDefinition;
+if (rFontFeature.m_aDefinition)
+aDefinition = rFontFeature.m_aDefinition;
+if (!aDefinition)
+aDefinition = { nFontFeatureCode, nullptr };
+
+m_aFeatureItems.emplace_back();
+
+sal_uInt32 nValue = 0;
+if 

[Libreoffice-commits] core.git: cui/Library_cui.mk cui/source

2018-04-13 Thread Samuel Mehrbrodt
 cui/Library_cui.mk |1 
 cui/source/dialogs/SignSignatureLineDialog.cxx |  191 --
 cui/source/dialogs/SignatureLineDialog.cxx |  189 --
 cui/source/dialogs/SignatureLineDialogBase.cxx |  211 +
 cui/source/inc/SignSignatureLineDialog.hxx |   10 -
 cui/source/inc/SignatureLineDialog.hxx |   10 -
 cui/source/inc/SignatureLineDialogBase.hxx |   33 +++
 7 files changed, 254 insertions(+), 391 deletions(-)

New commits:
commit 53cc801ed93e4aa76c67ce6aeb0333a56049a1c1
Author: Samuel Mehrbrodt 
Date:   Thu Apr 12 17:29:56 2018 +0200

tdf#83877 Signatureline dialog: Move shared stuff to common base

Change-Id: I0af888f7b8cd3b7d58665a4b0b1ef18a7f9e98c2
Reviewed-on: https://gerrit.libreoffice.org/52788
Tested-by: Jenkins 
Reviewed-by: Samuel Mehrbrodt 

diff --git a/cui/Library_cui.mk b/cui/Library_cui.mk
index 877cd1182811..44bac812c557 100644
--- a/cui/Library_cui.mk
+++ b/cui/Library_cui.mk
@@ -121,6 +121,7 @@ $(eval $(call gb_Library_add_exception_objects,cui,\
 cui/source/dialogs/pastedlg \
 cui/source/dialogs/postdlg \
 cui/source/dialogs/scriptdlg \
+cui/source/dialogs/SignatureLineDialogBase \
 cui/source/dialogs/SignatureLineDialog \
 cui/source/dialogs/SignSignatureLineDialog \
 cui/source/dialogs/sdrcelldlg \
diff --git a/cui/source/dialogs/SignSignatureLineDialog.cxx 
b/cui/source/dialogs/SignSignatureLineDialog.cxx
index 94bb4497e93b..94366aa34f5c 100644
--- a/cui/source/dialogs/SignSignatureLineDialog.cxx
+++ b/cui/source/dialogs/SignSignatureLineDialog.cxx
@@ -47,17 +47,16 @@ using namespace css::graphic;
 using namespace css::security;
 
 SignSignatureLineDialog::SignSignatureLineDialog(weld::Widget* pParent, 
Reference xModel)
-: GenericDialogController(pParent, "cui/ui/signsignatureline.ui", 
"SignSignatureLineDialog")
+: SignatureLineDialogBase(pParent, xModel, "cui/ui/signsignatureline.ui",
+  "SignSignatureLineDialog")
 , m_xEditName(m_xBuilder->weld_entry("edit_name"))
 , m_xEditComment(m_xBuilder->weld_text_view("edit_comment"))
 , 
m_xBtnChooseCertificate(m_xBuilder->weld_button("btn_select_certificate"))
 , m_xBtnSign(m_xBuilder->weld_button("ok"))
-, m_xModel(xModel)
 {
 Reference 
xIndexAccess(m_xModel->getCurrentSelection(),
 UNO_QUERY_THROW);
 m_xShapeProperties.set(xIndexAccess->getByIndex(0), UNO_QUERY_THROW);
-//m_xShapeProperties = xProps;
 
 bool bIsSignatureLine;
 m_xShapeProperties->getPropertyValue("IsSignatureLine") >>= 
bIsSignatureLine;
@@ -90,14 +89,6 @@ 
SignSignatureLineDialog::SignSignatureLineDialog(weld::Widget* pParent, Referenc
 ValidateFields();
 }
 
-short SignSignatureLineDialog::execute()
-{
-short nRet = run();
-if (nRet == RET_OK)
-Apply();
-return nRet;
-}
-
 IMPL_LINK_NOARG(SignSignatureLineDialog, chooseCertificate, weld::Button&, 
void)
 {
 Reference 
xSigner(DocumentDigitalSignatures::createWithVersion(
@@ -162,182 +153,4 @@ OUString SignSignatureLineDialog::getCDataString(const 
OUString& rString)
 return "";
 }
 
-OUString SignSignatureLineDialog::getSignatureImage()
-{
-OUString const svg(
-"http://purl.org/dc/elements/1.1/\; 
xmlns:cc=\"http://creativecommons.org/ns#\; "
-"xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\; "
-"xmlns:svg=\"http://www.w3.org/2000/svg\; 
xmlns=\"http://www.w3.org/2000/svg\; "
-"xmlns:sodipodi=\"http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd\; 
"
-"xmlns:inkscape=\"http://www.inkscape.org/namespaces/inkscape\; 
version=\"1.2\" "
-"width=\"90mm\" height=\"45mm\" viewBox=\"0 0 9000 4500\" 
preserveAspectRatio=\"xMidYMid\" "
-"fill-rule=\"evenodd\" stroke-width=\"28.222\" 
stroke-linejoin=\"round\" "
-"xml:space=\"preserve\" id=\"svg577\" inkscape:version=\"0.92.2 
(5c3e80d, "
-"2017-08-06)\">image/svg+xmlhttp://purl.org/dc/dcmitype/StillImage\"/>150139132512: "
-"XPATHSTROKE_SEQ_BEGIN132133109512: 
XPATHSTROKE_SEQ_END14015013913313240150512: "
-"XTEXT_PAINTSHAPE_BEGIN138136135134113type: Text; content: "
-"[SIGNATURE]; [SIGNATURE]512: 
XTEXT_EOC512: XTEXT_EOC512: 
XTEXT_EOW512: XTEXT_EOC512: 
XTEXT_EOC512: XTEXT_EOC512: 
XTEXT_EOC512: XTEXT_EOC512: 
XTEXT_EOC512: XTEXT_EOC512: 
XTEXT_EOC512: XTEXT_EOC512: 
XTEXT_EOW512: XTEXT_EOL512: 
XTEXT_EOP512: 
XTEXT_PAINTSHAPE_END150512: "
-"XTEXT_PAINTSHAPE_BEGIN138136135134113type: Text; content: "
-"[SIGNER_NAME]; [SIGNER_NAME]512: 
XTEXT_EOC512: XTEXT_EOC512: 
XTEXT_EOW512: XTEXT_EOC512: 
XTEXT_EOC512: XTEXT_EOC512: 
XTEXT_EOC512: XTEXT_EOC512: 
XTEXT_EOC512: XTEXT_EOC512: 
XTEXT_EOC512: XTEXT_EOC512: 
XTEXT_EOC512: XTEXT_EOC512: 
XTEXT_EOW512: XTEXT_EOL512: 

[Libreoffice-commits] core.git: cui/Library_cui.mk cui/source cui/uiconfig cui/UIConfig_cui.mk include/svx include/vcl svx/Library_svx.mk svx/source svx/uiconfig svx/UIConfig_svx.mk sw/inc sw/source

2018-04-13 Thread Samuel Mehrbrodt
 cui/Library_cui.mk |1 +
 cui/UIConfig_cui.mk|1 +
 cui/source/dialogs/SignatureLineDialog.cxx |4 ++--
 cui/source/factory/cuiexp.cxx  |1 +
 cui/source/factory/dlgfact.cxx |   13 +
 cui/source/factory/dlgfact.hxx |   18 ++
 cui/source/inc/SignatureLineDialog.hxx |7 +++
 include/vcl/abstdlg.hxx|   13 +
 svx/Library_svx.mk |1 -
 svx/UIConfig_svx.mk|1 -
 sw/inc/swabstdlg.hxx   |4 
 sw/source/ui/dialog/swdlgfact.cxx  |   13 -
 sw/source/ui/dialog/swdlgfact.hxx  |   17 -
 sw/source/ui/dialog/swuiexp.cxx|1 -
 sw/source/uibase/uiview/viewdlg2.cxx   |9 -
 15 files changed, 56 insertions(+), 48 deletions(-)

New commits:
commit 6f6f37b7a48e30b976eb1806364c83b69047cab9
Author: Samuel Mehrbrodt 
Date:   Thu Apr 12 16:18:37 2018 +0200

tdf#83877 Move SignatureLineDialog to cui

next to SignSignatureLineDialog

Change-Id: I26efa96ec6dae4d9e091abc8cafd9b841118ef31
Reviewed-on: https://gerrit.libreoffice.org/52781
Tested-by: Jenkins 
Reviewed-by: Samuel Mehrbrodt 

diff --git a/cui/Library_cui.mk b/cui/Library_cui.mk
index afa01ef24a96..877cd1182811 100644
--- a/cui/Library_cui.mk
+++ b/cui/Library_cui.mk
@@ -121,6 +121,7 @@ $(eval $(call gb_Library_add_exception_objects,cui,\
 cui/source/dialogs/pastedlg \
 cui/source/dialogs/postdlg \
 cui/source/dialogs/scriptdlg \
+cui/source/dialogs/SignatureLineDialog \
 cui/source/dialogs/SignSignatureLineDialog \
 cui/source/dialogs/sdrcelldlg \
 cui/source/dialogs/showcols \
diff --git a/cui/UIConfig_cui.mk b/cui/UIConfig_cui.mk
index 8bf3c3073d06..be4a3ac180a8 100644
--- a/cui/UIConfig_cui.mk
+++ b/cui/UIConfig_cui.mk
@@ -180,6 +180,7 @@ $(eval $(call gb_UIConfig_add_uifiles,cui,\
cui/uiconfig/ui/shadowtabpage \
cui/uiconfig/ui/showcoldialog \
cui/uiconfig/ui/similaritysearchdialog \
+   cui/uiconfig/ui/signatureline \
cui/uiconfig/ui/signsignatureline \
cui/uiconfig/ui/slantcornertabpage \
cui/uiconfig/ui/smarttagoptionspage \
diff --git a/svx/source/dialog/SignatureLineDialog.cxx 
b/cui/source/dialogs/SignatureLineDialog.cxx
similarity index 99%
rename from svx/source/dialog/SignatureLineDialog.cxx
rename to cui/source/dialogs/SignatureLineDialog.cxx
index 41fe582714a9..bd2e79f9b961 100644
--- a/svx/source/dialog/SignatureLineDialog.cxx
+++ b/cui/source/dialogs/SignatureLineDialog.cxx
@@ -7,7 +7,7 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
  */
 
-#include 
+#include 
 
 #include 
 #include 
@@ -39,7 +39,7 @@ using namespace css::graphic;
 
 SignatureLineDialog::SignatureLineDialog(weld::Widget* pParent, 
Reference xModel,
  bool bEditExisting)
-: GenericDialogController(pParent, "svx/ui/signatureline.ui", 
"SignatureLineDialog")
+: GenericDialogController(pParent, "cui/ui/signatureline.ui", 
"SignatureLineDialog")
 , m_xEditName(m_xBuilder->weld_entry("edit_name"))
 , m_xEditTitle(m_xBuilder->weld_entry("edit_title"))
 , m_xEditEmail(m_xBuilder->weld_entry("edit_email"))
diff --git a/cui/source/factory/cuiexp.cxx b/cui/source/factory/cuiexp.cxx
index 104293936dec..c52f11f857be 100644
--- a/cui/source/factory/cuiexp.cxx
+++ b/cui/source/factory/cuiexp.cxx
@@ -41,6 +41,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
diff --git a/cui/source/factory/dlgfact.cxx b/cui/source/factory/dlgfact.cxx
index 5157aae3b303..a1cc05f2603d 100644
--- a/cui/source/factory/dlgfact.cxx
+++ b/cui/source/factory/dlgfact.cxx
@@ -60,6 +60,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -192,6 +193,11 @@ void AbstractSvxCharacterMapDialog_Impl::SetText(const 
OUString& rStr)
 m_xDlg->set_title(rStr);
 }
 
+short AbstractSignatureLineDialog_Impl::Execute()
+{
+return m_xDlg->execute();
+}
+
 short AbstractSignSignatureLineDialog_Impl::Execute()
 {
 return m_xDlg->execute();
@@ -1575,6 +1581,13 @@ VclPtr 
AbstractDialogFactory_Impl::CreateScreen
 return VclPtr::Create(pDlg);
 }
 
+VclPtr 
AbstractDialogFactory_Impl::CreateSignatureLineDialog(
+weld::Window* pParent, const Reference xModel, bool bEditExisting)
+{
+return VclPtr::Create(
+new SignatureLineDialog(pParent, xModel, bEditExisting));
+}
+
 VclPtr
 AbstractDialogFactory_Impl::CreateSignSignatureLineDialog(weld::Window* 
pParent,
   const 
Reference xModel)
diff --git a/cui/source/factory/dlgfact.hxx b/cui/source/factory/dlgfact.hxx
index a5f26ee47a48..df1eb99129c7 100644
--- 

[Libreoffice-commits] core.git: cui/Library_cui.mk cui/source

2017-07-22 Thread Muhammet Kara
 cui/Library_cui.mk|1 
 cui/source/customize/SvxConfigPageHelper.cxx  |  476 
 cui/source/customize/SvxMenuConfigPage.cxx|   11 
 cui/source/customize/SvxToolbarConfigPage.cxx |   23 -
 cui/source/customize/cfg.cxx  |   87 ++--
 cui/source/inc/SvxConfigPageHelper.hxx|   89 
 cui/source/inc/cfg.hxx|  502 --
 7 files changed, 627 insertions(+), 562 deletions(-)

New commits:
commit 9f45e431abf0cc24cb1db86a0dd0979848d8eb8d
Author: Muhammet Kara 
Date:   Wed Jul 5 10:36:06 2017 +0300

Add new helper class to cui for SvxConfigPage

And kill the temporary namespace killmelater.

This class will contain helper functions/methods
for use of the tab pages of the Customize Dialog.

Change-Id: I63a05c9495a79009ed5b47f7790a46cff9f58c6a
Reviewed-on: https://gerrit.libreoffice.org/39617
Tested-by: Jenkins 
Reviewed-by: Muhammet Kara 
Reviewed-on: https://gerrit.libreoffice.org/40308

diff --git a/cui/Library_cui.mk b/cui/Library_cui.mk
index 8f29a4fa3ce0..4efdb440b242 100644
--- a/cui/Library_cui.mk
+++ b/cui/Library_cui.mk
@@ -88,6 +88,7 @@ $(eval $(call gb_Library_add_exception_objects,cui,\
 cui/source/customize/cfgutil \
 cui/source/customize/eventdlg \
 cui/source/customize/macropg \
+cui/source/customize/SvxConfigPageHelper \
 cui/source/customize/SvxMenuConfigPage \
 cui/source/customize/SvxToolbarConfigPage \
 cui/source/dialogs/about \
diff --git a/cui/source/customize/SvxConfigPageHelper.cxx 
b/cui/source/customize/SvxConfigPageHelper.cxx
new file mode 100644
index ..0e8c9ec5e6e0
--- /dev/null
+++ b/cui/source/customize/SvxConfigPageHelper.cxx
@@ -0,0 +1,476 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ *   Licensed to the Apache Software Foundation (ASF) under one or more
+ *   contributor license agreements. See the NOTICE file distributed
+ *   with this work for additional information regarding copyright
+ *   ownership. The ASF licenses this file to you under the Apache
+ *   License, Version 2.0 (the "License"); you may not use this file
+ *   except in compliance with the License. You may obtain a copy of
+ *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#include "SvxConfigPageHelper.hxx"
+
+static sal_Int16 theImageType =
+css::ui::ImageType::COLOR_NORMAL |
+css::ui::ImageType::SIZE_DEFAULT;
+
+void SvxConfigPageHelper::RemoveEntry( SvxEntries* pEntries, SvxConfigEntry* 
pChildEntry )
+{
+SvxEntries::iterator iter = pEntries->begin();
+
+while ( iter != pEntries->end() )
+{
+if ( pChildEntry == *iter )
+{
+pEntries->erase( iter );
+break;
+}
+++iter;
+}
+}
+
+OUString SvxConfigPageHelper::replaceSaveInName( const OUString& rMessage, 
const OUString& rSaveInName )
+{
+const OUString placeholder("%SAVE IN SELECTION%" );
+
+OUString name = rMessage.replaceFirst(placeholder, rSaveInName);
+
+return name;
+}
+
+OUString SvxConfigPageHelper::stripHotKey( const OUString& str )
+{
+return str.replaceFirst("~", "");
+}
+
+OUString SvxConfigPageHelper::replaceSixteen( const OUString& str, sal_Int32 
nReplacement )
+{
+return str.replaceAll( OUString::number( 16 ), OUString::number( 
nReplacement ));
+}
+
+sal_Int16 SvxConfigPageHelper::GetImageType()
+{
+return theImageType;
+}
+
+void SvxConfigPageHelper::InitImageType()
+{
+theImageType =
+css::ui::ImageType::COLOR_NORMAL |
+css::ui::ImageType::SIZE_DEFAULT;
+
+if (SvtMiscOptions().GetSymbolsSize() == SFX_SYMBOLS_SIZE_LARGE)
+{
+theImageType |= css::ui::ImageType::SIZE_LARGE;
+}
+else if (SvtMiscOptions().GetSymbolsSize() == SFX_SYMBOLS_SIZE_32)
+{
+theImageType |= css::ui::ImageType::SIZE_32;
+}
+}
+
+css::uno::Reference< css::graphic::XGraphic > SvxConfigPageHelper::GetGraphic(
+const css::uno::Reference< css::ui::XImageManager >& xImageManager,
+const OUString& rCommandURL )
+{
+css::uno::Reference< css::graphic::XGraphic > result;
+
+if ( xImageManager.is() )
+{
+// TODO handle large graphics
+css::uno::Sequence< css::uno::Reference< css::graphic::XGraphic > > 
aGraphicSeq;
+
+css::uno::Sequence aImageCmdSeq { rCommandURL };
+
+try
+{
+aGraphicSeq =
+xImageManager->getImages( GetImageType(), aImageCmdSeq );
+
+ 

[Libreoffice-commits] core.git: cui/Library_cui.mk cui/source

2017-07-21 Thread Muhammet Kara
 cui/Library_cui.mk|1 
 cui/source/customize/SvxToolbarConfigPage.cxx | 1169 
 cui/source/customize/cfg.cxx  | 1504 ++
 cui/source/inc/SvxMenuConfigPage.hxx  |4 
 cui/source/inc/SvxToolbarConfigPage.hxx   |  128 ++
 cui/source/inc/cfg.hxx|  239 ++--
 6 files changed, 1600 insertions(+), 1445 deletions(-)

New commits:
commit 8e71acc7b775aa4ad93b45aa18d0ec7d6a47a314
Author: Muhammet Kara 
Date:   Thu Jun 29 14:50:36 2017 +0300

Separate SvxToolbarConfigPage from cfg.cxx

Change-Id: I4aa504b92e9507635152c623a07d0538079860de
Reviewed-on: https://gerrit.libreoffice.org/39389
Tested-by: Jenkins 
Reviewed-by: Katarina Behrens 
Reviewed-on: https://gerrit.libreoffice.org/40297
Reviewed-by: Muhammet Kara 

diff --git a/cui/Library_cui.mk b/cui/Library_cui.mk
index 2f3bd0d5881b..8f29a4fa3ce0 100644
--- a/cui/Library_cui.mk
+++ b/cui/Library_cui.mk
@@ -89,6 +89,7 @@ $(eval $(call gb_Library_add_exception_objects,cui,\
 cui/source/customize/eventdlg \
 cui/source/customize/macropg \
 cui/source/customize/SvxMenuConfigPage \
+cui/source/customize/SvxToolbarConfigPage \
 cui/source/dialogs/about \
 cui/source/dialogs/colorpicker \
 cui/source/dialogs/cuicharmap \
diff --git a/cui/source/customize/SvxToolbarConfigPage.cxx 
b/cui/source/customize/SvxToolbarConfigPage.cxx
new file mode 100644
index ..272409d2825e
--- /dev/null
+++ b/cui/source/customize/SvxToolbarConfigPage.cxx
@@ -0,0 +1,1169 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ *   Licensed to the Apache Software Foundation (ASF) under one or more
+ *   contributor license agreements. See the NOTICE file distributed
+ *   with this work for additional information regarding copyright
+ *   ownership. The ASF licenses this file to you under the Apache
+ *   License, Version 2.0 (the "License"); you may not use this file
+ *   except in compliance with the License. You may obtain a copy of
+ *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#include "sal/config.h"
+
+#include 
+#include 
+#include 
+#include 
+
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include "svtools/treelistentry.hxx"
+#include "svtools/viewdataentry.hxx"
+#include 
+#include 
+
+#include 
+#include "helpids.h"
+#include "strings.hrc"
+
+#include "acccfg.hxx"
+#include "cfg.hxx"
+#include "SvxToolbarConfigPage.hxx"
+#include "eventdlg.hxx"
+#include 
+
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include "com/sun/star/ui/dialogs/TemplateDescription.hpp"
+#include 
+#include 
+
+#include "dlgname.hxx"
+
+SvxToolbarConfigPage::SvxToolbarConfigPage(vcl::Window *pParent, const 
SfxItemSet& rSet)
+: SvxConfigPage(pParent, rSet)
+, m_pMenu(get_menu("modifymenu"))
+, m_pEntry(get_menu("contentmenu"))
+{
+SetHelpId( HID_SVX_CONFIG_TOOLBAR );
+
+m_pContentsListBox = VclPtr::Create(m_pEntries, 
this);
+m_pContentsListBox->set_grid_left_attach(0);
+m_pContentsListBox->set_grid_top_attach(0);
+m_pContentsListBox->set_hexpand(true);
+m_pContentsListBox->set_vexpand(true);
+m_pContentsListBox->Show();
+
+m_pTopLevelListBox->SetHelpId ( HID_SVX_TOPLEVELLISTBOX );
+m_pIconsOnlyRB->SetHelpId ( HID_SVX_ICONSONLY );
+m_pTextOnlyRB->SetHelpId ( HID_SVX_TEXTONLY );
+m_pIconsAndTextRB->SetHelpId ( HID_SVX_ICONSANDTEXT );
+m_pContentsListBox->SetHelpId( HID_SVX_CONFIG_TOOLBAR_CONTENTS );
+m_pNewTopLevelButton->SetHelpId( HID_SVX_NEW_TOOLBAR );
+m_pModifyTopLevelButton->SetHelpId( HID_SVX_MODIFY_TOOLBAR );
+m_pAddCommandsButton->SetHelpId( HID_SVX_NEW_TOOLBAR_ITEM );
+m_pAddSeparatorButton->SetHelpId ( HID_SVX_ADD_SEPARATOR );
+m_pModifyCommandButton->SetHelpId( HID_SVX_MODIFY_TOOLBAR_ITEM );
+m_pDeleteCommandButton->SetHelpId ( HID_SVX_REMOVEBUTTON );
+m_pResetTopLevelButton->SetHelpId ( HID_SVX_RESETBUTTON );
+

[Libreoffice-commits] core.git: cui/Library_cui.mk cui/source

2017-07-19 Thread Muhammet Kara
 cui/Library_cui.mk |1 
 cui/source/customize/SvxMenuConfigPage.cxx |  526 +
 cui/source/customize/cfg.cxx   |  423 ---
 cui/source/inc/SvxMenuConfigPage.hxx   |   87 
 cui/source/inc/cfg.hxx |   90 ++--
 5 files changed, 670 insertions(+), 457 deletions(-)

New commits:
commit 887e9829dc22883386934993b14374b8559cc95e
Author: Muhammet Kara 
Date:   Fri Jun 23 15:09:10 2017 +0300

Separate SvxMenuConfigPage from cfg.cxx

Change-Id: I6e56756628bbbf3900f946715ce8b95bbe78ae03
Reviewed-on: https://gerrit.libreoffice.org/39341
Tested-by: Jenkins 
Reviewed-by: Katarina Behrens 
(cherry picked from commit 091a7f474adac69b1808e5c812952586d253a809)
Reviewed-on: https://gerrit.libreoffice.org/39956

diff --git a/cui/Library_cui.mk b/cui/Library_cui.mk
index 2b9663a7cc93..e308679ae69e 100644
--- a/cui/Library_cui.mk
+++ b/cui/Library_cui.mk
@@ -88,6 +88,7 @@ $(eval $(call gb_Library_add_exception_objects,cui,\
 cui/source/customize/cfgutil \
 cui/source/customize/eventdlg \
 cui/source/customize/macropg \
+cui/source/customize/SvxMenuConfigPage \
 cui/source/dialogs/about \
 cui/source/dialogs/colorpicker \
 cui/source/dialogs/cuicharmap \
diff --git a/cui/source/customize/SvxMenuConfigPage.cxx 
b/cui/source/customize/SvxMenuConfigPage.cxx
new file mode 100644
index ..48ab816a12aa
--- /dev/null
+++ b/cui/source/customize/SvxMenuConfigPage.cxx
@@ -0,0 +1,526 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ *   Licensed to the Apache Software Foundation (ASF) under one or more
+ *   contributor license agreements. See the NOTICE file distributed
+ *   with this work for additional information regarding copyright
+ *   ownership. The ASF licenses this file to you under the Apache
+ *   License, Version 2.0 (the "License"); you may not use this file
+ *   except in compliance with the License. You may obtain a copy of
+ *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#include "sal/config.h"
+
+#include 
+#include 
+#include 
+#include 
+
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include "svtools/treelistentry.hxx"
+#include "svtools/viewdataentry.hxx"
+#include 
+#include 
+
+#include 
+#include 
+#include "helpid.hrc"
+
+#include "acccfg.hxx"
+#include "cfg.hxx"
+#include "SvxMenuConfigPage.hxx"
+#include "eventdlg.hxx"
+#include 
+
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include "com/sun/star/ui/dialogs/TemplateDescription.hpp"
+#include 
+#include 
+
+#include "dlgname.hxx"
+
+SvxMenuConfigPage::SvxMenuConfigPage(vcl::Window *pParent, const SfxItemSet& 
rSet, bool bIsMenuBar)
+: SvxConfigPage(pParent, rSet)
+, m_bIsMenuBar( bIsMenuBar )
+{
+m_pContentsListBox = VclPtr::Create(m_pEntries, 
this);
+m_pContentsListBox->set_grid_left_attach(0);
+m_pContentsListBox->set_grid_top_attach(0);
+m_pContentsListBox->set_hexpand(true);
+m_pContentsListBox->set_vexpand(true);
+m_pContentsListBox->Show();
+
+m_pAddSubmenuButton->Enable();
+m_pAddSubmenuButton->Show();
+
+m_pTopLevelListBox->SetSelectHdl(
+LINK( this, SvxMenuConfigPage, SelectMenu ) );
+
+m_pContentsListBox->SetSelectHdl(
+LINK( this, SvxMenuConfigPage, SelectMenuEntry ) );
+
+m_pMoveUpButton->SetClickHdl ( LINK( this, SvxConfigPage, MoveHdl) );
+m_pMoveDownButton->SetClickHdl ( LINK( this, SvxConfigPage, MoveHdl) );
+
+m_pNewTopLevelButton->SetClickHdl  (
+LINK( this, SvxMenuConfigPage, NewMenuHdl ) );
+
+m_pAddCommandsButton->SetClickHdl  (
+LINK( this, SvxMenuConfigPage, AddCommandsHdl ) );
+
+m_pAddSeparatorButton->SetClickHdl  (
+LINK( this, SvxMenuConfigPage, AddSeparatorHdl ) );
+
+m_pAddSubmenuButton->SetClickHdl  (
+LINK( this, SvxMenuConfigPage, AddSubmenuHdl ) );
+
+m_pDeleteCommandButton->SetClickHdl  (
+LINK( this, SvxMenuConfigPage, 

[Libreoffice-commits] core.git: cui/Library_cui.mk cui/source icon-themes/breeze icon-themes/galaxy include/sfx2 officecfg/registry sc/sdi sc/source sd/sdi sd/source sfx2/Library_sfx.mk sfx2/sdi sfx2/

2017-07-06 Thread Akshay Deep
 cui/Library_cui.mk   |1 
 cui/source/inc/cuicharmap.hxx|2 
 icon-themes/breeze/cmd/lc_charmapcontrol.png |binary
 icon-themes/breeze/cmd/sc_charmapcontrol.png |binary
 icon-themes/galaxy/cmd/lc_charmapcontrol.png |binary
 icon-themes/galaxy/cmd/sc_charmapcontrol.png |binary
 include/sfx2/charmapcontrol.hxx  |   58 ++
 include/sfx2/charmappopup.hxx|   41 +
 include/sfx2/charwin.hxx |9 
 include/sfx2/sfxsids.hrc |1 
 officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu |   11 
 sc/sdi/cellsh.sdi|1 
 sc/sdi/drtxtob.sdi   |1 
 sc/sdi/editsh.sdi|1 
 sc/source/ui/app/scdll.cxx   |2 
 sd/sdi/_drvwsh.sdi   |5 
 sd/sdi/outlnvsh.sdi  |5 
 sd/source/ui/app/sddll.cxx   |2 
 sfx2/Library_sfx.mk  |3 
 sfx2/UIConfig_sfx.mk |1 
 sfx2/sdi/sfx.sdi |   18 
 sfx2/source/control/charmapcontrol.cxx   |  192 

 sfx2/source/control/charwin.cxx  |   12 
 sfx2/source/dialog/charmappopup.cxx  |   47 +
 sfx2/uiconfig/ui/charmapcontrol.ui   |  236 
++
 sw/sdi/_annotsh.sdi  |5 
 sw/sdi/_textsh.sdi   |7 
 sw/sdi/drwtxtsh.sdi  |5 
 sw/source/uibase/app/swmodule.cxx|3 
 sw/source/uibase/shells/textsh1.cxx  |1 
 sw/source/uibase/uiview/view.cxx |2 
 sw/uiconfig/swriter/toolbar/standardbar.xml  |1 
 32 files changed, 660 insertions(+), 13 deletions(-)

New commits:
commit 800ac37021e3f8859a52c5eebca261a5d3bc5a11
Author: Akshay Deep 
Date:   Mon Jun 19 11:34:48 2017 +0530

GSoC: Recent Charaters Toolbar Dropdown Control

Change-Id: Ib04d26fa5556e5c32db6799c16d0bbedc45504ec
Reviewed-on: https://gerrit.libreoffice.org/38944
Reviewed-by: Akshay Deep 
Tested-by: Akshay Deep 
Reviewed-by: Samuel Mehrbrodt 

diff --git a/cui/Library_cui.mk b/cui/Library_cui.mk
index 4f1a89dffa83..2b9663a7cc93 100644
--- a/cui/Library_cui.mk
+++ b/cui/Library_cui.mk
@@ -91,7 +91,6 @@ $(eval $(call gb_Library_add_exception_objects,cui,\
 cui/source/dialogs/about \
 cui/source/dialogs/colorpicker \
 cui/source/dialogs/cuicharmap \
-cui/source/dialogs/charwin \
 cui/source/dialogs/cuifmsearch \
 cui/source/dialogs/cuigaldlg \
 cui/source/dialogs/cuigrfflt \
diff --git a/cui/source/inc/cuicharmap.hxx b/cui/source/inc/cuicharmap.hxx
index f3618bc9d51e..9d4f5604fb17 100644
--- a/cui/source/inc/cuicharmap.hxx
+++ b/cui/source/inc/cuicharmap.hxx
@@ -26,7 +26,7 @@
 #include 
 #include 
 #include 
-#include "charwin.hxx"
+#include 
 
 using namespace ::com::sun::star;
 class SubsetMap;
diff --git a/icon-themes/breeze/cmd/lc_charmapcontrol.png 
b/icon-themes/breeze/cmd/lc_charmapcontrol.png
new file mode 100644
index ..00a81c1bbc11
Binary files /dev/null and b/icon-themes/breeze/cmd/lc_charmapcontrol.png differ
diff --git a/icon-themes/breeze/cmd/sc_charmapcontrol.png 
b/icon-themes/breeze/cmd/sc_charmapcontrol.png
new file mode 100644
index ..d61735c3505d
Binary files /dev/null and b/icon-themes/breeze/cmd/sc_charmapcontrol.png differ
diff --git a/icon-themes/galaxy/cmd/lc_charmapcontrol.png 
b/icon-themes/galaxy/cmd/lc_charmapcontrol.png
new file mode 100644
index ..f0020188ef09
Binary files /dev/null and b/icon-themes/galaxy/cmd/lc_charmapcontrol.png differ
diff --git a/icon-themes/galaxy/cmd/sc_charmapcontrol.png 
b/icon-themes/galaxy/cmd/sc_charmapcontrol.png
new file mode 100644
index ..bf0e63a7a522
Binary files /dev/null and b/icon-themes/galaxy/cmd/sc_charmapcontrol.png differ
diff --git a/include/sfx2/charmapcontrol.hxx b/include/sfx2/charmapcontrol.hxx
new file mode 100644
index ..643978dc13eb
--- /dev/null
+++ 

[Libreoffice-commits] core.git: cui/Library_cui.mk cui/source cui/uiconfig extras/source officecfg/registry

2017-06-19 Thread Akshay Deep
 cui/Library_cui.mk |1 
 cui/source/dialogs/charwin.cxx |  213 +
 cui/source/dialogs/cuicharmap.cxx  |  504 +++--
 cui/source/factory/init.cxx|5 
 cui/source/inc/charwin.hxx |   56 +
 cui/source/inc/cuicharmap.hxx  |   22 
 cui/uiconfig/ui/specialcharacters.ui   |  278 ++-
 extras/source/glade/libreoffice-catalog.xml.in |3 
 officecfg/registry/schema/org/openoffice/Office/Common.xcs |   17 
 9 files changed, 854 insertions(+), 245 deletions(-)

New commits:
commit 710a39414569995bd5a8631a948c939dc73bcef9
Author: Akshay Deep 
Date:   Thu May 11 13:27:38 2017 +0530

GSoC: Glyph View and Recent Characters Control in Special Characters dialog

Change-Id: Ia55f3fefe7c14327cff2e996ab0038dc52f9b017
Reviewed-on: https://gerrit.libreoffice.org/37496
Reviewed-by: Samuel Mehrbrodt 
Tested-by: Samuel Mehrbrodt 

diff --git a/cui/Library_cui.mk b/cui/Library_cui.mk
index 2b9663a7cc93..4f1a89dffa83 100644
--- a/cui/Library_cui.mk
+++ b/cui/Library_cui.mk
@@ -91,6 +91,7 @@ $(eval $(call gb_Library_add_exception_objects,cui,\
 cui/source/dialogs/about \
 cui/source/dialogs/colorpicker \
 cui/source/dialogs/cuicharmap \
+cui/source/dialogs/charwin \
 cui/source/dialogs/cuifmsearch \
 cui/source/dialogs/cuigaldlg \
 cui/source/dialogs/cuigrfflt \
diff --git a/cui/source/dialogs/charwin.cxx b/cui/source/dialogs/charwin.cxx
new file mode 100644
index ..5f9a7fa49765
--- /dev/null
+++ b/cui/source/dialogs/charwin.cxx
@@ -0,0 +1,213 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ *   Licensed to the Apache Software Foundation (ASF) under one or more
+ *   contributor license agreements. See the NOTICE file distributed
+ *   with this work for additional information regarding copyright
+ *   ownership. The ASF licenses this file to you under the Apache
+ *   License, Version 2.0 (the "License"); you may not use this file
+ *   except in compliance with the License. You may obtain a copy of
+ *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#include 
+#include 
+#include "charwin.hxx"
+#include 
+#include 
+#include 
+#include "cuicharmap.hxx"
+#include "macroass.hxx"
+
+using namespace com::sun::star;
+
+
+SvxCharView::SvxCharView(vcl::Window* pParent)
+: Control(pParent, WB_TABSTOP | WB_BORDER)
+, mnY(0)
+{
+}
+
+VCL_BUILDER_FACTORY(SvxCharView)
+
+void SvxCharView::MouseButtonDown( const MouseEvent& rMEvt )
+{
+if ( rMEvt.IsLeft() )
+{
+maMouseClickHdl.Call(this);
+if ( !(rMEvt.GetClicks() % 2) )
+{
+InsertCharToDoc();
+}
+}
+
+Control::MouseButtonDown(rMEvt);
+}
+
+void SvxCharView::KeyInput( const KeyEvent& rKEvt )
+{
+vcl::KeyCode aCode = rKEvt.GetKeyCode();
+
+switch (aCode.GetCode())
+{
+case KEY_SPACE:
+case KEY_RETURN:
+InsertCharToDoc();
+break;
+}
+Control::KeyInput(rKEvt);
+}
+
+void SvxCharView::InsertCharToDoc()
+{
+if(GetText().isEmpty())
+return;
+
+uno::Reference< uno::XComponentContext > xContext( 
comphelper::getProcessComponentContext() );
+
+uno::Sequence aArgs(2);
+aArgs[0].Name = OUString::fromUtf8("Symbols");
+aArgs[0].Value <<= GetText();
+
+aArgs[1].Name = OUString::fromUtf8("FontName");
+aArgs[1].Value <<= maFont.GetFamilyName();
+
+comphelper::dispatchCommand(".uno:InsertSymbol", aArgs);
+}
+
+void SvxCharView::Paint(vcl::RenderContext& rRenderContext, const 
::tools::Rectangle&)
+{
+rRenderContext.SetFont(maFont);
+
+const StyleSettings& rStyleSettings = 
Application::GetSettings().GetStyleSettings();
+const Color aWindowTextColor(rStyleSettings.GetFieldTextColor());
+Color aHighlightColor(rStyleSettings.GetHighlightColor());
+Color aHighlightTextColor(rStyleSettings.GetHighlightTextColor());
+Color aLightColor(rStyleSettings.GetLightColor());
+
+const OUString aText = GetText();
+const Size aSize(GetOutputSizePixel());
+
+long nAvailWidth = aSize.Width();
+long nWinHeight = GetOutputSizePixel().Height();
+
+bool bGotBoundary = true;
+bool bShrankFont = false;
+vcl::Font aOrigFont(rRenderContext.GetFont());
+Size aFontSize(aOrigFont.GetFontSize());
+::tools::Rectangle aBoundRect;
+
+for (long 

[Libreoffice-commits] core.git: cui/Library_cui.mk cui/source cui/uiconfig extras/source

2017-05-09 Thread Maxim Monastirsky
 cui/Library_cui.mk |1 
 cui/source/customize/cfgutil.cxx   |  586 +
 cui/source/customize/eventdlg.cxx  |2 
 cui/source/customize/macropg.cxx   |2 
 cui/source/customize/selector.cxx  | 1061 -
 cui/source/dialogs/scriptdlg.cxx   |2 
 cui/source/factory/cuiexp.cxx  |2 
 cui/source/factory/dlgfact.cxx |2 
 cui/source/inc/cfg.hxx |2 
 cui/source/inc/cfgutil.hxx |   58 +
 cui/source/inc/selector.hxx|  222 -
 cui/uiconfig/ui/macroselectordialog.ui |8 
 extras/source/glade/libreoffice-catalog.xml.in |6 
 13 files changed, 461 insertions(+), 1493 deletions(-)

New commits:
commit e4d7511d7e49af14e3c8113bb1440e0eb04f40ad
Author: Maxim Monastirsky 
Date:   Tue May 9 09:30:54 2017 +0300

tdf#106681 Styles category for the Add Commands dialog

Change-Id: I7332967863697d3ad68a533b9fc603de2fdc87ef
Reviewed-on: https://gerrit.libreoffice.org/37422
Reviewed-by: Maxim Monastirsky 
Tested-by: Maxim Monastirsky 

diff --git a/cui/Library_cui.mk b/cui/Library_cui.mk
index 813bff0eba0c..7eb55fb05375 100644
--- a/cui/Library_cui.mk
+++ b/cui/Library_cui.mk
@@ -89,7 +89,6 @@ $(eval $(call gb_Library_add_exception_objects,cui,\
 cui/source/customize/cfgutil \
 cui/source/customize/eventdlg \
 cui/source/customize/macropg \
-cui/source/customize/selector \
 cui/source/dialogs/about \
 cui/source/dialogs/colorpicker \
 cui/source/dialogs/cuicharmap \
diff --git a/cui/source/customize/cfgutil.cxx b/cui/source/customize/cfgutil.cxx
index 8ca7a614b315..c6e310e6505c 100644
--- a/cui/source/customize/cfgutil.cxx
+++ b/cui/source/customize/cfgutil.cxx
@@ -18,6 +18,7 @@
  */
 
 #include "cfgutil.hxx"
+#include "cfg.hxx"
 
 #include 
 #include 
@@ -26,7 +27,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 
@@ -60,6 +60,11 @@
 #include "dialmgr.hxx"
 #include 
 #include 
+#include 
+#include 
+#include 
+#include 
+#include 
 #include 
 
 using namespace ::com::sun::star;
@@ -308,6 +313,27 @@ OUString SfxConfigFunctionListBox::GetSelectedScriptURI()
 return OUString();
 }
 
+OUString SfxConfigFunctionListBox::GetHelpText()
+{
+SvTreeListEntry *pEntry = FirstSelected();
+if ( pEntry )
+{
+SfxGroupInfo_Impl *pData = 
static_cast(pEntry->GetUserData());
+if ( pData )
+{
+if ( pData->nKind == SfxCfgKind::FUNCTION_SLOT )
+{
+return Application::GetHelp()->GetHelpText( pData->sCommand, 
this );
+}
+else if ( pData->nKind == SfxCfgKind::FUNCTION_SCRIPT )
+{
+return pData->sHelpText;
+}
+}
+}
+return OUString();
+}
+
 OUString SfxConfigFunctionListBox::GetCurCommand()
 {
 SvTreeListEntry *pEntry = FirstSelected();
@@ -371,7 +397,10 @@ 
SvxConfigGroupBoxResource_Impl::SvxConfigGroupBoxResource_Impl() :
 
 SfxConfigGroupListBox::SfxConfigGroupListBox(vcl::Window* pParent, WinBits 
nStyle)
 : SvTreeListBox(pParent, nStyle)
-, xImp(new SvxConfigGroupBoxResource_Impl()), pFunctionListBox(nullptr), 
pStylesInfo(nullptr)
+, xImp(new SvxConfigGroupBoxResource_Impl())
+, pFunctionListBox(nullptr)
+, m_pImageProvider(nullptr)
+, pStylesInfo(nullptr)
 {
 SetStyle( GetStyle() | WB_CLIPCHILDREN | WB_HSCROLL | WB_HASBUTTONS | 
WB_HASLINES | WB_HASLINESATROOT | WB_HASBUTTONSATROOT );
 SetNodeBitmaps(xImp->m_collapsedImage, xImp->m_expandedImage);
@@ -426,6 +455,14 @@ void SfxConfigGroupListBox::InitModule()
 sal_Int32   c1  = lGroups.getLength();
 sal_Int32   i1  = 0;
 
+if ( c1 )
+{
+// Add All Commands category
+SvTreeListEntry* pEntry = InsertEntry( 
CUI_RES(RID_SVXSTR_ALLFUNCTIONS) );
+aArr.push_back( o3tl::make_unique( 
SfxCfgKind::GROUP_ALLFUNCTIONS, 0 ) );
+pEntry->SetUserData(aArr.back().get());
+}
+
 for (i1=0; i1SetUserData(pInfo);
+aArr.push_back( o3tl::make_unique( 
SfxCfgKind::GROUP_FUNCTION, rGroupID ) );
+pEntry->SetUserData(aArr.back().get());
 }
 }
 catch(const css::uno::RuntimeException&)
@@ -506,6 +543,131 @@ namespace
 }
 
 
+void SfxConfigGroupListBox::FillScriptList(const 

[Libreoffice-commits] core.git: cui/Library_cui.mk cui/source cui/uiconfig cui/UIConfig_cui.mk

2016-07-26 Thread Rishabh Kumar
 cui/Library_cui.mk   |1 
 cui/UIConfig_cui.mk  |1 
 cui/source/inc/cuitabarea.hxx|   61 +-
 cui/source/tabpages/tabarea.cxx  |   11 +
 cui/source/tabpages/tpbitmap.cxx |  396 +++
 cui/uiconfig/ui/areadialog.ui|   18 +
 cui/uiconfig/ui/bitmaptabpage.ui |  142 +
 7 files changed, 627 insertions(+), 3 deletions(-)

New commits:
commit a44a0690da6d7cdc173fffea2b87ca899eb41ecd
Author: Rishabh Kumar 
Date:   Tue Jul 26 22:54:24 2016 +0530

[GSoC] Add Bitmap tab to area dialog

Change-Id: I6549e7eb4efd24d035b0383a750698a4c3f16cf7
Reviewed-on: https://gerrit.libreoffice.org/27546
Tested-by: Jenkins 
Reviewed-by: Samuel Mehrbrodt 

diff --git a/cui/Library_cui.mk b/cui/Library_cui.mk
index c81ef962..2196201 100644
--- a/cui/Library_cui.mk
+++ b/cui/Library_cui.mk
@@ -197,6 +197,7 @@ $(eval $(call gb_Library_add_exception_objects,cui,\
 cui/source/tabpages/textanim \
 cui/source/tabpages/textattr \
 cui/source/tabpages/tparea \
+cui/source/tabpages/tpbitmap \
 cui/source/tabpages/tpcolor \
 cui/source/tabpages/tpgradnt \
 cui/source/tabpages/tphatch \
diff --git a/cui/UIConfig_cui.mk b/cui/UIConfig_cui.mk
index 60c8d18..df494ce 100644
--- a/cui/UIConfig_cui.mk
+++ b/cui/UIConfig_cui.mk
@@ -27,6 +27,7 @@ $(eval $(call gb_UIConfig_add_uifiles,cui,\
cui/uiconfig/ui/autocorrectdialog \
cui/uiconfig/ui/backgroundpage \
cui/uiconfig/ui/baselinksdialog \
+   cui/uiconfig/ui/bitmaptabpage \
cui/uiconfig/ui/blackorwhitelistentrydialog \
cui/uiconfig/ui/borderareatransparencydialog \
cui/uiconfig/ui/borderbackgrounddialog \
diff --git a/cui/source/inc/cuitabarea.hxx b/cui/source/inc/cuitabarea.hxx
index 46cb922..54bd78b 100644
--- a/cui/source/inc/cuitabarea.hxx
+++ b/cui/source/inc/cuitabarea.hxx
@@ -46,7 +46,7 @@ class SvxAreaTabDialog : public SfxTabDialog
 sal_uInt16m_nColorTabPage;
 sal_uInt16m_nGradientTabPage;
 sal_uInt16m_nHatchTabPage;
-//sal_uInt16m_nBitmapTabPage;
+sal_uInt16m_nBitmapTabPage;
 sal_uInt16m_nPatternTabPage;
 
 private:
@@ -553,6 +553,65 @@ public:
 
 //
 
+class SvxBitmapTabPage : public SvxTabPage
+{
+using TabPage::ActivatePage;
+using TabPage::DeactivatePage;
+private:
+
+VclPtr   m_pBitmapLB;
+VclPtr m_pBtnImport;
+VclPtrm_pCtlBitmapPreview;
+
+const SfxItemSet&  m_rOutAttrs;
+
+XBitmapListRef m_pBitmapList;
+ChangeType*m_pnBitmapListState;
+XFillStyleItem m_aXFStyleItem;
+XFillBitmapItemm_aXBitmapItem;
+
+sal_uInt16*m_nPageType;
+sal_uInt16 m_nDlgType;
+sal_Int32* m_nPos;
+
+bool*  m_pbAreaTP;
+
+XFillAttrSetItem   m_aXFillAttr;
+SfxItemSet&m_rXFSet;
+
+DECL_LINK_TYPED( ModifyBitmapHdl, ValueSet*, void );
+DECL_LINK_TYPED( ClickRenameHdl, SvxPresetListBox*, void );
+DECL_LINK_TYPED( ClickDeleteHdl, SvxPresetListBox*, void );
+DECL_LINK_TYPED( ClickImportHdl, Button*, void );
+void ClickBitmapHdl_Impl();
+sal_Int32 SearchBitmapList(const OUString& rBitmapName);
+
+public:
+SvxBitmapTabPage( vcl::Window* pParent, const SfxItemSet& rInAttrs );
+virtual ~SvxBitmapTabPage();
+virtual void dispose() override;
+
+voidConstruct();
+
+static VclPtr Create( vcl::Window*, const SfxItemSet* );
+
+virtual bool FillItemSet( SfxItemSet* ) override;
+virtual void Reset( const SfxItemSet * ) override;
+virtual void ActivatePage( const SfxItemSet& rSet ) override;
+virtual DeactivateRC DeactivatePage( SfxItemSet* pSet ) override;
+virtual void PointChanged( vcl::Window* pWindow, RECT_POINT eRP ) override;
+
+voidSetBitmapList( XBitmapListRef pBmpLst) { m_pBitmapList = pBmpLst; }
+
+voidSetPageType( sal_uInt16* pInType ) { m_nPageType = pInType; }
+voidSetDlgType( sal_uInt16 nInType ) { m_nDlgType = nInType; }
+voidSetPos( sal_Int32* pInPos ) { m_nPos = pInPos; }
+voidSetAreaTP( bool* pIn ) { m_pbAreaTP = pIn; }
+voidSetBmpChgd( ChangeType* pIn ) { m_pnBitmapListState = pIn; }
+};
+
+//
+
 class SvxPatternTabPage : public SvxTabPage
 {
 using TabPage::ActivatePage;
diff --git a/cui/source/tabpages/tabarea.cxx b/cui/source/tabpages/tabarea.cxx
index e6b9ae6..a1b7c8d 100644
--- a/cui/source/tabpages/tabarea.cxx
+++ b/cui/source/tabpages/tabarea.cxx
@@ -92,6 +92,7 @@ SvxAreaTabDialog::SvxAreaTabDialog
 m_nColorTabPage = AddTabPage( "RID_SVXPAGE_COLOR", 

[Libreoffice-commits] core.git: cui/Library_cui.mk cui/source cui/uiconfig cui/UIConfig_cui.mk extras/Package_palettes.mk extras/source include/svx scp2/source sc/sdi sc/source sd/sdi sd/source svx/Li

2016-06-28 Thread Rishabh Kumar
 cui/Library_cui.mk|2 
 cui/UIConfig_cui.mk   |2 
 cui/source/inc/cuires.hrc |2 
 cui/source/inc/cuitabarea.hxx |   41 
 cui/source/tabpages/strings.src   |8 
 cui/source/tabpages/tabarea.cxx   |   51 -
 cui/source/tabpages/tpbitmap.cxx  |  979 --
 cui/source/tabpages/tppattern.cxx |  876 +++
 cui/uiconfig/ui/areadialog.ui |4 
 cui/uiconfig/ui/bitmaptabpage.ui  |  347 ---
 cui/uiconfig/ui/patterntabpage.ui |  334 +++
 extras/Package_palettes.mk|1 
 extras/source/glade/libreoffice-catalog.xml.in|   11 
 extras/source/palettes/standard.sob   |binary
 extras/source/palettes/standard.sop   |binary
 include/svx/dialogs.hrc   |3 
 include/svx/dlgctrl.hxx   |   19 
 include/svx/drawitem.hxx  |   24 
 include/svx/sidebar/AreaPropertyPanelBase.hxx |2 
 include/svx/svdmodel.hxx  |1 
 include/svx/svxids.hrc|   39 
 include/svx/xtable.hxx|   26 
 sc/sdi/drawsh.sdi |1 
 sc/source/ui/docshell/docsh2.cxx  |1 
 scp2/source/ooo/registryitem_ooo.scp  |7 
 sd/sdi/_drvwsh.sdi|4 
 sd/source/ui/dlg/dlgpage.cxx  |4 
 sd/source/ui/dlg/prltempl.cxx |2 
 sd/source/ui/dlg/tabtempl.cxx |2 
 sd/source/ui/docshell/docshell.cxx|1 
 sd/source/ui/inc/dlgpage.hxx  |1 
 sd/source/ui/inc/prltempl.hxx |1 
 sd/source/ui/inc/tabtempl.hxx |1 
 sd/source/ui/sidebar/SlideBackground.cxx  |  156 ++-
 sd/source/ui/sidebar/SlideBackground.hxx  |1 
 svx/Library_svxcore.mk|1 
 svx/sdi/svx.sdi   |   16 
 svx/sdi/svxitems.sdi  |1 
 svx/source/dialog/dlgctrl.cxx |  155 +++
 svx/source/dialog/hdft.cxx|3 
 svx/source/dialog/sdstring.src|   10 
 svx/source/items/drawitem.cxx |   42 
 svx/source/sidebar/area/AreaPropertyPanel.cxx |2 
 svx/source/sidebar/area/AreaPropertyPanel.hxx |1 
 svx/source/sidebar/area/AreaPropertyPanelBase.cxx |  567 +++-
 svx/source/xoutdev/xattrbmp.cxx   |5 
 svx/source/xoutdev/xtabbtmp.cxx   |   33 
 svx/source/xoutdev/xtable.cxx |6 
 svx/source/xoutdev/xtabptrn.cxx   |   92 ++
 svx/uiconfig/ui/sidebararea.ui|  170 +--
 sw/sdi/_frmsh.sdi |6 
 sw/sdi/drawsh.sdi |5 
 sw/source/core/draw/drawdoc.cxx   |1 
 sw/source/ui/chrdlg/pardlg.cxx|2 
 sw/source/ui/frmdlg/frmdlg.cxx|2 
 sw/source/uibase/app/docshdrw.cxx |1 
 sw/source/uibase/app/docst.cxx|1 
 sw/source/uibase/app/docstyle.cxx |3 
 sw/source/uibase/shells/frmsh.cxx |2 
 sw/source/uibase/shells/grfsh.cxx |3 
 sw/source/uibase/shells/textsh.cxx|2 
 sw/source/uibase/shells/textsh1.cxx   |4 
 62 files changed, 2302 insertions(+), 1788 deletions(-)

New commits:
commit 76585ae33f3ca75c05c0ccbf6a621b6e2d42bc00
Author: Rishabh Kumar 
Date:   Tue Jun 7 16:58:20 2016 +0530

Convert Bitmap tab to Pattern tab

Change-Id: I5cf02f1889090539f7adb826483c91a1ef3c3925
Reviewed-on: https://gerrit.libreoffice.org/26015
Tested-by: Jenkins 
Reviewed-by: Katarina Behrens 

diff --git a/cui/Library_cui.mk b/cui/Library_cui.mk
index 7bb181d..c81ef962 100644
--- a/cui/Library_cui.mk
+++ b/cui/Library_cui.mk
@@ -197,13 +197,13 @@ $(eval $(call gb_Library_add_exception_objects,cui,\
 cui/source/tabpages/textanim \
 cui/source/tabpages/textattr \
 cui/source/tabpages/tparea \
-cui/source/tabpages/tpbitmap \
 cui/source/tabpages/tpcolor \
 cui/source/tabpages/tpgradnt \
 cui/source/tabpages/tphatch \
 cui/source/tabpages/tpline \
 cui/source/tabpages/tplnedef \
 cui/source/tabpages/tplneend \
+cui/source/tabpages/tppattern \
 cui/source/tabpages/tpshadow \
 cui/source/tabpages/tptrans \
 cui/source/tabpages/transfrm \
diff --git a/cui/UIConfig_cui.mk b/cui/UIConfig_cui.mk
index b0f72cb..60c8d18 100644
--- 

[Libreoffice-commits] core.git: cui/Library_cui.mk cui/source

2016-04-29 Thread Rishabh Kumar
 cui/Library_cui.mk  |1 
 cui/source/tabpages/tparea.cxx  |  529 
 cui/source/tabpages/tptrans.cxx |  579 
 3 files changed, 580 insertions(+), 529 deletions(-)

New commits:
commit b1d4f658aa927ef0d62ffc387ab9593ad5dd8b3b
Author: Rishabh Kumar 
Date:   Mon Apr 25 18:41:29 2016 +0530

Refactoring transparence tab code

Move transparence tab code out from Area tab code.

Change-Id: Ia7276aa3b1c438b6c8cff89ab5ca3752ff6bcc0e
Reviewed-on: https://gerrit.libreoffice.org/24368
Tested-by: Jenkins 
Reviewed-by: Katarina Behrens 

diff --git a/cui/Library_cui.mk b/cui/Library_cui.mk
index f835797..7bb181d 100644
--- a/cui/Library_cui.mk
+++ b/cui/Library_cui.mk
@@ -205,6 +205,7 @@ $(eval $(call gb_Library_add_exception_objects,cui,\
 cui/source/tabpages/tplnedef \
 cui/source/tabpages/tplneend \
 cui/source/tabpages/tpshadow \
+cui/source/tabpages/tptrans \
 cui/source/tabpages/transfrm \
 cui/source/uno/services \
 ))
diff --git a/cui/source/tabpages/tparea.cxx b/cui/source/tabpages/tparea.cxx
index a85632c..4ab7c8e 100644
--- a/cui/source/tabpages/tparea.cxx
+++ b/cui/source/tabpages/tparea.cxx
@@ -57,535 +57,6 @@ const sal_uInt16 SvxAreaTabPage::pAreaRanges[] =
 0
 };
 
-const sal_uInt16 SvxTransparenceTabPage::pTransparenceRanges[] =
-{
-XATTR_FILLTRANSPARENCE,
-XATTR_FILLTRANSPARENCE,
-SDRATTR_SHADOWTRANSPARENCE,
-SDRATTR_SHADOWTRANSPARENCE,
-XATTR_FILLFLOATTRANSPARENCE,
-XATTR_FILLFLOATTRANSPARENCE,
-0
-};
-
-/*
-|*
-|*  Dialog for transparence
-|*
-\/
-
-IMPL_LINK_NOARG_TYPED(SvxTransparenceTabPage, ClickTransOffHdl_Impl, Button*, 
void)
-{
-// disable all other controls
-ActivateLinear(false);
-ActivateGradient(false);
-
-// Preview
-rXFSet.ClearItem (XATTR_FILLTRANSPARENCE);
-rXFSet.ClearItem (XATTR_FILLFLOATTRANSPARENCE);
-m_pCtlXRectPreview->SetAttributes( aXFillAttr.GetItemSet() );
-m_pCtlBitmapPreview->SetAttributes( aXFillAttr.GetItemSet() );
-
-InvalidatePreview( false );
-}
-
-IMPL_LINK_NOARG_TYPED(SvxTransparenceTabPage, ClickTransLinearHdl_Impl, 
Button*, void)
-{
-// enable linear, disable other
-ActivateLinear(true);
-ActivateGradient(false);
-
-// preview
-rXFSet.ClearItem (XATTR_FILLFLOATTRANSPARENCE);
-ModifyTransparentHdl_Impl (*m_pMtrTransparent);
-}
-
-IMPL_LINK_NOARG_TYPED(SvxTransparenceTabPage, ClickTransGradientHdl_Impl, 
Button*, void)
-{
-// enable gradient, disable other
-ActivateLinear(false);
-ActivateGradient(true);
-
-// preview
-rXFSet.ClearItem (XATTR_FILLTRANSPARENCE);
-ModifiedTrgrHdl_Impl (nullptr);
-}
-
-SvxTransparenceTabPage::~SvxTransparenceTabPage()
-{
-disposeOnce();
-}
-
-void SvxTransparenceTabPage::dispose()
-{
-m_pRbtTransOff.clear();
-m_pRbtTransLinear.clear();
-m_pRbtTransGradient.clear();
-m_pMtrTransparent.clear();
-m_pGridGradient.clear();
-m_pLbTrgrGradientType.clear();
-m_pFtTrgrCenterX.clear();
-m_pMtrTrgrCenterX.clear();
-m_pFtTrgrCenterY.clear();
-m_pMtrTrgrCenterY.clear();
-m_pFtTrgrAngle.clear();
-m_pMtrTrgrAngle.clear();
-m_pMtrTrgrBorder.clear();
-m_pMtrTrgrStartValue.clear();
-m_pMtrTrgrEndValue.clear();
-m_pCtlBitmapPreview.clear();
-m_pCtlXRectPreview.clear();
-SvxTabPage::dispose();
-}
-
-void SvxTransparenceTabPage::ActivateLinear(bool bActivate)
-{
-m_pMtrTransparent->Enable(bActivate);
-}
-
-IMPL_LINK_NOARG_TYPED(SvxTransparenceTabPage, ModifyTransparentHdl_Impl, 
Edit&, void)
-{
-sal_uInt16 nPos = (sal_uInt16)m_pMtrTransparent->GetValue();
-XFillTransparenceItem aItem(nPos);
-rXFSet.Put(XFillTransparenceItem(aItem));
-
-// preview
-InvalidatePreview();
-}
-
-IMPL_LINK_TYPED(SvxTransparenceTabPage, ModifiedTrgrListBoxHdl_Impl, ListBox&, 
rListBox, void)
-{
-ModifiedTrgrHdl_Impl();
-}
-IMPL_LINK_TYPED(SvxTransparenceTabPage, ModifiedTrgrEditHdl_Impl, Edit&, rBox, 
void)
-{
-ModifiedTrgrHdl_Impl();
-}
-void SvxTransparenceTabPage::ModifiedTrgrHdl_Impl(void* pControl)
-{
-if(pControl == m_pLbTrgrGradientType || pControl == this)
-{
-css::awt::GradientStyle eXGS = 
(css::awt::GradientStyle)m_pLbTrgrGradientType->GetSelectEntryPos();
-SetControlState_Impl( eXGS );
-}
-
-// preview
-sal_uInt8 nStartCol = 
(sal_uInt8)(((sal_uInt16)m_pMtrTrgrStartValue->GetValue() * 255) / 100);
-sal_uInt8 nEndCol = 
(sal_uInt8)(((sal_uInt16)m_pMtrTrgrEndValue->GetValue() * 255) / 100);
-XGradient aTmpGradient(
-Color(nStartCol, nStartCol, nStartCol),
-Color(nEndCol, nEndCol, nEndCol),
-

[Libreoffice-commits] core.git: cui/Library_cui.mk cui/source include/sfx2 sc/source sd/source sfx2/Library_sfx.mk sfx2/source svx/Library_svx.mk svx/source sw/source

2015-12-17 Thread Thorsten Behrens
 cui/Library_cui.mk |1 
 cui/source/dialogs/insdlg.cxx  |  127 --
 cui/source/factory/dlgfact.cxx |2 
 include/sfx2/docfilt.hxx   |1 
 sc/source/ui/drawfunc/fuins2.cxx   |   38 
 sd/source/ui/func/fuinsert.cxx |   39 
 sfx2/Library_sfx.mk|1 
 sfx2/source/appl/app.cxx   |1 
 sfx2/source/doc/plugin.cxx |  317 -
 svx/Library_svx.mk |1 
 svx/source/dialog/pfiledlg.cxx |  186 -
 sw/source/uibase/shells/textsh.cxx |   40 
 12 files changed, 754 deletions(-)

New commits:
commit 06726aa39eaeba71701742d28a1a81bd1574f883
Author: Thorsten Behrens 
Date:   Thu Dec 17 19:30:22 2015 +0100

[API CHANGE] Remove NPAPI-related UNO API

Follow-up to 4c18af27bf95b332ee2006cfc0bbf469fb1a84d4, related to
tdf#96398, removing more client code. The following published
interfaces are removed:

com::sun::star::mozilla::XPluginInstance
com::sun::star::mozilla::XPluginInstanceNotifySink
com::sun::star::mozilla::XPluginInstancePeer
com::sun::star::mozilla::XPluginInstanceSyncPeer
com::sun::star::mozilla::XPluginWindowPeer
com::sun::star::plugin::PluginDescription
com::sun::star::plugin::PluginException
com::sun::star::plugin::PluginManager
com::sun::star::plugin::PluginMode
com::sun::star::plugin::PluginVariable
com::sun::star::plugin::XPlugin
com::sun::star::plugin::XPluginContext
com::sun::star::plugin::XPluginManager

Change-Id: I3818a23e0f46fd01bfe9be11b57f6a551c013441
Reviewed-on: https://gerrit.libreoffice.org/20780
Reviewed-by: Thorsten Behrens 
Tested-by: Thorsten Behrens 

diff --git a/cui/Library_cui.mk b/cui/Library_cui.mk
index 85a9bf0..86cc379 100644
--- a/cui/Library_cui.mk
+++ b/cui/Library_cui.mk
@@ -112,7 +112,6 @@ $(eval $(call gb_Library_add_exception_objects,cui,\
 cui/source/dialogs/newtabledlg \
 cui/source/dialogs/passwdomdlg \
 cui/source/dialogs/pastedlg \
-cui/source/dialogs/plfilter \
 cui/source/dialogs/postdlg \
 cui/source/dialogs/scriptdlg \
 cui/source/dialogs/sdrcelldlg \
diff --git a/cui/source/dialogs/insdlg.cxx b/cui/source/dialogs/insdlg.cxx
index f47208b..c85e392 100644
--- a/cui/source/dialogs/insdlg.cxx
+++ b/cui/source/dialogs/insdlg.cxx
@@ -359,133 +359,6 @@ uno::Reference< io::XInputStream > 
SvInsertOleDlg::GetIconIfIconified( OUString*
 return uno::Reference< io::XInputStream >();
 }
 
-IMPL_LINK_NOARG_TYPED(SvInsertPlugInDialog, BrowseHdl, Button*, void)
-{
-Sequence< OUString > aFilterNames, aFilterTypes;
-fillNetscapePluginFilters( aFilterNames, aFilterTypes );
-
-Reference< XComponentContext > xContext( 
::comphelper::getProcessComponentContext() );
-Reference< XFilePicker3 > xFilePicker = 
ui::dialogs::FilePicker::createWithMode( xContext, 
ui::dialogs::TemplateDescription::FILEOPEN_SIMPLE );
-
-// add the filters
-try
-{
-const OUString* pNames = aFilterNames.getConstArray();
-const OUString* pTypes = aFilterTypes.getConstArray();
-for( int i = 0; i < aFilterNames.getLength(); i++ )
-xFilePicker->appendFilter( pNames[i], pTypes[i] );
-}
-catch( IllegalArgumentException& )
-{
-DBG_ASSERT( false, "caught IllegalArgumentException when registering 
filter\n" );
-}
-
-if( xFilePicker->execute() == ExecutableDialogResults::OK )
-{
-Sequence< OUString > aPathSeq( xFilePicker->getSelectedFiles() );
-INetURLObject aObj( aPathSeq[0] );
-m_pEdFileurl->SetText(aObj.PathToFileName());
-}
-}
-
-
-
-SvInsertPlugInDialog::SvInsertPlugInDialog(vcl::Window* pParent,
-const uno::Reference < embed::XStorage >& xStorage)
-: InsertObjectDialog_Impl(pParent, "InsertPluginDialog", 
"cui/ui/insertplugin.ui", xStorage)
-, m_pURL(nullptr)
-{
-get(m_pEdFileurl, "urled");
-get(m_pBtnFileurl, "urlbtn");
-get(m_pEdPluginsOptions, "pluginoptions");
-m_pBtnFileurl->SetClickHdl(LINK(this, SvInsertPlugInDialog, BrowseHdl));
-}
-
-SvInsertPlugInDialog::~SvInsertPlugInDialog()
-{
-disposeOnce();
-}
-
-void SvInsertPlugInDialog::dispose()
-{
-delete m_pURL;
-m_pURL = nullptr;
-m_pEdFileurl.clear();
-m_pBtnFileurl.clear();
-m_pEdPluginsOptions.clear();
-InsertObjectDialog_Impl::dispose();
-}
-
-static void Plugin_ImplFillCommandSequence( const OUString& aCommands, 
uno::Sequence< beans::PropertyValue >& aCommandSequence )
-{
-sal_Int32 nEaten;
-SvCommandList aLst;
-aLst.AppendCommands( aCommands,  );
-
-const size_t nCount = aLst.size();
-aCommandSequence.realloc( nCount );
-for( size_t nIndex = 0; nIndex < nCount; nIndex++ )
-{
-aCommandSequence[nIndex].Name = aLst[ nIndex ].GetCommand();
-

[Libreoffice-commits] core.git: cui/Library_cui.mk cui/source

2015-08-26 Thread László Németh
 cui/Library_cui.mk   |1 +
 cui/source/dialogs/about.cxx |6 ++
 2 files changed, 7 insertions(+)

New commits:
commit be881075568d7686ba2cbcd85d4d9c085e0517ef
Author: László Németh laszlo.nem...@collabora.com
Date:   Wed Aug 26 12:25:14 2015 +0200

tdf#93620: show OpenGL status in Help-About

Build ID will show enabled OpenGL with an extra string -GL
helping the fix of rendering issues.

Change-Id: Id7bf2db2edb165542bf7a2a253c698c494278a03

diff --git a/cui/Library_cui.mk b/cui/Library_cui.mk
index 833af3c..64f75aa 100644
--- a/cui/Library_cui.mk
+++ b/cui/Library_cui.mk
@@ -70,6 +70,7 @@ $(eval $(call gb_Library_use_externals,cui,\
boost_headers \
 icuuc \
 icu_headers \
+glew \
 ))
 
 ifeq ($(OS),WNT)
diff --git a/cui/source/dialogs/about.cxx b/cui/source/dialogs/about.cxx
index 310082c..8f5caf6 100644
--- a/cui/source/dialogs/about.cxx
+++ b/cui/source/dialogs/about.cxx
@@ -48,6 +48,7 @@
 #include rtl/ustrbuf.hxx
 #include vcl/bitmap.hxx
 #include officecfg/Office/Common.hxx
+#include vcl/opengl/OpenGLHelper.hxx
 
 using namespace ::com::sun::star::uno;
 using namespace ::com::sun::star::beans;
@@ -294,6 +295,11 @@ OUString AboutDialog::GetVersionString()
 sVersion += m_sBuildStr.replaceAll($BUILDID, sBuildId);
 }
 
+if (OpenGLHelper::isVCLOpenGLEnabled())
+{
+sVersion += -GL;
+}
+
 if (EXTRA_BUILDID[0] != '\0')
 {
 sVersion += \n EXTRA_BUILDID;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: cui/Library_cui.mk cui/source

2013-09-03 Thread Tor Lillqvist
 cui/Library_cui.mk |3 ++-
 cui/source/options/treeopt.cxx |2 ++
 2 files changed, 4 insertions(+), 1 deletion(-)

New commits:
commit 8b90ad8af9d72937109ded62609731033558dd84
Author: Tor Lillqvist t...@iki.fi
Date:   Tue Sep 3 10:54:49 2013 +0300

Bypass SvxBasicIDEOptionsPage when DISABLE_SCRIPTING

Change-Id: I687dc152a60d1f5ccdf8d8ca763040cbff74e3cf

diff --git a/cui/Library_cui.mk b/cui/Library_cui.mk
index a29801a..809319a 100644
--- a/cui/Library_cui.mk
+++ b/cui/Library_cui.mk
@@ -138,7 +138,8 @@ $(eval $(call gb_Library_add_exception_objects,cui,\
cui/source/options/optaboutconfig \
 cui/source/options/optaccessibility \
 cui/source/options/optasian \
-cui/source/options/optbasic \
+$(if $(DISABLE_SCRIPTING),, \
+cui/source/options/optbasic) \
 cui/source/options/optchart \
 cui/source/options/optcolor \
 cui/source/options/optctl \
diff --git a/cui/source/options/treeopt.cxx b/cui/source/options/treeopt.cxx
index 4fd3d87..920be54 100644
--- a/cui/source/options/treeopt.cxx
+++ b/cui/source/options/treeopt.cxx
@@ -320,7 +320,9 @@ SfxTabPage* CreateGeneralTabPage( sal_uInt16 nId, Window* 
pParent, const SfxItem
 case RID_SVXPAGE_ONLINEUPDATE:  fnCreate = 
SvxOnlineUpdateTabPage::Create; break;
 case RID_OPTPAGE_CHART_DEFCOLORS:   fnCreate = 
SvxDefaultColorOptPage::Create; break;
 case RID_SVXPAGE_ABOUT_CONFIG:  fnCreate = 
CuiAboutConfigTabPage::Create; break;
+#ifndef DISABLE_SCRIPTING
 case RID_SVXPAGE_BASICIDE_OPTIONS:  fnCreate = 
SvxBasicIDEOptionsPage::Create; break;
+#endif
 }
 
 SfxTabPage* pRet = fnCreate ? (*fnCreate)( pParent, rSet ) : NULL;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: cui/Library_cui.mk cui/source cui/uiconfig

2013-05-24 Thread Caolán McNamara
 cui/Library_cui.mk |3 -
 cui/source/options/optjava.cxx |   68 ++---
 cui/source/options/optjava.hxx |4 ++
 cui/source/options/treeopt.cxx |2 -
 cui/uiconfig/ui/optadvancedpage.ui |2 -
 5 files changed, 55 insertions(+), 24 deletions(-)

New commits:
commit 1d95129bdc48cd93d1aba2591bdf87ee6ab7b296
Author: Caolán McNamara caol...@redhat.com
Date:   Fri May 24 15:21:22 2013 +0100

show the 'java' options page when java disabled

because there are now a bunch of unrelated to java things in there in its 
new
incarnation as the advanced tabpage

this removes the weird empty tabpage in options
in the java-disabled-at-build-time configuration

Change-Id: Ie59d8362d440c41e746b67a0195e4159848f162a

diff --git a/cui/Library_cui.mk b/cui/Library_cui.mk
index ade10e4..fc27d59 100644
--- a/cui/Library_cui.mk
+++ b/cui/Library_cui.mk
@@ -146,8 +146,7 @@ $(eval $(call gb_Library_add_exception_objects,cui,\
 cui/source/options/optHeaderTabListbox \
 cui/source/options/opthtml \
 cui/source/options/optinet2 \
-$(if $(filter TRUE,$(SOLAR_JAVA)), \
-cui/source/options/optjava) \
+cui/source/options/optjava \
 cui/source/options/optjsearch \
 cui/source/options/optlingu \
 cui/source/options/optmemory \
diff --git a/cui/source/options/optjava.cxx b/cui/source/options/optjava.cxx
index 1c03981..50428e34 100644
--- a/cui/source/options/optjava.cxx
+++ b/cui/source/options/optjava.cxx
@@ -43,7 +43,9 @@
 #include com/sun/star/ui/dialogs/TemplateDescription.hpp
 #include com/sun/star/ui/dialogs/FolderPicker.hpp
 #include com/sun/star/ucb/XContentProvider.hpp
+#ifdef SOLAR_JAVA
 #include jvmfwk/framework.h
+#endif
 
 // define 
 
@@ -180,7 +182,11 @@ SvxJavaOptionsPage::SvxJavaOptionsPage( Window* pParent, 
const SfxItemSet rSet
 xDialogListener-SetDialogClosedLink( LINK( this, SvxJavaOptionsPage, 
DialogClosedHdl ) );
 
 EnableHdl_Impl(m_pJavaEnableCB);
+#ifdef SOLAR_JAVA
 jfw_lock();
+#else
+getWindow(javaframe)-Disable();
+#endif
 }
 
 // ---
@@ -191,6 +197,7 @@ SvxJavaOptionsPage::~SvxJavaOptionsPage()
 delete m_pParamDlg;
 delete m_pPathDlg;
 ClearJavaInfo();
+#ifdef SOLAR_JAVA
 std::vector JavaInfo* ::iterator pIter;
 for ( pIter = m_aAddedInfos.begin(); pIter != m_aAddedInfos.end(); ++pIter 
)
 {
@@ -199,6 +206,7 @@ SvxJavaOptionsPage::~SvxJavaOptionsPage()
 }
 
 jfw_unlock();
+#endif
 }
 
 // ---
@@ -269,6 +277,7 @@ IMPL_LINK_NOARG(SvxJavaOptionsPage, AddHdl_Impl)
 
 IMPL_LINK_NOARG(SvxJavaOptionsPage, ParameterHdl_Impl)
 {
+#ifdef SOLAR_JAVA
 Sequence OUString  aParameterList;
 if ( !m_pParamDlg )
 {
@@ -309,7 +318,7 @@ IMPL_LINK_NOARG(SvxJavaOptionsPage, ParameterHdl_Impl)
 }
 else
 m_pParamDlg-SetParameters( aParameterList );
-
+#endif
 return 0;
 }
 
@@ -317,6 +326,7 @@ IMPL_LINK_NOARG(SvxJavaOptionsPage, ParameterHdl_Impl)
 
 IMPL_LINK_NOARG(SvxJavaOptionsPage, ClassPathHdl_Impl)
 {
+#ifdef SOLAR_JAVA
 String sClassPath;
 
 if ( !m_pPathDlg )
@@ -353,7 +363,7 @@ IMPL_LINK_NOARG(SvxJavaOptionsPage, ClassPathHdl_Impl)
 }
 else
 m_pPathDlg-SetClassPath( sClassPath );
-
+#endif
 return 0;
 }
 
@@ -402,6 +412,7 @@ IMPL_LINK( SvxJavaOptionsPage, DialogClosedHdl, 
DialogClosedEvent*, pEvt )
 
 void SvxJavaOptionsPage::ClearJavaInfo()
 {
+#ifdef SOLAR_JAVA
 if ( m_parJavaInfo )
 {
 JavaInfo** parInfo = m_parJavaInfo;
@@ -415,6 +426,7 @@ void SvxJavaOptionsPage::ClearJavaInfo()
 m_parJavaInfo = NULL;
 m_nInfoSize = 0;
 }
+#endif
 }
 
 // ---
@@ -435,6 +447,7 @@ void SvxJavaOptionsPage::ClearJavaList()
 
 void SvxJavaOptionsPage::LoadJREs()
 {
+#ifdef SOLAR_JAVA
 WaitObject aWaitObj(m_pJavaList);
 javaFrameworkError eErr = jfw_findAllJREs( m_parJavaInfo, m_nInfoSize );
 if ( JFW_E_NONE == eErr  m_parJavaInfo )
@@ -473,12 +486,14 @@ void SvxJavaOptionsPage::LoadJREs()
 }
 
 jfw_freeJavaInfo( pSelectedJava );
+#endif
 }
 
 // ---
 
 void SvxJavaOptionsPage::AddJRE( JavaInfo* _pInfo )
 {
+#ifdef SOLAR_JAVA
 OUStringBuffer sEntry;
 sEntry.append('\t');
 sEntry.append(_pInfo-sVendor);
@@ -491,6 +506,9 @@ void SvxJavaOptionsPage::AddJRE( JavaInfo* _pInfo )
 INetURLObject aLocObj( OUString( _pInfo-sLocation ) );
 String* pLocation = new String( aLocObj.getFSysPath( 
INetURLObject::FSYS_DETECT ) );
 pEntry-SetUserData( pLocation );
+#else
+(void)_pInfo;
+#endif
 }
 
 // ---
@@ -519,6 +537,7 @@ void 

[Libreoffice-commits] core.git: cui/Library_cui.mk cui/source

2013-02-20 Thread Thorsten Behrens
 cui/Library_cui.mk   |1 
 cui/source/dialogs/about.cxx |  123 +++
 2 files changed, 103 insertions(+), 21 deletions(-)

New commits:
commit 6af2468cf0a6c231747c24fd057a8cb90cbbe11d
Author: Thorsten Behrens tbehr...@suse.com
Date:   Thu Jan 31 23:59:10 2013 +0100

Fix fdo#59970 slowless of about box rendering

Prevent creation of transparent bitmap at arbitrary scale, and
subsequent scaling down. For remote X, that even has to fetch
pixel back from remote side for manual scaling.

Change-Id: I58e011231f2b81b913a6b02dd973385ef5664379

Signed-off-by: Petr Mladek pmla...@suse.cz

diff --git a/cui/Library_cui.mk b/cui/Library_cui.mk
index 6e830b7..1966b7f 100644
--- a/cui/Library_cui.mk
+++ b/cui/Library_cui.mk
@@ -50,6 +50,7 @@ $(eval $(call gb_Library_use_libraries,cui,\
 comphelper \
 cppu \
 cppuhelper \
+drawinglayer \
 editeng \
 i18nisolang1 \
 jvmfwk \
diff --git a/cui/source/dialogs/about.cxx b/cui/source/dialogs/about.cxx
index 2c9df74..f7332b9 100644
--- a/cui/source/dialogs/about.cxx
+++ b/cui/source/dialogs/about.cxx
@@ -20,6 +20,7 @@
 #include vcl/svapp.hxx
 #include vcl/msgbox.hxx
 
+#include osl/process.h
 #include tools/stream.hxx
 #include rtl/bootstrap.hxx
 #include unotools/configmgr.hxx
@@ -35,6 +36,13 @@
 #include comphelper/anytostring.hxx
 #include cppuhelper/exc_hlp.hxx
 #include cppuhelper/bootstrap.hxx
+#include com/sun/star/graphic/XPrimitive2DRenderer.hpp
+#include basegfx/numeric/ftools.hxx
+#include vcl/canvastools.hxx
+#include com/sun/star/geometry/RealRectangle2D.hpp
+#include com/sun/star/rendering/XIntegerReadOnlyBitmap.hpp
+#include basegfx/matrix/b2dhommatrixtools.hxx
+#include drawinglayer/primitive2d/transformprimitive2d.hxx
 
 #include sfx2/sfxuno.hxx
 #include sfx2/sfxcommands.h
@@ -183,6 +191,91 @@ void AboutDialog::StyleControls()
 aCancelButton.GrabFocus();
 }
 
+static bool loadBrandSvg(const char *pName, BitmapEx rBitmap, int nWidth )
+{
+// Load from disk
+// -
+rtl::OUString aBaseName = ( rtl::OUString(/) +
+rtl::OUString::createFromAscii( pName ) );
+rtl::OUString aSvg( .svg );
+
+rtl_Locale *pLoc = NULL;
+osl_getProcessLocale (pLoc);
+LanguageTag aLanguageTag( *pLoc);
+
+rtl::OUString aName = aBaseName + aSvg;
+rtl::OUString aLocaleName = ( aBaseName + rtl::OUString(-) +
+  aLanguageTag.getBcp47() +
+  aSvg );
+rtl::OUString uri = rtl::OUString::createFromAscii( 
$BRAND_BASE_DIR/program ) + aBaseName+aSvg;
+rtl::Bootstrap::expandMacros( uri );
+INetURLObject aObj( uri );
+SvgData aSvgData(aObj.PathToFileName());
+
+// transform into [0,0,width,width*aspect] std dimensions
+// -
+basegfx::B2DRange aRange(aSvgData.getRange());
+const double fAspectRatio(aRange.getWidth()/aRange.getHeight());
+basegfx::B2DHomMatrix aTransform(
+basegfx::tools::createTranslateB2DHomMatrix(
+-aRange.getMinX(),
+-aRange.getMinY()));
+aTransform.scale(
+nWidth / aRange.getWidth(),
+nWidth / fAspectRatio / aRange.getHeight());
+const drawinglayer::primitive2d::Primitive2DReference xTransformRef(
+new drawinglayer::primitive2d::TransformPrimitive2D(
+aTransform,
+aSvgData.getPrimitive2DSequence()));
+
+// UNO dance to render from drawinglayer
+// -
+uno::Reference lang::XMultiServiceFactory  
xFactory(::comphelper::getProcessServiceFactory());
+const rtl::OUString aServiceName(com.sun.star.graphic.Primitive2DTools);
+
+try
+{
+const uno::Reference graphic::XPrimitive2DRenderer  
xPrimitive2DRenderer(
+xFactory-createInstance(aServiceName),
+uno::UNO_QUERY_THROW);
+
+if(xPrimitive2DRenderer.is())
+{
+// cancel out rasterize's mm2pixel conversion
+const double fFakeDPI=1000.0/2.54;
+
+geometry::RealRectangle2D aRealRect(
+0, 0,
+nWidth, nWidth / fAspectRatio);
+
+const uno::Reference rendering::XBitmap  xBitmap(
+xPrimitive2DRenderer-rasterize(
+
drawinglayer::primitive2d::Primitive2DSequence(xTransformRef, 1),
+uno::Sequence beans::PropertyValue (),
+fFakeDPI,
+fFakeDPI,
+aRealRect,
+50));
+
+if(xBitmap.is())
+{
+const uno::Reference rendering::XIntegerReadOnlyBitmap 
xIntBmp(xBitmap, uno::UNO_QUERY_THROW);
+
+if(xIntBmp.is())
+{
+rBitmap =