From f7b1cd66167050afecf487e3d89ea12de74200b5 Mon Sep 17 00:00:00 2001 From: Mark Page Date: Mon, 4 Jul 2016 17:30:42 +0100 Subject: 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 Reviewed-by: Noel Grandin --- include/sfx2/app.hxx | 13 ++++++++ include/sfx2/module.hxx | 2 -- include/tools/shl.hxx | 87 ------------------------------------------------- 3 files changed, 13 insertions(+), 89 deletions(-) delete mode 100644 include/tools/shl.hxx (limited to 'include') diff --git a/include/sfx2/app.hxx b/include/sfx2/app.hxx index 2b02ed1356a7..afeb50110fc2 100644 --- a/include/sfx2/app.hxx +++ b/include/sfx2/app.hxx @@ -88,6 +88,16 @@ namespace sfx2 } } +enum class SfxToolsModule +{ + Math = 0, + Calc = 1, + Draw = 2, + Writer = 3, + Basic = 4, + LAST = Basic +}; + class SfxLinkItem : public SfxPoolItem { Link aLink; @@ -224,6 +234,9 @@ public: SAL_DLLPRIVATE SfxSlotPool& GetAppSlotPool_Impl() const; SAL_DLLPRIVATE SfxModule* GetModule_Impl(); + static void SetModule(SfxToolsModule nSharedLib, std::unique_ptr pModule); + static SfxModule* GetModule(SfxToolsModule nSharedLib); + static bool loadBrandSvg(const char *pName, BitmapEx &rBitmap, int nWidth); /** loads the application logo as used in the impress slideshow pause screen */ diff --git a/include/sfx2/module.hxx b/include/sfx2/module.hxx index 2761cce2e1e9..12967402dd59 100644 --- a/include/sfx2/module.hxx +++ b/include/sfx2/module.hxx @@ -96,8 +96,6 @@ public: static FieldUnit GetModuleFieldUnit( css::uno::Reference< css::frame::XFrame > const & i_frame ); FieldUnit GetFieldUnit() const; - SAL_DLLPRIVATE static std::vector& GetModules_Impl(); - SAL_DLLPRIVATE static void DestroyModules_Impl(); SAL_DLLPRIVATE SfxTbxCtrlFactArr_Impl* GetTbxCtrlFactories_Impl() const; SAL_DLLPRIVATE SfxStbCtrlFactArr_Impl* GetStbCtrlFactories_Impl() const; SAL_DLLPRIVATE SfxChildWinFactArr_Impl* GetChildWinFactories_Impl() const; diff --git a/include/tools/shl.hxx b/include/tools/shl.hxx deleted file mode 100644 index 85a42429ca90..000000000000 --- a/include/tools/shl.hxx +++ /dev/null @@ -1,87 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ - -#ifndef INCLUDED_TOOLS_SHL_HXX -#define INCLUDED_TOOLS_SHL_HXX - -#include - -// GetAppData() - -// 0 (SHL_SHL1) removed -// 1 (SHL_SHL2) removed -// 2 (SHL_SHL3) removed -// 3 (SHL_APP1) removed -// 4 (SHL_APP2) removed -// 5 (SHL_APP3) removed -// 6 (SHL_TOOLS) removed -// 7 (SHL_SV) removed -// 8 (SHL_SVT) removed -// 9 (SHL_SVDDE) removed -// 10 (SHL_ERR) removed -//11 (SHL_IPC) removed -//12 (SHL_SVX) removed -//13 (SHL_ITEM) removed -//14 (SHL_SVD) removed -//15 (SHL_SI) removed -//16 (SHL_SFC) removed -//17 (SHL_SFX) removed -//18 (SHL_SO2) removed -//19 (SHL_IDL) removed -//20 (SHL_IDE) removed -//21 (SHL_EDIT) removed -//22 (SHL_VCED) removed -//23 (SHL_BASIC) removed -//24 (SHL_HELP) removed -//25 (SHL_LNKCCH) removed -//26 (SHL_CHANNEL) removed -//27 (SHL_SBX) removed -//28 (SHL_SBC) removed -//29 (SHL_SDB) removed -//30 (SHL_SBA) removed -//31 (SHL_SBA2) removed -//32 (SHL_SCH) removed -//33 (SHL_SIM) removed -#define SHL_SM 34 -//35 (SHL_SGA) removed -//36 (SHL_DOCMGR) removed -//37 removed -//38 (SHL_MAIL) removed -//39 (SHL_NEWS) removed -//40 (SHL_OFFAPP) removed -//41 (SHL_INET) removed -//43 (SHL_CHAOS) removed -//43 (SHL_HISTORY) removed -//44 (SHL_SJ) removed -#define SHL_CALC 45 -#define SHL_DRAW 46 -#define SHL_WRITER 47 -//48 (SHL_MONEY) removed -//49 (SHL_HBCI) removed -//50 (SHL_BASE3D) removed -//51 (SHL_BRUSHITEM) removed -//52 (SHL_SFONTITEM) removed - -#define SHL_COUNT 53 - -TOOLS_DLLPUBLIC void** GetAppData( sal_uInt16 nSharedLib ); - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ -- cgit