[Libreoffice-commits] core.git: 7 commits - basctl/source config_host/config_options.h.in config_host.mk.in configure.ac external/libpng idl/source sc/source sc/util sd/source sfx2/source solenv/gbuild starmath/source svx/source sw/source vbahelper/source
Matúš Kukan
matus.kukan at collabora.com
Thu Feb 20 22:53:02 PST 2014
basctl/source/basicide/basidesh.cxx | 2 +
config_host.mk.in | 1
config_host/config_options.h.in | 15 ++++++++++++
configure.ac | 8 ++++++
external/libpng/StaticLibrary_png.mk | 1
idl/source/objects/types.cxx | 2 -
sc/source/ui/app/typemap.cxx | 2 +
sc/source/ui/vba/service.cxx | 18 ---------------
sc/source/ui/vba/vbaeventshelper.cxx | 17 ++++----------
sc/source/ui/vba/vbaglobals.cxx | 18 +++++----------
sc/source/ui/vba/vbatextframe.cxx | 12 ++++------
sc/util/vbaobj.component | 9 +++++--
sd/source/core/typemap.cxx | 1
sfx2/source/appl/appbas.cxx | 2 +
solenv/gbuild/platform/unxgcc.mk | 1
starmath/source/typemap.cxx | 2 +
svx/source/form/typemap.cxx | 2 +
sw/source/ui/shells/slotadd.cxx | 1
sw/source/ui/vba/vbaglobals.cxx | 6 +----
vbahelper/source/msforms/vbabutton.cxx | 38 ++++++++++++++++----------------
vbahelper/source/msforms/vbabutton.hxx | 4 +--
vbahelper/source/msforms/vbacontrol.cxx | 4 +--
22 files changed, 87 insertions(+), 79 deletions(-)
New commits:
commit f96926c1c22a1bceea42f4ebd5ec610d48833c18
Author: Matúš Kukan <matus.kukan at collabora.com>
Date: Fri Feb 21 00:10:57 2014 +0100
vbaobj: One more ctor feature for ScVbaGlobals.
Change-Id: I741d1e0af1d6f631b321b76172b988262c0f709f
diff --git a/sc/source/ui/vba/service.cxx b/sc/source/ui/vba/service.cxx
index 31e28d3..76dbc359 100644
--- a/sc/source/ui/vba/service.cxx
+++ b/sc/source/ui/vba/service.cxx
@@ -46,10 +46,6 @@ namespace window
{
extern sdecl::ServiceDecl const serviceDecl;
}
-namespace globals
-{
-extern sdecl::ServiceDecl const serviceDecl;
-}
namespace hyperlink
{
extern sdecl::ServiceDecl const serviceDecl;
@@ -66,7 +62,7 @@ extern "C"
registry::XRegistryKey * pRegistryKey )
{
void* pRet = component_getFactoryHelper(
- pImplName, pServiceManager, pRegistryKey, range::serviceDecl, workbook::serviceDecl, worksheet::serviceDecl, globals::serviceDecl, window::serviceDecl, hyperlink::serviceDecl, application::serviceDecl );
+ pImplName, pServiceManager, pRegistryKey, range::serviceDecl, workbook::serviceDecl, worksheet::serviceDecl, window::serviceDecl, hyperlink::serviceDecl, application::serviceDecl );
return pRet;
}
}
diff --git a/sc/source/ui/vba/vbaglobals.cxx b/sc/source/ui/vba/vbaglobals.cxx
index 919da33..334338c 100644
--- a/sc/source/ui/vba/vbaglobals.cxx
+++ b/sc/source/ui/vba/vbaglobals.cxx
@@ -16,7 +16,6 @@
* except in compliance with the License. You may obtain a copy of
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#include <vbahelper/helperdecl.hxx>
#include "vbaglobals.hxx"
#include <sal/macros.h>
@@ -288,14 +287,12 @@ ScVbaGlobals::getServiceNames()
return aServiceNames;
}
-namespace globals
+extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface * SAL_CALL
+ScVbaGlobals_get_implementation(
+ css::uno::XComponentContext *context,
+ css::uno::Sequence<css::uno::Any> const &arguments)
{
-namespace sdecl = comphelper::service_decl;
-sdecl::vba_service_class_<ScVbaGlobals, sdecl::with_args<true> > serviceImpl;
-extern sdecl::ServiceDecl const serviceDecl(
- serviceImpl,
- "ScVbaGlobals",
- "ooo.vba.excel.Globals" );
+ return cppu::acquire(new ScVbaGlobals(arguments, context));
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/util/vbaobj.component b/sc/util/vbaobj.component
index 07769a3..4e250aa 100644
--- a/sc/util/vbaobj.component
+++ b/sc/util/vbaobj.component
@@ -26,7 +26,8 @@
constructor="ScVbaEventsHelper_get_implementation">
<service name="com.sun.star.script.vba.VBASpreadsheetEventProcessor"/>
</implementation>
- <implementation name="ScVbaGlobals">
+ <implementation name="ScVbaGlobals"
+ constructor="ScVbaGlobals_get_implementation">
<service name="ooo.vba.excel.Globals"/>
</implementation>
<implementation name="ScVbaHyperlink">
commit 65a43d682f979bfb6189dfc4e138ad9ac34adcae
Author: Matúš Kukan <matus.kukan at collabora.com>
Date: Thu Feb 20 23:59:52 2014 +0100
Linking globals named 'sDocCtxName': symbol multiply defined!
Change-Id: Ib199ecb02b0e0f8382fcf1702652d9ad0fcb1765
diff --git a/sc/source/ui/vba/vbaglobals.cxx b/sc/source/ui/vba/vbaglobals.cxx
index 813eb1c..919da33 100644
--- a/sc/source/ui/vba/vbaglobals.cxx
+++ b/sc/source/ui/vba/vbaglobals.cxx
@@ -42,16 +42,15 @@ using namespace ::ooo::vba;
// =============================================================================
//ScVbaGlobals::ScVbaGlobals( css::uno::Reference< css::uno::XComponentContext >const& rxContext, ) : ScVbaGlobals_BASE( uno::Reference< XHelperInterface >(), rxContext )
-OUString sDocCtxName( "ExcelDocumentContext" );
-ScVbaGlobals::ScVbaGlobals( uno::Sequence< uno::Any > const& aArgs, uno::Reference< uno::XComponentContext >const& rxContext ) : ScVbaGlobals_BASE( uno::Reference< XHelperInterface >(), rxContext, sDocCtxName )
+ScVbaGlobals::ScVbaGlobals( uno::Sequence< uno::Any > const& aArgs, uno::Reference< uno::XComponentContext >const& rxContext ) : ScVbaGlobals_BASE( uno::Reference< XHelperInterface >(), rxContext, "ExcelDocumentContext" )
{
OSL_TRACE("ScVbaGlobals::ScVbaGlobals()");
uno::Sequence< beans::PropertyValue > aInitArgs( 2 );
aInitArgs[ 0 ].Name = "Application";
aInitArgs[ 0 ].Value = uno::makeAny( getApplication() );
- aInitArgs[ 1 ].Name = sDocCtxName;
+ aInitArgs[ 1 ].Name = "ExcelDocumentContext";
aInitArgs[ 1 ].Value = uno::makeAny( getXSomethingFromArgs< frame::XModel >( aArgs, 0 ) );
init( aInitArgs );
diff --git a/sw/source/ui/vba/vbaglobals.cxx b/sw/source/ui/vba/vbaglobals.cxx
index 9415266..6690271 100644
--- a/sw/source/ui/vba/vbaglobals.cxx
+++ b/sw/source/ui/vba/vbaglobals.cxx
@@ -31,19 +31,17 @@ using namespace ::com::sun::star::uno;
using namespace ::ooo::vba;
-OUString sDocCtxName("WordDocumentContext");
-
// =============================================================================
// SwVbaGlobals
// =============================================================================
-SwVbaGlobals::SwVbaGlobals( uno::Sequence< uno::Any > const& aArgs, uno::Reference< uno::XComponentContext >const& rxContext ) : SwVbaGlobals_BASE( uno::Reference< XHelperInterface >(), rxContext, sDocCtxName )
+SwVbaGlobals::SwVbaGlobals( uno::Sequence< uno::Any > const& aArgs, uno::Reference< uno::XComponentContext >const& rxContext ) : SwVbaGlobals_BASE( uno::Reference< XHelperInterface >(), rxContext, "WordDocumentContext" )
{
OSL_TRACE("SwVbaGlobals::SwVbaGlobals()");
uno::Sequence< beans::PropertyValue > aInitArgs( 2 );
aInitArgs[ 0 ].Name = "Application";
aInitArgs[ 0 ].Value = uno::makeAny( getApplication() );
- aInitArgs[ 1 ].Name = sDocCtxName;
+ aInitArgs[ 1 ].Name = "WordDocumentContext";
aInitArgs[ 1 ].Value = uno::makeAny( getXSomethingFromArgs< frame::XModel >( aArgs, 0 ) );
init( aInitArgs );
commit ffaa20a1de7c34a71babc2c777e896fd02e7b98d
Author: Matúš Kukan <matus.kukan at collabora.com>
Date: Thu Feb 20 23:51:07 2014 +0100
ScVbaButton -> VbaButton in vbahelper, the same name is in sc/source/ui/vba.
Change-Id: Id85002ba80335a2a7c662cb1189ecabb05bbf8b9
diff --git a/vbahelper/source/msforms/vbabutton.cxx b/vbahelper/source/msforms/vbabutton.cxx
index de12710..78c1130 100644
--- a/vbahelper/source/msforms/vbabutton.cxx
+++ b/vbahelper/source/msforms/vbabutton.cxx
@@ -25,13 +25,13 @@ using namespace ooo::vba;
const static OUString LABEL( "Label" );
-ScVbaButton::ScVbaButton( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< uno::XInterface >& xControl, const uno::Reference< frame::XModel >& xModel, AbstractGeometryAttributes* pGeomHelper ) : ButtonImpl_BASE( xParent, xContext, xControl, xModel, pGeomHelper )
+VbaButton::VbaButton( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< uno::XInterface >& xControl, const uno::Reference< frame::XModel >& xModel, AbstractGeometryAttributes* pGeomHelper ) : ButtonImpl_BASE( xParent, xContext, xControl, xModel, pGeomHelper )
{
}
// Attributes
OUString SAL_CALL
-ScVbaButton::getCaption() throw (css::uno::RuntimeException)
+VbaButton::getCaption() throw (css::uno::RuntimeException)
{
OUString Label;
m_xProps->getPropertyValue( LABEL ) >>= Label;
@@ -39,85 +39,85 @@ ScVbaButton::getCaption() throw (css::uno::RuntimeException)
}
void SAL_CALL
-ScVbaButton::setCaption( const OUString& _caption ) throw (::com::sun::star::uno::RuntimeException)
+VbaButton::setCaption( const OUString& _caption ) throw (::com::sun::star::uno::RuntimeException)
{
m_xProps->setPropertyValue( LABEL, uno::makeAny( _caption ) );
}
-sal_Bool SAL_CALL ScVbaButton::getAutoSize() throw (uno::RuntimeException)
+sal_Bool SAL_CALL VbaButton::getAutoSize() throw (uno::RuntimeException)
{
return ScVbaControl::getAutoSize();
}
-void SAL_CALL ScVbaButton::setAutoSize( sal_Bool bAutoSize ) throw (uno::RuntimeException)
+void SAL_CALL VbaButton::setAutoSize( sal_Bool bAutoSize ) throw (uno::RuntimeException)
{
ScVbaControl::setAutoSize( bAutoSize );
}
-sal_Bool SAL_CALL ScVbaButton::getLocked() throw (uno::RuntimeException)
+sal_Bool SAL_CALL VbaButton::getLocked() throw (uno::RuntimeException)
{
return ScVbaControl::getLocked();
}
-void SAL_CALL ScVbaButton::setLocked( sal_Bool bLocked ) throw (uno::RuntimeException)
+void SAL_CALL VbaButton::setLocked( sal_Bool bLocked ) throw (uno::RuntimeException)
{
ScVbaControl::setLocked( bLocked );
}
-sal_Bool SAL_CALL ScVbaButton::getCancel() throw (uno::RuntimeException)
+sal_Bool SAL_CALL VbaButton::getCancel() throw (uno::RuntimeException)
{
return sal_False;
}
-void SAL_CALL ScVbaButton::setCancel( sal_Bool /*bCancel*/ ) throw (uno::RuntimeException)
+void SAL_CALL VbaButton::setCancel( sal_Bool /*bCancel*/ ) throw (uno::RuntimeException)
{
// #STUB
}
-sal_Bool SAL_CALL ScVbaButton::getDefault() throw (uno::RuntimeException)
+sal_Bool SAL_CALL VbaButton::getDefault() throw (uno::RuntimeException)
{
// #STUB
return sal_False;
}
-void SAL_CALL ScVbaButton::setDefault( sal_Bool /*bDefault*/ ) throw (uno::RuntimeException)
+void SAL_CALL VbaButton::setDefault( sal_Bool /*bDefault*/ ) throw (uno::RuntimeException)
{
// #STUB
}
-sal_Int32 SAL_CALL ScVbaButton::getBackColor() throw (uno::RuntimeException)
+sal_Int32 SAL_CALL VbaButton::getBackColor() throw (uno::RuntimeException)
{
return ScVbaControl::getBackColor();
}
-void SAL_CALL ScVbaButton::setBackColor( sal_Int32 nBackColor ) throw (uno::RuntimeException)
+void SAL_CALL VbaButton::setBackColor( sal_Int32 nBackColor ) throw (uno::RuntimeException)
{
ScVbaControl::setBackColor( nBackColor );
}
-sal_Int32 SAL_CALL ScVbaButton::getForeColor() throw (uno::RuntimeException)
+sal_Int32 SAL_CALL VbaButton::getForeColor() throw (uno::RuntimeException)
{
return ScVbaControl::getForeColor();
}
-void SAL_CALL ScVbaButton::setForeColor( sal_Int32 /*nForeColor*/ ) throw (uno::RuntimeException)
+void SAL_CALL VbaButton::setForeColor( sal_Int32 /*nForeColor*/ ) throw (uno::RuntimeException)
{
// #STUB
}
-uno::Reference< msforms::XNewFont > SAL_CALL ScVbaButton::getFont() throw (uno::RuntimeException)
+uno::Reference< msforms::XNewFont > SAL_CALL VbaButton::getFont() throw (uno::RuntimeException)
{
return new VbaNewFont( this, mxContext, m_xProps );
}
OUString
-ScVbaButton::getServiceImplName()
+VbaButton::getServiceImplName()
{
- return OUString("ScVbaButton");
+ return OUString("VbaButton");
}
uno::Sequence< OUString >
-ScVbaButton::getServiceNames()
+VbaButton::getServiceNames()
{
static uno::Sequence< OUString > aServiceNames;
if ( aServiceNames.getLength() == 0 )
diff --git a/vbahelper/source/msforms/vbabutton.hxx b/vbahelper/source/msforms/vbabutton.hxx
index 5900790..01f67aa 100644
--- a/vbahelper/source/msforms/vbabutton.hxx
+++ b/vbahelper/source/msforms/vbabutton.hxx
@@ -26,10 +26,10 @@
typedef cppu::ImplInheritanceHelper1< ScVbaControl, ov::msforms::XCommandButton > ButtonImpl_BASE;
-class ScVbaButton : public ButtonImpl_BASE
+class VbaButton : public ButtonImpl_BASE
{
public:
- ScVbaButton( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::uno::XInterface >& xControl, const css::uno::Reference< css::frame::XModel >& xModel, ov::AbstractGeometryAttributes* pGeomHelper );
+ VbaButton( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::uno::XInterface >& xControl, const css::uno::Reference< css::frame::XModel >& xModel, ov::AbstractGeometryAttributes* pGeomHelper );
// Attributes
virtual OUString SAL_CALL getCaption() throw (css::uno::RuntimeException);
virtual void SAL_CALL setCaption( const OUString& _caption ) throw (css::uno::RuntimeException);
diff --git a/vbahelper/source/msforms/vbacontrol.cxx b/vbahelper/source/msforms/vbacontrol.cxx
index 21825c9..4bf6f7e 100644
--- a/vbahelper/source/msforms/vbacontrol.cxx
+++ b/vbahelper/source/msforms/vbacontrol.cxx
@@ -624,7 +624,7 @@ void SAL_CALL ScVbaControl::setTabIndex( sal_Int32 /*nTabIndex*/ ) throw (uno::R
if ( bToggle )
return new ScVbaToggleButton( xVbaParent, xContext, xControlShape, xModel, xGeoHelper.release() );
else
- return new ScVbaButton( xVbaParent, xContext, xControlShape, xModel, xGeoHelper.release() );
+ return new VbaButton( xVbaParent, xContext, xControlShape, xModel, xGeoHelper.release() );
}
case form::FormComponentType::FIXEDTEXT:
return new ScVbaLabel( xVbaParent, xContext, xControlShape, xModel, xGeoHelper.release() );
@@ -672,7 +672,7 @@ void SAL_CALL ScVbaControl::setTabIndex( sal_Int32 /*nTabIndex*/ ) throw (uno::R
if ( bToggle )
xVBAControl.set( new ScVbaToggleButton( xVbaParent, xContext, xControl, xModel, xGeoHelper.release() ) );
else
- xVBAControl.set( new ScVbaButton( xVbaParent, xContext, xControl, xModel, xGeoHelper.release() ) );
+ xVBAControl.set( new VbaButton( xVbaParent, xContext, xControl, xModel, xGeoHelper.release() ) );
}
else if ( xServiceInfo->supportsService( "com.sun.star.awt.UnoControlComboBoxModel" ) )
xVBAControl.set( new ScVbaComboBox( xVbaParent, xContext, xControl, xModel, xGeoHelper.release() ) );
commit 6dd1da1045bb49944fbd288703ac88c3cb71158e
Author: Matúš Kukan <matus.kukan at collabora.com>
Date: Thu Feb 20 23:42:49 2014 +0100
vbaobj: Constructor feature for two implementations.
This was done only to avoid symbol vbaeventshelper::serviceDecl which
is duplicated in sw.
Change-Id: I3cbeeee9d64765685223bbc53ced551876a717ae
diff --git a/sc/source/ui/vba/service.cxx b/sc/source/ui/vba/service.cxx
index 8c2c222..31e28d3 100644
--- a/sc/source/ui/vba/service.cxx
+++ b/sc/source/ui/vba/service.cxx
@@ -58,14 +58,6 @@ namespace application
{
extern sdecl::ServiceDecl const serviceDecl;
}
-namespace vbaeventshelper
-{
-extern sdecl::ServiceDecl const serviceDecl;
-}
-namespace textframe
-{
-extern sdecl::ServiceDecl const serviceDecl;
-}
extern "C"
{
@@ -73,12 +65,8 @@ extern "C"
const sal_Char * pImplName, lang::XMultiServiceFactory * pServiceManager,
registry::XRegistryKey * pRegistryKey )
{
- OSL_TRACE("In vbaobj_component_getFactory for %s", pImplName );
void* pRet = component_getFactoryHelper(
pImplName, pServiceManager, pRegistryKey, range::serviceDecl, workbook::serviceDecl, worksheet::serviceDecl, globals::serviceDecl, window::serviceDecl, hyperlink::serviceDecl, application::serviceDecl );
- if( !pRet )
- pRet = component_getFactoryHelper( pImplName, pServiceManager, pRegistryKey, vbaeventshelper::serviceDecl, textframe::serviceDecl );
- OSL_TRACE("Ret is 0x%x", pRet);
return pRet;
}
}
diff --git a/sc/source/ui/vba/vbaeventshelper.cxx b/sc/source/ui/vba/vbaeventshelper.cxx
index 31d4bed..f22a6c0 100644
--- a/sc/source/ui/vba/vbaeventshelper.cxx
+++ b/sc/source/ui/vba/vbaeventshelper.cxx
@@ -35,7 +35,6 @@
#include <cppuhelper/implbase4.hxx>
#include <toolkit/helper/vclunohelper.hxx>
#include <unotools/eventcfg.hxx>
-#include <vbahelper/helperdecl.hxx>
#include <vcl/svapp.hxx>
#include <vcl/window.hxx>
@@ -898,18 +897,12 @@ uno::Any ScVbaEventsHelper::createWindow( const uno::Sequence< uno::Any >& rArgs
return uno::Any( xWindow );
}
-// ============================================================================
-
-namespace vbaeventshelper
+extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface * SAL_CALL
+ScVbaEventsHelper_get_implementation(
+ css::uno::XComponentContext *context,
+ css::uno::Sequence<css::uno::Any> const &arguments)
{
-namespace sdecl = comphelper::service_decl;
-sdecl::class_<ScVbaEventsHelper, sdecl::with_args<true> > serviceImpl;
-extern sdecl::ServiceDecl const serviceDecl(
- serviceImpl,
- "ScVbaEventsHelper",
- "com.sun.star.script.vba.VBASpreadsheetEventProcessor" );
+ return cppu::acquire(new ScVbaEventsHelper(arguments, context));
}
-// ============================================================================
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/vba/vbatextframe.cxx b/sc/source/ui/vba/vbatextframe.cxx
index 0f2e6eb..3024dfb 100644
--- a/sc/source/ui/vba/vbatextframe.cxx
+++ b/sc/source/ui/vba/vbatextframe.cxx
@@ -58,14 +58,12 @@ ScVbaTextFrame::getServiceNames()
return aServiceNames;
}
-namespace textframe
+extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface * SAL_CALL
+ScVbaTextFrame_get_implementation(
+ css::uno::XComponentContext *context,
+ css::uno::Sequence<css::uno::Any> const &arguments)
{
-namespace sdecl = comphelper::service_decl;
-sdecl::vba_service_class_<ScVbaTextFrame, sdecl::with_args<true> > serviceImpl;
-extern sdecl::ServiceDecl const serviceDecl(
- serviceImpl,
- "ScVbaTextFrame",
- "ooo.vba.excel.TextFrame" );
+ return cppu::acquire(new ScVbaTextFrame(arguments, context));
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/util/vbaobj.component b/sc/util/vbaobj.component
index 861cb6e..07769a3 100644
--- a/sc/util/vbaobj.component
+++ b/sc/util/vbaobj.component
@@ -22,7 +22,8 @@
<implementation name="ScVbaApplication">
<service name="ooo.vba.excel.Application"/>
</implementation>
- <implementation name="ScVbaEventsHelper">
+ <implementation name="ScVbaEventsHelper"
+ constructor="ScVbaEventsHelper_get_implementation">
<service name="com.sun.star.script.vba.VBASpreadsheetEventProcessor"/>
</implementation>
<implementation name="ScVbaGlobals">
@@ -31,7 +32,8 @@
<implementation name="ScVbaHyperlink">
<service name="ooo.vba.excel.Hyperlink"/>
</implementation>
- <implementation name="ScVbaTextFrame">
+ <implementation name="ScVbaTextFrame"
+ constructor="ScVbaTextFrame_get_implementation">
<service name="ooo.vba.excel.TextFrame"/>
</implementation>
<implementation name="ScVbaWindow">
commit dbfc495a9ace0865d764dad7404633a12cda2873
Author: Matúš Kukan <matus.kukan at collabora.com>
Date: Thu Feb 20 23:04:00 2014 +0100
Add config option used when we try to link one huge object file.
In theory, it should not be used, we use it now to mark duplicated
symbols from sdi slots as weak. See idl/source/objects/types.cxx.
Change-Id: I3c6fccfb96884df6b9e6eb35b8615ba4d66ca208
diff --git a/basctl/source/basicide/basidesh.cxx b/basctl/source/basicide/basidesh.cxx
index 1100f46..ad98344 100644
--- a/basctl/source/basicide/basidesh.cxx
+++ b/basctl/source/basicide/basidesh.cxx
@@ -17,6 +17,8 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
+#include <config_options.h>
+
#include "basidesh.hxx"
#include <tools/diagnose_ex.h>
diff --git a/config_host/config_options.h.in b/config_host/config_options.h.in
new file mode 100644
index 0000000..6c882d7
--- /dev/null
+++ b/config_host/config_options.h.in
@@ -0,0 +1,15 @@
+/*
+ * General configuration settings for various options.
+ */
+
+#ifndef CONFIG_OPTIONS_H
+#define CONFIG_OPTIONS_H
+
+/*
+ * Whether we want to link as many object files as possible into one big object.
+ * True in case of --enable-lto or --enable-mergelibs.
+ */
+
+#define STATIC_LINKING 0
+
+#endif
diff --git a/configure.ac b/configure.ac
index 4e57156..c858df5 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2530,6 +2530,7 @@ fi
if test -n "$enable_lto" -a "$enable_lto" != "no"; then
ENABLE_LTO="TRUE"
AC_MSG_RESULT([yes])
+ AC_DEFINE(STATIC_LINKING)
else
ENABLE_LTO=""
AC_MSG_RESULT([no])
@@ -12407,6 +12408,7 @@ if test -n "$enable_mergelibs" -a "$enable_mergelibs" != "no"; then
MERGELIBS="CORE"
fi
AC_MSG_RESULT([yes])
+ AC_DEFINE(STATIC_LINKING)
else
AC_MSG_RESULT([no])
fi
@@ -12632,6 +12634,7 @@ AC_CONFIG_HEADERS([config_host/config_orcus.h])
AC_CONFIG_HEADERS([config_host/config_kde4.h])
AC_CONFIG_HEADERS([config_host/config_mingw.h])
AC_CONFIG_HEADERS([config_host/config_oox.h])
+AC_CONFIG_HEADERS([config_host/config_options.h])
AC_CONFIG_HEADERS([config_host/config_test.h])
AC_CONFIG_HEADERS([config_host/config_telepathy.h])
AC_CONFIG_HEADERS([config_host/config_typesizes.h])
diff --git a/idl/source/objects/types.cxx b/idl/source/objects/types.cxx
index c7a69a9..1797fa2 100644
--- a/idl/source/objects/types.cxx
+++ b/idl/source/objects/types.cxx
@@ -1416,7 +1416,7 @@ void SvMetaType::WriteSfxItem(
// write the implementation part
rOutStm.WriteCharPtr( "#ifdef SFX_TYPEMAP" ) << endl;
- rOutStm.WriteCharPtr( "#if !defined(_WIN32) && ((defined(DISABLE_DYNLOADING) && (defined(ANDROID) || defined(IOS))) || defined(LIBO_MERGELIBS))" ) << endl;
+ rOutStm.WriteCharPtr( "#if !defined(_WIN32) && ((defined(DISABLE_DYNLOADING) && (defined(ANDROID) || defined(IOS))) || STATIC_LINKING)" ) << endl;
rOutStm.WriteCharPtr( "__attribute__((__weak__))" ) << endl;
rOutStm.WriteCharPtr( "#endif" ) << endl;
rOutStm.WriteCharPtr( aTypeName.getStr() ).WriteCharPtr( aVarName.getStr() )
diff --git a/sc/source/ui/app/typemap.cxx b/sc/source/ui/app/typemap.cxx
index 1972d52..c4eb778 100644
--- a/sc/source/ui/app/typemap.cxx
+++ b/sc/source/ui/app/typemap.cxx
@@ -17,6 +17,8 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
+#include <config_options.h>
+
#include <svx/svxids.hrc>
#include "sc.hrc"
#include "scitems.hxx"
diff --git a/sd/source/core/typemap.cxx b/sd/source/core/typemap.cxx
index 0eabb41..a5548a3 100644
--- a/sd/source/core/typemap.cxx
+++ b/sd/source/core/typemap.cxx
@@ -17,6 +17,7 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
+#include <config_options.h>
#include <editeng/outliner.hxx>
#include <editeng/eeitem.hxx>
diff --git a/sfx2/source/appl/appbas.cxx b/sfx2/source/appl/appbas.cxx
index 62efd5d..2aa0acb 100644
--- a/sfx2/source/appl/appbas.cxx
+++ b/sfx2/source/appl/appbas.cxx
@@ -17,6 +17,8 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
+#include <config_options.h>
+
#include <com/sun/star/frame/XDesktop.hpp>
#include <com/sun/star/script/XLibraryContainer.hpp>
#include <com/sun/star/uno/Reference.h>
diff --git a/starmath/source/typemap.cxx b/starmath/source/typemap.cxx
index 2d354f7..e9a1bd9 100644
--- a/starmath/source/typemap.cxx
+++ b/starmath/source/typemap.cxx
@@ -17,6 +17,8 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
+#include <config_options.h>
+
#include <sfx2/msg.hxx>
#include <svl/stritem.hxx>
#include <svl/eitem.hxx>
diff --git a/svx/source/form/typemap.cxx b/svx/source/form/typemap.cxx
index d65f431..2fd33ea 100644
--- a/svx/source/form/typemap.cxx
+++ b/svx/source/form/typemap.cxx
@@ -17,6 +17,8 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
+#include <config_options.h>
+
#include <sfx2/objitem.hxx>
#include <sfx2/msg.hxx>
#include <svl/stritem.hxx>
diff --git a/sw/source/ui/shells/slotadd.cxx b/sw/source/ui/shells/slotadd.cxx
index 7d6b301..1fdb419 100644
--- a/sw/source/ui/shells/slotadd.cxx
+++ b/sw/source/ui/shells/slotadd.cxx
@@ -17,6 +17,7 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
+#include <config_options.h>
#include "hintids.hxx"
#include "uiitems.hxx"
commit d5951c04195e050d65d44c9578bd339dd41eee2f
Author: Matúš Kukan <matus.kukan at collabora.com>
Date: Thu Feb 20 16:13:35 2014 +0100
Allow to set LD_PLUGIN and use it for 'ar' - helps -flto build with clang.
So, it's possible to just add LD_PLUGIN=/usr/lib64/LLVMgold.so to
autogen.input and it works.
Change-Id: I35cdebfc918793c2ff99fd4f6dce9319b459be0e
diff --git a/config_host.mk.in b/config_host.mk.in
index 2e81fec..697d788 100644
--- a/config_host.mk.in
+++ b/config_host.mk.in
@@ -299,6 +299,7 @@ export KDE_LIBS=$(gb_SPACE)@KDE_LIBS@
export KRB5_LIBS=@KRB5_LIBS@
export LCMS2_CFLAGS=$(gb_SPACE)@LCMS2_CFLAGS@
export LCMS2_LIBS=$(gb_SPACE)@LCMS2_LIBS@
+export LD_PLUGIN=@LD_PLUGIN@
@x_LDFLAGS@ export LDFLAGS=@LDFLAGS@
export LFS_CFLAGS=@LFS_CFLAGS@
export LIBBASE_JAR=@LIBBASE_JAR@
diff --git a/configure.ac b/configure.ac
index cf9a3a7..4e57156 100644
--- a/configure.ac
+++ b/configure.ac
@@ -5690,6 +5690,11 @@ AC_SUBST(COMPILER_PLUGINS)
AC_SUBST(CLANGDIR)
AC_SUBST(CLANGBUILD)
+# Plugin to help linker.
+# Add something like LD_PLUGIN=/usr/lib64/LLVMgold.so to your autogen.input.
+# This makes --enable-lto build with clang work.
+AC_SUBST(LD_PLUGIN)
+
dnl ===================================================================
dnl Set the MinGW sys-root
dnl ===================================================================
diff --git a/solenv/gbuild/platform/unxgcc.mk b/solenv/gbuild/platform/unxgcc.mk
index 20a84e4..86be406 100644
--- a/solenv/gbuild/platform/unxgcc.mk
+++ b/solenv/gbuild/platform/unxgcc.mk
@@ -198,6 +198,7 @@ define gb_LinkTarget__command_staticlink
$(call gb_Helper_abbreviate_dirs,\
rm -f $(1) && \
$(gb_AR) -rsu $(1) \
+ $(if $(LD_PLUGIN),--plugin $(LD_PLUGIN)) \
$(foreach object,$(COBJECTS),$(call gb_CObject_get_target,$(object))) \
$(foreach object,$(CXXOBJECTS),$(call gb_CxxObject_get_target,$(object))) \
$(foreach object,$(ASMOBJECTS),$(call gb_AsmObject_get_target,$(object))) \
commit ecf0dd03e93b2b048eb029f43ab206e6d5010af5
Author: Matúš Kukan <matus.kukan at collabora.com>
Date: Thu Feb 20 11:57:07 2014 +0100
Do not include pngtest in static png library.
Because it contains main function and creates unnecessary problems when
experimenting with linking ~everything into one object.
It's not mentioned in its tarball's Makefile.in with all the other
source files and is not needed.
Change-Id: Id8975679db6931c0105fbbaac742582e08ad0f2d
diff --git a/external/libpng/StaticLibrary_png.mk b/external/libpng/StaticLibrary_png.mk
index 8759caf..bad30a3 100644
--- a/external/libpng/StaticLibrary_png.mk
+++ b/external/libpng/StaticLibrary_png.mk
@@ -28,7 +28,6 @@ $(eval $(call gb_StaticLibrary_add_generated_cobjects,png,\
UnpackedTarball/png/pngrtran \
UnpackedTarball/png/pngrutil \
UnpackedTarball/png/pngset \
- UnpackedTarball/png/pngtest \
UnpackedTarball/png/pngtrans \
UnpackedTarball/png/pngwio \
UnpackedTarball/png/pngwrite \
More information about the Libreoffice-commits
mailing list