summaryrefslogtreecommitdiff
path: root/cui/source
diff options
context:
space:
mode:
authorOlivier Hallot <olivier.hallot@alta.org.br>2013-03-07 22:04:20 -0300
committerCaolán McNamara <caolanm@redhat.com>2013-03-08 09:27:14 +0000
commitd400bb0d33acd81226fbeea56eaa9ae02a8b1c05 (patch)
tree1bcbd9d151961664e0f6244f9a7df258238de347 /cui/source
parent3d4723f80a37e719359ad78ad063bc39ac28cd32 (diff)
Small improvement in page widget ui
Save a coupe of bytes and better use of widget features Change-Id: I6860339a8b62c7e95605a0abc47e99d7ef49696b Reviewed-on: https://gerrit.libreoffice.org/2590 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'cui/source')
-rw-r--r--cui/source/inc/page.hxx9
-rw-r--r--cui/source/tabpages/page.cxx27
2 files changed, 12 insertions, 24 deletions
diff --git a/cui/source/inc/page.hxx b/cui/source/inc/page.hxx
index 64e06de105a3..fa18d962d709 100644
--- a/cui/source/inc/page.hxx
+++ b/cui/source/inc/page.hxx
@@ -120,15 +120,10 @@ class SvxPageDescPage : public SfxTabPage
String sStandardRegister;
- FixedText* m_pInsideText;
- FixedText* m_pOutsideText;
+ FixedText* m_pInsideLbl;
+ FixedText* m_pOutsideLbl;
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 fe2c43d90fa8..f04d6a6ce811 100644
--- a/cui/source/tabpages/page.cxx
+++ b/cui/source/tabpages/page.cxx
@@ -223,8 +223,8 @@ SvxPageDescPage::SvxPageDescPage( Window* pParent, const SfxItemSet& rAttr ) :
get(m_pAdaptBox,"checkAdaptBox");
// Strings stored in UI
- get(m_pInsideText,"labelInner");
- get(m_pOutsideText,"labelOuter");
+ get(m_pInsideLbl,"labelInner");
+ get(m_pOutsideLbl,"labelOuter");
get(m_pPrintRangeQueryText,"labelMsg");
bBorderModified = sal_False;
@@ -370,11 +370,6 @@ SvxPageDescPage::~SvxPageDescPage()
void SvxPageDescPage::Init_Impl()
{
- aLeftText = m_pLeftMarginLbl->GetText();
- aRightText = m_pRightMarginLbl->GetText();
- aInsideText = m_pInsideText->GetText();
- aOutsideText = m_pOutsideText->GetText();
-
// adjust the handler
m_pLayoutBox->SetSelectHdl( LINK( this, SvxPageDescPage, LayoutHdl_Impl ) );
m_pPaperSizeBox->SetDropDownLineCount(10);
@@ -900,19 +895,17 @@ IMPL_LINK_NOARG(SvxPageDescPage, LayoutHdl_Impl)
if ( nPos == SVX_PAGE_MIRROR )
{
- if ( m_pLeftMarginLbl->GetText() != aInsideText )
- m_pLeftMarginLbl->SetText( aInsideText );
-
- if ( m_pRightMarginLbl->GetText() != aOutsideText )
- m_pRightMarginLbl->SetText( aOutsideText );
+ m_pLeftMarginLbl->Hide();
+ m_pRightMarginLbl->Hide();
+ m_pInsideLbl->Show();
+ m_pOutsideLbl->Show();
}
else
{
- if ( m_pLeftMarginLbl->GetText() != aLeftText )
- m_pLeftMarginLbl->SetText( aLeftText );
-
- if ( m_pRightMarginLbl->GetText() != aRightText )
- m_pRightMarginLbl->SetText( aRightText );
+ m_pLeftMarginLbl->Show();
+ m_pRightMarginLbl->Show();
+ m_pInsideLbl->Hide();
+ m_pOutsideLbl->Hide();
}
UpdateExample_Impl( true );
return 0;