Kaydet (Commit) 14f9cd10 authored tarafından Caolán McNamara's avatar Caolán McNamara Kaydeden (comit) Miklos Vajna

Related: tdf#122914 visiting alignment page sets an SvxAdjustItem

even if the user doesn't interact with anything, since...

commit 122da2ee
Author: Jim Raykowski <raykowj@gmail.com>
Date:   Sat Nov 18 22:21:24 2017 -0900

    tdf#107567 et al. Paragraph dialog preview windows fixes

    tdf#107567 tdf#98211 tdf#98212 tdf#113275

Checking those issues, I don't see a change if I put this
part back to only set SvxAdjustItem in FillItemSet if the radio-button
has changed (or justify subcontrols if justify was already set)

Change-Id: Ia68c50fd659be5b507d6e0989caecb353b494df7
Reviewed-on: https://gerrit.libreoffice.org/66882
Tested-by: Jenkins
Reviewed-by: 's avatarMiklos Vajna <vmiklos@collabora.com>
üst 7666c1e9
......@@ -1059,34 +1059,52 @@ bool SvxParaAlignTabPage::FillItemSet( SfxItemSet* rOutSet )
{
bool bModified = false;
bool bAdj = false;
SvxAdjust eAdjust = SvxAdjust::Left;
if ( m_xLeft->get_active() )
if (m_xLeft->get_active())
{
eAdjust = SvxAdjust::Left;
else if ( m_xRight->get_active() )
bAdj = m_xLeft->get_saved_state() == TRISTATE_FALSE;
}
else if (m_xRight->get_active())
{
eAdjust = SvxAdjust::Right;
else if ( m_xCenter->get_active() )
bAdj = m_xRight->get_saved_state() == TRISTATE_FALSE;
}
else if (m_xCenter->get_active())
{
eAdjust = SvxAdjust::Center;
else if ( m_xJustify->get_active() )
bAdj = m_xCenter->get_saved_state() == TRISTATE_FALSE;
}
else if (m_xJustify->get_active())
{
eAdjust = SvxAdjust::Block;
bAdj = m_xJustify->get_saved_state() == TRISTATE_FALSE ||
m_xExpandCB->get_state_changed_from_saved() ||
m_xLastLineLB->get_value_changed_from_saved();
}
sal_uInt16 _nWhich = GetWhich( SID_ATTR_PARA_ADJUST );
SvxAdjust eOneWord = m_xExpandCB->get_active() ? SvxAdjust::Block : SvxAdjust::Left;
int nLBPos = m_xLastLineLB->get_active();
SvxAdjust eLastBlock = SvxAdjust::Left;
if ( 1 == nLBPos )
eLastBlock = SvxAdjust::Center;
else if ( 2 == nLBPos )
eLastBlock = SvxAdjust::Block;
SvxAdjustItem aAdj( static_cast<const SvxAdjustItem&>(GetItemSet().Get( _nWhich )) );
aAdj.SetAdjust( eAdjust );
aAdj.SetOneWord( eOneWord );
aAdj.SetLastBlock( eLastBlock );
rOutSet->Put( aAdj );
bModified = true;
if (bAdj)
{
SvxAdjust eOneWord = m_xExpandCB->get_active() ? SvxAdjust::Block : SvxAdjust::Left;
int nLBPos = m_xLastLineLB->get_active();
SvxAdjust eLastBlock = SvxAdjust::Left;
if ( 1 == nLBPos )
eLastBlock = SvxAdjust::Center;
else if ( 2 == nLBPos )
eLastBlock = SvxAdjust::Block;
SvxAdjustItem aAdj( static_cast<const SvxAdjustItem&>(GetItemSet().Get( _nWhich )) );
aAdj.SetAdjust( eAdjust );
aAdj.SetOneWord( eOneWord );
aAdj.SetLastBlock( eLastBlock );
rOutSet->Put( aAdj );
bModified = true;
}
if (m_xSnapToGridCB->get_state_changed_from_saved())
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment