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
dbfbfd08
Kaydet (Commit)
dbfbfd08
authored
Haz 07, 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 dialog
Fix properties type editing Change-Id: Ic36f0351ec738e7444508f8326c23e89150c9603
üst
ef3007ac
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
56 additions
and
54 deletions
+56
-54
dinfdlg.hxx
include/sfx2/dinfdlg.hxx
+2
-5
dinfdlg.cxx
sfx2/source/dialog/dinfdlg.cxx
+30
-49
dinfdlg.hrc
sfx2/source/dialog/dinfdlg.hrc
+6
-0
dinfdlg.src
sfx2/source/dialog/dinfdlg.src
+17
-0
sfxlocal.hrc
sfx2/source/inc/sfxlocal.hrc
+1
-0
No files found.
include/sfx2/dinfdlg.hxx
Dosyayı görüntüle @
dbfbfd08
...
@@ -594,14 +594,12 @@ public:
...
@@ -594,14 +594,12 @@ public:
struct
CmisPropertyLine
struct
CmisPropertyLine
{
{
ComboBox
m_aNameBox
;
SelectableFixedText
m_aNameBox
;
CmisPropertiesTypeBox
m_aTypeBox
;
CmisPropertiesTypeBox
m_aTypeBox
;
CmisPropertiesEdit
m_aValueEdit
;
CmisPropertiesEdit
m_aValueEdit
;
CmisPropertiesDateField
m_aDateField
;
CmisPropertiesDateField
m_aDateField
;
CmisPropertiesTimeField
m_aTimeField
;
CmisPropertiesTimeField
m_aTimeField
;
CmisPropertiesEditButton
m_aEditButton
;
CmisPropertiesYesNoButton
m_aYesNoButton
;
CmisPropertiesYesNoButton
m_aYesNoButton
;
Point
m_aDatePos
;
Point
m_aDatePos
;
Point
m_aTimePos
;
Point
m_aTimePos
;
Size
m_aDateTimeSize
;
Size
m_aDateTimeSize
;
...
@@ -617,12 +615,11 @@ struct CmisPropertyLine
...
@@ -617,12 +615,11 @@ struct CmisPropertyLine
class
CmisPropertiesWindow
:
public
Window
class
CmisPropertiesWindow
:
public
Window
{
{
private
:
private
:
ComboBox
m_aNameBox
;
SelectableFixedText
m_aNameBox
;
ListBox
m_aTypeBox
;
ListBox
m_aTypeBox
;
Edit
m_aValueEdit
;
Edit
m_aValueEdit
;
DateField
m_aDateField
;
DateField
m_aDateField
;
TimeField
m_aTimeField
;
TimeField
m_aTimeField
;
PushButton
m_aEditButton
;
CmisPropertiesYesNoButton
m_aYesNoButton
;
CmisPropertiesYesNoButton
m_aYesNoButton
;
sal_Int32
m_nLineHeight
;
sal_Int32
m_nLineHeight
;
...
...
sfx2/source/dialog/dinfdlg.cxx
Dosyayı görüntüle @
dbfbfd08
...
@@ -2211,12 +2211,11 @@ void CmisPropertiesYesNoButton::Resize()
...
@@ -2211,12 +2211,11 @@ void CmisPropertiesYesNoButton::Resize()
// struct CmisPropertyLine ---------------------------------------------
// struct CmisPropertyLine ---------------------------------------------
CmisPropertyLine
::
CmisPropertyLine
(
Window
*
pParent
)
:
CmisPropertyLine
::
CmisPropertyLine
(
Window
*
pParent
)
:
m_aNameBox
(
pParent
,
SfxResId
(
SFX_CB_PROPERTY_NAME
)
),
m_aNameBox
(
pParent
),
m_aTypeBox
(
pParent
,
SfxResId
(
SFX_LB_PROPERTY_TYPE
),
this
),
m_aTypeBox
(
pParent
,
SfxResId
(
SFX_LB_
CMIS_
PROPERTY_TYPE
),
this
),
m_aValueEdit
(
pParent
,
SfxResId
(
SFX_ED_PROPERTY_VALUE
),
this
),
m_aValueEdit
(
pParent
,
SfxResId
(
SFX_ED_PROPERTY_VALUE
),
this
),
m_aDateField
(
pParent
,
SfxResId
(
SFX_FLD_DATE
),
this
),
m_aDateField
(
pParent
,
SfxResId
(
SFX_FLD_DATE
),
this
),
m_aTimeField
(
pParent
,
SfxResId
(
SFX_FLD_TIME
),
this
),
m_aTimeField
(
pParent
,
SfxResId
(
SFX_FLD_TIME
),
this
),
m_aEditButton
(
pParent
,
SfxResId
(
SFX_PB_EDIT
),
this
),
m_aYesNoButton
(
pParent
,
SfxResId
(
SFX_WIN_PROPERTY_YESNO
)
),
m_aYesNoButton
(
pParent
,
SfxResId
(
SFX_WIN_PROPERTY_YESNO
)
),
m_bTypeLostFocus
(
false
)
m_bTypeLostFocus
(
false
)
...
@@ -2232,12 +2231,11 @@ CmisPropertiesWindow::CmisPropertiesWindow(Window* pParent,
...
@@ -2232,12 +2231,11 @@ CmisPropertiesWindow::CmisPropertiesWindow(Window* pParent,
const
OUString
&
rHeaderAccType
,
const
OUString
&
rHeaderAccType
,
const
OUString
&
rHeaderAccValue
)
:
const
OUString
&
rHeaderAccValue
)
:
Window
(
pParent
),
Window
(
pParent
),
m_aNameBox
(
this
,
SfxResId
(
SFX_CB_PROPERTY_NAME
)
),
m_aNameBox
(
this
),
m_aTypeBox
(
this
,
SfxResId
(
SFX_LB_PROPERTY_TYPE
)
),
m_aTypeBox
(
this
,
SfxResId
(
SFX_LB_
CMIS_
PROPERTY_TYPE
)
),
m_aValueEdit
(
this
,
SfxResId
(
SFX_ED_PROPERTY_VALUE
)
),
m_aValueEdit
(
this
,
SfxResId
(
SFX_ED_PROPERTY_VALUE
)
),
m_aDateField
(
this
,
SfxResId
(
SFX_FLD_DATE
)
),
m_aDateField
(
this
,
SfxResId
(
SFX_FLD_DATE
)
),
m_aTimeField
(
this
,
SfxResId
(
SFX_FLD_TIME
)
),
m_aTimeField
(
this
,
SfxResId
(
SFX_FLD_TIME
)
),
m_aEditButton
(
this
,
SfxResId
(
SFX_PB_EDIT
)),
m_aYesNoButton
(
this
,
SfxResId
(
SFX_WIN_PROPERTY_YESNO
)
),
m_aYesNoButton
(
this
,
SfxResId
(
SFX_WIN_PROPERTY_YESNO
)
),
m_nScrollPos
(
0
),
m_nScrollPos
(
0
),
m_aNumberFormatter
(
::
comphelper
::
getProcessComponentContext
(),
m_aNumberFormatter
(
::
comphelper
::
getProcessComponentContext
(),
...
@@ -2260,14 +2258,12 @@ IMPL_LINK( CmisPropertiesWindow, TypeHdl, CmisPropertiesTypeBox*, pBox )
...
@@ -2260,14 +2258,12 @@ IMPL_LINK( CmisPropertiesWindow, TypeHdl, CmisPropertiesTypeBox*, pBox )
{
{
sal_Int64
nType
=
sal_Int64
(
(
long
)
pBox
->
GetEntryData
(
pBox
->
GetSelectEntryPos
()
)
);
sal_Int64
nType
=
sal_Int64
(
(
long
)
pBox
->
GetEntryData
(
pBox
->
GetSelectEntryPos
()
)
);
CmisPropertyLine
*
pLine
=
pBox
->
GetLine
();
CmisPropertyLine
*
pLine
=
pBox
->
GetLine
();
pLine
->
m_aValueEdit
.
Show
(
(
CUSTOM_TYPE_TEXT
==
nType
)
||
(
CUSTOM_TYPE_NUMBER
==
nType
)
);
pLine
->
m_aValueEdit
.
Show
(
(
CMIS_TYPE_STRING
==
nType
)
||
(
CMIS_TYPE_NUMBER
==
nType
)
);
pLine
->
m_aDateField
.
Show
(
(
CUSTOM_TYPE_DATE
==
nType
)
||
(
CUSTOM_TYPE_DATETIME
==
nType
)
);
pLine
->
m_aDateField
.
Show
(
CMIS_TYPE_DATETIME
==
nType
);
pLine
->
m_aTimeField
.
Show
(
C
USTOM
_TYPE_DATETIME
==
nType
);
pLine
->
m_aTimeField
.
Show
(
C
MIS
_TYPE_DATETIME
==
nType
);
pLine
->
m_aYesNoButton
.
Show
(
C
USTOM
_TYPE_BOOLEAN
==
nType
);
pLine
->
m_aYesNoButton
.
Show
(
C
MIS
_TYPE_BOOLEAN
==
nType
);
if
(
nType
==
CUSTOM_TYPE_DATE
)
if
(
nType
==
CMIS_TYPE_DATETIME
)
pLine
->
m_aDateField
.
SetPosSizePixel
(
pLine
->
m_aValueEdit
.
GetPosPixel
(),
pLine
->
m_aValueEdit
.
GetSizePixel
());
else
if
(
nType
==
CUSTOM_TYPE_DATETIME
)
{
{
pLine
->
m_aDateField
.
SetPosSizePixel
(
pLine
->
m_aDatePos
,
pLine
->
m_aDateTimeSize
);
pLine
->
m_aDateField
.
SetPosSizePixel
(
pLine
->
m_aDatePos
,
pLine
->
m_aDateTimeSize
);
pLine
->
m_aTimeField
.
SetPosSizePixel
(
pLine
->
m_aTimePos
,
pLine
->
m_aDateTimeSize
);
pLine
->
m_aTimeField
.
SetPosSizePixel
(
pLine
->
m_aTimePos
,
pLine
->
m_aDateTimeSize
);
...
@@ -2314,10 +2310,10 @@ bool CmisPropertiesWindow::IsLineValid( CmisPropertyLine* pLine ) const
...
@@ -2314,10 +2310,10 @@ bool CmisPropertiesWindow::IsLineValid( CmisPropertyLine* pLine ) const
return
true
;
return
true
;
sal_uInt32
nIndex
=
0xFFFFFFFF
;
sal_uInt32
nIndex
=
0xFFFFFFFF
;
if
(
C
USTOM
_TYPE_NUMBER
==
nType
)
if
(
C
MIS
_TYPE_NUMBER
==
nType
)
nIndex
=
const_cast
<
SvNumberFormatter
&
>
(
nIndex
=
const_cast
<
SvNumberFormatter
&
>
(
m_aNumberFormatter
).
GetFormatIndex
(
NF_NUMBER_SYSTEM
);
m_aNumberFormatter
).
GetFormatIndex
(
NF_NUMBER_SYSTEM
);
else
if
(
C
USTOM_TYPE_DAT
E
==
nType
)
else
if
(
C
MIS_TYPE_DATETIM
E
==
nType
)
nIndex
=
const_cast
<
SvNumberFormatter
&
>
(
nIndex
=
const_cast
<
SvNumberFormatter
&
>
(
m_aNumberFormatter
).
GetFormatIndex
(
NF_DATE_SYS_DDMMYYYY
);
m_aNumberFormatter
).
GetFormatIndex
(
NF_DATE_SYS_DDMMYYYY
);
...
@@ -2343,7 +2339,7 @@ void CmisPropertiesWindow::ValidateLine( CmisPropertyLine* pLine, bool bIsFromTy
...
@@ -2343,7 +2339,7 @@ void CmisPropertiesWindow::ValidateLine( CmisPropertyLine* pLine, bool bIsFromTy
pLine
->
m_bTypeLostFocus
=
true
;
pLine
->
m_bTypeLostFocus
=
true
;
Window
*
pParent
=
GetParent
()
->
GetParent
();
Window
*
pParent
=
GetParent
()
->
GetParent
();
if
(
QueryBox
(
pParent
,
SfxResId
(
SFX_QB_WRONG_TYPE
)
).
Execute
()
==
RET_OK
)
if
(
QueryBox
(
pParent
,
SfxResId
(
SFX_QB_WRONG_TYPE
)
).
Execute
()
==
RET_OK
)
pLine
->
m_aTypeBox
.
SelectEntryPos
(
m_aTypeBox
.
GetEntryPos
(
(
void
*
)
C
USTOM_TYPE_TEXT
)
);
pLine
->
m_aTypeBox
.
SelectEntryPos
(
m_aTypeBox
.
GetEntryPos
(
(
void
*
)
C
MIS_TYPE_STRING
)
);
else
else
pLine
->
m_aValueEdit
.
GrabFocus
();
pLine
->
m_aValueEdit
.
GrabFocus
();
}
}
...
@@ -2359,11 +2355,8 @@ void CmisPropertiesWindow::InitControls( HeaderBar* pHeaderBar, const ScrollBar*
...
@@ -2359,11 +2355,8 @@ void CmisPropertiesWindow::InitControls( HeaderBar* pHeaderBar, const ScrollBar*
m_aValueEdit
.
Hide
();
m_aValueEdit
.
Hide
();
m_aDateField
.
Hide
();
m_aDateField
.
Hide
();
m_aTimeField
.
Hide
();
m_aTimeField
.
Hide
();
m_aEditButton
.
Hide
();
m_aYesNoButton
.
Hide
();
m_aYesNoButton
.
Hide
();
m_nLineHeight
=
m_aTypeBox
.
GetSizePixel
().
Height
();
const
long
nOffset
=
4
;
const
long
nOffset
=
4
;
const
long
nScrollBarWidth
=
pScrollBar
->
GetSizePixel
().
Width
();
const
long
nScrollBarWidth
=
pScrollBar
->
GetSizePixel
().
Width
();
const
long
nButtonWidth
=
nScrollBarWidth
+
nOffset
;
const
long
nButtonWidth
=
nScrollBarWidth
+
nOffset
;
...
@@ -2406,6 +2399,8 @@ void CmisPropertiesWindow::InitControls( HeaderBar* pHeaderBar, const ScrollBar*
...
@@ -2406,6 +2399,8 @@ void CmisPropertiesWindow::InitControls( HeaderBar* pHeaderBar, const ScrollBar*
pCurrent
++
;
pCurrent
++
;
}
}
m_nLineHeight
=
m_aValueEdit
.
GetSizePixel
().
Height
();
}
}
sal_uInt16
CmisPropertiesWindow
::
GetVisibleLineCount
()
const
sal_uInt16
CmisPropertiesWindow
::
GetVisibleLineCount
()
const
...
@@ -2422,7 +2417,7 @@ void CmisPropertiesWindow::updateLineWidth()
...
@@ -2422,7 +2417,7 @@ void CmisPropertiesWindow::updateLineWidth()
{
{
Window
*
pWindows
[]
=
{
&
m_aNameBox
,
&
m_aTypeBox
,
&
m_aValueEdit
,
Window
*
pWindows
[]
=
{
&
m_aNameBox
,
&
m_aTypeBox
,
&
m_aValueEdit
,
&
m_aDateField
,
&
m_aTimeField
,
&
m_aDateField
,
&
m_aTimeField
,
&
m_a
EditButton
,
&
m_a
YesNoButton
,
NULL
};
&
m_aYesNoButton
,
NULL
};
for
(
std
::
vector
<
CmisPropertyLine
*
>::
iterator
aI
=
for
(
std
::
vector
<
CmisPropertyLine
*
>::
iterator
aI
=
m_aCmisPropertiesLines
.
begin
(),
aEnd
=
m_aCmisPropertiesLines
.
end
();
m_aCmisPropertiesLines
.
begin
(),
aEnd
=
m_aCmisPropertiesLines
.
end
();
...
@@ -2432,7 +2427,7 @@ void CmisPropertiesWindow::updateLineWidth()
...
@@ -2432,7 +2427,7 @@ void CmisPropertiesWindow::updateLineWidth()
Window
*
pNewWindows
[]
=
Window
*
pNewWindows
[]
=
{
&
pNewLine
->
m_aNameBox
,
&
pNewLine
->
m_aTypeBox
,
&
pNewLine
->
m_aValueEdit
,
{
&
pNewLine
->
m_aNameBox
,
&
pNewLine
->
m_aTypeBox
,
&
pNewLine
->
m_aValueEdit
,
&
pNewLine
->
m_aDateField
,
&
pNewLine
->
m_aTimeField
,
&
pNewLine
->
m_aEditButton
,
&
pNewLine
->
m_aDateField
,
&
pNewLine
->
m_aTimeField
,
&
pNewLine
->
m_aYesNoButton
,
NULL
};
&
pNewLine
->
m_aYesNoButton
,
NULL
};
Window
**
pCurrent
=
pWindows
;
Window
**
pCurrent
=
pWindows
;
...
@@ -2461,16 +2456,16 @@ void CmisPropertiesWindow::AddLine( const OUString& sName, Any& rAny )
...
@@ -2461,16 +2456,16 @@ void CmisPropertiesWindow::AddLine( const OUString& sName, Any& rAny )
pNewLine
->
m_aTypeBox
.
SetAccessibleName
(
m_aTypeBox
.
GetAccessibleName
());
pNewLine
->
m_aTypeBox
.
SetAccessibleName
(
m_aTypeBox
.
GetAccessibleName
());
pNewLine
->
m_aValueEdit
.
SetAccessibleName
(
m_aValueEdit
.
GetAccessibleName
());
pNewLine
->
m_aValueEdit
.
SetAccessibleName
(
m_aValueEdit
.
GetAccessibleName
());
m_nLineHeight
=
m_a
TypeBox
.
GetSizePixel
().
Height
()
;
m_nLineHeight
=
m_a
ValueEdit
.
GetSizePixel
().
Height
()
;
long
nPos
=
GetVisibleLineCount
()
*
GetLineHeight
();
long
nPos
=
GetVisibleLineCount
()
*
GetLineHeight
();
m_aCmisPropertiesLines
.
push_back
(
pNewLine
);
m_aCmisPropertiesLines
.
push_back
(
pNewLine
);
Window
*
pWindows
[]
=
{
&
m_aNameBox
,
&
m_aTypeBox
,
&
m_aValueEdit
,
Window
*
pWindows
[]
=
{
&
m_aNameBox
,
&
m_aTypeBox
,
&
m_aValueEdit
,
&
m_aDateField
,
&
m_aTimeField
,
&
m_aEditButton
,
&
m_aDateField
,
&
m_aTimeField
,
&
m_aYesNoButton
,
NULL
};
&
m_aYesNoButton
,
NULL
};
Window
*
pNewWindows
[]
=
Window
*
pNewWindows
[]
=
{
&
pNewLine
->
m_aNameBox
,
&
pNewLine
->
m_aTypeBox
,
&
pNewLine
->
m_aValueEdit
,
{
&
pNewLine
->
m_aNameBox
,
&
pNewLine
->
m_aTypeBox
,
&
pNewLine
->
m_aValueEdit
,
&
pNewLine
->
m_aDateField
,
&
pNewLine
->
m_aTimeField
,
&
pNewLine
->
m_aEditButton
,
&
pNewLine
->
m_aDateField
,
&
pNewLine
->
m_aTimeField
,
&
pNewLine
->
m_aYesNoButton
,
NULL
};
&
pNewLine
->
m_aYesNoButton
,
NULL
};
Window
**
pCurrent
=
pWindows
;
Window
**
pCurrent
=
pWindows
;
Window
**
pNewCurrent
=
pNewWindows
;
Window
**
pNewCurrent
=
pNewWindows
;
...
@@ -2494,11 +2489,10 @@ void CmisPropertiesWindow::AddLine( const OUString& sName, Any& rAny )
...
@@ -2494,11 +2489,10 @@ void CmisPropertiesWindow::AddLine( const OUString& sName, Any& rAny )
bool
bTmpValue
=
false
;
bool
bTmpValue
=
false
;
OUString
sTmpValue
;
OUString
sTmpValue
;
util
::
DateTime
aTmpDateTime
;
util
::
DateTime
aTmpDateTime
;
util
::
Date
aTmpDate
;
SvtSysLocale
aSysLocale
;
SvtSysLocale
aSysLocale
;
const
LocaleDataWrapper
&
rLocaleWrapper
=
aSysLocale
.
GetLocaleData
();
const
LocaleDataWrapper
&
rLocaleWrapper
=
aSysLocale
.
GetLocaleData
();
pNewLine
->
m_aNameBox
.
SetText
(
sName
);
pNewLine
->
m_aNameBox
.
SetText
(
sName
);
sal_IntPtr
nType
=
C
USTOM_TYPE_UNKNOWN
;
sal_IntPtr
nType
=
C
MIS_TYPE_ANY
;
String
sValue
;
String
sValue
;
if
(
rAny
>>=
nTmpValue
)
if
(
rAny
>>=
nTmpValue
)
...
@@ -2506,35 +2500,29 @@ void CmisPropertiesWindow::AddLine( const OUString& sName, Any& rAny )
...
@@ -2506,35 +2500,29 @@ void CmisPropertiesWindow::AddLine( const OUString& sName, Any& rAny )
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
);
pNewLine
->
m_aValueEdit
.
SetText
(
sValue
);
nType
=
C
USTOM
_TYPE_NUMBER
;
nType
=
C
MIS
_TYPE_NUMBER
;
}
}
else
if
(
rAny
>>=
bTmpValue
)
else
if
(
rAny
>>=
bTmpValue
)
{
{
sValue
=
(
bTmpValue
?
rLocaleWrapper
.
getTrueWord
()
:
rLocaleWrapper
.
getFalseWord
()
);
sValue
=
(
bTmpValue
?
rLocaleWrapper
.
getTrueWord
()
:
rLocaleWrapper
.
getFalseWord
()
);
nType
=
C
USTOM
_TYPE_BOOLEAN
;
nType
=
C
MIS
_TYPE_BOOLEAN
;
}
}
else
if
(
rAny
>>=
sTmpValue
)
else
if
(
rAny
>>=
sTmpValue
)
{
{
pNewLine
->
m_aValueEdit
.
SetText
(
sTmpValue
);
pNewLine
->
m_aValueEdit
.
SetText
(
sTmpValue
);
nType
=
CUSTOM_TYPE_TEXT
;
nType
=
CMIS_TYPE_STRING
;
}
else
if
(
rAny
>>=
aTmpDate
)
{
nType
=
CUSTOM_TYPE_DATE
;
pNewLine
->
m_aDateField
.
SetDate
(
Date
(
aTmpDate
.
Day
,
aTmpDate
.
Month
,
aTmpDate
.
Year
)
);
}
}
else
if
(
rAny
>>=
aTmpDateTime
)
else
if
(
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
)
);
nType
=
C
USTOM
_TYPE_DATETIME
;
nType
=
C
MIS
_TYPE_DATETIME
;
}
}
if
(
nType
!=
C
USTOM_TYPE_UNKNOWN
)
if
(
nType
!=
C
MIS_TYPE_ANY
)
{
{
if
(
C
USTOM
_TYPE_BOOLEAN
==
nType
)
if
(
C
MIS
_TYPE_BOOLEAN
==
nType
)
{
{
if
(
bTmpValue
)
if
(
bTmpValue
)
pNewLine
->
m_aYesNoButton
.
CheckYes
();
pNewLine
->
m_aYesNoButton
.
CheckYes
();
...
@@ -2589,7 +2577,7 @@ void CmisPropertiesWindow::DoScroll( sal_Int32 nNewPos )
...
@@ -2589,7 +2577,7 @@ void CmisPropertiesWindow::DoScroll( sal_Int32 nNewPos )
CmisPropertyLine
*
pLine
=
*
pIter
;
CmisPropertyLine
*
pLine
=
*
pIter
;
Window
*
pWindows
[]
=
{
&
pLine
->
m_aNameBox
,
&
pLine
->
m_aTypeBox
,
&
pLine
->
m_aValueEdit
,
&
pLine
->
m_aDateField
,
Window
*
pWindows
[]
=
{
&
pLine
->
m_aNameBox
,
&
pLine
->
m_aTypeBox
,
&
pLine
->
m_aValueEdit
,
&
pLine
->
m_aDateField
,
&
pLine
->
m_aTimeField
,
&
pLine
->
m_a
EditButton
,
&
pLine
->
m_a
YesNoButton
,
NULL
};
&
pLine
->
m_aTimeField
,
&
pLine
->
m_aYesNoButton
,
NULL
};
Window
**
pCurrent
=
pWindows
;
Window
**
pCurrent
=
pWindows
;
while
(
*
pCurrent
)
while
(
*
pCurrent
)
{
{
...
@@ -2617,7 +2605,7 @@ Sequence< beans::PropertyValue > CmisPropertiesWindow::GetCmisProperties() const
...
@@ -2617,7 +2605,7 @@ Sequence< beans::PropertyValue > CmisPropertiesWindow::GetCmisProperties() const
aPropertiesSeq
[
i
].
Name
=
sPropertyName
;
aPropertiesSeq
[
i
].
Name
=
sPropertyName
;
sal_Int64
nType
=
sal_Int64
(
sal_Int64
nType
=
sal_Int64
(
(
long
)
pLine
->
m_aTypeBox
.
GetEntryData
(
pLine
->
m_aTypeBox
.
GetSelectEntryPos
()
)
);
(
long
)
pLine
->
m_aTypeBox
.
GetEntryData
(
pLine
->
m_aTypeBox
.
GetSelectEntryPos
()
)
);
if
(
C
USTOM
_TYPE_NUMBER
==
nType
)
if
(
C
MIS
_TYPE_NUMBER
==
nType
)
{
{
double
nValue
=
0
;
double
nValue
=
0
;
sal_uInt32
nIndex
=
const_cast
<
SvNumberFormatter
&
>
(
sal_uInt32
nIndex
=
const_cast
<
SvNumberFormatter
&
>
(
...
@@ -2627,12 +2615,12 @@ Sequence< beans::PropertyValue > CmisPropertiesWindow::GetCmisProperties() const
...
@@ -2627,12 +2615,12 @@ Sequence< beans::PropertyValue > CmisPropertiesWindow::GetCmisProperties() const
if
(
bIsNum
)
if
(
bIsNum
)
aPropertiesSeq
[
i
].
Value
<<=
makeAny
(
nValue
);
aPropertiesSeq
[
i
].
Value
<<=
makeAny
(
nValue
);
}
}
else
if
(
C
USTOM
_TYPE_BOOLEAN
==
nType
)
else
if
(
C
MIS
_TYPE_BOOLEAN
==
nType
)
{
{
bool
bValue
=
pLine
->
m_aYesNoButton
.
IsYesChecked
();
bool
bValue
=
pLine
->
m_aYesNoButton
.
IsYesChecked
();
aPropertiesSeq
[
i
].
Value
<<=
makeAny
(
bValue
);
aPropertiesSeq
[
i
].
Value
<<=
makeAny
(
bValue
);
}
}
else
if
(
C
USTOM
_TYPE_DATETIME
==
nType
)
else
if
(
C
MIS
_TYPE_DATETIME
==
nType
)
{
{
Date
aTmpDate
=
pLine
->
m_aDateField
.
GetDate
();
Date
aTmpDate
=
pLine
->
m_aDateField
.
GetDate
();
Time
aTmpTime
=
pLine
->
m_aTimeField
.
GetTime
();
Time
aTmpTime
=
pLine
->
m_aTimeField
.
GetTime
();
...
@@ -2640,13 +2628,6 @@ Sequence< beans::PropertyValue > CmisPropertiesWindow::GetCmisProperties() const
...
@@ -2640,13 +2628,6 @@ Sequence< beans::PropertyValue > CmisPropertiesWindow::GetCmisProperties() const
aTmpDate
.
GetDay
(),
aTmpDate
.
GetMonth
(),
aTmpDate
.
GetYear
()
);
aTmpDate
.
GetDay
(),
aTmpDate
.
GetMonth
(),
aTmpDate
.
GetYear
()
);
aPropertiesSeq
[
i
].
Value
<<=
aDateTime
;
aPropertiesSeq
[
i
].
Value
<<=
aDateTime
;
}
}
else
if
(
CUSTOM_TYPE_DATE
==
nType
)
{
Date
aTmpDate
=
pLine
->
m_aDateField
.
GetDate
();
util
::
Date
aDate
(
aTmpDate
.
GetDay
(),
aTmpDate
.
GetMonth
(),
aTmpDate
.
GetYear
());
aPropertiesSeq
[
i
].
Value
<<=
aDate
;
}
else
else
{
{
OUString
sValue
(
pLine
->
m_aValueEdit
.
GetText
()
);
OUString
sValue
(
pLine
->
m_aValueEdit
.
GetText
()
);
...
...
sfx2/source/dialog/dinfdlg.hrc
Dosyayı görüntüle @
dbfbfd08
...
@@ -31,6 +31,12 @@
...
@@ -31,6 +31,12 @@
#define CUSTOM_TYPE_DURATION 5
#define CUSTOM_TYPE_DURATION 5
#define CUSTOM_TYPE_DATETIME 6
#define CUSTOM_TYPE_DATETIME 6
#define CMIS_TYPE_ANY 0
#define CMIS_TYPE_STRING 1
#define CMIS_TYPE_NUMBER 2
#define CMIS_TYPE_DATETIME 3
#define CMIS_TYPE_BOOLEAN 4
// defines ---------------------------------------------------------------
// defines ---------------------------------------------------------------
#define RB_PROPERTY_YES 100
#define RB_PROPERTY_YES 100
...
...
sfx2/source/dialog/dinfdlg.src
Dosyayı görüntüle @
dbfbfd08
...
@@ -90,6 +90,23 @@ ListBox SFX_LB_PROPERTY_TYPE
...
@@ -90,6 +90,23 @@ ListBox SFX_LB_PROPERTY_TYPE
< "Yes or no" ; CUSTOM_TYPE_BOOLEAN ; > ;
< "Yes or no" ; CUSTOM_TYPE_BOOLEAN ; > ;
};
};
};
};
ListBox SFX_LB_CMIS_PROPERTY_TYPE
{
Pos = MAP_APPFONT ( 63 , 2 ) ;
Size = MAP_APPFONT ( 60 , 80 ) ;
DropDown = TRUE;
Border = TRUE;
CurPos = 0;
StringList [ en-US ] =
{
< "Text" ; CMIS_TYPE_STRING ; > ;
< "DateTime" ; CMIS_TYPE_DATETIME ; > ;
< "Integer" ; CMIS_TYPE_NUMBER ; > ;
< "Decimal" ; CMIS_TYPE_NUMBER ; > ;
< "Boolean" ; CMIS_TYPE_BOOLEAN ; > ;
};
};
Edit SFX_ED_PROPERTY_VALUE
Edit SFX_ED_PROPERTY_VALUE
{
{
Border = TRUE ;
Border = TRUE ;
...
...
sfx2/source/inc/sfxlocal.hrc
Dosyayı görüntüle @
dbfbfd08
...
@@ -49,6 +49,7 @@
...
@@ -49,6 +49,7 @@
#define SFX_FLD_TIME (RID_SFX_SFXLOCAL_START + 11)
#define SFX_FLD_TIME (RID_SFX_SFXLOCAL_START + 11)
#define SFX_FLD_DURATION (RID_SFX_SFXLOCAL_START + 12)
#define SFX_FLD_DURATION (RID_SFX_SFXLOCAL_START + 12)
#define SFX_ST_DURATION_FORMAT (RID_SFX_SFXLOCAL_START + 13)
#define SFX_ST_DURATION_FORMAT (RID_SFX_SFXLOCAL_START + 13)
#define SFX_LB_CMIS_PROPERTY_TYPE (RID_SFX_SFXLOCAL_START + 14)
// Images ----------------------------------------------------------------
// Images ----------------------------------------------------------------
...
...
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