[Libreoffice-commits] core.git: Branch 'libreoffice-5-2' - cui/source cui/uiconfig sw/source

2017-03-02 Thread Michael Stahl
 cui/source/inc/paragrph.hxx   |3 -
 cui/source/tabpages/paragrph.cxx  |   85 --
 cui/uiconfig/ui/textflowpage.ui   |   10 +++-
 sw/source/uibase/utlui/uitool.cxx |   21 -
 4 files changed, 90 insertions(+), 29 deletions(-)

New commits:
commit c43cc2d70a8083c70e615335d19780bd59f40fd8
Author: Michael Stahl 
Date:   Wed Mar 1 12:39:54 2017 +0100

tdf#77111 cui,sw: fix page number offset on paragraph dialog "Text Flow"

Commit c2ccd20c0fd92bddfff76447754541705e3eb8f3 introduced 0 as a valid
value for page number offset in sw core.

Unfortunately the paragraph dialog was not changed then; previously
page number 0 would do automatic numbering, but since then 0 was set as
the offset, and once you have a 0 offset there's no easy way to remove
it, you have to remove the whole page break.

* change the label before the text number edit widget to a checkbox
  that disables the edit widget

* keep the id "labelPageNum" so that translations still work

* adapt SfxToSwPageDescAttr so it can not just set but also clear the
  page number

* set initial value to 1; 0 is a really bad default since we can't
  export it to ODF (see tdf#91306)

(cherry picked from commit d36fa0589ab822dc617c65b4d0d3bf68c092ad37)
Reviewed-on: https://gerrit.libreoffice.org/34745
Tested-by: Jenkins 
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 
(cherry picked from commit a5104f575a5acf8aea957cb79aa0fd67bc74f141)

Change-Id: Ic4ca9e2562bb65ac359b305a2202f782e8598307
Reviewed-on: https://gerrit.libreoffice.org/34810
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 6397f82..1e79a0c 100644
--- a/cui/source/inc/paragrph.hxx
+++ b/cui/source/inc/paragrph.hxx
@@ -236,7 +236,7 @@ private:
 VclPtrm_pBreakPositionLB;
 VclPtrm_pApplyCollBtn;
 VclPtrm_pApplyCollBox;
-VclPtr  m_pPagenumText;
+VclPtrm_pPageNumBox;
 VclPtr   m_pPagenumEdit;
 
 // paragraph division
@@ -264,6 +264,7 @@ private:
 DECL_LINK_TYPED(ApplyCollClickHdl_Impl, Button*, void);
 DECL_LINK_TYPED( PageBreakPosHdl_Impl, ListBox&, void );
 DECL_LINK_TYPED( PageBreakTypeHdl_Impl, ListBox&, void );
+DECL_LINK_TYPED(PageNumBoxClickHdl_Impl, Button*, void);
 
 virtual voidPageCreated(const SfxAllItemSet& aSet) override;
 };
diff --git a/cui/source/tabpages/paragrph.cxx b/cui/source/tabpages/paragrph.cxx
index 4b9e7da..5fdc153 100644
--- a/cui/source/tabpages/paragrph.cxx
+++ b/cui/source/tabpages/paragrph.cxx
@@ -1392,18 +1392,27 @@ bool SvxExtParagraphTabPage::FillItemSet( SfxItemSet* 
rOutSet )
 }
 }
 
-if (m_pPagenumEdit->IsEnabled() && m_pPagenumEdit->IsValueModified())
+if (m_pPageNumBox->IsEnabled()
+&& (m_pPageNumBox->IsValueChangedFromSaved() || 
m_pPagenumEdit->IsValueModified()))
 {
-SfxUInt16Item aPageNum( SID_ATTR_PARA_PAGENUM,
-(sal_uInt16)m_pPagenumEdit->GetValue() );
-
 pOld = GetOldItem( *rOutSet, SID_ATTR_PARA_PAGENUM );
 
-if ( !pOld || static_cast(pOld)->GetValue() != 
aPageNum.GetValue() )
+if (TRISTATE_TRUE == m_pPageNumBox->GetState()
+&& (!pOld || IsInvalidItem(pOld)
+|| static_cast(pOld)->GetValue() != 
m_pPagenumEdit->GetValue()))
 {
+SfxUInt16Item aPageNum(SID_ATTR_PARA_PAGENUM,
+static_cast(m_pPagenumEdit->GetValue()));
 rOutSet->Put( aPageNum );
 bModified = true;
 }
+else if (TRISTATE_FALSE == m_pPageNumBox->GetState()
+&& (pOld || IsInvalidItem(pOld)))
+{
+// need to tell sw to remove the item
+rOutSet->DisableItem(SID_ATTR_PARA_PAGENUM);
+bModified = true;
+}
 }
 
 // pagebreak
@@ -1595,11 +1604,34 @@ void SvxExtParagraphTabPage::Reset( const SfxItemSet* 
rSet )
 
 _nWhich = GetWhich( SID_ATTR_PARA_PAGENUM );
 
-if (rSet->GetItemState(_nWhich) >= SfxItemState::SET)
+switch (rSet->GetItemState(_nWhich))
 {
-const sal_uInt16 nPageNum =
-static_cast(rSet->Get( _nWhich ) 
).GetValue();
-m_pPagenumEdit->SetValue( nPageNum );
+case SfxItemState::SET:
+{
+m_pPageNumBox->EnableTriState(false);
+m_pPageNumBox->SetState(TRISTATE_TRUE);
+SfxUInt16Item const*const pItem(static_cast(rSet->GetItem(_nWhich)));
+const sal_uInt16 nPageNum(pItem->GetValue());
+m_pPagenumEdit->SetValue( nPageNum );
+break;
+}
+

[Libreoffice-commits] core.git: Branch 'libreoffice-5-2' - cui/source cui/uiconfig

2016-08-03 Thread Caolán McNamara
 cui/source/options/optgdlg.cxx |   12 
 cui/uiconfig/ui/optviewpage.ui |2 +-
 2 files changed, 13 insertions(+), 1 deletion(-)

New commits:
commit 89b7c4b634a4da90d110c125ad0182ea57e1a46a
Author: Caolán McNamara 
Date:   Tue Aug 2 20:49:10 2016 +0100

Resolves: tdf#101196 line wrap very long checkbox content

Change-Id: Ie451b88240f755a0d64dd3db14d7981b8ed2a2a2
(cherry picked from commit 1c33b3f5f693d432f74c795a87f87bd487b09d47)
Reviewed-on: https://gerrit.libreoffice.org/27811
Tested-by: Jenkins 
Reviewed-by: Miklos Vajna 

diff --git a/cui/source/options/optgdlg.cxx b/cui/source/options/optgdlg.cxx
index b05ca35..145b50f 100644
--- a/cui/source/options/optgdlg.cxx
+++ b/cui/source/options/optgdlg.cxx
@@ -643,6 +643,18 @@ OfaViewTabPage::OfaViewTabPage(vcl::Window* pParent, const 
SfxItemSet& rSet)
 m_pOpenGLStatusEnabled->Hide();
 m_pOpenGLStatusDisabled->Hide();
 }
+else
+{
+//tdf#191196, we need height-for-width support here, but for now we can
+//bodge it
+Size aPrefSize(m_pForceOpenGL->get_preferred_size());
+Size 
aSize(m_pForceOpenGL->CalcMinimumSize(36*approximate_char_width()));
+if (aPrefSize.Width() > aSize.Width())
+{
+m_pForceOpenGL->set_width_request(aSize.Width());
+m_pForceOpenGL->set_height_request(aSize.Height());
+}
+}
 
 #if defined( UNX )
 m_pFontAntiAliasing->SetToggleHdl( LINK( this, OfaViewTabPage, 
OnAntialiasingToggled ) );
diff --git a/cui/uiconfig/ui/optviewpage.ui b/cui/uiconfig/ui/optviewpage.ui
index c6b899a..396ddb1 100644
--- a/cui/uiconfig/ui/optviewpage.ui
+++ b/cui/uiconfig/ui/optviewpage.ui
@@ -90,7 +90,7 @@
   
 
 
-  
+  
 Force OpenGL 
even if blacklisted (on restart)
 True
 True
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-5-2' - cui/source cui/uiconfig

2016-07-20 Thread Rishabh Kumar
 cui/source/inc/cuitabarea.hxx|   15 +-
 cui/source/tabpages/tparea.cxx   |  136 --
 cui/source/tabpages/tpgradnt.cxx |   56 ++
 cui/uiconfig/ui/areatabpage.ui   |   96 +-
 cui/uiconfig/ui/gradientpage.ui  |  199 ---
 5 files changed, 283 insertions(+), 219 deletions(-)

New commits:
commit 10b701f36d7455e76b66822cc42d2017bb3d65d1
Author: Rishabh Kumar 
Date:   Wed Jul 20 15:19:55 2016 +0530

Revert "Addition of new controls and their rearrangement in gradient tab"

Unfinished GSoC: Area Fill project feature.
Introduces regression in LibreOffice-5-2.

This reverts commit fe3d9ac20b0f27b8beca7e54efa8ba571e76101d.

Change-Id: Ic1a9e2d7279e0b06e19b5d1020b37b44d28060b4
Reviewed-on: https://gerrit.libreoffice.org/27336
Reviewed-by: Samuel Mehrbrodt 
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 c8235fe..dfffa39 100644
--- a/cui/source/inc/cuitabarea.hxx
+++ b/cui/source/inc/cuitabarea.hxx
@@ -22,7 +22,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 
@@ -193,6 +192,10 @@ private:
 VclPtr   m_pLbBitmap;
 VclPtrm_pCtlBitmapPreview;
 
+VclPtrm_pTsbStepCount;
+VclPtr   m_pFlStepCount;
+VclPtr   m_pNumFldStepCount;
+
 VclPtr   m_pFlHatchBckgrd;
 VclPtr   m_pCbxHatchBckgrd;
 VclPtrm_pLbHatchBckgrdColor;
@@ -269,6 +272,8 @@ private:
 DECL_LINK_TYPED( ModifyHatchingHdl_Impl, ListBox&, void );
 DECL_LINK_TYPED( ToggleHatchBckgrdColorHdl_Impl, CheckBox&, void );
 DECL_LINK_TYPED( ModifyBitmapHdl_Impl, ListBox&, void );
+DECL_LINK_TYPED( ModifyStepCountEditHdl_Impl, Edit&, void );
+DECL_LINK_TYPED( ModifyStepCountClickHdl_Impl, Button*, void );
 void ModifyStepCountHdl_Impl(void*);
 
 //
@@ -385,26 +390,25 @@ class SvxGradientTabPage : public SfxTabPage
 
 private:
 VclPtrm_pLbGradientType;
-VclPtr  m_pFtCenter;
+VclPtr  m_pFtCenterX;
 VclPtrm_pMtrCenterX;
+VclPtr  m_pFtCenterY;
 VclPtrm_pMtrCenterY;
 VclPtr  m_pFtAngle;
 VclPtrm_pMtrAngle;
 VclPtrm_pMtrBorder;
-VclPtr m_pSliderBorder;
 VclPtrm_pLbColorFrom;
 VclPtrm_pMtrColorFrom;
 VclPtrm_pLbColorTo;
 VclPtrm_pMtrColorTo;
 VclPtr m_pLbGradients;
-VclPtrm_pMtrIncrement;
-VclPtr m_pSliderIncrement;
 VclPtrm_pCtlPreview;
 VclPtr m_pBtnAdd;
 VclPtr m_pBtnModify;
 VclPtr m_pBtnDelete;
 VclPtr m_pBtnLoad;
 VclPtr m_pBtnSave;
+
 const SfxItemSet&   m_rOutAttrs;
 
 XColorListRef m_pColorList;
@@ -428,7 +432,6 @@ private:
 DECL_LINK_TYPED( ChangeGradientHdl_Impl, ListBox&, void );
 DECL_LINK_TYPED( ModifiedEditHdl_Impl, Edit&, void );
 DECL_LINK_TYPED( ModifiedListBoxHdl_Impl, ListBox&, void );
-DECL_LINK_TYPED( ModifiedSliderHdl_Impl, Slider*, void );
 DECL_LINK_TYPED( ClickLoadHdl_Impl, Button*, void );
 DECL_LINK_TYPED( ClickSaveHdl_Impl, Button*, void );
 void ModifiedHdl_Impl(void*);
diff --git a/cui/source/tabpages/tparea.cxx b/cui/source/tabpages/tparea.cxx
index 4b0faa3..4ab7c8e 100644
--- a/cui/source/tabpages/tparea.cxx
+++ b/cui/source/tabpages/tparea.cxx
@@ -44,8 +44,6 @@
 #include "sfx2/opengrf.hxx"
 #include 
 
-#define DEFAULT_GRADIENTSTEP 64
-
 using namespace com::sun::star;
 
 // static 
@@ -115,6 +113,10 @@ SvxAreaTabPage::SvxAreaTabPage( vcl::Window* pParent, 
const SfxItemSet& rInAttrs
 get(m_pLbBitmap,"LB_BITMAP");
 get(m_pCtlBitmapPreview,"CTL_BITMAP_PREVIEW");
 
+get(m_pTsbStepCount,"TSB_STEPCOUNT");
+get(m_pFlStepCount,"FL_STEPCOUNT");
+get(m_pNumFldStepCount,"NUM_FLD_STEPCOUNT");
+
 get(m_pFlHatchBckgrd,"FL_HATCHCOLORS");
 get(m_pLbHatchBckgrdColor,"LB_HATCHBCKGRDCOLOR");
 get(m_pCbxHatchBckgrd,"CB_HATCHBCKGRD");
@@ -151,11 +153,12 @@ SvxAreaTabPage::SvxAreaTabPage( vcl::Window* pParent, 
const SfxItemSet& rInAttrs
 //size required for any of the areas which might be selected
 //later, so that there's sufficient space
 VclContainer *pMainFrame = get("mainframe");
+Size aIncrementsSize(m_pFlStepCount->get_preferred_size());
 Size aHatchSize(m_pFlHatchBckgrd->get_preferred_size());
 Size aBitmapSize(m_pBxBitmap->get_preferred_size());
 Size aMainFrame(
-std::max(aHatchSize.Width(), aBitmapSize.Width()),
-std::max(aHatchSize.Height(), aBitmapSize.Height()));
+std::max(std::max(aIncrementsSize.Width(), 

[Libreoffice-commits] core.git: Branch 'libreoffice-5-2' - cui/source cui/uiconfig

2016-07-20 Thread Rishabh Kumar
 cui/source/inc/cuitabarea.hxx   |   11 +
 cui/source/tabpages/tparea.cxx  |  136 +--
 cui/source/tabpages/tphatch.cxx |  110 
 cui/uiconfig/ui/areatabpage.ui  |   78 +++
 cui/uiconfig/ui/hatchpage.ui|  274 ++--
 5 files changed, 335 insertions(+), 274 deletions(-)

New commits:
commit 5df8024dc8a53c657d756dbe0ae6eb27185c1272
Author: Rishabh Kumar 
Date:   Wed Jul 20 14:57:11 2016 +0530

Revert "Addition of new controls and their rearrangement in hatch tab"

Unfinished GSoC: Area Fill project feature.
Introduces regression in LibreOffice-5-2.

This reverts commit 7a4bd998e900c7f7a28f9068b97707ef76c99b85.

Change-Id: I94c24b252983732161b8f2f0de51780a4d5c13bd
Reviewed-on: https://gerrit.libreoffice.org/27331
Reviewed-by: Samuel Mehrbrodt 
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 79d1f33..c8235fe 100644
--- a/cui/source/inc/cuitabarea.hxx
+++ b/cui/source/inc/cuitabarea.hxx
@@ -193,6 +193,10 @@ private:
 VclPtr   m_pLbBitmap;
 VclPtrm_pCtlBitmapPreview;
 
+VclPtr   m_pFlHatchBckgrd;
+VclPtr   m_pCbxHatchBckgrd;
+VclPtrm_pLbHatchBckgrdColor;
+
 VclPtr m_pBxBitmap;
 
 VclPtr   m_pFlSize;
@@ -260,8 +264,10 @@ private:
 
 DECL_LINK_TYPED(SelectDialogTypeHdl_Impl, ListBox&, void);
 DECL_LINK_TYPED( ModifyColorHdl_Impl, ListBox&, void );
+DECL_LINK_TYPED( ModifyHatchBckgrdColorHdl_Impl, ListBox&, void );
 DECL_LINK_TYPED( ModifyGradientHdl_Impl, ListBox&, void );
 DECL_LINK_TYPED( ModifyHatchingHdl_Impl, ListBox&, void );
+DECL_LINK_TYPED( ToggleHatchBckgrdColorHdl_Impl, CheckBox&, void );
 DECL_LINK_TYPED( ModifyBitmapHdl_Impl, ListBox&, void );
 void ModifyStepCountHdl_Impl(void*);
 
@@ -467,10 +473,9 @@ class SvxHatchTabPage : public SvxTabPage
 private:
 VclPtrm_pMtrDistance;
 VclPtrm_pMtrAngle;
-VclPtr m_pSliderAngle;
+VclPtr m_pCtlAngle;
 VclPtrm_pLbLineType;
 VclPtrm_pLbLineColor;
-VclPtrm_pLbBackgroundColor;
 VclPtr m_pLbHatchings;
 VclPtrm_pCtlPreview;
 VclPtr m_pBtnAdd;
@@ -501,8 +506,6 @@ private:
 DECL_LINK_TYPED( ChangeHatchHdl_Impl, ListBox&, void );
 DECL_LINK_TYPED( ModifiedEditHdl_Impl, Edit&, void );
 DECL_LINK_TYPED( ModifiedListBoxHdl_Impl, ListBox&, void );
-DECL_LINK_TYPED( ModifiedBackgroundHdl_Impl, ListBox&, void );
-DECL_LINK_TYPED( ModifiedSliderHdl_Impl, Slider*, void );
 void ModifiedHdl_Impl(void*);
 DECL_LINK_TYPED( ClickAddHdl_Impl, Button*, void );
 DECL_LINK_TYPED( ClickModifyHdl_Impl, Button*, void );
diff --git a/cui/source/tabpages/tparea.cxx b/cui/source/tabpages/tparea.cxx
index 29b3470..4b0faa3 100644
--- a/cui/source/tabpages/tparea.cxx
+++ b/cui/source/tabpages/tparea.cxx
@@ -115,6 +115,10 @@ SvxAreaTabPage::SvxAreaTabPage( vcl::Window* pParent, 
const SfxItemSet& rInAttrs
 get(m_pLbBitmap,"LB_BITMAP");
 get(m_pCtlBitmapPreview,"CTL_BITMAP_PREVIEW");
 
+get(m_pFlHatchBckgrd,"FL_HATCHCOLORS");
+get(m_pLbHatchBckgrdColor,"LB_HATCHBCKGRDCOLOR");
+get(m_pCbxHatchBckgrd,"CB_HATCHBCKGRD");
+
 get(m_pBxBitmap,"boxBITMAP");
 
 get(m_pFlSize,"FL_SIZE");
@@ -147,8 +151,11 @@ SvxAreaTabPage::SvxAreaTabPage( vcl::Window* pParent, 
const SfxItemSet& rInAttrs
 //size required for any of the areas which might be selected
 //later, so that there's sufficient space
 VclContainer *pMainFrame = get("mainframe");
+Size aHatchSize(m_pFlHatchBckgrd->get_preferred_size());
 Size aBitmapSize(m_pBxBitmap->get_preferred_size());
-Size aMainFrame(aBitmapSize.Width(),aBitmapSize.Height());
+Size aMainFrame(
+std::max(aHatchSize.Width(), aBitmapSize.Width()),
+std::max(aHatchSize.Height(), aBitmapSize.Height()));
 pMainFrame->set_width_request(aMainFrame.Width());
 pMainFrame->set_height_request(aMainFrame.Height());
 
@@ -159,6 +166,9 @@ SvxAreaTabPage::SvxAreaTabPage( vcl::Window* pParent, const 
SfxItemSet& rInAttrs
 
 m_pBxBitmap->Hide();
 
+// Controls for Hatch-Background
+m_pFlHatchBckgrd->Hide();
+
 m_pTsbOriginal->EnableTriState( false );
 
 // this page needs ExchangeSupport
@@ -190,6 +200,8 @@ SvxAreaTabPage::SvxAreaTabPage( vcl::Window* pParent, const 
SfxItemSet& rInAttrs
 m_pCtlBitmapPreview->SetAttributes( m_aXFillAttr.GetItemSet() );
 
 m_pLbColor->SetSelectHdl( LINK( this, SvxAreaTabPage, ModifyColorHdl_Impl 
) );
+m_pLbHatchBckgrdColor->SetSelectHdl( LINK( this, SvxAreaTabPage, 
ModifyHatchBckgrdColorHdl_Impl ) );
+m_pCbxHatchBckgrd->SetToggleHdl( LINK( this, SvxAreaTabPage, 

[Libreoffice-commits] core.git: Branch 'libreoffice-5-2' - cui/source cui/uiconfig

2016-07-18 Thread Caolán McNamara
 cui/source/tabpages/border.cxx |   10 ++
 cui/uiconfig/ui/borderpage.ui  |2 +-
 2 files changed, 11 insertions(+), 1 deletion(-)

New commits:
commit b2a3fd8037b6a50ed64c0a6a1dbd1d3e1f2f3575
Author: Caolán McNamara 
Date:   Mon Jul 18 16:12:23 2016 +0100

Resolves: tdf#99963 line wrap very long checkbox content

Change-Id: I11ab52b8c6600d5d479ac3d4d2cd78d1957d8676
(cherry picked from commit ea3f74ba0a9d291f26a79f2568d59f1a030d0585)
Reviewed-on: https://gerrit.libreoffice.org/27292
Reviewed-by: Adolfo Jayme Barrientos 
Tested-by: Adolfo Jayme Barrientos 

diff --git a/cui/source/tabpages/border.cxx b/cui/source/tabpages/border.cxx
index c999db8..10e0302 100644
--- a/cui/source/tabpages/border.cxx
+++ b/cui/source/tabpages/border.cxx
@@ -137,6 +137,16 @@ SvxBorderTabPage::SvxBorderTabPage(vcl::Window* pParent, 
const SfxItemSet& rCore
 get(m_pMergeAdjacentBordersCB, "mergeadjacent");
 get(m_pRemoveAdjcentCellBordersCB, "rmadjcellborders");
 
+//tdf#99963, we need height-for-width support here, but for now we can
+//bodge it
+Size aPrefSize(m_pRemoveAdjcentCellBordersCB->get_preferred_size());
+Size 
aSize(m_pRemoveAdjcentCellBordersCB->CalcMinimumSize(36*approximate_char_width()));
+if (aPrefSize.Width() > aSize.Width())
+{
+m_pRemoveAdjcentCellBordersCB->set_width_request(aSize.Width());
+m_pRemoveAdjcentCellBordersCB->set_height_request(aSize.Height());
+}
+
 if ( GetDPIScaleFactor() > 1 )
 {
 for (short i = 0; i < aBorderImgLst.GetImageCount(); i++)
diff --git a/cui/uiconfig/ui/borderpage.ui b/cui/uiconfig/ui/borderpage.ui
index d25dbed..20fe941 100644
--- a/cui/uiconfig/ui/borderpage.ui
+++ b/cui/uiconfig/ui/borderpage.ui
@@ -103,7 +103,7 @@
   
 
 
-  
+  
 Remove 
border from adjacent cells as well
 True
 True
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits