[Libreoffice-commits] .: 3 commits - graphite/graphite2.issue1115.patch.1 graphite/graphite2.narrowing.patch.1 graphite/UnpackedTarball_graphite.mk odk/examples sal/inc
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Mon Dec 10 07:17:46 PST 2012
graphite/UnpackedTarball_graphite.mk | 3
graphite/graphite2.issue1115.patch.1 | 22 +++++
graphite/graphite2.narrowing.patch.1 | 22 -----
odk/examples/cpp/complextoolbarcontrols/MyProtocolHandler.cxx | 39 ++++------
odk/examples/cpp/complextoolbarcontrols/MyProtocolHandler.h | 24 +++---
odk/examples/cpp/complextoolbarcontrols/exports.cxx | 4 -
sal/inc/osl/diagnose.h | 4 +
7 files changed, 59 insertions(+), 59 deletions(-)
New commits:
commit 06448095946f635dd5753fd2db6079ca14bcfde7
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Mon Dec 10 16:14:03 2012 +0100
Reported graphite2 patch upstream
Change-Id: Idca64b8925199f3d275e7966c1d0e13fee4967a8
diff --git a/graphite/UnpackedTarball_graphite.mk b/graphite/UnpackedTarball_graphite.mk
index 25638da..a25b316 100644
--- a/graphite/UnpackedTarball_graphite.mk
+++ b/graphite/UnpackedTarball_graphite.mk
@@ -12,10 +12,11 @@ $(eval $(call gb_UnpackedTarball_UnpackedTarball,graphite))
$(eval $(call gb_UnpackedTarball_set_tarball,graphite,$(GRAPHITE_TARBALL)))
# http://projects.palaso.org/issues/1030
+# http://projects.palaso.org/issues/1115
$(eval $(call gb_UnpackedTarball_add_patches,graphite,\
graphite/graphite2.patch \
graphite/graphite2.issue1030.patch.1 \
- graphite/graphite2.narrowing.patch.1 \
+ graphite/graphite2.issue1115.patch.1 \
))
# vim: set noet sw=4 ts=4:
diff --git a/graphite/graphite2.issue1115.patch.1 b/graphite/graphite2.issue1115.patch.1
new file mode 100644
index 0000000..f19c8a3
--- /dev/null
+++ b/graphite/graphite2.issue1115.patch.1
@@ -0,0 +1,22 @@
+--- graphite/src/Code.cpp
++++ graphite/src/Code.cpp
+@@ -169,8 +169,8 @@ Machine::Code::Code(bool is_constraint,
+ bytecode_end,
+ pre_context,
+ rule_length,
+- silf.numClasses(),
+- face.glyphs().numAttrs(),
++ static_cast<uint16>(silf.numClasses()),
++ static_cast<uint16>(face.glyphs().numAttrs()),
+ face.numFeatures(),
+ {1,1,1,1,1,1,1,1,
+ 1,1,1,1,1,1,1,255,
+@@ -178,7 +178,7 @@ Machine::Code::Code(bool is_constraint,
+ 1,1,1,1,1,1,0,0,
+ 0,0,0,0,0,0,0,0,
+ 0,0,0,0,0,0,0,0,
+- 0,0,0,0,0,0,0, silf.numUser()}
++ 0,0,0,0,0,0,0, static_cast<byte>(silf.numUser())}
+ };
+
+ decoder dec(lims, *this);
diff --git a/graphite/graphite2.narrowing.patch.1 b/graphite/graphite2.narrowing.patch.1
deleted file mode 100644
index f19c8a3..0000000
--- a/graphite/graphite2.narrowing.patch.1
+++ /dev/null
@@ -1,22 +0,0 @@
---- graphite/src/Code.cpp
-+++ graphite/src/Code.cpp
-@@ -169,8 +169,8 @@ Machine::Code::Code(bool is_constraint,
- bytecode_end,
- pre_context,
- rule_length,
-- silf.numClasses(),
-- face.glyphs().numAttrs(),
-+ static_cast<uint16>(silf.numClasses()),
-+ static_cast<uint16>(face.glyphs().numAttrs()),
- face.numFeatures(),
- {1,1,1,1,1,1,1,1,
- 1,1,1,1,1,1,1,255,
-@@ -178,7 +178,7 @@ Machine::Code::Code(bool is_constraint,
- 1,1,1,1,1,1,0,0,
- 0,0,0,0,0,0,0,0,
- 0,0,0,0,0,0,0,0,
-- 0,0,0,0,0,0,0, silf.numUser()}
-+ 0,0,0,0,0,0,0, static_cast<byte>(silf.numUser())}
- };
-
- decoder dec(lims, *this);
commit ad2e7f5be349627326ba92a565692f0ee955f44f
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Mon Dec 10 15:18:05 2012 +0100
Fix SDK example
Change-Id: I3d31e0ad7e5015340a045230678760e3b20c59a1
diff --git a/odk/examples/cpp/complextoolbarcontrols/MyProtocolHandler.cxx b/odk/examples/cpp/complextoolbarcontrols/MyProtocolHandler.cxx
index c149167..efa527c 100644
--- a/odk/examples/cpp/complextoolbarcontrols/MyProtocolHandler.cxx
+++ b/odk/examples/cpp/complextoolbarcontrols/MyProtocolHandler.cxx
@@ -22,15 +22,15 @@
#include "MyProtocolHandler.h"
#include <com/sun/star/awt/MessageBoxButtons.hpp>
+#include <com/sun/star/awt/Toolkit.hpp>
#include <com/sun/star/awt/XMessageBoxFactory.hpp>
#include <com/sun/star/frame/ControlCommand.hpp>
#include <com/sun/star/text/XTextViewCursorSupplier.hpp>
#include <com/sun/star/sheet/XSpreadsheetView.hpp>
+#include <com/sun/star/system/SystemShellExecute.hpp>
#include <com/sun/star/system/SystemShellExecuteFlags.hpp>
#include <com/sun/star/system/XSystemShellExecute.hpp>
-#include <compphelper/componentcontext.hxx>
-
using namespace com::sun::star::awt;
using namespace com::sun::star::frame;
using namespace com::sun::star::system;
@@ -38,7 +38,6 @@ using namespace com::sun::star::uno;
using com::sun::star::beans::NamedValue;
using com::sun::star::beans::PropertyValue;
-using com::sun::star::lang::XMultiServiceFactory;
using com::sun::star::sheet::XSpreadsheetView;
using com::sun::star::text::XTextViewCursorSupplier;
using com::sun::star::util::URL;
@@ -48,7 +47,7 @@ ListenerHelper aListenerHelper;
void BaseDispatch::ShowMessageBox( const Reference< XFrame >& rFrame, const ::rtl::OUString& aTitle, const ::rtl::OUString& aMsgText )
{
if ( !mxToolkit.is() )
- mxToolkit = Reference< XToolkit > ( Toolkit::create(comphelper::getComponentContext(mxMSF)), UNO_QUERY_THROW );
+ mxToolkit = Toolkit::create(mxContext);
Reference< XMessageBoxFactory > xMsgBoxFactory( mxToolkit, UNO_QUERY );
if ( rFrame.is() && xMsgBoxFactory.is() )
{
@@ -141,8 +140,8 @@ Reference< XDispatch > SAL_CALL MyProtocolHandler::queryDispatch( const URL& a
xRet = aListenerHelper.GetDispatch( mxFrame, aURL.Path );
if ( !xRet.is() )
{
- xRet = xCursor.is() ? (BaseDispatch*) new WriterDispatch( mxMSF, mxFrame ) :
- (BaseDispatch*) new CalcDispatch( mxMSF, mxFrame );
+ xRet = xCursor.is() ? (BaseDispatch*) new WriterDispatch( mxContext, mxFrame ) :
+ (BaseDispatch*) new CalcDispatch( mxContext, mxFrame );
aListenerHelper.AddDispatch( xRet, mxFrame, aURL.Path );
}
}
@@ -186,7 +185,7 @@ Sequence< ::rtl::OUString > SAL_CALL MyProtocolHandler_getSupportedServiceNames(
#undef SERVICE_NAME
-Reference< XInterface > SAL_CALL MyProtocolHandler_createInstance( const Reference< XMultiServiceFactory > & rSMgr)
+Reference< XInterface > SAL_CALL MyProtocolHandler_createInstance( const Reference< XComponentContext > & rSMgr)
throw( Exception )
{
return (cppu::OWeakObject*) new MyProtocolHandler( rSMgr );
@@ -228,19 +227,15 @@ void SAL_CALL BaseDispatch::dispatch( const URL& aURL, const Sequence < Property
{
// open the LibreOffice web page
::rtl::OUString sURL("http://www.libreoffice.org");
- Reference< XSystemShellExecute > xSystemShellExecute( mxMSF->createInstance(
- "com.sun.star.system.SystemShellExecute"), UNO_QUERY );
- if ( xSystemShellExecute.is() )
+ Reference< XSystemShellExecute > xSystemShellExecute(
+ SystemShellExecute::create(mxContext) );
+ try
{
- try
-
- {
- xSystemShellExecute->execute( sURL, ::rtl::OUString(), SystemShellExecuteFlags::URIS_ONLY );
- }
- catch( Exception& rEx )
- {
- (void)rEx;
- }
+ xSystemShellExecute->execute( sURL, ::rtl::OUString(), SystemShellExecuteFlags::URIS_ONLY );
+ }
+ catch( Exception& rEx )
+ {
+ (void)rEx;
}
}
else if ( aURL.Path == "ComboboxCmd" )
@@ -496,10 +491,10 @@ void SAL_CALL BaseDispatch::controlEvent( const ControlEvent& Event ) throw (Run
}
}
-BaseDispatch::BaseDispatch( const Reference< XMultiServiceFactory > &rxMSF,
+BaseDispatch::BaseDispatch( const Reference< XComponentContext > &rxContext,
const Reference< XFrame >& xFrame,
const ::rtl::OUString& rServiceName )
- : mxMSF( rxMSF )
+ : mxContext( rxContext )
, mxFrame( xFrame )
, msDocService( rServiceName )
, mbButtonEnabled( sal_True )
@@ -510,7 +505,7 @@ BaseDispatch::BaseDispatch( const Reference< XMultiServiceFactory > &rxMSF,
BaseDispatch::~BaseDispatch()
{
mxFrame.clear();
- mxMSF.clear();
+ mxContext.clear();
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/odk/examples/cpp/complextoolbarcontrols/MyProtocolHandler.h b/odk/examples/cpp/complextoolbarcontrols/MyProtocolHandler.h
index 25817f6..54c5b8a 100644
--- a/odk/examples/cpp/complextoolbarcontrols/MyProtocolHandler.h
+++ b/odk/examples/cpp/complextoolbarcontrols/MyProtocolHandler.h
@@ -20,7 +20,7 @@
#ifndef _MyProtocolHandler_HXX
#define _MyProtocolHandler_HXX
-#include <com/sun/star/awt/XToolkit.hpp>
+#include <com/sun/star/awt/XToolkit2.hpp>
#include <com/sun/star/beans/NamedValue.hpp>
#include <com/sun/star/lang/XInitialization.hpp>
#include <com/sun/star/lang/XServiceInfo.hpp>
@@ -56,12 +56,12 @@ class MyProtocolHandler : public cppu::WeakImplHelper3
>
{
private:
- ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > mxMSF;
+ ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > mxContext;
::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame > mxFrame;
public:
- MyProtocolHandler( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > &rxMSF)
- : mxMSF( rxMSF ) {}
+ MyProtocolHandler( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > &rxContext)
+ : mxContext( rxContext ) {}
// XDispatchProvider
virtual ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatch >
@@ -96,7 +96,7 @@ sal_Bool SAL_CALL MyProtocolHandler_supportsService( const ::rtl::OUString& Serv
throw ( ::com::sun::star::uno::RuntimeException );
::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >
-SAL_CALL MyProtocolHandler_createInstance( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > & rSMgr)
+SAL_CALL MyProtocolHandler_createInstance( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > & rContext)
throw ( ::com::sun::star::uno::Exception );
class BaseDispatch : public cppu::WeakImplHelper2
@@ -107,14 +107,14 @@ class BaseDispatch : public cppu::WeakImplHelper2
{
protected:
::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame > mxFrame;
- ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > mxMSF;
- ::com::sun::star::uno::Reference< ::com::sun::star::awt::XToolkit > mxToolkit;
+ ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > mxContext;
+ ::com::sun::star::uno::Reference< ::com::sun::star::awt::XToolkit2 > mxToolkit;
::rtl::OUString msDocService;
::rtl::OUString maComboBoxText;
sal_Bool mbButtonEnabled;
public:
- BaseDispatch( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > &rxMSF,
+ BaseDispatch( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > &rxContext,
const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& xFrame, const ::rtl::OUString& rServiceName );
virtual ~BaseDispatch();
@@ -140,18 +140,18 @@ public:
class WriterDispatch : public BaseDispatch
{
public:
- WriterDispatch( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > &rxMSF,
+ WriterDispatch( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > &rxContext,
const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& xFrame )
- : BaseDispatch( rxMSF, xFrame, ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.text.TextDocument" ) ) )
+ : BaseDispatch( rxContext, xFrame, ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.text.TextDocument" ) ) )
{}
};
class CalcDispatch : public BaseDispatch
{
public:
- CalcDispatch( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > &rxMSF,
+ CalcDispatch( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > &rxContext,
const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& xFrame )
- : BaseDispatch( rxMSF, xFrame, ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.sheet.SpreadSheetDocument" ) ) )
+ : BaseDispatch( rxContext, xFrame, ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.sheet.SpreadSheetDocument" ) ) )
{}
};
diff --git a/odk/examples/cpp/complextoolbarcontrols/exports.cxx b/odk/examples/cpp/complextoolbarcontrols/exports.cxx
index f1dd0b8..09ab4ce 100644
--- a/odk/examples/cpp/complextoolbarcontrols/exports.cxx
+++ b/odk/examples/cpp/complextoolbarcontrols/exports.cxx
@@ -32,7 +32,7 @@ SAL_DLLPUBLIC_EXPORT void* SAL_CALL component_getFactory(const sal_Char* pImplNa
if ( !pServiceManager || !pImplName )
return 0;
- css::uno::Reference< css::lang::XSingleServiceFactory > xFactory ;
+ css::uno::Reference< css::uno::XInterface > xFactory ;
css::uno::Reference< css::lang::XMultiServiceFactory > xSMGR (reinterpret_cast< css::lang::XMultiServiceFactory* >(pServiceManager), css::uno::UNO_QUERY);
::rtl::OUString sImplName = ::rtl::OUString::createFromAscii(pImplName);
@@ -46,7 +46,7 @@ SAL_DLLPUBLIC_EXPORT void* SAL_CALL component_getFactory(const sal_Char* pImplNa
{
css::uno::Sequence< ::rtl::OUString > lNames(1);
lNames[0] = MYPROTOCOLHANDLER_SERVICENAME;
- xFactory = ::cppu::createSingleFactory(xSMGR, sImplName, MyProtocolHandler_createInstance, lNames);
+ xFactory = ::cppu::createSingleComponentFactory(MyProtocolHandler_createInstance, sImplName, lNames);
}
if (!xFactory.is())
commit f2609cc70fa4bb62a7ae876e97a3c7003bc1e99b
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Mon Dec 10 15:15:08 2012 +0100
Do not fail for unset OSL_DEBUG_LEVEL (as happens in SDK)
Change-Id: I0e9b8a251ed790d1505566ef4fa991309986522d
diff --git a/sal/inc/osl/diagnose.h b/sal/inc/osl/diagnose.h
index eb52b20..b3bfee9 100644
--- a/sal/inc/osl/diagnose.h
+++ b/sal/inc/osl/diagnose.h
@@ -83,6 +83,10 @@
OSL_DEBUG_ONLY(expr)
*/
+#if !defined OSL_DEBUG_LEVEL
+#define OSL_DEBUG_LEVEL 0
+#endif
+
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
More information about the Libreoffice-commits
mailing list