[PATCH] Fix page format UI labels witht mirror pages
Olivier Hallot (via Code Review)
gerrit at gerrit.libreoffice.org
Wed Feb 27 18:07:48 PST 2013
Hi,
I have submitted a patch for review:
https://gerrit.libreoffice.org/2456
To pull it, you can do:
git pull ssh://gerrit.libreoffice.org:29418/core refs/changes/56/2456/1
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: I9c4612f6de53e7ab622f823173b7c921fbf45082
---
M cui/source/inc/page.hxx
M cui/source/tabpages/page.cxx
2 files changed, 19 insertions(+), 10 deletions(-)
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 @@
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 @@
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 @@
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 @@
// 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;
--
To view, visit https://gerrit.libreoffice.org/2456
To unsubscribe, visit https://gerrit.libreoffice.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I9c4612f6de53e7ab622f823173b7c921fbf45082
Gerrit-PatchSet: 1
Gerrit-Project: core
Gerrit-Branch: master
Gerrit-Owner: Olivier Hallot <olivier.hallot at alta.org.br>
More information about the LibreOffice
mailing list