summaryrefslogtreecommitdiff
path: root/sfx2
diff options
context:
space:
mode:
authorCao Cuong Ngo <cao.cuong.ngo@gmail.com>2013-07-17 10:45:08 +0200
committerCédric Bosdonnat <cedric.bosdonnat.ooo@free.fr>2013-09-02 13:51:52 +0200
commit642ba3295b7be409b8f854cea834688b1642e9ed (patch)
tree58031fb8610a6c00742b1a852fd19ac1a0a1f93a /sfx2
parentcd2702d5374b38696755d0e41b3a7817ccecc848 (diff)
CMIS properties dialog
Greyed out YesNo button when the property is readonly Change-Id: I093651c9a17e8e1e23a164a6f91d6971d3ecc67a
Diffstat (limited to 'sfx2')
-rw-r--r--sfx2/source/dialog/dinfdlg.cxx19
1 files changed, 17 insertions, 2 deletions
diff --git a/sfx2/source/dialog/dinfdlg.cxx b/sfx2/source/dialog/dinfdlg.cxx
index 032db6102d89..6b803307fd53 100644
--- a/sfx2/source/dialog/dinfdlg.cxx
+++ b/sfx2/source/dialog/dinfdlg.cxx
@@ -2290,6 +2290,12 @@ CmisPropertiesYesNoButton::CmisPropertiesYesNoButton( Window* pParent, const Res
m_aNoButton.SetBackground( aWall );
}
+void CmisPropertiesYesNoButton::SetReadOnly( )
+{
+ m_aNoButton.Enable( sal_False );
+ m_aYesButton.Enable( sal_False );
+}
+
CmisPropertiesEditButton::CmisPropertiesEditButton( Window* pParent, const ResId& rResId, CmisPropertyLine* pLine ) :
PushButton( pParent, rResId ), m_pLine( pLine )
{
@@ -2541,6 +2547,8 @@ void CmisPropertiesWindow::AddLine( const OUString& sId, const OUString& sName,
pNewLine->m_aValueEdit.SetReadOnly( !bUpdatable );
pNewLine->m_aDateField.SetReadOnly( !bUpdatable );
pNewLine->m_aTimeField.SetReadOnly( !bUpdatable );
+ if ( !bUpdatable)
+ pNewLine->m_aYesNoButton.SetReadOnly( );
m_nLineHeight = m_aValueEdit.GetSizePixel().Height() ;
@@ -2571,7 +2579,8 @@ void CmisPropertiesWindow::AddLine( const OUString& sId, const OUString& sName,
pNewLine->m_aTimePos = pNewLine->m_aTimeField.GetPosPixel();
pNewLine->m_aDateTimeSize = pNewLine->m_aDateField.GetSizePixel();
- double nTmpValue = 0;
+ sal_Int32 nTmpValue = 0;
+ double dTmpValue = 0.0;
bool bTmpValue = false;
OUString sTmpValue;
util::DateTime aTmpDateTime;
@@ -2588,6 +2597,13 @@ void CmisPropertiesWindow::AddLine( const OUString& sId, const OUString& sName,
pNewLine->m_aValueEdit.SetText( sValue );
sType = CMIS_TYPE_NUMBER;
}
+ else if ( rAny >>= dTmpValue )
+ {
+ sal_uInt32 nIndex = m_aNumberFormatter.GetFormatIndex( NF_NUMBER_SYSTEM );
+ m_aNumberFormatter.GetInputLineString( dTmpValue, nIndex, sValue );
+ pNewLine->m_aValueEdit.SetText( sValue );
+ sType = CMIS_TYPE_NUMBER;
+ }
else if ( rAny >>= bTmpValue )
{
sValue = ( bTmpValue ? rLocaleWrapper.getTrueWord() : rLocaleWrapper.getFalseWord() );
@@ -2628,7 +2644,6 @@ void CmisPropertiesWindow::AddLine( const OUString& sId, const OUString& sName,
pNewLine->m_aDateField.SetPosSizePixel(pNewLine->m_aDatePos, pNewLine->m_aDateTimeSize );
pNewLine->m_aTimeField.SetPosSizePixel(pNewLine->m_aTimePos, pNewLine->m_aDateTimeSize );
}
-
pNewLine->m_aName.GrabFocus();
}