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
5ced1a6e
Kaydet (Commit)
5ced1a6e
authored
Kas 04, 2015
tarafından
Noel Grandin
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
use uno::Reference::set method instead of assignment
Change-Id: I1c7240fe2e2b5eb825f028ca7502e5ba8793046b
üst
8f93d4a1
Hide whitespace changes
Inline
Side-by-side
Showing
18 changed files
with
90 additions
and
103 deletions
+90
-103
ohierarchyholder.cxx
package/source/xstor/ohierarchyholder.cxx
+1
-1
oseekinstream.cxx
package/source/xstor/oseekinstream.cxx
+2
-2
owriteablestream.cxx
package/source/xstor/owriteablestream.cxx
+28
-34
switchpersistencestream.cxx
package/source/xstor/switchpersistencestream.cxx
+3
-6
xstorage.cxx
package/source/xstor/xstorage.cxx
+26
-30
ByteGrabber.cxx
package/source/zipapi/ByteGrabber.cxx
+1
-1
ZipFile.cxx
package/source/zipapi/ZipFile.cxx
+1
-1
ZipPackage.cxx
package/source/zippackage/ZipPackage.cxx
+4
-4
ZipPackageStream.cxx
package/source/zippackage/ZipPackageStream.cxx
+7
-7
wrapstreamforshare.cxx
package/source/zippackage/wrapstreamforshare.cxx
+3
-3
zipfileaccess.cxx
package/source/zippackage/zipfileaccess.cxx
+3
-3
Function.cxx
reportdesign/source/core/api/Function.cxx
+1
-1
ReportDefinition.cxx
reportdesign/source/core/api/ReportDefinition.cxx
+4
-4
FixedTextColor.cxx
reportdesign/source/ui/report/FixedTextColor.cxx
+1
-1
FormattedFieldBeautifier.cxx
reportdesign/source/ui/report/FormattedFieldBeautifier.cxx
+1
-1
sax_expat.cxx
sax/source/expatwrap/sax_expat.cxx
+1
-1
saxdemo.cxx
sax/test/saxdemo.cxx
+2
-2
testcomponent.cxx
sax/test/testcomponent.cxx
+1
-1
No files found.
package/source/xstor/ohierarchyholder.cxx
Dosyayı görüntüle @
5ced1a6e
...
...
@@ -253,7 +253,7 @@ void OHierarchyElement_Impl::TestForClosing()
m_rParent
->
RemoveElement
(
this
);
}
m_xOwnStorage
=
uno
::
Reference
<
embed
::
XStorage
>
();
m_xOwnStorage
.
clear
();
}
}
}
...
...
package/source/xstor/oseekinstream.cxx
Dosyayı görüntüle @
5ced1a6e
...
...
@@ -33,7 +33,7 @@ OInputSeekStream::OInputSeekStream( OWriteStream_Impl& pImpl,
sal_Int32
nStorageType
)
:
OInputCompStream
(
pImpl
,
xStream
,
aProps
,
nStorageType
)
{
m_xSeekable
=
uno
::
Reference
<
io
::
XSeekable
>
(
m_xStream
,
uno
::
UNO_QUERY
);
m_xSeekable
.
set
(
m_xStream
,
uno
::
UNO_QUERY
);
OSL_ENSURE
(
m_xSeekable
.
is
(),
"No seeking support!
\n
"
);
}
...
...
@@ -42,7 +42,7 @@ OInputSeekStream::OInputSeekStream( uno::Reference < io::XInputStream > xStream,
sal_Int32
nStorageType
)
:
OInputCompStream
(
xStream
,
aProps
,
nStorageType
)
{
m_xSeekable
=
uno
::
Reference
<
io
::
XSeekable
>
(
m_xStream
,
uno
::
UNO_QUERY
);
m_xSeekable
.
set
(
m_xStream
,
uno
::
UNO_QUERY
);
OSL_ENSURE
(
m_xSeekable
.
is
(),
"No seeking support!
\n
"
);
}
...
...
package/source/xstor/owriteablestream.cxx
Dosyayı görüntüle @
5ced1a6e
...
...
@@ -323,8 +323,8 @@ void OWriteStream_Impl::CleanCacheStream()
catch
(
const
uno
::
Exception
&
)
{}
m_xCacheStream
=
uno
::
Reference
<
io
::
XStream
>
();
m_xCacheSeek
=
uno
::
Reference
<
io
::
XSeekable
>
();
m_xCacheStream
.
clear
();
m_xCacheSeek
.
clear
();
}
}
...
...
@@ -528,7 +528,7 @@ OUString OWriteStream_Impl::GetFilledTempFileIfNo( const uno::Reference< io::XIn
// the current position of the original stream should be still OK, copy further
::
comphelper
::
OStorageHelper
::
CopyInputToOutput
(
xStream
,
xTempOutStream
);
xTempOutStream
->
closeOutput
();
xTempOutStream
=
uno
::
Reference
<
io
::
XOutputStream
>
();
xTempOutStream
.
clear
();
}
else
throw
io
::
IOException
();
// TODO:
...
...
@@ -614,7 +614,7 @@ OUString OWriteStream_Impl::FillTempGetFileName()
// the current position of the original stream should be still OK, copy further
::
comphelper
::
OStorageHelper
::
CopyInputToOutput
(
xOrigStream
,
xTempOutStream
);
xTempOutStream
->
closeOutput
();
xTempOutStream
=
uno
::
Reference
<
io
::
XOutputStream
>
();
xTempOutStream
.
clear
();
}
else
throw
io
::
IOException
();
// TODO:
...
...
@@ -819,14 +819,12 @@ void OWriteStream_Impl::Commit()
uno
::
Reference
<
io
::
XInputStream
>
xInStream
(
m_xCacheStream
->
getInputStream
(),
uno
::
UNO_SET_THROW
);
xNewPackageStream
=
uno
::
Reference
<
packages
::
XDataSinkEncrSupport
>
(
m_xPackage
->
createInstanceWithArguments
(
aSeq
),
uno
::
UNO_QUERY_THROW
);
xNewPackageStream
.
set
(
m_xPackage
->
createInstanceWithArguments
(
aSeq
),
uno
::
UNO_QUERY_THROW
);
xNewPackageStream
->
setDataStream
(
xInStream
);
m_xCacheStream
=
uno
::
Reference
<
io
::
XStream
>
();
m_xCacheSeek
=
uno
::
Reference
<
io
::
XSeekable
>
();
m_xCacheStream
.
clear
();
m_xCacheSeek
.
clear
();
}
else
if
(
!
m_aTempURL
.
isEmpty
()
)
...
...
@@ -846,9 +844,7 @@ void OWriteStream_Impl::Commit()
if
(
!
xInStream
.
is
()
)
throw
io
::
IOException
();
xNewPackageStream
=
uno
::
Reference
<
packages
::
XDataSinkEncrSupport
>
(
m_xPackage
->
createInstanceWithArguments
(
aSeq
),
uno
::
UNO_QUERY_THROW
);
xNewPackageStream
.
set
(
m_xPackage
->
createInstanceWithArguments
(
aSeq
),
uno
::
UNO_QUERY_THROW
);
// TODO/NEW: Let the temporary file be removed after commit
xNewPackageStream
->
setDataStream
(
xInStream
);
...
...
@@ -919,8 +915,8 @@ void OWriteStream_Impl::Revert()
if
(
m_xCacheStream
.
is
()
)
{
m_xCacheStream
=
uno
::
Reference
<
io
::
XStream
>
();
m_xCacheSeek
=
uno
::
Reference
<
io
::
XSeekable
>
();
m_xCacheStream
.
clear
();
m_xCacheSeek
.
clear
();
}
if
(
!
m_aTempURL
.
isEmpty
()
)
...
...
@@ -940,7 +936,7 @@ void OWriteStream_Impl::Revert()
if
(
m_nStorageType
==
embed
::
StorageFormats
::
OFOPXML
)
{
// currently the relations storage is changed only on commit
m_xNewRelInfoStream
=
uno
::
Reference
<
io
::
XInputStream
>
();
m_xNewRelInfoStream
.
clear
();
m_aNewRelInfo
=
uno
::
Sequence
<
uno
::
Sequence
<
beans
::
StringPair
>
>
();
if
(
m_xOrigRelInfoStream
.
is
()
)
{
...
...
@@ -1039,7 +1035,7 @@ void OWriteStream_Impl::ReadRelInfoIfNecessary()
// in case of success the stream must be thrown away, that means that the OrigRelInfo is initialized
// the reason for this is that the original stream might not be seekable ( at the same time the new
// provided stream must be seekable ), so it must be read only once
m_xOrigRelInfoStream
=
uno
::
Reference
<
io
::
XInputStream
>
();
m_xOrigRelInfoStream
.
clear
();
m_nRelInfoStatus
=
RELINFO_READ
;
}
catch
(
const
uno
::
Exception
&
rException
)
...
...
@@ -1446,9 +1442,7 @@ void OWriteStream_Impl::CreateReadonlyCopyBasedOnData( const uno::Reference< io:
{
uno
::
Reference
<
io
::
XStream
>
xTempFile
;
if
(
!
xTargetStream
.
is
()
)
xTempFile
=
uno
::
Reference
<
io
::
XStream
>
(
io
::
TempFile
::
create
(
m_xContext
),
uno
::
UNO_QUERY
);
xTempFile
.
set
(
io
::
TempFile
::
create
(
m_xContext
),
uno
::
UNO_QUERY
);
else
xTempFile
=
xTargetStream
;
...
...
@@ -1472,7 +1466,7 @@ void OWriteStream_Impl::CreateReadonlyCopyBasedOnData( const uno::Reference< io:
// TODO: remember last state of m_bUseCommonEncryption
if
(
!
xTargetStream
.
is
()
)
xTargetStream
=
uno
::
Reference
<
io
::
XStream
>
(
xTargetStream
.
set
(
static_cast
<
::
cppu
::
OWeakObject
*
>
(
new
OInputSeekStream
(
xInStream
,
InsertOwnProps
(
aProps
,
m_bUseCommonEncryption
),
m_nStorageType
)
),
uno
::
UNO_QUERY_THROW
);
...
...
@@ -1663,7 +1657,7 @@ void OWriteStream_Impl::CommitStreamRelInfo( const uno::Reference< embed::XStora
else
{
// the information is already parsed and the stream is stored, no need in temporary stream any more
m_xNewRelInfoStream
=
uno
::
Reference
<
io
::
XInputStream
>
();
m_xNewRelInfoStream
.
clear
();
m_nRelInfoStatus
=
RELINFO_READ
;
}
}
...
...
@@ -1673,7 +1667,7 @@ void OWriteStream_Impl::CommitStreamRelInfo( const uno::Reference< embed::XStora
m_aOrigRelInfo
=
m_aNewRelInfo
;
m_bOrigRelInfoBroken
=
false
;
m_aNewRelInfo
=
uno
::
Sequence
<
uno
::
Sequence
<
beans
::
StringPair
>
>
();
m_xNewRelInfoStream
=
uno
::
Reference
<
io
::
XInputStream
>
();
m_xNewRelInfoStream
.
clear
();
}
else
{
...
...
@@ -1721,7 +1715,7 @@ OWriteStream::OWriteStream( OWriteStream_Impl* pImpl, uno::Reference< io::XStrea
{
m_xInStream
=
xStream
->
getInputStream
();
m_xOutStream
=
xStream
->
getOutputStream
();
m_xSeekable
=
uno
::
Reference
<
io
::
XSeekable
>
(
xStream
,
uno
::
UNO_QUERY
);
m_xSeekable
.
set
(
xStream
,
uno
::
UNO_QUERY
);
OSL_ENSURE
(
m_xInStream
.
is
()
&&
m_xOutStream
.
is
()
&&
m_xSeekable
.
is
(),
"Stream implementation is incomplete!
\n
"
);
}
}
...
...
@@ -1751,9 +1745,9 @@ void OWriteStream::DeInit()
if
(
m_xSeekable
.
is
()
)
m_nInitPosition
=
m_xSeekable
->
getPosition
();
m_xInStream
=
uno
::
Reference
<
io
::
XInputStream
>
();
m_xOutStream
=
uno
::
Reference
<
io
::
XOutputStream
>
();
m_xSeekable
=
uno
::
Reference
<
io
::
XSeekable
>
();
m_xInStream
.
clear
();
m_xOutStream
.
clear
();
m_xSeekable
.
clear
();
m_bInitOnDemand
=
true
;
}
...
...
@@ -2155,7 +2149,7 @@ void SAL_CALL OWriteStream::closeInput( )
// since it can not be reopened until output part is closed, it will be closed with output part.
m_bInStreamDisconnected
=
true
;
// m_xInStream->closeInput();
// m_xInStream
= uno::Reference< io::XInputStream >
();
// m_xInStream
.clear
();
if
(
!
m_xOutStream
.
is
()
)
dispose
();
...
...
@@ -2306,7 +2300,7 @@ void OWriteStream::CloseOutput_Impl()
// all the checks must be done in calling method
m_xOutStream
->
closeOutput
();
m_xOutStream
=
uno
::
Reference
<
io
::
XOutputStream
>
();
m_xOutStream
.
clear
();
if
(
!
m_bInitOnDemand
)
{
...
...
@@ -2460,10 +2454,10 @@ void SAL_CALL OWriteStream::dispose()
if
(
m_xInStream
.
is
()
)
{
m_xInStream
->
closeInput
();
m_xInStream
=
uno
::
Reference
<
io
::
XInputStream
>
();
m_xInStream
.
clear
();
}
m_xSeekable
=
uno
::
Reference
<
io
::
XSeekable
>
();
m_xSeekable
.
clear
();
m_pImpl
->
m_pAntiImpl
=
NULL
;
...
...
@@ -2853,7 +2847,7 @@ void SAL_CALL OWriteStream::insertRelationshipByID( const OUString& sID, const
throw
container
::
ElementExistException
();
// TODO
m_pImpl
->
m_aNewRelInfo
=
aSeq
;
m_pImpl
->
m_xNewRelInfoStream
=
uno
::
Reference
<
io
::
XInputStream
>
();
m_pImpl
->
m_xNewRelInfoStream
.
clear
();
m_pImpl
->
m_nRelInfoStatus
=
RELINFO_CHANGED
;
}
...
...
@@ -2885,7 +2879,7 @@ void SAL_CALL OWriteStream::removeRelationshipByID( const OUString& sID )
aSeq
.
realloc
(
nLength
-
1
);
m_pImpl
->
m_aNewRelInfo
=
aSeq
;
m_pImpl
->
m_xNewRelInfoStream
=
uno
::
Reference
<
io
::
XInputStream
>
();
m_pImpl
->
m_xNewRelInfoStream
.
clear
();
m_pImpl
->
m_nRelInfoStatus
=
RELINFO_CHANGED
;
// TODO/LATER: in future the unification of the ID could be checked
...
...
@@ -2976,7 +2970,7 @@ void SAL_CALL OWriteStream::insertRelationships( const uno::Sequence< uno::Sequ
aResultSeq
.
realloc
(
nResultInd
);
m_pImpl
->
m_aNewRelInfo
=
aResultSeq
;
m_pImpl
->
m_xNewRelInfoStream
=
uno
::
Reference
<
io
::
XInputStream
>
();
m_pImpl
->
m_xNewRelInfoStream
.
clear
();
m_pImpl
->
m_nRelInfoStatus
=
RELINFO_CHANGED
;
}
...
...
@@ -2996,7 +2990,7 @@ void SAL_CALL OWriteStream::clearRelationships()
throw
uno
::
RuntimeException
();
m_pImpl
->
m_aNewRelInfo
.
realloc
(
0
);
m_pImpl
->
m_xNewRelInfoStream
=
uno
::
Reference
<
io
::
XInputStream
>
();
m_pImpl
->
m_xNewRelInfoStream
.
clear
();
m_pImpl
->
m_nRelInfoStatus
=
RELINFO_CHANGED
;
}
...
...
package/source/xstor/switchpersistencestream.cxx
Dosyayı görüntüle @
5ced1a6e
...
...
@@ -162,16 +162,13 @@ void SwitchablePersistenceStream::CopyAndSwitchPersistenceTo( const uno::Referen
if
(
!
xTargetStream
.
is
()
)
{
xTargetStream
=
uno
::
Reference
<
io
::
XStream
>
(
io
::
TempFile
::
create
(
m_xContext
),
uno
::
UNO_QUERY_THROW
);
xTargetSeek
=
uno
::
Reference
<
io
::
XSeekable
>
(
xTargetStream
,
uno
::
UNO_QUERY_THROW
);
xTargetStream
.
set
(
io
::
TempFile
::
create
(
m_xContext
),
uno
::
UNO_QUERY_THROW
);
xTargetSeek
.
set
(
xTargetStream
,
uno
::
UNO_QUERY_THROW
);
}
else
{
// the provided stream must be empty
xTargetSeek
=
uno
::
Reference
<
io
::
XSeekable
>
(
xTargetStream
,
uno
::
UNO_QUERY_THROW
);
xTargetSeek
.
set
(
xTargetStream
,
uno
::
UNO_QUERY_THROW
);
if
(
xTargetSeek
->
getLength
()
)
throw
io
::
IOException
();
}
...
...
package/source/xstor/xstorage.cxx
Dosyayı görüntüle @
5ced1a6e
...
...
@@ -344,8 +344,8 @@ OStorage_Impl::~OStorage_Impl()
m_pRelStorElement
=
NULL
;
}
m_xPackageFolder
=
uno
::
Reference
<
container
::
XNameContainer
>
();
m_xPackage
=
uno
::
Reference
<
lang
::
XSingleServiceFactory
>
();
m_xPackageFolder
.
clear
();
m_xPackage
.
clear
();
OUString
aPropertyName
=
"URL"
;
for
(
sal_Int32
aInd
=
0
;
aInd
<
m_xProperties
.
getLength
();
++
aInd
)
...
...
@@ -358,7 +358,7 @@ OStorage_Impl::~OStorage_Impl()
if
(
m_xInputStream
.
is
()
)
{
m_xInputStream
->
closeInput
();
m_xInputStream
=
uno
::
Reference
<
io
::
XInputStream
>
();
m_xInputStream
.
clear
();
}
if
(
m_xStream
.
is
()
)
...
...
@@ -371,7 +371,7 @@ OStorage_Impl::~OStorage_Impl()
if
(
xOutStr
.
is
()
)
xOutStr
->
closeOutput
();
m_xStream
=
uno
::
Reference
<
io
::
XStream
>
();
m_xStream
.
clear
();
}
}
catch
(
const
uno
::
Exception
&
rException
)
...
...
@@ -496,10 +496,9 @@ void OStorage_Impl::OpenOwnPackage()
aArguments
[
nArgNum
-
1
]
<<=
aNamedValue
;
}
m_xPackage
=
uno
::
Reference
<
lang
::
XSingleServiceFactory
>
(
GetComponentContext
()
->
getServiceManager
()
->
createInstanceWithArgumentsAndContext
(
"com.sun.star.packages.comp.ZipPackage"
,
aArguments
,
GetComponentContext
()),
uno
::
UNO_QUERY
);
m_xPackage
.
set
(
GetComponentContext
()
->
getServiceManager
()
->
createInstanceWithArgumentsAndContext
(
"com.sun.star.packages.comp.ZipPackage"
,
aArguments
,
GetComponentContext
()),
uno
::
UNO_QUERY
);
}
uno
::
Reference
<
container
::
XHierarchicalNameAccess
>
xHNameAccess
(
m_xPackage
,
uno
::
UNO_QUERY
);
...
...
@@ -670,7 +669,7 @@ void OStorage_Impl::ReadContents()
if
(
(
m_nStorageMode
&
embed
::
ElementModes
::
TRUNCATE
)
==
embed
::
ElementModes
::
TRUNCATE
)
{
// if a storage is truncated the relations information should be cleaned
m_xNewRelInfoStream
=
uno
::
Reference
<
io
::
XInputStream
>
();
m_xNewRelInfoStream
.
clear
();
m_aRelInfo
=
uno
::
Sequence
<
uno
::
Sequence
<
beans
::
StringPair
>
>
();
m_nRelInfoStatus
=
RELINFO_CHANGED
;
}
...
...
@@ -1054,9 +1053,8 @@ void OStorage_Impl::Commit()
uno
::
Sequence
<
uno
::
Any
>
aSeq
(
1
);
aSeq
[
0
]
<<=
sal_True
;
xNewPackageFolder
=
uno
::
Reference
<
container
::
XNameContainer
>
(
m_xPackage
->
createInstanceWithArguments
(
aSeq
),
uno
::
UNO_QUERY
);
xNewPackageFolder
.
set
(
m_xPackage
->
createInstanceWithArguments
(
aSeq
),
uno
::
UNO_QUERY
);
}
else
xNewPackageFolder
=
m_xPackageFolder
;
...
...
@@ -1255,8 +1253,8 @@ void OStorage_Impl::Commit()
embed
::
UseBackupException
aException
;
if
(
r
.
TargetException
>>=
aException
)
{
m_xStream
=
uno
::
Reference
<
io
::
XStream
>
();
m_xInputStream
=
uno
::
Reference
<
io
::
XInputStream
>
();
m_xStream
.
clear
();
m_xInputStream
.
clear
();
throw
aException
;
}
...
...
@@ -1330,7 +1328,7 @@ void OStorage_Impl::Revert()
if
(
m_nStorageType
==
embed
::
StorageFormats
::
OFOPXML
)
{
// currently the relations storage is changed only on commit
m_xNewRelInfoStream
=
uno
::
Reference
<
io
::
XInputStream
>
();
m_xNewRelInfoStream
.
clear
();
m_aRelInfo
=
uno
::
Sequence
<
uno
::
Sequence
<
beans
::
StringPair
>
>
();
m_nRelInfoStatus
=
RELINFO_NO_INIT
;
}
...
...
@@ -1724,7 +1722,7 @@ void OStorage_Impl::CreateRelStorage()
throw
uno
::
RuntimeException
(
THROW_WHERE
);
OStorage
*
pResultStorage
=
new
OStorage
(
m_pRelStorElement
->
m_pStorage
,
false
);
m_xRelStorage
=
uno
::
Reference
<
embed
::
XStorage
>
(
static_cast
<
embed
::
XStorage
*>
(
pResultStorage
)
);
m_xRelStorage
.
set
(
static_cast
<
embed
::
XStorage
*>
(
pResultStorage
)
);
}
}
...
...
@@ -1838,7 +1836,7 @@ void OStorage_Impl::CommitRelInfo( const uno::Reference< container::XNameContain
"MediaType"
,
uno
::
makeAny
(
OUString
(
"application/vnd.openxmlformats-package.relationships+xml"
)
)
);
m_xNewRelInfoStream
=
uno
::
Reference
<
io
::
XInputStream
>
();
m_xNewRelInfoStream
.
clear
();
if
(
m_nRelInfoStatus
==
RELINFO_CHANGED_STREAM
)
{
m_aRelInfo
=
uno
::
Sequence
<
uno
::
Sequence
<
beans
::
StringPair
>
>
();
...
...
@@ -1866,7 +1864,7 @@ void OStorage_Impl::CommitRelInfo( const uno::Reference< container::XNameContain
// the empty relations storage should not be created
delete
m_pRelStorElement
;
m_pRelStorElement
=
NULL
;
m_xRelStorage
=
uno
::
Reference
<
embed
::
XStorage
>
();
m_xRelStorage
.
clear
();
}
else
if
(
m_pRelStorElement
&&
m_pRelStorElement
->
m_pStorage
&&
xNewPackageFolder
.
is
()
)
m_pRelStorElement
->
m_pStorage
->
InsertIntoPackageFolder
(
aRelsStorName
,
xNewPackageFolder
);
...
...
@@ -2578,7 +2576,7 @@ uno::Reference< embed::XStorage > SAL_CALL OStorage::openStorageElement(
bool
bReadOnlyWrap
=
(
(
nStorageMode
&
embed
::
ElementModes
::
WRITE
)
!=
embed
::
ElementModes
::
WRITE
);
OStorage
*
pResultStorage
=
new
OStorage
(
pElement
->
m_pStorage
,
bReadOnlyWrap
);
xResult
=
uno
::
Reference
<
embed
::
XStorage
>
(
static_cast
<
embed
::
XStorage
*>
(
pResultStorage
)
);
xResult
.
set
(
static_cast
<
embed
::
XStorage
*>
(
pResultStorage
)
);
if
(
bReadOnlyWrap
)
{
...
...
@@ -4807,7 +4805,7 @@ void SAL_CALL OStorage::setPropertyValue( const OUString& aPropertyName, const u
{
if
(
aValue
>>=
m_pImpl
->
m_aRelInfo
)
{
m_pImpl
->
m_xNewRelInfoStream
=
uno
::
Reference
<
io
::
XInputStream
>
();
m_pImpl
->
m_xNewRelInfoStream
.
clear
();
m_pImpl
->
m_nRelInfoStatus
=
RELINFO_CHANGED
;
m_pImpl
->
m_bBroadcastModified
=
true
;
m_pImpl
->
m_bIsModified
=
true
;
...
...
@@ -5247,7 +5245,7 @@ void SAL_CALL OStorage::insertRelationshipByID( const OUString& sID, const uno:
throw
container
::
ElementExistException
(
THROW_WHERE
);
m_pImpl
->
m_aRelInfo
=
aSeq
;
m_pImpl
->
m_xNewRelInfoStream
=
uno
::
Reference
<
io
::
XInputStream
>
();
m_pImpl
->
m_xNewRelInfoStream
.
clear
();
m_pImpl
->
m_nRelInfoStatus
=
RELINFO_CHANGED
;
}
...
...
@@ -5279,7 +5277,7 @@ void SAL_CALL OStorage::removeRelationshipByID( const OUString& sID )
aSeq
.
realloc
(
nLength
-
1
);
m_pImpl
->
m_aRelInfo
=
aSeq
;
m_pImpl
->
m_xNewRelInfoStream
=
uno
::
Reference
<
io
::
XInputStream
>
();
m_pImpl
->
m_xNewRelInfoStream
.
clear
();
m_pImpl
->
m_nRelInfoStatus
=
RELINFO_CHANGED
;
// TODO/LATER: in future the unification of the ID could be checked
...
...
@@ -5370,7 +5368,7 @@ void SAL_CALL OStorage::insertRelationships( const uno::Sequence< uno::Sequence
aResultSeq
.
realloc
(
nResultInd
);
m_pImpl
->
m_aRelInfo
=
aResultSeq
;
m_pImpl
->
m_xNewRelInfoStream
=
uno
::
Reference
<
io
::
XInputStream
>
();
m_pImpl
->
m_xNewRelInfoStream
.
clear
();
m_pImpl
->
m_nRelInfoStatus
=
RELINFO_CHANGED
;
}
...
...
@@ -5390,7 +5388,7 @@ void SAL_CALL OStorage::clearRelationships()
throw
uno
::
RuntimeException
(
THROW_WHERE
);
m_pImpl
->
m_aRelInfo
.
realloc
(
0
);
m_pImpl
->
m_xNewRelInfoStream
=
uno
::
Reference
<
io
::
XInputStream
>
();
m_pImpl
->
m_xNewRelInfoStream
.
clear
();
m_pImpl
->
m_nRelInfoStatus
=
RELINFO_CHANGED
;
}
...
...
@@ -5972,9 +5970,8 @@ uno::Reference< embed::XExtendedStorageStream > SAL_CALL OStorage::openStreamEle
SotElement_Impl
*
pElement
=
OpenStreamElement_Impl
(
aStreamPath
,
nOpenMode
,
false
);
assert
(
pElement
&&
pElement
->
m_pStream
&&
"In case element can not be created an exception must be thrown!"
);
xResult
=
uno
::
Reference
<
embed
::
XExtendedStorageStream
>
(
pElement
->
m_pStream
->
GetStream
(
nOpenMode
,
true
),
uno
::
UNO_QUERY_THROW
);
xResult
.
set
(
pElement
->
m_pStream
->
GetStream
(
nOpenMode
,
true
),
uno
::
UNO_QUERY_THROW
);
}
catch
(
const
container
::
NoSuchElementException
&
)
{
...
...
@@ -6088,9 +6085,8 @@ uno::Reference< embed::XExtendedStorageStream > SAL_CALL OStorage::openEncrypted
SotElement_Impl
*
pElement
=
OpenStreamElement_Impl
(
aStreamPath
,
nOpenMode
,
true
);
OSL_ENSURE
(
pElement
&&
pElement
->
m_pStream
,
"In case element can not be created an exception must be thrown!"
);
xResult
=
uno
::
Reference
<
embed
::
XExtendedStorageStream
>
(
pElement
->
m_pStream
->
GetStream
(
nOpenMode
,
aEncryptionData
,
true
),
uno
::
UNO_QUERY_THROW
);
xResult
.
set
(
pElement
->
m_pStream
->
GetStream
(
nOpenMode
,
aEncryptionData
,
true
),
uno
::
UNO_QUERY_THROW
);
}
else
{
...
...
package/source/zipapi/ByteGrabber.cxx
Dosyayı görüntüle @
5ced1a6e
...
...
@@ -49,7 +49,7 @@ void ByteGrabber::setInputStream (uno::Reference < io::XInputStream > xNewStream
{
::
osl
::
MutexGuard
aGuard
(
m_aMutex
);
xStream
=
xNewStream
;
xSeek
=
uno
::
Reference
<
io
::
XSeekable
>
(
xNewStream
,
uno
::
UNO_QUERY
);
xSeek
.
set
(
xNewStream
,
uno
::
UNO_QUERY
);
}
// XInputStream chained
...
...
package/source/zipapi/ZipFile.cxx
Dosyayı görüntüle @
5ced1a6e
...
...
@@ -120,7 +120,7 @@ void ZipFile::setInputStream ( uno::Reference < XInputStream > xNewStream )
::
osl
::
MutexGuard
aGuard
(
m_aMutex
);
xStream
=
xNewStream
;
xSeek
=
uno
::
Reference
<
XSeekable
>
(
xStream
,
UNO_QUERY
);
xSeek
.
set
(
xStream
,
UNO_QUERY
);
aGrabber
.
setInputStream
(
xStream
);
}
...
...
package/source/zippackage/ZipPackage.cxx
Dosyayı görüntüle @
5ced1a6e
...
...
@@ -716,7 +716,7 @@ void SAL_CALL ZipPackage::initialize( const uno::Sequence< Any >& aArguments )
{
// the stream must be seekable, if it is not it will be wrapped
m_xContentStream
=
::
comphelper
::
OSeekableInputWrapper
::
CheckSeekableCanWrap
(
m_xContentStream
,
m_xContext
);
m_xContentSeek
=
uno
::
Reference
<
XSeekable
>
(
m_xContentStream
,
UNO_QUERY
);
m_xContentSeek
.
set
(
m_xContentStream
,
UNO_QUERY
);
if
(
!
m_xContentSeek
.
is
()
)
throw
css
::
uno
::
Exception
(
THROW_WHERE
"The package component _requires_ an XSeekable interface!"
,
static_cast
<
::
cppu
::
OWeakObject
*
>
(
this
)
);
...
...
@@ -1473,7 +1473,7 @@ void SAL_CALL ZipPackage::commitChanges()
try
{
aOrigFileStream
=
xSimpleAccess
->
openFileWrite
(
m_aURL
);
xOrigTruncate
=
uno
::
Reference
<
io
::
XTruncate
>
(
aOrigFileStream
,
uno
::
UNO_QUERY_THROW
);
xOrigTruncate
.
set
(
aOrigFileStream
,
uno
::
UNO_QUERY_THROW
);
// after successful truncation the file is already corrupted
xOrigTruncate
->
truncate
();
}
...
...
@@ -1494,7 +1494,7 @@ void SAL_CALL ZipPackage::commitChanges()
aOrigFileStream
->
closeOutput
();
}
catch
(
uno
::
Exception
&
)
{}
aOrigFileStream
=
uno
::
Reference
<
XOutputStream
>
();
aOrigFileStream
.
clear
();
// the original file can already be corrupted
bCanBeCorrupted
=
true
;
}
...
...
@@ -1551,7 +1551,7 @@ void SAL_CALL ZipPackage::commitChanges()
void
ZipPackage
::
DisconnectFromTargetAndThrowException_Impl
(
const
uno
::
Reference
<
io
::
XInputStream
>&
xTempStream
)
{
m_xStream
=
uno
::
Reference
<
io
::
XStream
>
(
xTempStream
,
uno
::
UNO_QUERY
);
m_xStream
.
set
(
xTempStream
,
uno
::
UNO_QUERY
);
if
(
m_xStream
.
is
()
)
m_eMode
=
e_IMode_XStream
;
else
...
...
package/source/zippackage/ZipPackageStream.cxx
Dosyayı görüntüle @
5ced1a6e
...
...
@@ -141,7 +141,7 @@ void ZipPackageStream::CloseOwnStreamIfAny()
if
(
m_xStream
.
is
()
)
{
m_xStream
->
closeInput
();
m_xStream
=
uno
::
Reference
<
io
::
XInputStream
>
();
m_xStream
.
clear
();
m_bHasSeekable
=
false
;
}
}
...
...
@@ -349,12 +349,12 @@ uno::Reference< io::XInputStream > ZipPackageStream::TryToGetRawFromDataStream(
xTempSeek
->
seek
(
0
);
// close raw stream, package stream and folder
xInRaw
=
uno
::
Reference
<
io
::
XInputStream
>
();
xNewPSProps
=
uno
::
Reference
<
XPropertySet
>
();
xNPSTunnel
=
uno
::
Reference
<
XUnoTunnel
>
();
xNewPackStream
=
uno
::
Reference
<
XDataSinkEncrSupport
>
();
xTunnel
=
uno
::
Reference
<
XUnoTunnel
>
();
xRootNameContainer
=
uno
::
Reference
<
container
::
XNameContainer
>
();
xInRaw
.
clear
();
xNewPSProps
.
clear
();
xNPSTunnel
.
clear
();
xNewPackStream
.
clear
();
xTunnel
.
clear
();
xRootNameContainer
.
clear
();
// return the stream representing the first temporary file
return
xTempIn
;
...
...
package/source/zippackage/wrapstreamforshare.cxx
Dosyayı görüntüle @
5ced1a6e
...
...
@@ -35,7 +35,7 @@ WrapStreamForShare::WrapStreamForShare( const uno::Reference< io::XInputStream >
,
m_xInStream
(
xInStream
)
,
m_nCurPos
(
0
)
{
m_xSeekable
=
uno
::
Reference
<
io
::
XSeekable
>
(
m_xInStream
,
uno
::
UNO_QUERY
);
m_xSeekable
.
set
(
m_xInStream
,
uno
::
UNO_QUERY
);
if
(
!
m_rMutexRef
.
is
()
||
!
m_xInStream
.
is
()
||
!
m_xSeekable
.
is
()
)
{
OSL_FAIL
(
"Wrong initialization of wrapping stream!
\n
"
);
...
...
@@ -124,8 +124,8 @@ void SAL_CALL WrapStreamForShare::closeInput()
// the package is the owner so it will close the stream
// m_xInStream->closeInput();
m_xInStream
=
uno
::
Reference
<
io
::
XInputStream
>
();
m_xSeekable
=
uno
::
Reference
<
io
::
XSeekable
>
();
m_xInStream
.
clear
();
m_xSeekable
.
clear
();
}
// XSeekable
...
...
package/source/zippackage/zipfileaccess.cxx
Dosyayı görüntüle @
5ced1a6e
...
...
@@ -194,18 +194,18 @@ void SAL_CALL OZipFileAccess::initialize( const uno::Sequence< uno::Any >& aArgu
{
m_xContentStream
=
xSink
->
getInputStream
();
m_bOwnContent
=
true
;
xSeekable
=
uno
::
Reference
<
io
::
XSeekable
>
(
m_xContentStream
,
uno
::
UNO_QUERY
);
xSeekable
.
set
(
m_xContentStream
,
uno
::
UNO_QUERY
);
}
}
else
if
(
(
aArguments
[
0
]
>>=
xStream
)
)
{
// a writable stream can implement both XStream & XInputStream
m_xContentStream
=
xStream
->
getInputStream
();
xSeekable
=
uno
::
Reference
<
io
::
XSeekable
>
(
xStream
,
uno
::
UNO_QUERY
);
xSeekable
.
set
(
xStream
,
uno
::
UNO_QUERY
);
}
else
if
(
aArguments
[
0
]
>>=
m_xContentStream
)
{
xSeekable
=
uno
::
Reference
<
io
::
XSeekable
>
(
m_xContentStream
,
uno
::
UNO_QUERY
);
xSeekable
.
set
(
m_xContentStream
,
uno
::
UNO_QUERY
);
}
else
throw
lang
::
IllegalArgumentException
(
THROW_WHERE
,
uno
::
Reference
<
uno
::
XInterface
>
(),
1
);
...
...
reportdesign/source/core/api/Function.cxx
Dosyayı görüntüle @
5ced1a6e
...
...
@@ -199,7 +199,7 @@ void SAL_CALL OFunction::setParent( const uno::Reference< uno::XInterface >& Par
m_xParent
=
xFunctions
;
}
else
m_xParent
=
uno
::
WeakReference
<
report
::
XFunctions
>
();
m_xParent
.
clear
();
}
...
...
reportdesign/source/core/api/ReportDefinition.cxx
Dosyayı görüntüle @
5ced1a6e
...
...
@@ -2526,7 +2526,7 @@ uno::Reference< frame::XTitle > OReportDefinition::impl_getTitleHelper_throw()
uno
::
Reference
<
frame
::
XModel
>
xThis
(
static_cast
<
frame
::
XModel
*
>
(
this
),
uno
::
UNO_QUERY_THROW
);
::
framework
::
TitleHelper
*
pHelper
=
new
::
framework
::
TitleHelper
(
m_aProps
->
m_xContext
);
m_pImpl
->
m_xTitleHelper
=
uno
::
Reference
<
frame
::
XTitle
>
(
static_cast
<
::
cppu
::
OWeakObject
*
>
(
pHelper
),
uno
::
UNO_QUERY_THROW
);
m_pImpl
->
m_xTitleHelper
.
set
(
static_cast
<
::
cppu
::
OWeakObject
*
>
(
pHelper
),
uno
::
UNO_QUERY_THROW
);
pHelper
->
setOwner
(
xThis
);
pHelper
->
connectWithUntitledNumbers
(
uno
::
Reference
<
frame
::
XUntitledNumbers
>
(
xDesktop
,
uno
::
UNO_QUERY_THROW
));
}
...
...
@@ -2543,9 +2543,9 @@ uno::Reference< frame::XUntitledNumbers > OReportDefinition::impl_getUntitledHel
if
(
!
m_pImpl
->
m_xNumberedControllers
.
is
())
{
uno
::
Reference
<
frame
::
XModel
>
xThis
(
static_cast
<
frame
::
XModel
*
>
(
this
),
uno
::
UNO_QUERY_THROW
);
::
comphelper
::
NumberedCollection
*
pHelper
=
new
::
comphelper
::
NumberedCollection
();
m_pImpl
->
m_xNumberedControllers
=
uno
::
Reference
<
frame
::
XUntitledNumbers
>
(
static_cast
<
::
cppu
::
OWeakObject
*
>
(
pHelper
),
uno
::
UNO_QUERY_THROW
);
uno
::
Reference
<
frame
::
XModel
>
xThis
(
static_cast
<
frame
::
XModel
*
>
(
this
),
uno
::
UNO_QUERY_THROW
);
::
comphelper
::
NumberedCollection
*
pHelper
=
new
::
comphelper
::
NumberedCollection
();
m_pImpl
->
m_xNumberedControllers
.
set
(
static_cast
<
::
cppu
::
OWeakObject
*
>
(
pHelper
),
uno
::
UNO_QUERY_THROW
);
pHelper
->
setOwner
(
xThis
);
pHelper
->
setUntitledPrefix
(
OUString
(
" : "
));
...
...
reportdesign/source/ui/report/FixedTextColor.cxx
Dosyayı görüntüle @
5ced1a6e
...
...
@@ -190,7 +190,7 @@ namespace rptui
uno
::
Reference
<
awt
::
XVclWindowPeer
>
xVclWindowPeer
;
uno
::
Reference
<
awt
::
XControl
>
xControl
=
getXControl
(
_xComponent
);
xVclWindowPeer
=
uno
::
Reference
<
awt
::
XVclWindowPeer
>
(
xControl
->
getPeer
(),
uno
::
UNO_QUERY
);
xVclWindowPeer
.
set
(
xControl
->
getPeer
(),
uno
::
UNO_QUERY
);
return
xVclWindowPeer
;
}
...
...
reportdesign/source/ui/report/FormattedFieldBeautifier.cxx
Dosyayı görüntüle @
5ced1a6e
...
...
@@ -178,7 +178,7 @@ namespace rptui
OReportSection
&
aOutputDevice
=
pSectionWindow
->
getReportSection
();
// OutputDevice
OSectionView
&
aSdrView
=
aOutputDevice
.
getSectionView
();
// SdrView
uno
::
Reference
<
awt
::
XControl
>
xControl
=
pUnoObj
->
GetUnoControl
(
aSdrView
,
aOutputDevice
);
xVclWindowPeer
=
uno
::
Reference
<
awt
::
XVclWindowPeer
>
(
xControl
->
getPeer
(),
uno
::
UNO_QUERY
);
xVclWindowPeer
.
set
(
xControl
->
getPeer
(),
uno
::
UNO_QUERY
);
}
}
}
...
...
sax/source/expatwrap/sax_expat.cxx
Dosyayı görüntüle @
5ced1a6e
...
...
@@ -371,7 +371,7 @@ SaxExpatParser::SaxExpatParser( )
m_pImpl
=
new
SaxExpatParser_Impl
;
LocatorImpl
*
pLoc
=
new
LocatorImpl
(
m_pImpl
);
m_pImpl
->
rDocumentLocator
=
css
::
uno
::
Reference
<
XLocator
>
(
pLoc
);
m_pImpl
->
rDocumentLocator
.
set
(
pLoc
);
// Performance-improvement; handing out the same object with every call of
// the startElement callback is allowed (see sax-specification):
...
...
sax/test/saxdemo.cxx
Dosyayı görüntüle @
5ced1a6e
...
...
@@ -118,7 +118,7 @@ Reference< XInputStream > createStreamFromFile(
Sequence
<
sal_Int8
>
seqIn
(
nLength
);
fread
(
seqIn
.
getArray
()
,
nLength
,
1
,
f
);
r
=
Reference
<
XInputStream
>
(
new
OInputStream
(
seqIn
)
);
r
.
set
(
new
OInputStream
(
seqIn
)
);
fclose
(
f
);
}
return
r
;
...
...
@@ -500,7 +500,7 @@ int main (int argc, char **argv)
{
// Create registration service
Reference
<
XInterface
>
x
=
xSMgr
->
createInstance
(
"com.sun.star.registry.ImplementationRegistration"
);
xReg
=
Reference
<
XImplementationRegistration
>
(
x
,
UNO_QUERY
);
xReg
.
set
(
x
,
UNO_QUERY
);
}
catch
(
Exception
&
)
{
printf
(
"Couldn't create ImplementationRegistration service
\n
"
);
...
...
sax/test/testcomponent.cxx
Dosyayı görüntüle @
5ced1a6e
...
...
@@ -69,7 +69,7 @@ int main (int argc, char **argv)
{
// Create registration service
Reference
<
XInterface
>
x
=
xSMgr
->
createInstance
(
"com.sun.star.registry.ImplementationRegistration"
);
xReg
=
Reference
<
XImplementationRegistration
>
(
x
,
UNO_QUERY
);
xReg
.
set
(
x
,
UNO_QUERY
);
}
catch
(
const
Exception
&
)
{
...
...
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