diff options
author | Caolán McNamara <caolanm@redhat.com> | 2013-07-16 09:12:42 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2013-07-16 12:45:56 +0100 |
commit | 52bce8fadde39e32c0008babadc2c22cc501f753 (patch) | |
tree | c238b858401b18edaa27d62cd909a276ee76db73 /sfx2/source/dialog/dialoghelper.cxx | |
parent | 84e5cdce3ed58c663109bb557b75cd6e45bb2dbc (diff) |
convert versions of dialog to .ui
Change-Id: I1be2211b5c936e6e00f2fe81883b8fb1e67ef550
Diffstat (limited to 'sfx2/source/dialog/dialoghelper.cxx')
-rw-r--r-- | sfx2/source/dialog/dialoghelper.cxx | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/sfx2/source/dialog/dialoghelper.cxx b/sfx2/source/dialog/dialoghelper.cxx index 89fd3adbabad..e0ac93107780 100644 --- a/sfx2/source/dialog/dialoghelper.cxx +++ b/sfx2/source/dialog/dialoghelper.cxx @@ -8,6 +8,7 @@ */ #include <sfx2/dialoghelper.hxx> +#include <tools/datetime.hxx> #include <vcl/builder.hxx> #include <vcl/layout.hxx> #include <vector> @@ -56,4 +57,20 @@ Size getParagraphPreviewOptimalSize(const Window *pReference) return pReference->LogicToPixel(Size(68 , 112), MAP_APPFONT); } +OUString SFX2_DLLPUBLIC getWidestTime(const LocaleDataWrapper& rWrapper) +{ + Date aDate(22, 12, 2000); + Time aTime(22, 59, 59); + DateTime aDateTime(aDate, aTime); + return formatTime(aDateTime, rWrapper); +} + +OUString SFX2_DLLPUBLIC formatTime(const DateTime& rDateTime, const LocaleDataWrapper& rWrapper) +{ + OUString sString = rWrapper.getDate(rDateTime); + sString += OUString(' '); + sString += rWrapper.getTime(rDateTime, false); + return sString; +} + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |