summaryrefslogtreecommitdiff
path: root/sfx2
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-03-29 08:43:55 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-03-29 10:21:35 +0000
commit5f2d57fb32bc47dad8ec38287db6627ea6273527 (patch)
treec99f6d8f7effb91c62821e2ddaa06d928e9117e8 /sfx2
parentfd68b73042ac59d610e1f0edb53444a3444c5c64 (diff)
convert EViewType to scoped enum
Change-Id: I5b10aada64408897a56a5932aa28486d7562d617 Reviewed-on: https://gerrit.libreoffice.org/35822 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sfx2')
-rw-r--r--sfx2/source/appl/childwin.cxx6
-rw-r--r--sfx2/source/appl/newhelp.cxx12
-rw-r--r--sfx2/source/dialog/basedlgs.cxx8
-rw-r--r--sfx2/source/dialog/filedlghelper.cxx12
-rw-r--r--sfx2/source/dialog/splitwin.cxx4
-rw-r--r--sfx2/source/dialog/srchdlg.cxx4
-rw-r--r--sfx2/source/dialog/tabdlg.cxx10
-rw-r--r--sfx2/source/doc/templatedlg.cxx4
8 files changed, 30 insertions, 30 deletions
diff --git a/sfx2/source/appl/childwin.cxx b/sfx2/source/appl/childwin.cxx
index ceebfae93c1f..69a0f414d8e9 100644
--- a/sfx2/source/appl/childwin.cxx
+++ b/sfx2/source/appl/childwin.cxx
@@ -309,7 +309,7 @@ void SfxChildWindow::SaveStatus(const SfxChildWinInfo& rInfo)
//but off in another
if (!rInfo.aModule.isEmpty())
sName = rInfo.aModule + "/" + sName;
- SvtViewOptions aWinOpt(E_WINDOW, sName);
+ SvtViewOptions aWinOpt(EViewType::Window, sName);
aWinOpt.SetWindowState(OStringToOUString(rInfo.aWinState, RTL_TEXTENCODING_UTF8));
css::uno::Sequence < css::beans::NamedValue > aSeq
@@ -367,11 +367,11 @@ void SfxChildWindow::InitializeChildWinFactory_Impl(sal_uInt16 nId, SfxChildWinI
std::unique_ptr<SvtViewOptions> xWinOpt;
// first see if a module specific id exists
if (rInfo.aModule.getLength())
- xWinOpt.reset(new SvtViewOptions(E_WINDOW, rInfo.aModule + "/" + OUString::number(nId)));
+ xWinOpt.reset(new SvtViewOptions(EViewType::Window, rInfo.aModule + "/" + OUString::number(nId)));
// if not then try the generic id
if (!xWinOpt || !xWinOpt->Exists())
- xWinOpt.reset(new SvtViewOptions(E_WINDOW, OUString::number(nId)));
+ xWinOpt.reset(new SvtViewOptions(EViewType::Window, OUString::number(nId)));
if (xWinOpt->Exists() && xWinOpt->HasVisible() )
rInfo.bVisible = xWinOpt->IsVisible(); // set state from configuration. Can be overwritten by UserData, see below
diff --git a/sfx2/source/appl/newhelp.cxx b/sfx2/source/appl/newhelp.cxx
index 1ac1ce28c709..9364ff5c17c0 100644
--- a/sfx2/source/appl/newhelp.cxx
+++ b/sfx2/source/appl/newhelp.cxx
@@ -926,7 +926,7 @@ SearchTabPage_Impl::SearchTabPage_Impl(vcl::Window* pParent, SfxHelpIndexWindow_
m_pSearchED->SetModifyHdl( LINK( this, SearchTabPage_Impl, ModifyHdl ) );
m_pOpenBtn->SetClickHdl( LINK( this, SearchTabPage_Impl, OpenHdl ) );
- SvtViewOptions aViewOpt( E_TABPAGE, CONFIGNAME_SEARCHPAGE );
+ SvtViewOptions aViewOpt( EViewType::TabPage, CONFIGNAME_SEARCHPAGE );
if ( aViewOpt.Exists() )
{
OUString aUserData;
@@ -957,7 +957,7 @@ SearchTabPage_Impl::~SearchTabPage_Impl()
void SearchTabPage_Impl::dispose()
{
- SvtViewOptions aViewOpt( E_TABPAGE, CONFIGNAME_SEARCHPAGE );
+ SvtViewOptions aViewOpt( EViewType::TabPage, CONFIGNAME_SEARCHPAGE );
sal_Int32 nChecked = m_pFullWordsCB->IsChecked() ? 1 : 0;
OUString aUserData = OUString::number( nChecked );
aUserData += ";";
@@ -1422,7 +1422,7 @@ SfxHelpIndexWindow_Impl::SfxHelpIndexWindow_Impl(SfxHelpWindow_Impl* _pParent)
m_pTabCtrl->SetActivatePageHdl( LINK( this, SfxHelpIndexWindow_Impl, ActivatePageHdl ) );
sal_Int32 nPageId = m_pTabCtrl->GetPageId("index");
- SvtViewOptions aViewOpt( E_TABDIALOG, CONFIGNAME_INDEXWIN );
+ SvtViewOptions aViewOpt( EViewType::TabDialog, CONFIGNAME_INDEXWIN );
if ( aViewOpt.Exists() )
nPageId = aViewOpt.GetPageID();
m_pTabCtrl->SetCurPageId( (sal_uInt16)nPageId );
@@ -1455,7 +1455,7 @@ void SfxHelpIndexWindow_Impl::dispose()
for ( sal_Int32 i = 0; i < m_pActiveLB->GetEntryCount(); ++i )
delete static_cast<OUString*>(m_pActiveLB->GetEntryData(i));
- SvtViewOptions aViewOpt( E_TABDIALOG, CONFIGNAME_INDEXWIN );
+ SvtViewOptions aViewOpt( EViewType::TabDialog, CONFIGNAME_INDEXWIN );
aViewOpt.SetPageID( (sal_Int32)m_pTabCtrl->GetCurPageId() );
disposeBuilder();
@@ -2714,7 +2714,7 @@ void SfxHelpWindow_Impl::InitSizes()
void SfxHelpWindow_Impl::LoadConfig()
{
- SvtViewOptions aViewOpt( E_WINDOW, CONFIGNAME_HELPWIN );
+ SvtViewOptions aViewOpt( EViewType::Window, CONFIGNAME_HELPWIN );
if ( aViewOpt.Exists() )
{
bIndex = aViewOpt.IsVisible();
@@ -2751,7 +2751,7 @@ void SfxHelpWindow_Impl::LoadConfig()
void SfxHelpWindow_Impl::SaveConfig()
{
- SvtViewOptions aViewOpt( E_WINDOW, CONFIGNAME_HELPWIN );
+ SvtViewOptions aViewOpt( EViewType::Window, CONFIGNAME_HELPWIN );
sal_Int32 nW = 0, nH = 0;
if ( xWindow.is() )
diff --git a/sfx2/source/dialog/basedlgs.cxx b/sfx2/source/dialog/basedlgs.cxx
index 8d674ffb09de..b58181c9b0e6 100644
--- a/sfx2/source/dialog/basedlgs.cxx
+++ b/sfx2/source/dialog/basedlgs.cxx
@@ -100,7 +100,7 @@ void SfxModalDialog::SetDialogData_Impl()
sConfigId = OUString::number(nUniqId);
}
- SvtViewOptions aDlgOpt(E_DIALOG, sConfigId);
+ SvtViewOptions aDlgOpt(EViewType::Dialog, sConfigId);
aDlgOpt.SetWindowState(OStringToOUString(
GetWindowState(WindowStateMask::Pos), RTL_TEXTENCODING_ASCII_US));
if ( !aExtraData.isEmpty() )
@@ -126,7 +126,7 @@ void SfxModalDialog::GetDialogData_Impl()
sConfigId = OUString::number(nUniqId);
}
- SvtViewOptions aDlgOpt(E_DIALOG, sConfigId);
+ SvtViewOptions aDlgOpt(EViewType::Dialog, sConfigId);
if ( aDlgOpt.Exists() )
{
// load settings
@@ -635,7 +635,7 @@ IMPL_LINK_NOARG(SfxSingleTabDialog, OKHdl_Impl, Button*, void)
sConfigId = OUString::number(GetUniqId());
}
- SvtViewOptions aPageOpt(E_TABPAGE, sConfigId);
+ SvtViewOptions aPageOpt(EViewType::TabPage, sConfigId);
aPageOpt.SetUserItem( USERITEM_NAME, makeAny( OUString( sData ) ) );
EndDialog( RET_OK );
}
@@ -710,7 +710,7 @@ void SfxSingleTabDialog::SetTabPage(SfxTabPage* pTabPage,
sConfigId = OUString::number(GetUniqId());
}
- SvtViewOptions aPageOpt(E_TABPAGE, sConfigId);
+ SvtViewOptions aPageOpt(EViewType::TabPage, sConfigId);
Any aUserItem = aPageOpt.GetUserItem( USERITEM_NAME );
OUString sUserData;
aUserItem >>= sUserData;
diff --git a/sfx2/source/dialog/filedlghelper.cxx b/sfx2/source/dialog/filedlghelper.cxx
index ea5654282a0a..17df1c910a04 100644
--- a/sfx2/source/dialog/filedlghelper.cxx
+++ b/sfx2/source/dialog/filedlghelper.cxx
@@ -338,7 +338,7 @@ OUString FileDialogHelper_Impl::getCurrentFilterUIName() const
void FileDialogHelper_Impl::LoadLastUsedFilter( const OUString& _rContextIdentifier )
{
- SvtViewOptions aDlgOpt( E_DIALOG, IODLG_CONFIGNAME );
+ SvtViewOptions aDlgOpt( EViewType::Dialog, IODLG_CONFIGNAME );
if( aDlgOpt.Exists() )
{
@@ -352,7 +352,7 @@ void FileDialogHelper_Impl::SaveLastUsedFilter()
{
const OUString* pConfigId = GetLastFilterConfigId( meContext );
if( pConfigId )
- SvtViewOptions( E_DIALOG, IODLG_CONFIGNAME ).SetUserItem( *pConfigId,
+ SvtViewOptions( EViewType::Dialog, IODLG_CONFIGNAME ).SetUserItem( *pConfigId,
makeAny( getFilterWithExtension( getFilter() ) ) );
}
@@ -1921,7 +1921,7 @@ void FileDialogHelper_Impl::saveConfig()
if ( mbHasPreview )
{
- SvtViewOptions aDlgOpt( E_DIALOG, IMPGRF_CONFIGNAME );
+ SvtViewOptions aDlgOpt( EViewType::Dialog, IMPGRF_CONFIGNAME );
OUString aUserData(GRF_CONFIG_STR);
try
@@ -1947,7 +1947,7 @@ void FileDialogHelper_Impl::saveConfig()
else
{
bool bWriteConfig = false;
- SvtViewOptions aDlgOpt( E_DIALOG, IODLG_CONFIGNAME );
+ SvtViewOptions aDlgOpt( EViewType::Dialog, IODLG_CONFIGNAME );
OUString aUserData(STD_CONFIG_STR);
if ( aDlgOpt.Exists() )
@@ -2049,7 +2049,7 @@ void FileDialogHelper_Impl::loadConfig()
if ( mbHasPreview )
{
- SvtViewOptions aViewOpt( E_DIALOG, IMPGRF_CONFIGNAME );
+ SvtViewOptions aViewOpt( EViewType::Dialog, IMPGRF_CONFIGNAME );
OUString aUserData;
if ( aViewOpt.Exists() )
@@ -2095,7 +2095,7 @@ void FileDialogHelper_Impl::loadConfig()
}
else
{
- SvtViewOptions aViewOpt( E_DIALOG, IODLG_CONFIGNAME );
+ SvtViewOptions aViewOpt( EViewType::Dialog, IODLG_CONFIGNAME );
OUString aUserData;
if ( aViewOpt.Exists() )
diff --git a/sfx2/source/dialog/splitwin.cxx b/sfx2/source/dialog/splitwin.cxx
index ea02bd9b9d1f..c84314773fd7 100644
--- a/sfx2/source/dialog/splitwin.cxx
+++ b/sfx2/source/dialog/splitwin.cxx
@@ -228,7 +228,7 @@ SfxSplitWindow::SfxSplitWindow( vcl::Window* pParent, SfxChildAlignment eAl,
// Read Configuration
OUString aWindowId("SplitWindow");
aWindowId += OUString::number( (sal_Int32) eTbxAlign );
- SvtViewOptions aWinOpt( E_WINDOW, aWindowId );
+ SvtViewOptions aWinOpt( EViewType::Window, aWindowId );
OUString aWinData;
Any aUserItem = aWinOpt.GetUserItem( USERITEM_NAME );
OUString aTemp;
@@ -331,7 +331,7 @@ void SfxSplitWindow::SaveConfig_Impl()
OUString aWindowId("SplitWindow");
aWindowId += OUString::number( (sal_Int32) GetAlign() );
- SvtViewOptions aWinOpt( E_WINDOW, aWindowId );
+ SvtViewOptions aWinOpt( EViewType::Window, aWindowId );
aWinOpt.SetUserItem( USERITEM_NAME, makeAny( aWinData.makeStringAndClear() ) );
}
diff --git a/sfx2/source/dialog/srchdlg.cxx b/sfx2/source/dialog/srchdlg.cxx
index 7b1d69105566..fcc11b39f9bd 100644
--- a/sfx2/source/dialog/srchdlg.cxx
+++ b/sfx2/source/dialog/srchdlg.cxx
@@ -79,7 +79,7 @@ void SearchDialog::dispose()
void SearchDialog::LoadConfig()
{
- SvtViewOptions aViewOpt( E_DIALOG, m_sConfigName );
+ SvtViewOptions aViewOpt( EViewType::Dialog, m_sConfigName );
if ( aViewOpt.Exists() )
{
m_sWinState = OUStringToOString(aViewOpt.GetWindowState(), RTL_TEXTENCODING_ASCII_US);
@@ -107,7 +107,7 @@ void SearchDialog::LoadConfig()
void SearchDialog::SaveConfig()
{
- SvtViewOptions aViewOpt( E_DIALOG, m_sConfigName );
+ SvtViewOptions aViewOpt( EViewType::Dialog, m_sConfigName );
aViewOpt.SetWindowState(OStringToOUString(m_sWinState, RTL_TEXTENCODING_ASCII_US));
OUString sUserData;
sal_Int32 i = 0, nCount = std::min( m_pSearchEdit->GetEntryCount(), static_cast<sal_Int32>(MAX_SAVE_COUNT) );
diff --git a/sfx2/source/dialog/tabdlg.cxx b/sfx2/source/dialog/tabdlg.cxx
index e818a146fe5f..e819521eb448 100644
--- a/sfx2/source/dialog/tabdlg.cxx
+++ b/sfx2/source/dialog/tabdlg.cxx
@@ -358,7 +358,7 @@ void SfxTabDialog::dispose()
sConfigId = OUString::number(pDataObject->nId);
}
- SvtViewOptions aPageOpt(E_TABPAGE, sConfigId);
+ SvtViewOptions aPageOpt(EViewType::TabPage, sConfigId);
aPageOpt.SetUserItem( USERITEM_NAME, makeAny( OUString( aPageData ) ) );
}
@@ -546,7 +546,7 @@ void SfxTabDialog::Start_Impl()
sal_uInt16 nActPage = m_pTabCtrl->GetPageId( 0 );
// load old settings, when exists
- SvtViewOptions aDlgOpt(E_TABDIALOG, OStringToOUString(GetHelpId(),RTL_TEXTENCODING_UTF8));
+ SvtViewOptions aDlgOpt(EViewType::TabDialog, OStringToOUString(GetHelpId(),RTL_TEXTENCODING_UTF8));
if ( aDlgOpt.Exists() )
{
SetWindowState(OUStringToOString(aDlgOpt.GetWindowState().getStr(), RTL_TEXTENCODING_ASCII_US));
@@ -662,7 +662,7 @@ void SfxTabDialog::RemoveTabPage( sal_uInt16 nId )
sConfigId = OUString::number(pDataObject->nId);
}
- SvtViewOptions aPageOpt(E_TABPAGE, sConfigId);
+ SvtViewOptions aPageOpt(EViewType::TabPage, sConfigId);
aPageOpt.SetUserItem( USERITEM_NAME, makeAny( OUString( aPageData ) ) );
}
@@ -733,7 +733,7 @@ SfxTabPage* SfxTabDialog::GetTabPage( sal_uInt16 nPageId ) const
void SfxTabDialog::SavePosAndId()
{
// save settings (screen position and current page)
- SvtViewOptions aDlgOpt(E_TABDIALOG, OStringToOUString(GetHelpId(),RTL_TEXTENCODING_UTF8));
+ SvtViewOptions aDlgOpt(EViewType::TabDialog, OStringToOUString(GetHelpId(),RTL_TEXTENCODING_UTF8));
aDlgOpt.SetWindowState(OStringToOUString(GetWindowState(WindowStateMask::Pos),RTL_TEXTENCODING_ASCII_US));
// to-do replace with name of page when all pages are converted to .ui
aDlgOpt.SetPageID( m_pTabCtrl->GetCurPageId() );
@@ -1091,7 +1091,7 @@ IMPL_LINK( SfxTabDialog, ActivatePageHdl, TabControl *, pTabCtrl, void )
SAL_WARN("sfx.dialog", "Tabpage needs to be converted to .ui format");
sConfigId = OUString::number(pDataObject->nId);
}
- SvtViewOptions aPageOpt(E_TABPAGE, sConfigId);
+ SvtViewOptions aPageOpt(EViewType::TabPage, sConfigId);
OUString sUserData;
Any aUserItem = aPageOpt.GetUserItem( USERITEM_NAME );
OUString aTemp;
diff --git a/sfx2/source/doc/templatedlg.cxx b/sfx2/source/doc/templatedlg.cxx
index da048e996281..86fff479b192 100644
--- a/sfx2/source/doc/templatedlg.cxx
+++ b/sfx2/source/doc/templatedlg.cxx
@@ -398,7 +398,7 @@ void SfxTemplateManagerDlg::getApplicationSpecificSettings()
void SfxTemplateManagerDlg::readSettings ()
{
OUString aLastFolder;
- SvtViewOptions aViewSettings( E_DIALOG, TM_SETTING_MANAGER );
+ SvtViewOptions aViewSettings( EViewType::Dialog, TM_SETTING_MANAGER );
if ( aViewSettings.Exists() )
{
@@ -462,7 +462,7 @@ void SfxTemplateManagerDlg::writeSettings ()
};
// write
- SvtViewOptions aViewSettings(E_DIALOG, TM_SETTING_MANAGER);
+ SvtViewOptions aViewSettings(EViewType::Dialog, TM_SETTING_MANAGER);
aViewSettings.SetUserData(aSettings);
}