[Libreoffice-commits] core.git: 7 commits - bin/get-bugzilla-attachments-by-mimetype cppcanvas/source cppuhelper/source solenv/gbuild svtools/inc vcl/source
Michael Stahl
mstahl at redhat.com
Mon Feb 25 05:29:13 PST 2013
bin/get-bugzilla-attachments-by-mimetype | 1
cppcanvas/source/mtfrenderer/emfplus.cxx | 11 +++++++-
cppuhelper/source/shlib.cxx | 42 ++++++++++++-------------------
solenv/gbuild/ComponentTarget.mk | 4 ++
svtools/inc/svtools/transfer.hxx | 7 +++++
vcl/source/filter/wmf/emfwr.cxx | 15 ++++++++++-
vcl/source/gdi/gdimtf.cxx | 8 ++++-
7 files changed, 59 insertions(+), 29 deletions(-)
New commits:
commit 6e18e1f54b7527e012f67a36666b7f307be4e293
Author: Michael Stahl <mstahl at redhat.com>
Date: Mon Feb 25 14:03:35 2013 +0100
get-bugzilla-attachments-by-mimetype: add "application/vnd.visio.xml"
Change-Id: I113f7bf3fd4194011efe83b1776ca42ad489f652
diff --git a/bin/get-bugzilla-attachments-by-mimetype b/bin/get-bugzilla-attachments-by-mimetype
index 6d5177b..ebdd2d1 100755
--- a/bin/get-bugzilla-attachments-by-mimetype
+++ b/bin/get-bugzilla-attachments-by-mimetype
@@ -280,6 +280,7 @@ mimetypes = {
'application/vnd.openxmlformats-officedocument.wordprocessingml.document': 'docx',
'application/vnd.openxmlformats-officedocument.wordprocessingml.template': 'dotx',
'application/vnd.visio': 'vsd',
+ 'application/vnd.visio.xml': 'vdx',
# W3C
'application/xhtml+xml': 'xhtml',
'application/mathml+xml': 'mml',
commit bf8450cfa2e9e899c716fbddadd7d5485aefe520
Author: Michael Stahl <mstahl at redhat.com>
Date: Mon Feb 25 13:22:07 2013 +0100
fdo#59405 fdo#60638: EMFWriter::ImplWrite: write EMF_PLUS "comments"
When editing the Visio OLE object, there is a "preview" file generated,
which is apparently an EMF file (strangely initially inserting the Visio
object seems to result in a totally unproblematic WMF file).
The EMF file apparently has almost its entire content stored in
MetaCommentAction of type "EMF_PLUS", which is thrown away when writing
the file again.
Change-Id: I77a08454da673c1825aaa8421606737e7e8bc82c
diff --git a/vcl/source/filter/wmf/emfwr.cxx b/vcl/source/filter/wmf/emfwr.cxx
index b5af460..603ca06 100644
--- a/vcl/source/filter/wmf/emfwr.cxx
+++ b/vcl/source/filter/wmf/emfwr.cxx
@@ -1601,12 +1601,25 @@ void EMFWriter::ImplWrite( const GDIMetaFile& rMtf )
break;
}
+ case( META_COMMENT_ACTION ):
+ {
+ MetaCommentAction const*const pCommentAction(
+ static_cast<MetaCommentAction const*>(pAction));
+ if (pCommentAction->GetComment() == "EMF_PLUS")
+ {
+ ImplBeginCommentRecord(WIN_EMR_COMMENT_EMFPLUS);
+ m_rStm.Write(pCommentAction->GetData(),
+ pCommentAction->GetDataSize());
+ ImplEndCommentRecord();
+ }
+ }
+ break;
+
case( META_MASK_ACTION ):
case( META_MASKSCALE_ACTION ):
case( META_MASKSCALEPART_ACTION ):
case( META_WALLPAPER_ACTION ):
case( META_TEXTLINE_ACTION ):
- case( META_COMMENT_ACTION ):
case( META_GRADIENTEX_ACTION ):
{
// !!! >>> we don't want to support these actions
commit ec0d1440cf07008a220708535848567bcbb233ea
Author: Michael Stahl <mstahl at redhat.com>
Date: Mon Feb 25 13:15:19 2013 +0100
fdo#59405: cppcanvas: fix infinite loop in processEMFPlus
This can be observed when inserting the bugdoc from fdo#59405.
Apparently the "size" and "length" do not agree; ensure that the
"length" does not underflow.
Change-Id: Idfc68919859b8284c724831de21208e4392af328
diff --git a/cppcanvas/source/mtfrenderer/emfplus.cxx b/cppcanvas/source/mtfrenderer/emfplus.cxx
index f1b0eff..0c9db41 100644
--- a/cppcanvas/source/mtfrenderer/emfplus.cxx
+++ b/cppcanvas/source/mtfrenderer/emfplus.cxx
@@ -1763,7 +1763,16 @@ namespace cppcanvas
rMF.Seek (next);
- length -= size;
+ if (size <= length)
+ {
+ length -= size;
+ }
+ else
+ {
+ SAL_WARN("cppcanvas", "ImplRenderer::processEMFPlus: "
+ "size " << size << " > length " << length);
+ length = 0;
+ }
}
}
}
commit 0cf6433117477642897fb2d874a4353eff8a1f35
Author: Michael Stahl <mstahl at redhat.com>
Date: Mon Feb 25 13:11:04 2013 +0100
fdo#59405: initialize members of TransferableObjectDescriptor
The mnViewAspect member is otherwise only initialized if a
SOT_FORMATSTR_ID_OBJECTDESCRIPTOR thingy is in the clipboard, which only
happens if the clipboard source is OOo/LO.
When inserting an OLE object, the value MSOLE_CONTENT apparently results
in requesting the current size from the OLE object, which looks much
better than the square default.
Change-Id: I8c7fb80a8ae88272f1ecaf3a375bef5d917f2a5b
diff --git a/svtools/inc/svtools/transfer.hxx b/svtools/inc/svtools/transfer.hxx
index 25c0d52..93dab75 100644
--- a/svtools/inc/svtools/transfer.hxx
+++ b/svtools/inc/svtools/transfer.hxx
@@ -37,6 +37,7 @@
#include <com/sun/star/datatransfer/dnd/DropTargetDropEvent.hpp>
#include <com/sun/star/datatransfer/dnd/XDragSourceListener.hpp>
#include <com/sun/star/datatransfer/dnd/XDropTargetListener.hpp>
+#include <com/sun/star/embed/Aspects.hpp>
#include <com/sun/star/io/XInputStream.hpp>
// ------------------------
@@ -82,6 +83,12 @@ struct TransferableObjectDescriptor
String maDisplayName;
sal_Bool mbCanLink;
+ TransferableObjectDescriptor()
+ : mnViewAspect(::com::sun::star::embed::Aspects::MSOLE_CONTENT)
+ , mnOle2Misc(0)
+ , mbCanLink(false)
+ {}
+
SVT_DLLPUBLIC friend SvStream& operator>>( SvStream& rIStm, TransferableObjectDescriptor& rObjDesc );
SVT_DLLPUBLIC friend SvStream& operator<<( SvStream& rOStm, const TransferableObjectDescriptor& rObjDesc );
};
commit e97062ef8c9a25ab6187216553b79654195549ba
Author: Michael Stahl <mstahl at redhat.com>
Date: Mon Feb 25 13:10:26 2013 +0100
vcl: GDIMetaFile: log some exceptions
Change-Id: I98794721c21231800d7d28cbdd34dd300b69a9c2
diff --git a/vcl/source/gdi/gdimtf.cxx b/vcl/source/gdi/gdimtf.cxx
index cb2fb16..a1d2c36 100644
--- a/vcl/source/gdi/gdimtf.cxx
+++ b/vcl/source/gdi/gdimtf.cxx
@@ -514,9 +514,11 @@ bool GDIMetaFile::ImplPlayWithRenderer( OutputDevice* pOut, const Point& rPos, S
{
throw; // runtime errors are fatal
}
- catch (const uno::Exception&)
+ catch (const uno::Exception& e)
{
// ignore errors, no way of reporting them here
+ SAL_WARN("vcl",
+ "GDIMetaFile::ImplPlayWithRenderer: exception: " << e.Message);
}
return false;
@@ -586,9 +588,11 @@ void GDIMetaFile::ImplDelegate2PluggableRenderer( const MetaCommentAction* pAct,
// runtime errors are fatal
throw;
}
- catch (const uno::Exception&)
+ catch (const uno::Exception& e)
{
// ignore errors, no way of reporting them here
+ SAL_WARN("vcl", "GDIMetaFile::ImplDelegate2PluggableRenderer:"
+ " exception: " << e.Message);
}
}
}
commit 113a9273412b59c1ae1d1728705e1105fe3f2a93
Author: Michael Stahl <mstahl at redhat.com>
Date: Mon Feb 25 13:08:35 2013 +0100
cppuhelper: log failures from osl_loadModule calls
Change-Id: I37099d15cd403f48ca1716414f2e79cc1213d8c8
diff --git a/cppuhelper/source/shlib.cxx b/cppuhelper/source/shlib.cxx
index 9fe86e4..0408c37 100644
--- a/cppuhelper/source/shlib.cxx
+++ b/cppuhelper/source/shlib.cxx
@@ -484,9 +484,10 @@ Reference< XInterface > SAL_CALL loadSharedLibComponentFactory(
OUString aModulePath( makeComponentPath( sLibName, rPath ) );
if (! checkAccessPath( &aModulePath ))
{
- throw loader::CannotActivateFactoryException(
- "permission denied to load component library: " +
- aModulePath,
+ OUString const msg(
+ "permission denied to load component library: " + aModulePath);
+ SAL_WARN("cppuhelper", msg);
+ throw loader::CannotActivateFactoryException(msg,
Reference< XInterface >() );
}
@@ -494,8 +495,9 @@ Reference< XInterface > SAL_CALL loadSharedLibComponentFactory(
aModulePath.pData, SAL_LOADMODULE_LAZY | SAL_LOADMODULE_GLOBAL );
if (! lib)
{
- throw loader::CannotActivateFactoryException(
- "loading component library failed: " + aModulePath,
+ OUString const msg("loading component library failed: " + aModulePath);
+ SAL_WARN("cppuhelper", msg);
+ throw loader::CannotActivateFactoryException(msg,
Reference< XInterface >() );
}
#else
@@ -607,11 +609,7 @@ Reference< XInterface > SAL_CALL loadSharedLibComponentFactory(
#ifndef DISABLE_DYNLOADING
osl_unloadModule( lib );
#endif
-#if OSL_DEBUG_LEVEL > 1
- out( "### cannot activate factory: " );
- out( aExcMsg );
- out( "\n" );
-#endif
+ SAL_WARN("cppuhelper", "### cannot activate factory: " << aExcMsg);
throw loader::CannotActivateFactoryException(
aExcMsg,
Reference< XInterface >() );
@@ -639,11 +637,7 @@ Reference< XInterface > SAL_CALL invokeStaticComponentFactory(
if (! xRet.is())
{
-#if OSL_DEBUG_LEVEL > 1
- out( "### cannot activate factory: " );
- out( aExcMsg );
- out( "\n" );
-#endif
+ SAL_WARN("cppuhelper", "### cannot activate factory: " << aExcMsg);
throw loader::CannotActivateFactoryException(
aExcMsg,
Reference< XInterface >() );
@@ -676,9 +670,10 @@ void SAL_CALL writeSharedLibComponentInfo(
if (! checkAccessPath( &aModulePath ))
{
- throw registry::CannotRegisterImplementationException(
- "permission denied to load component library: " +
- aModulePath,
+ OUString const msg(
+ "permission denied to load component library: " + aModulePath);
+ SAL_WARN("cppuhelper", msg);
+ throw registry::CannotRegisterImplementationException(msg,
Reference< XInterface >() );
}
@@ -686,8 +681,9 @@ void SAL_CALL writeSharedLibComponentInfo(
aModulePath.pData, SAL_LOADMODULE_LAZY | SAL_LOADMODULE_GLOBAL );
if (! lib)
{
- throw registry::CannotRegisterImplementationException(
- "loading component library failed: " + aModulePath,
+ OUString const msg("loading component library failed: " + aModulePath);
+ SAL_WARN("cppuhelper", msg);
+ throw registry::CannotRegisterImplementationException(msg,
Reference< XInterface >() );
}
@@ -768,11 +764,7 @@ void SAL_CALL writeSharedLibComponentInfo(
//! ::osl_unloadModule( lib);
if (! bRet)
{
-#if OSL_DEBUG_LEVEL > 1
- out( "### cannot write component info: " );
- out( aExcMsg );
- out( "\n" );
-#endif
+ SAL_WARN("cppuhelper", "### cannot write component info: " << aExcMsg);
throw registry::CannotRegisterImplementationException(
aExcMsg, Reference< XInterface >() );
}
commit 0e273d6fb8566e7f8df1be6f2f440fe357991878
Author: Michael Stahl <mstahl at redhat.com>
Date: Mon Feb 25 13:06:18 2013 +0100
gbuild: ComponentTarget: rebuild if library names change
Stale component files result in failure to load libraries in incremental
builds; because rebuilding these is fast just depend on the 2 Repository
makefiles that define the library file names.
Change-Id: Ia72a0460d3bb8bceb0e17334415ca3dde0401c24
diff --git a/solenv/gbuild/ComponentTarget.mk b/solenv/gbuild/ComponentTarget.mk
index 866b07d..313b185 100644
--- a/solenv/gbuild/ComponentTarget.mk
+++ b/solenv/gbuild/ComponentTarget.mk
@@ -51,8 +51,12 @@ $(call gb_ComponentTarget_get_clean_target,%) :
$(call gb_ComponentTarget_get_target,$*) \
+# when a library is renamed, the component file needs to be rebuilt to match.
+# hence simply depend on Repository{,Fixes}.mk since the command runs quickly.
$(call gb_ComponentTarget_get_target,%) : \
$(call gb_ComponentTarget_get_source,%) \
+ $(SRCDIR)/Repository.mk \
+ $(SRCDIR)/RepositoryFixes.mk \
| $(call gb_ExternalExecutable_get_dependencies,xsltproc)
$(call gb_ComponentTarget__command,$@,$<,$*)
More information about the Libreoffice-commits
mailing list