[Libreoffice-commits] core.git: Branch 'aoo/trunk' - sfx2/inc sfx2/source
Ariel Constenla-Haile
arielch at apache.org
Sun Oct 20 13:07:57 PDT 2013
sfx2/inc/sfx2/dinfdlg.hxx | 9 ++++-----
sfx2/source/dialog/dinfdlg.cxx | 36 ++++++++++++++++++++++++------------
2 files changed, 28 insertions(+), 17 deletions(-)
New commits:
commit e52d79b8f536aee6e5c7f7137c483c55052dd7b6
Author: Ariel Constenla-Haile <arielch at apache.org>
Date: Sun Oct 20 19:12:44 2013 +0000
i123097 - Scroll all controls in a line
diff --git a/sfx2/inc/sfx2/dinfdlg.hxx b/sfx2/inc/sfx2/dinfdlg.hxx
index 88dc957..bea9f93 100644
--- a/sfx2/inc/sfx2/dinfdlg.hxx
+++ b/sfx2/inc/sfx2/dinfdlg.hxx
@@ -440,14 +440,10 @@ struct CustomPropertyLine
CustomPropertiesTimeField m_aTimeField;
const String m_sDurationFormat;
CustomPropertiesDurationField m_aDurationField;
- CustomPropertiesEditButton m_aEditButton;
+ CustomPropertiesEditButton m_aEditButton;
CustomPropertiesYesNoButton m_aYesNoButton;
CustomPropertiesRemoveButton m_aRemoveButton;
- Point m_aDatePos;
- Point m_aTimePos;
- Size m_aDateTimeSize;
-
bool m_bIsRemoved;
bool m_bTypeLostFocus;
@@ -471,6 +467,9 @@ private:
CustomPropertiesYesNoButton m_aYesNoButton;
ImageButton m_aRemoveButton;
+ long m_nDatePosX;
+ long m_nTimePosX;
+
sal_Int32 m_nLineHeight;
sal_Int32 m_nScrollPos;
SvtSysLocale m_aSysLocale;
diff --git a/sfx2/source/dialog/dinfdlg.cxx b/sfx2/source/dialog/dinfdlg.cxx
index 4c71213..c1b355c 100644
--- a/sfx2/source/dialog/dinfdlg.cxx
+++ b/sfx2/source/dialog/dinfdlg.cxx
@@ -1847,8 +1847,9 @@ IMPL_LINK( CustomPropertiesWindow, TypeHdl, CustomPropertiesTypeBox*, pBox )
}
else if( nType == CUSTOM_TYPE_DATETIME)
{
- pLine->m_aDateField.SetPosSizePixel( pLine->m_aDatePos, pLine->m_aDateTimeSize );
- pLine->m_aTimeField.SetPosSizePixel(pLine->m_aTimePos, pLine->m_aDateTimeSize );
+ const long nPosY( pLine->m_aDateField.GetPosPixel().Y() );
+ pLine->m_aDateField.SetPosPixel( ::Point( m_nDatePosX, nPosY ) );
+ pLine->m_aTimeField.SetPosPixel( ::Point( m_nTimePosX, nPosY ) );
}
return 0;
@@ -1871,10 +1872,15 @@ IMPL_LINK( CustomPropertiesWindow, RemoveHdl, CustomPropertiesRemoveButton*, pBu
if ( pLine->m_bIsRemoved )
continue;
- Window* pWindows[] = { &pLine->m_aNameBox, &pLine->m_aTypeBox, &pLine->m_aValueEdit,
- &pLine->m_aDateField, &pLine->m_aTimeField,
- &pLine->m_aDurationField, &pLine->m_aEditButton,
- &pLine->m_aYesNoButton, &pLine->m_aRemoveButton, NULL };
+ Window* pWindows[] = { &pLine->m_aNameBox,
+ &pLine->m_aTypeBox,
+ &pLine->m_aValueEdit,
+ &pLine->m_aDateField,
+ &pLine->m_aTimeField,
+ &pLine->m_aDurationField,
+ &pLine->m_aEditButton,
+ &pLine->m_aYesNoButton,
+ &pLine->m_aRemoveButton, NULL };
Window** pCurrent = pWindows;
while ( *pCurrent )
{
@@ -2042,6 +2048,9 @@ void CustomPropertiesWindow::InitControls( HeaderBar* pHeaderBar, const ScrollBa
m_nLineHeight =
( m_aRemoveButton.GetPosPixel().Y() * 2 ) + m_aRemoveButton.GetSizePixel().Height();
+
+ m_nDatePosX = m_aDateField.GetPosPixel().X();
+ m_nTimePosX = m_aTimeField.GetPosPixel().X();
}
sal_uInt16 CustomPropertiesWindow::GetVisibleLineCount() const
@@ -2096,10 +2105,6 @@ void CustomPropertiesWindow::AddLine( const ::rtl::OUString& sName, Any& rAny )
pCurrent++;
pNewCurrent++;
}
- //
- pNewLine->m_aDatePos = pNewLine->m_aDateField.GetPosPixel();
- pNewLine->m_aTimePos = pNewLine->m_aTimeField.GetPosPixel();
- pNewLine->m_aDateTimeSize = pNewLine->m_aDateField.GetSizePixel();
double nTmpValue = 0;
bool bTmpValue = false;
@@ -2208,8 +2213,15 @@ void CustomPropertiesWindow::DoScroll( sal_Int32 nNewPos )
if ( pLine->m_bIsRemoved )
continue;
- Window* pWindows[] = { &pLine->m_aNameBox, &pLine->m_aTypeBox, &pLine->m_aValueEdit, &pLine->m_aDurationField,
- &pLine->m_aYesNoButton, &pLine->m_aRemoveButton, NULL };
+ Window* pWindows[] = { &pLine->m_aNameBox,
+ &pLine->m_aTypeBox,
+ &pLine->m_aValueEdit,
+ &pLine->m_aDurationField,
+ &pLine->m_aEditButton,
+ &pLine->m_aDateField,
+ &pLine->m_aTimeField,
+ &pLine->m_aYesNoButton,
+ &pLine->m_aRemoveButton, NULL };
Window** pCurrent = pWindows;
while ( *pCurrent )
{
More information about the Libreoffice-commits
mailing list