[Libreoffice-commits] core.git: Branch 'distro/collabora/co-23.05' - cui/source framework/source include/vcl offapi/com officecfg/registry vcl/osx vcl/qt5 vcl/unx vcl/win

2023-10-05 Thread Gökay Şatır (via logerrit)
 cui/source/customize/acccfg.cxx|8 
 framework/source/accelerators/keymapping.cxx   |1 +
 include/vcl/keycodes.hxx   |1 +
 offapi/com/sun/star/awt/Key.idl|3 +++
 officecfg/registry/data/org/openoffice/Office/Accelerators.xcu |6 ++
 vcl/osx/salframe.cxx   |1 +
 vcl/osx/salmenu.cxx|3 +++
 vcl/qt5/QtFrame.cxx|3 +++
 vcl/qt5/QtWidget.cxx   |3 +++
 vcl/unx/generic/app/saldisp.cxx|7 +++
 vcl/unx/gtk3/gtkframe.cxx  |2 ++
 vcl/win/app/salinst.cxx|1 +
 vcl/win/window/salframe.cxx|3 +++
 13 files changed, 42 insertions(+)

New commits:
commit 1db8f6d484b884301a7d3673f4d05478e28cd853
Author: Gökay Şatır 
AuthorDate: Wed Oct 4 15:01:38 2023 +0300
Commit: Gökay ŞATIR 
CommitDate: Thu Oct 5 10:07:29 2023 +0200

Add NUMBERSIGN key handler.

German keyboard layout has number sign key.
Users can print number sign without using modification keys.
So this key can be assigned a shortcut.
Subscript is assigned to CTRL + NUMBERSIGN.

Below PR is used as reference when adding the new key handler:
https://gerrit.libreoffice.org/c/core/+/86713

Signed-off-by: Gökay Şatır 
Change-Id: I340dc47764e9200d2477f8db740a629f62f48004
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157554
Tested-by: Jenkins CollaboraOffice 

diff --git a/cui/source/customize/acccfg.cxx b/cui/source/customize/acccfg.cxx
index 760dc7a11d66..77eb3279301d 100644
--- a/cui/source/customize/acccfg.cxx
+++ b/cui/source/customize/acccfg.cxx
@@ -184,6 +184,7 @@ const sal_uInt16 KEYCODE_ARRAY[] = { KEY_F1,
  KEY_MOD1 | KEY_X,
  KEY_MOD1 | KEY_Y,
  KEY_MOD1 | KEY_Z,
+ KEY_MOD1 | KEY_NUMBERSIGN,
  KEY_MOD1 | KEY_COLON,
  KEY_MOD1 | KEY_SEMICOLON,
  KEY_MOD1 | KEY_QUOTELEFT,
@@ -269,6 +270,7 @@ const sal_uInt16 KEYCODE_ARRAY[] = { KEY_F1,
  KEY_SHIFT | KEY_MOD1 | KEY_X,
  KEY_SHIFT | KEY_MOD1 | KEY_Y,
  KEY_SHIFT | KEY_MOD1 | KEY_Z,
+ KEY_SHIFT | KEY_MOD1 | KEY_NUMBERSIGN,
  KEY_SHIFT | KEY_MOD1 | KEY_COLON,
  KEY_SHIFT | KEY_MOD1 | KEY_SEMICOLON,
  KEY_SHIFT | KEY_MOD1 | KEY_QUOTELEFT,
@@ -350,6 +352,7 @@ const sal_uInt16 KEYCODE_ARRAY[] = { KEY_F1,
  KEY_MOD2 | KEY_X,
  KEY_MOD2 | KEY_Y,
  KEY_MOD2 | KEY_Z,
+ KEY_MOD2 | KEY_NUMBERSIGN,
  KEY_MOD2 | KEY_COLON,
  KEY_MOD2 | KEY_SEMICOLON,
  KEY_MOD2 | KEY_QUOTELEFT,
@@ -429,6 +432,7 @@ const sal_uInt16 KEYCODE_ARRAY[] = { KEY_F1,
  KEY_SHIFT | KEY_MOD2 | KEY_X,
  KEY_SHIFT | KEY_MOD2 | KEY_Y,
  KEY_SHIFT | KEY_MOD2 | KEY_Z,
+ KEY_SHIFT | KEY_MOD2 | KEY_NUMBERSIGN,
  KEY_SHIFT | KEY_MOD2 | KEY_COLON,
  KEY_SHIFT | KEY_MOD2 | KEY_SEMICOLON,
  KEY_SHIFT | KEY_MOD2 | KEY_QUOTELEFT,
@@ -509,6 +513,7 @@ const sal_uInt16 KEYCODE_ARRAY[] = { KEY_F1,
  KEY_MOD1 | KEY_MOD2 | KEY_X,
  KEY_MOD1 | KEY_MOD2 | KEY_Y,
  KEY_MOD1 | KEY_MOD2 | KEY_Z,
+ KEY_MOD1 | KEY_MOD2 | KEY_NUMBERSIGN,
  KEY_MOD1 | KEY_MOD2 | KEY_COLON,
  KEY_MOD1 | KEY_MOD2 | KEY_SEMICOLON,
  KEY_MOD1 | KEY_MOD2 | KEY_QUOTELEFT,
@@ -588,6 +593,7 @@ const sal_uInt16 KEYCODE_ARRAY[] = { KEY_F1,
  KEY_SHIFT | KEY_MOD1 | KEY_MOD2 | KEY_X,
  KEY_SHIFT | KEY_MOD1 | KEY_MOD2 | KEY_Y,
  KEY_SHIFT | KEY_MOD1 | KEY_MOD2 | KEY_Z,
+ KEY_SHIFT | 

[Libreoffice-commits] core.git: Branch 'distro/collabora/co-23.05' - cui/source

2023-09-25 Thread Balazs Varga (via logerrit)
 cui/source/inc/QrCodeGenDialog.hxx |2 ++
 1 file changed, 2 insertions(+)

New commits:
commit 21554305046e7faeb6d64c4eea622b968db1f474
Author: Balazs Varga 
AuthorDate: Mon Sep 25 14:07:21 2023 +0200
Commit: Miklos Vajna 
CommitDate: Mon Sep 25 15:28:12 2023 +0200

COWASM-02 - Fix wasm build for co-23.05

"Undeclared identifier mpParent in GetParent()"

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

diff --git a/cui/source/inc/QrCodeGenDialog.hxx 
b/cui/source/inc/QrCodeGenDialog.hxx
index e477c0b44879..02037ad4cdf6 100644
--- a/cui/source/inc/QrCodeGenDialog.hxx
+++ b/cui/source/inc/QrCodeGenDialog.hxx
@@ -28,7 +28,9 @@ public:
  const std::function& rFunc);
 
 void Apply();
+#if ENABLE_ZXING
 weld::Widget* GetParent() { return mpParent; }
+#endif
 
 private:
 css::uno::Reference m_xModel;


[Libreoffice-commits] core.git: Branch 'distro/collabora/co-23.05' - cui/source

2023-09-15 Thread Caolán McNamara (via logerrit)
 cui/source/dialogs/SpellDialog.cxx |2 ++
 1 file changed, 2 insertions(+)

New commits:
commit a0e97ccc7bdd5ba7ca79f490f92c6cefc3595fa9
Author: Caolán McNamara 
AuthorDate: Tue Sep 12 10:23:19 2023 +0100
Commit: Miklos Vajna 
CommitDate: Fri Sep 15 09:13:44 2023 +0200

tdf#157148 ensure we auto-scroll to current location to make it visible

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

diff --git a/cui/source/dialogs/SpellDialog.cxx 
b/cui/source/dialogs/SpellDialog.cxx
index 3a735afa38ae..cf7d03972bee 100644
--- a/cui/source/dialogs/SpellDialog.cxx
+++ b/cui/source/dialogs/SpellDialog.cxx
@@ -1705,6 +1705,8 @@ void SentenceEditWindow_Impl::MoveErrorMarkTo(sal_Int32 
nStart, sal_Int32 nEnd,
 if (!bCurrentSelectionInRange)
 {
 m_xEditView->SetSelection(ESelection(0, nStart));
+// tdf#157148 ensure current location is auto-scrolled to be visible
+m_xEditView->ShowCursor();
 }
 
 Invalidate();


[Libreoffice-commits] core.git: Branch 'distro/collabora/co-23.05' - cui/source sw/source vcl/jsdialog

2023-09-08 Thread Darshan-upadhyay1110 (via logerrit)
 cui/source/dialogs/QrCodeGenDialog.cxx |   27 +++
 cui/source/factory/dlgfact.cxx |4 ++--
 cui/source/factory/dlgfact.hxx |2 +-
 cui/source/inc/QrCodeGenDialog.hxx |5 -
 sw/source/uibase/uiview/viewdlg2.cxx   |6 --
 vcl/jsdialog/enabled.cxx   |1 +
 6 files changed, 39 insertions(+), 6 deletions(-)

New commits:
commit 6ed38adb5578d0b52d11d8f2077e345f9a8c7ade
Author: Darshan-upadhyay1110 
AuthorDate: Thu Sep 7 13:00:50 2023 +0530
Commit: Szymon Kłos 
CommitDate: Fri Sep 8 20:38:53 2023 +0200

Enable QR and barcode dialog for online

 - enable QR and barcode genration dialog for online
 - Change Qr code genration dialog to async

Change-Id: Ia46b8e27a3002adcc893e5ef4c2545d7edcc3e41
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156642
Reviewed-by: Szymon Kłos 
Tested-by: Jenkins CollaboraOffice 

diff --git a/cui/source/dialogs/QrCodeGenDialog.cxx 
b/cui/source/dialogs/QrCodeGenDialog.cxx
index 817be7f21ede..43f6f26279ae 100644
--- a/cui/source/dialogs/QrCodeGenDialog.cxx
+++ b/cui/source/dialogs/QrCodeGenDialog.cxx
@@ -231,6 +231,33 @@ short QrCodeGenDialog::run()
 #endif
 }
 
+bool QrCodeGenDialog::runAsync(const std::shared_ptr& 
rController,
+   const std::function& rFunc)
+{
+#if ENABLE_ZXING
+
+weld::GenericDialogController::runAsync(rController, [rController, 
rFunc](sal_Int32 nResult) {
+if (nResult == RET_OK)
+{
+try
+{
+rController->Apply();
+}
+catch (const std::exception&)
+{
+std::unique_ptr 
xBox(Application::CreateMessageDialog(
+rController->GetParent(), VclMessageType::Warning, 
VclButtonsType::Ok,
+CuiResId(RID_CUISTR_QRCODEDATALONG)));
+xBox->run();
+}
+}
+
+rFunc(nResult);
+});
+#endif
+return true;
+}
+
 void QrCodeGenDialog::Apply()
 {
 #if ENABLE_ZXING
diff --git a/cui/source/factory/dlgfact.cxx b/cui/source/factory/dlgfact.cxx
index 091caf4d2bb7..a571b99887ae 100644
--- a/cui/source/factory/dlgfact.cxx
+++ b/cui/source/factory/dlgfact.cxx
@@ -113,7 +113,6 @@ IMPL_ABSTDLG_CLASS(AbstractGraphicFilterDialog)
 IMPL_ABSTDLG_CLASS(AbstractHangulHanjaConversionDialog)
 IMPL_ABSTDLG_CLASS(AbstractInsertObjectDialog)
 IMPL_ABSTDLG_CLASS(AbstractLinksDialog)
-IMPL_ABSTDLG_CLASS(AbstractQrCodeGenDialog)
 IMPL_ABSTDLG_CLASS(AbstractScreenshotAnnotationDlg)
 IMPL_ABSTDLG_CLASS(AbstractSignatureLineDialog)
 IMPL_ABSTDLG_CLASS(AbstractSignSignatureLineDialog)
@@ -132,6 +131,7 @@ IMPL_ABSTDLG_CLASS(AbstractSvxZoomDialog)
 IMPL_ABSTDLG_CLASS(AbstractTitleDialog)
 IMPL_ABSTDLG_CLASS(AbstractURLDlg)
 
IMPL_ABSTDLG_CLASS_ASYNC(AbstractPasswordToOpenModifyDialog,weld::DialogController)
+IMPL_ABSTDLG_CLASS_ASYNC(AbstractQrCodeGenDialog,QrCodeGenDialog)
 IMPL_ABSTDLG_CLASS_ASYNC(AbstractPasteDialog,SfxDialogController)
 IMPL_ABSTDLG_CLASS_ASYNC(AbstractScriptSelectorDialog,SfxDialogController)
 IMPL_ABSTDLG_CLASS_ASYNC(AbstractSpellDialog,SfxDialogController)
@@ -1490,7 +1490,7 @@ VclPtr 
AbstractDialogFactory_Impl::CreateQrCodeGenDialo
 weld::Window* pParent, const Reference xModel, bool bEditExisting)
 {
 return VclPtr::Create(
-std::make_unique(pParent, xModel, bEditExisting));
+std::make_shared(pParent, xModel, bEditExisting));
 }
 
 VclPtr 
AbstractDialogFactory_Impl::CreateAdditionsDialog(
diff --git a/cui/source/factory/dlgfact.hxx b/cui/source/factory/dlgfact.hxx
index 991ec082ad48..0d60011a922b 100644
--- a/cui/source/factory/dlgfact.hxx
+++ b/cui/source/factory/dlgfact.hxx
@@ -406,7 +406,7 @@ 
DECL_ABSTDLG_CLASS(AbstractSignatureLineDialog,SignatureLineDialog)
 };
 
 // AbstractQrCodeGenDialog_Impl
-DECL_ABSTDLG_CLASS(AbstractQrCodeGenDialog,QrCodeGenDialog)
+DECL_ABSTDLG_CLASS_ASYNC(AbstractQrCodeGenDialog,QrCodeGenDialog)
 };
 
 // AbstractSignSignatureLineDialog_Impl
diff --git a/cui/source/inc/QrCodeGenDialog.hxx 
b/cui/source/inc/QrCodeGenDialog.hxx
index 001df88c5581..e477c0b44879 100644
--- a/cui/source/inc/QrCodeGenDialog.hxx
+++ b/cui/source/inc/QrCodeGenDialog.hxx
@@ -24,9 +24,11 @@ public:
 bool bEditExisting);
 
 virtual short run() override;
+static bool runAsync(const std::shared_ptr& rController,
+ const std::function& rFunc);
 
-protected:
 void Apply();
+weld::Widget* GetParent() { return mpParent; }
 
 private:
 css::uno::Reference m_xModel;
@@ -34,6 +36,7 @@ private:
 std::unique_ptr m_xECC[4];
 std::unique_ptr m_xSpinBorder;
 std::unique_ptr m_xComboType;
+
 #if ENABLE_ZXING
 weld::Widget* mpParent;
 #endif
diff --git a/sw/source/uibase/uiview/viewdlg2.cxx 
b/sw/source/uibase/uiview/viewdlg2.cxx
index 19678d38fdcb..597731645ebe 100644
--- a/sw/source/uibase/uiview/viewdlg2.cxx
+++ 

[Libreoffice-commits] core.git: Branch 'distro/collabora/co-23.05' - cui/source

2023-08-28 Thread Tomaž Vajngerl (via logerrit)
 cui/source/tabpages/chardlg.cxx |   13 +
 1 file changed, 1 insertion(+), 12 deletions(-)

New commits:
commit 431f9322863d0002b67469741a967b408d301905
Author: Tomaž Vajngerl 
AuthorDate: Fri Aug 18 22:28:33 2023 +0200
Commit: Mike Kaganski 
CommitDate: Mon Aug 28 12:44:46 2023 +0200

cui: use common menthod to get the complex color from a NamedColor

NamedColor implements a getComplexColor method, which creates the
ComplexColor from the NamedColor attributes. We don't need to do
this ourselves.

Change-Id: If2629d49b7b2e561b85b93314f56a95492cafd93
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155863
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl 
(cherry picked from commit 3f7e9b2ea67a8de9ad9dd819ec2eb91e8180af95)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156166
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Mike Kaganski 

diff --git a/cui/source/tabpages/chardlg.cxx b/cui/source/tabpages/chardlg.cxx
index 325b7925fb66..716e193af45e 100644
--- a/cui/source/tabpages/chardlg.cxx
+++ b/cui/source/tabpages/chardlg.cxx
@@ -1594,18 +1594,7 @@ bool SvxCharEffectsPage::FillItemSetColor_Impl( 
SfxItemSet& rSet )
 
 if (bChanged)
 {
-SvxColorItem aItem( aSelectedColor.m_aColor, nWhich );
-
-// The color was picked from the theme palette, remember its index.
-model::ThemeColorType eType = 
model::convertToThemeColorType(aSelectedColor.m_nThemeIndex);
-if (eType != model::ThemeColorType::Unknown)
-{
-auto aComplexColor = model::ComplexColor::Theme(eType);
-
aComplexColor.addTransformation({model::TransformationType::LumMod, 
aSelectedColor.m_nLumMod});
-
aComplexColor.addTransformation({model::TransformationType::LumOff, 
aSelectedColor.m_nLumOff});
-aItem.setComplexColor(aComplexColor);
-}
-
+SvxColorItem aItem(aSelectedColor.m_aColor, 
aSelectedColor.getComplexColor(), nWhich);
 rSet.Put(aItem);
 }
 else if ( SfxItemState::DEFAULT == rOldSet.GetItemState( nWhich, false ) )


[Libreoffice-commits] core.git: Branch 'distro/collabora/co-23.05' - cui/source sw/qa

2023-08-25 Thread Caolán McNamara (via logerrit)
 cui/source/tabpages/paragrph.cxx  |   26 ++
 sw/qa/uitest/writer_tests2/formatParagraph.py |   10 +-
 sw/qa/uitest/writer_tests3/tdf79236.py|   20 ++--
 3 files changed, 33 insertions(+), 23 deletions(-)

New commits:
commit aa64eff44b3b6d0bf5c96f851e5181ce1909d604
Author: Caolán McNamara 
AuthorDate: Tue Aug 22 13:14:38 2023 +0100
Commit: Miklos Vajna 
CommitDate: Fri Aug 25 09:33:22 2023 +0200

tdf#101895 don't unconditionally default to ch[ar]/line

if CJK typography is available.

Given that we choose to show cm vs inch based on
SvtSysLocaleOptions::GetRealLanguageTag() also choose to use ch[ar] and
line based on that setting when bApplyCharUnit is enabled.

Change-Id: I812d05e0639f7e214d5c3d4dcca01b0709126fd9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155948
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155949
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Miklos Vajna 

diff --git a/cui/source/tabpages/paragrph.cxx b/cui/source/tabpages/paragrph.cxx
index f03464c70d73..2f81e4f4ddb2 100644
--- a/cui/source/tabpages/paragrph.cxx
+++ b/cui/source/tabpages/paragrph.cxx
@@ -45,11 +45,14 @@
 #include 
 #include 
 #include 
+#include 
+#include 
 #include 
 #include 
 #include 
 #include 
 #include 
+#include 
 
 const WhichRangesContainer SvxStdParagraphTabPage::pStdRanges(
 svl::Items<
@@ -407,6 +410,19 @@ bool SvxStdParagraphTabPage::FillItemSet( SfxItemSet* 
rOutSet )
 return bModified;
 }
 
+static bool UseCharUnitInUI(const SfxItemSet& rSet)
+{
+const bool bApplyCharUnit = GetApplyCharUnit(rSet);
+if (!bApplyCharUnit)
+return false;
+if (!SvtCJKOptions::IsAsianTypographyEnabled())
+return false;
+// tdf#101895 Given that we choose to show cm vs inch based on this Locale
+// setting, also choose to use ch[ar] and line based on that locale when
+// bApplyCharUnit is enabled.
+return 
MsLangId::isCJK(SvtSysLocaleOptions().GetRealLanguageTag().getLanguageType());
+}
+
 void SvxStdParagraphTabPage::Reset( const SfxItemSet* rSet )
 {
 SfxItemPool* pPool = rSet->GetPool();
@@ -414,10 +430,7 @@ void SvxStdParagraphTabPage::Reset( const SfxItemSet* rSet 
)
 
 // adjust metric
 FieldUnit eFUnit = GetModuleFieldUnit( *rSet );
-
-bool bApplyCharUnit = GetApplyCharUnit( *rSet );
-
-if(SvtCJKOptions::IsAsianTypographyEnabled() && bApplyCharUnit )
+if (UseCharUnitInUI(*rSet))
 eFUnit = FieldUnit::CHAR;
 
 m_xLeftIndent->SetFieldUnit(eFUnit);
@@ -1599,10 +1612,7 @@ void SvxExtParagraphTabPage::Reset( const SfxItemSet* 
rSet )
 
 // adjust metric
 FieldUnit eFUnit = GetModuleFieldUnit( *rSet );
-
-bool bApplyCharUnit = GetApplyCharUnit( *rSet );
-
-if( SvtCJKOptions::IsAsianTypographyEnabled() && bApplyCharUnit )
+if (UseCharUnitInUI(*rSet))
 eFUnit = FieldUnit::CHAR;
 
 sal_uInt16 _nWhich = GetWhich( SID_ATTR_PARA_HYPHENZONE );
diff --git a/sw/qa/uitest/writer_tests2/formatParagraph.py 
b/sw/qa/uitest/writer_tests2/formatParagraph.py
index cd72dbf7efe7..e90d0fd7f980 100644
--- a/sw/qa/uitest/writer_tests2/formatParagraph.py
+++ b/sw/qa/uitest/writer_tests2/formatParagraph.py
@@ -58,12 +58,12 @@ class formatParagraph(UITestCase):
 xLineSpacing = xDialog.getChild("comboLB_LINEDIST")
 xActivate = xDialog.getChild("checkCB_REGISTER")
 
-self.assertEqual(get_state_as_dict(xBeforeText)["Text"], "0.50 
ch")
-self.assertEqual(get_state_as_dict(xAfterText)["Text"], "0.50 
ch")
-self.assertEqual(get_state_as_dict(xFirstLine)["Text"], "0.50 
ch")
+self.assertEqual(get_state_as_dict(xBeforeText)["Text"], 
"0.02″")
+self.assertEqual(get_state_as_dict(xAfterText)["Text"], 
"0.02″")
+self.assertEqual(get_state_as_dict(xFirstLine)["Text"], 
"0.02″")
 self.assertEqual(get_state_as_dict(xAutomaticChk)["Selected"], 
"true")
-self.assertEqual(get_state_as_dict(xAbovePar)["Text"], "0.50 
line")
-self.assertEqual(get_state_as_dict(xBelowPar)["Text"], "0.50 
line")
+self.assertEqual(get_state_as_dict(xAbovePar)["Text"], "0.02″")
+self.assertEqual(get_state_as_dict(xBelowPar)["Text"], "0.02″")
 self.assertEqual(get_state_as_dict(xChkspace)["Selected"], 
"true")
 
self.assertEqual(get_state_as_dict(xLineSpacing)["SelectEntryText"], "Double")
 self.assertEqual(get_state_as_dict(xActivate)["Selected"], 
"true")
diff --git a/sw/qa/uitest/writer_tests3/tdf79236.py 
b/sw/qa/uitest/writer_tests3/tdf79236.py
index c8e857188c9c..d7b59da19f63 100644
--- a/sw/qa/uitest/writer_tests3/tdf79236.py
+++ b/sw/qa/uitest/writer_tests3/tdf79236.py
@@ -59,11 +59,11 @@ class 

[Libreoffice-commits] core.git: Branch 'distro/collabora/co-23.05' - cui/source sw/source vcl/inc vcl/jsdialog

2023-08-09 Thread Skyler Grey (via logerrit)
 cui/source/tabpages/numpages.cxx |6 +-
 sw/source/ui/misc/num.cxx|   11 +--
 vcl/inc/jsdialog/jsdialogbuilder.hxx |1 +
 vcl/jsdialog/enabled.cxx |1 +
 vcl/jsdialog/jsdialogbuilder.cxx |6 ++
 5 files changed, 14 insertions(+), 11 deletions(-)

New commits:
commit 6b9415005fee130e9d9b4b005a56975794a47934
Author: Skyler Grey 
AuthorDate: Wed Aug 2 08:31:56 2023 +
Commit: Szymon Kłos 
CommitDate: Wed Aug 9 13:18:43 2023 +0200

Re-enable Bullets and Numbering → Customize

- Revert change If0f7b953a40ca1d5f469087cb8f362a949c39b37
- Enable jsdialog for the customize page
- Fix numbering not being selected when switching level
- Fix start at field not having a default when changing level type to one 
that can use it
- Disable types that rely on supporting graphics in LOK as we cannot
  provide them

Change-Id: I2517289b553b8a3e9ed62c64b6514c6aab3702b6
Signed-off-by: Skyler Grey 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153806
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Szymon Kłos 

diff --git a/cui/source/tabpages/numpages.cxx b/cui/source/tabpages/numpages.cxx
index 9b97d19460b5..1f5de3dc387b 100644
--- a/cui/source/tabpages/numpages.cxx
+++ b/cui/source/tabpages/numpages.cxx
@@ -52,6 +52,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 
@@ -1089,7 +1090,9 @@ 
SvxNumOptionsTabPage::SvxNumOptionsTabPage(weld::Container* pPage, weld::DialogC
 sal_uInt32 nCount = SvxNumberingTypeTable::Count();
 for (sal_uInt32 i = 0; i < nCount; ++i)
 {
-m_xFmtLB->append(OUString::number(SvxNumberingTypeTable::GetValue(i)), 
SvxNumberingTypeTable::GetString(i));
+int nValue = SvxNumberingTypeTable::GetValue(i);
+if (comphelper::LibreOfficeKit::isActive() && (nValue & 
SVX_NUM_BITMAP)) continue;
+m_xFmtLB->append(OUString::number(nValue), 
SvxNumberingTypeTable::GetString(i));
 }
 
 // Get advanced numbering types from the component.
@@ -1464,6 +1467,7 @@ void SvxNumOptionsTabPage::InitControls()
 else
 m_xBulColLB->SetNoSelection();
 }
+m_xStartED->set_value(1); // If this isn't set then changing the bullet 
type to a numbered type doesn't reset the start level
 switch(nBullet)
 {
 case SHOW_NUMBERING:
diff --git a/sw/source/ui/misc/num.cxx b/sw/source/ui/misc/num.cxx
index 137b6db9f015..a5caff53a0c8 100644
--- a/sw/source/ui/misc/num.cxx
+++ b/sw/source/ui/misc/num.cxx
@@ -873,16 +873,7 @@ 
SwSvxNumBulletTabDialog::SwSvxNumBulletTabDialog(weld::Window* pParent,
 AddTabPage("bullets", RID_SVXPAGE_PICK_BULLET );
 AddTabPage("outlinenum", RID_SVXPAGE_PICK_NUM );
 AddTabPage("graphics", RID_SVXPAGE_PICK_BMP );
-
-if (comphelper::LibreOfficeKit::isActive())
-{
-RemoveTabPage("customize");
-}
-else
-{
-AddTabPage("customize", RID_SVXPAGE_NUM_OPTIONS );
-}
-
+AddTabPage("customize", RID_SVXPAGE_NUM_OPTIONS );
 AddTabPage("position", RID_SVXPAGE_NUM_POSITION );
 }
 
diff --git a/vcl/inc/jsdialog/jsdialogbuilder.hxx 
b/vcl/inc/jsdialog/jsdialogbuilder.hxx
index 060a3e1bb72a..8ed7743c96dd 100644
--- a/vcl/inc/jsdialog/jsdialogbuilder.hxx
+++ b/vcl/inc/jsdialog/jsdialogbuilder.hxx
@@ -623,6 +623,7 @@ public:
 virtual void set_entry_text_without_notify(const OUString& rText);
 virtual void set_entry_text(const OUString& rText) override;
 virtual void set_active(int pos) override;
+virtual void set_active_id(const OUString& rText) override;
 virtual bool changed_by_direct_pick() const override;
 };
 
diff --git a/vcl/jsdialog/enabled.cxx b/vcl/jsdialog/enabled.cxx
index 647cec05602b..4db6b0da9113 100644
--- a/vcl/jsdialog/enabled.cxx
+++ b/vcl/jsdialog/enabled.cxx
@@ -53,6 +53,7 @@ bool isBuilderEnabled(std::u16string_view rUIFile, bool 
bMobile)
 || rUIFile == u"cui/ui/linetabpage.ui"
 || rUIFile == u"cui/ui/macroselectordialog.ui"
 || rUIFile == u"cui/ui/numberingformatpage.ui"
+|| rUIFile == u"cui/ui/numberingoptionspage.ui"
 || rUIFile == u"cui/ui/numberingpositionpage.ui"
 || rUIFile == u"cui/ui/optlingupage.ui"
 || rUIFile == u"cui/ui/pageformatpage.ui"
diff --git a/vcl/jsdialog/jsdialogbuilder.cxx b/vcl/jsdialog/jsdialogbuilder.cxx
index 5740e300ae9a..9d1bc1774165 100644
--- a/vcl/jsdialog/jsdialogbuilder.cxx
+++ b/vcl/jsdialog/jsdialogbuilder.cxx
@@ -1665,6 +1665,12 @@ void JSComboBox::set_active(int pos)
 sendUpdate();
 }
 
+void JSComboBox::set_active_id(const OUString& rStr)
+{
+sal_uInt16 nPos = find_id(rStr);
+set_active(nPos);
+}
+
 bool JSComboBox::changed_by_direct_pick() const { return true; }
 
 JSNotebook::JSNotebook(JSDialogSender* pSender, ::TabControl* pControl,


[Libreoffice-commits] core.git: Branch 'distro/collabora/co-23.05' - cui/source cui/uiconfig

2023-05-18 Thread Aron Budea (via logerrit)
 cui/source/inc/optlingu.hxx |1 +
 cui/source/options/optlingu.cxx |   17 ++---
 cui/uiconfig/ui/optlingupage.ui |4 ++--
 3 files changed, 17 insertions(+), 5 deletions(-)

New commits:
commit 086d03602959d096caa440772cfb1f92bc6a9257
Author: Aron Budea 
AuthorDate: Sun Apr 30 01:40:55 2023 +0200
Commit: Andras Timar 
CommitDate: Thu May 18 20:34:37 2023 +0200

cui, lok: Hide options irrelevant for online in Spelling Options dialog

User-defined Dictionaries part and
Get more dictionaries URL + icon.

Change-Id: I73825a481e1981145abbf36b44485fb1628fbe13
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151212
Tested-by: Jenkins
Reviewed-by: Aron Budea 
(cherry picked from commit 17e3aa456095cab2d9058f99f8523f080c0774e0)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151374
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Andras Timar 

diff --git a/cui/source/inc/optlingu.hxx b/cui/source/inc/optlingu.hxx
index 365acfbbb0fb..dbe0b8428718 100644
--- a/cui/source/inc/optlingu.hxx
+++ b/cui/source/inc/optlingu.hxx
@@ -118,6 +118,7 @@ private:
 std::unique_ptr m_xLinguDicsDelPB;
 std::unique_ptr m_xLinguOptionsCLB;
 std::unique_ptr m_xLinguOptionsEditPB;
+std::unique_ptr m_xMoreDictsBox;
 std::unique_ptr m_xMoreDictsLink;
 
 voidAddDicBoxEntry( const css::uno::Reference< 
css::linguistic2::XDictionary > , sal_uInt16 nIdx );
diff --git a/cui/source/options/optlingu.cxx b/cui/source/options/optlingu.cxx
index 6db7634159b1..1a65d9d5cee5 100644
--- a/cui/source/options/optlingu.cxx
+++ b/cui/source/options/optlingu.cxx
@@ -33,6 +33,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -847,6 +848,7 @@ SvxLinguTabPage::SvxLinguTabPage(weld::Container* pPage, 
weld::DialogController*
 , m_xLinguDicsDelPB(m_xBuilder->weld_button("lingudictsdelete"))
 , m_xLinguOptionsCLB(m_xBuilder->weld_tree_view("linguoptions"))
 , m_xLinguOptionsEditPB(m_xBuilder->weld_button("linguoptionsedit"))
+, m_xMoreDictsBox(m_xBuilder->weld_box("moredictsbox"))
 , m_xMoreDictsLink(m_xBuilder->weld_link_button("moredictslink"))
 {
 m_xLinguModulesCLB->enable_toggle_buttons(weld::ColumnToggleType::Check);
@@ -872,7 +874,15 @@ SvxLinguTabPage::SvxLinguTabPage(weld::Container* pPage, 
weld::DialogController*
 
 m_xMoreDictsLink->connect_activate_link(LINK(this, SvxLinguTabPage, 
OnLinkClick));
 if (officecfg::Office::Security::Hyperlinks::Open::get() == 
SvtExtendedSecurityOptions::OPEN_NEVER)
-m_xMoreDictsLink->hide();
+m_xMoreDictsBox->hide();
+
+if (comphelper::LibreOfficeKit::isActive())
+{
+// hide User-defined Dictionaries part
+m_xBuilder->weld_frame("dictsframe")->hide();
+// hide Get more dictionaries URL + icon
+m_xMoreDictsBox->hide();
+}
 
 xProp = LinguMgr::GetLinguPropertySet();
 xDicList.set( LinguMgr::GetDictionaryList() );
@@ -1526,9 +1536,10 @@ void SvxLinguTabPage::HideGroups( sal_uInt16 nGrp )
 m_xLinguModulesCLB->hide();
 m_xLinguModulesEditPB->hide();
 
-if (officecfg::Office::Security::Hyperlinks::Open::get() != 
SvtExtendedSecurityOptions::OPEN_NEVER)
+if (officecfg::Office::Security::Hyperlinks::Open::get() != 
SvtExtendedSecurityOptions::OPEN_NEVER &&
+!comphelper::LibreOfficeKit::isActive())
 {
-m_xMoreDictsLink->show();
+m_xMoreDictsBox->show();
 }
 }
 }
diff --git a/cui/uiconfig/ui/optlingupage.ui b/cui/uiconfig/ui/optlingupage.ui
index 5ae94f81c0b6..13d9b3d059f9 100644
--- a/cui/uiconfig/ui/optlingupage.ui
+++ b/cui/uiconfig/ui/optlingupage.ui
@@ -231,7 +231,7 @@
   
 
 
-  
+  
 True
 False
 0
@@ -516,7 +516,7 @@
   
 
 
-  
+  
 True
 False
 


[Libreoffice-commits] core.git: Branch 'distro/collabora/co-23.05' - cui/source

2023-04-24 Thread Tor Lillqvist (via logerrit)
 cui/source/options/optcolor.cxx |   16 ++--
 1 file changed, 10 insertions(+), 6 deletions(-)

New commits:
commit 7365ace31b1943f06e0ecc9164ba931a0e9030f9
Author: Tor Lillqvist 
AuthorDate: Thu Feb 23 12:29:48 2023 +0200
Commit: Tor Lillqvist 
CommitDate: Mon Apr 24 11:58:12 2023 +0200

Don't call CuiResId() in a global static variable initialiser

Instead, have a function that returns a reference to a local static
variable. That local static is then initialised only when the function
is called for the first time. Calling CuiResId() in a global
initialiser is a bit questionable, and causes an uncaught exception
when LO core is used in a WASM app. Possibly it would also have been
problematic on other uncommon platforms.

Change-Id: I4fd799ba3aa8d63fd3db1eb8cf6211aeed904ed2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147512
Tested-by: Tor Lillqvist 
Reviewed-by: Tor Lillqvist 
(cherry picked from commit 6f29310fe83873c7d6844cf5e3089ca981e147db)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150149
Tested-by: Jenkins CollaboraOffice 

diff --git a/cui/source/options/optcolor.cxx b/cui/source/options/optcolor.cxx
index eb13b442232a..112be3ea215c 100644
--- a/cui/source/options/optcolor.cxx
+++ b/cui/source/options/optcolor.cxx
@@ -160,9 +160,13 @@ const vEntryInfo[] =
 };
 
 // Maps the names of default color schemes to the corresponding TranslateId
-std::map const vColorSchemes = {
-{"COLOR_SCHEME_LIBREOFFICE_AUTOMATIC", 
CuiResId(RID_COLOR_SCHEME_LIBREOFFICE_AUTOMATIC)},
-{"COLOR_SCHEME_LIBREOFFICE_DARK",  
CuiResId(RID_COLOR_SCHEME_LIBREOFFICE_DARK)}
+const std::map ()
+{
+static std::map const vColorSchemes = {
+{"COLOR_SCHEME_LIBREOFFICE_AUTOMATIC", 
CuiResId(RID_COLOR_SCHEME_LIBREOFFICE_AUTOMATIC)},
+{"COLOR_SCHEME_LIBREOFFICE_DARK",  
CuiResId(RID_COLOR_SCHEME_LIBREOFFICE_DARK)}
+};
+return vColorSchemes;
 };
 
 // If the color scheme name has a translated string, then return the 
translation
@@ -170,8 +174,8 @@ std::map const vColorSchemes = {
 // For non-translatable color schemes, the ID and the name are the same
 OUString lcl_SchemeIdToTranslatedName(const OUString& sSchemeId)
 {
-auto it = vColorSchemes.find(sSchemeId);
-if (it != vColorSchemes.end())
+auto it = getColorSchemes().find(sSchemeId);
+if (it != getColorSchemes().end())
 return it->second;
 return sSchemeId;
 }
@@ -180,7 +184,7 @@ OUString lcl_SchemeIdToTranslatedName(const OUString& 
sSchemeId)
 // For non-translatable color schemes, the ID and the name are the same
 OUString lcl_TranslatedNameToSchemeId(const OUString& sName)
 {
-for (auto it = vColorSchemes.begin(); it != vColorSchemes.end(); ++it)
+for (auto it = getColorSchemes().begin(); it != getColorSchemes().end(); 
++it)
 if (it->second == sName)
 return it->first;
 return sName;


[Libreoffice-commits] core.git: Branch 'distro/collabora/co-23.05' - cui/source i18npool/source svx/source

2023-04-20 Thread Justin Luth (via logerrit)
 cui/source/tabpages/numpages.cxx   |6 +-
 i18npool/source/localedata/LocaleNode.cxx  |3 ++-
 i18npool/source/localedata/data/en_US.xml  |   10 +-
 i18npool/source/localedata/data/locale.dtd |1 +
 i18npool/source/localedata/localedata.cxx  |9 +
 svx/source/sidebar/nbdtmg.cxx  |   13 +++--
 6 files changed, 29 insertions(+), 13 deletions(-)

New commits:
commit 72e2ec361acc2b57ec3fc08325a16846d3c7df33
Author: Justin Luth 
AuthorDate: Mon Jan 2 10:48:33 2023 -0500
Commit: Justin Luth 
CommitDate: Fri Apr 21 03:07:07 2023 +0200

tdf#56258: allow i18npool to define SvxAdjust for outline

This is a squashed commit, including pre-requisite
commit b1226e1f225de4fa67a0d4f5a6aa4017284c7deb
and follow-up commit 6cabd7d9bfed37799a344f872d5f8fcf3214116a

Deciding whether the numbering should be Left, Right, or Center
is a rather important setting. Specifically for Roman numerals
(which grow very wide as they increment to 7 and 8)
the numbering styles set these to right aligned.
This really helps for keeping the text nicely aligned.

The numbering styles are built-in LO defaults,
but locale files can define numbering and outline
choices. This patch add the setting for "adjust" on
the outline levels.

For en_US, it makes sense to right-align roman numeral levels.
[The only other highly likely candidate for this that I could find
 was old Hungarian (SZEKELY_ROVAS),  but it doesn't seem
 to be used in any locale definitions.]

I only changed en_US for now, but of course many other
locales are also using NumType="3" and NumType="4".

This only applies to the toolbar/sidebar SVX code path.
The Bullets and Numbering dialog does not currently
modify any spacing, so I didn't apply the adjustment either.

It also doesn't make sense to do this on single numbering changes
(aka ContinuousNumberingLevels or LC_NumberingLevel)
because we don't know or control the first line indent there either.

But at least for toolbar Outlines, we do change every level,
and so can set a (somewhat) appropriate spacing.
[Setting SvxAdjust without adjusting the spacing
 is pointless. Don't make any changes at all if
 the spacing ends up causing problems.]

The Numbering IVX/ivx styles set the firstLineIndent to -174,
so I did the same here. This is the scariest part of this change.

AFAICS SvxAdjust::Left is a non-locale aDefNumStyle default,
so hardcoding that for undefined LC_OutlineNumberingLevel
shouldn't be too scary.

Change-Id: I52deefe88aa55c55c9531b651411f64accb86f7f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150663
Tested-by: Justin Luth 
Reviewed-by: Justin Luth 

diff --git a/cui/source/tabpages/numpages.cxx b/cui/source/tabpages/numpages.cxx
index c307f6ac155f..19a2b37ed82d 100644
--- a/cui/source/tabpages/numpages.cxx
+++ b/cui/source/tabpages/numpages.cxx
@@ -17,7 +17,6 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
-#include 
 #include 
 
 #include 
@@ -692,6 +691,11 @@ IMPL_LINK_NOARG(SvxNumPickTabPage, NumSelectHdl_Impl, 
ValueSet*, void)
 aFmt.SetIncludeUpperLevels(sal::static_int_cast< sal_uInt8 >(0 != 
nUpperLevelOrChar ? pActNum->GetLevelCount() : 1));
 aFmt.SetCharFormatName(sNumCharFmtName);
 aFmt.SetBulletRelSize(100);
+
+// Completely ignore the Left/Right value provided by the locale 
outline definition,
+// because this function doesn't actually modify the indents at 
all,
+// and right-adjusted numbering definitely needs a different 
FirstLineIndent.
+
 // #i93908#
 aFmt.SetListFormat(pLevelSettings->sPrefix, 
pLevelSettings->sSuffix, i);
 }
diff --git a/i18npool/source/localedata/LocaleNode.cxx 
b/i18npool/source/localedata/LocaleNode.cxx
index acc7dd8f927b..14232338b9f1 100644
--- a/i18npool/source/localedata/LocaleNode.cxx
+++ b/i18npool/source/localedata/LocaleNode.cxx
@@ -2236,7 +2236,7 @@ void LCOutlineNumberingLevelNode::generateCode (const 
OFileWriter ) const
 }
 
 // hardcode number of attributes per level
-const int   nAttributes = 11;
+const int nAttributes = 12;
 const char* attr[ nAttributes ] =
 {
 "Prefix",
@@ -2248,6 +2248,7 @@ void LCOutlineNumberingLevelNode::generateCode (const 
OFileWriter ) const
 "LeftMargin",
 "SymbolTextDistance",
 "FirstLineOffset",
+"Adjust",
 "Transliteration",
 "NatNum",
 };
diff --git a/i18npool/source/localedata/data/en_US.xml 
b/i18npool/source/localedata/data/en_US.xml
index ffd0bf1fad59..b83c64489238 100644
--- a/i18npool/source/localedata/data/en_US.xml
+++ b/i18npool/source/localedata/data/en_US.xml
@@ -587,7 +587,7 @@
 
   
   
-  
+  
   
   
   

[Libreoffice-commits] core.git: Branch 'distro/collabora/co-23.05' - cui/source i18npool/source sw/qa

2023-04-20 Thread Justin Luth (via logerrit)
 cui/source/tabpages/numpages.cxx  |9 ++---
 i18npool/source/localedata/data/en_US.xml |   12 ++--
 sw/qa/extras/uiwriter/uiwriter.cxx|2 +-
 3 files changed, 17 insertions(+), 6 deletions(-)

New commits:
commit f09e8642c66065bbaa57dea38ca4d68b606335d4
Author: Justin Luth 
AuthorDate: Mon Jan 2 16:31:45 2023 -0500
Commit: Justin Luth 
CommitDate: Fri Apr 21 01:27:34 2023 +0200

tdf#56258 en_US: increase outline levels definitions to 6

This is a squashed commit that includes
commit 894efac210a3871214d95a52c322b0bee40f00ba
tdf#56258 i18npool en-US: partial revert 5th outline level

There are 10 levels in numbering,
so it only makes sense to allow
outline definitions for all 10 levels.

Note that DOC/X formats only allow 9 levels,

There are two code paths that read these definitions.
The SVX toolbar code to allow 10 levels (SVX_MAX_NUM)
was already completed in the previous patch.
This commit allows 10 levels for the
Bullets and Numbering menu dialog.

Since all choices MUST define the same number of levels,
I only added one more. I hope that there isn't some secret
kind of requirement that ALL LOCALE's must also use
the same number of definitions - it doesn't seem to.
[Although not a direct comparison, bg_BG defines 10
 single number levels, compared to en_US's 8,
 and some Chinese locales also do more than 8.]

Change-Id: Ibe00d54cfa4577db83eba368b92be11055b076ec
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144976
Tested-by: Jenkins
Reviewed-by: Justin Luth 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150661
Tested-by: Justin Luth 

diff --git a/cui/source/tabpages/numpages.cxx b/cui/source/tabpages/numpages.cxx
index 916e513d9cc0..c307f6ac155f 100644
--- a/cui/source/tabpages/numpages.cxx
+++ b/cui/source/tabpages/numpages.cxx
@@ -510,11 +510,14 @@ SvxNumPickTabPage::SvxNumPickTabPage(weld::Container* 
pPage, weld::DialogControl
 SvxNumSettingsArr_Impl& rItemArr = aNumSettingsArrays[ nItem ];
 
 Reference xLevel = 
aOutlineAccess.getConstArray()[nItem];
-for(sal_Int32 nLevel = 0; nLevel < xLevel->getCount() && nLevel < 
5; nLevel++)
+for(sal_Int32 nLevel = 0; nLevel < SVX_MAX_NUM; nLevel++)
 {
-Any aValueAny = xLevel->getByIndex(nLevel);
+// use the last locale-defined level for all remaining levels.
+sal_Int32 nLocaleLevel = std::min(nLevel, xLevel->getCount() - 
1);
 Sequence aLevelProps;
-aValueAny >>= aLevelProps;
+if (nLocaleLevel >= 0)
+xLevel->getByIndex(nLocaleLevel) >>= aLevelProps;
+
 SvxNumSettings_Impl* pNew = 
lcl_CreateNumSettingsPtr(aLevelProps);
 rItemArr.push_back( std::unique_ptr(pNew) 
);
 }
diff --git a/i18npool/source/localedata/data/en_US.xml 
b/i18npool/source/localedata/data/en_US.xml
index 14c74a7e2932..ffd0bf1fad59 100644
--- a/i18npool/source/localedata/data/en_US.xml
+++ b/i18npool/source/localedata/data/en_US.xml
@@ -574,6 +574,7 @@
   
   
   
+  
 
 
   
@@ -581,6 +582,7 @@
   
   
   
+  
 
 
   
@@ -588,6 +590,7 @@
   
   
   
+  
 
 
   
@@ -595,20 +598,23 @@
   
   
   
+  
 
 
   
   
   
   
-  
+  
+  
 
-
+ 
   
   
   
   
   
+  
 
 
   
@@ -616,6 +622,7 @@
   
   
   
+  
 
 
   
@@ -623,6 +630,7 @@
   
   
   
+  
 
   
 
diff --git a/sw/qa/extras/uiwriter/uiwriter.cxx 
b/sw/qa/extras/uiwriter/uiwriter.cxx
index 5cad83ed7b0f..0e45204f25db 100644
--- a/sw/qa/extras/uiwriter/uiwriter.cxx
+++ b/sw/qa/extras/uiwriter/uiwriter.cxx
@@ -1801,7 +1801,7 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest, testTdf81995)
 CPPUNIT_ASSERT_EQUAL(sal_Int32(8), aIndexAccess.getLength());
 for(const auto& rIndexAccess : aIndexAccess)
 {
-CPPUNIT_ASSERT_EQUAL(sal_Int32(5), rIndexAccess->getCount());
+CPPUNIT_ASSERT_EQUAL(sal_Int32(6), rIndexAccess->getCount());
 for(int j=0;jgetCount();j++)
 {
 uno::Sequence aProps;


[Libreoffice-commits] core.git: Branch 'distro/collabora/co-23.05' - cui/source cui/uiconfig include/sfx2 sc/qa sfx2/source

2023-03-22 Thread Szymon Kłos (via logerrit)
 cui/source/dialogs/SpellDialog.cxx|3 ++-
 cui/uiconfig/ui/spelloptionsdialog.ui |   20 +---
 include/sfx2/basedlgs.hxx |4 
 sc/qa/uitest/calc_tests8/tdf125051.py |3 +--
 sfx2/source/dialog/basedlgs.cxx   |   11 +++
 5 files changed, 35 insertions(+), 6 deletions(-)

New commits:
commit a1775337a5cd28135248486fe142e6b4718d5db3
Author: Szymon Kłos 
AuthorDate: Tue Mar 21 17:47:01 2023 +0100
Commit: Szymon Kłos 
CommitDate: Wed Mar 22 12:35:19 2023 +

jsdialog: keep button under content in SpellCheck Options

Change-Id: I75b1424fe688f975b88634d6355cd0311fc07057
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149227
Tested-by: Szymon Kłos 
Reviewed-by: Szymon Kłos 

diff --git a/cui/source/dialogs/SpellDialog.cxx 
b/cui/source/dialogs/SpellDialog.cxx
index 34564c712ee7..3a735afa38ae 100644
--- a/cui/source/dialogs/SpellDialog.cxx
+++ b/cui/source/dialogs/SpellDialog.cxx
@@ -469,7 +469,8 @@ IMPL_LINK_NOARG(SpellDialog, CheckGrammarHdl, 
weld::Toggleable&, void)
 void SpellDialog::StartSpellOptDlg_Impl()
 {
 auto xSet = 
std::make_shared>( 
SfxGetpApp()->GetPool() );
-m_xOptionsDlg = 
std::make_shared(m_xDialog.get(), xSet.get(), 
"cui/ui/spelloptionsdialog.ui", "SpellOptionsDialog");
+m_xOptionsDlg = std::make_shared(
+m_xDialog.get(), xSet.get(), "content", 
"cui/ui/spelloptionsdialog.ui", "SpellOptionsDialog");
 
 std::unique_ptr xPage = 
SvxLinguTabPage::Create(m_xOptionsDlg->get_content_area(), m_xOptionsDlg.get(), 
xSet.get());
 static_cast(xPage.get())->HideGroups( GROUP_MODULES );
diff --git a/cui/uiconfig/ui/spelloptionsdialog.ui 
b/cui/uiconfig/ui/spelloptionsdialog.ui
index ef690fd7da60..d5e80649731d 100644
--- a/cui/uiconfig/ui/spelloptionsdialog.ui
+++ b/cui/uiconfig/ui/spelloptionsdialog.ui
@@ -17,6 +17,23 @@
 False
 vertical
 12
+
+  
+True
+False
+vertical
+12
+
+  
+
+  
+  
+True
+True
+begin
+0
+  
+
 
   
 False
@@ -74,9 +91,6 @@
 0
   
 
-
-  
-
   
 
 
diff --git a/include/sfx2/basedlgs.hxx b/include/sfx2/basedlgs.hxx
index b753569efce6..64b36cf31859 100644
--- a/include/sfx2/basedlgs.hxx
+++ b/include/sfx2/basedlgs.hxx
@@ -107,6 +107,10 @@ public:
 const OUString& rUIXMLDescription = 
OUString("sfx/ui/singletabdialog.ui"),
 const OString& rID = OString("SingleTabDialog"));
 
+SfxSingleTabDialogController(weld::Widget* pParent, const SfxItemSet* 
pOptionsSet,
+const OString& rContainerId, const OUString& rUIXMLDescription,
+const OString& rID);
+
 weld::Container* get_content_area() { return m_xContainer.get(); }
 
 virtual ~SfxSingleTabDialogController() override;
diff --git a/sc/qa/uitest/calc_tests8/tdf125051.py 
b/sc/qa/uitest/calc_tests8/tdf125051.py
index 5b8ccd15bb03..89314b2690e9 100644
--- a/sc/qa/uitest/calc_tests8/tdf125051.py
+++ b/sc/qa/uitest/calc_tests8/tdf125051.py
@@ -28,8 +28,7 @@ class tdf125051(UITestCase):
 #open options
 optionsBtn = xDialog.getChild("options")
 
-with 
self.ui_test.execute_blocking_action(optionsBtn.executeAction, args=('CLICK', 
()), close_button="cancel"):
-pass
+self.ui_test.execute_dialog_through_action(optionsBtn, "CLICK", 
None, "DialogExecute", "cancel")
 
 closeBtn = xDialog.getChild("close")#close Spelling dialog
 self.ui_test.close_dialog_through_button(closeBtn)
diff --git a/sfx2/source/dialog/basedlgs.cxx b/sfx2/source/dialog/basedlgs.cxx
index ab976093025a..297dbe524acb 100644
--- a/sfx2/source/dialog/basedlgs.cxx
+++ b/sfx2/source/dialog/basedlgs.cxx
@@ -233,6 +233,17 @@ 
SfxSingleTabDialogController::SfxSingleTabDialogController(weld::Widget *pParent
 m_xOKBtn->connect_clicked(LINK(this, SfxSingleTabDialogController, 
OKHdl_Impl));
 }
 
+SfxSingleTabDialogController::SfxSingleTabDialogController(weld::Widget 
*pParent, const SfxItemSet* pSet,
+const OString& rContainerId, const OUString& rUIXMLDescription, const 
OString& rID)
+: SfxOkDialogController(pParent, rUIXMLDescription, rID)
+, m_pInputSet(pSet)
+, m_xContainer(m_xBuilder->weld_container(rContainerId))
+, m_xOKBtn(m_xBuilder->weld_button("ok"))
+, m_xHelpBtn(m_xBuilder->weld_button("help"))
+{
+m_xOKBtn->connect_clicked(LINK(this, SfxSingleTabDialogController, 
OKHdl_Impl));
+}
+
 SfxSingleTabDialogController::~SfxSingleTabDialogController()
 {
 }


[Libreoffice-commits] core.git: Branch 'distro/collabora/co-23.05' - cui/source vcl/jsdialog

2023-03-21 Thread Szymon Kłos (via logerrit)
 cui/source/dialogs/SpellDialog.cxx |   30 +++---
 cui/source/inc/SpellDialog.hxx |1 +
 vcl/jsdialog/enabled.cxx   |2 ++
 3 files changed, 22 insertions(+), 11 deletions(-)

New commits:
commit ac46f272a4946a8f18a89ba08fa376a3e879b276
Author: Szymon Kłos 
AuthorDate: Tue Mar 21 09:51:31 2023 +0100
Commit: Szymon Kłos 
CommitDate: Tue Mar 21 12:37:17 2023 +

jsdialog: enable spelling options dialog

and make it async

Change-Id: Idbf8661aa106d69e60ab6037052fd3d6dec28c06
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149205
Tested-by: Szymon Kłos 
Reviewed-by: Szymon Kłos 

diff --git a/cui/source/dialogs/SpellDialog.cxx 
b/cui/source/dialogs/SpellDialog.cxx
index f443aa4f..34564c712ee7 100644
--- a/cui/source/dialogs/SpellDialog.cxx
+++ b/cui/source/dialogs/SpellDialog.cxx
@@ -225,6 +225,12 @@ SpellDialog::SpellDialog(SpellDialogChildWindow* 
pChildWindow,
 
 SpellDialog::~SpellDialog()
 {
+if (m_xOptionsDlg)
+{
+m_xOptionsDlg->response(RET_CANCEL);
+m_xOptionsDlg.reset();
+}
+
 if (m_pInitHdlEvent)
 Application::RemoveUserEvent(m_pInitHdlEvent);
 if (pImpl)
@@ -462,19 +468,21 @@ IMPL_LINK_NOARG(SpellDialog, CheckGrammarHdl, 
weld::Toggleable&, void)
 
 void SpellDialog::StartSpellOptDlg_Impl()
 {
-SfxItemSetFixed aSet( 
SfxGetpApp()->GetPool() );
-SfxSingleTabDialogController aDlg(m_xDialog.get(), , 
"cui/ui/spelloptionsdialog.ui", "SpellOptionsDialog");
+auto xSet = 
std::make_shared>( 
SfxGetpApp()->GetPool() );
+m_xOptionsDlg = 
std::make_shared(m_xDialog.get(), xSet.get(), 
"cui/ui/spelloptionsdialog.ui", "SpellOptionsDialog");
 
-std::unique_ptr xPage = 
SvxLinguTabPage::Create(aDlg.get_content_area(), , );
+std::unique_ptr xPage = 
SvxLinguTabPage::Create(m_xOptionsDlg->get_content_area(), m_xOptionsDlg.get(), 
xSet.get());
 static_cast(xPage.get())->HideGroups( GROUP_MODULES );
-aDlg.SetTabPage(std::move(xPage));
-if (RET_OK == aDlg.run())
-{
-InitUserDicts();
-const SfxItemSet* pOutSet = aDlg.GetOutputItemSet();
-if(pOutSet)
-OfaTreeOptionsDialog::ApplyLanguageOptions(*pOutSet);
-}
+m_xOptionsDlg->SetTabPage(std::move(xPage));
+weld::GenericDialogController::runAsync(m_xOptionsDlg, [this, xSet] 
(sal_uInt32 nResult) {
+if (RET_OK == nResult)
+{
+InitUserDicts();
+const SfxItemSet* pOutSet = m_xOptionsDlg->GetOutputItemSet();
+if(pOutSet)
+OfaTreeOptionsDialog::ApplyLanguageOptions(*pOutSet);
+}
+});
 }
 
 namespace
diff --git a/cui/source/inc/SpellDialog.hxx b/cui/source/inc/SpellDialog.hxx
index 3c6a7b229ebb..a7e6cd398e2f 100644
--- a/cui/source/inc/SpellDialog.hxx
+++ b/cui/source/inc/SpellDialog.hxx
@@ -165,6 +165,7 @@ private:
 std::unique_ptr m_xClosePB;
 std::unique_ptr m_xToolbar;
 std::unique_ptr m_xSentenceEDWeld;
+std::shared_ptr m_xOptionsDlg;
 
 DECL_LINK(ChangeHdl, weld::Button&, void);
 DECL_LINK(DoubleClickChangeHdl, weld::TreeView&, bool);
diff --git a/vcl/jsdialog/enabled.cxx b/vcl/jsdialog/enabled.cxx
index 4e5c79c1bf9b..935a81ba6e6d 100644
--- a/vcl/jsdialog/enabled.cxx
+++ b/vcl/jsdialog/enabled.cxx
@@ -44,6 +44,7 @@ bool isBuilderEnabled(std::u16string_view rUIFile, bool 
bMobile)
 || rUIFile == u"cui/ui/imagetabpage.ui"
 || rUIFile == u"cui/ui/macroselectordialog.ui"
 || rUIFile == u"cui/ui/numberingformatpage.ui"
+|| rUIFile == u"cui/ui/optlingupage.ui"
 || rUIFile == u"cui/ui/pageformatpage.ui"
 || rUIFile == u"cui/ui/paragalignpage.ui"
 || rUIFile == u"cui/ui/paraindentspacing.ui"
@@ -56,6 +57,7 @@ bool isBuilderEnabled(std::u16string_view rUIFile, bool 
bMobile)
 || rUIFile == u"cui/ui/similaritysearchdialog.ui"
 || rUIFile == u"cui/ui/specialcharacters.ui"
 || rUIFile == u"cui/ui/spellingdialog.ui"
+|| rUIFile == u"cui/ui/spelloptionsdialog.ui"
 || rUIFile == u"cui/ui/splitcellsdialog.ui"
 || rUIFile == u"cui/ui/textflowpage.ui"
 || rUIFile == u"cui/ui/transparencytabpage.ui"


[Libreoffice-commits] core.git: Branch 'distro/collabora/co-23.05' - cui/source include/systools

2023-03-12 Thread Mike Kaganski (via logerrit)
 cui/source/options/optgdlg.cxx  |6 ++
 include/systools/win32/winstoreutil.hxx |   32 
 2 files changed, 38 insertions(+)

New commits:
commit c39bd113f5be29097709c2be0e67f457b37e7bca
Author: Mike Kaganski 
AuthorDate: Sun Feb 26 11:24:30 2023 +0300
Commit: Andras Timar 
CommitDate: Sun Mar 12 18:06:34 2023 +

Hide Quickstarter from General options in Windows store apps

In that environment, the shell:Startup shortcut created by us points to the
quickstart.exe under Program 
Files\WindowsApps\\program.
The resulting shortcut can't launch, because of an inaccessible part in the
path (the protected WindowsApps directory). So the feature does not work in
the dialog.

Windows store apps should advertise the Windows startup task in the 
manifest.
Let's just hide the dialog entry in this case. A possible TODO would be to
provide a button instead, which would open the Startup Apps system applet,
similar to what we do for Default apps for file associations.

Change-Id: Ieafdf6d23ced96506b01c6b3cf9fb12904696df1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147735
Tested-by: Jenkins
Reviewed-by: Mike Kaganski 
(cherry picked from commit bc9e978a5df5f2ee84b32d1a4a67d5e6eadb4e86)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147759
Reviewed-by: Andras Timar 
Tested-by: Andras Timar 

diff --git a/cui/source/options/optgdlg.cxx b/cui/source/options/optgdlg.cxx
index 3b1f652adbcf..d3a3b2d6f60a 100644
--- a/cui/source/options/optgdlg.cxx
+++ b/cui/source/options/optgdlg.cxx
@@ -88,6 +88,7 @@
 #include 
 
 #if defined(_WIN32)
+#include 
 #include 
 #endif
 using namespace ::com::sun::star::uno;
@@ -192,6 +193,11 @@ OfaMiscTabPage::OfaMiscTabPage(weld::Container* pPage, 
weld::DialogController* p
 m_xQuickStarterFrame->hide();
 //Hide frame label in case of no content
 m_xHelpImproveLabel->hide();
+#else
+// Store-packaged apps (located under the protected Program 
Files\WindowsApps) can't use normal
+// shell shortcuts to their exe; hide. TODO: show a button to open 
"Startup Apps" system applet?
+if (sal::systools::IsStorePackagedApp())
+m_xQuickStarterFrame->hide();
 #endif
 
 #if defined(_WIN32)
diff --git a/include/systools/win32/winstoreutil.hxx 
b/include/systools/win32/winstoreutil.hxx
new file mode 100644
index ..aa0a70e64423
--- /dev/null
+++ b/include/systools/win32/winstoreutil.hxx
@@ -0,0 +1,32 @@
+/* -*- 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/.
+ */
+
+#pragma once
+
+#include 
+
+#include 
+#include 
+
+namespace sal::systools
+{
+// Returns true if the current process is run as a Windows store app, which 
has some specifics
+inline bool IsStorePackagedApp()
+{
+// GetCurrentPackageFullName is only available since Windows 8
+HMODULE hDll = GetModuleHandleW(L"kernel32.dll");
+using Func_t = LONG WINAPI(UINT32*, PWSTR);
+if (auto pFunc = reinterpret_cast(GetProcAddress(hDll, 
"GetCurrentPackageFullName")))
+if (UINT32 size = 0; pFunc(, nullptr) == 
ERROR_INSUFFICIENT_BUFFER)
+return true;
+return false;
+}
+} // sal::systools
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s 
cinkeys+=0=break: */


[Libreoffice-commits] core.git: Branch 'distro/collabora/co-23.05' - cui/source vcl/jsdialog

2023-01-31 Thread Hannah Meeks (via logerrit)
 cui/source/dialogs/cuifmsearch.cxx |9 +++--
 vcl/jsdialog/enabled.cxx   |1 +
 2 files changed, 8 insertions(+), 2 deletions(-)

New commits:
commit a883f757573182c4f81625abc178edab2b4adf66
Author: Hannah Meeks 
AuthorDate: Wed Jan 25 11:07:28 2023 +
Commit: Michael Meeks 
CommitDate: Tue Jan 31 14:49:16 2023 +

cui: Make SimilaritySearch dialog async and enable use for jsdialog

Change-Id: I89c6665138c94aa355efbbc4aa0947226c68af5a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146326
Tested-by: Michael Meeks 
Reviewed-by: Michael Meeks 

diff --git a/cui/source/dialogs/cuifmsearch.cxx 
b/cui/source/dialogs/cuifmsearch.cxx
index f1af2838c4b8..bb3bfaf5cac5 100644
--- a/cui/source/dialogs/cuifmsearch.cxx
+++ b/cui/source/dialogs/cuifmsearch.cxx
@@ -312,15 +312,20 @@ IMPL_LINK(FmSearchDialog, OnClickedSpecialSettings, 
weld::Button&, rButton, void
 if (m_ppbApproxSettings.get() == )
 {
 SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
-ScopedVclPtr 
pDlg(pFact->CreateSvxSearchSimilarityDialog(m_xDialog.get(), 
m_pSearchEngine->GetLevRelaxed(), m_pSearchEngine->GetLevOther(),
+
+VclPtr 
pDlg(pFact->CreateSvxSearchSimilarityDialog(m_xDialog.get(), 
m_pSearchEngine->GetLevRelaxed(), m_pSearchEngine->GetLevOther(),
 m_pSearchEngine->GetLevShorter(), 
m_pSearchEngine->GetLevLonger() ));
-if (pDlg->Execute() == RET_OK)
+pDlg->StartExecuteAsync([pDlg, this](sal_Int32 nResult){
+
+if (nResult == RET_OK)
 {
 m_pSearchEngine->SetLevRelaxed( pDlg->IsRelaxed() );
 m_pSearchEngine->SetLevOther( pDlg->GetOther() );
 m_pSearchEngine->SetLevShorter(pDlg->GetShorter() );
 m_pSearchEngine->SetLevLonger( pDlg->GetLonger() );
 }
+pDlg->disposeOnce();
+});
 }
 else if (m_pSoundsLikeCJKSettings.get() == )
 {
diff --git a/vcl/jsdialog/enabled.cxx b/vcl/jsdialog/enabled.cxx
index e0791954d5f8..c11365d6dcbc 100644
--- a/vcl/jsdialog/enabled.cxx
+++ b/vcl/jsdialog/enabled.cxx
@@ -39,6 +39,7 @@ bool isBuilderEnabled(std::u16string_view rUIFile, bool 
bMobile)
 || rUIFile == u"cui/ui/numberingformatpage.ui"
 || rUIFile == u"cui/ui/password.ui"
 || rUIFile == u"cui/ui/splitcellsdialog.ui"
+|| rUIFile == u"cui/ui/similaritysearchdialog.ui"
 || rUIFile == u"cui/ui/widgettestdialog.ui"
 // scalc
 || rUIFile == u"modules/scalc/ui/analysisofvariancedialog.ui"