cui/source/inc/page.hxx | 5 +++++ cui/source/tabpages/page.cxx | 24 ++++++++++++++---------- 2 files changed, 19 insertions(+), 10 deletions(-)
New commits: commit ff27a7fd89dc3786a5f5094ec286ccdb787498bc Author: Olivier Hallot <olivier.hal...@alta.org.br> Date: Wed Feb 27 22:56:19 2013 -0300 Fix page format UI labels witht mirror pages The recent page format widget UI was not swapping inner<>left and outer<>right labels when page mirroring was selected. Change-Id: I793180100764293dacb702b725a282a95a6b6238 Reviewed-on: https://gerrit.libreoffice.org/2455 Reviewed-by: Olivier Hallot <olivier.hal...@alta.org.br> Tested-by: Olivier Hallot <olivier.hal...@alta.org.br> diff --git a/cui/source/inc/page.hxx b/cui/source/inc/page.hxx index 1049238..64e06de 100644 --- a/cui/source/inc/page.hxx +++ b/cui/source/inc/page.hxx @@ -124,6 +124,11 @@ class SvxPageDescPage : public SfxTabPage FixedText* m_pOutsideText; FixedText* m_pPrintRangeQueryText; + OUString aInsideText; + OUString aOutsideText; + OUString aLeftText; + OUString aRightText; + long nFirstLeftMargin; long nFirstRightMargin; long nFirstTopMargin; diff --git a/cui/source/tabpages/page.cxx b/cui/source/tabpages/page.cxx index 9d32f39..40c109c 100644 --- a/cui/source/tabpages/page.cxx +++ b/cui/source/tabpages/page.cxx @@ -224,7 +224,9 @@ SvxPageDescPage::SvxPageDescPage( Window* pParent, const SfxItemSet& rAttr ) : get(m_pAdaptBox,"checkAdaptBox"); // Strings stored in UI get(m_pInsideText,"labelInner"); + aInsideText = m_pInsideText->GetText(); get(m_pOutsideText,"labelOuter"); + aOutsideText = m_pOutsideText->GetText(); get(m_pPrintRangeQueryText,"labelMsg"); bBorderModified = sal_False; @@ -370,8 +372,8 @@ SvxPageDescPage::~SvxPageDescPage() void SvxPageDescPage::Init_Impl() { - //aLeftText = m_pLeftMarginLbl->GetText(); - //aRightText = m_pRightMarginLbl->GetText(); + aLeftText = m_pLeftMarginLbl->GetText(); + aRightText = m_pRightMarginLbl->GetText(); // adjust the handler m_pLayoutBox->SetSelectHdl( LINK( this, SvxPageDescPage, LayoutHdl_Impl ) ); @@ -896,21 +898,23 @@ IMPL_LINK_NOARG(SvxPageDescPage, LayoutHdl_Impl) // switch inside outside const sal_uInt16 nPos = PosToPageUsage_Impl( m_pLayoutBox->GetSelectEntryPos() ); + OUString aAux(); + if ( nPos == SVX_PAGE_MIRROR ) { - if ( m_pLeftMarginLbl->GetText() != m_pInsideText->GetText() ) - m_pLeftMarginLbl->SetText( m_pInsideText->GetText() ); + if ( m_pLeftMarginLbl->GetText() != aInsideText ) + m_pLeftMarginLbl->SetText( aInsideText ); - if ( m_pRightMarginLbl->GetText() != m_pOutsideText->GetText() ) - m_pRightMarginLbl->SetText( m_pOutsideText->GetText() ); + if ( m_pRightMarginLbl->GetText() != aOutsideText ) + m_pRightMarginLbl->SetText( aOutsideText ); } else { - if ( m_pLeftMarginLbl->GetText() != m_pLeftMarginLbl->GetText() ) - m_pLeftMarginLbl->SetText( m_pLeftMarginLbl->GetText() ); + if ( m_pLeftMarginLbl->GetText() != aLeftText ) + m_pLeftMarginLbl->SetText( aLeftText ); - if ( m_pRightMarginLbl->GetText() != m_pRightMarginLbl->GetText() ) - m_pRightMarginLbl->SetText( m_pRightMarginLbl->GetText() ); + if ( m_pRightMarginLbl->GetText() != aRightText ) + m_pRightMarginLbl->SetText( aRightText ); } UpdateExample_Impl( true ); return 0; _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits