/[packages]/cauldron/libreoffice/releases/3.3.1.2/7.mga1/SOURCES/openoffice.org-3.1.0.ooo101274.opening-a-directory.patch
ViewVC logotype

Contents of /cauldron/libreoffice/releases/3.3.1.2/7.mga1/SOURCES/openoffice.org-3.1.0.ooo101274.opening-a-directory.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 389214 - (show annotations) (download)
Thu Jan 17 21:30:27 2013 UTC (11 years, 3 months ago) by pterjan
File size: 5978 byte(s)
oops
1 Index: ucbhelper/source/client/content.cxx
2 ===================================================================
3 --- ucbhelper/source/client/content.cxx (revision 270567)
4 +++ ucbhelper/source/client/content.cxx (working copy)
5 @@ -39,6 +39,7 @@
6 #include <cppuhelper/weak.hxx>
7
8 #include <cppuhelper/implbase1.hxx>
9 +#include <com/sun/star/beans/PropertyValue.hpp>
10 #include <com/sun/star/ucb/ContentCreationError.hpp>
11 #include <com/sun/star/ucb/XCommandEnvironment.hpp>
12 #include <com/sun/star/ucb/XCommandInfo.hpp>
13 @@ -48,6 +49,8 @@
14 #include <com/sun/star/ucb/ContentAction.hpp>
15 #include <com/sun/star/ucb/OpenCommandArgument2.hpp>
16 #include <com/sun/star/ucb/InsertCommandArgument.hpp>
17 +#include <com/sun/star/ucb/IOErrorCode.hpp>
18 +#include <com/sun/star/ucb/InteractiveAugmentedIOException.hpp>
19 #include <com/sun/star/ucb/GlobalTransferCommandArgument.hpp>
20 #include <com/sun/star/ucb/NameClash.hpp>
21 #include <com/sun/star/ucb/OpenMode.hpp>
22 @@ -65,6 +68,8 @@
23 #include <com/sun/star/sdbc/XRow.hpp>
24 #include <com/sun/star/lang/IllegalArgumentException.hpp>
25 #include <com/sun/star/beans/UnknownPropertyException.hpp>
26 +#include <com/sun/star/task/XInteractionRequest.hpp>
27 +
28 #include <ucbhelper/macros.hxx>
29 #include <ucbhelper/content.hxx>
30 #include <ucbhelper/contentbroker.hxx>
31 @@ -72,6 +77,10 @@
32 #include <ucbhelper/activedatastreamer.hxx>
33 #include <ucbhelper/interactionrequest.hxx>
34 #include <ucbhelper/cancelcommandexecution.hxx>
35 +#include <ucbhelper/fileidentifierconverter.hxx>
36 +#include <ucbhelper/simpleinteractionrequest.hxx>
37 +
38 +#include <memory>
39
40 using namespace com::sun::star::container;
41 using namespace com::sun::star::beans;
42 @@ -375,6 +384,54 @@
43 return Reference< XContent >();
44 }
45
46 +namespace
47 +{
48 +
49 +void
50 +lcl_displayMessage(
51 + const Reference<XCommandEnvironment>& rEnvironment,
52 + const rtl::OUString& rUri)
53 +{
54 + // Create exception
55 + const Reference<XContentProviderManager> xCPM(
56 + getContentBroker(true)->getContentProviderManagerInterface());
57 + const PropertyValue aUriProperty(
58 + rtl::OUString::createFromAscii("Uri"),
59 + -1,
60 + makeAny(getSystemPathFromFileURL(xCPM, rUri)),
61 + PropertyState_DIRECT_VALUE)
62 + ;
63 + Sequence<Any> lArguments(1);
64 + lArguments[0] <<= aUriProperty;
65 + const InteractiveAugmentedIOException xError(
66 + rtl::OUString(),
67 + 0,
68 + InteractionClassification_ERROR,
69 + IOErrorCode_NO_FILE,
70 + lArguments)
71 + ;
72 +
73 + // Create interaction request
74 + std::auto_ptr<ucbhelper::SimpleInteractionRequest> aRequest(
75 + new ucbhelper::SimpleInteractionRequest(makeAny(xError), CONTINUATION_APPROVE));
76 + {
77 + Reference<XInteractionContinuation> xContinuation(
78 + new ::ucbhelper::InteractionApprove(aRequest.get()));
79 + Sequence<Reference<XInteractionContinuation> > lContinuations(1);
80 + lContinuations[0].set(xContinuation);
81 + aRequest->setContinuations(lContinuations);
82 + }
83 +
84 + Reference<XInteractionHandler> xInteraction(rEnvironment->getInteractionHandler());
85 + if (xInteraction.is())
86 + {
87 + Reference<XInteractionRequest> xRequest(aRequest.release());
88 + xInteraction->handle(xRequest);
89 + }
90 +}
91 +
92 +}
93 +
94 //=========================================================================
95 //=========================================================================
96 //
97 @@ -1186,7 +1243,10 @@
98 throw( CommandAbortedException, RuntimeException, Exception )
99 {
100 if ( !isDocument() )
101 + {
102 + lcl_displayMessage(m_xImpl->getEnvironment(), getURL());
103 return Reference< XInputStream >();
104 + }
105
106 Reference< XActiveDataSink > xSink = new ActiveDataSink;
107
108 @@ -1211,7 +1271,10 @@
109 throw( CommandAbortedException, RuntimeException, Exception )
110 {
111 if ( !isDocument() )
112 + {
113 + lcl_displayMessage(m_xImpl->getEnvironment(), getURL());
114 return Reference< XInputStream >();
115 + }
116
117 Reference< XActiveDataSink > xSink = new ActiveDataSink;
118
119 @@ -1236,7 +1299,10 @@
120 throw( CommandAbortedException, RuntimeException, Exception )
121 {
122 if ( !isDocument() )
123 + {
124 + lcl_displayMessage(m_xImpl->getEnvironment(), getURL());
125 return Reference< XStream >();
126 + }
127
128 Reference< XActiveDataStreamer > xStreamer = new ActiveDataStreamer;
129
130 @@ -1261,7 +1327,10 @@
131 throw( CommandAbortedException, RuntimeException, Exception )
132 {
133 if ( !isDocument() )
134 + {
135 + lcl_displayMessage(m_xImpl->getEnvironment(), getURL());
136 return Reference< XStream >();
137 + }
138
139 Reference< XActiveDataStreamer > xStreamer = new ActiveDataStreamer;
140
141 @@ -1286,7 +1355,10 @@
142 throw( CommandAbortedException, RuntimeException, Exception )
143 {
144 if ( !isDocument() )
145 + {
146 + lcl_displayMessage(m_xImpl->getEnvironment(), getURL());
147 return sal_False;
148 + }
149
150 OpenCommandArgument2 aArg;
151 aArg.Mode = OpenMode::DOCUMENT;
152 @@ -1309,7 +1381,10 @@
153 throw( CommandAbortedException, RuntimeException, Exception )
154 {
155 if ( !isDocument() )
156 + {
157 + lcl_displayMessage(m_xImpl->getEnvironment(), getURL());
158 return sal_False;
159 + }
160
161 OpenCommandArgument2 aArg;
162 aArg.Mode = OpenMode::DOCUMENT;
163 Index: comphelper/source/misc/mediadescriptor.cxx
164 ===================================================================
165 --- comphelper/source/misc/stillreadwriteinteraction.cxx 2010-07-06 15:32:02.000000000 +0100
166 +++ comphelper/source/misc/stillreadwriteinteraction.cxx 2010-07-06 15:32:31.000000000 +0100
167 @@ -103,6 +103,7 @@
168 bAbort = (
169 (exIO.Code == css::ucb::IOErrorCode_ACCESS_DENIED )
170 || (exIO.Code == css::ucb::IOErrorCode_LOCKING_VIOLATION )
171 + || (exIO.Code == css::ucb::IOErrorCode_NO_FILE )
172 || (exIO.Code == css::ucb::IOErrorCode_NOT_EXISTING )
173 #ifdef MACOSX
174 // this is a workaround for MAC, on this platform if the file is locked
175

  ViewVC Help
Powered by ViewVC 1.1.30