summaryrefslogtreecommitdiff
path: root/svx
diff options
context:
space:
mode:
authorTakeshi Abe <tabe@fixedpoint.jp>2018-05-18 12:05:54 +0900
committerTakeshi Abe <tabe@fixedpoint.jp>2018-05-20 04:53:26 +0200
commit027b5a14830c0013ce79877eab66dcf309366ecc (patch)
treeeb4320c1284bbf58491f7d24e7d24df758773188 /svx
parent84efa4087b803a39219ccce79ca374d0d09cf6d9 (diff)
svx: Avoid looking up system clock twice for current datetime
Change-Id: I636ddfdaeac211ddc9de6b5dfe36cbdc32c7f7f2 Reviewed-on: https://gerrit.libreoffice.org/54509 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Takeshi Abe <tabe@fixedpoint.jp>
Diffstat (limited to 'svx')
-rw-r--r--svx/source/dialog/ctredlin.cxx22
1 files changed, 10 insertions, 12 deletions
diff --git a/svx/source/dialog/ctredlin.cxx b/svx/source/dialog/ctredlin.cxx
index 4d475541fb98..8de682c4933e 100644
--- a/svx/source/dialog/ctredlin.cxx
+++ b/svx/source/dialog/ctredlin.cxx
@@ -582,12 +582,11 @@ SvxTPFilter::SvxTPFilter( vcl::Window * pParent)
RowEnableHdl(m_pCbAction);
RowEnableHdl(m_pCbComment);
- Date aDate( Date::SYSTEM );
- tools::Time aTime( tools::Time::SYSTEM );
- m_pDfDate->SetDate(aDate);
- m_pTfDate->SetTime(aTime);
- m_pDfDate2->SetDate(aDate);
- m_pTfDate2->SetTime(aTime);
+ DateTime aDateTime( DateTime::SYSTEM );
+ m_pDfDate->SetDate(aDateTime);
+ m_pTfDate->SetTime(aDateTime);
+ m_pDfDate2->SetDate(aDateTime);
+ m_pTfDate2->SetTime(aDateTime);
HideRange();
ShowAction();
bModified=false;
@@ -935,17 +934,16 @@ IMPL_LINK( SvxTPFilter, RowEnableHdl, Button*, pButton, void )
IMPL_LINK( SvxTPFilter, TimeHdl, Button*, pButton, void )
{
ImageButton* pIB = static_cast<ImageButton*>(pButton);
- Date aDate( Date::SYSTEM );
- tools::Time aTime( tools::Time::SYSTEM );
+ DateTime aDateTime( DateTime::SYSTEM );
if (pIB == m_pIbClock)
{
- m_pDfDate->SetDate(aDate);
- m_pTfDate->SetTime(aTime);
+ m_pDfDate->SetDate(aDateTime);
+ m_pTfDate->SetTime(aDateTime);
}
else if (pIB == m_pIbClock2)
{
- m_pDfDate2->SetDate(aDate);
- m_pTfDate2->SetTime(aTime);
+ m_pDfDate2->SetDate(aDateTime);
+ m_pTfDate2->SetTime(aDateTime);
}
bModified=true;
}