[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

2017-02-01 Thread Caolán McNamara
 cui/source/factory/init.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit c98f16943a95f498cecbfc9345b592b5a2144fd7
Author: Caolán McNamara 
Date:   Mon Jan 30 14:46:21 2017 +

crash on exit from undisposed insert special character dialog

right click on style combobox in writer toolbar, insert character, esc,
ctrl+f4 and crash

Change-Id: I83c88584c6d772bf629121a2bcdc16076bee8003
(cherry picked from commit cfdfe1be91101654456bdf1f16d92461e1e5dbfa)
Reviewed-on: https://gerrit.libreoffice.org/33701
Tested-by: Jenkins 
Reviewed-by: Miklos Vajna 

diff --git a/cui/source/factory/init.cxx b/cui/source/factory/init.cxx
index 5f53852..fd7cbc6 100644
--- a/cui/source/factory/init.cxx
+++ b/cui/source/factory/init.cxx
@@ -27,7 +27,7 @@ extern "C"
 SAL_DLLPUBLIC_EXPORT bool GetSpecialCharsForEdit(vcl::Window* i_pParent, const 
vcl::Font& i_rFont, OUString& o_rResult)
 {
 bool bRet = false;
-VclPtrInstance< SvxCharacterMap > aDlg( i_pParent );
+ScopedVclPtrInstance aDlg(i_pParent);
 aDlg->DisableFontSelection();
 aDlg->SetCharFont(i_rFont);
 if ( aDlg->Execute() == RET_OK )
___
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

2016-12-13 Thread Eike Rathke
 cui/source/tabpages/backgrnd.cxx |8 ++--
 1 file changed, 6 insertions(+), 2 deletions(-)

New commits:
commit 96068bd2c9dc17d9af7550ba5a02673c5c7eabad
Author: Eike Rathke 
Date:   Mon Dec 12 21:24:20 2016 +0100

Resolves: tdf#101588, do not prevent color de-selection tdf#96382 follow-up

Comparing colors to determine whether to set one in the result item set does
not work if the color previously was set before SaveValue() was called
unconditionally even for the "undetermined" color state. Actually we want to
know whether the user selected a color instead.

Change-Id: I508f791684ebd79ba4af9cb654f9aa0bb25bff5d
(cherry picked from commit 429be969b39867d6d9f36978c9ac15b601e78ba6)
Reviewed-on: https://gerrit.libreoffice.org/31923
Tested-by: Jenkins 
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/cui/source/tabpages/backgrnd.cxx b/cui/source/tabpages/backgrnd.cxx
index aa9c595..1070990 100644
--- a/cui/source/tabpages/backgrnd.cxx
+++ b/cui/source/tabpages/backgrnd.cxx
@@ -683,7 +683,7 @@ bool SvxBackgroundTabPage::FillItemSet( SfxItemSet* 
rCoreSet )
 {
 // Brush-treatment:
 if ( rOldItem.GetColor() != aBgdColor ||
- (SfxItemState::DEFAULT >= eOldItemState && 
m_pBackgroundColorSet->GetSavedValue() != 
m_pBackgroundColorSet->GetSelectItemId()))
+ (SfxItemState::DEFAULT >= eOldItemState && 
!m_pBackgroundColorSet->IsNoSelection()))
 {
 bModified = true;
 rCoreSet->Put( SvxBrushItem( aBgdColor, nWhich ) );
@@ -1422,9 +1422,13 @@ void SvxBackgroundTabPage::FillControls_Impl( const 
SvxBrushItem& rBgdAttr,
 }
 else
 {
+bool bNoSelection = m_pBackgroundColorSet->IsNoSelection();
 m_pBackgroundColorSet->SelectItem( nCol );
+m_pBackgroundColorSet->SaveValue();
+// The actual selection is user set, not what we preset.
+if (bNoSelection)
+m_pBackgroundColorSet->SetNoSelection();
 }
-m_pBackgroundColorSet->SaveValue();
 
 m_pPreviewWin1->NotifyChange( aBgdColor );
 
___
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 svx/source

2016-11-28 Thread Justin Luth
 cui/source/tabpages/textattr.cxx |   10 +++---
 svx/source/svdraw/svdotext.cxx   |2 +-
 2 files changed, 8 insertions(+), 4 deletions(-)

New commits:
commit 8a0575819ae3526831699767177b333270d6c718
Author: Justin Luth 
Date:   Tue Nov 15 14:50:03 2016 +0300

tdf#34467 - FitToFrame: stretch text to fill drawing obj

Help for Fit To Frame says "Resizes the text to fit the entire area
of the drawing or text object".

reverts commit b7628798ec1a966c97a64d7cf0aa9f3859b78bef
and partially addresses the problem of "Shrink font automatically
when text overflows" by treating text as "Autofit" while it is being
edited.
It's not WYSIWYG, but good enough, and maybe better.

Since that part of the change prevents any way of setting ::Autofit,
I also changed clearing of Fit To Frame to Autofit instead of NONE, since 
there
is no good reason why text should be allowed to spill outside of a textbox.
For those who REALLY want that odd behaviour, they can use
.uno:TextFitToSize (Ctrl-Shift-F8) to toggle between "stretch" and "none".

NONE is still the original default if "Fit to Frame" is never touched. So it
can look a little inconsistent.
1. Turn off "frame height expands with text" and Fit2Frame defaults to
NONE - text can spill out of the textbox.
2. Turn on "Fit to Frame" and Fit2Frame is PROPORTIONAL - the text stretches
to fill the frame.
3. Turn off "Fit to Frame" and Fit2Frame is AUTOFIT - the text will shrink 
to
fit nicely inside of the frame.

Change-Id: I8313a82cbea82f11fad0f50d966fc77874977da9
Reviewed-on: https://gerrit.libreoffice.org/30727
Tested-by: Jenkins 
Reviewed-by: Justin Luth 
Reviewed-by: Thorsten Behrens 
Reviewed-on: https://gerrit.libreoffice.org/30869
Reviewed-by: Jan Holesovsky 

diff --git a/cui/source/tabpages/textattr.cxx b/cui/source/tabpages/textattr.cxx
index 1e92b6c..6305b76 100644
--- a/cui/source/tabpages/textattr.cxx
+++ b/cui/source/tabpages/textattr.cxx
@@ -310,7 +310,11 @@ void SvxTextAttrPage::Reset( const SfxItemSet* rAttrs )
 {
 SdrFitToSizeType eFTS = (SdrFitToSizeType)
 static_cast( rAttrs->Get( 
SDRATTR_TEXT_FITTOSIZE ) ).GetValue();
-m_pTsbFitToSize->SetState( eFTS == SDRTEXTFIT_NONE ? TRISTATE_FALSE : 
TRISTATE_TRUE );
+if( eFTS == SDRTEXTFIT_AUTOFIT || eFTS == SDRTEXTFIT_NONE )
+m_pTsbFitToSize->SetState( TRISTATE_FALSE );
+else
+m_pTsbFitToSize->SetState( TRISTATE_TRUE );
+
 m_pTsbFitToSize->EnableTriState( false );
 }
 else
@@ -408,8 +412,8 @@ bool SvxTextAttrPage::FillItemSet( SfxItemSet* rAttrs)
 default: ; //prevent warning
 OSL_FAIL( "svx::SvxTextAttrPage::FillItemSet(), unhandled 
state!" );
 SAL_FALLTHROUGH;
-case TRISTATE_FALSE: eFTS = SDRTEXTFIT_NONE; break;
-case TRISTATE_TRUE: eFTS = SDRTEXTFIT_AUTOFIT; break;
+case TRISTATE_FALSE: eFTS = SDRTEXTFIT_AUTOFIT; break;
+case TRISTATE_TRUE: eFTS = SDRTEXTFIT_PROPORTIONAL; break;
 }
 rAttrs->Put( SdrTextFitToSizeTypeItem( eFTS ) );
 }
diff --git a/svx/source/svdraw/svdotext.cxx b/svx/source/svdraw/svdotext.cxx
index b7ef71a..e877b83 100644
--- a/svx/source/svdraw/svdotext.cxx
+++ b/svx/source/svdraw/svdotext.cxx
@@ -1968,7 +1968,7 @@ void SdrTextObj::onEditOutlinerStatusEvent( EditStatus* 
pEditStatus )
 {
 AdjustTextFrameWidthAndHeight();
 }
-else if (IsAutoFit() && !mbInDownScale)
+else if ( (IsAutoFit() || IsFitToSize()) && !mbInDownScale)
 {
 assert(pEdtOutl);
 mbInDownScale = 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

2016-11-28 Thread Andras Timar
 cui/source/options/optsave.cxx |   20 +++-
 1 file changed, 15 insertions(+), 5 deletions(-)

New commits:
commit e2b709dda52bc9850bf6893aa24fe53578359d6d
Author: Andras Timar 
Date:   Sat Nov 26 17:00:43 2016 +0100

respect read-only config items in Options - Load/Save - General dialog

Change-Id: I110e8eb2b858c8b86b01d46bec40873939ae53d8
Reviewed-on: https://gerrit.libreoffice.org/31237
Tested-by: Jenkins 
Reviewed-by: Andras Timar 
(cherry picked from commit 5f9bd7677047abfc9d3bde0db78f74ff23204f0d)
Reviewed-on: https://gerrit.libreoffice.org/31239
Reviewed-by: Miklos Vajna 

diff --git a/cui/source/options/optsave.cxx b/cui/source/options/optsave.cxx
index 1130bb8..88e8b12 100644
--- a/cui/source/options/optsave.cxx
+++ b/cui/source/options/optsave.cxx
@@ -398,8 +398,10 @@ void SvxSaveTabPage::Reset( const SfxItemSet* )
 SvtSaveOptions aSaveOpt;
 aLoadUserSettingsCB->Check(aSaveOpt.IsLoadUserSettings());
 aLoadUserSettingsCB->SaveValue();
+
aLoadUserSettingsCB->Enable(!aSaveOpt.IsReadOnly(SvtSaveOptions::E_USEUSERDATA));
 aLoadDocPrinterCB->Check( aSaveOpt.IsLoadDocumentPrinter() );
 aLoadDocPrinterCB->SaveValue();
+
aLoadDocPrinterCB->Enable(!aSaveOpt.IsReadOnly(SvtSaveOptions::E_LOADDOCPRINTER));
 
 if ( !pImpl->bInitialized )
 {
@@ -472,25 +474,33 @@ void SvxSaveTabPage::Reset( const SfxItemSet* )
 }
 
 aDocInfoCB->Check(aSaveOpt.IsDocInfoSave());
+aDocInfoCB->Enable(!aSaveOpt.IsReadOnly(SvtSaveOptions::E_DOCINFSAVE));
 
 aBackupCB->Check(aSaveOpt.IsBackup());
-bool bBackupRO = aSaveOpt.IsReadOnly(SvtSaveOptions::E_BACKUP);
-aBackupCB->Enable(!bBackupRO);
+aBackupCB->Enable(!aSaveOpt.IsReadOnly(SvtSaveOptions::E_BACKUP));
 
 aAutoSaveCB->Check(aSaveOpt.IsAutoSave());
+aAutoSaveCB->Enable(!aSaveOpt.IsReadOnly(SvtSaveOptions::E_AUTOSAVE));
+
 aUserAutoSaveCB->Check(aSaveOpt.IsUserAutoSave());
+
aUserAutoSaveCB->Enable(!aSaveOpt.IsReadOnly(SvtSaveOptions::E_USERAUTOSAVE));
+
 aWarnAlienFormatCB->Check(aSaveOpt.IsWarnAlienFormat());
 
aWarnAlienFormatCB->Enable(!aSaveOpt.IsReadOnly(SvtSaveOptions::E_WARNALIENFORMAT));
 
-aAutoSaveEdit->SetValue( aSaveOpt.GetAutoSaveTime() );
+aAutoSaveEdit->SetValue(aSaveOpt.GetAutoSaveTime());
+
aAutoSaveEdit->Enable(!aSaveOpt.IsReadOnly(SvtSaveOptions::E_AUTOSAVETIME));
 
 // save relatively
-aRelativeFsysCB->Check( aSaveOpt.IsSaveRelFSys() );
+aRelativeFsysCB->Check(aSaveOpt.IsSaveRelFSys());
+
aRelativeFsysCB->Enable(!aSaveOpt.IsReadOnly(SvtSaveOptions::E_SAVERELFSYS));
 
-aRelativeInetCB->Check( aSaveOpt.IsSaveRelINet() );
+aRelativeInetCB->Check(aSaveOpt.IsSaveRelINet());
+
aRelativeInetCB->Enable(!aSaveOpt.IsReadOnly(SvtSaveOptions::E_SAVERELINET));
 
 void* pDefaultVersion = reinterpret_cast( 
aSaveOpt.GetODFDefaultVersion() );
 aODFVersionLB->SelectEntryPos( aODFVersionLB->GetEntryPos( pDefaultVersion 
) );
+
aODFVersionLB->Enable(!aSaveOpt.IsReadOnly(SvtSaveOptions::E_ODFDEFAULTVERSION));
 
 AutoClickHdl_Impl( aAutoSaveCB );
 ODFVersionHdl_Impl( *aODFVersionLB );
___
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

2016-09-30 Thread Caolán McNamara
 cui/source/tabpages/border.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 4235b69dad089432911bb576d7e9412e55843ec6
Author: Caolán McNamara 
Date:   Wed Sep 28 08:53:44 2016 +0100

Resolves: tdf#101475 adjacent cells text is still too wide

Change-Id: I8fae7197b191de4346a4fb0f2226c63bc615b29d
Reviewed-on: https://gerrit.libreoffice.org/29346
Tested-by: Jenkins 
Reviewed-by: Adolfo Jayme Barrientos 

diff --git a/cui/source/tabpages/border.cxx b/cui/source/tabpages/border.cxx
index 10e0302..d252831 100644
--- a/cui/source/tabpages/border.cxx
+++ b/cui/source/tabpages/border.cxx
@@ -140,7 +140,7 @@ SvxBorderTabPage::SvxBorderTabPage(vcl::Window* pParent, 
const SfxItemSet& rCore
 //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()));
+Size 
aSize(m_pRemoveAdjcentCellBordersCB->CalcMinimumSize(20*approximate_char_width()));
 if (aPrefSize.Width() > aSize.Width())
 {
 m_pRemoveAdjcentCellBordersCB->set_width_request(aSize.Width());
___
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

2016-09-21 Thread Caolán McNamara
 cui/source/tabpages/transfrm.cxx |8 
 1 file changed, 4 insertions(+), 4 deletions(-)

New commits:
commit 43a9d36ba9867feae8b52ffbb154c6bc2ac61163
Author: Caolán McNamara 
Date:   Wed Sep 21 10:20:45 2016 +0100

Resolves: tdf#100795 SAL_MIN_INT32 32bit overflows on finding min limit

for control points, so halve it to the practical limit

Change-Id: I1285631bebebf86e257a2fdd804c0c81dcefac96
(cherry picked from commit 25e4708c1f49986f3f082beb2e940aa2d7fb4d81)
Reviewed-on: https://gerrit.libreoffice.org/29132
Tested-by: Jenkins 
Reviewed-by: Michael Stahl 

diff --git a/cui/source/tabpages/transfrm.cxx b/cui/source/tabpages/transfrm.cxx
index cc7c3bf..34cbadd 100644
--- a/cui/source/tabpages/transfrm.cxx
+++ b/cui/source/tabpages/transfrm.cxx
@@ -639,14 +639,14 @@ void SvxSlantTabPage::Reset(const SfxItemSet* rAttrs)
 m_aControlGroups[i]->Enable();
 css::awt::Point aPosition;
 
-aPosition.X = SAL_MAX_INT32;
-aPosition.Y = SAL_MAX_INT32;
+aPosition.X = SAL_MAX_INT32/2;
+aPosition.Y = SAL_MAX_INT32/2;
 aShape.SetHandleControllerPosition(i, aPosition);
 Point aMaxPosition;
 aShape.GetHandlePosition(i, aMaxPosition);
 
-aPosition.X = SAL_MIN_INT32;
-aPosition.Y = SAL_MIN_INT32;
+aPosition.X = SAL_MIN_INT32/2;
+aPosition.Y = SAL_MIN_INT32/2;
 aShape.SetHandleControllerPosition(i, aPosition);
 Point aMinPosition;
 aShape.GetHandlePosition(i, aMinPosition);
___
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 vcl/unx

2016-09-05 Thread Caolán McNamara
 cui/source/options/optpath.cxx |   13 ++---
 vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx   |1 +
 vcl/unx/gtk/fpicker/SalGtkFolderPicker.cxx |1 +
 vcl/unx/gtk/fpicker/SalGtkPicker.cxx   |5 -
 4 files changed, 8 insertions(+), 12 deletions(-)

New commits:
commit 21188796975be8187e234de446aae4371c3b360a
Author: Caolán McNamara 
Date:   Fri Sep 2 21:38:35 2016 +0100

Resolves: tdf#101795 restore hiding on end of Gtk fpicker execute

but don't hide it at the end of every RunDialog::run so that the
dialog still exists and is visible if the "sure you want to overwrite"
dialog needs to be displayed

and restore the cui options stuff to its original state as well,
undoing the earlier efforts of...

commit c1bd3156cf66318023f36d81ce809a38072588e4
Author: Caolán McNamara 
Date:   Thu Jul 21 21:44:06 2016 +0100

Resolves: tdf#101054 crash on options->path with non-native file picker

and

commit 3bbc0574d78d129359638b74612de2f93419eeb0
Author: Caolán McNamara 
Date:   Tue Jul 5 10:16:51 2016 +0100

Resolves: rhbz#1352835 path options doesn't promptly destroy folder 
picker

Change-Id: I5d6bcee9fb0a73a95cc29e8f3f2ee2aea91a135a
(cherry picked from commit 696e83b663d4f3e00f23947613f9f3916a4dd14d)
Reviewed-on: https://gerrit.libreoffice.org/28642
Tested-by: Jenkins 
Reviewed-by: Maxim Monastirsky 

diff --git a/cui/source/options/optpath.cxx b/cui/source/options/optpath.cxx
index 6aa3466..b51694f 100644
--- a/cui/source/options/optpath.cxx
+++ b/cui/source/options/optpath.cxx
@@ -633,12 +633,11 @@ IMPL_LINK_NOARG_TYPED(SvxPathTabPage, PathHdl_Impl, 
Button*, void)
 else
 {
 short nRet = xFolderPicker->execute();
-if (nRet == ExecutableDialogResults::OK)
-{
-OUString sFolder(xFolderPicker->getDirectory());
-ChangeCurrentEntry(sFolder);
-}
-xFolderPicker.clear();
+if (ExecutableDialogResults::OK != nRet)
+return;
+
+OUString sFolder(xFolderPicker->getDirectory());
+ChangeCurrentEntry(sFolder);
 }
 }
 catch( Exception& )
@@ -724,9 +723,9 @@ IMPL_LINK_TYPED( SvxPathTabPage, HeaderEndDrag_Impl, 
HeaderBar*, pBar, void )
 
 IMPL_LINK_TYPED( SvxPathTabPage, DialogClosedHdl, DialogClosedEvent*, pEvt, 
void )
 {
-assert(xFolderPicker.is() && "SvxPathTabPage::DialogClosedHdl(): no folder 
picker");
 if (RET_OK == pEvt->DialogResult)
 {
+assert(xFolderPicker.is() && "SvxPathTabPage::DialogClosedHdl(): no 
folder picker");
 OUString sURL = xFolderPicker->getDirectory();
 ChangeCurrentEntry( sURL );
 }
diff --git a/vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx 
b/vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx
index 4a9453b..8b97bdd 100644
--- a/vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx
+++ b/vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx
@@ -1050,6 +1050,7 @@ sal_Int16 SAL_CALL SalGtkFilePicker::execute() throw( 
uno::RuntimeException, std
 break;
 }
 }
+gtk_widget_hide(m_pDialog);
 
 if (mnHID_FolderChange)
 g_signal_handler_disconnect(GTK_FILE_CHOOSER( m_pDialog ), 
mnHID_FolderChange);
diff --git a/vcl/unx/gtk/fpicker/SalGtkFolderPicker.cxx 
b/vcl/unx/gtk/fpicker/SalGtkFolderPicker.cxx
index 88523da..1f2e46b 100644
--- a/vcl/unx/gtk/fpicker/SalGtkFolderPicker.cxx
+++ b/vcl/unx/gtk/fpicker/SalGtkFolderPicker.cxx
@@ -162,6 +162,7 @@ sal_Int16 SAL_CALL SalGtkFolderPicker::execute() throw( 
uno::RuntimeException, s
 retVal = 0;
 break;
 }
+gtk_widget_hide(m_pDialog);
 
 return retVal;
 }
diff --git a/vcl/unx/gtk/fpicker/SalGtkPicker.cxx 
b/vcl/unx/gtk/fpicker/SalGtkPicker.cxx
index 968051d..d7f72b2 100644
--- a/vcl/unx/gtk/fpicker/SalGtkPicker.cxx
+++ b/vcl/unx/gtk/fpicker/SalGtkPicker.cxx
@@ -182,11 +182,6 @@ gint RunDialog::run()
 if (mxToolkit.is())
 mxToolkit->removeTopWindowListener(this);
 
-#if !GTK_CHECK_VERSION(3,0,0)
-if (nStatus != 1)   //PLAY
-gtk_widget_hide( mpDialog );
-#endif
-
 return nStatus;
 }
 
___
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

2016-09-05 Thread Maxim Monastirsky
 cui/source/inc/numpages.hxx  |2 +-
 cui/source/tabpages/numpages.cxx |6 ++
 2 files changed, 3 insertions(+), 5 deletions(-)

New commits:
commit c356e54e2b2ef67043945d5e5762d3a9015ca41f
Author: Maxim Monastirsky 
Date:   Thu Sep 1 00:27:29 2016 +0300

Gallery submenu was missing from native menus

... for both OS X and gtk3. The reason is that it was
filled in item highlight handler, which isn't implemented
for native menus. Instead use the menu activation handler,
like for the similar button in SvxLineTabPage.

To test this patch open Writer, Format > Bullets and
Numbering... > Options. Switch "Number" to "Graphics",
and click on the "Select" button.

(cherry picked from commit c780c6726dca5e2fe33297e44f25ae3e00703294)

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

diff --git a/cui/source/inc/numpages.hxx b/cui/source/inc/numpages.hxx
index c5243bf..61901fc 100644
--- a/cui/source/inc/numpages.hxx
+++ b/cui/source/inc/numpages.hxx
@@ -318,7 +318,7 @@ class SvxNumOptionsTabPage : public SfxTabPage
 
 DECL_LINK_TYPED( NumberTypeSelectHdl_Impl, ListBox&, void );
 DECL_LINK_TYPED( LevelHdl_Impl, ListBox&, void );
-DECL_LINK_TYPED( PopupActivateHdl_Impl, Menu *, bool);
+DECL_LINK_TYPED( PopupActivateHdl_Impl, MenuButton *, void );
 DECL_LINK_TYPED( GraphicHdl_Impl, MenuButton *, void );
 DECL_LINK_TYPED( BulletHdl_Impl, Button*, void);
 DECL_LINK_TYPED( SizeHdl_Impl, Edit&, void );
diff --git a/cui/source/tabpages/numpages.cxx b/cui/source/tabpages/numpages.cxx
index 22d23e0..ff8d562 100644
--- a/cui/source/tabpages/numpages.cxx
+++ b/cui/source/tabpages/numpages.cxx
@@ -1217,6 +1217,7 @@ SvxNumOptionsTabPage::SvxNumOptionsTabPage(vcl::Window* 
pParent,
 m_pBulletPB->SetClickHdl(LINK(this, SvxNumOptionsTabPage, BulletHdl_Impl));
 m_pFmtLB->SetSelectHdl(LINK(this, SvxNumOptionsTabPage, 
NumberTypeSelectHdl_Impl));
 m_pBitmapMB->SetSelectHdl(LINK(this, SvxNumOptionsTabPage, 
GraphicHdl_Impl));
+m_pBitmapMB->SetActivateHdl(LINK(this, SvxNumOptionsTabPage, 
PopupActivateHdl_Impl));
 m_pLevelLB->EnableMultiSelection(true);
 m_pLevelLB->SetSelectHdl(LINK(this, SvxNumOptionsTabPage, LevelHdl_Impl));
 m_pCharFmtLB->SetSelectHdl(LINK(this, SvxNumOptionsTabPage, 
CharFmtHdl_Impl));
@@ -1235,8 +1236,6 @@ SvxNumOptionsTabPage::SvxNumOptionsTabPage(vcl::Window* 
pParent,
 aInvalidateTimer.SetTimeout(50);
 
 Menu *pBitmapMenu = m_pBitmapMB->GetPopupMenu();
-
-pBitmapMenu->SetHighlightHdl(LINK(this, SvxNumOptionsTabPage, 
PopupActivateHdl_Impl));
 m_nGalleryId = pBitmapMenu->GetItemId("gallery");
 assert(m_nGalleryId != MENU_ITEM_NOTFOUND);
 PopupMenu* pPopup = new PopupMenu;
@@ -2116,7 +2115,7 @@ IMPL_LINK_TYPED( SvxNumOptionsTabPage, GraphicHdl_Impl, 
MenuButton *, pButton, v
 }
 }
 
-IMPL_LINK_NOARG_TYPED(SvxNumOptionsTabPage, PopupActivateHdl_Impl, Menu *, 
bool)
+IMPL_LINK_NOARG_TYPED(SvxNumOptionsTabPage, PopupActivateHdl_Impl, MenuButton 
*, void)
 {
 if(!bMenuButtonInitialized)
 {
@@ -2168,7 +2167,6 @@ IMPL_LINK_NOARG_TYPED(SvxNumOptionsTabPage, 
PopupActivateHdl_Impl, Menu *, bool)
 }
 LeaveWait();
 }
-return false;
 }
 
 IMPL_LINK_NOARG_TYPED(SvxNumOptionsTabPage, BulletHdl_Impl, Button*, void)
___
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

2016-09-02 Thread Caolán McNamara
 cui/source/dialogs/hyphen.cxx |9 ++---
 1 file changed, 6 insertions(+), 3 deletions(-)

New commits:
commit b9375c082822e4a1030c9dfca8cb0c959b78633d
Author: Caolán McNamara 
Date:   Tue Aug 30 17:52:41 2016 +0100

Resolves: tdf#97055 hyphenation claims its already active after closing

cancel button works, hyphen all works, but closing it via wm close
skips the cancel callback.

simplest thing seems to be to call SpellEnd when necessary, flagging
that its not necessary by disabling the close button on the RET_OK
case

Change-Id: Ib0a67c4395e9d20941e735ebb14f6bd7f7ddb66c
(cherry picked from commit c7fd6532682a12d8981e6b19b4fbb75d6d3c412c)
Reviewed-on: https://gerrit.libreoffice.org/28503
Tested-by: Jenkins 
Reviewed-by: Miklos Vajna 

diff --git a/cui/source/dialogs/hyphen.cxx b/cui/source/dialogs/hyphen.cxx
index 06ed08c..4798a13 100644
--- a/cui/source/dialogs/hyphen.cxx
+++ b/cui/source/dialogs/hyphen.cxx
@@ -268,7 +268,10 @@ void SvxHyphenWordDialog::ContinueHyph_Impl( sal_Int32 
nInsPos )
 }
 }
 else
-EndDialog( RET_OK );
+{
+m_pCloseBtn->Disable();
+EndDialog(RET_OK);
+}
 }
 
 
@@ -399,7 +402,6 @@ IMPL_LINK_NOARG_TYPED(SvxHyphenWordDialog, CancelHdl_Impl, 
Button*, void)
 if( !m_bBusy )
 {
 m_bBusy = true;
-m_pHyphWrapper->SpellEnd();
 EndDialog();
 m_bBusy = false;
 }
@@ -501,6 +503,8 @@ SvxHyphenWordDialog::~SvxHyphenWordDialog()
 
 void SvxHyphenWordDialog::dispose()
 {
+if (m_pCloseBtn->IsEnabled())
+m_pHyphWrapper->SpellEnd();
 m_pWordEdit.clear();
 m_pLeftBtn.clear();
 m_pRightBtn.clear();
@@ -512,7 +516,6 @@ void SvxHyphenWordDialog::dispose()
 SfxModalDialog::dispose();
 }
 
-
 void SvxHyphenWordDialog::SetWindowTitle( LanguageType nLang )
 {
 SetText( m_aLabel + " (" + SvtLanguageTable::GetLanguageString( nLang ) + 
")" );
___
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-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

2016-07-22 Thread Caolán McNamara
 cui/source/options/optpath.cxx |1 -
 1 file changed, 1 deletion(-)

New commits:
commit aafdbb7763b939742050159ce784b799f26eb834
Author: Caolán McNamara 
Date:   Thu Jul 21 21:44:06 2016 +0100

Resolves: tdf#101054 crash on options->path with non-native file picker

regression from...

commit 3bbc0574d78d129359638b74612de2f93419eeb0
Author: Caolán McNamara 
Date:   Tue Jul 5 10:16:51 2016 +0100

Resolves: rhbz#1352835 path options doesn't promptly destroy folder 
picker

only clear the xFolderPicker immediately in the non-async case

Change-Id: Id6a411424d41262a9379ad3eb7976c8dd666a5cf
(cherry picked from commit c1bd3156cf66318023f36d81ce809a38072588e4)
Reviewed-on: https://gerrit.libreoffice.org/27417
Reviewed-by: Markus Mohrhard 
Tested-by: Jenkins 

diff --git a/cui/source/options/optpath.cxx b/cui/source/options/optpath.cxx
index 7c2de67..6aa3466 100644
--- a/cui/source/options/optpath.cxx
+++ b/cui/source/options/optpath.cxx
@@ -730,7 +730,6 @@ IMPL_LINK_TYPED( SvxPathTabPage, DialogClosedHdl, 
DialogClosedEvent*, pEvt, void
 OUString sURL = xFolderPicker->getDirectory();
 ChangeCurrentEntry( sURL );
 }
-xFolderPicker.clear();
 }
 
 void SvxPathTabPage::GetPathList(
___
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


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

2016-07-13 Thread Markus Mohrhard
 cui/source/options/personalization.cxx |3 +++
 1 file changed, 3 insertions(+)

New commits:
commit 1dd48f927affcd394499bd945d2ce78f229471ee
Author: Markus Mohrhard 
Date:   Sun Jul 10 12:23:10 2016 +0200

make sure that the thread has joined before disposing UI elements

See e.g.

http://crashreport.libreoffice.org/stats/crash_details/80884848-16e7-4512-be4a-74c53bfce34b#allthreads

The thread can run while the UI elements have already been disposed. The
StopExecute call is not enough to prevent that from happening.

Reviewed-on: https://gerrit.libreoffice.org/27087
Tested-by: Jenkins 
Reviewed-by: Markus Mohrhard 
(cherry picked from commit 4ebbb996ac159f57e0730c938667535af148cae1)

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

diff --git a/cui/source/options/personalization.cxx 
b/cui/source/options/personalization.cxx
index b752f30..55f04f6 100644
--- a/cui/source/options/personalization.cxx
+++ b/cui/source/options/personalization.cxx
@@ -107,6 +107,9 @@ SelectPersonaDialog::~SelectPersonaDialog()
 
 void SelectPersonaDialog::dispose()
 {
+if (m_rSearchThread.is())
+m_rSearchThread->join();
+
 m_pEdit.clear();
 m_pSearchButton.clear();
 m_pProgressLabel.clear();
___
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

2016-07-11 Thread Caolán McNamara
 cui/source/options/optpath.cxx |   19 +--
 1 file changed, 9 insertions(+), 10 deletions(-)

New commits:
commit 18b904faafb756fd28d40467153d191122f6a731
Author: Caolán McNamara 
Date:   Tue Jul 5 10:16:51 2016 +0100

Resolves: rhbz#1352835 path options doesn't promptly destroy folder picker

Change-Id: I5133f63fd92f384221fa2812c6e2a0e7f3b37ac1
(cherry picked from commit 3bbc0574d78d129359638b74612de2f93419eeb0)
Reviewed-on: https://gerrit.libreoffice.org/26941
Tested-by: Jenkins 
Reviewed-by: Eike Rathke 
Tested-by: Eike Rathke 

diff --git a/cui/source/options/optpath.cxx b/cui/source/options/optpath.cxx
index 2a52540..7c2de67 100644
--- a/cui/source/options/optpath.cxx
+++ b/cui/source/options/optpath.cxx
@@ -633,11 +633,12 @@ IMPL_LINK_NOARG_TYPED(SvxPathTabPage, PathHdl_Impl, 
Button*, void)
 else
 {
 short nRet = xFolderPicker->execute();
-if ( ExecutableDialogResults::OK != nRet )
-return;
-
-OUString sFolder( xFolderPicker->getDirectory() );
-ChangeCurrentEntry( sFolder );
+if (nRet == ExecutableDialogResults::OK)
+{
+OUString sFolder(xFolderPicker->getDirectory());
+ChangeCurrentEntry(sFolder);
+}
+xFolderPicker.clear();
 }
 }
 catch( Exception& )
@@ -721,19 +722,17 @@ IMPL_LINK_TYPED( SvxPathTabPage, HeaderEndDrag_Impl, 
HeaderBar*, pBar, void )
 }
 }
 
-
 IMPL_LINK_TYPED( SvxPathTabPage, DialogClosedHdl, DialogClosedEvent*, pEvt, 
void )
 {
-if ( RET_OK == pEvt->DialogResult )
+assert(xFolderPicker.is() && "SvxPathTabPage::DialogClosedHdl(): no folder 
picker");
+if (RET_OK == pEvt->DialogResult)
 {
-DBG_ASSERT( xFolderPicker.is(), "SvxPathTabPage::DialogClosedHdl(): no 
folder picker" );
-
 OUString sURL = xFolderPicker->getDirectory();
 ChangeCurrentEntry( sURL );
 }
+xFolderPicker.clear();
 }
 
-
 void SvxPathTabPage::GetPathList(
 sal_uInt16 _nPathHandle, OUString& _rInternalPath,
 OUString& _rUserPath, OUString& _rWritablePath, bool& _rReadOnly )
___
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

2016-06-27 Thread Tor Lillqvist
 cui/source/options/optopencl.cxx |   10 --
 1 file changed, 4 insertions(+), 6 deletions(-)

New commits:
commit aaeeb0288dfd9beb33efc0a693bc1a025986
Author: Tor Lillqvist 
Date:   Mon Jun 27 10:28:55 2016 +0300

tdf#100222: Show the dialog just once even if both toggles were changed

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

diff --git a/cui/source/options/optopencl.cxx b/cui/source/options/optopencl.cxx
index 6f01523..52c8b08 100644
--- a/cui/source/options/optopencl.cxx
+++ b/cui/source/options/optopencl.cxx
@@ -155,9 +155,6 @@ bool SvxOpenCLTabPage::FillItemSet( SfxItemSet* )
 {
 
officecfg::Office::Common::Misc::UseSwInterpreter::set(mpUseSwInterpreter->IsChecked(),
 batch);
 bModified = true;
-
-ScopedVclPtrInstance aWarnBox(this, 
CUI_RES(RID_SVXSTR_OPTIONS_RESTART), VCL_MESSAGE_INFO);
-aWarnBox->Execute();
 }
 
 if (mpUseOpenCL->IsValueChangedFromSaved())
@@ -167,13 +164,14 @@ bool SvxOpenCLTabPage::FillItemSet( SfxItemSet* )
 {
 maConfig.set();
 bModified = true;
-
-ScopedVclPtrInstance aWarnBox(this, 
CUI_RES(RID_SVXSTR_OPTIONS_RESTART), VCL_MESSAGE_INFO);
-aWarnBox->Execute();
 }
 
 if (bModified)
+{
+ScopedVclPtrInstance aWarnBox(this, 
CUI_RES(RID_SVXSTR_OPTIONS_RESTART), VCL_MESSAGE_INFO);
+aWarnBox->Execute();
 batch->commit();
+}
 
 return bModified;
 }
___
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

2016-06-26 Thread Tor Lillqvist
 cui/source/options/optopencl.cxx |3 +++
 1 file changed, 3 insertions(+)

New commits:
commit 169e9fb16f025bc5791d3ea5242596e3dcc4f023
Author: Tor Lillqvist 
Date:   Thu Jun 23 17:40:30 2016 +0300

tdf#100222: Inform user that a restart is needed after toggling OpenCL use

(cherry picked from commit c7c27b9b191291cf36e4940aef3e3e7371855797)

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

diff --git a/cui/source/options/optopencl.cxx b/cui/source/options/optopencl.cxx
index 250cae9..6f01523 100644
--- a/cui/source/options/optopencl.cxx
+++ b/cui/source/options/optopencl.cxx
@@ -167,6 +167,9 @@ bool SvxOpenCLTabPage::FillItemSet( SfxItemSet* )
 {
 maConfig.set();
 bModified = true;
+
+ScopedVclPtrInstance aWarnBox(this, 
CUI_RES(RID_SVXSTR_OPTIONS_RESTART), VCL_MESSAGE_INFO);
+aWarnBox->Execute();
 }
 
 if (bModified)
___
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

2016-06-09 Thread Caolán McNamara
 cui/source/tabpages/textattr.cxx |6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

New commits:
commit 65d1e5294c9f0d9300dbb92f6670cdcafa8a1ac2
Author: Caolán McNamara 
Date:   Thu Jun 9 09:08:08 2016 +0100

Resolves: tdf#93135 can't resize shape with "resize shape to fit text"

These are regressions from...

commit 4a847bb4a2002d7f8f5854b7276ac67d369bdd3b
Date:   Sun Aug 2 21:20:48 2015 +0200

tdf#93079:  "resize shape to fit text" state can't be disabled

Wrong copy-paste

and

commit b2bae9b940fc34d2eecd7839e3cba1f41d111e87
Date:   Thu Apr 9 23:38:47 2015 +0200

Related tdf#34467: Fit to Frame for text boxes is broken

Wrong Copy-paste

Its turns out that there is *no* SDRATTR_TEXT_AUTOGROWSIZE property.
Only a SDRATTR_TEXT_AUTOGROWHEIGHT property

e.g. see CustomShapeProperties::UpdateTextFrameStatus of
svx/source/sdr/properties/customshapeproperties.cxx

"change TextFrame flag when bResizeShapeToFitText changes (which is mapped 
on
the item SDRATTR_TEXT_AUTOGROWHEIGHT for custom shapes, argh)"

So the inconsistency between

getting the itemstate of SDRATTR_TEXT_AUTOGROWSIZE
and then
setting/getting SDRATTR_TEXT_AUTOGROWHEIGHT
is better resolved by getting the itemstate of SDRATTR_TEXT_AUTOGROWHEIGHT

will have a follow up patch to remove SDRATTR_TEXT_AUTOGROWSIZE to show
its not used by anything

Change-Id: I8b8abde17c15761c621815ed2be62d6a8a5cd69a
(cherry picked from commit d1df071c3fc452817746a8daa13000d2df667aba)

diff --git a/cui/source/tabpages/textattr.cxx b/cui/source/tabpages/textattr.cxx
index 315e664..1e92b6c 100644
--- a/cui/source/tabpages/textattr.cxx
+++ b/cui/source/tabpages/textattr.cxx
@@ -204,9 +204,9 @@ void SvxTextAttrPage::Reset( const SfxItemSet* rAttrs )
 m_pTsbAutoGrowWidth->SaveValue();
 
 // autogrowsize
-if ( rAttrs->GetItemState( SDRATTR_TEXT_AUTOGROWSIZE ) != 
SfxItemState::DONTCARE )
+if ( rAttrs->GetItemState( SDRATTR_TEXT_AUTOGROWHEIGHT ) != 
SfxItemState::DONTCARE )
 {
-m_pTsbAutoGrowSize->SetState( static_cast( 
rAttrs->Get( SDRATTR_TEXT_AUTOGROWSIZE ) ).
+m_pTsbAutoGrowSize->SetState( static_cast( 
rAttrs->Get( SDRATTR_TEXT_AUTOGROWHEIGHT ) ).
 GetValue() ? TRISTATE_TRUE : TRISTATE_FALSE );
 m_pTsbAutoGrowSize->EnableTriState( false );
 }
@@ -384,7 +384,7 @@ bool SvxTextAttrPage::FillItemSet( SfxItemSet* rAttrs)
 eState = m_pTsbAutoGrowSize->GetState();
 if( m_pTsbAutoGrowSize->IsValueChangedFromSaved() )
 {
-rAttrs->Put( makeSdrTextAutoGrowSizeItem ( TRISTATE_TRUE == eState ) );
+rAttrs->Put( makeSdrTextAutoGrowHeightItem( TRISTATE_TRUE == eState ) 
);
 }
 
 eState = m_pTsbWordWrapText->GetState();
___
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

2016-05-29 Thread Caolán McNamara
 cui/source/dialogs/cuicharmap.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit f0e35cb2fb6f0f595d44c7a7c01ddaf60b19d642
Author: Caolán McNamara 
Date:   Sun May 29 20:26:12 2016 +0100

Resolves: tdf#97839 a single character may be more than 1 utf-16 code points

Change-Id: Iba2460bfb9335615796db3f5e233b870a8d63339
(cherry picked from commit 847cdd8efd0662d61d288a4d944edc30e864d145)

diff --git a/cui/source/dialogs/cuicharmap.cxx 
b/cui/source/dialogs/cuicharmap.cxx
index dc582d6..dff40ae 100644
--- a/cui/source/dialogs/cuicharmap.cxx
+++ b/cui/source/dialogs/cuicharmap.cxx
@@ -518,7 +518,7 @@ IMPL_LINK_NOARG_TYPED(SvxCharacterMap, CharSelectHdl, 
SvxShowCharSet*, void)
 else
 m_pShowText->SetText( aOUStr );
 
-m_pShowText->SetSelection( Selection( nPos + 1 ) );
+m_pShowText->SetSelection(Selection(nPos + aOUStr.getLength()));
 }
 
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits