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

2023-06-23 Thread Regina Henschel (via logerrit)
 cui/source/inc/cuitabarea.hxx |8 +-
 cui/source/tabpages/tpgradnt.cxx  |   25 +---
 cui/source/tabpages/tptrans.cxx   |   28 +
 include/svx/sidebar/AreaPropertyPanelBase.hxx |4 -
 include/svx/sidebar/AreaTransparencyGradientPopup.hxx |4 -
 sd/source/ui/sidebar/SlideBackground.cxx  |   25 +---
 sd/source/ui/sidebar/SlideBackground.hxx  |4 -
 svx/source/sidebar/area/AreaPropertyPanelBase.cxx |   33 +++
 svx/source/sidebar/area/AreaTransparencyGradientPopup.cxx |   42 --
 9 files changed, 105 insertions(+), 68 deletions(-)

New commits:
commit bb19bda1dc620f0f8662776d9818aedf45486994
Author: Regina Henschel 
AuthorDate: Wed Jun 21 15:01:20 2023 +0200
Commit: Regina Henschel 
CommitDate: Fri Jun 23 10:54:24 2023 +0200

tdf#155901 MCGR: preserve first and last gradient stop too

Error was, that only the in-between gradient stops were preserve. First
stop was set with fixed offset 0, last stop with fixed offset 1. The
offsets of first and last gradient stop of the original gradient were
lost. Now in all cases (hopefully) the complete gradient stops vector is
preserved and the original offset is used, if e.g. the user changes the
color.

For calculating transparence the indirect way over Color is removed.
Instead percent is directly transformed to the 0..1 values of BColor.
That avoids rounding errors.

Change-Id: Icdf699a6c2e9c6289d2f77033858448e58396a60
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153395
Tested-by: Jenkins
Reviewed-by: Regina Henschel 

diff --git a/cui/source/inc/cuitabarea.hxx b/cui/source/inc/cuitabarea.hxx
index 2d6c713236da..4e766c76e57d 100644
--- a/cui/source/inc/cuitabarea.hxx
+++ b/cui/source/inc/cuitabarea.hxx
@@ -169,7 +169,7 @@ class SvxTransparenceTabPage : public SfxTabPage
 std::unique_ptr m_xCtlBitmapPreview;
 std::unique_ptr m_xCtlXRectPreview;
 
-// MCGR: Preserve in-between ColorStops until we have an UI to edit these
+// MCGR: Preserve ColorStops until we have a UI to edit these
 basegfx::BColorStops maColorStops;
 
 DECL_LINK(ClickTransOffHdl_Impl, weld::Toggleable&, void);
@@ -187,7 +187,7 @@ class SvxTransparenceTabPage : public SfxTabPage
 bool InitPreview ( const SfxItemSet& rSet );
 void InvalidatePreview (bool bEnable = true );
 
-// MCGR: Preserve in-between ColorStops until we have an UI to edit these
+// MCGR: Preserve ColorStops until we have a UI to edit these
 basegfx::BColorStops createColorStops();
 
 public:
@@ -367,7 +367,7 @@ private:
 XFillAttrSetItemm_aXFillAttr;
 SfxItemSet& m_rXFSet;
 
-// MCGR: Preserve in-between ColorStops until we have an UI to edit these
+// MCGR: Preserve ColorStops until we have a UI to edit these
 basegfx::BColorStops m_aColorStops;
 
 SvxXRectPreview m_aCtlPreview;
@@ -409,7 +409,7 @@ private:
 void SetControlState_Impl( css::awt::GradientStyle eXGS );
 sal_Int32 SearchGradientList(std::u16string_view rGradientName);
 
-// MCGR: Preserve in-between ColorStops until we have an UI to edit these
+// MCGR: Preserve ColorStops until we have a UI to edit these
 basegfx::BColorStops createColorStops();
 
 public:
diff --git a/cui/source/tabpages/tpgradnt.cxx b/cui/source/tabpages/tpgradnt.cxx
index 7f6630747a42..d3d066236ae1 100644
--- a/cui/source/tabpages/tpgradnt.cxx
+++ b/cui/source/tabpages/tpgradnt.cxx
@@ -548,9 +548,11 @@ void SvxGradientTabPage::ChangeGradientHdl_Impl()
 m_xLbColorTo->SetNoSelection();
 
m_xLbColorTo->SelectEntry(Color(pGradient->GetColorStops().back().getStopColor()));
 
-// MCGR: preserve in-between ColorStops if given
-if (pGradient->GetColorStops().size() > 2)
-m_aColorStops = 
basegfx::BColorStops(pGradient->GetColorStops().begin() + 1, 
pGradient->GetColorStops().end() - 1);
+// MCGR: preserve ColorStops if given.
+// tdf#155901 We need offset of first and last stop, so include them.
+if (pGradient->GetColorStops().size() >= 2)
+m_aColorStops = 
basegfx::BColorStops(pGradient->GetColorStops().begin(),
+ pGradient->GetColorStops().end());
 else
 m_aColorStops.clear();
 
@@ -641,14 +643,19 @@ basegfx::BColorStops 
SvxGradientTabPage::createColorStops()
 {
 basegfx::BColorStops aColorStops;
 
-aColorStops.emplace_back(0.0, 
m_xLbColorFrom->GetSelectEntryColor().getBColor());
-
-if(!m_aColorStops.empty())
+if(m_aColorStops.size() >= 2)
 {
-aColorStops.insert(aColorStops.begin(), m_aColorStops.begin(), 
m_aColorStops.end());
+aColorStops.emplace_back(m_aColorStops.front().getStopOffset(),
+ 
m_xLbColorFrom->GetSelectEntryColor().getBColor());
+aColorStops.insert(aColorStops.

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

2023-06-01 Thread Tomaž Vajngerl (via logerrit)
 cui/source/inc/cuitabarea.hxx   |4 -
 cui/source/tabpages/tpcolor.cxx |   91 
 include/svx/Palette.hxx |   31 +++--
 3 files changed, 76 insertions(+), 50 deletions(-)

New commits:
commit d7d2b172065f90aa2f61c0216f3722e868ae76a1
Author: Tomaž Vajngerl 
AuthorDate: Mon May 29 19:03:33 2023 +0900
Commit: Tomaž Vajngerl 
CommitDate: Thu Jun 1 18:26:14 2023 +0200

prefix aPreviousColor and aCurrentColor in SvxColorTabPage

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

diff --git a/cui/source/inc/cuitabarea.hxx b/cui/source/inc/cuitabarea.hxx
index 7399f03eb0be..2d6c713236da 100644
--- a/cui/source/inc/cuitabarea.hxx
+++ b/cui/source/inc/cuitabarea.hxx
@@ -657,8 +657,8 @@ private:
 
 ColorModel  eCM;
 
-Color   aPreviousColor;
-NamedColor aCurrentColor;
+Color m_aPreviousColor;
+NamedColor m_aCurrentColor;
 
 PaletteManager maPaletteManager;
 SvxXRectPreview m_aCtlPreviewOld;
diff --git a/cui/source/tabpages/tpcolor.cxx b/cui/source/tabpages/tpcolor.cxx
index bdefcf10114d..056afe822e7a 100644
--- a/cui/source/tabpages/tpcolor.cxx
+++ b/cui/source/tabpages/tpcolor.cxx
@@ -238,25 +238,25 @@ bool SvxColorTabPage::FillItemSet( SfxItemSet* rSet )
 {
 Color aColor = m_xValSetColorList->GetItemColor( 
m_xValSetColorList->GetSelectedItemId() );
 OUString sColorName;
-if ( aCurrentColor.m_aColor == aColor )
+if (m_aCurrentColor.m_aColor == aColor)
sColorName = m_xValSetColorList->GetItemText( 
m_xValSetColorList->GetSelectedItemId() );
 else
-   sColorName = "#" + 
aCurrentColor.m_aColor.AsRGBHexString().toAsciiUpperCase();
-maPaletteManager.AddRecentColor( aCurrentColor.m_aColor, sColorName );
-XFillColorItem aColorItem( sColorName, aCurrentColor.m_aColor );
-model::ThemeColorType eType = 
model::convertToThemeColorType(aCurrentColor.m_nThemeIndex);
+   sColorName = "#" + 
m_aCurrentColor.m_aColor.AsRGBHexString().toAsciiUpperCase();
+maPaletteManager.AddRecentColor( m_aCurrentColor.m_aColor, sColorName );
+XFillColorItem aColorItem( sColorName, m_aCurrentColor.m_aColor );
+model::ThemeColorType eType = 
model::convertToThemeColorType(m_aCurrentColor.m_nThemeIndex);
 if (eType != model::ThemeColorType::Unknown)
 {
 aColorItem.getComplexColor().setSchemeColor(eType);
 }
 aColorItem.getComplexColor().clearTransformations();
-if (aCurrentColor.m_nLumMod != 1)
+if (m_aCurrentColor.m_nLumMod != 1)
 {
-
aColorItem.getComplexColor().addTransformation({model::TransformationType::LumMod,
 aCurrentColor.m_nLumMod});
+
aColorItem.getComplexColor().addTransformation({model::TransformationType::LumMod,
 m_aCurrentColor.m_nLumMod});
 }
-if (aCurrentColor.m_nLumOff != 0)
+if (m_aCurrentColor.m_nLumOff != 0)
 {
-
aColorItem.getComplexColor().addTransformation({model::TransformationType::LumOff,
 aCurrentColor.m_nLumOff});
+
aColorItem.getComplexColor().addTransformation({model::TransformationType::LumOff,
 m_aCurrentColor.m_nLumOff});
 }
 rSet->Put( aColorItem );
 rSet->Put( XFillStyleItem( drawing::FillStyle_SOLID ) );
@@ -278,7 +278,7 @@ void SvxColorTabPage::Reset( const SfxItemSet* rSet )
 if ( nState >= SfxItemState::DEFAULT )
 {
 XFillColorItem aColorItem( rSet->Get( XATTR_FILLCOLOR ) );
-aPreviousColor = aColorItem.GetColorValue();
+m_aPreviousColor = aColorItem.GetColorValue();
 aNewColor = aColorItem.GetColorValue();
 }
 
@@ -304,12 +304,12 @@ std::unique_ptr 
SvxColorTabPage::Create(weld::Container* pPage, weld
 IMPL_LINK_NOARG(SvxColorTabPage, SpinValueHdl_Impl, weld::SpinButton&, void)
 {
 // read current MtrFields, if cmyk, then k-value as transparency
-aCurrentColor.m_aColor = 
Color(static_cast(PercentToColor_Impl(m_xRcustom->get_value())),
+m_aCurrentColor.m_aColor = 
Color(static_cast(PercentToColor_Impl(m_xRcustom->get_value())),
   
static_cast(PercentToColor_Impl(m_xGcustom->get_value())),
   
static_cast(PercentToColor_Impl(m_xBcustom->get_value(;
 UpdateColorValues();
 
-rXFSet.Put( XFillColorItem( OUString(), aCurrentColor.m_aColor ) );
+rXFSet.Put( XFillColorItem( OUString(), m_aCurrentColor.m_aColor ) );
 m_aCtlPreviewNew.SetAttributes( aXFillAttr.GetItemSet() );
 
 m_aCtlPreviewNew.Invalidate();
@@ -318,13 +318,13 @@ IMPL_LINK_NOARG(SvxColorTabPage, SpinValueHdl_Impl, 
weld::SpinButton&, void)
 IMPL_LINK_NOARG(SvxColorTabPage, MetricSpinValueHdl_Impl, 
weld::MetricSpinButton&, void)
 {
 // read current MtrFields, if cmyk, then k-value as transparency
-aCurrentColor.m_aColor = Color(ColorTransparency, 
static_cast(PercentToColor_Impl(m_xKcustom->get_value(FieldUn

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

2023-05-29 Thread Noel Grandin (via logerrit)
 cui/source/tabpages/numfmt.cxx |2 +-
 include/svx/svxids.hrc |   12 ++--
 sc/source/ui/app/scmod.cxx |4 +---
 sd/inc/app.hrc |   16 
 sd/inc/sdattr.hrc  |7 ---
 sd/source/ui/dlg/present.cxx   |2 +-
 sd/source/ui/dlg/tpoption.cxx  |6 ++
 sd/source/ui/func/fusldlg.cxx  |2 +-
 sw/inc/cmdid.h |6 +++---
 9 files changed, 27 insertions(+), 30 deletions(-)

New commits:
commit dc50abb7f972c53fcca08d2ac3627e7848456520
Author: Noel Grandin 
AuthorDate: Fri May 26 15:34:11 2023 +0200
Commit: Noel Grandin 
CommitDate: Tue May 30 08:14:35 2023 +0200

use more TypedWhichInfo

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

diff --git a/cui/source/tabpages/numfmt.cxx b/cui/source/tabpages/numfmt.cxx
index 3030f49c6d9d..9bdcb0e6b0a5 100644
--- a/cui/source/tabpages/numfmt.cxx
+++ b/cui/source/tabpages/numfmt.cxx
@@ -672,7 +672,7 @@ bool SvxNumberFormatTabPage::FillItemSet( SfxItemSet* 
rCoreAttrs )
 if ( bDataChanged )
 {
 const SfxItemSet& rMyItemSet = GetItemSet();
-sal_uInt16  nWhich   = GetWhich( 
SID_ATTR_NUMBERFORMAT_VALUE );
+TypedWhichId nWhich = GetWhich( 
SID_ATTR_NUMBERFORMAT_VALUE );
 SfxItemStateeItemState   = rMyItemSet.GetItemState( nWhich, false 
);
 
 // OK chosen - Is format code input entered already taken over?
diff --git a/include/svx/svxids.hrc b/include/svx/svxids.hrc
index b8269b0dcf13..97832803a7d8 100644
--- a/include/svx/svxids.hrc
+++ b/include/svx/svxids.hrc
@@ -164,7 +164,7 @@ class XFillGradientItem;
 #define ID_VAL_DASHES   (SID_SD_START+243)
 #define ID_VAL_DASHLEN  (SID_SD_START+244)
 #define ID_VAL_DISTANCE (SID_SD_START+245)
-#define ID_VAL_INDEX(SID_SD_START+246)
+#define ID_VAL_INDEX
TypedWhichId(SID_SD_START+246)
 #define SID_BEZIERTO(SID_SD_START+252)
 #define SID_DASH(SID_SD_START+267)
 #define SID_TEXT_FITTOSIZE_VERTICAL 
TypedWhichId(SID_SD_START+286)
@@ -510,7 +510,7 @@ class XFillGradientItem;
 #define SID_TABLE_INSERT_ROW_AFTER  ( SID_SVX_START + 421 )
 
 #define SID_ATTR_3D_INTERN  
TypedWhichId( SID_SVX_START + 422 )
-#define SID_PSZ_FUNCTION( SID_SVX_START + 423 )
+#define SID_PSZ_FUNCTION
TypedWhichId( SID_SVX_START + 423 )
 
 // CAUTION! <424 > used by sfxids (!)
 #define SID_TABLE_INSERT_COL_DLG( SID_SVX_START + 426 )
@@ -616,7 +616,7 @@ class XFillGradientItem;
 #define SID_FM_DESIGN_MODE  
TypedWhichId( SID_SVX_START + 629 )
 #define SID_FM_RECORD_UNDO  ( SID_SVX_START + 630 )
 #define SID_FM_CONTROL_IDENTIFIER   
TypedWhichId( SID_SVX_START + 631 )
-#define SID_FM_CONTROL_INVENTOR ( SID_SVX_START + 632 )
+#define SID_FM_CONTROL_INVENTOR 
TypedWhichId( SID_SVX_START + 632 )
 #define SID_FM_SHOW_FMEXPLORER  ( SID_SVX_START + 633 )
 #define SID_FM_FIELDS_CONTROL   ( SID_SVX_START + 634 )
 #define SID_FM_SHOW_PROPERTIES  
TypedWhichId( SID_SVX_START + 635 )
@@ -863,11 +863,11 @@ class XFillGradientItem;
 #define SID_DISABLE_SVXEXTPARAGRAPHTABPAGE_PAGEBREAK( SID_SVX_START + 1027 
)
 #define SID_SVXPARAALIGNTABPAGE_ENABLEJUSTIFYEXT( SID_SVX_START + 1028 
)
 #define SID_SVXSTDPARAGRAPHTABPAGE_PAGEWIDTH
TypedWhichId( SID_SVX_START + 1029 )
-#define SID_SVXSTDPARAGRAPHTABPAGE_FLAGSET  ( SID_SVX_START + 1030 
)
-#define SID_SVXSTDPARAGRAPHTABPAGE_ABSLINEDIST  ( SID_SVX_START + 1031 
)
+#define SID_SVXSTDPARAGRAPHTABPAGE_FLAGSET  
TypedWhichId( SID_SVX_START + 1030 )
+#define SID_SVXSTDPARAGRAPHTABPAGE_ABSLINEDIST  
TypedWhichId( SID_SVX_START + 1031 )
 #define SID_SVXTABULATORTABPAGE_DISABLEFLAGS
TypedWhichId( SID_SVX_START + 1032 )
 #define SID_SVXTEXTATTRPAGE_OBJKIND ( SID_SVX_START + 1033 
)
-#define SID_FLAG_TYPE   ( SID_SVX_START + 1034 
)
+#define SID_FLAG_TYPE   
TypedWhichId( SID_SVX_START + 1034 )
 #define SID_SWMODE_TYPE 
TypedWhichId( SID_SVX_START + 1035 )
 #define SID_DISABLE_CTL 
TypedWhichId( SID_SVX_START + 1036 )
 #define SID_INSERT_HYPERLINKCONTROL ( SID_SVX_START + 1037 
)
diff --git a/sc/source/ui/app/scmod.cxx b/sc/source/ui/app/scmod.cxx
index 93b74d70e68e..c4055320d88f 100644
--- a/sc/source/ui/app/scmod.c

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

2023-05-15 Thread MoazAlaa (via logerrit)
 cui/source/tabpages/connect.cxx |   20 ++--
 include/svx/sxelditm.hxx|2 +-
 2 files changed, 11 insertions(+), 11 deletions(-)

New commits:
commit a9d60aba81305bf86024df707eb694d1cabc9a1d
Author: MoazAlaa 
AuthorDate: Fri Apr 21 22:03:52 2023 +0200
Commit: Hossein 
CommitDate: Mon May 15 23:35:28 2023 +0200

tdf#140226: use StaticWhichCast

Change-Id: If5eab003a732264522ff1b1fe55a6a2c876c22db
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150794
Tested-by: Jenkins
Reviewed-by: Hossein 

diff --git a/cui/source/tabpages/connect.cxx b/cui/source/tabpages/connect.cxx
index d668a2a6b8b7..f26cb485c897 100644
--- a/cui/source/tabpages/connect.cxx
+++ b/cui/source/tabpages/connect.cxx
@@ -132,7 +132,7 @@ void SvxConnectionPage::Reset( const SfxItemSet* rAttrs )
 // SdrEdgeNode1HorzDistItem
 if( !pItem )
 pItem = &pPool->GetDefaultItem( SDRATTR_EDGENODE1HORZDIST );
-SetMetricValue(*m_xMtrFldHorz1, static_cast(pItem)->GetValue(),
+SetMetricValue(*m_xMtrFldHorz1, 
pItem->StaticWhichCast(SDRATTR_EDGENODE1HORZDIST).GetValue(),
eUnit);
 m_xMtrFldHorz1->save_value();
 
@@ -140,7 +140,7 @@ void SvxConnectionPage::Reset( const SfxItemSet* rAttrs )
 pItem = GetItem( *rAttrs, SDRATTR_EDGENODE2HORZDIST );
 if( !pItem )
 pItem = &pPool->GetDefaultItem( SDRATTR_EDGENODE2HORZDIST );
-SetMetricValue(*m_xMtrFldHorz2, static_cast(pItem)->GetValue(),
+SetMetricValue(*m_xMtrFldHorz2, 
pItem->StaticWhichCast(SDRATTR_EDGENODE2HORZDIST).GetValue(),
eUnit);
 m_xMtrFldHorz2->save_value();
 
@@ -148,7 +148,7 @@ void SvxConnectionPage::Reset( const SfxItemSet* rAttrs )
 pItem = GetItem( *rAttrs, SDRATTR_EDGENODE1VERTDIST );
 if( !pItem )
 pItem = &pPool->GetDefaultItem( SDRATTR_EDGENODE1VERTDIST );
-SetMetricValue(*m_xMtrFldVert1, static_cast(pItem)->GetValue(),
+SetMetricValue(*m_xMtrFldVert1, 
pItem->StaticWhichCast(SDRATTR_EDGENODE1VERTDIST).GetValue(),
eUnit);
 m_xMtrFldVert1->save_value();
 
@@ -156,7 +156,7 @@ void SvxConnectionPage::Reset( const SfxItemSet* rAttrs )
 pItem = GetItem( *rAttrs, SDRATTR_EDGENODE2VERTDIST );
 if( !pItem )
 pItem = &pPool->GetDefaultItem( SDRATTR_EDGENODE2VERTDIST );
-SetMetricValue(*m_xMtrFldVert2, static_cast(pItem)->GetValue(),
+SetMetricValue(*m_xMtrFldVert2, 
pItem->StaticWhichCast(SDRATTR_EDGENODE2VERTDIST).GetValue(),
eUnit);
 m_xMtrFldVert2->save_value();
 
@@ -164,28 +164,28 @@ void SvxConnectionPage::Reset( const SfxItemSet* rAttrs )
 pItem = GetItem( *rAttrs, SDRATTR_EDGELINE1DELTA );
 if( !pItem )
 pItem = &pPool->GetDefaultItem( SDRATTR_EDGELINE1DELTA );
-SetMetricValue(*m_xMtrFldLine1, static_cast(pItem)->GetValue(), eUnit);
+SetMetricValue(*m_xMtrFldLine1, 
pItem->StaticWhichCast(SDRATTR_EDGELINE1DELTA).GetValue(), eUnit);
 m_xMtrFldLine1->save_value();
 
 // SdrEdgeLine2DeltaItem
 pItem = GetItem( *rAttrs, SDRATTR_EDGELINE2DELTA );
 if( !pItem )
 pItem = &pPool->GetDefaultItem( SDRATTR_EDGELINE2DELTA );
-SetMetricValue(*m_xMtrFldLine2, static_cast(pItem)->GetValue(), eUnit);
+SetMetricValue(*m_xMtrFldLine2, 
pItem->StaticWhichCast(SDRATTR_EDGELINE2DELTA).GetValue(), eUnit);
 m_xMtrFldLine2->save_value();
 
 // SdrEdgeLine3DeltaItem
 pItem = GetItem( *rAttrs, SDRATTR_EDGELINE3DELTA );
 if( !pItem )
 pItem = &pPool->GetDefaultItem( SDRATTR_EDGELINE3DELTA );
-SetMetricValue(*m_xMtrFldLine3, static_cast(pItem)->GetValue(), eUnit);
+SetMetricValue(*m_xMtrFldLine3, 
pItem->StaticWhichCast(SDRATTR_EDGELINE3DELTA).GetValue(), eUnit);
 m_xMtrFldLine3->save_value();
 
 // SdrEdgeLineDeltaAnzItem
 pItem = GetItem( *rAttrs, SDRATTR_EDGELINEDELTACOUNT );
 if( !pItem )
 pItem = &pPool->GetDefaultItem( SDRATTR_EDGELINEDELTACOUNT );
-switch (static_cast(pItem)->GetValue())
+switch (pItem->StaticWhichCast(SDRATTR_EDGELINEDELTACOUNT).GetValue())
 {
 case 0:
 m_xFtLine1->set_sensitive(false);
@@ -209,7 +209,7 @@ void SvxConnectionPage::Reset( const SfxItemSet* rAttrs )
 if( !pItem )
 pItem = &pPool->GetDefaultItem( SDRATTR_EDGEKIND );
 m_xLbType->set_active(
-sal::static_int_cast(static_cast(pItem)->GetValue()));
+
sal::static_int_cast(pItem->StaticWhichCast(SDRATTR_EDGEKIND).GetValue()));
 m_xLbType->save_value();
 }
 
@@ -395,7 +395,7 @@ void SvxConnectionPage::FillTypeLB()
 
 if( !pItem )
 pItem = &pPool->GetDefaultItem( SDRATTR_EDGEKIND );
-const SdrEdgeKindItem* pEdgeKindItem = static_cast(pItem);
+const SdrEdgeKindItem* pEdgeKindItem = 
&pItem->StaticWhichCast(SDRATTR_EDGEKIND);
 const sal_uInt16 nCount = pEdgeKindItem->GetValueCount();
 for (sal_uInt16 i = 0; i < nCount; i++)
 {
diff --git a/include/svx/sxelditm.hxx b/include/svx/sxeldit

[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", "SvxLangu

[Libreoffice-commits] core.git: cui/source include/svx include/vcl oox/source sc/source sd/source svx/source sw/source

2022-05-11 Thread Armin Le Grand (Allotropia) (via logerrit)
 cui/source/dialogs/DiagramDialog.cxx   |   90 ++---
 cui/source/factory/dlgfact.cxx |6 +
 cui/source/factory/dlgfact.hxx |2 
 cui/source/inc/DiagramDialog.hxx   |9 +-
 include/svx/diagram/datamodel.hxx  |   20 +
 include/svx/strings.hrc|1 
 include/svx/svdogrp.hxx|   13 +++
 include/svx/svdundo.hxx|   25 ++
 include/vcl/abstdlg.hxx|4 -
 oox/source/drawingml/diagram/diagramhelper.cxx |   20 +
 oox/source/drawingml/diagram/diagramhelper.hxx |8 ++
 sc/source/ui/drawfunc/drawsh5.cxx  |2 
 sd/source/ui/view/drviews3.cxx |2 
 svx/source/diagram/datamodel.cxx   |   27 +++
 svx/source/svdraw/svdundo.cxx  |   53 ++
 sw/source/uibase/shells/drwbassh.cxx   |2 
 16 files changed, 265 insertions(+), 19 deletions(-)

New commits:
commit 1e016920769ae524575e40b1ec317c700ba0daa3
Author: Armin Le Grand (Allotropia) 
AuthorDate: Tue May 10 15:59:29 2022 +0200
Commit: Armin Le Grand 
CommitDate: Wed May 11 14:17:34 2022 +0200

Advanced Diagram support: UNDO/REDO support for Diagram DataModel

Added support for UNDO/REDO for changes in Diagram ModelData.
This is currenly applied/used in the DiagramDialog for it's
Add/Remove actions (also supports Cancel of that dialog 1st
time ever). But it is defined more general to add/support
manipulating actions like clone/change_text etc. Also the
UI/dialog at he end will not be/stay modal, so this is a
test implemenation how to use it.

It uses an extract/apply mechanism to get/set the Diagram
ModelData at/for the UNDO action. That may be expanded as
needed for additional data in he future. It may also be
considered to modify the Connection/Point ModelData to
shared_ptr internally completely to avoid copying these
at all. OTOH it is not that much data to handle at all.

Change-Id: I4702ed908b79a476177fe66c0e3284898c6adda5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134118
Tested-by: Jenkins
Reviewed-by: Armin Le Grand 

diff --git a/cui/source/dialogs/DiagramDialog.cxx 
b/cui/source/dialogs/DiagramDialog.cxx
index 9c5816cf4b2b..ea592767461d 100644
--- a/cui/source/dialogs/DiagramDialog.cxx
+++ b/cui/source/dialogs/DiagramDialog.cxx
@@ -11,12 +11,15 @@
 
 #include 
 #include 
+#include 
+#include 
 #include 
+#include 
 
-DiagramDialog::DiagramDialog(weld::Window* pWindow,
- const std::shared_ptr& 
pDiagramHelper)
+DiagramDialog::DiagramDialog(weld::Window* pWindow, SdrObjGroup& rDiagram)
 : GenericDialogController(pWindow, "cui/ui/diagramdialog.ui", 
"DiagramDialog")
-, mpDiagramHelper(pDiagramHelper)
+, m_rDiagram(rDiagram)
+, m_nUndos(0)
 , mpBtnOk(m_xBuilder->weld_button("btnOk"))
 , mpBtnCancel(m_xBuilder->weld_button("btnCancel"))
 , mpBtnAdd(m_xBuilder->weld_button("btnAdd"))
@@ -24,6 +27,7 @@ DiagramDialog::DiagramDialog(weld::Window* pWindow,
 , mpTreeDiagram(m_xBuilder->weld_tree_view("treeDiagram"))
 , mpTextAdd(m_xBuilder->weld_text_view("textAdd"))
 {
+mpBtnCancel->connect_clicked(LINK(this, DiagramDialog, OnAddCancel));
 mpBtnAdd->connect_clicked(LINK(this, DiagramDialog, OnAddClick));
 mpBtnRemove->connect_clicked(LINK(this, DiagramDialog, OnRemoveClick));
 
@@ -37,13 +41,51 @@ DiagramDialog::DiagramDialog(weld::Window* pWindow,
 });
 }
 
+IMPL_LINK_NOARG(DiagramDialog, OnAddCancel, weld::Button&, void)
+{
+// If the user cancels the dialog, undo all changes done so far. It may
+// even be feasible to then delete the redo-stack, since it stays
+// available (?) - but it does no harm either...
+while (0 != m_nUndos)
+{
+comphelper::dispatchCommand(".uno:Undo", {});
+m_nUndos--;
+}
+
+m_xDialog->response(RET_CANCEL);
+}
+
 IMPL_LINK_NOARG(DiagramDialog, OnAddClick, weld::Button&, void)
 {
+if (!m_rDiagram.isDiagram())
+return;
+
 OUString sText = mpTextAdd->get_text();
+const std::shared_ptr& 
pDiagramHelper(m_rDiagram.getDiagramHelper());
 
-if (!sText.isEmpty())
+if (pDiagramHelper && !sText.isEmpty())
 {
-OUString sNodeId = mpDiagramHelper->addNode(sText);
+SdrModel& rDrawModel(m_rDiagram.getSdrModelFromSdrObject());
+const bool bUndo(rDrawModel.IsUndoEnabled());
+svx::diagram::DiagramDataStatePtr aStartState;
+
+if (bUndo)
+{
+// rescue all start state Diagram-defining data
+aStartState = pDiagramHelper->extractDiagramDataState();
+}
+
+OUString sNodeId = pDiagramHelper->addNode(sText);
+
+if (bUndo)
+{
+// create undo action. That will internally secure the
+// current Diagram-defining dat

[Libreoffice-commits] core.git: cui/source include/svx include/vcl svx/Library_svx.mk svx/source svx/uiconfig svx/UIConfig_svx.mk vcl/backendtest

2021-07-27 Thread homeboy445 (via logerrit)
 cui/source/dialogs/GraphicTestsDialog.cxx |   43 +++-
 cui/source/inc/GraphicsTestsDialog.hxx|8 
 include/svx/FileExportedDialog.hxx|   23 ++
 include/vcl/test/GraphicsRenderTests.hxx  |2 
 svx/Library_svx.mk|1 
 svx/UIConfig_svx.mk   |2 
 svx/source/dialog/FileExportedDialog.cxx  |   42 +++
 svx/source/dialog/SafeModeDialog.cxx  |   35 ---
 svx/uiconfig/ui/fileexporteddialog.ui |   10 
 vcl/backendtest/GraphicsRenderTests.cxx   |  318 +-
 10 files changed, 435 insertions(+), 49 deletions(-)

New commits:
commit 6cb3c79b84e396959a982070f6fc4d439a9c396d
Author: homeboy445 
AuthorDate: Sat Jun 26 20:46:25 2021 +0530
Commit: Tomaž Vajngerl 
CommitDate: Tue Jul 27 14:19:06 2021 +0200

Added the feature to store VCL test results as a zip file

The results can now be downloaded as a zip file, which would
consist of the test log and all the resultant bitmap images produced
by the tests compressed as png stored in the user directory folder.

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

diff --git a/cui/source/dialogs/GraphicTestsDialog.cxx 
b/cui/source/dialogs/GraphicTestsDialog.cxx
index 000129444cd5..0bd3bdd0fc39 100644
--- a/cui/source/dialogs/GraphicTestsDialog.cxx
+++ b/cui/source/dialogs/GraphicTestsDialog.cxx
@@ -7,6 +7,11 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
  */
 
+#include 
+#include 
+#include 
+#include 
+#include 
 #include 
 #include 
 
@@ -48,6 +53,10 @@ GraphicsTestsDialog::GraphicsTestsDialog(weld::Window* 
pParent)
 , m_xDownloadResults(m_xBuilder->weld_button("gptest_downld"))
 , m_xContainerBox(m_xBuilder->weld_box("gptest_box"))
 {
+OUString userProfile = comphelper::BackupFileHelper::getUserProfileURL();
+m_xZipFileUrl = userProfile + "/GraphicTestResults.zip";
+m_xCreateFolderUrl = userProfile + "/GraphicTestResults";
+osl::Directory::create(m_xCreateFolderUrl);
 m_xDownloadResults->connect_clicked(LINK(this, GraphicsTestsDialog, 
HandleDownloadRequest));
 }
 
@@ -59,19 +68,41 @@ short GraphicsTestsDialog::run()
   + "\n(Click on any test to view its resultant bitmap 
image)";
 m_xResultLog->set_text(aResultLog);
 sal_Int32 nTestNumber = 0;
-for (VclTestResult& tests : aTestObject.getTestResults())
+for (VclTestResult& test : aTestObject.getTestResults())
 {
 auto xGpTest = 
std::make_unique(m_xContainerBox.get(), m_xDialog.get(),
-  tests.getTestName(), 
tests.getStatus(),
-  tests.getBitmap());
+  test.getTestName(), 
test.getStatus(),
+  test.getBitmap());
 m_xContainerBox->reorder_child(xGpTest->get_widget(), nTestNumber++);
 m_xGraphicTestEntries.push_back(std::move(xGpTest));
 }
 return GenericDialogController::run();
 }
 
-IMPL_STATIC_LINK_NOARG(GraphicsTestsDialog, HandleDownloadRequest, 
weld::Button&, void)
+IMPL_LINK_NOARG(GraphicsTestsDialog, HandleDownloadRequest, weld::Button&, 
void)
 {
-//TODO: Enter code for downloading the results to user's system.
-return;
+osl::File::remove(m_xZipFileUrl); // Remove previous exports
+try
+{
+utl::ZipPackageHelper 
aZipHelper(comphelper::getProcessComponentContext(), m_xZipFileUrl);
+aZipHelper.addFolderWithContent(aZipHelper.getRootFolder(), 
m_xCreateFolderUrl);
+aZipHelper.savePackage();
+}
+catch (const std::exception&)
+{
+std::unique_ptr xBox(
+Application::CreateMessageDialog(m_xDialog.get(), 
VclMessageType::Warning,
+ VclButtonsType::Ok, "Creation of 
Zip file failed!"));
+xBox->run();
+return;
+}
+FileExportedDialog aDialog(
+m_xDialog.get(),
+"The results have been successfully saved in the file 
'GraphicTestResults.zip' !");
+aDialog.run();
+}
+
+GraphicsTestsDialog::~GraphicsTestsDialog()
+{
+comphelper::DirectoryHelper::deleteDirRecursively(m_xCreateFolderUrl);
 }
diff --git a/cui/source/inc/GraphicsTestsDialog.hxx 
b/cui/source/inc/GraphicsTestsDialog.hxx
index 2912d898efb7..09e7fb28ff8e 100644
--- a/cui/source/inc/GraphicsTestsDialog.hxx
+++ b/cui/source/inc/GraphicsTestsDialog.hxx
@@ -12,6 +12,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #include "ImageViewerDialog.hxx"
 
@@ -44,9 +45,14 @@ class GraphicsTestsDialog : public 
weld::GenericDialogController
 
 std::vector> m_xGraphicTestEntries;
 
-DECL_STATIC_LINK(GraphicsTestsDialog, HandleDownloadRequest, 
weld::Button&, void);
+OUString m_xZipFileUrl;
+OUString m_xC

[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 ((&rButton == m_prbSearchForText.get()) || (&rButton == 
m_prbSearchForNull.get()) || (&rButton == 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 (&rButton == 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

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

2020-12-27 Thread Noel Grandin (via logerrit)
 cui/source/tabpages/transfrm.cxx|5 +++--
 include/svx/svxids.hrc  |3 ++-
 sd/source/core/typemap.cxx  |1 +
 svx/sdi/svx.sdi |4 ++--
 svx/sdi/svxitems.sdi|1 +
 svx/source/sidebar/possize/PosSizePropertyPanel.cxx |5 +++--
 svx/source/svdraw/svdedtv1.cxx  |4 ++--
 sw/source/ui/frmdlg/frmpage.cxx |5 +++--
 sw/source/uibase/shells/frmsh.cxx   |3 ++-
 sw/source/uibase/shells/grfsh.cxx   |7 ---
 sw/source/uibase/shells/slotadd.cxx |1 +
 11 files changed, 24 insertions(+), 15 deletions(-)

New commits:
commit cc66c52faac53b682732cc184fcd64e04100dfab
Author: Noel Grandin 
AuthorDate: Sun Dec 27 20:26:00 2020 +0200
Commit: Noel Grandin 
CommitDate: Mon Dec 28 07:23:31 2020 +0100

use SdrAngleItem for SID_ATTR_TRANSFORM_ANGLE

as a precursor to introdcing a strong_int type for hundredths
of a degree

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

diff --git a/cui/source/tabpages/transfrm.cxx b/cui/source/tabpages/transfrm.cxx
index cec57ecbbbe7..8845af0d27cd 100644
--- a/cui/source/tabpages/transfrm.cxx
+++ b/cui/source/tabpages/transfrm.cxx
@@ -30,6 +30,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 
 #include 
@@ -250,7 +251,7 @@ bool SvxAngleTabPage::FillItemSet(SfxItemSet* rSet)
 const double fTmpX((GetCoreValue(*m_xMtrPosX, ePoolUnit) + 
maAnchor.getX()) * fUIScale);
 const double fTmpY((GetCoreValue(*m_xMtrPosY, ePoolUnit) + 
maAnchor.getY()) * fUIScale);
 
-rSet->Put(SfxInt32Item(GetWhich(SID_ATTR_TRANSFORM_ANGLE), 
m_xCtlAngle->GetRotation()));
+rSet->Put(SdrAngleItem(GetWhich(SID_ATTR_TRANSFORM_ANGLE), 
m_xCtlAngle->GetRotation()));
 rSet->Put(SfxInt32Item(GetWhich(SID_ATTR_TRANSFORM_ROT_X), 
basegfx::fround(fTmpX)));
 rSet->Put(SfxInt32Item(GetWhich(SID_ATTR_TRANSFORM_ROT_Y), 
basegfx::fround(fTmpY)));
 
@@ -290,7 +291,7 @@ void SvxAngleTabPage::Reset(const SfxItemSet* rAttrs)
 pItem = GetItem( *rAttrs, SID_ATTR_TRANSFORM_ANGLE );
 if(pItem)
 {
-m_xCtlAngle->SetRotation(static_cast(pItem)->GetValue());
+m_xCtlAngle->SetRotation(static_cast(pItem)->GetValue());
 }
 else
 {
diff --git a/include/svx/svxids.hrc b/include/svx/svxids.hrc
index c057e16d81d7..91c7191dd104 100644
--- a/include/svx/svxids.hrc
+++ b/include/svx/svxids.hrc
@@ -51,6 +51,7 @@ class SvxLineItem;
 class SvxBoxInfoItem;
 class SfxStringItem;
 class SvxSetItem;
+class SdrAngleItem;
 
 // member IDs
 
@@ -249,7 +250,7 @@ class SvxSetItem;
 #define SID_ATTR_TRANSFORM_SIZE_POINT   
TypedWhichId( SID_SVX_START + 92 )
 #define SID_ATTR_TRANSFORM_ROT_X
TypedWhichId( SID_SVX_START + 93 )
 #define SID_ATTR_TRANSFORM_ROT_Y
TypedWhichId( SID_SVX_START + 94 )
-#define SID_ATTR_TRANSFORM_ANGLE
TypedWhichId( SID_SVX_START + 95 )
+#define SID_ATTR_TRANSFORM_ANGLE
TypedWhichId( SID_SVX_START + 95 )
 #define SID_ATTR_TRANSFORM_DELTA_ANGLE  
TypedWhichId( SID_SVX_START + 96 )
 // CAUTION! Range <96..100> used by SFX2 (!)
 #define SID_SIZE_ALL( SID_SVX_START + 101 )
diff --git a/sd/source/core/typemap.cxx b/sd/source/core/typemap.cxx
index 9353a808cbb4..046be764ba19 100644
--- a/sd/source/core/typemap.cxx
+++ b/sd/source/core/typemap.cxx
@@ -93,6 +93,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #define SFX_TYPEMAP
 #include 
diff --git a/svx/sdi/svx.sdi b/svx/sdi/svx.sdi
index 9d31cea9643b..32fda1bedab6 100644
--- a/svx/sdi/svx.sdi
+++ b/svx/sdi/svx.sdi
@@ -8753,7 +8753,7 @@ SvxULSpaceItem TopBottomMargin SID_ATTR_ULSPACE
 
 
 SfxVoidItem TransformDialog SID_ATTR_TRANSFORM
-(SfxUInt32Item TransformPosX SID_ATTR_TRANSFORM_POS_X,SfxUInt32Item 
TransformPosY SID_ATTR_TRANSFORM_POS_Y,SfxUInt32Item TransformWidth 
SID_ATTR_TRANSFORM_WIDTH, SfxUInt32Item TransformHeight 
SID_ATTR_TRANSFORM_HEIGHT,SfxUInt32Item TransformRotationDeltaAngle 
SID_ATTR_TRANSFORM_DELTA_ANGLE,SfxUInt32Item TransformRotationAngle 
SID_ATTR_TRANSFORM_ANGLE,SfxUInt32Item TransformRotationX 
SID_ATTR_TRANSFORM_ROT_X,SfxUInt32Item TransformRotationY 
SID_ATTR_TRANSFORM_ROT_Y)
+(SfxUInt32Item TransformPosX SID_ATTR_TRANSFORM_POS_X,SfxUInt32Item 
TransformPosY SID_ATTR_TRANSFORM_POS_Y,SfxUInt32Item TransformWidth 
SID_ATTR_TRANSFORM_WIDTH, SfxUInt32Item TransformHeight 
SID_ATTR_TRANSFORM_HEIGHT,SfxUInt32Item TransformRotationDeltaAngle 
SID_ATTR_TRANSFORM_DELTA_ANGLE,SdrAngleItem TransformRotationAngle 
SID_ATTR_TRANSFORM_ANGLE,SfxUInt32Item TransformRotationX 
SID_ATTR_TRANSFORM_ROT_X,SfxUInt32Item T

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

2020-11-03 Thread Heiko Tietze (via logerrit)
 cui/source/dialogs/FontFeaturesDialog.cxx |3 -
 cui/source/tabpages/chardlg.cxx   |   23 -
 include/svx/fntctrl.hxx   |1 
 reportdesign/source/ui/dlg/Condition.cxx  |1 
 svx/source/dialog/fntctrl.cxx |   53 +-
 sw/source/ui/config/optpage.cxx   |2 -
 6 files changed, 24 insertions(+), 59 deletions(-)

New commits:
commit 6f3899b27156591e65f62649a92c727eb6f5dd03
Author: Heiko Tietze 
AuthorDate: Thu Oct 29 15:03:44 2020 +0100
Commit: Caolán McNamara 
CommitDate: Tue Nov 3 22:02:24 2020 +0100

Resolves tdf#137059 - Use application colors for font preview

Background is set to document's application color now
(options > application colors > document) to provide
a true WYSIWYG experience (except for modifications
to the page background color).

Change-Id: Ifd78e667f3eeff3573ff09bcb4d2a9634dd49c99
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105011
Tested-by: Jenkins
Tested-by: Caolán McNamara 
Reviewed-by: Mike Kaganski 
Reviewed-by: Caolán McNamara 

diff --git a/cui/source/dialogs/FontFeaturesDialog.cxx 
b/cui/source/dialogs/FontFeaturesDialog.cxx
index a34912d5d0f2..c1e79b4515d7 100644
--- a/cui/source/dialogs/FontFeaturesDialog.cxx
+++ b/cui/source/dialogs/FontFeaturesDialog.cxx
@@ -26,9 +26,6 @@ FontFeaturesDialog::FontFeaturesDialog(weld::Window* pParent, 
OUString const& rF
 , m_xContentGrid(m_xBuilder->weld_container("contentGrid"))
 , m_xPreviewWindow(new weld::CustomWeld(*m_xBuilder, "preview", 
m_aPreviewWindow))
 {
-svtools::ColorConfig aColorConfig;
-Color aFillColor(aColorConfig.GetColorValue(svtools::DOCCOLOR).nColor);
-m_aPreviewWindow.SetBackColor(aFillColor);
 initialize();
 }
 
diff --git a/cui/source/tabpages/chardlg.cxx b/cui/source/tabpages/chardlg.cxx
index 4ec72e217772..1000dbf0983e 100644
--- a/cui/source/tabpages/chardlg.cxx
+++ b/cui/source/tabpages/chardlg.cxx
@@ -1346,15 +1346,6 @@ void SvxCharEffectsPage::EnableNoneFontColor()
 m_bEnableNoneFontColor = true;
 }
 
-Color SvxCharEffectsPage::GetPreviewFontColor(const Color& rColor) const
-{
-if (rColor == COL_AUTO)
-return COL_BLACK;
-if (m_bEnableNoneFontColor && rColor == COL_NONE_COLOR)
-return COL_BLACK;
-return rColor;
-}
-
 SvxCharEffectsPage::~SvxCharEffectsPage()
 {
 m_xUnderlineColorLB.reset();
@@ -1431,9 +1422,10 @@ void SvxCharEffectsPage::UpdatePreview_Impl()
 SvxFont& rCTLFont = GetPreviewCTLFont();
 
 const Color& rSelectedColor = m_xFontColorLB->GetSelectEntryColor();
-rFont.SetColor(GetPreviewFontColor(rSelectedColor));
-rCJKFont.SetColor(GetPreviewFontColor(rSelectedColor));
-rCTLFont.SetColor(GetPreviewFontColor(rSelectedColor));
+rFont.SetColor(rSelectedColor);
+rCJKFont.SetColor(rSelectedColor);
+rCTLFont.SetColor(rSelectedColor);
+m_aPreviewWin.AutoCorrectFontColor(); // handle color COL_AUTO
 
 FontLineStyle eUnderline = 
static_cast(m_xUnderlineLB->get_active_id().toInt32());
 FontLineStyle eOverline = 
static_cast(m_xOverlineLB->get_active_id().toInt32());
@@ -1544,9 +1536,10 @@ void SvxCharEffectsPage::ResetColor_Impl( const 
SfxItemSet& rSet )
 
 const SvxColorItem& rItem = static_cast(rSet.Get( nWhich ));
 Color aColor = rItem.GetValue();
-rFont.SetColor(GetPreviewFontColor(aColor));
-rCJKFont.SetColor(GetPreviewFontColor(aColor));
-rCTLFont.SetColor(GetPreviewFontColor(aColor));
+rFont.SetColor(aColor);
+rCJKFont.SetColor(aColor);
+rCTLFont.SetColor(aColor);
+m_aPreviewWin.AutoCorrectFontColor(); // handle color COL_AUTO
 
 m_aPreviewWin.Invalidate();
 
diff --git a/include/svx/fntctrl.hxx b/include/svx/fntctrl.hxx
index c84289ac9017..1751c3ac85bb 100644
--- a/include/svx/fntctrl.hxx
+++ b/include/svx/fntctrl.hxx
@@ -49,7 +49,6 @@ public:
 SvxFont&GetCTLFont();
 voidSetColor( const Color& rColor );
 voidResetColor();
-voidSetBackColor( const Color& rColor );
 voidSetTextLineColor(const Color& rColor);
 voidSetOverlineColor(const Color& rColor);
 voidPaint( vcl::RenderContext& rRenderContext, const 
tools::Rectangle& ) override;
diff --git a/reportdesign/source/ui/dlg/Condition.cxx 
b/reportdesign/source/ui/dlg/Condition.cxx
index 9f7b8bbd5ccd..2b44e1e549be 100644
--- a/reportdesign/source/ui/dlg/Condition.cxx
+++ b/reportdesign/source/ui/dlg/Condition.cxx
@@ -324,7 +324,6 @@ void Condition::updateToolbar(const uno::Reference< 
report::XReportControlFormat
 aFont.SetRelief( static_cast< FontRelief >( 
_xReportControlFormat->getCharRelief() ) );
 aFont.SetColor( Color(_xReportControlFormat->getCharColor()) );
 m_aPreview.SetFont( aFont, aFont, aFont );
-m_a

[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, &sameColor, &sameColor, 
&sameDistColor },
-{ SvxBorderLineStyle::DOTTED,   0, &sameColor, &sameColor, 
&sameDistColor },
-{ SvxBorderLineStyle::DASHED,   0, &sameColor, &sameColor, 
&sameDistColor },
-{ SvxBorderLineStyle::FINE_DASHED,  0, &sameColor, &sameColor, 
&sameDistColor },
-{ SvxBorderLineStyle::DASH_DOT, 0, &sameColor, &sameColor, 
&sameDistColor },
-{ SvxBorderLineStyle::DASH_DOT_DOT, 0, &sameColor, &sameColor, 
&sameDistColor },
+{ SvxBorderLineStyle::SOL

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

2020-10-26 Thread Szabolcs Toth (via logerrit)
 cui/source/tabpages/swpossizetabpage.cxx |6 --
 include/svx/swframeposstrings.hxx|1 +
 svx/inc/swframeposstrings.hrc|1 +
 3 files changed, 6 insertions(+), 2 deletions(-)

New commits:
commit 6a10ea009ef590ac13d01d19fbfbc28c916ef1d4
Author: Szabolcs Toth 
AuthorDate: Thu Oct 22 12:23:43 2020 +0200
Commit: László Németh 
CommitDate: Mon Oct 26 10:38:02 2020 +0100

tdf#137650 sw page top border relative orientation: add UI

as new menu item "page text area top" of Position/Vertical
popup menu "to:" in Position and Size dialog window of
shapes.

Follow-up of commit 1c593e1916c9164c7db71da2017cfc26972f8e9f
(tdf#133045 sw: add shape alignment to the top page border).
See also commit 8af2c4e3a517e3b75f2ace9719c1ca03153baddf
(sw from-bottom relative orientation: add UI)

Change-Id: I98671fa9c7c184c8f360ccb35e671df68cd271b5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104661
Tested-by: László Németh 
Reviewed-by: László Németh 

diff --git a/cui/source/tabpages/swpossizetabpage.cxx 
b/cui/source/tabpages/swpossizetabpage.cxx
index b0366bf48053..2b9c8c70a4b4 100644
--- a/cui/source/tabpages/swpossizetabpage.cxx
+++ b/cui/source/tabpages/swpossizetabpage.cxx
@@ -98,8 +98,9 @@ enum class LB {
 VertLine= 0x08, // vertical text line
 
 RelPagePrintAreaBottom = 0x10, // bottom of text area of page
+RelPagePrintAreaTop = 0x20,
 
-LAST = 0x20
+LAST = 0x40
 };
 
 }
@@ -118,6 +119,7 @@ RelationMap const aRelationMap[] =
 {SvxSwFramePosString::REL_FRM_RIGHT, 
SvxSwFramePosString::MIR_REL_FRM_RIGHT, LB::RelFrameRight,   
RelOrientation::FRAME_RIGHT},
 {SvxSwFramePosString::REL_PG_FRAME,  SvxSwFramePosString::REL_PG_FRAME,
  LB::RelPageFrame,RelOrientation::PAGE_FRAME},
 {SvxSwFramePosString::REL_PG_PRTAREA,SvxSwFramePosString::REL_PG_PRTAREA,  
  LB::RelPagePrintArea,  RelOrientation::PAGE_PRINT_AREA},
+
{SvxSwFramePosString::REL_PG_PRTAREA_TOP,SvxSwFramePosString::REL_PG_PRTAREA_TOP,
LB::RelPagePrintAreaTop,  RelOrientation::PAGE_PRINT_AREA_TOP},
 
{SvxSwFramePosString::REL_PG_PRTAREA_BOTTOM,SvxSwFramePosString::REL_PG_PRTAREA_BOTTOM,
LB::RelPagePrintAreaBottom,  RelOrientation::PAGE_PRINT_AREA_BOTTOM},
 {SvxSwFramePosString::REL_CHAR,  SvxSwFramePosString::REL_CHAR,
  LB::RelChar,RelOrientation::CHAR},
 
@@ -259,7 +261,7 @@ FrmMap const aHParaHtmlAbsMap[] =
 
 
 constexpr auto VERT_PARA_REL = LB::VertFrame|LB::VertPrintArea|
-  
LB::RelPageFrame|LB::RelPagePrintArea|LB::RelPagePrintAreaBottom;
+  LB::RelPageFrame|LB::RelPagePrintArea| 
LB::RelPagePrintAreaTop |LB::RelPagePrintAreaBottom;
 
 FrmMap const aVParaMap[] =
 {
diff --git a/include/svx/swframeposstrings.hxx 
b/include/svx/swframeposstrings.hxx
index 346553c70ec8..2aca2f195fbb 100644
--- a/include/svx/swframeposstrings.hxx
+++ b/include/svx/swframeposstrings.hxx
@@ -49,6 +49,7 @@ public:
 MIR_REL_FRM_RIGHT  ,
 REL_PG_FRAME   ,
 REL_PG_PRTAREA ,
+REL_PG_PRTAREA_TOP ,
 REL_PG_PRTAREA_BOTTOM  ,
 REL_BASE   ,
 REL_CHAR   ,
diff --git a/svx/inc/swframeposstrings.hrc b/svx/inc/swframeposstrings.hrc
index b08a9a3b525b..1d3da664b208 100644
--- a/svx/inc/swframeposstrings.hrc
+++ b/svx/inc/swframeposstrings.hrc
@@ -43,6 +43,7 @@ const char* RID_SVXSW_FRAMEPOSITIONS[] =
 NC_("RID_SVXSW_FRAMEPOSITIONS", "Outer paragraph border"),
 NC_("RID_SVXSW_FRAMEPOSITIONS", "Entire page"),
 NC_("RID_SVXSW_FRAMEPOSITIONS", "Page text area"),
+NC_("RID_SVXSW_FRAMEPOSITIONS", "Page text area top"),
 NC_("RID_SVXSW_FRAMEPOSITIONS", "Page text area bottom"),
 NC_("RID_SVXSW_FRAMEPOSITIONS", "Base line"),
 NC_("RID_SVXSW_FRAMEPOSITIONS", "Character"),
___
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

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

2020-06-18 Thread Noel Grandin (via logerrit)
 cui/source/inc/chardlg.hxx  |1 -
 cui/source/tabpages/chardlg.cxx |   34 --
 include/svx/flagsdef.hxx|5 -
 3 files changed, 4 insertions(+), 36 deletions(-)

New commits:
commit fd652938473aaaf0f716ea5c29ebb715ca7c290c
Author: Noel Grandin 
AuthorDate: Thu Jun 18 15:06:16 2020 +0200
Commit: Noel Grandin 
CommitDate: Thu Jun 18 21:25:43 2020 +0200

remove some dead defines

DISABLE_UNDERLINE_COLOR, DISABLE_WORDLINE, DISABLE_LANGUAGE
are dead since
commit ff178cca3384a1d15dcf51491df6196e487f47f4
Author: Caolán McNamara 
Date:   Mon Jun 8 12:21:01 2015 +0100
Resolves: tdf#91932 enable CaseMap property in impress/draw

DISABLE_BLINK is dead since
commit 1eb6210d678bbb0c875f0f72bd876a9e7795dfbe
Author: Gabor Kelemen 
Date:   Thu Apr 23 00:39:33 2020 +0200
tdf#132373 Remove blinking character property from the UI/editor

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

diff --git a/cui/source/inc/chardlg.hxx b/cui/source/inc/chardlg.hxx
index 06007847e9f2..e84ea0f162fa 100644
--- a/cui/source/inc/chardlg.hxx
+++ b/cui/source/inc/chardlg.hxx
@@ -166,7 +166,6 @@ private:
 bool   m_bEnableNoneFontColor;
 Color  m_aOrigFontColor;
 sal_uInt16 m_nHtmlMode;
-bool   m_bUnderlineColorDisabled;
 
 std::unique_ptr m_xFontColorFT;
 std::unique_ptr m_xFontColorLB;
diff --git a/cui/source/tabpages/chardlg.cxx b/cui/source/tabpages/chardlg.cxx
index 307be4f93e22..8c7cef3cb816 100644
--- a/cui/source/tabpages/chardlg.cxx
+++ b/cui/source/tabpages/chardlg.cxx
@@ -1266,16 +1266,6 @@ void SvxCharNamePage::EnableSearchMode()
 
 void SvxCharNamePage::DisableControls( sal_uInt16 nDisable )
 {
-if ( DISABLE_LANGUAGE & nDisable )
-{
-if ( m_xWestFontLanguageFT ) 
m_xWestFontLanguageFT->set_sensitive(false);
-if ( m_xWestFontLanguageLB ) 
m_xWestFontLanguageLB->set_sensitive(false);
-if ( m_xEastFontLanguageFT ) 
m_xEastFontLanguageFT->set_sensitive(false);
-if ( m_xEastFontLanguageLB ) 
m_xEastFontLanguageLB->set_sensitive(false);
-if ( m_xCTLFontLanguageFT ) m_xCTLFontLanguageFT->set_sensitive(false);
-if ( m_xCTLFontLanguageLB ) m_xCTLFontLanguageLB->set_sensitive(false);
-}
-
 if ( DISABLE_HIDE_LANGUAGE & nDisable )
 {
 if ( m_xWestFontLanguageFT ) m_xWestFontLanguageFT->hide();
@@ -1314,7 +1304,6 @@ SvxCharEffectsPage::SvxCharEffectsPage(weld::Container* 
pPage, weld::DialogContr
 , m_bOrigFontColor(false)
 , m_bNewFontColor(false)
 , m_bEnableNoneFontColor(false)
-, m_bUnderlineColorDisabled(false)
 , m_xFontColorFT(m_xBuilder->weld_label("fontcolorft"))
 , m_xFontColorLB(new 
ColorListBox(m_xBuilder->weld_menu_button("fontcolorlb"), 
pController->getDialog()))
 , m_xFontTransparencyFT(m_xBuilder->weld_label("fonttransparencyft"))
@@ -1638,14 +1627,10 @@ void SvxCharEffectsPage::SelectHdl_Impl(const 
weld::ComboBox* pBox)
 }
 else if (m_xPositionLB.get() != pBox)
 {
-bool bUEnable = false;
-if (!m_bUnderlineColorDisabled)
-{
-auto nUPos = m_xUnderlineLB->get_active();
-bUEnable = nUPos > 0;
-m_xUnderlineColorFT->set_sensitive(bUEnable);
-m_xUnderlineColorLB->set_sensitive(bUEnable);
-}
+auto nUPos = m_xUnderlineLB->get_active();
+bool bUEnable = nUPos > 0;
+m_xUnderlineColorFT->set_sensitive(bUEnable);
+m_xUnderlineColorLB->set_sensitive(bUEnable);
 
 auto nOPos = m_xOverlineLB->get_active();
 bool bOEnable = nOPos > 0;
@@ -2363,17 +2348,6 @@ void SvxCharEffectsPage::DisableControls( sal_uInt16 
nDisable )
 m_xEffectsFT->set_sensitive(false);
 m_xEffectsLB->set_sensitive(false);
 }
-
-if ( ( DISABLE_WORDLINE & nDisable ) == DISABLE_WORDLINE )
-m_xIndividualWordsBtn->set_sensitive(false);
-
-if ( ( DISABLE_UNDERLINE_COLOR & nDisable ) == DISABLE_UNDERLINE_COLOR )
-{
-// disable the controls
-m_xUnderlineColorFT->set_sensitive(false);
-m_xUnderlineColorLB->set_sensitive(false);
-m_bUnderlineColorDisabled = true;
-}
 }
 
 void SvxCharEffectsPage::PageCreated(const SfxAllItemSet& aSet)
diff --git a/include/svx/flagsdef.hxx b/include/svx/flagsdef.hxx
index 93b1397442d3..b098b141be11 100644
--- a/include/svx/flagsdef.hxx
+++ b/include/svx/flagsdef.hxx
@@ -54,11 +54,6 @@ namespace o3tl
 #define SVX_HIDESHADOWCTL   0x01
 
 #define DISABLE_CASEMAP (sal_uInt16(0x0001))
-#define DISABLE_WORDLINE(sal_uInt16(0x0002))
-#define DISABLE_BLINK   (sal_uInt16(0x0004))
-#define DISABLE_UNDERLINE_COLOR (sal_uInt16(0x0008))

[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 sd/source svx/source

2020-06-09 Thread Miklos Vajna (via logerrit)
 cui/source/dialogs/signature-line-draw.svg |   10 ++---
 include/svx/signaturelinehelper.hxx|8 
 sd/source/ui/func/fuconrec.cxx |   50 -
 svx/source/dialog/signaturelinehelper.cxx  |   27 +++
 4 files changed, 68 insertions(+), 27 deletions(-)

New commits:
commit f1566f0b813e439531a37154b52d491fd9d3224b
Author: Miklos Vajna 
AuthorDate: Tue Jun 9 18:03:22 2020 +0200
Commit: Miklos Vajna 
CommitDate: Tue Jun 9 23:44:55 2020 +0200

sd signature line: select certificate after drawing the shape's rectangle

Also move the shape-type-specific setup to
FuConstructRectangle::SetAttributes() where the rest of the shape types
are handled.

Change-Id: I9ecf94957ec82ba187f2767b01d96fb14de2b657
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95958
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 cd256d098a27..564b5cdf3ef9 100644
--- a/cui/source/dialogs/signature-line-draw.svg
+++ b/cui/source/dialogs/signature-line-draw.svg
@@ -1,5 +1,5 @@
 
-http://purl.org/dc/elements/1.1/"; 
xmlns:cc="http://creativecommons.org/ns#"; 
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"; 
xmlns:svg="http://www.w3.org/2000/svg"; xmlns="http://www.w3.org/2000/svg"; 
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"; 
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"; version="1.2" 
width="90mm" height="45mm" viewBox="0 0 9000 4500" 
preserveAspectRatio="xMidYMid" fill-rule="evenodd" stroke-width="28.222" 
stroke-linejoin="round" xml:space="preserve" id="svg577" 
inkscape:version="0.92.2 5c3e80d, 2017-08-06">
+http://purl.org/dc/elements/1.1/"; 
xmlns:cc="http://creativecommons.org/ns#"; 
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"; 
xmlns:svg="http://www.w3.org/2000/svg"; xmlns="http://www.w3.org/2000/svg"; 
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"; 
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"; version="1.2" 
width="90mm" height="45mm" viewBox="0 0 9000 4500" 
preserveAspectRatio="xMidYMid" xml:space="preserve" id="svg577" 
inkscape:version="0.92.2 5c3e80d, 2017-08-06" sodipodi:docname="test.svg" 
stroke-linejoin="round" stroke-width="28.222" fill-rule="evenodd">
   
 
   
@@ -9,7 +9,7 @@
   
 
   
-  
+  
   
 
   
@@ -28,9 +28,9 @@
   
   
 
-[SIGNER_NAME]
-Digitally 
signed by:
-Date: 
[DATE]
+Digitally signed by:
+[SIGNER_NAME]
+Date: [DATE]
 
   
 
diff --git a/include/svx/signaturelinehelper.hxx 
b/include/svx/signaturelinehelper.hxx
index 4cdb40651479..0906d88ef095 100644
--- a/include/svx/signaturelinehelper.hxx
+++ b/include/svx/signaturelinehelper.hxx
@@ -21,6 +21,7 @@ namespace weld
 {
 class Window;
 }
+class SdrView;
 class SfxObjectShell;
 
 namespace svx::SignatureLineHelper
@@ -52,6 +53,13 @@ SVX_DLLPUBLIC OUString getLocalizedDate();
  * Interprets rSVG as a graphic and gives back the resuling UNO wrapper.
  */
 SVX_DLLPUBLIC css::uno::Reference importSVG(const 
OUString& rSVG);
+
+/**
+ * Sets xCertificate as the signing certificate of the selected shape on pView.
+ */
+SVX_DLLPUBLIC void
+setShapeCertificate(SdrView* pView,
+const css::uno::Reference& 
xCertificate);
 }
 
 #endif
diff --git a/sd/source/ui/func/fuconrec.cxx b/sd/source/ui/func/fuconrec.cxx
index 63daa06171c4..91ed61ad3d63 100644
--- a/sd/source/ui/func/fuconrec.cxx
+++ b/sd/source/ui/func/fuconrec.cxx
@@ -59,6 +59,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #include 
 #include 
@@ -430,28 +431,6 @@ void FuConstructRectangle::Activate()
 
 void FuConstructRectangle::Deactivate()
 {
-if (nSlotId == SID_INSERT_SIGNATURELINE)
-{
-const SdrMarkList& rMarkList = mpView->GetMarkedObjectList();
-if (rMarkList.GetMarkCount() > 0)
-{
-// Avoid the default solid fill and line, we'll set a graphic 
instead.
-const SdrMark* pMark = rMarkList.GetMark(0);
-SdrObject* pObject = pMark->GetMarkedSdrObj();
-SfxItemSet aSet = pObject->GetMergedItemSet();
-
-XFillStyleItem aFillStyleItem(aSet.Get(XATTR_FILLSTYLE));
-aFillStyleItem.SetValue(drawing::FillStyle_NONE);
-aSet.Put(aFillStyleItem);
-
-XLineStyleItem aLineStyleItem(aSet.Get(XATTR_LINESTYLE));
-aLineStyleItem.SetValue(drawing::LineStyle_NONE);
-aSet.Put(aLineStyleItem);
-
-pObject->SetMergedItemSet(aSet);
-}
-}
-
 if( nSlotId == SID_TOOL_CONNECTOR   ||
 nSlotId == SID_CONNECTOR_ARROW_START||
 nSlotId == SID_CONNECTOR_ARROW_END  ||
@@ -491,6 +470,27 @@ void FuConstructRectangle::Deactivate()
 mpView->SetGlueVisible( false );
 }
 FuConstruct::Deactivate();
+
+if (nSlotId != SID_INSERT_SIGNATURELINE)
+

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

2020-06-08 Thread Miklos Vajna (via logerrit)
 cui/source/dialogs/SignSignatureLineDialog.cxx |   48 +
 cui/source/dialogs/SignatureLineDialog.cxx |   14 --
 cui/source/dialogs/SignatureLineDialogBase.cxx |   14 --
 cui/source/inc/SignatureLineDialogBase.hxx |1 
 include/svx/signaturelinehelper.hxx|   59 +++
 svx/Library_svx.mk |1 
 svx/source/dialog/signaturelinehelper.cxx  |  124 +
 7 files changed, 195 insertions(+), 66 deletions(-)

New commits:
commit 85b68061a5a904ca82e5db40600af741d30f0bb8
Author: Miklos Vajna 
AuthorDate: Mon Jun 8 17:14:14 2020 +0200
Commit: Miklos Vajna 
CommitDate: Mon Jun 8 20:15:06 2020 +0200

sd signature line: extract part of signature line UI from cui to svx

So the "sign existing pdf" code in sd can reuse that.

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

diff --git a/cui/source/dialogs/SignSignatureLineDialog.cxx 
b/cui/source/dialogs/SignSignatureLineDialog.cxx
index 10f80f72983d..80e8f9815053 100644
--- a/cui/source/dialogs/SignSignatureLineDialog.cxx
+++ b/cui/source/dialogs/SignSignatureLineDialog.cxx
@@ -31,6 +31,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #include 
 #include 
@@ -167,33 +168,14 @@ IMPL_LINK_NOARG(SignSignatureLineDialog, 
chooseCertificate, weld::Button&, void)
 if (!pShell->PrepareForSigning(m_xDialog.get()))
 return;
 
-Reference xSigner;
-if (pShell->GetMedium()->GetFilter()->IsAlienFormat())
-{
-xSigner
-= 
DocumentDigitalSignatures::createDefault(comphelper::getProcessComponentContext());
-}
-else
-{
-OUString const aODFVersion(
-
comphelper::OStorageHelper::GetODFVersionFromStorage(pShell->GetStorage()));
-xSigner = DocumentDigitalSignatures::createWithVersion(
-comphelper::getProcessComponentContext(), aODFVersion);
-}
-xSigner->setParentWindow(m_xDialog->GetXWindow());
-OUString aDescription;
-CertificateKind certificateKind = CertificateKind_NONE;
-// When signing ooxml, we only want X.509 certificates
-if (pShell->GetMedium()->GetFilter()->IsAlienFormat())
-certificateKind = CertificateKind_X509;
 Reference xSignCertificate
-= xSigner->selectSigningCertificateWithType(certificateKind, 
aDescription);
+= svx::SignatureLineHelper::getSignatureCertificate(pShell, 
m_xDialog.get());
 
 if (xSignCertificate.is())
 {
 m_xSelectedCertifate = xSignCertificate;
-m_xBtnChooseCertificate->set_label(xmlsec::GetContentPart(
-xSignCertificate->getSubjectName(), 
xSignCertificate->getCertificateKind()));
+m_xBtnChooseCertificate->set_label(
+svx::SignatureLineHelper::getSignerName(xSignCertificate));
 }
 ValidateFields();
 }
@@ -229,15 +211,13 @@ void SignSignatureLineDialog::Apply()
 css::uno::Reference 
SignSignatureLineDialog::getSignedGraphic(bool bValid)
 {
 // Read svg and replace placeholder texts
-OUString aSvgImage(getSignatureImage());
+OUString aSvgImage(svx::SignatureLineHelper::getSignatureImage());
 aSvgImage = aSvgImage.replaceAll("[SIGNER_NAME]", 
getCDataString(m_aSuggestedSignerName));
 aSvgImage = aSvgImage.replaceAll("[SIGNER_TITLE]", 
getCDataString(m_aSuggestedSignerTitle));
 
 OUString aIssuerLine
 = CuiResId(RID_SVXSTR_SIGNATURELINE_SIGNED_BY)
-  .replaceFirst("%1",
-
xmlsec::GetContentPart(m_xSelectedCertifate->getSubjectName(),
-   
m_xSelectedCertifate->getCertificateKind()));
+  .replaceFirst("%1", 
svx::SignatureLineHelper::getSignerName(m_xSelectedCertifate));
 aSvgImage = aSvgImage.replaceAll("[SIGNED_BY]", 
getCDataString(aIssuerLine));
 if (bValid)
 aSvgImage = aSvgImage.replaceAll("[INVALID_SIGNATURE]", "");
@@ -245,10 +225,7 @@ css::uno::Reference 
SignSignatureLineDialog::getSignedGr
 OUString aDate;
 if (m_bShowSignDate && bValid)
 {
-const SvtSysLocale aSysLocale;
-const LocaleDataWrapper& rLocaleData = aSysLocale.GetLocaleData();
-Date aDateTime(Date::SYSTEM);
-aDate = rLocaleData.getDate(aDateTime);
+aDate = svx::SignatureLineHelper::getLocalizedDate();
 }
 aSvgImage = aSvgImage.replaceAll("[DATE]", aDate);
 
@@ -278,16 +255,7 @@ css::uno::Reference 
SignSignatureLineDialog::getSignedGr
 }
 
 // Create graphic
-SvMemoryStream aSvgStream(4096, 4096);
-aSvgStream.WriteOString(OUStringToOString(aSvgImage, 
RTL_TEXTENCODING_UTF8));
-Reference xInputStream(new 
utl::OSeekableInputStreamWrapper(aSvgStream));
-Reference 
xContext(comphelper::getProcessComponentContext());
-Reference xProvider = 
css::graphic::GraphicProvider::create(xContext);
-
-Sequence aMediaProp

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

2020-05-21 Thread Szymon Kłos (via logerrit)
 cui/source/dialogs/newtabledlg.cxx   |   10 -
 cui/source/factory/dlgfact.cxx   |4 
 cui/source/factory/dlgfact.hxx   |2 
 cui/source/inc/newtabledlg.hxx   |   42 ++-
 include/svx/svxdlg.hxx   |7 -
 sd/source/ui/table/tablefunction.cxx |  196 +++
 6 files changed, 151 insertions(+), 110 deletions(-)

New commits:
commit b516387cda854c93af29d270816b8acdb86d4d36
Author: Szymon Kłos 
AuthorDate: Wed May 20 18:53:39 2020 +0200
Commit: Szymon Kłos 
CommitDate: Thu May 21 11:19:05 2020 +0200

Make Impress Insert Table dialog async

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

diff --git a/cui/source/dialogs/newtabledlg.cxx 
b/cui/source/dialogs/newtabledlg.cxx
index af4d91f1b1c5..16e81f8d90ea 100644
--- a/cui/source/dialogs/newtabledlg.cxx
+++ b/cui/source/dialogs/newtabledlg.cxx
@@ -26,16 +26,6 @@ SvxNewTableDialog::SvxNewTableDialog(weld::Window* pWindow)
 {
 }
 
-SvxNewTableDialog::~SvxNewTableDialog()
-{
-disposeOnce();
-}
-
-short SvxNewTableDialog::Execute()
-{
-return m_xDialog->run();
-}
-
 sal_Int32 SvxNewTableDialog::getRows() const
 {
 return sal::static_int_cast< sal_Int32 >( mxNumRows->get_value() );
diff --git a/cui/source/factory/dlgfact.cxx b/cui/source/factory/dlgfact.cxx
index b4d16c5a92d5..40102bae726a 100644
--- a/cui/source/factory/dlgfact.cxx
+++ b/cui/source/factory/dlgfact.cxx
@@ -1628,9 +1628,9 @@ VclPtr 
AbstractDialogFactory_Impl::CreateSvxSplitTa
 return VclPtr::Create( pParent, bIsTableVertical, 
nMaxVertical, 99 );
 }
 
-VclPtr 
AbstractDialogFactory_Impl::CreateSvxNewTableDialog(weld::Window* pParent)
+std::shared_ptr 
AbstractDialogFactory_Impl::CreateSvxNewTableDialog(weld::Window* pParent)
 {
-return VclPtr::Create(pParent);
+return std::make_shared(pParent);
 }
 
 VclPtr 
AbstractDialogFactory_Impl::CreateOptionsDialog(weld::Window* pParent, const 
OUString& rExtensionId)
diff --git a/cui/source/factory/dlgfact.hxx b/cui/source/factory/dlgfact.hxx
index 38de7db093fc..4f54b03f91d4 100644
--- a/cui/source/factory/dlgfact.hxx
+++ b/cui/source/factory/dlgfact.hxx
@@ -944,7 +944,7 @@ public:
 
 virtual VclPtr 
CreateSvxSplitTableDialog(weld::Window* pParent, bool bIsTableVertical, long 
nMaxVertical) override;
 
-virtual VclPtr 
CreateSvxNewTableDialog(weld::Window* pParent) override ;
+virtual std::shared_ptr 
CreateSvxNewTableDialog(weld::Window* pParent) override ;
 
 virtual VclPtr  CreateOptionsDialog(
 weld::Window* pParent, const OUString& rExtensionId ) override;
diff --git a/cui/source/inc/newtabledlg.hxx b/cui/source/inc/newtabledlg.hxx
index 320b319d315d..9ec717c70ab1 100644
--- a/cui/source/inc/newtabledlg.hxx
+++ b/cui/source/inc/newtabledlg.hxx
@@ -22,7 +22,7 @@
 #include 
 #include 
 
-class SvxNewTableDialog : public SvxAbstractNewTableDialog, public 
weld::GenericDialogController
+class SvxNewTableDialog : public weld::GenericDialogController
 {
 private:
 std::unique_ptr mxNumColumns;
@@ -30,12 +30,44 @@ private:
 
 public:
 SvxNewTableDialog(weld::Window* pParent);
-virtual ~SvxNewTableDialog() override;
 
-virtual short Execute() override;
+virtual sal_Int32 getRows() const;
+virtual sal_Int32 getColumns() const;
+};
+
+class SvxNewTableDialogWrapper : public SvxAbstractNewTableDialog
+{
+private:
+std::shared_ptr m_xDlg;
+
+public:
+SvxNewTableDialogWrapper(weld::Window* pParent)
+: m_xDlg(std::make_shared(pParent))
+{
+}
+
+virtual std::shared_ptr getDialogController() 
override
+{
+return m_xDlg;
+}
+
+virtual sal_Int32 getRows() const override
+{
+SvxNewTableDialog* pDlg = 
dynamic_cast(m_xDlg.get());
+if (pDlg)
+return pDlg->getRows();
+
+return 0;
+}
+
+virtual sal_Int32 getColumns() const override
+{
+SvxNewTableDialog* pDlg = 
dynamic_cast(m_xDlg.get());
+if (pDlg)
+return pDlg->getColumns();
 
-virtual sal_Int32 getRows() const override;
-virtual sal_Int32 getColumns() const override;
+return 0;
+}
 };
 
 #endif // INCLUDED_CUI_SOURCE_INC_NEWTABLEDLG_HXX
diff --git a/include/svx/svxdlg.hxx b/include/svx/svxdlg.hxx
index 76ef0d3c35cb..7fb3767ad742 100644
--- a/include/svx/svxdlg.hxx
+++ b/include/svx/svxdlg.hxx
@@ -300,13 +300,14 @@ public:
 virtual void SetSplitVerticalByDefault() = 0;
 };
 
-class SvxAbstractNewTableDialog : public VclAbstractDialog
+class SvxAbstractNewTableDialog
 {
 protected:
-virtual ~SvxAbstractNewTableDialog() override = default;
+virtual ~SvxAbstractNewTableDialog() = default;
 public:
 virtual sal_Int32 getRows() const = 0;
 virtual sal_Int32 getColumns() const = 0;
+  

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

2020-05-05 Thread Miklos Vajna (via logerrit)
 cui/source/tabpages/swpossizetabpage.cxx |   11 +++
 include/svx/swframeposstrings.hxx|1 +
 svx/inc/swframeposstrings.hrc|1 +
 3 files changed, 9 insertions(+), 4 deletions(-)

New commits:
commit 8af2c4e3a517e3b75f2ace9719c1ca03153baddf
Author: Miklos Vajna 
AuthorDate: Tue May 5 13:59:16 2020 +0200
Commit: Miklos Vajna 
CommitDate: Tue May 5 16:35:18 2020 +0200

sw from-bottom relative orientation: add UI

And fix the value of LAST: it seems this went wrong in commit
c2fc91664f71c447209d2cd29c0df1d7faba4927 (Convert LB flags to scoped
enum, 2016-05-14), where the upper limit went from 0x8000 to
0x08, which means it started to matter if we allow equality or not.
Other places compare LAST without allowing equality, so leave that
unchanged and instead give LAST its own value.

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

diff --git a/cui/source/tabpages/swpossizetabpage.cxx 
b/cui/source/tabpages/swpossizetabpage.cxx
index f8d6beeb9649..a0a80e80e537 100644
--- a/cui/source/tabpages/swpossizetabpage.cxx
+++ b/cui/source/tabpages/swpossizetabpage.cxx
@@ -99,13 +99,15 @@ enum class LB {
 // #i22341#
 VertLine= 0x08, // vertical text line
 
-LAST = VertLine
+RelPagePrintAreaBottom = 0x10, // bottom of text area of page
+
+LAST = 0x20
 };
 
 }
 
 namespace o3tl {
-template<> struct typed_flags : is_typed_flags {};
+template<> struct typed_flags : is_typed_flags {};
 }
 
 static RelationMap const aRelationMap[] =
@@ -118,6 +120,7 @@ static RelationMap const aRelationMap[] =
 {SwFPos::REL_FRM_RIGHT, SwFPos::MIR_REL_FRM_RIGHT, LB::RelFrameRight,   
RelOrientation::FRAME_RIGHT},
 {SwFPos::REL_PG_FRAME,  SwFPos::REL_PG_FRAME,  LB::RelPageFrame,
RelOrientation::PAGE_FRAME},
 {SwFPos::REL_PG_PRTAREA,SwFPos::REL_PG_PRTAREA,LB::RelPagePrintArea,  
RelOrientation::PAGE_PRINT_AREA},
+{SwFPos::REL_PG_PRTAREA_BOTTOM,SwFPos::REL_PG_PRTAREA_BOTTOM,
LB::RelPagePrintAreaBottom,  RelOrientation::PAGE_PRINT_AREA_BOTTOM},
 {SwFPos::REL_CHAR,  SwFPos::REL_CHAR,  LB::RelChar,
RelOrientation::CHAR},
 
 {SwFPos::FLY_REL_PG_LEFT,   SwFPos::FLY_MIR_REL_PG_LEFT,
LB::FlyRelPageLeft, RelOrientation::PAGE_LEFT},
@@ -265,7 +268,7 @@ static FrmMap const aVParaMap[] =
 {SwFPos::TOP,   SwFPos::TOP,VertOrientation::TOP,  
 VERT_PARA_REL},
 {SwFPos::BOTTOM,SwFPos::BOTTOM, VertOrientation::BOTTOM,   
 VERT_PARA_REL},
 {SwFPos::CENTER_VERT,   SwFPos::CENTER_VERT,VertOrientation::CENTER,   
 VERT_PARA_REL},
-{SwFPos::FROMTOP,   SwFPos::FROMTOP,VertOrientation::NONE, 
 VERT_PARA_REL}
+{SwFPos::FROMTOP,   SwFPos::FROMTOP,VertOrientation::NONE, 
 VERT_PARA_REL|LB::RelPagePrintAreaBottom}
 };
 
 static FrmMap const aVParaHtmlMap[] =
@@ -322,7 +325,7 @@ static FrmMap aVCharMap[] =
 {SwFPos::BOTTOM,SwFPos::BOTTOM, VertOrientation::BOTTOM,   
 VERT_CHAR_REL|LB::RelChar},
 {SwFPos::BELOW, SwFPos::BELOW,  
VertOrientation::CHAR_BOTTOM,   LB::RelChar},
 {SwFPos::CENTER_VERT,   SwFPos::CENTER_VERT,VertOrientation::CENTER,   
 VERT_CHAR_REL|LB::RelChar},
-{SwFPos::FROMTOP,   SwFPos::FROMTOP,VertOrientation::NONE, 
 VERT_CHAR_REL},
+{SwFPos::FROMTOP,   SwFPos::FROMTOP,VertOrientation::NONE, 
 VERT_CHAR_REL|LB::RelPagePrintAreaBottom},
 {SwFPos::FROMBOTTOM,SwFPos::FROMBOTTOM, VertOrientation::NONE, 
 LB::RelChar|LB::VertLine},
 {SwFPos::TOP,   SwFPos::TOP,VertOrientation::LINE_TOP, 
 LB::VertLine},
 {SwFPos::BOTTOM,SwFPos::BOTTOM, 
VertOrientation::LINE_BOTTOM,   LB::VertLine},
diff --git a/include/svx/swframeposstrings.hxx 
b/include/svx/swframeposstrings.hxx
index 06cbc4028c6b..346553c70ec8 100644
--- a/include/svx/swframeposstrings.hxx
+++ b/include/svx/swframeposstrings.hxx
@@ -49,6 +49,7 @@ public:
 MIR_REL_FRM_RIGHT  ,
 REL_PG_FRAME   ,
 REL_PG_PRTAREA ,
+REL_PG_PRTAREA_BOTTOM  ,
 REL_BASE   ,
 REL_CHAR   ,
 REL_ROW,
diff --git a/svx/inc/swframeposstrings.hrc b/svx/inc/swframeposstrings.hrc
index df4d92a976fb..b08a9a3b525b 100644
--- a/svx/inc/swframeposstrings.hrc
+++ b/svx/inc/swframeposstrings.hrc
@@ -43,6 +43,7 @@ const char* RID_SVXSW_FRAMEPOSITIONS[] =
 NC_("RID_SVXSW_FRAMEPOSITIONS", "Outer paragraph border"),
 NC_("RID_SVXSW_FRAMEPOSITIONS", "Entire page"),
 NC_("RID_SVXSW_FRAMEPOSITIONS", "Page text area"),
+NC_("RID_SVXSW_FRAMEPOSITIONS", "Page text area bottom"),
 NC_("RID_SVXSW_FRAMEPOSITIO

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

2020-04-25 Thread Caolán McNamara (via logerrit)
 cui/source/inc/cuitabarea.hxx|4 +--
 cui/source/options/optchart.cxx  |2 -
 cui/source/options/optchart.hxx  |2 -
 cui/source/tabpages/tpcolor.cxx  |8 +++---
 include/svx/Palette.hxx  |4 +--
 include/svx/PaletteManager.hxx   |4 +--
 include/svx/SvxColorValueSet.hxx |4 +--
 include/svx/colorwindow.hxx  |6 ++--
 sc/source/ui/inc/tabbgcolordlg.hxx   |2 -
 sc/source/ui/miscdlgs/tabbgcolordlg.cxx  |   10 
 svx/inc/colrctrl.hxx |2 -
 svx/inc/palettes.hxx |6 ++--
 svx/source/tbxctrls/Palette.cxx  |6 ++--
 svx/source/tbxctrls/PaletteManager.cxx   |5 +---
 svx/source/tbxctrls/SvxColorValueSet.cxx |   38 +++
 svx/source/tbxctrls/colrctrl.cxx |   20 
 svx/source/tbxctrls/tbcontrl.cxx |8 +++---
 17 files changed, 65 insertions(+), 66 deletions(-)

New commits:
commit 33966ab25d21594a3a4f40ce30ece73fa4f45a27
Author: Caolán McNamara 
AuthorDate: Sat Apr 25 20:07:00 2020 +0100
Commit: Caolán McNamara 
CommitDate: Sat Apr 25 22:43:15 2020 +0200

rename ColorValueSet back to SvxColorValueSet

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

diff --git a/cui/source/inc/cuitabarea.hxx b/cui/source/inc/cuitabarea.hxx
index d046a50b7ff6..9ccac256260c 100644
--- a/cui/source/inc/cuitabarea.hxx
+++ b/cui/source/inc/cuitabarea.hxx
@@ -648,8 +648,8 @@ private:
 PaletteManager maPaletteManager;
 SvxXRectPreview m_aCtlPreviewOld;
 SvxXRectPreview m_aCtlPreviewNew;
-std::unique_ptr m_xValSetColorList;
-std::unique_ptr m_xValSetRecentList;
+std::unique_ptr m_xValSetColorList;
+std::unique_ptr m_xValSetRecentList;
 std::unique_ptr m_xSelectPalette;
 std::unique_ptr m_xRbRGB;
 std::unique_ptr m_xRbCMYK;
diff --git a/cui/source/options/optchart.cxx b/cui/source/options/optchart.cxx
index 4ca091bb6c45..3d86942adce5 100644
--- a/cui/source/options/optchart.cxx
+++ b/cui/source/options/optchart.cxx
@@ -95,7 +95,7 @@ 
SvxDefaultColorOptPage::SvxDefaultColorOptPage(weld::Container* pPage, weld::Dia
 , m_xPBDefault(m_xBuilder->weld_button("default"))
 , m_xPBAdd(m_xBuilder->weld_button("add"))
 , m_xPBRemove(m_xBuilder->weld_button("delete"))
-, m_xValSetColorBox(new 
ColorValueSet(m_xBuilder->weld_scrolled_window("tablewin")))
+, m_xValSetColorBox(new 
SvxColorValueSet(m_xBuilder->weld_scrolled_window("tablewin")))
 , m_xValSetColorBoxWin(new weld::CustomWeld(*m_xBuilder, "table", 
*m_xValSetColorBox))
 {
 m_xLbChartColors->set_size_request(-1, 
m_xLbChartColors->get_height_rows(16));
diff --git a/cui/source/options/optchart.hxx b/cui/source/options/optchart.hxx
index f8b0dcb8f1f4..807fd294e8f3 100644
--- a/cui/source/options/optchart.hxx
+++ b/cui/source/options/optchart.hxx
@@ -46,7 +46,7 @@ private:
 std::unique_ptr m_xPBDefault;
 std::unique_ptr m_xPBAdd;
 std::unique_ptr m_xPBRemove;
-std::unique_ptr m_xValSetColorBox;
+std::unique_ptr m_xValSetColorBox;
 std::unique_ptr m_xValSetColorBoxWin;
 
 DECL_LINK(ResetToDefaults, weld::Button&, void);
diff --git a/cui/source/tabpages/tpcolor.cxx b/cui/source/tabpages/tpcolor.cxx
index 4bae96abc837..b5f0983162a5 100644
--- a/cui/source/tabpages/tpcolor.cxx
+++ b/cui/source/tabpages/tpcolor.cxx
@@ -46,8 +46,8 @@ SvxColorTabPage::SvxColorTabPage(weld::Container* pPage, 
weld::DialogController*
 , rXFSet( aXFillAttr.GetItemSet() )
 , eCM( ColorModel::RGB )
 , m_context(comphelper::getProcessComponentContext())
-, m_xValSetColorList(new 
ColorValueSet(m_xBuilder->weld_scrolled_window("colorsetwin")))
-, m_xValSetRecentList(new ColorValueSet(nullptr))
+, m_xValSetColorList(new 
SvxColorValueSet(m_xBuilder->weld_scrolled_window("colorsetwin")))
+, m_xValSetRecentList(new SvxColorValueSet(nullptr))
 , m_xSelectPalette(m_xBuilder->weld_combo_box("paletteselector"))
 , m_xRbRGB(m_xBuilder->weld_radio_button("RGB"))
 , m_xRbCMYK(m_xBuilder->weld_radio_button("CMYK"))
@@ -154,8 +154,8 @@ void SvxColorTabPage::ImpColorCountChanged()
 {
 if (!pColorList.is())
 return;
-m_xValSetColorList->SetColCount(ColorValueSet::getColumnCount());
-m_xValSetRecentList->SetColCount(ColorValueSet::getColumnCount());
+m_xValSetColorList->SetColCount(SvxColorValueSet::getColumnCount());
+m_xValSetRecentList->SetColCount(SvxColorValueSet::getColumnCount());
 }
 
 void SvxColorTabPage::FillPaletteLB()
diff --git a/include/svx/Palette.hxx b/include/svx/Palette.hxx
index be8198f288e4..c505eb412d44 100644
--- a/include/svx/Palette.hxx
+++ b/include/svx/Palette.hxx
@@ -23,7 +23,7 @@
 #include 
 
 class Color;
-class ColorValueSet;
+class SvxColorValueSet;
 
 typedef std::pair N

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

2020-04-25 Thread Caolán McNamara (via logerrit)
 cui/source/tabpages/tpcolor.cxx  |4 -
 include/svx/Palette.hxx  |1 
 include/svx/PaletteManager.hxx   |1 
 include/svx/SvxColorValueSet.hxx |   15 
 sc/source/ui/miscdlgs/tabbgcolordlg.cxx  |6 -
 svx/source/tbxctrls/SvxColorValueSet.cxx |  101 +++
 svx/source/tbxctrls/colrctrl.cxx |8 +-
 svx/source/tbxctrls/tbcontrl.cxx |2 
 8 files changed, 25 insertions(+), 113 deletions(-)

New commits:
commit fadcfa51e7ef5d654607e39073405fbe6c0c9568
Author: Caolán McNamara 
AuthorDate: Fri Apr 24 20:40:31 2020 +0100
Commit: Caolán McNamara 
CommitDate: Sat Apr 25 21:55:07 2020 +0200

remove newly unused SvxColorValueSet

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

diff --git a/cui/source/tabpages/tpcolor.cxx b/cui/source/tabpages/tpcolor.cxx
index 456897ee28d6..4bae96abc837 100644
--- a/cui/source/tabpages/tpcolor.cxx
+++ b/cui/source/tabpages/tpcolor.cxx
@@ -154,8 +154,8 @@ void SvxColorTabPage::ImpColorCountChanged()
 {
 if (!pColorList.is())
 return;
-m_xValSetColorList->SetColCount(SvxColorValueSet::getColumnCount());
-m_xValSetRecentList->SetColCount(SvxColorValueSet::getColumnCount());
+m_xValSetColorList->SetColCount(ColorValueSet::getColumnCount());
+m_xValSetRecentList->SetColCount(ColorValueSet::getColumnCount());
 }
 
 void SvxColorTabPage::FillPaletteLB()
diff --git a/include/svx/Palette.hxx b/include/svx/Palette.hxx
index 8bee59534e4e..be8198f288e4 100644
--- a/include/svx/Palette.hxx
+++ b/include/svx/Palette.hxx
@@ -24,7 +24,6 @@
 
 class Color;
 class ColorValueSet;
-class SvxColorValueSet;
 
 typedef std::pair NamedColor;
 
diff --git a/include/svx/PaletteManager.hxx b/include/svx/PaletteManager.hxx
index 514211960961..42fbb0437c04 100644
--- a/include/svx/PaletteManager.hxx
+++ b/include/svx/PaletteManager.hxx
@@ -27,7 +27,6 @@
 #include 
 #include 
 
-class SvxColorValueSet;
 namespace com::sun::star::uno { class XComponentContext; }
 namespace svx { class ToolboxButtonColorUpdaterBase; }
 namespace weld { class Window; }
diff --git a/include/svx/SvxColorValueSet.hxx b/include/svx/SvxColorValueSet.hxx
index 26924f298f2f..ffdaf642292d 100644
--- a/include/svx/SvxColorValueSet.hxx
+++ b/include/svx/SvxColorValueSet.hxx
@@ -25,10 +25,10 @@
 
 class XColorList;
 
-class SVXCORE_DLLPUBLIC SvxColorValueSet : public ValueSet
+class SVXCORE_DLLPUBLIC ColorValueSet : public SvtValueSet
 {
 public:
-SvxColorValueSet(vcl::Window* pParent);
+ColorValueSet(std::unique_ptr pWindow);
 
 virtual void Resize() override;
 
@@ -36,17 +36,6 @@ public:
 static sal_uInt32 getEntryEdgeLength();
 static sal_uInt32 getColumnCount();
 
-void addEntriesForXColorList(const XColorList& rXColorList, sal_uInt32 
nStartIndex = 1);
-Size layoutToGivenHeight(sal_uInt32 nHeight, sal_uInt32 nEntryCount);
-};
-
-class SVXCORE_DLLPUBLIC ColorValueSet : public SvtValueSet
-{
-public:
-ColorValueSet(std::unique_ptr pWindow);
-
-virtual void Resize() override;
-
 void addEntriesForXColorList(const XColorList& rXColorList, sal_uInt32 
nStartIndex = 1);
 void addEntriesForColorSet(const std::set& rColorSet, const 
OUString& rNamePrefix);
 Size layoutAllVisible(sal_uInt32 nEntryCount);
diff --git a/sc/source/ui/miscdlgs/tabbgcolordlg.cxx 
b/sc/source/ui/miscdlgs/tabbgcolordlg.cxx
index bc9301c21c31..a0317ca01c2d 100644
--- a/sc/source/ui/miscdlgs/tabbgcolordlg.cxx
+++ b/sc/source/ui/miscdlgs/tabbgcolordlg.cxx
@@ -38,7 +38,7 @@ ScTabBgColorDlg::ScTabBgColorDlg(weld::Window* pParent, const 
OUString& rTitle,
 , m_xBtnOk(m_xBuilder->weld_button("ok"))
 {
 m_xTabBgColorSet->SetDialog(this);
-m_xTabBgColorSet->SetColCount(SvxColorValueSet::getColumnCount());
+m_xTabBgColorSet->SetColCount(ColorValueSet::getColumnCount());
 
 m_xDialog->set_title(rTitle);
 
@@ -46,9 +46,9 @@ ScTabBgColorDlg::ScTabBgColorDlg(weld::Window* pParent, const 
OUString& rTitle,
 m_xTabBgColorSet->SetStyle(nBits);
 m_xTabBgColorSet->SetText(rTabBgColorNoColorText);
 
-const sal_uInt32 nColCount = SvxColorValueSet::getColumnCount();
+const sal_uInt32 nColCount = ColorValueSet::getColumnCount();
 const sal_uInt32 nRowCount(10);
-const sal_uInt32 nLength = SvxColorValueSet::getEntryEdgeLength();
+const sal_uInt32 nLength = ColorValueSet::getEntryEdgeLength();
 Size aSize(m_xTabBgColorSet->CalcWindowSizePixel(Size(nLength, nLength), 
nColCount, nRowCount));
 m_xTabBgColorSetWin->set_size_request(aSize.Width() + 8, aSize.Height() + 
8);
 
diff --git a/svx/source/tbxctrls/SvxColorValueSet.cxx 
b/svx/source/tbxctrls/SvxColorValueSet.cxx
index fa67ac94428d..bed00e5f9d63 100644
--- a/svx/source/tbxctrls/SvxColorValueSet.cxx
+++ b/svx/source/tbxctrls/SvxColorValueSet.cxx
@@ -23,56 +23,31 @@
 #inc

[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, 
bSearchInParents).G

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

2020-02-17 Thread Heiko Tietze (via logerrit)
 cui/source/dialogs/dlgname.cxx |   13 ++--
 cui/source/factory/dlgfact.cxx |   14 +
 cui/source/factory/dlgfact.hxx |3 ++
 cui/source/inc/dlgname.hxx |7 ++
 include/svx/svxdlg.hxx |1 
 sd/inc/strings.hrc |1 
 sd/source/ui/slidesorter/controller/SlsSlotManager.cxx |6 +
 sd/source/ui/slidesorter/inc/controller/SlsSlotManager.hxx |1 
 8 files changed, 44 insertions(+), 2 deletions(-)

New commits:
commit a4f5c8d38e307bb37f08e8f6ef3cfc9ffac84304
Author: Heiko Tietze 
AuthorDate: Fri Dec 13 12:01:34 2019 +0100
Commit: Heiko Tietze 
CommitDate: Mon Feb 17 09:31:45 2020 +0100

Resolves tdf#129032 - Missing warning when renaming page

Edit field has type normal or error now
Edit field and okay button return feedback per tooltip

Change-Id: Ib2caf3280227cb00af25889ed111503745b471dc
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/85101
Tested-by: Jenkins
Reviewed-by: Heiko Tietze 

diff --git a/cui/source/dialogs/dlgname.cxx b/cui/source/dialogs/dlgname.cxx
index 133f1753fecd..d8044366b470 100644
--- a/cui/source/dialogs/dlgname.cxx
+++ b/cui/source/dialogs/dlgname.cxx
@@ -41,10 +41,19 @@ SvxNameDialog::SvxNameDialog(weld::Window* pParent, const 
OUString& rName, const
 IMPL_LINK_NOARG(SvxNameDialog, ModifyHdl, weld::Entry&, void)
 {
 // Do not allow empty names
+bool bEnable;
 if (m_aCheckNameHdl.IsSet())
-m_xBtnOK->set_sensitive(!m_xEdtName->get_text().isEmpty() && 
m_aCheckNameHdl.Call(*this));
+bEnable = !m_xEdtName->get_text().isEmpty() && 
m_aCheckNameHdl.Call(*this);
 else
-m_xBtnOK->set_sensitive(!m_xEdtName->get_text().isEmpty());
+bEnable = !m_xEdtName->get_text().isEmpty();
+m_xBtnOK->set_sensitive(bEnable);
+// tdf#129032: feedback on reason to disabled controls
+m_xEdtName->set_message_type(bEnable ? weld::EntryMessageType::Normal : 
weld::EntryMessageType::Error);
+OUString rTip = "";
+if (!bEnable && m_aCheckNameTooltipHdl.IsSet())
+   rTip = m_aCheckNameTooltipHdl.Call(*this);
+m_xBtnOK->set_tooltip_text(rTip);
+m_xEdtName->set_tooltip_text(rTip);
 }
 
 // #i68101#
diff --git a/cui/source/factory/dlgfact.cxx b/cui/source/factory/dlgfact.cxx
index d924938ad1d4..600882742427 100644
--- a/cui/source/factory/dlgfact.cxx
+++ b/cui/source/factory/dlgfact.cxx
@@ -740,6 +740,15 @@ void AbstractSvxNameDialog_Impl::SetCheckNameHdl( const 
LinkSetCheckNameHdl( Link(), 
bCheckImmediately );
 }
 
+void AbstractSvxNameDialog_Impl::SetCheckNameTooltipHdl( const 
Link& rLink)
+{
+aCheckNameTooltipHdl = rLink;
+if( rLink.IsSet() )
+m_xDlg->SetCheckNameTooltipHdl( LINK(this, AbstractSvxNameDialog_Impl, 
CheckNameTooltipHdl));
+else
+m_xDlg->SetCheckNameTooltipHdl( Link());
+}
+
 void AbstractSvxNameDialog_Impl::SetEditHelpId(const OString& rHelpId)
 {
 m_xDlg->SetEditHelpId(rHelpId);
@@ -760,6 +769,11 @@ IMPL_LINK_NOARG(AbstractSvxNameDialog_Impl, CheckNameHdl, 
SvxNameDialog&, bool)
 return aCheckNameHdl.Call(*this);
 }
 
+IMPL_LINK_NOARG(AbstractSvxNameDialog_Impl, CheckNameTooltipHdl, 
SvxNameDialog&, OUString)
+{
+return aCheckNameTooltipHdl.Call(*this);
+}
+
 void AbstractSvxObjectNameDialog_Impl::GetName(OUString& rName)
 {
 rName = m_xDlg->GetName();
diff --git a/cui/source/factory/dlgfact.hxx b/cui/source/factory/dlgfact.hxx
index 9c60124748a1..0181e293f49d 100644
--- a/cui/source/factory/dlgfact.hxx
+++ b/cui/source/factory/dlgfact.hxx
@@ -446,6 +446,7 @@ public:
 virtual short Execute() override;
 virtual voidGetName( OUString& rName ) override ;
 virtual voidSetCheckNameHdl( const Link& 
rLink, bool bCheckImmediately = false ) override ;
+virtual voidSetCheckNameTooltipHdl( const Link& rLink ) override ;
 virtual voidSetEditHelpId(const OString&) override ;
 //from class Window
 virtual voidSetHelpId( const OString& ) override ;
@@ -453,7 +454,9 @@ public:
 private:
 std::unique_ptr m_xDlg;
 Link aCheckNameHdl;
+Link aCheckNameTooltipHdl;
 DECL_LINK(CheckNameHdl, SvxNameDialog&, bool);
+DECL_LINK(CheckNameTooltipHdl, SvxNameDialog&, OUString);
 };
 
 class SvxObjectNameDialog;
diff --git a/cui/source/inc/dlgname.hxx b/cui/source/inc/dlgname.hxx
index a1e90f32db71..8fd754990885 100644
--- a/cui/source/inc/dlgname.hxx
+++ b/cui/source/inc/dlgname.hxx
@@ -30,6 +30,7 @@ private:
 std::unique_ptr m_xBtnOK;
 
 Link m_aCheckNameHdl;
+Link m_aCheckNameTooltipHdl;
 
 DECL_LINK(ModifyHdl, weld::Entry&, void);
 
@@ -60,6 +61,12 @@ public:
 m_xBtnOK->set_sensitive(rLink.Call(*this));
 }
 
+void SetCheckNameTooltipHdl(const Link& rLink)
+{
+m_aCheckNameTooltipHdl = rLink;
+m_xBtnOK->s

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

2020-02-14 Thread Caolán McNamara (via logerrit)
 cui/source/tabpages/border.cxx  |   10 
 cui/source/tabpages/grfpage.cxx |5 
 cui/source/tabpages/transfrm.cxx|3 
 include/svx/transfrmhelper.hxx  |   10 
 include/vcl/field.hxx   |   26 -
 include/vcl/fieldvalues.hxx |   67 
 sc/source/core/data/drwlayer.cxx|6 
 sc/source/ui/inc/tpdefaults.hxx |1 
 sc/source/ui/view/colrowba.cxx  |4 
 svtools/source/control/ctrlbox.cxx  |5 
 svx/inc/pch/precompiled_svx.hxx |4 
 svx/source/dialog/compressgraphicdialog.cxx |5 
 svx/source/dialog/dlgunit.hxx   |5 
 svx/source/sidebar/possize/PosSizePropertyPanel.cxx |3 
 svx/source/stbctrls/pszctrl.cxx |4 
 sw/source/ui/frmdlg/column.cxx  |5 
 sw/source/ui/misc/pgfnote.cxx   |8 
 sw/source/uibase/utlui/prcntfld.cxx |   16 -
 vcl/source/control/field.cxx|  297 +---
 vcl/source/window/builder.cxx   |3 
 20 files changed, 266 insertions(+), 221 deletions(-)

New commits:
commit 8389dc88a48b366ad7f3dd84129467175e18ab40
Author: Caolán McNamara 
AuthorDate: Fri Feb 14 09:38:50 2020 +
Commit: Caolán McNamara 
CommitDate: Fri Feb 14 14:31:50 2020 +0100

split out MetricField value conversion functions

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

diff --git a/cui/source/tabpages/border.cxx b/cui/source/tabpages/border.cxx
index b75e91d1bd66..8d8dd161a204 100644
--- a/cui/source/tabpages/border.cxx
+++ b/cui/source/tabpages/border.cxx
@@ -29,7 +29,7 @@
 #include 
 #include 
 #include 
-#include 
+#include 
 #include 
 #include 
 #include 
@@ -734,7 +734,7 @@ void SvxBorderTabPage::Reset( const SfxItemSet* rSet )
 if( bWidthEq )
 {
 // Determine the width first as some styles can be missing 
depending on it
-sal_Int64 nWidthPt =  
static_cast(MetricField::ConvertDoubleValue(
+sal_Int64 nWidthPt =  
static_cast(vcl::ConvertDoubleValue(
 sal_Int64( nWidth ), m_xLineWidthMF->get_digits(),
 MapUnit::MapTwip, FieldUnit::POINT ));
 m_xLineWidthMF->set_value(nWidthPt, FieldUnit::POINT);
@@ -1158,7 +1158,7 @@ IMPL_LINK(SvxBorderTabPage, SelColHdl_Impl, 
ColorListBox&, rColorBox, void)
 IMPL_LINK_NOARG(SvxBorderTabPage, ModifyWidthHdl_Impl, 
weld::MetricSpinButton&, void)
 {
 sal_Int64 nVal = m_xLineWidthMF->get_value(FieldUnit::NONE);
-nVal = static_cast(MetricField::ConvertDoubleValue(
+nVal = static_cast(vcl::ConvertDoubleValue(
 nVal,
 m_xLineWidthMF->get_digits(),
 FieldUnit::POINT, MapUnit::MapTwip ));
@@ -1171,7 +1171,7 @@ 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(MetricField::ConvertDoubleValue(
+nVal = static_cast(vcl::ConvertDoubleValue(
 nVal,
 m_xLineWidthMF->get_digits(),
 FieldUnit::POINT, MapUnit::MapTwip ));
@@ -1352,7 +1352,7 @@ void SvxBorderTabPage::FillLineListBox_Impl()
 }
 
 sal_Int64 nVal = m_xLineWidthMF->get_value(FieldUnit::NONE);
-nVal = static_cast(MetricField::ConvertDoubleValue(nVal, 
m_xLineWidthMF->get_digits(),
+nVal = static_cast(vcl::ConvertDoubleValue(nVal, 
m_xLineWidthMF->get_digits(),
   
m_xLineWidthMF->get_unit(), MapUnit::MapTwip));
 m_xLbLineStyle->SetWidth( nVal );
 }
diff --git a/cui/source/tabpages/grfpage.cxx b/cui/source/tabpages/grfpage.cxx
index 586f9806ce8d..d44610dd23b1 100644
--- a/cui/source/tabpages/grfpage.cxx
+++ b/cui/source/tabpages/grfpage.cxx
@@ -32,6 +32,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -590,7 +591,7 @@ void SvxGrfCropPage::GraphicHasChanged( bool bFound )
 SID_ATTR_GRAF_CROP ) ));
 
 sal_Int64 nSpin = m_xLeftMF->normalize(aOrigSize.Width()) / 20;
-nSpin = MetricField::ConvertValue( nSpin, aOrigSize.Width(), 0,
+nSpin = vcl::ConvertValue( nSpin, aOrigSize.Width(), 0,
eUnit, m_xLeftMF->get_unit());
 
 // if the margin is too big, it is set to 1/3 on both pages
@@ -618,7 +619,7 @@ void SvxGrfCropPage::GraphicHasChanged( bool bFound )
 m_xLeftMF->set_increments(nSpin, nSpin * 10, FieldUnit::NONE);

[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,
+LA

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

2020-02-04 Thread Noel Grandin (via logerrit)
 cui/source/tabpages/paragrph.cxx |2 +-
 include/svx/paraprev.hxx |2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 228025b8dfe35234a3445c232430a1bd15c86143
Author: Noel Grandin 
AuthorDate: Tue Feb 4 12:04:26 2020 +0200
Commit: Noel Grandin 
CommitDate: Tue Feb 4 13:13:06 2020 +0100

rename SetFirstLineOfst->SetFirstLineOffset

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

diff --git a/cui/source/tabpages/paragrph.cxx b/cui/source/tabpages/paragrph.cxx
index f6b26b9e0e62..749d03a03eef 100644
--- a/cui/source/tabpages/paragrph.cxx
+++ b/cui/source/tabpages/paragrph.cxx
@@ -894,7 +894,7 @@ void SvxStdParagraphTabPage::Init_Impl()
 
 void SvxStdParagraphTabPage::UpdateExample_Impl()
 {
-m_aExampleWin.SetFirstLineOfst( 
static_cast(m_xFLineIndent->denormalize( m_xFLineIndent->get_value( 
FieldUnit::TWIP ) )) );
+m_aExampleWin.SetFirstLineOffset( 
static_cast(m_xFLineIndent->denormalize( m_xFLineIndent->get_value( 
FieldUnit::TWIP ) )) );
 m_aExampleWin.SetLeftMargin( static_cast(m_xLeftIndent->denormalize( 
m_xLeftIndent->get_value( FieldUnit::TWIP ) ) ) );
 m_aExampleWin.SetRightMargin( 
static_cast(m_xRightIndent->denormalize( m_xRightIndent->get_value( 
FieldUnit::TWIP ) ) ) );
 m_aExampleWin.SetUpper( static_cast(m_xTopDist->denormalize( 
m_xTopDist->get_value( FieldUnit::TWIP ) )) );
diff --git a/include/svx/paraprev.hxx b/include/svx/paraprev.hxx
index f605584ec637..885a22f1b171 100644
--- a/include/svx/paraprev.hxx
+++ b/include/svx/paraprev.hxx
@@ -59,7 +59,7 @@ class SVX_DLLPUBLIC SvxParaPrevWindow final : public 
weld::CustomWidgetControlle
 public:
 SvxParaPrevWindow();
 
-void SetFirstLineOfst( short nNew )
+void SetFirstLineOffset( short nNew )
 {
 nFirstLineOfst = nNew;
 }
___
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

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 padWidthForSidebar(weld::Tool

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

2020-01-13 Thread Caolán McNamara (via logerrit)
 cui/source/inc/numpages.hxx   |8 
 cui/source/tabpages/numpages.cxx  |6 +++---
 include/svx/numvset.hxx   |8 
 sd/source/ui/inc/BulletAndPositionDlg.hxx |2 +-
 svx/source/dialog/svxbmpnumvalueset.cxx   |   18 +-
 svx/source/tbxctrls/bulletsnumbering.cxx  |4 ++--
 6 files changed, 23 insertions(+), 23 deletions(-)

New commits:
commit 4e12a674f51e898cf11af64b01e8da8468cec401
Author: Caolán McNamara 
AuthorDate: Mon Jan 13 09:52:41 2020 +
Commit: Caolán McNamara 
CommitDate: Mon Jan 13 18:15:11 2020 +0100

rename NumValueSet back to SvxNumValueSet

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

diff --git a/cui/source/inc/numpages.hxx b/cui/source/inc/numpages.hxx
index 2e3584581a30..11e8e1846219 100644
--- a/cui/source/inc/numpages.hxx
+++ b/cui/source/inc/numpages.hxx
@@ -32,7 +32,7 @@
 #define MN_GALLERY_ENTRY 100
 
 class ColorListBox;
-class NumValueSet;
+class SvxNumValueSet;
 class SvxNumRule;
 class SvxBmpNumValueSet;
 class SvxBrushItem;
@@ -66,7 +66,7 @@ class SvxSingleNumPickTabPage final : public SfxTabPage
 
 sal_uInt16  nNumItemId;
 
-std::unique_ptr m_xExamplesVS;
+std::unique_ptr m_xExamplesVS;
 std::unique_ptr m_xExamplesVSWin;
 
 DECL_LINK(NumSelectHdl_Impl, SvtValueSet*, void);
@@ -96,7 +96,7 @@ class SvxBulletPickTabPage final : public SfxTabPage
 
 OUStringsBulletCharFormatName;
 
-std::unique_ptr m_xExamplesVS;
+std::unique_ptr m_xExamplesVS;
 std::unique_ptr m_xExamplesVSWin;
 
 DECL_LINK(NumSelectHdl_Impl, SvtValueSet*, void);
@@ -133,7 +133,7 @@ class SvxNumPickTabPage final : public SfxTabPage
 boolbModified   : 1;
 boolbPreset : 1;
 
-std::unique_ptr m_xExamplesVS;
+std::unique_ptr m_xExamplesVS;
 std::unique_ptr m_xExamplesVSWin;
 
 DECL_LINK(NumSelectHdl_Impl, SvtValueSet*, void);
diff --git a/cui/source/tabpages/numpages.cxx b/cui/source/tabpages/numpages.cxx
index 9c10291bd1d3..222349d0c583 100644
--- a/cui/source/tabpages/numpages.cxx
+++ b/cui/source/tabpages/numpages.cxx
@@ -164,7 +164,7 @@ 
SvxSingleNumPickTabPage::SvxSingleNumPickTabPage(weld::Container* pPage, weld::D
 , bModified(false)
 , bPreset(false)
 , nNumItemId(SID_ATTR_NUMBERING_RULE)
-, m_xExamplesVS(new NumValueSet(nullptr))
+, m_xExamplesVS(new SvxNumValueSet(nullptr))
 , m_xExamplesVSWin(new weld::CustomWeld(*m_xBuilder, "valueset", 
*m_xExamplesVS))
 {
 SetExchangeSupport();
@@ -343,7 +343,7 @@ SvxBulletPickTabPage::SvxBulletPickTabPage(weld::Container* 
pPage, weld::DialogC
 , bModified(false)
 , bPreset(false)
 , nNumItemId(SID_ATTR_NUMBERING_RULE)
-, m_xExamplesVS(new NumValueSet(nullptr))
+, m_xExamplesVS(new SvxNumValueSet(nullptr))
 , m_xExamplesVSWin(new weld::CustomWeld(*m_xBuilder, "valueset", 
*m_xExamplesVS))
 {
 SetExchangeSupport();
@@ -492,7 +492,7 @@ SvxNumPickTabPage::SvxNumPickTabPage(weld::Container* 
pPage, weld::DialogControl
 , nNumItemId(SID_ATTR_NUMBERING_RULE)
 , bModified(false)
 , bPreset(false)
-, m_xExamplesVS(new NumValueSet(nullptr))
+, m_xExamplesVS(new SvxNumValueSet(nullptr))
 , m_xExamplesVSWin(new weld::CustomWeld(*m_xBuilder, "valueset", 
*m_xExamplesVS))
 {
 SetExchangeSupport();
diff --git a/include/svx/numvset.hxx b/include/svx/numvset.hxx
index 1eaa4390cb39..4b41a74c90c5 100644
--- a/include/svx/numvset.hxx
+++ b/include/svx/numvset.hxx
@@ -46,7 +46,7 @@ enum class NumberingPageType
 BITMAP
 };
 
-class SVX_DLLPUBLIC NumValueSet : public SvtValueSet
+class SVX_DLLPUBLIC SvxNumValueSet : public SvtValueSet
 {
 NumberingPageType ePageType;
 tools::Rectangle   aOrgRect;
@@ -64,9 +64,9 @@ class SVX_DLLPUBLIC NumValueSet : public SvtValueSet
 css::container::XIndexAccess> > aOutlineSettings;
 
 public:
-NumValueSet(std::unique_ptr pScrolledWindow);
+SvxNumValueSet(std::unique_ptr pScrolledWindow);
 void init(NumberingPageType eType);
-virtual ~NumValueSet() override;
+virtual ~SvxNumValueSet() override;
 
 virtual voidUserDraw( const UserDrawEvent& rUDEvt ) override;
 
@@ -84,7 +84,7 @@ public:
 };
 
 
-class SVX_DLLPUBLIC SvxBmpNumValueSet final : public NumValueSet
+class SVX_DLLPUBLIC SvxBmpNumValueSet final : public SvxNumValueSet
 {
 IdleaFormatIdle;
 boolbGrfNotFound;
diff --git a/sd/source/ui/inc/BulletAndPositionDlg.hxx 
b/sd/source/ui/inc/BulletAndPositionDlg.hxx
index b2c5ce1fa54b..87cd14ad8370 100644
--- a/sd/source/ui/inc/BulletAndPositionDlg.hxx
+++ b/sd/source/ui/inc/BulletAndPositionDlg.hxx
@@ -32,7 +32,7 @@
 #define MN_GALLERY_ENTRY 100
 
 class ColorListBox;
-class NumValueSet;
+class SvxNumValueSet;
 class SvxNumRule;
 class SvxBmpNumValu

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

2020-01-02 Thread Caolán McNamara (via logerrit)
 cui/source/tabpages/page.cxx  |   10 
 include/svx/papersizelistbox.hxx  |5 
 sd/source/ui/sidebar/SlideBackground.cxx  |  392 +++---
 sd/source/ui/sidebar/SlideBackground.hxx  |   59 +--
 sd/uiconfig/simpress/ui/sidebarslidebackground.ui |   64 ++-
 solenv/sanitizers/ui/modules/simpress.suppr   |3 
 svx/source/dialog/papersizelistbox.cxx|4 
 sw/source/uibase/sidebar/PageFormatPanel.cxx  |4 
 8 files changed, 299 insertions(+), 242 deletions(-)

New commits:
commit 5d47b46cf2524ddc7147892cd3129c5c78cf4d07
Author: Caolán McNamara 
AuthorDate: Wed Jan 1 21:03:37 2020 +
Commit: Caolán McNamara 
CommitDate: Thu Jan 2 16:57:03 2020 +0100

weld SlideBackground

Change-Id: I6f8792d8212807b4be4a24885e237290e298dfa6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86120
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 8cecd26a51c5..11c533d56d2a 100644
--- a/cui/source/tabpages/page.cxx
+++ b/cui/source/tabpages/page.cxx
@@ -436,7 +436,7 @@ void SvxPageDescPage::Reset( const SfxItemSet* rSet )
 m_xPaperSizeBox->clear();
 
 m_xPaperSizeBox->FillPaperSizeEntries( ( ePaperStart == PAPER_A3 ) ? 
PaperSizeApp::Std : PaperSizeApp::Draw );
-m_xPaperSizeBox->SetSelection( ePaper );
+m_xPaperSizeBox->set_active_id( ePaper );
 
 // application specific
 
@@ -627,7 +627,7 @@ bool SvxPageDescPage::FillItemSet( SfxItemSet* rSet )
 bModified = true;
 }
 
-Paper ePaper = m_xPaperSizeBox->GetSelection();
+Paper ePaper = m_xPaperSizeBox->get_active_id();
 bool bChecked = m_xLandscapeBtn->get_active();
 
 if ( PAPER_USER == ePaper )
@@ -819,7 +819,7 @@ IMPL_LINK_NOARG(SvxPageDescPage, PaperBinHdl_Impl, 
weld::Widget&, void)
 
 IMPL_LINK_NOARG(SvxPageDescPage, PaperSizeSelect_Impl, weld::ComboBox&, void)
 {
-Paper ePaper = m_xPaperSizeBox->GetSelection();
+Paper ePaper = m_xPaperSizeBox->get_active_id();
 
 if ( ePaper != PAPER_USER )
 {
@@ -884,7 +884,7 @@ IMPL_LINK_NOARG(SvxPageDescPage, PaperSizeModify_Impl, 
weld::MetricSpinButton&,
 }
 
 Paper ePaper = SvxPaperInfo::GetSvxPaper( aSize, eUnit );
-m_xPaperSizeBox->SetSelection( ePaper );
+m_xPaperSizeBox->set_active_id( ePaper );
 UpdateExample_Impl( true );
 
 RangeHdl_Impl();
@@ -1238,7 +1238,7 @@ DeactivateRC SvxPageDescPage::DeactivatePage( SfxItemSet* 
_pSet )
 // Inquiry whether the page margins are beyond the printing area.
 // If not, ask user whether they shall be taken.
 // If not, stay on the TabPage.
-Paper ePaper = m_xPaperSizeBox->GetSelection();
+Paper ePaper = m_xPaperSizeBox->get_active_id();
 
 if ( ePaper != PAPER_SCREEN_4_3 && ePaper != PAPER_SCREEN_16_9 && ePaper 
!= PAPER_SCREEN_16_10 && IsMarginOutOfRange() )
 {
diff --git a/include/svx/papersizelistbox.hxx b/include/svx/papersizelistbox.hxx
index 34892a8d1ea7..4dea2e176dde 100644
--- a/include/svx/papersizelistbox.hxx
+++ b/include/svx/papersizelistbox.hxx
@@ -51,10 +51,11 @@ public:
 SvxPaperSizeListBox(std::unique_ptr pControl);
 
 void FillPaperSizeEntries(PaperSizeApp eApp);
-void SetSelection(Paper eSize);
-Paper GetSelection() const;
+void set_active_id(Paper eSize);
+Paper get_active_id() const;
 
 void connect_changed(const Link& rLink) { 
m_xControl->connect_changed(rLink); }
+int get_active() const { return m_xControl->get_active(); }
 void clear() { m_xControl->clear(); }
 void save_value() { return m_xControl->save_value(); }
 bool get_value_changed_from_saved() const { return 
m_xControl->get_value_changed_from_saved(); }
diff --git a/sd/source/ui/sidebar/SlideBackground.cxx 
b/sd/source/ui/sidebar/SlideBackground.cxx
index 67f43fb7157f..b60cfccb63aa 100644
--- a/sd/source/ui/sidebar/SlideBackground.cxx
+++ b/sd/source/ui/sidebar/SlideBackground.cxx
@@ -88,8 +88,25 @@ SlideBackground::SlideBackground(
 const css::uno::Reference& rxFrame,
 SfxBindings* pBindings
  ) :
-PanelLayout( pParent, "SlideBackgroundPanel", 
"modules/simpress/ui/sidebarslidebackground.ui", rxFrame ),
+PanelLayout( pParent, "SlideBackgroundPanel", 
"modules/simpress/ui/sidebarslidebackground.ui", rxFrame, true ),
 mrBase( rBase ),
+mxPaperSizeBox(new 
SvxPaperSizeListBox(m_xBuilder->weld_combo_box("paperformat"))),
+mxPaperOrientation(m_xBuilder->weld_combo_box("orientation")),
+mxMasterSlide(m_xBuilder->weld_combo_box("masterslide")),
+mxBackgroundLabel(m_xBuilder->weld_label("label3")),
+mxFillStyle(m_xBuilder->weld_combo_box("fillstyle")),
+mxFillLB(new ColorListBox(m_xBuilder->weld_menu_button("fillattr"), 
GetFrameWeld())),
+mxFillAttr(m_xBuilder->weld_combo_box("fillattr1")),
+mxFillGrad(new ColorListBox(m_xBuilder->weld_menu_button("fillattr2"), 
GetFra

[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   &pList );
 void Fill( const XPatternListRef  &pList );
 
+static void Fill(weld::ComboBox&, const XHatchListRef &pList);
+static void Fill(weld::ComboBox&, const XBitmapListRef &pList);
+static void Fill(weld::ComboBox&, const XPatternListRef &pList);
+
 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

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

2019-12-15 Thread Jim Raykowski (via logerrit)
 cui/source/factory/dlgfact.cxx |4 
 cui/source/tabpages/backgrnd.cxx   | 1300 -
 include/svx/dialogs.hrc|1 
 sd/source/ui/dlg/dlgchar.cxx   |4 
 sd/source/ui/dlg/prltempl.cxx  |6 
 sd/uiconfig/sdraw/ui/drawchardialog.ui |4 
 sd/uiconfig/sdraw/ui/drawprtldialog.ui |4 
 sw/source/ui/fmtui/tmpdlg.cxx  |2 
 8 files changed, 10 insertions(+), 1315 deletions(-)

New commits:
commit c5f593d68b7f6d8a2f2adc75d5bcb795822efeac
Author: Jim Raykowski 
AuthorDate: Sat Dec 14 22:09:01 2019 -0900
Commit: Mike Kaganski 
CommitDate: Mon Dec 16 06:22:09 2019 +0100

Related tdf#105225: Remove old background tab page code

All uses of SvxBackgroundTabPage have been replaced by a new background
tab page derived from the SvxAreaTabPage. This patch removes the
SvxBackgroundTabPage code and code used only by it.

Change-Id: I83a2a04c0bf908cdc630fa091cd5ccdfb5d9381d
Reviewed-on: https://gerrit.libreoffice.org/85194
Reviewed-by: Mike Kaganski 
Tested-by: Mike Kaganski 

diff --git a/cui/source/factory/dlgfact.cxx b/cui/source/factory/dlgfact.cxx
index 63a7e2a089dd..1b84c073f51d 100644
--- a/cui/source/factory/dlgfact.cxx
+++ b/cui/source/factory/dlgfact.cxx
@@ -1469,8 +1469,6 @@ CreateTabPage 
AbstractDialogFactory_Impl::GetTabPageCreatorFunc( sal_uInt16 nId
 return SvxTextAttrPage::Create;
 case RID_SVXPAGE_ALIGNMENT :
 return svx::AlignmentTabPage::Create;
-case RID_SVXPAGE_BACKGROUND :
-return SvxBackgroundTabPage::Create;
 case RID_SVXPAGE_BORDER :
 return SvxBorderTabPage::Create;
 case RID_SVXPAGE_CHAR_NAME :
@@ -1536,8 +1534,6 @@ GetTabPageRanges 
AbstractDialogFactory_Impl::GetTabPageRangesFunc( sal_uInt16 nI
 case RID_SW_TP_BACKGROUND :
 case RID_SVXPAGE_BKG:
 return SvxBkgTabPage::GetRanges;
-case RID_SVXPAGE_BACKGROUND :
-return SvxBackgroundTabPage::GetRanges;
 case RID_SVXPAGE_BORDER :
 return SvxBorderTabPage::GetRanges;
 case RID_SVXPAGE_CHAR_NAME :
diff --git a/cui/source/tabpages/backgrnd.cxx b/cui/source/tabpages/backgrnd.cxx
index 811fc0cfacb7..4a874605af03 100644
--- a/cui/source/tabpages/backgrnd.cxx
+++ b/cui/source/tabpages/backgrnd.cxx
@@ -18,35 +18,15 @@
  */
 
 #include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
 #include 
 #include 
-#include 
-
-#include 
-#include 
-
-#include 
 #include 
 #include 
-
-#include 
-#include 
-#include 
 #include 
 #include 
 #include 
-#include 
-#include 
 #include 
 #include 
-#include 
-
 #include 
 
 using namespace css;
@@ -56,13 +36,6 @@ using namespace css;
 #define TBL_DEST_ROW1
 #define TBL_DEST_TBL2
 
-const sal_uInt16 SvxBackgroundTabPage::pPageRanges[] =
-{
-SID_ATTR_BRUSH, SID_ATTR_BRUSH,
-SID_ATTR_BRUSH_CHAR, SID_ATTR_BRUSH_CHAR,
-0
-};
-
 const sal_uInt16 SvxBkgTabPage::pPageRanges[] =
 {
 SID_ATTR_BRUSH, SID_ATTR_BRUSH,
@@ -70,1279 +43,6 @@ const sal_uInt16 SvxBkgTabPage::pPageRanges[] =
 0
 };
 
-/// Returns the fill style of the currently selected entry.
-static drawing::FillStyle lcl_getFillStyle(const weld::ComboBox& rLbSelect)
-{
-return 
static_cast(rLbSelect.get_active_id().toUInt32());
-}
-
-// Selects the entry matching the specified fill style.
-static void lcl_setFillStyle(weld::ComboBox& rLbSelect, drawing::FillStyle 
eStyle)
-{
-OUString sStyle = OUString::number(static_cast(eStyle));
-for (int i = 0; i < rLbSelect.get_count(); ++i)
-{
-if (rLbSelect.get_id(i) == sStyle)
-{
-rLbSelect.set_active(i);
-return;
-}
-}
-}
-
-static sal_uInt16 GetItemId_Impl(const SvtValueSet& rValueSet, const Color& 
rCol)
-{
-boolbFound = false;
-sal_uInt16  nCount = rValueSet.GetItemCount();
-sal_uInt16  n  = 1;
-
-while ( !bFound && n <= nCount )
-{
-Color aValCol = rValueSet.GetItemColor(n);
-
-bFound = (   aValCol.GetRed()   == rCol.GetRed()
-  && aValCol.GetGreen() == rCol.GetGreen()
-  && aValCol.GetBlue()  == rCol.GetBlue() );
-
-if ( !bFound )
-n++;
-}
-return bFound ? n : 0;
-}
-
-/** Preview window for brush or bitmap */
-class BackgroundPreviewImpl : public weld::CustomWidgetController
-{
-public:
-explicit BackgroundPreviewImpl();
-void setBmp(bool bBmp);
-
-voidNotifyChange(const Color&  rColor);
-voidNotifyChange(const BitmapEx* pBitmap);
-
-protected:
-virtual voidPaint( vcl::RenderContext& /*rRenderContext*/, const 
::tools::Rectangle& rRect ) override;
-virtual voidSetDrawingArea(weld::DrawingArea* pDrawingArea) override;
-virtual voidResize() override;
-
-private:
-
-void recalcDrawPos();
-
-boolbIsBmp;
-std::unique_ptr pBitmap;
-

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

2019-10-17 Thread Caolán McNamara (via logerrit)
 cui/source/options/opthtml.cxx  |2 -
 cui/source/options/opthtml.hxx  |2 -
 include/svx/txencbox.hxx|   12 +--
 sc/source/ui/dbgui/scuiasciiopt.cxx |2 -
 sc/source/ui/dbgui/scuiimoptdlg.cxx |4 +--
 sc/source/ui/inc/scuiasciiopt.hxx   |4 +--
 sc/source/ui/inc/scuiimoptdlg.hxx   |8 +++
 svx/source/dialog/txencbox.cxx  |   38 ++--
 sw/source/ui/dialog/ascfldlg.cxx|2 -
 sw/source/uibase/inc/ascfldlg.hxx   |2 -
 10 files changed, 38 insertions(+), 38 deletions(-)

New commits:
commit 73df133143daaff14c364468598bb250db6aecb1
Author: Caolán McNamara 
AuthorDate: Thu Oct 17 12:43:52 2019 +0100
Commit: Caolán McNamara 
CommitDate: Thu Oct 17 18:11:09 2019 +0200

rename TextEncodingBox back to SvxTextEncodingBox

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

diff --git a/cui/source/options/opthtml.cxx b/cui/source/options/opthtml.cxx
index cfe4dc78473e..fca286ddbb7a 100644
--- a/cui/source/options/opthtml.cxx
+++ b/cui/source/options/opthtml.cxx
@@ -38,7 +38,7 @@ OfaHtmlTabPage::OfaHtmlTabPage(weld::Container* pPage, 
weld::DialogController* p
 , m_xStarBasicWarningCB(m_xBuilder->weld_check_button("starbasicwarning"))
 , m_xPrintExtensionCB(m_xBuilder->weld_check_button("printextension"))
 , m_xSaveGrfLocalCB(m_xBuilder->weld_check_button("savegrflocal"))
-, m_xCharSetLB(new TextEncodingBox(m_xBuilder->weld_combo_box("charset")))
+, m_xCharSetLB(new 
SvxTextEncodingBox(m_xBuilder->weld_combo_box("charset")))
 {
 // replace placeholder with UI string from language list
 OUString aText(m_xNumbersEnglishUSCB->get_label());
diff --git a/cui/source/options/opthtml.hxx b/cui/source/options/opthtml.hxx
index 96131571fcd9..0468518f1638 100644
--- a/cui/source/options/opthtml.hxx
+++ b/cui/source/options/opthtml.hxx
@@ -41,7 +41,7 @@ class OfaHtmlTabPage : public SfxTabPage
 std::unique_ptr m_xStarBasicWarningCB;
 std::unique_ptr m_xPrintExtensionCB;
 std::unique_ptr m_xSaveGrfLocalCB;
-std::unique_ptr m_xCharSetLB;
+std::unique_ptr m_xCharSetLB;
 
 DECL_LINK(CheckBoxHdl_Impl, weld::ToggleButton&, void);
 
diff --git a/include/svx/txencbox.hxx b/include/svx/txencbox.hxx
index e5a7b250f1d2..66e2d633ee8c 100644
--- a/include/svx/txencbox.hxx
+++ b/include/svx/txencbox.hxx
@@ -23,15 +23,15 @@
 #include 
 #include 
 
-class SVX_DLLPUBLIC TextEncodingBox
+class SVX_DLLPUBLIC SvxTextEncodingBox
 {
 private:
 std::unique_ptr m_xControl;
 
 public:
-TextEncodingBox(std::unique_ptr pControl);
+SvxTextEncodingBox(std::unique_ptr pControl);
 
-~TextEncodingBox();
+~SvxTextEncodingBox();
 
 /** Fill with all known encodings but exclude those matching one or more
 given flags as defined in rtl/tencinfo.h
@@ -96,15 +96,15 @@ public:
 void hide() { m_xControl->hide(); }
 };
 
-class SVX_DLLPUBLIC TextEncodingTreeView
+class SVX_DLLPUBLIC SvxTextEncodingTreeView
 {
 private:
 std::unique_ptr m_xControl;
 
 public:
-TextEncodingTreeView(std::unique_ptr pControl);
+SvxTextEncodingTreeView(std::unique_ptr pControl);
 
-~TextEncodingTreeView();
+~SvxTextEncodingTreeView();
 
 /** Fill with all known encodings but exclude those matching one or more
 given flags as defined in rtl/tencinfo.h
diff --git a/sc/source/ui/dbgui/scuiasciiopt.cxx 
b/sc/source/ui/dbgui/scuiasciiopt.cxx
index 96f69f03139c..24cc8f3d46eb 100644
--- a/sc/source/ui/dbgui/scuiasciiopt.cxx
+++ b/sc/source/ui/dbgui/scuiasciiopt.cxx
@@ -294,7 +294,7 @@ ScImportAsciiDlg::ScImportAsciiDlg(weld::Window* pParent, 
const OUString& aDatNa
 , meCall(eCall)
 , mbDetectSpaceSep(eCall != SC_TEXTTOCOLUMNS)
 , mxFtCharSet(m_xBuilder->weld_label("textcharset"))
-, mxLbCharSet(new TextEncodingBox(m_xBuilder->weld_combo_box("charset")))
+, mxLbCharSet(new 
SvxTextEncodingBox(m_xBuilder->weld_combo_box("charset")))
 , mxFtCustomLang(m_xBuilder->weld_label("textlanguage"))
 , mxLbCustomLang(new LanguageBox(m_xBuilder->weld_combo_box("language")))
 , mxFtRow(m_xBuilder->weld_label("textfromrow"))
diff --git a/sc/source/ui/dbgui/scuiimoptdlg.cxx 
b/sc/source/ui/dbgui/scuiimoptdlg.cxx
index 03fce13e6fbc..2ddbd56c7afe 100644
--- a/sc/source/ui/dbgui/scuiimoptdlg.cxx
+++ b/sc/source/ui/dbgui/scuiimoptdlg.cxx
@@ -122,8 +122,8 @@ ScImportOptionsDlg::ScImportOptionsDlg(weld::Window* 
pParent, bool bAscii,
 , m_xCbQuoteAll(m_xBuilder->weld_check_button("quoteall"))
 , m_xCbFixed(m_xBuilder->weld_check_button("fixedwidth"))
 , m_xBtnOk(m_xBuilder->weld_button("ok"))
-, m_xLbCharset(new 
TextEncodingBox(m_xBuilder->weld_combo_box("charsetdropdown")))
-, m_xTvCharset(new 
TextEncodingTreeView(m_xBuilder->weld_tree_view("charsetlist")))
+, m_xLbCharset(new 
SvxTextEn

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

2019-10-14 Thread Caolán McNamara (via logerrit)
 cui/source/dialogs/SpellDialog.cxx |1 
 cui/source/options/treeopt.cxx |1 
 include/svx/langbox.hxx|   29 --
 solenv/bin/native-code.py  |1 
 svx/source/dialog/langbox.cxx  |  160 -
 svx/source/dialog/txencbox.cxx |1 
 6 files changed, 3 insertions(+), 190 deletions(-)

New commits:
commit 6a9e20e16701014e432aeec7a4a6705a2d6013b9
Author: Caolán McNamara 
AuthorDate: Mon Oct 14 11:17:10 2019 +0100
Commit: Caolán McNamara 
CommitDate: Mon Oct 14 15:53:55 2019 +0200

SvxLanguageComboBox is unused

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

diff --git a/cui/source/dialogs/SpellDialog.cxx 
b/cui/source/dialogs/SpellDialog.cxx
index 2574dd84a25e..366c2662b865 100644
--- a/cui/source/dialogs/SpellDialog.cxx
+++ b/cui/source/dialogs/SpellDialog.cxx
@@ -40,6 +40,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
diff --git a/cui/source/options/treeopt.cxx b/cui/source/options/treeopt.cxx
index b9d79d0d579a..b923e4b0bc2a 100644
--- a/cui/source/options/treeopt.cxx
+++ b/cui/source/options/treeopt.cxx
@@ -95,6 +95,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
diff --git a/include/svx/langbox.hxx b/include/svx/langbox.hxx
index 9d20e2912a5d..9f93df3ea341 100644
--- a/include/svx/langbox.hxx
+++ b/include/svx/langbox.hxx
@@ -25,7 +25,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 
@@ -175,34 +174,6 @@ public:
 weld::ComboBox* get_widget() { return m_xControl.get(); }
 };
 
-class SVX_DLLPUBLIC SvxLanguageComboBox : public ComboBox, public 
SvxLanguageBoxBase
-{
-public:
-SvxLanguageComboBox( vcl::Window* pParent, WinBits nBits );
-
-enum class EditedAndValid
-{
-No,
-Valid,
-Invalid
-};
-
-private:
-EditedAndValid  meEditedAndValid;
-
-SVX_DLLPRIVATE virtual sal_Int32ImplInsertImgEntry( const OUString& 
rEntry, sal_Int32  nPos, bool bChecked ) override;
-
-SVX_DLLPRIVATE virtual void ImplClear() override;
-SVX_DLLPRIVATE virtual sal_Int32ImplInsertEntry( const OUString& 
rEntry, sal_Int32 nPos ) override;
-SVX_DLLPRIVATE virtual void ImplSetEntryData( sal_Int32 nPos, 
void* pData ) override;
-SVX_DLLPRIVATE virtual sal_Int32ImplGetSelectedEntryPos() const 
override;
-SVX_DLLPRIVATE virtual void*ImplGetEntryData( sal_Int32 nPos ) 
const override;
-SVX_DLLPRIVATE virtual void ImplSelectEntryPos( sal_Int32 nPos, 
bool bSelect ) override;
-SVX_DLLPRIVATE virtual sal_Int32ImplGetEntryPos( const void* pData ) 
const override;
-
-DECL_LINK( EditModifyHdl, Edit&, void );
-};
-
 #endif
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/solenv/bin/native-code.py b/solenv/bin/native-code.py
index e854f84fdf74..ab2f87894b80 100755
--- a/solenv/bin/native-code.py
+++ b/solenv/bin/native-code.py
@@ -506,7 +506,6 @@ custom_widgets = [
 'SvxFillAttrBox',
 'SvxFillTypeBox',
 'SvxLanguageBox',
-'SvxLanguageComboBox',
 'SvxLightCtl3D',
 'SvxRelativeField',
 'SvxTextEncodingBox',
diff --git a/svx/source/dialog/langbox.cxx b/svx/source/dialog/langbox.cxx
index b30d234aed4a..eb099005d2e6 100644
--- a/svx/source/dialog/langbox.cxx
+++ b/svx/source/dialog/langbox.cxx
@@ -40,9 +40,6 @@ using namespace ::com::sun::star::util;
 using namespace ::com::sun::star::linguistic2;
 using namespace ::com::sun::star::uno;
 
-
-static_assert((LISTBOX_APPEND == COMBOBOX_APPEND) && (LISTBOX_ENTRY_NOTFOUND 
== COMBOBOX_ENTRY_NOTFOUND), "If these ever dispersed we'd need a solution");
-
 OUString GetDicInfoStr( const OUString& rName, const LanguageType nLang, bool 
bNeg )
 {
 INetURLObject aURLObj;
@@ -108,21 +105,6 @@ extern "C" SAL_DLLPUBLIC_EXPORT void 
makeSvxLanguageBox(VclPtr & rR
 rRet = pLanguageBox;
 }
 
-extern "C" SAL_DLLPUBLIC_EXPORT void 
makeSvxLanguageComboBox(VclPtr & rRet, const VclPtr & 
pParent, VclBuilder::stringmap & rMap)
-{
-
static_assert(std::is_same_v,
- decltype(makeSvxLanguageComboBox)>);
-WinBits nBits = WB_LEFT|WB_VCENTER|WB_3DLOOK|WB_TABSTOP;
-bool bDropdown = BuilderUtils::extractDropdown(rMap);
-if (bDropdown)
-nBits |= WB_DROPDOWN;
-else
-nBits |= WB_BORDER;
-VclPtrInstance pLanguageBox(pParent, nBits);
-pLanguageBox->EnableAutoSize(true);
-rRet = pLanguageBox;
-}
-
 SvxLanguageBoxBase::SvxLanguageBoxBase()
 : m_bWithCheckmark(false)
 {
@@ -734,188 +716,46 @@ SvxLanguageBox::SvxLanguageBox( vcl::Window* pParent, 
WinBits nBits )
 ImplLanguageBoxBaseInit();
 }
 
-SvxLanguageComboBox::SvxLanguageComboBox( vcl::Window* pParent, WinBits nBits )
-: ComboBox( pParent, nBits )
-, SvxLanguageBoxBase()
-, m

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

2019-10-05 Thread Noel Grandin (via logerrit)
 cui/source/tabpages/page.cxx  |4 ++--
 include/svx/svxids.hrc|2 +-
 sc/source/ui/styleui/styledlg.cxx |2 +-
 sd/source/ui/dlg/dlgpage.cxx  |2 +-
 4 files changed, 5 insertions(+), 5 deletions(-)

New commits:
commit 85091c7bf5c3f2fcf409fd2691f227ca7f353945
Author: Noel Grandin 
AuthorDate: Fri Oct 4 18:07:58 2019 +0200
Commit: Noel Grandin 
CommitDate: Sat Oct 5 09:10:05 2019 +0200

Convert SID_ENUM_PAGE_MODE to SfxUInt16Item

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

diff --git a/cui/source/tabpages/page.cxx b/cui/source/tabpages/page.cxx
index 0cc4cf23651d..41e65c3c2b59 100644
--- a/cui/source/tabpages/page.cxx
+++ b/cui/source/tabpages/page.cxx
@@ -1519,7 +1519,7 @@ bool SvxPageDescPage::IsMarginOutOfRange() const
 
 void SvxPageDescPage::PageCreated(const SfxAllItemSet& aSet)
 {
-const SfxAllEnumItem* pModeItem = 
aSet.GetItem(SID_ENUM_PAGE_MODE, false);
+const SfxUInt16Item* pModeItem = aSet.GetItem(SID_ENUM_PAGE_MODE, false);
 const SfxAllEnumItem* pPaperStartItem = 
aSet.GetItem(SID_PAPER_START, false);
 const SfxAllEnumItem* pPaperEndItem = 
aSet.GetItem(SID_PAPER_END, false);
 const SfxStringListItem* pCollectListItem = 
aSet.GetItem(SID_COLLECT_LIST, false);
@@ -1527,7 +1527,7 @@ void SvxPageDescPage::PageCreated(const SfxAllItemSet& 
aSet)
 
 if (pModeItem)
 {
-eMode = static_cast(pModeItem->GetEnumValue());
+eMode = static_cast(pModeItem->GetValue());
 }
 
 if(pPaperStartItem && pPaperEndItem)
diff --git a/include/svx/svxids.hrc b/include/svx/svxids.hrc
index 7dd778baadd7..cbcbc7461438 100644
--- a/include/svx/svxids.hrc
+++ b/include/svx/svxids.hrc
@@ -823,7 +823,7 @@ class SvxSetItem;
 #define SID_SWMODE_TYPE ( SID_SVX_START + 1035 
)
 #define SID_DISABLE_CTL ( SID_SVX_START + 1036 
)
 #define SID_INSERT_HYPERLINKCONTROL ( SID_SVX_START + 1037 
)
-#define SID_ENUM_PAGE_MODE  ( SID_SVX_START + 1038 
)
+#define SID_ENUM_PAGE_MODE  
TypedWhichId( SID_SVX_START + 1038 )
 #define SID_PAPER_START ( SID_SVX_START + 1039 
)
 #define SID_PAPER_END   ( SID_SVX_START + 1040 
)
 #define SID_COLLECT_LIST( SID_SVX_START + 1041 
)
diff --git a/sc/source/ui/styleui/styledlg.cxx 
b/sc/source/ui/styleui/styledlg.cxx
index 1002cf2e18e6..ca6c1b727169 100644
--- a/sc/source/ui/styleui/styledlg.cxx
+++ b/sc/source/ui/styleui/styledlg.cxx
@@ -85,7 +85,7 @@ void ScStyleDlg::PageCreated(const OString& rPageId, 
SfxTabPage& rTabPage)
 SfxAllItemSet aSet(*(GetInputSetImpl()->GetPool()));
 if (rPageId == "page")
 {
-aSet.Put (SfxAllEnumItem(sal_uInt16(SID_ENUM_PAGE_MODE), 
SVX_PAGE_MODE_CENTER));
+aSet.Put (SfxUInt16Item(sal_uInt16(SID_ENUM_PAGE_MODE), 
SVX_PAGE_MODE_CENTER));
 rTabPage.PageCreated(aSet);
 }
 else if (rPageId == "header" || rPageId == "footer")
diff --git a/sd/source/ui/dlg/dlgpage.cxx b/sd/source/ui/dlg/dlgpage.cxx
index effc2e4501df..f9fa0db66778 100644
--- a/sd/source/ui/dlg/dlgpage.cxx
+++ b/sd/source/ui/dlg/dlgpage.cxx
@@ -67,7 +67,7 @@ void SdPageDlg::PageCreated(const OString& rId, SfxTabPage& 
rPage)
 SfxAllItemSet aSet(*(GetInputSetImpl()->GetPool()));
 if (rId == "RID_SVXPAGE_PAGE")
 {
-aSet.Put (SfxAllEnumItem(sal_uInt16(SID_ENUM_PAGE_MODE), 
SVX_PAGE_MODE_PRESENTATION));
+aSet.Put (SfxUInt16Item(sal_uInt16(SID_ENUM_PAGE_MODE), 
SVX_PAGE_MODE_PRESENTATION));
 aSet.Put (SfxAllEnumItem(sal_uInt16(SID_PAPER_START), PAPER_A0));
 aSet.Put (SfxAllEnumItem(sal_uInt16(SID_PAPER_END), PAPER_E));
 rPage.PageCreated(aSet);
___
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 sd/source sw/source

2019-10-04 Thread Noel Grandin (via logerrit)
 cui/source/tabpages/numpages.cxx  |4 ++--
 include/svx/svxids.hrc|2 +-
 sd/source/ui/dlg/BulletAndPositionDlg.cxx |4 ++--
 sd/source/ui/dlg/dlgolbul.cxx |5 +++--
 sw/source/ui/fmtui/tmpdlg.cxx |4 ++--
 sw/source/ui/misc/num.cxx |5 +++--
 6 files changed, 13 insertions(+), 11 deletions(-)

New commits:
commit 01619f03f3b369e2ccdd42b53eb275d3048807d1
Author: Noel Grandin 
AuthorDate: Thu Oct 3 21:35:10 2019 +0200
Commit: Noel Grandin 
CommitDate: Fri Oct 4 10:24:24 2019 +0200

use SfxUInt16Item for SID_METRIC_ITEM

because we aren't using the array of values in SfxAllEnumItem

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

diff --git a/cui/source/tabpages/numpages.cxx b/cui/source/tabpages/numpages.cxx
index 0208d6f9c5b4..03c431cfdd9e 100644
--- a/cui/source/tabpages/numpages.cxx
+++ b/cui/source/tabpages/numpages.cxx
@@ -3313,7 +3313,7 @@ void SvxNumOptionsTabPage::PageCreated(const 
SfxAllItemSet& aSet)
 const SfxStringListItem* pListItem = 
aSet.GetItem(SID_CHAR_FMT_LIST_BOX, false);
 const SfxStringItem* pNumCharFmt = 
aSet.GetItem(SID_NUM_CHAR_FMT, false);
 const SfxStringItem* pBulletCharFmt = 
aSet.GetItem(SID_BULLET_CHAR_FMT, false);
-const SfxAllEnumItem* pMetricItem = 
aSet.GetItem(SID_METRIC_ITEM, false);
+const SfxUInt16Item* pMetricItem = 
aSet.GetItem(SID_METRIC_ITEM, false);
 
 if (pNumCharFmt &&pBulletCharFmt)
 SetCharFmts( pNumCharFmt->GetValue(),pBulletCharFmt->GetValue());
@@ -3331,7 +3331,7 @@ void SvxNumOptionsTabPage::PageCreated(const 
SfxAllItemSet& aSet)
 
 void SvxNumPositionTabPage::PageCreated(const SfxAllItemSet& aSet)
 {
-const SfxAllEnumItem* pMetricItem = 
aSet.GetItem(SID_METRIC_ITEM, false);
+const SfxUInt16Item* pMetricItem = 
aSet.GetItem(SID_METRIC_ITEM, false);
 
 if (pMetricItem)
 SetMetric(static_cast(pMetricItem->GetValue()));
diff --git a/include/svx/svxids.hrc b/include/svx/svxids.hrc
index cd7a1698b987..3f18a7fb70ec 100644
--- a/include/svx/svxids.hrc
+++ b/include/svx/svxids.hrc
@@ -810,7 +810,7 @@ class SvxSetItem;
 #define SID_OBJECT_LIST ( SID_SVX_START + 1021 
)
 #define SID_ATTR_SET( SID_SVX_START + 1022 
)
 #define SID_CHAR_FMT_LIST_BOX   ( SID_SVX_START + 1023 
)
-#define SID_METRIC_ITEM ( SID_SVX_START + 1024 
)
+#define SID_METRIC_ITEM 
TypedWhichId( SID_SVX_START + 1024 )
 #define SID_NUM_CHAR_FMT( SID_SVX_START + 1025 
)
 #define SID_BULLET_CHAR_FMT ( SID_SVX_START + 1026 
)
 #define SID_DISABLE_SVXEXTPARAGRAPHTABPAGE_PAGEBREAK( SID_SVX_START + 1027 
)
diff --git a/sd/source/ui/dlg/BulletAndPositionDlg.cxx 
b/sd/source/ui/dlg/BulletAndPositionDlg.cxx
index e1daf7661942..7ce6a227fe3f 100644
--- a/sd/source/ui/dlg/BulletAndPositionDlg.cxx
+++ b/sd/source/ui/dlg/BulletAndPositionDlg.cxx
@@ -185,11 +185,11 @@ 
SvxBulletAndPositionDlg::SvxBulletAndPositionDlg(weld::Window* pWindow, const Sf
 // PageCreated
 FieldUnit eMetric = pView->GetDoc().GetUIUnit();
 SfxAllItemSet aSet(*(rSet.GetPool()));
-aSet.Put(SfxAllEnumItem(SID_METRIC_ITEM, 
static_cast(eMetric)));
+aSet.Put(SfxUInt16Item(SID_METRIC_ITEM, static_cast(eMetric)));
 
 const SfxStringItem* pNumCharFmt = 
aSet.GetItem(SID_NUM_CHAR_FMT, false);
 const SfxStringItem* pBulletCharFmt = 
aSet.GetItem(SID_BULLET_CHAR_FMT, false);
-const SfxAllEnumItem* pMetricItem = 
aSet.GetItem(SID_METRIC_ITEM, false);
+const SfxUInt16Item* pMetricItem = 
aSet.GetItem(SID_METRIC_ITEM, false);
 
 if (pNumCharFmt && pBulletCharFmt)
 SetCharFmts(pNumCharFmt->GetValue(), pBulletCharFmt->GetValue());
diff --git a/sd/source/ui/dlg/dlgolbul.cxx b/sd/source/ui/dlg/dlgolbul.cxx
index f62057f8ce41..0f8f46c4a5fd 100644
--- a/sd/source/ui/dlg/dlgolbul.cxx
+++ b/sd/source/ui/dlg/dlgolbul.cxx
@@ -31,6 +31,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 
 #include 
@@ -135,14 +136,14 @@ void OutlineBulletDlg::PageCreated(const OString& rId, 
SfxTabPage &rPage)
 {
 FieldUnit eMetric = m_pSdView->GetDoc().GetUIUnit();
 SfxAllItemSet aSet(*(GetInputSetImpl()->GetPool()));
-aSet.Put ( 
SfxAllEnumItem(SID_METRIC_ITEM,static_cast(eMetric)));
+aSet.Put ( 
SfxUInt16Item(SID_METRIC_ITEM,static_cast(eMetric)));
 rPage.PageCreated(aSet);
 }
 else if (rId == "position")
 {
 FieldUnit eMetric = m_pSdView->GetDoc().GetUIUnit();
 SfxAllItemSet aSet(*(GetInputSetImpl()->GetPool()));
-aSet.Put ( 
SfxAllEnumItem(SID_METRIC_ITEM,static_cast(eMetric)));
+aSet.Put ( 
SfxUInt16Item(SID_METRIC_ITEM,static_cast(eMet

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

2019-10-02 Thread Caolán McNamara (via logerrit)
 cui/source/options/optaboutconfig.cxx |6 +-
 include/svx/ctredlin.hxx  |1 -
 sc/inc/chgviset.hxx   |1 +
 3 files changed, 2 insertions(+), 6 deletions(-)

New commits:
commit 423753026057934e4f3aa1d6c0795493ecdf67b2
Author: Caolán McNamara 
AuthorDate: Wed Oct 2 17:11:26 2019 +0100
Commit: Caolán McNamara 
CommitDate: Wed Oct 2 22:19:57 2019 +0200

drop some unnecessary includes

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

diff --git a/cui/source/options/optaboutconfig.cxx 
b/cui/source/options/optaboutconfig.cxx
index 03594de79947..89f3cd3816e2 100644
--- a/cui/source/options/optaboutconfig.cxx
+++ b/cui/source/options/optaboutconfig.cxx
@@ -9,11 +9,6 @@
 
 #include "optaboutconfig.hxx"
 
-#include 
-#include 
-#include 
-#include 
-#include 
 #include 
 #include 
 #include 
@@ -26,6 +21,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
diff --git a/include/svx/ctredlin.hxx b/include/svx/ctredlin.hxx
index 15d27723121d..7d6f858de247 100644
--- a/include/svx/ctredlin.hxx
+++ b/include/svx/ctredlin.hxx
@@ -23,7 +23,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 
diff --git a/sc/inc/chgviset.hxx b/sc/inc/chgviset.hxx
index 9cbcb7a26f06..75491c2dd1d8 100644
--- a/sc/inc/chgviset.hxx
+++ b/sc/inc/chgviset.hxx
@@ -21,6 +21,7 @@
 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include "rangelst.hxx"
___
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

2019-08-29 Thread Gabor Kelemen (via logerrit)
 cui/source/options/certpath.cxx|2 -
 cui/source/options/cfgchart.cxx|1 
 cui/source/options/connpoolconfig.cxx  |3 -
 cui/source/options/connpooloptions.cxx |3 -
 cui/source/options/cuisrchdlg.cxx  |   14 
 cui/source/options/dbregister.cxx  |   11 ---
 cui/source/options/dbregisterednamesconfig.cxx |7 
 cui/source/options/fontsubs.cxx|3 -
 cui/source/options/fontsubs.hxx|4 --
 cui/source/options/optaboutconfig.cxx  |3 -
 cui/source/options/optasian.cxx|2 -
 cui/source/options/optbasic.cxx|1 
 cui/source/options/optbasic.hxx|1 
 cui/source/options/optchart.cxx|1 
 cui/source/options/optcolor.cxx|5 ---
 cui/source/options/optdict.cxx |6 ---
 cui/source/options/optfltr.cxx |4 --
 cui/source/options/optfltr.hxx |2 -
 cui/source/options/optgdlg.cxx |   24 ---
 cui/source/options/optgdlg.hxx |4 --
 cui/source/options/optgenrl.cxx|3 -
 cui/source/options/opthtml.cxx |1 
 cui/source/options/optinet2.cxx|   39 -
 cui/source/options/optinet2.hxx|3 -
 cui/source/options/optjava.cxx |4 --
 cui/source/options/optjava.hxx |4 --
 cui/source/options/optlingu.cxx|   16 --
 cui/source/options/optopencl.cxx   |   10 --
 cui/source/options/optpath.cxx |9 -
 cui/source/options/optsave.cxx |4 --
 cui/source/options/optsave.hxx |4 --
 cui/source/options/optupdt.cxx |2 -
 cui/source/options/optupdt.hxx |2 -
 cui/source/options/personalization.cxx |   17 --
 cui/source/options/sdbcdriverenum.cxx  |1 
 cui/source/options/securityoptions.cxx |1 
 cui/source/options/treeopt.cxx |   21 +
 cui/source/options/tsaurls.cxx |4 --
 cui/source/options/webconninfo.cxx |2 -
 cui/source/tabpages/align.cxx  |8 -
 cui/source/tabpages/autocdlg.cxx   |9 -
 cui/source/tabpages/backgrnd.cxx   |7 
 cui/source/tabpages/border.cxx |8 -
 cui/source/tabpages/chardlg.cxx|   15 -
 cui/source/tabpages/connect.cxx|5 ---
 cui/source/tabpages/dstribut.cxx   |2 -
 cui/source/tabpages/grfpage.cxx|4 --
 cui/source/tabpages/labdlg.cxx |4 --
 cui/source/tabpages/macroass.cxx   |4 --
 cui/source/tabpages/measure.cxx|   10 --
 cui/source/tabpages/numfmt.cxx |5 ---
 cui/source/tabpages/numpages.cxx   |   16 +-
 cui/source/tabpages/page.cxx   |6 ---
 cui/source/tabpages/paragrph.cxx   |5 ---
 cui/source/tabpages/swpossizetabpage.cxx   |1 
 cui/source/tabpages/tabarea.cxx|7 
 cui/source/tabpages/tabline.cxx|3 -
 cui/source/tabpages/tabstpge.cxx   |4 --
 cui/source/tabpages/textanim.cxx   |5 ---
 cui/source/tabpages/textattr.cxx   |8 -
 cui/source/tabpages/tparea.cxx |   15 -
 cui/source/tabpages/tpbitmap.cxx   |9 -
 cui/source/tabpages/tpcolor.cxx|   19 
 cui/source/tabpages/tpgradnt.cxx   |   10 --
 cui/source/tabpages/tphatch.cxx|   10 --
 cui/source/tabpages/tpline.cxx |   10 --
 cui/source/tabpages/tplnedef.cxx   |6 ---
 cui/source/tabpages/tplneend.cxx   |8 -
 cui/source/tabpages/tppattern.cxx  |   15 -
 cui/source/tabpages/tpshadow.cxx   |6 ---
 cui/source/tabpages/tptrans.cxx|   15 -
 cui/source/tabpages/transfrm.cxx   |7 
 include/svx/databaseregistrationui.hxx |1 
 73 files changed, 9 insertions(+), 506 deletions(-)

New commits:
commit 00f4595fbec8a6bfc31687ed950525ce20c68fcd
Author: Gabor Kelemen 
AuthorDate: Sun Aug 25 10:28:19 2019 +0200
Commit: Miklos Vajna 
CommitDate: Thu Aug 29 09:43:23 2019 +0200

tdf#42949 Fix IWYU warnings in cui/source/{options,tabpages}/*cxx

Found with bin/find-unneeded-includes
Only removal proposals are dealt with here.

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

diff --git a/cui/source/opti

[Libreoffice-commits] core.git: cui/source include/svx include/vcl officecfg/registry sc/sdi sc/source sc/uiconfig svx/sdi sw/inc sw/sdi sw/source sw/uiconfig

2019-08-01 Thread Shubham Goyal (via logerrit)
 cui/source/factory/dlgfact.cxx   |   13 ++
 cui/source/factory/dlgfact.hxx   |   18 +++
 include/svx/svxids.hrc   |5 -
 include/vcl/abstdlg.hxx  |   13 ++
 officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu |   16 +++
 sc/sdi/tabvwsh.sdi   |3 
 sc/source/ui/inc/tabvwsh.hxx |2 
 sc/source/ui/view/tabvwshb.cxx   |   48 
++
 sc/uiconfig/scalc/menubar/menubar.xml|1 
 sc/uiconfig/scalc/popupmenu/graphic.xml  |2 
 svx/sdi/svx.sdi  |   34 
+++
 sw/inc/view.hxx  |1 
 sw/sdi/viewsh.sdi|   12 ++
 sw/source/uibase/uiview/viewdlg2.cxx |   32 
++
 sw/source/uibase/uiview/viewstat.cxx |   11 ++
 sw/uiconfig/sglobal/menubar/menubar.xml  |1 
 sw/uiconfig/swform/menubar/menubar.xml   |1 
 sw/uiconfig/swriter/menubar/menubar.xml  |1 
 sw/uiconfig/swxform/menubar/menubar.xml  |1 
 19 files changed, 214 insertions(+), 1 deletion(-)

New commits:
commit 02d16928bcd1eb2b6dfd7524ea9af591c0f5f2e0
Author: Shubham Goyal <22shub...@gmail.com>
AuthorDate: Wed Jul 24 10:31:04 2019 +0530
Commit: Samuel Mehrbrodt 
CommitDate: Thu Aug 1 22:32:11 2019 +0200

Make QR Code callable in calc and writer

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

diff --git a/cui/source/factory/dlgfact.cxx b/cui/source/factory/dlgfact.cxx
index ce64ed27db69..37460b879aa0 100644
--- a/cui/source/factory/dlgfact.cxx
+++ b/cui/source/factory/dlgfact.cxx
@@ -61,6 +61,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -319,6 +320,11 @@ short AbstractSignSignatureLineDialog_Impl::Execute()
 return m_xDlg->run();
 }
 
+short AbstractQrCodeGenDialog_Impl::Execute()
+{
+return m_xDlg->run();
+}
+
 IMPL_ABSTDLG_BASE(AbstractScreenshotAnnotationDlg_Impl);
 
 short CuiAbstractTabController_Impl::Execute()
@@ -1622,6 +1628,13 @@ 
AbstractDialogFactory_Impl::CreateSignSignatureLineDialog(weld::Window* pParent,
 std::make_unique(pParent, xModel));
 }
 
+VclPtr 
AbstractDialogFactory_Impl::CreateQrCodeGenDialog(
+weld::Window* pParent, const Reference xModel, bool bEditExisting)
+{
+return VclPtr::Create(
+std::make_unique(pParent, xModel, bEditExisting));
+}
+
 VclPtr
 AbstractDialogFactory_Impl::CreateTipOfTheDayDialog(weld::Window* pParent)
 {
diff --git a/cui/source/factory/dlgfact.hxx b/cui/source/factory/dlgfact.hxx
index 68267c61a122..9948e71fcf24 100644
--- a/cui/source/factory/dlgfact.hxx
+++ b/cui/source/factory/dlgfact.hxx
@@ -48,6 +48,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -698,6 +699,19 @@ public:
 virtual short Execute() override;
 };
 
+class QrCodeGenDialog;
+class AbstractQrCodeGenDialog_Impl : public AbstractQrCodeGenDialog
+{
+std::unique_ptr m_xDlg;
+
+public:
+explicit AbstractQrCodeGenDialog_Impl(std::unique_ptr p)
+: m_xDlg(std::move(p))
+{
+}
+virtual short Execute() override;
+};
+
 class SignSignatureLineDialog;
 class AbstractSignSignatureLineDialog_Impl : public 
AbstractSignSignatureLineDialog
 {
@@ -907,6 +921,10 @@ public:
 CreateSignSignatureLineDialog(weld::Window* pParent,
   const 
css::uno::Reference xModel) override;
 
+virtual VclPtr
+CreateQrCodeGenDialog(weld::Window* pParent,
+  const css::uno::Reference 
xModel, bool bEditExisting) override;
+
 virtual VclPtr 
CreateTipOfTheDayDialog(weld::Window* pParent) override;
 };
 
diff --git a/include/svx/svxids.hrc b/include/svx/svxids.hrc
index bbca92682819..d430f6de692f 100644
--- a/include/svx/svxids.hrc
+++ b/include/svx/svxids.hrc
@@ -982,8 +982,11 @@ class SvxSetItem;
 
 #define SID_TOGGLE_RESOLVED_NOTES   ( SID_SVX_START + 1190 
)
 
+#define SID_INSERT_QRCODE   ( SID_SVX_START + 1191 
)
+#define SID_EDIT_QRCODE ( SID_SVX_START + 1192 
)
+
 // IMPORTANT NOTE: adjust SID_SVX_FIRSTFREE, when adding new slot id
-#define SID_SVX_FIRSTFREE   ( SID_SVX_START + 1190 
+ 1 )
+#define SID_SVX_FIRSTFREE   ( SID_SVX_START + 1192 
+ 1 )
 
 // Overflow check for slot IDs
 #i

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

2019-04-09 Thread Tomaž Vajngerl (via logerrit)
 cui/source/tabpages/tppattern.cxx |9 +++--
 include/svx/xbtmpit.hxx   |2 --
 include/vcl/BitmapTools.hxx   |2 +-
 svx/source/dialog/dlgctrl.cxx |   21 -
 svx/source/xoutdev/xattrbmp.cxx   |2 +-
 vcl/source/bitmap/BitmapTools.cxx |6 +++---
 6 files changed, 12 insertions(+), 30 deletions(-)

New commits:
commit 05a8749ee6f251d4b92eecb97763fa1fe94c68c8
Author: Tomaž Vajngerl 
AuthorDate: Tue Apr 9 09:58:27 2019 +0900
Commit: Tomaž Vajngerl 
CommitDate: Tue Apr 9 12:07:36 2019 +0200

remove some usages of BitmapColor outside of VCL

You get BitmapColor only from reading pixels from a Bitmap and
we want to avoid usage of Bitmap outside of VCL (and use BitmapEx
as the alternative which will eventually replace Bitmap).

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

diff --git a/cui/source/tabpages/tppattern.cxx 
b/cui/source/tabpages/tppattern.cxx
index 878c1ae8b98d..0bb433f00c65 100644
--- a/cui/source/tabpages/tppattern.cxx
+++ b/cui/source/tabpages/tppattern.cxx
@@ -296,9 +296,9 @@ IMPL_LINK_NOARG(SvxPatternTabPage, ChangePatternHdl_Impl, 
SvtValueSet*, void)
 
 if(pGraphicObject)
 {
-BitmapColor aBack;
-BitmapColor aFront;
-bool 
bIs8x8(vcl::bitmap::isHistorical8x8(pGraphicObject->GetGraphic().GetBitmapEx(), 
aBack, aFront));
+Color aBackColor;
+Color aPixelColor;
+bool 
bIs8x8(vcl::bitmap::isHistorical8x8(pGraphicObject->GetGraphic().GetBitmapEx(), 
aBackColor, aPixelColor));
 
 m_xLbColor->SetNoSelection();
 m_xLbBackgroundColor->SetNoSelection();
@@ -313,9 +313,6 @@ IMPL_LINK_NOARG(SvxPatternTabPage, ChangePatternHdl_Impl, 
SvtValueSet*, void)
 
 
m_xCtlPixel->SetXBitmap(pGraphicObject->GetGraphic().GetBitmapEx());
 
-Color aPixelColor = aFront.GetColor();
-Color aBackColor = aBack.GetColor();
-
 m_xLbColor->SelectEntry( aPixelColor );
 m_xLbBackgroundColor->SelectEntry( aBackColor );
 
diff --git a/include/svx/xbtmpit.hxx b/include/svx/xbtmpit.hxx
index 463fc6e78d63..7da764f7f9ac 100644
--- a/include/svx/xbtmpit.hxx
+++ b/include/svx/xbtmpit.hxx
@@ -26,8 +26,6 @@
 #include 
 
 class SdrModel;
-class BitmapColor;
-
 
 // class XFillBitmapItem
 
diff --git a/include/vcl/BitmapTools.hxx b/include/vcl/BitmapTools.hxx
index 0099358476c0..81b062fefdc1 100644
--- a/include/vcl/BitmapTools.hxx
+++ b/include/vcl/BitmapTools.hxx
@@ -125,7 +125,7 @@ VCL_DLLPUBLIC css::uno::Sequence< sal_Int8 > 
CanvasExtractBitmapData(BitmapEx co
 // helper to construct historical 8x8 bitmaps with two colors
 
 BitmapEx VCL_DLLPUBLIC createHistorical8x8FromArray(std::array 
const & pArray, Color aColorPix, Color aColorBack);
-bool VCL_DLLPUBLIC isHistorical8x8(const BitmapEx& rBitmapEx, BitmapColor& 
o_rBack, BitmapColor& o_rFront);
+bool VCL_DLLPUBLIC isHistorical8x8(const BitmapEx& rBitmapEx, Color& o_rBack, 
Color& o_rFront);
 
 VCL_DLLPUBLIC bool convertBitmap32To24Plus8(BitmapEx const & rInput, BitmapEx 
& rResult);
 
diff --git a/svx/source/dialog/dlgctrl.cxx b/svx/source/dialog/dlgctrl.cxx
index 8b280e334051..01ad02c96341 100644
--- a/svx/source/dialog/dlgctrl.cxx
+++ b/svx/source/dialog/dlgctrl.cxx
@@ -873,25 +873,12 @@ void SvxPixelCtl::LoseFocus()
 
 void SvxPixelCtl::SetXBitmap(const BitmapEx& rBitmapEx)
 {
-BitmapColor aBack;
-BitmapColor aFront;
-
-if (vcl::bitmap::isHistorical8x8(rBitmapEx, aBack, aFront))
+if (vcl::bitmap::isHistorical8x8(rBitmapEx, aBackgroundColor, aPixelColor))
 {
-Bitmap aBitmap(rBitmapEx.GetBitmap());
-Bitmap::ScopedReadAccess pRead(aBitmap);
-
-aBackgroundColor = aBack.GetColor();
-aPixelColor = aFront.GetColor();
-
-for(sal_uInt16 i(0); i < nSquares; i++)
+for (sal_uInt16 i = 0; i < nSquares; i++)
 {
-const BitmapColor aColor(pRead->GetColor(i/8, i%8));
-
-if (aColor == aBack)
-maPixelData[i] = 0;
-else
-maPixelData[i] = 1;
+Color aColor = rBitmapEx.GetPixelColor(i%8, i/8);
+maPixelData[i] = (aColor == aBackgroundColor) ? 0 : 1;
 }
 }
 }
diff --git a/svx/source/xoutdev/xattrbmp.cxx b/svx/source/xoutdev/xattrbmp.cxx
index e15e11bc808c..140718bd056f 100644
--- a/svx/source/xoutdev/xattrbmp.cxx
+++ b/svx/source/xoutdev/xattrbmp.cxx
@@ -164,7 +164,7 @@ bool XFillBitmapItem::operator==(const SfxPoolItem& rItem) 
const
 
 bool XFillBitmapItem::isPattern() const
 {
-BitmapColor aBack, aFront;
+Color aBack, aFront;
 return 
vcl::bitmap::isHistorical8x8(GetGraphicObject().GetGraphic().GetBitmapEx(), 
aBack, aFront);
 }
 
diff --git a/vcl/source/bitmap/BitmapTools.cxx 
b/vcl/source/bitmap/BitmapTools.cxx
index 6f14c3526d42..5610c7347755 100644
--- a/vcl/source/bitmap/BitmapT

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

2019-03-27 Thread Martin van Zijl (via logerrit)
 cui/source/dialogs/splitcelldlg.cxx   |6 ++
 cui/source/inc/splitcelldlg.hxx   |1 +
 include/svx/svxdlg.hxx|1 +
 officecfg/registry/schema/org/openoffice/Office/Writer.xcs|7 +++
 officecfg/registry/schema/org/openoffice/Office/WriterWeb.xcs |7 +++
 sw/inc/doc.hxx|2 ++
 sw/inc/modcfg.hxx |8 
 sw/inc/swmodule.hxx   |2 ++
 sw/source/core/doc/doc.cxx|   10 ++
 sw/source/uibase/app/swmodul1.cxx |   10 ++
 sw/source/uibase/config/modcfg.cxx|6 +-
 sw/source/uibase/inc/wrtsh.hxx|3 +++
 sw/source/uibase/shells/tabsh.cxx |6 ++
 sw/source/uibase/wrtsh/select.cxx |   10 ++
 14 files changed, 78 insertions(+), 1 deletion(-)

New commits:
commit a80317b602e175f780cd662b5526a538d053419a
Author: Martin van Zijl 
AuthorDate: Wed Dec 26 07:21:59 2018 +1300
Commit: Samuel Mehrbrodt 
CommitDate: Wed Mar 27 16:54:53 2019 +0100

tdf#60242 remember horizontal/vertical choice in split cells dialog

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

diff --git a/cui/source/dialogs/splitcelldlg.cxx 
b/cui/source/dialogs/splitcelldlg.cxx
index 903c998bb526..6c9a7443c54e 100644
--- a/cui/source/dialogs/splitcelldlg.cxx
+++ b/cui/source/dialogs/splitcelldlg.cxx
@@ -83,4 +83,10 @@ short SvxSplitTableDlg::Execute()
 return run();
 }
 
+void SvxSplitTableDlg::SetSplitVerticalByDefault()
+{
+if( mnMaxVertical >= 2 )
+m_xVertBox->set_active(true); // tdf#60242
+}
+
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/cui/source/inc/splitcelldlg.hxx b/cui/source/inc/splitcelldlg.hxx
index 9b4c1f34c668..b0c2fddae3c7 100644
--- a/cui/source/inc/splitcelldlg.hxx
+++ b/cui/source/inc/splitcelldlg.hxx
@@ -43,6 +43,7 @@ public:
 virtual long GetCount() const override;
 
 virtual short Execute() override;
+virtual void SetSplitVerticalByDefault() override;
 };
 
 #endif
diff --git a/include/svx/svxdlg.hxx b/include/svx/svxdlg.hxx
index 8547dc306e1b..2a50a9ccde03 100644
--- a/include/svx/svxdlg.hxx
+++ b/include/svx/svxdlg.hxx
@@ -295,6 +295,7 @@ public:
 virtual bool IsHorizontal() const = 0;
 virtual bool IsProportional() const = 0;
 virtual long GetCount() const = 0;
+virtual void SetSplitVerticalByDefault() = 0;
 };
 
 class SvxAbstractNewTableDialog : public VclAbstractDialog
diff --git a/officecfg/registry/schema/org/openoffice/Office/Writer.xcs 
b/officecfg/registry/schema/org/openoffice/Office/Writer.xcs
index d18a5469079c..3b147dcfd25d 100644
--- a/officecfg/registry/schema/org/openoffice/Office/Writer.xcs
+++ b/officecfg/registry/schema/org/openoffice/Office/Writer.xcs
@@ -2308,6 +2308,13 @@
   
   true
 
+
+  
+Specifies whether cells should be split vertically by 
default.
+Split vertically by default
+  
+  false
+
   
 
 
diff --git a/officecfg/registry/schema/org/openoffice/Office/WriterWeb.xcs 
b/officecfg/registry/schema/org/openoffice/Office/WriterWeb.xcs
index cd655115ac99..917751492689 100644
--- a/officecfg/registry/schema/org/openoffice/Office/WriterWeb.xcs
+++ b/officecfg/registry/schema/org/openoffice/Office/WriterWeb.xcs
@@ -869,6 +869,13 @@
   
   false
 
+
+  
+Specifies whether cells should be split vertically by 
default.
+Split vertically by default
+  
+  false
+
   
 
 
diff --git a/sw/inc/doc.hxx b/sw/inc/doc.hxx
index 3ebbec5e1cc2..9bba13ef17be 100644
--- a/sw/inc/doc.hxx
+++ b/sw/inc/doc.hxx
@@ -1197,6 +1197,8 @@ public:
 bool IsInsTableFormatNum() const;
 bool IsInsTableChangeNumFormat() const;
 bool IsInsTableAlignNum() const;
+bool IsSplitVerticalByDefault() const;
+void SetSplitVerticalByDefault(bool value);
 
 // From FEShell (for Undo and BModified).
 static void GetTabCols( SwTabCols &rFill, const SwCellFrame* pBoxFrame );
diff --git a/sw/inc/modcfg.hxx b/sw/inc/modcfg.hxx
index 550cb1c332be..795d1f382fdc 100644
--- a/sw/inc/modcfg.hxx
+++ b/sw/inc/modcfg.hxx
@@ -155,6 +155,7 @@ class SwTableConfig : public utl::ConfigItem
 boolm_bInsTableFormatNum;   // Table/Input/NumberRecognition   
 // Automatic recognition of numbers.
 boolm_bInsTableChangeNumFormat; // Table/Input/NumberFormatRecognition 
 // Automatic recognition of number formats.
 boolm_bInsTableAlignNum;

[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

2018-12-05 Thread Libreoffice Gerrit user
 cui/source/tabpages/tplnedef.cxx |1 -
 cui/source/tabpages/tplneend.cxx |1 -
 include/svx/tabarea.hxx  |5 ++---
 3 files changed, 2 insertions(+), 5 deletions(-)

New commits:
commit 5a73599206916f87c1836af7c4e0a02c28cb9887
Author: Noel Grandin 
AuthorDate: Tue Dec 4 10:00:12 2018 +0200
Commit: Noel Grandin 
CommitDate: Wed Dec 5 09:40:02 2018 +0100

remove unused ChangeType enum value

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

diff --git a/cui/source/tabpages/tplnedef.cxx b/cui/source/tabpages/tplnedef.cxx
index 5d822005f8ba..9d0a57943c09 100644
--- a/cui/source/tabpages/tplnedef.cxx
+++ b/cui/source/tabpages/tplnedef.cxx
@@ -773,7 +773,6 @@ IMPL_LINK_NOARG(SvxLineDefTabPage, ClickSaveHdl_Impl, 
weld::Button&, void)
 
 if( pDashList->Save() )
 {
-*pnDashListState |= ChangeType::SAVED;
 *pnDashListState &= ~ChangeType::MODIFIED;
 }
 else
diff --git a/cui/source/tabpages/tplneend.cxx b/cui/source/tabpages/tplneend.cxx
index 38f42d51d71b..18282f52fa69 100644
--- a/cui/source/tabpages/tplneend.cxx
+++ b/cui/source/tabpages/tplneend.cxx
@@ -610,7 +610,6 @@ IMPL_LINK_NOARG(SvxLineEndDefTabPage, ClickSaveHdl_Impl, 
weld::Button&, void)
 
 if( pLineEndList->Save() )
 {
-*pnLineEndListState |= ChangeType::SAVED;
 *pnLineEndListState &= ~ChangeType::MODIFIED;
 }
 else
diff --git a/include/svx/tabarea.hxx b/include/svx/tabarea.hxx
index d4d3c69fd604..b1307b4c41e6 100644
--- a/include/svx/tabarea.hxx
+++ b/include/svx/tabarea.hxx
@@ -25,12 +25,11 @@ enum class ChangeType
 {
 NONE = 0x00,
 MODIFIED = 0x01,
-CHANGED  = 0x02,
-SAVED= 0x04,
+CHANGED  = 0x02
 };
 namespace o3tl
 {
-template<> struct typed_flags : is_typed_flags {};
+template<> struct typed_flags : is_typed_flags {};
 }
 
 #endif // INCLUDED_SVX_TABAREA_HXX
___
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 ), 
&aStatusProgress );
-ClickCancelBtn( nullptr );
+pTheme->Actualize(LINK(this, ActualizeProgress, ActualizeHdl), 
&aStatusProgress);
+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* 

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

2018-11-15 Thread Libreoffice Gerrit user
 cui/source/tabpages/connect.cxx|2 +-
 include/svx/ClassificationDialog.hxx   |2 +-
 include/svx/charmap.hxx|2 +-
 include/svx/dlgctrl.hxx|2 +-
 include/svx/fntctrl.hxx|2 +-
 include/svx/hexcolorcontrol.hxx|2 +-
 include/svx/pagectrl.hxx   |2 +-
 include/svx/sdgmoitm.hxx   |2 +-
 include/svx/sdtaditm.hxx   |2 +-
 include/svx/sdtaitm.hxx|4 ++--
 include/svx/sdtakitm.hxx   |2 +-
 include/svx/sdtfsitm.hxx   |2 +-
 include/svx/sxcecitm.hxx   |2 +-
 include/svx/sxctitm.hxx|2 +-
 include/svx/sxekitm.hxx|2 +-
 include/svx/sxmtpitm.hxx   |4 ++--
 include/svx/sxmuitm.hxx|2 +-
 svx/inc/sxcikitm.hxx   |2 +-
 svx/inc/sxmkitm.hxx|2 +-
 svx/source/dialog/ClassificationDialog.cxx |2 +-
 svx/source/dialog/hexcolorcontrol.cxx  |2 +-
 svx/source/svdraw/svdattr.cxx  |   28 ++--
 22 files changed, 37 insertions(+), 37 deletions(-)

New commits:
commit 8c4c1abc9ffa7d9f893d4d16de61594ee090f10b
Author: Noel Grandin 
AuthorDate: Thu Nov 15 08:54:39 2018 +0200
Commit: Noel Grandin 
CommitDate: Thu Nov 15 09:42:02 2018 +0100

loplugin:staticmethods in svx

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

diff --git a/cui/source/tabpages/connect.cxx b/cui/source/tabpages/connect.cxx
index 9586d3d4e539..286e6ce0e3b1 100644
--- a/cui/source/tabpages/connect.cxx
+++ b/cui/source/tabpages/connect.cxx
@@ -415,7 +415,7 @@ void SvxConnectionPage::FillTypeLB()
 const sal_uInt16 nCount = pEdgeKindItem->GetValueCount();
 for (sal_uInt16 i = 0; i < nCount; i++)
 {
-OUString aStr = pEdgeKindItem->GetValueTextByPos(i);
+OUString aStr = SdrEdgeKindItem::GetValueTextByPos(i);
 m_xLbType->append_text(aStr);
 }
 }
diff --git a/include/svx/ClassificationDialog.hxx 
b/include/svx/ClassificationDialog.hxx
index 607f6565bdbc..3efa8fbc7a8b 100644
--- a/include/svx/ClassificationDialog.hxx
+++ b/include/svx/ClassificationDialog.hxx
@@ -69,7 +69,7 @@ private:
 DECL_LINK(SelectRecentlyUsedHdl, ListBox&, void);
 DECL_LINK(SelectIPPartHdl, ListBox&, void);
 DECL_LINK(EditWindowModifiedHdl, LinkParamNone*, void);
-DECL_LINK(ExpandedHdl, VclExpander&, void);
+DECL_STATIC_LINK(ClassificationDialog, ExpandedHdl, VclExpander&, void);
 
 void insertField(ClassificationType eType, OUString const & rString, 
OUString const & rFullString, OUString const & rIdentifier = OUString());
 void insertCategoryField(sal_Int32 nID);
diff --git a/include/svx/charmap.hxx b/include/svx/charmap.hxx
index 6871aae3dea7..21f81b9bfb91 100644
--- a/include/svx/charmap.hxx
+++ b/include/svx/charmap.hxx
@@ -94,7 +94,7 @@ public:
 virtual voidSelectIndex( int index, bool bFocus = 
false );
 voidOutputIndex( int index );
 voidDeSelect();
-voidCopyToClipboard(const OUString& str);
+static void CopyToClipboard(const OUString& str);
 bool IsSelected(sal_uInt16 _nPos) const { return _nPos == 
nSelectedIndex; }
 sal_uInt16   GetSelectIndexId() const { return 
sal::static_int_cast(nSelectedIndex); }
 static sal_uInt16   GetRowPos(sal_uInt16 _nPos);
diff --git a/include/svx/dlgctrl.hxx b/include/svx/dlgctrl.hxx
index 52c1f4f20ca7..64205752626e 100644
--- a/include/svx/dlgctrl.hxx
+++ b/include/svx/dlgctrl.hxx
@@ -79,7 +79,7 @@ class SAL_WARN_UNUSED SVX_DLLPUBLIC SvxRectCtl : public 
weld::CustomWidgetContro
 private:
 VclPtr m_pPage;
 
-SVX_DLLPRIVATE void InitSettings(vcl::RenderContext& 
rRenderContext);
+SVX_DLLPRIVATE static void  InitSettings(vcl::RenderContext& 
rRenderContext);
 SVX_DLLPRIVATE void InitRectBitmap();
 SVX_DLLPRIVATE BitmapEx&GetRectBitmap();
 SVX_DLLPRIVATE void Resize_Impl(const Size& rSize);
diff --git a/include/svx/fntctrl.hxx b/include/svx/fntctrl.hxx
index c122c98943d6..df12355ef42a 100644
--- a/include/svx/fntctrl.hxx
+++ b/include/svx/fntctrl.hxx
@@ -88,7 +88,7 @@ class SAL_WARN_UNUSED SVX_DLLPUBLIC FontPrevWindow : public 
weld::CustomWidgetCo
 private:
 std::unique_ptr pImpl;
 
-SVX_DLLPRIVATE void ApplySettings(vcl::RenderContext& rRenderContext);
+SVX_DLLPRIVATE static void ApplySettings(vcl::RenderContext& 
rRenderContext);
 virtual void SetDrawingArea(weld::DrawingArea* pDrawingArea) override;
 SVX_DLLPRIVATE static void SetFontSize(const SfxItemSet& rSet, sal_uI

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

2018-11-01 Thread Libreoffice Gerrit user
 cui/source/factory/dlgfact.cxx|   40 +-
 cui/source/factory/dlgfact.hxx|   16 -
 include/svx/svxdlg.hxx|2 -
 include/vcl/abstdlg.hxx   |9 ---
 include/vcl/dialog.hxx|3 --
 svx/source/gallery2/galbrws1.cxx  |   22 +-
 svx/source/gallery2/galbrws1.hxx  |   10 
 sw/inc/swabstdlg.hxx  |2 -
 sw/source/ui/dbui/mailmergewizard.cxx |2 -
 sw/source/ui/dialog/swdlgfact.cxx |   20 +
 sw/source/ui/dialog/swdlgfact.hxx |6 +
 sw/source/uibase/app/apphdl.cxx   |   10 
 vcl/source/window/abstdlg.cxx |5 
 vcl/source/window/dialog.cxx  |5 
 14 files changed, 36 insertions(+), 116 deletions(-)

New commits:
commit c86728655415ea507cb5f8d7f0588014db2d6098
Author: Caolán McNamara 
AuthorDate: Wed Oct 31 12:38:56 2018 +
Commit: Caolán McNamara 
CommitDate: Thu Nov 1 11:00:12 2018 +0100

replace VclAbstractDialog2 with VclAbstractDialog

and drop Dialog::GetResult as a consequence

Change-Id: Id80a9dc1eab1a23daf4489719b3bafec976bb048
Reviewed-on: https://gerrit.libreoffice.org/62700
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 067e91c7657b..ff95f66b2574 100644
--- a/cui/source/factory/dlgfact.cxx
+++ b/cui/source/factory/dlgfact.cxx
@@ -278,42 +278,6 @@ short AbstractSignSignatureLineDialog_Impl::Execute()
 IMPL_ABSTDLG_BASE(AbstractScreenshotAnnotationDlg_Impl);
 
 
-// VclAbstractDialog2_Impl
-
-
-// virtual
-VclAbstractDialog2_Impl::~VclAbstractDialog2_Impl()
-{
-disposeOnce();
-}
-
-void VclAbstractDialog2_Impl::dispose()
-{
-m_pDlg.disposeAndClear();
-VclAbstractDialog2::dispose();
-}
-
-// virtual
-void  VclAbstractDialog2_Impl::StartExecuteModal( const Link& 
rEndDialogHdl )
-{
-m_aEndDlgHdl = rEndDialogHdl;
-m_pDlg->StartExecuteAsync([=](sal_Int32 nResult){
-EndDialogHdl(nResult);
-});
-}
-
-// virtual
-sal_Int32 VclAbstractDialog2_Impl::GetResult()
-{
-return m_pDlg->GetResult();
-}
-
-void VclAbstractDialog2_Impl::EndDialogHdl(sal_Int32 /*nResult*/)
-{
-m_aEndDlgHdl.Call( *m_pDlg );
-m_aEndDlgHdl = Link();
-}
-
 void CuiAbstractTabDialog_Impl::SetCurPageId( const OString& rName )
 {
 pDlg->SetCurPageId( rName );
@@ -1154,12 +1118,12 @@ VclPtr 
AbstractDialogFactory_Impl::CreateGalleryIdDialo
return 
VclPtr::Create(o3tl::make_unique(pParent,
 pThm));
 }
 
-VclPtr 
AbstractDialogFactory_Impl::CreateGalleryThemePropertiesDialog(vcl::Window* 
pParent,
+VclPtr 
AbstractDialogFactory_Impl::CreateGalleryThemePropertiesDialog(vcl::Window* 
pParent,
 ExchangeData* pData,
 SfxItemSet* pItemSet)
 {
 VclPtrInstance pDlg(pParent, pData, pItemSet);
-return VclPtr::Create( pDlg );
+return VclPtr::Create( pDlg );
 }
 
 VclPtr AbstractDialogFactory_Impl::CreateURLDialog( 
vcl::Window* pParent,
diff --git a/cui/source/factory/dlgfact.hxx b/cui/source/factory/dlgfact.hxx
index d780da073e28..a662aa09ee07 100644
--- a/cui/source/factory/dlgfact.hxx
+++ b/cui/source/factory/dlgfact.hxx
@@ -80,20 +80,6 @@ bool 
Class::StartExecuteAsync(VclAbstractDialog::AsyncContext &rCtx) \
 return pDlg->StartExecuteAsync(rCtx);   \
 }
 
-class VclAbstractDialog2_Impl : public VclAbstractDialog2
-{
-ScopedVclPtr m_pDlg;
-Link   m_aEndDlgHdl;
-public:
-explicitVclAbstractDialog2_Impl( Dialog* p ) : m_pDlg( p ) {}
-virtual ~VclAbstractDialog2_Impl() override;
-virtual voiddispose() override;
-virtual voidStartExecuteModal( const Link& rEndDialogHdl 
) override;
-virtual sal_Int32 GetResult() override;
-private:
-void EndDialogHdl(sal_Int32 nResult);
-};
-
 class CuiVclAbstractDialog_Impl : public VclAbstractDialog
 {
 DECL_ABSTDLG_BASE(CuiVclAbstractDialog_Impl,Dialog)
@@ -756,7 +742,7 @@ public:
 virtual VclPtr CreateTitleDialog(weld::Window* 
pParent, const OUString& rOldText) override;
 virtual VclPtr 
CreateGalleryIdDialog(weld::Window* pParent,
 GalleryTheme* pThm) override;
-virtual VclPtr 
CreateGalleryThemePropertiesDialog(vcl::Window* pParent,
+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 5e34bf61d165..97030fefefa1 100644
--- a/include/svx/svxdlg.hxx
+++ b/include/svx/svxdlg.hxx
@@ -359,7 +359,7 @@ public:
  const OUString& rOl

[Libreoffice-commits] core.git: cui/source include/svx include/vcl sc/source sd/source sfx2/source svtools/source svx/source sw/source vcl/source vcl/unx

2018-10-10 Thread Libreoffice Gerrit user
 cui/source/customize/cfg.cxx |4 
 cui/source/dialogs/cuicharmap.cxx|   15 +--
 cui/source/options/optjava.cxx   |2 
 cui/source/tabpages/chardlg.cxx  |7 -
 include/svx/langbox.hxx  |4 
 include/vcl/weld.hxx |   69 ++---
 sc/source/ui/miscdlgs/mvtabdlg.cxx   |3 
 sd/source/ui/dlg/PhotoAlbumDialog.cxx|8 -
 sd/source/ui/dlg/custsdlg.cxx|5 -
 sfx2/source/dialog/mgetempl.cxx  |3 
 sfx2/source/doc/saveastemplatedlg.cxx|2 
 svtools/source/control/ctrlbox.cxx   |4 
 svx/source/dialog/dlgctrl.cxx|4 
 svx/source/dialog/langbox.cxx|   53 +++---
 sw/source/ui/dbui/customizeaddresslistdialog.cxx |4 
 sw/source/ui/frmdlg/column.cxx   |3 
 sw/source/ui/misc/outline.cxx|2 
 sw/source/ui/table/tautofmt.cxx  |4 
 sw/source/uibase/misc/numberingtypelistbox.cxx   |3 
 sw/source/uibase/utlui/uitool.cxx|2 
 vcl/source/app/salvtables.cxx|   32 +++---
 vcl/unx/generic/print/prtsetup.cxx   |3 
 vcl/unx/gtk3/gtk3gtkinst.cxx |  114 +++
 23 files changed, 209 insertions(+), 141 deletions(-)

New commits:
commit 3b21fed4b153e3bbf1d47c3073f31a3735538596
Author: Caolán McNamara 
AuthorDate: Wed Oct 10 12:18:13 2018 +0100
Commit: Caolán McNamara 
CommitDate: Wed Oct 10 16:57:12 2018 +0200

optimize adding a block of entries at one time

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

diff --git a/cui/source/customize/cfg.cxx b/cui/source/customize/cfg.cxx
index af8fea0455f7..3d48ae269a56 100644
--- a/cui/source/customize/cfg.cxx
+++ b/cui/source/customize/cfg.cxx
@@ -1971,7 +1971,7 @@ IMPL_LINK_NOARG(SvxMainMenuOrganizerDialog, ModifyHdl, 
weld::Entry&, void)
 const int nNewMenuPos = m_xMenuListBox->find_id(m_sNewMenuEntryId);
 const int nOldSelection = m_xMenuListBox->get_selected_index();
 m_xMenuListBox->remove(nNewMenuPos);
-m_xMenuListBox->insert(nNewMenuPos, m_sNewMenuEntryId, 
pNewEntryData->GetName(), nullptr, nullptr);
+m_xMenuListBox->insert(nNewMenuPos, pNewEntryData->GetName(), 
&m_sNewMenuEntryId, nullptr, nullptr);
 m_xMenuListBox->select(nOldSelection);
 }
 
@@ -2009,7 +2009,7 @@ IMPL_LINK( SvxMainMenuOrganizerDialog, MoveHdl, 
weld::Button&, rButton, void )
 OUString sId = m_xMenuListBox->get_id(nSourceEntry);
 OUString sEntry = m_xMenuListBox->get_text(nSourceEntry);
 m_xMenuListBox->remove(nSourceEntry);
-m_xMenuListBox->insert(nTargetEntry, sId, sEntry, nullptr, nullptr);
+m_xMenuListBox->insert(nTargetEntry, sEntry, &sId, nullptr, nullptr);
 m_xMenuListBox->select(nTargetEntry);
 
 UpdateButtonStates();
diff --git a/cui/source/dialogs/cuicharmap.cxx 
b/cui/source/dialogs/cuicharmap.cxx
index c0de50c1e564..4ffc213003ca 100644
--- a/cui/source/dialogs/cuicharmap.cxx
+++ b/cui/source/dialogs/cuicharmap.cxx
@@ -422,17 +422,18 @@ void SvxCharacterMap::init()
 OUString aDefStr( aFont.GetFamilyName() );
 OUString aLastName;
 int nCount = m_xVirDev->GetDevFontCount();
-m_xFontLB->freeze();
+std::vector aEntries;
+aEntries.reserve(nCount);
 for (int i = 0; i < nCount; ++i)
 {
 OUString aFontName( m_xVirDev->GetDevFont( i ).GetFamilyName() );
 if (aFontName != aLastName)
 {
 aLastName = aFontName;
-m_xFontLB->append(OUString::number(i), aFontName);
+aEntries.emplace_back(aFontName, OUString::number(i));
 }
 }
-m_xFontLB->thaw();
+m_xFontLB->insert_vector(aEntries, true);
 // the font may not be in the list =>
 // try to find a font name token in list and select found font,
 // else select topmost entry
@@ -596,14 +597,12 @@ void SvxCharacterMap::SetCharFont( const vcl::Font& rFont 
)
 void SvxCharacterMap::fillAllSubsets(weld::ComboBox& rListBox)
 {
 SubsetMap aAll(nullptr);
-rListBox.clear();
-rListBox.freeze();
+std::vector aEntries;
 for (auto & subset : aAll.GetSubsetMap())
-rListBox.append_text(subset.GetName());
-rListBox.thaw();
+aEntries.emplace_back(subset.GetName());
+rListBox.insert_vector(aEntries, true);
 }
 
-
 void SvxCharacterMap::insertCharToDoc(const OUString& sGlyph)
 {
 if(sGlyph.isEmpty())
diff --git a/cui/source/options/optjava.cxx b/cui/source/options/optjava.cxx
index f115faedc701..9b3660d35592 100644
--- a/cui/source/options/optjava.cxx
+++ b/cui/source/options/optjava.cxx
@@ -804,7 +804,7 @@ void SvxJavaParameterDlg::EditParameter()
 if ( !editedCla

[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 &rCtx)
 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 
Cre

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

2018-09-28 Thread Libreoffice Gerrit user
 cui/source/inc/numfmt.hxx |1 
 cui/source/tabpages/numfmt.cxx|9 -
 include/svx/svxids.hrc|2 
 sc/inc/scabstdlg.hxx  |4 
 sc/qa/unit/screenshots/screenshots.cxx|4 
 sc/source/ui/attrdlg/attrdlg.cxx  |   29 +--
 sc/source/ui/attrdlg/scdlgfact.cxx|   10 -
 sc/source/ui/attrdlg/scdlgfact.hxx|7 
 sc/source/ui/inc/attrdlg.hxx  |   17 --
 sc/source/ui/view/tabvwsha.cxx|   28 +--
 sc/uiconfig/scalc/ui/formatcellsdialog.ui |  229 --
 svx/source/dialog/fontlb.cxx  |2 
 12 files changed, 262 insertions(+), 80 deletions(-)

New commits:
commit 3c11aa745cc78f1bde4efacccb22fa818df825c7
Author: Caolán McNamara 
AuthorDate: Tue Sep 25 12:30:21 2018 +0100
Commit: Caolán McNamara 
CommitDate: Fri Sep 28 15:35:22 2018 +0200

weld ScAttrDlg

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

diff --git a/cui/source/inc/numfmt.hxx b/cui/source/inc/numfmt.hxx
index 6fb600fbc41c..70b2806e5c61 100644
--- a/cui/source/inc/numfmt.hxx
+++ b/cui/source/inc/numfmt.hxx
@@ -84,7 +84,6 @@ private:
 std::unique_ptrpNumItem;
 std::unique_ptr pNumFmtShell;
 sal_uLong   nInitFormat;
-Link fnOkHdl;
 
 boolbNumItemFlag; ///< for handling with DocShell
 boolbOneAreaFlag;
diff --git a/cui/source/tabpages/numfmt.cxx b/cui/source/tabpages/numfmt.cxx
index 2dd0e9824301..4257799ae311 100644
--- a/cui/source/tabpages/numfmt.cxx
+++ b/cui/source/tabpages/numfmt.cxx
@@ -1126,10 +1126,8 @@ IMPL_LINK(SvxNumberFormatTabPage, DoubleClickHdl_Impl, 
weld::TreeView&, rLb, voi
 {
 SelFormatHdl_Impl(&rLb);
 
-if ( fnOkHdl.IsSet() )
-{   // temporary solution, should be offered by SfxTabPage
-fnOkHdl.Call( nullptr );
-}
+if (SfxTabDialogController* pController = GetDialogController())
+pController->getDialog()->response(RET_OK);
 else
 {
 SfxSingleTabDialog* pParent = 
dynamic_cast(GetParentDialog());
@@ -1734,11 +1732,8 @@ void 
SvxNumberFormatTabPage::AddAutomaticLanguage_Impl(LanguageType eAutoLang, b
 void SvxNumberFormatTabPage::PageCreated(const SfxAllItemSet& aSet)
 {
 const SvxNumberInfoItem* pNumberInfoItem = 
aSet.GetItem(SID_ATTR_NUMBERFORMAT_INFO, false);
-const SfxLinkItem* pLinkItem = aSet.GetItem(SID_LINK_TYPE, 
false);
 if (pNumberInfoItem && !pNumItem)
 pNumItem.reset( 
static_cast(pNumberInfoItem->Clone()) );
-if (pLinkItem)
-fnOkHdl = pLinkItem->GetValue();
 }
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/svxids.hrc b/include/svx/svxids.hrc
index e3e857637bed..54cab86e69da 100644
--- a/include/svx/svxids.hrc
+++ b/include/svx/svxids.hrc
@@ -817,7 +817,7 @@ class SfxStringItem;
 #define SID_FLAG_TYPE   ( SID_SVX_START + 1034 
)
 #define SID_SWMODE_TYPE ( SID_SVX_START + 1035 
)
 #define SID_DISABLE_CTL ( SID_SVX_START + 1036 
)
-#define SID_LINK_TYPE   ( SID_SVX_START + 1037 
)
+//FREE
 #define SID_ENUM_PAGE_MODE  ( SID_SVX_START + 1038 
)
 #define SID_PAPER_START ( SID_SVX_START + 1039 
)
 #define SID_PAPER_END   ( SID_SVX_START + 1040 
)
diff --git a/sc/inc/scabstdlg.hxx b/sc/inc/scabstdlg.hxx
index 1e9ab755223e..b7910d594243 100644
--- a/sc/inc/scabstdlg.hxx
+++ b/sc/inc/scabstdlg.hxx
@@ -515,8 +515,8 @@ public:
 bool   
 bOnlyDbtoolsEncodings,
 bool   
 bImport = true ) = 0;
 
-virtual VclPtr CreateScAttrDlg( vcl::Window* 
 pParent,
-const SfxItemSet* 
pCellAttrs ) = 0;
+virtual VclPtr CreateScAttrDlg(weld::Window* pParent,
+const SfxItemSet* 
pCellAttrs) = 0;
 
 virtual VclPtr CreateScHFEditDlg(vcl::Window*   
pParent,
 const SfxItemSet&   
rCoreSet,
diff --git a/sc/qa/unit/screenshots/screenshots.cxx 
b/sc/qa/unit/screenshots/screenshots.cxx
index 7b9a2d8cc2ff..5b137437c0f2 100644
--- a/sc/qa/unit/screenshots/screenshots.cxx
+++ b/sc/qa/unit/screenshots/screenshots.cxx
@@ -268,11 +268,9 @@ VclPtr 
ScScreenshotTest::createDialogByID(sal_uInt32 nID)
 mpItemSet->MergeRange(SID_ATTR_NUMBERFORMAT_INFO, 
SID_ATTR_NUMBERFORMAT_INFO);
 mpItemSet->Put(*pNumberInfoItem);
 
-pReturnDialog = 
mpFact->CreateScAttrDlg(mpViewS

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

2018-09-20 Thread Libreoffice Gerrit user
 cui/source/inc/backgrnd.hxx   |1 -
 cui/source/inc/cuitabarea.hxx |2 --
 cui/source/inc/measure.hxx|1 -
 cui/source/inc/textattr.hxx   |1 -
 cui/source/inc/transfrm.hxx   |4 +---
 cui/source/tabpages/backgrnd.cxx  |5 -
 cui/source/tabpages/measure.cxx   |5 -
 cui/source/tabpages/textattr.cxx  |   35 ---
 cui/source/tabpages/tppattern.cxx |5 -
 cui/source/tabpages/tpshadow.cxx  |6 --
 cui/source/tabpages/transfrm.cxx  |   10 --
 include/svx/dlgctrl.hxx   |1 -
 12 files changed, 1 insertion(+), 75 deletions(-)

New commits:
commit 5ef22c17a05ab161abc591f195158da5e4e9359e
Author: Caolán McNamara 
AuthorDate: Thu Sep 20 17:09:57 2018 +0100
Commit: Caolán McNamara 
CommitDate: Thu Sep 20 22:10:14 2018 +0200

drop dead PointChanged variant

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

diff --git a/cui/source/inc/backgrnd.hxx b/cui/source/inc/backgrnd.hxx
index 374409cb8a6f..db665c4815ef 100644
--- a/cui/source/inc/backgrnd.hxx
+++ b/cui/source/inc/backgrnd.hxx
@@ -56,7 +56,6 @@ public:
 virtual boolFillItemSet( SfxItemSet* rSet ) override;
 virtual voidReset( const SfxItemSet* rSet ) override;
 virtual voidFillUserData() override;
-virtual voidPointChanged( vcl::Window* pWindow, RectPoint eRP ) 
override;
 virtual voidPointChanged( weld::DrawingArea* pWindow, RectPoint 
eRP ) override;
 
 /// Shift-ListBox activation
diff --git a/cui/source/inc/cuitabarea.hxx b/cui/source/inc/cuitabarea.hxx
index 5770104120b0..88232baaf86e 100644
--- a/cui/source/inc/cuitabarea.hxx
+++ b/cui/source/inc/cuitabarea.hxx
@@ -339,7 +339,6 @@ public:
 virtual void Reset( const SfxItemSet * ) override;
 virtual void ActivatePage( const SfxItemSet& rSet ) override;
 virtual DeactivateRC DeactivatePage( SfxItemSet* pSet ) override;
-virtual void PointChanged( vcl::Window* pWindow, RectPoint eRP ) override;
 virtual void PointChanged( weld::DrawingArea* pWindow, RectPoint eRP ) 
override;
 
 voidSetColorList( XColorListRef const & pColorList ) { m_pColorList = 
pColorList; }
@@ -635,7 +634,6 @@ public:
 virtual void ActivatePage( const SfxItemSet& rSet ) override;
 virtual DeactivateRC DeactivatePage( SfxItemSet* pSet ) override;
 
-virtual void PointChanged( vcl::Window* pWindow, RectPoint eRP ) override;
 virtual void PointChanged( weld::DrawingArea*, RectPoint eRP ) override;
 
 voidSetColorList( XColorListRef const & pColorList ) { m_pColorList = 
pColorList; }
diff --git a/cui/source/inc/measure.hxx b/cui/source/inc/measure.hxx
index 728814315783..5ba4ef2ecc4f 100644
--- a/cui/source/inc/measure.hxx
+++ b/cui/source/inc/measure.hxx
@@ -79,7 +79,6 @@ public:
 virtual boolFillItemSet( SfxItemSet* ) override;
 virtual voidReset( const SfxItemSet * ) override;
 
-virtual voidPointChanged( vcl::Window* pWindow, RectPoint eRP ) 
override;
 virtual voidPointChanged( weld::DrawingArea* pWindow, RectPoint 
eRP ) override;
 
 void Construct();
diff --git a/cui/source/inc/textattr.hxx b/cui/source/inc/textattr.hxx
index 60bc9719887e..743928ffa223 100644
--- a/cui/source/inc/textattr.hxx
+++ b/cui/source/inc/textattr.hxx
@@ -88,7 +88,6 @@ public:
 virtual boolFillItemSet( SfxItemSet* ) override;
 virtual voidReset( const SfxItemSet * ) override;
 
-virtual voidPointChanged( vcl::Window* pWindow, RectPoint eRP ) 
override;
 virtual voidPointChanged( weld::DrawingArea* pWindow, RectPoint 
eRP ) override;
 
 void Construct();
diff --git a/cui/source/inc/transfrm.hxx b/cui/source/inc/transfrm.hxx
index c04dd42c02f3..a7abbf793962 100644
--- a/cui/source/inc/transfrm.hxx
+++ b/cui/source/inc/transfrm.hxx
@@ -146,8 +146,7 @@ public:
 virtual void ActivatePage( const SfxItemSet& rSet ) override;
 virtual DeactivateRC DeactivatePage( SfxItemSet* pSet ) override;
 
-virtual void PointChanged( weld::DrawingArea* pWindow, RectPoint eRP ) 
override;
-virtual void PointChanged( vcl::Window* pWindow, RectPoint eRP ) override;
+virtual void PointChanged(weld::DrawingArea* pWindow, RectPoint eRP) 
override;
 
 void Construct();
 void SetView( const SdrView* pSdrView ) { mpView = pSdrView; }
@@ -207,7 +206,6 @@ public:
 virtual DeactivateRC DeactivatePage( SfxItemSet* pSet ) override;
 
 virtual void PointChanged(weld::DrawingArea* pWindow, RectPoint eRP) 
override;
-virtual void PointChanged(vcl::Window* pWindow, RectPoint eRP) override;
 
 void Construct();
 void SetView( const SdrView* pSdrView ) { pView = pSdrView; }
diff --git a/cui/source/tabpages/backgrnd.cxx b/cui/source/t

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

2018-09-20 Thread Libreoffice Gerrit user
 cui/source/tabpages/border.cxx  |4 
 include/svx/colorbox.hxx|1 
 sd/inc/sdabstdlg.hxx|2 
 sd/qa/unit/dialogs-test.cxx |2 
 sd/source/ui/dlg/copydlg.cxx|  202 ++--
 sd/source/ui/dlg/sddlgfact.cxx  |   11 +-
 sd/source/ui/dlg/sddlgfact.hxx  |   11 +-
 sd/source/ui/func/fucopy.cxx|2 
 sd/source/ui/inc/copydlg.hxx|   49 -
 sd/uiconfig/sdraw/ui/copydlg.ui |  108 ++---
 sw/source/ui/frmdlg/column.cxx  |2 
 sw/source/ui/misc/pgfnote.cxx   |2 
 sw/source/ui/misc/pggrid.cxx|2 
 13 files changed, 214 insertions(+), 184 deletions(-)

New commits:
commit 87b5e2c0589ae7735f27d39186ced432eed7f7d0
Author: Caolán McNamara 
AuthorDate: Wed Sep 19 21:16:54 2018 +0100
Commit: Caolán McNamara 
CommitDate: Thu Sep 20 09:59:56 2018 +0200

weld CopyDlg

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

diff --git a/cui/source/tabpages/border.cxx b/cui/source/tabpages/border.cxx
index 97894415ba4d..59607465d0ca 100644
--- a/cui/source/tabpages/border.cxx
+++ b/cui/source/tabpages/border.cxx
@@ -225,7 +225,7 @@ SvxBorderTabPage::SvxBorderTabPage(TabPageParent pParent, 
const SfxItemSet& rCor
 , m_xUserDefFT(m_xBuilder->weld_label("userdefft"))
 , m_xFrameSelWin(new weld::CustomWeld(*m_xBuilder, "framesel", 
m_aFrameSel))
 , m_xLbLineStyle(new 
SvtLineListBox(m_xBuilder->weld_menu_button("linestylelb")))
-, m_xLbLineColor(new 
ColorListBox(m_xBuilder->weld_menu_button("linecolorlb"), GetFrameWeld()))
+, m_xLbLineColor(new 
ColorListBox(m_xBuilder->weld_menu_button("linecolorlb"), 
pParent.GetFrameWeld()))
 , m_xLineWidthMF(m_xBuilder->weld_metric_spin_button("linewidthmf", 
FUNIT_POINT))
 , m_xSpacingFrame(m_xBuilder->weld_container("spacing"))
 , m_xLeftFT(m_xBuilder->weld_label("leftft"))
@@ -243,7 +243,7 @@ SvxBorderTabPage::SvxBorderTabPage(TabPageParent pParent, 
const SfxItemSet& rCor
 , m_xFtShadowSize(m_xBuilder->weld_label("distanceft"))
 , m_xEdShadowSize(m_xBuilder->weld_metric_spin_button("distancemf", 
FUNIT_MM))
 , m_xFtShadowColor(m_xBuilder->weld_label("shadowcolorft"))
-, m_xLbShadowColor(new 
ColorListBox(m_xBuilder->weld_menu_button("shadowcolorlb"), GetFrameWeld()))
+, m_xLbShadowColor(new 
ColorListBox(m_xBuilder->weld_menu_button("shadowcolorlb"), 
pParent.GetFrameWeld()))
 , m_xPropertiesFrame(m_xBuilder->weld_container("properties"))
 , m_xMergeWithNextCB(m_xBuilder->weld_check_button("mergewithnext"))
 , m_xMergeAdjacentBordersCB(m_xBuilder->weld_check_button("mergeadjacent"))
diff --git a/include/svx/colorbox.hxx b/include/svx/colorbox.hxx
index 7053babc6799..23c371fd9ce0 100644
--- a/include/svx/colorbox.hxx
+++ b/include/svx/colorbox.hxx
@@ -136,6 +136,7 @@ public:
 bool IsValueChangedFromSaved() const { return m_aSaveColor != 
GetSelectEntryColor(); }
 
 void set_sensitive(bool sensitive) { m_xButton->set_sensitive(sensitive); }
+bool get_sensitive() const { return m_xButton->get_sensitive(); }
 void hide() { m_xButton->hide(); }
 };
 
diff --git a/sd/inc/sdabstdlg.hxx b/sd/inc/sdabstdlg.hxx
index 44b6376dfed9..f3c24d82fbf9 100644
--- a/sd/inc/sdabstdlg.hxx
+++ b/sd/inc/sdabstdlg.hxx
@@ -168,7 +168,7 @@ public:
 SD_DLLPUBLIC static SdAbstractDialogFactory* Create();
 
 virtual VclPtr  CreateBreakDlg(weld::Window* 
pWindow, ::sd::DrawView* pDrView, ::sd::DrawDocShell* pShell, sal_uLong 
nSumActionCount, sal_uLong nObjCount ) = 0;
-virtual VclPtrCreateCopyDlg(vcl::Window* 
pWindow, const SfxItemSet& rInAttrs, ::sd::View* pView ) = 0;
+virtual VclPtrCreateCopyDlg(weld::Window* 
pWindow, const SfxItemSet& rInAttrs, ::sd::View* pView ) = 0;
 virtual VclPtr
CreateSdCustomShowDlg(weld::Window* pWindow, SdDrawDocument& rDrawDoc) = 0;
 virtual VclPtr   
CreateSdTabCharDialog(weld::Window* pWindow, const SfxItemSet* pAttr, 
SfxObjectShell* pDocShell) = 0;
 virtual VclPtr   
CreateSdTabPageDialog(weld::Window* pWindow, const SfxItemSet* pAttr, 
SfxObjectShell* pDocShell, bool bAreaPage) = 0;
diff --git a/sd/qa/unit/dialogs-test.cxx b/sd/qa/unit/dialogs-test.cxx
index b4bd349e7e31..f56e09bffcb5 100644
--- a/sd/qa/unit/dialogs-test.cxx
+++ b/sd/qa/unit/dialogs-test.cxx
@@ -294,7 +294,7 @@ VclPtr 
SdDialogsTest::createDialogByID(sal_uInt32 nID)
 {
 // needs an SfxItemSet, use the one from the 1st object
 pRetval = getSdAbstractDialogFactory()->CreateCopyDlg(
-getViewShell()->GetActiveWindow(),
+getViewShell()->GetFrameWeld(),
 getSfxItemSetFromSdrObject(),
 getDrawView());
 break;
diff --git a/sd/source/ui/dlg/copydlg.cxx b/sd/source/ui/dlg/copydlg.cxx
index 2da9

[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 Pag

[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
--- a/svx/source/dialog/

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

2018-07-31 Thread Libreoffice Gerrit user
 cui/source/tabpages/numfmt.cxx   |   20 +++-
 include/svx/numfmtsh.hxx |2 +-
 include/svx/svdcrtv.hxx  |4 ++--
 include/svx/svdedtv.hxx  |6 +++---
 include/svx/svdedxv.hxx  |6 +++---
 include/svx/svdmrkv.hxx  |   10 +-
 include/svx/svdpntv.hxx  |6 +++---
 include/svx/svdview.hxx  |3 +--
 sd/source/ui/view/sdview.cxx |3 ++-
 svx/source/items/numfmtsh.cxx|3 +--
 svx/source/svdraw/svdcrtv.cxx|   10 --
 svx/source/svdraw/svdedtv1.cxx   |   15 ++-
 svx/source/svdraw/svdedxv.cxx|   26 +++---
 svx/source/svdraw/svdmrkv.cxx|4 +---
 svx/source/svdraw/svdmrkv1.cxx   |6 ++
 svx/source/svdraw/svdopath.cxx   |8 
 svx/source/svdraw/svdpntv.cxx|9 +++--
 svx/source/svdraw/svdview.cxx|   16 ++--
 sw/source/core/frmedt/feshview.cxx   |5 -
 sw/source/uibase/uiview/viewdraw.cxx |4 ++--
 20 files changed, 79 insertions(+), 87 deletions(-)

New commits:
commit 714fe0fed88d01bac1a658fbb2de193a7704e24b
Author: Noel Grandin 
AuthorDate: Mon Jul 30 15:34:20 2018 +0200
Commit: Noel Grandin 
CommitDate: Tue Jul 31 12:42:50 2018 +0200

loplugin:returnconstant in svx

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

diff --git a/cui/source/tabpages/numfmt.cxx b/cui/source/tabpages/numfmt.cxx
index 2aa9505507e6..339451961612 100644
--- a/cui/source/tabpages/numfmt.cxx
+++ b/cui/source/tabpages/numfmt.cxx
@@ -1387,11 +1387,12 @@ bool SvxNumberFormatTabPage::Click_Impl(PushButton* pIB)
 if(bOneAreaFlag && (nFixedCategory!=nCatLbSelPos))
 {
 if(bAdded) aEntryList.clear();
-bDeleted = pNumFmtShell->RemoveFormat( aFormat,
-   nCatLbSelPos,
-   nFmtLbSelPos,
-   a2EntryList);
-if(bDeleted) a2EntryList.clear();
+pNumFmtShell->RemoveFormat( aFormat,
+nCatLbSelPos,
+nFmtLbSelPos,
+a2EntryList);
+bDeleted = true;
+a2EntryList.clear();
 m_pEdFormat->GrabFocus();
 m_pEdFormat->SetSelection( Selection( 0, SELECTION_MAX ) );
 nReturn |= nReturnOneArea;
@@ -1444,10 +1445,11 @@ bool SvxNumberFormatTabPage::Click_Impl(PushButton* pIB)
 sal_uInt16   nCatLbSelPos = 0;
 shortnFmtLbSelPos = SELPOS_NONE;
 
-bDeleted = pNumFmtShell->RemoveFormat( aFormat,
-   nCatLbSelPos,
-   nFmtLbSelPos,
-   aEntryList );
+pNumFmtShell->RemoveFormat( aFormat,
+nCatLbSelPos,
+nFmtLbSelPos,
+aEntryList );
+bDeleted = true;
 
 m_pEdComment->SetText(m_pLbCategory->GetEntry(1));
 if ( bDeleted )
diff --git a/include/svx/numfmtsh.hxx b/include/svx/numfmtsh.hxx
index da26e9cbf707..8c1731cb1f73 100644
--- a/include/svx/numfmtsh.hxx
+++ b/include/svx/numfmtsh.hxx
@@ -109,7 +109,7 @@ public:
short&rFmtSelPos,
std::vector& rFmtEntries );
 
-boolRemoveFormat( const OUString&   rFormat,
+voidRemoveFormat( const OUString&   rFormat,
   sal_uInt16&   rCatLbSelPos,
   short&rFmtSelPos,
   std::vector& rFmtEntries );
diff --git a/include/svx/svdcrtv.hxx b/include/svx/svdcrtv.hxx
index add5d962ed59..9b6a08e8f93b 100644
--- a/include/svx/svdcrtv.hxx
+++ b/include/svx/svdcrtv.hxx
@@ -152,11 +152,11 @@ public:
 
 // Attributes of the object that is in the process of being created
 /* new interface src537 */
-bool GetAttributes(SfxItemSet& rTargetSet, bool bOnlyHardAttr) const;
+void GetAttributes(SfxItemSet& rTargetSet, bool bOnlyHardAttr) const;
 
 bool SetAttributes(const SfxItemSet& rSet, bool bReplaceAll);
 SfxStyleSheet* GetStyleSheet() const; // SfxStyleSheet* 
GetStyleSheet(bool& rOk) const;
-bool SetStyleSheet(SfxStyleSheet* pStyleSheet, bool bDontRemoveHardAttr);
+void SetStyleSheet(SfxStyleSheet* pStyleSheet, bool bDontRemoveHardAttr);
 };
 
 #endif // INCLUDED_SVX_SVDCRTV_HXX
diff --git a/include/svx/svdedtv.hxx b/inc

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

2018-07-16 Thread Libreoffice Gerrit user
 cui/source/dialogs/cuicharmap.cxx   |9 +++--
 include/svx/charmap.hxx |5 +++--
 starmath/source/dialog.cxx  |3 +--
 svx/source/dialog/charmap.cxx   |8 ++--
 svx/source/dialog/searchcharmap.cxx |1 -
 5 files changed, 13 insertions(+), 13 deletions(-)

New commits:
commit cf6c748f30fd630b6b7256e0c7ba1783892f9d1e
Author: Caolán McNamara 
AuthorDate: Mon Jul 16 16:04:11 2018 +0100
Commit: Caolán McNamara 
CommitDate: Mon Jul 16 18:22:39 2018 +0200

tdf#118681 make sure we're using the right font char map

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

diff --git a/cui/source/dialogs/cuicharmap.cxx 
b/cui/source/dialogs/cuicharmap.cxx
index 6e9299545e34..71c1360f4f7d 100644
--- a/cui/source/dialogs/cuicharmap.cxx
+++ b/cui/source/dialogs/cuicharmap.cxx
@@ -667,8 +667,7 @@ IMPL_LINK_NOARG(SvxCharacterMap, FontSelectHdl, 
weld::ComboBoxText&, void)
 bool bNeedSubset = (aFont.GetCharSet() != RTL_TEXTENCODING_SYMBOL);
 if (bNeedSubset)
 {
-FontCharMapRef xFontCharMap( new FontCharMap() );
-m_xShowSet->GetFontCharMap( xFontCharMap );
+FontCharMapRef xFontCharMap = m_xShowSet->GetFontCharMap();
 pSubsetMap.reset(new SubsetMap( xFontCharMap ));
 
 // update subset listbox for new font's unicode subsets
@@ -840,8 +839,7 @@ IMPL_LINK_NOARG(SvxCharacterMap, SearchUpdateHdl, 
weld::Entry&, void)
 
 toggleSearchView(true);
 
-FontCharMapRef xFontCharMap(new FontCharMap());
-m_xSearchSet->GetFontCharMap(xFontCharMap);
+FontCharMapRef xFontCharMap = m_xSearchSet->GetFontCharMap();
 
 sal_UCS4 sChar = xFontCharMap->GetFirstChar();
 while(sChar != xFontCharMap->GetLastChar())
@@ -1060,8 +1058,7 @@ void SvxCharacterMap::selectCharByCode(Radix radix)
 // Convert the code back to a character using the appropriate radix
 sal_UCS4 cChar = aCodeString.toUInt32(static_cast (radix));
 // Use FontCharMap::HasChar(sal_UCS4 cChar) to see if the desired 
character is in the font
-FontCharMapRef xFontCharMap(new FontCharMap());
-m_xShowSet->GetFontCharMap(xFontCharMap);
+FontCharMapRef xFontCharMap = m_xShowSet->GetFontCharMap();
 if (xFontCharMap->HasChar(cChar))
 // Select the corresponding character
 SetChar(cChar);
diff --git a/include/svx/charmap.hxx b/include/svx/charmap.hxx
index 6e18581c4786..5101b230059f 100644
--- a/include/svx/charmap.hxx
+++ b/include/svx/charmap.hxx
@@ -32,6 +32,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -80,8 +81,8 @@ public:
 voidSetFavClickHdl( const Link& rHdl ) { 
aFavClickHdl = rHdl; }
 static sal_uInt32& getSelectedChar();
 voidSetFont( const vcl::Font& rFont );
-vcl::Font const & GetFont() const { return mxVirDev->GetFont(); }
-boolGetFontCharMap(FontCharMapRef& rxFontCharMap) const { 
return mxVirDev->GetFontCharMap(rxFontCharMap); }
+vcl::Font const & GetFont() const { return maFont; }
+FontCharMapRef  GetFontCharMap();
 boolisFavChar(const OUString& sTitle, const OUString& rFont);
 voidgetFavCharacterList(); //gets both Fav char and Fav char 
font list
 voidupdateFavCharacterList(const OUString& rChar, const 
OUString& rFont);
diff --git a/starmath/source/dialog.cxx b/starmath/source/dialog.cxx
index ac7269345c0c..1dabf0abd0b3 100644
--- a/starmath/source/dialog.cxx
+++ b/starmath/source/dialog.cxx
@@ -1987,8 +1987,7 @@ void SmSymDefineDialog::SetFont(const OUString 
&rFontName, const OUString &rStyl
 m_aSymbolDisplay.SetFont(aFontMetric);
 
 // update subset listbox for new font's unicode subsets
-FontCharMapRef xFontCharMap;
-m_xCharsetDisplay->GetFontCharMap( xFontCharMap );
+FontCharMapRef xFontCharMap = m_xCharsetDisplay->GetFontCharMap();
 m_xSubsetMap.reset(new SubsetMap( xFontCharMap ));
 
 m_xFontsSubsetLB->clear();
diff --git a/svx/source/dialog/charmap.cxx b/svx/source/dialog/charmap.cxx
index fcaa955541df..1f1f469dfc82 100644
--- a/svx/source/dialog/charmap.cxx
+++ b/svx/source/dialog/charmap.cxx
@@ -20,7 +20,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 
 #include 
@@ -844,12 +843,17 @@ svx::SvxShowCharSetItem* SvxShowCharSet::ImplGetItem( int 
_nPos )
 return aFind->second.get();
 }
 
-
 sal_Int32 SvxShowCharSet::getMaxCharCount() const
 {
 return mxFontCharMap->GetCharCount();
 }
 
+FontCharMapRef SvxShowCharSet::GetFontCharMap()
+{
+RecalculateFont(*mxVirDev);
+return mxFontCharMap;
+}
+
 // TODO: should be moved into Font Attributes stuff
 // we let it mature here though because it is currently the only use
 
diff --git a/svx/source/dialog/searchcharmap.cxx 
b/svx/source/dialog/searchcharmap.cxx
index d131002f3dee

[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 &rReq)
 if( pFact )
 {
 const long nMaxVert = rSh.GetAnyCurRect( 
CurRectType::Frame ).Width() / MINLAY;
-ScopedVclPtr 
pDlg(pFact->CreateSvxSplittTableDialog(GetView().GetFrameWeld(), 
rSh.IsTableVertical(), nMaxVert));
+ScopedVclPtr 
pDlg(pFact->CreateSvxSplitTableDia

[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 (&rEdit == 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(&rEdit == 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 +55,7 @@ sal_Int32 HexColorControl::GetColor()
 else
 SetCont

[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 = 
&pPixel; }
 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 BitmapEx& rBitmapEx, BitmapColor& 
o_rBack, BitmapColor& o_rFront);
 
 
diff --git a/svx/source/accessibility/svxpixelctlaccessiblecontext.cxx 
b/svx/source/

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

2017-12-12 Thread Noel Grandin
 cui/source/factory/dlgfact.cxx |2 +-
 cui/source/factory/dlgfact.hxx |2 +-
 cui/source/inc/cuigaldlg.hxx   |2 +-
 include/svx/svxdlg.hxx |2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)

New commits:
commit 042d9a5a71b9a21fca144123f82141f92f305169
Author: Noel Grandin 
Date:   Mon Dec 11 14:34:35 2017 +0200

sal_uIntPtr->sal_uInt32 in AbstractGalleryIdDialog

to match the underlying call to SetId in GalleryTheme

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

diff --git a/cui/source/factory/dlgfact.cxx b/cui/source/factory/dlgfact.cxx
index ca9fb47b02b6..51d4d26b7be5 100644
--- a/cui/source/factory/dlgfact.cxx
+++ b/cui/source/factory/dlgfact.cxx
@@ -417,7 +417,7 @@ OUString AbstractTitleDialog_Impl::GetTitle() const
 return pDlg->GetTitle();
 }
 
-sal_uLong AbstractGalleryIdDialog_Impl::GetId() const
+sal_uInt32 AbstractGalleryIdDialog_Impl::GetId() const
 {
 return pDlg->GetId();
 }
diff --git a/cui/source/factory/dlgfact.hxx b/cui/source/factory/dlgfact.hxx
index e9d61e3bcf93..c3240f954532 100644
--- a/cui/source/factory/dlgfact.hxx
+++ b/cui/source/factory/dlgfact.hxx
@@ -225,8 +225,8 @@ class GalleryIdDialog;
 class AbstractGalleryIdDialog_Impl : public AbstractGalleryIdDialog
 {
 DECL_ABSTDLG_BASE(AbstractGalleryIdDialog_Impl,GalleryIdDialog)
-virtual sal_uLong   GetId() const override ;
 
+virtual sal_uInt32   GetId() const override;
 };
 
 class URLDlg;
diff --git a/cui/source/inc/cuigaldlg.hxx b/cui/source/inc/cuigaldlg.hxx
index 55e4402b2ced..7c6cda281bec 100644
--- a/cui/source/inc/cuigaldlg.hxx
+++ b/cui/source/inc/cuigaldlg.hxx
@@ -191,7 +191,7 @@ public:
 GalleryIdDialog( vcl::Window* pParent, GalleryTheme* pThm );
 virtual ~GalleryIdDialog() override;
 virtual void dispose() override;
-sal_uLong GetId() const { return m_pLbResName->GetSelectedEntryPos(); }
+sal_uInt32 GetId() const { return m_pLbResName->GetSelectedEntryPos(); }
 };
 
 class GalleryThemeProperties : public SfxTabDialog
diff --git a/include/svx/svxdlg.hxx b/include/svx/svxdlg.hxx
index 63b1190df9a5..67f06b9e1a02 100644
--- a/include/svx/svxdlg.hxx
+++ b/include/svx/svxdlg.hxx
@@ -123,7 +123,7 @@ class AbstractGalleryIdDialog :public VclAbstractDialog
 protected:
 virtual ~AbstractGalleryIdDialog() override = default;
 public:
-virtual sal_uIntPtr GetId() const =0;
+virtual sal_uInt32 GetId() const =0;
 };
 
 class AbstractURLDlg :public VclAbstractDialog
___
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 sw/source sw/uiconfig

2017-12-09 Thread Gabor Kelemen
 cui/source/tabpages/align.cxx |9 ---
 cui/source/tabpages/paragrph.cxx  |9 ---
 include/svx/strings.hrc   |4 +++
 sw/source/ui/table/tabledlg.cxx   |6 +
 sw/source/uibase/table/tablepg.hxx|3 +-
 sw/uiconfig/swriter/ui/formattablepage.ui |   34 +++---
 6 files changed, 26 insertions(+), 39 deletions(-)

New commits:
commit 686e55d9e87b8dd7a3cfe22f9a6df9c77de3ce09
Author: Gabor Kelemen 
Date:   Mon Dec 4 20:19:28 2017 +0100

tdf#113959 Use svxlo-FrameDirectionListBox instead of ListBox

To reduce the number of translatable stings

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

diff --git a/cui/source/tabpages/align.cxx b/cui/source/tabpages/align.cxx
index 5f4a2fee3f46..327201ca8f85 100644
--- a/cui/source/tabpages/align.cxx
+++ b/cui/source/tabpages/align.cxx
@@ -21,7 +21,7 @@
 
 #include 
 #include 
-#include 
+#include 
 #include 
 #include 
 
@@ -212,9 +212,10 @@ AlignmentTabPage::AlignmentTabPage( vcl::Window* pParent, 
const SfxItemSet& rCor
 // Asian vertical mode
 m_pCbAsianMode->Show( SvtCJKOptions().IsVerticalTextEnabled() );
 
-m_pLbFrameDir->InsertEntryValue( CuiResId( RID_SVXSTR_FRAMEDIR_LTR ), 
SvxFrameDirection::Horizontal_LR_TB );
-m_pLbFrameDir->InsertEntryValue( CuiResId( RID_SVXSTR_FRAMEDIR_RTL ), 
SvxFrameDirection::Horizontal_RL_TB );
-m_pLbFrameDir->InsertEntryValue( CuiResId( RID_SVXSTR_FRAMEDIR_SUPER ), 
SvxFrameDirection::Environment );
+std::locale loc(Translate::Create("svx"));
+m_pLbFrameDir->InsertEntryValue( Translate::get( RID_SVXSTR_FRAMEDIR_LTR, 
loc ), SvxFrameDirection::Horizontal_LR_TB );
+m_pLbFrameDir->InsertEntryValue( Translate::get( RID_SVXSTR_FRAMEDIR_RTL, 
loc ), SvxFrameDirection::Horizontal_RL_TB );
+m_pLbFrameDir->InsertEntryValue( Translate::get( 
RID_SVXSTR_FRAMEDIR_SUPER, loc ), SvxFrameDirection::Environment );
 
 // This page needs ExchangeSupport.
 SetExchangeSupport();
diff --git a/cui/source/tabpages/paragrph.cxx b/cui/source/tabpages/paragrph.cxx
index ed900bf18f16..a16097152592 100644
--- a/cui/source/tabpages/paragrph.cxx
+++ b/cui/source/tabpages/paragrph.cxx
@@ -29,7 +29,7 @@
 #include 
 #include 
 #include 
-#include 
+#include 
 #include 
 #include 
 #include 
@@ -1034,9 +1034,10 @@ SvxParaAlignTabPage::SvxParaAlignTabPage( vcl::Window* 
pParent, const SfxItemSet
 m_pLastLineLB->SetSelectHdl( LINK( this, SvxParaAlignTabPage, 
LastLineHdl_Impl ) );
 m_pTextDirectionLB->SetSelectHdl( LINK( this, SvxParaAlignTabPage, 
TextDirectionHdl_Impl ) );
 
-m_pTextDirectionLB->InsertEntryValue( CuiResId( RID_SVXSTR_FRAMEDIR_SUPER 
), SvxFrameDirection::Environment );
-m_pTextDirectionLB->InsertEntryValue( CuiResId( RID_SVXSTR_FRAMEDIR_LTR ), 
SvxFrameDirection::Horizontal_LR_TB );
-m_pTextDirectionLB->InsertEntryValue( CuiResId( RID_SVXSTR_FRAMEDIR_RTL ), 
SvxFrameDirection::Horizontal_RL_TB );
+std::locale loc(Translate::Create("svx"));
+m_pTextDirectionLB->InsertEntryValue( Translate::get( 
RID_SVXSTR_FRAMEDIR_SUPER, loc ), SvxFrameDirection::Environment );
+m_pTextDirectionLB->InsertEntryValue( Translate::get( 
RID_SVXSTR_FRAMEDIR_LTR, loc ), SvxFrameDirection::Horizontal_LR_TB );
+m_pTextDirectionLB->InsertEntryValue( Translate::get( 
RID_SVXSTR_FRAMEDIR_RTL, loc ), SvxFrameDirection::Horizontal_RL_TB );
 
 setPreviewsToSamePlace(pParent, this);
 }
diff --git a/include/svx/strings.hrc b/include/svx/strings.hrc
index 1143bb74bd37..cd670874e1e6 100644
--- a/include/svx/strings.hrc
+++ b/include/svx/strings.hrc
@@ -1628,6 +1628,10 @@
 #define RID_SUBSETSTR_SYRIAC_SUPPLEMENT 
NC_("RID_SUBSETMAP", "Syriac Supplement")
 #define RID_SUBSETSTR_ZANABAZAR_SQUARE  
NC_("RID_SUBSETMAP", "Zanabazar Square")
 
+#define RID_SVXSTR_FRAMEDIR_LTR 
NC_("RID_SVXSTR_FRAMEDIR_LTR", "Left-to-right (LTR)")
+#define RID_SVXSTR_FRAMEDIR_RTL 
NC_("RID_SVXSTR_FRAMEDIR_RTL", "Right-to-left (RTL)")
+#define RID_SVXSTR_FRAMEDIR_SUPER   
NC_("RID_SVXSTR_FRAMEDIR_SUPER", "Use superordinate object settings")
+
 #endif
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/table/tabledlg.cxx b/sw/source/ui/table/tabledlg.cxx
index 1dd146377a8a..366e42f01fed 100644
--- a/sw/source/ui/table/tabledlg.cxx
+++ b/sw/source/ui/table/tabledlg.cxx
@@ -38,6 +38,8 @@
 #include 
 
 #include 
+#include 
+#include 
 
 #include 
 #include 
@@ -91,6 +93,10 @@ SwFormatTablePage::SwFormatTablePage(vcl::Window* pParent, 
const SfxItemSet& rSe
 get(m_pBottomMF, "belowmf");
 get(m_pTextDirectionLB, "textdirection");
 
+m_pTextDirectionLB->InsertEntryValue( SvxResId( RID_SVXSTR_FRAMEDIR_LTR ), 
SvxFrameDirection::Horizontal_LR_TB );
+m_pTextDirectionL

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

2017-11-20 Thread Noel Grandin
 cui/source/tabpages/measure.cxx   |   17 -
 cui/source/tabpages/textattr.cxx  |3 
 include/svx/sdgluitm.hxx  |3 
 include/svx/svddef.hxx|  246 +++---
 sc/source/filter/xcl97/xcl97rec.cxx   |2 
 sc/source/ui/drawfunc/drtxtob.cxx |2 
 sd/source/ui/view/drtxtob.cxx |2 
 sd/source/ui/view/drviewsj.cxx|6 
 svx/source/dialog/compressgraphicdialog.cxx   |2 
 svx/source/dialog/connctrl.cxx|2 
 svx/source/sdr/contact/viewcontactofgraphic.cxx   |   20 -
 svx/source/sdr/contact/viewcontactofsdrcircobj.cxx|4 
 svx/source/sdr/contact/viewcontactofsdrmeasureobj.cxx |   20 -
 svx/source/svdraw/svddrgmt.cxx|2 
 svx/source/svdraw/svdocirc.cxx|   12 
 svx/source/svdraw/svdoedge.cxx|   26 -
 svx/source/svdraw/svdograf.cxx|   24 -
 svx/source/svdraw/svdomeas.cxx|   34 +-
 svx/source/tbxctrls/grafctrl.cxx  |   25 -
 sw/source/uibase/shells/drwtxtex.cxx  |2 
 20 files changed, 256 insertions(+), 198 deletions(-)

New commits:
commit 1bbd5a1f907f6ee86f060c3c4bcd0a4ab25e5aa0
Author: Noel Grandin 
Date:   Mon Nov 20 15:04:48 2017 +0200

TypedWhichId for SDRATTR* constants (2)

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

diff --git a/cui/source/tabpages/measure.cxx b/cui/source/tabpages/measure.cxx
index 5c79146ecfb3..63c5ed9104d4 100644
--- a/cui/source/tabpages/measure.cxx
+++ b/cui/source/tabpages/measure.cxx
@@ -263,7 +263,7 @@ void SvxMeasurePage::Reset( const SfxItemSet* rAttrs )
 // SdrMeasureBelowRefEdgeItem
 if( rAttrs->GetItemState( SDRATTR_MEASUREBELOWREFEDGE ) != 
SfxItemState::DONTCARE )
 {
-m_pTsbBelowRefEdge->SetState( static_cast( rAttrs->Get( SDRATTR_MEASUREBELOWREFEDGE ) ).
+m_pTsbBelowRefEdge->SetState( rAttrs->Get( SDRATTR_MEASUREBELOWREFEDGE 
).
 GetValue() ? TRISTATE_TRUE : TRISTATE_FALSE );
 m_pTsbBelowRefEdge->EnableTriState( false );
 }
@@ -292,7 +292,7 @@ void SvxMeasurePage::Reset( const SfxItemSet* rAttrs )
 // Attention: negate !
 if( rAttrs->GetItemState( SDRATTR_MEASURETEXTROTA90 ) != 
SfxItemState::DONTCARE )
 {
-m_pTsbParallel->SetState( static_cast( rAttrs->Get( SDRATTR_MEASURETEXTROTA90 ) ).
+m_pTsbParallel->SetState( rAttrs->Get( SDRATTR_MEASURETEXTROTA90 ).
 GetValue() ? TRISTATE_FALSE : TRISTATE_TRUE );
 m_pTsbParallel->EnableTriState( false );
 }
@@ -305,7 +305,7 @@ void SvxMeasurePage::Reset( const SfxItemSet* rAttrs )
 // SdrMeasureShowUnitItem
 if( rAttrs->GetItemState( SDRATTR_MEASURESHOWUNIT ) != 
SfxItemState::DONTCARE )
 {
-m_pTsbShowUnit->SetState( static_cast( 
rAttrs->Get( SDRATTR_MEASURESHOWUNIT ) ).
+m_pTsbShowUnit->SetState( rAttrs->Get( SDRATTR_MEASURESHOWUNIT ).
 GetValue() ? TRISTATE_TRUE : TRISTATE_FALSE );
 m_pTsbShowUnit->EnableTriState( false );
 }
@@ -318,8 +318,7 @@ void SvxMeasurePage::Reset( const SfxItemSet* rAttrs )
 // SdrMeasureUnitItem
 if( rAttrs->GetItemState( SDRATTR_MEASUREUNIT ) != SfxItemState::DONTCARE )
 {
-long nFieldUnit = (long) static_cast( 
rAttrs->
-Get( SDRATTR_MEASUREUNIT ) ).GetValue();
+long nFieldUnit = (long) rAttrs->Get( SDRATTR_MEASUREUNIT ).GetValue();
 
 for( sal_Int32 i = 0; i < m_pLbUnit->GetEntryCount(); ++i )
 {
@@ -340,7 +339,7 @@ void SvxMeasurePage::Reset( const SfxItemSet* rAttrs )
 if ( rAttrs->GetItemState( SDRATTR_MEASURETEXTVPOS ) != 
SfxItemState::DONTCARE )
 {
 css::drawing::MeasureTextVertPos eVPos =
-static_cast( rAttrs->Get( 
SDRATTR_MEASURETEXTVPOS ) ).GetValue();
+rAttrs->Get( SDRATTR_MEASURETEXTVPOS ).GetValue();
 {
 if ( rAttrs->GetItemState( SDRATTR_MEASURETEXTHPOS ) != 
SfxItemState::DONTCARE )
 {
@@ -348,7 +347,7 @@ void SvxMeasurePage::Reset( const SfxItemSet* rAttrs )
 m_pTsbAutoPosH->EnableTriState( false );
 
 css::drawing::MeasureTextHorzPos eHPos =
-static_cast( 
rAttrs->Get( SDRATTR_MEASURETEXTHPOS ) ).GetValue();
+rAttrs->Get( SDRATTR_MEASURETEXTHPOS ).GetValue();
 RectPoint eRP = RectPoint::MM;
 switch( eVPos )
 {
@@ -556,7 +555,7 @@ bool SvxMeasurePage::FillItemSet( SfxItemSet* rAttrs)
 
 if ( rAttrs->GetItemState( SDRATTR_MEASURETEXTVPOS ) != 
SfxItemState

[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 include/vcl svx/source vcl/source

2017-08-15 Thread Akshay Deep
 cui/source/dialogs/cuicharmap.cxx   |   12 ++
 cui/source/inc/cuicharmap.hxx   |1 
 include/svx/charmap.hxx |   19 +++
 include/svx/strings.hrc |5 
 include/vcl/textview.hxx|   26 
 svx/source/dialog/charmap.cxx   |  202 +++-
 svx/source/dialog/searchcharmap.cxx |1 
 vcl/source/edit/textview.cxx|   25 
 8 files changed, 264 insertions(+), 27 deletions(-)

New commits:
commit f9af8a35fc1aad055af2b5e6b6eab45a7d060719
Author: Akshay Deep 
Date:   Tue Aug 15 17:21:26 2017 +

tdf#111337 - Introduce alternative workflows at the special characters 
dialog

Change-Id: I6a8fe2476adc5c4379c76dfaef090d1b5cd81ea0
Reviewed-on: https://gerrit.libreoffice.org/41170
Reviewed-by: Heiko Tietze 
Tested-by: Heiko Tietze 

diff --git a/cui/source/dialogs/cuicharmap.cxx 
b/cui/source/dialogs/cuicharmap.cxx
index d148676dc645..0831604b408b 100644
--- a/cui/source/dialogs/cuicharmap.cxx
+++ b/cui/source/dialogs/cuicharmap.cxx
@@ -243,6 +243,8 @@ void SvxCharacterMap::getRecentCharacterList()
 
 void SvxCharacterMap::getFavCharacterList()
 {
+maFavCharList.clear();
+maFavCharFontList.clear();
 //retrieve recent character list
 css::uno::Sequence< OUString > rFavCharList( 
officecfg::Office::Common::FavoriteCharacters::FavoriteCharacterList::get() );
 for (int i = 0; i < rFavCharList.getLength(); ++i)
@@ -385,6 +387,8 @@ void SvxCharacterMap::updateFavCharControl()
 m_pFavCharView[i]->SetText(OUString());
 m_pFavCharView[i]->Hide();
 }
+m_pShowSet->getFavCharacterList();
+m_pSearchSet->getFavCharacterList();
 }
 
 
@@ -476,11 +480,13 @@ void SvxCharacterMap::init()
 m_pShowSet->SetSelectHdl( LINK( this, SvxCharacterMap, CharSelectHdl ) );
 m_pShowSet->SetHighlightHdl( LINK( this, SvxCharacterMap, CharHighlightHdl 
) );
 m_pShowSet->SetPreSelectHdl( LINK( this, SvxCharacterMap, CharPreSelectHdl 
) );
+m_pShowSet->SetFavClickHdl( LINK( this, SvxCharacterMap, FavClickHdl ) );
 
 m_pSearchSet->SetDoubleClickHdl( LINK( this, SvxCharacterMap, 
SearchCharDoubleClickHdl ) );
 m_pSearchSet->SetSelectHdl( LINK( this, SvxCharacterMap, 
SearchCharSelectHdl ) );
 m_pSearchSet->SetHighlightHdl( LINK( this, SvxCharacterMap, 
SearchCharHighlightHdl ) );
 m_pSearchSet->SetPreSelectHdl( LINK( this, SvxCharacterMap, 
SearchCharPreSelectHdl ) );
+m_pSearchSet->SetFavClickHdl( LINK( this, SvxCharacterMap, FavClickHdl ) );
 
 m_pDecimalCodeText->SetModifyHdl( LINK( this, SvxCharacterMap, 
DecimalCodeChangeHdl ) );
 m_pHexCodeText->SetModifyHdl( LINK( this, SvxCharacterMap, 
HexCodeChangeHdl ) );
@@ -955,6 +961,12 @@ IMPL_LINK_NOARG(SvxCharacterMap, FavSelectHdl, Button*, 
void)
 updateFavCharControl();
 }
 
+IMPL_LINK_NOARG(SvxCharacterMap, FavClickHdl, SvxShowCharSet*, void)
+{
+getFavCharacterList();
+updateFavCharControl();
+}
+
 IMPL_LINK_NOARG(SvxCharacterMap, CharHighlightHdl, SvxShowCharSet*, void)
 {
 OUString aText;
diff --git a/cui/source/inc/cuicharmap.hxx b/cui/source/inc/cuicharmap.hxx
index e7c63c29429c..2ba12e34f212 100644
--- a/cui/source/inc/cuicharmap.hxx
+++ b/cui/source/inc/cuicharmap.hxx
@@ -106,6 +106,7 @@ private:
 DECL_LINK(CharSelectHdl, SvxShowCharSet*, void);
 DECL_LINK(CharHighlightHdl, SvxShowCharSet*, void);
 DECL_LINK(CharPreSelectHdl, SvxShowCharSet*, void);
+DECL_LINK(FavClickHdl, SvxShowCharSet*,void);
 DECL_LINK(SearchCharDoubleClickHdl, SvxShowCharSet*,void);
 DECL_LINK(SearchCharSelectHdl, SvxShowCharSet*, void);
 DECL_LINK(SearchCharHighlightHdl, SvxShowCharSet*, void);
diff --git a/include/svx/charmap.hxx b/include/svx/charmap.hxx
index 86c95fc0cad5..bee07bbad2aa 100644
--- a/include/svx/charmap.hxx
+++ b/include/svx/charmap.hxx
@@ -33,6 +33,7 @@
 #include 
 #include 
 #include 
+#include 
 
 namespace com { namespace sun { namespace star {
 namespace accessibility { class XAccessible; }
@@ -40,6 +41,8 @@ namespace com { namespace sun { namespace star {
 
 namespace vcl { class Font; }
 
+using namespace ::com::sun::star;
+
 #define COLUMN_COUNT16
 #define ROW_COUNT8
 
@@ -62,15 +65,20 @@ public:
 
 virtual voidRecalculateFont(vcl::RenderContext& 
rRenderContext);
 
-voidSelectCharacter( sal_uInt32 cNew );
+voidSelectCharacter( sal_uInt32 cNew );
 virtual sal_UCS4GetSelectCharacter() const;
+voidcreateContextMenu();
 
 voidSetDoubleClickHdl( const Link& rLink 
) { aDoubleClkHdl = rLink; }
 voidSetSelectHdl( const Link& rHdl ) { 
aSelectHdl = rHdl; }
 voidSetHighlightHdl( const Link& rHdl ) 
{ aHighHdl = rHdl; }
 voidSetPreSelectHdl( const Link& rHdl ) 
{ aPreSelectHdl = rHdl; }
+voidSetFavClickHdl( const Link& rHdl ) { 
aFavClickHdl = rHdl; }
 static sal_uInt32& 

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

2017-06-21 Thread Noel Grandin
 cui/source/tabpages/page.cxx   |   37 -
 cui/source/tabpages/paragrph.cxx   |   20 ---
 include/svx/ctredlin.hxx   |1 
 include/svx/fmmodel.hxx|1 
 include/svx/frmdirlbox.hxx |6 
 include/svx/gridctrl.hxx   |1 
 include/svx/itemwin.hxx|2 -
 include/svx/langbox.hxx|1 
 include/svx/nbdtmg.hxx |   12 +++--
 include/svx/pagectrl.hxx   |7 -
 include/svx/paraprev.hxx   |7 ++---
 include/svx/relfld.hxx |4 ---
 include/svx/sidebar/LineWidthPopup.hxx |2 -
 include/svx/svddrgv.hxx|4 ---
 include/svx/svdedtv.hxx|   12 -
 include/svx/svdedxv.hxx|5 +--
 include/svx/svdetc.hxx |3 --
 include/svx/svdmodel.hxx   |8 --
 include/svx/svdmrkv.hxx|5 ---
 sd/source/ui/dlg/brkdlg.cxx|2 -
 sd/source/ui/func/futext.cxx   |2 -
 sd/source/ui/view/sdview.cxx   |1 
 svx/inc/svdibrow.hxx   |4 ---
 svx/source/dialog/ctredlin.cxx |3 --
 svx/source/dialog/frmdirlbox.cxx   |1 
 svx/source/dialog/hdft.cxx |   35 ---
 svx/source/dialog/langbox.cxx  |4 ---
 svx/source/dialog/pagectrl.cxx |   31 
 svx/source/dialog/paraprev.cxx |4 ---
 svx/source/dialog/relfld.cxx   |5 ---
 svx/source/fmcomp/gridcell.cxx |7 -
 svx/source/fmcomp/gridctrl.cxx |3 --
 svx/source/form/fmPropBrw.cxx  |3 --
 svx/source/form/fmmodel.cxx|   12 -
 svx/source/inc/fmPropBrw.hxx   |1 
 svx/source/inc/gridcell.hxx|3 --
 svx/source/sidebar/line/LineWidthPopup.cxx |   10 ---
 svx/source/sidebar/nbdtmg.cxx  |2 -
 svx/source/svdraw/svddrgv.cxx  |5 ---
 svx/source/svdraw/svdedtv.cxx  |9 ---
 svx/source/svdraw/svdedxv.cxx  |1 
 svx/source/svdraw/svdetc.cxx   |4 ---
 svx/source/svdraw/svdibrow.cxx |8 --
 svx/source/svdraw/svdmodel.cxx |   10 ---
 svx/source/svdraw/svdmrkv.cxx  |1 
 svx/source/tbxctrls/itemwin.cxx|   12 ++---
 sw/source/core/draw/dview.cxx  |1 
 sw/source/uibase/frmdlg/colex.cxx  |   14 --
 48 files changed, 26 insertions(+), 310 deletions(-)

New commits:
commit 95c348afa8f4f17c058c449ded75025175af0e4a
Author: Noel Grandin 
Date:   Tue Jun 20 14:26:45 2017 +0200

loplugin:unusedfields in svx part2

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

diff --git a/cui/source/tabpages/page.cxx b/cui/source/tabpages/page.cxx
index 437cdb41a0e5..147242fe1df1 100644
--- a/cui/source/tabpages/page.cxx
+++ b/cui/source/tabpages/page.cxx
@@ -1163,14 +1163,6 @@ void SvxPageDescPage::ResetBackground_Impl(const 
SfxItemSet& rSet)
 }
 
 m_pBspWin->setHeaderFillAttributes(aHeaderFillAttributes);
-nWhich = GetWhich(SID_ATTR_BORDER_OUTER);
-
-if(rTmpSet.GetItemState(nWhich) == SfxItemState::SET)
-{
-const SvxBoxItem& rItem =
-static_cast(rTmpSet.Get( nWhich ));
-m_pBspWin->SetHdBorder( rItem );
-}
 }
 }
 
@@ -1207,13 +1199,6 @@ void SvxPageDescPage::ResetBackground_Impl(const 
SfxItemSet& rSet)
 }
 
 m_pBspWin->setFooterFillAttributes(aFooterFillAttributes);
-nWhich = GetWhich(SID_ATTR_BORDER_OUTER);
-
-if(rTmpSet.GetItemState(nWhich) == SfxItemState::SET)
-{
-const SvxBoxItem& rItem = static_cast< const SvxBoxItem& 
>(rTmpSet.Get(nWhich));
-m_pBspWin->SetFtBorder(rItem);
-}
 }
 }
 
@@ -1241,12 +1226,6 @@ void SvxPageDescPage::ResetBackground_Impl(const 
SfxItemSet& rSet)
 }
 
 m_pBspWin->setPageFillAttributes(aPageFillAttributes);
-pItem = GetItem(rSet, SID_ATTR_BORDER_OUTER);
-
-if(pItem)
-{
-m_pBspWin->SetBorder(static_cast< const SvxBoxItem& >(*pItem));
-}
 }
 
 void SvxPageDescPage::InitHeadFoot_Impl( const SfxItemSet& rSet )
@@ -1311,14 +1290,6 @@ void SvxPageDescPage::InitHeadFoot_Impl( const 
SfxItemSet& rSet )
 }
 
 m_pBspWin->setHeaderFillAttributes(aHeaderFillAttributes);
-const sal_uInt16 nWhich(GetWhich(SID_ATTR_BORDER_OUTER));
-
-if ( rHeaderSet.GetItemState( nWhich ) >= SfxIt

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

2017-05-04 Thread Noel Grandin
 cui/source/tabpages/tptrans.cxx   |6 ++--
 include/svx/SpellDialogChildWindow.hxx|3 --
 include/svx/fmgridcl.hxx  |8 ++---
 include/svx/fontworkgallery.hxx   |2 -
 include/svx/gridctrl.hxx  |6 ++--
 include/svx/sdr/table/tablecontroller.hxx |2 -
 include/svx/svddrgv.hxx   |4 +-
 include/svx/svdotable.hxx |2 -
 include/svx/svdotext.hxx  |2 -
 include/svx/svdpntv.hxx   |6 ++--
 include/svx/xbtmpit.hxx   |2 -
 include/svx/xflftrit.hxx  |2 -
 include/svx/xflhtit.hxx   |2 -
 include/svx/xlndsit.hxx   |2 -
 include/svx/xlnedit.hxx   |2 -
 include/svx/xlnstit.hxx   |2 -
 reportdesign/source/ui/report/ReportController.cxx|6 ++--
 sc/source/ui/view/spelldialog.cxx |4 +-
 sd/source/core/drawdoc4.cxx   |   11 +++
 sd/source/ui/dlg/SpellDialogChildWindow.cxx   |4 +-
 sd/source/ui/view/sdview3.cxx |2 -
 sd/source/ui/view/sdview4.cxx |2 -
 svx/source/customshapes/EnhancedCustomShape3d.cxx |4 +-
 svx/source/customshapes/EnhancedCustomShape3d.hxx |2 -
 svx/source/dialog/SpellDialogChildWindow.cxx  |3 --
 svx/source/fmcomp/fmgridcl.cxx|   10 +++
 svx/source/fmcomp/fmgridif.cxx|8 ++---
 svx/source/fmcomp/gridcell.cxx|2 -
 svx/source/fmcomp/gridctrl.cxx|   14 -
 svx/source/form/fmshimp.cxx   |2 -
 svx/source/form/fmtextcontrolshell.cxx|2 -
 svx/source/inc/fmtextcontrolshell.hxx |2 -
 svx/source/sidebar/area/AreaPropertyPanelBase.cxx |3 --
 svx/source/sidebar/area/AreaTransparencyGradientPopup.cxx |3 --
 svx/source/sidebar/paragraph/ParaPropertyPanel.cxx|   20 +++---
 svx/source/sidebar/paragraph/ParaPropertyPanel.hxx|6 ++--
 svx/source/svdraw/svddrgv.cxx |5 +--
 svx/source/svdraw/svdfmtf.cxx |2 -
 svx/source/svdraw/svdoashp.cxx|4 +-
 svx/source/svdraw/svdotxln.cxx|4 +-
 svx/source/svdraw/svdpntv.cxx |   17 ---
 svx/source/table/svdotable.cxx|   12 
 svx/source/table/tablecontroller.cxx  |4 +-
 svx/source/tbxctrls/fontworkgallery.cxx   |   12 
 svx/source/toolbars/fontworkbar.cxx   |2 -
 svx/source/xoutdev/xattr.cxx  |   10 +++
 svx/source/xoutdev/xattrbmp.cxx   |2 -
 svx/source/xoutdev/xpool.cxx  |   12 
 sw/source/core/unocore/unoframe.cxx   |   10 +++
 sw/source/core/unocore/unostyle.cxx   |4 +-
 sw/source/uibase/dialog/SwSpellDialogChildWindow.cxx  |4 +-
 sw/source/uibase/uiview/viewdraw.cxx  |2 -
 52 files changed, 129 insertions(+), 140 deletions(-)

New commits:
commit ac11e45bad895e9f7de0b38fe22b7f2acf8c8e4b
Author: Noel Grandin 
Date:   Thu May 4 16:10:13 2017 +0200

loplugin:checkunusedparams in svx(part4)

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

diff --git a/cui/source/tabpages/tptrans.cxx b/cui/source/tabpages/tptrans.cxx
index 90cea669a8a8..5b1ce71a644a 100644
--- a/cui/source/tabpages/tptrans.cxx
+++ b/cui/source/tabpages/tptrans.cxx
@@ -171,7 +171,7 @@ void SvxTransparenceTabPage::ModifiedTrgrHdl_Impl(void* 
pControl)
 (sal_uInt16)m_pMtrTrgrBorder->GetValue(),
 100, 100);
 
-XFillFloatTransparenceItem aItem( rXFSet.GetPool()/*aString*/, 
aTmpGradient);
+XFillFloatTransparenceItem aItem( aTmpGradient);
 rXFSet.Put ( aItem );
 
 InvalidatePreview();
@@ -356,7 +356,7 @@ bool SvxTransparenceTabPage::FillItemSet(SfxItemSet* rAttrs)
 (sal_uInt16)m_pMtrTrgrBorder->GetValue(),
 100, 100);
 
-XFillFloatTransparenceItem aItem( rXFSet.GetPool()/*aString*/, 
aTmpGradient);
+XFillFloatTransparenceItem aItem(aTmpGradient);
 const SfxPoolItem* pOld = GetOldItem(*

[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 &rAlignLB);
 static shortGetAlignment(FrmMap *pMap, sal_uInt16 nMapPos, ListBox 
&rAlignLB, ListBox &rRelationLB);
 static shortGetRelation(FrmMap *pMap, ListBox &rRelationLB);
-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 &rLB, FixedText &rFT);
 sal_uInt16  FillPosLB(FrmMap *pMap, sal_uInt16 nAlign, const 
sal_uInt16 _nRel, ListBox &rLB);
 
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(&bAnchorChanged);
+css::text::TextContentAnchorType nAnchor = GetAnchorType(&bAnchorChanged);
 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)
+Text

[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 @@ bool SvxCharEffectsPage::FillItemSetColor_Impl( 
SfxItemSet& rSet )
 aSe

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

2017-03-28 Thread Jorenz Paragas
 cui/source/dialogs/hangulhanjadlg.cxx|1 
 cui/source/dialogs/thesdlg_impl.hxx  |1 
 cui/source/options/optlingu.cxx  |1 
 cui/source/tabpages/autocdlg.cxx |1 
 cui/source/tabpages/borderconn.cxx   |1 
 include/svx/AccessibleControlShape.hxx   |   38 ++--
 include/svx/AccessibleGraphicShape.hxx   |   13 ++
 include/svx/AccessibleOLEShape.hxx   |   18 +++
 include/svx/AccessibleShape.hxx  |   50 +++
 include/svx/AccessibleShapeInfo.hxx  |   11 +-
 include/svx/AccessibleShapeTreeInfo.hxx  |   14 +--
 include/svx/AccessibleTextHelper.hxx |   17 +--
 include/svx/ActionDescriptionProvider.hxx|3 
 include/svx/AffineMatrixItem.hxx |9 +
 include/svx/ChildrenManager.hxx  |   14 ++-
 include/svx/ColorSets.hxx|4 
 include/svx/CommonStyleManager.hxx   |8 +
 include/svx/CommonStylePreviewRenderer.hxx   |   14 ++-
 include/svx/algitem.hxx  |8 +
 include/svx/bmpmask.hxx  |   25 -
 include/svx/camera3d.hxx |2 
 include/svx/charmap.hxx  |   23 -
 include/svx/charthelper.hxx  |   17 ++-
 include/svx/checklbx.hxx |   13 ++
 include/svx/chrtitem.hxx |8 +
 include/svx/clipboardctl.hxx |8 -
 include/svx/clipfmtitem.hxx  |7 +
 include/svx/colrctrl.hxx |   20 +++-
 include/svx/compressgraphicdialog.hxx|   29 --
 include/svx/connctrl.hxx |9 +
 include/svx/contdlg.hxx  |   10 +-
 include/svx/ctredlin.hxx |   41 +++--
 include/svx/cube3d.hxx   |9 +
 sc/inc/chgviset.hxx  |5 -
 sc/source/ui/Accessibility/AccessibleDocument.cxx|2 
 sc/source/ui/Accessibility/AccessibleDocumentPagePreview.cxx |2 
 sc/source/ui/cctrl/checklistmenu.cxx |1 
 sc/source/ui/inc/checklistmenu.hxx   |1 
 sc/source/ui/miscdlgs/solveroptions.cxx  |1 
 sd/source/ui/accessibility/AccessiblePageShape.cxx   |2 
 svx/source/accessibility/AccessibleControlShape.cxx  |3 
 svx/source/accessibility/AccessibleGraphicShape.cxx  |1 
 svx/source/accessibility/AccessibleShape.cxx |4 
 svx/source/accessibility/ChildrenManagerImpl.cxx |4 
 svx/source/accessibility/ChildrenManagerImpl.hxx |1 
 svx/source/accessibility/charmapacc.cxx  |1 
 svx/source/dialog/_bmpmask.cxx   |3 
 svx/source/dialog/_contdlg.cxx   |1 
 svx/source/dialog/checklbx.cxx   |1 
 svx/source/dialog/compressgraphicdialog.cxx  |3 
 svx/source/dialog/ctredlin.cxx   |2 
 svx/source/table/accessiblecell.cxx  |1 
 sw/source/core/access/acccontext.cxx |1 
 53 files changed, 382 insertions(+), 105 deletions(-)

New commits:
commit 65aa28cc1c8a90865c3a9ea379722730c40ecb53
Author: Jorenz Paragas 
Date:   Wed Jun 22 17:26:05 2016 -0700

tdf#42949: clean up includes in include/svx/[a-c]* with iwyu

Change-Id: I7768f4dbe9892c4264cb16eed87497894aa7494e
Reviewed-on: https://gerrit.libreoffice.org/26582
Tested-by: Jenkins 
Reviewed-by: Michael Stahl 

diff --git a/cui/source/dialogs/hangulhanjadlg.cxx 
b/cui/source/dialogs/hangulhanjadlg.cxx
index 9db35dd09b5f..9b4eb01f2b61 100644
--- a/cui/source/dialogs/hangulhanjadlg.cxx
+++ b/cui/source/dialogs/hangulhanjadlg.cxx
@@ -39,6 +39,7 @@
 
 #include 
 #include 
+#include 
 #include "svtools/treelistentry.hxx"
 
 #define HHC editeng::HangulHanjaConversion
diff --git a/cui/source/dialogs/thesdlg_impl.hxx 
b/cui/source/dialogs/thesdlg_impl.hxx
index fb529346de18..23d35c487b53 100644
--- a/cui/source/dialogs/thesdlg_impl.hxx
+++ b/cui/source/dialogs/thesdlg_impl.hxx
@@ -23,6 +23,7 @@
 #include "thesdlg.hxx"
 
 #include 
+#include 
 #include 
 #include 
 #include 
diff --git a/cui/source/options/optlingu.cxx b/cui/source/options/optlingu.cxx
index 84fd5090593c..0d5638979904 100644

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

2017-03-06 Thread Noel Grandin
 cui/source/tabpages/textanim.cxx   |   20 +++---
 include/svx/sdtakitm.hxx   |   30 ++---
 include/svx/svddef.hxx |2 -
 sc/source/ui/drawfunc/futext.cxx   |4 +-
 svx/source/sdr/contact/viewcontactofsdrobj.cxx |2 -
 svx/source/sdr/primitive2d/sdrattributecreator.cxx |4 +-
 svx/source/svdraw/svdibrow.cxx |6 ++--
 svx/source/svdraw/svdobj.cxx   |2 -
 svx/source/svdraw/svdotext.cxx |   10 +++
 svx/source/svdraw/svdotextdecomposition.cxx|   12 
 svx/source/svdraw/svdotxat.cxx |2 -
 svx/source/svdraw/svdotxed.cxx |2 -
 sw/source/core/draw/dcontact.cxx   |4 +-
 sw/source/core/frmedt/feshview.cxx |2 -
 sw/source/filter/html/htmldrawreader.cxx   |   12 
 sw/source/filter/html/htmldrawwriter.cxx   |   14 -
 sw/source/uibase/ribbar/conrect.cxx|2 -
 17 files changed, 65 insertions(+), 65 deletions(-)

New commits:
commit 001feed29c881da5767dd2ae80127fb74926112e
Author: Noel Grandin 
Date:   Mon Mar 6 10:02:19 2017 +0200

convert SdrTextAniKind to scoped enum

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

diff --git a/cui/source/tabpages/textanim.cxx b/cui/source/tabpages/textanim.cxx
index 2dcc3d3..2e65fe8 100644
--- a/cui/source/tabpages/textanim.cxx
+++ b/cui/source/tabpages/textanim.cxx
@@ -95,7 +95,7 @@ SvxTextAnimationPage::SvxTextAnimationPage( vcl::Window* 
pWindow, const SfxItemS
   ,"cui/ui/textanimtabpage.ui"
   ,&rInAttrs ),
 rOutAttrs   ( rInAttrs ),
-eAniKind( SDRTEXTANI_NONE )
+eAniKind( SdrTextAniKind::NONE )
 {
 get(m_pLbEffect, "LB_EFFECT");
 get(m_pBoxDirection,"boxDIRECTION");
@@ -251,7 +251,7 @@ void SvxTextAnimationPage::Reset( const SfxItemSet* rAttrs )
 m_pNumFldCount->SetValue( nValue );
 if( nValue == 0 )
 {
-if( eAniKind == SDRTEXTANI_SLIDE )
+if( eAniKind == SdrTextAniKind::Slide )
 {
 m_pTsbEndless->SetState( TRISTATE_FALSE );
 m_pTsbEndless->Enable( false );
@@ -488,20 +488,20 @@ IMPL_LINK_NOARG(SvxTextAnimationPage, 
SelectEffectHdl_Impl, ListBox&, void)
 eAniKind = (SdrTextAniKind) nPos;
 switch( eAniKind )
 {
-case SDRTEXTANI_NONE:
+case SdrTextAniKind::NONE:
 {
 m_pBoxDirection->Disable();
 m_pFlProperties->Disable();
 }
 break;
 
-case SDRTEXTANI_BLINK:
-case SDRTEXTANI_SCROLL:
-case SDRTEXTANI_ALTERNATE:
-case SDRTEXTANI_SLIDE:
+case SdrTextAniKind::Blink:
+case SdrTextAniKind::Scroll:
+case SdrTextAniKind::Alternate:
+case SdrTextAniKind::Slide:
 {
 m_pFlProperties->Enable();
-if( eAniKind == SDRTEXTANI_SLIDE )
+if( eAniKind == SdrTextAniKind::Slide )
 {
 m_pTsbStartInside->Disable();
 m_pTsbStopInside->Disable();
@@ -520,7 +520,7 @@ IMPL_LINK_NOARG(SvxTextAnimationPage, SelectEffectHdl_Impl, 
ListBox&, void)
 m_pTsbAuto->Enable();
 ClickAutoHdl_Impl( nullptr );
 
-if( eAniKind == SDRTEXTANI_BLINK )
+if( eAniKind == SdrTextAniKind::Blink )
 {
 m_pBoxDirection->Disable();
 m_pBoxCount->Disable();
@@ -540,7 +540,7 @@ IMPL_LINK_NOARG(SvxTextAnimationPage, SelectEffectHdl_Impl, 
ListBox&, void)
 IMPL_LINK_NOARG(SvxTextAnimationPage, ClickEndlessHdl_Impl, Button*, void)
 {
 
-if( eAniKind != SDRTEXTANI_SLIDE )
+if( eAniKind != SdrTextAniKind::Slide )
 {
 TriState eState = m_pTsbEndless->GetState();
 if( eState != TRISTATE_FALSE )
diff --git a/include/svx/sdtakitm.hxx b/include/svx/sdtakitm.hxx
index 9cac471..8d628ac 100644
--- a/include/svx/sdtakitm.hxx
+++ b/include/svx/sdtakitm.hxx
@@ -26,22 +26,22 @@
 /**
  * Animation type for text frame.
  */
-enum SdrTextAniKind {
-SDRTEXTANI_NONE,  /// no animation
-SDRTEXTANI_BLINK, /// blinking
-SDRTEXTANI_SCROLL,/// scroll through
-SDRTEXTANI_ALTERNATE, /// scroll back and forth
-SDRTEXTANI_SLIDE  /// scroll in
+enum class SdrTextAniKind {
+NONE,  /// no animation
+Blink, /// blinking
+Scroll,/// scroll through
+Alternate, /// scroll back and forth
+Slide  /// scroll in
 };
 
-// - SDRTEXTANI_BLINK:
+//

[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 &xRef 
);
-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( &m_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, &pPoolItem ) )
 {
-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, &pPoolItem ) )
-{
-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() ) );
-m_pGcustom->SetValue( ColorToPercent_Impl( 
aCurrentColor.GetGreen() ) );
-m_pBcustom->SetValue( ColorToPercent_Impl( 
aCurrentColor.GetBlue

[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 +  6)
+#define RID_SVXBMP_CHECKBOX (RID_FORMS_START +  7)
+

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

2016-11-24 Thread Justin Luth
 cui/source/tabpages/border.cxx|7 +--
 include/svx/svxids.hrc|2 +-
 sw/inc/IDocumentSettingAccess.hxx |1 -
 sw/source/core/doc/DocumentSettingManager.cxx |5 -
 sw/source/core/inc/DocumentSettingManager.hxx |1 -
 sw/source/core/layout/frmtool.cxx |3 +--
 sw/source/filter/ww8/ww8par.cxx   |1 -
 sw/source/uibase/shells/frmsh.cxx |4 
 sw/source/uibase/uno/SwXDocumentSettings.cxx  |   13 -
 writerfilter/source/filter/WriterFilter.cxx   |1 -
 10 files changed, 3 insertions(+), 35 deletions(-)

New commits:
commit 8a34ff14f18da0df261ae8f1ca3f23de157706a1
Author: Justin Luth 
Date:   Wed Nov 23 08:16:17 2016 +0300

tdf#41542 globally allow padding without borders: UI

This is the final fix for tdf#41542 - enabling the UI to adjust the
padding without requiring an enabled border line.

Because almost every document edited by LO5.3 will gain the setting
ALLOW_PADDING_WITHOUT_BORDERS = false, it cannot be kept as a
preventative compatibility setting. Otherwise any document edited
in 5.3 would act differently from any other document - not being
allowed to modify borderless padding for frames, even in 5.4+.
That would be a very confusing corner-case that is best avoided,
so removing all compatibility code (which currently has no use).

So, if an AllowPaddingWithoutBorders=false compatibility
situation is ever required in the future, do not
resurrect the name ALLOW_PADDING_WITHOUT_BORDRES. Additionally, code
will also be needed to send the compatibility setting for
each type of border (page, paragraph, character, header, frames, image).
See commit f013d4a1f4073cda735befd6e446bee35f3db65c as an example
of how to implement that for frames.

This commit means there is a lot of dead code now (m_bBorderDist and
mbAllowPaddingWithoutBorders are always true). LO5.7 seems like a good
target to clean that up - to allow time to easily fix any regressions.

Change-Id: I2d2091fa34f8b178a59347b35a81c944c9b24ed7
Reviewed-on: https://gerrit.libreoffice.org/31105
Tested-by: Jenkins 
Reviewed-by: Justin Luth 
Reviewed-by: Miklos Vajna 

diff --git a/cui/source/tabpages/border.cxx b/cui/source/tabpages/border.cxx
index f989a7c..d67df7f 100644
--- a/cui/source/tabpages/border.cxx
+++ b/cui/source/tabpages/border.cxx
@@ -102,7 +102,7 @@ SvxBorderTabPage::SvxBorderTabPage(vcl::Window* pParent, 
const SfxItemSet& rCore
 mbTLBREnabled( false ),
 mbBLTREnabled( false ),
 mbUseMarginItem( false ),
-mbAllowPaddingWithoutBorders( false ),
+mbAllowPaddingWithoutBorders( true ),
 mbSync(true),
 mbRemoveAdjacentCellBorders( false ),
 bIsCalcDoc( false )
@@ -181,11 +181,6 @@ SvxBorderTabPage::SvxBorderTabPage(vcl::Window* pParent, 
const SfxItemSet& rCore
 m_pLineWidthMF->SetValue(p->GetValue());
 }
 
-if (rCoreAttrs.HasItem(SID_ALLOW_PADDING_WITHOUT_BORDERS, &pItem))
-{
-mbAllowPaddingWithoutBorders = static_cast(pItem)->GetValue();
-}
-
 // set metric
 FieldUnit eFUnit = GetModuleFieldUnit( rCoreAttrs );
 
diff --git a/include/svx/svxids.hrc b/include/svx/svxids.hrc
index 8a7f7c5..6f6aaa5 100644
--- a/include/svx/svxids.hrc
+++ b/include/svx/svxids.hrc
@@ -964,7 +964,7 @@
 #define FN_SVX_SET_NUMBER   ( SID_SVX_START + 1136 
)
 #define FN_SVX_SET_BULLET   ( SID_SVX_START + 1137 
)
 #define FN_SVX_SET_OUTLINE  ( SID_SVX_START + 1138 
)
-#define SID_ALLOW_PADDING_WITHOUT_BORDERS   ( SID_SVX_START + 1139 
)
+
 #define SID_ATTR_BORDER_STYLES  ( SID_SVX_START + 1140 
)
 #define SID_ATTR_BORDER_DEFAULT_WIDTH   ( SID_SVX_START + 1141 
)
 // 1142 is used by editeng (SID_ATTR_CHAR_GRABBAG)
diff --git a/sw/inc/IDocumentSettingAccess.hxx 
b/sw/inc/IDocumentSettingAccess.hxx
index 2827567..f16ae42 100644
--- a/sw/inc/IDocumentSettingAccess.hxx
+++ b/sw/inc/IDocumentSettingAccess.hxx
@@ -39,7 +39,6 @@ enum class DocumentSettingId
 ADD_FLY_OFFSETS,
 ADD_VERTICAL_FLY_OFFSETS,
 
-ALLOW_PADDING_WITHOUT_BORDERS,
 OLD_NUMBERING,
 
 ADD_EXT_LEADING,
diff --git a/sw/source/core/doc/DocumentSettingManager.cxx 
b/sw/source/core/doc/DocumentSettingManager.cxx
index 78201b6..5cf29c0 100644
--- a/sw/source/core/doc/DocumentSettingManager.cxx
+++ b/sw/source/core/doc/DocumentSettingManager.cxx
@@ -55,7 +55,6 @@ sw::DocumentSettingManager::DocumentSettingManager(SwDoc 
&rDoc)
 
 mbAddFlyOffsets(false),
 mbAddVerticalFlyOffsets(false),
-mbAllowPaddingWithoutBorders( false ),
 mbUseHiResolutionVirtualDevice(true),
 mbMathBaselineAlignment(false), // default for *old* documents is 'off'
 mbStylesNoDefault(false),
@@ -147,7 +146,6 @@ bool 

[Libreoffice-commits] core.git: cui/source include/svx include/tools include/ucbhelper include/unotools sd/inc

2016-11-15 Thread Noel Grandin
 cui/source/factory/dlgfact.hxx  |2 +-
 cui/source/tabpages/paragrph.cxx|   10 +-
 include/svx/AffineMatrixItem.hxx|2 +-
 include/svx/CommonStylePreviewRenderer.hxx  |2 +-
 include/svx/SvxColorValueSet.hxx|2 +-
 include/svx/SvxPresetListBox.hxx|2 +-
 include/svx/clipfmtitem.hxx |2 +-
 include/svx/contdlg.hxx |2 +-
 include/svx/dlgctl3d.hxx|2 +-
 include/svx/dlgctrl.hxx |3 +--
 include/svx/fmview.hxx  |2 +-
 include/svx/fontlb.hxx  |4 ++--
 include/svx/framelink.hxx   |2 +-
 include/svx/gridctrl.hxx|6 +++---
 include/svx/hlnkitem.hxx|2 +-
 include/svx/imapdlg.hxx |4 ++--
 include/svx/nbdtmg.hxx  |8 
 include/svx/numfmtsh.hxx|2 +-
 include/svx/numvset.hxx |4 ++--
 include/svx/passwd.hxx  |2 +-
 include/svx/relfld.hxx  |4 ++--
 include/svx/rotmodit.hxx|2 +-
 include/svx/rulritem.hxx|6 +++---
 include/svx/sdangitm.hxx|2 +-
 include/svx/sdooitm.hxx |2 +-
 include/svx/sdprcitm.hxx|4 ++--
 include/svx/sdr/overlay/overlayanimatedbitmapex.hxx |2 +-
 include/svx/sdr/table/tablecontroller.hxx   |2 +-
 include/svx/sdynitm.hxx |2 +-
 include/svx/sidebar/SidebarDialControl.hxx  |2 +-
 include/svx/svdcrtv.hxx |2 +-
 include/svx/svddrgv.hxx |4 ++--
 include/svx/svdedtv.hxx |4 ++--
 include/svx/svdedxv.hxx |2 +-
 include/svx/svdglev.hxx |4 ++--
 include/svx/svdhdl.hxx  |8 
 include/svx/svdmodel.hxx|6 +++---
 include/svx/svdmrkv.hxx |4 ++--
 include/svx/svdoashp.hxx|2 +-
 include/svx/svdomeas.hxx|2 +-
 include/svx/svdotable.hxx   |2 +-
 include/svx/svdotext.hxx|2 +-
 include/svx/svdpntv.hxx |2 +-
 include/svx/svdpoev.hxx |2 +-
 include/svx/svdsnpv.hxx |2 +-
 include/svx/svdundo.hxx |6 +++---
 include/svx/svdview.hxx |2 +-
 include/svx/svdxcgv.hxx |6 +++---
 include/svx/svxdlg.hxx  |2 +-
 include/svx/sxenditm.hxx|8 
 include/svx/unoshape.hxx|4 ++--
 include/svx/view3d.hxx  |4 ++--
 include/svx/xbtmpit.hxx |2 +-
 include/svx/xflgrit.hxx |2 +-
 include/svx/xit.hxx |3 +--
 include/svx/xoutbmp.hxx |2 +-
 include/svx/xpool.hxx   |4 +---
 include/tools/errinf.hxx|4 ++--
 include/tools/poly.hxx  |2 +-
 include/tools/urlobj.hxx|4 +---
 include/ucbhelper/fd_inputstream.hxx|3 +--
 include/unotools/confignode.hxx |2 +-
 include/unotools/configvaluecontainer.hxx   |2 +-
 include/unotools/textsearch.hxx |2 +-
 sd/inc/drawdoc.hxx  |4 ++--
 65 files changed, 101 insertions(+), 108 deletions(-)

New commits:
commit 3c73942c8c4b97ee9ede65890e1b1db3cac753c5
Author: Noel Grandin 
Date:   Tue Nov 15 13:36:03 2016 +0200

loplugin:countusersofdefaultparams in include/svx..unotools

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

diff --git a/cui/source/factory/dlgfact.hxx b/cui/source/factory/dlgfact.hxx
index adf568e..2170fd8 100644
--- a/cui/source/factory/dlgfact.hxx
+++ b/cui/source/factory/dlgfact.hxx
@@ -587,7 +587,7 @@ public:
 virtual VclPtr   CreateSvxLineTabDialog( 
vcl::Window* pParent, const SfxItemSet* pAttr,
  SdrModel* 
pModel,
  

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

2016-11-02 Thread Justin Luth
 cui/source/inc/border.hxx |1 +
 cui/source/tabpages/border.cxx|   19 +--
 include/svx/svxids.hrc|2 +-
 sw/source/uibase/shells/frmsh.cxx |4 
 4 files changed, 19 insertions(+), 7 deletions(-)

New commits:
commit f013d4a1f4073cda735befd6e446bee35f3db65c
Author: Justin Luth 
Date:   Sat Oct 29 17:26:57 2016 +0300

tdf#41542 PaddingWithoutBorders: allow UI changes if...

If the compatibility option is set, allow the border dialog for frames
to be able to adjust the spacing values without enabling the border lines.
That means it is only true for .doc and .docx right now.

Change-Id: I4004a849f7369c993089d1c7b5d856cbea4f7780
Reviewed-on: https://gerrit.libreoffice.org/28602
Tested-by: Jenkins 
Reviewed-by: Justin Luth 
Reviewed-by: Miklos Vajna 

diff --git a/cui/source/inc/border.hxx b/cui/source/inc/border.hxx
index c32dba5..9675b10 100644
--- a/cui/source/inc/border.hxx
+++ b/cui/source/inc/border.hxx
@@ -111,6 +111,7 @@ private:
 boolmbTLBREnabled;  ///< true = Top-left to 
bottom-right border enabled.
 boolmbBLTREnabled;  ///< true = Bottom-left to 
top-right border enabled.
 boolmbUseMarginItem;
+boolmbAllowPaddingWithoutBorders;
 boolmbSync;
 boolmbRemoveAdjacentCellBorders;
 boolbIsCalcDoc;
diff --git a/cui/source/tabpages/border.cxx b/cui/source/tabpages/border.cxx
index 05c8914..d74ae35 100644
--- a/cui/source/tabpages/border.cxx
+++ b/cui/source/tabpages/border.cxx
@@ -102,6 +102,7 @@ SvxBorderTabPage::SvxBorderTabPage(vcl::Window* pParent, 
const SfxItemSet& rCore
 mbTLBREnabled( false ),
 mbBLTREnabled( false ),
 mbUseMarginItem( false ),
+mbAllowPaddingWithoutBorders( false ),
 mbSync(true),
 mbRemoveAdjacentCellBorders( false ),
 bIsCalcDoc( false )
@@ -180,6 +181,11 @@ SvxBorderTabPage::SvxBorderTabPage(vcl::Window* pParent, 
const SfxItemSet& rCore
 m_pLineWidthMF->SetValue(p->GetValue());
 }
 
+if (rCoreAttrs.HasItem(SID_ALLOW_PADDING_WITHOUT_BORDERS, &pItem))
+{
+mbAllowPaddingWithoutBorders = static_cast(pItem)->GetValue();
+}
+
 // set metric
 FieldUnit eFUnit = GetModuleFieldUnit( rCoreAttrs );
 
@@ -698,10 +704,11 @@ bool SvxBorderTabPage::FillItemSet( SfxItemSet* 
rCoreAttrs )
 if( !m_pLeftMF->GetText().isEmpty() || 
!m_pRightMF->GetText().isEmpty() ||
 !m_pTopMF->GetText().isEmpty() || 
!m_pBottomMF->GetText().isEmpty() )
 {
-if ( ((mbHorEnabled || mbVerEnabled || (nSWMode & 
SwBorderModes::TABLE)) &&
-(m_pLeftMF->IsModified()||m_pRightMF->IsModified()||
-m_pTopMF->IsModified()||m_pBottomMF->IsModified()) 
)||
- m_pFrameSel->GetFrameBorderState( 
svx::FrameBorderType::Top ) != svx::FrameBorderState::Hide
+if ( mbAllowPaddingWithoutBorders
+ || ((mbHorEnabled || mbVerEnabled || (nSWMode & 
SwBorderModes::TABLE)) &&
+ (m_pLeftMF->IsModified()||m_pRightMF->IsModified()||
+ 
m_pTopMF->IsModified()||m_pBottomMF->IsModified()) )
+ || m_pFrameSel->GetFrameBorderState( 
svx::FrameBorderType::Top ) != svx::FrameBorderState::Hide
  || m_pFrameSel->GetFrameBorderState( 
svx::FrameBorderType::Bottom ) != svx::FrameBorderState::Hide
  || m_pFrameSel->GetFrameBorderState( 
svx::FrameBorderType::Left ) != svx::FrameBorderState::Hide
  || m_pFrameSel->GetFrameBorderState( 
svx::FrameBorderType::Right ) != svx::FrameBorderState::Hide )
@@ -1156,7 +1163,7 @@ IMPL_LINK_NOARG(SvxBorderTabPage, LinesChanged_Impl, 
LinkParamNone*, void)
 m_pRightMF->SetFirst(0);
 m_pTopMF->SetFirst(0);
 m_pBottomMF->SetFirst(0);
-if(!bSpaceModified)
+if(!bSpaceModified && !mbAllowPaddingWithoutBorders)
 {
 m_pLeftMF->SetValue(0);
 m_pRightMF->SetValue(0);
@@ -1168,7 +1175,7 @@ IMPL_LINK_NOARG(SvxBorderTabPage, LinesChanged_Impl, 
LinkParamNone*, void)
 SvxBoxInfoItemValidFlags nValid = 
SvxBoxInfoItemValidFlags::TOP|SvxBoxInfoItemValidFlags::BOTTOM|SvxBoxInfoItemValidFlags::LEFT|SvxBoxInfoItemValidFlags::RIGHT;
 
 // for other objects (paragraph, page, frame, character) the edit is 
disabled, if there's no border set
-if(!(nSWMode & SwBorderModes::TABLE))
+if(!(nSWMode & SwBorderModes::TABLE) && !mbAllowPaddingWithoutBorders)
 {
 if(bLineSet)
 {
diff --git a/include/svx/svxids.hrc b/include/svx/svxids.hrc
index b3fa887..f2a301c 100644
--- a/include/svx/svxids.hrc
+++ b/include/svx/svxids.hrc
@@ -964,7 +964,7 @@
 #define FN_SVX_SET

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

2016-10-12 Thread Noel Grandin
 cui/source/tabpages/page.cxx   |   26 -
 include/svx/pagectrl.hxx   |7 ++--
 include/svx/pageitem.hxx   |   19 ++--
 sc/source/filter/starcalc/scflt.cxx|2 -
 sc/source/ui/docshell/docsh4.cxx   |   10 +++---
 sc/source/ui/inc/printfun.hxx  |2 -
 sc/source/ui/inc/tphf.hxx  |2 -
 sc/source/ui/pagedlg/hfedtdlg.cxx  |3 --
 sc/source/ui/pagedlg/tphf.cxx  |4 +-
 sc/source/ui/view/printfun.cxx |8 ++---
 sd/source/ui/func/fupage.cxx   |2 -
 svx/source/dialog/hdft.cxx |8 ++---
 svx/source/dialog/pagectrl.cxx |   12 
 svx/source/items/pageitem.cxx  |   37 -
 sw/source/uibase/frmdlg/colex.cxx  |4 +-
 sw/source/uibase/sidebar/PageFormatPanel.cxx   |6 ++--
 sw/source/uibase/sidebar/PageMarginControl.cxx |4 +-
 sw/source/uibase/sidebar/PageStylesPanel.cxx   |   22 +++---
 sw/source/uibase/utlui/uitool.cxx  |   32 ++---
 19 files changed, 105 insertions(+), 105 deletions(-)

New commits:
commit 8fce16fb573506c24aa06e86b476fa6f42ea60b9
Author: Noel Grandin 
Date:   Wed Oct 12 15:55:27 2016 +0200

convert SvxPageUsage to scoped enum

and expand out the bit-tricks some of the code was playing to make it
more obvious what is going on

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

diff --git a/cui/source/tabpages/page.cxx b/cui/source/tabpages/page.cxx
index a6097ea..b15879f 100644
--- a/cui/source/tabpages/page.cxx
+++ b/cui/source/tabpages/page.cxx
@@ -79,28 +79,28 @@ const sal_uInt16 SvxPageDescPage::pRanges[] =
 };
 // --- Mapping page layout --
 
-const sal_uInt16 aArr[] =
+const SvxPageUsage aArr[] =
 {
-SVX_PAGE_ALL,
-SVX_PAGE_MIRROR,
-SVX_PAGE_RIGHT,
-SVX_PAGE_LEFT
+SvxPageUsage::All,
+SvxPageUsage::Mirror,
+SvxPageUsage::Right,
+SvxPageUsage::Left
 };
 
 
-sal_uInt16 PageUsageToPos_Impl( sal_uInt16 nUsage )
+sal_uInt16 PageUsageToPos_Impl( SvxPageUsage nUsage )
 {
 for ( sal_uInt16 i = 0; i < SAL_N_ELEMENTS(aArr); ++i )
-if ( aArr[i] == ( nUsage & 0x000f ) )
+if ( aArr[i] ==  nUsage )
 return i;
-return SVX_PAGE_ALL;
+return 3;
 }
 
 
-sal_uInt16 PosToPageUsage_Impl( sal_uInt16 nPos )
+SvxPageUsage PosToPageUsage_Impl( sal_uInt16 nPos )
 {
 if ( nPos >= SAL_N_ELEMENTS(aArr) )
-return 0;
+return SvxPageUsage::NONE;
 return aArr[nPos];
 }
 
@@ -468,7 +468,7 @@ void SvxPageDescPage::Reset( const SfxItemSet* rSet )
 // general page data
 SvxNumType eNumType = css::style::NumberingType::ARABIC;
 bLandscape = ( mpDefPrinter->GetOrientation() == Orientation::Landscape );
-sal_uInt16 nUse = (sal_uInt16)SVX_PAGE_ALL;
+SvxPageUsage nUse = SvxPageUsage::All;
 pItem = GetItem( *rSet, SID_ATTR_PAGE );
 
 if ( pItem )
@@ -894,9 +894,9 @@ bool SvxPageDescPage::FillItemSet( SfxItemSet* rSet )
 IMPL_LINK_NOARG(SvxPageDescPage, LayoutHdl_Impl, ListBox&, void)
 {
 // switch inside outside
-const sal_uInt16 nPos = PosToPageUsage_Impl( 
m_pLayoutBox->GetSelectEntryPos() );
+const SvxPageUsage nUsage = PosToPageUsage_Impl( 
m_pLayoutBox->GetSelectEntryPos() );
 
-if ( nPos == SVX_PAGE_MIRROR )
+if ( nUsage == SvxPageUsage::Mirror )
 {
 m_pLeftMarginLbl->Hide();
 m_pRightMarginLbl->Hide();
diff --git a/include/svx/pagectrl.hxx b/include/svx/pagectrl.hxx
index 82225f4..50095f6 100644
--- a/include/svx/pagectrl.hxx
+++ b/include/svx/pagectrl.hxx
@@ -24,6 +24,7 @@
 #include 
 
 class SvxBoxItem;
+enum class SvxPageUsage;
 
 class SVX_DLLPUBLIC SvxPageWindow : public vcl::Window
 {
@@ -66,7 +67,7 @@ private:
 bool bHorz : 1;
 bool bVert : 1;
 
-sal_uInt16 eUsage;
+SvxPageUsage eUsage;
 
 protected:
 virtual void Paint(vcl::RenderContext& rRenderContext, const Rectangle& 
rRect) override;
@@ -143,8 +144,8 @@ public:
 long GetFtDist() const { return nFtDist; }
 long GetFtHeight() const { return nFtHeight; }
 
-void SetUsage(sal_uInt16 eU) { eUsage = eU; }
-sal_uInt16 GetUsage() const { return eUsage; }
+void SetUsage(SvxPageUsage eU) { eUsage = eU; }
+SvxPageUsage GetUsage() const { return eUsage; }
 
 void SetHeader( bool bNew ) { bHeader = bNew; }
 void SetFooter( bool bNew ) { bFooter = bNew; }
diff --git a/include/svx/pageitem.hxx b/include/svx/pageitem.hxx
index 227cc39..5849473 100644
--- a/include/svx/pageitem.hxx
+++ b/include/svx/pageitem.hxx
@@ -28,12 +28,13 @@ using SvxNumType = sal_Int16; // css::style::NumberingType 
constants
   usage of the page
  -

[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&   rPreviewStr,
Color*& rpFontColor );
@@

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

2016-06-01 Thread Rishabh Kumar
 cui/source/dialogs/colorpicker.cxx|  123 
 include/svx/hexcolorcontrol.hxx   |   50 +
 svx/Library_svxcore.mk|1 
 svx/source/dialog/hexcolorcontrol.cxx |  129 ++
 4 files changed, 181 insertions(+), 122 deletions(-)

New commits:
commit 00fbca564251368da34caaceb719164e34764e10
Author: Rishabh Kumar 
Date:   Wed Jun 1 01:31:53 2016 +0530

Make class HexColorControl global

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

diff --git a/cui/source/dialogs/colorpicker.cxx 
b/cui/source/dialogs/colorpicker.cxx
index 7ba386e..1cc7782 100644
--- a/cui/source/dialogs/colorpicker.cxx
+++ b/cui/source/dialogs/colorpicker.cxx
@@ -40,6 +40,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include "dialmgr.hxx"
@@ -131,128 +132,6 @@ static void RGBtoCMYK( double dR, double dG, double dB, 
double& fCyan, double& f
 }
 }
 
-class HexColorControl : public Edit
-{
-public:
-HexColorControl( vcl::Window* pParent, WinBits nStyle );
-
-virtual bool PreNotify( NotifyEvent& rNEvt ) override;
-virtual void Paste() override;
-
-void SetColor( sal_Int32 nColor );
-sal_Int32 GetColor();
-
-private:
-static bool ImplProcessKeyInput( const KeyEvent& rKEv );
-};
-
-HexColorControl::HexColorControl( vcl::Window* pParent, WinBits nStyle )
-: Edit(pParent, nStyle)
-{
-SetMaxTextLen( 6 );
-}
-
-VCL_BUILDER_FACTORY_ARGS(HexColorControl, WB_BORDER)
-
-void HexColorControl::SetColor(sal_Int32 nColor)
-{
-OUStringBuffer aBuffer;
-sax::Converter::convertColor(aBuffer, nColor);
-SetText(aBuffer.makeStringAndClear().copy(1));
-}
-
-sal_Int32 HexColorControl::GetColor()
-{
-sal_Int32 nColor = -1;
-
-OUString aStr("#");
-aStr += GetText();
-sal_Int32 nLen = aStr.getLength();
-
-if (nLen < 7)
-{
-static const sal_Char* pNullStr = "00";
-aStr += OUString::createFromAscii( &pNullStr[nLen-1] );
-}
-
-sax::Converter::convertColor(nColor, aStr);
-
-if (nColor == -1)
-SetControlBackground(Color(COL_RED));
-else
-SetControlBackground();
-
-return nColor;
-}
-
-bool HexColorControl::PreNotify( NotifyEvent& rNEvt )
-{
-if ( (rNEvt.GetType() == MouseNotifyEvent::KEYINPUT) && 
!rNEvt.GetKeyEvent()->GetKeyCode().IsMod2() )
-{
-if ( ImplProcessKeyInput( *rNEvt.GetKeyEvent() ) )
-return true;
-}
-
-return Edit::PreNotify( rNEvt );
-}
-
-void HexColorControl::Paste()
-{
-css::uno::Reference 
aClipboard(GetClipboard());
-if (aClipboard.is())
-{
-css::uno::Reference xDataObj;
-
-try
-{
-SolarMutexReleaser aReleaser;
-xDataObj = aClipboard->getContents();
-}
-catch (const css::uno::Exception&)
-{
-}
-
-if (xDataObj.is())
-{
-css::datatransfer::DataFlavor aFlavor;
-SotExchange::GetFormatDataFlavor(SotClipboardFormatId::STRING, 
aFlavor);
-try
-{
-css::uno::Any aData = xDataObj->getTransferData(aFlavor);
-OUString aText;
-aData >>= aText;
-
-if( !aText.isEmpty() && aText.startsWith( "#" ) )
-aText = aText.copy(1);
-
-if( aText.getLength() > 6 )
-aText = aText.copy( 0, 6 );
-
-SetText(aText);
-}
-catch(const css::uno::Exception&)
-{}
-}
-}
-}
-
-bool HexColorControl::ImplProcessKeyInput( const KeyEvent& rKEv )
-{
-const vcl::KeyCode& rKeyCode = rKEv.GetKeyCode();
-
-if( rKeyCode.GetGroup() == KEYGROUP_ALPHA && !rKeyCode.IsMod1() && 
!rKeyCode.IsMod2() )
-{
-if( (rKeyCode.GetCode() < KEY_A) || (rKeyCode.GetCode() > KEY_F) )
-return true;
-}
-else if( rKeyCode.GetGroup() == KEYGROUP_NUM )
-{
-if( rKeyCode.IsShift() )
-return true;
-}
-return false;
-}
-
 class ColorPreviewControl : public Control
 {
 public:
diff --git a/include/svx/hexcolorcontrol.hxx b/include/svx/hexcolorcontrol.hxx
new file mode 100644
index 000..a9f9661
--- /dev/null
+++ b/include/svx/hexcolorcontrol.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

[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 = &pPool->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();
 sal_Int32 nVal1 = stati

[Libreoffice-commits] core.git: cui/source include/svx include/vcl sc/source starmath/source svtools/source svx/source vcl/generic vcl/inc vcl/qa vcl/quartz vcl/source vcl/unx vcl/win

2016-01-10 Thread Chris Sherlock
 cui/source/dialogs/cuicharmap.cxx   |   12 +++---
 include/svx/charmap.hxx |2 -
 include/vcl/outdev.hxx  |2 -
 sc/source/filter/excel/xistyle.cxx  |   50 ++--
 starmath/source/dialog.cxx  |8 ++--
 svtools/source/misc/sampletext.cxx  |   10 ++---
 svx/source/dialog/charmap.cxx   |   48 +--
 vcl/generic/fontmanager/fontmanager.cxx |8 ++--
 vcl/generic/print/genpspgraphics.cxx|4 +-
 vcl/inc/quartz/salgdi.h |2 -
 vcl/inc/unx/gcach_ftyp.hxx  |4 +-
 vcl/inc/win/salgdi.h|6 +--
 vcl/qa/cppunit/fontcharmap.cxx  |   12 +++---
 vcl/quartz/salgdi.cxx   |   42 
 vcl/source/filter/wmf/wmfwr.cxx |8 ++--
 vcl/source/outdev/font.cxx  |   22 ++--
 vcl/unx/generic/gdi/cairotextrender.cxx |4 +-
 vcl/unx/generic/gdi/gcach_ftyp.cxx  |   26 +++---
 vcl/win/gdi/salfont.cxx |   56 
 19 files changed, 163 insertions(+), 163 deletions(-)

New commits:
commit 536d0e27f05d9db7469bd8a3571c87b2ea885367
Author: Chris Sherlock 
Date:   Sun Jan 10 21:37:22 2016 +1100

Cleanup FontCharMapPtr variable prefixes

Change-Id: Ib106b91ab71ee45d5ad469d0beaf4ebaef8b57e1
Reviewed-on: https://gerrit.libreoffice.org/21306
Tested-by: Jenkins 
Reviewed-by: Chris Sherlock 

diff --git a/cui/source/dialogs/cuicharmap.cxx 
b/cui/source/dialogs/cuicharmap.cxx
index ee26bca..b17931c 100644
--- a/cui/source/dialogs/cuicharmap.cxx
+++ b/cui/source/dialogs/cuicharmap.cxx
@@ -455,9 +455,9 @@ IMPL_LINK_NOARG_TYPED(SvxCharacterMap, FontSelectHdl, 
ListBox&, void)
 bool bNeedSubset = (aFont.GetCharSet() != RTL_TEXTENCODING_SYMBOL);
 if( bNeedSubset )
 {
-FontCharMapPtr pFontCharMap( new FontCharMap() );
-m_pShowSet->GetFontCharMap( pFontCharMap );
-pSubsetMap = new SubsetMap( pFontCharMap );
+FontCharMapPtr xFontCharMap( new FontCharMap() );
+m_pShowSet->GetFontCharMap( xFontCharMap );
+pSubsetMap = new SubsetMap( xFontCharMap );
 
 // update subset listbox for new font's unicode subsets
 // TODO: is it worth to improve the stupid linear search?
@@ -600,9 +600,9 @@ void SvxCharacterMap::selectCharByCode(Radix radix)
 // Convert the code back to a character using the appropriate radix
 sal_UCS4 cChar = aCodeString.toUInt32(static_cast (radix));
 // Use FontCharMap::HasChar(sal_UCS4 cChar) to see if the desired 
character is in the font
-FontCharMapPtr pFontCharMap(new FontCharMap());
-m_pShowSet->GetFontCharMap(pFontCharMap);
-if (pFontCharMap->HasChar(cChar))
+FontCharMapPtr xFontCharMap(new FontCharMap());
+m_pShowSet->GetFontCharMap(xFontCharMap);
+if (xFontCharMap->HasChar(cChar))
 // Select the corresponding character
 SetChar(cChar);
 }
diff --git a/include/svx/charmap.hxx b/include/svx/charmap.hxx
index 963e962..1574d18 100644
--- a/include/svx/charmap.hxx
+++ b/include/svx/charmap.hxx
@@ -105,7 +105,7 @@ private:
 
 sal_Int32   nSelectedIndex;
 
-FontCharMapPtr  mpFontCharMap;
+FontCharMapPtr  mxFontCharMap;
 SizemaFontSize;
 VclPtr  aVscrollSB;
 
diff --git a/include/vcl/outdev.hxx b/include/vcl/outdev.hxx
index c8e397b..ea706eb 100644
--- a/include/vcl/outdev.hxx
+++ b/include/vcl/outdev.hxx
@@ -1260,7 +1260,7 @@ public:
 FontMetric  GetFontMetric() const;
 FontMetric  GetFontMetric( const vcl::Font& rFont ) const;
 
-boolGetFontCharMap( FontCharMapPtr& rFontCharMap ) 
const;
+boolGetFontCharMap( FontCharMapPtr& rxFontCharMap 
) const;
 boolGetFontCapabilities( vcl::FontCapabilities& 
rFontCapabilities ) const;
 
 /** Retrieve detailed font information in platform independent structure
diff --git a/sc/source/filter/excel/xistyle.cxx 
b/sc/source/filter/excel/xistyle.cxx
index 05c1516..b663c78 100644
--- a/sc/source/filter/excel/xistyle.cxx
+++ b/sc/source/filter/excel/xistyle.cxx
@@ -462,41 +462,41 @@ void XclImpFont::GuessScriptType()
 if( OutputDevice* pPrinter = GetPrinter() )
 {
 vcl::Font aFont( maData.maName, Size( 0, 10 ) );
-FontCharMapPtr pCharMap;
+FontCharMapPtr xFontCharMap;
 
 pPrinter->SetFont( aFont );
-if( pPrinter->GetFontCharMap( pCharMap ) )
+if( pPrinter->GetFontCharMap( xFontCharMap ) )
 {
 // CJK fonts
 mbHasAsian =
-pCharMap->HasChar( 0x3041 ) ||   // 3040-309F: Hiragana
-pCharMap->HasChar( 0x30A1 ) ||   // 30A0-30FF: Katakana
-pCharMap->HasChar( 0x3111 ) ||   // 3100-312F: Bopomofo
-pCharMap->HasChar( 0x3131 ) ||   // 3130-318F: Hangul 
Co

[Libreoffice-commits] core.git: cui/source include/svx officecfg/registry sc/source sd/source sfx2/util slideshow/source sw/source vbahelper/inc

2015-12-17 Thread Thorsten Behrens
 cui/source/dialogs/insdlg.cxx   |1 
 cui/source/dialogs/plfilter.cxx |  117 
 cui/source/dialogs/plfilter.hxx |   34 ---
 include/svx/pfiledlg.hxx|   51 -
 officecfg/registry/data/org/openoffice/Office/Embedding.xcu |   14 -
 sc/source/ui/drawfunc/fuins2.cxx|1 
 sc/source/ui/view/tabvwshb.cxx  |2 
 sd/source/ui/func/fuinsert.cxx  |2 
 sd/source/ui/view/drviews7.cxx  |1 
 sfx2/util/sfx.component |4 
 slideshow/source/engine/shapes/shapeimporter.cxx|   18 -
 sw/source/uibase/shells/textsh.cxx  |1 
 vbahelper/inc/pch/precompiled_msforms.hxx   |1 
 13 files changed, 2 insertions(+), 245 deletions(-)

New commits:
commit 42645fe67cac22e9a96bc4b34c4f85c09185d9d2
Author: Thorsten Behrens 
Date:   Fri Dec 18 02:30:18 2015 +0100

related tdf#96398 pull out more NPAPI-related code

Fixup windows PCH plus pulling out more code now unused due to NPAPI
removal. Follow-up to 4c18af27bf95b332ee2006cfc0bbf469fb1a84d4.

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

diff --git a/cui/source/dialogs/insdlg.cxx b/cui/source/dialogs/insdlg.cxx
index c85e392..3d8466d 100644
--- a/cui/source/dialogs/insdlg.cxx
+++ b/cui/source/dialogs/insdlg.cxx
@@ -33,7 +33,6 @@
 #include 
 
 #include "insdlg.hxx"
-#include 
 #include 
 #include 
 
diff --git a/cui/source/dialogs/plfilter.cxx b/cui/source/dialogs/plfilter.cxx
deleted file mode 100644
index cdb606f..000
--- a/cui/source/dialogs/plfilter.cxx
+++ /dev/null
@@ -1,117 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- *   Licensed to the Apache Software Foundation (ASF) under one or more
- *   contributor license agreements. See the NOTICE file distributed
- *   with this work for additional information regarding copyright
- *   ownership. The ASF licenses this file to you under the Apache
- *   License, Version 2.0 (the "License"); you may not use this file
- *   except in compliance with the License. You may obtain a copy of
- *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-
-#include 
-#include 
-#include 
-
-#include 
-
-#include 
-#include 
-#include 
-#include 
-
-#include 
-
-using namespace std;
-using namespace com::sun::star::uno;
-using namespace com::sun::star::lang;
-using namespace com::sun::star::plugin;
-
-struct ltstr
-{
-bool operator()( const OUString& s1, const OUString& s2 ) const
-{
-return s1.compareTo( s2 ) < 0;
-}
-};
-
-typedef set< OUString, ltstr > StrSet;
-typedef map< OUString, StrSet, ltstr > FilterMap;
-
-
-
-void fillNetscapePluginFilters( Sequence< OUString >& rPluginNames, Sequence< 
OUString >& rPluginTypes )
-{
-Reference< XComponentContext > xContext = 
comphelper::getProcessComponentContext();
-Reference< XPluginManager > xPMgr( PluginManager::create(xContext) );
-
-FilterMap aMap;
-
-// sum up the mimetypes: one description, multiple extensions
-
-Sequence aDescriptions( xPMgr->getPluginDescriptions() 
);
-const PluginDescription * pDescriptions = aDescriptions.getConstArray();
-for ( sal_uInt32 nPos = aDescriptions.getLength(); nPos--; )
-{
-const PluginDescription & rDescr = pDescriptions[nPos];
-
-// consistency check for the do {} while loop below
-if (rDescr.Extension.isEmpty())
-continue;
-
-StrSet& rTypes = aMap[ rDescr.Description ];
-OUString aExtension( rDescr.Extension );
-
-sal_Int32 nIndex = 0;
-do
-{
-// no default plugins anymore
-const OUString aExt( aExtension.getToken( 0, ';', nIndex ) );
-if ( aExt != "*.*" )
-rTypes.insert( aExt );
-}
-while ( nIndex >= 0 );
-}
-
-rPluginNames = Sequence< OUString >( aMap.size() );
-rPluginTypes = Sequence< OUString >( aMap.size() );
-OUString* pPluginNames = rPluginNames.getArray();
-OUString* pPluginTypes = rPluginTypes.getArray();
-int nIndex = 0;
-for ( FilterMap::iterator iPos = aMap.begin(); iPos != aMap.end(); ++iPos )
-{
-OUString aText( (*iPos).first );
-OUString aType;
-StrSet& rTypes = (*iPos).second;
-StrSet::

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

2015-10-15 Thread Noel Grandin
 cui/source/inc/grfpage.hxx |2 -
 cui/source/inc/numpages.hxx|8 ++--
 cui/source/options/optgdlg.cxx |   13 +++---
 cui/source/options/optgdlg.hxx |2 -
 cui/source/tabpages/grfpage.cxx|   31 +++-
 cui/source/tabpages/numpages.cxx   |   70 -
 include/svx/dialcontrol.hxx|1 
 include/vcl/slider.hxx |1 
 include/vcl/spinfld.hxx|   18 -
 svx/source/dialog/dialcontrol.cxx  |   17 ++--
 sw/source/ui/dbui/mmlayoutpage.cxx |9 ++--
 sw/source/ui/dbui/mmlayoutpage.hxx |2 -
 sw/source/ui/envelp/envfmt.cxx |9 ++--
 sw/source/ui/envelp/envfmt.hxx |2 -
 sw/source/ui/frmdlg/column.cxx |2 -
 sw/source/ui/frmdlg/wrap.cxx   |   24 ++--
 sw/source/ui/misc/num.cxx  |   40 +
 sw/source/ui/misc/pggrid.cxx   |   28 ++
 sw/source/ui/misc/titlepage.cxx|6 +--
 sw/source/ui/table/tabledlg.cxx|   26 +
 sw/source/uibase/inc/navipi.hxx|3 +
 sw/source/uibase/inc/num.hxx   |8 ++--
 sw/source/uibase/inc/pggrid.hxx|4 +-
 sw/source/uibase/inc/prcntfld.hxx  |4 +-
 sw/source/uibase/inc/titlepage.hxx |4 +-
 sw/source/uibase/inc/wrap.hxx  |2 -
 sw/source/uibase/table/tablepg.hxx |6 +--
 sw/source/uibase/utlui/navipi.cxx  |3 -
 vcl/source/control/slider.cxx  |   13 --
 vcl/source/control/spinfld.cxx |8 ++--
 30 files changed, 179 insertions(+), 187 deletions(-)

New commits:
commit 74dbe58f1e5b6f4f281e13f348c8952b1086877a
Author: Noel Grandin 
Date:   Tue Oct 13 15:51:37 2015 +0200

convert Link<> to typed

Change-Id: I2ef1e5fe5c6dc65c254b3a16b0b12fca5caba16e

diff --git a/cui/source/inc/grfpage.hxx b/cui/source/inc/grfpage.hxx
index 89f13f0..49ad01f 100644
--- a/cui/source/inc/grfpage.hxx
+++ b/cui/source/inc/grfpage.hxx
@@ -97,7 +97,7 @@ class SvxGrfCropPage : public SfxTabPage
 
 DECL_LINK( ZoomHdl, MetricField * );
 DECL_LINK( SizeHdl, MetricField * );
-DECL_LINK( CropHdl, const MetricField * );
+DECL_LINK_TYPED( CropHdl, SpinField&, void );
 DECL_LINK_TYPED( CropLoseFocusHdl, Control&, void );
 DECL_LINK( CropModifyHdl, MetricField * );
 DECL_LINK_TYPED(OrigSizeHdl, Button*, void);
diff --git a/cui/source/inc/numpages.hxx b/cui/source/inc/numpages.hxx
index d4199a3..8ffba71 100644
--- a/cui/source/inc/numpages.hxx
+++ b/cui/source/inc/numpages.hxx
@@ -429,7 +429,7 @@ class SvxNumPositionTabPage : public SfxTabPage
 
 DECL_LINK_TYPED( LevelHdl_Impl, ListBox&, void );
 DECL_LINK_TYPED( EditModifyHdl_Impl, ListBox&, void);
-DECL_LINK( DistanceHdl_Impl, MetricField * );
+DECL_LINK_TYPED( DistanceHdl_Impl, SpinField&, void );
 DECL_LINK_TYPED( DistanceFocusHdl_Impl, Control&, void );
 DECL_LINK_TYPED( RelativeHdl_Impl, Button*, void );
 DECL_LINK_TYPED( StandardHdl_Impl, Button*, void);
@@ -438,9 +438,9 @@ class SvxNumPositionTabPage : public SfxTabPage
 void ShowControlsDependingOnPosAndSpaceMode();
 
 DECL_LINK_TYPED(LabelFollowedByHdl_Impl, ListBox&, void);
-DECL_LINK( ListtabPosHdl_Impl, MetricField* );
-DECL_LINK( AlignAtHdl_Impl, MetricField* );
-DECL_LINK( IndentAtHdl_Impl, MetricField* );
+DECL_LINK_TYPED( ListtabPosHdl_Impl, SpinField&, void );
+DECL_LINK_TYPED( AlignAtHdl_Impl, SpinField&, void );
+DECL_LINK_TYPED( IndentAtHdl_Impl, SpinField&, void );
 
 public:
 SvxNumPositionTabPage(vcl::Window* pParent,
diff --git a/cui/source/options/optgdlg.cxx b/cui/source/options/optgdlg.cxx
index 0764524..4c216c9 100644
--- a/cui/source/options/optgdlg.cxx
+++ b/cui/source/options/optgdlg.cxx
@@ -287,12 +287,12 @@ OfaMiscTabPage::OfaMiscTabPage(vcl::Window* pParent, 
const SfxItemSet& rSet)
 
 m_aStrDateInfo = m_pToYearFT->GetText();
 m_pYearValueField->SetModifyHdl( LINK( this, OfaMiscTabPage, TwoFigureHdl 
) );
-Link<> aLink = LINK( this, OfaMiscTabPage, TwoFigureConfigHdl );
+Link aLink = LINK( this, OfaMiscTabPage, 
TwoFigureConfigHdl );
 m_pYearValueField->SetDownHdl( aLink );
 m_pYearValueField->SetUpHdl( aLink );
 m_pYearValueField->SetLoseFocusHdl( LINK( this, OfaMiscTabPage, 
TwoFigureConfigFocusHdl ) );
 m_pYearValueField->SetFirstHdl( aLink );
-TwoFigureConfigHdl(m_pYearValueField);
+TwoFigureConfigHdl(*m_pYearValueField);
 
 SetExchangeSupport();
 }
@@ -400,7 +400,7 @@ void OfaMiscTabPage::Reset( const SfxItemSet* rSet )
 if ( SfxItemState::SET == rSet->GetItemState( SID_ATTR_YEAR2000, false, 
&pItem ) )
 {
 m_pYearValueField->SetValue( static_cast(pItem)->GetValue() );
-TwoFigureConfigHdl(m_pYearValueField);
+TwoFigureConfigHdl(*m_pYearValueField);
 }
 else
 {
@@ -435,16 +435,15 @@ IMPL_LINK( OfaMiscTabPage, TwoFigureHdl, NumericField*, 
pEd )
 
 IMPL_LINK_TYPED( OfaMiscTabPage, TwoFigureConfigFocusHdl, Control&, rControl, 
void 

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

2015-09-25 Thread Noel Grandin
 cui/source/factory/dlgfact.cxx  |8 
 cui/source/factory/dlgfact.hxx  |   10 +-
 include/svx/svxdlg.hxx  |4 ++--
 sc/source/ui/inc/redcom.hxx |4 ++--
 sc/source/ui/miscdlgs/redcom.cxx|   16 ++--
 sw/source/uibase/inc/textsh.hxx |4 ++--
 sw/source/uibase/shells/textfld.cxx |   30 --
 7 files changed, 33 insertions(+), 43 deletions(-)

New commits:
commit 1296732028df43160d070d27be6fd961e284fdd6
Author: Noel Grandin 
Date:   Fri Sep 25 09:52:59 2015 +0200

convert Link<> to typed

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

diff --git a/cui/source/factory/dlgfact.cxx b/cui/source/factory/dlgfact.cxx
index 6810b42..0961103 100644
--- a/cui/source/factory/dlgfact.cxx
+++ b/cui/source/factory/dlgfact.cxx
@@ -779,7 +779,7 @@ void AbstractSvxPostItDialog_Impl::HideAuthor()
 {
 pDlg->HideAuthor();
 }
-void AbstractSvxPostItDialog_Impl::SetNextHdl( const Link<>& rLink )
+void AbstractSvxPostItDialog_Impl::SetNextHdl( const 
Link& rLink )
 {
 aNextHdl = rLink;
 if( rLink.IsSet() )
@@ -787,7 +787,7 @@ void AbstractSvxPostItDialog_Impl::SetNextHdl( const 
Link<>& rLink )
 else
 pDlg->SetNextHdl( Link() );
 }
-void AbstractSvxPostItDialog_Impl::SetPrevHdl( const Link<>& rLink )
+void AbstractSvxPostItDialog_Impl::SetPrevHdl( const 
Link& rLink )
 {
 aPrevHdl = rLink;
 if( rLink.IsSet() )
@@ -798,12 +798,12 @@ void AbstractSvxPostItDialog_Impl::SetPrevHdl( const 
Link<>& rLink )
 IMPL_LINK_NOARG_TYPED(AbstractSvxPostItDialog_Impl, NextHdl, SvxPostItDialog&, 
void)
 {
 if( aNextHdl.IsSet() )
-aNextHdl.Call(this);
+aNextHdl.Call(*this);
 }
 IMPL_LINK_NOARG_TYPED(AbstractSvxPostItDialog_Impl, PrevHdl, SvxPostItDialog&, 
void)
 {
 if( aPrevHdl.IsSet() )
-aPrevHdl.Call(this);
+aPrevHdl.Call(*this);
 }
 vcl::Window * AbstractSvxPostItDialog_Impl::GetWindow()
 {
diff --git a/cui/source/factory/dlgfact.hxx b/cui/source/factory/dlgfact.hxx
index af543dc..e4e9621 100644
--- a/cui/source/factory/dlgfact.hxx
+++ b/cui/source/factory/dlgfact.hxx
@@ -448,18 +448,18 @@ class AbstractSvxPostItDialog_Impl :public 
AbstractSvxPostItDialog
 DECL_ABSTDLG_BASE( AbstractSvxPostItDialog_Impl, SvxPostItDialog )
 virtual voidSetText( const OUString& rStr ) SAL_OVERRIDE;  
//From class Window
 virtual const SfxItemSet*   GetOutputItemSet() const SAL_OVERRIDE;
-virtual voidSetPrevHdl( const Link<>& rLink ) SAL_OVERRIDE 
;
-virtual voidSetNextHdl( const Link<>& rLink ) SAL_OVERRIDE 
;
+virtual voidSetPrevHdl( const 
Link& rLink ) SAL_OVERRIDE ;
+virtual voidSetNextHdl( const 
Link& rLink ) SAL_OVERRIDE ;
 virtual voidEnableTravel(bool bNext, bool bPrev) 
SAL_OVERRIDE ;
 virtual OUStringGetNote() SAL_OVERRIDE ;
 virtual voidSetNote(const OUString& rTxt) SAL_OVERRIDE ;
 virtual voidShowLastAuthor(const OUString& rAuthor, const 
OUString& rDate) SAL_OVERRIDE ;
 virtual voidDontChangeAuthor() SAL_OVERRIDE ;
 virtual voidHideAuthor() SAL_OVERRIDE ;
-virtual vcl::Window *GetWindow() SAL_OVERRIDE;
+virtual vcl::Window *   GetWindow() SAL_OVERRIDE;
 private:
-Link<> aNextHdl;
-Link<> aPrevHdl;
+Link aNextHdl;
+Link aPrevHdl;
 DECL_LINK_TYPED(NextHdl, SvxPostItDialog&, void);
 DECL_LINK_TYPED(PrevHdl, SvxPostItDialog&, void);
 };
diff --git a/include/svx/svxdlg.hxx b/include/svx/svxdlg.hxx
index d97090b..1ec6814 100644
--- a/include/svx/svxdlg.hxx
+++ b/include/svx/svxdlg.hxx
@@ -234,8 +234,8 @@ class AbstractSvxPostItDialog :public VclAbstractDialog
 public:
 virtual voidSetText( const OUString& rStr ) = 0;  //From 
class Window
 virtual const SfxItemSet*   GetOutputItemSet() const = 0;
-virtual voidSetPrevHdl( const Link<>& rLink ) = 0;
-virtual voidSetNextHdl( const Link<>& rLink ) = 0;
+virtual voidSetPrevHdl( const 
Link& rLink ) = 0;
+virtual voidSetNextHdl( const 
Link& rLink ) = 0;
 virtual voidEnableTravel(bool bNext, bool bPrev) = 0;
 virtual OUStringGetNote()  = 0;
 virtual voidSetNote(const OUString& rTxt)  = 0;
diff --git a/sc/source/ui/inc/redcom.hxx b/sc/source/ui/inc/redcom.hxx
index 86e2588..29b15a8 100644
--- a/sc/source/ui/inc/redcom.hxx
+++ b/sc/source/ui/inc/redcom.hxx
@@ -34,8 +34,8 @@ private:
 OUStringaComment;
 AbstractSvxPostItDialog* pDlg;
 
-DECL_LINK( PrevHdl, AbstractSvxPostItDialog* );
-DECL_LINK( NextHdl, AbstractSvxPostItDialog* );
+DECL_LINK_TYPED( PrevHdl, AbstractS

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

2015-09-25 Thread Noel Grandin
 cui/source/factory/dlgfact.cxx |4 ++--
 cui/source/factory/dlgfact.hxx |4 ++--
 cui/source/options/optcolor.cxx|6 +++---
 cui/source/options/optcolor.hxx|2 +-
 include/svx/svxdlg.hxx |2 +-
 sd/source/ui/docshell/docshel2.cxx |   11 ---
 sd/source/ui/inc/DrawDocShell.hxx  |8 
 sd/source/ui/inc/DrawViewShell.hxx |2 +-
 sd/source/ui/slidesorter/controller/SlsSlotManager.cxx |   11 ---
 sd/source/ui/slidesorter/inc/controller/SlsSlotManager.hxx |2 +-
 sd/source/ui/view/drviewsb.cxx |9 +++--
 11 files changed, 26 insertions(+), 35 deletions(-)

New commits:
commit 51b2ad378a8531a7b02433594cd7f6bbd6a61222
Author: Noel Grandin 
Date:   Thu Sep 24 18:59:52 2015 +0200

convert Link<> to typed

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

diff --git a/cui/source/factory/dlgfact.cxx b/cui/source/factory/dlgfact.cxx
index 88806b3..94356f2 100644
--- a/cui/source/factory/dlgfact.cxx
+++ b/cui/source/factory/dlgfact.cxx
@@ -587,7 +587,7 @@ void AbstractSvxNameDialog_Impl::GetName(OUString& rName)
 pDlg->GetName( rName );
 }
 
-void AbstractSvxNameDialog_Impl::SetCheckNameHdl( const Link<>& rLink, bool 
bCheckImmediately )
+void AbstractSvxNameDialog_Impl::SetCheckNameHdl( const 
Link& rLink, bool bCheckImmediately )
 {
 aCheckNameHdl = rLink;
 if( rLink.IsSet() )
@@ -610,7 +610,7 @@ void AbstractSvxNameDialog_Impl::SetText( const OUString& 
rStr )
 IMPL_LINK_NOARG_TYPED(AbstractSvxNameDialog_Impl, CheckNameHdl, 
SvxNameDialog&, bool)
 {
 if( aCheckNameHdl.IsSet() )
-return aCheckNameHdl.Call(this);
+return aCheckNameHdl.Call(*this);
 return false;
 }
 
diff --git a/cui/source/factory/dlgfact.hxx b/cui/source/factory/dlgfact.hxx
index 5477392..949e252 100644
--- a/cui/source/factory/dlgfact.hxx
+++ b/cui/source/factory/dlgfact.hxx
@@ -325,13 +325,13 @@ class AbstractSvxNameDialog_Impl :public 
AbstractSvxNameDialog
 {
 DECL_ABSTDLG_BASE(AbstractSvxNameDialog_Impl,SvxNameDialog)
 virtual voidGetName( OUString& rName ) SAL_OVERRIDE ;
-virtual voidSetCheckNameHdl( const Link<>& rLink, bool 
bCheckImmediately = false ) SAL_OVERRIDE ;
+virtual voidSetCheckNameHdl( const Link& 
rLink, bool bCheckImmediately = false ) SAL_OVERRIDE ;
 virtual voidSetEditHelpId(const OString&) SAL_OVERRIDE ;
 //from class Window
 virtual voidSetHelpId( const OString& ) SAL_OVERRIDE ;
 virtual voidSetText( const OUString& rStr ) SAL_OVERRIDE ;
 private:
-Link<> aCheckNameHdl;
+Link aCheckNameHdl;
 DECL_LINK_TYPED(CheckNameHdl, SvxNameDialog&, bool);
 };
 
diff --git a/cui/source/options/optcolor.cxx b/cui/source/options/optcolor.cxx
index 76a2ec3..d95fd2a 100644
--- a/cui/source/options/optcolor.cxx
+++ b/cui/source/options/optcolor.cxx
@@ -1227,11 +1227,11 @@ IMPL_LINK_TYPED(SvxColorOptionsTabPage, 
SaveDeleteHdl_Impl, Button*, pButton, vo
 m_pDeleteSchemePB->Enable( m_pColorSchemeLB->GetEntryCount() > 1 );
 }
 
-IMPL_LINK(SvxColorOptionsTabPage, CheckNameHdl_Impl, AbstractSvxNameDialog*, 
pDialog )
+IMPL_LINK_TYPED(SvxColorOptionsTabPage, CheckNameHdl_Impl, 
AbstractSvxNameDialog&, rDialog, bool )
 {
 OUString sName;
-pDialog->GetName(sName);
-return long(!sName.isEmpty() && LISTBOX_ENTRY_NOTFOUND == 
m_pColorSchemeLB->GetEntryPos( sName ));
+rDialog.GetName(sName);
+return !sName.isEmpty() && LISTBOX_ENTRY_NOTFOUND == 
m_pColorSchemeLB->GetEntryPos( sName );
 }
 
 void SvxColorOptionsTabPage::FillUserData()
diff --git a/cui/source/options/optcolor.hxx b/cui/source/options/optcolor.hxx
index ca29041..f182e4b 100644
--- a/cui/source/options/optcolor.hxx
+++ b/cui/source/options/optcolor.hxx
@@ -43,7 +43,7 @@ class SvxColorOptionsTabPage : public SfxTabPage
 
 DECL_LINK(SchemeChangedHdl_Impl, ListBox*);
 DECL_LINK_TYPED(SaveDeleteHdl_Impl, Button*, void);
-DECL_LINK(CheckNameHdl_Impl, AbstractSvxNameDialog*);
+DECL_LINK_TYPED(CheckNameHdl_Impl, AbstractSvxNameDialog&, bool);
 void UpdateColorConfig();
 
 public:
diff --git a/include/svx/svxdlg.hxx b/include/svx/svxdlg.hxx
index 459b61e..d97090b 100644
--- a/include/svx/svxdlg.hxx
+++ b/include/svx/svxdlg.hxx
@@ -158,7 +158,7 @@ class AbstractSvxNameDialog :public VclAbstractDialog
 {
 public:
 virtual voidGetName( OUString& rName ) = 0;
-virtual voidSetCheckNameHdl( const Link<>& rLink, bool 
bCheckImmediately = false ) = 0;
+virtual voidSetCheckNameHdl( const Link& 
rLink, bool bCheckImmediately = false ) = 0;
 virtual voidSetEditHelpId(const OString&) = 0;
 //from class Window

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

2015-09-25 Thread Noel Grandin
 cui/source/factory/dlgfact.cxx   |4 
 cui/source/factory/dlgfact.hxx   |4 
 cui/source/inc/labdlg.hxx|6 -
 cui/source/inc/swpossizetabpage.hxx  |6 -
 cui/source/inc/transfrm.hxx  |5 -
 cui/source/tabpages/labdlg.cxx   |2 
 cui/source/tabpages/swpossizetabpage.cxx |2 
 cui/source/tabpages/transfrm.cxx |2 
 include/svx/svxdlg.hxx   |5 -
 sw/source/uibase/inc/drwbassh.hxx|2 
 sw/source/uibase/shells/drwbassh.cxx |  151 +++
 11 files changed, 96 insertions(+), 93 deletions(-)

New commits:
commit 825b9982a5de3ab94820ce5257bb446ea0a1c20a
Author: Noel Grandin 
Date:   Thu Sep 24 18:24:43 2015 +0200

convert Link<> to typed

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

diff --git a/cui/source/factory/dlgfact.cxx b/cui/source/factory/dlgfact.cxx
index 9f39f38..88806b3 100644
--- a/cui/source/factory/dlgfact.cxx
+++ b/cui/source/factory/dlgfact.cxx
@@ -518,7 +518,7 @@ OUString AbstractSvxTransformTabDialog_Impl::GetText() const
 {
 return pDlg->GetText();
 }
-void AbstractSvxTransformTabDialog_Impl::SetValidateFramePosLink( const 
Link<>& rLink )
+void AbstractSvxTransformTabDialog_Impl::SetValidateFramePosLink( const 
Link& rLink )
 {
 pDlg->SetValidateFramePosLink( rLink );
 }
@@ -557,7 +557,7 @@ OUString AbstractSvxCaptionDialog_Impl::GetText() const
 {
 return pDlg->GetText();
 }
-void AbstractSvxCaptionDialog_Impl::SetValidateFramePosLink( const Link<>& 
rLink )
+void AbstractSvxCaptionDialog_Impl::SetValidateFramePosLink( const 
Link& rLink )
 {
 pDlg->SetValidateFramePosLink( rLink );
 }
diff --git a/cui/source/factory/dlgfact.hxx b/cui/source/factory/dlgfact.hxx
index 4c8b228..5477392 100644
--- a/cui/source/factory/dlgfact.hxx
+++ b/cui/source/factory/dlgfact.hxx
@@ -282,7 +282,7 @@ class AbstractSvxJSearchOptionsDialog_Impl :public 
AbstractSvxJSearchOptionsDial
 class AbstractSvxTransformTabDialog_Impl : public AbstractSvxTransformTabDialog
 {
 DECL_ABSTDLG_BASE(AbstractSvxTransformTabDialog_Impl,SvxTransformTabDialog)
-virtual void SetValidateFramePosLink( const Link<>& rLink ) SAL_OVERRIDE;
+virtual void SetValidateFramePosLink( const 
Link& rLink ) SAL_OVERRIDE;
 virtual voidSetCurPageId( sal_uInt16 nId ) SAL_OVERRIDE;
 virtual voidSetCurPageId( const OString& rName ) 
SAL_OVERRIDE;
 virtual const SfxItemSet*   GetOutputItemSet() const SAL_OVERRIDE;
@@ -295,7 +295,7 @@ class AbstractSvxTransformTabDialog_Impl : public 
AbstractSvxTransformTabDialog
 class AbstractSvxCaptionDialog_Impl : public AbstractSvxCaptionDialog
 {
 DECL_ABSTDLG_BASE(AbstractSvxCaptionDialog_Impl,SvxCaptionTabDialog)
-virtual void SetValidateFramePosLink( const Link<>& rLink ) SAL_OVERRIDE;
+virtual void SetValidateFramePosLink( const 
Link& rLink ) SAL_OVERRIDE;
 virtual voidSetCurPageId( sal_uInt16 nId ) SAL_OVERRIDE;
 virtual voidSetCurPageId( const OString& rName ) 
SAL_OVERRIDE;
 virtual const SfxItemSet*   GetOutputItemSet() const SAL_OVERRIDE;
diff --git a/cui/source/inc/labdlg.hxx b/cui/source/inc/labdlg.hxx
index 14469df..571559a 100644
--- a/cui/source/inc/labdlg.hxx
+++ b/cui/source/inc/labdlg.hxx
@@ -92,7 +92,7 @@ public:
 };
 
 // class SvxCaptionTabDialog -
-
+struct SvxSwFrameValidation;
 class SvxCaptionTabDialog : public SfxTabDialog
 {
 private:
@@ -102,7 +102,7 @@ private:
 sal_uInt16 m_nPositionSizePageId;
 sal_uInt16 m_nCaptionPageId;
 
-Link<>  aValidateLink;
+Link aValidateLink;
 
 virtual voidPageCreated( sal_uInt16 nId, SfxTabPage &rPage ) 
SAL_OVERRIDE;
 
@@ -111,7 +111,7 @@ public:
 sal_uInt16 nAnchorTypes = 0);
 
 /// link for the Writer to validate positions
-void SetValidateFramePosLink( const Link<>& rLink );
+void SetValidateFramePosLink( const Link& 
rLink );
 };
 
 
diff --git a/cui/source/inc/swpossizetabpage.hxx 
b/cui/source/inc/swpossizetabpage.hxx
index 10f6345..6003fc6 100644
--- a/cui/source/inc/swpossizetabpage.hxx
+++ b/cui/source/inc/swpossizetabpage.hxx
@@ -30,6 +30,8 @@
 // SvxSwPosSizeTabPage - position and size page for Writer drawing objects
 struct FrmMap;
 class SdrView;
+struct SvxSwFrameValidation;
+
 class SvxSwPosSizeTabPage : public SfxTabPage
 {
 using TabPage::DeactivatePage;
@@ -68,7 +70,7 @@ class SvxSwPosSizeTabPage : public SfxTabPage
 
 VclPtr m_pExampleWN;
 
-Link<>  m_aValidateLink;
+Link m_aValidateLink;
 
 //'string provider'
 SvxSwFramePosString m_aFramePosString;
@@ -137,7 +139,7 @@ public:
 
 voidEnableAnchorTypes(sal_uInt16 nAnchorEnable);
 
-void SetValidateFramePosLink( const Link<>& r

[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(&aURL) );
+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 sc/inc sc/source sd/source svx/inc svx/source sw/inc sw/source

2015-07-16 Thread Noel Grandin
 cui/source/factory/dlgfact.cxx   |  139 ---
 cui/source/factory/dlgfact.hxx   |   28 --
 include/svx/EnhancedCustomShape2d.hxx|1 
 include/svx/camera3d.hxx |3 
 include/svx/cube3d.hxx   |2 
 include/svx/deflt3d.hxx  |   17 -
 include/svx/e3ditem.hxx  |4 
 include/svx/fmmodel.hxx  |1 
 include/svx/fmview.hxx   |1 
 include/svx/galctrl.hxx  |2 
 include/svx/gallery1.hxx |3 
 include/svx/galleryitem.hxx  |2 
 include/svx/galtheme.hxx |1 
 include/svx/ipolypolygoneditorcontroller.hxx |1 
 include/svx/langbox.hxx  |3 
 include/svx/obj3d.hxx|   57 
 include/svx/pageitem.hxx |1 
 include/svx/scene3d.hxx  |   70 -
 include/svx/sdasaitm.hxx |6 
 include/svx/sdr/contact/objectcontact.hxx|3 
 include/svx/sdr/contact/viewcontact.hxx  |9 
 include/svx/sdr/contact/viewobjectcontact.hxx|3 
 include/svx/sdr/overlay/overlaymanager.hxx   |3 
 include/svx/sdr/overlay/overlaypolypolygon.hxx   |1 
 include/svx/sdr/overlay/overlayprimitive2dsequenceobject.hxx |5 
 include/svx/sdrpaintwindow.hxx   |1 
 include/svx/svdcrtv.hxx  |5 
 include/svx/svddrag.hxx  |4 
 include/svx/svddrgmt.hxx |1 
 include/svx/svddrgv.hxx  |   16 -
 include/svx/svdedtv.hxx  |9 
 include/svx/svdedxv.hxx  |3 
 include/svx/svdetc.hxx   |2 
 include/svx/svdglev.hxx  |   11 
 include/svx/svdglue.hxx  |1 
 include/svx/svdhdl.hxx   |2 
 include/svx/svdhlpln.hxx |5 
 include/svx/svdlayer.hxx |   55 +---
 include/svx/svdmark.hxx  |   18 -
 include/svx/svdmodel.hxx |   66 -
 include/svx/svdmrkv.hxx  |   16 -
 include/svx/svdobj.hxx   |   11 
 include/svx/svdoedge.hxx |2 
 include/svx/svdogrp.hxx  |3 
 include/svx/svdopath.hxx |1 
 include/svx/svdotext.hxx |1 
 include/svx/svdpage.hxx  |   36 --
 include/svx/svdpagv.hxx  |2 
 include/svx/svdpntv.hxx  |   17 -
 include/svx/svdpoev.hxx  |1 
 include/svx/svdsnpv.hxx  |   16 -
 include/svx/svdtrans.hxx |4 
 include/svx/svdundo.hxx  |9 
 include/svx/svdview.hxx  |5 
 include/svx/svdxcgv.hxx  |1 
 include/svx/svxdlg.hxx   |   40 ---
 include/svx/view3d.hxx   |  120 -
 include/svx/viewpt3d.hxx |7 
 include/svx/xit.hxx  |1 
 include/svx/xpoly.hxx|1 
 include/svx/xtable.hxx   |1 
 sc/inc/drwlayer.hxx  |3 
 sc/source/core/data/drwlayer.cxx |   16 -
 sd/source/ui/animations/motionpathtag.cxx|5 
 sd/source/ui/animations/motionpathtag.hxx|1 
 svx/inc/dragmt3d.hxx |2 
 svx/inc/galbrws2.hxx |4 
 svx/inc/galobj.hxx   |1 
 svx/inc/sdr/contact/objectcontactofpageview.hxx  |3 
 svx/inc/sdr/contact/viewcontactofsdrpage.hxx |3 
 svx/inc/sdr/overlay/overlaymanagerbuffered.hxx

[Libreoffice-commits] core.git: cui/source include/svx officecfg/registry sc/sdi sc/source sd/sdi sd/source svx/Library_svx.mk svx/sdi svx/source svx/uiconfig svx/UIConfig_svx.mk

2015-07-08 Thread Rishabh Kumar
 cui/source/tabpages/tpshadow.cxx |5 
 include/svx/svxids.hrc   |6 
 officecfg/registry/data/org/openoffice/Office/UI/Sidebar.xcu |   32 
 sc/sdi/drawsh.sdi|8 
 sc/source/ui/app/typemap.cxx |2 
 sc/source/ui/drawfunc/drawsh.cxx |9 
 sd/sdi/_drvwsh.sdi   |   20 
 sd/source/ui/view/drviews2.cxx   |8 
 sd/source/ui/view/drviewsf.cxx   |4 
 svx/Library_svx.mk   |1 
 svx/UIConfig_svx.mk  |1 
 svx/sdi/svx.sdi  |  108 +++
 svx/sdi/svxitems.sdi |3 
 svx/source/sidebar/PanelFactory.cxx  |5 
 svx/source/sidebar/shadow/ShadowPropertyPanel.cxx|  383 +++
 svx/source/sidebar/shadow/ShadowPropertyPanel.hxx|   97 ++
 svx/source/svdraw/svdattr.cxx|4 
 svx/uiconfig/ui/sidebarshadow.ui |  210 ++
 18 files changed, 903 insertions(+), 3 deletions(-)

New commits:
commit cc43153f466135b959605add37ccd9443852c185
Author: Rishabh Kumar 
Date:   Fri Jun 19 18:55:43 2015 +0530

tdf#87702: Addition of Shadow sidebar tab

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

diff --git a/cui/source/tabpages/tpshadow.cxx b/cui/source/tabpages/tpshadow.cxx
index 67abb5d..dd6db29 100644
--- a/cui/source/tabpages/tpshadow.cxx
+++ b/cui/source/tabpages/tpshadow.cxx
@@ -41,7 +41,10 @@ const sal_uInt16 SvxShadowTabPage::pShadowRanges[] =
 SDRATTR_SHADOWCOLOR,
 SDRATTR_SHADOWTRANSPARENCE,
 SID_ATTR_FILL_SHADOW,
-SID_ATTR_FILL_SHADOW,
+SID_ATTR_SHADOW_COLOR,
+SID_ATTR_SHADOW_TRANSPARENCE,
+SID_ATTR_SHADOW_XDISTANCE,
+SID_ATTR_SHADOW_YDISTANCE,
 0
 };
 
diff --git a/include/svx/svxids.hrc b/include/svx/svxids.hrc
index 81cecff..f59e3e4 100644
--- a/include/svx/svxids.hrc
+++ b/include/svx/svxids.hrc
@@ -1008,8 +1008,12 @@
 #define SID_PARASPACE_DECREASE  ( SID_SVX_START + 1146 
)
 
 #define SID_OBJECT_CROP ( SID_SVX_START + 1147 
)
+#define SID_ATTR_SHADOW_TRANSPARENCE( SID_SVX_START + 1148 
)
+#define SID_ATTR_SHADOW_COLOR   ( SID_SVX_START + 1149 
)
+#define SID_ATTR_SHADOW_XDISTANCE   ( SID_SVX_START + 1150 
)
+#define SID_ATTR_SHADOW_YDISTANCE   ( SID_SVX_START + 1151 
)
 
-#define SID_EDIT_POSTIT ( SID_SVX_START + 1148 
)
+#define SID_EDIT_POSTIT ( SID_SVX_START + 1152 
)
 
 // IMPORTANT NOTE: adjust SID_SVX_FIRSTFREE, when adding new slot id
 #define SID_SVX_FIRSTFREE   (SID_EDIT_POSTIT + 1)
diff --git a/officecfg/registry/data/org/openoffice/Office/UI/Sidebar.xcu 
b/officecfg/registry/data/org/openoffice/Office/UI/Sidebar.xcu
index 653d826..e20b1b0 100644
--- a/officecfg/registry/data/org/openoffice/Office/UI/Sidebar.xcu
+++ b/officecfg/registry/data/org/openoffice/Office/UI/Sidebar.xcu
@@ -368,6 +368,38 @@
 
   
 
+  
+
+  Shadow
+
+
+  ShadowPropertyPanel
+
+
+  PropertyDeck
+
+
+  .uno:FormatArea
+
+
+  
+Calc,   Draw,   visible ;
+Calc,   OLE,hidden  ;
+DrawImpress,3DObject,   visible ;
+DrawImpress,Draw,   visible ;
+DrawImpress,Graphic,hidden  ;
+DrawImpress,TextObject, hidden  ;
+DrawImpress,OLE,hidden  ;
+  
+
+
+  
private:resource/toolpanel/SvxPanelFactory/ShadowPropertyPanel
+
+
+  300
+
+  
+
   
 
   Line
diff --git a/sc/sdi/drawsh.sdi b/sc/sdi/drawsh.sdi
index d4a1eec..7fb2639 100644
--- a/sc/sdi/drawsh.sdi
+++ b/sc/sdi/drawsh.sdi
@@ -72,6 +72,14 @@ interface TableDraw
 StateMethod = GetDrawAttrState;
 Export = FALSE;
 ]
+SID_ATTR_SHADOW_COLOR
+[   ExecMethod = ExecDrawAttr; StateMethod = GetDrawAttrState; Export = 
FALSE; ]
+SID_ATTR_SHADOW_TRANSPARENCE
+[   ExecMethod = ExecDrawAttr; StateMethod = GetDrawAttrState; Export = 
FALSE; ]
+SID_ATTR_SHADOW_XDISTANCE
+[   ExecMethod = ExecDrawAttr; StateMethod = GetDrawAttrState; Export = 
FALSE; ]
+SID_ATTR_SHADOW_YDISTANCE
+[   ExecMethod = ExecDrawAttr; StateMethod = GetDrawAttrState; Expo

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

2014-12-12 Thread Radu Ioan
 cui/source/tabpages/tphatch.cxx|8 
 include/svx/xenum.hxx  |1 -
 include/svx/xhatch.hxx |   12 ++--
 sd/source/ui/view/drviews9.cxx |6 +++---
 svx/source/sdr/primitive2d/sdrattributecreator.cxx |8 
 svx/source/svdraw/svdfmtf.cxx  |8 
 svx/source/unodraw/XPropertyTable.cxx  |2 +-
 svx/source/xoutdev/xattr.cxx   |   10 +-
 svx/source/xoutdev/xtabhtch.cxx|   12 ++--
 9 files changed, 33 insertions(+), 34 deletions(-)

New commits:
commit 3c77eba67b61b4f78f2c8ccec6c78622ee173b61
Author: Radu Ioan 
Date:   Thu Dec 11 23:45:38 2014 +0200

fdo#85486 - Clean up unnecessary enumerations from xenum.hxx

Removed XHatchStyle

Change-Id: I89e7edadc4f408e5a50840aaa1a13965b8503afb
Reviewed-on: https://gerrit.libreoffice.org/13442
Reviewed-by: Miklos Vajna 
Tested-by: Miklos Vajna 

diff --git a/cui/source/tabpages/tphatch.cxx b/cui/source/tabpages/tphatch.cxx
index a08bcbf..2f988e4 100644
--- a/cui/source/tabpages/tphatch.cxx
+++ b/cui/source/tabpages/tphatch.cxx
@@ -299,7 +299,7 @@ bool SvxHatchTabPage::FillItemSet( SfxItemSet* rSet )
 else
 {
 pXHatch.reset(new XHatch( 
m_pLbLineColor->GetSelectEntryColor(),
- (XHatchStyle) 
m_pLbLineType->GetSelectEntryPos(),
+ (css::drawing::HatchStyle) 
m_pLbLineType->GetSelectEntryPos(),
  GetCoreValue( *m_pMtrDistance, ePoolUnit ),
  static_cast(m_pMtrAngle->GetValue() * 
10) ));
 }
@@ -366,7 +366,7 @@ IMPL_LINK( SvxHatchTabPage, ModifiedHdl_Impl, void *, p )
 }
 
 XHatch aXHatch( m_pLbLineColor->GetSelectEntryColor(),
-(XHatchStyle) m_pLbLineType->GetSelectEntryPos(),
+(css::drawing::HatchStyle) 
m_pLbLineType->GetSelectEntryPos(),
 GetCoreValue( *m_pMtrDistance, ePoolUnit ),
 static_cast(m_pMtrAngle->GetValue() * 10) );
 
@@ -513,7 +513,7 @@ IMPL_LINK_NOARG(SvxHatchTabPage, ClickAddHdl_Impl)
 if( !nError )
 {
 XHatch aXHatch( m_pLbLineColor->GetSelectEntryColor(),
-(XHatchStyle) m_pLbLineType->GetSelectEntryPos(),
+(css::drawing::HatchStyle) 
m_pLbLineType->GetSelectEntryPos(),
 GetCoreValue( *m_pMtrDistance, ePoolUnit ),
 static_cast(m_pMtrAngle->GetValue() * 10) );
 XHatchEntry* pEntry = new XHatchEntry( aXHatch, aName );
@@ -583,7 +583,7 @@ IMPL_LINK_NOARG(SvxHatchTabPage, ClickModifyHdl_Impl)
 {
 bLoop = false;
 XHatch aXHatch( m_pLbLineColor->GetSelectEntryColor(),
-(XHatchStyle) 
m_pLbLineType->GetSelectEntryPos(),
+(css::drawing::HatchStyle) 
m_pLbLineType->GetSelectEntryPos(),
  GetCoreValue( *m_pMtrDistance, ePoolUnit ),
 static_cast(m_pMtrAngle->GetValue() * 
10) );
 
diff --git a/include/svx/xenum.hxx b/include/svx/xenum.hxx
index 52f7a4f..a849bc5 100644
--- a/include/svx/xenum.hxx
+++ b/include/svx/xenum.hxx
@@ -21,7 +21,6 @@
 #define INCLUDED_SVX_XENUM_HXX
 
 
-enum XHatchStyle{ XHATCH_SINGLE, XHATCH_DOUBLE, XHATCH_TRIPLE };
 enum XFormTextStyle { XFT_ROTATE, XFT_UPRIGHT, XFT_SLANTX, XFT_SLANTY,
   XFT_NONE };
 enum XFormTextAdjust{ XFT_LEFT, XFT_RIGHT, XFT_AUTOSIZE, XFT_CENTER };
diff --git a/include/svx/xhatch.hxx b/include/svx/xhatch.hxx
index 9dc725d..52010cd 100644
--- a/include/svx/xhatch.hxx
+++ b/include/svx/xhatch.hxx
@@ -20,9 +20,9 @@
 #ifndef INCLUDED_SVX_XHATCH_HXX
 #define INCLUDED_SVX_XHATCH_HXX
 
-#include 
 #include 
 #include 
+#include 
 
 
 // class XHatch
@@ -31,24 +31,24 @@
 class SVX_DLLPUBLIC XHatch
 {
 protected:
-XHatchStyle eStyle;
+css::drawing::HatchStyle eStyle;
 Color   aColor;
 longnDistance;
 longnAngle;
 
 public:
-XHatch() : eStyle(XHATCH_SINGLE), nDistance(0), nAngle(0) 
{}
-XHatch(const Color& rCol, XHatchStyle eStyle = 
XHATCH_SINGLE,
+XHatch() : eStyle(css::drawing::HatchStyle_SINGLE), 
nDistance(0), nAngle(0) {}
+XHatch(const Color& rCol, css::drawing::HatchStyle eStyle 
= css::drawing::HatchStyle_SINGLE,
long nDistance = 20, long nAngle = 0);
 
 bool operator==(const XHatch& rHatch) const;
 
-voidSetHatchStyle(XHatchStyle eNewStyle) { eStyle = eNewStyle; 
}
+voidSetHatchStyle(css::drawing::HatchStyle eNewStyle) { eStyle 
= eNewStyle; }
 voidSetColor(const

[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 
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 
Reviewed-by: Katarina Behrens 

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 
 #include 
 #include 
+#include 
 #include 
 #include 
 
@@ -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 .
+ */
+
+#ifndef INCLUDED_SVX_TRANSFRMHELPER_HXX
+#define INCLUDED_SVX_TRANSFRMHELPER_HXX
+
+#include 
+#include 
+#include 
+
+class SVX_DLLPUBLIC Transf

[Libreoffice-commits] core.git: cui/source include/svx include/vcl sc/source starmath/source svtools/source svx/source vcl/generic vcl/headless vcl/inc vcl/qa vcl/quartz vcl/source vcl/unx vcl/win

2014-10-13 Thread Chris Sherlock
 cui/source/dialogs/cuicharmap.cxx   |6 
 include/svx/charmap.hxx |2 
 include/svx/ucsubset.hxx|4 
 include/vcl/metric.hxx  |   39 ++-
 include/vcl/outdev.hxx  |5 
 sc/source/filter/excel/xistyle.cxx  |   50 ++--
 starmath/source/dialog.cxx  |8 
 svtools/source/misc/sampletext.cxx  |   10 
 svx/source/dialog/charmap.cxx   |   40 +--
 vcl/generic/fontmanager/fontmanager.cxx |4 
 vcl/generic/glyphs/gcach_ftyp.cxx   |   13 -
 vcl/generic/glyphs/gcach_ftyp.hxx   |4 
 vcl/generic/print/genpspgraphics.cxx|6 
 vcl/headless/svptext.cxx|6 
 vcl/inc/generic/genpspgraphics.h|2 
 vcl/inc/generic/glyphcache.hxx  |4 
 vcl/inc/headless/svpgdi.hxx |3 
 vcl/inc/impfont.hxx |   24 -
 vcl/inc/quartz/salgdi.h |8 
 vcl/inc/salgdi.hxx  |   19 -
 vcl/inc/unx/salgdi.h|7 
 vcl/inc/win/salgdi.h|6 
 vcl/qa/cppunit/fontcharmap.cxx  |   12 
 vcl/quartz/salgdi.cxx   |   30 +-
 vcl/source/filter/wmf/wmfwr.cxx |9 
 vcl/source/gdi/impfont.cxx  |  393 ++--
 vcl/source/outdev/font.cxx  |   24 +
 vcl/unx/generic/gdi/salgdi3.cxx |9 
 vcl/win/source/gdi/salgdi3.cxx  |   40 +--
 29 files changed, 406 insertions(+), 381 deletions(-)

New commits:
commit f6d61562d41b8a49449d881da66a3d8fa519487f
Author: Chris Sherlock 
Date:   Mon Oct 6 18:16:16 2014 +1100

vcl: Make ImplFontCharMap a pImpl and move functions to FontCharMap

To do this, I've made FontCharMap a friend class for ImplFontCharMap,
and have moved the functions directly into FontCharMap. In this patch,
I am attempting to stop the direct use of ImplFontCharMap by anything
other than FontCharMap. However, FontCharMap itself requires a
refcounter, so we will use FontCharMapPtr to access the font character
map.

Change-Id: I509b990a8cbd911c5cc1572c7d24fc5348ca06d9
Reviewed-on: https://gerrit.libreoffice.org/11823
Reviewed-by: Chris Sherlock 
Tested-by: Chris Sherlock 

diff --git a/cui/source/dialogs/cuicharmap.cxx 
b/cui/source/dialogs/cuicharmap.cxx
index 2d46a79..94898e69 100644
--- a/cui/source/dialogs/cuicharmap.cxx
+++ b/cui/source/dialogs/cuicharmap.cxx
@@ -446,9 +446,9 @@ IMPL_LINK_NOARG(SvxCharacterMap, FontSelectHdl)
 bool bNeedSubset = (aFont.GetCharSet() != RTL_TEXTENCODING_SYMBOL);
 if( bNeedSubset )
 {
-FontCharMap aFontCharMap;
-m_pShowSet->GetFontCharMap( aFontCharMap );
-pSubsetMap = new SubsetMap( &aFontCharMap );
+FontCharMapPtr pFontCharMap( new FontCharMap() );
+m_pShowSet->GetFontCharMap( pFontCharMap );
+pSubsetMap = new SubsetMap( pFontCharMap );
 
 // update subset listbox for new font's unicode subsets
 // TODO: is it worth to improve the stupid linear search?
diff --git a/include/svx/charmap.hxx b/include/svx/charmap.hxx
index 1615fa2..7810dda 100644
--- a/include/svx/charmap.hxx
+++ b/include/svx/charmap.hxx
@@ -111,7 +111,7 @@ private:
 
 sal_Int32   nSelectedIndex;
 
-FontCharMap maFontCharMap;
+FontCharMapPtr  mpFontCharMap;
 ScrollBar   aVscrollSB;
 
 private:
diff --git a/include/svx/ucsubset.hxx b/include/svx/ucsubset.hxx
index 4cf0b45..a2a8a7e 100644
--- a/include/svx/ucsubset.hxx
+++ b/include/svx/ucsubset.hxx
@@ -63,7 +63,7 @@ typedef ::std::list SubsetList;
 class SVX_DLLPUBLIC SubsetMap : private Resource
 {
 public:
-SubsetMap( const FontCharMap* );
+SubsetMap( const FontCharMapPtr );
 
 const Subset*   GetSubsetByUnicode( sal_UCS4 ) const;
 const Subset*   GetNextSubset( bool bFirst ) const;
@@ -73,7 +73,7 @@ private:
 mutable SubsetList::const_iterator maSubsetIterator;
 
 SVX_DLLPRIVATE voidInitList();
-SVX_DLLPRIVATE voidApplyCharMap( const FontCharMap* );
+SVX_DLLPRIVATE voidApplyCharMap( const FontCharMapPtr );
 };
 
 #endif
diff --git a/include/vcl/metric.hxx b/include/vcl/metric.hxx
index ca53b65..e9872a9 100644
--- a/include/vcl/metric.hxx
+++ b/include/vcl/metric.hxx
@@ -28,9 +28,11 @@
 
 class ImplFontMetric;
 class ImplFontCharMap;
+class CmapResult;
 
 typedef sal_uInt32 sal_UCS4;
 typedef boost::intrusive_ptr< ImplFontCharMap > ImplFontCharMapPtr;
+typedef boost::intrusive_ptr< FontCharMap > FontCharMapPtr;
 
 namespace vcl {
 
@@ -96,16 +98,20 @@ inline std::basic_ostream & operator <<(
 
 class VCL_DLLPUBLIC FontCharMap
 {
-private:
-ImplFontCharMapPtr  mpImplFontCharMap;
-
 public:
 /** A new FontCharMap is created based on a "default" map, which includes
 all codepoints in the Unicode BMP range, including surrogates.
  **/
 FontCharMap();
+   

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

2014-08-25 Thread Stephan Bergmann
 cui/source/tabpages/transfrm.cxx   |4 ++--
 include/svx/sderitm.hxx|   11 +++
 sd/source/ui/func/fuconrec.cxx |2 +-
 svx/source/sdr/contact/viewcontactofsdrrectobj.cxx |2 +-
 svx/source/svdraw/svdattr.cxx  |2 +-
 svx/source/svdraw/svdedtv1.cxx |8 
 svx/source/svdraw/svdfmtf.cxx  |2 +-
 svx/source/svdraw/svdotext.cxx |4 ++--
 8 files changed, 15 insertions(+), 20 deletions(-)

New commits:
commit e0c2ea6bde31bd68e1794154b72fddcd40dda7f9
Author: Stephan Bergmann 
Date:   Mon Aug 25 17:25:18 2014 +0200

Consistency around SdrMetricItem in svx/sderitm.hxx

...similar to what has been done for svx/sdtmfitm.hxx in
6a2ea81ca1622d2c2ad55bea8ddc28167fcc2794 "Remove unused ctors" and
68969cc61adecac481ae9656978ef952f435b310 "Consistency around SdrMetricItem."

Change-Id: I4a0715b18bc3aa032779252cad2450c905a467a4

diff --git a/cui/source/tabpages/transfrm.cxx b/cui/source/tabpages/transfrm.cxx
index fdc4d4e..42b441e 100644
--- a/cui/source/tabpages/transfrm.cxx
+++ b/cui/source/tabpages/transfrm.cxx
@@ -479,7 +479,7 @@ bool SvxSlantTabPage::FillItemSet(SfxItemSet* rAttrs)
 long nTmp = GetCoreValue( *m_pMtrRadius, ePoolUnit );
 nTmp = Fraction( nTmp ) * aUIScale;
 
-rAttrs->Put( SdrEckenradiusItem( nTmp ) );
+rAttrs->Put( makeSdrEckenradiusItem( nTmp ) );
 bModified = true;
 }
 
@@ -528,7 +528,7 @@ void SvxSlantTabPage::Reset(const SfxItemSet* rAttrs)
 if( pItem )
 {
 const double fUIScale(double(pView->GetModel()->GetUIScale()));
-const double fTmp((double)((const 
SdrEckenradiusItem*)pItem)->GetValue() / fUIScale);
+const double fTmp((double)((const 
SdrMetricItem*)pItem)->GetValue() / fUIScale);
 SetMetricValue(*m_pMtrRadius, basegfx::fround(fTmp), ePoolUnit);
 }
 else
diff --git a/include/svx/sderitm.hxx b/include/svx/sderitm.hxx
index a6a22ec..ad03621 100644
--- a/include/svx/sderitm.hxx
+++ b/include/svx/sderitm.hxx
@@ -22,14 +22,9 @@
 #include 
 #include 
 
-/**
- * class SdrEckenradiusItem
- */
-class SdrEckenradiusItem: public SdrMetricItem {
-public:
-SdrEckenradiusItem(long nRadius=0): 
SdrMetricItem(SDRATTR_ECKENRADIUS,nRadius) {}
-SdrEckenradiusItem(SvStream& rIn) : SdrMetricItem(SDRATTR_ECKENRADIUS,rIn) 
{}
-};
+inline SdrMetricItem makeSdrEckenradiusItem(long nRadius) {
+return SdrMetricItem(SDRATTR_ECKENRADIUS, nRadius);
+}
 
 #endif
 
diff --git a/sd/source/ui/func/fuconrec.cxx b/sd/source/ui/func/fuconrec.cxx
index ebd76dbc..ced9706 100644
--- a/sd/source/ui/func/fuconrec.cxx
+++ b/sd/source/ui/func/fuconrec.cxx
@@ -431,7 +431,7 @@ void FuConstructRectangle::SetAttributes(SfxItemSet& rAttr, 
SdrObject* pObj)
 nSlotId == SID_DRAW_SQUARE_ROUND_NOFILL)
 {
 // round corner
-rAttr.Put(SdrEckenradiusItem(500));
+rAttr.Put(makeSdrEckenradiusItem(500));
 }
 else if (nSlotId == SID_CONNECTOR_LINE  ||
  nSlotId == SID_CONNECTOR_LINE_ARROW_START  ||
diff --git a/svx/source/sdr/contact/viewcontactofsdrrectobj.cxx 
b/svx/source/sdr/contact/viewcontactofsdrrectobj.cxx
index 8a02658..2ab0173 100644
--- a/svx/source/sdr/contact/viewcontactofsdrrectobj.cxx
+++ b/svx/source/sdr/contact/viewcontactofsdrrectobj.cxx
@@ -71,7 +71,7 @@ namespace sdr
 aObjectRange.getMinX(), aObjectRange.getMinY()));
 
 // calculate corner radius
-sal_uInt32 
nCornerRadius(((SdrEckenradiusItem&)(rItemSet.Get(SDRATTR_ECKENRADIUS))).GetValue());
+sal_uInt32 
nCornerRadius(((SdrMetricItem&)(rItemSet.Get(SDRATTR_ECKENRADIUS))).GetValue());
 double fCornerRadiusX;
 double fCornerRadiusY;
 
drawinglayer::primitive2d::calculateRelativeCornerRadius(nCornerRadius, 
aObjectRange, fCornerRadiusX, fCornerRadiusY);
diff --git a/svx/source/svdraw/svdattr.cxx b/svx/source/svdraw/svdattr.cxx
index dc43119..4dd3f77 100644
--- a/svx/source/svdraw/svdattr.cxx
+++ b/svx/source/svdraw/svdattr.cxx
@@ -139,7 +139,7 @@ SdrItemPool::SdrItemPool(
 mppLocalPoolDefaults[SDRATTR_CAPTIONESCABS-SDRATTR_START]=new 
SdrCaptionEscAbsItem;
 mppLocalPoolDefaults[SDRATTR_CAPTIONLINELEN   -SDRATTR_START]=new 
SdrCaptionLineLenItem   ;
 mppLocalPoolDefaults[SDRATTR_CAPTIONFITLINELEN-SDRATTR_START]=new 
SdrCaptionFitLineLenItem;
-mppLocalPoolDefaults[SDRATTR_ECKENRADIUS-SDRATTR_START]=new 
SdrEckenradiusItem;
+mppLocalPoolDefaults[SDRATTR_ECKENRADIUS-SDRATTR_START]=new 
SdrMetricItem(SDRATTR_ECKENRADIUS, 0);
 mppLocalPoolDefaults[SDRATTR_TEXT_MINFRAMEHEIGHT-SDRATTR_START]=new 
SdrMetricItem(SDRATTR_TEXT_MINFRAMEHEIGHT, 0);
 mppLocalPoolDefaults[SDRATTR_TEXT_AUTOGROWHEIGHT-SDRATTR_START]=new 
SdrOnOffItem(SDRAT

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

2014-08-07 Thread Stephan Bergmann
 cui/source/tabpages/measure.cxx |6 +++---
 include/svx/sxmsuitm.hxx|9 +++--
 sd/source/core/drawdoc4.cxx |2 +-
 svx/source/sdr/properties/measureproperties.cxx |2 +-
 svx/source/svdraw/svdattr.cxx   |2 +-
 svx/source/svdraw/svdomeas.cxx  |4 ++--
 6 files changed, 11 insertions(+), 14 deletions(-)

New commits:
commit 5ecec388bb117426661c4e5f65cb84aeb245064c
Author: Stephan Bergmann 
Date:   Thu Aug 7 11:27:26 2014 +0200

Consistency around SdrYesNoItem in svx/sxmsuitm.hxx

...similar to what has been done for svx/sdtmfitm.hxx in
6a2ea81ca1622d2c2ad55bea8ddc28167fcc2794 "Remove unused ctors" and
68969cc61adecac481ae9656978ef952f435b310 "Consistency around SdrMetricItem."

Change-Id: I25002e5b6043baa8c93b180a03f475bea5906e4f

diff --git a/cui/source/tabpages/measure.cxx b/cui/source/tabpages/measure.cxx
index bf93704..f5d2749 100644
--- a/cui/source/tabpages/measure.cxx
+++ b/cui/source/tabpages/measure.cxx
@@ -292,7 +292,7 @@ void SvxMeasurePage::Reset( const SfxItemSet* rAttrs )
 // SdrMeasureShowUnitItem
 if( rAttrs->GetItemState( SDRATTR_MEASURESHOWUNIT ) != SFX_ITEM_DONTCARE )
 {
-m_pTsbShowUnit->SetState( ( ( const SdrMeasureShowUnitItem& 
)rAttrs->Get( SDRATTR_MEASURESHOWUNIT ) ).
+m_pTsbShowUnit->SetState( ( ( const SdrYesNoItem& )rAttrs->Get( 
SDRATTR_MEASURESHOWUNIT ) ).
 GetValue() ? TRISTATE_TRUE : TRISTATE_FALSE );
 m_pTsbShowUnit->EnableTriState( false );
 }
@@ -486,7 +486,7 @@ bool SvxMeasurePage::FillItemSet( SfxItemSet* rAttrs)
 eState = m_pTsbShowUnit->GetState();
 if( m_pTsbShowUnit->IsValueChangedFromSaved() )
 {
-rAttrs->Put( SdrMeasureShowUnitItem( TRISTATE_TRUE == eState ) );
+rAttrs->Put( makeSdrMeasureShowUnitItem( TRISTATE_TRUE == eState ) );
 bModified = true;
 }
 
@@ -717,7 +717,7 @@ IMPL_LINK( SvxMeasurePage, ChangeAttrHdl_Impl, void *, p )
 {
 TriState eState = m_pTsbShowUnit->GetState();
 if( eState != TRISTATE_INDET )
-aAttrSet.Put( SdrMeasureShowUnitItem( TRISTATE_TRUE == eState ) );
+aAttrSet.Put( makeSdrMeasureShowUnitItem( TRISTATE_TRUE == eState 
) );
 }
 
 if( p == m_pLbUnit )
diff --git a/include/svx/sxmsuitm.hxx b/include/svx/sxmsuitm.hxx
index c16a51f..9238913 100644
--- a/include/svx/sxmsuitm.hxx
+++ b/include/svx/sxmsuitm.hxx
@@ -22,12 +22,9 @@
 #include 
 #include 
 
-// Include the unit of measure when displaying
-class SdrMeasureShowUnitItem: public SdrYesNoItem {
-public:
-SdrMeasureShowUnitItem(bool bOn=false): 
SdrYesNoItem(SDRATTR_MEASURESHOWUNIT,bOn) {}
-SdrMeasureShowUnitItem(SvStream& rIn): 
SdrYesNoItem(SDRATTR_MEASURESHOWUNIT,rIn) {}
-};
+inline SdrYesNoItem makeSdrMeasureShowUnitItem(bool bOn) {
+return SdrYesNoItem(SDRATTR_MEASURESHOWUNIT, bOn);
+}
 
 #endif
 
diff --git a/sd/source/core/drawdoc4.cxx b/sd/source/core/drawdoc4.cxx
index f4ba67f..fbaf8919 100644
--- a/sd/source/core/drawdoc4.cxx
+++ b/sd/source/core/drawdoc4.cxx
@@ -488,7 +488,7 @@ void SdDrawDocument::CreateLayoutTemplates()
 
pISet->Put(XLineEndItem(SVX_RESSTR(RID_SVXSTR_ARROW),::basegfx::B2DPolyPolygon(aArrow)));
 pISet->Put(XLineEndWidthItem(200));
 pISet->Put(XLineStyleItem(XLINE_SOLID));
-pISet->Put(SdrMeasureShowUnitItem(true));
+pISet->Put(makeSdrMeasureShowUnitItem(true));
 
 // Generate presentation templates for default layout.
 OUString aPrefix = SD_RESSTR(STR_LAYOUT_DEFAULT_NAME);
diff --git a/svx/source/sdr/properties/measureproperties.cxx 
b/svx/source/sdr/properties/measureproperties.cxx
index d124045..033464b2 100644
--- a/svx/source/sdr/properties/measureproperties.cxx
+++ b/svx/source/sdr/properties/measureproperties.cxx
@@ -109,7 +109,7 @@ namespace sdr
 //#71958# by default, the show units Bool-Item is set as hard
 // attribute to sal_True to aviod confusion when copying 
SdrMeasureObj's
 // from one application to another
-mpItemSet->Put(SdrMeasureShowUnitItem(true));
+mpItemSet->Put(makeSdrMeasureShowUnitItem(true));
 
 basegfx::B2DPolygon aNewPolygon;
 aNewPolygon.append(basegfx::B2DPoint(100.0, 0.0));
diff --git a/svx/source/svdraw/svdattr.cxx b/svx/source/svdraw/svdattr.cxx
index bf296e0..188668a 100644
--- a/svx/source/svdraw/svdattr.cxx
+++ b/svx/source/svdraw/svdattr.cxx
@@ -197,7 +197,7 @@ SdrItemPool::SdrItemPool(
 mppLocalPoolDefaults[SDRATTR_MEASUREOVERHANG -SDRATTR_START]=new 
SdrMeasureOverhangItem(600);
 mppLocalPoolDefaults[SDRATTR_MEASUREUNIT -SDRATTR_START]=new 
SdrMeasureUnitItem;
 mppLocalPoolDefaults[SDRATTR_MEASURESCALE-SDRATTR_START]=new 
SdrMeasureScaleItem;
-mppLocalPoolDefaults[SDRATTR_MEASURESHOWUNIT -SDRATTR_START]=new 
SdrMeasureShowUnitItem;
+mppLocalPoolDef

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

2014-08-06 Thread Stephan Bergmann
 cui/source/tabpages/connect.cxx |   18 +-
 include/svx/sxelditm.hxx|   25 +
 sd/source/ui/view/drviewsj.cxx  |6 +++---
 svx/source/svdraw/svdattr.cxx   |   11 +++
 svx/source/svdraw/svdoedge.cxx  |   18 +-
 5 files changed, 33 insertions(+), 45 deletions(-)

New commits:
commit 14ac70c74a9abd62936db74d825ab9d3375f2504
Author: Stephan Bergmann 
Date:   Wed Aug 6 12:54:53 2014 +0200

Consistency around SdrMetricItem in svx/sxelditm.hxx

...similar to what has been done for svx/sdtmfitm.hxx in
6a2ea81ca1622d2c2ad55bea8ddc28167fcc2794 "Remove unused ctors" and
68969cc61adecac481ae9656978ef952f435b310 "Consistency around SdrMetricItem."

(SdrEdgeLine1DeltaItem::Clone had been recently---and in retrospect 
needlessly
---introduced in 596ec6f52fe3a8d56d5c20df568633cfbcadc74d "Missing
SdrEdgeLine1DeltaItem::Clone override" before
3efa3ad7b6de78c291f49858e50e6bedbd6a2173 
"SdrEdgreLine*DeltaItem::Put/QueryValue
are same as underlying" revealed that SdrEdgeLine1DeltaItem was a needless
derivation of SdrMetricItem.)

Change-Id: I154d32d46a7c01c792aa4e812cf576d4d749e0c9

diff --git a/cui/source/tabpages/connect.cxx b/cui/source/tabpages/connect.cxx
index 97cc1c2..59a0dbd 100644
--- a/cui/source/tabpages/connect.cxx
+++ b/cui/source/tabpages/connect.cxx
@@ -224,7 +224,7 @@ void SvxConnectionPage::Reset( const SfxItemSet* rAttrs )
 pItem = &pPool->GetDefaultItem( SDRATTR_EDGELINE1DELTA );
 if( pItem )
 {
-long nValue = ( ( const SdrEdgeLine1DeltaItem* )pItem )->GetValue();
+long nValue = ( ( const SdrMetricItem* )pItem )->GetValue();
 SetMetricValue( *m_pMtrFldLine1, nValue, eUnit );
 }
 else
@@ -238,7 +238,7 @@ void SvxConnectionPage::Reset( const SfxItemSet* rAttrs )
 pItem = &pPool->GetDefaultItem( SDRATTR_EDGELINE2DELTA );
 if( pItem )
 {
-long nValue = ( ( const SdrEdgeLine2DeltaItem* )pItem )->GetValue();
+long nValue = ( ( const SdrMetricItem* )pItem )->GetValue();
 SetMetricValue( *m_pMtrFldLine2, nValue, eUnit );
 }
 else
@@ -252,7 +252,7 @@ void SvxConnectionPage::Reset( const SfxItemSet* rAttrs )
 pItem = &pPool->GetDefaultItem( SDRATTR_EDGELINE3DELTA );
 if( pItem )
 {
-long nValue = ( ( const SdrEdgeLine3DeltaItem* )pItem )->GetValue();
+long nValue = ( ( const SdrMetricItem* )pItem )->GetValue();
 SetMetricValue( *m_pMtrFldLine3, nValue, eUnit );
 }
 else
@@ -343,21 +343,21 @@ bool SvxConnectionPage::FillItemSet( SfxItemSet* rAttrs)
 if( m_pMtrFldLine1->IsValueChangedFromSaved() )
 {
 nValue = GetCoreValue( *m_pMtrFldLine1, eUnit );
-rAttrs->Put( SdrEdgeLine1DeltaItem( nValue ) );
+rAttrs->Put( makeSdrEdgeLine1DeltaItem( nValue ) );
 bModified = true;
 }
 
 if( m_pMtrFldLine2->IsValueChangedFromSaved() )
 {
 nValue = GetCoreValue( *m_pMtrFldLine2, eUnit );
-rAttrs->Put( SdrEdgeLine2DeltaItem( nValue ) );
+rAttrs->Put( makeSdrEdgeLine2DeltaItem( nValue ) );
 bModified = true;
 }
 
 if( m_pMtrFldLine3->IsValueChangedFromSaved() )
 {
 nValue = GetCoreValue( *m_pMtrFldLine3, eUnit );
-rAttrs->Put( SdrEdgeLine3DeltaItem( nValue ) );
+rAttrs->Put( makeSdrEdgeLine3DeltaItem( nValue ) );
 bModified = true;
 }
 
@@ -429,19 +429,19 @@ IMPL_LINK( SvxConnectionPage, ChangeAttrHdl_Impl, void *, 
p )
 if( p == m_pMtrFldLine1 )
 {
 sal_Int32 nValue = GetCoreValue( *m_pMtrFldLine1, eUnit );
-aAttrSet.Put( SdrEdgeLine1DeltaItem( nValue ) );
+aAttrSet.Put( makeSdrEdgeLine1DeltaItem( nValue ) );
 }
 
 if( p == m_pMtrFldLine2 )
 {
 sal_Int32 nValue = GetCoreValue( *m_pMtrFldLine2, eUnit );
-aAttrSet.Put( SdrEdgeLine2DeltaItem( nValue ) );
+aAttrSet.Put( makeSdrEdgeLine2DeltaItem( nValue ) );
 }
 
 if( p == m_pMtrFldLine3 )
 {
 sal_Int32 nValue = GetCoreValue( *m_pMtrFldLine3, eUnit );
-aAttrSet.Put( SdrEdgeLine3DeltaItem( nValue ) );
+aAttrSet.Put( makeSdrEdgeLine3DeltaItem( nValue ) );
 }
 
 
diff --git a/include/svx/sxelditm.hxx b/include/svx/sxelditm.hxx
index b3491d1..7fdf25d 100644
--- a/include/svx/sxelditm.hxx
+++ b/include/svx/sxelditm.hxx
@@ -29,24 +29,17 @@ public:
 SdrEdgeLineDeltaAnzItem(SvStream& rIn): 
SfxUInt16Item(SDRATTR_EDGELINEDELTAANZ,rIn)  {}
 };
 
-class SVX_DLLPUBLIC SdrEdgeLine1DeltaItem: public SdrMetricItem {
-public:
-SdrEdgeLine1DeltaItem(long nVal=0): 
SdrMetricItem(SDRATTR_EDGELINE1DELTA,nVal)  {}
-SdrEdgeLine1DeltaItem(SvStream& rIn): 
SdrMetricItem(SDRATTR_EDGELINE1DELTA,rIn) {}
-virtual SfxPoolItem * Clone(SfxItemPool *) const SAL_OVERRIDE;
-};
+inline SdrMetricItem makeSdrEdgeLine1DeltaItem(long nVal) {
+return SdrMetricItem(SDRATTR_EDGELINE1DELTA, nVal);
+}
 
-clas

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

2014-01-14 Thread Stephan Bergmann
 cui/source/dialogs/passwdomdlg.cxx |2 +-
 cui/source/factory/dlgfact.cxx |4 ++--
 cui/source/factory/dlgfact.hxx |2 +-
 cui/source/tabpages/autocdlg.cxx   |2 +-
 include/svx/svxdlg.hxx |2 +-
 include/vcl/window.hxx |2 +-
 sc/source/ui/miscdlgs/mvtabdlg.cxx |4 ++--
 7 files changed, 9 insertions(+), 9 deletions(-)

New commits:
commit b32b45c50cc7b782554b0da722913f697434647d
Author: Stephan Bergmann 
Date:   Tue Jan 14 14:56:42 2014 +0100

nFlags parameter to Window::Hide appears effectively unused

...there was a handful of Hide(true) calls, which would happen to actually 
mean

  Show(false, SHOW_NOPARENTUPDATE)

but I assume those were typos rather than genuine requests for
SHOW_NOPARENTUPDATE.

Change-Id: I20310d58437bb556f95965885f82784f855b517d

diff --git a/cui/source/dialogs/passwdomdlg.cxx 
b/cui/source/dialogs/passwdomdlg.cxx
index b73b71d..30e3300 100644
--- a/cui/source/dialogs/passwdomdlg.cxx
+++ b/cui/source/dialogs/passwdomdlg.cxx
@@ -163,7 +163,7 @@ 
PasswordToOpenModifyDialog_Impl::PasswordToOpenModifyDialog_Impl(
 
 m_aMoreFewerOptionsBTN.Enable( bIsPasswordToModify );
 if (!bIsPasswordToModify)
-m_aMoreFewerOptionsBTN.Hide( sal_True );
+m_aMoreFewerOptionsBTN.Hide();
 }
 
 
diff --git a/cui/source/factory/dlgfact.cxx b/cui/source/factory/dlgfact.cxx
index 3ab8e86..2090e59 100644
--- a/cui/source/factory/dlgfact.cxx
+++ b/cui/source/factory/dlgfact.cxx
@@ -543,9 +543,9 @@ OUString AbstractURLDlg_Impl::GetName() const
 return pDlg->GetName();
 }
 
-void AbstractSvxHlinkDlgMarkWnd_Impl::Hide( sal_uInt16 nFlags )
+void AbstractSvxHlinkDlgMarkWnd_Impl::Hide()
 {
-((Window*)pDlg)->Hide( nFlags );
+((Window*)pDlg)->Hide();
 }
 
 void AbstractSvxHlinkDlgMarkWnd_Impl::SetSizePixel( const Size& rNewSize )
diff --git a/cui/source/factory/dlgfact.hxx b/cui/source/factory/dlgfact.hxx
index cee1226..0d17161 100644
--- a/cui/source/factory/dlgfact.hxx
+++ b/cui/source/factory/dlgfact.hxx
@@ -278,7 +278,7 @@ class SvxHlinkDlgMarkWnd;
 class AbstractSvxHlinkDlgMarkWnd_Impl : public AbstractSvxHlinkDlgMarkWnd
 {
 DECL_ABSTDLG_BASE(AbstractSvxHlinkDlgMarkWnd_Impl,SvxHlinkDlgMarkWnd)
-virtual voidHide( sal_uInt16 nFlags = 0 );
+virtual voidHide() SAL_OVERRIDE;
 virtual sal_BoolIsVisible() const ;
 virtual voidInvalidate( sal_uInt16 nFlags = 0 );
 virtual voidSetSizePixel( const Size& rNewSize );
diff --git a/cui/source/tabpages/autocdlg.cxx b/cui/source/tabpages/autocdlg.cxx
index 5f5c69e..c4e7f9e 100644
--- a/cui/source/tabpages/autocdlg.cxx
+++ b/cui/source/tabpages/autocdlg.cxx
@@ -1778,7 +1778,7 @@ OfaQuoteTabPage::OfaQuoteTabPage(Window* pParent, const 
SfxItemSet& rSet)
 sHeader += "\t";
 m_pSwCheckLB->InsertHeaderEntry( sHeader, HEADERBAR_APPEND,
 HIB_CENTER | HIB_VCENTER | HIB_FIXEDPOS | HIB_FIXED);
-m_pCheckLB->Hide(true);
+m_pCheckLB->Hide();
 }
 else
 {
diff --git a/include/svx/svxdlg.hxx b/include/svx/svxdlg.hxx
index 34ae403..4d51d1c 100644
--- a/include/svx/svxdlg.hxx
+++ b/include/svx/svxdlg.hxx
@@ -140,7 +140,7 @@ public:
 // in class Window
 virtual voidSetSizePixel( const Size& rNewSize ) = 0;
 virtual SizeGetSizePixel() const = 0;
-virtual voidHide( sal_uInt16 nFlags = 0 ) = 0;
+virtual voidHide() = 0;
 virtual sal_BoolIsVisible() const = 0;
 virtual voidInvalidate( sal_uInt16 nFlags = 0 ) = 0;
 };
diff --git a/include/vcl/window.hxx b/include/vcl/window.hxx
index fc7e2e0..991daf6 100644
--- a/include/vcl/window.hxx
+++ b/include/vcl/window.hxx
@@ -721,7 +721,7 @@ public:
 Dialog* GetParentDialog() const;
 
 voidShow( sal_Bool bVisible = sal_True, sal_uInt16 nFlags 
= 0 );
-voidHide( sal_uInt16 nFlags = 0 ) { Show( sal_False, 
nFlags ); }
+voidHide() { Show( sal_False ); }
 sal_BoolIsVisible() const;
 sal_BoolIsReallyVisible() const;
 sal_BoolIsReallyShown() const;
diff --git a/sc/source/ui/miscdlgs/mvtabdlg.cxx 
b/sc/source/ui/miscdlgs/mvtabdlg.cxx
index 7c169ba..97f2258 100644
--- a/sc/source/ui/miscdlgs/mvtabdlg.cxx
+++ b/sc/source/ui/miscdlgs/mvtabdlg.cxx
@@ -196,7 +196,7 @@ void ScMoveTableDlg::CheckNewTabName()
 }
 else
 {
-pFtWarn->Hide(sal_True);
+pFtWarn->Hide();
 pFtWarn->SetControlBackground();
 pFtWarn->SetText(OUString());
 pBtnOk->Enable();
@@ -225,7 +225,7 @@ void ScMoveTableDlg::Init()
 pBtnMove->Check( true );
 pBtnCopy->Check( false );
 pEdTabName->Enable(false);
-pFtWarn->Hide(sal_True);
+pFtWarn->Hide();
 InitDocListBox();
 SelHdl( pLbDoc );
 }
___
Libreoffice-comm

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

2013-08-16 Thread Miklos Vajna
 cui/source/tabpages/backgrnd.cxx |   14 +++---
 include/svx/svxids.hrc   |2 ++
 sw/source/core/bastyp/init.cxx   |4 ++--
 sw/source/ui/frmdlg/frmdlg.cxx   |4 ++--
 4 files changed, 13 insertions(+), 11 deletions(-)

New commits:
commit f694f14ab64f48e40365fd877e201a0382297368
Author: Miklos Vajna 
Date:   Fri Aug 16 21:03:18 2013 +0200

fdo#66827 sw: rename SID_ATTR_FILL_GRADIENT to SID_SW_ATTR_FILL_GRADIENT

Change-Id: Ieff7fc6a5b718e11de7d1e4ec2087d64a8a13cae

diff --git a/cui/source/tabpages/backgrnd.cxx b/cui/source/tabpages/backgrnd.cxx
index 2b80d10..b1dae28 100644
--- a/cui/source/tabpages/backgrnd.cxx
+++ b/cui/source/tabpages/backgrnd.cxx
@@ -807,16 +807,16 @@ sal_Bool SvxBackgroundTabPage::FillItemSet( SfxItemSet& 
rCoreSet )
 else if ( SFX_ITEM_DEFAULT == rOldSet.GetItemState( 
nWhich, sal_False ) )
 rCoreSet.ClearItem( nWhich );
 // Handle XFILL_GRADIENT -> XFILL_SOLID
-XFillStyleItem aFillStyleItem(XFILL_SOLID, 
GetWhich(SID_ATTR_FILL_STYLE));
+XFillStyleItem aFillStyleItem(XFILL_SOLID, 
GetWhich(SID_SW_ATTR_FILL_STYLE));
 rCoreSet.Put(aFillStyleItem);
 }
 else
 {
-XFillStyleItem aFillStyleItem(((const 
XFillStyleItem&)m_rXFillSet.Get(XATTR_FILLSTYLE)).GetValue(), 
GetWhich(SID_ATTR_FILL_STYLE));
+XFillStyleItem aFillStyleItem(((const 
XFillStyleItem&)m_rXFillSet.Get(XATTR_FILLSTYLE)).GetValue(), 
GetWhich(SID_SW_ATTR_FILL_STYLE));
 rCoreSet.Put(aFillStyleItem);
 
 const XFillGradientItem& rFillGradientItem = (const 
XFillGradientItem&)m_rXFillSet.Get(XATTR_FILLGRADIENT);
-XFillGradientItem 
aFillGradientItem(rFillGradientItem.GetName(), 
rFillGradientItem.GetGradientValue(), GetWhich(SID_ATTR_FILL_GRADIENT));
+XFillGradientItem 
aFillGradientItem(rFillGradientItem.GetName(), 
rFillGradientItem.GetGradientValue(), GetWhich(SID_SW_ATTR_FILL_GRADIENT));
 rCoreSet.Put(aFillGradientItem);
 }
 }
@@ -871,11 +871,11 @@ sal_Bool SvxBackgroundTabPage::FillItemSet( SfxItemSet& 
rCoreSet )
 if (bIsGradient)
 {
 // Handle XFILL_BITMAP -> XFILL_GRADIENT
-XFillStyleItem aFillStyleItem(((const 
XFillStyleItem&)m_rXFillSet.Get(XATTR_FILLSTYLE)).GetValue(), 
GetWhich(SID_ATTR_FILL_STYLE));
+XFillStyleItem aFillStyleItem(((const 
XFillStyleItem&)m_rXFillSet.Get(XATTR_FILLSTYLE)).GetValue(), 
GetWhich(SID_SW_ATTR_FILL_STYLE));
 rCoreSet.Put(aFillStyleItem);
 
 const XFillGradientItem& rFillGradientItem = (const 
XFillGradientItem&)m_rXFillSet.Get(XATTR_FILLGRADIENT);
-XFillGradientItem 
aFillGradientItem(rFillGradientItem.GetName(), 
rFillGradientItem.GetGradientValue(), GetWhich(SID_ATTR_FILL_GRADIENT));
+XFillGradientItem 
aFillGradientItem(rFillGradientItem.GetName(), 
rFillGradientItem.GetGradientValue(), GetWhich(SID_SW_ATTR_FILL_GRADIENT));
 rCoreSet.Put(aFillGradientItem);
 }
 }
@@ -1959,9 +1959,9 @@ void SvxBackgroundTabPage::PageCreated (SfxAllItemSet 
aSet)
 // If we get a gradient list, also read fill and gradient style.
 m_pGradientList = pGradientListItem->GetGradientList();
 m_pLbGradients->Fill(m_pGradientList);
-const XFillStyleItem& rFillStyleItem = (const 
XFillStyleItem&)aSet.Get(SID_ATTR_FILL_STYLE);
+const XFillStyleItem& rFillStyleItem = (const 
XFillStyleItem&)aSet.Get(SID_SW_ATTR_FILL_STYLE);
 m_rXFillSet.Put(XFillStyleItem(rFillStyleItem.GetValue()));
-const XFillGradientItem& rFillGradientItem = (const 
XFillGradientItem&)aSet.Get(SID_ATTR_FILL_GRADIENT);
+const XFillGradientItem& rFillGradientItem = (const 
XFillGradientItem&)aSet.Get(SID_SW_ATTR_FILL_GRADIENT);
 m_rXFillSet.Put(XFillGradientItem(rFillGradientItem.GetName(), 
rFillGradientItem.GetGradientValue()));
 }
 else
diff --git a/include/svx/svxids.hrc b/include/svx/svxids.hrc
index 8aa8807..bace052 100644
--- a/include/svx/svxids.hrc
+++ b/include/svx/svxids.hrc
@@ -954,6 +954,8 @@
 
 #define FN_SVX_SET_NUMBER   (SID_SVX_START+1136)
 #define FN_SVX_SET_BULLET   (SID_SVX_START+1137)
+#define SID_SW_ATTR_FILL_STYLE  (SID_SVX_START+1138)
+#define SID_SW_ATTR_FILL_GRADIENT   (SID_SVX_START+1139)
 
 
 // IMPORTANT NOTE: adjust SID_SVX_FIRSTFREE, when adding new slot id
diff --git a/sw/source/core/bastyp/init.cxx b/sw/source/core/bastyp/init.cxx
index abd7120..812f169 100644
--- a/sw/source/core/bastyp/init.cxx
+++ b/sw/source/core/bastyp/init.cxx
@@ -383,8 +383,8 @@ 

[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 
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 
Tested-by: Bosdonnat Cedric 

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 
+#include 
 #include 
 #include 
-#include 
-#include "svx/ofaitem.hxx"
 #include 
-#include 
+#include 
 
-#include 
+#include 
+#include 
+#include 
+#include 
 #include 
-#include 
+#include 
 #include 
+#include 
+#include 
+#include 
 
-#include "svx/connctrl.hxx"
-#include "connect.hxx"
 #include "connect.hrc"
-#include 
-#include "svx/dlgutil.hxx"
-
+#include "connect.hxx"
 #include "paragrph.hrc"
-#include 
 
 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 
-#include 
+#include 
+#include 
 #include 
 #include 
 #include 
+#include 
+
 #include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
 
-#include 
-#include 
-#include 
 #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 
+#include 
 #include 
 #include 
+#include 
 #include 
 
-#include 
-
-#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
 #include 
-#include 
+#include 
 #include 
-#include 
-#include 
-#include "svx/measctrl.hxx"
-#include "measure.hxx"
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
 #include "measure.hrc"
-#include 
-#include "svx/dlgutil.hxx"
-#include 
-#include 
-#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 LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- *   Licensed to the Apache Software Foundation (ASF) under one or more
- *   contributor license agreements. See the NOTICE file distributed
- *   with this work for additional information regarding copyright
- *   ownership. The ASF licenses this file to you under the Apache
- *   License, Version 2.0 (the "License"); you may not use this file
- *   except in compliance with the License. You may obtain a copy of
- *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-
-#ifndef _SVDATTRX_HXX
-#define _SVDATTRX_HXX
-
-#include 
-#include 
-#include 
-#include 
-
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-
-#include 
-
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-
-#include 
-#include 
-#include 

  1   2   >