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
d527c1df
Kaydet (Commit)
d527c1df
authored
Mar 09, 2012
tarafından
Caolán McNamara
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
callcatcher: update list
üst
fd468f7c
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
24 changed files
with
2 additions
and
1708 deletions
+2
-1708
content.hxx
ucbhelper/inc/ucbhelper/content.hxx
+2
-104
simplecertificatevalidationrequest.hxx
...lper/inc/ucbhelper/simplecertificatevalidationrequest.hxx
+0
-9
content.cxx
ucbhelper/source/client/content.cxx
+0
-165
simplecertificatevalidationrequest.cxx
...er/source/provider/simplecertificatevalidationrequest.cxx
+0
-33
makefile.mk
ucbhelper/workben/myucp/makefile.mk
+0
-89
myucp_content.cxx
ucbhelper/workben/myucp/myucp_content.cxx
+0
-0
myucp_content.hxx
ucbhelper/workben/myucp/myucp_content.hxx
+0
-194
myucp_contentcaps.cxx
ucbhelper/workben/myucp/myucp_contentcaps.cxx
+0
-223
myucp_datasupplier.cxx
ucbhelper/workben/myucp/myucp_datasupplier.cxx
+0
-0
myucp_datasupplier.hxx
ucbhelper/workben/myucp/myucp_datasupplier.hxx
+0
-80
myucp_provider.cxx
ucbhelper/workben/myucp/myucp_provider.cxx
+0
-158
myucp_provider.hxx
ucbhelper/workben/myucp/myucp_provider.hxx
+0
-98
myucp_resultset.cxx
ucbhelper/workben/myucp/myucp_resultset.cxx
+0
-98
myucp_resultset.hxx
ucbhelper/workben/myucp/myucp_resultset.hxx
+0
-65
myucp_services.cxx
ucbhelper/workben/myucp/myucp_services.cxx
+0
-129
document.bmp
ucbhelper/workben/ucbexplorer/bmp/document.bmp
+0
-0
fldclose.bmp
ucbhelper/workben/ucbexplorer/bmp/fldclose.bmp
+0
-0
fldopen.bmp
ucbhelper/workben/ucbexplorer/bmp/fldopen.bmp
+0
-0
link.bmp
ucbhelper/workben/ucbexplorer/bmp/link.bmp
+0
-0
makefile.mk
ucbhelper/workben/ucbexplorer/makefile.mk
+0
-71
ucbexplorer.cxx
ucbhelper/workben/ucbexplorer/ucbexplorer.cxx
+0
-0
ucbexplorer.hrc
ucbhelper/workben/ucbexplorer/ucbexplorer.hrc
+0
-58
ucbexplorer.src
ucbhelper/workben/ucbexplorer/ucbexplorer.src
+0
-131
unusedcode.easy
unusedcode.easy
+0
-3
No files found.
ucbhelper/inc/ucbhelper/content.hxx
Dosyayı görüntüle @
d527c1df
...
...
@@ -321,20 +321,6 @@ public:
throw
(
::
com
::
sun
::
star
::
ucb
::
CommandAbortedException
,
::
com
::
sun
::
star
::
uno
::
RuntimeException
,
::
com
::
sun
::
star
::
uno
::
Exception
);
/**
* This method can be used to read multiple property values.
*
* @param nPropertyHandles is a sequence of handles of properties for
* that the values shall be obtained.
* @return an XRow interface that can be used to obtain the property
* values.
*/
::
com
::
sun
::
star
::
uno
::
Sequence
<
::
com
::
sun
::
star
::
uno
::
Any
>
getPropertyValues
(
const
::
com
::
sun
::
star
::
uno
::
Sequence
<
sal_Int32
>&
nPropertyHandles
)
throw
(
::
com
::
sun
::
star
::
ucb
::
CommandAbortedException
,
::
com
::
sun
::
star
::
uno
::
RuntimeException
,
::
com
::
sun
::
star
::
uno
::
Exception
);
/**
* This method can be used to read multiple property values.
*
...
...
@@ -348,20 +334,7 @@ public:
throw
(
::
com
::
sun
::
star
::
ucb
::
CommandAbortedException
,
::
com
::
sun
::
star
::
uno
::
RuntimeException
,
::
com
::
sun
::
star
::
uno
::
Exception
);
/**
* This method can be used to read multiple property values.
*
* @param nPropertyHandles is a sequence of handles of properties for
* that the values shall be obtained.
* @return an XRow interface that can be used to obtain the property
* values.
*/
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
sdbc
::
XRow
>
getPropertyValuesInterface
(
const
::
com
::
sun
::
star
::
uno
::
Sequence
<
sal_Int32
>&
nPropertyHandles
)
throw
(
::
com
::
sun
::
star
::
ucb
::
CommandAbortedException
,
::
com
::
sun
::
star
::
uno
::
RuntimeException
,
::
com
::
sun
::
star
::
uno
::
Exception
);
/**
* This method can be used to set multiple property values.
*
...
...
@@ -400,44 +373,6 @@ public:
throw
(
::
com
::
sun
::
star
::
ucb
::
CommandAbortedException
,
::
com
::
sun
::
star
::
uno
::
RuntimeException
,
::
com
::
sun
::
star
::
uno
::
Exception
);
/**
* This method can be used to set multiple property values.
*
* @param nPropertyHandles is a sequence of handles of properties for
* that values shall be set.
* @return a sequence of any's which has exactly the same number
* of elements as the number of properties to set. Every
* sequence element contains the status for a property. The
* first sequence elements corresponds to the first element in
* the sequence of property names and so on.
*
* An any containing:
* - No value indicates, that the property value was set
* successfully.
* - com::sun::star::beans::UnknownPropertyException indicates,
* that the property is not known to the content implementation.
* - com::sun::star::beans::IllegalTypeException indicates, that
* the data type of the property value is not acceptable.
* - com::sun::star::lang::IllegalAccessException indicates, that
* the property is constant.
* - com::sun::star::lang::IllegalArgumentException indicates,
* that the property value is not acceptable. For instance,
* setting an empty title may be illegal.
* - Any other execption derived from
* com::sun::star::uno::Exception indicates, that the value was
* not set successfully. For example, this can be a
* com::sun:star::ucb::InteractiveAugmentedIOException
* transporting the error code
* com::sun::star::ucb::IOErrorCode::ACCESS_DENIED.
*/
::
com
::
sun
::
star
::
uno
::
Sequence
<
::
com
::
sun
::
star
::
uno
::
Any
>
setPropertyValues
(
const
::
com
::
sun
::
star
::
uno
::
Sequence
<
sal_Int32
>&
nPropertyHandles
,
const
::
com
::
sun
::
star
::
uno
::
Sequence
<
::
com
::
sun
::
star
::
uno
::
Any
>&
rValues
)
throw
(
::
com
::
sun
::
star
::
ucb
::
CommandAbortedException
,
::
com
::
sun
::
star
::
uno
::
RuntimeException
,
::
com
::
sun
::
star
::
uno
::
Exception
);
//////////////////////////////////////////////////////////////////////
// General command execution.
...
...
@@ -705,44 +640,7 @@ public:
throw
(
::
com
::
sun
::
star
::
ucb
::
CommandAbortedException
,
::
com
::
sun
::
star
::
uno
::
RuntimeException
,
::
com
::
sun
::
star
::
uno
::
Exception
);
/**
* This method creates, initializes and inserts (commits) a new content
* inside this (the target folder) content. For example, it can be used to
* create a new file system file.
* Internally this method does a
* XCommandProcessor::execute( "createNewContent", ... );
* XCommandProcessor::execute( "setPropertyValues", ... );
* XCommandProcessor::execute( "insert", ... ); calling sequence.
*
* @param rContentType is the type for the new UCB content. Each content
* provider implementation may introduce own types for its content
* objects (See queryCreatableContentsInfo()).
* @param nPropertyHandes is a sequence of handles of properties for that
* values are to set at the new content before it will be inserted
* ( commited ).
* The order of the handles must correspond to the order of the
* property values.
* @param rPropertyValues is a sequence of property values that are to
* set at the new content before it will be inserted ( commited ).
* The order of the values must correspond to the order of the
* property handles.
* @param rStream is a stream containing the content data for the new
* content (i.e. the content of a file to create)
* @param rNewContent will be filled by the implementation of this method
* with the new content.
*/
sal_Bool
insertNewContent
(
const
::
rtl
::
OUString
&
rContentType
,
const
::
com
::
sun
::
star
::
uno
::
Sequence
<
sal_Int32
>&
nPropertyHandles
,
const
::
com
::
sun
::
star
::
uno
::
Sequence
<
::
com
::
sun
::
star
::
uno
::
Any
>&
rPropertyValues
,
const
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
io
::
XInputStream
>&
rStream
,
Content
&
rNewContent
)
throw
(
::
com
::
sun
::
star
::
ucb
::
CommandAbortedException
,
::
com
::
sun
::
star
::
uno
::
RuntimeException
,
::
com
::
sun
::
star
::
uno
::
Exception
);
/**
* This method transfers (copies/moves) a content. It creates a new
* resource inside this (the target folder) content.
...
...
ucbhelper/inc/ucbhelper/simplecertificatevalidationrequest.hxx
Dosyayı görüntüle @
d527c1df
...
...
@@ -63,15 +63,6 @@ public:
SimpleCertificateValidationRequest
(
const
sal_Int32
&
lCertificateValidity
,
const
com
::
sun
::
star
::
uno
::
Reference
<
com
::
sun
::
star
::
security
::
XCertificate
>
pCertificate
,
const
rtl
::
OUString
&
hostname
);
/**
* After passing this request to XInteractionHandler::handle, this method
* returns the continuation that was choosen by the interaction handler.
*
* @return the continuation choosen by an interaction handler or
* CONTINUATION_UNKNOWN, if the request was not (yet) handled.
*/
sal_Int32
getResponse
()
const
;
};
}
// namespace ucbhelper
...
...
ucbhelper/source/client/content.cxx
Dosyayı görüntüle @
d527c1df
...
...
@@ -558,27 +558,6 @@ Sequence< Any > Content::getPropertyValues(
return
aValues
;
}
//=========================================================================
Sequence
<
Any
>
Content
::
getPropertyValues
(
const
Sequence
<
sal_Int32
>&
nPropertyHandles
)
throw
(
CommandAbortedException
,
RuntimeException
,
Exception
)
{
Reference
<
XRow
>
xRow
=
getPropertyValuesInterface
(
nPropertyHandles
);
sal_Int32
nCount
=
nPropertyHandles
.
getLength
();
Sequence
<
Any
>
aValues
(
nCount
);
if
(
xRow
.
is
()
)
{
Any
*
pValues
=
aValues
.
getArray
();
for
(
sal_Int32
n
=
0
;
n
<
nCount
;
++
n
)
pValues
[
n
]
=
xRow
->
getObject
(
n
+
1
,
Reference
<
XNameAccess
>
()
);
}
return
aValues
;
}
//=========================================================================
Reference
<
XRow
>
Content
::
getPropertyValuesInterface
(
const
Sequence
<
rtl
::
OUString
>&
rPropertyNames
)
...
...
@@ -612,39 +591,6 @@ Reference< XRow > Content::getPropertyValuesInterface(
return
xRow
;
}
//=========================================================================
Reference
<
XRow
>
Content
::
getPropertyValuesInterface
(
const
Sequence
<
sal_Int32
>&
nPropertyHandles
)
throw
(
CommandAbortedException
,
RuntimeException
,
Exception
)
{
sal_Int32
nCount
=
nPropertyHandles
.
getLength
();
Sequence
<
Property
>
aProps
(
nCount
);
Property
*
pProps
=
aProps
.
getArray
();
const
sal_Int32
*
pHandles
=
nPropertyHandles
.
getConstArray
();
for
(
sal_Int32
n
=
0
;
n
<
nCount
;
++
n
)
{
Property
&
rProp
=
pProps
[
n
];
rProp
.
Name
=
rtl
::
OUString
();
// n/a
rProp
.
Handle
=
pHandles
[
n
];
// rProp.Type =
// rProp.Attributes = ;
}
Command
aCommand
;
aCommand
.
Name
=
rtl
::
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
"getPropertyValues"
));
aCommand
.
Handle
=
-
1
;
// n/a
aCommand
.
Argument
<<=
aProps
;
Any
aResult
=
m_xImpl
->
executeCommand
(
aCommand
);
Reference
<
XRow
>
xRow
;
aResult
>>=
xRow
;
return
xRow
;
}
//=========================================================================
Sequence
<
Any
>
Content
::
setPropertyValues
(
const
Sequence
<
rtl
::
OUString
>&
rPropertyNames
,
...
...
@@ -693,54 +639,6 @@ Sequence< Any > Content::setPropertyValues(
return
aErrors
;
}
//=========================================================================
Sequence
<
Any
>
Content
::
setPropertyValues
(
const
Sequence
<
sal_Int32
>&
nPropertyHandles
,
const
Sequence
<
Any
>&
rValues
)
throw
(
CommandAbortedException
,
RuntimeException
,
Exception
)
{
if
(
nPropertyHandles
.
getLength
()
!=
rValues
.
getLength
()
)
{
ucbhelper
::
cancelCommandExecution
(
makeAny
(
IllegalArgumentException
(
rtl
::
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
"Length of property handles sequence and value "
"sequence are unequal!"
)),
get
(),
-
1
)
),
m_xImpl
->
getEnvironment
()
);
// Unreachable
}
sal_Int32
nCount
=
rValues
.
getLength
();
Sequence
<
PropertyValue
>
aProps
(
nCount
);
PropertyValue
*
pProps
=
aProps
.
getArray
();
const
sal_Int32
*
pHandles
=
nPropertyHandles
.
getConstArray
();
const
Any
*
pValues
=
rValues
.
getConstArray
();
for
(
sal_Int32
n
=
0
;
n
<
nCount
;
++
n
)
{
PropertyValue
&
rProp
=
pProps
[
n
];
rProp
.
Name
=
rtl
::
OUString
();
// n/a
rProp
.
Handle
=
pHandles
[
n
];
rProp
.
Value
=
pValues
[
n
];
// rProp.State = ;
}
Command
aCommand
;
aCommand
.
Name
=
rtl
::
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
"setPropertyValues"
));
aCommand
.
Handle
=
-
1
;
// n/a
aCommand
.
Argument
<<=
aProps
;
Any
aResult
=
m_xImpl
->
executeCommand
(
aCommand
);
Sequence
<
Any
>
aErrors
;
aResult
>>=
aErrors
;
return
aErrors
;
}
//=========================================================================
Any
Content
::
executeCommand
(
const
rtl
::
OUString
&
rCommandName
,
const
Any
&
rCommandArgument
)
...
...
@@ -1148,69 +1046,6 @@ sal_Bool Content::insertNewContent( const rtl::OUString& rContentType,
return
sal_True
;
}
//=========================================================================
sal_Bool
Content
::
insertNewContent
(
const
rtl
::
OUString
&
rContentType
,
const
Sequence
<
sal_Int32
>&
nPropertyHandles
,
const
Sequence
<
Any
>&
rPropertyValues
,
const
Reference
<
XInputStream
>&
rData
,
Content
&
rNewContent
)
throw
(
CommandAbortedException
,
RuntimeException
,
Exception
)
{
if
(
rContentType
.
isEmpty
()
)
return
sal_False
;
// First, try it using "createNewContent" command -> the "new" way.
ContentInfo
aInfo
;
aInfo
.
Type
=
rContentType
;
aInfo
.
Attributes
=
0
;
Command
aCommand
;
aCommand
.
Name
=
rtl
::
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
"createNewContent"
));
aCommand
.
Handle
=
-
1
;
// n/a
aCommand
.
Argument
<<=
aInfo
;
Reference
<
XContent
>
xNew
;
try
{
m_xImpl
->
executeCommand
(
aCommand
)
>>=
xNew
;
}
catch
(
RuntimeException
const
&
)
{
throw
;
}
catch
(
Exception
const
&
)
{
}
if
(
!
xNew
.
is
()
)
{
// Second, try it using XContentCreator interface -> the "old"
// way (not providing the chance to supply an XCommandEnvironment.
Reference
<
XContentCreator
>
xCreator
(
m_xImpl
->
getContent
(),
UNO_QUERY
);
if
(
!
xCreator
.
is
()
)
return
sal_False
;
xNew
=
xCreator
->
createNewContent
(
aInfo
);
if
(
!
xNew
.
is
()
)
return
sal_False
;
}
Content
aNewContent
(
xNew
,
m_xImpl
->
getEnvironment
()
);
aNewContent
.
setPropertyValues
(
nPropertyHandles
,
rPropertyValues
);
aNewContent
.
executeCommand
(
rtl
::
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
"insert"
)),
makeAny
(
InsertCommandArgument
(
rData
.
is
()
?
rData
:
new
EmptyInputStream
,
sal_False
/* ReplaceExisting */
)
)
);
aNewContent
.
m_xImpl
->
inserted
();
rNewContent
=
aNewContent
;
return
sal_True
;
}
//=========================================================================
sal_Bool
Content
::
transferContent
(
const
Content
&
rSourceContent
,
InsertOperation
eOperation
,
...
...
ucbhelper/source/provider/simplecertificatevalidationrequest.cxx
Dosyayı görüntüle @
d527c1df
...
...
@@ -53,37 +53,4 @@ SimpleCertificateValidationRequest::SimpleCertificateValidationRequest( const sa
pCertificate
.
get
();
}
//=========================================================================
sal_Int32
SimpleCertificateValidationRequest
::
getResponse
()
const
{
rtl
::
Reference
<
InteractionContinuation
>
xSelection
=
getSelection
();
if
(
xSelection
.
is
()
)
{
InteractionContinuation
*
pSelection
=
xSelection
.
get
();
uno
::
Reference
<
task
::
XInteractionAbort
>
xAbort
(
pSelection
,
uno
::
UNO_QUERY
);
if
(
xAbort
.
is
()
)
return
1
;
uno
::
Reference
<
task
::
XInteractionRetry
>
xRetry
(
pSelection
,
uno
::
UNO_QUERY
);
if
(
xRetry
.
is
()
)
return
2
;
uno
::
Reference
<
task
::
XInteractionApprove
>
xApprove
(
pSelection
,
uno
::
UNO_QUERY
);
if
(
xApprove
.
is
()
)
return
4
;
uno
::
Reference
<
task
::
XInteractionDisapprove
>
xDisapprove
(
pSelection
,
uno
::
UNO_QUERY
);
if
(
xDisapprove
.
is
()
)
return
8
;
OSL_FAIL
(
"CertificateValidationRequest - Unknown continuation!"
);
}
return
0
;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
ucbhelper/workben/myucp/makefile.mk
deleted
100644 → 0
Dosyayı görüntüle @
fd468f7c
#*************************************************************************
#
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# Copyright 2000, 2010 Oracle and/or its affiliates.
#
# OpenOffice.org - a multi-platform office productivity suite
#
# This file is part of OpenOffice.org.
#
# OpenOffice.org is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License version 3
# only, as published by the Free Software Foundation.
#
# OpenOffice.org is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Lesser General Public License version 3 for more details
# (a copy is included in the LICENSE file that accompanied this code).
#
# You should have received a copy of the GNU Lesser General Public License
# version 3 along with OpenOffice.org. If not, see
# <http://www.openoffice.org/license.html>
# for a copy of the LGPLv3 License.
#
#*************************************************************************
# @@@ UCP Version - Increase, if your UCP libraray becomes incompatible.
UCP_VERSION
=
1
# @@@ Name for your UCP. Will become part of the library name (See below).
UCP_NAME
=
myucp
# @@@ Relative path to project root.
PRJ
=
..
$/
..
# @@@ Name of the project your UCP code recides it.
PRJNAME
=
ucbhelper
TARGET
=
ucp
$(UCP_NAME)$(UCP_VERSION)
.uno
ENABLE_EXCEPTIONS
=
TRUE
USE_DEFFILE
=
TRUE
# --- Settings ---------------------------------------------------------
.INCLUDE
:
settings.mk
.INCLUDE
:
../../version.mk
# --- General -----------------------------------------------------
# no "lib" prefix
DLLPRE
=
# @@@ Adjust template file names. Add own files here.
SLOFILES
=
\
$(SLO)$/
myucp_services.obj
\
$(SLO)$/
myucp_provider.obj
\
$(SLO)$/
myucp_content.obj
\
$(SLO)$/
myucp_contentcaps.obj
\
$(SLO)$/
myucp_resultset.obj
\
$(SLO)$/
myucp_datasupplier.obj
LIB1TARGET
=
$(SLB)$/
_
$(TARGET)
.lib
LIB1OBJFILES
=
$(SLOFILES)
# --- Shared-Library ---------------------------------------------------
SHL1TARGET
=
$(TARGET)
SHL1IMPLIB
=
i
$(TARGET)
SHL1VERSIONMAP
=
$(SOLARENV)
/src/component.map
# @@@ Add additional libs here.
SHL1STDLIBS
=
\
$(CPPUHELPERLIB)
\
$(CPPULIB)
\
$(SALLIB)
\
$(SALHELPERLIB)
\
$(UCBHELPERLIB)
SHL1DEF
=
$(MISC)$/$(SHL1TARGET)
.def
SHL1LIBS
=
$(LIB1TARGET)
DEF1NAME
=
$(SHL1TARGET)
# --- Targets ----------------------------------------------------------
.INCLUDE
:
target.mk
ucbhelper/workben/myucp/myucp_content.cxx
deleted
100644 → 0
Dosyayı görüntüle @
fd468f7c
This diff is collapsed.
Click to expand it.
ucbhelper/workben/myucp/myucp_content.hxx
deleted
100644 → 0
Dosyayı görüntüle @
fd468f7c
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License version 3
* only, as published by the Free Software Foundation.
*
* OpenOffice.org is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License version 3 for more details
* (a copy is included in the LICENSE file that accompanied this code).
*
* You should have received a copy of the GNU Lesser General Public License
* version 3 along with OpenOffice.org. If not, see
* <http://www.openoffice.org/license.html>
* for a copy of the LGPLv3 License.
*
************************************************************************/
// @@@ Adjust multi-include-protection-ifdef.
#ifndef _MYUCP_CONTENT_HXX
#define _MYUCP_CONTENT_HXX
#include <list>
#include "rtl/ref.hxx"
#include "ucbhelper/contenthelper.hxx"
namespace
com
{
namespace
sun
{
namespace
star
{
namespace
beans
{
struct
Property
;
struct
PropertyValue
;
}
}
}
}
namespace
com
{
namespace
sun
{
namespace
star
{
namespace
sdbc
{
class
XRow
;
}
}
}
}
namespace
com
{
namespace
sun
{
namespace
star
{
namespace
io
{
class
XInputStream
;
}
}
}
}
// @@@ Adjust namespace name.
namespace
myucp
{
//=========================================================================
// @@@ Adjust service name.
// UNO service name for the content. Prefix with reversed company domain main.
#define MYUCP_CONTENT_SERVICE_NAME "com.sun.star.ucb.MyContent"
//=========================================================================
struct
ContentProperties
{
::
rtl
::
OUString
aTitle
;
// Title
::
rtl
::
OUString
aContentType
;
// ContentType
sal_Bool
bIsDocument
;
// IsDocument
sal_Bool
bIsFolder
;
// IsFolder
// @@@ Add other properties supported by your content.
ContentProperties
()
:
bIsDocument
(
sal_True
),
bIsFolder
(
sal_False
)
{}
};
//=========================================================================
class
Content
:
public
::
ucbhelper
::
ContentImplHelper
{
ContentProperties
m_aProps
;
private
:
virtual
com
::
sun
::
star
::
uno
::
Sequence
<
com
::
sun
::
star
::
beans
::
Property
>
getProperties
(
const
com
::
sun
::
star
::
uno
::
Reference
<
com
::
sun
::
star
::
ucb
::
XCommandEnvironment
>
&
xEnv
);
virtual
com
::
sun
::
star
::
uno
::
Sequence
<
com
::
sun
::
star
::
ucb
::
CommandInfo
>
getCommands
(
const
com
::
sun
::
star
::
uno
::
Reference
<
com
::
sun
::
star
::
ucb
::
XCommandEnvironment
>
&
xEnv
);
virtual
::
rtl
::
OUString
getParentURL
();
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
sdbc
::
XRow
>
getPropertyValues
(
const
::
com
::
sun
::
star
::
uno
::
Sequence
<
::
com
::
sun
::
star
::
beans
::
Property
>&
rProperties
,
const
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
ucb
::
XCommandEnvironment
>&
xEnv
);
::
com
::
sun
::
star
::
uno
::
Sequence
<
::
com
::
sun
::
star
::
uno
::
Any
>
setPropertyValues
(
const
::
com
::
sun
::
star
::
uno
::
Sequence
<
::
com
::
sun
::
star
::
beans
::
PropertyValue
>&
rValues
,
const
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
ucb
::
XCommandEnvironment
>&
xEnv
);
#define IMPLEMENT_COMMAND_OPEN
#define IMPLEMENT_COMMAND_INSERT
#define IMPLEMENT_COMMAND_DELETE
#ifdef IMPLEMENT_COMMAND_INSERT
typedef
rtl
::
Reference
<
Content
>
ContentRef
;
typedef
std
::
list
<
ContentRef
>
ContentRefList
;
void
queryChildren
(
ContentRefList
&
rChildren
);
// Command "insert"
void
insert
(
const
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
io
::
XInputStream
>
&
xInputStream
,
sal_Bool
bReplaceExisting
,
const
com
::
sun
::
star
::
uno
::
Reference
<
com
::
sun
::
star
::
ucb
::
XCommandEnvironment
>&
Environment
)
throw
(
::
com
::
sun
::
star
::
uno
::
Exception
);
#endif
#ifdef IMPLEMENT_COMMAND_DELETE
// Command "delete"
void
destroy
(
sal_Bool
bDeletePhysical
)
throw
(
::
com
::
sun
::
star
::
uno
::
Exception
);
#endif
public
:
Content
(
const
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
lang
::
XMultiServiceFactory
>&
rxSMgr
,
::
ucbhelper
::
ContentProviderImplHelper
*
pProvider
,
const
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
ucb
::
XContentIdentifier
>&
Identifier
);
virtual
~
Content
();
// XInterface
XINTERFACE_DECL
()
// XTypeProvider
XTYPEPROVIDER_DECL
()
// XServiceInfo
virtual
::
rtl
::
OUString
SAL_CALL
getImplementationName
()
throw
(
::
com
::
sun
::
star
::
uno
::
RuntimeException
);
virtual
::
com
::
sun
::
star
::
uno
::
Sequence
<
::
rtl
::
OUString
>
SAL_CALL
getSupportedServiceNames
()
throw
(
::
com
::
sun
::
star
::
uno
::
RuntimeException
);
// XContent
virtual
rtl
::
OUString
SAL_CALL
getContentType
()
throw
(
com
::
sun
::
star
::
uno
::
RuntimeException
);
// XCommandProcessor
virtual
com
::
sun
::
star
::
uno
::
Any
SAL_CALL
execute
(
const
com
::
sun
::
star
::
ucb
::
Command
&
aCommand
,
sal_Int32
CommandId
,
const
com
::
sun
::
star
::
uno
::
Reference
<
com
::
sun
::
star
::
ucb
::
XCommandEnvironment
>&
Environment
)
throw
(
com
::
sun
::
star
::
uno
::
Exception
,
com
::
sun
::
star
::
ucb
::
CommandAbortedException
,
com
::
sun
::
star
::
uno
::
RuntimeException
);
virtual
void
SAL_CALL
abort
(
sal_Int32
CommandId
)
throw
(
com
::
sun
::
star
::
uno
::
RuntimeException
);
//////////////////////////////////////////////////////////////////////
// Additional interfaces
//////////////////////////////////////////////////////////////////////
// @@@ Add additional interfaces ( like com::sun::star::ucb::XContentCreator ).
//////////////////////////////////////////////////////////////////////
// Non-interface methods.
//////////////////////////////////////////////////////////////////////
// Called from resultset data supplier.
static
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
sdbc
::
XRow
>
getPropertyValues
(
const
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
lang
::
XMultiServiceFactory
>&
rSMgr
,
const
::
com
::
sun
::
star
::
uno
::
Sequence
<
::
com
::
sun
::
star
::
beans
::
Property
>&
rProperties
,
const
ContentProperties
&
rData
,
const
rtl
::
Reference
<
::
ucbhelper
::
ContentProviderImplHelper
>&
rProvider
,
const
::
rtl
::
OUString
&
rContentId
);
};
}
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
ucbhelper/workben/myucp/myucp_contentcaps.cxx
deleted
100644 → 0
Dosyayı görüntüle @
fd468f7c
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License version 3
* only, as published by the Free Software Foundation.
*
* OpenOffice.org is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License version 3 for more details
* (a copy is included in the LICENSE file that accompanied this code).
*
* You should have received a copy of the GNU Lesser General Public License
* version 3 along with OpenOffice.org. If not, see
* <http://www.openoffice.org/license.html>
* for a copy of the LGPLv3 License.
*
************************************************************************/
/**************************************************************************
TODO
**************************************************************************
*************************************************************************/
#include "com/sun/star/beans/Property.hpp"
#include "com/sun/star/beans/PropertyAttribute.hpp"
#include "com/sun/star/beans/PropertyValue.hpp"
#include "com/sun/star/ucb/CommandInfo.hpp"
#include "com/sun/star/uno/Sequence.hxx"
#include "myucp_content.hxx"
#ifdef IMPLEMENT_COMMAND_INSERT
#include "com/sun/star/ucb/InsertCommandArgument.hpp"
#endif
#ifdef IMPLEMENT_COMMAND_OPEN
#include "com/sun/star/ucb/OpenCommandArgument2.hpp"
#endif
using
namespace
com
::
sun
::
star
;
// @@@ Adjust namespace name.
using
namespace
myucp
;
//=========================================================================
//
// Content implementation.
//
//=========================================================================
//=========================================================================
//
// IMPORTENT: If any property data ( name / type / ... ) are changed, then
// Content::getPropertyValues(...) must be adapted too!
//
//=========================================================================
// virtual
uno
::
Sequence
<
beans
::
Property
>
Content
::
getProperties
(
const
uno
::
Reference
<
ucb
::
XCommandEnvironment
>
&
/*xEnv*/
)
{
// @@@ Add additional properties...
// @@@ Note: If your data source supports adding/removing properties,
// you should implement the interface XPropertyContainer
// by yourself and supply your own logic here. The base class
// uses the service "com.sun.star.ucb.Store" to maintain
// Additional Core properties. But using server functionality
// is preferred! In fact you should return a table conatining
// even that dynamicly added properties.
// osl::Guard< osl::Mutex > aGuard( m_aMutex );
//=================================================================
//
// Supported properties
//
//=================================================================
#define PROPERTY_COUNT 4
static
beans
::
Property
aPropertyInfoTable
[]
=
{
///////////////////////////////////////////////////////////////
// Mandatory properties
///////////////////////////////////////////////////////////////
beans
::
Property
(
rtl
::
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
"ContentType"
)
),
-
1
,
getCppuType
(
static_cast
<
const
rtl
::
OUString
*
>
(
0
)
),
beans
::
PropertyAttribute
::
BOUND
|
beans
::
PropertyAttribute
::
READONLY
),
beans
::
Property
(
rtl
::
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
"IsDocument"
)
),
-
1
,
getCppuBooleanType
(),
beans
::
PropertyAttribute
::
BOUND
|
beans
::
PropertyAttribute
::
READONLY
),
beans
::
Property
(
rtl
::
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
"IsFolder"
)
),
-
1
,
getCppuBooleanType
(),
beans
::
PropertyAttribute
::
BOUND
|
beans
::
PropertyAttribute
::
READONLY
),
beans
::
Property
(
rtl
::
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
"Title"
)
),
-
1
,
getCppuType
(
static_cast
<
const
rtl
::
OUString
*
>
(
0
)
),
beans
::
PropertyAttribute
::
BOUND
)
///////////////////////////////////////////////////////////////
// Optional standard properties
///////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////
// New properties
///////////////////////////////////////////////////////////////
};
return
uno
::
Sequence
<
beans
::
Property
>
(
aPropertyInfoTable
,
PROPERTY_COUNT
);
}
//=========================================================================
// virtual
uno
::
Sequence
<
ucb
::
CommandInfo
>
Content
::
getCommands
(
const
uno
::
Reference
<
ucb
::
XCommandEnvironment
>
&
/*xEnv*/
)
{
// @@@ Add additional commands...
// osl::Guard< osl::Mutex > aGuard( m_aMutex );
//=================================================================
//
// Supported commands
//
//=================================================================
sal_uInt32
nCommandCount
=
4
;
#ifdef IMPLEMENT_COMMAND_DELETE
nCommandCount
++
;
#endif
#ifdef IMPLEMENT_COMMAND_INSERT
nCommandCount
++
;
#endif
#ifdef IMPLEMENT_COMMAND_OPEN
nCommandCount
++
;
#endif
static
const
ucb
::
CommandInfo
aCommandInfoTable
[]
=
{
///////////////////////////////////////////////////////////////
// Mandatory commands
///////////////////////////////////////////////////////////////
ucb
::
CommandInfo
(
rtl
::
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
"getCommandInfo"
)
),
-
1
,
getCppuVoidType
()
),
ucb
::
CommandInfo
(
rtl
::
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
"getPropertySetInfo"
)
),
-
1
,
getCppuVoidType
()
),
ucb
::
CommandInfo
(
rtl
::
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
"getPropertyValues"
)
),
-
1
,
getCppuType
(
static_cast
<
uno
::
Sequence
<
beans
::
Property
>
*
>
(
0
)
)
),
ucb
::
CommandInfo
(
rtl
::
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
"setPropertyValues"
)
),
-
1
,
getCppuType
(
static_cast
<
uno
::
Sequence
<
beans
::
PropertyValue
>
*
>
(
0
)
)
)
///////////////////////////////////////////////////////////////
// Optional standard commands
///////////////////////////////////////////////////////////////
#ifdef IMPLEMENT_COMMAND_DELETE
,
ucb
::
CommandInfo
(
rtl
::
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
"delete"
)
),
-
1
,
getCppuBooleanType
()
)
#endif
#ifdef IMPLEMENT_COMMAND_INSERT
,
ucb
::
CommandInfo
(
rtl
::
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
"insert"
)
),
-
1
,
getCppuType
(
static_cast
<
ucb
::
InsertCommandArgument
*
>
(
0
)
)
)
#endif
#ifdef IMPLEMENT_COMMAND_OPEN
,
ucb
::
CommandInfo
(
rtl
::
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
"open"
)
),
-
1
,
getCppuType
(
static_cast
<
ucb
::
OpenCommandArgument2
*
>
(
0
)
)
)
#endif
///////////////////////////////////////////////////////////////
// New commands
///////////////////////////////////////////////////////////////
};
return
uno
::
Sequence
<
ucb
::
CommandInfo
>
(
aCommandInfoTable
,
nCommandCount
);
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
ucbhelper/workben/myucp/myucp_datasupplier.cxx
deleted
100644 → 0
Dosyayı görüntüle @
fd468f7c
This diff is collapsed.
Click to expand it.
ucbhelper/workben/myucp/myucp_datasupplier.hxx
deleted
100644 → 0
Dosyayı görüntüle @
fd468f7c
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License version 3
* only, as published by the Free Software Foundation.
*
* OpenOffice.org is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License version 3 for more details
* (a copy is included in the LICENSE file that accompanied this code).
*
* You should have received a copy of the GNU Lesser General Public License
* version 3 along with OpenOffice.org. If not, see
* <http://www.openoffice.org/license.html>
* for a copy of the LGPLv3 License.
*
************************************************************************/
// @@@ Adjust multi-include-protection-ifdef.
#ifndef _MYUCP_DATASUPPLIER_HXX
#define _MYUCP_DATASUPPLIER_HXX
#include "rtl/ref.hxx"
#include "ucbhelper/resultset.hxx"
// @@@ Adjust namespace name.
namespace
myucp
{
struct
DataSupplier_Impl
;
class
Content
;
class
DataSupplier
:
public
ucbhelper
::
ResultSetDataSupplier
{
DataSupplier_Impl
*
m_pImpl
;
public
:
DataSupplier
(
const
com
::
sun
::
star
::
uno
::
Reference
<
com
::
sun
::
star
::
lang
::
XMultiServiceFactory
>&
rxSMgr
,
const
rtl
::
Reference
<
Content
>&
rContent
,
sal_Int32
nOpenMode
);
virtual
~
DataSupplier
();
virtual
rtl
::
OUString
queryContentIdentifierString
(
sal_uInt32
nIndex
);
virtual
com
::
sun
::
star
::
uno
::
Reference
<
com
::
sun
::
star
::
ucb
::
XContentIdentifier
>
queryContentIdentifier
(
sal_uInt32
nIndex
);
virtual
com
::
sun
::
star
::
uno
::
Reference
<
com
::
sun
::
star
::
ucb
::
XContent
>
queryContent
(
sal_uInt32
nIndex
);
virtual
sal_Bool
getResult
(
sal_uInt32
nIndex
);
virtual
sal_uInt32
totalCount
();
virtual
sal_uInt32
currentCount
();
virtual
sal_Bool
isCountFinal
();
virtual
com
::
sun
::
star
::
uno
::
Reference
<
com
::
sun
::
star
::
sdbc
::
XRow
>
queryPropertyValues
(
sal_uInt32
nIndex
);
virtual
void
releasePropertyValues
(
sal_uInt32
nIndex
);
virtual
void
close
();
virtual
void
validate
()
throw
(
com
::
sun
::
star
::
ucb
::
ResultSetException
);
};
}
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
ucbhelper/workben/myucp/myucp_provider.cxx
deleted
100644 → 0
Dosyayı görüntüle @
fd468f7c
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License version 3
* only, as published by the Free Software Foundation.
*
* OpenOffice.org is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License version 3 for more details
* (a copy is included in the LICENSE file that accompanied this code).
*
* You should have received a copy of the GNU Lesser General Public License
* version 3 along with OpenOffice.org. If not, see
* <http://www.openoffice.org/license.html>
* for a copy of the LGPLv3 License.
*
************************************************************************/
/**************************************************************************
TODO
**************************************************************************
*************************************************************************/
#include "osl/diagnose.h"
#include "osl/mutex.hxx"
#include "ucbhelper/contentidentifier.hxx"
#include "myucp_provider.hxx"
#include "myucp_content.hxx"
using
namespace
com
::
sun
::
star
;
// @@@ Adjust namespace name.
namespace
myucp
{
//=========================================================================
//=========================================================================
//
// ContentProvider Implementation.
//
//=========================================================================
//=========================================================================
ContentProvider
::
ContentProvider
(
const
uno
::
Reference
<
lang
::
XMultiServiceFactory
>&
rSMgr
)
:
::
ucbhelper
::
ContentProviderImplHelper
(
rSMgr
)
{
}
//=========================================================================
// virtual
ContentProvider
::~
ContentProvider
()
{
}
//=========================================================================
//
// XInterface methods.
//
//=========================================================================
// @@@ Add own interfaces.
XINTERFACE_IMPL_3
(
ContentProvider
,
lang
::
XTypeProvider
,
lang
::
XServiceInfo
,
ucb
::
XContentProvider
);
//=========================================================================
//
// XTypeProvider methods.
//
//=========================================================================
// @@@ Add own interfaces.
XTYPEPROVIDER_IMPL_3
(
ContentProvider
,
lang
::
XTypeProvider
,
lang
::
XServiceInfo
,
ucb
::
XContentProvider
);
//=========================================================================
//
// XServiceInfo methods.
//
//=========================================================================
// @@@ Adjust implementation name. Keep the prefix "com.sun.star.comp."!
// @@@ Adjust service name.
XSERVICEINFO_IMPL_1
(
ContentProvider
,
rtl
::
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
"com.sun.star.comp.myucp.ContentProvider"
)),
rtl
::
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
MYUCP_CONTENT_PROVIDER_SERVICE_NAME
))
);
//=========================================================================
//
// Service factory implementation.
//
//=========================================================================
ONE_INSTANCE_SERVICE_FACTORY_IMPL
(
ContentProvider
);
//=========================================================================
//
// XContentProvider methods.
//
//=========================================================================
// virtual
uno
::
Reference
<
ucb
::
XContent
>
SAL_CALL
ContentProvider
::
queryContent
(
const
uno
::
Reference
<
ucb
::
XContentIdentifier
>&
Identifier
)
throw
(
ucb
::
IllegalIdentifierException
,
uno
::
RuntimeException
)
{
// Check URL scheme...
rtl
::
OUString
aScheme
(
RTL_CONSTASCII_USTRINGPARAM
(
MYUCP_URL_SCHEME
)
);
if
(
!
Identifier
->
getContentProviderScheme
().
equalsIgnoreAsciiCase
(
aScheme
)
)
throw
ucb
::
IllegalIdentifierException
();
uno
::
Reference
<
ucb
::
XContentIdentifier
>
xCanonicId
=
Identifier
;
osl
::
MutexGuard
aGuard
(
m_aMutex
);
// Check, if a content with given id already exists...
uno
::
Reference
<
ucb
::
XContent
>
xContent
=
queryExistingContent
(
xCanonicId
).
get
();
if
(
xContent
.
is
()
)
return
xContent
;
// @@@ Decision, which content implementation to instanciate may be
// made here ( in case you have different content classes ).
// Create a new content.
xContent
=
new
Content
(
m_xSMgr
,
this
,
xCanonicId
);
registerNewContent
(
xContent
);
if
(
!
xContent
->
getIdentifier
().
is
()
)
throw
ucb
::
IllegalIdentifierException
();
return
xContent
;
}
}
// namespace
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
ucbhelper/workben/myucp/myucp_provider.hxx
deleted
100644 → 0
Dosyayı görüntüle @
fd468f7c
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License version 3
* only, as published by the Free Software Foundation.
*
* OpenOffice.org is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License version 3 for more details
* (a copy is included in the LICENSE file that accompanied this code).
*
* You should have received a copy of the GNU Lesser General Public License
* version 3 along with OpenOffice.org. If not, see
* <http://www.openoffice.org/license.html>
* for a copy of the LGPLv3 License.
*
************************************************************************/
// @@@ Adjust multi-include-protection-ifdef.
#ifndef _MYUCP_PROVIDER_HXX
#define _MYUCP_PROVIDER_HXX
#include "ucbhelper/providerhelper.hxx"
// @@@ Adjust namespace name.
namespace
myucp
{
//=========================================================================
// @@@ Adjust defines.
// UNO service name for the provider. This name will be used by the UCB to
// create instances of the provider. Prefix with reversed company domain name.
#define MYUCP_CONTENT_PROVIDER_SERVICE_NAME \
"com.sun.star.ucb.MyContentProvider"
#define MYUCP_CONTENT_PROVIDER_SERVICE_NAME_LENGTH 34
// URL scheme. This is the scheme the provider will be able to create
// contents for. The UCB will select the provider ( i.e. in order to create
// contents ) according to this scheme.
#define MYUCP_URL_SCHEME \
"vnd.sun.star.myucp"
#define MYUCP_URL_SCHEME_LENGTH 18
// UCB Content Type.
#define MYUCP_CONTENT_TYPE \
"application/" MYUCP_URL_SCHEME "-content"
//=========================================================================
class
ContentProvider
:
public
::
ucbhelper
::
ContentProviderImplHelper
{
public
:
ContentProvider
(
const
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
lang
::
XMultiServiceFactory
>&
rSMgr
);
virtual
~
ContentProvider
();
// XInterface
XINTERFACE_DECL
()
// XTypeProvider
XTYPEPROVIDER_DECL
()
// XServiceInfo
XSERVICEINFO_DECL
()
// XContentProvider
virtual
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
ucb
::
XContent
>
SAL_CALL
queryContent
(
const
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
ucb
::
XContentIdentifier
>&
Identifier
)
throw
(
::
com
::
sun
::
star
::
ucb
::
IllegalIdentifierException
,
::
com
::
sun
::
star
::
uno
::
RuntimeException
);
//////////////////////////////////////////////////////////////////////
// Additional interfaces
//////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////
// Non-interface methods.
//////////////////////////////////////////////////////////////////////
};
}
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
ucbhelper/workben/myucp/myucp_resultset.cxx
deleted
100644 → 0
Dosyayı görüntüle @
fd468f7c
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License version 3
* only, as published by the Free Software Foundation.
*
* OpenOffice.org is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License version 3 for more details
* (a copy is included in the LICENSE file that accompanied this code).
*
* You should have received a copy of the GNU Lesser General Public License
* version 3 along with OpenOffice.org. If not, see
* <http://www.openoffice.org/license.html>
* for a copy of the LGPLv3 License.
*
************************************************************************/
/**************************************************************************
TODO
**************************************************************************
- This implementation is not a dynamic result set!!! It only implements
the necessary interfaces, but never recognizes/notifies changes!!!
*************************************************************************/
#include "myucp_datasupplier.hxx"
#include "myucp_resultset.hxx"
using
namespace
com
::
sun
::
star
;
// @@@ Adjust namespace name.
namespace
myucp
{
//=========================================================================
//=========================================================================
//
// DynamicResultSet Implementation.
//
//=========================================================================
//=========================================================================
DynamicResultSet
::
DynamicResultSet
(
const
uno
::
Reference
<
lang
::
XMultiServiceFactory
>&
rxSMgr
,
const
rtl
::
Reference
<
Content
>&
rxContent
,
const
ucb
::
OpenCommandArgument2
&
rCommand
,
const
uno
::
Reference
<
ucb
::
XCommandEnvironment
>&
rxEnv
)
:
ResultSetImplHelper
(
rxSMgr
,
rCommand
),
m_xContent
(
rxContent
),
m_xEnv
(
rxEnv
)
{
}
//=========================================================================
//
// Non-interface methods.
//
//=========================================================================
void
DynamicResultSet
::
initStatic
()
{
m_xResultSet1
=
new
::
ucbhelper
::
ResultSet
(
m_xSMgr
,
m_aCommand
.
Properties
,
new
DataSupplier
(
m_xSMgr
,
m_xContent
,
m_aCommand
.
Mode
),
m_xEnv
);
}
//=========================================================================
void
DynamicResultSet
::
initDynamic
()
{
m_xResultSet1
=
new
::
ucbhelper
::
ResultSet
(
m_xSMgr
,
m_aCommand
.
Properties
,
new
DataSupplier
(
m_xSMgr
,
m_xContent
,
m_aCommand
.
Mode
),
m_xEnv
);
m_xResultSet2
=
m_xResultSet1
;
}
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
ucbhelper/workben/myucp/myucp_resultset.hxx
deleted
100644 → 0
Dosyayı görüntüle @
fd468f7c
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License version 3
* only, as published by the Free Software Foundation.
*
* OpenOffice.org is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License version 3 for more details
* (a copy is included in the LICENSE file that accompanied this code).
*
* You should have received a copy of the GNU Lesser General Public License
* version 3 along with OpenOffice.org. If not, see
* <http://www.openoffice.org/license.html>
* for a copy of the LGPLv3 License.
*
************************************************************************/
// @@@ Adjust multi-include-protection-ifdef.
#ifndef _MYUCP_RESULTSET_HXX
#define _MYUCP_RESULTSET_HXX
#include "rtl/ref.hxx"
#include "ucbhelper/resultsethelper.hxx"
#include "myucp_content.hxx"
// @@@ Adjust namespace name.
namespace
myucp
{
class
DynamicResultSet
:
public
::
ucbhelper
::
ResultSetImplHelper
{
rtl
::
Reference
<
Content
>
m_xContent
;
com
::
sun
::
star
::
uno
::
Reference
<
com
::
sun
::
star
::
ucb
::
XCommandEnvironment
>
m_xEnv
;
private
:
virtual
void
initStatic
();
virtual
void
initDynamic
();
public
:
DynamicResultSet
(
const
com
::
sun
::
star
::
uno
::
Reference
<
com
::
sun
::
star
::
lang
::
XMultiServiceFactory
>&
rxSMgr
,
const
rtl
::
Reference
<
Content
>&
rxContent
,
const
com
::
sun
::
star
::
ucb
::
OpenCommandArgument2
&
rCommand
,
const
com
::
sun
::
star
::
uno
::
Reference
<
com
::
sun
::
star
::
ucb
::
XCommandEnvironment
>&
rxEnv
);
};
}
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
ucbhelper/workben/myucp/myucp_services.cxx
deleted
100644 → 0
Dosyayı görüntüle @
fd468f7c
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License version 3
* only, as published by the Free Software Foundation.
*
* OpenOffice.org is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License version 3 for more details
* (a copy is included in the LICENSE file that accompanied this code).
*
* You should have received a copy of the GNU Lesser General Public License
* version 3 along with OpenOffice.org. If not, see
* <http://www.openoffice.org/license.html>
* for a copy of the LGPLv3 License.
*
************************************************************************/
#include "com/sun/star/lang/XMultiServiceFactory.hpp"
#include "com/sun/star/lang/XSingleServiceFactory.hpp"
#include "com/sun/star/registry/XRegistryKey.hpp"
#include "myucp_provider.hxx"
using
namespace
com
::
sun
::
star
;
namespace
{
//=========================================================================
sal_Bool
writeInfo
(
void
*
pRegistryKey
,
const
rtl
::
OUString
&
rImplementationName
,
uno
::
Sequence
<
rtl
::
OUString
>
const
&
rServiceNames
)
{
rtl
::
OUString
aKeyName
(
RTL_CONSTASCII_USTRINGPARAM
(
"/"
)
);
aKeyName
+=
rImplementationName
;
aKeyName
+=
rtl
::
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
"/UNO/SERVICES"
));
uno
::
Reference
<
registry
::
XRegistryKey
>
xKey
;
try
{
xKey
=
static_cast
<
registry
::
XRegistryKey
*
>
(
pRegistryKey
)
->
createKey
(
aKeyName
);
}
catch
(
registry
::
InvalidRegistryException
const
&
)
{
}
if
(
!
xKey
.
is
()
)
return
sal_False
;
sal_Bool
bSuccess
=
sal_True
;
for
(
sal_Int32
n
=
0
;
n
<
rServiceNames
.
getLength
();
++
n
)
{
try
{
xKey
->
createKey
(
rServiceNames
[
n
]
);
}
catch
(
registry
::
InvalidRegistryException
const
&
)
{
bSuccess
=
sal_False
;
break
;
}
}
return
bSuccess
;
}
}
//=========================================================================
extern
"C"
sal_Bool
SAL_CALL
component_writeInfo
(
void
*
/*pServiceManager*/
,
void
*
pRegistryKey
)
{
return
pRegistryKey
&&
//////////////////////////////////////////////////////////////////////
// Write info into registry.
//////////////////////////////////////////////////////////////////////
// @@@ Adjust namespace names.
writeInfo
(
pRegistryKey
,
::
myucp
::
ContentProvider
::
getImplementationName_Static
(),
::
myucp
::
ContentProvider
::
getSupportedServiceNames_Static
()
);
}
//=========================================================================
extern
"C"
SAL_DLLPUBLIC_EXPORT
void
*
SAL_CALL
component_getFactory
(
const
sal_Char
*
pImplName
,
void
*
pServiceManager
,
void
*
/*pRegistryKey*/
)
{
void
*
pRet
=
0
;
uno
::
Reference
<
lang
::
XMultiServiceFactory
>
xSMgr
(
reinterpret_cast
<
lang
::
XMultiServiceFactory
*
>
(
pServiceManager
)
);
uno
::
Reference
<
lang
::
XSingleServiceFactory
>
xFactory
;
//////////////////////////////////////////////////////////////////////
// Create factory, if implementation name matches.
//////////////////////////////////////////////////////////////////////
// @@@ Adjust namespace names.
if
(
::
myucp
::
ContentProvider
::
getImplementationName_Static
().
compareToAscii
(
pImplName
)
==
0
)
{
xFactory
=
::
myucp
::
ContentProvider
::
createServiceFactory
(
xSMgr
);
}
//////////////////////////////////////////////////////////////////////
if
(
xFactory
.
is
()
)
{
xFactory
->
acquire
();
pRet
=
xFactory
.
get
();
}
return
pRet
;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
ucbhelper/workben/ucbexplorer/bmp/document.bmp
deleted
100644 → 0
Dosyayı görüntüle @
fd468f7c
1.29 KB
ucbhelper/workben/ucbexplorer/bmp/fldclose.bmp
deleted
100644 → 0
Dosyayı görüntüle @
fd468f7c
298 Bytes
ucbhelper/workben/ucbexplorer/bmp/fldopen.bmp
deleted
100644 → 0
Dosyayı görüntüle @
fd468f7c
322 Bytes
ucbhelper/workben/ucbexplorer/bmp/link.bmp
deleted
100644 → 0
Dosyayı görüntüle @
fd468f7c
1.29 KB
ucbhelper/workben/ucbexplorer/makefile.mk
deleted
100644 → 0
Dosyayı görüntüle @
fd468f7c
#*************************************************************************
#
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# Copyright 2000, 2010 Oracle and/or its affiliates.
#
# OpenOffice.org - a multi-platform office productivity suite
#
# This file is part of OpenOffice.org.
#
# OpenOffice.org is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License version 3
# only, as published by the Free Software Foundation.
#
# OpenOffice.org is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Lesser General Public License version 3 for more details
# (a copy is included in the LICENSE file that accompanied this code).
#
# You should have received a copy of the GNU Lesser General Public License
# version 3 along with OpenOffice.org. If not, see
# <http://www.openoffice.org/license.html>
# for a copy of the LGPLv3 License.
#
#*************************************************************************
PRJ
=
..
$/
..
PRJNAME
=
ucbhelper
TARGET
=
ucbexplorer
TARGETTYPE
=
GUI
LIBTARGET
=
NO
ENABLE_EXCEPTIONS
=
TRUE
# --- Settings ---
.INCLUDE
:
settings.mk
# --- Files ---
OBJFILES
=
$(OBJ)$/$(TARGET)
.obj
SRS1NAME
=
$(TARGET)
SRC1FILES
=
$(TARGET)
.src
#
# UCBEXPLORER
#
APP1TARGET
=
$(TARGET)
RESLIB1NAME
=
$(TARGET)
RESLIB1SRSFILES
=
$(SRS)$/$(TARGET)
.srs
APP1OBJS
=
$(OBJ)$/$(TARGET)
.obj
APP1RES
=
$(RES)$/$(TARGET)
.res
APP1STDLIBS
=
$(SALLIB)
\
$(CPPULIB)
\
$(CPPUHELPERLIB)
\
$(TOOLSLIB)
\
$(SVTOOLLIB)
\
$(COMPHELPERLIB)
\
$(UCBHELPERLIB)
\
$(VCLLIB)
# --- Targets ---
.INCLUDE
:
target.mk
ucbhelper/workben/ucbexplorer/ucbexplorer.cxx
deleted
100644 → 0
Dosyayı görüntüle @
fd468f7c
This diff is collapsed.
Click to expand it.
ucbhelper/workben/ucbexplorer/ucbexplorer.hrc
deleted
100644 → 0
Dosyayı görüntüle @
fd468f7c
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License version 3
* only, as published by the Free Software Foundation.
*
* OpenOffice.org is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License version 3 for more details
* (a copy is included in the LICENSE file that accompanied this code).
*
* You should have received a copy of the GNU Lesser General Public License
* version 3 along with OpenOffice.org. If not, see
* <http://www.openoffice.org/license.html>
* for a copy of the LGPLv3 License.
*
************************************************************************/
// UCB Explorer ( resource identifiers )
#ifndef _UCBEXPLORER_HRC
#define _UCBEXPLORER_HRC
#define MENU_MAIN 1000
#define MENU_FILE 100
#define MENU_EXIT 10
#define MENU_POPUP 1001
#define MENU_NEW 10
#define MENU_RENAME 11
#define MENU_DELETE 12
#define TEXT_TITLEBAR 5000
#define BMP_FOLDER_CLOSED 6001
#define BMP_FOLDER_OPENED 6002
#define BMP_DOCUMENT 6003
#define BMP_LINK 6004
#define DLG_STRINGINPUT 7000
#define FT_STRINGINPUT_DLG_NAME 10
#define ED_STRINGINPUT_DLG_NAME 11
#define GB_STRINGINPUT_DLG_NAME 12
#define BT_STRINGINPUT_DLG_OK 13
#define BT_STRINGINPUT_DLG_CANCEL 14
#define BT_STRINGINPUT_DLG_HELP 15
#endif /* !_UCBEXPLORER_HRC */
ucbhelper/workben/ucbexplorer/ucbexplorer.src
deleted
100644 → 0
Dosyayı görüntüle @
fd468f7c
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License version 3
* only, as published by the Free Software Foundation.
*
* OpenOffice.org is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License version 3 for more details
* (a copy is included in the LICENSE file that accompanied this code).
*
* You should have received a copy of the GNU Lesser General Public License
* version 3 along with OpenOffice.org. If not, see
* <http://www.openoffice.org/license.html>
* for a copy of the LGPLv3 License.
*
************************************************************************/
#include "ucbexplorer.hrc"
Menu MENU_MAIN
{
ItemList =
{
MenuItem
{
Identifier = MENU_FILE ;
Text [ en-US ] = "~File" ;
SubMenu = Menu
{
ItemList =
{
MenuItem
{
Identifier = MENU_EXIT ;
Text [ en-US ] = "~Exit" ;
AccelKey = KeyCode
{
Function = KEYFUNC_QUIT ;
};
};
};
};
};
};
};
Menu MENU_POPUP
{
ItemList =
{
MenuItem
{
Identifier = MENU_NEW ;
Text [ en-US ] = "~New" ;
};
MenuItem
{
Identifier = MENU_RENAME ;
Text [ en-US ] = "~Rename" ;
};
MenuItem
{
Identifier = MENU_DELETE ;
Text [ en-US ] = "~Delete" ;
};
};
};
ModalDialog DLG_STRINGINPUT
{
HelpID = "ucbhelper:ModalDialog:DLG_STRINGINPUT";
Border = TRUE ;
Moveable = TRUE ;
OutputSize = TRUE ;
SVLook = TRUE ;
Size = MAP_APPFONT ( 218 , 44 ) ;
FixedText FT_STRINGINPUT_DLG_NAME
{
Pos = MAP_APPFONT ( 12 , 18 ) ;
Size = MAP_APPFONT ( 28 , 10 ) ;
Text [ en-US ] = "~Value" ;
};
Edit ED_STRINGINPUT_DLG_NAME
{
HelpID = "ucbhelper:Edit:DLG_STRINGINPUT:ED_STRINGINPUT_DLG_NAME";
Pos = MAP_APPFONT ( 40 , 16 ) ;
Size = MAP_APPFONT ( 110 , 12 ) ;
Border = TRUE ;
Left = TRUE ;
};
GroupBox GB_STRINGINPUT_DLG_NAME
{
Group = TRUE ;
Pos = MAP_APPFONT ( 6 , 3 ) ;
Size = MAP_APPFONT ( 150 , 36 ) ;
};
OKButton BT_STRINGINPUT_DLG_OK
{
Pos = MAP_APPFONT ( 162 , 6 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
DefButton = TRUE ;
};
CancelButton BT_STRINGINPUT_DLG_CANCEL
{
Pos = MAP_APPFONT ( 162 , 23 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
};
HelpButton BT_STRINGINPUT_DLG_HELP
{
Pos = MAP_APPFONT ( 162 , 200 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
};
};
String TEXT_TITLEBAR
{
Text [ en-US ] = "UCB Explorer" ;
};
unusedcode.easy
Dosyayı görüntüle @
d527c1df
...
...
@@ -1033,8 +1033,5 @@ sw::util::AuthorInfos::Insert(sw::util::AuthorInfo* const*, unsigned short)
sw::util::AuthorInfos::Insert(sw::util::AuthorInfos const*, unsigned short, unsigned short)
sw::util::AuthorInfos::Remove(sw::util::AuthorInfo* const&, unsigned short)
sw::util::AuthorInfos::Remove(unsigned short, unsigned short)
ucbhelper::Content::getPropertyValues(com::sun::star::uno::Sequence<int> const&)
ucbhelper::Content::insertNewContent(rtl::OUString const&, com::sun::star::uno::Sequence<int> const&, com::sun::star::uno::Sequence<com::sun::star::uno::Any> const&, com::sun::star::uno::Reference<com::sun::star::io::XInputStream> const&, ucbhelper::Content&)
ucbhelper::SimpleCertificateValidationRequest::getResponse() const
utl::OConfigurationNode::appendNode(rtl::OUString const&, utl::OConfigurationNode const&) const
vcl::PDFWriter::DrawPixel(Polygon const&, Color const*)
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