LibreOffice Module sot (master) 1
xolesimplestorage.cxx
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/*
3 * This file is part of the LibreOffice project.
4 *
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 *
9 * This file incorporates work covered by the following license notice:
10 *
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18 */
19
20#include "xolesimplestorage.hxx"
21
22#include <com/sun/star/embed/OLESimpleStorage.hpp>
23#include <com/sun/star/lang/DisposedException.hpp>
24#include <com/sun/star/lang/NoSupportException.hpp>
25#include <com/sun/star/io/IOException.hpp>
26#include <com/sun/star/io/XStream.hpp>
27#include <com/sun/star/io/XInputStream.hpp>
28#include <com/sun/star/io/XSeekable.hpp>
29#include <com/sun/star/io/XTruncate.hpp>
30#include <com/sun/star/io/TempFile.hpp>
31
36#include <sot/stg.hxx>
37#include <sot/storinfo.hxx>
38#include <utility>
39
40using namespace ::com::sun::star;
41
42const sal_Int32 nBytesCount = 32000;
43
44
46 css::uno::Reference<css::uno::XComponentContext> xContext,
47 css::uno::Sequence<css::uno::Any> const &aArguments)
48: m_bDisposed( false )
49, m_xContext(std::move( xContext ))
50, m_bNoTemporaryCopy( false )
51{
52 sal_Int32 nArgNum = aArguments.getLength();
53 if ( nArgNum < 1 || nArgNum > 2 )
54 throw lang::IllegalArgumentException(); // TODO:
55
56 uno::Reference< io::XStream > xStream;
57 uno::Reference< io::XInputStream > xInputStream;
58 if ( !( aArguments[0] >>= xStream ) && !( aArguments[0] >>= xInputStream ) )
59 throw lang::IllegalArgumentException(); // TODO:
60
61 if ( nArgNum == 2 )
62 {
63 if ( !( aArguments[1] >>= m_bNoTemporaryCopy ) )
64 throw lang::IllegalArgumentException(); // TODO:
65 }
66
68 {
69 // TODO: ???
70 // If the temporary stream is not created, the original stream must be wrapped
71 // since SvStream wrapper closes the stream is owns
72 if ( xInputStream.is() )
73 {
74 // the stream must be seekable for direct access
75 uno::Reference< io::XSeekable > xSeek( xInputStream, uno::UNO_QUERY_THROW );
76 m_pStream = ::utl::UcbStreamHelper::CreateStream( xInputStream, false );
77 }
78 else if ( xStream.is() )
79 {
80 // the stream must be seekable for direct access
81 uno::Reference< io::XSeekable > xSeek( xStream, uno::UNO_QUERY_THROW );
83 }
84 else
85 throw lang::IllegalArgumentException(); // TODO:
86 }
87 else
88 {
89 uno::Reference < io::XStream > xTempFile( io::TempFile::create(m_xContext),
90 uno::UNO_QUERY_THROW );
91 uno::Reference < io::XSeekable > xTempSeek( xTempFile, uno::UNO_QUERY_THROW );
92 uno::Reference< io::XOutputStream > xTempOut = xTempFile->getOutputStream();
93 if ( !xTempOut.is() )
94 throw uno::RuntimeException();
95
96 if ( xInputStream.is() )
97 {
98 try
99 {
100 uno::Reference< io::XSeekable > xSeek( xInputStream, uno::UNO_QUERY_THROW );
101 xSeek->seek( 0 );
102 }
103 catch( uno::Exception& )
104 {}
105
106 ::comphelper::OStorageHelper::CopyInputToOutput( xInputStream, xTempOut );
107 xTempOut->closeOutput();
108 xTempSeek->seek( 0 );
109 uno::Reference< io::XInputStream > xTempInput = xTempFile->getInputStream();
110 m_pStream = ::utl::UcbStreamHelper::CreateStream( xTempInput, false );
111 }
112 else if ( xStream.is() )
113 {
114 // not sure that the storage flashes the stream on commit
116 m_xTempStream = xTempFile;
117
118 uno::Reference< io::XSeekable > xSeek( xStream, uno::UNO_QUERY_THROW );
119 xSeek->seek( 0 );
120 uno::Reference< io::XInputStream > xInpStream = xStream->getInputStream();
121 if ( !xInpStream.is() || !xStream->getOutputStream().is() )
122 throw uno::RuntimeException();
123
125 xTempOut->flush();
126 xTempSeek->seek( 0 );
127
129 }
130 else
131 throw lang::IllegalArgumentException(); // TODO:
132 }
133
134 if ( !m_pStream || m_pStream->GetError() )
135 throw io::IOException(); // TODO
136
137 m_pStorage.reset(new Storage( *m_pStream, false ));
138}
139
141{
142 try {
143 osl_atomic_increment(&m_refCount);
144 dispose();
145 } catch( uno::Exception& )
146 {}
147}
148
150{
151 if ( m_bNoTemporaryCopy )
152 return;
153
154 uno::Reference< io::XSeekable > xSeek( m_xStream, uno::UNO_QUERY_THROW );
155 xSeek->seek( 0 );
156
157 uno::Reference< io::XSeekable > xTempSeek( m_xTempStream, uno::UNO_QUERY_THROW );
158 sal_Int64 nPos = xTempSeek->getPosition();
159 xTempSeek->seek( 0 );
160
161 uno::Reference< io::XInputStream > xTempInp = m_xTempStream->getInputStream();
162 uno::Reference< io::XOutputStream > xOutputStream = m_xStream->getOutputStream();
163 if ( !xTempInp.is() || !xOutputStream.is() )
164 throw uno::RuntimeException();
165
166 uno::Reference< io::XTruncate > xTrunc( xOutputStream, uno::UNO_QUERY_THROW );
167 xTrunc->truncate();
168
169 ::comphelper::OStorageHelper::CopyInputToOutput( xTempInp, xOutputStream );
170 xOutputStream->flush();
171 xTempSeek->seek( nPos );
172}
173
174
175void OLESimpleStorage::InsertInputStreamToStorage_Impl( BaseStorage* pStorage, const OUString & aName, const uno::Reference< io::XInputStream >& xInputStream )
176{
177 if ( !pStorage || aName.isEmpty() || !xInputStream.is() )
178 throw uno::RuntimeException();
179
180 if ( pStorage->IsContained( aName ) )
181 throw container::ElementExistException(); // TODO:
182
183 std::unique_ptr<BaseStorageStream> pNewStream(pStorage->OpenStream( aName ));
184 if ( !pNewStream || pNewStream->GetError() || pStorage->GetError() )
185 {
186 pNewStream.reset();
187 pStorage->ResetError();
188 throw io::IOException(); // TODO
189 }
190
191 try
192 {
193 uno::Sequence< sal_Int8 > aData( nBytesCount );
194 sal_Int32 nRead = 0;
195 do
196 {
197 nRead = xInputStream->readBytes( aData, nBytesCount );
198
199 sal_Int32 nWritten = pNewStream->Write( aData.getConstArray(), nRead );
200 if ( nWritten < nRead )
201 throw io::IOException();
202 } while( nRead == nBytesCount );
203 }
204 catch( uno::Exception& )
205 {
206 pNewStream.reset();
207 pStorage->Remove( aName );
208
209 throw;
210 }
211}
212
213
214void OLESimpleStorage::InsertNameAccessToStorage_Impl( BaseStorage* pStorage, const OUString & aName, const uno::Reference< container::XNameAccess >& xNameAccess )
215{
216 if ( !pStorage || aName.isEmpty() || !xNameAccess.is() )
217 throw uno::RuntimeException();
218
219 if ( pStorage->IsContained( aName ) )
220 throw container::ElementExistException(); // TODO:
221
222 std::unique_ptr<BaseStorage> pNewStorage(pStorage->OpenStorage( aName ));
223 if ( !pNewStorage || pNewStorage->GetError() || pStorage->GetError() )
224 {
225 pNewStorage.reset();
226 pStorage->ResetError();
227 throw io::IOException(); // TODO
228 }
229
230 try
231 {
232 const uno::Sequence< OUString > aElements = xNameAccess->getElementNames();
233 for ( const auto& rElement : aElements )
234 {
235 uno::Reference< io::XInputStream > xInputStream;
236 uno::Reference< container::XNameAccess > xSubNameAccess;
237 uno::Any aAny = xNameAccess->getByName( rElement );
238 if ( aAny >>= xInputStream )
239 InsertInputStreamToStorage_Impl( pNewStorage.get(), rElement, xInputStream );
240 else if ( aAny >>= xSubNameAccess )
241 InsertNameAccessToStorage_Impl( pNewStorage.get(), rElement, xSubNameAccess );
242 }
243 }
244 catch( uno::Exception& )
245 {
246 pNewStorage.reset();
247 pStorage->Remove( aName );
248
249 throw;
250 }
251}
252
253
254// XNameContainer
255
256
257void SAL_CALL OLESimpleStorage::insertByName( const OUString& aName, const uno::Any& aElement )
258{
259 std::unique_lock aGuard( m_aMutex );
260
261 if ( m_bDisposed )
262 throw lang::DisposedException();
263
264 if ( !m_pStorage )
265 throw uno::RuntimeException();
266
267 uno::Reference< io::XStream > xStream;
268 uno::Reference< io::XInputStream > xInputStream;
269 uno::Reference< container::XNameAccess > xNameAccess;
270
271 try
272 {
273 if ( !m_bNoTemporaryCopy && !m_xStream.is() )
274 throw io::IOException(); // TODO
275
276 if ( aElement >>= xStream )
277 xInputStream = xStream->getInputStream();
278 else if ( !( aElement >>= xInputStream ) && !( aElement >>= xNameAccess ) )
279 throw lang::IllegalArgumentException(); // TODO:
280
281 if ( xInputStream.is() )
282 InsertInputStreamToStorage_Impl( m_pStorage.get(), aName, xInputStream );
283 else if ( xNameAccess.is() )
284 InsertNameAccessToStorage_Impl( m_pStorage.get(), aName, xNameAccess );
285 else
286 throw uno::RuntimeException();
287 }
288 catch( uno::RuntimeException& )
289 {
290 throw;
291 }
292 catch( container::ElementExistException& )
293 {
294 throw;
295 }
296 catch( const uno::Exception& )
297 {
298 css::uno::Any anyEx = cppu::getCaughtException();
299 throw lang::WrappedTargetException("Insert has failed!",
300 uno::Reference< uno::XInterface >(),
301 anyEx );
302 }
303}
304
305
306void SAL_CALL OLESimpleStorage::removeByName( const OUString& aName )
307{
308 std::unique_lock aGuard( m_aMutex );
309
310 if ( m_bDisposed )
311 throw lang::DisposedException();
312
313 if ( !m_pStorage )
314 throw uno::RuntimeException();
315
316 if ( !m_bNoTemporaryCopy && !m_xStream.is() )
317 throw lang::WrappedTargetException(); // io::IOException(); // TODO
318
319 if ( !m_pStorage->IsContained( aName ) )
320 throw container::NoSuchElementException(); // TODO:
321
322 m_pStorage->Remove( aName );
323
324 if ( m_pStorage->GetError() )
325 {
326 m_pStorage->ResetError();
327 throw lang::WrappedTargetException(); // io::IOException(); // TODO
328 }
329}
330
331
332void SAL_CALL OLESimpleStorage::replaceByName( const OUString& aName, const uno::Any& aElement )
333{
334 std::unique_lock aGuard( m_aMutex );
335
336 if ( m_bDisposed )
337 throw lang::DisposedException();
338
340
341 try
342 {
343 insertByName( aName, aElement );
344 }
345 catch( container::ElementExistException& )
346 {
347 uno::Any aCaught( ::cppu::getCaughtException() );
348
349 throw lang::WrappedTargetException("Can't copy raw stream",
350 uno::Reference< uno::XInterface >(),
351 aCaught );
352 }
353}
354
355
356uno::Any SAL_CALL OLESimpleStorage::getByName( const OUString& aName )
357{
358 std::unique_lock aGuard( m_aMutex );
359
360 if ( m_bDisposed )
361 throw lang::DisposedException();
362
363 if ( !m_pStorage )
364 throw uno::RuntimeException();
365
366 if ( !m_pStorage->IsContained( aName ) )
367 throw container::NoSuchElementException(); // TODO:
368
369 uno::Any aResult;
370
371 uno::Reference< io::XStream > xTempFile = io::TempFile::create(m_xContext);
372 uno::Reference< io::XSeekable > xSeekable( xTempFile, uno::UNO_QUERY_THROW );
373 uno::Reference< io::XOutputStream > xOutputStream = xTempFile->getOutputStream();
374 uno::Reference< io::XInputStream > xInputStream = xTempFile->getInputStream();
375 if ( !xOutputStream.is() || !xInputStream.is() )
376 throw uno::RuntimeException();
377
378 if ( m_pStorage->IsStorage( aName ) )
379 {
380 std::unique_ptr<BaseStorage> pStrg(m_pStorage->OpenStorage( aName ));
381 m_pStorage->ResetError();
382 if ( !pStrg )
383 throw lang::WrappedTargetException(); // io::IOException(); // TODO
384
385 std::unique_ptr<SvStream> pStream = ::utl::UcbStreamHelper::CreateStream( xTempFile, false ); // do not close the original stream
386 if ( !pStream )
387 throw uno::RuntimeException();
388
389 std::unique_ptr<BaseStorage> pNewStor(new Storage( *pStream, false ));
390 bool bSuccess = ( pStrg->CopyTo( pNewStor.get() ) && pNewStor->Commit() &&
391 !pNewStor->GetError() && !pStrg->GetError() );
392
393 pNewStor.reset();
394 pStrg.reset();
395 pStream.reset();
396
397 if ( !bSuccess )
398 throw uno::RuntimeException();
399
400 uno::Reference< container::XNameContainer > xResultNameContainer(
401 css::embed::OLESimpleStorage::createFromInputStream(m_xContext, xInputStream, true),
402 uno::UNO_QUERY_THROW );
403
404 aResult <<= xResultNameContainer;
405 }
406 else
407 {
408 std::unique_ptr<BaseStorageStream> pStream(m_pStorage->OpenStream( aName, StreamMode::READ | StreamMode::SHARE_DENYALL | StreamMode::NOCREATE ));
409 try
410 {
411 if ( !pStream || pStream->GetError() || m_pStorage->GetError() )
412 {
413 m_pStorage->ResetError();
414 throw io::IOException(); // TODO
415 }
416
417 uno::Sequence< sal_Int8 > aData( nBytesCount );
418 sal_Int32 nSize = nBytesCount;
419 sal_Int32 nRead = 0;
420 while( 0 != ( nRead = pStream->Read( aData.getArray(), nSize ) ) )
421 {
422 if ( nRead < nSize )
423 {
424 nSize = nRead;
425 aData.realloc( nSize );
426 }
427
428 xOutputStream->writeBytes( aData );
429 }
430
431 if ( pStream->GetError() )
432 throw io::IOException(); // TODO
433
434 xOutputStream->closeOutput();
435 xSeekable->seek( 0 );
436 }
437 catch (const uno::RuntimeException&)
438 {
439 throw;
440 }
441 catch (const uno::Exception& ex)
442 {
443 css::uno::Any anyEx = cppu::getCaughtException();
444 throw css::lang::WrappedTargetException( ex.Message,
445 nullptr, anyEx );
446 }
447
448 pStream.reset();
449
450 aResult <<= xInputStream;
451 }
452
453 return aResult;
454}
455
456
457uno::Sequence< OUString > SAL_CALL OLESimpleStorage::getElementNames()
458{
459 std::unique_lock aGuard( m_aMutex );
460
461 if ( m_bDisposed )
462 throw lang::DisposedException();
463
464 if ( !m_pStorage )
465 throw uno::RuntimeException();
466
467 SvStorageInfoList aList;
468 m_pStorage->FillInfoList( &aList );
469
470 if ( m_pStorage->GetError() )
471 {
472 m_pStorage->ResetError();
473 throw uno::RuntimeException(); // TODO:
474 }
475
476 uno::Sequence< OUString > aSeq( aList.size() );
477 auto aSeqRange = asNonConstRange(aSeq);
478 for ( size_t nInd = 0; nInd < aList.size(); nInd++ )
479 aSeqRange[nInd] = aList[nInd].GetName();
480
481 return aSeq;
482}
483
484
485sal_Bool SAL_CALL OLESimpleStorage::hasByName( const OUString& aName )
486{
487 std::unique_lock aGuard( m_aMutex );
488
489 if ( m_bDisposed )
490 throw lang::DisposedException();
491
492 if ( !m_pStorage )
493 throw uno::RuntimeException();
494
495 bool bResult = m_pStorage->IsContained( aName );
496
497 if ( m_pStorage->GetError() )
498 {
499 m_pStorage->ResetError();
500 throw uno::RuntimeException(); // TODO:
501 }
502
503 return bResult;
504}
505
506
508{
509 std::unique_lock aGuard( m_aMutex );
510
511 if ( m_bDisposed )
512 throw lang::DisposedException();
513
515}
516
517
519{
520 std::unique_lock aGuard( m_aMutex );
521
522 if ( m_bDisposed )
523 throw lang::DisposedException();
524
525 if ( !m_pStorage )
526 throw uno::RuntimeException();
527
528 SvStorageInfoList aList;
529 m_pStorage->FillInfoList( &aList );
530
531 if ( m_pStorage->GetError() )
532 {
533 m_pStorage->ResetError();
534 throw uno::RuntimeException(); // TODO:
535 }
536
537 return !aList.empty();
538}
539
540
541// XComponent
542
543
545{
546 std::unique_lock aGuard( m_aMutex );
547
548 if ( m_bDisposed )
549 return;
550
551 if ( m_aListenersContainer.getLength(aGuard) )
552 {
553 lang::EventObject aSource( getXWeak() );
554 m_aListenersContainer.disposeAndClear( aGuard, aSource );
555 }
556
557 m_pStorage.reset();
558 m_pStream.reset();
559
560 m_xStream.clear();
561 m_xTempStream.clear();
562
563 m_bDisposed = true;
564}
565
566
568 const uno::Reference< lang::XEventListener >& xListener )
569{
570 std::unique_lock aGuard( m_aMutex );
571
572 if ( m_bDisposed )
573 throw lang::DisposedException();
574
575 m_aListenersContainer.addInterface( aGuard, xListener );
576}
577
578
580 const uno::Reference< lang::XEventListener >& xListener )
581{
582 std::unique_lock aGuard( m_aMutex );
583
584 if ( m_bDisposed )
585 throw lang::DisposedException();
586
587 m_aListenersContainer.removeInterface( aGuard, xListener );
588}
589
590
591// XTransactedObject
592
593
595{
596 std::unique_lock aGuard( m_aMutex );
597
598 if ( m_bDisposed )
599 throw lang::DisposedException();
600
601 if ( !m_pStorage )
602 throw uno::RuntimeException();
603
604 if ( !m_bNoTemporaryCopy && !m_xStream.is() )
605 throw io::IOException(); // TODO
606
607 if ( !m_pStorage->Commit() || m_pStorage->GetError() )
608 {
609 m_pStorage->ResetError();
610 throw io::IOException(); // TODO
611 }
612
614}
615
616
618{
619 std::unique_lock aGuard( m_aMutex );
620
621 if ( m_bDisposed )
622 throw lang::DisposedException();
623
624 if ( !m_pStorage )
625 throw uno::RuntimeException();
626
627 if ( !m_bNoTemporaryCopy && !m_xStream.is() )
628 throw io::IOException(); // TODO
629
630 if ( !m_pStorage->Revert() || m_pStorage->GetError() )
631 {
632 m_pStorage->ResetError();
633 throw io::IOException(); // TODO
634 }
635
637}
638
639
640// XClassifiedObject
641
642
643uno::Sequence< sal_Int8 > SAL_CALL OLESimpleStorage::getClassID()
644{
645 std::unique_lock aGuard( m_aMutex );
646
647 if ( m_bDisposed )
648 throw lang::DisposedException();
649
650 if ( !m_pStorage )
651 throw uno::RuntimeException();
652
653 return m_pStorage->GetClassName().GetByteSequence();
654}
655
657{
658 return OUString();
659}
660
661void SAL_CALL OLESimpleStorage::setClassInfo( const uno::Sequence< sal_Int8 >& /*aClassID*/,
662 const OUString& /*sClassName*/ )
663{
664 throw lang::NoSupportException();
665}
666
667// XServiceInfo
669{
670 return "com.sun.star.comp.embed.OLESimpleStorage";
671}
672
673sal_Bool SAL_CALL OLESimpleStorage::supportsService( const OUString& ServiceName )
674{
676}
677
678uno::Sequence< OUString > SAL_CALL OLESimpleStorage::getSupportedServiceNames()
679{
680 return { "com.sun.star.embed.OLESimpleStorage" };
681}
682
683extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface *
685 css::uno::XComponentContext *context,
686 css::uno::Sequence<css::uno::Any> const &arguments)
687{
688 return cppu::acquire(new OLESimpleStorage(context, arguments));
689}
690
691/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
Reference< XComponentContext > m_xContext
Reference< XInputStream > xStream
virtual void Remove(const OUString &rEleName)=0
virtual BaseStorage * OpenStorage(const OUString &rEleName, StreamMode=StreamMode::STD_READWRITE, bool bDirect=false)=0
virtual BaseStorageStream * OpenStream(const OUString &rEleName, StreamMode=StreamMode::STD_READWRITE, bool bDirect=true)=0
virtual bool IsContained(const OUString &rEleName) const =0
virtual void SAL_CALL commit() override
virtual sal_Bool SAL_CALL supportsService(const OUString &ServiceName) override
virtual css::uno::Type SAL_CALL getElementType() override
virtual void SAL_CALL removeEventListener(const css::uno::Reference< css::lang::XEventListener > &xListener) override
virtual OUString SAL_CALL getClassName() override
virtual css::uno::Sequence< OUString > SAL_CALL getElementNames() override
virtual void SAL_CALL setClassInfo(const css::uno::Sequence< ::sal_Int8 > &aClassID, const OUString &sClassName) override
static void InsertNameAccessToStorage_Impl(BaseStorage *pStorage, const OUString &aName, const css::uno::Reference< css::container::XNameAccess > &xNameAccess)
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
virtual void SAL_CALL dispose() final override
OLESimpleStorage(css::uno::Reference< css::uno::XComponentContext > xContext, css::uno::Sequence< css::uno::Any > const &arguments)
virtual void SAL_CALL revert() override
virtual void SAL_CALL insertByName(const OUString &aName, const css::uno::Any &aElement) override
virtual void SAL_CALL replaceByName(const OUString &aName, const css::uno::Any &aElement) override
virtual void SAL_CALL addEventListener(const css::uno::Reference< css::lang::XEventListener > &xListener) override
std::unique_ptr< BaseStorage > m_pStorage
virtual css::uno::Sequence< ::sal_Int8 > SAL_CALL getClassID() override
css::uno::Reference< css::io::XStream > m_xStream
virtual sal_Bool SAL_CALL hasByName(const OUString &aName) override
virtual void SAL_CALL removeByName(const OUString &Name) override
css::uno::Reference< css::uno::XComponentContext > m_xContext
::comphelper::OInterfaceContainerHelper4< css::lang::XEventListener > m_aListenersContainer
virtual ~OLESimpleStorage() override
virtual css::uno::Any SAL_CALL getByName(const OUString &aName) override
static void InsertInputStreamToStorage_Impl(BaseStorage *pStorage, const OUString &aName, const css::uno::Reference< css::io::XInputStream > &xInputStream)
css::uno::Reference< css::io::XStream > m_xTempStream
virtual OUString SAL_CALL getImplementationName() override
virtual sal_Bool SAL_CALL hasElements() override
std::unique_ptr< SvStream > m_pStream
void ResetError() const
Definition: stg.cxx:73
ErrCode GetError() const
Definition: stg.cxx:60
sal_Int32 addInterface(std::unique_lock< std::mutex > &rGuard, const css::uno::Reference< ListenerT > &rxIFace)
void disposeAndClear(::std::unique_lock<::std::mutex > &rGuard, const css::lang::EventObject &rEvt)
sal_Int32 getLength(std::unique_lock< std::mutex > &rGuard) const
sal_Int32 removeInterface(std::unique_lock< std::mutex > &rGuard, const css::uno::Reference< ListenerT > &rxIFace)
static void CopyInputToOutput(const css::uno::Reference< css::io::XInputStream > &xInput, const css::uno::Reference< css::io::XOutputStream > &xOutput)
css::uno::Type const & get()
static std::unique_ptr< SvStream > CreateStream(const OUString &rFileName, StreamMode eOpenMode, css::uno::Reference< css::awt::XWindow > xParentWin=nullptr)
virtual OUString GetName() const override
ULONG m_refCount
bool m_bDisposed
Sequence< PropertyValue > aArguments
OUString aName
sal_uInt16 nPos
Sequence< sal_Int8 > aSeq
constexpr OUStringLiteral aData
bool CPPUHELPER_DLLPUBLIC supportsService(css::lang::XServiceInfo *implementation, rtl::OUString const &name)
Any SAL_CALL getCaughtException()
std::vector< SvStorageInfo > SvStorageInfoList
Definition: storinfo.hxx:56
unsigned char sal_Bool
SAL_DLLPUBLIC_EXPORT css::uno::XInterface * com_sun_star_comp_embed_OLESimpleStorage(css::uno::XComponentContext *context, css::uno::Sequence< css::uno::Any > const &arguments)
const sal_Int32 nBytesCount