summaryrefslogtreecommitdiff
path: root/cui
diff options
context:
space:
mode:
authorOlivier Hallot <olivier.hallot@alta.org.br>2013-02-27 22:56:19 -0300
committerOlivier Hallot <olivier.hallot@alta.org.br>2013-02-28 10:57:17 +0000
commitff27a7fd89dc3786a5f5094ec286ccdb787498bc (patch)
tree7fba76235e599b10d6ed82e56ae65e86b1355266 /cui
parent13bb2310e3ccc500522b1bd8de50e4ecc24074db (diff)
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.hallot@alta.org.br> Tested-by: Olivier Hallot <olivier.hallot@alta.org.br>
Diffstat (limited to 'cui')
-rw-r--r--cui/source/inc/page.hxx5
-rw-r--r--cui/source/tabpages/page.cxx24
2 files changed, 19 insertions, 10 deletions
diff --git a/cui/source/inc/page.hxx b/cui/source/inc/page.hxx
index 104923853818..64e06de105a3 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 9d32f39337d0..40c109cffa6f 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;