summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--svtools/inc/svimpbox.hxx16
-rw-r--r--svtools/source/contnr/svimpbox.cxx33
2 files changed, 45 insertions, 4 deletions
diff --git a/svtools/inc/svimpbox.hxx b/svtools/inc/svimpbox.hxx
index 143422c60518..4bb8362e1b8d 100644
--- a/svtools/inc/svimpbox.hxx
+++ b/svtools/inc/svimpbox.hxx
@@ -2,9 +2,9 @@
*
* $RCSfile: svimpbox.hxx,v $
*
- * $Revision: 1.8 $
+ * $Revision: 1.9 $
*
- * last change: $Author: fs $ $Date: 2002-07-19 13:21:14 $
+ * last change: $Author: fs $ $Date: 2002-09-06 09:05:54 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -71,6 +71,10 @@
#ifndef _VCL_VCLEVENT_HXX
#include <vcl/vclevent.hxx>
#endif
+// #102891# ----------------
+#ifndef _UNOTOOLS_INTLWRAPPER_HXX
+#include <unotools/intlwrapper.hxx>
+#endif
class SvTreeListBox;
class Point;
@@ -192,6 +196,10 @@ private:
Point aEditClickPos;
Timer aEditTimer;
+
+ // #102891# -------------------
+ IntlWrapper * pIntlWrapper;
+
DECL_LINK( EditTimerCall, Timer * );
DECL_LINK( BeginDragHdl, void* );
@@ -262,6 +270,10 @@ private:
{ return IsExpandable() && !pView->IsExpanded( pCursor ); }
static void implInitDefaultNodeImages();
+
+ // #102891# -------------------
+ void UpdateIntlWrapper();
+
public:
SvImpLBox( SvTreeListBox* pView, SvLBoxTreeList*, WinBits nWinStyle );
~SvImpLBox();
diff --git a/svtools/source/contnr/svimpbox.cxx b/svtools/source/contnr/svimpbox.cxx
index 4a5418d94646..fcf4fae6d772 100644
--- a/svtools/source/contnr/svimpbox.cxx
+++ b/svtools/source/contnr/svimpbox.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: svimpbox.cxx,v $
*
- * $Revision: 1.21 $
+ * $Revision: 1.22 $
*
- * last change: $Author: fs $ $Date: 2002-09-05 12:00:53 $
+ * last change: $Author: fs $ $Date: 2002-09-06 09:06:09 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -89,6 +89,11 @@
#include "svtools.hrc"
#endif
+// #102891# --------------------
+#ifndef _UNOTOOLS_PROCESSFACTORY_HXX
+#include <comphelper/processfactory.hxx>
+#endif
+
#define NODE_BMP_TABDIST_NOTVALID -2000000
Image SvImpLBox::s_aDefCollapsed;
@@ -104,6 +109,7 @@ SvImpLBox::SvImpLBox( SvTreeListBox* pLBView, SvLBoxTreeList* pLBTree, WinBits n
aOutputSize( 0,0 ),
aSelEng( pLBView, (FunctionSet*)0 ),
aFctSet( this, &aSelEng, pLBView ),
+ pIntlWrapper( NULL ), // #102891# -----------------------
pTabBar(0)
{
pView = pLBView;
@@ -165,6 +171,29 @@ SvImpLBox::~SvImpLBox()
{
aEditTimer.Stop();
StopUserEvent();
+
+ // #102891# ---------------------
+ if( pIntlWrapper )
+ delete pIntlWrapper;
+}
+
+// #102891# --------------------
+void SvImpLBox::UpdateIntlWrapper()
+{
+ const ::com::sun::star::lang::Locale & aNewLocale = Application::GetSettings().GetLocale();
+ if( !pIntlWrapper )
+ pIntlWrapper = new IntlWrapper( ::comphelper::getProcessServiceFactory(), aNewLocale );
+ else
+ {
+ const ::com::sun::star::lang::Locale &aLocale = pIntlWrapper->getLocale();
+ if( aLocale.Language != aNewLocale.Language || // different Locale from the older one
+ aLocale.Country != aNewLocale.Country ||
+ aLocale.Variant != aNewLocale.Variant )
+ {
+ delete pIntlWrapper;
+ pIntlWrapper = new IntlWrapper( ::comphelper::getProcessServiceFactory(), aNewLocale );
+ }
+ }
}
void SvImpLBox::SetWindowBits( WinBits nWinStyle )