[Libreoffice-commits] core.git: cui/qa cui/source cui/uiconfig cui/UIConfig_cui.mk include/cui static/CustomTarget_emscripten_fs_image.mk

2023-11-13 Thread Samuel Mehrbrodt (via logerrit)
 cui/UIConfig_cui.mk|1 
 cui/qa/unit/data/cui-dialogs-test.txt  |1 
 cui/source/dialogs/dlgname.cxx |4 
 cui/source/options/optaboutconfig.cxx  |  104 ++-
 cui/source/options/optaboutconfig.hxx  |   21 
 cui/uiconfig/ui/aboutconfigvaluedialog.ui  |  131 -
 include/cui/dlgname.hxx|2 
 static/CustomTarget_emscripten_fs_image.mk |1 
 8 files changed, 18 insertions(+), 247 deletions(-)

New commits:
commit ee4eb828fbf7ead62fca85239d78c48003bbc41e
Author: Samuel Mehrbrodt 
AuthorDate: Thu Nov 9 12:56:30 2023 +0100
Commit: Samuel Mehrbrodt 
CommitDate: Mon Nov 13 10:38:37 2023 +0100

Use SvxNameDialog for editing config values

Instead of having a separate dialog which does the same.

Change-Id: I3b20920fa1c68593b6787a01592621c7b02fa715
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159209
Tested-by: Jenkins
Reviewed-by: Samuel Mehrbrodt 

diff --git a/cui/UIConfig_cui.mk b/cui/UIConfig_cui.mk
index b9863422c64a..e36cfc7f11b6 100644
--- a/cui/UIConfig_cui.mk
+++ b/cui/UIConfig_cui.mk
@@ -24,7 +24,6 @@ endif
 $(eval $(call gb_UIConfig_add_uifiles,cui,\
cui/uiconfig/ui/aboutdialog \
cui/uiconfig/ui/aboutconfigdialog\
-   cui/uiconfig/ui/aboutconfigvaluedialog \
cui/uiconfig/ui/accelconfigpage \
cui/uiconfig/ui/additionsdialog \
cui/uiconfig/ui/additionsfragment \
diff --git a/cui/qa/unit/data/cui-dialogs-test.txt 
b/cui/qa/unit/data/cui-dialogs-test.txt
index cb176088446c..7a8e55240c93 100644
--- a/cui/qa/unit/data/cui-dialogs-test.txt
+++ b/cui/qa/unit/data/cui-dialogs-test.txt
@@ -53,7 +53,6 @@ cui/ui/textdialog.ui
 
 
 cui/ui/aboutconfigdialog.ui
-cui/ui/aboutconfigvaluedialog.ui
 cui/ui/aboutdialog.ui
 cui/ui/accelconfigpage.ui
 cui/ui/acorexceptpage.ui
diff --git a/cui/source/dialogs/dlgname.cxx b/cui/source/dialogs/dlgname.cxx
index 4e6847e0f5cc..a1f6283d92b5 100644
--- a/cui/source/dialogs/dlgname.cxx
+++ b/cui/source/dialogs/dlgname.cxx
@@ -43,10 +43,10 @@ SvxNameDialog::SvxNameDialog(weld::Window* pParent, const 
OUString& rName, const
 
 IMPL_LINK_NOARG(SvxNameDialog, ModifyHdl, weld::Entry&, void)
 {
-// Do not allow empty names
+// Do not allow empty names, unless custom CheckNameHdl is specified
 bool bEnable;
 if (m_aCheckNameHdl.IsSet())
-bEnable = !m_xEdtName->get_text().isEmpty() && 
m_aCheckNameHdl.Call(*this);
+bEnable = m_aCheckNameHdl.Call(*this);
 else
 bEnable = !m_xEdtName->get_text().isEmpty();
 m_xBtnOK->set_sensitive(bEnable);
diff --git a/cui/source/options/optaboutconfig.cxx 
b/cui/source/options/optaboutconfig.cxx
index 791856ef2ae5..a5d6ac9757a5 100644
--- a/cui/source/options/optaboutconfig.cxx
+++ b/cui/source/options/optaboutconfig.cxx
@@ -31,6 +31,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -49,10 +50,6 @@ using namespace ::com::sun::star;
 using namespace com::sun::star::uno;
 using namespace com::sun::star::container;
 
-#define SHORT_LEN_LIMIT 7
-#define LONG_LEN_LIMIT  11
-#define HYPER_LEN_LIMIT 20
-
 struct Prop_Impl
 {
 OUStringName;
@@ -91,64 +88,6 @@ struct UserData
 {}
 };
 
-IMPL_LINK(CuiAboutConfigValueDialog, KeyInputHdl, const KeyEvent&, rKeyEvent, 
bool)
-{
-bool bValid = false;
-bool bNonSpace = rKeyEvent.GetKeyCode().GetCode() != KEY_SPACE;
-if (m_bNumericOnly && bNonSpace )
-{
-const vcl::KeyCode& rKeyCode = rKeyEvent.GetKeyCode();
-sal_uInt16 nGroup = rKeyCode.GetGroup();
-sal_uInt16 nKey = rKeyCode.GetCode();
-
-switch ( nGroup ) {
-case KEYGROUP_NUM :
-case KEYGROUP_CURSOR :
-{
-bValid = true;
-break;
-}
-
-case KEYGROUP_MISC :
-{
-switch ( nKey ) {
-case KEY_SUBTRACT :
-case KEY_COMMA :
-case KEY_POINT :
-{
-bValid = true;
-break;
-}
-
-default :
-{
-if( nKey < KEY_ADD || nKey > KEY_EQUAL )
-bValid = true;
-break;
-}
-}
-break;
-}
-
-default :
-{
-bValid = false;
-break;
-}
-}
-
-//Select all, Copy, Paste, Cut, Undo Keys
-if ( !bValid && ( rKeyCode.IsMod1() && (
- KEY_A == nKey || KEY_C == nKey || KEY_V == nKey || KEY_X == nKey 
|| KEY_Z == nKey ) ) )
-bValid = true;
-}
-else
-bValid = true;
-
-//if value return true to claim that it has been handled
-return !bValid;
-}
-
 

[Libreoffice-commits] core.git: cui/qa cui/source cui/uiconfig include/svx svx/source

2022-11-19 Thread Maxim Monastirsky (via logerrit)
 cui/qa/unit/cui-dialogs-test.cxx |3 
 cui/source/dialogs/sdrcelldlg.cxx|   43 +
 cui/source/factory/dlgfact.cxx   |4 
 cui/source/factory/dlgfact.hxx   |2 
 cui/source/inc/paragrph.hxx  |8 +
 cui/source/inc/sdrcelldlg.hxx|2 
 cui/source/tabpages/paragrph.cxx |   40 -
 cui/uiconfig/ui/formatcellsdialog.ui |  151 +--
 cui/uiconfig/ui/paragalignpage.ui|   11 ++
 include/svx/svxdlg.hxx   |2 
 svx/source/table/tablecontroller.cxx |2 
 11 files changed, 244 insertions(+), 24 deletions(-)

New commits:
commit 553cfbfc9e74a03fe02a58e9aa6076fc1dddeb7b
Author: Maxim Monastirsky 
AuthorDate: Tue Oct 4 16:05:06 2022 +0300
Commit: Maxim Monastirsky 
CommitDate: Sat Nov 19 18:13:54 2022 +0100

Prepare the dialog for cell style editing

Change-Id: I54ec1486f49f240e1ab88662b9d1b0b741cf8878
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142905
Tested-by: Jenkins
Reviewed-by: Maxim Monastirsky 

diff --git a/cui/qa/unit/cui-dialogs-test.cxx b/cui/qa/unit/cui-dialogs-test.cxx
index f4f73facbaa6..cf8c302fc209 100644
--- a/cui/qa/unit/cui-dialogs-test.cxx
+++ b/cui/qa/unit/cui-dialogs-test.cxx
@@ -69,7 +69,8 @@ VclPtr 
CuiDialogsTest::createDialogByID(sal_uInt32 nID)
 {
 case 0: // "cui/ui/formatcellsdialog.ui"
 {
-pReturnDialog = mpFact->CreateSvxFormatCellsDialog(nullptr, 
mxAttr.get(), *mxModel);
+pReturnDialog
+= mpFact->CreateSvxFormatCellsDialog(nullptr, mxAttr.get(), 
*mxModel, true);
 break;
 }
 
diff --git a/cui/source/dialogs/sdrcelldlg.cxx 
b/cui/source/dialogs/sdrcelldlg.cxx
index fda8b4ce1385..3afbc0f694d3 100644
--- a/cui/source/dialogs/sdrcelldlg.cxx
+++ b/cui/source/dialogs/sdrcelldlg.cxx
@@ -21,10 +21,15 @@
 #include 
 #include 
 #include 
+#include 
+#include 
+#include 
+#include 
+#include 
 #include 
 
-SvxFormatCellsDialog::SvxFormatCellsDialog(weld::Window* pParent, const 
SfxItemSet* pAttr, const SdrModel& rModel)
-: SfxTabDialogController(pParent, "cui/ui/formatcellsdialog.ui", 
"FormatCellsDialog", pAttr)
+SvxFormatCellsDialog::SvxFormatCellsDialog(weld::Window* pParent, const 
SfxItemSet* pAttr, const SdrModel& rModel, bool bStyle)
+: SfxTabDialogController(pParent, "cui/ui/formatcellsdialog.ui", 
"FormatCellsDialog", pAttr, bStyle)
 , mrOutAttrs(*pAttr)
 , mpColorTab(rModel.GetColorList())
 , mnColorTabState ( ChangeType::NONE )
@@ -37,7 +42,29 @@ SvxFormatCellsDialog::SvxFormatCellsDialog(weld::Window* 
pParent, const SfxItemS
 AddTabPage("effects", RID_SVXPAGE_CHAR_EFFECTS);
 AddTabPage("border", RID_SVXPAGE_BORDER );
 AddTabPage("area", RID_SVXPAGE_AREA);
-AddTabPage("shadow", SvxShadowTabPage::Create, nullptr);
+
+if (bStyle)
+{
+AddTabPage("position", RID_SVXPAGE_CHAR_POSITION);
+AddTabPage("highlight", RID_SVXPAGE_BKG);
+AddTabPage("indentspacing", RID_SVXPAGE_STD_PARAGRAPH);
+AddTabPage("alignment", SvxParaAlignTabPage::Create, 
SvxParaAlignTabPage::GetSdrRanges);
+RemoveTabPage("shadow");
+}
+else
+{
+RemoveTabPage("position");
+RemoveTabPage("highlight");
+RemoveTabPage("indentspacing");
+RemoveTabPage("alignment");
+AddTabPage("shadow", SvxShadowTabPage::Create, nullptr);
+RemoveStandardButton();
+}
+
+if (bStyle && SvtCJKOptions::IsAsianTypographyEnabled())
+AddTabPage("asian", RID_SVXPAGE_PARA_ASIAN);
+else
+RemoveTabPage("asian");
 }
 
 void SvxFormatCellsDialog::PageCreated(const OString& rId, SfxTabPage )
@@ -62,6 +89,16 @@ void SvxFormatCellsDialog::PageCreated(const OString& rId, 
SfxTabPage )
 static_cast(rPage).SetColorList( mpColorTab );
 static_cast(rPage).SetColorChgd(  );
 }
+else if (rId == "alignment")
+{
+static_cast(rPage).EnableSdrVertAlign();
+}
+else if (rId == "highlight")
+{
+SfxAllItemSet aSet(*(GetInputSetImpl()->GetPool()));
+
aSet.Put(SfxUInt32Item(SID_FLAG_TYPE,static_cast(SvxBackgroundTabFlags::SHOW_CHAR_BKGCOLOR)));
+rPage.PageCreated(aSet);
+}
 else
 SfxTabDialogController::PageCreated(rId, rPage);
 }
diff --git a/cui/source/factory/dlgfact.cxx b/cui/source/factory/dlgfact.cxx
index fb61dafcecbb..930452d64d09 100644
--- a/cui/source/factory/dlgfact.cxx
+++ b/cui/source/factory/dlgfact.cxx
@@ -1428,9 +1428,9 @@ VclPtr 
AbstractDialogFactory_Impl::CreateLinksDialog(wel
 return VclPtr::Create(std::move(xLinkDlg));
 }
 
-VclPtr 
AbstractDialogFactory_Impl::CreateSvxFormatCellsDialog(weld::Window* pParent, 
const SfxItemSet* pAttr, const SdrModel& rModel)
+VclPtr 
AbstractDialogFactory_Impl::CreateSvxFormatCellsDialog(weld::Window* pParent, 
const SfxItemSet* pAttr, const SdrModel& rModel, bool bStyle)
 {
-return 
VclPtr::Create(std::make_shared(pParent,
 

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

2021-12-16 Thread Miklos Vajna (via logerrit)
 cui/qa/uitest/tabpages/themepage.py |   31 ++
 cui/source/inc/themepage.hxx|   14 +
 cui/source/tabpages/themepage.cxx   |   61 
 cui/uiconfig/ui/themetabpage.ui |  441 +++-
 4 files changed, 537 insertions(+), 10 deletions(-)

New commits:
commit 48cb441fceab83a6320dc871f291dcb313696650
Author: Miklos Vajna 
AuthorDate: Thu Dec 16 08:56:25 2021 +0100
Commit: Miklos Vajna 
CommitDate: Thu Dec 16 10:14:33 2021 +0100

sd theme: add UI to set individual colors of a color set

Which completes the UI to set and get various parts of the theme itself
(not yet referring to a theme).

Change-Id: I30cb575046d1146083cb5723377400b67de79a69
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126905
Reviewed-by: Miklos Vajna 
Tested-by: Jenkins

diff --git a/cui/qa/uitest/tabpages/themepage.py 
b/cui/qa/uitest/tabpages/themepage.py
index 25726c63feda..f85af965f626 100644
--- a/cui/qa/uitest/tabpages/themepage.py
+++ b/cui/qa/uitest/tabpages/themepage.py
@@ -9,6 +9,7 @@ from libreoffice.uno.propertyvalue import mkPropertyValues
 from uitest.framework import UITestCase
 from uitest.uihelper.common import get_state_as_dict
 from uitest.uihelper.common import select_pos
+from uitest.uihelper.common import select_by_text
 
 # Test for cui/source/tabpages/themepage.cxx.
 class Test(UITestCase):
@@ -24,7 +25,21 @@ class Test(UITestCase):
 master = drawPage.MasterPage
 theme = mkPropertyValues({
 "Name": "nameA",
-"ColorSchemeName": "colorSetA"
+"ColorSchemeName": "colorSetA",
+"ColorScheme": tuple([
+0x00,  # dk1
+0x00,  # lt1
+0x00,  # dk2
+0x00,  # lt2
+0xff,  # accent1
+0x00,  # accent2
+0x00,  # accent3
+0x00,  # accent4
+0x00,  # accent5
+0x00,  # accent6
+0x00,  # hlink
+0x00,  # folHlink
+])
 })
 master.Theme = theme
 
@@ -43,6 +58,15 @@ class Test(UITestCase):
 colorSetName.executeAction("TYPE", 
mkPropertyValues({"KEYCODE":"BACKSPACE"}))
 colorSetName.executeAction("TYPE", mkPropertyValues({"TEXT": 
"colorSetB"}))
 
+# Select a custom accent1 color.
+accent1 = xDialog.getChild("btnAccent1")
+accent1.executeAction("OPENLIST", tuple())
+floatWindow = self.xUITest.getFloatWindow()
+paletteSelector = floatWindow.getChild("palette_listbox")
+select_by_text(paletteSelector, "chart-palettes")
+colorSet = floatWindow.getChild("colorset")
+colorSet.executeAction("CHOOSE", mkPropertyValues({"POS": 
"2"}))
+
 # Then make sure the doc model is updated accordingly:
 # Without the accompanying fix in place, this test would have 
failed with:
 # AssertionError: 'nameA' != 'nameB'
@@ -53,6 +77,11 @@ class Test(UITestCase):
 # AssertionError: 'colorSetA' != 'colorSetB'
 # i.e. the UI didn't update the color scheme name.
 self.assertEqual(theme["ColorSchemeName"], "colorSetB")
+colorSet = theme["ColorScheme"]
+# Without the accompanying fix in place, this test would have 
failed with:
+# AssertionError: 0 != 16728590 (#ff420e)
+# i.e. the UI didn't update the accent1 color from black to a 
custom value.
+self.assertEqual(colorSet[4], 0xff420e)
 
 
 # vim: set shiftwidth=4 softtabstop=4 expandtab:
diff --git a/cui/source/inc/themepage.hxx b/cui/source/inc/themepage.hxx
index 613650c075b6..894a09c9385b 100644
--- a/cui/source/inc/themepage.hxx
+++ b/cui/source/inc/themepage.hxx
@@ -15,6 +15,8 @@
 
 #include 
 
+class ColorListBox;
+
 /// Tab page for themes
 class SvxThemePage : public SfxTabPage
 {
@@ -22,6 +24,18 @@ class SvxThemePage : public SfxTabPage
 
 std::unique_ptr m_xThemeName;
 std::unique_ptr m_xColorSetName;
+std::unique_ptr m_xDk1;
+std::unique_ptr m_xLt1;
+std::unique_ptr m_xDk2;
+std::unique_ptr m_xLt2;
+std::unique_ptr m_xAccent1;
+std::unique_ptr m_xAccent2;
+std::unique_ptr m_xAccent3;
+std::unique_ptr m_xAccent4;
+std::unique_ptr m_xAccent5;
+std::unique_ptr m_xAccent6;
+std::unique_ptr m_xHlink;
+std::unique_ptr m_xFolHlink;
 
 public:
 SvxThemePage(weld::Container* pPage, weld::DialogController* pController,
diff --git a/cui/source/tabpages/themepage.cxx 
b/cui/source/tabpages/themepage.cxx
index 99abeed799fb..c01d72def6cc 100644
--- a/cui/source/tabpages/themepage.cxx
+++ b/cui/source/tabpages/themepage.cxx
@@ -10,11 +10,14 @@
 #include 
 
 #include 
+#include 
 

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

2021-12-15 Thread Miklos Vajna (via logerrit)
 cui/qa/uitest/tabpages/themepage.py |   13 +++
 cui/source/inc/themepage.hxx|1 
 cui/source/tabpages/themepage.cxx   |   10 ++
 cui/uiconfig/ui/themetabpage.ui |   60 
 4 files changed, 83 insertions(+), 1 deletion(-)

New commits:
commit c634f836945379ae17a3714938210bba7995dd25
Author: Miklos Vajna 
AuthorDate: Wed Dec 15 08:41:01 2021 +0100
Commit: Miklos Vajna 
CommitDate: Wed Dec 15 09:33:04 2021 +0100

sd theme: add UI to set/get the name of a color set

The two names make sense because the theme can have not only color sets
but also font names, etc -- but for now we just care about the theme
name and a named color set.

Change-Id: Ieafca36da005a9c74964e39216bee3c33f6427cb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126850
Reviewed-by: Miklos Vajna 
Tested-by: Jenkins

diff --git a/cui/qa/uitest/tabpages/themepage.py 
b/cui/qa/uitest/tabpages/themepage.py
index eb97205d19ab..25726c63feda 100644
--- a/cui/qa/uitest/tabpages/themepage.py
+++ b/cui/qa/uitest/tabpages/themepage.py
@@ -23,7 +23,8 @@ class Test(UITestCase):
 drawPage = component.getDrawPages().getByIndex(0)
 master = drawPage.MasterPage
 theme = mkPropertyValues({
-"Name": "nameA"
+"Name": "nameA",
+"ColorSchemeName": "colorSetA"
 })
 master.Theme = theme
 
@@ -34,7 +35,13 @@ class Test(UITestCase):
 # Select RID_SVXPAGE_THEME.
 select_pos(xTabs, "3")
 themeName = xDialog.getChild("themeName")
+themeName.executeAction("TYPE", 
mkPropertyValues({"KEYCODE":"CTRL+A"}))
+themeName.executeAction("TYPE", 
mkPropertyValues({"KEYCODE":"BACKSPACE"}))
 themeName.executeAction("TYPE", mkPropertyValues({"TEXT": 
"nameB"}))
+colorSetName = xDialog.getChild("colorSetName")
+colorSetName.executeAction("TYPE", 
mkPropertyValues({"KEYCODE":"CTRL+A"}))
+colorSetName.executeAction("TYPE", 
mkPropertyValues({"KEYCODE":"BACKSPACE"}))
+colorSetName.executeAction("TYPE", mkPropertyValues({"TEXT": 
"colorSetB"}))
 
 # Then make sure the doc model is updated accordingly:
 # Without the accompanying fix in place, this test would have 
failed with:
@@ -42,6 +49,10 @@ class Test(UITestCase):
 # i.e. the UI didn't update the theme name.
 theme = convert_property_values_to_dict(master.Theme)
 self.assertEqual(theme["Name"], "nameB")
+# Without the accompanying fix in place, this test would have 
failed with:
+# AssertionError: 'colorSetA' != 'colorSetB'
+# i.e. the UI didn't update the color scheme name.
+self.assertEqual(theme["ColorSchemeName"], "colorSetB")
 
 
 # vim: set shiftwidth=4 softtabstop=4 expandtab:
diff --git a/cui/source/inc/themepage.hxx b/cui/source/inc/themepage.hxx
index 6596cd227244..613650c075b6 100644
--- a/cui/source/inc/themepage.hxx
+++ b/cui/source/inc/themepage.hxx
@@ -21,6 +21,7 @@ class SvxThemePage : public SfxTabPage
 static const WhichRangesContainer m_pRanges;
 
 std::unique_ptr m_xThemeName;
+std::unique_ptr m_xColorSetName;
 
 public:
 SvxThemePage(weld::Container* pPage, weld::DialogController* pController,
diff --git a/cui/source/tabpages/themepage.cxx 
b/cui/source/tabpages/themepage.cxx
index 4c2cd18716b9..99abeed799fb 100644
--- a/cui/source/tabpages/themepage.cxx
+++ b/cui/source/tabpages/themepage.cxx
@@ -27,6 +27,7 @@ SvxThemePage::SvxThemePage(weld::Container* pPage, 
weld::DialogController* pCont
const SfxItemSet& rInAttrs)
 : SfxTabPage(pPage, pController, "cui/ui/themetabpage.ui", "ThemePage", 
)
 , m_xThemeName(m_xBuilder->weld_entry("themeName"))
+, m_xColorSetName(m_xBuilder->weld_entry("colorSetName"))
 {
 }
 
@@ -57,6 +58,14 @@ void SvxThemePage::Reset(const SfxItemSet* pAttrs)
 it->second >>= aName;
 m_xThemeName->set_text(aName);
 }
+
+it = aMap.find("ColorSchemeName");
+if (it != aMap.end())
+{
+OUString aName;
+it->second >>= aName;
+m_xColorSetName->set_text(aName);
+}
 }
 
 bool SvxThemePage::FillItemSet(SfxItemSet* pAttrs)
@@ -76,6 +85,7 @@ bool SvxThemePage::FillItemSet(SfxItemSet* pAttrs)
 }
 
 aMap["Name"] <<= m_xThemeName->get_text();
+aMap["ColorSchemeName"] <<= m_xColorSetName->get_text();
 
 beans::PropertyValues aTheme = aMap.getAsConstPropertyValueList();
 aGrabBagItem.GetGrabBag()["Theme"] <<= aTheme;
diff --git a/cui/uiconfig/ui/themetabpage.ui b/cui/uiconfig/ui/themetabpage.ui
index c94c6093958b..81c1affbe85f 100644
--- a/cui/uiconfig/ui/themetabpage.ui
+++ b/cui/uiconfig/ui/themetabpage.ui
@@ -68,5 +68,65 @@
 0
   
 
+
+  
+True

[Libreoffice-commits] core.git: cui/qa cui/source cui/uiconfig cui/UIConfig_cui.mk solenv/sanitizers vcl/unx

2021-07-22 Thread haru-02 (via logerrit)
 cui/UIConfig_cui.mk|2 
 cui/qa/unit/data/cui-dialogs-test.txt  |2 
 cui/source/tabpages/tpbitmap.cxx   |   10 ++--
 cui/source/tabpages/tptrans.cxx|2 
 cui/uiconfig/ui/areatabpage.ui |2 
 cui/uiconfig/ui/imagetabpage.ui|   78 -
 cui/uiconfig/ui/transparencytabpage.ui |6 +-
 solenv/sanitizers/ui/cui.suppr |6 +-
 vcl/unx/gtk3/gtkinst.cxx   |2 
 9 files changed, 55 insertions(+), 55 deletions(-)

New commits:
commit 8580f2d5c8fef0c3c3ff1e92da09e13ec2158bea
Author: haru-02 
AuthorDate: Sun Jul 18 00:21:11 2021 +0400
Commit: Ilmari Lauhakangas 
CommitDate: Thu Jul 22 19:33:29 2021 +0200

tdf#95394 - ui fill dialog from (bitmap -> image)

Change-Id: Ib30eb0489e8cad2d417bc8638204b95f4acee936
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119115
Tested-by: Jenkins
Reviewed-by: Ilmari Lauhakangas 

diff --git a/cui/UIConfig_cui.mk b/cui/UIConfig_cui.mk
index 3af5d8e698e7..daa8a1e3d55d 100644
--- a/cui/UIConfig_cui.mk
+++ b/cui/UIConfig_cui.mk
@@ -34,7 +34,7 @@ $(eval $(call gb_UIConfig_add_uifiles,cui,\
cui/uiconfig/ui/assigncomponentdialog \
cui/uiconfig/ui/autocorrectdialog \
cui/uiconfig/ui/baselinksdialog \
-   cui/uiconfig/ui/bitmaptabpage \
+   cui/uiconfig/ui/imagetabpage \
cui/uiconfig/ui/borderareatransparencydialog \
cui/uiconfig/ui/borderbackgrounddialog \
cui/uiconfig/ui/borderpage \
diff --git a/cui/qa/unit/data/cui-dialogs-test.txt 
b/cui/qa/unit/data/cui-dialogs-test.txt
index d19d855e2fd5..cb176088446c 100644
--- a/cui/qa/unit/data/cui-dialogs-test.txt
+++ b/cui/qa/unit/data/cui-dialogs-test.txt
@@ -35,7 +35,7 @@ cui/ui/textdialog.ui
 # This is typically a hint that these should be hard-coded in the
 # test case since they need some document and model data to work
 #
-# cui/ui/bitmaptabpage.ui
+# cui/ui/imagetabpage.ui
 # cui/ui/connpooloptions.ui <- not calling DriverListControl::Init for
 #   ConnectionPoolOptionsPage::m_pDriverList leaves its BrowseBox::mvCols 
empty, causing "implicit
 #   conversion from type 'int' of value -1 (32-bit, signed) to type 
'sal_uInt16' (aka 'unsigned
diff --git a/cui/source/tabpages/tpbitmap.cxx b/cui/source/tabpages/tpbitmap.cxx
index bbc763a953c8..51d382193c2f 100644
--- a/cui/source/tabpages/tpbitmap.cxx
+++ b/cui/source/tabpages/tpbitmap.cxx
@@ -67,7 +67,7 @@ enum TileOffset
 }
 
 SvxBitmapTabPage::SvxBitmapTabPage(weld::Container* pPage, 
weld::DialogController* pController, const SfxItemSet& rInAttrs)
-: SfxTabPage(pPage, pController, "cui/ui/bitmaptabpage.ui", 
"BitmapTabPage", )
+: SfxTabPage(pPage, pController, "cui/ui/imagetabpage.ui", "ImageTabPage", 
)
 , m_rOutAttrs(rInAttrs)
 , m_pnBitmapListState(nullptr)
 , m_fObjectWidth(0.0)
@@ -76,8 +76,8 @@ SvxBitmapTabPage::SvxBitmapTabPage(weld::Container* pPage, 
weld::DialogControlle
 , m_aXFillAttr(rInAttrs.GetPool())
 , m_rXFSet(m_aXFillAttr.GetItemSet())
 , mpView(nullptr)
-, m_xBitmapLB(new 
SvxPresetListBox(m_xBuilder->weld_scrolled_window("bitmapwin", true)))
-, m_xBitmapStyleLB(m_xBuilder->weld_combo_box("bitmapstyle"))
+, m_xBitmapLB(new 
SvxPresetListBox(m_xBuilder->weld_scrolled_window("imagewin", true)))
+, m_xBitmapStyleLB(m_xBuilder->weld_combo_box("imagestyle"))
 , m_xSizeBox(m_xBuilder->weld_container("sizebox"))
 , m_xTsbScale(m_xBuilder->weld_check_button("scaletsb"))
 , m_xBitmapWidth(m_xBuilder->weld_metric_spin_button("width", 
FieldUnit::PERCENT))
@@ -91,8 +91,8 @@ SvxBitmapTabPage::SvxBitmapTabPage(weld::Container* pPage, 
weld::DialogControlle
 , m_xTileOffLB(m_xBuilder->weld_combo_box("tileofflb"))
 , m_xTileOffset(m_xBuilder->weld_metric_spin_button("tileoffmtr", 
FieldUnit::PERCENT))
 , m_xBtnImport(m_xBuilder->weld_button("BTN_IMPORT"))
-, m_xCtlBitmapPreview(new weld::CustomWeld(*m_xBuilder, 
"CTL_BITMAP_PREVIEW", m_aCtlBitmapPreview))
-, m_xBitmapLBWin(new weld::CustomWeld(*m_xBuilder, "BITMAP", *m_xBitmapLB))
+, m_xCtlBitmapPreview(new weld::CustomWeld(*m_xBuilder, 
"CTL_IMAGE_PREVIEW", m_aCtlBitmapPreview))
+, m_xBitmapLBWin(new weld::CustomWeld(*m_xBuilder, "IMAGE", *m_xBitmapLB))
 {
 // setting the output device
 m_rXFSet.Put( XFillStyleItem(drawing::FillStyle_BITMAP) );
diff --git a/cui/source/tabpages/tptrans.cxx b/cui/source/tabpages/tptrans.cxx
index b0517ad865f1..e78fcfffe16d 100644
--- a/cui/source/tabpages/tptrans.cxx
+++ b/cui/source/tabpages/tptrans.cxx
@@ -211,7 +211,7 @@ 
SvxTransparenceTabPage::SvxTransparenceTabPage(weld::Container* pPage, weld::Dia
 , 
m_xMtrTrgrEndValue(m_xBuilder->weld_metric_spin_button("MTR_TRGR_END_VALUE", 
FieldUnit::PERCENT))
 , m_xCtlBitmapBorder(m_xBuilder->weld_widget("bitmap_border"))
 , m_xCtlXRectBorder(m_xBuilder->weld_widget("trans_border"))
-, m_xCtlBitmapPreview(new weld::CustomWeld(*m_xBuilder, 

[Libreoffice-commits] core.git: cui/qa cui/source cui/uiconfig include/svx sd/source

2019-11-22 Thread Miklos Vajna (via logerrit)
 cui/qa/uitest/dialogs/chardlg.py |   49 +++
 cui/source/inc/chardlg.hxx   |3 ++
 cui/source/tabpages/chardlg.cxx  |   40 +++
 cui/uiconfig/ui/effectspage.ui   |   30 +++
 include/svx/flagsdef.hxx |1 
 sd/source/ui/dlg/dlgchar.cxx |2 +
 6 files changed, 124 insertions(+), 1 deletion(-)

New commits:
commit b4554b8eddd048532269df610e89ae739c46fab7
Author: Miklos Vajna 
AuthorDate: Fri Nov 22 17:12:04 2019 +0100
Commit: Miklos Vajna 
CommitDate: Fri Nov 22 18:33:39 2019 +0100

cui: add UI for semi-transparent shape text

- Make font color only work with the RGB color, otherwise the preview
  would be white for e.g. half-transparent red.

- Add label and widget to see already set transparency.

- Add a flag to show these only for Draw/Impress and leave Writer/Calc
  unchanged.

- Update returned item set to contain transparency in case the widget
  changes.

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

diff --git a/cui/qa/uitest/dialogs/chardlg.py b/cui/qa/uitest/dialogs/chardlg.py
new file mode 100644
index ..59cf10d18c29
--- /dev/null
+++ b/cui/qa/uitest/dialogs/chardlg.py
@@ -0,0 +1,49 @@
+#
+# 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/.
+#
+
+from libreoffice.uno.propertyvalue import mkPropertyValues
+from uitest.framework import UITestCase
+from uitest.uihelper.common import select_pos
+
+# Test for cui/source/tabpages/chardlg.cxx.
+class Test(UITestCase):
+
+def testSvxCharEffectsPage(self):
+# Start Impress.
+self.ui_test.create_doc_in_start_center("impress")
+template = self.xUITest.getTopFocusWindow()
+self.ui_test.close_dialog_through_button(template.getChild("cancel"))
+doc = self.xUITest.getTopFocusWindow()
+editWin = doc.getChild("impress_win")
+# Select the title shape.
+editWin.executeAction("TYPE", mkPropertyValues({"KEYCODE": "TAB"}))
+editWin.executeAction("TYPE", mkPropertyValues({"TEXT": "t"}))
+self.xUITest.executeCommand(".uno:SelectAll")
+
+# Now use Format -> Character.
+self.ui_test.execute_dialog_through_command(".uno:FontDialog")
+xDialog = self.xUITest.getTopFocusWindow()
+xTabs = xDialog.getChild("tabcontrol")
+# Select RID_SVXPAGE_CHAR_EFFECTS.
+select_pos(xTabs, "1")
+xFontTransparency = xDialog.getChild("fonttransparencymtr")
+for _ in range(5):
+xFontTransparency.executeAction("UP", tuple())
+self.ui_test.close_dialog_through_button(xDialog.getChild("ok"))
+
+# Verify the result.
+component = self.ui_test.get_component()
+drawPage = component.getDrawPages().getByIndex(0)
+shape = drawPage.getByIndex(0)
+
+# Without the accompanying fix in place, this test would have failed 
with:
+# AssertionError: 100 != 5
+# i.e. the dialog did not set transparency to 5%, instead it left the 
character color at
+# COL_AUTO.
+self.assertEqual(shape.CharTransparence, 5)
+self.ui_test.close_doc()
+
+# vim: set shiftwidth=4 softtabstop=4 expandtab:
diff --git a/cui/source/inc/chardlg.hxx b/cui/source/inc/chardlg.hxx
index 0b08d7e8f9a1..aa8196ca68c5 100644
--- a/cui/source/inc/chardlg.hxx
+++ b/cui/source/inc/chardlg.hxx
@@ -170,6 +170,8 @@ private:
 
 std::unique_ptr m_xFontColorFT;
 std::unique_ptr m_xFontColorLB;
+std::unique_ptr m_xFontTransparencyFT;
+std::unique_ptr m_xFontTransparencyMtr;
 std::unique_ptr m_xEffectsFT;
 std::unique_ptr m_xEffectsLB;
 std::unique_ptr m_xReliefFT;
@@ -205,6 +207,7 @@ private:
 DECL_LINK(CbClickHdl_Impl, weld::ToggleButton&, void);
 DECL_LINK(TristClickHdl_Impl, weld::ToggleButton&, void);
 DECL_LINK(ColorBoxSelectHdl_Impl, ColorListBox&, void);
+DECL_LINK(ModifyFontTransparencyHdl_Impl, weld::MetricSpinButton&, void);
 
 public:
 SvxCharEffectsPage(weld::Container* pPage, weld::DialogController* 
pController, const SfxItemSet& rSet);
diff --git a/cui/source/tabpages/chardlg.cxx b/cui/source/tabpages/chardlg.cxx
index 18987cc0a5cf..64b9f26c3b3a 100644
--- a/cui/source/tabpages/chardlg.cxx
+++ b/cui/source/tabpages/chardlg.cxx
@@ -1314,6 +1314,9 @@ SvxCharEffectsPage::SvxCharEffectsPage(weld::Container* 
pPage, weld::DialogContr
 , m_bUnderlineColorDisabled(false)
 , m_xFontColorFT(m_xBuilder->weld_label("fontcolorft"))
 , m_xFontColorLB(new 
ColorListBox(m_xBuilder->weld_menu_button("fontcolorlb"), 
pController->getDialog()))
+, m_xFontTransparencyFT(m_xBuilder->weld_label("fonttransparencyft"))
+

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

2018-03-20 Thread Caolán McNamara
 cui/UIConfig_cui.mk |1 
 cui/qa/unit/data/cui-dialogs-test_2.txt |1 
 cui/source/dialogs/dlgname.cxx  |   76 -
 cui/source/factory/dlgfact.hxx  |1 
 cui/source/inc/dlgname.hxx  |   26 ---
 cui/uiconfig/ui/messbox.ui  |  113 
 6 files changed, 218 deletions(-)

New commits:
commit 38c153c121fc05c49fa9bb02f3a4edf54a3ddeb1
Author: Caolán McNamara 
Date:   Mon Mar 19 21:36:56 2018 +

drop now unused SvxMessDialog

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

diff --git a/cui/UIConfig_cui.mk b/cui/UIConfig_cui.mk
index cc8ad828f6d1..234e4d7f3a42 100644
--- a/cui/UIConfig_cui.mk
+++ b/cui/UIConfig_cui.mk
@@ -98,7 +98,6 @@ $(eval $(call gb_UIConfig_add_uifiles,cui,\
cui/uiconfig/ui/macroassignpage \
cui/uiconfig/ui/macroselectordialog \
cui/uiconfig/ui/menuassignpage \
-   cui/uiconfig/ui/messbox \
cui/uiconfig/ui/mosaicdialog \
cui/uiconfig/ui/movemenu \
cui/uiconfig/ui/multipathdialog \
diff --git a/cui/qa/unit/data/cui-dialogs-test_2.txt 
b/cui/qa/unit/data/cui-dialogs-test_2.txt
index 0507e34f2605..5d87d13ffb73 100644
--- a/cui/qa/unit/data/cui-dialogs-test_2.txt
+++ b/cui/qa/unit/data/cui-dialogs-test_2.txt
@@ -49,7 +49,6 @@ cui/ui/macroassigndialog.ui
 cui/ui/macroassignpage.ui
 cui/ui/macroselectordialog.ui
 cui/ui/menuassignpage.ui
-cui/ui/messbox.ui
 cui/ui/mosaicdialog.ui
 cui/ui/movemenu.ui
 cui/ui/multipathdialog.ui
diff --git a/cui/source/dialogs/dlgname.cxx b/cui/source/dialogs/dlgname.cxx
index 148c7374df95..73a35e6b9c5b 100644
--- a/cui/source/dialogs/dlgname.cxx
+++ b/cui/source/dialogs/dlgname.cxx
@@ -95,80 +95,4 @@ 
SvxObjectTitleDescDialog::SvxObjectTitleDescDialog(weld::Window* pParent, const
 m_xEdtTitle->select_region(0, -1);
 }
 
-/*
-|*
-|* dialog for cancelling, saving or adding
-|*
-\/
-
-SvxMessDialog::SvxMessDialog( vcl::Window* pWindow, const OUString& rText, 
const OUString& rDesc, Image const * pImg )
-: ModalDialog(pWindow, "MessBox", "cui/ui/messbox.ui")
-, pImage(nullptr)
-{
-get(pBtn1, "mess_box_btn1");
-get(pBtn2, "mess_box_btn2");
-get(pFtDescription, "mess_box_description");
-get(pFtImage, "mess_box_image");
-if( pImg )
-{
-pImage = new Image( *pImg );
-pFtImage->SetImage( *pImage );
-pFtImage->SetStyle( ( pFtImage->GetStyle()/* | WB_NOTABSTOP */) & 
~WB_3DLOOK );
-pFtImage->Show();
-}
-
-SetText( rText );
-pFtDescription->SetText( rDesc );
-
-pBtn1->SetClickHdl( LINK( this, SvxMessDialog, Button1Hdl ) );
-pBtn2->SetClickHdl( LINK( this, SvxMessDialog, Button2Hdl ) );
-}
-
-SvxMessDialog::~SvxMessDialog()
-{
-disposeOnce();
-}
-
-void SvxMessDialog::dispose()
-{
-delete pImage;
-pImage = nullptr;
-pFtDescription.clear();
-pBtn1.clear();
-pBtn2.clear();
-pFtImage.clear();
-ModalDialog::dispose();
-}
-
-/*/
-
-IMPL_LINK_NOARG(SvxMessDialog, Button1Hdl, Button*, void)
-{
-EndDialog( RET_BTN_1 );
-}
-
-/*/
-
-IMPL_LINK_NOARG(SvxMessDialog, Button2Hdl, Button*, void)
-{
-EndDialog( RET_BTN_2 );
-}
-
-/*/
-
-void SvxMessDialog::SetButtonText( SvxMessDialogButton nBtnId, const OUString& 
rNewTxt )
-{
-switch ( nBtnId )
-{
-case SvxMessDialogButton::N1:
-pBtn1->SetText( rNewTxt );
-break;
-
-case SvxMessDialogButton::N2:
-pBtn2->SetText( rNewTxt );
-break;
-}
-}
-
-
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/cui/source/factory/dlgfact.hxx b/cui/source/factory/dlgfact.hxx
index 157e949bebf0..7d74cb2d9dd9 100644
--- a/cui/source/factory/dlgfact.hxx
+++ b/cui/source/factory/dlgfact.hxx
@@ -41,7 +41,6 @@ class SvxNameDialog;
 class SvxObjectNameDialog;
 class SvxObjectTitleDescDialog;
 
-class SvxMessDialog;
 class SvxMultiPathDialog;
 class SvxHpLinkDlg;
 class FmSearchDialog;
diff --git a/cui/source/inc/dlgname.hxx b/cui/source/inc/dlgname.hxx
index bed7fa68b850..4ac036ff6c10 100644
--- a/cui/source/inc/dlgname.hxx
+++ b/cui/source/inc/dlgname.hxx
@@ -119,32 +119,6 @@ public:
 OUString GetDescription() const { return m_xEdtDescription->get_text(); }
 };
 
-enum class SvxMessDialogButton {
-N1, N2
-};
-
-/// Dialog to cancel, save, or add
-class SvxMessDialog : public