summaryrefslogtreecommitdiff
path: root/sw/source/ui
diff options
context:
space:
mode:
authorjp <jp@openoffice.org>2001-02-14 08:58:47 +0000
committerjp <jp@openoffice.org>2001-02-14 08:58:47 +0000
commitff5f36a026d3ce3a8ae4ab43e6bed1ec4514b66c (patch)
treee1deafa81fe379fb7ee002ce745cf1168ad566ac /sw/source/ui
parent62c17dfba39ff6ec0f5e2bf41cce5383fcaafa7d (diff)
changes: international -> localdatawrapper
Diffstat (limited to 'sw/source/ui')
-rw-r--r--sw/source/ui/docvw/edtwin2.cxx25
-rw-r--r--sw/source/ui/inc/uitool.hxx7
-rw-r--r--sw/source/ui/misc/redlndlg.cxx29
-rw-r--r--sw/source/ui/shells/textfld.cxx62
-rw-r--r--sw/source/ui/utlui/uitool.cxx21
5 files changed, 78 insertions, 66 deletions
diff --git a/sw/source/ui/docvw/edtwin2.cxx b/sw/source/ui/docvw/edtwin2.cxx
index 47feaa3af517..511d64224dc5 100644
--- a/sw/source/ui/docvw/edtwin2.cxx
+++ b/sw/source/ui/docvw/edtwin2.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: edtwin2.cxx,v $
*
- * $Revision: 1.3 $
+ * $Revision: 1.4 $
*
- * last change: $Author: jp $ $Date: 2000-10-20 13:41:10 $
+ * last change: $Author: jp $ $Date: 2001-02-14 09:55:22 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -182,6 +182,9 @@
#ifndef _TXTTXMRK_HXX //autogen
#include <txttxmrk.hxx>
#endif
+#ifndef _UITOOL_HXX //autogen
+#include <uitool.hxx>
+#endif
#ifndef _DOCVW_HRC
#include <docvw.hrc>
@@ -190,8 +193,6 @@
#include <utlui.hrc>
#endif
-#define C2S(cChar) UniString::CreateFromAscii(cChar)
-
/*--------------------------------------------------------------------
Beschreibung: KeyEvents
--------------------------------------------------------------------*/
@@ -209,12 +210,11 @@ void lcl_GetRedlineHelp( const SwRedline& rRedl, String& rTxt, BOOL bBalloon )
if( nResId )
{
- const DateTime& rDT = rRedl.GetTimeStamp();
- const International& rIntl = Application::GetAppInternational();
rTxt = SW_RESSTR( nResId );
- (rTxt += C2S(": " )) += rRedl.GetAuthorString();
- (rTxt += C2S(" - " )) += rIntl.GetDate( rDT );
- (rTxt += ' ') += rIntl.GetTime( rDT, FALSE, FALSE );
+ rTxt.AppendAscii( RTL_CONSTASCII_STRINGPARAM(": " ));
+ rTxt += rRedl.GetAuthorString();
+ rTxt.AppendAscii( RTL_CONSTASCII_STRINGPARAM( " - " ));
+ rTxt += GetAppLangDateTimeString( rRedl.GetTimeStamp() );
if( bBalloon && rRedl.GetComment().Len() )
( rTxt += '\n' ) += rRedl.GetComment();
}
@@ -262,7 +262,8 @@ void SwEditWin::RequestHelp(const HelpEvent &rEvt)
switch( aCntntAtPos.eCntntAtPos )
{
case SwContentAtPos::SW_TABLEBOXFML:
- ( sTxt = C2S("= ")) += ((SwTblBoxFormula*)aCntntAtPos.aFnd.pAttr)->GetFormula();
+ sTxt.AssignAscii( RTL_CONSTASCII_STRINGPARAM( "= " ));
+ sTxt += ((SwTblBoxFormula*)aCntntAtPos.aFnd.pAttr)->GetFormula();
break;
#ifndef PRODUCT
case SwContentAtPos::SW_TABLEBOXVALUE:
@@ -308,7 +309,7 @@ void SwEditWin::RequestHelp(const HelpEvent &rEvt)
GetTOXMark().GetTOXType();
if( pTType && pTType->GetTypeName().Len() )
{
- sTxt.Insert( C2S(": "), 0 );
+ sTxt.InsertAscii( ": ", 0 );
sTxt.Insert( pTType->GetTypeName(), 0 );
}
}
@@ -317,7 +318,7 @@ void SwEditWin::RequestHelp(const HelpEvent &rEvt)
if(aCntntAtPos.aFnd.pAttr)
{
sTxt = SW_RES(STR_CONTENT_TYPE_SINGLE_REFERENCE);
- sTxt += C2S(": ");
+ sTxt.AppendAscii( RTL_CONSTASCII_STRINGPARAM( ": "));
sTxt += ((const SwFmtRefMark*)aCntntAtPos.aFnd.pAttr)->GetRefName();
}
break;
diff --git a/sw/source/ui/inc/uitool.hxx b/sw/source/ui/inc/uitool.hxx
index 08f8c1ccb014..2decba659b0a 100644
--- a/sw/source/ui/inc/uitool.hxx
+++ b/sw/source/ui/inc/uitool.hxx
@@ -2,9 +2,9 @@
*
* $RCSfile: uitool.hxx,v $
*
- * $Revision: 1.1.1.1 $
+ * $Revision: 1.2 $
*
- * last change: $Author: hr $ $Date: 2000-09-18 17:14:43 $
+ * last change: $Author: jp $ $Date: 2001-02-14 09:57:44 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -84,7 +84,7 @@ class ListBox;
class SwDocShell;
class SwFrmFmt;
class SwTabCols;
-
+class DateTime;
// Umschalten einer Metric
void SetMetric(MetricFormatter& rCtrl, FieldUnit eUnit);
@@ -135,5 +135,6 @@ USHORT InsertStringSorted(const String& rEntry, ListBox& rToFill, BOOL bHasOffse
SwTwips GetTableWidth( SwFrmFmt* pFmt, SwTabCols& rCols, USHORT *pPercent,
SwWrtShell* pSh );
+String GetAppLangDateTimeString( const DateTime& );
#endif // _UITOOL_HXX
diff --git a/sw/source/ui/misc/redlndlg.cxx b/sw/source/ui/misc/redlndlg.cxx
index b5eba8b7d893..59c6f935010c 100644
--- a/sw/source/ui/misc/redlndlg.cxx
+++ b/sw/source/ui/misc/redlndlg.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: redlndlg.cxx,v $
*
- * $Revision: 1.4 $
+ * $Revision: 1.5 $
*
- * last change: $Author: jp $ $Date: 2000-12-21 16:15:31 $
+ * last change: $Author: jp $ $Date: 2001-02-14 09:58:12 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -129,6 +129,9 @@
#ifndef _SWWAIT_HXX
#include <swwait.hxx>
#endif
+#ifndef _UITOOL_HXX
+#include <uitool.hxx>
+#endif
#ifndef _HELPID_H
#include <helpid.h>
@@ -202,7 +205,6 @@ class SwRedlineAcceptDlg
SwRedlineDataChildArr aRedlineChilds;
SwRedlineDataParentSortArr aUsedSeqNo;
SvxAcceptChgCtr aTabPagesCTRL;
- const International& rIntl;
PopupMenu aPopup;
Timer aDeselectTimer;
Timer aSelectTimer;
@@ -455,7 +457,6 @@ void SwModalRedlineAcceptDlg::AcceptAll( BOOL bAccept )
SwRedlineAcceptDlg::SwRedlineAcceptDlg(Dialog *pParent, BOOL bAutoFmt) :
pParentDlg (pParent),
- rIntl (Application::GetAppInternational()),
aTabPagesCTRL (pParent, SW_RES(CTRL_TABPAGES)),
aPopup (SW_RES(MN_REDLINE_POPUP)),
aRootClosed (SW_RES(BMP_ROOT_CLOSED)),
@@ -651,7 +652,8 @@ void SwRedlineAcceptDlg::InitAuthors()
Beschreibung:
------------------------------------------------------------------------*/
-String SwRedlineAcceptDlg::GetRedlineText(const SwRedline& rRedln, DateTime &rDateTime, USHORT nStack)
+String SwRedlineAcceptDlg::GetRedlineText( const SwRedline& rRedln,
+ DateTime &rDateTime, USHORT nStack)
{
String sEntry(GetActionText(rRedln, nStack));
sEntry += '\t';
@@ -661,9 +663,7 @@ String SwRedlineAcceptDlg::GetRedlineText(const SwRedline& rRedln, DateTime &rDa
const DateTime &rDT = rRedln.GetTimeStamp(nStack);
rDateTime = rDT;
- sEntry += rIntl.GetDate( rDT );
- sEntry += ' ';
- sEntry += rIntl.GetTime( rDT, FALSE, FALSE );
+ sEntry += GetAppLangDateTimeString( rDT );
sEntry += '\t';
sEntry += rRedln.GetComment(nStack);
@@ -1411,17 +1411,13 @@ IMPL_LINK( SwRedlineAcceptDlg, CommandHdl, void*, EMPTYARG )
const SwRedline &rRedline = pSh->GetRedline(nPos);
sComment = rRedline.GetComment();
SfxItemSet aSet(pSh->GetAttrPool(), SvxPostItDialog::GetRanges());
- const International& rIntl = Application::GetAppInternational();
aSet.Put(SvxPostItTextItem(sComment.ConvertLineEnd(), SID_ATTR_POSTIT_TEXT));
aSet.Put(SvxPostItAuthorItem(rRedline.GetAuthorString(), SID_ATTR_POSTIT_AUTHOR));
- const DateTime &rDT = rRedline.GetRedlineData().GetTimeStamp();
-
- String sDate(rIntl.GetDate( rDT ));
- (sDate += ' ' ) += rIntl.GetTime( rDT, FALSE, FALSE );
-
- aSet.Put(SvxPostItDateItem(sDate, SID_ATTR_POSTIT_DATE));
+ aSet.Put(SvxPostItDateItem( GetAppLangDateTimeString(
+ rRedline.GetRedlineData().GetTimeStamp() ),
+ SID_ATTR_POSTIT_DATE ));
SvxPostItDialog *pDlg = new SvxPostItDialog(pParentDlg, aSet, FALSE);
pDlg->HideAuthor();
@@ -1560,6 +1556,9 @@ void SwRedlineAcceptDlg::FillInfo(String &rExtraData) const
/*------------------------------------------------------------------------
$Log: not supported by cvs2svn $
+ Revision 1.4 2000/12/21 16:15:31 jp
+ FillInfo: store TabDistance as string
+
Revision 1.3 2000/12/07 11:47:55 os
#81429# String::CreateFromInt32()
diff --git a/sw/source/ui/shells/textfld.cxx b/sw/source/ui/shells/textfld.cxx
index 39606f07cadb..9b97885432e6 100644
--- a/sw/source/ui/shells/textfld.cxx
+++ b/sw/source/ui/shells/textfld.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: textfld.cxx,v $
*
- * $Revision: 1.4 $
+ * $Revision: 1.5 $
*
- * last change: $Author: os $ $Date: 2000-11-14 11:38:29 $
+ * last change: $Author: jp $ $Date: 2001-02-14 09:57:20 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -123,6 +123,9 @@
#ifndef _OFF_APP_HXX //autogen
#include <offmgr/app.hxx>
#endif
+#ifndef _UNOTOOLS_LOCALEDATAWRAPPER_HXX
+#include <unotools/localedatawrapper.hxx>
+#endif
#ifndef _FMTINFMT_HXX //autogen
#include <fmtinfmt.hxx>
@@ -175,6 +178,9 @@
#ifndef _FLDEDT_HXX
#include <fldedt.hxx>
#endif
+#ifndef _UITOOL_HXX
+#include <uitool.hxx>
+#endif
#ifndef _CMDID_H
#include <cmdid.h>
@@ -340,10 +346,10 @@ void SwTextShell::ExecField(SfxRequest &rReq)
{
aSet.Put(SvxPostItTextItem(pPostIt->GetPar2().ConvertLineEnd(), SID_ATTR_POSTIT_TEXT));
aSet.Put(SvxPostItAuthorItem(pPostIt->GetPar1(), SID_ATTR_POSTIT_AUTHOR));
- aSet.Put(SvxPostItDateItem(
- Application::GetAppInternational().
- GetDate(pPostIt->GetDate()),
- SID_ATTR_POSTIT_DATE));
+
+ aSet.Put( SvxPostItDateItem(
+ GetAppLocaleData().getDate( pPostIt->GetDate() ),
+ SID_ATTR_POSTIT_DATE ));
// Traveling nur bei mehr als einem Feld
rSh.StartAction();
@@ -366,8 +372,8 @@ void SwTextShell::ExecField(SfxRequest &rReq)
aSet.Put(SvxPostItAuthorItem( aUserOpt.GetID(),
SID_ATTR_POSTIT_AUTHOR));
aSet.Put(SvxPostItDateItem(
- Application::GetAppInternational().
- GetDate(Date()), SID_ATTR_POSTIT_DATE));
+ GetAppLocaleData().getDate( Date() ),
+ SID_ATTR_POSTIT_DATE));
}
SvxPostItDialog *pDlg = new SvxPostItDialog( pMDI, aSet, bTravel);
@@ -419,17 +425,13 @@ void SwTextShell::ExecField(SfxRequest &rReq)
BOOL bTravel = FALSE;
SfxItemSet aSet(GetPool(), SvxPostItDialog::GetRanges());
- const International& rIntl = Application::GetAppInternational();
aSet.Put(SvxPostItTextItem(sComment.ConvertLineEnd(), SID_ATTR_POSTIT_TEXT));
aSet.Put(SvxPostItAuthorItem(pRedline->GetAuthorString(), SID_ATTR_POSTIT_AUTHOR));
- const DateTime &rDT = pRedline->GetRedlineData().GetTimeStamp();
-
- String sDate(rIntl.GetDate( rDT ));
- (sDate += ' ' ) += rIntl.GetTime( rDT, FALSE, FALSE );
-
- aSet.Put(SvxPostItDateItem(sDate, SID_ATTR_POSTIT_DATE));
+ aSet.Put( SvxPostItDateItem( GetAppLangDateTimeString(
+ pRedline->GetRedlineData().GetTimeStamp() ),
+ SID_ATTR_POSTIT_DATE ));
// Traveling nur bei mehr als einem Feld
rSh.StartAction();
@@ -723,7 +725,8 @@ IMPL_LINK( SwTextShell, PostItNextHdl, Button *, pBtn )
pPostItFldMgr->GoNext();
SwPostItField* pPostIt = (SwPostItField*)pPostItFldMgr->GetCurFld();
pDlg->SetNote(pPostIt->GetPar2().ConvertLineEnd());
- pDlg->ShowLastAuthor(pPostIt->GetPar1(), Application::GetAppInternational().GetDate(pPostIt->GetDate()));
+ pDlg->ShowLastAuthor( pPostIt->GetPar1(),
+ GetAppLocaleData().getDate(pPostIt->GetDate()));
// Traveling nur bei mehr als einem Feld
SwWrtShell* pSh = GetShellPtr();
@@ -760,7 +763,8 @@ IMPL_LINK( SwTextShell, PostItPrevHdl, Button *, pBtn )
pPostItFldMgr->GoPrev();
SwPostItField* pPostIt = (SwPostItField*)pPostItFldMgr->GetCurFld();
pDlg->SetNote(pPostIt->GetPar2().ConvertLineEnd());
- pDlg->ShowLastAuthor(pPostIt->GetPar1(), Application::GetAppInternational().GetDate(pPostIt->GetDate()));
+ pDlg->ShowLastAuthor( pPostIt->GetPar1(),
+ GetAppLocaleData().getDate(pPostIt->GetDate()));
// Traveling nur bei mehr als einem Feld
SwWrtShell* pSh = GetShellPtr();
@@ -827,15 +831,10 @@ IMPL_LINK( SwTextShell, RedlineNextHdl, Button *, pBtn )
pRedline = pSh->GetCurrRedline();
sComment = pRedline->GetComment();
- const International& rIntl = Application::GetAppInternational();
-
- const DateTime &rDT = pRedline->GetRedlineData().GetTimeStamp();
-
- String sDate(rIntl.GetDate( rDT ));
- (sDate += ' ' ) += rIntl.GetTime( rDT, FALSE, FALSE );
-
- pDlg->SetNote(sComment.ConvertLineEnd());
- pDlg->ShowLastAuthor(pRedline->GetAuthorString(), sDate);
+ pDlg->SetNote( sComment.ConvertLineEnd() );
+ pDlg->ShowLastAuthor( pRedline->GetAuthorString(),
+ GetAppLangDateTimeString(
+ pRedline->GetRedlineData().GetTimeStamp() ));
String sTitle(SW_RES(STR_REDLINE_COMMENT));
::lcl_AppendRedlineStr( sTitle, pRedline->GetType() );
@@ -887,15 +886,10 @@ IMPL_LINK( SwTextShell, RedlinePrevHdl, Button *, pBtn )
pRedline = pSh->GetCurrRedline();
sComment = pRedline->GetComment();
- const International& rIntl = Application::GetAppInternational();
-
- const DateTime &rDT = pRedline->GetRedlineData().GetTimeStamp();
-
- String sDate(rIntl.GetDate( rDT ));
- (sDate += ' ' ) += rIntl.GetTime( rDT, FALSE, FALSE );
-
pDlg->SetNote(sComment.ConvertLineEnd());
- pDlg->ShowLastAuthor(pRedline->GetAuthorString(), sDate);
+ pDlg->ShowLastAuthor(pRedline->GetAuthorString(),
+ GetAppLangDateTimeString(
+ pRedline->GetRedlineData().GetTimeStamp() ));
String sTitle(SW_RES(STR_REDLINE_COMMENT));
::lcl_AppendRedlineStr( sTitle, pRedline->GetType() );
diff --git a/sw/source/ui/utlui/uitool.cxx b/sw/source/ui/utlui/uitool.cxx
index 34b524e52285..5c40b85d48ef 100644
--- a/sw/source/ui/utlui/uitool.cxx
+++ b/sw/source/ui/utlui/uitool.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: uitool.cxx,v $
*
- * $Revision: 1.2 $
+ * $Revision: 1.3 $
*
- * last change: $Author: os $ $Date: 2000-09-28 15:25:03 $
+ * last change: $Author: jp $ $Date: 2001-02-14 09:58:47 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -115,6 +115,9 @@
#ifndef _VCL_LSTBOX_HXX //autogen
#include <vcl/lstbox.hxx>
#endif
+#ifndef _UNOTOOLS_LOCALEDATAWRAPPER_HXX
+#include <unotools/localedatawrapper.hxx>
+#endif
#ifndef _FMTORNT_HXX //autogen
#include <fmtornt.hxx>
@@ -876,8 +879,22 @@ SwTwips GetTableWidth( SwFrmFmt* pFmt, SwTabCols& rCols, USHORT *pPercent,
return nWidth;
}
+/*------------------------------------------------------------------------*/
+
+String GetAppLangDateTimeString( const DateTime& rDT )
+{
+ LocaleDataWrapper& rAppLclData = GetAppLocaleData();
+ String sRet( rAppLclData.getDate( rDT ));
+ ( sRet += ' ' ) += rAppLclData.getTime( rDT, FALSE, FALSE );
+ return sRet;
+}
+
+
/*------------------------------------------------------------------------
$Log: not supported by cvs2svn $
+ Revision 1.2 2000/09/28 15:25:03 os
+ use of configuration service in view options
+
Revision 1.1.1.1 2000/09/18 17:14:50 hr
initial import