diff options
author | Caolán McNamara <caolanm@redhat.com> | 2018-04-02 14:20:14 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2018-04-02 18:29:22 +0200 |
commit | 75a271fdc40aab116c1468683e64f843d292dc48 (patch) | |
tree | 14b1aeeaab2f26febdd9a4a9415e624b458d2397 /sfx2/source | |
parent | 840be9fdccb99eb3faccf9695186810eba5de8e4 (diff) |
can now remove ResId based config id scheme
Change-Id: Id1ad413dacc7eb07269debba65426236bef28610
Reviewed-on: https://gerrit.libreoffice.org/52259
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sfx2/source')
-rw-r--r-- | sfx2/source/dialog/basedlgs.cxx | 41 |
1 files changed, 4 insertions, 37 deletions
diff --git a/sfx2/source/dialog/basedlgs.cxx b/sfx2/source/dialog/basedlgs.cxx index e671d8e6dfbe..126d2f9bf511 100644 --- a/sfx2/source/dialog/basedlgs.cxx +++ b/sfx2/source/dialog/basedlgs.cxx @@ -93,15 +93,7 @@ void SfxFloatingWindow_Impl::Notify( SfxBroadcaster&, const SfxHint& rHint ) void SfxModalDialog::SetDialogData_Impl() { // save settings (position and user data) - OUString sConfigId; - if (isLayoutEnabled()) - sConfigId = OStringToOUString(GetHelpId(),RTL_TEXTENCODING_UTF8); - else - { - SAL_WARN("sfx.config", "Dialog needs to be converted to .ui format"); - sConfigId = OUString::number(nUniqId); - } - + OUString sConfigId = OStringToOUString(GetHelpId(),RTL_TEXTENCODING_UTF8); SvtViewOptions aDlgOpt(EViewType::Dialog, sConfigId); aDlgOpt.SetWindowState(OStringToOUString( GetWindowState(WindowStateMask::Pos), RTL_TEXTENCODING_ASCII_US)); @@ -119,15 +111,7 @@ void SfxModalDialog::GetDialogData_Impl() */ { - OUString sConfigId; - if (isLayoutEnabled()) - sConfigId = OStringToOUString(GetHelpId(),RTL_TEXTENCODING_UTF8); - else - { - SAL_WARN("sfx.config", "Dialog needs to be converted to .ui format"); - sConfigId = OUString::number(nUniqId); - } - + OUString sConfigId = OStringToOUString(GetHelpId(),RTL_TEXTENCODING_UTF8); SvtViewOptions aDlgOpt(EViewType::Dialog, sConfigId); if ( aDlgOpt.Exists() ) { @@ -142,7 +126,6 @@ void SfxModalDialog::GetDialogData_Impl() SfxModalDialog::SfxModalDialog(vcl::Window *pParent, const OUString& rID, const OUString& rUIXMLDescription ) : ModalDialog(pParent, rID, rUIXMLDescription), - nUniqId(0), //todo: remove this member when the ResId using ctor is removed pInputSet(nullptr), pOutputSet(nullptr) { @@ -682,12 +665,6 @@ IMPL_LINK_NOARG(SfxSingleTabDialog, OKHdl_Impl, Button*, void) OUString sConfigId = OStringToOUString(pImpl->m_pSfxPage->GetConfigId(), RTL_TEXTENCODING_UTF8); - if (sConfigId.isEmpty()) - { - SAL_WARN("sfx.config", "Tabpage needs to be converted to .ui format"); - sConfigId = OUString::number(GetUniqId()); - } - SvtViewOptions aPageOpt(EViewType::TabPage, sConfigId); aPageOpt.SetUserItem( USERITEM_NAME, makeAny( sData ) ); EndDialog( RET_OK ); @@ -737,31 +714,21 @@ void SfxSingleTabDialog::dispose() SfxModalDialog::dispose(); } -void SfxSingleTabDialog::SetTabPage(SfxTabPage* pTabPage, - sal_uInt32 nSettingsId) /* [Description] Insert a (new) TabPage; an existing page is deleted. The passed on page is initialized with the initially given Itemset through calling Reset(). */ - +void SfxSingleTabDialog::SetTabPage(SfxTabPage* pTabPage) { - SetUniqId(nSettingsId); pImpl->m_pSfxPage.disposeAndClear(); pImpl->m_pSfxPage = pTabPage; if ( pImpl->m_pSfxPage ) { // First obtain the user data, only then Reset() - OUString sConfigId = OStringToOUString(pImpl->m_pSfxPage->GetConfigId(), - RTL_TEXTENCODING_UTF8); - if (sConfigId.isEmpty()) - { - SAL_WARN("sfx.config", "Tabpage needs to be converted to .ui format"); - sConfigId = OUString::number(GetUniqId()); - } - + OUString sConfigId = OStringToOUString(pImpl->m_pSfxPage->GetConfigId(), RTL_TEXTENCODING_UTF8); SvtViewOptions aPageOpt(EViewType::TabPage, sConfigId); Any aUserItem = aPageOpt.GetUserItem( USERITEM_NAME ); OUString sUserData; |