/* -*- 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_DBACCESS_SOURCE_UI_INC_MODULEDBU_HXX #define INCLUDED_DBACCESS_SOURCE_UI_INC_MODULEDBU_HXX #include #include class ResMgr; namespace dbaui { // OModule class OModuleImpl; class OModule { friend class OModuleClient; private: OModule() = delete; //TODO: get rid of this class protected: static ::osl::Mutex s_aMutex; /// access safety static sal_Int32 s_nClients; /// number of registered clients static OModuleImpl* s_pImpl; /// impl class. lives as long as at least one client for the module is registered public: /// get the vcl res manager of the module static ResMgr* getResManager(); protected: /// register a client for the module static void registerClient(); /// revoke a client for the module static void revokeClient(); private: /** ensure that the impl class exists @precond m_aMutex is guarded when this method gets called */ static void ensureImpl(); }; // OModuleClient /** base class for objects which uses any global module-specific resources */ class OModuleClient { public: OModuleClient() { OModule::registerClient(); } ~OModuleClient() { OModule::revokeClient(); } }; // ModuleRes /** specialized ResId, using the resource manager provided by the global module */ class ModuleRes : public ::ResId { public: ModuleRes(sal_uInt16 _nId) : ResId(_nId, *OModule::getResManager()) { } }; } // namespace dbaui #endif // INCLUDED_DBACCESS_SOURCE_UI_INC_MODULEDBU_HXX /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ labora/co-2021 LibreOffice 核心代码仓库文档基金会
summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2017-02-21When building with clang-cl on Windows, build CLR code with MSVCStephan Bergmann
...as clang-cl doesn't support the /clr switch. * In configure.ac, capture the MSCV version (that would be used if CC hadn't been overridden to use clang-cl) into MSVC_CXX. * The logic which flags to pass into gb_CObject__command_pattern is coded into the platform-agnostic LinkTarget.mk, so it's too late to try and filter all relevant flags in com_GCC_class.mk, depending on whether a given .cxx file is a normal one built with the normal $CXX or a special /clr one built with $MSVC_CXX. Thus, a new CxxClrObject class had to be introduced that captures this information early. * When building with clang-cl, the generated config_host/config_*.h files contain values suitable for clang-cl, but not for MSVC. But the .cxx files compiled with MSVC happen to include config_global.h, and would fail. Hack around that problem for now by introducing a hard-coded, minimal solenv/clang-cl/config_global.h that is found first when buliding such a CxxClrObject. Needs cleaning-up properly. Change-Id: Iff8aac51c0b4fa906b14503c692640dda0996d33 Reviewed-on: https://gerrit.libreoffice.org/34509 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2016-06-20switch to EHs on windowsMarkus Mohrhard
This seems to be a good idea based on several discussions in the project. In the end catching SEH exceptions is just going to cause strange platform dependent bahavior. This patch is based on on http://thread.gmane.org/gmane.comp.documentfoundation.libreoffice.scm/39102/focus=55516 and includes some additional cleanup of the sal signal code. Change-Id: Iedc998e37e6495afec445eccb60fa1c2b1a7defd Reviewed-on: https://gerrit.libreoffice.org/26497 Reviewed-by: Michael Meeks <michael.meeks@collabora.com> Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2013-10-28gbuild: refactor CliLibraryMichael Stahl
- stop copying the DLL to OUTDIR - since that was the main reason for the separation between CliLibrary and CliLibraryTarget, merge the targets; the newly inherited variables are not expected to cause problems - hardcode target to URE bin dir for now, no immediate need for multiple layers Change-Id: If0fea1337349c41f231c8cde122852c71d5080a7
2013-06-10gbuild: remove external_headers targetsMatúš Kukan
gb_LinkTarget__add_internal_headers was used only for sdi headers now anyway, hopefully for no good reason. One headers target is enough for all. Change-Id: Ia01fb7a0aac7f72915448424b3393ecd9ba0f8f5
2013-04-19cli_ure: remove obsolete USE_DEBUG_RUNTIME check for msvcmrtMichael Stahl
This is handled in com_MSC_class.mk now. Change-Id: I5e4c2e791e9acd623d7c5ce352b5c39b6cb939b4