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
546fa9f3
Kaydet (Commit)
546fa9f3
authored
Haz 04, 2013
tarafından
Noel Grandin
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
fdo#46808, Convert XMultiServiceFactory in svl module
Change-Id: Ia51d748af3b29a6021e6f5307a60d87f17917f24
üst
8c799984
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
28 additions
and
31 deletions
+28
-31
fsfactory.cxx
svl/source/fsstor/fsfactory.cxx
+3
-3
fsstorage.cxx
svl/source/fsstor/fsstorage.cxx
+12
-16
fsstorage.hxx
svl/source/fsstor/fsstorage.hxx
+1
-1
fsfactory.hxx
svl/source/inc/fsfactory.hxx
+5
-4
supservs.cxx
svl/source/numbers/supservs.cxx
+3
-3
supservs.hxx
svl/source/numbers/supservs.hxx
+2
-2
passwordcontainer.cxx
svl/source/passwordcontainer/passwordcontainer.cxx
+2
-2
No files found.
svl/source/fsstor/fsfactory.cxx
Dosyayı görüntüle @
546fa9f3
...
@@ -55,7 +55,7 @@ OUString SAL_CALL FSStorageFactory::impl_staticGetImplementationName()
...
@@ -55,7 +55,7 @@ OUString SAL_CALL FSStorageFactory::impl_staticGetImplementationName()
uno
::
Reference
<
uno
::
XInterface
>
SAL_CALL
FSStorageFactory
::
impl_staticCreateSelfInstance
(
uno
::
Reference
<
uno
::
XInterface
>
SAL_CALL
FSStorageFactory
::
impl_staticCreateSelfInstance
(
const
uno
::
Reference
<
lang
::
XMultiServiceFactory
>&
xServiceManager
)
const
uno
::
Reference
<
lang
::
XMultiServiceFactory
>&
xServiceManager
)
{
{
return
uno
::
Reference
<
uno
::
XInterface
>
(
*
new
FSStorageFactory
(
xServiceManager
)
);
return
uno
::
Reference
<
uno
::
XInterface
>
(
*
new
FSStorageFactory
(
comphelper
::
getComponentContext
(
xServiceManager
)
)
);
}
}
//-------------------------------------------------------------------------
//-------------------------------------------------------------------------
...
@@ -78,7 +78,7 @@ uno::Reference< uno::XInterface > SAL_CALL FSStorageFactory::createInstance()
...
@@ -78,7 +78,7 @@ uno::Reference< uno::XInterface > SAL_CALL FSStorageFactory::createInstance()
static_cast
<
OWeakObject
*
>
(
static_cast
<
OWeakObject
*
>
(
new
FSStorage
(
aResultContent
,
new
FSStorage
(
aResultContent
,
embed
::
ElementModes
::
READWRITE
,
embed
::
ElementModes
::
READWRITE
,
m_x
Factory
)
),
m_x
Context
)
),
uno
::
UNO_QUERY
);
uno
::
UNO_QUERY
);
}
}
...
@@ -160,7 +160,7 @@ uno::Reference< uno::XInterface > SAL_CALL FSStorageFactory::createInstanceWithA
...
@@ -160,7 +160,7 @@ uno::Reference< uno::XInterface > SAL_CALL FSStorageFactory::createInstanceWithA
return
uno
::
Reference
<
uno
::
XInterface
>
(
return
uno
::
Reference
<
uno
::
XInterface
>
(
static_cast
<
OWeakObject
*
>
(
new
FSStorage
(
aResultContent
,
static_cast
<
OWeakObject
*
>
(
new
FSStorage
(
aResultContent
,
nStorageMode
,
nStorageMode
,
m_x
Factory
)
),
m_x
Context
)
),
uno
::
UNO_QUERY
);
uno
::
UNO_QUERY
);
}
}
...
...
svl/source/fsstor/fsstorage.cxx
Dosyayı görüntüle @
546fa9f3
...
@@ -96,27 +96,27 @@ struct FSStorage_Impl
...
@@ -96,27 +96,27 @@ struct FSStorage_Impl
::
cppu
::
OInterfaceContainerHelper
*
m_pListenersContainer
;
// list of listeners
::
cppu
::
OInterfaceContainerHelper
*
m_pListenersContainer
;
// list of listeners
::
cppu
::
OTypeCollection
*
m_pTypeCollection
;
::
cppu
::
OTypeCollection
*
m_pTypeCollection
;
uno
::
Reference
<
lang
::
XMultiServiceFactory
>
m_xFactory
;
uno
::
Reference
<
uno
::
XComponentContext
>
m_xContext
;
FSStorage_Impl
(
const
OUString
&
aURL
,
sal_Int32
nMode
,
uno
::
Reference
<
lang
::
XMultiServiceFactory
>
xFactory
)
FSStorage_Impl
(
const
OUString
&
aURL
,
sal_Int32
nMode
,
uno
::
Reference
<
uno
::
XComponentContext
>
xContext
)
:
m_aURL
(
aURL
)
:
m_aURL
(
aURL
)
,
m_pContent
(
NULL
)
,
m_pContent
(
NULL
)
,
m_nMode
(
nMode
)
,
m_nMode
(
nMode
)
,
m_pListenersContainer
(
NULL
)
,
m_pListenersContainer
(
NULL
)
,
m_pTypeCollection
(
NULL
)
,
m_pTypeCollection
(
NULL
)
,
m_x
Factory
(
xFactory
)
,
m_x
Context
(
xContext
)
{
{
OSL_ENSURE
(
!
m_aURL
.
isEmpty
(),
"The URL must not be empty"
);
OSL_ENSURE
(
!
m_aURL
.
isEmpty
(),
"The URL must not be empty"
);
}
}
FSStorage_Impl
(
const
::
ucbhelper
::
Content
&
aContent
,
sal_Int32
nMode
,
uno
::
Reference
<
lang
::
XMultiServiceFactory
>
xFactory
)
FSStorage_Impl
(
const
::
ucbhelper
::
Content
&
aContent
,
sal_Int32
nMode
,
uno
::
Reference
<
uno
::
XComponentContext
>
xContext
)
:
m_aURL
(
aContent
.
getURL
()
)
:
m_aURL
(
aContent
.
getURL
()
)
,
m_pContent
(
new
::
ucbhelper
::
Content
(
aContent
)
)
,
m_pContent
(
new
::
ucbhelper
::
Content
(
aContent
)
)
,
m_nMode
(
nMode
)
,
m_nMode
(
nMode
)
,
m_pListenersContainer
(
NULL
)
,
m_pListenersContainer
(
NULL
)
,
m_pTypeCollection
(
NULL
)
,
m_pTypeCollection
(
NULL
)
,
m_x
Factory
(
xFactory
)
,
m_x
Context
(
xContext
)
{
{
OSL_ENSURE
(
!
m_aURL
.
isEmpty
(),
"The URL must not be empty"
);
OSL_ENSURE
(
!
m_aURL
.
isEmpty
(),
"The URL must not be empty"
);
}
}
...
@@ -143,11 +143,11 @@ FSStorage_Impl::~FSStorage_Impl()
...
@@ -143,11 +143,11 @@ FSStorage_Impl::~FSStorage_Impl()
//-----------------------------------------------
//-----------------------------------------------
FSStorage
::
FSStorage
(
const
::
ucbhelper
::
Content
&
aContent
,
FSStorage
::
FSStorage
(
const
::
ucbhelper
::
Content
&
aContent
,
sal_Int32
nMode
,
sal_Int32
nMode
,
uno
::
Reference
<
lang
::
XMultiServiceFactory
>
xFactory
)
uno
::
Reference
<
uno
::
XComponentContext
>
xContext
)
:
m_pImpl
(
new
FSStorage_Impl
(
aContent
,
nMode
,
x
Factory
)
)
:
m_pImpl
(
new
FSStorage_Impl
(
aContent
,
nMode
,
x
Context
)
)
{
{
// TODO: use properties
// TODO: use properties
if
(
!
x
Factory
.
is
()
)
if
(
!
x
Context
.
is
()
)
throw
uno
::
RuntimeException
();
throw
uno
::
RuntimeException
();
GetContent
();
GetContent
();
...
@@ -473,8 +473,7 @@ uno::Reference< io::XStream > SAL_CALL FSStorage::openStreamElement(
...
@@ -473,8 +473,7 @@ uno::Reference< io::XStream > SAL_CALL FSStorage::openStreamElement(
if
(
isLocalFile_Impl
(
aFileURL
.
GetMainURL
(
INetURLObject
::
NO_DECODE
)
)
)
if
(
isLocalFile_Impl
(
aFileURL
.
GetMainURL
(
INetURLObject
::
NO_DECODE
)
)
)
{
{
uno
::
Reference
<
ucb
::
XSimpleFileAccess3
>
xSimpleFileAccess
(
uno
::
Reference
<
ucb
::
XSimpleFileAccess3
>
xSimpleFileAccess
(
ucb
::
SimpleFileAccess
::
create
(
ucb
::
SimpleFileAccess
::
create
(
m_pImpl
->
m_xContext
)
);
comphelper
::
getComponentContext
(
m_pImpl
->
m_xFactory
)
)
);
xResult
=
xSimpleFileAccess
->
openFileReadWrite
(
aFileURL
.
GetMainURL
(
INetURLObject
::
NO_DECODE
)
);
xResult
=
xSimpleFileAccess
->
openFileReadWrite
(
aFileURL
.
GetMainURL
(
INetURLObject
::
NO_DECODE
)
);
}
}
else
else
...
@@ -620,7 +619,7 @@ uno::Reference< embed::XStorage > SAL_CALL FSStorage::openStorageElement(
...
@@ -620,7 +619,7 @@ uno::Reference< embed::XStorage > SAL_CALL FSStorage::openStorageElement(
xResult
=
uno
::
Reference
<
embed
::
XStorage
>
(
xResult
=
uno
::
Reference
<
embed
::
XStorage
>
(
static_cast
<
OWeakObject
*
>
(
new
FSStorage
(
aResultContent
,
static_cast
<
OWeakObject
*
>
(
new
FSStorage
(
aResultContent
,
nStorageMode
,
nStorageMode
,
m_pImpl
->
m_x
Factory
)
),
m_pImpl
->
m_x
Context
)
),
uno
::
UNO_QUERY
);
uno
::
UNO_QUERY
);
}
}
catch
(
embed
::
InvalidStorageException
&
)
catch
(
embed
::
InvalidStorageException
&
)
...
@@ -682,9 +681,7 @@ uno::Reference< io::XStream > SAL_CALL FSStorage::cloneStreamElement( const OUSt
...
@@ -682,9 +681,7 @@ uno::Reference< io::XStream > SAL_CALL FSStorage::cloneStreamElement( const OUSt
::
ucbhelper
::
Content
aResultContent
(
aFileURL
.
GetMainURL
(
INetURLObject
::
NO_DECODE
),
xDummyEnv
,
comphelper
::
getProcessComponentContext
()
);
::
ucbhelper
::
Content
aResultContent
(
aFileURL
.
GetMainURL
(
INetURLObject
::
NO_DECODE
),
xDummyEnv
,
comphelper
::
getProcessComponentContext
()
);
uno
::
Reference
<
io
::
XInputStream
>
xInStream
=
aResultContent
.
openStream
();
uno
::
Reference
<
io
::
XInputStream
>
xInStream
=
aResultContent
.
openStream
();
xTempResult
=
uno
::
Reference
<
io
::
XStream
>
(
xTempResult
=
io
::
TempFile
::
create
(
m_pImpl
->
m_xContext
);
io
::
TempFile
::
create
(
comphelper
::
getComponentContext
(
m_pImpl
->
m_xFactory
)),
uno
::
UNO_QUERY_THROW
);
uno
::
Reference
<
io
::
XOutputStream
>
xTempOut
=
xTempResult
->
getOutputStream
();
uno
::
Reference
<
io
::
XOutputStream
>
xTempOut
=
xTempResult
->
getOutputStream
();
uno
::
Reference
<
io
::
XInputStream
>
xTempIn
=
xTempResult
->
getInputStream
();
uno
::
Reference
<
io
::
XInputStream
>
xTempIn
=
xTempResult
->
getInputStream
();
...
@@ -1463,8 +1460,7 @@ uno::Reference< embed::XExtendedStorageStream > SAL_CALL FSStorage::openStreamEl
...
@@ -1463,8 +1460,7 @@ uno::Reference< embed::XExtendedStorageStream > SAL_CALL FSStorage::openStreamEl
if
(
isLocalFile_Impl
(
aFileURL
.
GetMainURL
(
INetURLObject
::
NO_DECODE
)
)
)
if
(
isLocalFile_Impl
(
aFileURL
.
GetMainURL
(
INetURLObject
::
NO_DECODE
)
)
)
{
{
uno
::
Reference
<
ucb
::
XSimpleFileAccess3
>
xSimpleFileAccess
(
uno
::
Reference
<
ucb
::
XSimpleFileAccess3
>
xSimpleFileAccess
(
ucb
::
SimpleFileAccess
::
create
(
ucb
::
SimpleFileAccess
::
create
(
m_pImpl
->
m_xContext
)
);
comphelper
::
getComponentContext
(
m_pImpl
->
m_xFactory
)
)
);
uno
::
Reference
<
io
::
XStream
>
xStream
=
uno
::
Reference
<
io
::
XStream
>
xStream
=
xSimpleFileAccess
->
openFileReadWrite
(
aFileURL
.
GetMainURL
(
INetURLObject
::
NO_DECODE
)
);
xSimpleFileAccess
->
openFileReadWrite
(
aFileURL
.
GetMainURL
(
INetURLObject
::
NO_DECODE
)
);
...
...
svl/source/fsstor/fsstorage.hxx
Dosyayı görüntüle @
546fa9f3
...
@@ -51,7 +51,7 @@ public:
...
@@ -51,7 +51,7 @@ public:
FSStorage
(
const
::
ucbhelper
::
Content
&
aContent
,
FSStorage
(
const
::
ucbhelper
::
Content
&
aContent
,
sal_Int32
nMode
,
sal_Int32
nMode
,
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
lang
::
XMultiServiceFactory
>
xFactory
);
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
uno
::
XComponentContext
>
xContext
);
virtual
~
FSStorage
();
virtual
~
FSStorage
();
...
...
svl/source/inc/fsfactory.hxx
Dosyayı görüntüle @
546fa9f3
...
@@ -22,18 +22,19 @@
...
@@ -22,18 +22,19 @@
#include <com/sun/star/lang/XSingleServiceFactory.hpp>
#include <com/sun/star/lang/XSingleServiceFactory.hpp>
#include <com/sun/star/lang/XServiceInfo.hpp>
#include <com/sun/star/lang/XServiceInfo.hpp>
#include <com/sun/star/uno/XComponentContext.hpp>
#include <cppuhelper/implbase2.hxx>
#include <cppuhelper/implbase2.hxx>
class
FSStorageFactory
:
public
::
cppu
::
WeakImplHelper2
<
::
com
::
sun
::
star
::
lang
::
XSingleServiceFactory
,
class
FSStorageFactory
:
public
::
cppu
::
WeakImplHelper2
<
::
com
::
sun
::
star
::
lang
::
XSingleServiceFactory
,
::
com
::
sun
::
star
::
lang
::
XServiceInfo
>
::
com
::
sun
::
star
::
lang
::
XServiceInfo
>
{
{
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
lang
::
XMultiServiceFactory
>
m_xFactory
;
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
uno
::
XComponentContext
>
m_xContext
;
public
:
public
:
FSStorageFactory
(
const
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
lang
::
XMultiServiceFactory
>&
xFactory
)
FSStorageFactory
(
const
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
uno
::
XComponentContext
>&
xContext
)
:
m_x
Factory
(
xFactory
)
:
m_x
Context
(
xContext
)
{
{
OSL_ENSURE
(
x
Factory
.
is
(),
"No service manager is provided!
\n
"
);
OSL_ENSURE
(
x
Context
.
is
(),
"No service manager is provided!
\n
"
);
}
}
static
::
com
::
sun
::
star
::
uno
::
Sequence
<
OUString
>
SAL_CALL
static
::
com
::
sun
::
star
::
uno
::
Sequence
<
OUString
>
SAL_CALL
...
...
svl/source/numbers/supservs.cxx
Dosyayı görüntüle @
546fa9f3
...
@@ -39,11 +39,11 @@ using namespace ::utl;
...
@@ -39,11 +39,11 @@ using namespace ::utl;
//-------------------------------------------------------------------------
//-------------------------------------------------------------------------
Reference
<
XInterface
>
SAL_CALL
SvNumberFormatsSupplierServiceObject_CreateInstance
(
const
Reference
<
XMultiServiceFactory
>&
_rxFactory
)
Reference
<
XInterface
>
SAL_CALL
SvNumberFormatsSupplierServiceObject_CreateInstance
(
const
Reference
<
XMultiServiceFactory
>&
_rxFactory
)
{
{
return
static_cast
<
::
cppu
::
OWeakObject
*
>
(
new
SvNumberFormatsSupplierServiceObject
(
_rxFactory
));
return
static_cast
<
::
cppu
::
OWeakObject
*
>
(
new
SvNumberFormatsSupplierServiceObject
(
comphelper
::
getComponentContext
(
_rxFactory
)
));
}
}
//-------------------------------------------------------------------------
//-------------------------------------------------------------------------
SvNumberFormatsSupplierServiceObject
::
SvNumberFormatsSupplierServiceObject
(
const
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
lang
::
XMultiServiceFactory
>&
_rxORB
)
SvNumberFormatsSupplierServiceObject
::
SvNumberFormatsSupplierServiceObject
(
const
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
uno
::
XComponentContext
>&
_rxORB
)
:
m_pOwnFormatter
(
NULL
)
:
m_pOwnFormatter
(
NULL
)
,
m_xORB
(
_rxORB
)
,
m_xORB
(
_rxORB
)
{
{
...
@@ -111,7 +111,7 @@ void SAL_CALL SvNumberFormatsSupplierServiceObject::initialize( const Sequence<
...
@@ -111,7 +111,7 @@ void SAL_CALL SvNumberFormatsSupplierServiceObject::initialize( const Sequence<
#endif
#endif
}
}
m_pOwnFormatter
=
new
SvNumberFormatter
(
comphelper
::
getComponentContext
(
m_xORB
)
,
eNewFormatterLanguage
);
m_pOwnFormatter
=
new
SvNumberFormatter
(
m_xORB
,
eNewFormatterLanguage
);
m_pOwnFormatter
->
SetEvalDateFormat
(
NF_EVALDATEFORMAT_FORMAT_INTL
);
m_pOwnFormatter
->
SetEvalDateFormat
(
NF_EVALDATEFORMAT_FORMAT_INTL
);
SetNumberFormatter
(
m_pOwnFormatter
);
SetNumberFormatter
(
m_pOwnFormatter
);
}
}
...
...
svl/source/numbers/supservs.hxx
Dosyayı görüntüle @
546fa9f3
...
@@ -47,11 +47,11 @@ class SvNumberFormatsSupplierServiceObject
...
@@ -47,11 +47,11 @@ class SvNumberFormatsSupplierServiceObject
protected
:
protected
:
SvNumberFormatter
*
m_pOwnFormatter
;
SvNumberFormatter
*
m_pOwnFormatter
;
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
lang
::
XMultiServiceFactory
>
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
uno
::
XComponentContext
>
m_xORB
;
m_xORB
;
public
:
public
:
SvNumberFormatsSupplierServiceObject
(
const
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
lang
::
XMultiServiceFactory
>&
_rxORB
);
SvNumberFormatsSupplierServiceObject
(
const
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
uno
::
XComponentContext
>&
_rxORB
);
~
SvNumberFormatsSupplierServiceObject
();
~
SvNumberFormatsSupplierServiceObject
();
// XInterface
// XInterface
...
...
svl/source/passwordcontainer/passwordcontainer.cxx
Dosyayı görüntüle @
546fa9f3
...
@@ -444,7 +444,7 @@ PasswordContainer::~PasswordContainer()
...
@@ -444,7 +444,7 @@ PasswordContainer::~PasswordContainer()
if
(
mComponent
.
is
()
)
if
(
mComponent
.
is
()
)
{
{
mComponent
->
removeEventListener
(
this
);
mComponent
->
removeEventListener
(
this
);
mComponent
=
Reference
<
XComponent
>
();
mComponent
.
clear
();
}
}
}
}
...
@@ -463,7 +463,7 @@ void SAL_CALL PasswordContainer::disposing( const EventObject& ) throw(RuntimeEx
...
@@ -463,7 +463,7 @@ void SAL_CALL PasswordContainer::disposing( const EventObject& ) throw(RuntimeEx
if
(
mComponent
.
is
()
)
if
(
mComponent
.
is
()
)
{
{
//mComponent->removeEventListener(this);
//mComponent->removeEventListener(this);
mComponent
=
Reference
<
XComponent
>
();
mComponent
.
clear
();
}
}
}
}
...
...
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