summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2023-11-23 10:01:44 +0100
committerNoel Grandin <noel.grandin@collabora.co.uk>2023-11-23 12:07:09 +0100
commit59280a9ce5a15136a6fdd383aedf02c6cf7d6e96 (patch)
treeae4a920bc8687df984745f347cfbb0f3b5d52101 /include
parentf23ee916466bd6e0d328a4e541e104445c8ecb0a (diff)
tdf#158321 No error message when file doesn't exist
Revert "reduce allocations in InterceptedInteraction" This reverts commit e3c961e6a3917d95534652e0f982918cc1079015. Change-Id: I26ba0acaa088dff1800ccd69513056f821bd4d7f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159762 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'include')
-rw-r--r--include/comphelper/stillreadwriteinteraction.hxx6
-rw-r--r--include/ucbhelper/interceptedinteraction.hxx34
2 files changed, 31 insertions, 9 deletions
diff --git a/include/comphelper/stillreadwriteinteraction.hxx b/include/comphelper/stillreadwriteinteraction.hxx
index 6347e03f47c3..fb03a7ad1d84 100644
--- a/include/comphelper/stillreadwriteinteraction.hxx
+++ b/include/comphelper/stillreadwriteinteraction.hxx
@@ -33,6 +33,11 @@ namespace comphelper{
class UNLESS_MERGELIBS(COMPHELPER_DLLPUBLIC) StillReadWriteInteraction final : public ::ucbhelper::InterceptedInteraction
{
private:
+ static const sal_Int32 HANDLE_INTERACTIVEIOEXCEPTION = 0;
+ static const sal_Int32 HANDLE_UNSUPPORTEDDATASINKEXCEPTION = 1;
+ static const sal_Int32 HANDLE_AUTHENTICATIONREQUESTEXCEPTION = 2;
+ static const sal_Int32 HANDLE_CERTIFICATEVALIDATIONREQUESTEXCEPTION = 3;
+
bool m_bUsed;
bool m_bHandledByMySelf;
@@ -40,6 +45,7 @@ public:
StillReadWriteInteraction(const css::uno::Reference< css::task::XInteractionHandler >& xHandler,
css::uno::Reference< css::task::XInteractionHandler > xAuxiliaryHandler);
+ void resetInterceptions();
void resetErrorStates();
bool wasWriteError() const { return (m_bUsed && m_bHandledByMySelf);}
diff --git a/include/ucbhelper/interceptedinteraction.hxx b/include/ucbhelper/interceptedinteraction.hxx
index b7ac77068c14..738c0f2b002d 100644
--- a/include/ucbhelper/interceptedinteraction.hxx
+++ b/include/ucbhelper/interceptedinteraction.hxx
@@ -78,6 +78,16 @@ class UCBHELPER_DLLPUBLIC InterceptedInteraction : public InterceptedInteraction
sal_Int32 Handle;
+ /** @short default ctor.
+
+ @descr Such constructed object can't be used really.
+ Might it will crash if it's used!
+ Don't forget to initialize all(!) members...
+ */
+ InterceptedRequest()
+ {
+ Handle = INVALID_HANDLE;
+ }
InterceptedRequest(css::uno::Any Request_, css::uno::Type Continuation_, sal_Int32 Handle_)
: Request(std::move(Request_)), Continuation(std::move(Continuation_)), Handle(Handle_)
{
@@ -120,22 +130,16 @@ class UCBHELPER_DLLPUBLIC InterceptedInteraction : public InterceptedInteraction
/** @short these list contains the requests, which should be intercepted.
*/
- std::span< const InterceptedRequest > m_lInterceptions;
+ ::std::vector< InterceptedRequest > m_lInterceptions;
// native interface
public:
- /** @short initialise with a list of intercepted interactions.
-
- @attention If the interface method handle() will be overwritten by
- a derived class, the functionality behind these static list
- can't be used.
- @param lInterceptions
- the list of intercepted requests.
+ /** @short initialize a new instance with default values.
*/
- InterceptedInteraction(std::span< const InterceptedRequest > m_lInterceptions);
+ InterceptedInteraction();
/** @short initialize a new instance with the interaction handler,
@@ -152,6 +156,18 @@ class UCBHELPER_DLLPUBLIC InterceptedInteraction : public InterceptedInteraction
void setInterceptedHandler(const css::uno::Reference< css::task::XInteractionHandler >& xInterceptedHandler);
+ /** @short set a new list of intercepted interactions.
+
+ @attention If the interface method handle() will be overwritten by
+ a derived class, the functionality behind these static list
+ can't be used.
+
+ @param lInterceptions
+ the list of intercepted requests.
+ */
+ void setInterceptions(::std::vector< InterceptedRequest >&& lInterceptions);
+
+
/** @short extract a requested continuation from the list of available ones.
@param lContinuations