diff options
-rw-r--r-- | include/sfx2/dinfdlg.hxx | 2 | ||||
-rw-r--r-- | sfx2/source/dialog/dinfdlg.cxx | 19 |
2 files changed, 19 insertions, 2 deletions
diff --git a/include/sfx2/dinfdlg.hxx b/include/sfx2/dinfdlg.hxx index 0e290ed992aa..8f45e524eb07 100644 --- a/include/sfx2/dinfdlg.hxx +++ b/include/sfx2/dinfdlg.hxx @@ -582,6 +582,8 @@ public: virtual void Resize(); + void SetReadOnly( ); + inline void CheckYes() { m_aYesButton.Check(); } inline void CheckNo() { m_aNoButton.Check(); } inline bool IsYesChecked() const { return m_aYesButton.IsChecked() != sal_False; } 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(); } |