summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorEike Rathke <erack@redhat.com>2011-11-30 02:05:22 +0100
committerEike Rathke <erack@redhat.com>2011-11-30 02:05:22 +0100
commitdca69d5bb2d0e542de26624dd9f71fb87e1533f2 (patch)
treed3d6b62417885946113b6f13e10ca0f4fc45613c /sw
parentcb937da55c3ab3d238b97d6e0e709ea2a04d2c26 (diff)
renamed Date::IsValid() to IsValidAndGregorian() to prevent misassumptions
Once smaller than 1582-10-15 decrementing a Date will not produce a valid date.
Diffstat (limited to 'sw')
-rw-r--r--sw/source/core/fields/docufld.cxx2
-rw-r--r--sw/source/ui/docvw/SidebarWin.cxx2
2 files changed, 2 insertions, 2 deletions
diff --git a/sw/source/core/fields/docufld.cxx b/sw/source/core/fields/docufld.cxx
index f950016b06ca..74366eaf9b2d 100644
--- a/sw/source/core/fields/docufld.cxx
+++ b/sw/source/core/fields/docufld.cxx
@@ -994,7 +994,7 @@ String SwDocInfoFieldType::Expand( sal_uInt16 nSub, sal_uInt32 nFormat,
else
break;
- if (aDate.IsValid())
+ if (aDate.IsValidAndGregorian())
{
switch (nExtSub & ~DI_SUB_FIXED)
{
diff --git a/sw/source/ui/docvw/SidebarWin.cxx b/sw/source/ui/docvw/SidebarWin.cxx
index fe2b53c84543..311e5bdd1dab 100644
--- a/sw/source/ui/docvw/SidebarWin.cxx
+++ b/sw/source/ui/docvw/SidebarWin.cxx
@@ -415,7 +415,7 @@ void SwSidebarWin::CheckMetaText()
{
sMeta = String(SW_RES(STR_POSTIT_YESTERDAY));
}
- else if (aDate.IsValid() )
+ else if (aDate.IsValidAndGregorian() )
{
sMeta = rLocalData.getDate(aDate);
}