summaryrefslogtreecommitdiff
path: root/cui
diff options
context:
space:
mode:
authorMark Page <aptitude@btconnect.com>2016-07-04 17:30:42 +0100
committerNoel Grandin <noelgrandin@gmail.com>2016-07-13 06:32:46 +0000
commitf7b1cd66167050afecf487e3d89ea12de74200b5 (patch)
tree75381b63bb5dca7ed1fa2ff5602064750f46f042 /cui
parent633413a37ee7442cd899db1269fd3ef404efe58a (diff)
Moved SfxModule owner to SfxApplication
::GetAppData replaced with SfxApplication::GetModule that now returns SfxModule* SfxModule no longer registers self for ownership instead it is now registered using SfxApplication::SetModule Change-Id: Ifbbe1b2b4c5122da8e643b7926d47878d116c6c8 Reviewed-on: https://gerrit.libreoffice.org/26914 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'cui')
-rw-r--r--cui/source/options/treeopt.cxx9
-rw-r--r--cui/source/tabpages/autocdlg.cxx3
2 files changed, 5 insertions, 7 deletions
diff --git a/cui/source/options/treeopt.cxx b/cui/source/options/treeopt.cxx
index 3b3e52c62506..d61a661d2ce8 100644
--- a/cui/source/options/treeopt.cxx
+++ b/cui/source/options/treeopt.cxx
@@ -89,7 +89,6 @@
#include <svx/xtable.hxx>
#include <svx/xpool.hxx>
#include <toolkit/helper/vclunohelper.hxx>
-#include <tools/shl.hxx>
#include <tools/urlobj.hxx>
#include <unotools/linguprops.hxx>
#include <unotools/misccfg.hxx>
@@ -1586,7 +1585,7 @@ void OfaTreeOptionsDialog::Initialize( const Reference< XFrame >& _xFrame )
|| aFactory == "com.sun.star.text.WebDocument"
|| aFactory == "com.sun.star.text.GlobalDocument" )
{
- SfxModule* pSwMod = *reinterpret_cast<SfxModule**>(GetAppData(SHL_WRITER));
+ SfxModule* pSwMod = SfxApplication::GetModule(SfxToolsModule::Writer);
if ( !lcl_isOptionHidden( SID_SW_EDITOPTIONS, aOptionsDlgOpt ) )
{
if ( aFactory == "com.sun.star.text.WebDocument" )
@@ -1635,7 +1634,7 @@ void OfaTreeOptionsDialog::Initialize( const Reference< XFrame >& _xFrame )
if ( !lcl_isOptionHidden( SID_SC_EDITOPTIONS, aOptionsDlgOpt ) )
{
ResStringArray& rCalcArray = aDlgResource.GetCalcArray();
- SfxModule* pScMod = *reinterpret_cast<SfxModule**>(GetAppData( SHL_CALC ));
+ SfxModule* pScMod = SfxApplication::GetModule( SfxToolsModule::Calc );
setGroupName( "Calc", rCalcArray.GetString(0) );
nGroup = AddGroup( rCalcArray.GetString( 0 ), pScMod, pScMod, SID_SC_EDITOPTIONS );
const sal_uInt16 nCount = static_cast< const sal_uInt16 >( rCalcArray.Count() );
@@ -1652,7 +1651,7 @@ void OfaTreeOptionsDialog::Initialize( const Reference< XFrame >& _xFrame )
}
// Impress options
- SfxModule* pSdMod = *reinterpret_cast<SfxModule**>(GetAppData( SHL_DRAW ));
+ SfxModule* pSdMod = SfxApplication::GetModule( SfxToolsModule::Draw );
if ( aModuleOpt.IsModuleInstalled( SvtModuleOptions::EModule::IMPRESS ) )
{
if ( aFactory == "com.sun.star.presentation.PresentationDocument" )
@@ -1706,7 +1705,7 @@ void OfaTreeOptionsDialog::Initialize( const Reference< XFrame >& _xFrame )
if ( !lcl_isOptionHidden( SID_SM_EDITOPTIONS, aOptionsDlgOpt ) )
{
ResStringArray& rStarMathArray = aDlgResource.GetStarMathArray();
- SfxModule* pSmMod = *reinterpret_cast<SfxModule**>(GetAppData(SHL_SM));
+ SfxModule* pSmMod = SfxApplication::GetModule(SfxToolsModule::Math);
setGroupName( "Math", rStarMathArray.GetString(0) );
nGroup = AddGroup(rStarMathArray.GetString(0), pSmMod, pSmMod, SID_SM_EDITOPTIONS );
for ( i = 1; i < rStarMathArray.Count(); ++i )
diff --git a/cui/source/tabpages/autocdlg.cxx b/cui/source/tabpages/autocdlg.cxx
index fed51d356d7c..f44230610441 100644
--- a/cui/source/tabpages/autocdlg.cxx
+++ b/cui/source/tabpages/autocdlg.cxx
@@ -25,7 +25,6 @@
#include <vcl/settings.hxx>
#include <sot/exchange.hxx>
#include <svtools/transfer.hxx>
-#include <tools/shl.hxx>
#include <unotools/syslocale.hxx>
#include <sfx2/objsh.hxx>
#include <sfx2/viewsh.hxx>
@@ -882,7 +881,7 @@ OfaAutocorrReplacePage::OfaAutocorrReplacePage( vcl::Window* pParent,
get(m_pReplaceTLB, "tabview");
m_pReplaceTLB->set_height_request(16 * GetTextHeight());
- SfxModule *pMod = *reinterpret_cast<SfxModule**>(GetAppData(SHL_WRITER));
+ SfxModule *pMod = SfxApplication::GetModule(SfxToolsModule::Writer);
bSWriter = pMod == SfxModule::GetActiveModule();
LanguageTag aLanguageTag( eLastDialogLanguage );