Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
core
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
LibreOffice
core
Commits
5d96ccd0
Kaydet (Commit)
5d96ccd0
authored
Nis 28, 2015
tarafından
Noel Grandin
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
convert ZOOMBTN constants to scoped enum
Change-Id: Ia7641f736fa4f84dce0b5ea8bf68339c1309e74b
üst
468446b7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
30 additions
and
22 deletions
+30
-22
zoom.cxx
cui/source/dialogs/zoom.cxx
+14
-13
dlgfact.cxx
cui/source/factory/dlgfact.cxx
+1
-1
dlgfact.hxx
cui/source/factory/dlgfact.hxx
+2
-1
zoom.hxx
cui/source/inc/zoom.hxx
+3
-2
svxdlg.hxx
include/svx/svxdlg.hxx
+2
-1
zoom_def.hxx
include/svx/zoom_def.hxx
+7
-3
prevwsh.cxx
sc/source/ui/view/prevwsh.cxx
+1
-1
No files found.
cui/source/dialogs/zoom.cxx
Dosyayı görüntüle @
5d96ccd0
...
...
@@ -49,11 +49,11 @@ sal_uInt16 SvxZoomDialog::GetFactor() const
return
SPECIAL_FACTOR
;
}
void
SvxZoomDialog
::
SetFactor
(
sal_uInt16
nNewFactor
,
sal_uInt16
nButtonId
)
void
SvxZoomDialog
::
SetFactor
(
sal_uInt16
nNewFactor
,
ZoomButtonId
nButtonId
)
{
m_pUserEdit
->
Disable
();
if
(
!
nButtonId
)
if
(
nButtonId
==
ZoomButtonId
::
NONE
)
{
if
(
nNewFactor
==
100
)
{
...
...
@@ -73,41 +73,42 @@ void SvxZoomDialog::SetFactor(sal_uInt16 nNewFactor, sal_uInt16 nButtonId)
m_pUserEdit
->
SetValue
(
static_cast
<
long
>
(
nNewFactor
));
switch
(
nButtonId
)
{
case
Z
OOMBTN_
OPTIMAL
:
case
Z
oomButtonId
:
:
OPTIMAL
:
{
m_pOptimalBtn
->
Check
();
m_pOptimalBtn
->
GrabFocus
();
break
;
}
case
Z
OOMBTN_
PAGEWIDTH
:
case
Z
oomButtonId
:
:
PAGEWIDTH
:
{
m_pPageWidthBtn
->
Check
();
m_pPageWidthBtn
->
GrabFocus
();
break
;
}
case
Z
OOMBTN_
WHOLEPAGE
:
case
Z
oomButtonId
:
:
WHOLEPAGE
:
{
m_pWholePageBtn
->
Check
();
m_pWholePageBtn
->
GrabFocus
();
break
;
}
default
:
break
;
}
}
}
void
SvxZoomDialog
::
HideButton
(
sal_uInt16
nButtonId
)
void
SvxZoomDialog
::
HideButton
(
ZoomButtonId
nButtonId
)
{
switch
(
nButtonId
)
{
case
Z
OOMBTN_
OPTIMAL
:
case
Z
oomButtonId
:
:
OPTIMAL
:
m_pOptimalBtn
->
Hide
();
break
;
case
Z
OOMBTN_
PAGEWIDTH
:
case
Z
oomButtonId
:
:
PAGEWIDTH
:
m_pPageWidthBtn
->
Hide
();
break
;
case
Z
OOMBTN_
WHOLEPAGE
:
case
Z
oomButtonId
:
:
WHOLEPAGE
:
m_pWholePageBtn
->
Hide
();
break
;
...
...
@@ -208,18 +209,18 @@ SvxZoomDialog::SvxZoomDialog( vcl::Window* pParent, const SfxItemSet& rCoreSet )
const
sal_uInt16
nZoom
=
rZoomItem
.
GetValue
();
const
SvxZoomType
eType
=
rZoomItem
.
GetType
();
const
SvxZoomEnableFlags
nValSet
=
rZoomItem
.
GetValueSet
();
sal_uInt16
nButtonId
=
0
;
ZoomButtonId
nButtonId
=
ZoomButtonId
::
NONE
;
switch
(
eType
)
{
case
SvxZoomType
:
:
OPTIMAL
:
nButtonId
=
Z
OOMBTN_
OPTIMAL
;
nButtonId
=
Z
oomButtonId
::
OPTIMAL
;
break
;
case
SvxZoomType
:
:
PAGEWIDTH
:
nButtonId
=
Z
OOMBTN_
PAGEWIDTH
;
nButtonId
=
Z
oomButtonId
::
PAGEWIDTH
;
break
;
case
SvxZoomType
:
:
WHOLEPAGE
:
nButtonId
=
Z
OOMBTN_
WHOLEPAGE
;
nButtonId
=
Z
oomButtonId
::
WHOLEPAGE
;
break
;
case
SvxZoomType
:
:
PERCENT
:
break
;
...
...
cui/source/factory/dlgfact.cxx
Dosyayı görüntüle @
5d96ccd0
...
...
@@ -419,7 +419,7 @@ void AbstractSvxZoomDialog_Impl::SetLimits( sal_uInt16 nMin, sal_uInt16 nMax )
pDlg
->
SetLimits
(
nMin
,
nMax
);
}
void
AbstractSvxZoomDialog_Impl
::
HideButton
(
sal_uInt16
nBtnId
)
void
AbstractSvxZoomDialog_Impl
::
HideButton
(
ZoomButtonId
nBtnId
)
{
pDlg
->
HideButton
(
nBtnId
);
}
...
...
cui/source/factory/dlgfact.hxx
Dosyayı görüntüle @
5d96ccd0
...
...
@@ -20,6 +20,7 @@
#define INCLUDED_CUI_SOURCE_FACTORY_DLGFACT_HXX
#include <svx/svxdlg.hxx>
#include <svx/zoom_def.hxx>
#include <com/sun/star/container/XNameReplace.hpp>
#include "tools/link.hxx"
...
...
@@ -195,7 +196,7 @@ class AbstractSvxZoomDialog_Impl : public AbstractSvxZoomDialog
{
DECL_ABSTDLG_BASE
(
AbstractSvxZoomDialog_Impl
,
SvxZoomDialog
)
virtual
void
SetLimits
(
sal_uInt16
nMin
,
sal_uInt16
nMax
)
SAL_OVERRIDE
;
virtual
void
HideButton
(
sal_uInt16
nBtnId
)
SAL_OVERRIDE
;
virtual
void
HideButton
(
ZoomButtonId
nBtnId
)
SAL_OVERRIDE
;
virtual
const
SfxItemSet
*
GetOutputItemSet
()
const
SAL_OVERRIDE
;
};
...
...
cui/source/inc/zoom.hxx
Dosyayı görüntüle @
5d96ccd0
...
...
@@ -20,6 +20,7 @@
#define INCLUDED_CUI_SOURCE_INC_ZOOM_HXX
#include <sfx2/basedlgs.hxx>
#include <svx/zoom_def.hxx>
#include <vcl/button.hxx>
#include <vcl/field.hxx>
#include <vcl/fixed.hxx>
...
...
@@ -62,9 +63,9 @@ public:
const
SfxItemSet
*
GetOutputItemSet
()
const
;
sal_uInt16
GetFactor
()
const
;
void
SetFactor
(
sal_uInt16
nNewFactor
,
sal_uInt16
nButtonId
=
0
);
void
SetFactor
(
sal_uInt16
nNewFactor
,
ZoomButtonId
nButtonId
=
ZoomButtonId
::
NONE
);
void
HideButton
(
sal_uInt16
nButtonId
);
void
HideButton
(
ZoomButtonId
nButtonId
);
void
SetLimits
(
sal_uInt16
nMin
,
sal_uInt16
nMax
);
};
...
...
include/svx/svxdlg.hxx
Dosyayı görüntüle @
5d96ccd0
...
...
@@ -20,6 +20,7 @@
#define INCLUDED_SVX_SVXDLG_HXX
#include <sfx2/sfxdlg.hxx>
#include <svx/zoom_def.hxx>
#include <editeng/edtdlg.hxx>
class
SdrModel
;
...
...
@@ -76,7 +77,7 @@ class AbstractSvxZoomDialog : public VclAbstractDialog
{
public
:
virtual
void
SetLimits
(
sal_uInt16
nMin
,
sal_uInt16
nMax
)
=
0
;
virtual
void
HideButton
(
sal_uInt16
nBtnId
)
=
0
;
virtual
void
HideButton
(
ZoomButtonId
nBtnId
)
=
0
;
virtual
const
SfxItemSet
*
GetOutputItemSet
()
const
=
0
;
};
...
...
include/svx/zoom_def.hxx
Dosyayı görüntüle @
5d96ccd0
...
...
@@ -20,9 +20,13 @@
#ifndef INCLUDED_SVX_ZOOM_DEF_HXX
#define INCLUDED_SVX_ZOOM_DEF_HXX
#define ZOOMBTN_OPTIMAL ((sal_uInt16)0x0001)
#define ZOOMBTN_PAGEWIDTH ((sal_uInt16)0x0002)
#define ZOOMBTN_WHOLEPAGE ((sal_uInt16)0x0004)
enum
class
ZoomButtonId
{
NONE
=
0x0000
,
OPTIMAL
=
0x0001
,
PAGEWIDTH
=
0x0002
,
WHOLEPAGE
=
0x0004
,
};
#endif
...
...
sc/source/ui/view/prevwsh.cxx
Dosyayı görüntüle @
5d96ccd0
...
...
@@ -652,7 +652,7 @@ void ScPreviewShell::Execute( SfxRequest& rReq )
boost
::
scoped_ptr
<
AbstractSvxZoomDialog
>
pDlg
(
pFact
->
CreateSvxZoomDialog
(
NULL
,
aSet
));
OSL_ENSURE
(
pDlg
,
"Dialog creation failed!"
);
pDlg
->
SetLimits
(
20
,
400
);
pDlg
->
HideButton
(
Z
OOMBTN_
OPTIMAL
);
pDlg
->
HideButton
(
Z
oomButtonId
::
OPTIMAL
);
bCancel
=
(
RET_CANCEL
==
pDlg
->
Execute
()
);
if
(
!
bCancel
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment