diff options
author | Caolán McNamara <caolanm@redhat.com> | 2018-06-02 19:37:35 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2018-06-02 22:16:25 +0200 |
commit | cd08397eedbe347784a3ac569481a17a8391e7b2 (patch) | |
tree | da1e98217f92c5b505caaa2dcb8d71a09180705d /cui | |
parent | 846675d6c0ff6838526f97961e95eca945c60eeb (diff) |
weld SwSectionFootnoteEndTabPage
Change-Id: Ib4246a2f90780a005e79e2d071b43a5629a3242c
Reviewed-on: https://gerrit.libreoffice.org/55216
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'cui')
-rw-r--r-- | cui/source/tabpages/textattr.cxx | 89 |
1 files changed, 8 insertions, 81 deletions
diff --git a/cui/source/tabpages/textattr.cxx b/cui/source/tabpages/textattr.cxx index 9cb423211176..1e1eddde34de 100644 --- a/cui/source/tabpages/textattr.cxx +++ b/cui/source/tabpages/textattr.cxx @@ -322,24 +322,28 @@ bool SvxTextAttrPage::FillItemSet( SfxItemSet* rAttrs) if( m_xMtrFldLeft->get_value_changed_from_saved() ) { + fprintf(stderr, "a one\n"); nValue = GetCoreValue( *m_xMtrFldLeft, eUnit ); rAttrs->Put( makeSdrTextLeftDistItem( nValue ) ); } if( m_xMtrFldRight->get_value_changed_from_saved() ) { + fprintf(stderr, "b one\n"); nValue = GetCoreValue( *m_xMtrFldRight, eUnit ); rAttrs->Put( makeSdrTextRightDistItem( nValue ) ); } if( m_xMtrFldTop->get_value_changed_from_saved() ) { + fprintf(stderr, "c one\n"); nValue = GetCoreValue( *m_xMtrFldTop, eUnit ); rAttrs->Put( makeSdrTextUpperDistItem( nValue ) ); } if( m_xMtrFldBottom->get_value_changed_from_saved() ) { + fprintf(stderr, "d one\n"); nValue = GetCoreValue( *m_xMtrFldBottom, eUnit ); rAttrs->Put( makeSdrTextLowerDistItem( nValue ) ); } @@ -347,108 +351,31 @@ bool SvxTextAttrPage::FillItemSet( SfxItemSet* rAttrs) eState = m_xTsbAutoGrowHeight->get_state(); if( m_xTsbAutoGrowHeight->get_state_changed_from_saved() ) { + fprintf(stderr, "one %d\n", TRISTATE_TRUE == eState); rAttrs->Put( makeSdrTextAutoGrowHeightItem( TRISTATE_TRUE == eState ) ); } eState = m_xTsbAutoGrowWidth->get_state(); if( m_xTsbAutoGrowWidth->get_state_changed_from_saved() ) { + fprintf(stderr, "e one\n"); rAttrs->Put( makeSdrTextAutoGrowWidthItem( TRISTATE_TRUE == eState ) ); } eState = m_xTsbAutoGrowSize->get_state(); if( m_xTsbAutoGrowSize->get_state_changed_from_saved() ) { + fprintf(stderr, "two %d\n", TRISTATE_TRUE == eState); rAttrs->Put( makeSdrTextAutoGrowHeightItem( TRISTATE_TRUE == eState ) ); } eState = m_xTsbWordWrapText->get_state(); if( m_xTsbWordWrapText->get_state_changed_from_saved() ) { + fprintf(stderr, "f one\n"); rAttrs->Put( makeSdrTextWordWrapItem( TRISTATE_TRUE == eState ) ); } - eState = m_xTsbContour->get_state(); - if( m_xTsbContour->get_state_changed_from_saved() ) - { - rAttrs->Put( makeSdrTextContourFrameItem( TRISTATE_TRUE == eState ) ); - } - - eState = m_xTsbFitToSize->get_state(); - if( m_xTsbFitToSize->get_state_changed_from_saved() ) - { - drawing::TextFitToSizeType eFTS; - switch( eState ) - { - default: ; //prevent warning - OSL_FAIL( "svx::SvxTextAttrPage::FillItemSet(), unhandled state!" ); - SAL_FALLTHROUGH; - case TRISTATE_FALSE: eFTS = drawing::TextFitToSizeType_AUTOFIT; break; - case TRISTATE_TRUE: eFTS = drawing::TextFitToSizeType_PROPORTIONAL; break; - } - rAttrs->Put( SdrTextFitToSizeTypeItem( eFTS ) ); - } - - // centered - RectPoint eRP = m_aCtlPosition.GetActualRP(); - SdrTextVertAdjust eTVA, eOldTVA; - SdrTextHorzAdjust eTHA, eOldTHA; - - switch( eRP ) - { - default: - case RectPoint::LT: eTVA = SDRTEXTVERTADJUST_TOP; - eTHA = SDRTEXTHORZADJUST_LEFT; break; - case RectPoint::LM: eTVA = SDRTEXTVERTADJUST_CENTER; - eTHA = SDRTEXTHORZADJUST_LEFT; break; - case RectPoint::LB: eTVA = SDRTEXTVERTADJUST_BOTTOM; - eTHA = SDRTEXTHORZADJUST_LEFT; break; - case RectPoint::MT: eTVA = SDRTEXTVERTADJUST_TOP; - eTHA = SDRTEXTHORZADJUST_CENTER; break; - case RectPoint::MM: eTVA = SDRTEXTVERTADJUST_CENTER; - eTHA = SDRTEXTHORZADJUST_CENTER; break; - case RectPoint::MB: eTVA = SDRTEXTVERTADJUST_BOTTOM; - eTHA = SDRTEXTHORZADJUST_CENTER; break; - case RectPoint::RT: eTVA = SDRTEXTVERTADJUST_TOP; - eTHA = SDRTEXTHORZADJUST_RIGHT; break; - case RectPoint::RM: eTVA = SDRTEXTVERTADJUST_CENTER; - eTHA = SDRTEXTHORZADJUST_RIGHT; break; - case RectPoint::RB: eTVA = SDRTEXTVERTADJUST_BOTTOM; - eTHA = SDRTEXTHORZADJUST_RIGHT; break; - } - - // #103516# Do not change values if adjust controls were disabled. - bool bIsDisabled(m_aCtlPosition.IsCompletelyDisabled()); - - if(!bIsDisabled) - { - if( m_xTsbFullWidth->get_state() == TRISTATE_TRUE ) - { - if (IsTextDirectionLeftToRight()) - eTHA = SDRTEXTHORZADJUST_BLOCK; - else - eTVA = SDRTEXTVERTADJUST_BLOCK; - } - - if ( rOutAttrs.GetItemState( SDRATTR_TEXT_VERTADJUST ) != SfxItemState::DONTCARE ) - { - eOldTVA = rOutAttrs.Get( SDRATTR_TEXT_VERTADJUST ).GetValue(); - if( eOldTVA != eTVA ) - rAttrs->Put( SdrTextVertAdjustItem( eTVA ) ); - } - else - rAttrs->Put( SdrTextVertAdjustItem( eTVA ) ); - - if ( rOutAttrs.GetItemState( SDRATTR_TEXT_HORZADJUST ) != SfxItemState::DONTCARE ) - { - eOldTHA = rOutAttrs.Get( SDRATTR_TEXT_HORZADJUST ).GetValue(); - if( eOldTHA != eTHA ) - rAttrs->Put( SdrTextHorzAdjustItem( eTHA ) ); - } - else - rAttrs->Put( SdrTextHorzAdjustItem( eTHA ) ); - } - return true; } |