cui/source/dialogs/cuihyperdlg.cxx | 2 cui/source/dialogs/hlmarkwn.cxx | 4 cui/source/dialogs/iconcdlg.cxx | 4 cui/source/options/optpath.cxx | 2 cui/source/options/treeopt.cxx | 4 fpicker/source/office/RemoteFilesDialog.cxx | 4 fpicker/source/office/iodlg.cxx | 4 include/unotools/viewoptions.hxx | 10 - reportdesign/source/ui/dlg/Formula.cxx | 4 reportdesign/source/ui/report/DesignView.cxx | 8 - reportdesign/source/ui/report/ReportController.cxx | 4 sfx2/source/appl/childwin.cxx | 6 sfx2/source/appl/newhelp.cxx | 12 - sfx2/source/dialog/basedlgs.cxx | 8 - sfx2/source/dialog/filedlghelper.cxx | 12 - sfx2/source/dialog/splitwin.cxx | 4 sfx2/source/dialog/srchdlg.cxx | 4 sfx2/source/dialog/tabdlg.cxx | 10 - sfx2/source/doc/templatedlg.cxx | 4 svx/source/form/datanavi.cxx | 4 svx/source/sidebar/line/LineWidthPopup.cxx | 2 svx/source/sidebar/possize/PosSizePropertyPanel.cxx | 4 svx/source/sidebar/text/TextCharacterSpacingControl.cxx | 4 sw/source/uibase/sidebar/PageMarginControl.cxx | 20 +-- unotools/source/config/itemholder1.cxx | 8 - unotools/source/config/viewoptions.cxx | 100 ++++++++-------- 26 files changed, 126 insertions(+), 126 deletions(-)
New commits: commit 5f2d57fb32bc47dad8ec38287db6627ea6273527 Author: Noel Grandin <noel.gran...@collabora.co.uk> Date: Wed Mar 29 08:43:55 2017 +0200 convert EViewType to scoped enum Change-Id: I5b10aada64408897a56a5932aa28486d7562d617 Reviewed-on: https://gerrit.libreoffice.org/35822 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk> diff --git a/cui/source/dialogs/cuihyperdlg.cxx b/cui/source/dialogs/cuihyperdlg.cxx index b950632a60b2..3754d5c12645 100644 --- a/cui/source/dialogs/cuihyperdlg.cxx +++ b/cui/source/dialogs/cuihyperdlg.cxx @@ -161,7 +161,7 @@ SvxHpLinkDlg::~SvxHpLinkDlg () void SvxHpLinkDlg::dispose() { // delete config item, so the base class (IconChoiceDialog) can not load it on the next start - SvtViewOptions aViewOpt( E_TABDIALOG, OUString::number(SID_HYPERLINK_DIALOG) ); + SvtViewOptions aViewOpt( EViewType::TabDialog, OUString::number(SID_HYPERLINK_DIALOG) ); aViewOpt.Delete(); delete mpItemSet; diff --git a/cui/source/dialogs/hlmarkwn.cxx b/cui/source/dialogs/hlmarkwn.cxx index ce43046d61e9..ce7009ec76b2 100644 --- a/cui/source/dialogs/hlmarkwn.cxx +++ b/cui/source/dialogs/hlmarkwn.cxx @@ -257,7 +257,7 @@ void SvxHlinkDlgMarkWnd::RestoreLastSelection() OUString sLastSelectedMark; std::deque<OUString> aLastSelectedPath; - SvtViewOptions aViewSettings( E_DIALOG, TG_SETTING_MANAGER ); + SvtViewOptions aViewSettings( EViewType::Dialog, TG_SETTING_MANAGER ); if (aViewSettings.Exists()) { //Maybe we might want to have some sort of mru list and keep a mapping @@ -611,7 +611,7 @@ IMPL_LINK_NOARG(SvxHlinkDlgMarkWnd, ClickCloseHdl_Impl, Button*, void) }; // write - SvtViewOptions aViewSettings( E_DIALOG, TG_SETTING_MANAGER ); + SvtViewOptions aViewSettings( EViewType::Dialog, TG_SETTING_MANAGER ); aViewSettings.SetUserData( aSettings ); } diff --git a/cui/source/dialogs/iconcdlg.cxx b/cui/source/dialogs/iconcdlg.cxx index 169c34ec571c..9379ccee067f 100644 --- a/cui/source/dialogs/iconcdlg.cxx +++ b/cui/source/dialogs/iconcdlg.cxx @@ -212,7 +212,7 @@ void IconChoiceDialog::dispose() { // save configuration at INI-Manager // and remove pages - //SvtViewOptions aTabDlgOpt( E_TABDIALOG, rId ); + //SvtViewOptions aTabDlgOpt( EViewType::TabDialog, rId ); //aTabDlgOpt.SetWindowState(OStringToOUString(GetWindowState((WindowStateMask::X | WindowStateMask::Y | WindowStateMask::State | WindowStateMask::Minimized)), RTL_TEXTENCODING_ASCII_US)); //aTabDlgOpt.SetPageID( mnCurrentPageId ); @@ -223,7 +223,7 @@ void IconChoiceDialog::dispose() OUString aPageData(pData->pPage->GetUserData()); if ( !aPageData.isEmpty() ) { - //SvtViewOptions aTabPageOpt( E_TABPAGE, OUString::number(pData->nId) ); + //SvtViewOptions aTabPageOpt( EViewType::TabPage, OUString::number(pData->nId) ); //SetViewOptUserItem( aTabPageOpt, aPageData ); } diff --git a/cui/source/options/optpath.cxx b/cui/source/options/optpath.cxx index 558e760017eb..34ac217eb4f9 100644 --- a/cui/source/options/optpath.cxx +++ b/cui/source/options/optpath.cxx @@ -518,7 +518,7 @@ void SvxPathTabPage::ChangeCurrentEntry( const OUString& _rFolder ) { // Remove view options entry so the new work path // will be used for the next open dialog. - SvtViewOptions aDlgOpt( E_DIALOG, IODLG_CONFIGNAME ); + SvtViewOptions aDlgOpt( EViewType::Dialog, IODLG_CONFIGNAME ); aDlgOpt.Delete(); // Reset also last used dir in the sfx application instance SfxApplication *pSfxApp = SfxGetpApp(); diff --git a/cui/source/options/treeopt.cxx b/cui/source/options/treeopt.cxx index 7d7b2611a971..36ffea87f555 100644 --- a/cui/source/options/treeopt.cxx +++ b/cui/source/options/treeopt.cxx @@ -558,7 +558,7 @@ void OfaTreeOptionsDialog::dispose() OUString aPageData(pPageInfo->m_pPage->GetUserData()); if ( !aPageData.isEmpty() ) { - SvtViewOptions aTabPageOpt( E_TABPAGE, OUString::number( pPageInfo->m_nPageId) ); + SvtViewOptions aTabPageOpt( EViewType::TabPage, OUString::number( pPageInfo->m_nPageId) ); SetViewOptUserItem( aTabPageOpt, aPageData ); } pPageInfo->m_pPage.disposeAndClear(); @@ -1021,7 +1021,7 @@ void OfaTreeOptionsDialog::SelectHdl_Impl() DBG_ASSERT( pPageInfo->m_pPage, "tabpage could not created"); if ( pPageInfo->m_pPage ) { - SvtViewOptions aTabPageOpt( E_TABPAGE, OUString::number( pPageInfo->m_nPageId) ); + SvtViewOptions aTabPageOpt( EViewType::TabPage, OUString::number( pPageInfo->m_nPageId) ); pPageInfo->m_pPage->SetUserData( GetViewOptUserItem( aTabPageOpt ) ); pPageInfo->m_pPage->Reset( pGroupInfo->m_pInItemSet ); } diff --git a/fpicker/source/office/RemoteFilesDialog.cxx b/fpicker/source/office/RemoteFilesDialog.cxx index f2682405895d..32034f6fe441 100644 --- a/fpicker/source/office/RemoteFilesDialog.cxx +++ b/fpicker/source/office/RemoteFilesDialog.cxx @@ -304,7 +304,7 @@ void RemoteFilesDialog::dispose() // save window state if( !m_sIniKey.isEmpty() ) { - SvtViewOptions aDlgOpt( E_DIALOG, m_sIniKey ); + SvtViewOptions aDlgOpt( EViewType::Dialog, m_sIniKey ); aDlgOpt.SetWindowState( OStringToOUString( GetWindowState(), osl_getThreadTextEncoding() ) ); Size aSize( GetSizePixel() ); @@ -443,7 +443,7 @@ void RemoteFilesDialog::InitSize() return; // initialize from config - SvtViewOptions aDlgOpt( E_DIALOG, m_sIniKey ); + SvtViewOptions aDlgOpt( EViewType::Dialog, m_sIniKey ); if( aDlgOpt.Exists() ) { diff --git a/fpicker/source/office/iodlg.cxx b/fpicker/source/office/iodlg.cxx index 4792c4b6c69d..b2b5a3347443 100644 --- a/fpicker/source/office/iodlg.cxx +++ b/fpicker/source/office/iodlg.cxx @@ -487,7 +487,7 @@ void SvtFileDialog::dispose() if ( !pImpl->_aIniKey.isEmpty() ) { // save window state - SvtViewOptions aDlgOpt( E_DIALOG, pImpl->_aIniKey ); + SvtViewOptions aDlgOpt( EViewType::Dialog, pImpl->_aIniKey ); aDlgOpt.SetWindowState(OStringToOUString(GetWindowState(), osl_getThreadTextEncoding())); OUString sUserData = _pFileView->GetConfigString(); aDlgOpt.SetUserItem( "UserData", @@ -2151,7 +2151,7 @@ void SvtFileDialog::InitSize() return; // initialize from config - SvtViewOptions aDlgOpt( E_DIALOG, pImpl->_aIniKey ); + SvtViewOptions aDlgOpt( EViewType::Dialog, pImpl->_aIniKey ); if ( aDlgOpt.Exists() ) { diff --git a/include/unotools/viewoptions.hxx b/include/unotools/viewoptions.hxx index 703f837c61fd..77e495d807fc 100644 --- a/include/unotools/viewoptions.hxx +++ b/include/unotools/viewoptions.hxx @@ -35,12 +35,12 @@ class SvtViewOptionsBase_Impl; @descr Use these enum values to specify right list in configuration in which your view data are saved. *//*-*************************************************************************************************************/ -enum EViewType +enum class EViewType { - E_DIALOG = 0, - E_TABDIALOG = 1, - E_TABPAGE = 2, - E_WINDOW = 3 + Dialog = 0, + TabDialog = 1, + TabPage = 2, + Window = 3 }; /*-************************************************************************************************************ diff --git a/reportdesign/source/ui/dlg/Formula.cxx b/reportdesign/source/ui/dlg/Formula.cxx index e957ec2e9d0d..6c3ceb7ac345 100644 --- a/reportdesign/source/ui/dlg/Formula.cxx +++ b/reportdesign/source/ui/dlg/Formula.cxx @@ -94,7 +94,7 @@ void FormulaDialog::dispose() { if ( m_pAddField ) { - SvtViewOptions aDlgOpt( E_WINDOW, HID_RPT_FIELD_SEL_WIN ); + SvtViewOptions aDlgOpt( EViewType::Window, HID_RPT_FIELD_SEL_WIN ); aDlgOpt.SetWindowState(OStringToOUString(m_pAddField->GetWindowState((WindowStateMask::X | WindowStateMask::Y | WindowStateMask::State | WindowStateMask::Minimized)), RTL_TEXTENCODING_ASCII_US)); } @@ -203,7 +203,7 @@ void FormulaDialog::ToggleCollapsed( RefEdit* _pEdit, RefButton* _pButton) { m_pAddField = VclPtr<OAddFieldWindow>::Create(this,m_xRowSet); m_pAddField->SetCreateHdl(LINK( this, FormulaDialog, OnClickHdl ) ); - SvtViewOptions aDlgOpt( E_WINDOW, HID_RPT_FIELD_SEL_WIN ); + SvtViewOptions aDlgOpt( EViewType::Window, HID_RPT_FIELD_SEL_WIN ); if ( aDlgOpt.Exists() ) { m_pAddField->SetWindowState(OUStringToOString(aDlgOpt.GetWindowState().getStr(), RTL_TEXTENCODING_ASCII_US)); diff --git a/reportdesign/source/ui/report/DesignView.cxx b/reportdesign/source/ui/report/DesignView.cxx index 177d87daa111..1e013e88eff7 100644 --- a/reportdesign/source/ui/report/DesignView.cxx +++ b/reportdesign/source/ui/report/DesignView.cxx @@ -139,14 +139,14 @@ void ODesignView::dispose() } if ( m_pAddField ) { - SvtViewOptions aDlgOpt( E_WINDOW, UID_RPT_RPT_APP_VIEW ); + SvtViewOptions aDlgOpt( EViewType::Window, UID_RPT_RPT_APP_VIEW ); aDlgOpt.SetWindowState(OStringToOUString(m_pAddField->GetWindowState(), RTL_TEXTENCODING_ASCII_US)); notifySystemWindow(this,m_pAddField,::comphelper::mem_fun(&TaskPaneList::RemoveWindow)); m_pAddField.disposeAndClear(); } if ( m_pReportExplorer ) { - SvtViewOptions aDlgOpt(E_WINDOW, OStringToOUString(m_pReportExplorer->GetHelpId(), RTL_TEXTENCODING_UTF8)); + SvtViewOptions aDlgOpt(EViewType::Window, OStringToOUString(m_pReportExplorer->GetHelpId(), RTL_TEXTENCODING_UTF8)); aDlgOpt.SetWindowState(OStringToOUString(m_pReportExplorer->GetWindowState(), RTL_TEXTENCODING_ASCII_US)); notifySystemWindow(this,m_pReportExplorer,::comphelper::mem_fun(&TaskPaneList::RemoveWindow)); m_pReportExplorer.disposeAndClear(); @@ -476,7 +476,7 @@ void ODesignView::toggleReportExplorer() { OReportController& rReportController = getController(); m_pReportExplorer = VclPtr<ONavigator>::Create(this,rReportController); - SvtViewOptions aDlgOpt(E_WINDOW, OStringToOUString(m_pReportExplorer->GetHelpId(), RTL_TEXTENCODING_UTF8)); + SvtViewOptions aDlgOpt(EViewType::Window, OStringToOUString(m_pReportExplorer->GetHelpId(), RTL_TEXTENCODING_UTF8)); if ( aDlgOpt.Exists() ) m_pReportExplorer->SetWindowState(OUStringToOString(aDlgOpt.GetWindowState(), RTL_TEXTENCODING_ASCII_US)); m_pReportExplorer->AddEventListener(LINK(&rReportController,OReportController,EventLstHdl)); @@ -513,7 +513,7 @@ void ODesignView::toggleAddField() uno::Reference < beans::XPropertySet > xSet(rReportController.getRowSet(),uno::UNO_QUERY); m_pAddField = VclPtr<OAddFieldWindow>::Create(this,xSet); m_pAddField->SetCreateHdl(LINK( &rReportController, OReportController, OnCreateHdl ) ); - SvtViewOptions aDlgOpt( E_WINDOW, UID_RPT_RPT_APP_VIEW ); + SvtViewOptions aDlgOpt( EViewType::Window, UID_RPT_RPT_APP_VIEW ); if ( aDlgOpt.Exists() ) m_pAddField->SetWindowState(OUStringToOString(aDlgOpt.GetWindowState(), RTL_TEXTENCODING_ASCII_US)); m_pAddField->Update(); diff --git a/reportdesign/source/ui/report/ReportController.cxx b/reportdesign/source/ui/report/ReportController.cxx index dcb41e3b9512..b1d0d9499ea3 100644 --- a/reportdesign/source/ui/report/ReportController.cxx +++ b/reportdesign/source/ui/report/ReportController.cxx @@ -320,7 +320,7 @@ void OReportController::disposing() } if ( m_pGroupsFloater ) { - SvtViewOptions aDlgOpt(E_WINDOW, OStringToOUString(m_pGroupsFloater->GetHelpId(), RTL_TEXTENCODING_UTF8)); + SvtViewOptions aDlgOpt(EViewType::Window, OStringToOUString(m_pGroupsFloater->GetHelpId(), RTL_TEXTENCODING_UTF8)); aDlgOpt.SetWindowState(OStringToOUString(m_pGroupsFloater->GetWindowState(), RTL_TEXTENCODING_ASCII_US)); m_pGroupsFloater.disposeAndClear(); } @@ -2551,7 +2551,7 @@ void OReportController::openSortingAndGroupingDialog() if ( !m_pGroupsFloater ) { m_pGroupsFloater = VclPtr<OGroupsSortingDialog>::Create(getView(),!isEditable(),this); - SvtViewOptions aDlgOpt(E_WINDOW, OStringToOUString(m_pGroupsFloater->GetHelpId(), RTL_TEXTENCODING_UTF8)); + SvtViewOptions aDlgOpt(EViewType::Window, OStringToOUString(m_pGroupsFloater->GetHelpId(), RTL_TEXTENCODING_UTF8)); if ( aDlgOpt.Exists() ) m_pGroupsFloater->SetWindowState(OUStringToOString(aDlgOpt.GetWindowState(), RTL_TEXTENCODING_ASCII_US)); m_pGroupsFloater->AddEventListener(LINK(this,OReportController,EventLstHdl)); 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); } diff --git a/svx/source/form/datanavi.cxx b/svx/source/form/datanavi.cxx index e467b712710a..2bedc2332605 100644 --- a/svx/source/form/datanavi.cxx +++ b/svx/source/form/datanavi.cxx @@ -1375,7 +1375,7 @@ namespace svxform // init tabcontrol m_pTabCtrl->Show(); sal_Int32 nPageId = m_pTabCtrl->GetPageId("instance"); - SvtViewOptions aViewOpt( E_TABDIALOG, CFGNAME_DATANAVIGATOR ); + SvtViewOptions aViewOpt( EViewType::TabDialog, CFGNAME_DATANAVIGATOR ); if ( aViewOpt.Exists() ) { nPageId = aViewOpt.GetPageID(); @@ -1412,7 +1412,7 @@ namespace svxform void DataNavigatorWindow::dispose() { - SvtViewOptions aViewOpt( E_TABDIALOG, CFGNAME_DATANAVIGATOR ); + SvtViewOptions aViewOpt( EViewType::TabDialog, CFGNAME_DATANAVIGATOR ); aViewOpt.SetPageID( static_cast< sal_Int32 >( m_pTabCtrl->GetCurPageId() ) ); aViewOpt.SetUserItem(CFGNAME_SHOWDETAILS, Any(m_bShowDetails)); diff --git a/svx/source/sidebar/line/LineWidthPopup.cxx b/svx/source/sidebar/line/LineWidthPopup.cxx index cce33f314726..5dee2ed4aada 100644 --- a/svx/source/sidebar/line/LineWidthPopup.cxx +++ b/svx/source/sidebar/line/LineWidthPopup.cxx @@ -180,7 +180,7 @@ void LineWidthPopup::SetWidthSelect(long lValue, bool bValuable, MapUnit eMapUni m_xVSWidth->SetSelItem(0); m_bCloseByEdit = false; m_eMapUnit = eMapUnit; - SvtViewOptions aWinOpt( E_WINDOW, SIDEBAR_LINE_WIDTH_GLOBAL_VALUE ); + SvtViewOptions aWinOpt( EViewType::Window, SIDEBAR_LINE_WIDTH_GLOBAL_VALUE ); if (aWinOpt.Exists()) { css::uno::Sequence <css::beans::NamedValue> aSeq = aWinOpt.GetUserData(); diff --git a/svx/source/sidebar/possize/PosSizePropertyPanel.cxx b/svx/source/sidebar/possize/PosSizePropertyPanel.cxx index a9346e88b0a0..46982bab7442 100644 --- a/svx/source/sidebar/possize/PosSizePropertyPanel.cxx +++ b/svx/source/sidebar/possize/PosSizePropertyPanel.cxx @@ -409,7 +409,7 @@ IMPL_LINK_NOARG( PosSizePropertyPanel, ClickAutoHdl, Button*, void ) } // mpCbxScale must synchronized with that on Position and Size tabpage on Shape Properties dialog - SvtViewOptions aPageOpt(E_TABPAGE, "cui/ui/possizetabpage/PositionAndSize"); + SvtViewOptions aPageOpt(EViewType::TabPage, "cui/ui/possizetabpage/PositionAndSize"); aPageOpt.SetUserItem( USERITEM_NAME, css::uno::makeAny( ::rtl::OUString::number( int(mpCbxScale->IsChecked()) ) ) ); } @@ -811,7 +811,7 @@ void PosSizePropertyPanel::NotifyItemUpdate( DisableControls(); // mpCbxScale must synchronized with that on Position and Size tabpage on Shape Properties dialog - SvtViewOptions aPageOpt(E_TABPAGE, "cui/ui/possizetabpage/PositionAndSize"); + SvtViewOptions aPageOpt(EViewType::TabPage, "cui/ui/possizetabpage/PositionAndSize"); OUString sUserData; css::uno::Any aUserItem = aPageOpt.GetUserItem( USERITEM_NAME ); ::rtl::OUString aTemp; diff --git a/svx/source/sidebar/text/TextCharacterSpacingControl.cxx b/svx/source/sidebar/text/TextCharacterSpacingControl.cxx index 7bbd9a0129d3..3cce2b308a21 100644 --- a/svx/source/sidebar/text/TextCharacterSpacingControl.cxx +++ b/svx/source/sidebar/text/TextCharacterSpacingControl.cxx @@ -76,7 +76,7 @@ void TextCharacterSpacingControl::dispose() { if (mnLastCus == SPACING_CLOSE_BY_CUS_EDIT) { - SvtViewOptions aWinOpt(E_WINDOW, SIDEBAR_SPACING_GLOBAL_VALUE); + SvtViewOptions aWinOpt(EViewType::Window, SIDEBAR_SPACING_GLOBAL_VALUE); css::uno::Sequence<css::beans::NamedValue> aSeq { { "Spacing", css::uno::makeAny(OUString::number(GetLastCustomValue())) } }; aWinOpt.SetUserData(aSeq); @@ -105,7 +105,7 @@ void TextCharacterSpacingControl::Initialize() if(pKerningItem) nKerning = pKerningItem->GetValue(); - SvtViewOptions aWinOpt(E_WINDOW, SIDEBAR_SPACING_GLOBAL_VALUE); + SvtViewOptions aWinOpt(EViewType::Window, SIDEBAR_SPACING_GLOBAL_VALUE); if(aWinOpt.Exists()) { css::uno::Sequence<css::beans::NamedValue> aSeq = aWinOpt.GetUserData(); diff --git a/sw/source/uibase/sidebar/PageMarginControl.cxx b/sw/source/uibase/sidebar/PageMarginControl.cxx index fca7784920e9..bb9de2bd8f2b 100644 --- a/sw/source/uibase/sidebar/PageMarginControl.cxx +++ b/sw/source/uibase/sidebar/PageMarginControl.cxx @@ -501,7 +501,7 @@ bool PageMarginControl::GetUserCustomValues() { bool bUserCustomValuesAvailable = false; - SvtViewOptions aWinOpt( E_WINDOW, SWPAGE_LEFT_GVALUE ); + SvtViewOptions aWinOpt( EViewType::Window, SWPAGE_LEFT_GVALUE ); if ( aWinOpt.Exists() ) { css::uno::Sequence < css::beans::NamedValue > aSeq = aWinOpt.GetUserData(); @@ -513,7 +513,7 @@ bool PageMarginControl::GetUserCustomValues() bUserCustomValuesAvailable = true; } - SvtViewOptions aWinOpt2( E_WINDOW, SWPAGE_RIGHT_GVALUE ); + SvtViewOptions aWinOpt2( EViewType::Window, SWPAGE_RIGHT_GVALUE ); if ( aWinOpt2.Exists() ) { css::uno::Sequence < css::beans::NamedValue > aSeq = aWinOpt2.GetUserData(); @@ -525,7 +525,7 @@ bool PageMarginControl::GetUserCustomValues() bUserCustomValuesAvailable = true; } - SvtViewOptions aWinOpt3( E_WINDOW, SWPAGE_TOP_GVALUE ); + SvtViewOptions aWinOpt3( EViewType::Window, SWPAGE_TOP_GVALUE ); if ( aWinOpt3.Exists() ) { css::uno::Sequence < css::beans::NamedValue > aSeq = aWinOpt3.GetUserData(); @@ -537,7 +537,7 @@ bool PageMarginControl::GetUserCustomValues() bUserCustomValuesAvailable = true; } - SvtViewOptions aWinOpt4( E_WINDOW, SWPAGE_DOWN_GVALUE ); + SvtViewOptions aWinOpt4( EViewType::Window, SWPAGE_DOWN_GVALUE ); if ( aWinOpt4.Exists() ) { css::uno::Sequence < css::beans::NamedValue > aSeq = aWinOpt4.GetUserData(); @@ -549,7 +549,7 @@ bool PageMarginControl::GetUserCustomValues() bUserCustomValuesAvailable = true; } - SvtViewOptions aWinOpt5( E_WINDOW, SWPAGE_MIRROR_GVALUE ); + SvtViewOptions aWinOpt5( EViewType::Window, SWPAGE_MIRROR_GVALUE ); if ( aWinOpt5.Exists() ) { css::uno::Sequence < css::beans::NamedValue > aSeq = aWinOpt5.GetUserData(); @@ -572,28 +572,28 @@ void PageMarginControl::StoreUserCustomValues() } css::uno::Sequence < css::beans::NamedValue > aSeq( 1 ); - SvtViewOptions aWinOpt( E_WINDOW, SWPAGE_LEFT_GVALUE ); + SvtViewOptions aWinOpt( EViewType::Window, SWPAGE_LEFT_GVALUE ); aSeq[0].Name = "mnPageLeftMargin"; aSeq[0].Value <<= OUString::number( m_nPageLeftMargin ); aWinOpt.SetUserData( aSeq ); - SvtViewOptions aWinOpt2( E_WINDOW, SWPAGE_RIGHT_GVALUE ); + SvtViewOptions aWinOpt2( EViewType::Window, SWPAGE_RIGHT_GVALUE ); aSeq[0].Name = "mnPageRightMargin"; aSeq[0].Value <<= OUString::number( m_nPageRightMargin ); aWinOpt2.SetUserData( aSeq ); - SvtViewOptions aWinOpt3( E_WINDOW, SWPAGE_TOP_GVALUE ); + SvtViewOptions aWinOpt3( EViewType::Window, SWPAGE_TOP_GVALUE ); aSeq[0].Name = "mnPageTopMargin"; aSeq[0].Value <<= OUString::number( m_nPageTopMargin ); aWinOpt3.SetUserData( aSeq ); - SvtViewOptions aWinOpt4( E_WINDOW, SWPAGE_DOWN_GVALUE ); + SvtViewOptions aWinOpt4( EViewType::Window, SWPAGE_DOWN_GVALUE ); aSeq[0].Name = "mnPageBottomMargin"; aSeq[0].Value <<= OUString::number( m_nPageBottomMargin ); aWinOpt4.SetUserData( aSeq ); - SvtViewOptions aWinOpt5( E_WINDOW, SWPAGE_MIRROR_GVALUE ); + SvtViewOptions aWinOpt5( EViewType::Window, SWPAGE_MIRROR_GVALUE ); aSeq[0].Name = "mbMirrored"; aSeq[0].Value <<= OUString::number( (m_bMirrored ? 1 : 0) ); aWinOpt5.SetUserData( aSeq ); diff --git a/unotools/source/config/itemholder1.cxx b/unotools/source/config/itemholder1.cxx index d8c9af0d3dd3..7d0805fc4f6e 100644 --- a/unotools/source/config/itemholder1.cxx +++ b/unotools/source/config/itemholder1.cxx @@ -198,19 +198,19 @@ void ItemHolder1::impl_newItem(TItemInfo& rItem) break; case EItem::ViewOptionsDialog : - rItem.pItem = new SvtViewOptions(E_DIALOG, OUString()); + rItem.pItem = new SvtViewOptions(EViewType::Dialog, OUString()); break; case EItem::ViewOptionsTabDialog : - rItem.pItem = new SvtViewOptions(E_TABDIALOG, OUString()); + rItem.pItem = new SvtViewOptions(EViewType::TabDialog, OUString()); break; case EItem::ViewOptionsTabPage : - rItem.pItem = new SvtViewOptions(E_TABPAGE, OUString()); + rItem.pItem = new SvtViewOptions(EViewType::TabPage, OUString()); break; case EItem::ViewOptionsWindow : - rItem.pItem = new SvtViewOptions(E_WINDOW, OUString()); + rItem.pItem = new SvtViewOptions(EViewType::Window, OUString()); break; case EItem::UserOptions : diff --git a/unotools/source/config/viewoptions.cxx b/unotools/source/config/viewoptions.cxx index e37d98d97b9b..3b77ced2c76c 100644 --- a/unotools/source/config/viewoptions.cxx +++ b/unotools/source/config/viewoptions.cxx @@ -581,7 +581,7 @@ SvtViewOptions::SvtViewOptions( EViewType eType , // Search for right dat container for this view type and initialize right data container or set right ref count! switch( eType ) { - case E_DIALOG : { + case EViewType::Dialog: { // Increase ref count for dialog data container first. ++m_nRefCount_Dialogs; // If these instance the first user of the dialog data container - create these impl static container! @@ -593,7 +593,7 @@ SvtViewOptions::SvtViewOptions( EViewType eType , } } break; - case E_TABDIALOG : { + case EViewType::TabDialog: { // Increase ref count for tab-dialog data container first. ++m_nRefCount_TabDialogs; // If these instance the first user of the tab-dialog data container - create these impl static container! @@ -604,7 +604,7 @@ SvtViewOptions::SvtViewOptions( EViewType eType , } } break; - case E_TABPAGE : { + case EViewType::TabPage:{ // Increase ref count for tab-page data container first. ++m_nRefCount_TabPages; // If these instance the first user of the tab-page data container - create these impl static container! @@ -615,7 +615,7 @@ SvtViewOptions::SvtViewOptions( EViewType eType , } } break; - case E_WINDOW : { + case EViewType::Window: { // Increase ref count for window data container first. ++m_nRefCount_Windows; // If these instance the first user of the window data container - create these impl static container! @@ -640,7 +640,7 @@ SvtViewOptions::~SvtViewOptions() // Search for right dat container for this view type and deinitialize right data container or set right ref count! switch( m_eViewType ) { - case E_DIALOG : { + case EViewType::Dialog: { // Decrease ref count for dialog data container first. --m_nRefCount_Dialogs; // If these instance the last user of the dialog data container - delete these impl static container! @@ -651,7 +651,7 @@ SvtViewOptions::~SvtViewOptions() } } break; - case E_TABDIALOG : { + case EViewType::TabDialog: { // Decrease ref count for tab-dialog data container first. --m_nRefCount_TabDialogs; // If these instance the last user of the tab-dialog data container - delete these impl static container! @@ -662,7 +662,7 @@ SvtViewOptions::~SvtViewOptions() } } break; - case E_TABPAGE : { + case EViewType::TabPage:{ // Decrease ref count for tab-page data container first. --m_nRefCount_TabPages; // If these instance the last user of the tab-page data container - delete these impl static container! @@ -673,7 +673,7 @@ SvtViewOptions::~SvtViewOptions() } } break; - case E_WINDOW : { + case EViewType::Window: { // Decrease ref count for window data container first. --m_nRefCount_Windows; // If these instance the last user of the window data container - delete these impl static container! @@ -697,19 +697,19 @@ bool SvtViewOptions::Exists() const bool bExists = false; switch( m_eViewType ) { - case E_DIALOG : { + case EViewType::Dialog: { bExists = m_pDataContainer_Dialogs->Exists( m_sViewName ); } break; - case E_TABDIALOG : { + case EViewType::TabDialog: { bExists = m_pDataContainer_TabDialogs->Exists( m_sViewName ); } break; - case E_TABPAGE : { + case EViewType::TabPage:{ bExists = m_pDataContainer_TabPages->Exists( m_sViewName ); } break; - case E_WINDOW : { + case EViewType::Window: { bExists = m_pDataContainer_Windows->Exists( m_sViewName ); } break; @@ -726,13 +726,13 @@ void SvtViewOptions::Delete() switch( m_eViewType ) { - case E_DIALOG : m_pDataContainer_Dialogs->Delete( m_sViewName ); + case EViewType::Dialog : m_pDataContainer_Dialogs->Delete( m_sViewName ); break; - case E_TABDIALOG : m_pDataContainer_TabDialogs->Delete( m_sViewName ); + case EViewType::TabDialog : m_pDataContainer_TabDialogs->Delete( m_sViewName ); break; - case E_TABPAGE : m_pDataContainer_TabPages->Delete( m_sViewName ); + case EViewType::TabPage : m_pDataContainer_TabPages->Delete( m_sViewName ); break; - case E_WINDOW : m_pDataContainer_Windows->Delete( m_sViewName ); + case EViewType::Window : m_pDataContainer_Windows->Delete( m_sViewName ); break; } } @@ -747,19 +747,19 @@ OUString SvtViewOptions::GetWindowState() const OUString sState; switch( m_eViewType ) { - case E_DIALOG : { + case EViewType::Dialog: { sState = m_pDataContainer_Dialogs->GetWindowState( m_sViewName ); } break; - case E_TABDIALOG : { + case EViewType::TabDialog:{ sState = m_pDataContainer_TabDialogs->GetWindowState( m_sViewName ); } break; - case E_TABPAGE : { + case EViewType::TabPage:{ sState = m_pDataContainer_TabPages->GetWindowState( m_sViewName ); } break; - case E_WINDOW : { + case EViewType::Window: { sState = m_pDataContainer_Windows->GetWindowState( m_sViewName ); } break; @@ -776,19 +776,19 @@ void SvtViewOptions::SetWindowState( const OUString& sState ) switch( m_eViewType ) { - case E_DIALOG : { + case EViewType::Dialog: { m_pDataContainer_Dialogs->SetWindowState( m_sViewName, sState ); } break; - case E_TABDIALOG : { + case EViewType::TabDialog: { m_pDataContainer_TabDialogs->SetWindowState( m_sViewName, sState ); } break; - case E_TABPAGE : { + case EViewType::TabPage:{ m_pDataContainer_TabPages->SetWindowState( m_sViewName, sState ); } break; - case E_WINDOW : { + case EViewType::Window: { m_pDataContainer_Windows->SetWindowState( m_sViewName, sState ); } break; @@ -804,10 +804,10 @@ sal_Int32 SvtViewOptions::GetPageID() const // Safe impossible cases. // These call isn't allowed for dialogs, tab-pages or windows! - OSL_ENSURE( !(m_eViewType==E_DIALOG||m_eViewType==E_TABPAGE||m_eViewType==E_WINDOW), "SvtViewOptions::GetPageID()\nCall not allowed for Dialogs, TabPages or Windows! I do nothing!\n" ); + OSL_ENSURE( !(m_eViewType==EViewType::Dialog||m_eViewType==EViewType::TabPage||m_eViewType==EViewType::Window), "SvtViewOptions::GetPageID()\nCall not allowed for Dialogs, TabPages or Windows! I do nothing!\n" ); sal_Int32 nID = 0; - if( m_eViewType == E_TABDIALOG ) + if( m_eViewType == EViewType::TabDialog ) nID = m_pDataContainer_TabDialogs->GetPageID( m_sViewName ); return nID; } @@ -821,9 +821,9 @@ void SvtViewOptions::SetPageID( sal_Int32 nID ) // Safe impossible cases. // These call isn't allowed for dialogs, tab-pages or windows! - OSL_ENSURE( !(m_eViewType==E_DIALOG||m_eViewType==E_TABPAGE||m_eViewType==E_WINDOW), "SvtViewOptions::SetPageID()\nCall not allowed for Dialogs, TabPages or Windows! I do nothing!\n" ); + OSL_ENSURE( !(m_eViewType==EViewType::Dialog||m_eViewType==EViewType::TabPage||m_eViewType==EViewType::Window), "SvtViewOptions::SetPageID()\nCall not allowed for Dialogs, TabPages or Windows! I do nothing!\n" ); - if( m_eViewType == E_TABDIALOG ) + if( m_eViewType == EViewType::TabDialog ) m_pDataContainer_TabDialogs->SetPageID( m_sViewName, nID ); } @@ -836,10 +836,10 @@ bool SvtViewOptions::IsVisible() const // Safe impossible cases. // These call isn't allowed for dialogs, tab-dialogs or tab-pages! - OSL_ENSURE( !(m_eViewType==E_DIALOG||m_eViewType==E_TABDIALOG||m_eViewType==E_TABPAGE), "SvtViewOptions::IsVisible()\nCall not allowed for Dialogs, TabDialogs or TabPages! I do nothing!\n" ); + OSL_ENSURE( !(m_eViewType==EViewType::Dialog||m_eViewType==EViewType::TabDialog||m_eViewType==EViewType::TabPage), "SvtViewOptions::IsVisible()\nCall not allowed for Dialogs, TabDialogs or TabPages! I do nothing!\n" ); bool bState = false; - if( m_eViewType == E_WINDOW ) + if( m_eViewType == EViewType::Window ) bState = m_pDataContainer_Windows->GetVisible( m_sViewName ) == SvtViewOptionsBase_Impl::STATE_TRUE; return bState; @@ -854,9 +854,9 @@ void SvtViewOptions::SetVisible( bool bState ) // Safe impossible cases. // These call isn't allowed for dialogs, tab-dialogs or tab-pages! - OSL_ENSURE( !(m_eViewType==E_DIALOG||m_eViewType==E_TABDIALOG||m_eViewType==E_TABPAGE), "SvtViewOptions::SetVisible()\nCall not allowed for Dialogs, TabDialogs or TabPages! I do nothing!\n" ); + OSL_ENSURE( !(m_eViewType==EViewType::Dialog||m_eViewType==EViewType::TabDialog||m_eViewType==EViewType::TabPage), "SvtViewOptions::SetVisible()\nCall not allowed for Dialogs, TabDialogs or TabPages! I do nothing!\n" ); - if( m_eViewType == E_WINDOW ) + if( m_eViewType == EViewType::Window ) m_pDataContainer_Windows->SetVisible( m_sViewName, bState ); } @@ -869,10 +869,10 @@ bool SvtViewOptions::HasVisible() const // Safe impossible cases. // These call isn't allowed for dialogs, tab-dialogs or tab-pages! - OSL_ENSURE( !(m_eViewType==E_DIALOG||m_eViewType==E_TABDIALOG||m_eViewType==E_TABPAGE), "SvtViewOptions::IsVisible()\nCall not allowed for Dialogs, TabDialogs or TabPages! I do nothing!\n" ); + OSL_ENSURE( !(m_eViewType==EViewType::Dialog||m_eViewType==EViewType::TabDialog||m_eViewType==EViewType::TabPage), "SvtViewOptions::IsVisible()\nCall not allowed for Dialogs, TabDialogs or TabPages! I do nothing!\n" ); bool bState = false; - if( m_eViewType == E_WINDOW ) + if( m_eViewType == EViewType::Window ) bState = m_pDataContainer_Windows->GetVisible( m_sViewName ) != SvtViewOptionsBase_Impl::STATE_NONE; return bState; @@ -886,19 +886,19 @@ css::uno::Sequence< css::beans::NamedValue > SvtViewOptions::GetUserData() const css::uno::Sequence< css::beans::NamedValue > lData; switch( m_eViewType ) { - case E_DIALOG : { + case EViewType::Dialog: { lData = m_pDataContainer_Dialogs->GetUserData( m_sViewName ); } break; - case E_TABDIALOG : { + case EViewType::TabDialog: { lData = m_pDataContainer_TabDialogs->GetUserData( m_sViewName ); } break; - case E_TABPAGE : { + case EViewType::TabPage:{ lData = m_pDataContainer_TabPages->GetUserData( m_sViewName ); } break; - case E_WINDOW : { + case EViewType::Window: { lData = m_pDataContainer_Windows->GetUserData( m_sViewName ); } break; @@ -913,19 +913,19 @@ void SvtViewOptions::SetUserData( const css::uno::Sequence< css::beans::NamedVal switch( m_eViewType ) { - case E_DIALOG : { + case EViewType::Dialog: { m_pDataContainer_Dialogs->SetUserData( m_sViewName, lData ); } break; - case E_TABDIALOG : { + case EViewType::TabDialog: { m_pDataContainer_TabDialogs->SetUserData( m_sViewName, lData ); } break; - case E_TABPAGE : { + case EViewType::TabPage:{ m_pDataContainer_TabPages->SetUserData( m_sViewName, lData ); } break; - case E_WINDOW : { + case EViewType::Window: { m_pDataContainer_Windows->SetUserData( m_sViewName, lData ); } break; @@ -940,19 +940,19 @@ css::uno::Any SvtViewOptions::GetUserItem( const OUString& sName ) const css::uno::Any aItem; switch( m_eViewType ) { - case E_DIALOG : { + case EViewType::Dialog: { aItem = m_pDataContainer_Dialogs->GetUserItem( m_sViewName, sName ); } break; - case E_TABDIALOG : { + case EViewType::TabDialog: { aItem = m_pDataContainer_TabDialogs->GetUserItem( m_sViewName, sName ); } break; - case E_TABPAGE : { + case EViewType::TabPage:{ aItem = m_pDataContainer_TabPages->GetUserItem( m_sViewName, sName ); } break; - case E_WINDOW : { + case EViewType::Window: { aItem = m_pDataContainer_Windows->GetUserItem( m_sViewName, sName ); } break; @@ -968,19 +968,19 @@ void SvtViewOptions::SetUserItem( const OUString& sName , switch( m_eViewType ) { - case E_DIALOG : { + case EViewType::Dialog: { m_pDataContainer_Dialogs->SetUserItem( m_sViewName, sName, aValue ); } break; - case E_TABDIALOG : { + case EViewType::TabDialog: { m_pDataContainer_TabDialogs->SetUserItem( m_sViewName, sName, aValue ); } break; - case E_TABPAGE : { + case EViewType::TabPage:{ m_pDataContainer_TabPages->SetUserItem( m_sViewName, sName, aValue ); } break; - case E_WINDOW : { + case EViewType::Window: { m_pDataContainer_Windows->SetUserItem( m_sViewName, sName, aValue ); } break; _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits