diff options
-rw-r--r-- | bin/find-mergedlib-can-be-private.classes.results | 22 | ||||
-rwxr-xr-x | bin/find-mergedlib-can-be-private.py | 19 | ||||
-rw-r--r-- | include/i18nutil/casefolding.hxx | 3 | ||||
-rw-r--r-- | include/i18nutil/oneToOneMapping.hxx | 3 | ||||
-rw-r--r-- | include/i18nutil/widthfolding.hxx | 3 | ||||
-rw-r--r-- | include/linguistic/hyphdta.hxx | 5 | ||||
-rw-r--r-- | include/linguistic/lngprophelp.hxx | 11 | ||||
-rw-r--r-- | include/linguistic/spelldta.hxx | 11 | ||||
-rw-r--r-- | include/sot/stg.hxx | 3 | ||||
-rw-r--r-- | include/tools/gen.hxx | 3 | ||||
-rw-r--r-- | include/tools/inetmsg.hxx | 3 | ||||
-rw-r--r-- | include/tools/inetstrm.hxx | 3 | ||||
-rw-r--r-- | include/tools/vcompat.hxx | 3 | ||||
-rw-r--r-- | include/tools/weakbase.h | 3 |
14 files changed, 41 insertions, 54 deletions
diff --git a/bin/find-mergedlib-can-be-private.classes.results b/bin/find-mergedlib-can-be-private.classes.results index 0d8f9b808e15..b75fe09fb821 100644 --- a/bin/find-mergedlib-can-be-private.classes.results +++ b/bin/find-mergedlib-can-be-private.classes.results @@ -53,8 +53,6 @@ GroupBox HelpLinker Hunspell Hunzip -INetMIMEMessage -INetMIMEMessageStream ImageControl ImplJobSetup IndexerPreProcessor @@ -119,7 +117,6 @@ PatternField PatternFormatter PhysicalFontFamily PlaceEditDialog -Point PrinterOptions ProgressBar QueueInfo @@ -163,7 +160,6 @@ SkiaPackedSurfaceAtlasManager SkiaZone SpinButton SpinListenerMultiplexer -Storage SvParser<HtmlTokenId>::TokenStackType SvParser<int>::TokenStackType SvtBasePrintOptions @@ -180,8 +176,6 @@ Svx3DTextureProjectionXItem Svx3DTextureProjectionYItem SvxCurrencyToolBoxControl SvxEditSourceAdapter -SvxGraphicObject -SvxMetricField SvxPasswordDialog SvxPropertySetInfoPool SvxTPage @@ -195,9 +189,6 @@ TextListenerMultiplexer Throbber TimeBox TimeFormatter -TreeEditListenerMultiplexer -TreeExpansionListenerMultiplexer -TreeSelectionListenerMultiplexer UFlowChainedText UnoEditControl UnoWrapperBase @@ -214,7 +205,6 @@ VclBuilder::sortIntoBestTabTraversalOrder VclDrawingArea VclGrid VclWindowEvent -VersionCompat XMLDashStyleExport XMLDashStyleImport XMLGradientStyleExport @@ -361,9 +351,6 @@ framework::StatusBarConfiguration framework::ToolBoxConfiguration framework::TransactionManager framework::UIConfigurationImporterOOo1x -i18nutil::casefolding -i18nutil::oneToOneMapping -i18nutil::widthfolding legacy::CntInt32 legacy::SfxBool legacy::SvxAdjust @@ -379,14 +366,6 @@ legacy::SvxPosture legacy::SvxTextLine legacy::SvxVerJustify legacy::SvxWeight -linguistic::HyphenatedWord -linguistic::PossibleHyphens -linguistic::PropertyChgHelper -linguistic::PropertyHelper_Hyphenation -linguistic::PropertyHelper_Spell -linguistic::PropertyHelper_Spelling -linguistic::PropertyHelper_Thesaurus -linguistic::SpellAlternatives psp::PrintFontManager::PrintFont sdr::SelectionController sdr::ViewSelection @@ -421,7 +400,6 @@ svxform::OLocalExchange svxform::OLocalExchangeHelper svxform::OSQLParserClient toolkitform -tools::WeakBase ucbhelper::ActiveDataSink ucbhelper::InteractionApprove ucbhelper::InteractionDisapprove diff --git a/bin/find-mergedlib-can-be-private.py b/bin/find-mergedlib-can-be-private.py index 572cd1c8e005..ba09996b4757 100755 --- a/bin/find-mergedlib-can-be-private.py +++ b/bin/find-mergedlib-can-be-private.py @@ -8,6 +8,7 @@ import subprocess import sys import re +import multiprocessing exported_symbols = set() imported_symbols = set() @@ -75,9 +76,6 @@ merged_libs = { \ ,"xo" \ ,"xstor" } -classes_with_exported_symbols = set() -classes_with_imported_symbols = set() - # look for symbols exported by libmerged subprocess_nm = subprocess.Popen("nm -D instdir/program/libmergedlo.so", stdout=subprocess.PIPE, shell=True) with subprocess_nm.stdout as txt: @@ -124,12 +122,11 @@ print("no symbols that can be made internal = " + str(len(intersec_symbols))) # Now look for classes where none of the class symbols are imported, # i.e. we can mark the whole class as hidden -def extract_class(sym, add_to_set): +def extract_class(sym): filtered_sym = subprocess.check_output(["c++filt", sym]).strip() if filtered_sym.startswith("vtable for "): classname = filtered_sym[11:] - add_to_set.add(classname) - return + return classname if filtered_sym.startswith("non-virtual thunk to "): filtered_sym = filtered_sym[21:] elif filtered_sym.startswith("virtual thunk to "): @@ -139,12 +136,12 @@ def extract_class(sym, add_to_set): i = filtered_sym.rfind("::", 0, i) if i != -1: classname = filtered_sym[:i] - add_to_set.add(classname) + return classname + return "" -for sym in exported_symbols: - extract_class(sym, classes_with_exported_symbols) -for sym in imported_symbols: - extract_class(sym, classes_with_imported_symbols) +pool = multiprocessing.Pool(multiprocessing.cpu_count()) +classes_with_exported_symbols = set(pool.map(extract_class, list(exported_symbols))) +classes_with_imported_symbols = set(pool.map(extract_class, list(imported_symbols))) with open("bin/find-mergedlib-can-be-private.classes.results", "wt") as f: for sym in sorted(classes_with_exported_symbols - classes_with_imported_symbols): diff --git a/include/i18nutil/casefolding.hxx b/include/i18nutil/casefolding.hxx index 1b7df9e74b5e..14b0f6bf4333 100644 --- a/include/i18nutil/casefolding.hxx +++ b/include/i18nutil/casefolding.hxx @@ -22,6 +22,7 @@ #include <sal/types.h> #include <i18nutil/i18nutildllapi.h> #include <o3tl/typed_flags_set.hxx> +#include <config_options.h> namespace com { namespace sun { namespace star { namespace lang { struct Locale; } } } } @@ -70,7 +71,7 @@ struct MappingElement sal_Int8 current; }; -class I18NUTIL_DLLPUBLIC casefolding +class UNLESS_MERGELIBS(I18NUTIL_DLLPUBLIC) casefolding { public: /// @throws css::uno::RuntimeException diff --git a/include/i18nutil/oneToOneMapping.hxx b/include/i18nutil/oneToOneMapping.hxx index c483b8388ada..bc659b30a727 100644 --- a/include/i18nutil/oneToOneMapping.hxx +++ b/include/i18nutil/oneToOneMapping.hxx @@ -21,6 +21,7 @@ #include <i18nutil/i18nutildllapi.h> #include <memory> +#include <config_options.h> namespace i18nutil { @@ -38,7 +39,7 @@ struct UnicodePairWithFlag UnicodePairFlag flag; }; -class I18NUTIL_DLLPUBLIC oneToOneMapping +class UNLESS_MERGELIBS(I18NUTIL_DLLPUBLIC) oneToOneMapping { private: oneToOneMapping(const oneToOneMapping&) = delete; diff --git a/include/i18nutil/widthfolding.hxx b/include/i18nutil/widthfolding.hxx index 90048110ce1f..73ad5eb2a558 100644 --- a/include/i18nutil/widthfolding.hxx +++ b/include/i18nutil/widthfolding.hxx @@ -22,6 +22,7 @@ #include <sal/types.h> #include <rtl/ustring.hxx> #include <i18nutil/i18nutildllapi.h> +#include <config_options.h> namespace com { namespace sun { namespace star { namespace uno { template <typename > class Sequence; } } } } namespace i18nutil { class oneToOneMapping; } @@ -30,7 +31,7 @@ namespace i18nutil { #define WIDTHFOLDING_DONT_USE_COMBINED_VU 0x01 -class I18NUTIL_DLLPUBLIC widthfolding +class UNLESS_MERGELIBS(I18NUTIL_DLLPUBLIC) widthfolding { public: static oneToOneMapping& getfull2halfTable(); diff --git a/include/linguistic/hyphdta.hxx b/include/linguistic/hyphdta.hxx index 23f1c87d0e30..a346b75b15b3 100644 --- a/include/linguistic/hyphdta.hxx +++ b/include/linguistic/hyphdta.hxx @@ -25,6 +25,7 @@ #include <cppuhelper/implbase.hxx> #include <linguistic/lngdllapi.h> #include <i18nlangtag/lang.h> +#include <config_options.h> namespace linguistic { @@ -61,7 +62,7 @@ public: virtual sal_Bool SAL_CALL isAlternativeSpelling() override; - static css::uno::Reference <css::linguistic2::XHyphenatedWord> LNG_DLLPUBLIC CreateHyphenatedWord( + static css::uno::Reference <css::linguistic2::XHyphenatedWord> UNLESS_MERGELIBS(LNG_DLLPUBLIC) CreateHyphenatedWord( const OUString &rWord, LanguageType nLang, sal_Int16 nHyphenationPos, const OUString &rHyphenatedWord, sal_Int16 nHyphenPos ); }; @@ -97,7 +98,7 @@ public: virtual css::uno::Sequence< sal_Int16 > SAL_CALL getHyphenationPositions() override; - static css::uno::Reference < css::linguistic2::XPossibleHyphens > LNG_DLLPUBLIC CreatePossibleHyphens + static css::uno::Reference < css::linguistic2::XPossibleHyphens > UNLESS_MERGELIBS(LNG_DLLPUBLIC) CreatePossibleHyphens (const OUString &rWord, LanguageType nLang, const OUString &rHyphWord, const css::uno::Sequence< sal_Int16 > &rPositions); diff --git a/include/linguistic/lngprophelp.hxx b/include/linguistic/lngprophelp.hxx index 19cbe1f969ac..37a2124d2206 100644 --- a/include/linguistic/lngprophelp.hxx +++ b/include/linguistic/lngprophelp.hxx @@ -27,6 +27,7 @@ #include <com/sun/star/linguistic2/XLinguServiceEventBroadcaster.hpp> #include <linguistic/lngdllapi.h> #include <rtl/ref.hxx> +#include <config_options.h> namespace com { namespace sun { namespace star { namespace beans { class XPropertySet; @@ -57,7 +58,7 @@ typedef cppu::WeakImplHelper css::linguistic2::XLinguServiceEventBroadcaster > PropertyChgHelperBase; -class LNG_DLLPUBLIC PropertyChgHelper : +class UNLESS_MERGELIBS(LNG_DLLPUBLIC) PropertyChgHelper : public PropertyChgHelperBase { css::uno::Sequence< OUString > aPropNames; @@ -148,7 +149,7 @@ public: propertyChange( const css::beans::PropertyChangeEvent& rEvt ) override; }; -class LNG_DLLPUBLIC PropertyHelper_Thesaurus +class UNLESS_MERGELIBS(LNG_DLLPUBLIC) PropertyHelper_Thesaurus { rtl::Reference< PropertyHelper_Thes > mxPropHelper; @@ -167,7 +168,7 @@ public: }; -class LNG_DLLPUBLIC PropertyHelper_Spell final : +class UNLESS_MERGELIBS(LNG_DLLPUBLIC) PropertyHelper_Spell final : public PropertyChgHelper { // default values @@ -207,7 +208,7 @@ public: }; -class LNG_DLLPUBLIC PropertyHelper_Spelling +class UNLESS_MERGELIBS(LNG_DLLPUBLIC) PropertyHelper_Spelling { rtl::Reference< PropertyHelper_Spell > mxPropHelper; @@ -278,7 +279,7 @@ public: bool IsNoHyphenateCaps() const { return bResNoHyphenateCaps; } }; -class LNG_DLLPUBLIC PropertyHelper_Hyphenation +class UNLESS_MERGELIBS(LNG_DLLPUBLIC) PropertyHelper_Hyphenation { rtl::Reference< PropertyHelper_Hyphen > mxPropHelper; diff --git a/include/linguistic/spelldta.hxx b/include/linguistic/spelldta.hxx index b42a323b81e3..8ed336961663 100644 --- a/include/linguistic/spelldta.hxx +++ b/include/linguistic/spelldta.hxx @@ -26,6 +26,7 @@ #include <cppuhelper/implbase.hxx> #include <linguistic/lngdllapi.h> #include <i18nlangtag/lang.h> +#include <config_options.h> namespace com::sun::star::linguistic2 { class XSearchableDictionaryList; } @@ -61,7 +62,7 @@ class SpellAlternatives final LanguageType nLanguage; public: - LNG_DLLPUBLIC SpellAlternatives(); + UNLESS_MERGELIBS(LNG_DLLPUBLIC) SpellAlternatives(); SpellAlternatives(const OUString &rWord, LanguageType nLang, const css::uno::Sequence< OUString > &rAlternatives ); virtual ~SpellAlternatives() override; @@ -80,10 +81,10 @@ public: virtual void SAL_CALL setFailureType( ::sal_Int16 nFailureType ) override; // non-interface specific functions - void LNG_DLLPUBLIC SetWordLanguage(const OUString &rWord, LanguageType nLang); - void LNG_DLLPUBLIC SetFailureType(sal_Int16 nTypeP); - void LNG_DLLPUBLIC SetAlternatives( const css::uno::Sequence< OUString > &rAlt ); - static css::uno::Reference < css::linguistic2::XSpellAlternatives > LNG_DLLPUBLIC CreateSpellAlternatives( + void UNLESS_MERGELIBS(LNG_DLLPUBLIC) SetWordLanguage(const OUString &rWord, LanguageType nLang); + void UNLESS_MERGELIBS(LNG_DLLPUBLIC) SetFailureType(sal_Int16 nTypeP); + void UNLESS_MERGELIBS(LNG_DLLPUBLIC) SetAlternatives( const css::uno::Sequence< OUString > &rAlt ); + static css::uno::Reference < css::linguistic2::XSpellAlternatives > UNLESS_MERGELIBS(LNG_DLLPUBLIC) CreateSpellAlternatives( const OUString &rWord, LanguageType nLang, sal_Int16 nTypeP, const css::uno::Sequence< OUString > &rAlt ); }; diff --git a/include/sot/stg.hxx b/include/sot/stg.hxx index c6bcb6183c84..12b2bf22cd06 100644 --- a/include/sot/stg.hxx +++ b/include/sot/stg.hxx @@ -25,6 +25,7 @@ #include <tools/globname.hxx> #include <sot/storinfo.hxx> #include <sot/sotdllapi.h> +#include <config_options.h> namespace com { namespace sun { namespace star { namespace ucb { class XProgressHandler; } } } } namespace com { namespace sun { namespace star { namespace uno { class Any; } } } } @@ -146,7 +147,7 @@ public: class UCBStorageStream; -class SOT_DLLPUBLIC Storage final : public BaseStorage, public OLEStorageBase +class UNLESS_MERGELIBS(SOT_DLLPUBLIC) Storage final : public BaseStorage, public OLEStorageBase { OUString aName; bool bIsRoot; diff --git a/include/tools/gen.hxx b/include/tools/gen.hxx index 2603070589e8..0165cff1c5b8 100644 --- a/include/tools/gen.hxx +++ b/include/tools/gen.hxx @@ -24,6 +24,7 @@ #include <limits.h> #include <algorithm> #include <ostream> +#include <config_options.h> class SvStream; namespace rtl @@ -67,7 +68,7 @@ inline bool equal(Pair const & p1, Pair const & p2) // Point class Size; -class SAL_WARN_UNUSED SAL_DLLPUBLIC_EXPORT Point final : protected Pair +class SAL_WARN_UNUSED UNLESS_MERGELIBS(SAL_DLLPUBLIC_EXPORT) Point final : protected Pair { public: Point() {} diff --git a/include/tools/inetmsg.hxx b/include/tools/inetmsg.hxx index ed0e074fb167..dd8073d61937 100644 --- a/include/tools/inetmsg.hxx +++ b/include/tools/inetmsg.hxx @@ -28,6 +28,7 @@ #include <vector> #include <map> #include <memory> +#include <config_options.h> class DateTime; @@ -70,7 +71,7 @@ enum class InetMessageMime NUMHDR = 4, }; -class SAL_WARN_UNUSED TOOLS_DLLPUBLIC INetMIMEMessage +class SAL_WARN_UNUSED UNLESS_MERGELIBS(TOOLS_DLLPUBLIC) INetMIMEMessage { ::std::vector< std::unique_ptr<INetMessageHeader> > m_aHeaderList; diff --git a/include/tools/inetstrm.hxx b/include/tools/inetstrm.hxx index f85fc3436f09..50b0d25f4363 100644 --- a/include/tools/inetstrm.hxx +++ b/include/tools/inetstrm.hxx @@ -23,10 +23,11 @@ #include <sal/types.h> #include <vector> #include <memory> +#include <config_options.h> class INetMIMEMessage; -class TOOLS_DLLPUBLIC INetMIMEMessageStream +class UNLESS_MERGELIBS(TOOLS_DLLPUBLIC) INetMIMEMessageStream { INetMIMEMessage *pSourceMsg; bool bHeaderGenerated; diff --git a/include/tools/vcompat.hxx b/include/tools/vcompat.hxx index ba4692f663e2..3fbf4afaa5b2 100644 --- a/include/tools/vcompat.hxx +++ b/include/tools/vcompat.hxx @@ -20,6 +20,7 @@ #define INCLUDED_TOOLS_VCOMPAT_HXX #include <tools/toolsdllapi.h> +#include <config_options.h> inline sal_uInt32 COMPAT_FORMAT( char char1, char char2, char char3, char char4 ) { @@ -33,7 +34,7 @@ inline sal_uInt32 COMPAT_FORMAT( char char1, char char2, char char3, char char4 class SvStream; enum class StreamMode; -class TOOLS_DLLPUBLIC VersionCompat +class UNLESS_MERGELIBS(TOOLS_DLLPUBLIC) VersionCompat { SvStream* mpRWStm; sal_uInt32 mnCompatPos; diff --git a/include/tools/weakbase.h b/include/tools/weakbase.h index 458381e47fff..648e1b77e960 100644 --- a/include/tools/weakbase.h +++ b/include/tools/weakbase.h @@ -22,6 +22,7 @@ #include <sal/types.h> #include <rtl/ref.hxx> #include <tools/toolsdllapi.h> +#include <config_options.h> /** the template classes in this header are helper to implement weak references to implementation objects that are not refcounted. @@ -123,7 +124,7 @@ private: }; /** derive your implementation classes from this class if you want them to support weak references */ -class TOOLS_DLLPUBLIC WeakBase +class UNLESS_MERGELIBS(TOOLS_DLLPUBLIC) WeakBase { template<typename T> friend class WeakReference; |