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
eb23b2d9
Kaydet (Commit)
eb23b2d9
authored
Tem 18, 2013
tarafından
Cao Cuong Ngo
Kaydeden (comit)
Cédric Bosdonnat
Eyl 02, 2013
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
CMIS properties: Add type to the UNO API
Change-Id: Ie4f32bc840cdfab1d5f600991cd6ac8aabcb1f87
üst
96d4c535
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
114 additions
and
64 deletions
+114
-64
dinfdlg.hxx
include/sfx2/dinfdlg.hxx
+7
-4
CmisProperty.idl
offapi/com/sun/star/document/CmisProperty.idl
+4
-0
dinfdlg.cxx
sfx2/source/dialog/dinfdlg.cxx
+45
-56
dinfdlg.hrc
sfx2/source/dialog/dinfdlg.hrc
+3
-3
cmis_content.cxx
ucb/source/ucp/cmis/cmis_content.cxx
+32
-1
cmis_strings.hxx
ucb/source/ucp/cmis/cmis_strings.hxx
+23
-0
No files found.
include/sfx2/dinfdlg.hxx
Dosyayı görüntüle @
eb23b2d9
...
@@ -584,6 +584,7 @@ public:
...
@@ -584,6 +584,7 @@ public:
struct
CmisPropertyLine
struct
CmisPropertyLine
{
{
OUString
m_sId
;
OUString
m_sId
;
OUString
m_sType
;
bool
m_bUpdatable
;
bool
m_bUpdatable
;
bool
m_bRequired
;
bool
m_bRequired
;
bool
m_bMultiValued
;
bool
m_bMultiValued
;
...
@@ -638,8 +639,9 @@ public:
...
@@ -638,8 +639,9 @@ public:
sal_uInt16
GetLineCount
()
const
;
sal_uInt16
GetLineCount
()
const
;
inline
sal_Int32
GetLineHeight
()
const
{
return
m_nLineHeight
;
}
inline
sal_Int32
GetLineHeight
()
const
{
return
m_nLineHeight
;
}
void
AddLine
(
const
OUString
&
sId
,
const
OUString
&
sName
,
void
AddLine
(
const
OUString
&
sId
,
const
OUString
&
sName
,
const
bool
bUpdatable
,
const
bool
bRequired
,
const
OUString
&
sType
,
const
bool
bUpdatable
,
const
bool
bMultiValued
,
const
bool
bOpenChoice
,
const
bool
bRequired
,
const
bool
bMultiValued
,
const
bool
bOpenChoice
,
com
::
sun
::
star
::
uno
::
Any
&
aChoices
,
com
::
sun
::
star
::
uno
::
Any
&
aChoices
,
com
::
sun
::
star
::
uno
::
Any
&
rAny
);
com
::
sun
::
star
::
uno
::
Any
&
rAny
);
bool
AreAllLinesValid
()
const
;
bool
AreAllLinesValid
()
const
;
...
@@ -669,8 +671,9 @@ public:
...
@@ -669,8 +671,9 @@ public:
~
CmisPropertiesControl
();
~
CmisPropertiesControl
();
void
AddLine
(
const
OUString
&
sId
,
const
OUString
&
sName
,
void
AddLine
(
const
OUString
&
sId
,
const
OUString
&
sName
,
const
bool
bUpdatable
,
const
bool
bRequired
,
const
OUString
&
sType
,
const
bool
bUpdatable
,
const
bool
bMultiValude
,
const
bool
bOpenChoice
,
const
bool
bRequired
,
const
bool
bMultiValude
,
const
bool
bOpenChoice
,
com
::
sun
::
star
::
uno
::
Any
&
aChoices
,
com
::
sun
::
star
::
uno
::
Any
&
aChoices
,
com
::
sun
::
star
::
uno
::
Any
&
rAny
,
bool
bInteractive
);
com
::
sun
::
star
::
uno
::
Any
&
rAny
,
bool
bInteractive
);
...
...
offapi/com/sun/star/document/CmisProperty.idl
Dosyayı görüntüle @
eb23b2d9
...
@@ -33,6 +33,10 @@ struct CmisProperty
...
@@ -33,6 +33,10 @@ struct CmisProperty
*/
*/
string
Name
;
string
Name
;
/**
type
of
the
property
*/
string
Type
;
/**
specifies
if
the
property
is
updatable
.
/**
specifies
if
the
property
is
updatable
.
*/
*/
boolean
Updatable
;
boolean
Updatable
;
...
...
sfx2/source/dialog/dinfdlg.cxx
Dosyayı görüntüle @
eb23b2d9
...
@@ -2199,6 +2199,7 @@ void CmisPropertiesYesNoButton::Resize()
...
@@ -2199,6 +2199,7 @@ void CmisPropertiesYesNoButton::Resize()
// struct CmisPropertyLine ---------------------------------------------
// struct CmisPropertyLine ---------------------------------------------
CmisPropertyLine
::
CmisPropertyLine
(
Window
*
pParent
)
:
CmisPropertyLine
::
CmisPropertyLine
(
Window
*
pParent
)
:
m_sId
(
),
m_sId
(
),
m_sType
(
CMIS_TYPE_STRING
),
m_aName
(
pParent
,
SfxResId
(
SFX_CMIS_PROPERTY_NAME
)
),
m_aName
(
pParent
,
SfxResId
(
SFX_CMIS_PROPERTY_NAME
)
),
m_aType
(
pParent
,
SfxResId
(
SFX_CMIS_PROPERTY_TYPE
)
),
m_aType
(
pParent
,
SfxResId
(
SFX_CMIS_PROPERTY_TYPE
)
),
m_aValueEdit
(
pParent
,
SfxResId
(
SFX_CMIS_ED_PROPERTY_VALUE
),
this
),
m_aValueEdit
(
pParent
,
SfxResId
(
SFX_CMIS_ED_PROPERTY_VALUE
),
this
),
...
@@ -2261,16 +2262,16 @@ bool CmisPropertiesWindow::IsLineValid( CmisPropertyLine* pLine ) const
...
@@ -2261,16 +2262,16 @@ bool CmisPropertiesWindow::IsLineValid( CmisPropertyLine* pLine ) const
{
{
bool
bIsValid
=
true
;
bool
bIsValid
=
true
;
pLine
->
m_bTypeLostFocus
=
false
;
pLine
->
m_bTypeLostFocus
=
false
;
OUString
sType
=
pLine
->
m_aType
.
GetText
(
);
String
sValue
=
pLine
->
m_aValueEdit
.
GetText
();
String
sValue
=
pLine
->
m_aValueEdit
.
GetText
();
if
(
sValue
.
Len
()
==
0
)
if
(
sValue
.
Len
()
==
0
)
return
true
;
return
true
;
sal_uInt32
nIndex
=
0xFFFFFFFF
;
sal_uInt32
nIndex
=
0xFFFFFFFF
;
if
(
CMIS_TYPE_NUMBER
==
sType
)
if
(
CMIS_TYPE_INTEGER
==
pLine
->
m_sType
||
CMIS_TYPE_DECIMAL
==
pLine
->
m_sType
)
nIndex
=
const_cast
<
SvNumberFormatter
&
>
(
nIndex
=
const_cast
<
SvNumberFormatter
&
>
(
m_aNumberFormatter
).
GetFormatIndex
(
NF_NUMBER_SYSTEM
);
m_aNumberFormatter
).
GetFormatIndex
(
NF_NUMBER_SYSTEM
);
else
if
(
CMIS_TYPE_DATETIME
==
sType
)
else
if
(
CMIS_TYPE_DATETIME
==
pLine
->
m_
sType
)
nIndex
=
const_cast
<
SvNumberFormatter
&
>
(
nIndex
=
const_cast
<
SvNumberFormatter
&
>
(
m_aNumberFormatter
).
GetFormatIndex
(
NF_DATE_SYS_DDMMYYYY
);
m_aNumberFormatter
).
GetFormatIndex
(
NF_DATE_SYS_DDMMYYYY
);
...
@@ -2398,13 +2399,14 @@ void CmisPropertiesWindow::updateLineWidth()
...
@@ -2398,13 +2399,14 @@ void CmisPropertiesWindow::updateLineWidth()
}
}
void
CmisPropertiesWindow
::
AddLine
(
const
OUString
&
sId
,
const
OUString
&
sName
,
void
CmisPropertiesWindow
::
AddLine
(
const
OUString
&
sId
,
const
OUString
&
sName
,
const
bool
bUpdatable
,
const
bool
bRequired
,
const
OUString
&
sType
,
const
bool
bUpdatable
,
const
bool
b
MultiValued
,
const
bool
bOpenChoice
,
const
bool
b
Required
,
const
bool
bMultiValued
,
Any
&
/*aChoices*/
,
Any
&
rAny
)
const
bool
bOpenChoice
,
Any
&
/*aChoices*/
,
Any
&
rAny
)
{
{
CmisPropertyLine
*
pNewLine
=
new
CmisPropertyLine
(
this
);
CmisPropertyLine
*
pNewLine
=
new
CmisPropertyLine
(
this
);
pNewLine
->
m_sId
=
sId
;
pNewLine
->
m_sId
=
sId
;
pNewLine
->
m_sType
=
sType
;
pNewLine
->
m_bUpdatable
=
bUpdatable
;
pNewLine
->
m_bUpdatable
=
bUpdatable
;
pNewLine
->
m_bRequired
=
bRequired
;
pNewLine
->
m_bRequired
=
bRequired
;
pNewLine
->
m_bMultiValued
=
bMultiValued
;
pNewLine
->
m_bMultiValued
=
bMultiValued
;
...
@@ -2412,9 +2414,6 @@ void CmisPropertiesWindow::AddLine( const OUString& sId, const OUString& sName,
...
@@ -2412,9 +2414,6 @@ void CmisPropertiesWindow::AddLine( const OUString& sId, const OUString& sName,
pNewLine
->
m_aValueEdit
.
SetLoseFocusHdl
(
LINK
(
this
,
CmisPropertiesWindow
,
EditLoseFocusHdl
)
);
pNewLine
->
m_aValueEdit
.
SetLoseFocusHdl
(
LINK
(
this
,
CmisPropertiesWindow
,
EditLoseFocusHdl
)
);
pNewLine
->
m_aName
.
SetAccessibleName
(
m_aName
.
GetAccessibleName
());
pNewLine
->
m_aType
.
SetAccessibleName
(
m_aType
.
GetAccessibleName
());
pNewLine
->
m_aValueEdit
.
SetAccessibleName
(
m_aValueEdit
.
GetAccessibleName
());
pNewLine
->
m_aValueEdit
.
SetReadOnly
(
!
bUpdatable
);
pNewLine
->
m_aValueEdit
.
SetReadOnly
(
!
bUpdatable
);
pNewLine
->
m_aDateField
.
SetReadOnly
(
!
bUpdatable
);
pNewLine
->
m_aDateField
.
SetReadOnly
(
!
bUpdatable
);
pNewLine
->
m_aTimeField
.
SetReadOnly
(
!
bUpdatable
);
pNewLine
->
m_aTimeField
.
SetReadOnly
(
!
bUpdatable
);
...
@@ -2449,72 +2448,59 @@ void CmisPropertiesWindow::AddLine( const OUString& sId, const OUString& sName,
...
@@ -2449,72 +2448,59 @@ void CmisPropertiesWindow::AddLine( const OUString& sId, const OUString& sName,
pNewLine
->
m_aDatePos
=
pNewLine
->
m_aDateField
.
GetPosPixel
();
pNewLine
->
m_aDatePos
=
pNewLine
->
m_aDateField
.
GetPosPixel
();
pNewLine
->
m_aTimePos
=
pNewLine
->
m_aTimeField
.
GetPosPixel
();
pNewLine
->
m_aTimePos
=
pNewLine
->
m_aTimeField
.
GetPosPixel
();
pNewLine
->
m_aDateTimeSize
=
pNewLine
->
m_aDateField
.
GetSizePixel
();
pNewLine
->
m_aDateTimeSize
=
pNewLine
->
m_aDateField
.
GetSizePixel
();
pNewLine
->
m_aName
.
SetText
(
sName
);
sal_Int64
nTmpValue
=
0
;
double
dTmpValue
=
0.0
;
bool
bTmpValue
=
false
;
OUString
sTmpValue
;
util
::
DateTime
aTmpDateTime
;
SvtSysLocale
aSysLocale
;
SvtSysLocale
aSysLocale
;
const
LocaleDataWrapper
&
rLocaleWrapper
=
aSysLocale
.
GetLocaleData
();
const
LocaleDataWrapper
&
rLocaleWrapper
=
aSysLocale
.
GetLocaleData
();
pNewLine
->
m_aName
.
SetText
(
sName
);
OUString
sType
=
CMIS_TYPE_STRING
;
OUString
sValue
;
OUString
sValue
;
if
(
sType
==
CMIS_TYPE_INTEGER
)
if
(
rAny
>>=
nTmpValue
)
{
{
sal_Int64
nTmpValue
=
0
;
rAny
>>=
nTmpValue
;
sal_uInt32
nIndex
=
m_aNumberFormatter
.
GetFormatIndex
(
NF_NUMBER_SYSTEM
);
sal_uInt32
nIndex
=
m_aNumberFormatter
.
GetFormatIndex
(
NF_NUMBER_SYSTEM
);
m_aNumberFormatter
.
GetInputLineString
(
nTmpValue
,
nIndex
,
sValue
);
m_aNumberFormatter
.
GetInputLineString
(
nTmpValue
,
nIndex
,
sValue
);
pNewLine
->
m_aValueEdit
.
SetText
(
sValue
);
sType
=
CMIS_TYPE_NUMBER
;
}
}
else
if
(
rAny
>>=
dTmpValue
)
else
if
(
sType
==
CMIS_TYPE_DECIMAL
)
{
{
double
dTmpValue
=
0.0
;
rAny
>>=
dTmpValue
;
sal_uInt32
nIndex
=
m_aNumberFormatter
.
GetFormatIndex
(
NF_NUMBER_SYSTEM
);
sal_uInt32
nIndex
=
m_aNumberFormatter
.
GetFormatIndex
(
NF_NUMBER_SYSTEM
);
m_aNumberFormatter
.
GetInputLineString
(
dTmpValue
,
nIndex
,
sValue
);
m_aNumberFormatter
.
GetInputLineString
(
dTmpValue
,
nIndex
,
sValue
);
pNewLine
->
m_aValueEdit
.
SetText
(
sValue
);
sType
=
CMIS_TYPE_NUMBER
;
}
}
else
if
(
rAny
>>=
bTmpValue
)
else
if
(
sType
==
CMIS_TYPE_BOOL
)
{
{
bool
bTmpValue
=
false
;
rAny
>>=
bTmpValue
;
sValue
=
(
bTmpValue
?
rLocaleWrapper
.
getTrueWord
()
:
rLocaleWrapper
.
getFalseWord
()
);
sValue
=
(
bTmpValue
?
rLocaleWrapper
.
getTrueWord
()
:
rLocaleWrapper
.
getFalseWord
()
);
sType
=
CMIS_TYPE_BOOLEAN
;
if
(
bTmpValue
)
pNewLine
->
m_aYesNoButton
.
CheckYes
();
else
pNewLine
->
m_aYesNoButton
.
CheckNo
();
}
}
else
if
(
rAny
>>=
sTmpValue
)
else
if
(
sType
==
CMIS_TYPE_STRING
)
{
{
pNewLine
->
m_aValueEdit
.
SetText
(
sTmpValue
);
rAny
>>=
sValue
;
sType
=
CMIS_TYPE_STRING
;
}
}
else
if
(
rAny
>>=
aTmpDateTime
)
else
if
(
sType
==
CMIS_TYPE_DATETIME
)
{
{
util
::
DateTime
aTmpDateTime
;
rAny
>>=
aTmpDateTime
;
pNewLine
->
m_aDateField
.
SetDate
(
Date
(
aTmpDateTime
.
Day
,
aTmpDateTime
.
Month
,
aTmpDateTime
.
Year
)
);
pNewLine
->
m_aDateField
.
SetDate
(
Date
(
aTmpDateTime
.
Day
,
aTmpDateTime
.
Month
,
aTmpDateTime
.
Year
)
);
pNewLine
->
m_aTimeField
.
SetTime
(
Time
(
aTmpDateTime
.
Hours
,
aTmpDateTime
.
Minutes
,
aTmpDateTime
.
Seconds
,
aTmpDateTime
.
NanoSeconds
)
);
pNewLine
->
m_aTimeField
.
SetTime
(
Time
(
aTmpDateTime
.
Hours
,
aTmpDateTime
.
Minutes
,
aTmpDateTime
.
Seconds
,
aTmpDateTime
.
NanoSeconds
)
);
pNewLine
->
m_aDateField
.
SetPosSizePixel
(
pNewLine
->
m_aDatePos
,
pNewLine
->
m_aDateTimeSize
);
pNewLine
->
m_aTimeField
.
SetPosSizePixel
(
pNewLine
->
m_aTimePos
,
pNewLine
->
m_aDateTimeSize
);
sType
=
CMIS_TYPE_DATETIME
;
}
if
(
sType
!=
CMIS_TYPE_ANY
)
{
if
(
CMIS_TYPE_BOOLEAN
==
sType
)
{
if
(
bTmpValue
)
pNewLine
->
m_aYesNoButton
.
CheckYes
();
else
pNewLine
->
m_aYesNoButton
.
CheckNo
();
}
}
}
pNewLine
->
m_aValueEdit
.
SetText
(
sValue
);
pNewLine
->
m_aType
.
SetText
(
sType
);
pNewLine
->
m_aType
.
SetText
(
sType
);
pNewLine
->
m_aValueEdit
.
Show
((
CMIS_TYPE_STRING
==
sType
)
||
(
CMIS_TYPE_NUMBER
==
sType
)
);
pNewLine
->
m_aValueEdit
.
Show
(
CMIS_TYPE_STRING
==
sType
||
CMIS_TYPE_INTEGER
==
sType
||
CMIS_TYPE_DECIMAL
==
sType
);
pNewLine
->
m_aDateField
.
Show
(
CMIS_TYPE_DATETIME
==
sType
);
pNewLine
->
m_aDateField
.
Show
(
CMIS_TYPE_DATETIME
==
sType
);
pNewLine
->
m_aTimeField
.
Show
(
CMIS_TYPE_DATETIME
==
sType
);
pNewLine
->
m_aTimeField
.
Show
(
CMIS_TYPE_DATETIME
==
sType
);
pNewLine
->
m_aYesNoButton
.
Show
(
CMIS_TYPE_BOOL
EAN
==
sType
);
pNewLine
->
m_aYesNoButton
.
Show
(
CMIS_TYPE_BOOL
==
sType
);
if
(
sType
==
CMIS_TYPE_DATETIME
)
{
pNewLine
->
m_aDateField
.
SetPosSizePixel
(
pNewLine
->
m_aDatePos
,
pNewLine
->
m_aDateTimeSize
);
pNewLine
->
m_aTimeField
.
SetPosSizePixel
(
pNewLine
->
m_aTimePos
,
pNewLine
->
m_aDateTimeSize
);
}
pNewLine
->
m_aName
.
GrabFocus
();
pNewLine
->
m_aName
.
GrabFocus
();
}
}
...
@@ -2582,6 +2568,7 @@ Sequence< document::CmisProperty > CmisPropertiesWindow::GetCmisProperties() con
...
@@ -2582,6 +2568,7 @@ Sequence< document::CmisProperty > CmisPropertiesWindow::GetCmisProperties() con
CmisPropertyLine
*
pLine
=
*
pIter
;
CmisPropertyLine
*
pLine
=
*
pIter
;
aPropertiesSeq
[
i
].
Id
=
pLine
->
m_sId
;
aPropertiesSeq
[
i
].
Id
=
pLine
->
m_sId
;
aPropertiesSeq
[
i
].
Type
=
pLine
->
m_sType
;
aPropertiesSeq
[
i
].
Updatable
=
pLine
->
m_bUpdatable
;
aPropertiesSeq
[
i
].
Updatable
=
pLine
->
m_bUpdatable
;
aPropertiesSeq
[
i
].
Required
=
pLine
->
m_bRequired
;
aPropertiesSeq
[
i
].
Required
=
pLine
->
m_bRequired
;
aPropertiesSeq
[
i
].
OpenChoice
=
pLine
->
m_bOpenChoice
;
aPropertiesSeq
[
i
].
OpenChoice
=
pLine
->
m_bOpenChoice
;
...
@@ -2592,7 +2579,8 @@ Sequence< document::CmisProperty > CmisPropertiesWindow::GetCmisProperties() con
...
@@ -2592,7 +2579,8 @@ Sequence< document::CmisProperty > CmisPropertiesWindow::GetCmisProperties() con
{
{
aPropertiesSeq
[
i
].
Name
=
sPropertyName
;
aPropertiesSeq
[
i
].
Name
=
sPropertyName
;
OUString
sType
=
pLine
->
m_aType
.
GetText
(
);
OUString
sType
=
pLine
->
m_aType
.
GetText
(
);
if
(
CMIS_TYPE_NUMBER
==
sType
)
if
(
CMIS_TYPE_INTEGER
==
sType
||
CMIS_TYPE_DECIMAL
==
sType
)
{
{
double
nValue
=
0
;
double
nValue
=
0
;
sal_uInt32
nIndex
=
const_cast
<
SvNumberFormatter
&
>
(
sal_uInt32
nIndex
=
const_cast
<
SvNumberFormatter
&
>
(
...
@@ -2602,7 +2590,7 @@ Sequence< document::CmisProperty > CmisPropertiesWindow::GetCmisProperties() con
...
@@ -2602,7 +2590,7 @@ Sequence< document::CmisProperty > CmisPropertiesWindow::GetCmisProperties() con
if
(
bIsNum
)
if
(
bIsNum
)
aPropertiesSeq
[
i
].
Value
<<=
makeAny
(
nValue
);
aPropertiesSeq
[
i
].
Value
<<=
makeAny
(
nValue
);
}
}
else
if
(
CMIS_TYPE_BOOL
EAN
==
sType
)
else
if
(
CMIS_TYPE_BOOL
==
sType
)
{
{
bool
bValue
=
pLine
->
m_aYesNoButton
.
IsYesChecked
();
bool
bValue
=
pLine
->
m_aYesNoButton
.
IsYesChecked
();
aPropertiesSeq
[
i
].
Value
<<=
makeAny
(
bValue
);
aPropertiesSeq
[
i
].
Value
<<=
makeAny
(
bValue
);
...
@@ -2717,11 +2705,12 @@ IMPL_LINK( CmisPropertiesControl, ScrollHdl, ScrollBar*, pScrollBar )
...
@@ -2717,11 +2705,12 @@ IMPL_LINK( CmisPropertiesControl, ScrollHdl, ScrollBar*, pScrollBar )
}
}
void
CmisPropertiesControl
::
AddLine
(
const
OUString
&
sId
,
const
OUString
&
sName
,
void
CmisPropertiesControl
::
AddLine
(
const
OUString
&
sId
,
const
OUString
&
sName
,
const
bool
bUpdatable
,
const
bool
bRequired
,
const
OUString
&
sType
,
const
bool
bUpdatable
,
const
bool
bMultiValued
,
const
bool
bOpenChoice
,
const
bool
bRequired
,
const
bool
bMultiValued
,
Any
&
aChoices
,
Any
&
rAny
,
bool
bInteractive
)
const
bool
bOpenChoice
,
Any
&
aChoices
,
Any
&
rAny
,
bool
bInteractive
)
{
{
m_pPropertiesWin
->
AddLine
(
sId
,
sName
,
bUpdatable
,
bRequired
,
bMultiValued
,
m_pPropertiesWin
->
AddLine
(
sId
,
sName
,
sType
,
bUpdatable
,
bRequired
,
bMultiValued
,
bOpenChoice
,
aChoices
,
rAny
);
bOpenChoice
,
aChoices
,
rAny
);
m_pVertScroll
->
SetRangeMax
(
m_pPropertiesWin
->
GetLineCount
()
+
1
);
m_pVertScroll
->
SetRangeMax
(
m_pPropertiesWin
->
GetLineCount
()
+
1
);
if
(
bInteractive
&&
m_pPropertiesWin
->
GetOutputSizePixel
().
Height
()
<
if
(
bInteractive
&&
m_pPropertiesWin
->
GetOutputSizePixel
().
Height
()
<
...
@@ -2797,10 +2786,11 @@ void SfxCmisPropertiesPage::Reset( const SfxItemSet& rItemSet )
...
@@ -2797,10 +2786,11 @@ void SfxCmisPropertiesPage::Reset( const SfxItemSet& rItemSet )
m_pPropertiesCtrl
->
ClearAllLines
();
m_pPropertiesCtrl
->
ClearAllLines
();
const
SfxDocumentInfoItem
*
m_pInfoItem
=
&
(
const
SfxDocumentInfoItem
&
)
rItemSet
.
Get
(
SID_DOCINFO
);
const
SfxDocumentInfoItem
*
m_pInfoItem
=
&
(
const
SfxDocumentInfoItem
&
)
rItemSet
.
Get
(
SID_DOCINFO
);
uno
::
Sequence
<
document
::
CmisProperty
>
aCmisProps
=
m_pInfoItem
->
GetCmisProperties
();
uno
::
Sequence
<
document
::
CmisProperty
>
aCmisProps
=
m_pInfoItem
->
GetCmisProperties
();
for
(
sal_
u
Int32
i
=
0
;
i
<
aCmisProps
.
getLength
();
i
++
)
for
(
sal_Int32
i
=
0
;
i
<
aCmisProps
.
getLength
();
i
++
)
{
{
m_pPropertiesCtrl
->
AddLine
(
aCmisProps
[
i
].
Id
,
m_pPropertiesCtrl
->
AddLine
(
aCmisProps
[
i
].
Id
,
aCmisProps
[
i
].
Name
,
aCmisProps
[
i
].
Name
,
aCmisProps
[
i
].
Type
,
aCmisProps
[
i
].
Updatable
,
aCmisProps
[
i
].
Updatable
,
aCmisProps
[
i
].
Required
,
aCmisProps
[
i
].
Required
,
aCmisProps
[
i
].
MultiValued
,
aCmisProps
[
i
].
MultiValued
,
...
@@ -2823,5 +2813,4 @@ SfxTabPage* SfxCmisPropertiesPage::Create( Window* pParent, const SfxItemSet& rI
...
@@ -2823,5 +2813,4 @@ SfxTabPage* SfxCmisPropertiesPage::Create( Window* pParent, const SfxItemSet& rI
return
new
SfxCmisPropertiesPage
(
pParent
,
rItemSet
);
return
new
SfxCmisPropertiesPage
(
pParent
,
rItemSet
);
}
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
sfx2/source/dialog/dinfdlg.hrc
Dosyayı görüntüle @
eb23b2d9
...
@@ -31,11 +31,11 @@
...
@@ -31,11 +31,11 @@
#define CUSTOM_TYPE_DURATION 5
#define CUSTOM_TYPE_DURATION 5
#define CUSTOM_TYPE_DATETIME 6
#define CUSTOM_TYPE_DATETIME 6
#define CMIS_TYPE_ANY "Any"
#define CMIS_TYPE_STRING "String"
#define CMIS_TYPE_STRING "String"
#define CMIS_TYPE_NUMBER "Number"
#define CMIS_TYPE_INTEGER "Integer"
#define CMIS_TYPE_DECIMAL "Decimal"
#define CMIS_TYPE_DATETIME "Datetime"
#define CMIS_TYPE_DATETIME "Datetime"
#define CMIS_TYPE_BOOL
EAN "Boolean
"
#define CMIS_TYPE_BOOL
"Bool
"
// defines ---------------------------------------------------------------
// defines ---------------------------------------------------------------
...
...
ucb/source/ucp/cmis/cmis_content.cxx
Dosyayı görüntüle @
eb23b2d9
...
@@ -47,6 +47,7 @@
...
@@ -47,6 +47,7 @@
#include "cmis_provider.hxx"
#include "cmis_provider.hxx"
#include "cmis_resultset.hxx"
#include "cmis_resultset.hxx"
#include "cmis_oauth2_providers.hxx"
#include "cmis_oauth2_providers.hxx"
#include "cmis_strings.hxx"
#define OUSTR_TO_STDSTR(s) string( OUStringToOString( s, RTL_TEXTENCODING_UTF8 ).getStr() )
#define OUSTR_TO_STDSTR(s) string( OUStringToOString( s, RTL_TEXTENCODING_UTF8 ).getStr() )
#define STD_TO_OUSTR( str ) OUString( str.c_str(), str.length( ), RTL_TEXTENCODING_UTF8 )
#define STD_TO_OUSTR( str ) OUString( str.c_str(), str.length( ), RTL_TEXTENCODING_UTF8 )
...
@@ -205,7 +206,17 @@ namespace
...
@@ -205,7 +206,17 @@ namespace
bool
bMultiValued
=
prop
.
MultiValued
;
bool
bMultiValued
=
prop
.
MultiValued
;
bool
bOpenChoice
=
prop
.
OpenChoice
;
bool
bOpenChoice
=
prop
.
OpenChoice
;
uno
::
Any
value
=
prop
.
Value
;
uno
::
Any
value
=
prop
.
Value
;
libcmis
::
PropertyType
::
Type
type
=
libcmis
::
PropertyType
::
String
;
libcmis
::
PropertyType
::
Type
type
;
if
(
prop
.
Type
==
CMIS_TYPE_STRING
)
type
=
libcmis
::
PropertyType
::
String
;
else
if
(
prop
.
Type
==
CMIS_TYPE_BOOL
)
type
=
libcmis
::
PropertyType
::
Bool
;
else
if
(
prop
.
Type
==
CMIS_TYPE_INTEGER
)
type
=
libcmis
::
PropertyType
::
Integer
;
else
if
(
prop
.
Type
==
CMIS_TYPE_DECIMAL
)
type
=
libcmis
::
PropertyType
::
Decimal
;
else
if
(
prop
.
Type
==
CMIS_TYPE_DATETIME
)
type
=
libcmis
::
PropertyType
::
DateTime
;
propertyType
->
setId
(
OUSTR_TO_STDSTR
(
id
));
propertyType
->
setId
(
OUSTR_TO_STDSTR
(
id
));
propertyType
->
setDisplayName
(
OUSTR_TO_STDSTR
(
name
)
);
propertyType
->
setDisplayName
(
OUSTR_TO_STDSTR
(
name
)
);
...
@@ -682,6 +693,26 @@ namespace cmis
...
@@ -682,6 +693,26 @@ namespace cmis
pCmisProps
[
i
].
MultiValued
=
bMultiValued
;
pCmisProps
[
i
].
MultiValued
=
bMultiValued
;
pCmisProps
[
i
].
OpenChoice
=
bOpenChoice
;
pCmisProps
[
i
].
OpenChoice
=
bOpenChoice
;
pCmisProps
[
i
].
Value
=
lcl_cmisPropertyToUno
(
it
->
second
);
pCmisProps
[
i
].
Value
=
lcl_cmisPropertyToUno
(
it
->
second
);
switch
(
it
->
second
->
getPropertyType
(
)
->
getType
(
)
)
{
default
:
case
libcmis
:
:
PropertyType
::
String
:
pCmisProps
[
i
].
Type
=
CMIS_TYPE_STRING
;
break
;
case
libcmis
:
:
PropertyType
::
Integer
:
pCmisProps
[
i
].
Type
=
CMIS_TYPE_INTEGER
;
break
;
case
libcmis
:
:
PropertyType
::
Decimal
:
pCmisProps
[
i
].
Type
=
CMIS_TYPE_DECIMAL
;
break
;
case
libcmis
:
:
PropertyType
::
Bool
:
pCmisProps
[
i
].
Type
=
CMIS_TYPE_BOOL
;
break
;
case
libcmis
:
:
PropertyType
::
DateTime
:
pCmisProps
[
i
].
Type
=
CMIS_TYPE_DATETIME
;
break
;
}
}
}
xRow
->
appendObject
(
rProp
.
Name
,
uno
::
makeAny
(
aCmisProperties
)
);
xRow
->
appendObject
(
rProp
.
Name
,
uno
::
makeAny
(
aCmisProperties
)
);
}
}
...
...
ucb/source/ucp/cmis/cmis_strings.hxx
0 → 100644
Dosyayı görüntüle @
eb23b2d9
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*
* This file is part of the LibreOffice project.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* This file incorporates work covered by the following license notice:
*
*/
#ifndef CMIS_STRINGS_HXX
#define CMIS_STRINGS_HXX
#define CMIS_TYPE_STRING "String"
#define CMIS_TYPE_INTEGER "Integer"
#define CMIS_TYPE_DECIMAL "Decimal"
#define CMIS_TYPE_DATETIME "Datetime"
#define CMIS_TYPE_BOOL "Bool"
#endif
/* 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