summaryrefslogtreecommitdiff
path: root/sfx2/source
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2014-10-07 16:08:25 +0200
committerNoel Grandin <noelgrandin@gmail.com>2014-10-11 15:14:32 +0000
commitcb7ede2d9970a4d162dc71922f578922c0d6235a (patch)
tree141884aa4a9d7c2c3cfb6fdf850ddf71cad0e7a4 /sfx2/source
parent0bc6ea3637e279fa2807d8ee649fb33f1ae6da47 (diff)
convert vcl StateChangedType to enum class
Change-Id: Ifa46523619ae7fb8d112525b8df594836e51bb8f Reviewed-on: https://gerrit.libreoffice.org/11843 Tested-by: LibreOffice gerrit bot <gerrit@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'sfx2/source')
-rw-r--r--sfx2/source/control/thumbnailview.cxx16
-rw-r--r--sfx2/source/dialog/basedlgs.cxx4
-rw-r--r--sfx2/source/dialog/dockwin.cxx4
-rw-r--r--sfx2/source/dialog/recfloat.cxx2
-rw-r--r--sfx2/source/dialog/srchdlg.cxx2
-rw-r--r--sfx2/source/dialog/templdlg.cxx4
-rw-r--r--sfx2/source/dialog/titledockwin.cxx3
-rw-r--r--sfx2/source/view/frame2.cxx2
-rw-r--r--sfx2/source/view/viewfrm2.cxx2
9 files changed, 20 insertions, 19 deletions
diff --git a/sfx2/source/control/thumbnailview.cxx b/sfx2/source/control/thumbnailview.cxx
index 96ae388e3df3..0ee422f94db6 100644
--- a/sfx2/source/control/thumbnailview.cxx
+++ b/sfx2/source/control/thumbnailview.cxx
@@ -923,36 +923,36 @@ void ThumbnailView::StateChanged( StateChangedType nType )
{
Control::StateChanged( nType );
- if ( nType == STATE_CHANGE_INITSHOW )
+ if ( nType == StateChangedType::INITSHOW )
{
if ( IsReallyVisible() && IsUpdateMode() )
Invalidate();
}
- else if ( nType == STATE_CHANGE_UPDATEMODE )
+ else if ( nType == StateChangedType::UPDATEMODE )
{
if ( IsReallyVisible() && IsUpdateMode() )
Invalidate();
}
- else if ( nType == STATE_CHANGE_TEXT )
+ else if ( nType == StateChangedType::TEXT )
{
}
- else if ( (nType == STATE_CHANGE_ZOOM) ||
- (nType == STATE_CHANGE_CONTROLFONT) )
+ else if ( (nType == StateChangedType::ZOOM) ||
+ (nType == StateChangedType::CONTROLFONT) )
{
ImplInitSettings( true, false, false );
Invalidate();
}
- else if ( nType == STATE_CHANGE_CONTROLFOREGROUND )
+ else if ( nType == StateChangedType::CONTROLFOREGROUND )
{
ImplInitSettings( false, true, false );
Invalidate();
}
- else if ( nType == STATE_CHANGE_CONTROLBACKGROUND )
+ else if ( nType == StateChangedType::CONTROLBACKGROUND )
{
ImplInitSettings( false, false, true );
Invalidate();
}
- else if ( (nType == STATE_CHANGE_STYLE) || (nType == STATE_CHANGE_ENABLE) )
+ else if ( (nType == StateChangedType::STYLE) || (nType == StateChangedType::ENABLE) )
{
ImplInitSettings( false, false, true );
Invalidate();
diff --git a/sfx2/source/dialog/basedlgs.cxx b/sfx2/source/dialog/basedlgs.cxx
index f3d4a3d5a86e..faa709386790 100644
--- a/sfx2/source/dialog/basedlgs.cxx
+++ b/sfx2/source/dialog/basedlgs.cxx
@@ -196,7 +196,7 @@ void SfxModalDialog::CreateOutputItemSet( const SfxItemSet& rSet )
void SfxModelessDialog::StateChanged( StateChangedType nStateChange )
{
- if ( nStateChange == STATE_CHANGE_INITSHOW )
+ if ( nStateChange == StateChangedType::INITSHOW )
{
if ( !pImp->aWinState.isEmpty() )
{
@@ -570,7 +570,7 @@ IMPL_LINK_NOARG(SfxFloatingWindow, TimerHdl)
void SfxFloatingWindow::StateChanged( StateChangedType nStateChange )
{
- if ( nStateChange == STATE_CHANGE_INITSHOW )
+ if ( nStateChange == StateChangedType::INITSHOW )
{
// FloatingWindows are not centered by default
if ( !pImp->aWinState.isEmpty() )
diff --git a/sfx2/source/dialog/dockwin.cxx b/sfx2/source/dialog/dockwin.cxx
index 5124b47a8db2..7129fb300e8b 100644
--- a/sfx2/source/dialog/dockwin.cxx
+++ b/sfx2/source/dialog/dockwin.cxx
@@ -272,7 +272,7 @@ bool SfxTitleDockingWindow::Notify( NotifyEvent& rNEvt )
void SfxTitleDockingWindow::StateChanged( StateChangedType nType )
{
- if ( nType == STATE_CHANGE_INITSHOW )
+ if ( nType == StateChangedType::INITSHOW )
{
vcl::Window* pWindow = GetWrappedWindow();
if ( pWindow )
@@ -1860,7 +1860,7 @@ void SfxDockingWindow::FadeIn( bool /*bFadeIn*/ )
void SfxDockingWindow::StateChanged( StateChangedType nStateChange )
{
- if ( nStateChange == STATE_CHANGE_INITSHOW )
+ if ( nStateChange == StateChangedType::INITSHOW )
Initialize_Impl();
DockingWindow::StateChanged( nStateChange );
diff --git a/sfx2/source/dialog/recfloat.cxx b/sfx2/source/dialog/recfloat.cxx
index 981cd9ca6dc7..ccb6da5cf6d4 100644
--- a/sfx2/source/dialog/recfloat.cxx
+++ b/sfx2/source/dialog/recfloat.cxx
@@ -227,7 +227,7 @@ void SfxRecordingFloat_Impl::FillInfo( SfxChildWinInfo& rInfo ) const
void SfxRecordingFloat_Impl::StateChanged( StateChangedType nStateChange )
{
- if ( nStateChange == STATE_CHANGE_INITSHOW )
+ if ( nStateChange == StateChangedType::INITSHOW )
{
SfxViewFrame *pFrame = GetBindings().GetDispatcher_Impl()->GetFrame();
vcl::Window* pEditWin = pFrame->GetViewShell()->GetWindow();
diff --git a/sfx2/source/dialog/srchdlg.cxx b/sfx2/source/dialog/srchdlg.cxx
index 6e08e6f02c9f..efc3c78009db 100644
--- a/sfx2/source/dialog/srchdlg.cxx
+++ b/sfx2/source/dialog/srchdlg.cxx
@@ -148,7 +148,7 @@ bool SearchDialog::Close()
void SearchDialog::StateChanged( StateChangedType nStateChange )
{
- if ( nStateChange == STATE_CHANGE_INITSHOW )
+ if ( nStateChange == StateChangedType::INITSHOW )
{
if (!m_sWinState.isEmpty())
SetWindowState( m_sWinState );
diff --git a/sfx2/source/dialog/templdlg.cxx b/sfx2/source/dialog/templdlg.cxx
index ed3b6a275fbd..688250db96db 100644
--- a/sfx2/source/dialog/templdlg.cxx
+++ b/sfx2/source/dialog/templdlg.cxx
@@ -436,7 +436,7 @@ SfxChildAlignment SfxTemplatePanelControl::CheckAlignment(SfxChildAlignment eAct
void SfxTemplatePanelControl::StateChanged( StateChangedType nStateChange )
{
- if ( nStateChange == STATE_CHANGE_INITSHOW )
+ if ( nStateChange == StateChangedType::INITSHOW )
{
SfxViewFrame *pFrame = mpBindings->GetDispatcher_Impl()->GetFrame();
vcl::Window* pEditWin = pFrame->GetViewShell()->GetWindow();
@@ -2779,7 +2779,7 @@ void SfxCommonTemplateDialog_Impl::ReplaceUpdateButtonByMenu()
void SfxTemplateDialog::StateChanged( StateChangedType nStateChange )
{
- if ( nStateChange == STATE_CHANGE_INITSHOW )
+ if ( nStateChange == StateChangedType::INITSHOW )
{
SfxViewFrame *pFrame = GetBindings().GetDispatcher_Impl()->GetFrame();
vcl::Window* pEditWin = pFrame->GetViewShell()->GetWindow();
diff --git a/sfx2/source/dialog/titledockwin.cxx b/sfx2/source/dialog/titledockwin.cxx
index 65882136b12b..5ada9dd90cc6 100644
--- a/sfx2/source/dialog/titledockwin.cxx
+++ b/sfx2/source/dialog/titledockwin.cxx
@@ -284,9 +284,10 @@ namespace sfx2
{
switch ( i_nType )
{
- case STATE_CHANGE_INITSHOW:
+ case StateChangedType::INITSHOW:
impl_scheduleLayout();
break;
+ default:;
}
SfxDockingWindow::StateChanged( i_nType );
}
diff --git a/sfx2/source/view/frame2.cxx b/sfx2/source/view/frame2.cxx
index 5701c33ed695..7be4839992fc 100644
--- a/sfx2/source/view/frame2.cxx
+++ b/sfx2/source/view/frame2.cxx
@@ -186,7 +186,7 @@ void SfxFrameWindow_Impl::Resize()
void SfxFrameWindow_Impl::StateChanged( StateChangedType nStateChange )
{
- if ( nStateChange == STATE_CHANGE_INITSHOW )
+ if ( nStateChange == StateChangedType::INITSHOW )
{
pFrame->pImp->bHidden = false;
if ( pFrame->IsInPlace() )
diff --git a/sfx2/source/view/viewfrm2.cxx b/sfx2/source/view/viewfrm2.cxx
index 60bee868f016..531f1b433ac3 100644
--- a/sfx2/source/view/viewfrm2.cxx
+++ b/sfx2/source/view/viewfrm2.cxx
@@ -58,7 +58,7 @@ using ::com::sun::star::lang::XComponent;
void SfxFrameViewWindow_Impl::StateChanged( StateChangedType nStateChange )
{
- if ( nStateChange == STATE_CHANGE_INITSHOW )
+ if ( nStateChange == StateChangedType::INITSHOW )
{
SfxObjectShell* pDoc = pFrame->GetObjectShell();
if ( pDoc && !pFrame->IsVisible() )