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
b807a028
Kaydet (Commit)
b807a028
authored
Tem 02, 2014
tarafından
Stephan Bergmann
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
InteractionSupplyName is a detail of SimpleNameClashResolveRequest
Change-Id: Iecc77b1c4749bd14ce79f1a7f3e98f45fa3abbba
üst
a9fc9f4a
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
132 additions
and
163 deletions
+132
-163
interactionrequest.hxx
include/ucbhelper/interactionrequest.hxx
+0
-54
simplenameclashresolverequest.hxx
include/ucbhelper/simplenameclashresolverequest.hxx
+5
-4
ucbcmds.cxx
ucb/source/core/ucbcmds.cxx
+1
-0
interactionrequest.cxx
ucbhelper/source/provider/interactionrequest.cxx
+0
-104
simplenameclashresolverequest.cxx
ucbhelper/source/provider/simplenameclashresolverequest.cxx
+126
-1
No files found.
include/ucbhelper/interactionrequest.hxx
Dosyayı görüntüle @
b807a028
...
@@ -28,7 +28,6 @@
...
@@ -28,7 +28,6 @@
#include <com/sun/star/task/XInteractionDisapprove.hpp>
#include <com/sun/star/task/XInteractionDisapprove.hpp>
#include <com/sun/star/ucb/XInteractionReplaceExistingData.hpp>
#include <com/sun/star/ucb/XInteractionReplaceExistingData.hpp>
#include <com/sun/star/ucb/XInteractionSupplyAuthentication2.hpp>
#include <com/sun/star/ucb/XInteractionSupplyAuthentication2.hpp>
#include <com/sun/star/ucb/XInteractionSupplyName.hpp>
#include <rtl/ref.hxx>
#include <rtl/ref.hxx>
#include <cppuhelper/weak.hxx>
#include <cppuhelper/weak.hxx>
#include <ucbhelper/ucbhelperdllapi.h>
#include <ucbhelper/ucbhelperdllapi.h>
...
@@ -624,59 +623,6 @@ inline InteractionSupplyAuthentication::InteractionSupplyAuthentication(
...
@@ -624,59 +623,6 @@ inline InteractionSupplyAuthentication::InteractionSupplyAuthentication(
}
}
/**
* This class implements a standard interaction continuation, namely the
* interface XInteractionSupplyName. Instances of this class can be passed
* along with an interaction request to indicate the possibility to
* supply a new name.
*/
class
InteractionSupplyName
:
public
InteractionContinuation
,
public
com
::
sun
::
star
::
lang
::
XTypeProvider
,
public
com
::
sun
::
star
::
ucb
::
XInteractionSupplyName
{
OUString
m_aName
;
public
:
InteractionSupplyName
(
InteractionRequest
*
pRequest
)
:
InteractionContinuation
(
pRequest
)
{}
// XInterface
virtual
com
::
sun
::
star
::
uno
::
Any
SAL_CALL
queryInterface
(
const
com
::
sun
::
star
::
uno
::
Type
&
rType
)
throw
(
com
::
sun
::
star
::
uno
::
RuntimeException
,
std
::
exception
)
SAL_OVERRIDE
;
virtual
void
SAL_CALL
acquire
()
throw
()
SAL_OVERRIDE
;
virtual
void
SAL_CALL
release
()
throw
()
SAL_OVERRIDE
;
// XTypeProvider
virtual
com
::
sun
::
star
::
uno
::
Sequence
<
com
::
sun
::
star
::
uno
::
Type
>
SAL_CALL
getTypes
()
throw
(
com
::
sun
::
star
::
uno
::
RuntimeException
,
std
::
exception
)
SAL_OVERRIDE
;
virtual
com
::
sun
::
star
::
uno
::
Sequence
<
sal_Int8
>
SAL_CALL
getImplementationId
()
throw
(
com
::
sun
::
star
::
uno
::
RuntimeException
,
std
::
exception
)
SAL_OVERRIDE
;
// XInteractionContinuation
virtual
void
SAL_CALL
select
()
throw
(
com
::
sun
::
star
::
uno
::
RuntimeException
,
std
::
exception
)
SAL_OVERRIDE
;
// XInteractionSupplyName
virtual
void
SAL_CALL
setName
(
const
OUString
&
Name
)
throw
(
com
::
sun
::
star
::
uno
::
RuntimeException
,
std
::
exception
)
SAL_OVERRIDE
;
// Non-interface methods.
/**
* This method returns the name that was supplied by the interaction
* handler.
*
* @return the name.
*/
const
OUString
&
getName
()
const
{
return
m_aName
;
}
};
/**
/**
* This class implements a standard interaction continuation, namely the
* This class implements a standard interaction continuation, namely the
* interface XInteractionReplaceExistingData. Instances of this class can be
* interface XInteractionReplaceExistingData. Instances of this class can be
...
...
include/ucbhelper/simplenameclashresolverequest.hxx
Dosyayı görüntüle @
b807a028
...
@@ -26,6 +26,8 @@
...
@@ -26,6 +26,8 @@
namespace
ucbhelper
{
namespace
ucbhelper
{
class
InteractionSupplyName
;
/**
/**
* This class implements a simple name clash resolve interaction request.
* This class implements a simple name clash resolve interaction request.
* Instances can be passed directly to XInteractionHandler::handle(...). Each
* Instances can be passed directly to XInteractionHandler::handle(...). Each
...
@@ -36,12 +38,13 @@ namespace ucbhelper {
...
@@ -36,12 +38,13 @@ namespace ucbhelper {
* @see com::sun::star::ucb::NameClashResolveRequest
* @see com::sun::star::ucb::NameClashResolveRequest
* @see InteractionAbort
* @see InteractionAbort
* @see InteractioneplaceExistingData
* @see InteractioneplaceExistingData
* @see InteractionSupplyName
*/
*/
class
UCBHELPER_DLLPUBLIC
SimpleNameClashResolveRequest
:
public
ucbhelper
::
InteractionRequest
class
UCBHELPER_DLLPUBLIC
SimpleNameClashResolveRequest
:
public
ucbhelper
::
InteractionRequest
{
{
rtl
::
Reference
<
InteractionSupplyName
>
m_xNameSupplier
;
rtl
::
Reference
<
InteractionSupplyName
>
m_xNameSupplier
;
virtual
~
SimpleNameClashResolveRequest
();
public
:
public
:
/**
/**
* Constructor.
* Constructor.
...
@@ -65,9 +68,7 @@ public:
...
@@ -65,9 +68,7 @@ public:
*
*
* @return the new name, if supplied.
* @return the new name, if supplied.
*/
*/
const
OUString
getNewName
()
const
const
OUString
getNewName
()
const
;
{
return
m_xNameSupplier
->
getName
();
}
};
};
}
// namespace ucbhelper
}
// namespace ucbhelper
...
...
ucb/source/core/ucbcmds.cxx
Dosyayı görüntüle @
b807a028
...
@@ -56,6 +56,7 @@
...
@@ -56,6 +56,7 @@
#include <com/sun/star/ucb/XContentAccess.hpp>
#include <com/sun/star/ucb/XContentAccess.hpp>
#include <com/sun/star/ucb/XContentCreator.hpp>
#include <com/sun/star/ucb/XContentCreator.hpp>
#include <com/sun/star/ucb/XDynamicResultSet.hpp>
#include <com/sun/star/ucb/XDynamicResultSet.hpp>
#include <com/sun/star/ucb/XInteractionSupplyName.hpp>
#include <com/sun/star/uno/Any.hxx>
#include <com/sun/star/uno/Any.hxx>
#include <com/sun/star/uno/Sequence.hxx>
#include <com/sun/star/uno/Sequence.hxx>
#include <ucbhelper/cancelcommandexecution.hxx>
#include <ucbhelper/cancelcommandexecution.hxx>
...
...
ucbhelper/source/provider/interactionrequest.cxx
Dosyayı görüntüle @
b807a028
...
@@ -849,110 +849,6 @@ void SAL_CALL InteractionSupplyAuthentication::setUseSystemCredentials(
...
@@ -849,110 +849,6 @@ void SAL_CALL InteractionSupplyAuthentication::setUseSystemCredentials(
// InteractionSupplyName Implementation.
// XInterface methods.
// virtual
void
SAL_CALL
InteractionSupplyName
::
acquire
()
throw
()
{
OWeakObject
::
acquire
();
}
// virtual
void
SAL_CALL
InteractionSupplyName
::
release
()
throw
()
{
OWeakObject
::
release
();
}
// virtual
uno
::
Any
SAL_CALL
InteractionSupplyName
::
queryInterface
(
const
uno
::
Type
&
rType
)
throw
(
uno
::
RuntimeException
,
std
::
exception
)
{
uno
::
Any
aRet
=
cppu
::
queryInterface
(
rType
,
static_cast
<
lang
::
XTypeProvider
*
>
(
this
),
static_cast
<
task
::
XInteractionContinuation
*
>
(
this
),
static_cast
<
ucb
::
XInteractionSupplyName
*
>
(
this
)
);
return
aRet
.
hasValue
()
?
aRet
:
InteractionContinuation
::
queryInterface
(
rType
);
}
// XTypeProvider methods.
// virtual
uno
::
Sequence
<
sal_Int8
>
SAL_CALL
InteractionSupplyName
::
getImplementationId
()
throw
(
uno
::
RuntimeException
,
std
::
exception
)
{
return
css
::
uno
::
Sequence
<
sal_Int8
>
();
}
// virtual
uno
::
Sequence
<
uno
::
Type
>
SAL_CALL
InteractionSupplyName
::
getTypes
()
throw
(
uno
::
RuntimeException
,
std
::
exception
)
{
static
cppu
::
OTypeCollection
*
pCollection
=
0
;
if
(
!
pCollection
)
{
osl
::
Guard
<
osl
::
Mutex
>
aGuard
(
osl
::
Mutex
::
getGlobalMutex
()
);
if
(
!
pCollection
)
{
static
cppu
::
OTypeCollection
collection
(
cppu
::
UnoType
<
lang
::
XTypeProvider
>::
get
(),
cppu
::
UnoType
<
ucb
::
XInteractionSupplyName
>::
get
()
);
pCollection
=
&
collection
;
}
}
return
(
*
pCollection
).
getTypes
();
}
// XInteractionContinuation methods.
// virtual
void
SAL_CALL
InteractionSupplyName
::
select
()
throw
(
uno
::
RuntimeException
,
std
::
exception
)
{
recordSelection
();
}
// XInteractionSupplyName methods.
// virtual
void
SAL_CALL
InteractionSupplyName
::
setName
(
const
OUString
&
Name
)
throw
(
uno
::
RuntimeException
,
std
::
exception
)
{
m_aName
=
Name
;
}
// InteractionReplaceExistingData Implementation.
// InteractionReplaceExistingData Implementation.
...
...
ucbhelper/source/provider/simplenameclashresolverequest.cxx
Dosyayı görüntüle @
b807a028
...
@@ -18,11 +18,129 @@
...
@@ -18,11 +18,129 @@
*/
*/
#include <com/sun/star/ucb/NameClashResolveRequest.hpp>
#include <com/sun/star/ucb/NameClashResolveRequest.hpp>
#include <com/sun/star/ucb/XInteractionSupplyName.hpp>
#include <cppuhelper/typeprovider.hxx>
#include <ucbhelper/simplenameclashresolverequest.hxx>
#include <ucbhelper/simplenameclashresolverequest.hxx>
using
namespace
com
::
sun
::
star
;
using
namespace
com
::
sun
::
star
;
using
namespace
ucbhelper
;
namespace
ucbhelper
{
/**
* This class implements a standard interaction continuation, namely the
* interface XInteractionSupplyName. Instances of this class can be passed
* along with an interaction request to indicate the possibility to
* supply a new name.
*/
class
InteractionSupplyName
:
public
InteractionContinuation
,
public
com
::
sun
::
star
::
lang
::
XTypeProvider
,
public
com
::
sun
::
star
::
ucb
::
XInteractionSupplyName
{
OUString
m_aName
;
public
:
InteractionSupplyName
(
InteractionRequest
*
pRequest
)
:
InteractionContinuation
(
pRequest
)
{}
// XInterface
virtual
com
::
sun
::
star
::
uno
::
Any
SAL_CALL
queryInterface
(
const
com
::
sun
::
star
::
uno
::
Type
&
rType
)
throw
(
com
::
sun
::
star
::
uno
::
RuntimeException
,
std
::
exception
)
SAL_OVERRIDE
;
virtual
void
SAL_CALL
acquire
()
throw
()
SAL_OVERRIDE
;
virtual
void
SAL_CALL
release
()
throw
()
SAL_OVERRIDE
;
// XTypeProvider
virtual
com
::
sun
::
star
::
uno
::
Sequence
<
com
::
sun
::
star
::
uno
::
Type
>
SAL_CALL
getTypes
()
throw
(
com
::
sun
::
star
::
uno
::
RuntimeException
,
std
::
exception
)
SAL_OVERRIDE
;
virtual
com
::
sun
::
star
::
uno
::
Sequence
<
sal_Int8
>
SAL_CALL
getImplementationId
()
throw
(
com
::
sun
::
star
::
uno
::
RuntimeException
,
std
::
exception
)
SAL_OVERRIDE
;
// XInteractionContinuation
virtual
void
SAL_CALL
select
()
throw
(
com
::
sun
::
star
::
uno
::
RuntimeException
,
std
::
exception
)
SAL_OVERRIDE
;
// XInteractionSupplyName
virtual
void
SAL_CALL
setName
(
const
OUString
&
Name
)
throw
(
com
::
sun
::
star
::
uno
::
RuntimeException
,
std
::
exception
)
SAL_OVERRIDE
;
// Non-interface methods.
/**
* This method returns the name that was supplied by the interaction
* handler.
*
* @return the name.
*/
const
OUString
&
getName
()
const
{
return
m_aName
;
}
};
void
SAL_CALL
InteractionSupplyName
::
acquire
()
throw
()
{
OWeakObject
::
acquire
();
}
void
SAL_CALL
InteractionSupplyName
::
release
()
throw
()
{
OWeakObject
::
release
();
}
uno
::
Any
SAL_CALL
InteractionSupplyName
::
queryInterface
(
const
uno
::
Type
&
rType
)
throw
(
uno
::
RuntimeException
,
std
::
exception
)
{
uno
::
Any
aRet
=
cppu
::
queryInterface
(
rType
,
static_cast
<
lang
::
XTypeProvider
*
>
(
this
),
static_cast
<
task
::
XInteractionContinuation
*
>
(
this
),
static_cast
<
ucb
::
XInteractionSupplyName
*
>
(
this
)
);
return
aRet
.
hasValue
()
?
aRet
:
InteractionContinuation
::
queryInterface
(
rType
);
}
uno
::
Sequence
<
sal_Int8
>
SAL_CALL
InteractionSupplyName
::
getImplementationId
()
throw
(
uno
::
RuntimeException
,
std
::
exception
)
{
return
css
::
uno
::
Sequence
<
sal_Int8
>
();
}
uno
::
Sequence
<
uno
::
Type
>
SAL_CALL
InteractionSupplyName
::
getTypes
()
throw
(
uno
::
RuntimeException
,
std
::
exception
)
{
static
cppu
::
OTypeCollection
*
pCollection
=
0
;
if
(
!
pCollection
)
{
osl
::
Guard
<
osl
::
Mutex
>
aGuard
(
osl
::
Mutex
::
getGlobalMutex
()
);
if
(
!
pCollection
)
{
static
cppu
::
OTypeCollection
collection
(
cppu
::
UnoType
<
lang
::
XTypeProvider
>::
get
(),
cppu
::
UnoType
<
ucb
::
XInteractionSupplyName
>::
get
()
);
pCollection
=
&
collection
;
}
}
return
(
*
pCollection
).
getTypes
();
}
void
SAL_CALL
InteractionSupplyName
::
select
()
throw
(
uno
::
RuntimeException
,
std
::
exception
)
{
recordSelection
();
}
void
SAL_CALL
InteractionSupplyName
::
setName
(
const
OUString
&
Name
)
throw
(
uno
::
RuntimeException
,
std
::
exception
)
{
m_aName
=
Name
;
}
SimpleNameClashResolveRequest
::~
SimpleNameClashResolveRequest
()
{}
SimpleNameClashResolveRequest
::
SimpleNameClashResolveRequest
(
SimpleNameClashResolveRequest
::
SimpleNameClashResolveRequest
(
const
OUString
&
rTargetFolderURL
,
const
OUString
&
rTargetFolderURL
,
...
@@ -55,4 +173,11 @@ SimpleNameClashResolveRequest::SimpleNameClashResolveRequest(
...
@@ -55,4 +173,11 @@ SimpleNameClashResolveRequest::SimpleNameClashResolveRequest(
setContinuations
(
aContinuations
);
setContinuations
(
aContinuations
);
}
}
const
OUString
SimpleNameClashResolveRequest
::
getNewName
()
const
{
return
m_xNameSupplier
->
getName
();
}
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
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