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

2022-10-05 Thread Eike Rathke (via logerrit)
 cui/source/tabpages/chardlg.cxx |   43 ---
 include/svx/langbox.hxx |2 -
 svx/source/dialog/langbox.cxx   |   63 ++--
 3 files changed, 75 insertions(+), 33 deletions(-)

New commits:
commit 1ea19958d6fed38513b1983599c2c43ad76aae61
Author: Eike Rathke 
AuthorDate: Wed Oct 5 19:21:36 2022 +0200
Commit: Eike Rathke 
CommitDate: Wed Oct 5 20:07:36 2022 +0200

Add on-the-fly language tag to proper language list Western/Asian/Complex

In which combobox wherever it was added, the correct SfxItem will
be updated and at least when switching to another dialog tab and
back it will appear in the correct list.
(shouldn't tabbing out of the combobox already trigger that?)

Change-Id: I5aa78797dc24527c753c97d0357c3058271fa4d8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140991
Reviewed-by: Eike Rathke 
Tested-by: Jenkins

diff --git a/cui/source/tabpages/chardlg.cxx b/cui/source/tabpages/chardlg.cxx
index 226fe846ee3d..e34eca07485c 100644
--- a/cui/source/tabpages/chardlg.cxx
+++ b/cui/source/tabpages/chardlg.cxx
@@ -1062,31 +1062,40 @@ bool SvxCharNamePage::FillItemSet_Impl( SfxItemSet& 
rSet, LanguageGroup eLangGrp
 case Asian : nSlot = SID_ATTR_CHAR_CJK_LANGUAGE; break;
 case Ctl : nSlot = SID_ATTR_CHAR_CTL_LANGUAGE; break;
 }
-nWhich = GetWhich( nSlot );
-pOld = GetOldItem( rSet, nSlot );
 
 // For language list boxes acting as ComboBox, check for, add and select an
 // edited entry.
-if (pLangBox == m_xWestFontLanguageLB.get())
+switch (pLangBox->GetEditedAndValid())
 {
-switch (pLangBox->GetEditedAndValid())
-{
-case SvxLanguageBox::EditedAndValid::No:
-;   // nothing to do
-break;
-case SvxLanguageBox::EditedAndValid::Valid:
+case SvxLanguageBox::EditedAndValid::No:
+;   // nothing to do
+break;
+case SvxLanguageBox::EditedAndValid::Valid:
+{
+SvxLanguageBox* ppBoxes[3]
+= {m_xWestFontLanguageLB.get(), 
m_xEastFontLanguageLB.get(), m_xCTLFontLanguageLB.get()};
+SvxLanguageBox* pBox = pLangBox->SaveEditedAsEntry(ppBoxes);
+if (pBox != pLangBox)
 {
-const int nPos = pLangBox->SaveEditedAsEntry();
-if (nPos != -1)
-pLangBox->set_active(nPos);
+// Get item from corresponding slot.
+if (pBox == m_xWestFontLanguageLB.get())
+nSlot = SID_ATTR_CHAR_LANGUAGE;
+else if (pBox == m_xEastFontLanguageLB.get())
+nSlot = SID_ATTR_CHAR_CJK_LANGUAGE;
+else if (pBox == m_xCTLFontLanguageLB.get())
+nSlot = SID_ATTR_CHAR_CTL_LANGUAGE;
+pLangBox = pBox;
 }
-break;
-case SvxLanguageBox::EditedAndValid::Invalid:
-pLangBox->set_active_id(pLangBox->get_saved_active_id());
-break;
-}
+}
+break;
+case SvxLanguageBox::EditedAndValid::Invalid:
+pLangBox->set_active_id(pLangBox->get_saved_active_id());
+break;
 }
 
+nWhich = GetWhich( nSlot );
+pOld = GetOldItem( rSet, nSlot );
+
 int nLangPos = pLangBox->get_active();
 LanguageType eLangType = pLangBox->get_active_id();
 
diff --git a/include/svx/langbox.hxx b/include/svx/langbox.hxx
index a3d74adba703..7a03c522d98b 100644
--- a/include/svx/langbox.hxx
+++ b/include/svx/langbox.hxx
@@ -84,7 +84,7 @@ public:
 voidInsertLanguage(const LanguageType nLangType);
 
 EditedAndValid  GetEditedAndValid() const { return m_eEditedAndValid;}
-sal_Int32   SaveEditedAsEntry();
+SvxLanguageBox* SaveEditedAsEntry( SvxLanguageBox* ppBoxes[3] /* 
convention: Western, Asian, Complex */ );
 
 void connect_changed(const Link& rLink) { 
m_aChangeHdl = rLink; }
 void connect_focus_in(const Link& rLink) { 
m_xControl->connect_focus_in(rLink); }
diff --git a/svx/source/dialog/langbox.cxx b/svx/source/dialog/langbox.cxx
index 5db46c695493..76d9b3de1fe5 100644
--- a/svx/source/dialog/langbox.cxx
+++ b/svx/source/dialog/langbox.cxx
@@ -463,40 +463,73 @@ 
SvxLanguageBox::SvxLanguageBox(std::unique_ptr pControl)
 m_xControl->connect_changed(LINK(this, SvxLanguageBox, ChangeHdl));
 }
 
-sal_Int32 SvxLanguageBox::SaveEditedAsEntry()
+SvxLanguageBox* SvxLanguageBox::SaveEditedAsEntry(SvxLanguageBox* ppBoxes[3])
 {
 if (m_eEditedAndValid != EditedAndValid::Valid)
-return -1;
+return this;
 
 LanguageTag aLanguageTag(m_xControl->get_active_text());
 LanguageType nLang = aLanguageTag.getLanguageType();
 if (nLang == LANGUAGE_DONTKNOW)
 {
-SAL_WARN( "svx.dialog", 

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

2021-05-20 Thread Caolán McNamara (via logerrit)
 cui/source/dialogs/cuifmsearch.cxx|   53 --
 cui/source/inc/cuifmsearch.hxx|3 +
 include/svx/srchdlg.hxx   |4 +-
 svx/source/dialog/SafeModeDialog.cxx  |7 +++
 svx/source/dialog/srchdlg.cxx |   42 +++
 svx/source/tbxctrls/extrusioncontrols.cxx |   19 --
 svx/source/tbxctrls/fontworkgallery.cxx   |   41 +++
 7 files changed, 103 insertions(+), 66 deletions(-)

New commits:
commit 304b74784297df7cbd0762a2f468ba13b33402bd
Author: Caolán McNamara 
AuthorDate: Wed May 19 20:55:17 2021 +0100
Commit: Caolán McNamara 
CommitDate: Thu May 20 12:23:05 2021 +0200

use toggle instead of click for RadioButton

Change-Id: I8de3daf3799a78c63be2c560afa4a7cc02d63daa
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115852
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 

diff --git a/cui/source/dialogs/cuifmsearch.cxx 
b/cui/source/dialogs/cuifmsearch.cxx
index de7681fa7d79..2433d0d8445d 100644
--- a/cui/source/dialogs/cuifmsearch.cxx
+++ b/cui/source/dialogs/cuifmsearch.cxx
@@ -163,12 +163,12 @@ FmSearchDialog::~FmSearchDialog()
 void FmSearchDialog::Init(const OUString& strVisibleFields, const OUString& 
sInitialText)
 {
 //the initialization of all the Controls
-m_prbSearchForText->connect_clicked(LINK(this, FmSearchDialog, 
OnClickedFieldRadios));
-m_prbSearchForNull->connect_clicked(LINK(this, FmSearchDialog, 
OnClickedFieldRadios));
-m_prbSearchForNotNull->connect_clicked(LINK(this, FmSearchDialog, 
OnClickedFieldRadios));
+m_prbSearchForText->connect_toggled(LINK(this, FmSearchDialog, 
OnToggledSearchRadio));
+m_prbSearchForNull->connect_toggled(LINK(this, FmSearchDialog, 
OnToggledSearchRadio));
+m_prbSearchForNotNull->connect_toggled(LINK(this, FmSearchDialog, 
OnToggledSearchRadio));
 
-m_prbAllFields->connect_clicked(LINK(this, FmSearchDialog, 
OnClickedFieldRadios));
-m_prbSingleField->connect_clicked(LINK(this, FmSearchDialog, 
OnClickedFieldRadios));
+m_prbAllFields->connect_toggled(LINK(this, FmSearchDialog, 
OnToggledFieldRadios));
+m_prbSingleField->connect_toggled(LINK(this, FmSearchDialog, 
OnToggledFieldRadios));
 
 m_pbSearchAgain->connect_clicked(LINK(this, FmSearchDialog, 
OnClickedSearchAgain));
 m_ppbApproxSettings->connect_clicked(LINK(this, FmSearchDialog, 
OnClickedSpecialSettings));
@@ -240,24 +240,29 @@ short FmSearchDialog::run()
 return nRet;
 }
 
-IMPL_LINK(FmSearchDialog, OnClickedFieldRadios, weld::Button&, rButton, void)
+IMPL_LINK(FmSearchDialog, OnToggledSearchRadio, weld::ToggleButton&, rButton, 
void)
 {
-if (( == m_prbSearchForText.get()) || ( == 
m_prbSearchForNull.get()) || ( == m_prbSearchForNotNull.get()))
+if (!rButton.get_active())
+return;
+EnableSearchForDependees(true);
+}
+
+IMPL_LINK(FmSearchDialog, OnToggledFieldRadios, weld::ToggleButton&, rButton, 
void)
+{
+if (!rButton.get_active())
+return;
+
+// en- or disable field list box accordingly
+if (m_prbSingleField->get_active())
 {
-EnableSearchForDependees(true);
+m_plbField->set_sensitive(true);
+m_pSearchEngine->RebuildUsedFields(m_plbField->get_active());
 }
 else
-// en- or disable field list box accordingly
-if ( == m_prbSingleField.get())
-{
-m_plbField->set_sensitive(true);
-m_pSearchEngine->RebuildUsedFields(m_plbField->get_active());
-}
-else
-{
-m_plbField->set_sensitive(false);
-m_pSearchEngine->RebuildUsedFields(-1);
-}
+{
+m_plbField->set_sensitive(false);
+m_pSearchEngine->RebuildUsedFields(-1);
+}
 }
 
 IMPL_LINK_NOARG(FmSearchDialog, OnClickedSearchAgain, weld::Button&, void)
@@ -638,19 +643,19 @@ void FmSearchDialog::LoadParams()
 nInitialField = 0;
 m_plbField->set_active(nInitialField);
 OnFieldSelected(*m_plbField);
-// all fields/single field (AFTER selecting the field because 
OnClickedFieldRadios expects a valid value there)
+// all fields/single field (AFTER selecting the field because 
OnToggledFieldRadios expects a valid value there)
 if (aParams.bAllFields)
 {
 m_prbSingleField->set_active(false);
 m_prbAllFields->set_active(true);
-OnClickedFieldRadios(*m_prbAllFields);
-// OnClickedFieldRadios also calls to RebuildUsedFields
+OnToggledFieldRadios(*m_prbAllFields);
+// OnToggledFieldRadios also calls to RebuildUsedFields
 }
 else
 {
 m_prbAllFields->set_active(false);
 m_prbSingleField->set_active(true);
-OnClickedFieldRadios(*m_prbSingleField);
+OnToggledFieldRadios(*m_prbSingleField);
 }
 
 m_plbPosition->set_active(aParams.nPosition);
@@ -708,7 +713,7 @@ void FmSearchDialog::LoadParams()
 case 2: 

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

2020-10-28 Thread Serge Krot (via logerrit)
 cui/source/tabpages/border.cxx |  120 +++--
 include/svx/frmsel.hxx |2 
 svx/source/dialog/frmsel.cxx   |5 +
 3 files changed, 98 insertions(+), 29 deletions(-)

New commits:
commit de1c4863ab993c80d8fea50ce420d568f75bf2e6
Author: Serge Krot 
AuthorDate: Tue Oct 27 11:26:55 2020 +0100
Commit: Thorsten Behrens 
CommitDate: Wed Oct 28 10:36:38 2020 +0100

tdf#137790 calc: Minimal line width for different line styles

Change-Id: I4d062f054a5ef6da7ef595190a7b3c6e2a0b191e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104865
Tested-by: Jenkins
Reviewed-by: Thorsten Behrens 

diff --git a/cui/source/tabpages/border.cxx b/cui/source/tabpages/border.cxx
index d952ae97ad8c..c60e2a9aba1d 100644
--- a/cui/source/tabpages/border.cxx
+++ b/cui/source/tabpages/border.cxx
@@ -85,6 +85,43 @@ static void lcl_SetDecimalDigitsTo1(weld::MetricSpinButton& 
rField)
 rField.set_min(rField.normalize(nMin), FieldUnit::TWIP);
 }
 
+// returns in pt
+static sal_Int64 lcl_GetMinLineWidth(SvxBorderLineStyle aStyle)
+{
+switch (aStyle)
+{
+case SvxBorderLineStyle::NONE:
+return 0;
+
+case SvxBorderLineStyle::SOLID:
+case SvxBorderLineStyle::DOTTED:
+case SvxBorderLineStyle::DASHED:
+case SvxBorderLineStyle::FINE_DASHED:
+case SvxBorderLineStyle::DASH_DOT:
+case SvxBorderLineStyle::DASH_DOT_DOT:
+return 15;
+
+// Double lines
+case SvxBorderLineStyle::DOUBLE: return 22;
+case SvxBorderLineStyle::DOUBLE_THIN: return 22;
+case SvxBorderLineStyle::THINTHICK_SMALLGAP: return 20;
+case SvxBorderLineStyle::THINTHICK_MEDIUMGAP: return 15;
+case SvxBorderLineStyle::THINTHICK_LARGEGAP: return 15;
+case SvxBorderLineStyle::THICKTHIN_SMALLGAP: return 20;
+case SvxBorderLineStyle::THICKTHIN_MEDIUMGAP: return 15;
+case SvxBorderLineStyle::THICKTHIN_LARGEGAP: return 15;
+
+case SvxBorderLineStyle::EMBOSSED: return 15;
+case SvxBorderLineStyle::ENGRAVED: return 15;
+
+case SvxBorderLineStyle::OUTSET: return 10;
+case SvxBorderLineStyle::INSET: return 10;
+
+default:
+return 15;
+}
+}
+
 // number of preset images to show
 const sal_uInt16 SVX_BORDER_PRESET_COUNT = 5;
 
@@ -1192,15 +1229,37 @@ IMPL_LINK_NOARG(SvxBorderTabPage, ModifyWidthHdl_Impl, 
weld::MetricSpinButton&,
 
 IMPL_LINK_NOARG(SvxBorderTabPage, SelStyleHdl_Impl, SvtLineListBox&, void)
 {
-sal_Int64 nVal = m_xLineWidthMF->get_value(FieldUnit::NONE);
-nVal = static_cast(vcl::ConvertDoubleValue(
-nVal,
-m_xLineWidthMF->get_digits(),
-FieldUnit::POINT, MapUnit::MapTwip ));
-m_aFrameSel.SetStyleToSelection ( nVal,
+sal_Int64 nOldWidth = m_xLineWidthMF->get_value(FieldUnit::NONE);
+nOldWidth = static_cast(vcl::ConvertDoubleValue(
+nOldWidth,
+m_xLineWidthMF->get_digits(),
+FieldUnit::POINT,
+MapUnit::MapTwip));
+
+const sal_Int64 nOldMinWidth = 
lcl_GetMinLineWidth(m_aFrameSel.getCurrentStyleLineStyle());
+const sal_Int64 nNewMinWidth = 
lcl_GetMinLineWidth(m_xLbLineStyle->GetSelectEntryStyle());
+
+// auto change line-width if it doesn't correspond to minimal value
+// let's change only in case when user has not changed the line-width into 
some custom value
+const sal_Int64 nNewWidth = (nOldMinWidth == nOldWidth)? nNewMinWidth : 
nOldWidth;
+
+// set value inside edit box
+if (nOldWidth != nNewWidth)
+{
+const sal_Int64 nNewWidthPt = 
static_cast(vcl::ConvertDoubleValue(
+nNewWidth,
+m_xLineWidthMF->get_digits(),
+MapUnit::MapTwip,
+FieldUnit::POINT));
+m_xLineWidthMF->set_value(nNewWidthPt, FieldUnit::POINT);
+}
+
+// set value inside style box
+m_aFrameSel.SetStyleToSelection( nNewWidth,
 m_xLbLineStyle->GetSelectEntryStyle() );
 }
 
+
 // ValueSet handling
 sal_uInt16 SvxBorderTabPage::GetPresetImageId( sal_uInt16 nValueSetIdx ) const
 {
@@ -1331,34 +1390,33 @@ void SvxBorderTabPage::FillLineListBox_Impl()
 
 static struct {
 SvxBorderLineStyle mnStyle;
-tools::Long mnMinWidth;
 SvtLineListBox::ColorFunc mpColor1Fn;
 SvtLineListBox::ColorFunc mpColor2Fn;
 SvtLineListBox::ColorDistFunc mpColorDistFn;
 } const aLines[] = {
 // Simple lines
-{ SvxBorderLineStyle::SOLID,0, , , 
 },
-{ SvxBorderLineStyle::DOTTED,   0, , , 
 },
-{ SvxBorderLineStyle::DASHED,   0, , , 
 },
-{ SvxBorderLineStyle::FINE_DASHED,  0, , , 
 },
-{ SvxBorderLineStyle::DASH_DOT, 0, , , 
 },
-{ SvxBorderLineStyle::DASH_DOT_DOT, 0, , , 
 },
+{ SvxBorderLineStyle::SOLID,, , 
 },
+{ SvxBorderLineStyle::DOTTED,   , , 
 },
+{ SvxBorderLineStyle::DASHED,   , , 
 },
+{ SvxBorderLineStyle::FINE_DASHED,  , , 
 },
+{ 

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

2020-09-04 Thread Aditya (via logerrit)
 cui/source/dialogs/cuigaldlg.cxx |2 +-
 include/svx/gallery1.hxx |2 ++
 include/svx/gallerybinaryengine.hxx  |2 +-
 include/svx/gallerybinaryengineentry.hxx |2 ++
 include/svx/gallerystoragelocations.hxx  |2 ++
 include/svx/galtheme.hxx |   10 +++---
 svx/source/gallery2/gallery1.cxx |   17 ++---
 svx/source/gallery2/gallerybinaryengineentry.cxx |   12 
 svx/source/gallery2/galtheme.cxx |4 
 9 files changed, 29 insertions(+), 24 deletions(-)

New commits:
commit fa3f514f33d4beadabf8526278939ed51417918b
Author: Aditya 
AuthorDate: Thu Aug 27 15:55:46 2020 +0530
Commit: Tomaž Vajngerl 
CommitDate: Fri Sep 4 14:59:58 2020 +0200

svx: Refactor Gallery::RemoveTheme()

Introduce GalleryTheme::removeTheme() and GalleryBinaryEngine::removeTheme()

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

diff --git a/cui/source/dialogs/cuigaldlg.cxx b/cui/source/dialogs/cuigaldlg.cxx
index de0b0c1663f5..116dac39f0a6 100644
--- a/cui/source/dialogs/cuigaldlg.cxx
+++ b/cui/source/dialogs/cuigaldlg.cxx
@@ -534,7 +534,7 @@ void TPGalleryThemeGeneral::SetXChgData( ExchangeData* 
_pData )
 aType += CuiResId( RID_SVXSTR_GALLERY_READONLY );
 
 m_xFtMSShowType->set_label(aType);
-
m_xFtMSShowPath->set_label(pThm->GetSdgURL().GetMainURL(INetURLObject::DecodeMechanism::Unambiguous));
+
m_xFtMSShowPath->set_label(pThm->getThemeURL().GetMainURL(INetURLObject::DecodeMechanism::Unambiguous));
 
 // singular or plural?
 if ( 1 == pThm->GetObjectCount() )
diff --git a/include/svx/gallery1.hxx b/include/svx/gallery1.hxx
index f74a5b5882fb..3aa89cc4211d 100644
--- a/include/svx/gallery1.hxx
+++ b/include/svx/gallery1.hxx
@@ -78,6 +78,8 @@ public:
 
 sal_uInt32  GetId() const { return nId; }
 voidSetId( sal_uInt32 nNewId, bool bResetThemeName );
+
+void removeTheme();
 };
 
 class SfxListener;
diff --git a/include/svx/gallerybinaryengine.hxx 
b/include/svx/gallerybinaryengine.hxx
index bf13cecc9471..7423b7b29c95 100644
--- a/include/svx/gallerybinaryengine.hxx
+++ b/include/svx/gallerybinaryengine.hxx
@@ -19,7 +19,6 @@
 
 #pragma once
 
-#include 
 #include 
 #include 
 #include 
@@ -67,6 +66,7 @@ public:
 const INetURLObject& GetSdgURL() const { return 
maGalleryStorageLocations.GetSdgURL(); }
 const INetURLObject& GetSdvURL() const { return 
maGalleryStorageLocations.GetSdvURL(); }
 const INetURLObject& GetStrURL() const { return 
maGalleryStorageLocations.GetStrURL(); }
+const INetURLObject& getThemeURL() const { return 
maGalleryStorageLocations.getThemeURL(); }
 
 SAL_DLLPRIVATE bool implWrite(const GalleryTheme& rTheme, const 
GalleryThemeEntry* pThm);
 
diff --git a/include/svx/gallerybinaryengineentry.hxx 
b/include/svx/gallerybinaryengineentry.hxx
index cd3023f71150..9b1f25a5b6b4 100644
--- a/include/svx/gallerybinaryengineentry.hxx
+++ b/include/svx/gallerybinaryengineentry.hxx
@@ -45,6 +45,8 @@ public:
 const INetURLObject& GetStrURL() const { return 
m_rGalleryStorageLocations.GetStrURL(); }
 
 static GalleryThemeEntry* CreateThemeEntry(const INetURLObject& rURL, bool 
bReadOnly);
+
+void removeTheme();
 };
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/gallerystoragelocations.hxx 
b/include/svx/gallerystoragelocations.hxx
index d2f4ab3fda48..dbc96207d11d 100644
--- a/include/svx/gallerystoragelocations.hxx
+++ b/include/svx/gallerystoragelocations.hxx
@@ -44,6 +44,8 @@ public:
 void SetStrExtension(INetURLObject& aURL);
 
 void SetStorageLocations(INetURLObject& aURL);
+
+const INetURLObject& getThemeURL() const { return maSdgURL; }
 };
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/galtheme.hxx b/include/svx/galtheme.hxx
index 97e8d6b63985..c15d03d14b02 100644
--- a/include/svx/galtheme.hxx
+++ b/include/svx/galtheme.hxx
@@ -22,6 +22,7 @@
 
 #include 
 #include 
+#include 
 
 #include 
 #include 
@@ -48,8 +49,6 @@ namespace unogallery
 class GalleryItem;
 }
 
-class GalleryBinaryEngine;
-
 class SVXCORE_DLLPUBLIC GalleryTheme : public SfxBroadcaster
 {
 friend class Gallery;
@@ -97,11 +96,6 @@ public:
 // used for building gallery themes during compilation:
 voidSetDestDir(const OUString& rDestDir, bool 
bRelative);
 
-SAL_DLLPRIVATE const INetURLObject& GetThmURL() const;
-const INetURLObject&GetSdgURL() const;
-SAL_DLLPRIVATE const INetURLObject& GetSdvURL() const;
-SAL_DLLPRIVATE const INetURLObject& GetStrURL() const;
-
 sal_uInt32  GetId() const;
 SAL_DLLPRIVATE void SetId( sal_uInt32 nNewId, bool bResetThemeName 
);
 
@@ 

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

2020-06-10 Thread Miklos Vajna (via logerrit)
 cui/source/dialogs/signature-line-draw.svg |4 ++--
 include/svx/strings.hrc|3 +++
 svx/source/dialog/signaturelinehelper.cxx  |4 
 3 files changed, 9 insertions(+), 2 deletions(-)

New commits:
commit eda9e23370f5ca0b413c9b5cc6eaffd87e596498
Author: Miklos Vajna 
AuthorDate: Wed Jun 10 13:43:15 2020 +0200
Commit: Miklos Vajna 
CommitDate: Wed Jun 10 20:27:11 2020 +0200

sd signature line: localize signature graphic

Now the svg template is free from user-visible strings.

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

diff --git a/cui/source/dialogs/signature-line-draw.svg 
b/cui/source/dialogs/signature-line-draw.svg
index 564b5cdf3ef9..b8552c41b82c 100644
--- a/cui/source/dialogs/signature-line-draw.svg
+++ b/cui/source/dialogs/signature-line-draw.svg
@@ -28,9 +28,9 @@
   
   
 
-Digitally signed by:
+[SIGNED_BY]
 [SIGNER_NAME]
-Date: [DATE]
+[DATE]
 
   
 
diff --git a/include/svx/strings.hrc b/include/svx/strings.hrc
index 22253551048d..a13b510b60e0 100644
--- a/include/svx/strings.hrc
+++ b/include/svx/strings.hrc
@@ -1708,6 +1708,9 @@
 
 #define RID_SVXSTR_FONTWORK 
NC_("RID_SVXSTR_FONTWORK", "Fontwork")
 
+#define RID_SVXSTR_SIGNATURELINE_DSIGNED_BY 
NC_("RID_SVXSTR_SIGNATURELINE_DSIGNED_BY", "Digitally signed by:")
+#define RID_SVXSTR_SIGNATURELINE_DATE   
NC_("RID_SVXSTR_SIGNATURELINE_DATE", "Date: %1")
+
 #endif
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svx/source/dialog/signaturelinehelper.cxx 
b/svx/source/dialog/signaturelinehelper.cxx
index e786fbbb75ad..066f368db797 100644
--- a/svx/source/dialog/signaturelinehelper.cxx
+++ b/svx/source/dialog/signaturelinehelper.cxx
@@ -23,6 +23,8 @@
 #include 
 #include 
 #include 
+#include 
+#include 
 #include 
 #include 
 #include 
@@ -148,9 +150,11 @@ void setShapeCertificate(SdrView* pView,
 
 // Read svg and replace placeholder texts.
 OUString 
aSvgImage(svx::SignatureLineHelper::getSignatureImage("signature-line-draw.svg"));
+aSvgImage = aSvgImage.replaceAll("[SIGNED_BY]", 
SvxResId(RID_SVXSTR_SIGNATURELINE_DSIGNED_BY));
 OUString aSignerName = 
svx::SignatureLineHelper::getSignerName(xCertificate);
 aSvgImage = aSvgImage.replaceAll("[SIGNER_NAME]", aSignerName);
 OUString aDate = svx::SignatureLineHelper::getLocalizedDate();
+aDate = SvxResId(RID_SVXSTR_SIGNATURELINE_DATE).replaceFirst("%1", aDate);
 aSvgImage = aSvgImage.replaceAll("[DATE]", aDate);
 
 uno::Reference xGraphic = 
svx::SignatureLineHelper::importSVG(aSvgImage);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: cui/source include/svx svx/source sw/inc sw/source

2020-04-23 Thread Noel Grandin (via logerrit)
 cui/source/tabpages/backgrnd.cxx|2 -
 include/svx/unobrushitemhelper.hxx  |2 -
 svx/source/unodraw/unobrushitemhelper.cxx   |   16 +--
 sw/inc/doc.hxx  |4 +-
 sw/inc/fesh.hxx |8 ++---
 sw/inc/format.hxx   |2 -
 sw/source/core/attr/format.cxx  |4 +-
 sw/source/core/docnode/ndtbl1.cxx   |   14 +-
 sw/source/core/frmedt/fetab.cxx |   16 +--
 sw/source/core/layout/atrfrm.cxx|4 +-
 sw/source/core/layout/flylay.cxx|2 -
 sw/source/core/layout/paintfrm.cxx  |2 -
 sw/source/core/layout/tabfrm.cxx|2 -
 sw/source/core/layout/wsfrm.cxx |6 ++--
 sw/source/core/unocore/unoframe.cxx |6 ++--
 sw/source/core/unocore/unoparagraph.cxx |2 -
 sw/source/core/unocore/unostyle.cxx |   12 
 sw/source/core/unocore/unotbl.cxx   |   38 ++--
 sw/source/filter/html/htmlcss1.cxx  |2 -
 sw/source/filter/html/htmlflywriter.cxx |2 -
 sw/source/filter/html/htmlgrin.cxx  |2 -
 sw/source/filter/html/htmltabw.cxx  |4 +-
 sw/source/filter/html/swcss1.hxx|2 -
 sw/source/filter/html/wrthtml.cxx   |2 -
 sw/source/filter/writer/wrt_fn.cxx  |2 -
 sw/source/filter/ww8/wrtw8esh.cxx   |2 -
 sw/source/filter/ww8/ww8atr.cxx |4 +-
 sw/source/ui/dialog/uiregionsw.cxx  |   10 +++
 sw/source/uibase/docvw/romenu.cxx   |   22 
 sw/source/uibase/docvw/romenu.hxx   |4 +-
 sw/source/uibase/shells/basesh.cxx  |6 ++--
 sw/source/uibase/shells/tabsh.cxx   |6 ++--
 sw/source/uibase/uiview/formatclipboard.cxx |4 +-
 33 files changed, 108 insertions(+), 108 deletions(-)

New commits:
commit d4248915d7db69aa7bf31d9d6189b7375aca70ed
Author: Noel Grandin 
AuthorDate: Thu Apr 23 14:04:16 2020 +0200
Commit: Noel Grandin 
CommitDate: Thu Apr 23 19:49:43 2020 +0200

pass SvxBrushItem around by unique_ptr

we never create an object that is actually shared, so this is wasted

Note1: in
  IMPL_LINK_NOARG(SwEditRegionDlg, OkHdl, weld::Button&, void)
there was a comparison
  if( aBrush != pRepr->GetBackground() || ...
which I removed

Note2: In
bool SwDoc::GetBoxAttr( const SwCursor& rCursor, 
std::shared_ptr& rToFill )
which had a condition
else if( rToFill != xBack )
I changed to compare contents

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

diff --git a/cui/source/tabpages/backgrnd.cxx b/cui/source/tabpages/backgrnd.cxx
index 123481198e17..38190271d778 100644
--- a/cui/source/tabpages/backgrnd.cxx
+++ b/cui/source/tabpages/backgrnd.cxx
@@ -181,7 +181,7 @@ bool SvxBkgTabPage::FillItemSet( SfxItemSet* rCoreSet )
 }
 case drawing::FillStyle_BITMAP:
 {
-std::shared_ptr aBrushItem( 
getSvxBrushItemFromSourceSet( maSet, nWhich ) );
+std::unique_ptr aBrushItem( 
getSvxBrushItemFromSourceSet( maSet, nWhich ) );
 if ( GraphicType::NONE != 
aBrushItem->GetGraphicObject()->GetType() )
 rCoreSet->Put( *aBrushItem );
 break;
diff --git a/include/svx/unobrushitemhelper.hxx 
b/include/svx/unobrushitemhelper.hxx
index da0104747d74..1bb7d8f1422b 100644
--- a/include/svx/unobrushitemhelper.hxx
+++ b/include/svx/unobrushitemhelper.hxx
@@ -43,7 +43,7 @@ SVXCORE_DLLPUBLIC void 
setSvxBrushItemAsFillAttributesToTargetSet(
 // items in the range [XATTR_FILL_FIRST .. XATTR_FILL_LAST]. Since this is not 
100%
 // representable this may lead to reduced data. With nBackgroundID a Which-ID 
for the
 // to-be-created SvxBrushItem has to be given (default should be 99 as in 
RES_BACKGROUND).
-SVXCORE_DLLPUBLIC std::shared_ptr getSvxBrushItemFromSourceSet(
+SVXCORE_DLLPUBLIC std::unique_ptr getSvxBrushItemFromSourceSet(
 const SfxItemSet& rSourceSet,
 sal_uInt16 nBackgroundID,
 bool bSearchInParents = true,
diff --git a/svx/source/unodraw/unobrushitemhelper.cxx 
b/svx/source/unodraw/unobrushitemhelper.cxx
index f62356026efa..e6c5758db9c1 100644
--- a/svx/source/unodraw/unobrushitemhelper.cxx
+++ b/svx/source/unodraw/unobrushitemhelper.cxx
@@ -167,7 +167,7 @@ static sal_uInt16 getTransparenceForSvxBrushItem(const 
SfxItemSet& rSourceSet, b
 return nFillTransparence;
 }
 
-static std::shared_ptr getSvxBrushItemForSolid(const SfxItemSet& 
rSourceSet, bool bSearchInParents, sal_uInt16 nBackgroundID)
+static std::unique_ptr getSvxBrushItemForSolid(const SfxItemSet& 
rSourceSet, bool bSearchInParents, sal_uInt16 nBackgroundID)
 {
 Color aFillColor(rSourceSet.Get(XATTR_FILLCOLOR, 

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

2020-02-11 Thread Yusuf Keten (via logerrit)
 cui/source/options/optgdlg.cxx  |   80 
 cui/source/tabpages/chardlg.cxx |9 +++-
 cui/source/tabpages/numfmt.cxx  |5 +-
 include/svx/langbox.hxx |4 +-
 svx/source/dialog/langbox.cxx   |   34 +++--
 5 files changed, 99 insertions(+), 33 deletions(-)

New commits:
commit 5326d238d7f98b11886eb4be01f19db73f8eda39
Author: Yusuf Keten 
AuthorDate: Tue Feb 4 00:14:17 2020 +0300
Commit: Mike Kaganski 
CommitDate: Tue Feb 11 18:25:37 2020 +0100

tdf#114694: Make default value in language settings the first element

For Languages, to make the default value ​​the first element in the
list, I've added 3 parameters to SvxLanguageBox::SetLanguageList().
With this parameters, function adds default value according to its
existence before other values. For sorting User Interface and
Currency, I removed the make_sorted function.  I added std::sort
with lambda expressions for both of them.

Change-Id: Iae37bfe09aaac4d8ecde1caad7a14e11df551eae
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87926
Reviewed-by: Mike Kaganski 
Tested-by: Mike Kaganski 

diff --git a/cui/source/options/optgdlg.cxx b/cui/source/options/optgdlg.cxx
index fb73341b9897..d99f3530e161 100644
--- a/cui/source/options/optgdlg.cxx
+++ b/cui/source/options/optgdlg.cxx
@@ -1,4 +1,4 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- 
*/
 /*
  * This file is part of the LibreOffice project.
  *
@@ -43,6 +43,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -1335,9 +1336,6 @@ OfaLanguagesTabPage::OfaLanguagesTabPage(weld::Container* 
pPage, weld::DialogCon
 , m_xCTLSupportCB(m_xBuilder->weld_check_button("ctlsupport"))
 , 
m_xIgnoreLanguageChangeCB(m_xBuilder->weld_check_button("ignorelanguagechange"))
 {
-m_xUserInterfaceLB->make_sorted();
-m_xCurrencyLB->make_sorted();
-
 // tdf#125483 save original default label
 m_sDecimalSeparatorLabel = m_xDecimalSeparatorCB->get_label();
 
@@ -1349,7 +1347,7 @@ OfaLanguagesTabPage::OfaLanguagesTabPage(weld::Container* 
pPage, weld::DialogCon

SvtLanguageTable::GetLanguageString(GetInstalledLocaleForSystemUILanguage().getLanguageType());
 
 m_xUserInterfaceLB->append("0", aUILang);
-m_xUserInterfaceLB->set_active(0);
+m_xUserInterfaceLB->append_separator("");
 try
 {
 Reference< XMultiServiceFactory > theConfigProvider(
@@ -1364,16 +1362,32 @@ 
OfaLanguagesTabPage::OfaLanguagesTabPage(weld::Container* pPage, weld::DialogCon
 theConfigProvider->createInstanceWithArguments(sAccessSrvc, 
theArgs ), UNO_QUERY_THROW );
 seqInstalledLanguages = theNameAccess->getElementNames();
 LanguageType aLang = LANGUAGE_DONTKNOW;
-for (sal_IntPtr i=0; i > aUILanguages;
+for (sal_Int32 i=0; iappend(OUString::number(i+1), aLangStr);
+aUILanguages.emplace_back(i+1, aLangStr);
 }
 }
 
+std::sort(aUILanguages.begin(), aUILanguages.end(), [](const auto& l1, 
const auto& l2) {
+static const auto aSorter = 
comphelper::string::NaturalStringSorter(
+comphelper::getProcessComponentContext(),
+Application::GetSettings().GetLanguageTag().getLocale());
+return aSorter.compare(l1.second, l2.second) < 0;
+});
+
+// tdf#114694: append the sorted list after the default entry and 
separator.
+for (const auto & [ nGroupID, sGroupName ] : aUILanguages)
+{
+m_xUserInterfaceLB->append(OUString::number(nGroupID), sGroupName);
+}
+
+m_xUserInterfaceLB->set_active(0);
+
 // find out whether the user has a specific locale specified
 Sequence< Any > theArgs2(1);
 theArgs2[0] <<= NamedValue("nodepath", Any(OUString(sUserLocalePath)));
@@ -1400,38 +1414,57 @@ 
OfaLanguagesTabPage::OfaLanguagesTabPage(weld::Container* pPage, weld::DialogCon
 TOOLS_WARN_EXCEPTION("cui.options", "ignoring" );
 }
 
-m_xWesternLanguageLB->SetLanguageList( SvxLanguageListFlags::WESTERN | 
SvxLanguageListFlags::ONLY_KNOWN, true, false, true );
-m_xWesternLanguageLB->InsertDefaultLanguage( css::i18n::ScriptType::LATIN 
);
-m_xAsianLanguageLB->SetLanguageList( SvxLanguageListFlags::CJK | 
SvxLanguageListFlags::ONLY_KNOWN, true, false, true );
-m_xAsianLanguageLB->InsertDefaultLanguage( css::i18n::ScriptType::ASIAN );
-m_xComplexLanguageLB->SetLanguageList( SvxLanguageListFlags::CTL | 
SvxLanguageListFlags::ONLY_KNOWN, true, false, true );
-m_xComplexLanguageLB->InsertDefaultLanguage( 
css::i18n::ScriptType::COMPLEX );
+m_xWesternLanguageLB->SetLanguageList(
+SvxLanguageListFlags::WESTERN | SvxLanguageListFlags::ONLY_KNOWN, 
true, false, true, true,
+

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

2020-02-02 Thread Caolán McNamara (via logerrit)
 cui/source/inc/paragrph.hxx|   10 +-
 cui/source/tabpages/paragrph.cxx   |   10 +-
 include/svx/dlgctrl.hxx|4 ++--
 include/svx/relfld.hxx |4 ++--
 svx/source/dialog/dlgctrl.cxx  |2 +-
 svx/source/dialog/relfld.cxx   |   10 +-
 svx/source/sidebar/paragraph/ParaPropertyPanel.cxx |   10 +-
 svx/source/sidebar/paragraph/ParaPropertyPanel.hxx |   10 +-
 svx/source/sidebar/paragraph/ParaSpacingWindow.cxx |   10 +-
 svx/source/sidebar/paragraph/ParaSpacingWindow.hxx |   10 +-
 sw/source/uibase/sidebar/PageFormatPanel.cxx   |4 ++--
 sw/source/uibase/sidebar/PageFormatPanel.hxx   |4 ++--
 sw/source/uibase/sidebar/TableEditPanel.cxx|4 ++--
 sw/source/uibase/sidebar/TableEditPanel.hxx|4 ++--
 14 files changed, 48 insertions(+), 48 deletions(-)

New commits:
commit 69ccba90135f4dfc22d4cb823e10cf4794ddaa04
Author: Caolán McNamara 
AuthorDate: Sat Feb 1 21:18:41 2020 +
Commit: Caolán McNamara 
CommitDate: Sun Feb 2 21:40:36 2020 +0100

rename RelativeField back to SvxRelativeField

Change-Id: Iadac47f83aae0f7403f3391e3dd45bef52ad347a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87832
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/cui/source/inc/paragrph.hxx b/cui/source/inc/paragrph.hxx
index b068fe643808..b57199d91551 100644
--- a/cui/source/inc/paragrph.hxx
+++ b/cui/source/inc/paragrph.hxx
@@ -52,18 +52,18 @@ private:
 SvxParaPrevWindow m_aExampleWin;
 
 // indention
-std::unique_ptr m_xLeftIndent;
+std::unique_ptr m_xLeftIndent;
 
 std::unique_ptr m_xRightLabel;
-std::unique_ptr m_xRightIndent;
+std::unique_ptr m_xRightIndent;
 
 std::unique_ptr m_xFLineLabel;
-std::unique_ptr m_xFLineIndent;
+std::unique_ptr m_xFLineIndent;
 std::unique_ptr m_xAutoCB;
 
 // distance
-std::unique_ptr m_xTopDist;
-std::unique_ptr m_xBottomDist;
+std::unique_ptr m_xTopDist;
+std::unique_ptr m_xBottomDist;
 std::unique_ptr m_xContextualCB;
 
 // line spacing
diff --git a/cui/source/tabpages/paragrph.cxx b/cui/source/tabpages/paragrph.cxx
index c8ef51b1245c..b712a7555d8f 100644
--- a/cui/source/tabpages/paragrph.cxx
+++ b/cui/source/tabpages/paragrph.cxx
@@ -678,14 +678,14 @@ 
SvxStdParagraphTabPage::SvxStdParagraphTabPage(weld::Container* pPage, weld::Dia
 , nWidth(11905 /*567 * 50*/)
 , nMinFixDist(0)
 , bRelativeMode(false)
-, m_xLeftIndent(new 
RelativeField(m_xBuilder->weld_metric_spin_button("spinED_LEFTINDENT", 
FieldUnit::CM)))
+, m_xLeftIndent(new 
SvxRelativeField(m_xBuilder->weld_metric_spin_button("spinED_LEFTINDENT", 
FieldUnit::CM)))
 , m_xRightLabel(m_xBuilder->weld_label("labelFT_RIGHTINDENT"))
-, m_xRightIndent(new 
RelativeField(m_xBuilder->weld_metric_spin_button("spinED_RIGHTINDENT", 
FieldUnit::CM)))
+, m_xRightIndent(new 
SvxRelativeField(m_xBuilder->weld_metric_spin_button("spinED_RIGHTINDENT", 
FieldUnit::CM)))
 , m_xFLineLabel(m_xBuilder->weld_label("labelFT_FLINEINDENT"))
-, m_xFLineIndent(new 
RelativeField(m_xBuilder->weld_metric_spin_button("spinED_FLINEINDENT", 
FieldUnit::CM)))
+, m_xFLineIndent(new 
SvxRelativeField(m_xBuilder->weld_metric_spin_button("spinED_FLINEINDENT", 
FieldUnit::CM)))
 , m_xAutoCB(m_xBuilder->weld_check_button("checkCB_AUTO"))
-, m_xTopDist(new 
RelativeField(m_xBuilder->weld_metric_spin_button("spinED_TOPDIST", 
FieldUnit::CM)))
-, m_xBottomDist(new 
RelativeField(m_xBuilder->weld_metric_spin_button("spinED_BOTTOMDIST", 
FieldUnit::CM)))
+, m_xTopDist(new 
SvxRelativeField(m_xBuilder->weld_metric_spin_button("spinED_TOPDIST", 
FieldUnit::CM)))
+, m_xBottomDist(new 
SvxRelativeField(m_xBuilder->weld_metric_spin_button("spinED_BOTTOMDIST", 
FieldUnit::CM)))
 , 
m_xContextualCB(m_xBuilder->weld_check_button("checkCB_CONTEXTUALSPACING"))
 , m_xLineDist(m_xBuilder->weld_combo_box("comboLB_LINEDIST"))
 , 
m_xLineDistAtPercentBox(m_xBuilder->weld_metric_spin_button("spinED_LINEDISTPERCENT",
 FieldUnit::PERCENT))
diff --git a/include/svx/dlgctrl.hxx b/include/svx/dlgctrl.hxx
index 6625b0651496..a7c70d7be723 100644
--- a/include/svx/dlgctrl.hxx
+++ b/include/svx/dlgctrl.hxx
@@ -413,10 +413,10 @@ public:
 virtual void Paint( vcl::RenderContext& rRenderContext, const 
tools::Rectangle& rRect ) override;
 };
 
-class RelativeField;
+class SvxRelativeField;
 
 SVX_DLLPUBLIC void limitWidthForSidebar(weld::SpinButton& rSpinButton);
-SVX_DLLPUBLIC void limitWidthForSidebar(RelativeField& rMetricSpinButton);
+SVX_DLLPUBLIC void limitWidthForSidebar(SvxRelativeField& rMetricSpinButton);
 //tdf#130197 Give this toolbar a width as if it had 5 standard toolbutton 
entries
 SVX_DLLPUBLIC void 

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

2020-01-01 Thread Caolán McNamara (via logerrit)
 cui/source/tabpages/page.cxx |   13 -
 include/svx/dlgctrl.hxx  |5 
 include/svx/itemwin.hxx  |4 
 include/svx/pagenumberlistbox.hxx|5 
 svx/source/dialog/dlgctrl.cxx|   16 ++
 svx/source/tbxctrls/itemwin.cxx  |   76 ++
 sw/source/uibase/sidebar/PageStylesPanel.cxx |  194 +--
 sw/source/uibase/sidebar/PageStylesPanel.hxx |   32 ++--
 sw/uiconfig/swriter/ui/pagestylespanel.ui|  164 --
 9 files changed, 312 insertions(+), 197 deletions(-)

New commits:
commit 4a0d34fc4ec875d14d09156f7b4b3a51fb2f5e30
Author: Caolán McNamara 
AuthorDate: Wed Jan 1 17:28:23 2020 +
Commit: Caolán McNamara 
CommitDate: Wed Jan 1 22:30:10 2020 +0100

weld PageStylesPanel

Change-Id: I8e6842a342b242eeaa6d7a27e268dbe5691a9703
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86081
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/cui/source/tabpages/page.cxx b/cui/source/tabpages/page.cxx
index c2592f0d944b..8cecd26a51c5 100644
--- a/cui/source/tabpages/page.cxx
+++ b/cui/source/tabpages/page.cxx
@@ -370,15 +370,7 @@ void SvxPageDescPage::Reset( const SfxItemSet* rSet )
 LayoutHdl_Impl( *m_xLayoutBox );
 
 //adjust numeration type of the page style
-//Get the Position of the saved NumType
-for (int i=0; i < m_xNumberFormatBox->get_count(); ++i)
-{
-if (eNumType == m_xNumberFormatBox->get_id(i).toInt32())
-{
-m_xNumberFormatBox->set_active(i);
-break;
-}
-}
+m_xNumberFormatBox->set_active_id(eNumType);
 
 m_xPaperTrayBox->clear();
 sal_uInt8 nPaperBin = PAPERBIN_PRINTER_SETTINGS;
@@ -689,10 +681,9 @@ bool SvxPageDescPage::FillItemSet( SfxItemSet* rSet )
 }
 
 //Get the NumType value
-nPos = m_xNumberFormatBox->get_active();
-SvxNumType nEntryData = 
static_cast(m_xNumberFormatBox->get_id(nPos).toInt32());
 if (m_xNumberFormatBox->get_value_changed_from_saved())
 {
+SvxNumType nEntryData = m_xNumberFormatBox->get_active_id();
 aPage.SetNumType( nEntryData );
 bMod = true;
 }
diff --git a/include/svx/dlgctrl.hxx b/include/svx/dlgctrl.hxx
index e68f881f8bce..eb7f19c79f91 100644
--- a/include/svx/dlgctrl.hxx
+++ b/include/svx/dlgctrl.hxx
@@ -215,11 +215,12 @@ public:
 
 class SAL_WARN_UNUSED SVX_DLLPUBLIC FillTypeLB : public ListBox
 {
-
 public:
- FillTypeLB( vcl::Window* pParent, WinBits aWB ) : ListBox( pParent, 
aWB ) {}
+FillTypeLB( vcl::Window* pParent, WinBits aWB ) : ListBox( pParent, aWB ) 
{}
 
 void Fill();
+
+static void Fill(weld::ComboBox& rListBox);
 };
 
 //
diff --git a/include/svx/itemwin.hxx b/include/svx/itemwin.hxx
index 13a63557f147..4f4c3ec140a0 100644
--- a/include/svx/itemwin.hxx
+++ b/include/svx/itemwin.hxx
@@ -112,6 +112,10 @@ public:
 void Fill( const XBitmapListRef);
 void Fill( const XPatternListRef   );
 
+static void Fill(weld::ComboBox&, const XHatchListRef );
+static void Fill(weld::ComboBox&, const XBitmapListRef );
+static void Fill(weld::ComboBox&, const XPatternListRef );
+
 private:
 virtual boolPreNotify( NotifyEvent& rNEvt ) override;
 virtual boolEventNotify( NotifyEvent& rNEvt ) override;
diff --git a/include/svx/pagenumberlistbox.hxx 
b/include/svx/pagenumberlistbox.hxx
index 16307c03e0a9..e416fcb8d507 100644
--- a/include/svx/pagenumberlistbox.hxx
+++ b/include/svx/pagenumberlistbox.hxx
@@ -20,6 +20,7 @@
 #ifndef INCLUDED_SVX_PAGENUMBERINGHELPER_HXX
 #define INCLUDED_SVX_PAGENUMBERINGHELPER_HXX
 
+#include 
 #include 
 #include 
 #include 
@@ -41,11 +42,13 @@ private:
 public:
 SvxPageNumberListBox(std::unique_ptr pControl);
 int get_count() const { return m_xControl->get_count(); }
-OUString get_id(int pos) const { return m_xControl->get_id(pos); }
+SvxNumType get_active_id() const { return 
static_cast(m_xControl->get_active_id().toInt32()); }
+void set_active_id(SvxNumType eId) const { 
m_xControl->set_active_id(OUString::number(static_cast(eId))); }
 int get_active() const { return m_xControl->get_active(); }
 void set_active(int pos) { m_xControl->set_active(pos); }
 void save_value() { m_xControl->save_value(); }
 bool get_value_changed_from_saved() const { return 
m_xControl->get_value_changed_from_saved(); }
+void connect_changed(const Link& rLink) { 
m_xControl->connect_changed(rLink); }
 weld::ComboBox& get_widget() const { return *m_xControl; }
 };
 
diff --git a/svx/source/dialog/dlgctrl.cxx b/svx/source/dialog/dlgctrl.cxx
index 7a9b7186a257..cb79d09cd6d2 100644
--- a/svx/source/dialog/dlgctrl.cxx
+++ b/svx/source/dialog/dlgctrl.cxx
@@ -915,6 +915,22 @@ void FillTypeLB::Fill()
 SetUpdateMode( true );
 }
 
+void 

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

2019-01-16 Thread Libreoffice Gerrit user
 cui/source/tabpages/numfmt.cxx |2 +-
 include/svx/numfmtsh.hxx   |2 +-
 svx/source/items/numfmtsh.cxx  |   31 +++
 3 files changed, 25 insertions(+), 10 deletions(-)

New commits:
commit c9d19b70c93b02e5c666414097e835039c598731
Author: Eike Rathke 
AuthorDate: Wed Jan 16 17:40:18 2019 +0100
Commit: Eike Rathke 
CommitDate: Wed Jan 16 20:25:49 2019 +0100

Resolves: tdf#122509 we have a second list with generated currency formats

... which kicks in if SvxNumberFormatShell::FindEntry() determined
a format index of NUMBERFORMAT_ENTRY_NEW_CURRENCY instead of a
real existing index.

Regression from

commit e607f1da329a2d4dd91904053d7ff86ac05c77bf
CommitDate: Thu Oct 4 15:02:13 2018 +0200

Select the current format if multiple instead of first matching 
format code

The old (now removed as unused)
SvxNumberFormatShell::GetListPos4Entry(const OUString&)
used before took care of that, add the functionality back but
combine into the existing GetListPos4Entry() function, the
additional FindEntry() call wasn't necessary anyway because it was
just called before in the caller.

The actual crash happened elsewhere in
SvNumberFormatter::GenerateFormat() because no format exists for
the then determined entry, which should be changed independently
to prevent such abuses.

Change-Id: Id42efa152693119fbde82b234f367679f818cfab
Reviewed-on: https://gerrit.libreoffice.org/66472
Reviewed-by: Eike Rathke 
Tested-by: Jenkins

diff --git a/cui/source/tabpages/numfmt.cxx b/cui/source/tabpages/numfmt.cxx
index 8214ac4f6874..7e8dfe6e0bba 100644
--- a/cui/source/tabpages/numfmt.cxx
+++ b/cui/source/tabpages/numfmt.cxx
@@ -1504,7 +1504,7 @@ void SvxNumberFormatTabPage::EditHdl_Impl(const 
weld::Entry* pEdFormat)
 if (nTmpCurPos != sal_uInt16(-1))
 set_active_currency(nTmpCurPos);
 }
-short nPosi=pNumFmtShell->GetListPos4Entry( nCurKey);
+short nPosi=pNumFmtShell->GetListPos4Entry( nCurKey, aFormat);
 if(nPosi>=0)
 m_xLbFormat->select(static_cast(nPosi));
 
diff --git a/include/svx/numfmtsh.hxx b/include/svx/numfmtsh.hxx
index 8f1b0262f1cd..2b7d36e5c475 100644
--- a/include/svx/numfmtsh.hxx
+++ b/include/svx/numfmtsh.hxx
@@ -165,7 +165,7 @@ public:
 sal_uInt16  FindCurrencyFormat( const OUString& rFmtString );
 sal_uInt16  FindCurrencyFormat(const NfCurrencyEntry* 
pTmpCurrencyEntry,bool bTmpBanking);
 voidSetCurCurrencyEntry(NfCurrencyEntry*);
-short   GetListPos4Entry(sal_uInt32 nIdx);
+short   GetListPos4Entry( sal_uInt32 nIdx, const OUString& 
rFmtString );
 
 voidGetCurrencySymbols(std::vector& rList, 
sal_uInt16* pPos );
 
diff --git a/svx/source/items/numfmtsh.cxx b/svx/source/items/numfmtsh.cxx
index 1fb809379a6c..feb595e11363 100644
--- a/svx/source/items/numfmtsh.cxx
+++ b/svx/source/items/numfmtsh.cxx
@@ -1327,24 +1327,39 @@ OUString SvxNumberFormatShell::GetFormat4Entry(short 
nEntry)
  * Input:  Number of the entry
  * Output: Category number
  */
-short SvxNumberFormatShell::GetListPos4Entry(sal_uInt32 nIdx)
+short SvxNumberFormatShell::GetListPos4Entry( sal_uInt32 nIdx, const OUString& 
rFmtString )
 {
 short nSelP = SELPOS_NONE;
-// Check list size against return type limit.
-if (aCurEntryList.size() <= 
static_cast(::std::numeric_limits::max()))
+if (nIdx != NUMBERFORMAT_ENTRY_NEW_CURRENCY)
 {
-for (size_t i = 0; i < aCurEntryList.size(); ++i)
+// Check list size against return type limit.
+if (aCurEntryList.size() <= 
static_cast(::std::numeric_limits::max()))
 {
-if (aCurEntryList[i] == nIdx)
+for (size_t i = 0; i < aCurEntryList.size(); ++i)
 {
-nSelP = i;
-break;
+if (aCurEntryList[i] == nIdx)
+{
+nSelP = i;
+break;
+}
 }
 }
+else
+{
+OSL_FAIL("svx::SvxNumberFormatShell::GetListPos4Entry(), list got 
too large!");
+}
 }
 else
 {
-OSL_FAIL("svx::SvxNumberFormatShell::GetListPos4Entry(), list got too 
large!");
+// A second list holds the generated currency formats.
+for (size_t i = 0; i < aCurrencyFormatList.size(); ++i)
+{
+if (rFmtString == aCurrencyFormatList[i])
+{
+nSelP = static_cast(i);
+break;
+}
+}
 }
 return nSelP;
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-11-29 Thread Libreoffice Gerrit user
 cui/source/dialogs/cuigaldlg.cxx |   53 +++
 cui/source/factory/dlgfact.cxx   |   21 +--
 cui/source/factory/dlgfact.hxx   |   19 +++--
 cui/source/inc/cuigaldlg.hxx |   19 ++---
 include/svx/svxdlg.hxx   |4 +-
 svx/source/gallery2/galbrws1.cxx |3 --
 6 files changed, 55 insertions(+), 64 deletions(-)

New commits:
commit f73cdd5680505523e0eb20f828f1a294f342b93c
Author: Caolán McNamara 
AuthorDate: Thu Nov 29 09:20:28 2018 +
Commit: Caolán McNamara 
CommitDate: Thu Nov 29 12:54:27 2018 +0100

weld ActualizeProgress

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

diff --git a/cui/source/dialogs/cuigaldlg.cxx b/cui/source/dialogs/cuigaldlg.cxx
index e9a12d98582a..49ae1aa8657b 100644
--- a/cui/source/dialogs/cuigaldlg.cxx
+++ b/cui/source/dialogs/cuigaldlg.cxx
@@ -374,78 +374,55 @@ void TakeProgress::LaunchThread()
 maTakeThread->launch();
 }
 
-ActualizeProgress::ActualizeProgress(vcl::Window* pWindow, GalleryTheme* pThm)
-: ModalDialog(pWindow, "GalleryUpdateProgress",
-"cui/ui/galleryupdateprogress.ui")
+ActualizeProgress::ActualizeProgress(weld::Window* pWindow, GalleryTheme* pThm)
+: GenericDialogController(pWindow, "cui/ui/galleryupdateprogress.ui",
+  "GalleryUpdateProgress")
 , pIdle(nullptr)
 , pTheme(pThm)
+, m_xFtActualizeFile(m_xBuilder->weld_label("file"))
+, m_xBtnCancel(m_xBuilder->weld_button("cancel"))
 {
-get(m_pFtActualizeFile, "file");
-get(m_pBtnCancel, "cancel");
-m_pBtnCancel->SetClickHdl( LINK( this, ActualizeProgress, ClickCancelBtn ) 
);
+m_xBtnCancel->connect_clicked(LINK(this, ActualizeProgress, 
ClickCancelBtn));
 }
 
-
 ActualizeProgress::~ActualizeProgress()
 {
-disposeOnce();
 }
 
-
-void ActualizeProgress::dispose()
+short ActualizeProgress::run()
 {
-m_pFtActualizeFile.clear();
-m_pBtnCancel.clear();
-ModalDialog::dispose();
-}
-
-
-short ActualizeProgress::Execute()
-{
-short nRet;
-
 pIdle = new Idle("ActualizeProgressTimeout");
 pIdle->SetInvokeHandler( LINK( this, ActualizeProgress, TimeoutHdl ) );
 pIdle->SetPriority( TaskPriority::LOWEST );
 pIdle->Start();
 
-nRet = ModalDialog::Execute();
-
-return nRet;
+return GenericDialogController::run();
 }
 
-
-IMPL_LINK_NOARG(ActualizeProgress, ClickCancelBtn, Button*, void)
+IMPL_LINK_NOARG(ActualizeProgress, ClickCancelBtn, weld::Button&, void)
 {
 pTheme->AbortActualize();
-EndDialog( RET_OK );
+m_xDialog->response(RET_OK);
 }
 
-
 IMPL_LINK( ActualizeProgress, TimeoutHdl, Timer*, _pTimer, void)
 {
-if ( _pTimer )
+if (_pTimer)
 {
 _pTimer->Stop();
 delete _pTimer;
 }
 
-pTheme->Actualize( LINK( this, ActualizeProgress, ActualizeHdl ), 
 );
-ClickCancelBtn( nullptr );
+pTheme->Actualize(LINK(this, ActualizeProgress, ActualizeHdl), 
);
+ClickCancelBtn(*m_xBtnCancel);
 }
 
-
 IMPL_LINK( ActualizeProgress, ActualizeHdl, const INetURLObject&, rURL, void )
 {
-Application::Reschedule( true );
-
-Flush();
-
-m_pFtActualizeFile->SetText( GetReducedString( rURL, 30 ) );
-m_pFtActualizeFile->Flush();
+Application::Reschedule(true);
+m_xFtActualizeFile->set_label(GetReducedString(rURL, 30));
 }
 
-
 TitleDialog::TitleDialog(weld::Window* pParent, const OUString& rOldTitle)
 : GenericDialogController(pParent, "cui/ui/gallerytitledialog.ui", 
"GalleryTitleDialog")
 , m_xEdit(m_xBuilder->weld_entry("entry"))
diff --git a/cui/source/factory/dlgfact.cxx b/cui/source/factory/dlgfact.cxx
index d1fa040adece..206d4a13cca9 100644
--- a/cui/source/factory/dlgfact.cxx
+++ b/cui/source/factory/dlgfact.cxx
@@ -104,6 +104,11 @@ short CuiAbstractController_Impl::Execute()
 return m_xDlg->run();
 }
 
+short CuiAbstractSingleTabController_Impl::Execute()
+{
+return m_xDlg->run();
+}
+
 IMPL_ABSTDLG_BASE(CuiVclAbstractDialog_Impl)
 IMPL_ABSTDLG_BASE(VclAbstractRefreshableDialog_Impl);
 IMPL_ABSTDLG_BASE(CuiAbstractTabDialog_Impl);
@@ -339,12 +344,12 @@ void CuiAbstractTabController_Impl::SetText( const 
OUString& rStr )
 m_xDlg->set_title(rStr);
 }
 
-const SfxItemSet* CuiAbstractController_Impl::GetOutputItemSet() const
+const SfxItemSet* CuiAbstractSingleTabController_Impl::GetOutputItemSet() const
 {
 return m_xDlg->GetOutputItemSet();
 }
 
-void CuiAbstractController_Impl::SetText(const OUString& rStr)
+void CuiAbstractSingleTabController_Impl::SetText(const OUString& rStr)
 {
 m_xDlg->set_title(rStr);
 }
@@ -1068,10 +1073,10 @@ VclPtr 
AbstractDialogFactory_Impl::CreateSvxSpellDialog(
 return VclPtr::Create(pDlg);
 }
 
-VclPtr 
AbstractDialogFactory_Impl::CreateActualizeProgressDialog( vcl::Window* 
pParent, GalleryTheme* pThm )
+VclPtr 

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

2018-10-02 Thread Libreoffice Gerrit user
 cui/source/inc/cuitabarea.hxx|   24 
 cui/source/tabpages/tpbitmap.cxx |6 +++---
 cui/source/tabpages/tpgradnt.cxx |6 +++---
 cui/source/tabpages/tphatch.cxx  |6 +++---
 cui/source/tabpages/tppattern.cxx|6 +++---
 include/svx/SvxPresetListBox.hxx |   14 ++
 svx/source/tbxctrls/SvxPresetListBox.cxx |   20 ++--
 7 files changed, 40 insertions(+), 42 deletions(-)

New commits:
commit c998b73a33d0813ca0a624a4a756f477a32b6b6f
Author: Caolán McNamara 
AuthorDate: Mon Oct 1 20:03:31 2018 +0100
Commit: Caolán McNamara 
CommitDate: Tue Oct 2 10:00:33 2018 +0200

rename PresetListBox back to SvxPresetListBox

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

diff --git a/cui/source/inc/cuitabarea.hxx b/cui/source/inc/cuitabarea.hxx
index 31932eba7c55..b16a7063e9b1 100644
--- a/cui/source/inc/cuitabarea.hxx
+++ b/cui/source/inc/cuitabarea.hxx
@@ -380,7 +380,7 @@ private:
 std::unique_ptr m_xMtrColorFrom;
 std::unique_ptr m_xLbColorTo;
 std::unique_ptr m_xMtrColorTo;
-std::unique_ptr m_xGradientLB;
+std::unique_ptr m_xGradientLB;
 std::unique_ptr m_xMtrIncrement;
 std::unique_ptr m_xCbIncrement;
 std::unique_ptr m_xSliderIncrement;
@@ -393,8 +393,8 @@ private:
 DECL_LINK( ClickModifyHdl_Impl, weld::Button&, void );
 DECL_LINK( ChangeGradientHdl, SvtValueSet*, void );
 void ChangeGradientHdl_Impl();
-DECL_LINK( ClickRenameHdl_Impl, PresetListBox*, void );
-DECL_LINK( ClickDeleteHdl_Impl, PresetListBox*, void );
+DECL_LINK( ClickRenameHdl_Impl, SvxPresetListBox*, void );
+DECL_LINK( ClickDeleteHdl_Impl, SvxPresetListBox*, void );
 DECL_LINK( ModifiedEditHdl_Impl, weld::SpinButton&, void );
 DECL_LINK( ModifiedMetricHdl_Impl, weld::MetricSpinButton&, void );
 DECL_LINK( ModifiedColorListBoxHdl_Impl, ColorListBox&, void );
@@ -456,7 +456,7 @@ private:
 std::unique_ptr m_xLbLineColor;
 std::unique_ptr m_xCbBackgroundColor;
 std::unique_ptr m_xLbBackgroundColor;
-std::unique_ptr m_xHatchLB;
+std::unique_ptr m_xHatchLB;
 std::unique_ptr m_xBtnAdd;
 std::unique_ptr m_xBtnModify;
 std::unique_ptr m_xHatchLBWin;
@@ -473,8 +473,8 @@ private:
 void ModifiedHdl_Impl(void const *);
 DECL_LINK( ClickAddHdl_Impl, weld::Button&, void );
 DECL_LINK( ClickModifyHdl_Impl, weld::Button&, void );
-DECL_LINK( ClickRenameHdl_Impl, PresetListBox*, void );
-DECL_LINK( ClickDeleteHdl_Impl, PresetListBox*, void );
+DECL_LINK( ClickRenameHdl_Impl, SvxPresetListBox*, void );
+DECL_LINK( ClickDeleteHdl_Impl, SvxPresetListBox*, void );
 
 sal_Int32 SearchHatchList(const OUString& rHatchName);
 
@@ -530,7 +530,7 @@ private:
 Size   rZoomedSize;
 
 SvxXRectPreview m_aCtlBitmapPreview;
-std::unique_ptr   m_xBitmapLB;
+std::unique_ptr   m_xBitmapLB;
 std::unique_ptr m_xBitmapStyleLB;
 std::unique_ptr m_xSizeBox;
 std::unique_ptr m_xTsbScale;
@@ -555,8 +555,8 @@ private:
 DECL_LINK( ModifyBitmapPositionHdl, weld::ComboBox&, void );
 DECL_LINK( ModifyPositionOffsetHdl, weld::MetricSpinButton&, void );
 DECL_LINK( ModifyTileOffsetHdl, weld::MetricSpinButton&, void );
-DECL_LINK( ClickRenameHdl, PresetListBox*, void );
-DECL_LINK( ClickDeleteHdl, PresetListBox*, void );
+DECL_LINK( ClickRenameHdl, SvxPresetListBox*, void );
+DECL_LINK( ClickDeleteHdl, SvxPresetListBox*, void );
 DECL_LINK( ClickImportHdl, weld::Button&, void );
 void ClickBitmapHdl_Impl();
 void CalculateBitmapPresetSize();
@@ -603,7 +603,7 @@ private:
 std::unique_ptr m_xCtlPixel;
 std::unique_ptr m_xLbColor;
 std::unique_ptr m_xLbBackgroundColor;
-std::unique_ptr m_xPatternLB;
+std::unique_ptr m_xPatternLB;
 std::unique_ptr m_xBtnAdd;
 std::unique_ptr m_xBtnModify;
 std::unique_ptr m_xCtlPixelWin;
@@ -615,8 +615,8 @@ private:
 DECL_LINK( ClickModifyHdl_Impl, weld::Button&, void );
 DECL_LINK( ChangePatternHdl_Impl, SvtValueSet*, void );
 DECL_LINK( ChangeColorHdl_Impl, ColorListBox&, void );
-DECL_LINK( ClickRenameHdl_Impl, PresetListBox*, void );
-DECL_LINK( ClickDeleteHdl_Impl, PresetListBox*, void );
+DECL_LINK( ClickRenameHdl_Impl, SvxPresetListBox*, void );
+DECL_LINK( ClickDeleteHdl_Impl, SvxPresetListBox*, void );
 
 sal_Int32 SearchPatternList(const OUString& rPatternName);
 
diff --git a/cui/source/tabpages/tpbitmap.cxx b/cui/source/tabpages/tpbitmap.cxx
index a721a70171de..5f51cc11a92a 100644
--- a/cui/source/tabpages/tpbitmap.cxx
+++ b/cui/source/tabpages/tpbitmap.cxx
@@ -77,7 +77,7 @@ SvxBitmapTabPage::SvxBitmapTabPage(TabPageParent pParent, 
const SfxItemSet& rInA
 , m_aXFillAttr(rInAttrs.GetPool())
 , 

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

2018-10-01 Thread Libreoffice Gerrit user
 cui/source/inc/cuitabline.hxx |6 +++---
 include/svx/dlgctrl.hxx   |6 +++---
 svx/source/dialog/dlgctrl.cxx |   16 
 3 files changed, 14 insertions(+), 14 deletions(-)

New commits:
commit 40e157e2a838fd8cecd0e45109b7e62e056d642b
Author: Caolán McNamara 
AuthorDate: Mon Oct 1 13:57:44 2018 +0100
Commit: Caolán McNamara 
CommitDate: Mon Oct 1 20:36:28 2018 +0200

rename XLinePreview back to SvxXLinePreview

Change-Id: I833c4ae6e2944b484bb32532c20f5ef09917e712
Reviewed-on: https://gerrit.libreoffice.org/61190
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/cui/source/inc/cuitabline.hxx b/cui/source/inc/cuitabline.hxx
index b873f8ae1ec7..36edebfd8330 100644
--- a/cui/source/inc/cuitabline.hxx
+++ b/cui/source/inc/cuitabline.hxx
@@ -135,7 +135,7 @@ private:
 
 sal_Int32   m_nActLineWidth;
 
-XLinePreview m_aCtlPreview;
+SvxXLinePreview m_aCtlPreview;
 std::unique_ptr m_xBoxColor;
 std::unique_ptr m_xLbLineStyle;
 std::unique_ptr m_xLbColor;
@@ -262,7 +262,7 @@ private:
 MapUnit ePoolUnit;
 FieldUnit   eFUnit;
 
-XLinePreview m_aCtlPreview;
+SvxXLinePreview m_aCtlPreview;
 std::unique_ptr m_xLbLineStyles;
 std::unique_ptr m_xLbType1;
 std::unique_ptr m_xLbType2;
@@ -345,7 +345,7 @@ private:
 sal_uInt16  nDlgType;
 sal_Int32*  pPosLineEndLb;
 
-XLinePreview m_aCtlPreview;
+SvxXLinePreview m_aCtlPreview;
 std::unique_ptr m_xEdtName;
 std::unique_ptr m_xLbLineEnds;
 std::unique_ptr m_xBtnAdd;
diff --git a/include/svx/dlgctrl.hxx b/include/svx/dlgctrl.hxx
index 4827842df60a..6238c4a3c21d 100644
--- a/include/svx/dlgctrl.hxx
+++ b/include/svx/dlgctrl.hxx
@@ -423,7 +423,7 @@ public:
 |*
 \/
 
-class SAL_WARN_UNUSED SVX_DLLPUBLIC XLinePreview : public PreviewBase
+class SAL_WARN_UNUSED SVX_DLLPUBLIC SvxXLinePreview : public PreviewBase
 {
 private:
 SdrPathObj* mpLineObjA;
@@ -435,9 +435,9 @@ private:
 SizemaSymbolSize;
 
 public:
-XLinePreview();
+SvxXLinePreview();
 virtual void SetDrawingArea(weld::DrawingArea* pDrawingArea) override;
-virtual ~XLinePreview() override;
+virtual ~SvxXLinePreview() override;
 
 void SetLineAttributes(const SfxItemSet& rItemSet);
 
diff --git a/svx/source/dialog/dlgctrl.cxx b/svx/source/dialog/dlgctrl.cxx
index 35f1964313f1..dbf5be9a034f 100644
--- a/svx/source/dialog/dlgctrl.cxx
+++ b/svx/source/dialog/dlgctrl.cxx
@@ -1336,7 +1336,7 @@ void SvxPreviewBase::DataChanged(const DataChangedEvent& 
rDCEvt)
 }
 }
 
-void XLinePreview::Resize()
+void SvxXLinePreview::Resize()
 {
 PreviewBase::Resize();
 
@@ -1376,7 +1376,7 @@ void XLinePreview::Resize()
 mpLineObjC->SetPathPoly(basegfx::B2DPolyPolygon(aPolygonC));
 }
 
-XLinePreview::XLinePreview()
+SvxXLinePreview::SvxXLinePreview()
 : mpLineObjA(nullptr)
 , mpLineObjB(nullptr)
 , mpLineObjC(nullptr)
@@ -1385,7 +1385,7 @@ XLinePreview::XLinePreview()
 {
 }
 
-void XLinePreview::SetDrawingArea(weld::DrawingArea* pDrawingArea)
+void SvxXLinePreview::SetDrawingArea(weld::DrawingArea* pDrawingArea)
 {
 PreviewBase::SetDrawingArea(pDrawingArea);
 
@@ -1397,7 +1397,7 @@ void XLinePreview::SetDrawingArea(weld::DrawingArea* 
pDrawingArea)
 Invalidate();
 }
 
-XLinePreview::~XLinePreview()
+SvxXLinePreview::~SvxXLinePreview()
 {
 SdrObject *pFoo = mpLineObjA;
 SdrObject::Free( pFoo );
@@ -1407,13 +1407,13 @@ XLinePreview::~XLinePreview()
 SdrObject::Free( pFoo );
 }
 
-void XLinePreview::SetSymbol(Graphic* p,const Size& s)
+void SvxXLinePreview::SetSymbol(Graphic* p,const Size& s)
 {
 mpGraphic = p;
 maSymbolSize = s;
 }
 
-void XLinePreview::ResizeSymbol(const Size& s)
+void SvxXLinePreview::ResizeSymbol(const Size& s)
 {
 if ( s != maSymbolSize )
 {
@@ -1422,7 +1422,7 @@ void XLinePreview::ResizeSymbol(const Size& s)
 }
 }
 
-void XLinePreview::SetLineAttributes(const SfxItemSet& rItemSet)
+void SvxXLinePreview::SetLineAttributes(const SfxItemSet& rItemSet)
 {
 // Set ItemSet at objects
 mpLineObjA->SetMergedItemSet(rItemSet);
@@ -1436,7 +1436,7 @@ void XLinePreview::SetLineAttributes(const SfxItemSet& 
rItemSet)
 mpLineObjC->SetMergedItemSet(aTempSet);
 }
 
-void XLinePreview::Paint(vcl::RenderContext& rRenderContext, const 
tools::Rectangle&)
+void SvxXLinePreview::Paint(vcl::RenderContext& rRenderContext, const 
tools::Rectangle&)
 {
 LocalPrePaint(rRenderContext);
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-09-29 Thread Libreoffice Gerrit user
 cui/source/dialogs/cuifmsearch.cxx |2 +-
 cui/source/factory/dlgfact.cxx |   12 +++-
 cui/source/factory/dlgfact.hxx |   17 -
 cui/source/inc/cuisrchdlg.hxx  |   11 +++
 cui/source/options/cuisrchdlg.cxx  |   35 +++
 include/svx/svxdlg.hxx |6 +++---
 svx/source/dialog/srchdlg.cxx  |2 +-
 7 files changed, 38 insertions(+), 47 deletions(-)

New commits:
commit 281a44a61b692f85007412d0b460284fc228b751
Author: Caolán McNamara 
AuthorDate: Fri Sep 28 18:21:58 2018 +0100
Commit: Caolán McNamara 
CommitDate: Sat Sep 29 17:28:11 2018 +0200

weld SvxJSearchOptionsDialog

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

diff --git a/cui/source/dialogs/cuifmsearch.cxx 
b/cui/source/dialogs/cuifmsearch.cxx
index 103e3c599e94..2f3c9af13d13 100644
--- a/cui/source/dialogs/cuifmsearch.cxx
+++ b/cui/source/dialogs/cuifmsearch.cxx
@@ -370,7 +370,7 @@ IMPL_LINK(FmSearchDialog, OnClickedSpecialSettings, 
Button*, pButton, void )
 {
 SfxItemSet aSet( SfxGetpApp()->GetPool() );
 SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
-ScopedVclPtr 
aDlg(pFact->CreateSvxJSearchOptionsDialog( this, aSet, 
m_pSearchEngine->GetTransliterationFlags() ));
+ScopedVclPtr 
aDlg(pFact->CreateSvxJSearchOptionsDialog(GetFrameWeld(), aSet, 
m_pSearchEngine->GetTransliterationFlags() ));
 aDlg->Execute();
 
 TransliterationFlags nFlags = aDlg->GetTransliterationFlags();
diff --git a/cui/source/factory/dlgfact.cxx b/cui/source/factory/dlgfact.cxx
index 125e5cd73d89..0c024e2f8079 100644
--- a/cui/source/factory/dlgfact.cxx
+++ b/cui/source/factory/dlgfact.cxx
@@ -167,7 +167,10 @@ bool 
AbstractSvxCaptionDialog_Impl::StartExecuteAsync(AsyncContext )
 return SfxTabDialogController::runAsync(m_xDlg, rCtx.maEndDialogFn);
 }
 
-IMPL_ABSTDLG_BASE(AbstractSvxJSearchOptionsDialog_Impl);
+short AbstractSvxJSearchOptionsDialog_Impl::Execute()
+{
+return m_xDlg->run();
+}
 
 short AbstractFmInputRecordNoDialog_Impl::Execute()
 {
@@ -692,7 +695,7 @@ void 
AbstractSvxCaptionDialog_Impl::SetValidateFramePosLink( const LinkGetTransliterationFlags();
+return m_xDlg->GetTransliterationFlags();
 }
 
 void AbstractFmInputRecordNoDialog_Impl::SetValue(long nNew)
@@ -1221,12 +1224,11 @@ VclPtr 
AbstractDialogFactory_Impl::CreateSchTransformTabDi
 return VclPtr::Create(std::move(pDlg));
 }
 
-VclPtr 
AbstractDialogFactory_Impl::CreateSvxJSearchOptionsDialog( vcl::Window* pParent,
+VclPtr 
AbstractDialogFactory_Impl::CreateSvxJSearchOptionsDialog(weld::Window* pParent,
 const SfxItemSet& 
rOptionsSet,
 
TransliterationFlags nInitialFlags)
 {
-VclPtrInstance pDlg( pParent, rOptionsSet, 
nInitialFlags );
-return VclPtr::Create( pDlg );
+return 
VclPtr::Create(o3tl::make_unique(pParent,
 rOptionsSet, nInitialFlags));
 }
 
 VclPtr 
AbstractDialogFactory_Impl::CreateFmInputRecordNoDialog(weld::Window* pParent)
diff --git a/cui/source/factory/dlgfact.hxx b/cui/source/factory/dlgfact.hxx
index 2316ff7be199..505ff1481b96 100644
--- a/cui/source/factory/dlgfact.hxx
+++ b/cui/source/factory/dlgfact.hxx
@@ -327,9 +327,16 @@ public:
 };
 
 class SvxJSearchOptionsDialog;
-class AbstractSvxJSearchOptionsDialog_Impl :public 
AbstractSvxJSearchOptionsDialog
+class AbstractSvxJSearchOptionsDialog_Impl : public 
AbstractSvxJSearchOptionsDialog
 {
-
DECL_ABSTDLG_BASE(AbstractSvxJSearchOptionsDialog_Impl,SvxJSearchOptionsDialog)
+protected:
+std::unique_ptr m_xDlg;
+public:
+explicit 
AbstractSvxJSearchOptionsDialog_Impl(std::unique_ptr p)
+: m_xDlg(std::move(p))
+{
+}
+virtual short Execute() override;
 virtual TransliterationFlagsGetTransliterationFlags() const override;
 };
 
@@ -757,9 +764,9 @@ public:
 sal_uInt16 nOther,
 sal_uInt16 
nShorter,
 sal_uInt16 
nLonger) override;
-virtual VclPtr 
CreateSvxJSearchOptionsDialog( vcl::Window* pParent,
-const SfxItemSet& 
rOptionsSet,
-
TransliterationFlags nInitialFlags) override;
+virtual VclPtr 
CreateSvxJSearchOptionsDialog(weld::Window* pParent,
+   
   const SfxItemSet& rOptionsSet,
+   
   TransliterationFlags nInitialFlags) override;
 virtual VclPtr 

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

2018-09-20 Thread Libreoffice Gerrit user
 cui/source/inc/paragrph.hxx   |4 ++--
 include/svx/paraprev.hxx  |4 ++--
 svx/source/dialog/paraprev.cxx|8 
 sw/source/uibase/inc/regionsw.hxx |2 +-
 4 files changed, 9 insertions(+), 9 deletions(-)

New commits:
commit d5d943fdc729763a5277cd0ac2093ae8acb6fccd
Author: Caolán McNamara 
AuthorDate: Wed Sep 19 17:02:31 2018 +0100
Commit: Caolán McNamara 
CommitDate: Thu Sep 20 09:59:30 2018 +0200

rename ParaPrevWindow back to SvxParaPrevWindow

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

diff --git a/cui/source/inc/paragrph.hxx b/cui/source/inc/paragrph.hxx
index b682fa126d60..b656f8d52b05 100644
--- a/cui/source/inc/paragrph.hxx
+++ b/cui/source/inc/paragrph.hxx
@@ -59,7 +59,7 @@ private:
 boolbRelativeMode;
 OUStringsAbsDist;
 
-ParaPrevWindow m_aExampleWin;
+SvxParaPrevWindow m_aExampleWin;
 
 // indention
 std::unique_ptr m_xLeftIndent;
@@ -134,7 +134,7 @@ class SvxParaAlignTabPage : public SfxTabPage
 using TabPage::DeactivatePage;
 static const sal_uInt16 pAlignRanges[];
 
-ParaPrevWindow m_aExampleWin;
+SvxParaPrevWindow m_aExampleWin;
 
 // alignment
 std::unique_ptr m_xLeft;
diff --git a/include/svx/paraprev.hxx b/include/svx/paraprev.hxx
index 62b8eda4ab80..18e7ec5ea2bb 100644
--- a/include/svx/paraprev.hxx
+++ b/include/svx/paraprev.hxx
@@ -35,7 +35,7 @@ enum class SvxPrevLineSpace
 Leading
 };
 
-class SVX_DLLPUBLIC ParaPrevWindow final : public weld::CustomWidgetController
+class SVX_DLLPUBLIC SvxParaPrevWindow final : public 
weld::CustomWidgetController
 {
 SizeaSize;
 
@@ -60,7 +60,7 @@ class SVX_DLLPUBLIC ParaPrevWindow final : public 
weld::CustomWidgetController
 void DrawParagraph(vcl::RenderContext& rRenderContext);
 
 public:
-ParaPrevWindow();
+SvxParaPrevWindow();
 
 void SetFirstLineOfst( short nNew )
 {
diff --git a/svx/source/dialog/paraprev.cxx b/svx/source/dialog/paraprev.cxx
index 0ac65ad075a9..97eb87ecc64e 100644
--- a/svx/source/dialog/paraprev.cxx
+++ b/svx/source/dialog/paraprev.cxx
@@ -22,7 +22,7 @@
 #include 
 #include 
 
-ParaPrevWindow::ParaPrevWindow() :
+SvxParaPrevWindow::SvxParaPrevWindow() :
 nLeftMargin ( 0 ),
 nRightMargin( 0 ),
 nFirstLineOfst  ( 0 ),
@@ -35,21 +35,21 @@ ParaPrevWindow::ParaPrevWindow() :
 aSize = Size(11905, 16837);
 }
 
-void ParaPrevWindow::SetDrawingArea(weld::DrawingArea* pDrawingArea)
+void SvxParaPrevWindow::SetDrawingArea(weld::DrawingArea* pDrawingArea)
 {
 CustomWidgetController::SetDrawingArea(pDrawingArea);
 Size 
aOptimalSize(getParagraphPreviewOptimalSize(pDrawingArea->get_ref_device()));
 pDrawingArea->set_size_request(aOptimalSize.Width(), 
aOptimalSize.Height());
 }
 
-void ParaPrevWindow::Paint(vcl::RenderContext& rRenderContext, const 
tools::Rectangle&)
+void SvxParaPrevWindow::Paint(vcl::RenderContext& rRenderContext, const 
tools::Rectangle&)
 {
 DrawParagraph(rRenderContext);
 }
 
 #define DEF_MARGIN  120
 
-void ParaPrevWindow::DrawParagraph(vcl::RenderContext& rRenderContext)
+void SvxParaPrevWindow::DrawParagraph(vcl::RenderContext& rRenderContext)
 {
 // Count in Twips by default
 rRenderContext.Push(PushFlags::MAPMODE);
diff --git a/sw/source/uibase/inc/regionsw.hxx 
b/sw/source/uibase/inc/regionsw.hxx
index 8f44ea17fbd3..3ff899a2bfea 100644
--- a/sw/source/uibase/inc/regionsw.hxx
+++ b/sw/source/uibase/inc/regionsw.hxx
@@ -227,7 +227,7 @@ public:
 
 class SwSectionIndentTabPage : public SfxTabPage
 {
-ParaPrevWindow m_aPreviewWin;
+SvxParaPrevWindow m_aPreviewWin;
 std::unique_ptr m_xBeforeMF;
 std::unique_ptr m_xAfterMF;
 std::unique_ptr m_xPreviewWin;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-09-06 Thread Libreoffice Gerrit user
 cui/source/inc/page.hxx   |2 +-
 include/svx/hdft.hxx  |2 +-
 include/svx/pagectrl.hxx  |6 +++---
 svx/source/dialog/pagectrl.cxx|   18 +-
 sw/source/uibase/frmdlg/colex.cxx |8 
 sw/source/uibase/inc/colex.hxx|   12 ++--
 6 files changed, 24 insertions(+), 24 deletions(-)

New commits:
commit 5a739fba62a300cd1926445462d6e2f1f08a
Author: Caolán McNamara 
AuthorDate: Wed Sep 5 21:25:48 2018 +0100
Commit: Caolán McNamara 
CommitDate: Thu Sep 6 13:37:14 2018 +0200

rename back now originals are fully replaced

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

diff --git a/cui/source/inc/page.hxx b/cui/source/inc/page.hxx
index da7ee7047391..74155a61b0d3 100644
--- a/cui/source/inc/page.hxx
+++ b/cui/source/inc/page.hxx
@@ -96,7 +96,7 @@ private:
 boolmbDelPrinter : 1;
 boolmbEnableDrawingLayerFillStyles : 1;
 
-PageWindow m_aBspWin;
+SvxPageWindow m_aBspWin;
 
 // paper format
 std::unique_ptr m_xPaperSizeBox;
diff --git a/include/svx/hdft.hxx b/include/svx/hdft.hxx
index 6a0eeb7980a3..c5a92c5e01d3 100644
--- a/include/svx/hdft.hxx
+++ b/include/svx/hdft.hxx
@@ -68,7 +68,7 @@ protected:
 boolmbDisableQueryBox : 1;
 boolmbEnableDrawingLayerFillStyles : 1;
 
-PageWindow m_aBspWin;
+SvxPageWindow m_aBspWin;
 std::unique_ptr m_xPageLbl;
 std::unique_ptr m_xTurnOnBox;
 std::unique_ptr m_xCntSharedBox;
diff --git a/include/svx/pagectrl.hxx b/include/svx/pagectrl.hxx
index f2db16bbaa9b..22cd0576a23c 100644
--- a/include/svx/pagectrl.hxx
+++ b/include/svx/pagectrl.hxx
@@ -28,7 +28,7 @@ class SvxBoxItem;
 enum class SvxPageUsage;
 enum class SvxFrameDirection;
 
-class SVX_DLLPUBLIC PageWindow : public weld::CustomWidgetController
+class SVX_DLLPUBLIC SvxPageWindow : public weld::CustomWidgetController
 {
 private:
 Size aWinSize;
@@ -76,9 +76,9 @@ protected:
 const tools::Rectangle& rPaintRange, const 
tools::Rectangle& rDefineRange);
 
 public:
-PageWindow();
+SvxPageWindow();
 virtual void SetDrawingArea(weld::DrawingArea* pDrawingArea) override;
-virtual ~PageWindow() override;
+virtual ~SvxPageWindow() override;
 
 void setHeaderFillAttributes(const 
drawinglayer::attribute::SdrAllFillAttributesHelperPtr& rFillAttributes)
 {
diff --git a/svx/source/dialog/pagectrl.cxx b/svx/source/dialog/pagectrl.cxx
index bf244703b31b..e8db9c9fad0e 100644
--- a/svx/source/dialog/pagectrl.cxx
+++ b/svx/source/dialog/pagectrl.cxx
@@ -36,7 +36,7 @@
 #define CELL_WIDTH  1600L
 #define CELL_HEIGHT  800L
 
-PageWindow::PageWindow() :
+SvxPageWindow::SvxPageWindow() :
 aWinSize(),
 aSize(),
 nTop(0),
@@ -66,11 +66,11 @@ PageWindow::PageWindow() :
 {
 }
 
-PageWindow::~PageWindow()
+SvxPageWindow::~SvxPageWindow()
 {
 }
 
-void PageWindow::Paint(vcl::RenderContext& rRenderContext, const 
tools::Rectangle&)
+void SvxPageWindow::Paint(vcl::RenderContext& rRenderContext, const 
tools::Rectangle&)
 {
 rRenderContext.Push(PushFlags::MAPMODE);
 rRenderContext.SetMapMode(MapMode(MapUnit::MapTwip));
@@ -127,7 +127,7 @@ void PageWindow::Paint(vcl::RenderContext& rRenderContext, 
const tools::Rectangl
 rRenderContext.Pop();
 }
 
-void PageWindow::DrawPage(vcl::RenderContext& rRenderContext, const Point& 
rOrg, const bool bSecond, const bool bEnabled)
+void SvxPageWindow::DrawPage(vcl::RenderContext& rRenderContext, const Point& 
rOrg, const bool bSecond, const bool bEnabled)
 {
 const StyleSettings& rStyleSettings = 
rRenderContext.GetSettings().GetStyleSettings();
 const Color& rFieldColor = rStyleSettings.GetFieldColor();
@@ -320,7 +320,7 @@ void PageWindow::DrawPage(vcl::RenderContext& 
rRenderContext, const Point& rOrg,
 }
 }
 
-void PageWindow::drawFillAttributes(vcl::RenderContext& rRenderContext,
+void SvxPageWindow::drawFillAttributes(vcl::RenderContext& rRenderContext,
const 
drawinglayer::attribute::SdrAllFillAttributesHelperPtr& rFillAttributes,
const tools::Rectangle& rPaintRange,
const tools::Rectangle& rDefineRange)
@@ -378,22 +378,22 @@ void PageWindow::drawFillAttributes(vcl::RenderContext& 
rRenderContext,
 }
 
 
-void PageWindow::EnableFrameDirection(bool bEnable)
+void SvxPageWindow::EnableFrameDirection(bool bEnable)
 {
 bFrameDirection = bEnable;
 }
 
-void PageWindow::SetFrameDirection(SvxFrameDirection nDirection)
+void SvxPageWindow::SetFrameDirection(SvxFrameDirection nDirection)
 {
 nFrameDirection = nDirection;
 }
 
-void PageWindow::ResetBackground()
+void SvxPageWindow::ResetBackground()
 {
 bResetBackground = true;
 }
 
-void 

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

2018-08-08 Thread Libreoffice Gerrit user
 cui/source/tabpages/tpline.cxx |4 ++--
 include/svx/svdmodel.hxx   |   11 ---
 svx/source/dialog/dlgctrl.cxx  |4 ++--
 svx/source/dialog/graphctl.cxx |2 +-
 svx/source/dialog/measctrl.cxx |2 +-
 svx/source/svdraw/svdmodel.cxx |   14 --
 6 files changed, 22 insertions(+), 15 deletions(-)

New commits:
commit 674416a2f16dfa050a23f2b1f0b749214ea1f2a6
Author: Caolán McNamara 
AuthorDate: Tue Aug 7 16:21:23 2018 +0100
Commit: Caolán McNamara 
CommitDate: Wed Aug 8 11:26:11 2018 +0200

tdf#118731 delay on showing dialogs that create SdrModels

for their preview widgets. since...

commit 4be44a7a6f2f480e55255d7cdd119f3d6577d085
Date:   Thu May 24 19:09:44 2018 +0200

SOSAW080: Cleanup of SdrModel

Change-Id: I102b64bdacc56a41091bbe60e932c2915f20323f
Reviewed-on: https://gerrit.libreoffice.org/58693
Tested-by: Jenkins
Reviewed-by: Armin Le Grand 

diff --git a/cui/source/tabpages/tpline.cxx b/cui/source/tabpages/tpline.cxx
index 5a633ac06dd1..f8c8a8b8fa8e 100644
--- a/cui/source/tabpages/tpline.cxx
+++ b/cui/source/tabpages/tpline.cxx
@@ -335,7 +335,7 @@ void SvxLineTabPage::InitSymbols(MenuButton const * pButton)
 ScopedVclPtrInstance< VirtualDevice > pVDev;
 pVDev->SetMapMode(MapMode(MapUnit::Map100thMM));
 std::unique_ptr pModel(
-new SdrModel());
+new SdrModel(nullptr, nullptr, true));
 pModel->GetItemPool().FreezeIdRanges();
 // Page
 SdrPage* pPage = new SdrPage( *pModel, false );
@@ -1112,7 +1112,7 @@ void SvxLineTabPage::Reset( const SfxItemSet* rAttrs )
 pVDev->SetMapMode(MapMode(MapUnit::Map100thMM));
 
 std::unique_ptr pModel(
-new SdrModel());
+new SdrModel(nullptr, nullptr, true));
 pModel->GetItemPool().FreezeIdRanges();
 SdrPage* pPage = new SdrPage( *pModel, false );
 pPage->SetSize(Size(1000,1000));
diff --git a/include/svx/svdmodel.hxx b/include/svx/svdmodel.hxx
index 127bf4ed985f..62bb9dd51533 100644
--- a/include/svx/svdmodel.hxx
+++ b/include/svx/svdmodel.hxx
@@ -270,11 +270,12 @@ private:
 SVX_DLLPRIVATE void ImpSetOutlinerDefaults( SdrOutliner* pOutliner, bool 
bInit = false );
 SVX_DLLPRIVATE void ImpReformatAllTextObjects();
 SVX_DLLPRIVATE void ImpReformatAllEdgeObjects();
-SVX_DLLPRIVATE void ImpCreateTables();
+SVX_DLLPRIVATE void ImpCreateTables(bool bDisablePropertyFiles);
 
 SVX_DLLPRIVATE void ImpCtor(
 SfxItemPool* pPool,
-::comphelper::IEmbeddedHelper* pPers);
+::comphelper::IEmbeddedHelper* pPers,
+bool bDisablePropertyFiles);
 
 // this is a weak reference to a possible living api wrapper for this model
 css::uno::Reference< css::uno::XInterface > mxUnoModel;
@@ -293,9 +294,13 @@ public:
 // if you want to use symbol objects inherited from SdrAttrObj.
 // If, however, you use objects inheriting from SdrObject you are free
 // to chose a pool of your liking.
+//
+// tdf#118731 a bDisablePropertyFiles of true will disable ability to load
+// XPropertyFiles describing defaults. Useful for UI preview widgets
 explicit SdrModel(
 SfxItemPool* pPool = nullptr,
-::comphelper::IEmbeddedHelper* pPers = nullptr);
+::comphelper::IEmbeddedHelper* pPers = nullptr,
+bool bDisablePropertyFiles = false);
 virtual ~SdrModel() override;
 void ClearModel(bool bCalledFromDestructor);
 
diff --git a/svx/source/dialog/dlgctrl.cxx b/svx/source/dialog/dlgctrl.cxx
index e482f1f0a494..6f757f1ec62b 100644
--- a/svx/source/dialog/dlgctrl.cxx
+++ b/svx/source/dialog/dlgctrl.cxx
@@ -1786,7 +1786,7 @@ void SvxPreviewBase::InitSettings(bool bForeground, bool 
bBackground)
 
 SvxPreviewBase::SvxPreviewBase(vcl::Window* pParent)
 : Control(pParent, WB_BORDER)
-, mpModel(new SdrModel())
+, mpModel(new SdrModel(nullptr, nullptr, true))
 , mpBufferDevice(VclPtr::Create(*this))
 {
 //  Draw the control's border as a flat thin black line.
@@ -2189,7 +2189,7 @@ void PreviewBase::InitSettings()
 }
 
 PreviewBase::PreviewBase()
-: mpModel(new SdrModel())
+: mpModel(new SdrModel(nullptr, nullptr, true))
 {
 // init model
 mpModel->GetItemPool().FreezeIdRanges();
diff --git a/svx/source/dialog/graphctl.cxx b/svx/source/dialog/graphctl.cxx
index 0f9325232f01..17d416d3ad94 100644
--- a/svx/source/dialog/graphctl.cxx
+++ b/svx/source/dialog/graphctl.cxx
@@ -120,7 +120,7 @@ void GraphCtrl::InitSdrModel()
 pModel.reset();
 
 // Creating a Model
-pModel.reset(new SdrModel());
+pModel.reset(new SdrModel(nullptr, nullptr, true));
 pModel->GetItemPool().FreezeIdRanges();
 pModel->SetScaleUnit( aMap100.GetMapUnit() );
 pModel->SetScaleFraction( Fraction( 1, 1 ) );
diff --git a/svx/source/dialog/measctrl.cxx b/svx/source/dialog/measctrl.cxx
index 2aa183ecaa1a..578a49ceb6e3 100644
--- 

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

2018-03-23 Thread Samuel Mehrbrodt
 cui/source/tabpages/chardlg.cxx |2 +-
 include/svx/langbox.hxx |2 +-
 svx/source/dialog/langbox.cxx   |2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

New commits:
commit e97737fd667d74c759e7e44e9c5364b8c7cda0a9
Author: Samuel Mehrbrodt 
Date:   Thu Mar 22 17:30:09 2018 +0100

Typo: GetSelectEntryPosLBB -> GetSelectedEntryPosLBB

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

diff --git a/cui/source/tabpages/chardlg.cxx b/cui/source/tabpages/chardlg.cxx
index 7d59c2a68721..2ad91da8ac53 100644
--- a/cui/source/tabpages/chardlg.cxx
+++ b/cui/source/tabpages/chardlg.cxx
@@ -1121,7 +1121,7 @@ bool SvxCharNamePage::FillItemSet_Impl( SfxItemSet& rSet, 
LanguageGroup eLangGrp
 }
 }
 
-sal_Int32 nLangPos = pLangBox->GetSelectEntryPosLBB();
+sal_Int32 nLangPos = pLangBox->GetSelectedEntryPosLBB();
 LanguageType eLangType = 
LanguageType(reinterpret_cast(pLangBox->GetEntryDataLBB( nLangPos 
)));
 
 if ( pOld )
diff --git a/include/svx/langbox.hxx b/include/svx/langbox.hxx
index a80589cdae15..af16b7faf914 100644
--- a/include/svx/langbox.hxx
+++ b/include/svx/langbox.hxx
@@ -86,7 +86,7 @@ public:
 voidHideLBB();
 voidDisableLBB();
 voidSaveValueLBB();
-sal_Int32   GetSelectEntryPosLBB() const;
+sal_Int32   GetSelectedEntryPosLBB() const;
 void*   GetEntryDataLBB( sal_Int32  nPos ) const;
 sal_Int32   GetSavedValueLBB() const;
 
diff --git a/svx/source/dialog/langbox.cxx b/svx/source/dialog/langbox.cxx
index b64e6a9a1b7b..f69eaefa74f7 100644
--- a/svx/source/dialog/langbox.cxx
+++ b/svx/source/dialog/langbox.cxx
@@ -512,7 +512,7 @@ void SvxLanguageBoxBase::SaveValueLBB()
 ImplSaveValue();
 }
 
-sal_Int32 SvxLanguageBoxBase::GetSelectEntryPosLBB() const
+sal_Int32 SvxLanguageBoxBase::GetSelectedEntryPosLBB() const
 {
 return ImplGetSelectEntryPos();
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-03-23 Thread Samuel Mehrbrodt
 cui/source/factory/dlgfact.cxx   |2 +-
 cui/source/factory/dlgfact.hxx   |2 +-
 cui/source/inc/splitcelldlg.hxx  |2 +-
 include/svx/svxdlg.hxx   |6 +++---
 svx/source/table/tablecontroller.cxx |2 +-
 sw/source/uibase/shells/tabsh.cxx|2 +-
 6 files changed, 8 insertions(+), 8 deletions(-)

New commits:
commit f4394514a1afacff690e95472730da0a4f4d92e0
Author: Samuel Mehrbrodt 
Date:   Thu Mar 22 16:54:34 2018 +0100

Typo: SplittTable -> SplitTable

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

diff --git a/cui/source/factory/dlgfact.cxx b/cui/source/factory/dlgfact.cxx
index b6b81359c9a0..5b4830a36af6 100644
--- a/cui/source/factory/dlgfact.cxx
+++ b/cui/source/factory/dlgfact.cxx
@@ -1500,7 +1500,7 @@ VclPtr 
AbstractDialogFactory_Impl::CreateSvxFormatCellsDia
 return VclPtr::Create( 
VclPtr::Create( nullptr, pAttr, pModel ) );
 }
 
-VclPtr 
AbstractDialogFactory_Impl::CreateSvxSplittTableDialog(weld::Window* pParent, 
bool bIsTableVertical, long nMaxVertical)
+VclPtr 
AbstractDialogFactory_Impl::CreateSvxSplitTableDialog(weld::Window* pParent, 
bool bIsTableVertical, long nMaxVertical)
 {
 return VclPtr::Create( pParent, bIsTableVertical, 
nMaxVertical, 99 );
 }
diff --git a/cui/source/factory/dlgfact.hxx b/cui/source/factory/dlgfact.hxx
index 346d80311d9e..3aa4d92b90ce 100644
--- a/cui/source/factory/dlgfact.hxx
+++ b/cui/source/factory/dlgfact.hxx
@@ -645,7 +645,7 @@ public:
 
 virtual VclPtr CreateSvxFormatCellsDialog( const 
SfxItemSet* pAttr, SdrModel* pModel, const SdrObject* pObj ) override;
 
-virtual VclPtr 
CreateSvxSplittTableDialog(weld::Window* pParent, bool bIsTableVertical, long 
nMaxVertical) override;
+virtual VclPtr 
CreateSvxSplitTableDialog(weld::Window* pParent, bool bIsTableVertical, long 
nMaxVertical) override;
 
 virtual VclPtr CreateSvxNewTableDialog() 
override ;
 
diff --git a/cui/source/inc/splitcelldlg.hxx b/cui/source/inc/splitcelldlg.hxx
index 02e7db683565..9b4c1f34c668 100644
--- a/cui/source/inc/splitcelldlg.hxx
+++ b/cui/source/inc/splitcelldlg.hxx
@@ -22,7 +22,7 @@
 #include 
 #include 
 
-class SvxSplitTableDlg : public SvxAbstractSplittTableDialog, public 
weld::GenericDialogController
+class SvxSplitTableDlg : public SvxAbstractSplitTableDialog, public 
weld::GenericDialogController
 {
 private:
 std::unique_ptr m_xCountEdit;
diff --git a/include/svx/svxdlg.hxx b/include/svx/svxdlg.hxx
index 94022f3e0df3..dff3fc05a20d 100644
--- a/include/svx/svxdlg.hxx
+++ b/include/svx/svxdlg.hxx
@@ -297,10 +297,10 @@ public:
 virtual vcl::Window *GetWindow() = 0;
 };
 
-class SvxAbstractSplittTableDialog : public VclAbstractDialog
+class SvxAbstractSplitTableDialog : public VclAbstractDialog
 {
 protected:
-virtual ~SvxAbstractSplittTableDialog() override = default;
+virtual ~SvxAbstractSplitTableDialog() override = default;
 public:
 virtual bool IsHorizontal() const = 0;
 virtual bool IsProportional() const = 0;
@@ -469,7 +469,7 @@ public:
 
 virtual VclPtr CreateSvxFormatCellsDialog( const 
SfxItemSet* pAttr, SdrModel* pModel, const SdrObject* pObj )=0;
 
-virtual VclPtr 
CreateSvxSplittTableDialog(weld::Window* pParent, bool bIsTableVertical, long 
nMaxVertical) = 0;
+virtual VclPtr 
CreateSvxSplitTableDialog(weld::Window* pParent, bool bIsTableVertical, long 
nMaxVertical) = 0;
 
 virtual VclPtr CreateSvxNewTableDialog() = 0;
 
diff --git a/svx/source/table/tablecontroller.cxx 
b/svx/source/table/tablecontroller.cxx
index 6fb9252cb273..cc0b6de54254 100644
--- a/svx/source/table/tablecontroller.cxx
+++ b/svx/source/table/tablecontroller.cxx
@@ -1234,7 +1234,7 @@ void SvxTableController::SplitMarkedCells()
 getSelectedCells( aStart, aEnd );
 
 SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
-ScopedVclPtr< SvxAbstractSplittTableDialog > xDlg( pFact ? 
pFact->CreateSvxSplittTableDialog( nullptr, false, 99 ) : nullptr );
+ScopedVclPtr< SvxAbstractSplitTableDialog > xDlg( pFact ? 
pFact->CreateSvxSplitTableDialog( nullptr, false, 99 ) : nullptr );
 if( xDlg.get() && xDlg->Execute() )
 {
 const sal_Int32 nCount = xDlg->GetCount() - 1;
diff --git a/sw/source/uibase/shells/tabsh.cxx 
b/sw/source/uibase/shells/tabsh.cxx
index 0c3180a44a4d..94b56435e1b9 100644
--- a/sw/source/uibase/shells/tabsh.cxx
+++ b/sw/source/uibase/shells/tabsh.cxx
@@ -987,7 +987,7 @@ void SwTableShell::Execute(SfxRequest )
 if( pFact )
 {
 const long nMaxVert = rSh.GetAnyCurRect( 
CurRectType::Frame ).Width() / MINLAY;
-ScopedVclPtr 
pDlg(pFact->CreateSvxSplittTableDialog(GetView().GetFrameWeld(), 
rSh.IsTableVertical(), nMaxVert));
+ 

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

2018-03-02 Thread Noel Grandin
 cui/source/dialogs/colorpicker.cxx|   21 -
 cui/source/tabpages/tpcolor.cxx   |2 +-
 include/svx/hexcolorcontrol.hxx   |7 ---
 include/svx/xdef.hxx  |4 ++--
 svx/source/dialog/hexcolorcontrol.cxx |8 
 5 files changed, 19 insertions(+), 23 deletions(-)

New commits:
commit 06ed7cd89b8cbbdfd64b474a5c0555a1047a96db
Author: Noel Grandin 
Date:   Thu Mar 1 15:38:06 2018 +0200

use more Color in HexColorControl

Change-Id: I889fa9f2a8711e95f24336718e35d11d0945dec1
Reviewed-on: https://gerrit.libreoffice.org/50573
Tested-by: Jenkins 
Reviewed-by: Noel Grandin 

diff --git a/cui/source/dialogs/colorpicker.cxx 
b/cui/source/dialogs/colorpicker.cxx
index 21d46383d5ac..fae025ce55d0 100644
--- a/cui/source/dialogs/colorpicker.cxx
+++ b/cui/source/dialogs/colorpicker.cxx
@@ -1227,22 +1227,17 @@ IMPL_LINK(ColorPickerDialog, ColorModifyEditHdl, Edit&, 
rEdit, void)
 }
 else if ( == mpEDHex)
 {
-sal_Int32 nColor = mpEDHex->GetColor();
+Color aColor = mpEDHex->GetColor();
 
-if (nColor != -1)
+if (aColor != Color(0x) && aColor != GetColor())
 {
-Color aColor(nColor);
+mdRed = static_cast(aColor.GetRed()) / 255.0;
+mdGreen = static_cast(aColor.GetGreen()) / 255.0;
+mdBlue = static_cast(aColor.GetBlue()) / 255.0;
 
-if (aColor != GetColor())
-{
-mdRed = static_cast(aColor.GetRed()) / 255.0;
-mdGreen = static_cast(aColor.GetGreen()) / 255.0;
-mdBlue = static_cast(aColor.GetBlue()) / 255.0;
-
-RGBtoHSV( mdRed, mdGreen, mdBlue, mdHue, mdSat, mdBri );
-RGBtoCMYK( mdRed, mdGreen, mdBlue, mdCyan, mdMagenta, 
mdYellow, mdKey );
-n = UpdateFlags::All & ~UpdateFlags::Hex;
-}
+RGBtoHSV( mdRed, mdGreen, mdBlue, mdHue, mdSat, mdBri );
+RGBtoCMYK( mdRed, mdGreen, mdBlue, mdCyan, mdMagenta, mdYellow, 
mdKey );
+n = UpdateFlags::All & ~UpdateFlags::Hex;
 }
 }
 
diff --git a/cui/source/tabpages/tpcolor.cxx b/cui/source/tabpages/tpcolor.cxx
index d33173d9b83b..cffd860f785e 100644
--- a/cui/source/tabpages/tpcolor.cxx
+++ b/cui/source/tabpages/tpcolor.cxx
@@ -321,7 +321,7 @@ IMPL_LINK(SvxColorTabPage, ModifiedHdl_Impl, Edit&, rEdit, 
void)
 {
 // read current MtrFields, if cmyk, then k-value as transparency
 if( == m_pHexcustom)
-aCurrentColor = Color(m_pHexcustom->GetColor());
+aCurrentColor = m_pHexcustom->GetColor();
 else
 {
 aCurrentColor = Color( static_cast(PercentToColor_Impl( 
static_cast(m_pRcustom->GetValue()) )),
diff --git a/include/svx/hexcolorcontrol.hxx b/include/svx/hexcolorcontrol.hxx
index a9f9661e5e40..22d7cf2df540 100644
--- a/include/svx/hexcolorcontrol.hxx
+++ b/include/svx/hexcolorcontrol.hxx
@@ -29,6 +29,7 @@
 #include 
 #include 
 #include 
+#include 
 
 class SVX_DLLPUBLIC HexColorControl : public Edit
 {
@@ -38,8 +39,8 @@ public:
 virtual bool PreNotify( NotifyEvent& rNEvt ) override;
 virtual void Paste() override;
 
-void SetColor( sal_Int32 nColor );
-sal_Int32 GetColor();
+void SetColor( ::Color nColor );
+::Color GetColor();
 
 private:
 static bool ImplProcessKeyInput( const KeyEvent& rKEv );
@@ -47,4 +48,4 @@ private:
 
 #endif  // INCLUDED_SVX_HEXCOLOR_HXX
 
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
\ No newline at end of file
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/xdef.hxx b/include/svx/xdef.hxx
index af2aba56d2ac..75ea49bc8c3a 100644
--- a/include/svx/xdef.hxx
+++ b/include/svx/xdef.hxx
@@ -78,8 +78,8 @@ class XLineTransparenceItem;
 class XLineWidthItem;
 class XSecondaryFillColorItem;
 
-#define COL_DEFAULT_SHAPE_FILLING 0x729fcf
-#define COL_DEFAULT_SHAPE_STROKE  0x3465a4
+#define COL_DEFAULT_SHAPE_FILLING ::Color(0x729fcf)
+#define COL_DEFAULT_SHAPE_STROKE  ::Color(0x3465a4)
 
 #define XATTR_START 1000
 
diff --git a/svx/source/dialog/hexcolorcontrol.cxx 
b/svx/source/dialog/hexcolorcontrol.cxx
index 884340980708..69032b1551fe 100644
--- a/svx/source/dialog/hexcolorcontrol.cxx
+++ b/svx/source/dialog/hexcolorcontrol.cxx
@@ -27,14 +27,14 @@ HexColorControl::HexColorControl( vcl::Window* pParent, 
WinBits nStyle )
 
 VCL_BUILDER_FACTORY_ARGS(HexColorControl, WB_BORDER)
 
-void HexColorControl::SetColor(sal_Int32 nColor)
+void HexColorControl::SetColor(Color nColor)
 {
 OUStringBuffer aBuffer;
-sax::Converter::convertColor(aBuffer, nColor);
+sax::Converter::convertColor(aBuffer, sal_Int32(nColor));
 SetText(aBuffer.makeStringAndClear().copy(1));
 }
 
-sal_Int32 HexColorControl::GetColor()
+Color HexColorControl::GetColor()
 {
 sal_Int32 nColor = -1;
 
@@ -55,7 

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

2018-02-19 Thread Noel Grandin
 cui/source/tabpages/tppattern.cxx |6 +-
 include/svx/dlgctrl.hxx   |   17 +++---
 include/svx/xbtmpit.hxx   |3 -
 svx/source/accessibility/svxpixelctlaccessiblecontext.cxx |8 +-
 svx/source/dialog/dlgctrl.cxx |   39 +-
 svx/source/xoutdev/xattrbmp.cxx   |2 
 svx/source/xoutdev/xtabptrn.cxx   |4 -
 7 files changed, 35 insertions(+), 44 deletions(-)

New commits:
commit 6fbb6d80fe6203ff6f84ee85ca625b6e60bf5bae
Author: Noel Grandin 
Date:   Fri Feb 16 16:13:38 2018 +0200

use std::array in createHistorical8x8FromArray

to make the assumption about the size of the array obvious in the code.

Change-Id: I7ebe0b037e3be38f7e33c0160742f829288bb474
Reviewed-on: https://gerrit.libreoffice.org/49938
Tested-by: Jenkins 
Reviewed-by: Noel Grandin 

diff --git a/cui/source/tabpages/tppattern.cxx 
b/cui/source/tabpages/tppattern.cxx
index 443f5d95f7f0..8933c5fbe18c 100644
--- a/cui/source/tabpages/tppattern.cxx
+++ b/cui/source/tabpages/tppattern.cxx
@@ -60,7 +60,7 @@ class SvxBitmapCtl
 {
 private:
 Color   aPixelColor, aBackgroundColor;
-const sal_uInt16*   pBmpArray;
+std::array const * pBmpArray;
 
 public:
 // Constructor: BitmapCtl for SvxPixelCtl
@@ -74,10 +74,10 @@ public:
 {
 if (!pBmpArray)
 return BitmapEx();
-return createHistorical8x8FromArray(pBmpArray, aPixelColor, 
aBackgroundColor);
+return createHistorical8x8FromArray(*pBmpArray, aPixelColor, 
aBackgroundColor);
 }
 
-void SetBmpArray( const sal_uInt16* pPixel ) { pBmpArray = pPixel; }
+void SetBmpArray( std::array const & pPixel ) { pBmpArray = 
 }
 void SetPixelColor( Color aColor ) { aPixelColor = aColor; }
 void SetBackgroundColor( Color aColor ) { aBackgroundColor = aColor; }
 };
diff --git a/include/svx/dlgctrl.hxx b/include/svx/dlgctrl.hxx
index 26cfb511700c..0cf9220cb34f 100644
--- a/include/svx/dlgctrl.hxx
+++ b/include/svx/dlgctrl.hxx
@@ -27,6 +27,7 @@
 #include 
 #include 
 #include 
+#include 
 
 class XOBitmap;
 class XOutdevItemPool;
@@ -147,11 +148,12 @@ public:
 class SAL_WARN_UNUSED SVX_DLLPUBLIC SvxPixelCtl final : public Control
 {
 private:
-sal_uInt16  nLines, nSquares;
+static sal_uInt16 constexpr nLines = 8;
+static sal_uInt16 constexpr nSquares = nLines * nLines;
 Color   aPixelColor;
 Color   aBackgroundColor;
 SizeaRectSize;
-sal_uInt16* pPixel;
+std::array maPixelData;
 boolbPaintable;
 //Add member identifying position
 Point   aFocusPosition;
@@ -163,10 +165,9 @@ private:
 voidChangePixel( sal_uInt16 nPixel );
 
 public:
-SvxPixelCtl( vcl::Window* pParent, sal_uInt16 nNumber = 8 );
+SvxPixelCtl( vcl::Window* pParent );
 
 virtual ~SvxPixelCtl() override;
-virtual void dispose() override;
 
 virtual void Paint( vcl::RenderContext& rRenderContext, const 
tools::Rectangle& rRect ) override;
 virtual void MouseButtonDown( const MouseEvent& rMEvt ) override;
@@ -178,15 +179,15 @@ public:
 voidSetPixelColor( const Color& rCol ) { aPixelColor = rCol; }
 voidSetBackgroundColor( const Color& rCol ) { aBackgroundColor = rCol; 
}
 
-sal_uInt16  GetLineCount() const { return nLines; }
+static sal_uInt16 GetLineCount() { return nLines; }
 
-sal_uInt16  GetBitmapPixel( const sal_uInt16 nPixelNumber );
-sal_uInt16* GetBitmapPixelPtr() { return pPixel; }
+sal_uInt8  GetBitmapPixel( const sal_uInt16 nPixelNumber ) const;
+std::array const & GetBitmapPixelPtr() const { return 
maPixelData; }
 
 voidSetPaintable( bool bTmp ) { bPaintable = bTmp; }
 voidReset();
 virtual css::uno::Reference< css::accessibility::XAccessible > 
CreateAccessible() override;
-long GetSquares() const { return nSquares ; }
+static long GetSquares() { return nSquares ; }
 long GetWidth() const { return aRectSize.getWidth() ; }
 long GetHeight() const { return aRectSize.getHeight() ; }
 
diff --git a/include/svx/xbtmpit.hxx b/include/svx/xbtmpit.hxx
index b9ced7c42fb0..7c2e2fa2582c 100644
--- a/include/svx/xbtmpit.hxx
+++ b/include/svx/xbtmpit.hxx
@@ -23,6 +23,7 @@
 #include 
 #include 
 #include 
+#include 
 
 class SdrModel;
 class BitmapColor;
@@ -30,7 +31,7 @@ class BitmapColor;
 
 // helper to construct historical 8x8 bitmaps with two colors
 
-BitmapEx SVX_DLLPUBLIC createHistorical8x8FromArray(sal_uInt16 const * pArray, 
Color aColorPix, Color aColorBack);
+BitmapEx SVX_DLLPUBLIC createHistorical8x8FromArray(std::array 
const & pArray, Color aColorPix, Color aColorBack);
 bool SVX_DLLPUBLIC isHistorical8x8(const 

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

2017-11-09 Thread Caolán McNamara
 cui/source/factory/dlgfact.cxx   |4 ++--
 cui/source/factory/dlgfact.hxx   |2 +-
 include/svx/svxdlg.hxx   |2 +-
 svx/source/gallery2/galbrws1.cxx |2 +-
 4 files changed, 5 insertions(+), 5 deletions(-)

New commits:
commit 6dc1087b37a9ce5bc9b728d6a23fef69a66bb3d2
Author: Caolán McNamara 
Date:   Thu Nov 9 14:24:47 2017 +

tdf#113647 set parent for modal gallery dialog

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

diff --git a/cui/source/factory/dlgfact.cxx b/cui/source/factory/dlgfact.cxx
index 33c39a69f7bb..ca9fb47b02b6 100644
--- a/cui/source/factory/dlgfact.cxx
+++ b/cui/source/factory/dlgfact.cxx
@@ -1005,11 +1005,11 @@ VclPtr 
AbstractDialogFactory_Impl::CreateGalleryIdDialo
return VclPtr::Create( pDlg );
 }
 
-VclPtr 
AbstractDialogFactory_Impl::CreateGalleryThemePropertiesDialog(
+VclPtr 
AbstractDialogFactory_Impl::CreateGalleryThemePropertiesDialog(vcl::Window* 
pParent,
 ExchangeData* pData,
 SfxItemSet* pItemSet)
 {
-VclPtrInstance pDlg( nullptr, pData, pItemSet);
+VclPtrInstance pDlg(pParent, pData, pItemSet);
 return VclPtr::Create( pDlg );
 }
 
diff --git a/cui/source/factory/dlgfact.hxx b/cui/source/factory/dlgfact.hxx
index 589478a1135e..e9d61e3bcf93 100644
--- a/cui/source/factory/dlgfact.hxx
+++ b/cui/source/factory/dlgfact.hxx
@@ -531,7 +531,7 @@ public:
  const OUString& rOldText) 
override;
 virtual VclPtr CreateGalleryIdDialog( 
vcl::Window* pParent,
 GalleryTheme* pThm) override;
-virtual VclPtr CreateGalleryThemePropertiesDialog(
+virtual VclPtr 
CreateGalleryThemePropertiesDialog(vcl::Window* pParent,
 ExchangeData* pData,
 SfxItemSet* pItemSet) override;
 virtual VclPtr CreateURLDialog( vcl::Window* pParent,
diff --git a/include/svx/svxdlg.hxx b/include/svx/svxdlg.hxx
index 547cd76276cb..63b1190df9a5 100644
--- a/include/svx/svxdlg.hxx
+++ b/include/svx/svxdlg.hxx
@@ -357,7 +357,7 @@ public:
  const OUString& rOldText ) = 0;
 virtual VclPtr CreateGalleryIdDialog( 
vcl::Window* pParent,
 GalleryTheme* pThm ) = 0;
-virtual VclPtr CreateGalleryThemePropertiesDialog(
+virtual VclPtr 
CreateGalleryThemePropertiesDialog(vcl::Window* pParent,
 ExchangeData* pData,
 SfxItemSet* pItemSet ) = 0;
 virtual VclPtr CreateURLDialog( vcl::Window* pParent,
diff --git a/svx/source/gallery2/galbrws1.cxx b/svx/source/gallery2/galbrws1.cxx
index 447c26dd7c72..1cb871967e51 100644
--- a/svx/source/gallery2/galbrws1.cxx
+++ b/svx/source/gallery2/galbrws1.cxx
@@ -265,7 +265,7 @@ void GalleryBrowser1::ImplGalleryThemeProperties( const 
OUString & rThemeName, b
 
 SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
 assert(pFact && "Got no AbstractDialogFactory!");
-mpThemePropertiesDialog = pFact->CreateGalleryThemePropertiesDialog( 
mpExchangeData, mpThemePropsDlgItemSet );
+mpThemePropertiesDialog = pFact->CreateGalleryThemePropertiesDialog(this, 
mpExchangeData, mpThemePropsDlgItemSet);
 assert(mpThemePropertiesDialog && "Got no GalleryThemePropertiesDialog!");
 
 if ( bCreateNew )
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-08-15 Thread Akshay Deep
 cui/source/dialogs/cuicharmap.cxx |3 +--
 include/svx/ucsubset.hxx  |1 -
 svx/source/dialog/charmap.cxx |1 -
 3 files changed, 1 insertion(+), 4 deletions(-)

New commits:
commit 01bca61907433705950cdd78734851ac41def493
Author: Akshay Deep 
Date:   Tue Aug 15 16:28:41 2017 +0530

Disable subset LB when search mode is enabled

Change-Id: Ic8fa88f1e471fe3eab965e5f0106de0348e62ec0
Reviewed-on: https://gerrit.libreoffice.org/41161
Tested-by: Jenkins 
Reviewed-by: Akshay Deep 

diff --git a/cui/source/dialogs/cuicharmap.cxx 
b/cui/source/dialogs/cuicharmap.cxx
index 0831604b408b..fa7a192ccef1 100644
--- a/cui/source/dialogs/cuicharmap.cxx
+++ b/cui/source/dialogs/cuicharmap.cxx
@@ -694,8 +694,7 @@ void SvxCharacterMap::toggleSearchView(bool state)
 isSearchMode = state;
 m_pHexCodeText->SetReadOnly(state);
 m_pDecimalCodeText->SetReadOnly(state);
-m_pSubsetLB->SetReadOnly(state);
-m_pSubsetLB->Invalidate();
+m_pSubsetLB->Disable(state);
 
 if(state)
 {
diff --git a/include/svx/ucsubset.hxx b/include/svx/ucsubset.hxx
index f5dc7847ab98..570913f3bd18 100644
--- a/include/svx/ucsubset.hxx
+++ b/include/svx/ucsubset.hxx
@@ -22,7 +22,6 @@
 
 #include 
 
-#include 
 #include 
 
 #include 
diff --git a/svx/source/dialog/charmap.cxx b/svx/source/dialog/charmap.cxx
index 110b488c4483..9a1b22ad34e9 100644
--- a/svx/source/dialog/charmap.cxx
+++ b/svx/source/dialog/charmap.cxx
@@ -25,7 +25,6 @@
 
 #include 
 #include 
-#include 
 
 
 #include 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-03-31 Thread Noel Grandin
 cui/source/inc/swpossizetabpage.hxx   |5 +-
 cui/source/tabpages/swpossizetabpage.cxx  |   19 --
 cui/source/tabpages/tpline.cxx|2 -
 include/svx/fillctrl.hxx  |2 -
 include/svx/swframeexample.hxx|   12 --
 include/svx/swframevalidation.hxx |6 ++-
 svx/source/accessibility/DescriptionGenerator.cxx |4 +-
 svx/source/dialog/rubydialog.cxx  |7 ++-
 svx/source/dialog/swframeexample.cxx  |2 -
 svx/source/form/formcontroller.cxx|2 -
 svx/source/sidebar/area/AreaPropertyPanelBase.cxx |2 -
 svx/source/styles/CommonStylePreviewRenderer.cxx  |2 -
 svx/source/table/svdotable.cxx|2 -
 svx/source/tbxctrls/fillctrl.cxx  |8 ++--
 svx/source/tbxctrls/itemwin.cxx   |2 -
 svx/source/tbxctrls/tbcontrl.cxx  |3 +
 svx/source/toolbars/extrusionbar.cxx  |2 -
 svx/source/unodraw/unoshap2.cxx   |   40 ++
 svx/source/xoutdev/xattr.cxx  |   14 ---
 svx/source/xoutdev/xattr2.cxx |   12 +++---
 sw/source/ui/frmdlg/frmpage.cxx   |   10 ++---
 sw/source/ui/frmdlg/wrap.cxx  |4 +-
 22 files changed, 77 insertions(+), 85 deletions(-)

New commits:
commit dcffc21805828ddff7de1282f3d40ffdf3fac38d
Author: Noel Grandin 
Date:   Thu Mar 30 15:47:26 2017 +0200

use actual UNO enums in svx

Change-Id: I00f53260667861ca2595892b5605479da3401adb
Reviewed-on: https://gerrit.libreoffice.org/35913
Tested-by: Jenkins 
Reviewed-by: Noel Grandin 

diff --git a/cui/source/inc/swpossizetabpage.hxx 
b/cui/source/inc/swpossizetabpage.hxx
index 4442250f19cf..c11050f778d5 100644
--- a/cui/source/inc/swpossizetabpage.hxx
+++ b/cui/source/inc/swpossizetabpage.hxx
@@ -26,6 +26,7 @@
 #include 
 #include 
 #include 
+#include 
 
 // SvxSwPosSizeTabPage - position and size page for Writer drawing objects
 struct FrmMap;
@@ -109,13 +110,13 @@ class SvxSwPosSizeTabPage : public SfxTabPage
 DECL_LINK( ModifyHdl, Edit&, void );
 DECL_LINK(ProtectHdl, Button*, void);
 
-voidInitPos(short nAnchorType, sal_uInt16 nH, sal_uInt16 nHRel,
+voidInitPos(css::text::TextContentAnchorType nAnchorType, 
sal_uInt16 nH, sal_uInt16 nHRel,
 sal_uInt16 nV,  sal_uInt16 nVRel,
 long   nX,  long   nY);
 sal_uInt16  GetMapPos(FrmMap *pMap, ListBox );
 static shortGetAlignment(FrmMap *pMap, sal_uInt16 nMapPos, ListBox 
, ListBox );
 static shortGetRelation(FrmMap *pMap, ListBox );
-short   GetAnchorType(bool* pbHasChanged = nullptr);
+css::text::TextContentAnchorType GetAnchorType(bool* pbHasChanged = 
nullptr);
 voidFillRelLB(FrmMap *pMap, sal_uInt16 nLBSelPos, 
sal_uInt16 nAlign, sal_uInt16 nRel, ListBox , FixedText );
 sal_uInt16  FillPosLB(FrmMap *pMap, sal_uInt16 nAlign, const 
sal_uInt16 _nRel, ListBox );
 
diff --git a/cui/source/tabpages/swpossizetabpage.cxx 
b/cui/source/tabpages/swpossizetabpage.cxx
index 2a4deffed663..4e669fd6dcf3 100644
--- a/cui/source/tabpages/swpossizetabpage.cxx
+++ b/cui/source/tabpages/swpossizetabpage.cxx
@@ -30,7 +30,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 
@@ -772,11 +771,11 @@ const sal_uInt16* SvxSwPosSizeTabPage::GetRanges()
 bool SvxSwPosSizeTabPage::FillItemSet( SfxItemSet* rSet)
 {
 bool bAnchorChanged = false;
-short nAnchor = GetAnchorType();
+css::text::TextContentAnchorType nAnchor = GetAnchorType();
 bool bModified = false;
 if(bAnchorChanged)
 {
-rSet->Put(SfxInt16Item(SID_ATTR_TRANSFORM_ANCHOR, nAnchor));
+rSet->Put(SfxInt16Item(SID_ATTR_TRANSFORM_ANCHOR, (sal_Int16)nAnchor));
 bModified = true;
 }
 if ( m_pPositionCB->IsValueChangedFromSaved() )
@@ -926,10 +925,10 @@ void SvxSwPosSizeTabPage::Reset( const SfxItemSet* rSet)
 {
 const SfxPoolItem* pItem = GetItem( *rSet, SID_ATTR_TRANSFORM_ANCHOR );
 bool bInvalidateAnchor = false;
-short nAnchorType = TextContentAnchorType_AT_PARAGRAPH;
+TextContentAnchorType nAnchorType = TextContentAnchorType_AT_PARAGRAPH;
 if(pItem)
 {
-nAnchorType = static_cast(pItem)->GetValue();
+nAnchorType = (TextContentAnchorType) static_cast(pItem)->GetValue();
 switch(nAnchorType)
 {
 case  TextContentAnchorType_AT_PAGE:m_pToPageRB->Check();  
break;
@@ -1102,9 +1101,9 @@ void SvxSwPosSizeTabPage::EnableAnchorTypes(SvxAnchorIds 
nAnchorEnable)
 m_pToPageRB->Enable(false);
 }
 
-short SvxSwPosSizeTabPage::GetAnchorType(bool* pbHasChanged)

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

2017-03-30 Thread Caolán McNamara
 cui/source/inc/chardlg.hxx   |3 +
 cui/source/tabpages/chardlg.cxx  |   33 +---
 include/svx/colorwindow.hxx  |1 
 svx/source/tbxctrls/tbcontrl.cxx |  107 ---
 4 files changed, 85 insertions(+), 59 deletions(-)

New commits:
commit 84f78392249c3749801acf238a99fda95311e01f
Author: Caolán McNamara 
Date:   Wed Mar 29 17:18:53 2017 +0100

Related: tdf#106080 support a 'none' color in search by format

so we can show the initial no-color selected state differently
than the automatic color default color

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

diff --git a/cui/source/inc/chardlg.hxx b/cui/source/inc/chardlg.hxx
index b24a431e2ce5..1b99b60cc5ff 100644
--- a/cui/source/inc/chardlg.hxx
+++ b/cui/source/inc/chardlg.hxx
@@ -175,6 +175,7 @@ private:
 static const sal_uInt16 pEffectsRanges[];
 bool   m_bOrigFontColor;
 bool   m_bNewFontColor;
+bool   m_bEnableNoneFontColor;
 Color  m_aOrigFontColor;
 VclPtr  m_pFontColorFT;
 VclPtrm_pFontColorLB;
@@ -219,6 +220,8 @@ private:
 voidSetCaseMap_Impl( SvxCaseMap eCaseMap );
 voidResetColor_Impl( const SfxItemSet& rSet );
 boolFillItemSetColor_Impl( SfxItemSet& rSet );
+Color   GetPreviewFontColor(const Color& rColor) const;
+voidEnableNoneFontColor();
 
 void SelectHdl_Impl(ListBox*);
 DECL_LINK(SelectListBoxHdl_Impl, ListBox&, void);
diff --git a/cui/source/tabpages/chardlg.cxx b/cui/source/tabpages/chardlg.cxx
index a126b3234d08..b8448130ed87 100644
--- a/cui/source/tabpages/chardlg.cxx
+++ b/cui/source/tabpages/chardlg.cxx
@@ -1336,6 +1336,7 @@ SvxCharEffectsPage::SvxCharEffectsPage( vcl::Window* 
pParent, const SfxItemSet&
 : SvxCharBasePage(pParent, "EffectsPage", "cui/ui/effectspage.ui", rInSet)
 , m_bOrigFontColor(false)
 , m_bNewFontColor(false)
+, m_bEnableNoneFontColor(false)
 {
 get(m_pFontColorFT, "fontcolorft");
 get(m_pFontColorLB, "fontcolorlb");
@@ -1368,6 +1369,21 @@ SvxCharEffectsPage::SvxCharEffectsPage( vcl::Window* 
pParent, const SfxItemSet&
 Initialize();
 }
 
+void SvxCharEffectsPage::EnableNoneFontColor()
+{
+m_pFontColorLB->SetSlotId(SID_ATTR_CHAR_COLOR, true);
+m_bEnableNoneFontColor = true;
+}
+
+Color SvxCharEffectsPage::GetPreviewFontColor(const Color& rColor) const
+{
+if (rColor.GetColor() == COL_AUTO)
+return Color(COL_BLACK);
+if (m_bEnableNoneFontColor && rColor.GetColor() == COL_NONE_COLOR)
+return Color(COL_BLACK);
+return rColor;
+}
+
 SvxCharEffectsPage::~SvxCharEffectsPage()
 {
 disposeOnce();
@@ -1468,9 +1484,9 @@ void SvxCharEffectsPage::UpdatePreview_Impl()
 SvxFont& rCTLFont = GetPreviewCTLFont();
 
 const Color& rSelectedColor = m_pFontColorLB->GetSelectEntryColor();
-rFont.SetColor(rSelectedColor.GetColor() == COL_AUTO ? Color(COL_BLACK) : 
rSelectedColor);
-rCJKFont.SetColor(rSelectedColor.GetColor() == COL_AUTO ? Color(COL_BLACK) 
: rSelectedColor);
-rCTLFont.SetColor(rSelectedColor.GetColor() == COL_AUTO ? Color(COL_BLACK) 
: rSelectedColor);
+rFont.SetColor(GetPreviewFontColor(rSelectedColor));
+rCJKFont.SetColor(GetPreviewFontColor(rSelectedColor));
+rCTLFont.SetColor(GetPreviewFontColor(rSelectedColor));
 
 sal_Int32 nPos = m_pUnderlineLB->GetSelectEntryPos();
 FontLineStyle eUnderline = 
(FontLineStyle)reinterpret_cast(m_pUnderlineLB->GetEntryData( nPos 
));
@@ -1572,6 +1588,9 @@ void SvxCharEffectsPage::ResetColor_Impl( const 
SfxItemSet& rSet )
 break;
 
 case SfxItemState::DONTCARE:
+//Related: tdf#106080 if there is no font color, then allow "none"
+//as a color so the listbox can display that state.
+EnableNoneFontColor();
 m_pFontColorLB->SetNoSelection();
 break;
 
@@ -1584,9 +1603,9 @@ void SvxCharEffectsPage::ResetColor_Impl( const 
SfxItemSet& rSet )
 
 const SvxColorItem& rItem = static_cast(rSet.Get( nWhich ));
 Color aColor = rItem.GetValue();
-rFont.SetColor( aColor.GetColor() == COL_AUTO ? Color(COL_BLACK) : 
aColor );
-rCJKFont.SetColor( aColor.GetColor() == COL_AUTO ? 
Color(COL_BLACK) : aColor );
-rCTLFont.SetColor( aColor.GetColor() == COL_AUTO ? 
Color(COL_BLACK) : aColor );
+rFont.SetColor(GetPreviewFontColor(aColor));
+rCJKFont.SetColor(GetPreviewFontColor(aColor));
+rCTLFont.SetColor(GetPreviewFontColor(aColor));
 
 m_pPreviewWin->Invalidate();
 
@@ -1613,6 +1632,8 

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

2017-02-20 Thread Katarina Behrens
 cui/source/inc/cuitabarea.hxx   |8 --
 cui/source/tabpages/tparea.cxx  |1 
 cui/source/tabpages/tpcolor.cxx |   46 +---
 include/svx/xtable.hxx  |1 
 svx/source/xoutdev/xtabcolr.cxx |   13 +++
 5 files changed, 39 insertions(+), 30 deletions(-)

New commits:
commit f35e6f2504384ad66b475d39849ed10987b2da53
Author: Katarina Behrens 
Date:   Thu Feb 16 22:29:10 2017 +0100

tdf#103224: Get the initial colour right

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

diff --git a/cui/source/inc/cuitabarea.hxx b/cui/source/inc/cuitabarea.hxx
index b8f7e16..b419748 100644
--- a/cui/source/inc/cuitabarea.hxx
+++ b/cui/source/inc/cuitabarea.hxx
@@ -731,7 +731,6 @@ private:
 XColorListRef pColorList;
 
 ChangeType* pnColorListState;
-sal_Int32*  pPos;
 
 XFillStyleItem  aXFStyleItem;
 XFillColorItem  aXFillColorItem;
@@ -751,6 +750,7 @@ private:
 
 void ImpColorCountChanged();
 void FillPaletteLB();
+long FindColorInPalette(const OUString& rPaletteName) const;
 
 DECL_LINK( ClickAddHdl_Impl, Button*, void );
 DECL_LINK( ClickWorkOnHdl_Impl, Button*, void );
@@ -763,11 +763,14 @@ private:
 void SetColorModel(ColorModel eModel);
 void ChangeColorModel();
 void UpdateColorValues( bool bUpdatePreset = true );
-static sal_Int32 SearchColorList(OUString const & aColorName);
 DECL_LINK( ModifiedHdl_Impl, Edit&, void );
 
 void UpdateModified();
 css::uno::Reference< css::uno::XComponentContext > m_context;
+
+static sal_Int32 FindInCustomColors( OUString const & aColorName );
+sal_Int32 FindInPalette( const Color& rColor );
+
 public:
 SvxColorTabPage( vcl::Window* pParent, const SfxItemSet& rInAttrs );
 virtual ~SvxColorTabPage() override;
@@ -783,7 +786,6 @@ public:
 virtual DeactivateRC DeactivatePage( SfxItemSet* pSet ) override;
 
 voidSetPropertyList( XPropertyListType t, const XPropertyListRef  
);
-voidSetPos( sal_Int32* pInPos ) { pPos = pInPos; }
 voidSetColorList( const XColorListRef& pColList );
 
 
diff --git a/cui/source/tabpages/tparea.cxx b/cui/source/tabpages/tparea.cxx
index 70e7be4..9870d84 100644
--- a/cui/source/tabpages/tparea.cxx
+++ b/cui/source/tabpages/tparea.cxx
@@ -404,7 +404,6 @@ void SvxAreaTabPage::CreatePage( sal_Int32 nId, SfxTabPage* 
pTab )
 if(nId == SOLID )
 {
 static_cast(pTab)->SetColorList( m_pColorList );
-static_cast(pTab)->SetPos( _nPos );
 static_cast(pTab)->SetColorChgd( m_pnColorListState 
);
 static_cast(pTab)->Construct();
 static_cast(pTab)->ActivatePage( m_rXFSet );
diff --git a/cui/source/tabpages/tpcolor.cxx b/cui/source/tabpages/tpcolor.cxx
index e4545b4..62a1515 100644
--- a/cui/source/tabpages/tpcolor.cxx
+++ b/cui/source/tabpages/tpcolor.cxx
@@ -59,7 +59,6 @@ SvxColorTabPage::SvxColorTabPage(vcl::Window* pParent, const 
SfxItemSet& rInAttr
 , rOutAttrs   ( rInAttrs )
 // All the horrific pointers we store and should not
 , pnColorListState( nullptr )
-, pPos( nullptr )
 , aXFStyleItem( drawing::FillStyle_SOLID )
 , aXFillColorItem( OUString(), Color( COL_BLACK ) )
 , aXFillAttr( rInAttrs.GetPool() )
@@ -239,38 +238,26 @@ void SvxColorTabPage::ActivatePage( const SfxItemSet& )
 {
 if( pColorList.is() )
 {
-if( *pPos != LISTBOX_ENTRY_NOTFOUND )
+const SfxPoolItem* pPoolItem = nullptr;
+if( SfxItemState::SET == rOutAttrs.GetItemState( GetWhich( 
XATTR_FILLCOLOR ), true,  ) )
 {
-m_pValSetColorList->SelectItem( m_pValSetColorList->GetItemId( 
static_cast(*pPos) ) );
-const XColorEntry* pEntry = pColorList->GetColor(*pPos);
-aPreviousColor = pEntry->GetColor();
-ChangeColor(pEntry->GetColor());
-}
-else if( *pPos == LISTBOX_ENTRY_NOTFOUND )
-{
-const SfxPoolItem* pPoolItem = nullptr;
-if( SfxItemState::SET == rOutAttrs.GetItemState( GetWhich( 
XATTR_FILLCOLOR ), true,  ) )
-{
-SetColorModel( ColorModel::RGB );
-ChangeColorModel();
+SetColorModel( ColorModel::RGB );
+ChangeColorModel();
 
-aPreviousColor = static_cast(pPoolItem)->GetColorValue();
-ChangeColor( aPreviousColor );
+const Color aColor = static_cast(pPoolItem)->GetColorValue();
+ChangeColor( aColor );
+sal_Int32 nPos = FindInPalette( aColor );
 
-m_pRcustom->SetValue( ColorToPercent_Impl( 
aCurrentColor.GetRed() ) );
-

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

2016-12-22 Thread Caolán McNamara
 cui/source/customize/selector.cxx  |6 -
 include/svx/fmresids.hrc   |   66 +--
 svx/source/fmcomp/fmgridcl.cxx |   60 +++---
 svx/source/form/filtnav.cxx|   33 +
 svx/source/form/fmexpl.cxx |   90 +--
 svx/source/form/fmexpl.src |  188 +
 svx/source/form/fmshimp.cxx|   52 -
 svx/source/form/navigatortree.cxx  |   19 +--
 svx/source/form/navigatortreemodel.cxx |   21 +--
 svx/source/inc/fmexpl.hxx  |   22 ---
 10 files changed, 303 insertions(+), 254 deletions(-)

New commits:
commit cf6f3ad82b0934e65ce0982b9d3b85a1e18d645f
Author: Caolán McNamara 
Date:   Thu Dec 22 16:47:36 2016 +

unwind RID_SVXIMGLIST_FMEXPL ImageList

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

diff --git a/cui/source/customize/selector.cxx 
b/cui/source/customize/selector.cxx
index f578c71..c8a843f 100644
--- a/cui/source/customize/selector.cxx
+++ b/cui/source/customize/selector.cxx
@@ -208,11 +208,9 @@ SvxConfigGroupListBox::SvxConfigGroupListBox(vcl::Window* 
pParent, WinBits nStyl
 , m_sMyMacros(CUI_RESSTR(RID_SVXSTR_MYMACROS))
 , m_sProdMacros(CUI_RESSTR(RID_SVXSTR_PRODMACROS))
 {
-ImageList aNavigatorImages( SVX_RES( RID_SVXIMGLIST_FMEXPL ) );
-
 SetNodeBitmaps(
-aNavigatorImages.GetImage( RID_SVXIMG_COLLAPSEDNODE ),
-aNavigatorImages.GetImage( RID_SVXIMG_EXPANDEDNODE )
+Image(BitmapEx(SVX_RES(RID_SVXBMP_COLLAPSEDNODE))),
+Image(BitmapEx(SVX_RES(RID_SVXBMP_EXPANDEDNODE)))
 );
 }
 
diff --git a/include/svx/fmresids.hrc b/include/svx/fmresids.hrc
index 0e181ac..cee1a7b 100644
--- a/include/svx/fmresids.hrc
+++ b/include/svx/fmresids.hrc
@@ -21,43 +21,37 @@
 
 #include 
 
-// unnamed resources ---
-// sub resources .
-
-// ImageList-Id's ---
-#define RID_SVXIMGLIST_FMEXPL   (RID_FORMS_START + 0)
-
 // Image-Id's ---
-#define RID_SVXIMG_FORM SID_FM_CONFIG
-#define RID_SVXIMG_CONTROL  SID_CHOOSE_CONTROLS
-#define RID_SVXIMG_COLLAPSEDNODE(RID_FORMS_START + 2)
-#define RID_SVXIMG_EXPANDEDNODE (RID_FORMS_START + 3)
-#define RID_SVXIMG_BUTTON   SID_FM_PUSHBUTTON
-#define RID_SVXIMG_RADIOBUTTON  SID_FM_RADIOBUTTON
-#define RID_SVXIMG_CHECKBOX SID_FM_CHECKBOX
-#define RID_SVXIMG_FIXEDTEXTSID_FM_FIXEDTEXT
-#define RID_SVXIMG_GROUPBOX SID_FM_GROUPBOX
-#define RID_SVXIMG_EDIT SID_FM_EDIT
-#define RID_SVXIMG_LISTBOX  SID_FM_LISTBOX
-#define RID_SVXIMG_COMBOBOX SID_FM_COMBOBOX
-#define RID_SVXIMG_FORMS(RID_FORMS_START +13)
-#define RID_SVXIMG_IMAGEBUTTON  SID_FM_IMAGEBUTTON
-#define RID_SVXIMG_IMAGECONTROL SID_FM_IMAGECONTROL
-#define RID_SVXIMG_FILECONTROL  SID_FM_FILECONTROL
-#define RID_SVXIMG_DATEFIELDSID_FM_DATEFIELD
-#define RID_SVXIMG_TIMEFIELDSID_FM_TIMEFIELD
-#define RID_SVXIMG_NUMERICFIELD SID_FM_NUMERICFIELD
-#define RID_SVXIMG_CURRENCYFIELDSID_FM_CURRENCYFIELD
-#define RID_SVXIMG_PATTERNFIELD SID_FM_PATTERNFIELD
-#define RID_SVXIMG_HIDDEN   (RID_FORMS_START +22)
-#define RID_SVXIMG_GRID SID_FM_DBGRID
-#define RID_SVXIMG_FORMATTEDFIELD   SID_FM_FORMATTEDFIELD
-#define RID_SVXIMG_FILTER   SID_FM_FILTERCRIT
-#define RID_SVXIMG_DATE_N_TIME_FIELDS   
SID_FM_TWOFIELDS_DATE_N_TIME
-#define RID_SVXIMG_FIELD(RID_FORMS_START +27)
-#define RID_SVXIMG_SCROLLBARSID_FM_SCROLLBAR
-#define RID_SVXIMG_SPINBUTTON   SID_FM_SPINBUTTON
-#define RID_SVXIMG_NAVIGATIONBARSID_FM_NAVIGATIONBAR
+#define RID_SVXBMP_FORM (RID_FORMS_START +  1)
+#define RID_SVXBMP_CONTROL  (RID_FORMS_START +  2)
+#define RID_SVXBMP_COLLAPSEDNODE(RID_FORMS_START +  3)
+#define RID_SVXBMP_EXPANDEDNODE (RID_FORMS_START +  4)
+#define RID_SVXBMP_BUTTON   (RID_FORMS_START +  5)
+#define RID_SVXBMP_RADIOBUTTON  (RID_FORMS_START 

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

2016-06-29 Thread Laurent Balland-Poirier
 cui/source/tabpages/numfmt.cxx |   31 ---
 include/svx/flagsdef.hxx   |   31 +--
 include/svx/numfmtsh.hxx   |5 ++--
 svx/source/items/numfmtsh.cxx  |   46 +++--
 4 files changed, 85 insertions(+), 28 deletions(-)

New commits:
commit 9724eaa94e1f1e58dbbba2ecad4287245e0f0bf0
Author: Laurent Balland-Poirier 
Date:   Wed Jun 15 22:55:59 2016 +0200

tdf#100413 Use same default values for preview string and format list

Add specific default values for:
- scientific: to distinguish engineering notation
- fraction: to have quarter format understandable

Change-Id: I73b74713a4bc502e9967b8d2c9983cfc6244912e
Reviewed-on: https://gerrit.libreoffice.org/26391
Tested-by: Jenkins 
Reviewed-by: Eike Rathke 
Tested-by: Eike Rathke 

diff --git a/cui/source/tabpages/numfmt.cxx b/cui/source/tabpages/numfmt.cxx
index 21d8afe..415c4a4 100644
--- a/cui/source/tabpages/numfmt.cxx
+++ b/cui/source/tabpages/numfmt.cxx
@@ -1683,31 +1683,36 @@ IMPL_LINK_TYPED( SvxNumberFormatTabPage, 
LostFocusHdl_Impl, Control&, rControl,
 OUString SvxNumberFormatTabPage::GetExpColorString(
 Color*& rpPreviewColor, const OUString& rFormatStr, short nTmpCatPos)
 {
-double nVal = 0;
+SvxNumValCategory i;
 switch (nTmpCatPos)
 {
-case CAT_CURRENCY:  nVal=SVX_NUMVAL_CURRENCY; break;
+case CAT_ALL:   i=SVX_NUMVAL_STANDARD; break;
 
-case CAT_SCIENTIFIC:
-case CAT_FRACTION:
-case CAT_NUMBER:nVal=SVX_NUMVAL_STANDARD; break;
+case CAT_NUMBER:i=SVX_NUMVAL_STANDARD; break;
 
-case CAT_PERCENT:   nVal=SVX_NUMVAL_PERCENT; break;
+case CAT_PERCENT:   i=SVX_NUMVAL_PERCENT; break;
 
-case CAT_ALL:   nVal=SVX_NUMVAL_STANDARD; break;
+case CAT_CURRENCY:  i=SVX_NUMVAL_CURRENCY; break;
 
-case CAT_TIME:  nVal=SVX_NUMVAL_TIME; break;
-case CAT_DATE:  nVal=SVX_NUMVAL_DATE; break;
+case CAT_DATE:  i=SVX_NUMVAL_DATE; break;
 
-case CAT_BOOLEAN:   nVal=SVX_NUMVAL_BOOLEAN; break;
+case CAT_TIME:  i=SVX_NUMVAL_TIME; break;
+
+case CAT_SCIENTIFIC:i=SVX_NUMVAL_SCIENTIFIC; break;
+
+case CAT_FRACTION:  i=SVX_NUMVAL_FRACTION; break;
+
+case CAT_BOOLEAN:   i=SVX_NUMVAL_BOOLEAN; break;
+
+case CAT_USERDEFINED:   i=SVX_NUMVAL_STANDARD; break;
 
-case CAT_USERDEFINED:
 case CAT_TEXT:
-default:nVal=0;break;
+default:i=SVX_NUMVAL_NOVALUE;break;
 }
+double fVal = fSvxNumValConst[i];
 
 OUString aPreviewString;
-pNumFmtShell->MakePrevStringFromVal( rFormatStr, aPreviewString, 
rpPreviewColor, nVal );
+pNumFmtShell->MakePrevStringFromVal( rFormatStr, aPreviewString, 
rpPreviewColor, fVal );
 return aPreviewString;
 }
 
diff --git a/include/svx/flagsdef.hxx b/include/svx/flagsdef.hxx
index eedea33..fbf833d 100644
--- a/include/svx/flagsdef.hxx
+++ b/include/svx/flagsdef.hxx
@@ -70,13 +70,30 @@ namespace o3tl
 #define SVX_ENABLE_FLASH0x04
 
 
-// copy from numfmt.hxx
-#define SVX_NUMVAL_STANDARD -1234.12345678901234
-#define SVX_NUMVAL_CURRENCY -1234
-#define SVX_NUMVAL_PERCENT  -0.1295
-#define SVX_NUMVAL_TIME 36525.5678935185
-#define SVX_NUMVAL_DATE 36525.5678935185
-#define SVX_NUMVAL_BOOLEAN  1
+// Default values for Number Format Category List and Preview
+enum SvxNumValCategory
+{
+SVX_NUMVAL_STANDARD = 0,
+SVX_NUMVAL_PERCENT,
+SVX_NUMVAL_CURRENCY,
+SVX_NUMVAL_DATE,
+SVX_NUMVAL_TIME,
+SVX_NUMVAL_SCIENTIFIC,
+SVX_NUMVAL_FRACTION,
+SVX_NUMVAL_BOOLEAN,
+SVX_NUMVAL_NOVALUE
+};
+const double fSvxNumValConst[] = {
+-1234.56789012345678,   // SVX_NUMVAL_STANDARD
+-0.1295,// SVX_NUMVAL_PERCENT
+-1234.0,// SVX_NUMVAL_CURRENCY
+36525.5678935185,   // SVX_NUMVAL_DATE
+36525.5678935185,   // SVX_NUMVAL_TIME
+12345.67889,// SVX_NUMVAL_SCIENTIFIC
+123.456,// SVX_NUMVAL_FRACTION
+1.0,// SVX_NUMVAL_BOOLEAN
+0.0 // SVX_NUMVAL_NOVALUE
+};
 
 // copy from page.hxx
 // enum --
diff --git a/include/svx/numfmtsh.hxx b/include/svx/numfmtsh.hxx
index 179b597..6c4f6eb 100644
--- a/include/svx/numfmtsh.hxx
+++ b/include/svx/numfmtsh.hxx
@@ -130,6 +130,8 @@ public:
 
 sal_uInt16  GetFormatIntegerDigits( const OUString&  rFormat ) 
const;
 
+double  GetDefaultValNum( const short nType ) const;
+
 voidMakePreviewString( const OUString& rFormatStr,
OUString&  

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

2016-01-25 Thread Miklos Vajna
 cui/source/tabpages/connect.cxx |2 +-
 include/svx/sxelditm.hxx|8 
 svx/source/dialog/connctrl.cxx  |2 +-
 svx/source/svdraw/svdattr.cxx   |2 +-
 svx/source/svdraw/svdibrow.cxx  |2 +-
 svx/source/svdraw/svdoedge.cxx  |4 ++--
 6 files changed, 10 insertions(+), 10 deletions(-)

New commits:
commit e3b0d5987b817af86e2ecb3616b8d1bde306ba08
Author: Miklos Vajna 
Date:   Mon Jan 25 09:14:05 2016 +0100

svx: SdrEdgeLineDeltaAnzItem -> SdrEdgeLineDeltaCountItem

Change-Id: I91791a3ea21ca7a68d4d1aa49e29cabc38c777ee

diff --git a/cui/source/tabpages/connect.cxx b/cui/source/tabpages/connect.cxx
index 0f1af81..c928867 100644
--- a/cui/source/tabpages/connect.cxx
+++ b/cui/source/tabpages/connect.cxx
@@ -267,7 +267,7 @@ void SvxConnectionPage::Reset( const SfxItemSet* rAttrs )
 pItem = >GetDefaultItem( SDRATTR_EDGELINEDELTAANZ );
 if( pItem )
 {
-sal_uInt16 nValue = static_cast( pItem 
)->GetValue();
+sal_uInt16 nValue = static_cast( 
pItem )->GetValue();
 if( nValue <= 2 )
 {
 m_pFtLine3->Enable( false );
diff --git a/include/svx/sxelditm.hxx b/include/svx/sxelditm.hxx
index db37bca..b27e9c1 100644
--- a/include/svx/sxelditm.hxx
+++ b/include/svx/sxelditm.hxx
@@ -23,13 +23,13 @@
 #include 
 #include 
 
-class SdrEdgeLineDeltaAnzItem: public SfxUInt16Item {
+class SdrEdgeLineDeltaCountItem: public SfxUInt16Item {
 public:
-SdrEdgeLineDeltaAnzItem(sal_uInt16 nVal=0): 
SfxUInt16Item(SDRATTR_EDGELINEDELTAANZ,nVal) {}
-SdrEdgeLineDeltaAnzItem(SvStream& rIn): 
SfxUInt16Item(SDRATTR_EDGELINEDELTAANZ,rIn)  {}
+SdrEdgeLineDeltaCountItem(sal_uInt16 nVal=0): 
SfxUInt16Item(SDRATTR_EDGELINEDELTAANZ,nVal) {}
+SdrEdgeLineDeltaCountItem(SvStream& rIn): 
SfxUInt16Item(SDRATTR_EDGELINEDELTAANZ,rIn)  {}
 virtual SfxPoolItem* Clone(SfxItemPool*) const override
 {
-return new SdrEdgeLineDeltaAnzItem(*this);
+return new SdrEdgeLineDeltaCountItem(*this);
 }
 };
 
diff --git a/svx/source/dialog/connctrl.cxx b/svx/source/dialog/connctrl.cxx
index 79e01c4..6360cfd 100644
--- a/svx/source/dialog/connctrl.cxx
+++ b/svx/source/dialog/connctrl.cxx
@@ -252,7 +252,7 @@ sal_uInt16 SvxXConnectionPreview::GetLineDeltaCount()
 sal_uInt16 nCount(0);
 
 if(SfxItemState::DONTCARE != rSet.GetItemState(SDRATTR_EDGELINEDELTAANZ))
-nCount = static_cast(rSet.Get(SDRATTR_EDGELINEDELTAANZ)).GetValue();
+nCount = static_cast(rSet.Get(SDRATTR_EDGELINEDELTAANZ)).GetValue();
 
 return nCount;
 }
diff --git a/svx/source/svdraw/svdattr.cxx b/svx/source/svdraw/svdattr.cxx
index e9510a6..a93510a 100644
--- a/svx/source/svdraw/svdattr.cxx
+++ b/svx/source/svdraw/svdattr.cxx
@@ -171,7 +171,7 @@ SdrItemPool::SdrItemPool(
 mppLocalPoolDefaults[SDRATTR_EDGENODE2VERTDIST-SDRATTR_START]=new 
SdrEdgeNode2VertDistItem(nDefEdgeDist);
 mppLocalPoolDefaults[SDRATTR_EDGENODE1GLUEDIST-SDRATTR_START]=new 
SdrEdgeNode1GlueDistItem;
 mppLocalPoolDefaults[SDRATTR_EDGENODE2GLUEDIST-SDRATTR_START]=new 
SdrEdgeNode2GlueDistItem;
-mppLocalPoolDefaults[SDRATTR_EDGELINEDELTAANZ -SDRATTR_START]=new 
SdrEdgeLineDeltaAnzItem;
+mppLocalPoolDefaults[SDRATTR_EDGELINEDELTAANZ -SDRATTR_START]=new 
SdrEdgeLineDeltaCountItem;
 mppLocalPoolDefaults[SDRATTR_EDGELINE1DELTA   -SDRATTR_START]=new 
SdrMetricItem(SDRATTR_EDGELINE1DELTA, 0);
 mppLocalPoolDefaults[SDRATTR_EDGELINE2DELTA   -SDRATTR_START]=new 
SdrMetricItem(SDRATTR_EDGELINE2DELTA, 0);
 mppLocalPoolDefaults[SDRATTR_EDGELINE3DELTA   -SDRATTR_START]=new 
SdrMetricItem(SDRATTR_EDGELINE3DELTA, 0);
diff --git a/svx/source/svdraw/svdibrow.cxx b/svx/source/svdraw/svdibrow.cxx
index 2da9c09..d27967b 100644
--- a/svx/source/svdraw/svdibrow.cxx
+++ b/svx/source/svdraw/svdibrow.cxx
@@ -833,7 +833,7 @@ bool IsItemIneffective(sal_uInt16 nWhich, const SfxItemSet* 
pSet, sal_uInt16& rI
 if (eKind!=SDREDGE_ORTHOLINES && eKind!=SDREDGE_BEZIER) return 
true;
 }
 if (ImpGetItem(*pSet,SDRATTR_EDGELINEDELTAANZ,pItem)) {
-sal_uInt16 nCount=static_cast(pItem)->GetValue();
+sal_uInt16 nCount=static_cast(pItem)->GetValue();
 if (nCount==0) return true;
 if (nCount==1 && nWhich>SDRATTR_EDGELINE1DELTA) return true;
 if (nCount==2 && nWhich>SDRATTR_EDGELINE2DELTA) return true;
diff --git a/svx/source/svdraw/svdoedge.cxx b/svx/source/svdraw/svdoedge.cxx
index 6f35967..aa064ce 100644
--- a/svx/source/svdraw/svdoedge.cxx
+++ b/svx/source/svdraw/svdoedge.cxx
@@ -262,7 +262,7 @@ void SdrEdgeObj::ImpSetEdgeInfoToAttr()
 {
 const SfxItemSet& rSet = GetObjectItemSet();
 SdrEdgeKind eKind = static_cast(rSet.Get(SDRATTR_EDGEKIND)).GetValue();
-sal_Int32 nValAnz = static_cast(rSet.Get(SDRATTR_EDGELINEDELTAANZ)).GetValue();
+sal_Int32 nValAnz = static_cast(rSet.Get(SDRATTR_EDGELINEDELTAANZ)).GetValue();
 

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

2015-09-22 Thread Noel Grandin
 cui/source/dialogs/cuigaldlg.cxx  |   13 -
 cui/source/inc/cuigaldlg.hxx  |2 +-
 include/svx/galtheme.hxx  |2 +-
 svx/source/gallery2/galtheme.cxx  |4 ++--
 svx/source/unogallery/unogaltheme.cxx |2 +-
 5 files changed, 9 insertions(+), 14 deletions(-)

New commits:
commit 0554e83ca9968e2301934bb2f420c9b9faee5681
Author: Noel Grandin 
Date:   Tue Sep 22 15:31:53 2015 +0200

convert Link<> to typed

Change-Id: I285d7093f4d9db4a511fbf236f493cc4199ce534
Reviewed-on: https://gerrit.libreoffice.org/18775
Reviewed-by: Noel Grandin 
Tested-by: Noel Grandin 

diff --git a/cui/source/dialogs/cuigaldlg.cxx b/cui/source/dialogs/cuigaldlg.cxx
index 1a5d0fd..bb703c2 100644
--- a/cui/source/dialogs/cuigaldlg.cxx
+++ b/cui/source/dialogs/cuigaldlg.cxx
@@ -511,7 +511,7 @@ IMPL_LINK_TYPED( ActualizeProgress, TimeoutHdl, Idle*, 
_pTimer, void)
 
 
 
-IMPL_LINK( ActualizeProgress, ActualizeHdl, INetURLObject*, pURL )
+IMPL_LINK_TYPED( ActualizeProgress, ActualizeHdl, const INetURLObject&, rURL, 
void )
 {
 for( long i = 0; i < 128; i++ )
 Application::Reschedule();
@@ -519,14 +519,9 @@ IMPL_LINK( ActualizeProgress, ActualizeHdl, 
INetURLObject*, pURL )
 Flush();
 Sync();
 
-if( pURL )
-{
-m_pFtActualizeFile->SetText( GetReducedString( *pURL, 30 ) );
-m_pFtActualizeFile->Flush();
-m_pFtActualizeFile->Sync();
-}
-
-return 0;
+m_pFtActualizeFile->SetText( GetReducedString( rURL, 30 ) );
+m_pFtActualizeFile->Flush();
+m_pFtActualizeFile->Sync();
 }
 
 TitleDialog::TitleDialog(vcl::Window* pParent, const OUString& rOldTitle)
diff --git a/cui/source/inc/cuigaldlg.hxx b/cui/source/inc/cuigaldlg.hxx
index 43f0737..2ab6b08 100644
--- a/cui/source/inc/cuigaldlg.hxx
+++ b/cui/source/inc/cuigaldlg.hxx
@@ -160,7 +160,7 @@ private:
 
 DECL_LINK_TYPED( ClickCancelBtn, Button*, void );
 DECL_LINK_TYPED( TimeoutHdl, Idle*, void );
-DECL_LINK( ActualizeHdl, INetURLObject* );
+DECL_LINK_TYPED( ActualizeHdl, const INetURLObject&, 
void );
 
 public:
 ActualizeProgress( vcl::Window* pWindow, GalleryTheme* 
pThm );
diff --git a/include/svx/galtheme.hxx b/include/svx/galtheme.hxx
index d3e9cbf..c293806 100644
--- a/include/svx/galtheme.hxx
+++ b/include/svx/galtheme.hxx
@@ -178,7 +178,7 @@ public:
 boolIsDefault() const;
 SAL_DLLPRIVATE bool IsModified() const;
 
-voidActualize( const Link<>& rActualizeLink, 
GalleryProgress* pProgress = NULL );
+voidActualize( const Link& rActualizeLink, GalleryProgress* pProgress = NULL );
 SAL_DLLPRIVATE void AbortActualize() { bAbortActualize = true; }
 
 SAL_DLLPRIVATE Gallery* GetParent() const { return pParent; }
diff --git a/svx/source/gallery2/galtheme.cxx b/svx/source/gallery2/galtheme.cxx
index 315449f..4e97329 100644
--- a/svx/source/gallery2/galtheme.cxx
+++ b/svx/source/gallery2/galtheme.cxx
@@ -509,7 +509,7 @@ bool GalleryTheme::ChangeObjectPos( size_t nOldPos, size_t 
nNewPos )
 return true;
 }
 
-void GalleryTheme::Actualize( const Link<>& rActualizeLink, GalleryProgress* 
pProgress )
+void GalleryTheme::Actualize( const Link& 
rActualizeLink, GalleryProgress* pProgress )
 {
 if( !IsReadOnly() )
 {
@@ -534,7 +534,7 @@ void GalleryTheme::Actualize( const Link<>& rActualizeLink, 
GalleryProgress* pPr
 
 const INetURLObject aURL( pEntry->aURL );
 
-rActualizeLink.Call( const_cast() );
+rActualizeLink.Call( aURL );
 
 // SvDraw objects will be updated later
 if( pEntry->eObjKind != SGA_OBJ_SVDRAW )
diff --git a/svx/source/unogallery/unogaltheme.cxx 
b/svx/source/unogallery/unogaltheme.cxx
index edbd37f..c15c8cb 100644
--- a/svx/source/unogallery/unogaltheme.cxx
+++ b/svx/source/unogallery/unogaltheme.cxx
@@ -206,7 +206,7 @@ void SAL_CALL GalleryTheme::update(  )
 
 if( mpTheme )
 {
-const Link<> aDummyLink;
+const Link aDummyLink;
 mpTheme->Actualize( aDummyLink );
 }
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2014-11-29 Thread Katarina Behrens
 cui/source/tabpages/transfrm.cxx|   31 ++-
 include/svx/transfrmhelper.hxx  |   50 ++
 svx/source/sidebar/possize/PosSizePropertyPanel.cxx |   55 
 svx/source/sidebar/possize/PosSizePropertyPanel.hxx |5 +
 4 files changed, 106 insertions(+), 35 deletions(-)

New commits:
commit 1386c348f81738a9966d1217db89d1f603466317
Author: Katarina Behrens bu...@bubli.org
Date:   Fri Nov 28 11:20:04 2014 +0100

fdo#82616: set limits on spinboxes according to size of workarea

Do it the same way as position'n'size dialog does, for that matter
move shared code into a separate header/class.

This fixes regression from .ui migration that omitted spinbox limits

Change-Id: I884904719b2608dd80aecc5d7ffb3923de71774d
Reviewed-on: https://gerrit.libreoffice.org/13174
Tested-by: LibreOffice gerrit bot ger...@libreoffice.org
Reviewed-by: Katarina Behrens bu...@bubli.org

diff --git a/cui/source/tabpages/transfrm.cxx b/cui/source/tabpages/transfrm.cxx
index e1193c1..310a1a1 100644
--- a/cui/source/tabpages/transfrm.cxx
+++ b/cui/source/tabpages/transfrm.cxx
@@ -24,6 +24,7 @@
 #include svx/svdotext.hxx
 #include svx/sderitm.hxx
 #include svx/dialogs.hrc
+#include svx/transfrmhelper.hxx
 #include cuires.hrc
 #include editeng/sizeitem.hxx
 
@@ -78,24 +79,6 @@ static const sal_uInt16 pSlantRanges[] =
 0
 };
 
-static void lcl_ConvertRect(basegfx::B2DRange rRange, const sal_uInt16 
nDigits, const MapUnit ePoolUnit, const FieldUnit eDlgUnit)
-{
-const basegfx::B2DPoint aTopLeft(
-(double)MetricField::ConvertValue(basegfx::fround(rRange.getMinX()), 
nDigits, ePoolUnit, eDlgUnit),
-(double)MetricField::ConvertValue(basegfx::fround(rRange.getMinY()), 
nDigits, ePoolUnit, eDlgUnit));
-const basegfx::B2DPoint aBottomRight(
-(double)MetricField::ConvertValue(basegfx::fround(rRange.getMaxX()), 
nDigits, ePoolUnit, eDlgUnit),
-(double)MetricField::ConvertValue(basegfx::fround(rRange.getMaxY()), 
nDigits, ePoolUnit, eDlgUnit));
-
-rRange = basegfx::B2DRange(aTopLeft, aBottomRight);
-}
-
-static void lcl_ScaleRect(basegfx::B2DRange rRange, const Fraction aUIScale)
-{
-const double fFactor(1.0 / double(aUIScale));
-rRange = basegfx::B2DRange(rRange.getMinimum() * fFactor, 
rRange.getMaximum() * fFactor);
-}
-
 /*
 |*
 |* constructor of the tab dialog: adds the pages to the dialog
@@ -255,11 +238,11 @@ void SvxAngleTabPage::Construct()
 
 // take scale into account
 const Fraction aUIScale(pView-GetModel()-GetUIScale());
-lcl_ScaleRect(maRange, aUIScale);
+TransfrmHelper::ScaleRect(maRange, aUIScale);
 
 // take UI units into account
 sal_uInt16 nDigits(m_pMtrPosX-GetDecimalDigits());
-lcl_ConvertRect(maRange, nDigits, (MapUnit)ePoolUnit, eDlgUnit);
+TransfrmHelper::ConvertRect(maRange, nDigits, (MapUnit)ePoolUnit, 
eDlgUnit);
 
 if(!pView-IsRotateAllowed())
 {
@@ -759,13 +742,13 @@ void SvxPositionSizeTabPage::Construct()
 
 // take scale into account
 const Fraction aUIScale(mpView-GetModel()-GetUIScale());
-lcl_ScaleRect( maWorkRange, aUIScale );
-lcl_ScaleRect( maRange, aUIScale );
+TransfrmHelper::ScaleRect( maWorkRange, aUIScale );
+TransfrmHelper::ScaleRect( maRange, aUIScale );
 
 // take UI units into account
 const sal_uInt16 nDigits(m_pMtrPosX-GetDecimalDigits());
-lcl_ConvertRect( maWorkRange, nDigits, (MapUnit) mePoolUnit, meDlgUnit );
-lcl_ConvertRect( maRange, nDigits, (MapUnit) mePoolUnit, meDlgUnit );
+TransfrmHelper::ConvertRect( maWorkRange, nDigits, (MapUnit) mePoolUnit, 
meDlgUnit );
+TransfrmHelper::ConvertRect( maRange, nDigits, (MapUnit) mePoolUnit, 
meDlgUnit );
 
 SetMinMaxPosition();
 }
diff --git a/include/svx/transfrmhelper.hxx b/include/svx/transfrmhelper.hxx
new file mode 100644
index 000..71affa7
--- /dev/null
+++ b/include/svx/transfrmhelper.hxx
@@ -0,0 +1,50 @@
+/* -*- 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 .
+ */
+

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

2013-07-02 Thread Thomas Arnhold
 cui/source/tabpages/connect.cxx |   23 +++--
 cui/source/tabpages/labdlg.cxx  |   17 ++--
 cui/source/tabpages/measure.cxx |   36 +
 include/svx/svdattrx.hxx|   71 -
 svx/source/dialog/connctrl.cxx  |   19 ++--
 svx/source/svdraw/svdattr.cxx   |   82 +++-
 svx/source/svdraw/svdconv.hxx   |2 
 svx/source/svdraw/svdedtv1.cxx  |   62 ---
 svx/source/svdraw/svdibrow.cxx  |   51 ++--
 svx/source/svdraw/svdoashp.cxx  |1 
 svx/source/svdraw/svdoattr.cxx  |1 
 svx/source/svdraw/svdobj.cxx|  158 +---
 svx/source/svdraw/svdocapt.cxx  |   52 +++--
 svx/source/svdraw/svdocirc.cxx  |   49 ++--
 svx/source/svdraw/svdoedge.cxx  |   45 ++-
 svx/source/svdraw/svdogrp.cxx   |1 
 svx/source/svdraw/svdomeas.cxx  |   77 +++
 svx/source/svdraw/svdpntv.cxx   |1 
 18 files changed, 388 insertions(+), 360 deletions(-)

New commits:
commit 10c6cb238f0ae5d5969ffd0012bf23305ac5894f
Author: Thomas Arnhold tho...@arnhold.org
Date:   Sat Jun 29 23:41:02 2013 +0200

fdo#62699 drop pass-through header svx/svdattrx.hxx

includes some sorting of the includes

Change-Id: Iba41991552674f76b902dbc7b4b3ada992aee69e
Reviewed-on: https://gerrit.libreoffice.org/4626
Reviewed-by: Bosdonnat Cedric cedric.bosdon...@free.fr
Tested-by: Bosdonnat Cedric cedric.bosdon...@free.fr

diff --git a/cui/source/tabpages/connect.cxx b/cui/source/tabpages/connect.cxx
index 1b69183..2db5c33 100644
--- a/cui/source/tabpages/connect.cxx
+++ b/cui/source/tabpages/connect.cxx
@@ -17,26 +17,27 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
+#include cuires.hrc
+#include dialmgr.hxx
 #include sfx2/app.hxx
 #include sfx2/module.hxx
-#include tools/shl.hxx
-#include svx/ofaitem.hxx
 #include sfx2/request.hxx
-#include svx/dialogs.hrc
+#include tools/shl.hxx
 
-#include svx/svdoedge.hxx
+#include svx/connctrl.hxx
+#include svx/dialogs.hrc
+#include svx/dlgutil.hxx
+#include svx/ofaitem.hxx
 #include svx/svdattr.hxx
-#include svx/svdattrx.hxx
+#include svx/svdoedge.hxx
 #include svx/svdview.hxx
+#include svx/sxekitm.hxx
+#include svx/sxelditm.hxx
+#include svx/sxenditm.hxx
 
-#include svx/connctrl.hxx
-#include connect.hxx
 #include connect.hrc
-#include dialmgr.hxx
-#include svx/dlgutil.hxx
-
+#include connect.hxx
 #include paragrph.hrc
-#include cuires.hrc
 
 static sal_uInt16 pRanges[] =
 {
diff --git a/cui/source/tabpages/labdlg.cxx b/cui/source/tabpages/labdlg.cxx
index 819dd2a..0f3720a 100644
--- a/cui/source/tabpages/labdlg.cxx
+++ b/cui/source/tabpages/labdlg.cxx
@@ -18,20 +18,25 @@
  */
 
 #include comphelper/string.hxx
-#include tools/shl.hxx
+#include cuires.hrc
+#include dialmgr.hxx
 #include sfx2/app.hxx
 #include sfx2/module.hxx
 #include swpossizetabpage.hxx
+#include tools/shl.hxx
+
 #include svx/dialogs.hrc
+#include svx/svddef.hxx
+#include svx/sxcaitm.hxx
+#include svx/sxcecitm.hxx
+#include svx/sxcgitm.hxx
+#include svx/sxcllitm.hxx
+#include svx/sxctitm.hxx
 
-#include svx/svdattrx.hxx
-#include cuires.hrc
-#include dialmgr.hxx
 #include svx/dlgutil.hxx
-#include transfrm.hxx
-
 #include labdlg.hrc
 #include labdlg.hxx
+#include transfrm.hxx
 
 // define 
 
diff --git a/cui/source/tabpages/measure.cxx b/cui/source/tabpages/measure.cxx
index 9575041..96d05db 100644
--- a/cui/source/tabpages/measure.cxx
+++ b/cui/source/tabpages/measure.cxx
@@ -17,26 +17,36 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
+#include cuires.hrc
+#include dialmgr.hxx
 #include sfx2/app.hxx
 #include sfx2/module.hxx
+#include sfx2/request.hxx
 #include tools/shl.hxx
 
-#include cuires.hrc
-
-#include svx/svdomeas.hxx
+#include svx/dialmgr.hxx
+#include svx/dialogs.hrc
+#include svx/dlgutil.hxx
+#include svx/measctrl.hxx
+#include svx/ofaitem.hxx
+#include svx/strarray.hxx
 #include svx/svdattr.hxx
-#include svx/svdattrx.hxx
+#include svx/svdomeas.hxx
 #include svx/svdview.hxx
-#include svx/dialogs.hrc
-#include svx/dialmgr.hxx
-#include svx/measctrl.hxx
-#include measure.hxx
+#include svx/sxekitm.hxx
+#include svx/sxelditm.hxx
+#include svx/sxenditm.hxx
+#include svx/sxmbritm.hxx
+#include svx/sxmfsitm.hxx
+#include svx/sxmlhitm.hxx
+#include svx/sxmsuitm.hxx
+#include svx/sxmtfitm.hxx
+#include svx/sxmtpitm.hxx
+#include svx/sxmtritm.hxx
+#include svx/sxmuitm.hxx
+
 #include measure.hrc
-#include dialmgr.hxx
-#include svx/dlgutil.hxx
-#include svx/strarray.hxx
-#include sfx2/request.hxx
-#include svx/ofaitem.hxx
+#include measure.hxx
 
 static sal_uInt16 pRanges[] =
 {
diff --git a/include/svx/svdattrx.hxx b/include/svx/svdattrx.hxx
deleted file mode 100644
index ca1aa00..000
--- a/include/svx/svdattrx.hxx
+++ /dev/null
@@ -1,71 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the