diff options
author | Caolán McNamara <caolanm@redhat.com> | 2012-09-25 13:34:21 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2012-09-28 08:48:52 +0100 |
commit | 56ec8c6dcd6140b3df8bc51815066c95f4af2cfa (patch) | |
tree | e81eb06674b497ab28eec6721b75c72e84a00f65 /cui | |
parent | eb51d8b61ad2fa104fa9fd5da92e328a1ad85075 (diff) |
adapt zoom dialog code to layout widgets
Change-Id: I7da387db88b8a4449dc1dc7099527f786b0d565e
Diffstat (limited to 'cui')
-rw-r--r-- | cui/AllLangResTarget_cui.mk | 1 | ||||
-rw-r--r-- | cui/UI_cui.mk | 4 | ||||
-rw-r--r-- | cui/source/dialogs/zoom.cxx | 258 | ||||
-rw-r--r-- | cui/source/dialogs/zoom.src | 159 | ||||
-rw-r--r-- | cui/source/inc/zoom.hxx | 32 | ||||
-rw-r--r-- | cui/uiconfig/ui/zoomdialog.ui (renamed from cui/uiconfig/ui/10000.ui) | 80 |
6 files changed, 172 insertions, 362 deletions
diff --git a/cui/AllLangResTarget_cui.mk b/cui/AllLangResTarget_cui.mk index 83b36a551c67..840193f2a91f 100644 --- a/cui/AllLangResTarget_cui.mk +++ b/cui/AllLangResTarget_cui.mk @@ -82,7 +82,6 @@ $(eval $(call gb_SrsTarget_add_files,cui/res,\ cui/source/dialogs/svuidlg.src \ cui/source/dialogs/tbxform.src \ cui/source/dialogs/thesdlg.src \ - cui/source/dialogs/zoom.src \ cui/source/options/certpath.src \ cui/source/options/connpooloptions.src \ cui/source/options/dbregister.src \ diff --git a/cui/UI_cui.mk b/cui/UI_cui.mk index 1fe00b2b0afa..89e1a6a45eea 100644 --- a/cui/UI_cui.mk +++ b/cui/UI_cui.mk @@ -10,11 +10,11 @@ $(eval $(call gb_UI_UI,cui)) $(eval $(call gb_UI_add_uifiles,cui,\ - cui/uiconfig/ui/10000 \ - cui/uiconfig/ui/effectspage \ cui/uiconfig/ui/charnamepage \ + cui/uiconfig/ui/effectspage \ cui/uiconfig/ui/positionpage \ cui/uiconfig/ui/twolinespage \ + cui/uiconfig/ui/zoomdialog \ )) # vim: set noet sw=4 ts=4: diff --git a/cui/source/dialogs/zoom.cxx b/cui/source/dialogs/zoom.cxx index 740ddc845224..f6be8103d4bd 100644 --- a/cui/source/dialogs/zoom.cxx +++ b/cui/source/dialogs/zoom.cxx @@ -30,6 +30,7 @@ #include <svl/itemset.hxx> #include <svl/itempool.hxx> #include <sfx2/objsh.hxx> +#include <vcl/layout.hxx> #include <vcl/msgbox.hxx> #define _SVX_ZOOM_CXX @@ -42,7 +43,6 @@ #include <svx/viewlayoutitem.hxx> #include <dialmgr.hxx> #include <svx/zoom_def.hxx> -#include <svx/dialogs.hrc> // RID_SVXDLG_ZOOM // static ---------------------------------------------------------------- @@ -52,10 +52,10 @@ sal_uInt16 SvxZoomDialog::GetFactor() const { - if ( a100Btn.IsChecked() ) + if ( m_p100Btn->IsChecked() ) return 100; - if ( aUserBtn.IsChecked() ) - return (sal_uInt16)aUserEdit.GetValue(); + if ( m_pUserBtn->IsChecked() ) + return (sal_uInt16)m_pUserEdit->GetValue(); else return SPECIAL_FACTOR; } @@ -64,41 +64,41 @@ sal_uInt16 SvxZoomDialog::GetFactor() const void SvxZoomDialog::SetFactor( sal_uInt16 nNewFactor, sal_uInt16 nBtnId ) { - aUserEdit.Disable(); + m_pUserEdit->Disable(); if ( !nBtnId ) { if ( nNewFactor == 100 ) { - a100Btn.Check(); - a100Btn.GrabFocus(); + m_p100Btn->Check(); + m_p100Btn->GrabFocus(); } else { - aUserBtn.Check(); - aUserEdit.Enable(); - aUserEdit.SetValue( (long)nNewFactor ); - aUserEdit.GrabFocus(); + m_pUserBtn->Check(); + m_pUserEdit->Enable(); + m_pUserEdit->SetValue( (long)nNewFactor ); + m_pUserEdit->GrabFocus(); } } else { - aUserEdit.SetValue( (long)nNewFactor ); + m_pUserEdit->SetValue( (long)nNewFactor ); if ( ZOOMBTN_OPTIMAL == nBtnId ) { - aOptimalBtn.Check(); - aOptimalBtn.GrabFocus(); + m_pOptimalBtn->Check(); + m_pOptimalBtn->GrabFocus(); } else if ( ZOOMBTN_PAGEWIDTH == nBtnId ) { - aPageWidthBtn.Check(); - aPageWidthBtn.GrabFocus(); + m_pPageWidthBtn->Check(); + m_pPageWidthBtn->GrabFocus(); } else if ( ZOOMBTN_WHOLEPAGE == nBtnId ) { - aWholePageBtn.Check(); - aWholePageBtn.GrabFocus(); + m_pWholePageBtn->Check(); + m_pWholePageBtn->GrabFocus(); } } } @@ -110,15 +110,15 @@ void SvxZoomDialog::HideButton( sal_uInt16 nBtnId ) switch ( nBtnId ) { case ZOOMBTN_OPTIMAL: - aOptimalBtn.Hide(); + m_pOptimalBtn->Hide(); break; case ZOOMBTN_PAGEWIDTH: - aPageWidthBtn.Hide(); + m_pPageWidthBtn->Hide(); break; case ZOOMBTN_WHOLEPAGE: - aWholePageBtn.Hide(); + m_pWholePageBtn->Hide(); break; default: @@ -131,63 +131,54 @@ void SvxZoomDialog::HideButton( sal_uInt16 nBtnId ) void SvxZoomDialog::SetLimits( sal_uInt16 nMin, sal_uInt16 nMax ) { DBG_ASSERT( nMin < nMax, "invalid limits" ); - aUserEdit.SetMin( nMin ); - aUserEdit.SetFirst( nMin ); - aUserEdit.SetMax( nMax ); - aUserEdit.SetLast( nMax ); + m_pUserEdit->SetMin( nMin ); + m_pUserEdit->SetFirst( nMin ); + m_pUserEdit->SetMax( nMax ); + m_pUserEdit->SetLast( nMax ); } // ----------------------------------------------------------------------- -SvxZoomDialog::SvxZoomDialog( Window* pParent, const SfxItemSet& rCoreSet ) : - - SfxModalDialog( pParent, CUI_RES( RID_SVXDLG_ZOOM ) ), - - aZoomFl ( this, CUI_RES( FL_ZOOM ) ), - aOptimalBtn ( this, CUI_RES( BTN_OPTIMAL ) ), - aWholePageBtn ( this, CUI_RES( BTN_WHOLE_PAGE ) ), - aPageWidthBtn ( this, CUI_RES( BTN_PAGE_WIDTH ) ), - a100Btn ( this, CUI_RES( BTN_100 ) ), - aUserBtn ( this, CUI_RES( BTN_USER ) ), - aUserEdit ( this, CUI_RES( ED_USER ) ), - - aViewLayoutFl ( this, CUI_RES( FL_VIEWLAYOUT ) ), - aAutomaticBtn ( this, CUI_RES( BTN_AUTOMATIC ) ), - aSingleBtn ( this, CUI_RES( BTN_SINGLE ) ), - aColumnsBtn ( this, CUI_RES( BTN_COLUMNS ) ), - aColumnsEdit ( this, CUI_RES( ED_COLUMNS ) ), - aBookModeChk ( this, CUI_RES( CHK_BOOK ) ), - - aBottomFl ( this, CUI_RES( FL_BOTTOM ) ), - aOKBtn ( this, CUI_RES( BTN_ZOOM_OK ) ), - aCancelBtn ( this, CUI_RES( BTN_ZOOM_CANCEL ) ), - aHelpBtn ( this, CUI_RES( BTN_ZOOM_HELP ) ), - - rSet ( rCoreSet ), - pOutSet ( NULL ), - bModified ( sal_False ) +SvxZoomDialog::SvxZoomDialog( Window* pParent, const SfxItemSet& rCoreSet ) + : SfxModalDialog(pParent, "ZoomDialog", "cui/ui/zoomdialog.ui") + , rSet(rCoreSet) + , pOutSet(NULL) + , bModified(false) { + get(m_pOptimalBtn, "optimal"); + get(m_pWholePageBtn, "fitwandh"); + get(m_pPageWidthBtn, "fitw"); + get(m_p100Btn, "100pc"); + get(m_pUserBtn, "variable"); + get(m_pUserEdit, "zoomsb"); + get(m_pViewFrame, "viewframe"); + get(m_pAutomaticBtn, "automatic"); + get(m_pSingleBtn, "singlepage"); + get(m_pColumnsBtn, "columns"); + get(m_pColumnsEdit, "columnssb"); + get(m_pBookModeChk, "bookmode"); + get(m_pOKBtn, "ok"); Link aLink = LINK( this, SvxZoomDialog, UserHdl ); - a100Btn.SetClickHdl( aLink ); - aOptimalBtn.SetClickHdl( aLink ); - aPageWidthBtn.SetClickHdl( aLink ); - aWholePageBtn.SetClickHdl( aLink ); - aUserBtn.SetClickHdl( aLink ); + m_p100Btn->SetClickHdl( aLink ); + m_pOptimalBtn->SetClickHdl( aLink ); + m_pPageWidthBtn->SetClickHdl( aLink ); + m_pWholePageBtn->SetClickHdl( aLink ); + m_pUserBtn->SetClickHdl( aLink ); Link aViewLayoutLink = LINK( this, SvxZoomDialog, ViewLayoutUserHdl ); - aAutomaticBtn.SetClickHdl( aViewLayoutLink ); - aSingleBtn.SetClickHdl( aViewLayoutLink ); - aColumnsBtn.SetClickHdl( aViewLayoutLink ); + m_pAutomaticBtn->SetClickHdl( aViewLayoutLink ); + m_pSingleBtn->SetClickHdl( aViewLayoutLink ); + m_pColumnsBtn->SetClickHdl( aViewLayoutLink ); Link aViewLayoutSpinLink = LINK( this, SvxZoomDialog, ViewLayoutSpinHdl ); - aColumnsEdit.SetModifyHdl( aViewLayoutSpinLink ); + m_pColumnsEdit->SetModifyHdl( aViewLayoutSpinLink ); Link aViewLayoutCheckLink = LINK( this, SvxZoomDialog, ViewLayoutCheckHdl ); - aBookModeChk.SetClickHdl( aViewLayoutCheckLink ); + m_pBookModeChk->SetClickHdl( aViewLayoutCheckLink ); - aOKBtn.SetClickHdl( LINK( this, SvxZoomDialog, OKHdl ) ); - aUserEdit.SetModifyHdl( LINK( this, SvxZoomDialog, SpinHdl ) ); + m_pOKBtn->SetClickHdl( LINK( this, SvxZoomDialog, OKHdl ) ); + m_pUserEdit->SetModifyHdl( LINK( this, SvxZoomDialog, SpinHdl ) ); // default values sal_uInt16 nValue = 100; @@ -209,19 +200,19 @@ SvxZoomDialog::SvxZoomDialog( Window* pParent, const SfxItemSet& rCoreSet ) : nMin = nValue; if ( nMax < nValue ) nMax = nValue; - aUserEdit.SetMin( nMin ); - aUserEdit.SetFirst( nMin ); - aUserEdit.SetMax( nMax ); - aUserEdit.SetLast( nMax ); - aUserEdit.SetValue( nValue ); - - aUserEdit.SetAccessibleRelationLabeledBy( &aUserBtn ); - aUserEdit.SetAccessibleName(aUserBtn.GetText()); - aColumnsEdit.SetAccessibleRelationLabeledBy(&aColumnsBtn); - aColumnsEdit.SetAccessibleName(aColumnsBtn.GetText()); - aColumnsEdit.SetAccessibleRelationMemberOf(&aColumnsBtn); - aBookModeChk.SetAccessibleRelationLabeledBy(&aColumnsBtn); - aBookModeChk.SetAccessibleRelationMemberOf(&aColumnsBtn); + m_pUserEdit->SetMin( nMin ); + m_pUserEdit->SetFirst( nMin ); + m_pUserEdit->SetMax( nMax ); + m_pUserEdit->SetLast( nMax ); + m_pUserEdit->SetValue( nValue ); + + m_pUserEdit->SetAccessibleRelationLabeledBy(m_pUserBtn); + m_pUserEdit->SetAccessibleName(m_pUserBtn->GetText()); + m_pColumnsEdit->SetAccessibleRelationLabeledBy(m_pColumnsBtn); + m_pColumnsEdit->SetAccessibleName(m_pColumnsBtn->GetText()); + m_pColumnsEdit->SetAccessibleRelationMemberOf(m_pColumnsBtn); + m_pBookModeChk->SetAccessibleRelationLabeledBy(m_pColumnsBtn); + m_pBookModeChk->SetAccessibleRelationMemberOf(m_pColumnsBtn); const SfxPoolItem& rItem = rSet.Get( rSet.GetPool()->GetWhich( SID_ATTR_ZOOM ) ); @@ -251,13 +242,13 @@ SvxZoomDialog::SvxZoomDialog( Window* pParent, const SfxItemSet& rCoreSet ) : } if ( !(SVX_ZOOM_ENABLE_100 & nValSet) ) - a100Btn.Disable(); + m_p100Btn->Disable(); if ( !(SVX_ZOOM_ENABLE_OPTIMAL & nValSet) ) - aOptimalBtn.Disable(); + m_pOptimalBtn->Disable(); if ( !(SVX_ZOOM_ENABLE_PAGEWIDTH & nValSet) ) - aPageWidthBtn.Disable(); + m_pPageWidthBtn->Disable(); if ( !(SVX_ZOOM_ENABLE_WHOLEPAGE & nValSet) ) - aWholePageBtn.Disable(); + m_pWholePageBtn->Disable(); SetFactor( nZoom, nBtnId ); } else @@ -274,46 +265,39 @@ SvxZoomDialog::SvxZoomDialog( Window* pParent, const SfxItemSet& rCoreSet ) : if ( 0 == nColumns ) { - aAutomaticBtn.Check(); - aColumnsEdit.SetValue( 2 ); - aColumnsEdit.Disable(); - aBookModeChk.Disable(); + m_pAutomaticBtn->Check(); + m_pColumnsEdit->SetValue( 2 ); + m_pColumnsEdit->Disable(); + m_pBookModeChk->Disable(); } else if ( 1 == nColumns) { - aSingleBtn.Check(); - aColumnsEdit.SetValue( 2 ); - aColumnsEdit.Disable(); - aBookModeChk.Disable(); + m_pSingleBtn->Check(); + m_pColumnsEdit->SetValue( 2 ); + m_pColumnsEdit->Disable(); + m_pBookModeChk->Disable(); } else { - aColumnsBtn.Check(); + m_pColumnsBtn->Check(); if ( !bBookMode ) { - aColumnsEdit.SetValue( nColumns ); + m_pColumnsEdit->SetValue( nColumns ); if ( 0 != nColumns % 2 ) - aBookModeChk.Disable(); + m_pBookModeChk->Disable(); } else { - aColumnsEdit.SetValue( nColumns ); - aBookModeChk.Check(); + m_pColumnsEdit->SetValue( nColumns ); + m_pBookModeChk->Check(); } } } else { // hide view layout related controls: - aViewLayoutFl.Disable(); - aAutomaticBtn.Disable(); - aSingleBtn.Disable(); - aColumnsBtn.Disable(); - aColumnsEdit.Disable(); - aBookModeChk.Disable(); + m_pViewFrame->Disable(); } - - FreeResource(); } // ----------------------------------------------------------------------- @@ -330,13 +314,13 @@ IMPL_LINK( SvxZoomDialog, UserHdl, RadioButton *, pBtn ) { bModified |= sal_True; - if ( pBtn == &aUserBtn ) + if (pBtn == m_pUserBtn) { - aUserEdit.Enable(); - aUserEdit.GrabFocus(); + m_pUserEdit->Enable(); + m_pUserEdit->GrabFocus(); } else - aUserEdit.Disable(); + m_pUserEdit->Disable(); return 0; } @@ -344,7 +328,7 @@ IMPL_LINK( SvxZoomDialog, UserHdl, RadioButton *, pBtn ) IMPL_LINK_NOARG(SvxZoomDialog, SpinHdl) { - if ( !aUserBtn.IsChecked() ) + if ( !m_pUserBtn->IsChecked() ) return 0; bModified |= sal_True; return 0; @@ -356,22 +340,22 @@ IMPL_LINK( SvxZoomDialog, ViewLayoutUserHdl, RadioButton *, pBtn ) { bModified |= sal_True; - if ( pBtn == &aAutomaticBtn ) + if (pBtn == m_pAutomaticBtn) { - aColumnsEdit.Disable(); - aBookModeChk.Disable(); + m_pColumnsEdit->Disable(); + m_pBookModeChk->Disable(); } - else if ( pBtn == &aSingleBtn ) + else if (pBtn == m_pSingleBtn) { - aColumnsEdit.Disable(); - aBookModeChk.Disable(); + m_pColumnsEdit->Disable(); + m_pBookModeChk->Disable(); } - else if ( pBtn == &aColumnsBtn ) + else if (pBtn == m_pColumnsBtn) { - aColumnsEdit.Enable(); - aColumnsEdit.GrabFocus(); - if ( 0 == aColumnsEdit.GetValue() % 2 ) - aBookModeChk.Enable(); + m_pColumnsEdit->Enable(); + m_pColumnsEdit->GrabFocus(); + if ( 0 == m_pColumnsEdit->GetValue() % 2 ) + m_pBookModeChk->Enable(); } else { @@ -386,15 +370,15 @@ IMPL_LINK( SvxZoomDialog, ViewLayoutUserHdl, RadioButton *, pBtn ) IMPL_LINK( SvxZoomDialog, ViewLayoutSpinHdl, MetricField *, pEdt ) { - if ( pEdt == &aColumnsEdit && !aColumnsBtn.IsChecked() ) + if ( pEdt == m_pColumnsEdit && !m_pColumnsBtn->IsChecked() ) return 0; - if ( 0 == aColumnsEdit.GetValue() % 2 ) - aBookModeChk.Enable(); + if ( 0 == m_pColumnsEdit->GetValue() % 2 ) + m_pBookModeChk->Enable(); else { - aBookModeChk.Check( sal_False ); - aBookModeChk.Disable(); + m_pBookModeChk->Check( sal_False ); + m_pBookModeChk->Disable(); } bModified |= sal_True; @@ -406,7 +390,7 @@ IMPL_LINK( SvxZoomDialog, ViewLayoutSpinHdl, MetricField *, pEdt ) IMPL_LINK( SvxZoomDialog, ViewLayoutCheckHdl, CheckBox *, pChk ) { - if ( pChk == &aBookModeChk && !aColumnsBtn.IsChecked() ) + if (pChk == m_pBookModeChk && !m_pColumnsBtn->IsChecked()) return 0; bModified |= sal_True; @@ -418,41 +402,41 @@ IMPL_LINK( SvxZoomDialog, ViewLayoutCheckHdl, CheckBox *, pChk ) IMPL_LINK( SvxZoomDialog, OKHdl, Button *, pBtn ) { - if ( bModified || &aOKBtn != pBtn ) + if ( bModified || m_pOKBtn != pBtn ) { SvxZoomItem aZoomItem( SVX_ZOOM_PERCENT, 0, rSet.GetPool()->GetWhich( SID_ATTR_ZOOM ) ); SvxViewLayoutItem aViewLayoutItem( 0, false, rSet.GetPool()->GetWhich( SID_ATTR_VIEWLAYOUT ) ); - if ( &aOKBtn == pBtn ) + if ( m_pOKBtn == pBtn ) { sal_uInt16 nFactor = GetFactor(); if ( SPECIAL_FACTOR == nFactor ) { - if ( aOptimalBtn.IsChecked() ) + if ( m_pOptimalBtn->IsChecked() ) aZoomItem.SetType( SVX_ZOOM_OPTIMAL ); - else if ( aPageWidthBtn.IsChecked() ) + else if ( m_pPageWidthBtn->IsChecked() ) aZoomItem.SetType( SVX_ZOOM_PAGEWIDTH ); - else if ( aWholePageBtn.IsChecked() ) + else if ( m_pWholePageBtn->IsChecked() ) aZoomItem.SetType( SVX_ZOOM_WHOLEPAGE ); } else aZoomItem.SetValue( nFactor ); - if ( aAutomaticBtn.IsChecked() ) + if ( m_pAutomaticBtn->IsChecked() ) { aViewLayoutItem.SetValue( 0 ); aViewLayoutItem.SetBookMode( false ); } - if ( aSingleBtn.IsChecked() ) + if ( m_pSingleBtn->IsChecked() ) { aViewLayoutItem.SetValue( 1 ); aViewLayoutItem.SetBookMode( false ); } - else if ( aColumnsBtn.IsChecked() ) + else if ( m_pColumnsBtn->IsChecked() ) { - aViewLayoutItem.SetValue( static_cast<sal_uInt16>(aColumnsEdit.GetValue()) ); - aViewLayoutItem.SetBookMode( aBookModeChk.IsChecked() ); + aViewLayoutItem.SetValue( static_cast<sal_uInt16>(m_pColumnsEdit->GetValue()) ); + aViewLayoutItem.SetBookMode( m_pBookModeChk->IsChecked() ); } } else @@ -464,15 +448,15 @@ IMPL_LINK( SvxZoomDialog, OKHdl, Button *, pBtn ) pOutSet->Put( aZoomItem ); // don't set attribute in case the whole viewlayout stuff is disabled: - if ( aViewLayoutFl.IsEnabled() ) - pOutSet->Put( aViewLayoutItem ); + if (m_pViewFrame->IsEnabled()) + pOutSet->Put(aViewLayoutItem); // memorize value from the UserEdit beyond the dialog SfxObjectShell* pSh = SfxObjectShell::Current(); if ( pSh ) pSh->PutItem( SfxUInt16Item( SID_ATTR_ZOOM_USER, - (sal_uInt16)aUserEdit.GetValue() ) ); + (sal_uInt16)m_pUserEdit->GetValue() ) ); EndDialog( RET_OK ); } else diff --git a/cui/source/dialogs/zoom.src b/cui/source/dialogs/zoom.src deleted file mode 100644 index 22cb65a9fcb3..000000000000 --- a/cui/source/dialogs/zoom.src +++ /dev/null @@ -1,159 +0,0 @@ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ - -#include <cuires.hrc> -#include "zoom.hrc" -#include <svx/dialogs.hrc> // for RID_SVXDLG_ZOOM -#include "helpid.hrc" - - // RID_SVXDLG_ZOOM ------------------------------------------------------- -ModalDialog RID_SVXDLG_ZOOM -{ - HelpId = CMD_SID_ATTR_ZOOM; - OutputSize = TRUE ; - SvLook = TRUE ; - Size = MAP_APPFONT ( 242 , 112 ) ; - Moveable = TRUE ; - Text [ en-US ] = "Zoom & View Layout"; - FixedLine FL_ZOOM - { - Pos = MAP_APPFONT ( 6 , 3 ) ; - Size = MAP_APPFONT ( 112 , 8 ) ; - Text [ en-US ] = "Zoom factor"; - }; - RadioButton BTN_OPTIMAL - { - HelpID = "cui:RadioButton:RID_SVXDLG_ZOOM:BTN_OPTIMAL"; - Pos = MAP_APPFONT ( 12 , 14 ) ; - Size = MAP_APPFONT ( 105 , 10 ) ; - Text [ en-US ] = "~Optimal" ; - }; - RadioButton BTN_WHOLE_PAGE - { - HelpID = "cui:RadioButton:RID_SVXDLG_ZOOM:BTN_WHOLE_PAGE"; - Pos = MAP_APPFONT ( 12 , 27 ) ; - Size = MAP_APPFONT ( 105 , 10 ) ; - Text [ en-US ] = "~Fit width and height" ; - }; - RadioButton BTN_PAGE_WIDTH - { - HelpID = "cui:RadioButton:RID_SVXDLG_ZOOM:BTN_PAGE_WIDTH"; - Pos = MAP_APPFONT ( 12 , 40 ) ; - Size = MAP_APPFONT ( 105, 10 ) ; - Text [ en-US ] = "Fit ~width" ; - }; - RadioButton BTN_100 - { - HelpID = "cui:RadioButton:RID_SVXDLG_ZOOM:BTN_100"; - Pos = MAP_APPFONT ( 12 , 53 ) ; - Size = MAP_APPFONT ( 105, 10 ) ; - Text = "~100%" ; - }; - RadioButton BTN_USER - { - HelpID = "cui:RadioButton:RID_SVXDLG_ZOOM:BTN_USER"; - Pos = MAP_APPFONT ( 12 , 67 ) ; - Size = MAP_APPFONT ( 72 , 10 ) ; - Text [ en-US ] = "~Variable" ; - }; - MetricField ED_USER - { - HelpID = "cui:MetricField:RID_SVXDLG_ZOOM:ED_USER"; - Pos = MAP_APPFONT ( 86 , 66 ) ; - Size = MAP_APPFONT ( 32 , 12 ) ; - Border = TRUE ; - Group = TRUE ; - Left = TRUE ; - Repeat = TRUE ; - Spin = TRUE ; - Unit = FUNIT_CUSTOM ; - CustomUnitText = "%" ; - SpinSize = 1 ; - }; - FixedLine FL_VIEWLAYOUT - { - Pos = MAP_APPFONT ( 124 , 3 ) ; - Size = MAP_APPFONT ( 112 , 8 ) ; - Text [ en-US ] = "View layout"; - }; - RadioButton BTN_AUTOMATIC - { - HelpID = "cui:RadioButton:RID_SVXDLG_ZOOM:BTN_AUTOMATIC"; - Pos = MAP_APPFONT ( 130 , 14 ) ; - Size = MAP_APPFONT ( 106 , 10 ) ; - Text [ en-US ] = "~Automatic" ; - }; - RadioButton BTN_SINGLE - { - HelpID = "cui:RadioButton:RID_SVXDLG_ZOOM:BTN_SINGLE"; - Pos = MAP_APPFONT ( 130, 27 ) ; - Size = MAP_APPFONT ( 106, 10 ) ; - Text [ en-US ] = "~Single page" ; - }; - RadioButton BTN_COLUMNS - { - HelpID = "cui:RadioButton:RID_SVXDLG_ZOOM:BTN_COLUMNS"; - Pos = MAP_APPFONT ( 130, 41 ) ; - Size = MAP_APPFONT ( 75 , 10 ) ; - Text [ en-US ] = "~Columns" ; - }; - MetricField ED_COLUMNS - { - HelpID = "cui:MetricField:RID_SVXDLG_ZOOM:ED_COLUMNS"; - Pos = MAP_APPFONT ( 209 , 40 ) ; - Size = MAP_APPFONT ( 24 , 12 ) ; - Border = TRUE ; - Group = TRUE ; - Left = TRUE ; - Repeat = TRUE ; - Spin = TRUE ; - SpinSize = 1 ; - Minimum = 1; - Maximum = 999; - }; - CheckBox CHK_BOOK - { - HelpID = "cui:CheckBox:RID_SVXDLG_ZOOM:CHK_BOOK"; - Pos = MAP_APPFONT ( 136 , 55 ) ; - Size = MAP_APPFONT ( 85 , 10 ) ; - Text [ en-US ] = "~Book mode" ; - }; - FixedLine FL_BOTTOM - { - Pos = MAP_APPFONT ( 6 , 81 ) ; - Size = MAP_APPFONT ( 230 , 8 ) ; - }; - OKButton BTN_ZOOM_OK - { - Pos = MAP_APPFONT ( 77 , 92 ) ; - Size = MAP_APPFONT ( 50 , 14 ) ; - DefButton = TRUE ; - }; - CancelButton BTN_ZOOM_CANCEL - { - Pos = MAP_APPFONT ( 130 , 92 ) ; - Size = MAP_APPFONT ( 50 , 14 ) ; - }; - HelpButton BTN_ZOOM_HELP - { - Pos = MAP_APPFONT ( 186 , 92 ) ; - Size = MAP_APPFONT ( 50 , 14 ) ; - }; -}; - -// ********************************************************************** EOF diff --git a/cui/source/inc/zoom.hxx b/cui/source/inc/zoom.hxx index 39ebb5c80e88..eefedb718d4b 100644 --- a/cui/source/inc/zoom.hxx +++ b/cui/source/inc/zoom.hxx @@ -36,29 +36,25 @@ class SvxZoomDialog : public SfxModalDialog { private: - FixedLine aZoomFl; - RadioButton aOptimalBtn; - RadioButton aWholePageBtn; - RadioButton aPageWidthBtn; - RadioButton a100Btn; - RadioButton aUserBtn; - MetricField aUserEdit; + RadioButton* m_pOptimalBtn; + RadioButton* m_pWholePageBtn; + RadioButton* m_pPageWidthBtn; + RadioButton* m_p100Btn; + RadioButton* m_pUserBtn; + MetricField* m_pUserEdit; - FixedLine aViewLayoutFl; - RadioButton aAutomaticBtn; - RadioButton aSingleBtn; - RadioButton aColumnsBtn; - MetricField aColumnsEdit; - CheckBox aBookModeChk; + VclContainer* m_pViewFrame; + RadioButton* m_pAutomaticBtn; + RadioButton* m_pSingleBtn; + RadioButton* m_pColumnsBtn; + MetricField* m_pColumnsEdit; + CheckBox* m_pBookModeChk; - FixedLine aBottomFl; - OKButton aOKBtn; - CancelButton aCancelBtn; - HelpButton aHelpBtn; + OKButton* m_pOKBtn; const SfxItemSet& rSet; SfxItemSet* pOutSet; - sal_Bool bModified; + sal_Bool bModified; #ifdef _SVX_ZOOM_CXX DECL_LINK( UserHdl, RadioButton* ); diff --git a/cui/uiconfig/ui/10000.ui b/cui/uiconfig/ui/zoomdialog.ui index 43e710bc92b2..a66d73f99069 100644 --- a/cui/uiconfig/ui/10000.ui +++ b/cui/uiconfig/ui/zoomdialog.ui @@ -1,9 +1,16 @@ <?xml version="1.0" encoding="UTF-8"?> <interface> <!-- interface-requires gtk+ 3.0 --> - <object class="GtkDialog" id="10000"> + <object class="GtkAdjustment" id="adjustment1"> + <property name="lower">1</property> + <property name="upper">999</property> + <property name="step_increment">1</property> + <property name="page_increment">10</property> + </object> + <object class="GtkDialog" id="ZoomDialog"> <property name="can_focus">False</property> <property name="border_width">5</property> + <property name="title" translatable="yes">Zoom & View Layout</property> <property name="type_hint">dialog</property> <child internal-child="vbox"> <object class="GtkBox" id="dialog-vbox1"> @@ -15,13 +22,13 @@ <property name="can_focus">False</property> <property name="layout_style">end</property> <child> - <object class="GtkButton" id="28"> + <object class="GtkButton" id="ok"> <property name="label">gtk-ok</property> <property name="use_action_appearance">False</property> <property name="visible">True</property> <property name="can_focus">True</property> + <property name="has_default">True</property> <property name="receives_default">True</property> - <property name="use_action_appearance">False</property> <property name="use_stock">True</property> </object> <packing> @@ -31,13 +38,12 @@ </packing> </child> <child> - <object class="GtkButton" id="29"> + <object class="GtkButton" id="cancel"> <property name="label">gtk-cancel</property> <property name="use_action_appearance">False</property> <property name="visible">True</property> <property name="can_focus">True</property> <property name="receives_default">True</property> - <property name="use_action_appearance">False</property> <property name="use_stock">True</property> </object> <packing> @@ -47,13 +53,12 @@ </packing> </child> <child> - <object class="GtkButton" id="30"> + <object class="GtkButton" id="help"> <property name="label">gtk-help</property> <property name="use_action_appearance">False</property> <property name="visible">True</property> <property name="can_focus">True</property> <property name="receives_default">True</property> - <property name="use_action_appearance">False</property> <property name="use_stock">True</property> </object> <packing> @@ -92,13 +97,12 @@ <property name="can_focus">False</property> <property name="orientation">vertical</property> <child> - <object class="GtkRadioButton" id="15"> + <object class="GtkRadioButton" id="optimal"> <property name="label" translatable="yes">Optimal</property> <property name="use_action_appearance">False</property> <property name="visible">True</property> <property name="can_focus">True</property> <property name="receives_default">False</property> - <property name="use_action_appearance">False</property> <property name="xalign">0</property> <property name="active">True</property> <property name="draw_indicator">True</property> @@ -110,17 +114,16 @@ </packing> </child> <child> - <object class="GtkRadioButton" id="16"> + <object class="GtkRadioButton" id="fitwandh"> <property name="label" translatable="yes">Fit width and height</property> <property name="use_action_appearance">False</property> <property name="visible">True</property> <property name="can_focus">True</property> <property name="receives_default">False</property> - <property name="use_action_appearance">False</property> <property name="xalign">0</property> <property name="active">True</property> <property name="draw_indicator">True</property> - <property name="group">15</property> + <property name="group">optimal</property> </object> <packing> <property name="expand">False</property> @@ -129,17 +132,16 @@ </packing> </child> <child> - <object class="GtkRadioButton" id="17"> + <object class="GtkRadioButton" id="fitw"> <property name="label" translatable="yes">Fit width</property> <property name="use_action_appearance">False</property> <property name="visible">True</property> <property name="can_focus">True</property> <property name="receives_default">False</property> - <property name="use_action_appearance">False</property> <property name="xalign">0</property> <property name="active">True</property> <property name="draw_indicator">True</property> - <property name="group">15</property> + <property name="group">optimal</property> </object> <packing> <property name="expand">False</property> @@ -148,17 +150,16 @@ </packing> </child> <child> - <object class="GtkRadioButton" id="18"> + <object class="GtkRadioButton" id="100pc"> <property name="label" translatable="yes">100%</property> <property name="use_action_appearance">False</property> <property name="visible">True</property> <property name="can_focus">True</property> <property name="receives_default">False</property> - <property name="use_action_appearance">False</property> <property name="xalign">0</property> <property name="active">True</property> <property name="draw_indicator">True</property> - <property name="group">15</property> + <property name="group">optimal</property> </object> <packing> <property name="expand">False</property> @@ -171,17 +172,16 @@ <property name="visible">True</property> <property name="can_focus">False</property> <child> - <object class="GtkRadioButton" id="19"> + <object class="GtkRadioButton" id="variable"> <property name="label" translatable="yes">Variable</property> <property name="use_action_appearance">False</property> <property name="visible">True</property> <property name="can_focus">True</property> <property name="receives_default">False</property> - <property name="use_action_appearance">False</property> <property name="xalign">0</property> <property name="active">True</property> <property name="draw_indicator">True</property> - <property name="group">15</property> + <property name="group">optimal</property> </object> <packing> <property name="expand">False</property> @@ -190,7 +190,7 @@ </packing> </child> <child> - <object class="GtkSpinButton" id="20:0%"> + <object class="GtkSpinButton" id="zoomsb:0%"> <property name="visible">True</property> <property name="can_focus">True</property> <property name="invisible_char">●</property> @@ -213,7 +213,7 @@ </object> </child> <child type="label"> - <object class="GtkLabel" id="14"> + <object class="GtkLabel" id="label2"> <property name="visible">True</property> <property name="can_focus">False</property> <property name="label" translatable="yes">Zoom factor</property> @@ -228,7 +228,7 @@ </packing> </child> <child> - <object class="GtkFrame" id="frame2"> + <object class="GtkFrame" id="viewframe"> <property name="visible">True</property> <property name="can_focus">False</property> <property name="label_xalign">0</property> @@ -244,13 +244,12 @@ <property name="can_focus">False</property> <property name="orientation">vertical</property> <child> - <object class="GtkRadioButton" id="22"> + <object class="GtkRadioButton" id="automatic"> <property name="label" translatable="yes">Automatic</property> <property name="use_action_appearance">False</property> <property name="visible">True</property> <property name="can_focus">True</property> <property name="receives_default">False</property> - <property name="use_action_appearance">False</property> <property name="xalign">0</property> <property name="active">True</property> <property name="draw_indicator">True</property> @@ -262,17 +261,16 @@ </packing> </child> <child> - <object class="GtkRadioButton" id="23"> + <object class="GtkRadioButton" id="singlepage"> <property name="label" translatable="yes">Single page</property> <property name="use_action_appearance">False</property> <property name="visible">True</property> <property name="can_focus">True</property> <property name="receives_default">False</property> - <property name="use_action_appearance">False</property> <property name="xalign">0</property> <property name="active">True</property> <property name="draw_indicator">True</property> - <property name="group">22</property> + <property name="group">automatic</property> </object> <packing> <property name="expand">False</property> @@ -285,17 +283,16 @@ <property name="visible">True</property> <property name="can_focus">False</property> <child> - <object class="GtkRadioButton" id="24"> + <object class="GtkRadioButton" id="columns"> <property name="label" translatable="yes">Columns</property> <property name="use_action_appearance">False</property> <property name="visible">True</property> <property name="can_focus">True</property> <property name="receives_default">False</property> - <property name="use_action_appearance">False</property> <property name="xalign">0</property> <property name="active">True</property> <property name="draw_indicator">True</property> - <property name="group">22</property> + <property name="group">automatic</property> </object> <packing> <property name="expand">False</property> @@ -304,7 +301,7 @@ </packing> </child> <child> - <object class="GtkSpinButton" id="25:0"> + <object class="GtkSpinButton" id="columnssb:0"> <property name="visible">True</property> <property name="can_focus">True</property> <property name="invisible_char">●</property> @@ -329,13 +326,12 @@ <property name="can_focus">False</property> <property name="left_padding">10</property> <child> - <object class="GtkCheckButton" id="26"> + <object class="GtkCheckButton" id="bookmode"> <property name="label" translatable="yes">Book mode</property> <property name="use_action_appearance">False</property> <property name="visible">True</property> <property name="can_focus">True</property> <property name="receives_default">False</property> - <property name="use_action_appearance">False</property> <property name="xalign">0</property> <property name="draw_indicator">True</property> </object> @@ -352,7 +348,7 @@ </object> </child> <child type="label"> - <object class="GtkLabel" id="21"> + <object class="GtkLabel" id="label1"> <property name="visible">True</property> <property name="can_focus">False</property> <property name="label" translatable="yes">View layout</property> @@ -376,15 +372,9 @@ </object> </child> <action-widgets> - <action-widget response="0">28</action-widget> - <action-widget response="0">29</action-widget> - <action-widget response="0">30</action-widget> + <action-widget response="0">ok</action-widget> + <action-widget response="0">cancel</action-widget> + <action-widget response="0">help</action-widget> </action-widgets> </object> - <object class="GtkAdjustment" id="adjustment1"> - <property name="lower">1</property> - <property name="upper">999</property> - <property name="step_increment">1</property> - <property name="page_increment">10</property> - </object> </interface> |