summaryrefslogtreecommitdiff
path: root/svx
diff options
context:
space:
mode:
authorEike Rathke <erack@redhat.com>2011-12-01 21:03:42 +0100
committerEike Rathke <erack@redhat.com>2011-12-01 21:04:29 +0100
commit86adb5cacb4fe3e7fb869299447da5876f0da30d (patch)
treef7998dd1a12a82ca53a4fa155cdf5536ac25ef62 /svx
parentb20ea84970fb8b3068880a361822941c47f50edd (diff)
get rid of class Date and Time default ctor with system time penalty
Diffstat (limited to 'svx')
-rw-r--r--svx/inc/svx/galmisc.hxx5
-rw-r--r--svx/source/dialog/ctredlin.cxx26
-rw-r--r--svx/source/gallery2/galbrws1.cxx2
-rw-r--r--svx/source/svdraw/svdmodel.cxx5
-rw-r--r--svx/source/svdraw/svdotxln.cxx3
5 files changed, 31 insertions, 10 deletions
diff --git a/svx/inc/svx/galmisc.hxx b/svx/inc/svx/galmisc.hxx
index e6f6c8edd23f..c7ed89c2f953 100644
--- a/svx/inc/svx/galmisc.hxx
+++ b/svx/inc/svx/galmisc.hxx
@@ -57,6 +57,11 @@ struct ExchangeData
String aEditedTitle;
Date aThemeChangeDate;
Time aThemeChangeTime;
+
+ ExchangeData() :
+ aThemeChangeDate( Date::EMPTY ),
+ aThemeChangeTime( Time::EMPTY )
+ {}
};
enum SgaObjKind
diff --git a/svx/source/dialog/ctredlin.cxx b/svx/source/dialog/ctredlin.cxx
index 3d0c4ec8adef..7494f3283bfb 100644
--- a/svx/source/dialog/ctredlin.cxx
+++ b/svx/source/dialog/ctredlin.cxx
@@ -65,6 +65,8 @@ static long nStaticTabs[]=
#define CALC_DATE 3
RedlinData::RedlinData()
+ :
+ aDateTime( DateTime::EMPTY )
{
bDisabled=sal_False;
pData=NULL;
@@ -146,7 +148,11 @@ void SvLBoxColorString::Paint( const Point& rPos, SvLBox& rDev,
//----------------------------------------------------------------------------
SvxRedlinTable::SvxRedlinTable(SvxSimpleTableContainer& rParent,WinBits nBits)
- : SvxSimpleTable(rParent,nBits)
+ : SvxSimpleTable(rParent,nBits),
+ aDaTiFirst( DateTime::EMPTY ),
+ aDaTiLast( DateTime::EMPTY ),
+ aDaTiFilterFirst( DateTime::EMPTY ),
+ aDaTiFilterLast( DateTime::EMPTY )
{
bAuthor=sal_False;
bDate=sal_False;
@@ -158,7 +164,11 @@ SvxRedlinTable::SvxRedlinTable(SvxSimpleTableContainer& rParent,WinBits nBits)
}
SvxRedlinTable::SvxRedlinTable(SvxSimpleTableContainer& rParent,const ResId& rResId)
- : SvxSimpleTable(rParent,rResId)
+ : SvxSimpleTable(rParent,rResId),
+ aDaTiFirst( DateTime::EMPTY ),
+ aDaTiLast( DateTime::EMPTY ),
+ aDaTiFilterFirst( DateTime::EMPTY ),
+ aDaTiFilterLast( DateTime::EMPTY )
{
bAuthor=sal_False;
bDate=sal_False;
@@ -232,7 +242,7 @@ void SvxRedlinTable::SetCalcView(sal_Bool bFlag)
void SvxRedlinTable::UpdateFilterTest()
{
- Date aDateMax;
+ Date aDateMax( Date::SYSTEM );
sal_uInt16 nYEAR=aDateMax.GetYear()+100;
aDateMax.SetYear(nYEAR);
Date aDateMin(1,1,1989);
@@ -797,8 +807,8 @@ SvxTPFilter::SvxTPFilter( Window * pParent)
RowEnableHdl(&aCbRange);
RowEnableHdl(&aCbComment);
- Date aDate;
- Time aTime;
+ Date aDate( Date::SYSTEM );
+ Time aTime( Time::SYSTEM );
aDfDate.SetDate(aDate);
aTfDate.SetTime(aTime);
aDfDate2.SetDate(aDate);
@@ -1177,8 +1187,8 @@ IMPL_LINK( SvxTPFilter, RowEnableHdl, CheckBox*, pCB )
IMPL_LINK( SvxTPFilter, TimeHdl, ImageButton*,pIB )
{
- Date aDate;
- Time aTime;
+ Date aDate( Date::SYSTEM );
+ Time aTime( Time::SYSTEM );
if(pIB==&aIbClock)
{
aDfDate.SetDate(aDate);
@@ -1275,7 +1285,7 @@ void SvxTPFilter::Disable( bool bChild)
IMPL_LINK( SvxTPFilter, ModifyDate, void*,pTF)
{
- Date aDate;
+ Date aDate( Date::SYSTEM );
Time aTime(0);
if(&aDfDate==pTF)
{
diff --git a/svx/source/gallery2/galbrws1.cxx b/svx/source/gallery2/galbrws1.cxx
index af58c523afda..4c50608b0369 100644
--- a/svx/source/gallery2/galbrws1.cxx
+++ b/svx/source/gallery2/galbrws1.cxx
@@ -236,7 +236,7 @@ void GalleryBrowser1::ImplFillExchangeData( const GalleryTheme* pThm, ExchangeDa
{
::ucbhelper::Content aCnt( pThm->GetThmURL().GetMainURL( INetURLObject::NO_DECODE ), uno::Reference< ucb::XCommandEnvironment >() );
util::DateTime aDateTimeModified;
- DateTime aDateTime;
+ DateTime aDateTime( DateTime::EMPTY );
aCnt.getPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM( "DateModified" )) ) >>= aDateTimeModified;
::utl::typeConvert( aDateTimeModified, aDateTime );
diff --git a/svx/source/svdraw/svdmodel.cxx b/svx/source/svdraw/svdmodel.cxx
index a5ef15cd7c29..3e8daa2e1791 100644
--- a/svx/source/svdraw/svdmodel.cxx
+++ b/svx/source/svdraw/svdmodel.cxx
@@ -218,6 +218,7 @@ void SdrModel::ImpCtor(SfxItemPool* pPool, ::comphelper::IEmbeddedHelper* _pEmbe
}
SdrModel::SdrModel(SfxItemPool* pPool, ::comphelper::IEmbeddedHelper* pPers, sal_Bool bLoadRefCounts):
+ aReadDate( DateTime::EMPTY ),
maMaPag(1024,32,32),
maPages(1024,32,32)
{
@@ -230,6 +231,7 @@ SdrModel::SdrModel(SfxItemPool* pPool, ::comphelper::IEmbeddedHelper* pPers, sal
}
SdrModel::SdrModel(const String& rPath, SfxItemPool* pPool, ::comphelper::IEmbeddedHelper* pPers, sal_Bool bLoadRefCounts):
+ aReadDate( DateTime::EMPTY ),
maMaPag(1024,32,32),
maPages(1024,32,32),
aTablePath(rPath)
@@ -243,6 +245,7 @@ SdrModel::SdrModel(const String& rPath, SfxItemPool* pPool, ::comphelper::IEmbed
}
SdrModel::SdrModel(SfxItemPool* pPool, ::comphelper::IEmbeddedHelper* pPers, bool bUseExtColorTable, sal_Bool bLoadRefCounts):
+ aReadDate( DateTime::EMPTY ),
maMaPag(1024,32,32),
maPages(1024,32,32)
{
@@ -255,6 +258,7 @@ SdrModel::SdrModel(SfxItemPool* pPool, ::comphelper::IEmbeddedHelper* pPers, boo
}
SdrModel::SdrModel(const String& rPath, SfxItemPool* pPool, ::comphelper::IEmbeddedHelper* pPers, bool bUseExtColorTable, sal_Bool bLoadRefCounts):
+ aReadDate( DateTime::EMPTY ),
maMaPag(1024,32,32),
maPages(1024,32,32),
aTablePath(rPath)
@@ -270,6 +274,7 @@ SdrModel::SdrModel(const String& rPath, SfxItemPool* pPool, ::comphelper::IEmbed
SdrModel::SdrModel(const SdrModel& /*rSrcModel*/):
SfxBroadcaster(),
tools::WeakBase< SdrModel >(),
+ aReadDate( DateTime::EMPTY ),
maMaPag(1024,32,32),
maPages(1024,32,32)
{
diff --git a/svx/source/svdraw/svdotxln.cxx b/svx/source/svdraw/svdotxln.cxx
index 0704d1f74caa..5b0afd807c6b 100644
--- a/svx/source/svdraw/svdotxln.cxx
+++ b/svx/source/svdraw/svdotxln.cxx
@@ -115,6 +115,7 @@ TYPEINIT1(ImpSdrObjTextLinkUserData,SdrObjUserData);
ImpSdrObjTextLinkUserData::ImpSdrObjTextLinkUserData(SdrTextObj* pObj1):
SdrObjUserData(SdrInventor,SDRUSERDATA_OBJTEXTLINK,0),
pObj(pObj1),
+ aFileDate0( DateTime::EMPTY ),
pLink(NULL),
eCharSet(RTL_TEXTENCODING_DONTKNOW)
{
@@ -175,7 +176,7 @@ bool SdrTextObj::ReloadLinkedText( bool bForceLoad)
if( pData )
{
::ucbhelper::ContentBroker* pBroker = ::ucbhelper::ContentBroker::get();
- DateTime aFileDT;
+ DateTime aFileDT( DateTime::EMPTY );
sal_Bool bExists = sal_False, bLoad = sal_False;
if( pBroker )