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
b8a6e351
Kaydet (Commit)
b8a6e351
authored
Agu 23, 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: make multiple values
Change-Id: I0d5ed8fbfd113940aadc117bcc7cf751be246071
üst
ac11dee3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
226 additions
and
125 deletions
+226
-125
dinfdlg.hxx
include/sfx2/dinfdlg.hxx
+28
-6
dinfdlg.cxx
sfx2/source/dialog/dinfdlg.cxx
+189
-110
cmisline.ui
sfx2/uiconfig/ui/cmisline.ui
+9
-9
No files found.
include/sfx2/dinfdlg.hxx
Dosyayı görüntüle @
b8a6e351
...
@@ -514,6 +514,29 @@ public:
...
@@ -514,6 +514,29 @@ public:
static
SfxTabPage
*
Create
(
Window
*
pParent
,
const
SfxItemSet
&
);
static
SfxTabPage
*
Create
(
Window
*
pParent
,
const
SfxItemSet
&
);
};
};
struct
CmisValue
:
public
VclBuilderContainer
{
Edit
*
m_aValueEdit
;
CmisValue
(
Window
*
pParent
,
const
OUString
&
aStr
);
};
struct
CmisDateTime
:
public
VclBuilderContainer
{
DateField
*
m_aDateField
;
TimeField
*
m_aTimeField
;
CmisDateTime
(
Window
*
pParent
,
const
::
com
::
sun
::
star
::
util
::
DateTime
&
aDateTime
);
};
struct
CmisYesNo
:
public
VclBuilderContainer
{
RadioButton
*
m_aYesButton
;
RadioButton
*
m_aNoButton
;
CmisYesNo
(
Window
*
pParent
,
bool
bValue
);
};
// struct CmisPropertyLine ---------------------------------------------
// struct CmisPropertyLine ---------------------------------------------
struct
CmisPropertyLine
:
public
VclBuilderContainer
struct
CmisPropertyLine
:
public
VclBuilderContainer
...
@@ -527,14 +550,13 @@ struct CmisPropertyLine : public VclBuilderContainer
...
@@ -527,14 +550,13 @@ struct CmisPropertyLine : public VclBuilderContainer
bool
m_bOpenChoice
;
bool
m_bOpenChoice
;
FixedText
*
m_aName
;
FixedText
*
m_aName
;
FixedText
*
m_aType
;
FixedText
*
m_aType
;
Edit
*
m_aValueEdit
;
std
::
vector
<
CmisValue
*
>
m_aValues
;
DateField
*
m_aDateField
;
std
::
vector
<
CmisDateTime
*
>
m_aDateTimes
;
TimeField
*
m_aTimeField
;
std
::
vector
<
CmisYesNo
*
>
m_aYesNos
;
RadioButton
*
m_aYesButton
;
sal_Int32
m_nNumValue
;
RadioButton
*
m_aNoButton
;
long
getItemHeight
()
const
;
long
getItemHeight
()
const
;
CmisPropertyLine
(
Window
*
pParent
);
CmisPropertyLine
(
Window
*
pParent
);
~
CmisPropertyLine
();
};
};
// class CmisPropertiesWindow ------------------------------------------
// class CmisPropertiesWindow ------------------------------------------
...
...
sfx2/source/dialog/dinfdlg.cxx
Dosyayı görüntüle @
b8a6e351
...
@@ -2144,21 +2144,81 @@ SfxTabPage* SfxCustomPropertiesPage::Create( Window* pParent, const SfxItemSet&
...
@@ -2144,21 +2144,81 @@ SfxTabPage* SfxCustomPropertiesPage::Create( Window* pParent, const SfxItemSet&
return
new
SfxCustomPropertiesPage
(
pParent
,
rItemSet
);
return
new
SfxCustomPropertiesPage
(
pParent
,
rItemSet
);
}
}
CmisValue
::
CmisValue
(
Window
*
pParent
,
const
OUString
&
aStr
)
{
m_pUIBuilder
=
new
VclBuilder
(
pParent
,
getUIRootDir
(),
"sfx/ui/cmisline.ui"
);
get
(
m_aValueEdit
,
"value"
);
m_aValueEdit
->
Show
(
true
);
m_aValueEdit
->
SetText
(
aStr
);
}
CmisDateTime
::
CmisDateTime
(
Window
*
pParent
,
const
util
::
DateTime
&
aDateTime
)
{
m_pUIBuilder
=
new
VclBuilder
(
pParent
,
getUIRootDir
(),
"sfx/ui/cmisline.ui"
);
get
(
m_aDateField
,
"date"
);
get
(
m_aTimeField
,
"time"
);
m_aDateField
->
Show
(
true
);
m_aTimeField
->
Show
(
true
);
m_aDateField
->
SetDate
(
Date
(
aDateTime
.
Day
,
aDateTime
.
Month
,
aDateTime
.
Year
)
);
m_aTimeField
->
SetTime
(
Time
(
aDateTime
.
Hours
,
aDateTime
.
Minutes
,
aDateTime
.
Seconds
,
aDateTime
.
NanoSeconds
)
);
}
CmisYesNo
::
CmisYesNo
(
Window
*
pParent
,
bool
bValue
)
{
m_pUIBuilder
=
new
VclBuilder
(
pParent
,
getUIRootDir
(),
"sfx/ui/cmisline.ui"
);
get
(
m_aYesButton
,
"yes"
);
get
(
m_aNoButton
,
"no"
);
m_aYesButton
->
Show
(
true
);
m_aNoButton
->
Show
(
true
);
if
(
bValue
)
m_aYesButton
->
Check
(
);
else
m_aNoButton
->
Check
(
);
}
// struct CmisPropertyLine ---------------------------------------------
// struct CmisPropertyLine ---------------------------------------------
CmisPropertyLine
::
CmisPropertyLine
(
Window
*
pParent
)
CmisPropertyLine
::
CmisPropertyLine
(
Window
*
pParent
)
{
{
m_nNumValue
=
1
;
m_sId
=
OUString
(
""
);
m_sId
=
OUString
(
""
);
m_sType
=
CMIS_TYPE_STRING
;
m_sType
=
CMIS_TYPE_STRING
;
m_pUIBuilder
=
new
VclBuilder
(
pParent
,
getUIRootDir
(),
"sfx/ui/cmisline.ui"
);
m_pUIBuilder
=
new
VclBuilder
(
pParent
,
getUIRootDir
(),
"sfx/ui/cmisline.ui"
);
get
(
m_pFrame
,
"CmisFrame"
);
get
(
m_pFrame
,
"CmisFrame"
);
m_pFrame
->
Enable
();
get
(
m_aName
,
"name"
);
get
(
m_aName
,
"name"
);
get
(
m_aType
,
"type"
);
get
(
m_aType
,
"type"
);
get
(
m_aValueEdit
,
"value"
);
m_pFrame
->
Enable
();
get
(
m_aYesButton
,
"yes"
);
}
get
(
m_aNoButton
,
"no"
);
get
(
m_aDateField
,
"date"
);
CmisPropertyLine
::~
CmisPropertyLine
(
)
get
(
m_aTimeField
,
"time"
);
{
std
::
vector
<
CmisValue
*
>::
iterator
pIter
;
for
(
pIter
=
m_aValues
.
begin
();
pIter
!=
m_aValues
.
end
();
++
pIter
)
{
CmisValue
*
pValue
=
*
pIter
;
delete
pValue
;
}
m_aValues
.
clear
();
std
::
vector
<
CmisYesNo
*
>::
iterator
pIterYesNo
;
for
(
pIterYesNo
=
m_aYesNos
.
begin
();
pIterYesNo
!=
m_aYesNos
.
end
();
++
pIterYesNo
)
{
CmisYesNo
*
pYesNo
=
*
pIterYesNo
;
delete
pYesNo
;
}
m_aYesNos
.
clear
();
std
::
vector
<
CmisDateTime
*
>::
iterator
pIterDateTime
;
for
(
pIterDateTime
=
m_aDateTimes
.
begin
();
pIterDateTime
!=
m_aDateTimes
.
end
();
++
pIterDateTime
)
{
CmisDateTime
*
pDateTime
=
*
pIterDateTime
;
delete
pDateTime
;
}
m_aDateTimes
.
clear
();
}
}
long
CmisPropertyLine
::
getItemHeight
()
const
long
CmisPropertyLine
::
getItemHeight
()
const
...
@@ -2197,7 +2257,12 @@ void CmisPropertiesWindow::ClearAllLines()
...
@@ -2197,7 +2257,12 @@ void CmisPropertiesWindow::ClearAllLines()
sal_uInt16
CmisPropertiesWindow
::
GetLineCount
()
const
sal_uInt16
CmisPropertiesWindow
::
GetLineCount
()
const
{
{
return
m_aCmisPropertiesLines
.
size
(
);
sal_uInt16
nCount
=
0
;
std
::
vector
<
CmisPropertyLine
*
>::
const_iterator
pIter
;
for
(
pIter
=
m_aCmisPropertiesLines
.
begin
();
pIter
!=
m_aCmisPropertiesLines
.
end
();
++
pIter
)
nCount
+=
(
(
*
pIter
)
->
m_nNumValue
+
1
);
return
nCount
;
}
}
void
CmisPropertiesWindow
::
AddLine
(
const
OUString
&
sId
,
const
OUString
&
sName
,
void
CmisPropertiesWindow
::
AddLine
(
const
OUString
&
sId
,
const
OUString
&
sName
,
...
@@ -2214,62 +2279,80 @@ void CmisPropertiesWindow::AddLine( const OUString& sId, const OUString& sName,
...
@@ -2214,62 +2279,80 @@ void CmisPropertiesWindow::AddLine( const OUString& sId, const OUString& sName,
pNewLine
->
m_bMultiValued
=
bMultiValued
;
pNewLine
->
m_bMultiValued
=
bMultiValued
;
pNewLine
->
m_bOpenChoice
=
bOpenChoice
;
pNewLine
->
m_bOpenChoice
=
bOpenChoice
;
pNewLine
->
m_aValueEdit
->
SetReadOnly
(
!
bUpdatable
);
pNewLine
->
m_aDateField
->
SetReadOnly
(
!
bUpdatable
);
pNewLine
->
m_aTimeField
->
SetReadOnly
(
!
bUpdatable
);
pNewLine
->
m_aYesButton
->
Enable
(
bUpdatable
);
pNewLine
->
m_aNoButton
->
Enable
(
bUpdatable
);
pNewLine
->
m_aName
->
SetText
(
sName
);
OUString
sValue
;
if
(
sType
==
CMIS_TYPE_INTEGER
)
if
(
sType
==
CMIS_TYPE_INTEGER
)
{
{
Sequence
<
sal_Int64
>
nTmp
Value
;
Sequence
<
sal_Int64
>
seq
Value
;
rAny
>>=
nTmp
Value
;
rAny
>>=
seq
Value
;
sal_uInt32
nIndex
=
m_aNumberFormatter
.
GetFormatIndex
(
NF_NUMBER_SYSTEM
);
sal_uInt32
nIndex
=
m_aNumberFormatter
.
GetFormatIndex
(
NF_NUMBER_SYSTEM
);
m_aNumberFormatter
.
GetInputLineString
(
nTmpValue
[
0
],
nIndex
,
sValue
);
sal_Int32
m_nNumValue
=
seqValue
.
getLength
(
);
for
(
sal_Int32
i
=
0
;
i
<
m_nNumValue
;
++
i
)
{
OUString
sValue
;
m_aNumberFormatter
.
GetInputLineString
(
seqValue
[
i
],
nIndex
,
sValue
);
CmisValue
*
pValue
=
new
CmisValue
(
m_pBox
,
sValue
);
pValue
->
m_aValueEdit
->
SetReadOnly
(
!
bUpdatable
);
pNewLine
->
m_aValues
.
push_back
(
pValue
);
}
}
}
else
if
(
sType
==
CMIS_TYPE_DECIMAL
)
else
if
(
sType
==
CMIS_TYPE_DECIMAL
)
{
{
Sequence
<
double
>
dTmp
Value
;
Sequence
<
double
>
seq
Value
;
rAny
>>=
dTmp
Value
;
rAny
>>=
seq
Value
;
sal_uInt32
nIndex
=
m_aNumberFormatter
.
GetFormatIndex
(
NF_NUMBER_SYSTEM
);
sal_uInt32
nIndex
=
m_aNumberFormatter
.
GetFormatIndex
(
NF_NUMBER_SYSTEM
);
m_aNumberFormatter
.
GetInputLineString
(
dTmpValue
[
0
],
nIndex
,
sValue
);
sal_Int32
m_nNumValue
=
seqValue
.
getLength
(
);
for
(
sal_Int32
i
=
0
;
i
<
m_nNumValue
;
++
i
)
{
OUString
sValue
;
m_aNumberFormatter
.
GetInputLineString
(
seqValue
[
i
],
nIndex
,
sValue
);
CmisValue
*
pValue
=
new
CmisValue
(
m_pBox
,
sValue
);
pValue
->
m_aValueEdit
->
SetReadOnly
(
!
bUpdatable
);
pNewLine
->
m_aValues
.
push_back
(
pValue
);
}
}
}
else
if
(
sType
==
CMIS_TYPE_BOOL
)
else
if
(
sType
==
CMIS_TYPE_BOOL
)
{
{
Sequence
<
bool
>
bTmpValue
;
Sequence
<
bool
>
seqValue
;
rAny
>>=
bTmpValue
;
rAny
>>=
seqValue
;
if
(
bTmpValue
[
0
]
)
sal_Int32
m_nNumValue
=
seqValue
.
getLength
(
);
pNewLine
->
m_aYesButton
->
Check
();
for
(
sal_Int32
i
=
0
;
i
<
m_nNumValue
;
++
i
)
else
{
pNewLine
->
m_aNoButton
->
Check
();
CmisYesNo
*
pYesNo
=
new
CmisYesNo
(
m_pBox
,
seqValue
[
i
]
);
pYesNo
->
m_aYesButton
->
Enable
(
bUpdatable
);
pYesNo
->
m_aNoButton
->
Enable
(
bUpdatable
);
pNewLine
->
m_aYesNos
.
push_back
(
pYesNo
);
}
}
}
else
if
(
sType
==
CMIS_TYPE_STRING
)
else
if
(
sType
==
CMIS_TYPE_STRING
)
{
{
Sequence
<
OUString
>
seqValue
;
Sequence
<
OUString
>
seqValue
;
rAny
>>=
seqValue
;
rAny
>>=
seqValue
;
sValue
=
seqValue
[
0
];
sal_Int32
m_nNumValue
=
seqValue
.
getLength
(
);
for
(
sal_Int32
i
=
0
;
i
<
m_nNumValue
;
++
i
)
{
CmisValue
*
pValue
=
new
CmisValue
(
m_pBox
,
seqValue
[
i
]
);
pValue
->
m_aValueEdit
->
SetReadOnly
(
!
bUpdatable
);
pNewLine
->
m_aValues
.
push_back
(
pValue
);
}
}
}
else
if
(
sType
==
CMIS_TYPE_DATETIME
)
else
if
(
sType
==
CMIS_TYPE_DATETIME
)
{
{
Sequence
<
util
::
DateTime
>
aTmpDateTime
;
Sequence
<
util
::
DateTime
>
seqValue
;
rAny
>>=
aTmpDateTime
;
rAny
>>=
seqValue
;
pNewLine
->
m_aDateField
->
SetDate
(
Date
(
aTmpDateTime
[
0
].
Day
,
aTmpDateTime
[
0
].
Month
,
aTmpDateTime
[
0
].
Year
)
);
sal_Int32
m_nNumValue
=
seqValue
.
getLength
(
);
pNewLine
->
m_aTimeField
->
SetTime
(
Time
(
aTmpDateTime
[
0
].
Hours
,
aTmpDateTime
[
0
].
Minutes
,
aTmpDateTime
[
0
].
Seconds
,
aTmpDateTime
[
0
].
NanoSeconds
)
);
for
(
sal_Int32
i
=
0
;
i
<
m_nNumValue
;
++
i
)
{
CmisDateTime
*
pDateTime
=
new
CmisDateTime
(
m_pBox
,
seqValue
[
i
]);
pDateTime
->
m_aDateField
->
SetReadOnly
(
!
bUpdatable
);
pDateTime
->
m_aTimeField
->
SetReadOnly
(
!
bUpdatable
);
pNewLine
->
m_aDateTimes
.
push_back
(
pDateTime
);
}
}
pNewLine
->
m_aValueEdit
->
SetText
(
sValue
);
}
pNewLine
->
m_aName
->
SetText
(
sName
);
pNewLine
->
m_aName
->
Show
(
true
);
pNewLine
->
m_aType
->
SetText
(
sType
);
pNewLine
->
m_aType
->
SetText
(
sType
);
pNewLine
->
m_aValueEdit
->
Show
(
CMIS_TYPE_STRING
==
sType
||
pNewLine
->
m_aType
->
Show
(
true
);
CMIS_TYPE_INTEGER
==
sType
||
CMIS_TYPE_DECIMAL
==
sType
);
pNewLine
->
m_aDateField
->
Show
(
CMIS_TYPE_DATETIME
==
sType
);
pNewLine
->
m_aTimeField
->
Show
(
CMIS_TYPE_DATETIME
==
sType
);
pNewLine
->
m_aYesButton
->
Show
(
CMIS_TYPE_BOOL
==
sType
);
pNewLine
->
m_aNoButton
->
Show
(
CMIS_TYPE_BOOL
==
sType
);
m_aCmisPropertiesLines
.
push_back
(
pNewLine
);
m_aCmisPropertiesLines
.
push_back
(
pNewLine
);
}
}
...
@@ -2301,41 +2384,82 @@ Sequence< document::CmisProperty > CmisPropertiesWindow::GetCmisProperties() con
...
@@ -2301,41 +2384,82 @@ 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_INTEGER
==
sType
||
if
(
CMIS_TYPE_DECIMAL
==
sType
)
CMIS_TYPE_DECIMAL
==
sType
)
{
sal_uInt32
nIndex
=
const_cast
<
SvNumberFormatter
&
>
(
m_aNumberFormatter
).
GetFormatIndex
(
NF_NUMBER_SYSTEM
);
Sequence
<
double
>
seqValue
(
pLine
->
m_aValues
.
size
(
)
);
sal_Int32
k
=
0
;
for
(
std
::
vector
<
CmisValue
*>::
const_iterator
it
=
pLine
->
m_aValues
.
begin
();
it
!=
pLine
->
m_aValues
.
end
();
++
it
,
++
k
)
{
double
dValue
=
0.0
;
OUString
sValue
(
(
*
it
)
->
m_aValueEdit
->
GetText
()
);
sal_Bool
bIsNum
=
const_cast
<
SvNumberFormatter
&
>
(
m_aNumberFormatter
).
IsNumberFormat
(
sValue
,
nIndex
,
dValue
);
if
(
bIsNum
)
seqValue
[
k
]
=
dValue
;
}
aPropertiesSeq
[
i
].
Value
<<=
makeAny
(
seqValue
);
}
else
if
(
CMIS_TYPE_INTEGER
==
sType
)
{
{
double
nValue
=
0
;
sal_uInt32
nIndex
=
const_cast
<
SvNumberFormatter
&
>
(
sal_uInt32
nIndex
=
const_cast
<
SvNumberFormatter
&
>
(
m_aNumberFormatter
).
GetFormatIndex
(
NF_NUMBER_SYSTEM
);
m_aNumberFormatter
).
GetFormatIndex
(
NF_NUMBER_SYSTEM
);
Sequence
<
sal_Int64
>
seqValue
(
pLine
->
m_aValues
.
size
(
)
);
sal_Int32
k
=
0
;
for
(
std
::
vector
<
CmisValue
*>::
const_iterator
it
=
pLine
->
m_aValues
.
begin
();
it
!=
pLine
->
m_aValues
.
end
();
++
it
,
++
k
)
{
double
dValue
=
0
;
OUString
sValue
(
(
*
it
)
->
m_aValueEdit
->
GetText
()
);
sal_Bool
bIsNum
=
const_cast
<
SvNumberFormatter
&
>
(
m_aNumberFormatter
).
sal_Bool
bIsNum
=
const_cast
<
SvNumberFormatter
&
>
(
m_aNumberFormatter
).
IsNumberFormat
(
pLine
->
m_aValueEdit
->
GetText
(),
nIndex
,
nValue
);
IsNumberFormat
(
sValue
,
nIndex
,
dValue
);
Sequence
<
double
>
seqValue
(
1
);
seqValue
[
0
]
=
nValue
;
if
(
bIsNum
)
if
(
bIsNum
)
seqValue
[
k
]
=
(
sal_Int64
)
dValue
;
}
aPropertiesSeq
[
i
].
Value
<<=
makeAny
(
seqValue
);
aPropertiesSeq
[
i
].
Value
<<=
makeAny
(
seqValue
);
}
}
else
if
(
CMIS_TYPE_BOOL
==
sType
)
else
if
(
CMIS_TYPE_BOOL
==
sType
)
{
{
bool
bValue
=
pLine
->
m_aYesButton
->
IsChecked
();
Sequence
<
bool
>
seqValue
(
pLine
->
m_aYesNos
.
size
(
)
);
Sequence
<
bool
>
seqValue
(
1
);
sal_Int32
k
=
0
;
seqValue
[
0
]
=
bValue
;
for
(
std
::
vector
<
CmisYesNo
*>::
const_iterator
it
=
pLine
->
m_aYesNos
.
begin
();
it
!=
pLine
->
m_aYesNos
.
end
();
++
it
,
++
k
)
{
bool
bValue
=
(
*
it
)
->
m_aYesButton
->
IsChecked
();
seqValue
[
k
]
=
bValue
;
}
aPropertiesSeq
[
i
].
Value
<<=
makeAny
(
seqValue
);
aPropertiesSeq
[
i
].
Value
<<=
makeAny
(
seqValue
);
}
}
else
if
(
CMIS_TYPE_DATETIME
==
sType
)
else
if
(
CMIS_TYPE_DATETIME
==
sType
)
{
{
Date
aTmpDate
=
pLine
->
m_aDateField
->
GetDate
();
Sequence
<
util
::
DateTime
>
seqValue
(
pLine
->
m_aDateTimes
.
size
(
)
);
Time
aTmpTime
=
pLine
->
m_aTimeField
->
GetTime
();
sal_Int32
k
=
0
;
util
::
DateTime
aDateTime
(
aTmpTime
.
GetNanoSec
(),
aTmpTime
.
GetSec
(),
aTmpTime
.
GetMin
(),
aTmpTime
.
GetHour
(),
for
(
std
::
vector
<
CmisDateTime
*>::
const_iterator
it
=
pLine
->
m_aDateTimes
.
begin
();
aTmpDate
.
GetDay
(),
aTmpDate
.
GetMonth
(),
aTmpDate
.
GetYear
()
);
it
!=
pLine
->
m_aDateTimes
.
end
();
++
it
,
++
k
)
Sequence
<
util
::
DateTime
>
seqValue
(
1
);
{
seqValue
[
0
]
=
aDateTime
;
Date
aTmpDate
=
(
*
it
)
->
m_aDateField
->
GetDate
();
aPropertiesSeq
[
i
].
Value
<<=
seqValue
;
Time
aTmpTime
=
(
*
it
)
->
m_aTimeField
->
GetTime
();
util
::
DateTime
aDateTime
(
aTmpTime
.
GetNanoSec
(),
aTmpTime
.
GetSec
(),
aTmpTime
.
GetMin
(),
aTmpTime
.
GetHour
(),
aTmpDate
.
GetDay
(),
aTmpDate
.
GetMonth
(),
aTmpDate
.
GetYear
()
);
seqValue
[
k
]
=
aDateTime
;
}
aPropertiesSeq
[
i
].
Value
<<=
makeAny
(
seqValue
);
}
}
else
else
{
{
OUString
sValue
(
pLine
->
m_aValueEdit
->
GetText
()
);
Sequence
<
OUString
>
seqValue
(
pLine
->
m_aValues
.
size
(
)
);
Sequence
<
OUString
>
seqValue
(
1
);
sal_Int32
k
=
0
;
seqValue
[
0
]
=
sValue
;
for
(
std
::
vector
<
CmisValue
*>::
const_iterator
it
=
pLine
->
m_aValues
.
begin
();
it
!=
pLine
->
m_aValues
.
end
();
++
it
,
++
k
)
{
OUString
sValue
(
(
*
it
)
->
m_aValueEdit
->
GetText
()
);
seqValue
[
k
]
=
sValue
;
}
aPropertiesSeq
[
i
].
Value
<<=
makeAny
(
seqValue
);
aPropertiesSeq
[
i
].
Value
<<=
makeAny
(
seqValue
);
}
}
}
}
...
@@ -2388,8 +2512,6 @@ void CmisPropertiesControl::setScrollRange()
...
@@ -2388,8 +2512,6 @@ void CmisPropertiesControl::setScrollRange()
{
{
sal_Int32
nScrollOffset
=
m_pPropertiesWin
.
GetItemHeight
();
sal_Int32
nScrollOffset
=
m_pPropertiesWin
.
GetItemHeight
();
sal_Int32
nVisibleItems
=
m_rScrolledWindow
.
getVisibleChildSize
().
Height
()
/
nScrollOffset
;
sal_Int32
nVisibleItems
=
m_rScrolledWindow
.
getVisibleChildSize
().
Height
()
/
nScrollOffset
;
if
(
!
nVisibleItems
)
nVisibleItems
=
m_pPropertiesWin
.
GetLineCount
()
/
2
;
m_rVertScroll
.
SetPageSize
(
nVisibleItems
-
1
);
m_rVertScroll
.
SetPageSize
(
nVisibleItems
-
1
);
m_rVertScroll
.
SetVisibleSize
(
nVisibleItems
);
m_rVertScroll
.
SetVisibleSize
(
nVisibleItems
);
m_rVertScroll
.
Scroll
();
m_rVertScroll
.
Scroll
();
...
@@ -2442,33 +2564,9 @@ sal_Bool SfxCmisPropertiesPage::FillItemSet( SfxItemSet& rSet )
...
@@ -2442,33 +2564,9 @@ sal_Bool SfxCmisPropertiesPage::FillItemSet( SfxItemSet& rSet )
std
::
vector
<
document
::
CmisProperty
>
changedProps
;
std
::
vector
<
document
::
CmisProperty
>
changedProps
;
for
(
sal_Int32
i
=
0
;
i
<
aNewProps
.
getLength
(
);
++
i
)
for
(
sal_Int32
i
=
0
;
i
<
aNewProps
.
getLength
(
);
++
i
)
if
(
aOldProps
[
i
].
Updatable
)
if
(
aOldProps
[
i
].
Updatable
&&
!
aNewProps
[
i
].
Id
.
isEmpty
(
)
)
{
if
(
aOldProps
[
i
].
Type
==
CMIS_TYPE_STRING
)
{
Sequence
<
OUString
>
oldValue
;
aOldProps
[
i
].
Value
>>=
oldValue
;
Sequence
<
OUString
>
newValue
;
aNewProps
[
i
].
Value
>>=
newValue
;
if
(
!
aNewProps
[
i
].
Id
.
isEmpty
()
&&
aNewProps
[
i
].
Updatable
&&
oldValue
!=
newValue
)
{
modifiedNum
++
;
changedProps
.
push_back
(
aNewProps
[
i
]
);
}
}
else
if
(
aOldProps
[
i
].
Type
==
CMIS_TYPE_BOOL
)
{
{
Sequence
<
bool
>
oldValue
;
if
(
aOldProps
[
i
].
Type
==
CMIS_TYPE_DATETIME
)
aOldProps
[
i
].
Value
>>=
oldValue
;
Sequence
<
bool
>
newValue
;
aNewProps
[
i
].
Value
>>=
newValue
;
if
(
!
aNewProps
[
i
].
Id
.
isEmpty
()
&&
aNewProps
[
i
].
Updatable
&&
oldValue
!=
newValue
)
{
modifiedNum
++
;
changedProps
.
push_back
(
aNewProps
[
i
]
);
}
}
else
if
(
aOldProps
[
i
].
Type
==
CMIS_TYPE_DATETIME
)
{
{
Sequence
<
util
::
DateTime
>
oldValue
;
Sequence
<
util
::
DateTime
>
oldValue
;
aOldProps
[
i
].
Value
>>=
oldValue
;
aOldProps
[
i
].
Value
>>=
oldValue
;
...
@@ -2481,37 +2579,18 @@ sal_Bool SfxCmisPropertiesPage::FillItemSet( SfxItemSet& rSet )
...
@@ -2481,37 +2579,18 @@ sal_Bool SfxCmisPropertiesPage::FillItemSet( SfxItemSet& rSet )
}
}
Sequence
<
util
::
DateTime
>
newValue
;
Sequence
<
util
::
DateTime
>
newValue
;
aNewProps
[
i
].
Value
>>=
newValue
;
aNewProps
[
i
].
Value
>>=
newValue
;
if
(
!
aNewProps
[
i
].
Id
.
isEmpty
()
&&
aNewProps
[
i
].
Updatable
&&
oldValue
!=
newValue
)
if
(
oldValue
!=
newValue
)
{
{
modifiedNum
++
;
modifiedNum
++
;
changedProps
.
push_back
(
aNewProps
[
i
]
);
changedProps
.
push_back
(
aNewProps
[
i
]
);
}
}
}
}
else
if
(
aOldProps
[
i
].
Type
==
CMIS_TYPE_INTEGER
)
else
if
(
aOldProps
[
i
].
Value
!=
aNewProps
[
i
].
Value
)
{
Sequence
<
sal_Int64
>
oldValue
;
aOldProps
[
i
].
Value
>>=
oldValue
;
Sequence
<
sal_Int64
>
newValue
;
aNewProps
[
i
].
Value
>>=
newValue
;
if
(
!
aNewProps
[
i
].
Id
.
isEmpty
()
&&
aNewProps
[
i
].
Updatable
&&
oldValue
!=
newValue
)
{
{
modifiedNum
++
;
modifiedNum
++
;
changedProps
.
push_back
(
aNewProps
[
i
]
);
changedProps
.
push_back
(
aNewProps
[
i
]
);
}
}
}
}
else
if
(
aOldProps
[
i
].
Type
==
CMIS_TYPE_DECIMAL
)
{
Sequence
<
double
>
oldValue
;
aOldProps
[
i
].
Value
>>=
oldValue
;
Sequence
<
double
>
newValue
;
aNewProps
[
i
].
Value
>>=
newValue
;
if
(
!
aNewProps
[
i
].
Id
.
isEmpty
()
&&
aNewProps
[
i
].
Updatable
&&
oldValue
!=
newValue
)
{
modifiedNum
++
;
changedProps
.
push_back
(
aNewProps
[
i
]
);
}
}
}
Sequence
<
document
::
CmisProperty
>
aModifiedProps
(
modifiedNum
);
Sequence
<
document
::
CmisProperty
>
aModifiedProps
(
modifiedNum
);
sal_Int32
nCount
=
0
;
sal_Int32
nCount
=
0
;
for
(
std
::
vector
<
document
::
CmisProperty
>::
const_iterator
pIter
=
changedProps
.
begin
();
for
(
std
::
vector
<
document
::
CmisProperty
>::
const_iterator
pIter
=
changedProps
.
begin
();
...
...
sfx2/uiconfig/ui/cmisline.ui
Dosyayı görüntüle @
b8a6e351
...
@@ -6,6 +6,7 @@
...
@@ -6,6 +6,7 @@
<property
name=
"can_focus"
>
False
</property>
<property
name=
"can_focus"
>
False
</property>
<property
name=
"border_width"
>
6
</property>
<property
name=
"border_width"
>
6
</property>
<property
name=
"label_xalign"
>
0
</property>
<property
name=
"label_xalign"
>
0
</property>
<property
name=
"label_yalign"
>
0
</property>
<property
name=
"shadow_type"
>
none
</property>
<property
name=
"shadow_type"
>
none
</property>
<child>
<child>
<object
class=
"GtkAlignment"
id=
"alignment1"
>
<object
class=
"GtkAlignment"
id=
"alignment1"
>
...
@@ -23,9 +24,9 @@
...
@@ -23,9 +24,9 @@
<object
class=
"GtkLabel"
id=
"name"
>
<object
class=
"GtkLabel"
id=
"name"
>
<property
name=
"visible"
>
True
</property>
<property
name=
"visible"
>
True
</property>
<property
name=
"can_focus"
>
False
</property>
<property
name=
"can_focus"
>
False
</property>
<property
name=
"x
pad"
>
95
</property>
<property
name=
"x
align"
>
0
</property>
<property
name=
"
label"
translatable=
"yes"
>
Name
</property>
<property
name=
"
yalign"
>
0
</property>
<property
name=
"width_chars"
>
26
</property>
<property
name=
"width_chars"
>
30
</property>
<attributes>
<attributes>
<attribute
name=
"weight"
value=
"bold"
/>
<attribute
name=
"weight"
value=
"bold"
/>
</attributes>
</attributes>
...
@@ -39,9 +40,9 @@
...
@@ -39,9 +40,9 @@
</child>
</child>
<child>
<child>
<object
class=
"GtkLabel"
id=
"type"
>
<object
class=
"GtkLabel"
id=
"type"
>
<property
name=
"visible"
>
True
</property>
<property
name=
"can_focus"
>
False
</property>
<property
name=
"can_focus"
>
False
</property>
<property
name=
"xpad"
>
47
</property>
<property
name=
"xalign"
>
0
</property>
<property
name=
"yalign"
>
0
</property>
<property
name=
"label"
translatable=
"yes"
>
Type
</property>
<property
name=
"label"
translatable=
"yes"
>
Type
</property>
<property
name=
"width_chars"
>
8
</property>
<property
name=
"width_chars"
>
8
</property>
<attributes>
<attributes>
...
@@ -59,12 +60,12 @@
...
@@ -59,12 +60,12 @@
<object
class=
"GtkRadioButton"
id=
"yes"
>
<object
class=
"GtkRadioButton"
id=
"yes"
>
<property
name=
"label"
translatable=
"yes"
>
Yes
</property>
<property
name=
"label"
translatable=
"yes"
>
Yes
</property>
<property
name=
"use_action_appearance"
>
False
</property>
<property
name=
"use_action_appearance"
>
False
</property>
<property
name=
"visible"
>
True
</property>
<property
name=
"can_focus"
>
True
</property>
<property
name=
"can_focus"
>
True
</property>
<property
name=
"receives_default"
>
False
</property>
<property
name=
"receives_default"
>
False
</property>
<property
name=
"use_action_appearance"
>
False
</property>
<property
name=
"use_action_appearance"
>
False
</property>
<property
name=
"use_underline"
>
True
</property>
<property
name=
"use_underline"
>
True
</property>
<property
name=
"xalign"
>
0
</property>
<property
name=
"xalign"
>
0
</property>
<property
name=
"yalign"
>
0
</property>
<property
name=
"active"
>
True
</property>
<property
name=
"active"
>
True
</property>
<property
name=
"draw_indicator"
>
True
</property>
<property
name=
"draw_indicator"
>
True
</property>
<property
name=
"group"
>
no
</property>
<property
name=
"group"
>
no
</property>
...
@@ -80,12 +81,12 @@
...
@@ -80,12 +81,12 @@
<object
class=
"GtkRadioButton"
id=
"no"
>
<object
class=
"GtkRadioButton"
id=
"no"
>
<property
name=
"label"
translatable=
"yes"
>
No
</property>
<property
name=
"label"
translatable=
"yes"
>
No
</property>
<property
name=
"use_action_appearance"
>
False
</property>
<property
name=
"use_action_appearance"
>
False
</property>
<property
name=
"visible"
>
True
</property>
<property
name=
"can_focus"
>
True
</property>
<property
name=
"can_focus"
>
True
</property>
<property
name=
"receives_default"
>
False
</property>
<property
name=
"receives_default"
>
False
</property>
<property
name=
"use_action_appearance"
>
False
</property>
<property
name=
"use_action_appearance"
>
False
</property>
<property
name=
"use_underline"
>
True
</property>
<property
name=
"use_underline"
>
True
</property>
<property
name=
"xalign"
>
0
</property>
<property
name=
"xalign"
>
0
</property>
<property
name=
"yalign"
>
0
</property>
<property
name=
"draw_indicator"
>
True
</property>
<property
name=
"draw_indicator"
>
True
</property>
<property
name=
"group"
>
yes
</property>
<property
name=
"group"
>
yes
</property>
</object>
</object>
...
@@ -98,9 +99,8 @@
...
@@ -98,9 +99,8 @@
</child>
</child>
<child>
<child>
<object
class=
"GtkEntry"
id=
"value"
>
<object
class=
"GtkEntry"
id=
"value"
>
<property
name=
"visible"
>
True
</property>
<property
name=
"can_focus"
>
True
</property>
<property
name=
"can_focus"
>
True
</property>
<property
name=
"max_length"
>
8
0
</property>
<property
name=
"max_length"
>
30
0
</property>
<property
name=
"width_chars"
>
55
</property>
<property
name=
"width_chars"
>
55
</property>
</object>
</object>
<packing>
<packing>
...
...
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