include/sfx2/dinfdlg.hxx | 2 ++ sfx2/source/dialog/dinfdlg.cxx | 19 +++++++++++++++++-- 2 files changed, 19 insertions(+), 2 deletions(-)
New commits: commit 63493fd5377ee1b0815b26a11ee87f3b666cc2c6 Author: Cao Cuong Ngo <[email protected]> Date: Wed Jul 17 11:07:24 2013 +0200 CMIS properties dialog Uses sal_Int64 instead of sal_Int32 in Number properties. Because the type used in Any is Hyper. Change-Id: I9a4c72a8bb72c2403120cafa06541fb5434f282b diff --git a/sfx2/source/dialog/dinfdlg.cxx b/sfx2/source/dialog/dinfdlg.cxx index ac003af..a1fdac8 100644 --- a/sfx2/source/dialog/dinfdlg.cxx +++ b/sfx2/source/dialog/dinfdlg.cxx @@ -2541,7 +2541,7 @@ void CmisPropertiesWindow::AddLine( const OUString& sId, const OUString& sName, pNewLine->m_aTimePos = pNewLine->m_aTimeField.GetPosPixel(); pNewLine->m_aDateTimeSize = pNewLine->m_aDateField.GetSizePixel(); - sal_Int32 nTmpValue = 0; + sal_Int64 nTmpValue = 0; double dTmpValue = 0.0; bool bTmpValue = false; OUString sTmpValue; commit 67bf3f3c70141811ea2e2be5804e20b2de0ecf0a Author: Cao Cuong Ngo <[email protected]> Date: Wed Jul 17 10:45:08 2013 +0200 CMIS properties dialog Greyed out YesNo button when the property is readonly Change-Id: I093651c9a17e8e1e23a164a6f91d6971d3ecc67a diff --git a/include/sfx2/dinfdlg.hxx b/include/sfx2/dinfdlg.hxx index dde187e..e677f57 100644 --- a/include/sfx2/dinfdlg.hxx +++ b/include/sfx2/dinfdlg.hxx @@ -576,6 +576,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 99c103d..ac003af 100644 --- a/sfx2/source/dialog/dinfdlg.cxx +++ b/sfx2/source/dialog/dinfdlg.cxx @@ -2252,6 +2252,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 ) { @@ -2503,6 +2509,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() ; @@ -2533,7 +2541,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; @@ -2550,6 +2559,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() ); @@ -2590,7 +2606,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(); } _______________________________________________ Libreoffice-commits mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
