rpms/openoffice.org/devel openoffice.org-3.1.0.ooo101274.opening-a-directory.patch, NONE, 1.1 openoffice.org.spec, 1.1891, 1.1892
David Tardon
dtardon at fedoraproject.org
Wed Apr 22 13:51:46 UTC 2009
Author: dtardon
Update of /cvs/extras/rpms/openoffice.org/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv5554
Modified Files:
openoffice.org.spec
Added Files:
openoffice.org-3.1.0.ooo101274.opening-a-directory.patch
Log Message:
Resolves: rhbz#473985 - "oocalc this-is-a-dir" finishes immediately
openoffice.org-3.1.0.ooo101274.opening-a-directory.patch:
--- NEW FILE openoffice.org-3.1.0.ooo101274.opening-a-directory.patch ---
Index: ucbhelper/source/client/content.cxx
===================================================================
--- ucbhelper/source/client/content.cxx (revision 270567)
+++ ucbhelper/source/client/content.cxx (working copy)
@@ -42,6 +42,7 @@
#include <cppuhelper/weak.hxx>
#include <cppuhelper/implbase1.hxx>
+#include <com/sun/star/beans/PropertyValue.hpp>
#include <com/sun/star/ucb/ContentCreationError.hpp>
#include <com/sun/star/ucb/XCommandEnvironment.hpp>
#include <com/sun/star/ucb/XCommandInfo.hpp>
@@ -51,6 +52,8 @@
#include <com/sun/star/ucb/ContentAction.hpp>
#include <com/sun/star/ucb/OpenCommandArgument2.hpp>
#include <com/sun/star/ucb/InsertCommandArgument.hpp>
+#include <com/sun/star/ucb/IOErrorCode.hpp>
+#include <com/sun/star/ucb/InteractiveAugmentedIOException.hpp>
#include <com/sun/star/ucb/GlobalTransferCommandArgument.hpp>
#include <com/sun/star/ucb/NameClash.hpp>
#include <com/sun/star/ucb/OpenMode.hpp>
@@ -68,6 +71,8 @@
#include <com/sun/star/sdbc/XRow.hpp>
#include <com/sun/star/lang/IllegalArgumentException.hpp>
#include <com/sun/star/beans/UnknownPropertyException.hpp>
+#include <com/sun/star/task/XInteractionRequest.hpp>
+
#include <ucbhelper/macros.hxx>
#include <ucbhelper/content.hxx>
#include <ucbhelper/contentbroker.hxx>
@@ -77,7 +82,11 @@
#include <ucbhelper/interactionrequest.hxx>
#endif
#include <ucbhelper/cancelcommandexecution.hxx>
+#include <ucbhelper/fileidentifierconverter.hxx>
+#include <ucbhelper/simpleinteractionrequest.hxx>
+#include <memory>
+
using namespace com::sun::star::container;
using namespace com::sun::star::beans;
using namespace com::sun::star::io;
@@ -377,6 +386,54 @@
return Reference< XContent >();
}
+namespace
+{
+
+void
+lcl_displayMessage(
+ const Reference<XCommandEnvironment>& rEnvironment,
+ const rtl::OUString& rUri)
+{
+ // Create exception
+ const Reference<XContentProviderManager> xCPM(
+ getContentBroker(true)->getContentProviderManagerInterface());
+ const PropertyValue aUriProperty(
+ rtl::OUString::createFromAscii("Uri"),
+ -1,
+ makeAny(getSystemPathFromFileURL(xCPM, rUri)),
+ PropertyState_DIRECT_VALUE)
+ ;
+ Sequence<Any> lArguments(1);
+ lArguments[0] <<= aUriProperty;
+ const InteractiveAugmentedIOException xError(
+ rtl::OUString(),
+ 0,
+ InteractionClassification_ERROR,
+ IOErrorCode_NO_FILE,
+ lArguments)
+ ;
+
+ // Create interaction request
+ std::auto_ptr<ucbhelper::SimpleInteractionRequest> aRequest(
+ new ucbhelper::SimpleInteractionRequest(makeAny(xError), CONTINUATION_APPROVE));
+ {
+ Reference<XInteractionContinuation> xContinuation(
+ new ::ucbhelper::InteractionApprove(aRequest.get()));
+ Sequence<Reference<XInteractionContinuation> > lContinuations(1);
+ lContinuations[0].set(xContinuation);
+ aRequest->setContinuations(lContinuations);
+ }
+
+ Reference<XInteractionHandler> xInteraction(rEnvironment->getInteractionHandler());
+ if (xInteraction.is())
+ {
+ Reference<XInteractionRequest> xRequest(aRequest.release());
+ xInteraction->handle(xRequest);
+ }
+}
+
+}
+
//=========================================================================
//=========================================================================
//
@@ -1188,7 +1245,10 @@
throw( CommandAbortedException, RuntimeException, Exception )
{
if ( !isDocument() )
+ {
+ lcl_displayMessage(m_xImpl->getEnvironment(), getURL());
return Reference< XInputStream >();
+ }
Reference< XActiveDataSink > xSink = new ActiveDataSink;
@@ -1213,7 +1273,10 @@
throw( CommandAbortedException, RuntimeException, Exception )
{
if ( !isDocument() )
+ {
+ lcl_displayMessage(m_xImpl->getEnvironment(), getURL());
return Reference< XInputStream >();
+ }
Reference< XActiveDataSink > xSink = new ActiveDataSink;
@@ -1238,7 +1301,10 @@
throw( CommandAbortedException, RuntimeException, Exception )
{
if ( !isDocument() )
+ {
+ lcl_displayMessage(m_xImpl->getEnvironment(), getURL());
return Reference< XStream >();
+ }
Reference< XActiveDataStreamer > xStreamer = new ActiveDataStreamer;
@@ -1263,7 +1329,10 @@
throw( CommandAbortedException, RuntimeException, Exception )
{
if ( !isDocument() )
+ {
+ lcl_displayMessage(m_xImpl->getEnvironment(), getURL());
return Reference< XStream >();
+ }
Reference< XActiveDataStreamer > xStreamer = new ActiveDataStreamer;
@@ -1288,7 +1357,10 @@
throw( CommandAbortedException, RuntimeException, Exception )
{
if ( !isDocument() )
+ {
+ lcl_displayMessage(m_xImpl->getEnvironment(), getURL());
return sal_False;
+ }
OpenCommandArgument2 aArg;
aArg.Mode = OpenMode::DOCUMENT;
@@ -1311,7 +1383,10 @@
throw( CommandAbortedException, RuntimeException, Exception )
{
if ( !isDocument() )
+ {
+ lcl_displayMessage(m_xImpl->getEnvironment(), getURL());
return sal_False;
+ }
OpenCommandArgument2 aArg;
aArg.Mode = OpenMode::DOCUMENT;
Index: comphelper/source/misc/mediadescriptor.cxx
===================================================================
--- comphelper/source/misc/mediadescriptor.cxx (revision 270567)
+++ comphelper/source/misc/mediadescriptor.cxx (working copy)
@@ -727,7 +727,8 @@
xRequest->getRequest() >>= exIO;
bAbort = (
(exIO.Code == css::ucb::IOErrorCode_ACCESS_DENIED ) ||
- (exIO.Code == css::ucb::IOErrorCode_LOCKING_VIOLATION )
+ (exIO.Code == css::ucb::IOErrorCode_LOCKING_VIOLATION ) ||
+ (exIO.Code == css::ucb::IOErrorCode_NO_FILE)
);
}
break;
Index: openoffice.org.spec
===================================================================
RCS file: /cvs/extras/rpms/openoffice.org/devel/openoffice.org.spec,v
retrieving revision 1.1891
retrieving revision 1.1892
diff -u -r1.1891 -r1.1892
--- openoffice.org.spec 22 Apr 2009 10:22:27 -0000 1.1891
+++ openoffice.org.spec 22 Apr 2009 13:51:36 -0000 1.1892
@@ -137,6 +137,7 @@
Patch62: openoffice.org-3.1.0.ooo101152.solenv.kn.patch
Patch63: workspace.slideshow1.patch
Patch64: openoffice.org-3.1.0.ooo90439.sfx2.qstart.hackaround.patch
+Patch65: openoffice.org-3.1.0.ooo101274.opening-a-directory.patch
%define python_py_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(0)")
%define instdir %{_libdir}
@@ -1632,6 +1633,7 @@
%patch62 -p1 -b .ooo101152.solenv.kn.patch
%patch63 -p2 -b .workspace.slideshow1.patch
%patch64 -p0 -b .ooo90439.sfx2.qstart.hackaround.patch
+%patch65 -p0 -b .ooo101274.opening-a-directory.patch
%build
echo build start time is `date`, diskspace: `df -h . | tail -n 1`
@@ -4128,6 +4130,8 @@
* Tue Apr 21 2009 Caolán McNamara <caolanm at redhat.com> - 1:3.1.0-10.3
- add openoffice.org-3.1.0.ooo90439.sfx2.qstart.hackaround.patch
- add openoffice.org-3.1.0.ooo101159.ww8.export.commentfields.patch
+- Resolves: rhbz#473985 - "oocalc this-is-a-dir" finishes immediately
+ + add openoffice.org-3.1.0-ooo101274.opening-a-directory.patch
* Sun Apr 19 2009 Caolán McNamara <caolanm at redhat.com> - 1:3.1.0-10.2
- Resolves: rhbz#496280 ooo#101184 dynamically detect multiple monitors
More information about the scm-commits
mailing list