[Libreoffice-commits] core.git: 2 commits - cui/source svx/source
cui/source/inc/align.hxx | 12 +- cui/source/tabpages/align.cxx | 48 ++ svx/source/items/pageitem.cxx | 31 +++ 3 files changed, 77 insertions(+), 14 deletions(-) New commits: commit e79befa6898aef6616adca9e89398242abe9dc5a Author: Caolán McNamara AuthorDate: Fri May 17 17:09:16 2019 +0100 Commit: Caolán McNamara CommitDate: Sat May 18 22:39:43 2019 +0200 Resolves: tdf#124467 enable wrap text to return to TRISTATE_INDET Change-Id: Ie956560885fd9bb9e7367018a2f6e37a26c3c6af Reviewed-on: https://gerrit.libreoffice.org/72494 Tested-by: Jenkins Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara diff --git a/cui/source/inc/align.hxx b/cui/source/inc/align.hxx index 374a57c7e25a..063d5b1f59f5 100644 --- a/cui/source/inc/align.hxx +++ b/cui/source/inc/align.hxx @@ -71,9 +71,19 @@ private: boolHasAlignmentChanged( const SfxItemSet& rNew, sal_uInt16 nWhich ) const; DECL_LINK(UpdateEnableHdl, weld::ComboBox&, void); -DECL_LINK(UpdateEnableClickHdl, weld::ToggleButton&, void); +DECL_LINK(StackedClickHdl, weld::ToggleButton&, void); +DECL_LINK(AsianModeClickHdl, weld::ToggleButton&, void); +DECL_LINK(WrapClickHdl, weld::ToggleButton&, void); +DECL_LINK(HyphenClickHdl, weld::ToggleButton&, void); +DECL_LINK(ShrinkClickHdl, weld::ToggleButton&, void); private: +weld::TriStateEnabled m_aStackedState; +weld::TriStateEnabled m_aAsianModeState; +weld::TriStateEnabled m_aWrapState; +weld::TriStateEnabled m_aHyphenState; +weld::TriStateEnabled m_aShrinkState; + SvxDialControl m_aCtrlDial; SvtValueSet m_aVsRefEdge; diff --git a/cui/source/tabpages/align.cxx b/cui/source/tabpages/align.cxx index e9cf3930b3fb..900a91f7acd8 100644 --- a/cui/source/tabpages/align.cxx +++ b/cui/source/tabpages/align.cxx @@ -143,8 +143,12 @@ AlignmentTabPage::AlignmentTabPage(TabPageParent pParent, const SfxItemSet& rCor InitVsRefEgde(); m_xLbHorAlign->connect_changed(LINK(this, AlignmentTabPage, UpdateEnableHdl)); -m_xBtnWrap->connect_toggled(LINK(this, AlignmentTabPage, UpdateEnableClickHdl)); -m_xCbStacked->connect_toggled(LINK(this, AlignmentTabPage, UpdateEnableClickHdl)); + +m_xCbStacked->connect_toggled(LINK(this, AlignmentTabPage, StackedClickHdl)); +m_xCbAsianMode->connect_toggled(LINK(this, AlignmentTabPage, AsianModeClickHdl)); +m_xBtnWrap->connect_toggled(LINK(this, AlignmentTabPage, WrapClickHdl)); +m_xBtnHyphen->connect_toggled(LINK(this, AlignmentTabPage, HyphenClickHdl)); +m_xBtnShrink->connect_toggled(LINK(this, AlignmentTabPage, ShrinkClickHdl)); // Asian vertical mode m_xCbAsianMode->set_visible(SvtCJKOptions().IsVerticalTextEnabled()); @@ -322,26 +326,30 @@ bool AlignmentTabPage::FillItemSet( SfxItemSet* rSet ) namespace { -void ResetBool(sal_uInt16 nWhich, const SfxItemSet* pSet, weld::CheckButton& rBtn) +void ResetBool(sal_uInt16 nWhich, const SfxItemSet* pSet, weld::CheckButton& rBtn, weld::TriStateEnabled& rTriState) { SfxItemState eState = pSet->GetItemState(nWhich); switch (eState) { case SfxItemState::UNKNOWN: rBtn.hide(); +rTriState.bTriStateEnabled = false; break; case SfxItemState::DISABLED: case SfxItemState::READONLY: rBtn.set_sensitive(false); +rTriState.bTriStateEnabled = false; break; case SfxItemState::DONTCARE: rBtn.set_state(TRISTATE_INDET); +rTriState.bTriStateEnabled = true; break; case SfxItemState::DEFAULT: case SfxItemState::SET: { const SfxBoolItem& rItem = static_cast(pSet->Get(nWhich)); rBtn.set_state(static_cast(rItem.GetValue())); +rTriState.bTriStateEnabled = false; break; } } @@ -353,11 +361,11 @@ void AlignmentTabPage::Reset(const SfxItemSet* pCoreAttrs) { SfxTabPage::Reset(pCoreAttrs); -ResetBool(GetWhich(SID_ATTR_ALIGN_STACKED), pCoreAttrs, *m_xCbStacked); -ResetBool(GetWhich(SID_ATTR_ALIGN_ASIANVERTICAL), pCoreAttrs, *m_xCbAsianMode); -ResetBool(GetWhich(SID_ATTR_ALIGN_LINEBREAK), pCoreAttrs, *m_xBtnWrap); -ResetBool(GetWhich(SID_ATTR_ALIGN_HYPHENATION), pCoreAttrs, *m_xBtnHyphen); -ResetBool(GetWhich(SID_ATTR_ALIGN_SHRINKTOFIT), pCoreAttrs, *m_xBtnShrink); +ResetBool(GetWhich(SID_ATTR_ALIGN_STACKED), pCoreAttrs, *m_xCbStacked, m_aStackedState); +ResetBool(GetWhich(SID_ATTR_ALIGN_ASIANVERTICAL), pCoreAttrs, *m_xCbAsianMode, m_aAsianModeState); +ResetBool(GetWhich(SID_ATTR_ALIGN_LINEBREAK), pCoreAttrs, *m_xBtnWrap, m_aWrapState); +ResetBool(GetWhich(SID_ATTR_ALIGN_HYPHENATION), pCoreAttrs, *m_xBtnHyphen,
[Libreoffice-commits] core.git: 2 commits - cui/source svx/source
cui/source/tabpages/chardlg.cxx | 16 ++ svx/source/tbxctrls/tbcontrl.cxx | 61 +++ 2 files changed, 46 insertions(+), 31 deletions(-) New commits: commit 0fa4efec2e58ecd8d749972f1e8c2a20d1c3a6bc Author: Caolán McNamaraDate: Mon Feb 20 21:24:25 2017 + Resolves: tdf#106099 tweak to restore old behaviour wrt initial default color if none gets set. This doesn't fix the various bizarre things in font and replace by formats, just restore to its historical initial behaviour Change-Id: I82cc3f05d2f205947a140483537baae882e91530 diff --git a/svx/source/tbxctrls/tbcontrl.cxx b/svx/source/tbxctrls/tbcontrl.cxx index 28bc427..a73c223 100644 --- a/svx/source/tbxctrls/tbcontrl.cxx +++ b/svx/source/tbxctrls/tbcontrl.cxx @@ -1447,35 +1447,44 @@ NamedColor SvxColorWindow::GetNoneColor() const return std::make_pair(aColor, sColorName); } -NamedColor SvxColorWindow::GetAutoColor() const +namespace { -Color aColor; -OUString sColorName; -switch (theSlotId) +NamedColor GetAutoColor(sal_uInt16 nSlotId) { -case SID_ATTR_CHAR_COLOR_BACKGROUND: -case SID_BACKGROUND_COLOR: -case SID_ATTR_CHAR_BACK_COLOR: -aColor = COL_TRANSPARENT; -sColorName = SVX_RESSTR(RID_SVXSTR_NOFILL); -break; -case SID_AUTHOR_COLOR: -aColor = COL_TRANSPARENT; -sColorName = SVX_RESSTR(RID_SVXSTR_BY_AUTHOR); -break; -case SID_BMPMASK_COLOR: -aColor = COL_TRANSPARENT; -sColorName = SVX_RESSTR(RID_SVXSTR_TRANSPARENT); -break; -case SID_ATTR_CHAR_COLOR: -case SID_ATTR_CHAR_COLOR2: -case SID_EXTRUSION_3D_COLOR: -aColor = COL_AUTO; -sColorName = SVX_RESSTR(RID_SVXSTR_AUTOMATIC); -break; +Color aColor; +OUString sColorName; +switch (nSlotId) +{ +case SID_ATTR_CHAR_COLOR_BACKGROUND: +case SID_BACKGROUND_COLOR: +case SID_ATTR_CHAR_BACK_COLOR: +aColor = COL_TRANSPARENT; +sColorName = SVX_RESSTR(RID_SVXSTR_NOFILL); +break; +case SID_AUTHOR_COLOR: +aColor = COL_TRANSPARENT; +sColorName = SVX_RESSTR(RID_SVXSTR_BY_AUTHOR); +break; +case SID_BMPMASK_COLOR: +aColor = COL_TRANSPARENT; +sColorName = SVX_RESSTR(RID_SVXSTR_TRANSPARENT); +break; +case SID_ATTR_CHAR_COLOR: +case SID_ATTR_CHAR_COLOR2: +case SID_EXTRUSION_3D_COLOR: +default: +aColor = COL_AUTO; +sColorName = SVX_RESSTR(RID_SVXSTR_AUTOMATIC); +break; +} + +return std::make_pair(aColor, sColorName); } +} -return std::make_pair(aColor, sColorName); +NamedColor SvxColorWindow::GetAutoColor() const +{ +return ::GetAutoColor(theSlotId); } IMPL_LINK(SvxColorWindow, AutoColorClickHdl, Button*, pButton, void) @@ -3209,7 +3218,9 @@ SvxColorListBox::SvxColorListBox(vcl::Window* pParent, WinBits nStyle) , m_nSlotId(0) , m_bShowNoneButton(false) { +m_aSelectedColor = GetAutoColor(m_nSlotId); LockWidthRequest(); +ShowPreview(m_aSelectedColor); SetActivateHdl(LINK(this, SvxColorListBox, MenuActivateHdl)); } commit 609670933a80f670d5f6adc4bcdd71781c43c9fa Author: Caolán McNamara Date: Mon Feb 20 12:32:12 2017 + Related: tdf#106099 avoid casting LISTBOX_ENTRY_NOTFOUND to FontEmphasisMark Change-Id: I7119e47c71f96af27351665ee08ea42b0ae0a622 diff --git a/cui/source/tabpages/chardlg.cxx b/cui/source/tabpages/chardlg.cxx index 0ce4e2d..2fa3116 100644 --- a/cui/source/tabpages/chardlg.cxx +++ b/cui/source/tabpages/chardlg.cxx @@ -1498,12 +1498,16 @@ void SvxCharEffectsPage::UpdatePreview_Impl() rCTLFont.SetStrikeout( eStrikeout ); nPos = m_pPositionLB->GetSelectEntryPos(); -bool bUnder = ( CHRDLG_POSITION_UNDER == reinterpret_cast(m_pPositionLB->GetEntryData( nPos )) ); -FontEmphasisMark eMark = (FontEmphasisMark)m_pEmphasisLB->GetSelectEntryPos(); -eMark |= bUnder ? FontEmphasisMark::PosBelow : FontEmphasisMark::PosAbove; -rFont.SetEmphasisMark( eMark ); -rCJKFont.SetEmphasisMark( eMark ); -rCTLFont.SetEmphasisMark( eMark ); +sal_Int32 nEmphasis = m_pEmphasisLB->GetSelectEntryPos(); +if (nEmphasis != LISTBOX_ENTRY_NOTFOUND) +{ +bool bUnder = ( CHRDLG_POSITION_UNDER == reinterpret_cast(m_pPositionLB->GetEntryData( nPos )) ); +FontEmphasisMark eMark = (FontEmphasisMark)nEmphasis; +eMark |= bUnder ? FontEmphasisMark::PosBelow : FontEmphasisMark::PosAbove; +rFont.SetEmphasisMark( eMark ); +rCJKFont.SetEmphasisMark( eMark ); +rCTLFont.SetEmphasisMark( eMark
[Libreoffice-commits] core.git: 2 commits - cui/source svx/source
cui/source/inc/grfpage.hxx |1 + cui/source/tabpages/grfpage.cxx |5 + svx/source/svdraw/svdoashp.cxx |2 +- 3 files changed, 7 insertions(+), 1 deletion(-) New commits: commit dfddb1d3029e1f129e94b5a2e802f32dd03fe188 Author: Caolán McNamara caol...@redhat.com Date: Fri Jan 17 17:10:19 2014 + need to call SetFrameSize on Resize otherwise if the crop tab is not the initial tab shown then it doesn't repaint correctly when it is shown Change-Id: Ie61819fe3fb089b716547fa5e54352ae04fd8087 diff --git a/cui/source/inc/grfpage.hxx b/cui/source/inc/grfpage.hxx index 474565d..0b13e11 100644 --- a/cui/source/inc/grfpage.hxx +++ b/cui/source/inc/grfpage.hxx @@ -36,6 +36,7 @@ public: SvxCropExample( Window* pPar, WinBits nStyle ); virtual void Paint( const Rectangle rRect ); +virtual void Resize(); virtual Size GetOptimalSize() const; void SetTopLeft( const Point rNew ){ aTopLeft = rNew; } diff --git a/cui/source/tabpages/grfpage.cxx b/cui/source/tabpages/grfpage.cxx index 1a2592f..6b27019 100644 --- a/cui/source/tabpages/grfpage.cxx +++ b/cui/source/tabpages/grfpage.cxx @@ -786,6 +786,11 @@ void SvxCropExample::Paint( const Rectangle ) DrawRect( aRect ); } +void SvxCropExample::Resize() +{ +SetFrameSize(aFrameSize); +} + void SvxCropExample::SetFrameSize( const Size rSz ) { aFrameSize = rSz; commit 285d62c554956d44a66128f57952de492037ffde Author: Andre Fischer a...@apache.org Date: Fri Jan 17 15:45:31 2014 + 105491: Switched update of vertical flag and setting the item set to avoid infinite recursion. (cherry picked from commit bb94c19d2c7df1c468d38b7744e0d34e8ac27a99) diff --git a/svx/source/svdraw/svdoashp.cxx b/svx/source/svdraw/svdoashp.cxx index 783f046..7e213b7 100644 --- a/svx/source/svdraw/svdoashp.cxx +++ b/svx/source/svdraw/svdoashp.cxx @@ -2298,10 +2298,10 @@ void SdrObjCustomShape::SetVerticalWriting( sal_Bool bVertical ) case SDRTEXTHORZADJUST_BLOCK: aNewSet.Put(SdrTextVertAdjustItem(SDRTEXTVERTADJUST_BLOCK)); break; } -SetObjectItemSet( aNewSet ); pOutlinerParaObject = GetOutlinerParaObject(); if ( pOutlinerParaObject ) pOutlinerParaObject-SetVertical(bVertical); +SetObjectItemSet( aNewSet ); // restore object size SetSnapRect(aObjectRect); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: 2 commits - cui/source svx/source
cui/source/options/optinet2.cxx |1 svx/source/svdraw/svdotextdecomposition.cxx | 35 +++- 2 files changed, 34 insertions(+), 2 deletions(-) New commits: commit 76a0b3170664b19c3eb66edc8fccb04dc5485387 Author: Caolán McNamara caol...@redhat.com Date: Fri Jan 10 16:49:19 2014 + Resolves: fdo#35779 set the bg color of the editeng from the text shape Change-Id: I75feaea2dbd6c703cb3093c119a69985ecd89419 diff --git a/svx/source/svdraw/svdotextdecomposition.cxx b/svx/source/svdraw/svdotextdecomposition.cxx index 970ddf8..b01aab4 100644 --- a/svx/source/svdraw/svdotextdecomposition.cxx +++ b/svx/source/svdraw/svdotextdecomposition.cxx @@ -18,8 +18,10 @@ */ -#include svx/svdotext.hxx +#include svx/svdetc.hxx #include svx/svdoutl.hxx +#include svx/svdpage.hxx +#include svx/svdotext.hxx #include basegfx/vector/b2dvector.hxx #include svx/sdr/primitive2d/sdrtextprimitive2d.hxx #include drawinglayer/primitive2d/textprimitive2d.hxx @@ -882,6 +884,36 @@ void SdrTextObj::impDecomposeBlockTextPrimitive( rOutliner.SetMinAutoPaperSize(aNullSize); rOutliner.SetMaxAutoPaperSize(Size(100,100)); +// Resolves: fdo#35779 set background color of this shape as the editeng background if there +// is one. Check the shape itself, then the host page, then that page's master page. +// That color needs to be restored on leaving this method +Color aOriginalBackColor(rOutliner.GetBackgroundColor()); +const SfxItemSet* pBackgroundFillSet = GetObjectItemSet(); + +if (XFILL_NONE == ((const XFillStyleItem)pBackgroundFillSet-Get(XATTR_FILLSTYLE)).GetValue()) +{ +SdrPage *pOwnerPage = GetPage(); +if (pOwnerPage) +{ +pBackgroundFillSet = pOwnerPage-getSdrPageProperties().GetItemSet(); + +if (XFILL_NONE == ((const XFillStyleItem)pBackgroundFillSet-Get(XATTR_FILLSTYLE)).GetValue()) +{ +if (!pOwnerPage-IsMasterPage() pOwnerPage-TRG_HasMasterPage()) +{ +pBackgroundFillSet = pOwnerPage-TRG_GetMasterPage().getSdrPageProperties().GetItemSet(); +} +} +} +} + +if (XFILL_NONE != ((const XFillStyleItem)pBackgroundFillSet-Get(XATTR_FILLSTYLE)).GetValue()) +{ +Color aColor(rOutliner.GetBackgroundColor()); +GetDraftFillColor(*pBackgroundFillSet, aColor); +rOutliner.SetBackgroundColor(aColor); +} + // add one to rage sizes to get back to the old Rectangle and outliner measurements const sal_uInt32 nAnchorTextWidth(FRound(aAnchorTextRange.getWidth() + 1L)); const sal_uInt32 nAnchorTextHeight(FRound(aAnchorTextRange.getHeight() + 1L)); @@ -1058,6 +1090,7 @@ void SdrTextObj::impDecomposeBlockTextPrimitive( aConverter.decomposeBlockTextPrimitive(aNewTransformA, aNewTransformB, aClipRange); // cleanup outliner +rOutliner.SetBackgroundColor(aOriginalBackColor); rOutliner.Clear(); rOutliner.setVisualizedPage(0); commit e068dfc6fb42a8017afdb9347692c9fdcd3fdf1a Author: Caolán McNamara caol...@redhat.com Date: Fri Jan 10 15:12:20 2014 + stray FOO Change-Id: I3185356d9c61f730c613b5a4b7e62d510bc0424e diff --git a/cui/source/options/optinet2.cxx b/cui/source/options/optinet2.cxx index 3064bca..f3486ac 100644 --- a/cui/source/options/optinet2.cxx +++ b/cui/source/options/optinet2.cxx @@ -591,7 +591,6 @@ SvxSecurityTabPage::SvxSecurityTabPage(Window* pParent, const SfxItemSet rSet) Size aSize(m_pSavePasswordsCB-CalcMinimumSize(56*approximate_char_width())); if (aPrefSize.Width() aSize.Width()) { -fprintf(stderr, FOO\n); m_pSavePasswordsCB-set_width_request(aSize.Width()); m_pSavePasswordsCB-set_height_request(aSize.Height()); } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: 2 commits - cui/source svx/source
cui/source/tabpages/transfrm.cxx |2 +- svx/source/svdraw/svdedtv1.cxx |1 + 2 files changed, 2 insertions(+), 1 deletion(-) New commits: commit 8c1d1b66904cdd95e8eec746a81cf1c57ad0e85a Author: David Tardon dtar...@redhat.com Date: Wed Jun 19 14:23:44 2013 +0200 fdo#65870 fix changing shape height via dialog Change-Id: I7c61be2c3d368dfd3ea66427c77636f797a7e88a diff --git a/svx/source/svdraw/svdedtv1.cxx b/svx/source/svdraw/svdedtv1.cxx index 196779b..85ea67d 100644 --- a/svx/source/svdraw/svdedtv1.cxx +++ b/svx/source/svdraw/svdedtv1.cxx @@ -1522,6 +1522,7 @@ void SdrEditView::SetGeoAttrToMarked(const SfxItemSet rAttr) if (SFX_ITEM_SET==rAttr.GetItemState(SID_ATTR_TRANSFORM_HEIGHT,sal_True,pPoolItem)) { nSizY=((const SfxUInt32Item*)pPoolItem)-GetValue(); bChgSiz=true; +bChgHgt=true; } if (bChgSiz) { eSizePoint=(RECT_POINT)((const SfxAllEnumItem)rAttr.Get(SID_ATTR_TRANSFORM_SIZE_POINT)).GetValue(); commit 8fbb2ebc2155b03d1436d9100886318642d47714 Author: David Tardon dtar...@redhat.com Date: Wed Jun 19 14:26:41 2013 +0200 fix copypasta Change-Id: I7744acc8cf1e8b6cad05d22df43f3d5a5beaa2f6 diff --git a/cui/source/tabpages/transfrm.cxx b/cui/source/tabpages/transfrm.cxx index a20ea83..9cd709f 100644 --- a/cui/source/tabpages/transfrm.cxx +++ b/cui/source/tabpages/transfrm.cxx @@ -886,7 +886,7 @@ sal_Bool SvxPositionSizeTabPage::FillItemSet( SfxItemSet rOutAttrs ) nHeight = MetricField::ConvertDoubleValue( nHeight, maMtrHeight.GetBaseValue(), maMtrHeight.GetDecimalDigits(), meDlgUnit, FUNIT_100TH_MM ); long lHeight = long(nHeight * (double)aUIScale); lHeight = OutputDevice::LogicToLogic( lHeight, MAP_100TH_MM, (MapUnit)mePoolUnit ); -lHeight = static_castlong(maMtrWidth.Denormalize( lHeight )); +lHeight = static_castlong(maMtrHeight.Denormalize( lHeight )); // put Width Height to itemset rOutAttrs.Put( SfxUInt32Item( GetWhich( SID_ATTR_TRANSFORM_WIDTH ), ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits