rpms/openoffice.org/devel workspace.fwk139.patch, NONE, 1.1 openoffice.org.spec, 1.2224, 1.2225 openoffice.org-3.2.0.ooo108330.embeddedobj.outplace.readonly.os.dispatch.patch, 1.1, NONE
Caolan McNamara
caolanm at fedoraproject.org
Wed May 26 13:45:39 UTC 2010
- Previous message: rpms/gstreamer-plugins-good/devel .cvsignore, 1.37, 1.38 gstreamer-plugins-good.spec, 1.138, 1.139 sources, 1.37, 1.38
- Next message: rpms/icu/devel icu.spec, 1.108, 1.109 icu.7119.s390x.patch, 1.1, NONE icu.icu6284.strictalias.patch, 1.2, NONE
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Author: caolanm
Update of /cvs/pkgs/rpms/openoffice.org/devel
In directory cvs01.phx2.fedoraproject.org:/tmp/cvs-serv15529
Modified Files:
openoffice.org.spec
Added Files:
workspace.fwk139.patch
Removed Files:
openoffice.org-3.2.0.ooo108330.embeddedobj.outplace.readonly.os.dispatch.patch
Log Message:
rename to accepted upstream workspace
workspace.fwk139.patch:
inc/oleembobj.hxx | 2 +
msole/oleembed.cxx | 103 ++++++++++++++++++++++++++++++++++++++++++++++++++++-
msole/olemisc.cxx | 3 +
3 files changed, 107 insertions(+), 1 deletion(-)
--- NEW FILE workspace.fwk139.patch ---
diff -ru embeddedobj.orig/source/inc/oleembobj.hxx embeddedobj/source/inc/oleembobj.hxx
--- embeddedobj.orig/source/inc/oleembobj.hxx 2008-07-22 15:38:57.000000000 +0100
+++ embeddedobj/source/inc/oleembobj.hxx 2010-01-14 15:21:16.000000000 +0000
@@ -189,6 +189,8 @@
::rtl::OUString m_aTempURL;
+ ::rtl::OUString m_aTempDumpURL;
+
// STAMPIT solution
// the following member is used during verb execution to detect whether the verb execution modifies the object
VerbExecutionController m_aVerbExecutionController;
diff -ru embeddedobj.orig/source/msole/oleembed.cxx embeddedobj/source/msole/oleembed.cxx
--- embeddedobj.orig/source/msole/oleembed.cxx 2008-07-22 15:39:09.000000000 +0100
+++ embeddedobj/source/msole/oleembed.cxx 2010-01-14 15:48:28.000000000 +0000
@@ -49,10 +49,16 @@
#include <com/sun/star/beans/XPropertySet.hpp>
#include <com/sun/star/frame/XLoadable.hpp>
#include <com/sun/star/document/XStorageBasedDocument.hpp>
+#include <com/sun/star/ucb/XSimpleFileAccess.hpp>
+#include <com/sun/star/container/XNameAccess.hpp>
+#include <com/sun/star/container/XNameContainer.hpp>
+#include <com/sun/star/system/XSystemShellExecute.hpp>
+#include <com/sun/star/system/SystemShellExecuteFlags.hpp>
#include <rtl/logfile.hxx>
#include <cppuhelper/interfacecontainer.h>
#include <comphelper/mimeconfighelper.hxx>
+#include <comphelper/storagehelper.hxx>
#include <targetstatecontrol.hxx>
@@ -677,6 +683,84 @@
return m_nObjectState;
}
+namespace
+{
+ bool lcl_CopyStream(uno::Reference<io::XInputStream> xIn, uno::Reference<io::XOutputStream> xOut)
+ {
+ const sal_Int32 nChunkSize = 4096;
+ uno::Sequence< sal_Int8 > aData(nChunkSize);
+ sal_Int32 nTotalRead = 0;
+ sal_Int32 nRead;
+ do
+ {
+ nRead = xIn->readBytes(aData, nChunkSize);
+ nTotalRead += nRead;
+ xOut->writeBytes(aData);
+ } while (nRead == nChunkSize);
+ return nTotalRead != 0;
+ }
+
+ //Dump the objects content to a tempfile, just the "CONTENTS" stream if
+ //there is one for non-compound documents, otherwise the whole content.
+ //
+ //On success a file is returned which must be removed by the caller
+ rtl::OUString lcl_ExtractObject(::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > xFactory,
+ ::com::sun::star::uno::Reference< ::com::sun::star::io::XStream > xObjectStream)
+ {
+ uno::Reference <beans::XPropertySet> xNativeTempFile(
+ xFactory->createInstance(
+ ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.io.TempFile"))), uno::UNO_QUERY_THROW);
+ uno::Reference < io::XStream > xStream(xNativeTempFile, uno::UNO_QUERY_THROW);
+
+ uno::Sequence< uno::Any > aArgs( 2 );
+ aArgs[0] <<= xObjectStream;
+ aArgs[1] <<= (sal_Bool)sal_True; // do not create copy
+ uno::Reference< container::XNameContainer > xNameContainer(
+ xFactory->createInstanceWithArguments(
+ ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.embed.OLESimpleStorage")),
+ aArgs ), uno::UNO_QUERY_THROW );
+
+ uno::Reference< io::XStream > xCONTENTS;
+ xNameContainer->getByName(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("CONTENTS"))) >>= xCONTENTS;
+
+ sal_Bool bCopied = xCONTENTS.is() && lcl_CopyStream(xCONTENTS->getInputStream(), xStream->getOutputStream());
+
+ uno::Reference< io::XSeekable > xSeekableStor(xObjectStream, uno::UNO_QUERY);
+ if (xSeekableStor.is())
+ xSeekableStor->seek(0);
+
+ if (!bCopied)
+ bCopied = lcl_CopyStream(xObjectStream->getInputStream(), xStream->getOutputStream());
+
+ rtl::OUString sUrl;
+
+ if (bCopied)
+ {
+ xNativeTempFile->setPropertyValue(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("RemoveFile")),
+ uno::makeAny(sal_False));
+ uno::Any aUrl = xNativeTempFile->getPropertyValue(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Uri")));
+ aUrl >>= sUrl;
+
+ xNativeTempFile = uno::Reference<beans::XPropertySet>();
+
+ uno::Reference<ucb::XSimpleFileAccess> xSimpleFileAccess(
+ xFactory->createInstance(
+ ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.ucb.SimpleFileAccess"))),
+ uno::UNO_QUERY_THROW);
+
+ xSimpleFileAccess->setReadOnly(sUrl, sal_True);
+ }
+ else
+ {
+ xNativeTempFile->setPropertyValue(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("RemoveFile")),
+ uno::makeAny(sal_True));
+ }
+
+ return sUrl;
+
+ }
+}
+
//----------------------------------------------
void SAL_CALL OleEmbeddedObject::doVerb( sal_Int32 nVerbID )
throw ( lang::IllegalArgumentException,
@@ -792,10 +876,27 @@
}
if ( !m_pOwnView || !m_pOwnView->Open() )
- throw embed::UnreachableStateException();
+ {
+ //Make a RO copy and see if the OS can find something to at
+ //least display the content for us
+ if (!m_aTempDumpURL.getLength())
+ m_aTempDumpURL = lcl_ExtractObject(m_xFactory, m_xObjectStream);
+ if (m_aTempDumpURL.getLength())
+ {
+ uno::Reference< system::XSystemShellExecute > xSystemShellExecute( m_xFactory->createInstance(
+ ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.system.SystemShellExecute"))),
+ uno::UNO_QUERY_THROW);
+ xSystemShellExecute->execute(m_aTempDumpURL, ::rtl::OUString(), system::SystemShellExecuteFlags::DEFAULTS);
+ }
+ else
+ throw embed::UnreachableStateException();
+ }
}
else
+ {
+
throw embed::UnreachableStateException();
+ }
}
}
diff -ru embeddedobj.orig/source/msole/olemisc.cxx embeddedobj/source/msole/olemisc.cxx
--- embeddedobj.orig/source/msole/olemisc.cxx 2008-07-22 15:39:22.000000000 +0100
+++ embeddedobj/source/msole/olemisc.cxx 2010-01-14 15:21:16.000000000 +0000
@@ -161,6 +161,9 @@
if ( m_aTempURL.getLength() )
KillFile_Impl( m_aTempURL, m_xFactory );
+
+ if ( m_aTempDumpURL.getLength() )
+ KillFile_Impl( m_aTempDumpURL, m_xFactory );
}
//------------------------------------------------------
Index: openoffice.org.spec
===================================================================
RCS file: /cvs/pkgs/rpms/openoffice.org/devel/openoffice.org.spec,v
retrieving revision 1.2224
retrieving revision 1.2225
diff -u -p -r1.2224 -r1.2225
--- openoffice.org.spec 26 May 2010 10:22:12 -0000 1.2224
+++ openoffice.org.spec 26 May 2010 13:45:35 -0000 1.2225
@@ -56,7 +56,7 @@ BuildRequires: zip, findutils, autoconf
BuildRequires: binutils, java-devel, boost-devel, zlib-devel, vigra-devel
BuildRequires: python-devel, expat-devel, libxml2-devel, libxslt-devel, bc
BuildRequires: neon-devel, libcurl-devel, libidn-devel, pam-devel, cups-devel
-BuildRequires: libXext-devel, libXt-devel, libICE-devel, libjpeg-devel,
+BuildRequires: libXext-devel, libXt-devel, libICE-devel, libjpeg-devel, make
BuildRequires: gecko-devel, libwpd-devel, hunspell-devel, unixODBC-devel
BuildRequires: db4-devel, sane-backends-devel, libicu-devel, perl-Archive-Zip
BuildRequires: freetype-devel, gtk2-devel, desktop-file-utils, hyphen-devel
@@ -117,7 +117,7 @@ Patch46: workspace.sw33bf03.patch
Patch47: workspace.writerfilter07.patch
Patch48: openoffice.org-3.3.0.ooo108246.svx.hide-sql-group-when-inactive.patch
Patch49: workspace.sw33bf02.patch
-Patch50: openoffice.org-3.2.0.ooo108330.embeddedobj.outplace.readonly.os.dispatch.patch
+Patch50: workspace.fwk139.patch
Patch51: workspace.cmcfixes70.patch
Patch52: workspace.s390xport02.patch
Patch53: openoffice.org-3.3.0.ooo108637.sfx2.uisavedir.patch
@@ -1669,7 +1669,7 @@ cp -p %{SOURCE5} external/unowinreg/unow
%patch47 -p0 -b .workspace.writerfilter07.patch
%patch48 -p1 -b .ooo108246.svx.hide-sql-group-when-inactive.patch
%patch49 -p1 -b .workspace.sw33bf02.patch
-%patch50 -p0 -b .ooo108330.embeddedobj.outplace.readonly.os.dispatch.patch
+%patch50 -p0 -b .workspace.fwk139.patch
%patch51 -p1 -b .workspace.cmcfixes70.patch
%patch52 -p1 -b .workspace.s390xport02.patch
%patch53 -p1 -b .ooo108637.sfx2.uisavedir.patch
--- openoffice.org-3.2.0.ooo108330.embeddedobj.outplace.readonly.os.dispatch.patch DELETED ---
- Previous message: rpms/gstreamer-plugins-good/devel .cvsignore, 1.37, 1.38 gstreamer-plugins-good.spec, 1.138, 1.139 sources, 1.37, 1.38
- Next message: rpms/icu/devel icu.spec, 1.108, 1.109 icu.7119.s390x.patch, 1.1, NONE icu.icu6284.strictalias.patch, 1.2, NONE
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the scm-commits
mailing list