Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
core
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
LibreOffice
core
Commits
fcd990f2
Kaydet (Commit)
fcd990f2
authored
Agu 23, 2012
tarafından
Stephan Bergmann
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Some clean up after previous commit
Change-Id: Ie419c769c5d661d51c1b43b9808791dcf9e1725c
üst
3e7990fa
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
27 additions
and
53 deletions
+27
-53
storagehelper.hxx
comphelper/inc/comphelper/storagehelper.hxx
+13
-8
storagehelper.cxx
comphelper/source/misc/storagehelper.cxx
+4
-14
so_instance.cxx
extensions/source/nsplugin/source/so_instance.cxx
+0
-5
XUnbufferedStream.cxx
package/source/zipapi/XUnbufferedStream.cxx
+0
-22
buttonset.cxx
sd/source/filter/html/buttonset.cxx
+3
-0
objstor.cxx
sfx2/source/doc/objstor.cxx
+7
-4
No files found.
comphelper/inc/comphelper/storagehelper.hxx
Dosyayı görüntüle @
fcd990f2
...
...
@@ -24,13 +24,7 @@
#include <com/sun/star/uno/Sequence.hxx>
#include <com/sun/star/uno/Reference.hxx>
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
#include <com/sun/star/lang/XSingleServiceFactory.hpp>
#include <com/sun/star/embed/XStorage.hpp>
#include <com/sun/star/embed/ElementModes.hpp>
#include <com/sun/star/beans/NamedValue.hpp>
#include <com/sun/star/io/XInputStream.hpp>
#include <com/sun/star/io/XOutputStream.hpp>
#include <com/sun/star/io/XStream.hpp>
#include "comphelper/comphelperdllapi.h"
...
...
@@ -42,6 +36,18 @@
#define PACKAGE_ENCRYPTIONDATA_SHA1UTF8 ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PackageSHA1UTF8EncryptionKey" ) )
#define PACKAGE_ENCRYPTIONDATA_SHA1MS1252 ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PackageSHA1MS1252EncryptionKey" ) )
namespace
com
{
namespace
sun
{
namespace
star
{
namespace
beans
{
struct
NamedValue
;
}
namespace
embed
{
class
XStorage
;
}
namespace
io
{
class
XInputStream
;
class
XOutputStream
;
class
XStream
;
}
namespace
lang
{
class
XSingleServiceFactory
;
}
namespace
uno
{
class
XComponentContext
;
}
}
}
}
namespace
comphelper
{
// Unfortunately - the impl.s of XStorage like to invalidate all
...
...
@@ -123,8 +129,7 @@ public:
static
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
io
::
XInputStream
>
GetInputStreamFromURL
(
const
::
rtl
::
OUString
&
aURL
,
const
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
lang
::
XMultiServiceFactory
>&
xFactory
=
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
lang
::
XMultiServiceFactory
>
()
)
const
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
uno
::
XComponentContext
>&
context
)
throw
(
::
com
::
sun
::
star
::
uno
::
Exception
);
static
void
SetCommonStorageEncryptionData
(
...
...
comphelper/source/misc/storagehelper.cxx
Dosyayı görüntüle @
fcd990f2
...
...
@@ -19,8 +19,9 @@
#include <com/sun/star/embed/ElementModes.hpp>
#include <com/sun/star/embed/XEncryptionProtectedSource2.hpp>
#include <com/sun/star/embed/XStorage.hpp>
#include <com/sun/star/embed/XTransactedObject.hpp>
#include <com/sun/star/
ucb/XSimpleFileAccess
.hpp>
#include <com/sun/star/
lang/XSingleServiceFactory
.hpp>
#include <com/sun/star/ucb/SimpleFileAccess.hpp>
#include <com/sun/star/beans/XPropertySet.hpp>
#include <com/sun/star/beans/PropertyValue.hpp>
...
...
@@ -35,7 +36,6 @@
#include <ucbhelper/content.hxx>
#include <comphelper/componentcontext.hxx>
#include <comphelper/fileformat.h>
#include <comphelper/processfactory.hxx>
#include <comphelper/documentconstants.hxx>
...
...
@@ -224,20 +224,10 @@ void OStorageHelper::CopyInputToOutput(
// ----------------------------------------------------------------------
uno
::
Reference
<
io
::
XInputStream
>
OStorageHelper
::
GetInputStreamFromURL
(
const
::
rtl
::
OUString
&
aURL
,
const
uno
::
Reference
<
lang
::
XMultiServiceFactory
>&
xSF
)
const
uno
::
Reference
<
uno
::
XComponentContext
>&
context
)
throw
(
uno
::
Exception
)
{
uno
::
Reference
<
lang
::
XMultiServiceFactory
>
xFactory
=
xSF
.
is
()
?
xSF
:
::
comphelper
::
getProcessServiceFactory
();
if
(
!
xFactory
.
is
()
)
throw
uno
::
RuntimeException
();
uno
::
Reference
<
ucb
::
XSimpleFileAccess2
>
xTempAccess
(
ucb
::
SimpleFileAccess
::
create
(
comphelper
::
ComponentContext
(
xFactory
).
getUNOContext
())
);
if
(
!
xTempAccess
.
is
()
)
throw
uno
::
RuntimeException
();
uno
::
Reference
<
io
::
XInputStream
>
xInputStream
=
xTempAccess
->
openFileRead
(
aURL
);
uno
::
Reference
<
io
::
XInputStream
>
xInputStream
=
ucb
::
SimpleFileAccess
::
create
(
context
)
->
openFileRead
(
aURL
);
if
(
!
xInputStream
.
is
()
)
throw
uno
::
RuntimeException
();
...
...
extensions/source/nsplugin/source/so_instance.cxx
Dosyayı görüntüle @
fcd990f2
...
...
@@ -241,11 +241,6 @@ sal_Bool SoPluginInstance::LoadDocument(NSP_HWND hParent)
Reference
<
beans
::
XPropertySet
>
xFactoryProperties
(
mxRemoteMSF
,
uno
::
UNO_QUERY
);
Reference
<
uno
::
XComponentContext
>
xContext
(
xFactoryProperties
->
getPropertyValue
(
"DefaultContext"
),
UNO_QUERY
);
Reference
<
ucb
::
XSimpleFileAccess2
>
xSimpleFileAccess
(
ucb
::
SimpleFileAccess
::
create
(
xContext
)
);
if
(
!
xSimpleFileAccess
.
is
())
{
debug_fprintf
(
NSP_LOG_APPEND
,
"can not create SimpleFileAccess to load URL
\n
"
);
return
sal_False
;
}
Reference
<
io
::
XInputStream
>
xInputStream
=
xSimpleFileAccess
->
openFileRead
(
m_sURL
);
if
(
!
xInputStream
.
is
())
...
...
package/source/zipapi/XUnbufferedStream.cxx
Dosyayı görüntüle @
fcd990f2
...
...
@@ -32,13 +32,6 @@
#include <osl/mutex.hxx>
#if 0
// for debugging purposes here
#include <com/sun/star/ucb/SimpleFileAccess.hpp>
#include <comphelper/componentcontext.hxx>
using namespace ::com::sun::star;
#endif
using
namespace
::
com
::
sun
::
star
;
using
namespace
com
::
sun
::
star
::
packages
::
zip
::
ZipConstants
;
using
namespace
com
::
sun
::
star
::
io
;
...
...
@@ -299,21 +292,6 @@ sal_Int32 SAL_CALL XUnbufferedStream::readBytes( Sequence< sal_Int8 >& aData, sa
if
(
!
m_xCipherContext
.
is
()
&&
!
mbWrappedRaw
)
maCRC
.
update
(
aData
);
#if 0
// for debugging purposes here
if ( mbWrappedRaw )
{
if ( 0 )
{
uno::Reference< uno::XComponentContext > xContext = comphelper::getProcessComponentContext();
uno::Reference< ucb::XSimpleFileAccess2 > xAccess( SimpleFileAccess::create(xContext) );
uno::Reference< io::XOutputStream > xOut = xAccess->openFileWrite(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "file:///d:/777/Encrypted/picture") ) );
xOut->writeBytes( aData );
xOut->closeOutput();
}
}
#endif
if
(
mnZipSize
+
maHeader
.
getLength
()
==
mnMyCurrent
&&
maCRC
.
getValue
()
!=
maEntry
.
nCrc
)
throw
ZipIOException
(
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
"The stream seems to be broken!"
)
),
Reference
<
XInterface
>
()
);
...
...
sd/source/filter/html/buttonset.cxx
Dosyayı görüntüle @
fcd990f2
...
...
@@ -26,10 +26,13 @@
*
************************************************************************/
#include "sal/config.h"
#include <com/sun/star/embed/ElementModes.hpp>
#include <com/sun/star/embed/XStorage.hpp>
#include <com/sun/star/graphic/GraphicProvider.hpp>
#include <com/sun/star/graphic/XGraphicProvider.hpp>
#include <com/sun/star/io/XStream.hpp>
#include <osl/file.hxx>
#include <comphelper/storagehelper.hxx>
...
...
sfx2/source/doc/objstor.cxx
Dosyayı görüntüle @
fcd990f2
...
...
@@ -17,6 +17,10 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
#include "sal/config.h"
#include <cassert>
#include <vcl/msgbox.hxx>
#include <svl/eitem.hxx>
#include <svl/stritem.hxx>
...
...
@@ -241,10 +245,9 @@ sal_Bool SfxObjectShell::PutURLContentsToVersionStream_Impl(
throw
RuntimeException
();
uno
::
Reference
<
io
::
XInputStream
>
xTmpInStream
=
::
comphelper
::
OStorageHelper
::
GetInputStreamFromURL
(
aURL
);
DBG_ASSERT
(
xTmpInStream
.
is
(),
"The method must create the stream or throw an exception!
\n
"
);
if
(
!
xTmpInStream
.
is
()
)
throw
uno
::
RuntimeException
();
::
comphelper
::
OStorageHelper
::
GetInputStreamFromURL
(
aURL
,
comphelper
::
getProcessComponentContext
()
);
assert
(
xTmpInStream
.
is
()
);
xTrunc
->
truncate
();
::
comphelper
::
OStorageHelper
::
CopyInputToOutput
(
xTmpInStream
,
xOutStream
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment